# Questions tagged [mesh]

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

428 questions
Filter by
Sorted by
Tagged with
129 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 ...
306 views

### Generating Mesh of Rotated Graphics

I have a simple geometry that consists of a few rotated rectangles ...
518 views

### Grainy 2D RegionIntersection Plot: How can I make it smoother?

I have the following code to display three coloured disks and their coloured intersections. However, the result does not appear to have been anti-aliased enough. How can I make it smoother? ...
57 views

### Select Part of a boundary mesh

I would like to pick a part of a boundary mesh, for example bm=BoundaryMesh[Cuboid[]] Is it possible to select the part(side) ...
63 views

### How to auto-rotate a MeshRegion?

I have a 3D MeshRegion region1 as below: ...
134 views

### How to mesh a region with inclusions touching the boundary

Suppose you have a region composed of two materials. You define the inclusions of material 1 through, e.g., disks, ellipsoids, ...
100 views

In a simple example I try to solve the heat equation using NDSolve and Method->"FiniteElement". I know that NDSolve gives ...
30 views

### Draw Lines on 3D Plot at certain coordinate

Following this example, I though it would be as easy as this: ...
74 views

### Nonatomic expression expected at position 1 in First[None]

This is a follow-up question to an earlier question:Solving a system of PDEs on a piecewise polynomial domain. I tried to solve the system of equations from one of my previous post with the different ...
457 views

### Compare FEM mesh with the mesh created within Mathematica

This is a follow-up question to an earlier question: Make uniform mesh with quad elements Question: How to solve system of equations with NDsolve on the mesh created in Ansys in order to compare it ...
275 views

### Computing the surface area and volume of molecules

Here is a somewhat difficult problem I've had for a long while. Space-filling models of molecules can be easily generated by ChemicalData[], ...
63 views

### BoundaryDiscretizeRegion Plots does not work with ParametricPlot3D

I am trying wit this data ...
368 views

### Nearly equally spaced 3D-mesh

How to mesh a volume (3D region) with nearly equaly spaced vertices? Example: Disk with radius 50 and height 15 ...
82 views

### Unable to use ElementMarker in DirichletCondition with structured quad mesh

I would like to use ElementMarker in a DirichletCondition on a structured quad mesh, but I am receiving the error: ...
56 views

### Blunt edges of an octahedron by Region

Why does the octahedron constructed by the following code have blunt edges ? Region[ImplicitRegion[Abs[x] + Abs[y] + Abs[z] <= 1, {x, y, z}]] How to improve it?...
133 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 ...
88 views

### Mesh a hollow cylinder

Questions seems to be simple answerde, but in Mathemtica v11.0.1 I didn't find a solution ...
90 views

### control FEM grid size for 1D regions

I need to manage the mesh size for finite element method solution to a differential equation, where properties change over two regions. This is for one dimension. I created a boundary mesh of three ...
79 views

### RegionUnion works but RegionIntersection does not

I am trying to create an Alberti's window figure as described in this question, in which a (three-dimensional) polyhedron (e.g., dodecahedron) is projected onto a (two-dimensional) plane. I realized ...
63 views

### Unwanted mesh line in spherical plot

I am trying to create a spherical colour plot on which the mesh will rotate with manipulating the \phi1 variable. I read this solution and gave it a try with the following code: ...
42 views

### Combining MeshRegions of generated 3D shapes and RandomPolygons

I am interested in generating 3D a joint BoundaryMeshRegion or a MeshRegion from different shapes and polygons. This works for <...
223 views

### Make uniform mesh with quad elements

I have the following code that generates a finite element mesh with triangular elements which by using command ToQuadMesh I convert to the quadrilateral elements, but I am not able to make the uniform ...
91 views

### How to sample numerically a function using a mesh-grid function in 3D?

I am working on a problem where I want to sample a scalar function f[x,y,z]. The problem is how to obtain a mesh-grid in 3D (A grid of points in x,y, and z). In order to study this function. Of ...
102 views

### Calculate the intersection points of a line and a parametrically defined 3D surface

Thanks to Henrik Schumacher for advice to simplify the sample code: I would be grateful for any pointers on the following issue. A line from an external point intersects the surface at 2 points (...
108 views

### How to solve wave equation with finite elements when material properties vary continuously over a region

I am solving the one-dimensional wave equation over regions where the bulk modulus (and thus the wave speed) vary continuously over a region. The current version seems to assume that the material ...
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 ...
129 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 ...
46 views

### Non-convex hull mesh from 3d points [duplicate]

I am trying to create a 3d mesh object from list of points, but the only options I see in Mathematica are ConvexHullMesh and ...
68 views

### Signed cell adjacency matrices (boundary operators)

In How to obtain the cell-adjacency graph of a mesh? there are some great answers that show how to obtain the cell adjacency matrix of a mesh. How would one generalize these to incorporate the ...
135 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: ...
117 views

### RegionMember does not work with RandomPolyhedron or Polyhedron object

According to the documentation RegionMember should work with regions that are true for ConstantRegionQ. However, the function ...
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,...
78 views

### Set maximum space between elements in 3D mesh

A region in 3D space has been discretized to obtain a list of points. The resulting ListPointPlot3D plot is: I will like to obtain a mesh from these points, but ...
43 views

### Extra Lines in 3D ConvexHullMesh

I would like to make a picture of a truncated octahedron using ConvexHullMesh as follows: ...
156 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 ...
70 views

### Mesh quality error with interpolation of table

I am trying to interpolate a table of the following form. {{x1,y1,z1},{x2,y2,z2}...} Where z depends on x and y, and x ranges from 0.01 to 1 in steps of 0.01, ...
76 views

### Find surrounding vertices (simplexes) of a given point for DelaunayMesh

Generating a Delaunay triangulation of some random points: pts = RandomReal[{-1, 1}, {50, 2}]; dm = DelaunayMesh[pts]; HighlightMesh[dm, Style[0, Black]] gives [...
82 views

### Create a tube from a section of a sphere using mesh

How does one make a meshed tube starting from a section of a sphere and later edit the tube's section parametrically.
72 views

### Difficulty in specifying mesh refinement

I am trying to give a region within a 3D volume a finer mesh than the rest of the volume. My problem is more complicated but here is a minimum working example. I define a 3D cuboid and try and have a ...
64 views

### Mesh mixes up markers in multiple curves

Following is my code: ...
68 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 ...
48 views

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

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

### How to draw individual mesh lines in ArrayPlot

Consider the following ArrayPlot. ...
77 views

### Creating a mesh from a very thin layer

I have the following code which works just fine: ...
129 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 ...
398 views

### Catmull-Clark and Doo-Sabin Subdivision Implementations

I want to work on subdivision surfaces. Unfortunately, I don’t have any source code to start with. I need some Mathematica codes for applying Catmull-Clark and Doo-Sabin methods. I would like to ...
104 views

### Meshing control of NDEigensystem

I have to solve an Eigenvalue problem originating from the Electrodynamics. It is a 2-D problem with a rectangular region. More specifically, there is a hole on a rectangle made by magnetic material. ...
44 views

### Is there a way to automatically use triangular elements in ToElementMesh [closed]

I have some simple code to generate a mesh over a rectangle. ...