The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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
11
votes
4answers
645 views

Converting Mesh in DensityPlot to a Graph

Consider the following line of code: ...
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 ...
11
votes
2answers
811 views

FEM: Nicer Element Shape for Spherical Region

I'm trying to generate a mesh for later use in the Finite Element Method of the DSolve command. It is basically a parallelepiped with a spherical indentation. I'm ...
11
votes
1answer
865 views

representation of custom deformation on a meshgrid

I am trying to represent 2D deformations on a rectangular grid. In Mathematica 10, there is a method to solve the elastic differential equations and then represent the deformation as presented here: ...
11
votes
1answer
435 views

Boundary cells of a mesh?

This is an offspring of answering another question. Consider ...
11
votes
2answers
1k views

Join Two Element Meshes

Let's say I have two element meshes defined as the following: ...
11
votes
1answer
268 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. ...
11
votes
1answer
760 views

Making good meshes

I have been looking at how to make meshes and how to control the size of the boundary elements and the interior elements. A relevent question may be found here. I can see how to do this for regions ...
11
votes
0answers
385 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 ...
10
votes
3answers
890 views

Lloyd relaxation on VoronoiMesh

How can we apply Lloyd's relaxation algorithm to a VoronoiMesh? Thanks. UPDATE Thanks a lot KennyColnago for your answer. Based on Simon Woods suggestion of ...
10
votes
6answers
1k views

Change appearance of ConvexHullMesh

I'm struggling to understand the behaviour of ConvexHullMesh (or rather the non-behaviour). I have a polygon p ...
10
votes
3answers
368 views

Interior of discretized region

I have some domain of interest: r = 0.3; dom = ImplicitRegion[(x - 1/2)^2 + (y - 1/2)^2 >= r^2, {{x, 0, 1}, {y, 0, 1}}]; Now I can extract mesh of the whole ...
10
votes
2answers
189 views

How to return the coordinates of the respective 3 vertexes of a DelaunayMesh's face?

I have a set of points pts1 and a point redPts as below:- ...
10
votes
1answer
625 views

Making a Voronoi diagram bounded by the convex hull

Consider the following: ...
10
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 ...
10
votes
2answers
146 views

ToElementMesh of Region with Hole

When I try to mesh the following region it fails. Why? Is there a workaround? ...
10
votes
2answers
318 views

Orientation of boundary domain normals

Bug introduced in 11.2.0 or earlier, and fixed in 11.3.0 I would like to use BoundaryNormals provided by the ElementMesh object. To demonstrate my problem I will take my favorite domain: ...
10
votes
1answer
394 views

AceFEM: Conversion of triangular to quadrilateral mesh

I am using AceFEM command SMTTriangularToQuad to convert 2D triangular mesh (created by Mathematica) to unstructured quadrilateral mesh. This mesh has internal "...
10
votes
0answers
195 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 ...
9
votes
2answers
338 views

Catmull-Clark and Doo-Sabin Subdivision Implementations

I want to work on subdivision surfaces. Unfortunately, I don’t have any source code to start with. I need some Mathematica codes for applying Catmull-Clark and Doo-Sabin methods. I would like to ...
9
votes
3answers
701 views

Removing cells from Voronoi mesh if they exceed a certain area or circumference

I start with the example in Finding the perimeter, area and number of sides of a Voronoi cell with RunnyKine's answer: ...
9
votes
3answers
2k views

Custom mesh in ListPlot3D

I have the following data: ...
9
votes
1answer
408 views

Eliminate an unexpected mesh line

What is the source of the vertical mesh (ring) in this figure and how does one eliminate it? ...
9
votes
3answers
346 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 ...
9
votes
2answers
349 views

Picking mesh elements that are not on the border of the mesh

As an example, let's say I use a set of random points to create a Voronoi mesh pts = RandomReal[{-1, 1}, {100, 2}]; VoronoiMesh[pts, {-1, 1}] and get something ...
9
votes
3answers
350 views

3D internal subregion

I'm trying to follow the documentation for Element Mesh Generation, but somehow I cannot understand it correctly. Here is a simplified version of my real problem. I'm trying to simulate the ...
9
votes
3answers
501 views

Small circles at mesh nodes

How to show the (16 X 4) mesh intersection points by a tiny red dots? ParametricPlot[v { Cos[u], Sin[u]}, {u, 0, 2 Pi},{v,1,3}, Mesh-> {15,3} ]
9
votes
2answers
423 views

Mesh Problems with MatrixPlot

Bug introduced in 10.1 or earlier and persisting through 11.3.0 or later I've come across some weird behavior in 10.1 when trying to use Mesh with MatrixPlot. In the example below, when specifying ...
9
votes
2answers
173 views

Distinguish between inner and outer boundary in MeshRegion

For example, this is a 2D MeshRegion with one (or more) holes in it: ...
9
votes
2answers
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 ...
9
votes
2answers
326 views

Computing volume from node coordinates on the surface of a non-convex solid

I have a question regarding computation of volume of an irregular shape. I have looked around Mathematica -StackExchange but I could not find a solution which suits me the best. Problem Description: I ...
9
votes
1answer
1k views

Smoothing out data points in a ListDensityPlot

I stumbled upon this problem when I was trying to make some nice smooth ListDensityPlots of my numerical data. In short, my problem is that I let Mathematica plot two copies of basically the exact ...
9
votes
1answer
229 views

Problem when using the MeshRefinementFunction option of FEM`ToElementMesh

I'm trying to solve Stokes equation in the following domain The border of the inner half circle where I define a certain boundary condition different from zero and where I am interested in obtaining ...
9
votes
2answers
867 views

Function Interpolation with Automatic / Algorithmic Values Mesh

I have an underlying function f(x,y,z) that is computationally intensive, but is smooth and continuous. I'm needing to find the function values along a line in xyz. Currently, I'm calculating f at ...
9
votes
1answer
198 views

Use a symmetric mesh in ListDensityPlot

I am trying to produce a ListDensityPlot but I am having issues with aliasing. The problem arises from the way that Mathematica is breaking up the mesh into ...
9
votes
2answers
835 views

Export generated mesh

Say I have generated a mesh using ToElementMesh, following one of the examples here: http://reference.wolfram.com/language/FEMDocumentation/ref/ToElementMesh.html ...
9
votes
1answer
2k views

Construct a simple mesh or tetrahedral mesh from 3D image surface

I have a 3D Y-Shape hollow tube, not so good surface. Import["http://dl.dropbox.com/u/68983831/tube02.vtk", "Graphics3D"] I tried to use following vertex data ...
9
votes
1answer
247 views

Shell elements in FEM

I was wondering how to find the modes of a shell (i.e., a structure with one dimension [the thickness] smaller than the two others). Consider for instance the following ...
9
votes
1answer
156 views

Problem with ToBoundaryMesh

Bug introduced in 11.1.0 and fixed in 11.2.0 I have a problem that occurs in ToBoundaryMesh in Mathematica version 11.1, whereas in 11.0 it worked fine. I defined <...
9
votes
2answers
157 views

Control color of edges in ListPlot

I have a list of 2D points I want to plot with ListPlot. I want the edges connecting these points to have certain colors. So in addition to setting the ...
9
votes
1answer
144 views

Defining a MeshRegion from a list of points and Polygons with duplicate points does not work in 10.4

Bug introduced in 10.4.0 and fixed in 11.0 This code produces a MeshRegion in versions 10.0 through 10.3.1, ...
9
votes
0answers
254 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 ...
8
votes
3answers
386 views

Generate mesh from picture

It is probably a stupid question, but I can't figure out how to generate a mesh from picture like this ...
8
votes
3answers
672 views

Polygon mesh: Compute vertex normals for smooth shading

MeshRegion has a "SmoothShading" PlotTheme which automatically computes the ...
8
votes
3answers
369 views

Triangulate a surface given as a MeshRegion

Suppose I have a surface given as a MeshRegion. Example: ...
8
votes
2answers
432 views

Discretizing regions with pointy boundaries

I'm trying to discretize a region with "pointy" boundaries to study dielectric breaking on electrodes with pointy surfaces. So far I've tried 3 types of boundaries, but the meshing functions stall ...
8
votes
2answers
5k views

Delaunay Triangulation for 3D Surface Data

I want to do a Delaunay triangulation on scattered 3D surface data. Mathematica itself does it only for 2D through the command DelaunayTriangulation[], which gives ...
8
votes
2answers
211 views

Make uniform mesh with quad elements

I have the following code that generates a finite element mesh with triangular elements which by using command ToQuadMesh I convert to the quadrilateral elements, but I am not able to make the uniform ...
8
votes
3answers
375 views

How do I convert a mesh region back into a Graphics3D primitive?

The Graphics3D format has more styling options than mesh based graphics, so I was wondering if there was a way to convert mesh based objects such as region intersections and unions back into the ...
8
votes
4answers
2k views

Triangulated Mesh from Voronoi Diagram

I want to generate a mesh (using Mathematica 10) in the following manner: generate a Voronoi diagram, like so: and then triangulate each individual Voronoi grain, where an edge is formed by ...