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
12
votes
6answers
1k views

Change appearance of ConvexHullMesh

I'm struggling to understand the behaviour of ConvexHullMesh (or rather the non-behaviour). I have a polygon p ...
9
votes
2answers
355 views

Orientation of boundary domain normals

Bug introduced in 11.2.0 or earlier, and fixed in 11.3.0 I would like to use BoundaryNormals provided by the ElementMesh object. To demonstrate my problem I will take my favorite domain: ...
8
votes
3answers
423 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 ...
8
votes
2answers
456 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: ...
7
votes
1answer
210 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 ...
7
votes
1answer
275 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 ...
7
votes
2answers
480 views

How to add 'border' to Voronoi diagram

Suppose I have a set of points pts, from which I generate a Voronoi diagram VD: ...
7
votes
1answer
371 views

Voronoi mesh from non-parametric surfaces for 3D printing

I am trying to make a Voronoi mesh from the Stanford Bunny surface for 3D printing, intended as a test case to make a Voronoi mesh from any arbitrary, non-parametric 3D surface. Related techniques ...
7
votes
2answers
145 views

Penalty function on discrete mesh using Laplace-Beltrami operator?

Context I am interested in extending to the ill-condionned regime the inversion of linear equations arising from inverting differential equations which have been solved via 0-splines over a mesh ...
6
votes
2answers
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, ...
6
votes
3answers
164 views

Sometimes Region can't build right region

During my work with NDSolveFEM I found strange behavior of function Region. ...
6
votes
1answer
107 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: ...
5
votes
1answer
606 views

NDSolve and FEM support for non conformal meshes of a disk [with Kernel crash]

I want to create an ElementMesh for a disk. For my specific scenario, some author advise to use a regular mesh, where the radial and tangential directions are ...
4
votes
3answers
177 views

How to draw borders around tiles of the same color?

I'm having difficulties with a project to show random tiles with a few random colors. Here's the code that I need to modify: ...
3
votes
1answer
172 views

Colorcode mesh tiles

I have a polygon and 3 lists of points (H, M, L) inside this polygon. I would like to create a mesh inside this polygon and to colorcode each tile of the mesh depending on how many H, M and L there ...
2
votes
2answers
1k views

Extracting points from the MeshFunctions of Plot3D

I am trying to extract the points from the mesh lines of a 3D plot. (Not my actual function.) ...
9
votes
3answers
505 views

Small circles at mesh nodes

How to show the (16 X 4) mesh intersection points by a tiny red dots? ParametricPlot[v { Cos[u], Sin[u]}, {u, 0, 2 Pi},{v,1,3}, Mesh-> {15,3} ]
9
votes
1answer
2k views

Smoothing out data points in a ListDensityPlot

I stumbled upon this problem when I was trying to make some nice smooth ListDensityPlots of my numerical data. In short, my problem is that I let Mathematica plot two copies of basically the exact ...
9
votes
2answers
788 views

How do I get ConvexHullMesh to return polygons instead of triangle as surface mesh?

I would need to identify the types of regular polygons forming the surface of a convex hull of 3D points. If I e.g. take the following example of a regular polyhedron ...
7
votes
1answer
241 views

Meshing a thin tube

I'd like to mesh a thin tube. The following gives a strange result when thickness becomes too small: ...
7
votes
2answers
230 views

Poor/wrong sampling in 1D DiscretizeRegion of splines?

Bug introduced in 10.1 and persisting through 10.2 or later and Fixed in 11.3 Context In relation to this question I have would like to use splines to define a <...
7
votes
1answer
203 views

Smoothing the Region?

There is a 2D Pi I successed transformed it to 3D. ...
7
votes
2answers
217 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 ...
6
votes
3answers
219 views

Regions for numerically defined Toroidal surfaces

I have data like this: DataVisualizationPlot = ListPointPlot3D[data] And would like to obtain the representing surface like this: ...
6
votes
0answers
374 views

How to increase boundary mesh quality?

Update: I tracked down the current issue to errors generated by numerically integrating over the boundary mesh. What's the proper way to integrate a function over the boundary of an implicit region? ...
5
votes
1answer
174 views

Piecewise Continuous Linear Basis on a Triangular Mesh

Question Given a FEM mesh, I would like to define a set of basis functions anchored to the mesh, so that any piecewise linear continuous function on the mesh can be expanded over that set. Such a ...
5
votes
1answer
288 views

How to create meshes with multiple regions from 2D images?

I would like to import 2D images to Mathematica and to use them to create meshed regions which can then be used for FEM. I create the images in Adobe illustrator so can either import a vector based ...
5
votes
2answers
220 views

How to upsample a (non-boundary) mesh region

I have a simple 2D triangle mesh embedded in a 3D space; note that it is not a BoundaryMeshRegion, but it is a MeshRegion. What ...
5
votes
2answers
325 views

color voronoi cell based on area

According to mrz's question: Color code Voronoi cell areas depending on number of vertices, he colored voronoi cell by number of corners corresponding to a Voronoi cell. My question is how to ...
4
votes
2answers
384 views

Stop ListContourPlot from interpolating beyond the data points

I am using listcontourplot to show my 3D data points but It is interpolating between faraway points and it is changing the outline of the shape. this is what I want to see: and this is what I have: ...
4
votes
1answer
696 views

Transforming a region obtained with RegionPlot

I have a region r0, obtained from an interpolated function, with the use of RegionPlot. Let's call this function under the ...
4
votes
1answer
600 views

Is there a way to make MaxCellMeasure and MaxBoundaryCellMeasure comparable?

I'm trying to learn a little about meshes used for FEA and such. It seems like a good strategy if you are creating a mesh for a region is to use a finer mesh near features than the mesh used over ...
4
votes
1answer
263 views

Problem with MeshOrderAlteration to create a 2nd order ElementMesh

After working on this 2D domain, I'm trying to reproduce the same ideas to create a mesh of a sphere composed of QuadElement, instead of more simple and common <...
4
votes
3answers
1k views

Plot a vector field over a line

This seemingly simple problem is giving me some trouble. I need to plot a vector field on a line, and for that I'm following what I found here. I try to create a mesh that contains two points and just ...
4
votes
1answer
164 views

ElementMesh from Tetrahedron subdivision

I would like to create a nice "structured" ElementMesh made of TetrahedronElement by dividing one larger ...
3
votes
1answer
119 views

Unable to use ElementMarker in DirichletCondition with structured quad mesh

I would like to use ElementMarker in a DirichletCondition on a structured quad mesh, but I am receiving the error: ...
1
vote
1answer
318 views

Boundary discretize region of ellipsoid returns a three dimensional region

I need to integrate a rather complicated function on an ellipsoidal surface, specifically a prolate spheroid surface. Im using the mathematica 10 feature of discretize the regions in mesh and pass ...
0
votes
1answer
65 views

RegionResize works improperly with different digital accuracy

The data is copied from the output cell of my original data. ...
13
votes
1answer
1k views

Making good meshes

I have been looking at how to make meshes and how to control the size of the boundary elements and the interior elements. A relevent question may be found here. I can see how to do this for regions ...
10
votes
2answers
214 views

How to return the coordinates of the respective 3 vertexes of a DelaunayMesh's face?

I have a set of points pts1 and a point redPts as below:- ...
9
votes
2answers
384 views

Picking mesh elements that are not on the border of the mesh

As an example, let's say I use a set of random points to create a Voronoi mesh pts = RandomReal[{-1, 1}, {100, 2}]; VoronoiMesh[pts, {-1, 1}] and get something ...
9
votes
1answer
562 views

ListContourPlot3D doesn't use all points

Edited thanks to @Kuba: In the following example, ListContourPlot3D accepts an array of points spaced at intervals 0.1 apart throughout the volume, but seems to choose an arbitrary number of points ...
8
votes
1answer
197 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:&...
8
votes
2answers
317 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 ...
7
votes
1answer
97 views

problem with DelaunayMesh 3D coordinates

I found DelaunayMesh works fine for 2D. For example, ...
7
votes
2answers
294 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 ...
7
votes
1answer
559 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 ...
7
votes
3answers
329 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 ...
7
votes
2answers
307 views

How to scale values for ColorFunction in SliceContourPlot3D?

Trying to help out in the question, Finite Elements 3D, I came across this behavior of SliceContourPlot3D: ...
6
votes
1answer
198 views

Area of an Annulus (MeshTools<>NIntegrate)

Fixed in Version 12.1.1 In a very simple example I try to describe an annulus using MeshTools package ...