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
9
votes
1answer
148 views

How to calculate border length between adjacent Voronoi regions?

I have a set of Voronoi cells that I partition into some defined regions. I would like to then calculate the length of the "borders" between these adjacent regions, using the edges of the underlying ...
1
vote
1answer
318 views

Retrieving boundary points of concave hull (or alpha shape) in 3D

I am trying to find the boundary points of some concave 3D region which is described by a list of points. If the region were convex I would take the convex hull and simply extract the coordinates ...
17
votes
1answer
580 views

Making a graph or network interactively over an image

Given an image, is it possible to manually draw a graph over it? For example, taking the following image: I want to manually pick the vertices and draw the edges in a "Paint-like" manner to get, for ...
6
votes
1answer
118 views

Algorithms used for DelaunayMesh

Is it possible to find what algorithms are used for Delanunay triangulations?
5
votes
2answers
129 views

VoronoiMesh as a Graph

I want to draw the following graph using VoronoiMesh. For example, since ...
6
votes
1answer
137 views

Updating a graph under ODE dynamics (vertex model)

Consider the following graph, which is obtained from a VoronoiMesh ...
2
votes
2answers
96 views

Manual ArcLength sampling on spline differs from MeshFunction sampling

Using Michael E2's answer, I performed a manual arclength parameterisation by solving the differential equation (or: finding the inverse of a function whose derivative is known). I compared the ...
3
votes
1answer
130 views

Discretizing a (kinked) line and showing how the points were determined [closed]

Suppose I have a (kinked) line, for example 2-x==y && x< 1 3-2x == y && 1.5>=x>= 1 I want to take this kinked line and represent ...
0
votes
1answer
63 views

Manipulate MeshRegion as normal Mathematica expression

A MeshRegion seems to function quite differently from any other Mathematica expression. One cannot take a Part of it. Nor can I ...
4
votes
1answer
190 views

Where to get the detailed code of MMA for grid mesh

I know DelaunayMesh can triangulate the specified area, but I can't see the code and partition idea of this built-in function. I want to know how to get the source ...
14
votes
2answers
636 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 ...
4
votes
3answers
173 views

Cell-adjacency Graph of a Square Mesh

Consider the list of points pts = {{1, 1}, {1, 2}, {2, 1}, {2, 2}} I want to use them to define a 2x2 square mesh using ...
3
votes
2answers
197 views

Selecting Edges and Corners in a Mesh

Consider the following VoronoiMesh obtained after a few iterations of Lloyd's relaxation algorithm ...
1
vote
0answers
227 views

Converting .stl files to meshes for FEA

I'm trying to conduct finite element analysis on imported .stl models from SketchUp. I can't seem to generate an ElementMesh. I think it may be something to do with intersecting boundaries, and this ...
15
votes
3answers
609 views

VoronoiMesh as a TogglerBar

Is it possible to use a VoronoiMesh to define a TogglerBar or SetterBar type ...
11
votes
3answers
864 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, ...
7
votes
1answer
101 views

Is this a bug of BoundingRegion?

...
4
votes
1answer
74 views

Keep mesh of triangulation under complex valued transformation

I try to make a quick tool for "plotting" complex valued functions. Therefore I generate a Table of complex valued points lying in the complex plane building a ...
2
votes
1answer
86 views

Colouring cells in a Voronoi mesh [closed]

Consider the following code ...
11
votes
3answers
240 views

Inaccurate result from ImplicitRegion

I'm trying to describe the intersection of two cylinders by an ImplicitRegion (in order to use it in NDSolve later). ...
8
votes
2answers
142 views

Using mesh cell highlighting to override the default rendering of a region

Bug found in V11 and fixed in V12 The default rendering of a region can be rather uninformative. Consider this simple example. ...
6
votes
1answer
198 views

Area of an Annulus (MeshTools<>NIntegrate)

Fixed in Version 12.1.1 In a very simple example I try to describe an annulus using MeshTools package ...
10
votes
2answers
352 views

Generating Mesh of Rotated Graphics

I have a simple geometry that consists of a few rotated rectangles ...
9
votes
5answers
537 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? ...
2
votes
2answers
98 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) ...
0
votes
1answer
80 views

How to auto-rotate a MeshRegion?

I have a 3D MeshRegion region1 as below: ...
8
votes
2answers
247 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, ...
4
votes
1answer
219 views

Adaptive Meshrefinement NDSolve&FiniteElements

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

Draw Lines on 3D Plot at certain coordinate

Following this example, I though it would be as easy as this: ...
0
votes
1answer
99 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 ...
6
votes
3answers
503 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 ...
16
votes
3answers
463 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[], ...
0
votes
1answer
68 views

BoundaryDiscretizeRegion Plots does not work with ParametricPlot3D

I am trying wit this data ...
3
votes
3answers
434 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 ...
3
votes
1answer
119 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: ...
1
vote
2answers
78 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?...
3
votes
2answers
205 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 ...
3
votes
1answer
203 views

Mesh a hollow cylinder

Questions seems to be simple answerde, but in Mathemtica v11.0.1 I didn't find a solution ...
4
votes
1answer
144 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 ...
3
votes
1answer
98 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 ...
2
votes
1answer
91 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: ...
1
vote
0answers
69 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 <...
8
votes
2answers
317 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 ...
1
vote
2answers
196 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 ...
2
votes
0answers
114 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 (...
2
votes
1answer
134 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 ...
7
votes
2answers
141 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 ...
5
votes
2answers
212 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 ...
1
vote
0answers
69 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 ...
3
votes
1answer
103 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 ...

1 2 3
4
5
13