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
2
votes
2answers
41 views

Showing coordinates of a point in a Graphics3D object with cursor scrolling over it

I would like to know how one can coax Mathematica to reveal the coordinates of a generic Graphics3D object. Consider, e.g., the unit sphere: ...
2
votes
0answers
46 views

Graph embedding constrained to a surface?

Have been contemplating it for a while, but did not dare to post as I felt like this must be a major undertaking to implement. Then saw the excellent answers to a recent question RegionPlot3D KnotData ...
1
vote
1answer
54 views

Fix (decompose) Degenerate Polygon (vertex coincides with edge)

The code Polygon[{{0,0},{3,0},{3,3},{1,3},{1,1},{2,2},{2,1},{0,1}}] produces, according to Mathematica, a disconnected polygon with 0 area. The vertex ...
9
votes
1answer
84 views

How to control floating point precision when `Export`ing to obj format?

Suppose we have a MeshRegion that we want to export to an obj file with, say double precision. Is that possible with Export? And ...
4
votes
1answer
90 views

Meshing four region from four polygon

I'm trying to generate mesh for axial symetric heat transfer model. The model contains four regions build from four different kinds of materials. Inside the steel component is empty air hole present. ...
1
vote
0answers
44 views

Using DiscretizeGraphics on a Graphics3D object that is produced by combining multiple Graphics3D objects

Consider the following two Graphics3D objects that can individually be meshed using DiscretizeGraphics. The first is a cone (...
0
votes
1answer
33 views

Unwanted scaling when overlaying GraphicsComplex graphic onto image?

I have a collection of complex hull meshes, which I would like to overlay onto an image. These complex hull meshes were obtained from the original image, and I have verified that their mesh ...
3
votes
1answer
83 views

How to create random isolated clusters periodically?

Let's assume we have a $n \times n$ grid repeated periodically, and I want to create some random isolated patches on it (and assign some value to those grid points). For a simple example consider this ...
2
votes
1answer
67 views

There are mesh grids when Export RegionPlot

When setting the Opacity option, there are mesh grids on the background of the pdf file. Opacity option should be saved because ...
7
votes
2answers
122 views

PeriodicInterpolation does not work in ElementMeshInterpolation

I want to use ElementMeshInterpolation to generate interpolation function with periodic boundary condition. I use below data as an example ...
3
votes
0answers
51 views

What is quadratic TriangleElement in ToElementMesh? [duplicate]

TriangleElement support 3 points and 6 points triangles. In the documentation of TriangleElement, it explains For quadratic ...
7
votes
1answer
98 views

problem with DelaunayMesh 3D coordinates

I found DelaunayMesh works fine for 2D. For example, ...
8
votes
2answers
187 views

How to refine a boundary mesh with MeshRefinementFunction?

MeshRefinementFunction works well to refine elements in a defined spatial domain (here x>0): ...
3
votes
3answers
106 views

How can I find polygons in convex hull?

From some geometric computations I get a lot of 3 dimensional points. From theory I know two facts: The points define a convex polyhedron, and this polyhedron has non-regular 3-, 4- and 5-gons as ...
0
votes
0answers
33 views

Constraints and Tolerance

So I'm running NMaximize for optimizing a value and for constraints, I need the parameters to belong to a discrete set of elements. Basically, the constraint looks ...
0
votes
1answer
98 views

Meaning of LineElement in Mathematica? [closed]

Line element in mathematics is generally defined as the following: $\qquad ds^2 = dx^2 + dy^2$ In Mathematica, the documentation of LineElement says: $\mathtt{...
5
votes
2answers
172 views

How to get a clean RegionDifference product

I want to get the difference between the following two regions, an annulus and a crown: Here's the code: ...
1
vote
1answer
73 views

Change mesh density of Graphics3D object made of Triangles

I am new to mesh discretisation on Mathematica. I have a Graphics3D object made up of Triangles, that I would like to convert ...
7
votes
1answer
144 views

MeshRefinementFunction on 2D surfaces embedded in 3D

DiscretizeRegion doesn't seem to run the supplied MeshRefinementFunction when meshing a 2D surface in 3D. For example: ...
0
votes
0answers
158 views

colouring Voronoi cells by their properties

I put a couple of previous posts together How can find the 2D Voronoi cell area distribution? Color code Voronoi cell areas depending on number of vertices color voronoi cell based on area to make the ...
1
vote
1answer
60 views

Cartesian grid across 3D plot

I have a plot of a tennis racket hitting a tennis ball ...
2
votes
1answer
107 views

Neumann boundary condition ignored

Im trying to solve a system of two PDE (im[t,x] and ia[t,x]) that are dependent on time and distance. I’m using my own anisotropic mesh (thanks to @TimLaska) that is aimed to represent an interface ...
2
votes
0answers
62 views

How to reduce the number of triangles in a mesh? [duplicate]

I am trying to turn a Graphics3D object (the Stanford Bunny) into a mesh. The result from using DiscretizeGraphics has too many ...
6
votes
1answer
199 views

Create a voxelized mesh from an STL mesh file

I would like to create a cubic or 3d grid mesh with a constant size for a surface mesh that represents a hollow torus saved in an STL file. mesh I am import the vertex using: ...
2
votes
1answer
121 views

Using ParametricNDSolveValue with parameter-dependent region to solve for a flow field around an airfoil via FEM

I am looking for a way to have a parametric solution to a potential flow problem using FEM around an airfoil (as an initial bc for the inviscid bc problem), where the parameter to be varied has direct ...
4
votes
3answers
273 views

How to make a high resolution mesh from RegionIntersection in 3D

I want to make a high-resolution 3d model of the Reuleaux tetrahedron by using Mathematica The Reuleaux tetrahedron is the intersection of four balls of radius s centered at the vertices of a ...
3
votes
2answers
71 views

How to change the ● to ◆ in the given code by using MeshStyle?

I use this code ...
5
votes
3answers
135 views

How to convert cuboid to mesh efficiently

cuboids = Table[Cuboid @@ (pts = RandomReal[100, {2, 3}]), {i, 10000}]; Method1: ...
5
votes
4answers
179 views

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-...
4
votes
3answers
243 views

How can I add a few specific mesh (altitude-like level) curves to a plot?

I'm plotting the numerical solution of a differential equations, using the altitude-like level curves as a mesh. It's fine, but I would like to add three specific altitude levels as thick red, green ...
3
votes
2answers
86 views

How to change color of the points and remove the joined line in the given code?

I use this code ...
4
votes
3answers
177 views

How to draw borders around tiles of the same color?

I'm having difficulties with a project to show random tiles with a few random colors. Here's the code that I need to modify: ...
4
votes
1answer
99 views

ElementMeshInterpolation on a BoundaryMesh

It appears as though ElementMeshInterpolation does not play nice with the element meshes produced by BoundaryMesh ...
4
votes
2answers
208 views

1D mesh generation for PDE solution

I'm trying to solve a system of two PDE that are dependent on time and distance (H[x,t] and P[x,t]). I'm solving the problem using the method of lines but I want to generate myself the mesh and ...
0
votes
0answers
34 views

Define BoundaryMeshRegion from matrix of data

Say I have a matrix 'm' with 2 columns and 'r' rows. I want to define a mesh region using each row in the matrix as a point coordinate. Something like the R=BoundaryMeshRegion[{m},Line[1,2,3....,r]] . ...
6
votes
3answers
220 views

Regions for numerically defined Toroidal surfaces

I have data like this: DataVisualizationPlot = ListPointPlot3D[data] And would like to obtain the representing surface like this: ...
4
votes
1answer
67 views

How to obtain a Region from a numerical (!) function

I'd like to achieve a Region from a purely numerically defined function. Like this one: ...
16
votes
2answers
423 views

3D Inclusion with structured mesh and coarse and arbitrary matrix

I am wondering if there is a simple way to define a structured 3D mesh (inclusion) like e.g. that and surround it with a corse and unstructured Matrix. It should be possible to refine both more or ...
17
votes
2answers
1k views

Smoother jelly / water effect on an image

I'm trying to achieve a jelly / water surface effect. I'd like it to be a bit smoother. Here I am taking a triangulated rectangle and perturbing all points by a little random noise for each frame. ...
3
votes
1answer
55 views

How do I create an STL file from nearest neighbour graph edges?

I'm trying to figure out to deal with (and design) .stl files within Mathematica. As an example, I would like to generate a FCC lattice without the atoms (but connecting all nearest neighbours), and ...
2
votes
1answer
114 views

Exporting several Pyramid to a stl file

I made some 3D structure including several Pyramid and tried to export it to stl file. (I have referenced this link : Exporting several prisms (or Polyhedrons) to stl (with filled inner space)) It ...
2
votes
1answer
39 views

CountourPlot3D problem when intersecting semiplanes

I have the following code: ...
5
votes
2answers
300 views

Using fewer mesh lines, 3D graphics

I want to make the Final use fewer mesh lines, the ideal version will look like the second image. Where the triangle shape is more clear and clean. Can anyone give me some advice on how to fix my code?...
1
vote
0answers
58 views

MeshRegion automatically merges vertices that have the same position in space

I sometimes work with surface meshes that have self-intersections (immersions rather than embeddings). MeshRegion usually doesn't have any problems dealing with ...
0
votes
0answers
53 views

Intersection Region of two Conic Hull

I have the following semi-infinite conic hull, r1=ConicHullRegion[{{0,0,0}},{{-1,0,0},{0,-1,0},{1,0,1}}]; r2=ConicHullRegion[{{0,0,0}},{{-1,0,0},{0,-1,0},{0,1,1}}]; ...
4
votes
0answers
47 views

Drawing tools eyedropper crashes Mathematica 12.1 with MengerMesh

Mathematica 12.1.1 under macOS Catalina 10.15.7. In a new notebook, evaluate: MengerMesh[0, 3] Click once on the output's graphic image, which causes the bounding ...
3
votes
3answers
128 views

Equipotential surfaces using ParametricPlot

So I'm trying to plot lines on which the following function is a constant $$ \frac{\left(-\Sigma (r,0.99,\theta )+2 r^2-0.99^2 r \sin ^2(\theta )\right)^2}{\Delta (r,1,0.99) \Sigma (r,0.99,\theta )^3}+...
7
votes
3answers
297 views

Identify the Vertices and Lines around the edges of a free surface - Mesh/DiscreteGraphics

To write a mesher that closes a mesh surface using an implied surface from a boundary spline curve and mesh generated using DiscreteGraphics, I need to identify the Vertices and Lines around the edges ...
0
votes
0answers
72 views

Closing Boundary Mesh with closed 3D Spline Curve

I am trying to make a 3D solid (with BoundaryMeshRegion) from surfaces created by spline curves. In the follow simple example, I need to close the ends of this irregular tubular shape using boundaries ...
2
votes
1answer
70 views

How to remove the parallelepiped that encloses the writing or make it invisible?

I have this code that I found somewhere and I love what it does, I've been checking the "line" command to remove the line or make it invisible but I can't get it, and the other part of the ...

1
2 3 4 5
13