# Tagged Questions

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

23 views

### Import[] .obj data with per-vertex colors?

There's a somewhat standard way of including per-vetex color with obj files: Geometric Vertex A vertex can be specified in a line starting with the letter "v". That is followed by (x,y,z[,...
354 views

### How to convert a surface into a solid

Context I am interested in converting surfaces into solids (so I can make a 3D mesh out of them using ToElementMesh) Say I have the following cool surface ...
133 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 ...
269 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 10, and I've placed a ...
93 views

### How to specify a mesh in plotting options [closed]

I have a very simple question: Imagine I have solved a PDE on a mesh and want to display the solution on the same element mesh that was passed to NDSolve. I have ...
61 views

How it is possible to extend VoronoiMesh to the whole ListPlot in the following example? ...
342 views

### Join Two Element Meshes

Let's say I have two element meshes defined as the following: ...
62 views

### Mesh definition in 3d is size dependent

Can somebody tell me if this is a bug? ...
46 views

### Why is the solution of NDSolveValue asymmetric when the regions it's solving over are symmetric?

I am creating a mesh over a 3D region and then using NDSolveValue to try and solve for a function over that mesh. The structure is fairly simple, just two polygon squares inside of a big cube. I ...
43 views

### How do I change nodal coordinates in a 2D mesh without changing anything else?

I have a 2D mesh that I generated via ToElementMesh. It discretizes a square domain with a small hole whose shape comes from a parametric B-spline. I now want to ...
48 views

### How to label vertices on a mesh with user defined values?

I am trying to write a code to estimate geometric properties (i.e. Mean Curvature, Gaussian Curvature, Principle Curvatures) on a triangulated mesh. I would like to save the calculated data as a set ...
209 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 ...
56 views

### Writing PDE boundary conditions with derivatives, More general than Neumann

I am solving 2D Laplace equations on f[x,y] with boundary conditions SomeVector[x,y].Grad[f] == 0 This is more general than Neumann. Is there a way to set such boundary conditions for a curved ...
85 views

### Why isn't ToElementMesh figuring out what my boundary is in 3D?

I am trying to change the element mesh for a FEA application I'm doing. I thought I understood it, when I did it in 2D. Here's my shape: ...
49 views

### What is the difference between getting a boundary mesh from ToBoundaryMesh vs doing it with ToElementMesh?

I am trying to figure out how to define and use meshes for FEM and NDSolve. I've figured out that if I want more resolution near my boundaries, I can use ToBoundaryMesh to first create the boundary ...
44 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 ...
252 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 ...
74 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 ...
62 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: ...
410 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: ...
111 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 ...
59 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: ...
87 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 ...
98 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. ...
36 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 ...
139 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: ...
82 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, ...
172 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 ...
164 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 ...
162 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 ...
84 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 ...
106 views

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

Consider the following: ...
277 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 ...
56 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 ...
67 views

### Angles inside of Voronoi mesh cells

How can I determine the angles belonging to the vertices of each interior Voronoi mesh cell? ...
146 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 ...
142 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. ...
310 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. Needs["NDSolve<...
144 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: ...
330 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 ...
36 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 ...
113 views

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

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

### Change appearance of ConvexHullMesh

I'm struggling to understand the behaviour of ConvexHullMesh (or rather the non-behaviour). I have a polynom p ...
94 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 ...
176 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, ...