Questions tagged [mesh]

Questions on the use and creation of meshes including the use of MeshRegion, ElementMesh, and TetGenLink.

Filter by
Sorted by
Tagged with
8 votes
2 answers
581 views

Make uniform mesh with quad elements

I have the following code that generates a finite element mesh with triangular elements which by using command ToQuadMesh I convert to the quadrilateral elements, but I am not able to make the uniform ...
LejlaS's user avatar
  • 337
8 votes
2 answers
671 views

How to assign Element marker at boundary edges

How to assign marker at the boundary edges as 1, 2, 3, 4 respectively and set all of the inside elements of region as 0? for example: Code: ...
user avatar
8 votes
4 answers
3k views

Triangulated Mesh from Voronoi Diagram

I want to generate a mesh (using Mathematica 10) in the following manner: generate a Voronoi diagram, like so: and then triangulate each individual Voronoi grain, where an edge is formed by ...
daedalus's user avatar
  • 105
8 votes
4 answers
240 views

Shading region under (or over) a curve in horizontal bands

It seems like this should be simple, but I have spent most of the day trying to find a similar example on the web and there appears to be nothing remotely similar. Since I cannot find a way to make ...
Mike Pugh's user avatar
8 votes
2 answers
355 views

Contourplots on discrete surfaces

Does anyone know how one can plot contour lines on a meshed surface? For example I would like to be able to plot contour lines indicating lines of equal distance from a given point such as data coming ...
Dunlop's user avatar
  • 4,023
8 votes
2 answers
1k views

Finding concave hull for separated small clusters

Data : data3D = Import[file, "VertexData"]; Graphics3D[Point[data3D]] How to find concave polygon for separated small clusters.
user avatar
8 votes
3 answers
419 views

How to generate a mesh in an area with curves inside

I would like to know how to generate a mesh inside an area, and be able to find the original curve outline inside the area from the mesh. For example: There is a rectangle inside which there is a ...
OlW's user avatar
  • 83
8 votes
1 answer
866 views

Create a voxelized mesh from an STL mesh file

I would like to create a cubic or 3d grid mesh with a constant size for a surface mesh that represents a hollow torus saved in an STL file. mesh I am import the vertex using: ...
F.Mark's user avatar
  • 599
8 votes
2 answers
491 views

ToElementMesh ignores Boundaries and MeshRefinemet

I'm building a mesh of a pit storage in Mathematica which I then export to another FEM-software. I follow the workflow for creating a ElementMesh from the documentation, but it won't work in the way ...
jufo's user avatar
  • 311
8 votes
2 answers
1k views

How to color the triangles of a mesh?

Given a mesh, I want to assign each triangle a color. I tried to do it in this way: ...
Purboo's user avatar
  • 677
8 votes
2 answers
536 views

How to refine a boundary mesh with MeshRefinementFunction?

MeshRefinementFunction works well to refine elements in a defined spatial domain (here x>0): ...
Oscillon's user avatar
  • 1,231
8 votes
3 answers
594 views

How to find ids in a curved line in a finite element mesh?

Previous discussion about this problem has already occurred in this link: How to get the node id in a specific coordinate in a finite element mesh? I have the following code that generates a finite ...
Stratus's user avatar
  • 2,954
8 votes
1 answer
191 views

Using Mesh in ContourPlot to find intersections not working

This old answer by @Silvia uses Mesh to find intersections of curves. Unfortunately, it doesn't seem to work in v13.2. For example (based on @JasonB's comment to ...
Chris K's user avatar
  • 20.2k
8 votes
1 answer
448 views

Mass Transport FEM Using Quad Mesh

This question is a follow-up to my previous question and an attempt to implement @Tim Laska's excellent approach of setting up an anisotropic quad mesh. I'm solving a similar problem to @Tim Laska's ...
Rpj's user avatar
  • 249
8 votes
2 answers
413 views

Computing volume of intersection of two regions

I am trying to compute the volume of intersection of the following two regions: ...
Yizhen Chen's user avatar
8 votes
1 answer
235 views

Quarter a given triangular meshregion

For a given , examplary simple, triangular meshregion ...
Ulrich Neumann's user avatar
8 votes
2 answers
190 views

Using mesh cell highlighting to override the default rendering of a region

Bug found in V11 and fixed in V12 The default rendering of a region can be rather uninformative. Consider this simple example. ...
m_goldberg's user avatar
  • 108k
8 votes
1 answer
334 views

Can I trust area calculations over discrete MeshRegions? Flipped triangles, possible visual bug

The following code produces a MeshRegion in two different ways. Unfortunately, the first method produces weird artifacts in ...
Alexander Erlich's user avatar
8 votes
1 answer
940 views

Making a 2D hexagonal mesh

There are a lot of answers for how to make a hexagonal mesh on a 3D surface but nothing on how to make a hexagonal mesh on a 2D surface. Can any provide code on how to do so? I am new to mathematica, ...
nycguy92's user avatar
  • 181
8 votes
1 answer
1k views

Meshing the surface of a non-convex object

I would like to mesh the surface of a cloud of points that may not be completely convex, for example the points in this question. Mathematica does not provide triangulation of 3D points, but there is ...
lalmei's user avatar
  • 3,332
8 votes
2 answers
323 views

Coarse mesh of a sphere

I try to mesh a sphere (examplary) in different qualities, using MaxCellMeasure: ...
Ulrich Neumann's user avatar
8 votes
1 answer
354 views

Getting random points on a mesh region

So I have a region defined by a MeshRegion,like ...
t-smart's user avatar
  • 2,031
8 votes
1 answer
144 views

Make polygons visible in MeshRegions in v11, as they were in v10

In versions 10.x, polygons in mesh regions were clearly outlines: In version 11.0 they aren't by default. How do I get back the v10 display so I can see where my polygons are, even in flat faces ...
Szabolcs's user avatar
  • 235k
8 votes
1 answer
445 views

FEM Simulation: Meshing Two Arbitrary Objects in an "Air" Mesh

Based on this excellent answer to my previous question: FEM: Electric Field between two arbitrary defined shapes I wanted to try out other shapes: ...
james's user avatar
  • 3,083
8 votes
1 answer
354 views

ConvexHullMesh sometimes excludes valid points from convex hull

I have a sequence of polytopes that I am trying to visualize, and I find that ConvexHullMesh sometimes excludes points from the convex hull, and it does so inconsistently. In particular, notice these ...
Marcus P S's user avatar
8 votes
1 answer
214 views

ParametricPlot MeshStyle bug in v10?

Bug introduced in 10.0.1 or earlier and fixed in 10.0.2.0 Original Post The documentation gives the following code and says "Use a red mesh in the x direction and a blue mesh in the y direction:&...
luyuwuli's user avatar
  • 2,814
7 votes
3 answers
446 views

Identify the Vertices and Lines around the edges of a free surface - Mesh/DiscreteGraphics

To write a mesher that closes a mesh surface using an implied surface from a boundary spline curve and mesh generated using DiscreteGraphics, I need to identify the Vertices and Lines around the edges ...
user57215's user avatar
  • 341
7 votes
4 answers
367 views

Recalculate line coodinates

I have the following line: ...
Giovanni Baez's user avatar
7 votes
2 answers
372 views

Visualizing region outlines

I want to generate a picture like this, highlight its outlines, don't show extra edges. The built-in MengerMesh will have extra edges ...
expression's user avatar
  • 5,642
7 votes
4 answers
1k views

Problem with exporting RegionPlot as PDF

I have the following RegionPlot (which code I don't present since it comes from a long expression): When I right click on it (within the notebook) and try to save ...
sam wolfe's user avatar
  • 4,693
7 votes
2 answers
243 views

Reflection colors are lost on high resolution MeshRegion

Mathematica is able to manage two kinds of reflections : With a simple color directive (Blue, RBGColor[...]...), one can ...
andre314's user avatar
  • 18.5k
7 votes
3 answers
424 views

Can one use MeshRefinementFunction to obtain a nonobtuse triangulation?

I have a planar convex polygonal region Rc. I would like to triangulate it such that every triangle is nonobtuse. I was hoping that the ...
Joseph O'Rourke's user avatar
7 votes
2 answers
509 views

Meshing a cylindrical geometry with a notch

I have been trying to mesh a cylindrical geometry with a notch. To generate the geometry i use the following command. ...
KVK318's user avatar
  • 141
7 votes
3 answers
480 views

Reduce quality of an imported MeshRegion

Importing STL files using Import results in a MeshRegion composed by the triangulation of the original file, and a similar ...
Guillermo Oliver's user avatar
7 votes
3 answers
349 views

How to Discretize the Following Region Using Reasonable Bounds?

I want to accurately discretize the implicit equation $x^2+x+y^2+\sin(4xy)+\sin(3xy)=3.9$. To get the whole discretized shape, I'm forced to use oversized bounds ...
Arbuja's user avatar
  • 71
7 votes
3 answers
295 views

Problems with ImplictRegion

Through code: ...
πρόσεχε's user avatar
7 votes
2 answers
219 views

PeriodicInterpolation does not work in ElementMeshInterpolation

I want to use ElementMeshInterpolation to generate interpolation function with periodic boundary condition. I use below data as an example ...
matheorem's user avatar
  • 17.1k
7 votes
1 answer
358 views

Refining mesh size leads to absurd results for a coupled heat transfer FEM model

I have been recently solving a conjugate heat transfer problem, which involves fully-reversing or reciprocating flow of fluid over a heated block of solid. The problem is 2D and the temperature field ...
Avrana's user avatar
  • 297
7 votes
1 answer
370 views

Convert ConvexHull to Inequality

I have the following convex hull. P0={0,0,0}; P1={1,0,0}; P2={0,1,0}; P3={0,0,1}; ConvexHullMesh[{P0,P1,P2,P3}] Now I want the region algebraically as equality ...
Epsilon's user avatar
  • 1,122
7 votes
2 answers
165 views

How to group points based on mesh primitive membership

As a simple example of what I want to do, let's say I have a Voronoi mesh in a $10\times10$ area with $10$ random "seed points": ...
BioPhysicist's user avatar
  • 1,124
7 votes
1 answer
663 views

How do I get a MeshRegion from an obj file, or from Geometry3D

How do I read in an obj file as a MeshRegion so I can e.g. compute its area? If I just import the object and try Area[O] it ...
Ralph's user avatar
  • 73
7 votes
2 answers
1k views

How to show wireframes on imported Object / Mesh (.obj file)

I've managed to import a Wavefront (.obj) file and store it in a variable like so: ...
Francis Laclé's user avatar
7 votes
1 answer
463 views

Turn a region and points inside that region into a mesh

I have a region defined by a polygon and a few points that are inside that region. I'd like to create a mesh where its boundary is the boundary of the region and the vertices interior to the mesh are ...
fp.monkey's user avatar
  • 395
7 votes
3 answers
475 views

Trouble with discrete MeshRegions: Integrating over plane slices

I would like to slice a discrete 3D region with a plane, and integrate some field over the resulting 2D region (embedded in 3D). Let me be clear: I do not mean analytical regions (the kind you could ...
Alexander Erlich's user avatar
7 votes
2 answers
296 views

Poor/wrong sampling in 1D DiscretizeRegion of splines?

Bug introduced in 10.1 and fixed in 11.3 Context In relation to this question I have would like to use splines to define a ...
chris's user avatar
  • 23k
7 votes
2 answers
2k views

How to generate mesh and calculate volume of 3d object?

I saw a couple of posts dicretizing the graphic and generate DelaunayMesh to get volume of 3D object. The issue I'm having is that DelaunayMesh creates a bigger solid covering the original one, ...
Xnei's user avatar
  • 73
7 votes
2 answers
495 views

Mesh at Ticks positions

In a ListPlot3D[ ] I want to have the Mesh at the same positions as the ticks. For some reason this isn't default if both are ...
PeMa's user avatar
  • 309
7 votes
2 answers
167 views

Create a domain for an Hexahedron with the floor replaced with an Indian Burial Mound

I am trying to create an acoustic model domain for a small park that contains an Indian burial mound. The park is laid out using a 3D cartesian coordinate system in units of meters. A Hexahedron ...
Doug Kimzey's user avatar
  • 2,279
7 votes
1 answer
289 views

Smoothing the Region?

There is a 2D Pi I successed transformed it to 3D. ...
partida's user avatar
  • 6,816
7 votes
1 answer
335 views

RandomPoint inside mesh for walk-on-spheres Monte Carlo PDE solver

I'm trying to understand a Monte-Carlo Laplace/Poisson PDE solver: http://www.cs.cmu.edu/~kmcrane/Projects/MonteCarloGeometryProcessing/paper.pdf This method inspired by random-walks and ray-tracing ...
flinty's user avatar
  • 25.3k

1 2 3
4
5
17