Questions tagged [mesh]

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

Questions on the use of mesh functionality including MeshRegion, ElementMesh, and TetGenLink.

Useful links

Example questions

821 questions
10
votes
1 answer

How to mesh a French biscuit (modulated ellipsoid)

I would like to create a boundary mesh of the following ellipsoid, whose thickness is modulated along its long axis: The surface parametrization I used for it is: {a, b, c} = {2, 5, 10}; s[\[Theta]_, \[Phi]_] := {a (1.2 - Sin[\[Theta]]), b (1.2 -…
Oscillon
  • 1,231
  • 10
  • 21
9
votes
1 answer

How to mesh part of sphere

A quite arbitrarily closed curve k[φ](on the sphere) defines two parts of a sphere. How can I mesh for example the smaller surface part? I intend to use the mesh topology for further calculation (area or something like this) For example k[φ_] :=…
Ulrich Neumann
  • 53,729
  • 2
  • 23
  • 55
7
votes
1 answer

MeshTools' CylinderMesh fails in MMA version 12.3.1

I cannot run the CylinderMesh function of MeshTools in Mathematica version 12.3.1. $Version (*Install MeshTools*) ResourceFunction["GitHubInstall"]["c3m-labs", "MeshTools"]; (*Load MeshTools package*) Needs["MeshTools`"] mesh = CylinderMesh[{6,…
Tim Laska
  • 16,346
  • 1
  • 34
  • 58
5
votes
2 answers

Writing loops for triangle elements

I'm kind of new to using Mathematica, so any help is great. I'm trying to write a program that will create a list or matrix that will give each small triangle's point numbers. For example if given an isosceles right triangle, the example below…
user13511
  • 53
  • 3
5
votes
1 answer

How can I transform a 2D mesh to 3D?

I know practically nothing about meshes, so I was wondering whether it's possible in Mathematica to convert a 2D mesh, embedded in 3 dimensions, to a 3D mesh? The 2D mesh was generated by a CAD program in STL format.
Cassini
  • 5,556
  • 5
  • 28
  • 38
5
votes
1 answer

How to detect neighbours of a MeshRegion?

For a given triangle meshRegion(examplary) \[CapitalDelta]reg \[CapitalDelta]reg =DiscretizeRegion[Triangle [], MaxCellMeasure -> 1/10] I need to know/detect the indexes of neighbouring elements and their common side. I know the command…
Ulrich Neumann
  • 53,729
  • 2
  • 23
  • 55
5
votes
4 answers

CantorMesh for a fat cantor set

CantorMesh[n] gives the $n$-th level approximation to the standard no-middle-(1/3)-Cantor set. Is there a quick way to obtain a similar mesh region for the no-middle-(1/4)-Cantor set?
Cantor
  • 315
  • 1
  • 7
5
votes
1 answer

Extra Lines in 3D ConvexHullMesh

I would like to make a picture of a truncated octahedron using ConvexHullMesh as follows: ConvexHullMesh[{{3, 1, 1}, {1, 3, 1}, {1, 1, 3}, {-3, -1, 1}, {-1,-3, 1}, {-1, -1, 3}, {-3, 1, -1}, {-1, 3, -1}, {-1, 1, -3}, {3, -1,-1}, {1, -3, -1}, {1, -1,…
Madeline Brandt
  • 735
  • 3
  • 11
4
votes
2 answers

Save data from TriangulateMesh

Is it possible to extract the coordinates from each triangle after using TriangulateMesh? It sounds very weird but i really need it for one of my projects. I have to save each triangle separately in a txt file. pts = {{-5, 29.6537}, {-4, 16.3031},…
NeAr
  • 285
  • 1
  • 9
4
votes
1 answer

Capturing mesh information

Mesh information Using the helpful tips from Triangular mesh of random points on a sphere, it's easy to generate solids: reg = DiscretizeGraphics[Sphere[{0, 0, 0}, 5], MaxCellMeasure -> {"Length" -> 15}] MeshCellCount[reg] The interrogation tab…
dantopa
  • 1,060
  • 5
  • 10
4
votes
1 answer

Why are those two mesh regions not the same?

In Mathematica, one can triangulate a mesh starting from a boundary mesh region. For example: r = BoundaryMeshRegion[{{0, 0}, {2, 0}, {2, 1}, {1, 1}, {1, 2}, {0, 2}}, Line[{1, 2, 3, 4, 5, 6, 1}]] m = TriangulateMesh[r, MaxCellMeasure -> 0.1] gives…
Tofi
  • 291
  • 1
  • 11
4
votes
1 answer

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 [ For a point e.g. {0.3, 0.24} How do I get the element this falls in, i.e. the…
smörkex
  • 625
  • 4
  • 10
3
votes
1 answer

Mesh for points in 3D

I've got a set of Eisenstein integers (triangle lattice points in the complex plane), and I've selected them to be above a line, so that they form a triangle: I then took these 2D points and embedded them in 3D space, with the z-axis chosen…
tlehman
  • 2,144
  • 1
  • 21
  • 27
3
votes
1 answer

How to control the order of meshing?

I want the first pic,but i got the second. What can I do? Below if the code to produce the second pic: data = {{14.808253637272422`, 5.992415735398138`, -10}, {14.937895181494618`, 5.835230243884557`, -10}, {15.104476099263962`, …
mugua
  • 31
  • 2
3
votes
1 answer

Z-map of a MeshRegion

TL;DR How can I efficiently compute a matrix representing a z-map of a non-convex MeshRegion? Longer explanation I'm developing a collision detection algorithm for a 3-axis NC machine. My idea is to exploit the fact that we have 3 axis, to turn the…
Marco
  • 307
  • 1
  • 2
  • 7
1
2