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

MeshRefinementFunction missing points

I'm doing some FEM on a rectangular region with a spherical cavity: ...
5
votes
1answer
116 views

ConvexHullMesh inconsistency

I am seeing an inconsistency in ConvexHullMesh that I don't understand. Here is Rhull = ConvexHullMesh[pts8] where the $8$ ...
5
votes
1answer
198 views

Mass Transport FEM Using Quad Mesh

This question is a follow-up to my previous question and an attempt to implement @Tim Laska's excellent approach of setting up an anisotropic quad mesh. I'm solving a similar problem to @Tim Laska's ...
4
votes
3answers
1k views

Different MeshStyle for different functions

By using Plot command I want to get one curve in form of circles and other like a solid line. ...
4
votes
1answer
594 views

Projecting 3D Mesh Region onto 2D Plane

For vizualization purposes in a beamer presentation I would like to project a 3D MeshRegion like ConvexHullMesh[RandomReal[{-1, 1}, {50, 3}]] onto a 2D plane. How ...
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 ...
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 ...
1
vote
1answer
2k views

BoundaryMesh: correctly pair boundary points with normals

I have a slight problem with pairing up boundary points of BoundaryMesh with appropriate BoundaryNormals. Let's work with a simple domain for now: ...
10
votes
1answer
307 views

Inaccurate (non-smooth) boundary of the mesh generated by ToElementMesh

I try to generate a mesh over a region, which has a wavy boundary at its bottom and needs very fine mesh around the bottom. However, the generated mesh boundary is not as smooth as the specified one. ...
7
votes
1answer
696 views

Making a 2D hexagonal mesh

There are a lot of answers for how to make a hexagonal mesh on a 3D surface but nothing on how to make a hexagonal mesh on a 2D surface. Can any provide code on how to do so? I am new to mathematica, ...
4
votes
1answer
373 views

How to create a neighboring list for a given triangulation and find the triangle and construct the tile?

I am new to Mathematica and I am currently in need of some help with creating a neighboring list of triangles for a given triangulation and finding the path to the triangle containing the random point ...
4
votes
1answer
108 views

Make MeshRegion/BoundaryMeshRegion work as a graphics primitive in M11

Mathematica 12 has the nice feature that MeshRegion and BoundaryMeshRegion objects render nicely when included as a primitive in ...
3
votes
1answer
465 views

How to calculate a Delaunay mesh nerve?

How to calculate a Delaunay mesh nerve? A Delaunay mesh nerve is a collection of triangles that surround a single triangle called the nerve nucleus. The triangles in a Delaunay mesh nerve either have ...
3
votes
4answers
316 views

Invalid region for small angles. To Element Mesh. Finite element method

I would like to mesh the region below in order to use it for a calculation by means of NDSolve. Could anyone help me to discretize this region for NDSolve using. Thank you very much. ...
3
votes
2answers
211 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
2answers
320 views

How to make the mesh to rotate with a surface in Manipulate?

Here's a Manipulate code to show a particular 3D surface, rotating uniformly in time. The point of this Manipulate box is to show that the surface do indeed rotate like a solid, so I can't "cheat" ...
2
votes
1answer
176 views

Defined Mesh Coordinates are Outside of Data Range for Interpolation Function

This relates to a previous question I had about formulating an interpolation over an unstructured grid. A new issue I am running into (in this test example) is that some of the coordinates that are ...
2
votes
1answer
124 views

Create graded mesh

I want to create graded mesh inside a cube, with finer mesh in the left half and a coarser mesh in the right half. My plan was to partition the cube with a 2D plane and then generate boundary mesh ...
2
votes
0answers
457 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 ...
1
vote
1answer
825 views

Create hexagonal mesh on 3D Parametric Plot and 3D spheres?

I am looking to put a cool geometric mesh on this object. I came across this question that explained how to put a hexagonal mesh on a parametric equation but I have a series of geometric objects of ...
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 ...
21
votes
1answer
952 views

Eigenfunctions of the Laplacian on an arbitrary mesh

So, I've constructed a mesh over which I'd like to find eigenfunctions of Laplace's equation with a free boundary (a zero Neumann boundary condition along the edge). Mostly because I figured an ...
25
votes
3answers
2k views

Convert binary voxel image to geometric region

I have a binary voxel image which described a contiguous region in space. Example: ...
18
votes
3answers
800 views

Crop a Voronoi diagram and get a proper MeshRegion

How can I crop a VoronoiMesh (or any similar MeshRegion) to a non-rectangular region and receive the output as a ...
13
votes
3answers
1k views

How to create a surface mesh embedded in 3D?

I am working on a problem where I want to optimize current densities on 2D surfaces embedded in 3D to generate magnetic fields. The current density on a surface can be written as a scalar function ...
20
votes
3answers
692 views

How to get a specified number of points that are nearly equally spaced in a closed rectangle

TriangulateMesh is almost the right tool for this problem. For example, ...
17
votes
1answer
581 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 ...
14
votes
2answers
2k views

How to create subregions for the NDSolve FEM Solver

I am trying to create a 2d region consisting of two subregions. The inner region has several holes, where boundary conditions are applied. The figure shows the idea. I have tried to create this ...
14
votes
5answers
2k views

Triangular mesh of random points on a sphere

My employer has a new logo (shown below). I do not have information on how this was created (as it was done by an outside company), though I'm fairly sure it was not done in any formal mathematical ...
23
votes
2answers
1k views

How can the {x,y,z} points that fall on the outer boundary of a set of values be selected and smoothly surfaced?

For a given set of x,y,z values, that may, or may not form a uniform shape, how can the center of the data cloud be found, and the surface points be located and a solid smooth surface created from ...
12
votes
3answers
261 views

Trouble meshing a Corbino disc

I am trying to simulate current flow using FEM through this particular device (a Corbino disk) and I have difficulties generating the mesh for it. Here is the region: ...
12
votes
1answer
277 views

RegionNearest and neighborhoods

In this previous question we see that RegionNearest isn't quite as 'capable' as Nearest for some things. Similarly, I need to ...
7
votes
3answers
381 views

Trouble with discrete MeshRegions: Integrating over plane slices

I would like to slice a discrete 3D region with a plane, and integrate some field over the resulting 2D region (embedded in 3D). Let me be clear: I do not mean analytical regions (the kind you could ...
22
votes
1answer
742 views

Mismatch between Mathematica and COMSOL in 3D FEM problem

I would like to solve an advection-diffusion problem on a torus domain. There are three Dirichlet conditions: One at the inlet (concentration $c=0$), one at the outlet ($c=0.5$) and one at the wall ($...
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. ...
12
votes
2answers
451 views

Integration of a PDE solution over a custom-defined subdomain

Preamble: In my previous question I raised a problem of a custom-chosen integration of the solution of a PDE. In that case it was an integration along a line lying within the PDE domain. The solution ...
11
votes
4answers
1k views

How discretize a region placing vertices on a specific non-uniform grid

Given a generic region, for example: Ω = ImplicitRegion[ 2 x^2 + 3 y^2 + 2 x y - 2 <= 0 ∧ x^2 + y^2 > .1, {x, y}]; and a non-uniform grid, for ...
9
votes
3answers
500 views

How to smoothen a surface given as a mesh?

I am trying to "smoothen" meshes. For example, if starting from a cuboid, I would like something similar to a rounded cuboid. There are many ways to smoothen a surface, but I am not going to give a ...
6
votes
1answer
232 views

ConvexHullMesh fails with small numbers

When I try to get the ConvexHullMesh of a List of points that are "small scale", I get errors: ...
6
votes
0answers
438 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 ...
15
votes
2answers
549 views

VoronoiMesh without edges

How can I remove the edges of a VoronoiMesh? I would like to display only the closed cells not touching the border of the image. This is my binarized source image (imgbw): I am doing this: ...
15
votes
1answer
492 views

How to specify PDE Boundary condition on a B-spline?

Context I would like to solve a PDE on a boundary which is parametrized as a BSpline. I am trying to solve the force-free Grad-Shafranov equation on a boundary ...
14
votes
3answers
230 views

Ordering Problem With VoronoiMesh

Imagine I want to model 2D cells moving in a tissue. Consider, as an example, Lloyd's relaxation algorithm. Using VoronoiMesh I'm able to mimic some cell movement. ...
11
votes
2answers
2k views

Join Two Element Meshes

Let's say I have two element meshes defined as the following: ...
11
votes
2answers
1k views

How to use Mathematica to turn a picture into low poly style?

I want to use Mathematica to turn a picture into low poly style. That is, to make the following conversion: Bill to Bill low poly(Using Image Triangulator App). I think the biggest difficulty is how ...
7
votes
3answers
218 views

Reduce quality of an imported MeshRegion

Importing STL files using Import results in a MeshRegion composed by the triangulation of the original file, and a similar ...
7
votes
3answers
290 views

Creating MeshRegions of various 2D lattices

This is a soft question about the best approach to design a function that creates MeshRegion objects of various 2D lattices, e.g. kagome or hexagonal, all through ...
7
votes
2answers
2k views

How can I mesh a solid cylinder with triangular or tetrahedral elements

I need to plot triangular mesh on a cylinder. However the function Cylinder doesn't have a Mesh option. By using ...
6
votes
1answer
180 views

3D FEM Meshing Internal Regions

I am trying to set up a 3D element mesh with intersecting regions having different mesh densities. I am having difficulty setting up the defining boundary meshes from which I will then apply ...
13
votes
2answers
1k views

How do I place a texture on an irregular 3D model imported from an OBJ file?

I'm trying to reproduce a textured head in Mathematica, and I'm using a kind of 'net' of a head which contains all the features on the face. The texture looks like this: which is supposed to look ...