# Questions tagged [mesh]

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

440 questions
Filter by
Sorted by
Tagged with
202 views

### Extracting points from 3D plot that lie along an arbitrarily oriented line

Starting from i.e. the following 3d plot: d = RandomReal[1, {100, 3}]; ListPlot3D[d] Is it possible to extract points that lay along an arbitrarily oriented line,...
132 views

### Sometimes Region can't build right region

During my work with NDSolveFEM I found strange behavior of function Region. ...
165 views

### Inconsistent mesh generation from BoundaryDiscretizeRegion and ToBoundaryMesh at creases

I'm trying to use BoundaryDiscretizeRegion and/or ToBoundaryMesh to generate polygonal models for 3d printing, but I'm having ...
308 views

### Automatically generating boundary meshes for region intersections

I am trying to solve a PDE having different coefficients in different regions. I have been having trouble getting Mathematica to do it automatically, so I have gone down the route of creating my own ...
260 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. ...
139 views

### Efficient way to get adjacency information from MeshRegion

What is the most efficient way to get adjacency information from a MeshRegion, i.e. some efficient representation of which vertex is connected to which other one? ...
367 views

...
158 views

### Given a cell in a Voronoi diagram, which point did it come from? [duplicate]

Given a set of points pts = Table[{RandomReal[], RandomReal[]}, {i, 1, 10}]; and their Voronoi diagram ...
291 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: ...
95 views

### How to refine a linear FEM mesh in three regions?

I am trying to solve the one-dimensional wave equation with a frequency dependent source function over three intervals with varying velocity. I need to refine the mesh over the low velocity regions ...
319 views

### Trouble with discrete MeshRegions: Integrating over plane slices

I would like to slice a discrete 3D region with a plane, and integrate some field over the resulting 2D region (embedded in 3D). Let me be clear: I do not mean analytical regions (the kind you could ...
191 views

### ConvexHullMesh fails with small numbers

When I try to get the ConvexHullMesh of a List of points that are "small scale", I get errors: ...
194 views

### Long running ToElementMesh with very “large” domains

This is fixed in version 10.3. I'm trying to solve a system of PDE over a large domain. This doesn't means I need to have a huge amount of mesh points and mesh elements to discretize the domain. ...
80 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 ...
150 views

### Investigating mesh suitability

Trying to get a good mesh often requires significant work. For the finite element package we can have first and second order elements. Thus this suggests we need fine good quality meshes rather than ...
328 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? ...
268 views

### How to create “Volumemesh” from closed “surfacemesh”?

Given a surface region (MesgRegion netz2D), for example ...
165 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 ...
255 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 ...
152 views

### Unexpected behavior of ListPlot3D

This question surfaced when I was working on this question Given zVals = {{1, 1, 1, 1}, {1, 2, 1, 2}, {1, 1, 3, 1}, {1, 2, 1, 4}}; and ...
576 views

### How to generate certain number of random points in a convex hull mesh?

I am a newbie to Mathematica. I have some 2D point data, and I generated a ConvexHullMesh from it. Now, I want to generate a certain number of random points within ...
138 views

### Adjacent faces in a discrete mesh

I have a MeshRegion R and I want to extract all pairs of adjacent faces efficiently. The way that I've been computing this is demonstrated below: ...
189 views

### How to extract parts of this expression

If you look up ImageMesh, it shows how to extract a BoundaryMeshRegion from an image mask. http://reference.wolfram.com/language/ref/ImageMesh.html ...
143 views

### Automatic solution to label boundary elements with BoundaryMarkerFunction

Preparations Mathematica 11.3, Windows. Let us say I have a rectangular region with 10 little holes inside. Their coordinates are given by positionList. The ...
133 views

### Holes in ElementMesh with ToElementMesh of ImplicitRegion

I am trying to plot a function in a region below a level curve of the function and within a cell. I have been doing this by calculating an ElementMesh using ...
174 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 ...
71 views

### How to not show line mesh elements

Let's say I make a mesh from a collection of random points: SeedRandom[1234] points = RandomReal[1, {20, 2}]; mesh = VoronoiMesh[points] For the purposes of my ...
218 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 ...
593 views

### Simple triangular meshes of primitive shapes

I'd like to generate triangular meshes or a cylinder and sphere primitives as part of a lattice meshing program I am writing to experiment with Mathematica. Consider the following snippet: ...
357 views

### Increasing NDSolve computation range for 3D stationary PDE

I am trying to solve 3D Schrodinger equation (with mass equals to 1) and with no potential (I will add a potential later). My goal is to set boundary conditions on the outer boundary of a sphere and ...
545 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 ...
142 views

### Area of an Annulus (MeshTools<>NIntegrate)

In a very simple example I try to describe an annulus using MeshTools package mesh2D = AnnulusMesh[{0, 0}, { 1 , 2 }, {-Pi, Pi}, {36, 10}]; The area given ...
147 views

### How to find the index of a facet of a boundary mesh region closest to a given point?

Using the RegionNearest[] function, it is possible to calculate the point, $p_{mesh}$, on a mesh region that is nearest to some input point, $p_{input}$. My ...
143 views

### Union of a List of ConvexHullMesh

How can I create a Union of a List of several ConvexHullMesh? My List is of variable length and the containing BoundaryMeshRegions may overlap. I want to create ...
760 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 ...
1k 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, ...
96 views

### How to set a NeumannValue on a given ElementMarker on the boundary of a mesh?

How can one apply a NeumannValue on an ElementMarker on the boundary of an ElementMesh for a ...
143 views

### Finding a Voronoi nerve

I have a Voronoi mesh and I need to find a "nerve" which is all the polygons that have common edges with a specific single polygon (a nucleus). Which Mathematica functions can I use?
710 views

### List connectivity of points in discretized mesh

I'm trying to automate the extraction of the points and a compatible connectivity list for meshes created using the DiscretizeRegion or similar method. If I create ...
65 views

### Mesh cell count for Voronoi mesh too low

I was trying to solve this question out of interest and thought perhaps creating a Voronoi mesh, cropping it to a circle, and colouring the mesh cells might work. However, if I ask ...
76 views

### How to define element size with ToBoundaryMesh?

I am trying to make a mesh for finite element analysis with shell elements: I have to define 2D finite elements in 3D space. My code is: ...
238 views

### Simplify BoundaryMeshRegion

I have a point cloud as X,Y,Z-coordinates which form a parallelepiped (with most data points inside the solid) that is rotated in space by some unknown amount and would like to find the 8 corners of ...
301 views

### Efficient generation of a 3D mesh to solve a diffusion PDE

I'm new to FEM and trying to figure out what is the most efficient way of generating a mesh and solving an equation. As a warm-up to the particular problem I'm interested in, I want to calculate the ...
176 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 ...
49 views

### RandomPoint returns compiler errors on RegionIntersection of two Meshs?

Consider the intersection of two ConvexHullMesh's, m1 and m2. ...
139 views

### Analyzing MethodOfLines

In this example the wave equation ...
69 views

...
226 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 ...