# Tagged Questions

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

229 views

### Lloyd relaxation on VoronoiMesh

How can we apply Lloyd's relaxation algorithm to a VoronoiMesh? Thanks. UPDATE Thanks a lot KennyColnago for your answer. Based on Simon Woods suggestion of ...
70 views

### Are the triangles in DelaunayMesh oriented ccw?

MeshCells[R, 2] returns the triangles from R=DelaunayMesh[pts], where pts is a list of 2D ...
47 views

### How can I plot a “slice” of the mesh for a 3D plot?

I'm using NDSolveValue to solve the Laplacian equation for this geometry: I want to view the mesh that NDSolveValue is using, so I do the following: ...
388 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: ...
92 views

### How do you refine the elements of a 3D mesh?

Response to Answer below. Original Question: I am trying to refine a 3D mesh in a certain region. This seems relevant but does not work for me. I start by making the region which consists of a box ...
49 views

### Why is MeshRegion atomic?

I wanted to make some changes inside a MeshRegion today and found that unlike Graphics objects, it can't be done directly ...
65 views

### to control the existence and distribution of meshes along x y z separately in ParametricPlot3D or SphericalPlot3D

I have a surface generated by the following code: ...
84 views

### Concerning the default coloring made by Plot3D in 10.4 [closed]

Recently, I have installed Mathmatica 10.4, but I found out that when I use Plot3D, it gives me a mesh. In order to add color, I have to explicitly set ...
95 views

### Assigning Element Markers to 3D FEM Mesh

I have created a 3D graphic using GraphicsComplex and then use ToElementMesh to generate a 3D Mesh that I want to solve a PDE on, but I cannot figure out how to apply ElementMarkers to the Boundaries. ...
35 views

### Find best convex approximation of an “almost convex” function

I've got values of a function of two variables at integer points inside a rectangle, that is, a rectangular table $f(i,j)$, $1\leqslant i\leqslant m$, $1\leqslant j\leqslant n$. The function is very ...
133 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: ...
79 views

### Defining a MeshRegion from a list of points and Polygons with duplicate points does not work in 10.4

Bug introduced in 10.4 and persists through 10.4.1 This code produces a MeshRegion in versions 10.0 through 10.3.1, ...
158 views

### How to access FEM shape functions

A couple of days ago I asked here about surface meshes and plotting on surfaces. Now I have another question: How can I access the surface or boundary element shape functions? I would like to ...
131 views

### How to create a surface mesh embedded in 3D?

I am working on a problem where I want to optimize current densities on 2D surfaces embedded in 3D to generate magnetic fields. The current density on a surface can be written as a scalar function ...
158 views

### RegionNearest and neighborhoods

In this previous question we see that RegionNearest isn't quite as 'capable' as Nearest for some things. Similarly, I need to ...
80 views

### Plot a revolution surface, with two cross sections to show its shape

I'm having trouble plotting a revolution surface with intersections. What I have done is shown in the figure, with the help of SphericalPlot3D: . But I can't plot ...
96 views

### Making a Voronoi diagram bounded by the convex hull

Consider the following: ...
271 views

### How to mesh a region using adaptive cubic elements

Assume a list of {x,y,z} coordinates. The coordinates are arranged in a regular fashion through a fixed raster size (called ...
50 views

### Handling Self-Intersecting Regions

I am trying to test various parametric regions of a function for membership of the origin (point {0,0}). I generate the boundary by creating four parametric boundary curves, and then use RegionMember ...
57 views

### Angles inside of Voronoi mesh cells

How can I determine the angles belonging to the vertices of each interior Voronoi mesh cell? ...
138 views

### Connecting the points surrounding the adjacent polygons

I'm trying to connect the points surrounding the adjacent polygons. I know how to find the adjacent polygons on a Voronoi mesh. However, I'm unable to adjacent of the adjacent polygons. What I'm ...
138 views

### Invalid region for small angles. To Element Mesh. Finite element method

I would like to mesh the region below in order to use it for a calculation by means of NDSolve. Could anyone help me to discretize this region for NDSolve using. Thank you very much. ...
301 views

### Removing cells from Voronoi mesh if they exceed a certain area or circumference

I start with the example in Finding the perimeter, area and number of sides of a Voronoi cell with RunnyKine's answer: ...
25 views

### Discretization of a region for NDSolve using [duplicate]

I would like to mesh the region below in order to use it for a calculation by means of NDSolve. Could anyone help me to discretize this region for NDSolve using. Thank you very much. ...
130 views

### Color code Voronoi cell areas depending on number of vertices

The following question is similar to Colouring points in a Delaunay Mesh by the number of nearest neighbours ... but I do not know how adapt this answer to my problem. I have the following image: ...
297 views

### DelaunayMesh in a specified closed region - creating a concave hull from a set of points

I have a list of discrete points wich I want to use as nodes for creating a 2D mesh. I used DelaunayMesh and it works fine. The problem that I have is that some elements/polygons are outside of the ...
28 views

### Is there a extend mesh generation program link with mathematica such as openfoam native blockmesh?

I have read the relative mesh tutorial in mathematica, and found that it mainly focused on finite element method with triangle and tetrahedron, so I wonder if it is possible to link a general extend ...
112 views

### Delete/Extract some certain data from a list?

These are some polygons for Voronoi mesh. ...
483 views

### Change appearance of ConvexHullMesh

I'm struggling to understand the behaviour of ConvexHullMesh (or rather the non-behaviour). I have a polynom p ...
91 views

### ElementMesh (rendering?) issue

The appearance of the following ElementMesh is bad as you can see for example on the inside surface of the shell. The same problem happens converting to a ...
135 views

### Possible Bug with Options in DelaunayMesh

Bug introduced in 10.2 and persisting through 10.4 Update: It turns out after some testing, none of the Options work in ...
166 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, ...
131 views

### How to make the mesh to rotate with a surface in Manipulate?

Here's a Manipulate code to show a particular 3D surface, rotating uniformly in time. The point of this Manipulate box is to show that the surface do indeed rotate like a solid, so I can't "cheat" ...
35 views

### How to specify the text size of a vertex index in a 3D mesh using Labeled

My code takes a list of {x, y, z} vertices and displays a convex hull with each vertex labeled by its index in the list. Here is a minimal working example of the ...
132 views

### MeshRegion: How to take out a subregion

I have this application at hand: I need to find the Voronoi Regions of a finite set of point and then i have to find the center of mass of each of these Voronoi regions for a given mass distribution. ...
68 views

### How to draw the shape of a 2D, 2nd order, element of an ElementMesh

I just want to create a drawing of the shape of 2nd order, two dimensional, finite element like a TriangleElement. Something like ...
205 views

### Create graphic object using {x,y} points, and plot a contour over it

I am trying to create a graphics object (polygon built with {x,y} points)so I can plot a contour over it. I would like the coordinates of the contour plot and graphics object be matched (ie, {0,0} in ...
58 views

### Different Mesh lines and styles in the same plot

After searching, I learned how to make "GridLines" in DensityPlot by Mesh/MeshFunctions. Here I'd like to draw an addition Mesh line at Q=6^(0.25) via Mesh/MeshFunctions or other ways and highlight ...
198 views

### How to enforce a symmetric solution with FEM?

I'm solving the laplace equation in a domain with holes, and I need to compute the integral of the gradient on the boundary of these holes. For that I define a mesh and solve the laplace equation ...
199 views

### How to calculate a Delaunay mesh nerve?

How to calculate a Delaunay mesh nerve? A Delaunay mesh nerve is a collection of triangles that surround a single triangle called the nerve nucleus. The triangles in a Delaunay mesh nerve either have ...
123 views

### MeshRefinementFunction missing points

I'm doing some FEM on a rectangular region with a spherical cavity: ...
277 views

### How to find adjacent polygons of a specific polygon in a VoronoiMesh?

I have developed a code for VoronoiMesh. I am also able to find the polygon with highest number of adjacent polygons. How do I find the indices of the adjacent ...
78 views

### change color of the face in a 2D ConvexHullMesh [duplicate]

If I say tri = ConvexHullMesh[{{0, 1}, {1, 1}, {1, 0}}] a triangle is rendered in blue. How can I change that color? An answer to an earlier question suggested ...
235 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 ...
206 views

### Colouring points in a Delaunay Mesh by the number of nearest neighbours

I apologise if this is a repeated question, but I've searched for a while and can't find anything. I'm doing some molecular dynamics simulations using Mathematica V10, and I've placed a ...
290 views

### How to create an ElementMesh of a Sphere

I want to create an ElementMesh of a "sphere". To reduce the computational effort I want to use HexahedronElement; the ...
128 views

### how to create a FEM mesh with “RegionPlot” where the sample points are a function of the position

I need to resolve the diffusion equation in a domain with circular sources (holes). I've tried defining the whole region with holes but the result is very mesh-dependent and not symmetric, so at the ...
103 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: ...