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
11
votes
4answers
2k views

How can we find the longitude that cuts all the land on Earth in half?

Mathematica has already a specific function, RegionCentroid, that can be utilized to calculate the geographic center of any region. As it has been discussed in here ...
3
votes
1answer
64 views

Does DelaunayMesh use exact computations? What is the treatment of non-generic cases?

Computing Delaunay complexes can be sensitive to numerical instabilities, especially in higher dimensions. I would like to know how much I can rely on Mathematica's answers when using ...
2
votes
1answer
100 views

AceFem Error in SMTShowMesh

I consider for a calculation a sphere embedded within a matrix. To plot the results and especially the behavior around the spherical inclusion I want to "cut" through the matrix. That seems ...
3
votes
1answer
129 views

Create a spherical Hex mesh from given surface points

For my calculations I got two spherical meshes. One is a surface mesh of quadrilateral elements and the other is the corresponding "inner" hex mesh. The problem with the meshes is, that the ...
2
votes
3answers
91 views

How to make a 3D listplot with meshlines going only along one cartesian coordinate?

I have an external python code that computes a bunch of data, which I read into Mathematica as a table, so: Import["Documents\Hubbard\Python\data.dat", "Table"]; These files are ...
0
votes
0answers
36 views

Export 3D Mesh without shading issues

I can export a mesh to a .obj file such as with the following: ...
5
votes
1answer
162 views

FEM: how to redo a composed boundary mesh for better quality?

Suppose you have region with 2 materials: one embedding material (matrix) containing some particles (...
3
votes
1answer
74 views

Export ComplexPlot3D as Mesh with Material

If I generate a complexplot as follows: a1 = ComplexPlot3D[Log[z], {z, -5 - 5 I, 5 + 5 I}] I can export it to a 3D mesh (for use in external applications) with: <...
4
votes
1answer
82 views
3
votes
1answer
75 views

Mesh with Prescribed Vertices

Mathematica has documentation for triangulating regions bounded by curves using e.g. TriangulateMesh. This is very useful for the work that I (aspire to) do drawing pictures of complicated surfaces ...
2
votes
3answers
324 views

Voronoi diagram of two data sets

My primary data is ...
-2
votes
4answers
269 views

Extrude 3D list with thickness n

I have a 3 dimensional list of points which i would like to extrude in z coordinate with thickness n, i.e. z_{i} -> z_{i}+n for all points in z. There is a similar question concerning 2d list where ...
2
votes
1answer
45 views

Plotting fundamental domains of $\mathbb{Z}^{2}$ with additional features [closed]

I'm trying to figure out how to plot a region that looks like this: The squares don't have to be painted like that, if I could have just light green, gray, light blue and light red it would be great. ...
2
votes
1answer
75 views

Solving PDE with prescribed rectangular mesh

Question: I want to solve a PDE using NDEigensystem. The region is a rectangle Rectangle[{0,-70}, {20, 70}]. How can I make a ...
3
votes
1answer
82 views
0
votes
0answers
30 views

Finding points of intersections between contours and mesh functions in ContourPlot3D

I have this code example that finds plane of zero first derivatives - the intersections of these planes will give the locations of the local extrema. Or at least a good starting point to finding them. ...
1
vote
1answer
78 views

ContourPlot and MeshFunctions issue between versions 11.3 and 12.0

On Mathematica 11.3 This code produces the image below (a set of points that I am then using as a pattern for FindRoot): ...
3
votes
2answers
167 views

How to find the MeshConnectivityGraph[] from a list of independent cell mesh regions?

I'm generating a bunch of points inside a BoundaryMeshRegion. Then I generate the Voronoi mesh of the points, and take the intersection of the Voronoi cells into ...
1
vote
2answers
74 views

How do I discretize Line objects

I have a polygon object that I wish to discretize. e.g. points0 = {{0, 0}, {1, 2}, {1, 0}, {0, 0}} DiscretizeRegion[Line[points0]] My goal is to increase the ...
3
votes
1answer
51 views

Marking with Mesh, Distinct coloring, Ticksing, and Plotting table of complex function with parametric plot

Here is my todo list and what i've done: Using FrameTicks on specific points only (failed). Plotting six graphs with Table on <...
5
votes
1answer
88 views

Linux crash DiscretizeRegion

Good evening, can anyone confirm this bug on his/her Linux machine and Windows machine? ...
4
votes
2answers
101 views

Save data from TriangulateMesh

Is it possible to extract the coordinates from each triangle after using TriangulateMesh? It sounds very weird but i really need it for one of my projects. I have to save each triangle separately in a ...
9
votes
1answer
134 views

Meshing an inclusion in an inclusion

I do have FEM mesh related question. I am trying to mesh some inclusion from a png file using ToElementMesh. Thats working quite nicely even for more complex structures. ...
9
votes
2answers
315 views

Wafer Chucking Model

I am trying to calculate the pressure required to flatten a bowed wafer. The simple model I am using for the study has a bottom layer (the bowed wafer) pushed against a harder flat surface as shown in ...
2
votes
2answers
52 views

Showing coordinates of a point in a Graphics3D object with cursor scrolling over it

I would like to know how one can coax Mathematica to reveal the coordinates of a generic Graphics3D object. Consider, e.g., the unit sphere: ...
3
votes
0answers
63 views

Graph embedding constrained to a surface?

Have been contemplating it for a while, but did not dare to post as I felt like this must be a major undertaking to implement. Then saw the excellent answers to a recent question RegionPlot3D KnotData ...
1
vote
1answer
77 views

Fix (decompose) Degenerate Polygon (vertex coincides with edge)

The code Polygon[{{0,0},{3,0},{3,3},{1,3},{1,1},{2,2},{2,1},{0,1}}] produces, according to Mathematica, a disconnected polygon with 0 area. The vertex ...
10
votes
1answer
95 views

How to control floating point precision when `Export`ing to obj format?

Suppose we have a MeshRegion that we want to export to an obj file with, say double precision. Is that possible with Export? And ...
4
votes
1answer
102 views

Meshing four region from four polygon

I'm trying to generate mesh for axial symetric heat transfer model. The model contains four regions build from four different kinds of materials. Inside the steel component is empty air hole present. ...
1
vote
0answers
51 views

Using DiscretizeGraphics on a Graphics3D object that is produced by combining multiple Graphics3D objects

Consider the following two Graphics3D objects that can individually be meshed using DiscretizeGraphics. The first is a cone (...
0
votes
1answer
34 views

Unwanted scaling when overlaying GraphicsComplex graphic onto image?

I have a collection of complex hull meshes, which I would like to overlay onto an image. These complex hull meshes were obtained from the original image, and I have verified that their mesh ...
3
votes
1answer
88 views

How to create random isolated clusters periodically?

Let's assume we have a $n \times n$ grid repeated periodically, and I want to create some random isolated patches on it (and assign some value to those grid points). For a simple example consider this ...
3
votes
1answer
76 views

There are mesh grids when Export RegionPlot

When setting the Opacity option, there are mesh grids on the background of the pdf file. Opacity option should be saved because ...
7
votes
2answers
137 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 ...
3
votes
0answers
51 views

What is quadratic TriangleElement in ToElementMesh? [duplicate]

TriangleElement support 3 points and 6 points triangles. In the documentation of TriangleElement, it explains For quadratic ...
7
votes
1answer
121 views

problem with DelaunayMesh 3D coordinates

I found DelaunayMesh works fine for 2D. For example, ...
8
votes
2answers
209 views

How to refine a boundary mesh with MeshRefinementFunction?

MeshRefinementFunction works well to refine elements in a defined spatial domain (here x>0): ...
3
votes
3answers
110 views

How can I find polygons in convex hull?

From some geometric computations I get a lot of 3 dimensional points. From theory I know two facts: The points define a convex polyhedron, and this polyhedron has non-regular 3-, 4- and 5-gons as ...
0
votes
0answers
37 views

Constraints and Tolerance

So I'm running NMaximize for optimizing a value and for constraints, I need the parameters to belong to a discrete set of elements. Basically, the constraint looks ...
0
votes
1answer
102 views

Meaning of LineElement in Mathematica? [closed]

Line element in mathematics is generally defined as the following: $\qquad ds^2 = dx^2 + dy^2$ In Mathematica, the documentation of LineElement says: $\mathtt{...
5
votes
2answers
183 views

How to get a clean RegionDifference product

I want to get the difference between the following two regions, an annulus and a crown: Here's the code: ...
1
vote
1answer
89 views

Change mesh density of Graphics3D object made of Triangles

I am new to mesh discretisation on Mathematica. I have a Graphics3D object made up of Triangles, that I would like to convert ...
7
votes
1answer
158 views

MeshRefinementFunction on 2D surfaces embedded in 3D

DiscretizeRegion doesn't seem to run the supplied MeshRefinementFunction when meshing a 2D surface in 3D. For example: ...
0
votes
0answers
169 views

colouring Voronoi cells by their properties

I put a couple of previous posts together How can find the 2D Voronoi cell area distribution? Color code Voronoi cell areas depending on number of vertices color voronoi cell based on area to make the ...
1
vote
1answer
66 views

Cartesian grid across 3D plot

I have a plot of a tennis racket hitting a tennis ball ...
2
votes
1answer
142 views

Neumann boundary condition ignored

Im trying to solve a system of two PDE (im[t,x] and ia[t,x]) that are dependent on time and distance. I’m using my own anisotropic mesh (thanks to @TimLaska) that is aimed to represent an interface ...
2
votes
0answers
62 views

How to reduce the number of triangles in a mesh? [duplicate]

I am trying to turn a Graphics3D object (the Stanford Bunny) into a mesh. The result from using DiscretizeGraphics has too many ...
6
votes
1answer
248 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: ...
2
votes
1answer
132 views

Using ParametricNDSolveValue with parameter-dependent region to solve for a flow field around an airfoil via FEM

I am looking for a way to have a parametric solution to a potential flow problem using FEM around an airfoil (as an initial bc for the inviscid bc problem), where the parameter to be varied has direct ...

1
2 3 4 5
13