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
19
votes
2answers
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 ...
22
votes
3answers
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 ...
28
votes
2answers
1k 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 ...
22
votes
3answers
4k views

Finding a Concave Hull

I have 3D clustered data: Is there any other way to get the concave hull of 3D data points?
22
votes
6answers
2k 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 ...
34
votes
1answer
1k 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 ...
13
votes
3answers
1k 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 ...
41
votes
4answers
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 ...
16
votes
1answer
825 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 ...
8
votes
3answers
958 views

Polygon mesh: Compute vertex normals for smooth shading

MeshRegion has a "SmoothShading" PlotTheme which automatically computes the ...
11
votes
3answers
853 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, ...
52
votes
2answers
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 ...
32
votes
7answers
4k views

How to generate a mesh with quadrilateral elements?

I have the following code that generates a finite element mesh: ...
16
votes
3answers
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 ...
14
votes
1answer
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 ...
13
votes
4answers
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 ...
13
votes
1answer
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 ...
3
votes
4answers
1k 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 ...
12
votes
1answer
503 views

Boundary cells of a mesh?

This is an offspring of answering another question. Consider ...
21
votes
3answers
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 ...
16
votes
3answers
8k 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: ...
18
votes
2answers
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). ...
15
votes
2answers
622 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 ...
12
votes
2answers
712 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 ...
7
votes
2answers
410 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 ...
10
votes
1answer
802 views

Making a Voronoi diagram bounded by the convex hull

Consider the following: ...
2
votes
1answer
411 views

How does one get Mesh lines at 0 in ParametricPlot3D?

The following is in the documentation (MMA 10) under ParametricPlot3D -> Options -> Mesh : ...
23
votes
4answers
626 views

Making holes from maze generated Graphics3D

...
13
votes
3answers
709 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 ...
17
votes
4answers
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, ...
12
votes
4answers
726 views

Converting Mesh in DensityPlot to a Graph

Consider the following line of code: ...
8
votes
1answer
264 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 <...
14
votes
1answer
1k views

FEM: how to choose FEM element type

I am asking myself if there is any simple option for choosing the element type for the mesh generation WITHOUT explicitly creating coordinates and then the mesh. Minimal example: here I would like ...
13
votes
2answers
617 views

A Smooth and Round Voronoi Mesh

I want the edges of a VoronoiMesh to be smooth and round. I have found the following code from this answer ...
8
votes
5answers
711 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 ...
16
votes
1answer
321 views

Possible Bug in ArrayMesh

Bug introduced in V10.4 and fixed in 10.4.1 Suppose we have the following array from which we intend to create an ArrayMesh: ...
10
votes
3answers
432 views

3D internal subregion

I'm trying to follow the documentation for Element Mesh Generation, but somehow I cannot understand it correctly. Here is a simplified version of my real problem. I'm trying to simulate the ...
9
votes
1answer
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 ...
7
votes
1answer
1k 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 ...
16
votes
1answer
385 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 ...
14
votes
2answers
992 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 ...
12
votes
1answer
478 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: ...
6
votes
1answer
191 views

Improving mesh and NDSolve solution convergence

I have developed the code below to solve two PDEs; first mu[x,y] is solved for, then the results of mu are used to solve for phi[x,y]. The code works and converges on a solution as is, however, I ...
9
votes
1answer
292 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 ...
7
votes
1answer
191 views

Generating a Periodic Voronoi Mesh

Consider the following hexagonal mesh, created from VoronoiMesh ...
7
votes
1answer
702 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 ...
6
votes
2answers
431 views

MeshRefinementFunction missing points

I'm doing some FEM on a rectangular region with a spherical cavity: ...
6
votes
1answer
222 views

DensityPlot with equal mesh and a certain boundary

I would like to have a plot like the following: However, with my code: ...
5
votes
1answer
110 views

ConvexHullMesh inconsistency

I am seeing an inconsistency in ConvexHullMesh that I don't understand. Here is Rhull = ConvexHullMesh[pts8] where the $8$ ...
4
votes
3answers
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. ...