Questions tagged [mesh]

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

66 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2k views

Using TetGen in Mathematica to get 3D Voronoi diagram

In this post, the use of TetGen for 3D Voronoi tesselation has been briefly discussed. However there is still no info about the use of TetGen to generate a 3D Voronoi diagram. The TetGen documentation ...
465 views

How to wrap a crumpled paper over a surface?

My initial question was about the making of a crumpled paper. After reading this article suggested by J.M. and little more browsing (kind of random walk you do on a Saturday) I thought about expanding ...
224 views

Possible Bug with Options in DelaunayMesh

Bug introduced in 10.2 and persisting through 11.1 Update: It turns out after some testing, none of the Options work in ...
273 views

How to label vertices on a mesh with user defined values?

I am trying to write a code to estimate geometric properties (i.e. Mean Curvature, Gaussian Curvature, Principle Curvatures) on a triangulated mesh. I would like to save the calculated data as a set ...
490 views

FEM Mesh for pipes and tubes

I work with pipe systems and would like to use finite elements within NDSolve for regions inside or exterior to a pipe. How to do I make a mesh of the region ...
387 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? ...
467 views

How to fit B-splines to unstructured grids (triangulated surfaces)?

As a continuation of trying to calculate curvature tensors on triangulated surfaces (here), I am interested in trying other methods. One approach is to use NURBS. To be more precise I would like to be ...
59 views

DelauneyMesh in 4d and higher

Is there any way to find the DelauneyMesh in 4D (or higher)? Its documentation implies that it should be possible "A Delaunay mesh consists of intervals (in 1D), ...
266 views

Volume Deformation

I want to do a volume deformation based on Bezier volumes. For example, if I have a triangle mesh, then I want to deform the mesh into a weird shape like the example image attached here. Can anyone ...
717 views

Region Intersection for MeshRegion objects embedded in 3D

How can I create a logical intersection of MeshRegion objects that are three-dimensional? The RegionIntersection function will ...
51 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 ...
100 views

NIntegrate::ncvbr: How should we interpret and handle this error not mentioned in any documentation?

I have some user-defined module describing my integrand which has to be computed numerically (it's much more complicated than this but bear with me): ...
74 views

Export ComplexPlot3D as Mesh with Material

If I generate a complexplot as follows: a1 = ComplexPlot3D[Log[z], {z, -5 - 5 I, 5 + 5 I}] I can export it to a 3D mesh (for use in external applications) with: <...
63 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 ...
70 views

Unfold/develop a RevolutionPlot3D mesh onto a 2D plane?

I'm making my own blimp out of emergency blankets (Mylar), and I want it to have a NACA0025 airfoil shape. I'm new to Mathematica, but I still managed to create the shape I wanted with ...
122 views

Finding the shortest distance of two points and an area

So I have a region defined by something like MeshRegion[{{0, 0}, {1, 1}, {2, 1/2}, {2, -1/2}}, {Line[{1, 2}], Line[{2, 3}], Line[{3, 4}], Line[{4, 1}]}], and two ...
289 views

Reducing a FEM 3D Interpolation Function to a 2D Interpolation Function

I'm trying to solve the heat equation in 3D using FEM and back out a slice in the xz plane. My problem is when I define a function that is a slice in the xz plane it uses the full 3D interpolation ...
112 views

I have a Delaunay mesh region. To start with, I give a simple example here: pts = RandomReal[{-1, 1}, {50, 2}]; R = DelaunayMesh[pts]; The next step I want to do ...
130 views

Why is MeshRegion atomic?

I wanted to make some changes inside a MeshRegion today and found that unlike Graphics objects, it can't be done directly ...
66 views

Removing polygons from exported RegionPlot

I have the following code that runs a RegionPlot ...
281 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 ...
118 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 (...
119 views

DiscretizeGraphics on a RegionDifference not returning a MeshRegion

I want to take region difference of a sub-mesh of a Delaunay Mesh and a discretized ImplicitRegion. However, Mathematica does not recognize the return as a MeshRegion. Moreover, Discretizing the ...
325 views

Calculating Gaussian Curvature for an irregular surface

Below is an irregular surface generated from large data and plotted with ListSurfacePlot3D from this data file using columns {3,4,2}. I would like to calculate the ...
567 views

Interpolation error: element mesh with insufficient quality

I'm trying to work with a numerical function as a list of elements: {{x1, y1}, f1}, {x2, y2}, f2}, ..., {xN, yN}, fN}} I've produced the list in other ...
490 views

ContourPlot has extra mesh in PDF

When I create a contour plot it looks fine. When I copy as PDF, and paste into another document (e.g. Apple Mail, Keynote, etc.) it has an extra unwanted white mesh. This occurs even when the option ...
191 views

ElementMesh (rendering?) issue

The appearance of the following ElementMesh is bad as you can see for example on the inside surface of the shell. The same problem happens converting to a ...
102 views

Export Time-dependent STL Graphics

I have recently found that Mathematica may export files (.stl) which may be used for Blender (3D pictures and animations). However, I am interested in mathematics visualization, and I suppose that ...
882 views

Doing local FFT on huge 3D vector data cell mesh and visualizing it spatially?

Simulation type: I'm running a simulation with the OOMMF micromagnetics package http://math.nist.gov/oommf/ where are magnet is represented by a mesh of 3 million cells, it gets excited by a ...
51 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 (...
62 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 ...
99 views

Why is there no heat being transfered in my program?

I have been working on this code and am new to this coding language. I have been trying to model the transfer of heat through a hot plastic being cooled in a water bath. For some reason I have not ...
54 views

obtain the analytics region from mesh or vtk file

Is it possible to obtain the region inequalities from a mesh file (vtk-file). On gmsh I build a Sphere, and with Mathematica I would like to obtain the analytics region function, that's is possible?. ...
53 views

Why does ConvexHullMesh give inconsistent output stuctures?

I know much of the stuff in ConvexHullMesh needs some TLC convexhullmesh-inconsistency But, can anyone see why this would produce inconsistent output: Case 1 (expected behavior): ...
102 views

Periodic Voronoi Mesh in a box

Is it possible to generate a periodic Voronoi Mesh inside a rectangular domain? I would also like to obtain the coordinates of each cell separately so that I can perform further operations on each ...
48 views

How to find intersection of higher dimensional convex hull?

I have often used ConvexHullMesh to obtain a convex hull for 2-d and 3-d points. But when I try to find it for 4-D points I encounter error even for simple cases. <...
30 views

NearestMeshCells in Mathematica 11.3

Is there an efficient way of writing a function equivalent to NearestMeshCells (Mathematica 12.1) in Mathematica 11.3? I'm trying to write my own code, which I can ...
59 views

How to implement meshing in DiscretePlot3D?

In this answer I show a method to use DiscretePlot3D to plot a numerical function which requires a discrete step-size to be plotted, making ...
87 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 <...
40 views

Using a mixture of QuadElement and TriangleElement in ElementMesh

TL;DR Is it possible to have a ElementMesh made of a mixture of a TriangleElements and QuadElements` Setup I've got the ...
104 views

Regions, Mesh Regions, and Graphics

This behavior seems inconsistent to me: ...
67 views

Options problem for 3D plots

If I'm not mistaken, the code below should produce two identical pictures of a torus. But it does not. The MeshStyle->Thick option seems to be ignored for the first. Obviously the second code ...
1k views

Plot3D of multiple functions

I am trying to combine 3D plots of different functions. Usually, this works: Plot3D[{f1[x,y],f2[x,y]},{x,-1,1},{y,-1,1}] However, I am encountering a weird ...
49 views

Can't find RegionIntersection of DelaunayMesh

I want to find the RegionIntersection of two DelaunayMesh (given below), but the evaluation never ends. Though when I plot them, their regions are valid and shown to intersect. Why is this? ...
142 views

Creating a 3D mesh on an Image3D Figure

I have a stack of images that I compile with the Image3D function. The resulting figure is 360x360x93 pixels and named "X". My goal is to mesh the figure. I have defined points that correspond the ...
139 views

Import[] .obj data with per-vertex colors?

There's a somewhat standard way of including per-vetex color with obj files: Geometric Vertex A vertex can be specified in a line starting with the letter "v". That is followed by (x,y,z[,w]...
101 views

Find best convex approximation of an “almost convex” function

I've got values of a function of two variables at integer points inside a rectangle, that is, a rectangular table $f(i,j)$, $1\leqslant i\leqslant m$, $1\leqslant j\leqslant n$. The function is very ...
195 views

Handling Self-Intersecting Regions

I am trying to test various parametric regions of a function for membership of the origin (point {0,0}). I generate the boundary by creating four parametric boundary curves, and then use RegionMember ...