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
1 vote
2 answers
27 views

How to create an ElementMesh with at least two triangle elements at each corner?

Based on this simple example of a triangle mesh ...
1 vote
0 answers
48 views

RegionUnion looses MeshRegion's Markers

The following code shows the prescripted MeshCellMarkers 1 and 2 as expected : ...
  • 17.2k
7 votes
3 answers
247 views

Fast Segmentation

Imagine I have an image of a segmented tissue as follows what is the fastest way of converting such an image into a mesh-type object in Mathematica? I am familiar with ...
  • 4,250
4 votes
1 answer
103 views

Steady state heat equation/Laplace's equation special geometry

I would like to solve the Laplace's equation in between the square domain and a disk. However, using the code below, I was able to generate mesh but not able to obtain results with correct boundary ...
  • 63
2 votes
1 answer
87 views

RegionIntersection extremely slow before throwing error

I am dealing with polygons admitted by using other region functions (like RegionDifference), some of which have insidious problems. Consider those below; ...
  • 1,113
0 votes
0 answers
29 views

Crash when repeatedly calling RegionIntersection (and/or Mesh functions)

My kernel (v13.1.0 Windows 64-bit) crashes when repeatedly (~9 times) calling Region functions like RegionIntersection upon ...
  • 1,113
2 votes
2 answers
107 views

3D FEM - How to define Point-Markers for an ElementMesh object created with ElementMeshRegionProduct

I want to create a 3D grid based on a 2D mesh, on the surface of which I want to assign point-marker for certain regions. The mesh created in the sample code is a fluidic Y-structure, at whose inputs (...
  • 31
2 votes
2 answers
158 views

Region between finite lines or extracting a finite tesselation

EDIT2 the answers here (How to compute intersections of circles on a lattice) seem like they could help or solve the problem. EDIT: I saw this question about finding regions between lines before I ...
  • 3,397
1 vote
2 answers
150 views

Unify Polyhedrons into a single Polyhedron

Consider these two simple Polyhedrons which share a sub-face: ...
  • 1,113
2 votes
0 answers
137 views

Packing triangles into a rectangle

I'm working on packing a set of triangles into a rectangle but I'm unable to get them to pack dense enough or even touch. I found a post from 3 years ago called "Packing arbitrary shapes" ...
3 votes
2 answers
183 views

What's wrong with `Volume[]` of 3D-DelaunyMesh?

For a DelaunayMesh of a set of points ...
4 votes
1 answer
86 views

Can't verify MomentOfInertia of a MeshRegion

In this simple modified(thanks @DanielHuber) example I create a volumemesh of a region ...
0 votes
0 answers
45 views

Volume-mesh of a closed Surface-Region?

For an examplary given surface mesh (example from documentation DiscretizeRegion ) ...
1 vote
2 answers
75 views

How to find the regions corresponding to a given data set?

I have a data set corresponding to some problem. The data set is just a numerical sampling of $(x,y,z)$ where a particular formula is valid( this thing is analytically intractable that's why I ...
  • 177
0 votes
1 answer
90 views

How can I calculate the parameter function of this curved like 3d mesh?

...
  • 8,389
0 votes
1 answer
88 views

Mesh Split into Cylinder or Cuboid

...
  • 8,389
2 votes
0 answers
66 views

Bug of RandomPoint or Bug of Region?

Mathematica 13.1 on Mac In the help page of RandomPoint, it says: RandomPoint can generate random points for any RegionQ region that is also ConstantRegionQ. The data of mesh is here ...
  • 8,389
2 votes
1 answer
102 views

Pattern not matching BoundaryMeshRegion

Mathematica 13.1 on Windows 10. Can someone explain why the following does not match: MatchQ[BoundaryMeshRegion[Cube[]], BoundaryMeshRegion[__]] (* False *)
  • 32.4k
1 vote
1 answer
45 views

Draw Meshlines for specific z-coordinate and where x==y

I want to draw a Meshline where x==y and where z==4. The following code does neither. (The x==y line is horribly jagged and the ...
  • 1,182
6 votes
1 answer
98 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 ...
  • 2,147
4 votes
0 answers
88 views

What's the problem of RegionFit in this task of fitting a cylinder

...
  • 8,389
5 votes
0 answers
92 views

Why BoundingRegion so weak in such cases?

Each time, when I use FastCylinder option in BoundingRegion, I'll get this kind result. This problem lasts for many years, since ...
  • 8,389
4 votes
1 answer
230 views

How to get the cross sectional area of a wine bottle picture/photo by doing an appropiate image processing on it?

We are working on a PDE Acoustic model in which the geometry of analysis is the cross-sectional area of a wine bottle. We want to get the geometry from a wine bottle image by doing an appropriate ...
4 votes
2 answers
124 views

Select part of an ElementMesh

modified For an, examplary simple, ElementMesh ...
1 vote
0 answers
66 views

Building a structure out of cubes one block at a time

I have simplified code in which the motion of a point charge is simulated N times (one particle at a time) in a static electric field. When the point charge comes to rest (using WhenEvent boundary ...
  • 363
3 votes
2 answers
166 views

BoundaryMeshRegion Error: Boundary surface is not closed

I am trying to create a BoundaryMeshRegion comprised of many cubes with random locations, in a relatively small region. I have had success implementing my technique for a smaller number of cubes (say,...
  • 363
4 votes
1 answer
114 views

How to import and render this OBJ file with correct texture?

Here's the output of a 3D scan of a bike, I need to render it in color with the texture file provided. Here are the files: ...
  • 30.9k
12 votes
0 answers
332 views

How to reconstruct 3d meshes from 2d images of a scene?

The new ImageStitch was nice functionality added in v13, but is there anything available for constructing meshes (with color textures) from a bag of 2D images (...
  • 30.9k
6 votes
2 answers
231 views

Extract 2D quad mesh from 3D hexahedral mesh

I would like to extract 2D mesh of outer surface of 3D meshed object. Let's say I have 3D mesh data from here and I import the data into Mathematica. ...
  • 579
3 votes
2 answers
130 views

How to refine FEM mesh for steady state 1D problem?

I am solving a system of 3 steady state 1D ODEs, however the system consists of component that has sharp changes at x = 1, which is very hard to capture. Is there a way to specifically increase the ...
  • 181
4 votes
1 answer
85 views

3D Mesh refinement near sphere boundary and on surface revolutions

I am trying to solve an advection-diffusion problem inside surface of revolutions. I have high velocity gradients near the boundary of the bounding surface. Is there a way to refine the mesh near the ...
  • 75
3 votes
1 answer
87 views

Error Meshing with ToElementMesh (ToElementMesh: Cannot set region holes.) for certain objects

I have had a problem properly meshing certain .obj files, where others are meshed successfully. Here is an example of a successfully meshed .obj: Whereas, using the code at the bottom which includes ...
  • 363
2 votes
1 answer
65 views

RegionDifference Fails at Two Simple Cubes

Or, maybe, I just dont get it right. I got two simple mesh cubes: ...
  • 303
3 votes
1 answer
75 views

Keeping mesh coordinates unchanged for Implict Region [duplicate]

I am trying to generate a 3D mesh for Finite Element simulations. I need to provide some precomputed inputs to the mesh points and will like my mesh to be the same for a given shape. However, ...
  • 75
4 votes
1 answer
127 views

Finding sub-regions in an STL file for Finite Element

I use an external software (Amira) to segment X-ray tomography images and then create a surface mesh which I can then import into Mathematica as an STL file. This file has two enclosed regions, ...
  • 3,660
0 votes
1 answer
106 views

Finite Element NDSolve with input data at node points

I am trying to solve a steady-state advection-diffusion problem of the following form: $-D \nabla^2 T + \nabla \cdot (\mathbf{u} T) = -1$. I will be solving this problem in a 3D geometry (typically ...
  • 75
2 votes
1 answer
65 views

Cannot DiscretizeGraphics[] Parallelepiped nor Hexahedron

...
  • 23
3 votes
1 answer
187 views

Generating a non-convex polyhedron from polygons and normals

I am working on developing "directional offset" module, which requires pretty tricky mesh generation: offset values vary in different directions. Suppose I have list of points and polygons, ...
  • 303
1 vote
1 answer
194 views

Properly Updating Particle Motion in 3D Electric Field Simulation

I have a code (very bottom of post) which plots a static electric field as it passed through some metal sheet with an aperture in it. I seek to observe the motion of some N charged particles (point ...
  • 363
0 votes
1 answer
60 views

3D Parametric Plotting for N Charged Particles in a Nonuniform Electric Field

I have a code (very bottom of post) which plots a static electric field as it passed through some metal sheet with an aperture in it. I seek to observe the motion of some N charged particles (point ...
  • 363
0 votes
0 answers
62 views

Meshing Error on Imported obj file

I am trying to import a .obj file to be used in a static electric field simulation. I am able to successfully run the simulation with certain other aperture geometries (see here: < https://www....
  • 363
6 votes
2 answers
247 views

Coarse mesh of a sphere

I try to mesh a sphere (examplary) in different qualities, using MaxCellMeasure: ...
4 votes
2 answers
213 views

Finding Mesh Cell Normals

I need to find a normal pointing outside for every face / cell of a closed Mesh Region. How can I do this? Here's what I have now - mesh + mesh cells centers and I'm stuck and puzzled. There's ...
  • 303
3 votes
2 answers
103 views

Defining Dirichlet Boundary Conditions on an Imported 3D Object with Apertures in it

I am trying to simulate a static electric field (in 2d and 3d) as it passes through a couple of apertures in a 3D "metal sheet" (model imported as a .obj file) given here: https://www....
  • 363
1 vote
0 answers
42 views

Meaning of MeshCells for CantorMesh?

Let cantor2 = CantorMesh[2] As expected: RegionBounds[cantor2] (* {{0., 1.}} *) And as expected: ...
  • 11.6k
0 votes
0 answers
73 views

Difference between a region and its convex hull

I have a volume enclosing a certain region. The region is non-convex, and I calculate its convex hull with the built-in Mathematica function. I want to know the difference between the region and its ...
3 votes
1 answer
101 views

Is it possible to solve a differential equation with a user-defined variable mesh in NDSolve?

For some differential equations, its solution may evolve to a cusp, for example, singular behavior. One may want to introduce additional mesh points near the cusp to accurately follow the solution ...
8 votes
3 answers
359 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 ...
  • 83
4 votes
2 answers
198 views

For "RegionPlot", how to fill lines, points, or grids in different areas?

For "RegionPlot", how to fill lines, points, or grids in different areas? I have tried "Mesh", but it fills all region in same mesh. I want to get the result just like this picture,...
  • 41
8 votes
1 answer
222 views

Quarter a given triangular meshregion

For a given , examplary simple, triangular meshregion ...

1
2 3 4 5
15