# Questions tagged [mesh]

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

130 questions
Filter by
Sorted by
Tagged with
2k 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 ...
3k views

### Removing unwanted appearance of underlying mesh

Let us first define two positive definite matrices: M1 = {{2, -6}, {4, 8}}; M2 = {{2, 3}, {4, 8}}; then set two points ...
1k views

### How to obtain the cell-adjacency graph of a mesh?

In addition to the accepted answer, see also the answer by Chip Hurst. This functionality is built in, but not documented. Given an arbitrary mesh region, how can I efficiently obtain the graph ...
740 views

### Smoothing 3D contours as post processing

Context Following this question (and great answer!), It would be nice to have a function which also smooths 3D contours plots once they have been done. There are various solutions which involve ...
3k views

### Finding a Concave Hull

I have 3D clustered data: Is there any other way to get the concave hull of 3D data points?
919 views

### How to perform Loop subdivision on a triangle mesh with Mathematica?

(Cross posted on Wolfram Community) Every now and then, the question pops up how a given geometric mesh (e.g. a MeshRegion) can be refined to produce a (i) finer ...
6k views

### Creating a 2D meshing algorithm in Mathematica

As what is proving to be a difficult, but entertaining task, I am attempting to adapt a 2D meshing algorithm created for MATLAB and port it to Mathematica. I understand meshing functions already exist ...
2k views

### A geometric multigrid solver for Mathematica?

Cross posted to community.wolfram.com Mathematica ships a variety of linear solvers through the interface LinearSolve[A, b, Method -> method] the most ...
3k views

### How to generate a mesh with quadrilateral elements?

I have the following code that generates a finite element mesh: ...
1k 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 ...
597 views

### Is it possible to re-mesh, downsample & upsample a DiscretizeRegion object?

In my project, I am importing a complex geometry from an STL file into Mathematica as a MeshRegion. I would like to edit this mesh significantly: For instance, drastically reduce or increase the ...
971 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 ...
1k views

### Hexagonal Mesh on a 3D surface

I am new to Mathematica, and I am trying to create a 3D hexagonal mesh on a 3D surface. It is very similar to what was done in this post Create a torus with a hexagonal mesh for 3D-printing, but now ...
2k views

### Dashed mesh behind 3D object

I am trying to create a simple, almost transparent 3D sphere with a mesh that is made of solid lines if they are on the front surface (i.e. if they are directly visible) and of dashed lines if those ...
1k 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 ...
745 views

### Polygon mesh: Compute vertex normals for smooth shading

MeshRegion has a "SmoothShading" PlotTheme which automatically computes the ...
453 views

### Boundary cells of a mesh?

This is an offspring of answering another question. Consider ...
937 views

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

I have developed some code for VoronoiMesh objects, and I am able to find the polygon with the highest number of adjacent polygons. How do I then find the indices ...
2k views

### Build a refined grid based on intersecting line

I honestly have no idea where to begin with this problem. In summary, I have a 2D coarse grid with an intersecting line. For an easy example, let's assume it's a 4x4 grid. I wish to pass through each ...
7k views

### Create triangular mesh from random list of points

I have a list of points. I would like to take these points and create a mesh of triangles from them, making sure triangles don't overlap. So here's a list of points: ...
538 views

### Voronoi tessellations on meshed surfaces

Given a meshed surface, on which we can calculate geodesic distances between vertices, how can one calculate the Voronoi tessellation of a set of points located on this surface? This is somewhat ...
643 views

### Finite element mesh not resolving features

I am trying to make a finite element mesh in 2D. The features are not found by ToElementMesh. This is a shelf bracket with nails. I build the region using ...
394 views

### Mesh at Ticks positions

In a ListPlot3D[ ] I want to have the Mesh at the same positions as the ticks. For some reason this isn't default if both are ...
685 views

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

Consider the following: ...
368 views

### How does one get Mesh lines at 0 in ParametricPlot3D?

The following is in the documentation (MMA 10) under ParametricPlot3D -> Options -> Mesh : ...
480 views

...
2k views

### Estimating Principal Curvature Directions on Discrete Surfaces

I am continuing with working on implementing curvature estimations on triangulated surfaces (See: here), using the algorithm of : Meyer, M., Desbrun, M., Schröder, P., & Barr, A. H. (2003). ...
621 views

### Improve the mesh smoothing procedure

My question is inspired by this answer about meshing with quadrilateral elements. The following functions are my (naive) try of implementing the Laplacian smoothing. I find interior nodes in the mesh ...
3k views

### How to get actual triangles from DelaunayTriangulation[]?

The ComputationalGeometry package has a DelaunayTriangulation[] function. It returns a list of points connected to each point, ...
218 views

### FEM-ception: Using output of NDSolve FEM as input in another FEM problem

After having solved a Stokes flow problem in Mathematica on a subdomain RegionCapillary, I would like to solve an advection-diffusion problem on a larger domain <...
2k views

### Construct a simple mesh or tetrahedral mesh from 3D image surface

I have a 3D Y-Shape hollow tube, not so good surface. Import["http://dl.dropbox.com/u/68983831/tube02.vtk", "Graphics3D"] I tried to use following vertex data ...
924 views

### Meshing the surface of a non-convex object

I would like to mesh the surface of a cloud of points that may not be completely convex, for example the points in this question. Mathematica does not provide triangulation of 3D points, but there is ...
618 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 ...
357 views

### Possible bug in RegionUnion or related functions?

Bug introduced in 11.2.0 Functions for derived geometric regions (RegionUnion and related) have been significantly updated in MMA 11.2 and now this simple example ...
902 views

### create an (almost) hexagonal mesh on an ellipsoid

EDIT I edited the question in order to take into @Kuba's comment. I want to create this figure with Mathematica (in particular an almost hexagonal mesh on an ellipsoid; thanks to @Kuba I know this ...
436 views

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

Bug introduced in 10.2 or earlier, and fixed in 11.0.0 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: ...
699 views

### Creating a Hexagonal Lattice with VoronoiMesh

I want to create a hexagonal lattice using VoronoiMesh. One can achieve that with the following code, where L=5, ...
210 views

### Use a symmetric mesh in ListDensityPlot

I am trying to produce a ListDensityPlot but I am having issues with aliasing. The problem arises from the way that Mathematica is breaking up the mesh into ...
621 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 ...
383 views

### MeshRefinementFunction missing points

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

### Different MeshStyle for different functions

By using Plot command I want to get one curve in form of circles and other like a solid line. ...
272 views

### Inaccurate (non-smooth) boundary of the mesh generated by ToElementMesh

I try to generate a mesh over a region, which has a wavy boundary at its bottom and needs very fine mesh around the bottom. However, the generated mesh boundary is not as smooth as the specified one. ...
550 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, ...
244 views

### How to create a neighboring list for a given triangulation and find the triangle and construct the tile?

I am new to Mathematica and I am currently in need of some help with creating a neighboring list of triangles for a given triangulation and finding the path to the triangle containing the random point ...
70 views

### Make MeshRegion/BoundaryMeshRegion work as a graphics primitive in M11

Mathematica 12 has the nice feature that MeshRegion and BoundaryMeshRegion objects render nicely when included as a primitive in ...
289 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. ...
427 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 ...
139 views

### How to extrude a planar mesh to a volume slice?

Is there an easy way to extrude a planar 2D-mesh to a volume slice? ring = RegionDifference[Disk[{0, 0}, 1], Disk[{0, 0}, 1/2]]; DiscretizeRegion[ring] The ...