Questions tagged [mesh]

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

37 questions
1k 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 ...
363 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 ...
194 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 ...
245 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 ...
393 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 ...
295 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? ...
203 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 ...
612 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 ...
283 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 ...
95 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): ...
85 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 ...
168 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 ...
96 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 ...
119 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 ...
83 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 ...
224 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 ...
372 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 ...
158 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 ...
98 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 ...
31 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, ...
68 views

Regions, Mesh Regions, and Graphics

This behavior seems inconsistent to me: ...
54 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 ...
490 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 ...
42 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? ...
116 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 ...
293 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 ...
92 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]...
78 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 ...
129 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 ...
836 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 ...
72 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.
31 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 andQuadElements` Setup I've got the ...
45 views

How to get a “smoother” curve for a “discrete”-type curve?

A very interesting problem from here. I got the algebra in less than a minute with all 6 solutions (integers). But was puzzled a bit that the graph only gives 4. As now I have waken up and tried it ...
62 views

Understanding BoundaryMeshRegion error

I am trying to calculate the difference between two Cuboids: ...
91 views

Broken lines in exporting pdf of 3D plot in Mathematica 10

I want a 3D-plot with mesh lines as written in the code below: ...