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
5
votes
1answer
237 views

Piecewise Continuous Linear Basis on a Triangular Mesh

Question Given a FEM mesh, I would like to define a set of basis functions anchored to the mesh, so that any piecewise linear continuous function on the mesh can be expanded over that set. Such a ...
0
votes
1answer
54 views

How to smoothen the mesh lines of a translucent sphere

This code generates a nice sphere with distorted mesh lines, in the sense that they are not smooth enough. One can clearly see many disjoint lines trying to imitate a curve. I would like a smoothened ...
0
votes
0answers
43 views

Torus Hex Mesh - Need Unique Hex Dimensions

I'm looking to laser cut a bunch of hexagons and assemble them into a torus (using hot glue or tape). How do I get the dimensions of the individual unique hexagons? I've seen Create a torus with a ...
7
votes
2answers
165 views

Penalty function on discrete mesh using Laplace-Beltrami operator?

Context I am interested in extending to the ill-condionned regime the inversion of linear equations arising from inverting differential equations which have been solved via 0-splines over a mesh ...
4
votes
4answers
160 views

How do I list start and endpoints of CantorMesh?

How do I extract start and endpoints of each defined interval of iteration n of CantorMesh[n]? The furthest I can go is ...
2
votes
1answer
125 views

Mathematica Won't Recognize a MeshRegion

I've implemented the code in the top answer of this question on the Plateau problem in differential geometry, and it works with the example shown in Example 1, so there is nothing wrong with the code. ...
2
votes
2answers
62 views

Replacing every shape in a geometric set with another shape

Consider a Mathematica function that produces some number of identical, but separate shapes; like CantorMesh[2, 2], for example. Is there a simple way to "replace" ...
1
vote
1answer
43 views

How to Resize/Rescale a Mesh?

Consider, for example, the mesh given by mesh = VoronoiMesh[RandomReal[10, {6, 2}]] Imagine I want to resize it so that it is framed in the $[0,1]\times [0,1]$ ...
6
votes
2answers
116 views

How to group points based on mesh primitive membership

As a simple example of what I want to do, let's say I have a Voronoi mesh in a $10\times10$ area with $10$ random "seed points": ...
5
votes
1answer
103 views

Minimization problem and Voronoi Mesh

I have a random convex mesh $Q$, made of $n$ polygons, and I want to test how close it is to a Voronoi tessellation. In other words, I'm looking for generators (seeds) $\{(x_i,y_i)\}_{1\leq i\leq n}$. ...
1
vote
2answers
59 views

Selecting Shared Edges from a Mesh

Consider the following mesh mesh0 = VoronoiMesh[RandomReal[1, {50, 2}]] I can select interior polygons with ...
1
vote
0answers
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 ...
11
votes
3answers
358 views

Why the mesh generated for NDSolve is different from the final plotted mesh?

When I try the following code to solve the Laplace's equation, the mesh generated by bmesh = ToElementMesh[bmesh] is different from the mesh shown in ...
4
votes
2answers
255 views

Closing a Graph

Consider the following graph g I want to "close" it by adding the following edges Alternatively, I would also be happy with something like where I've added four "...
2
votes
1answer
55 views

Plotting space defined by implicit equations via pure functions (ContourPlot3d, RegionPlot3D, Graphics3D)

Is there a simple elegant way to plot any implicit curve or surface in 2D or 3D, given the input reg (list of intervals, i.e. cube) and ...
6
votes
1answer
104 views

Checking if a Graph forms a Mesh

Given a random graph, I want to define a function MeshGraphQ that tests if the graph is a lattice (or mesh) graph. Here, I don't need the tiling to be regular. ...
8
votes
2answers
652 views

How to visualize a spherical mesh on a squared plane?

I need to visualize the points of a spherical mesh on a squared plane (this question is different than this one, I believe). For instance, let us first generate points ...
4
votes
1answer
84 views

Why are those two mesh regions not the same?

In Mathematica, one can triangulate a mesh starting from a boundary mesh region. For example: ...
2
votes
2answers
132 views

An ImplicitRegion with a boundary which is an Interpolated Function is not a ConstantRegion

I create an ImplicitRegion from a box-shaped region with one face replaced by a function h[x,y]. If h[x,y] is a "normal" function, e.g. ...
0
votes
0answers
54 views

Triangle mesh (set of points 2D) with minmal total area: ' Convave Hull' [duplicate]

modified question In the following example ...
7
votes
3answers
235 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 ...
2
votes
2answers
110 views

Scaling and Stretching a Mesh

I have a Voronoi mesh, given by ...
9
votes
1answer
165 views

How to calculate border length between adjacent Voronoi regions?

I have a set of Voronoi cells that I partition into some defined regions. I would like to then calculate the length of the "borders" between these adjacent regions, using the edges of the underlying ...
2
votes
1answer
397 views

Retrieving boundary points of concave hull (or alpha shape) in 3D

I am trying to find the boundary points of some concave 3D region which is described by a list of points. If the region were convex I would take the convex hull and simply extract the coordinates ...
17
votes
1answer
589 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 ...
6
votes
1answer
128 views

Algorithms used for DelaunayMesh

Is it possible to find what algorithms are used for Delanunay triangulations?
4
votes
2answers
140 views

VoronoiMesh as a Graph

I want to draw the following graph using VoronoiMesh. For example, since ...
6
votes
1answer
140 views

Updating a graph under ODE dynamics (vertex model)

Consider the following graph, which is obtained from a VoronoiMesh ...
2
votes
2answers
99 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 ...
3
votes
1answer
138 views

Discretizing a (kinked) line and showing how the points were determined [closed]

Suppose I have a (kinked) line, for example 2-x==y && x< 1 3-2x == y && 1.5>=x>= 1 I want to take this kinked line and represent ...
0
votes
1answer
68 views

Manipulate MeshRegion as normal Mathematica expression

A MeshRegion seems to function quite differently from any other Mathematica expression. One cannot take a Part of it. Nor can I ...
4
votes
1answer
195 views

Where to get the detailed code of MMA for grid mesh

I know DelaunayMesh can triangulate the specified area, but I can't see the code and partition idea of this built-in function. I want to know how to get the source ...
14
votes
2answers
664 views

A Smooth and Round Voronoi Mesh

I want the edges of a VoronoiMesh to be smooth and round. I have found the following code from this answer ...
4
votes
3answers
178 views

Cell-adjacency Graph of a Square Mesh

Consider the list of points pts = {{1, 1}, {1, 2}, {2, 1}, {2, 2}} I want to use them to define a 2x2 square mesh using ...
3
votes
2answers
210 views

Selecting Edges and Corners in a Mesh

Consider the following VoronoiMesh obtained after a few iterations of Lloyd's relaxation algorithm ...
2
votes
0answers
277 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 ...
15
votes
3answers
614 views

VoronoiMesh as a TogglerBar

Is it possible to use a VoronoiMesh to define a TogglerBar or SetterBar type ...
11
votes
3answers
893 views

Creating a Hexagonal Lattice with VoronoiMesh

I want to create a hexagonal lattice using VoronoiMesh. One can achieve that with the following code, where L=5, ...
7
votes
1answer
103 views

Is this a bug of BoundingRegion?

...
4
votes
1answer
80 views

Keep mesh of triangulation under complex valued transformation

I try to make a quick tool for "plotting" complex valued functions. Therefore I generate a Table of complex valued points lying in the complex plane building a ...
2
votes
1answer
96 views

Colouring cells in a Voronoi mesh [closed]

Consider the following code ...
11
votes
3answers
266 views

Inaccurate result from ImplicitRegion

I'm trying to describe the intersection of two cylinders by an ImplicitRegion (in order to use it in NDSolve later). ...
8
votes
2answers
146 views

Using mesh cell highlighting to override the default rendering of a region

Bug found in V11 and fixed in V12 The default rendering of a region can be rather uninformative. Consider this simple example. ...
6
votes
1answer
207 views

Area of an Annulus (MeshTools<>NIntegrate)

Fixed in Version 12.1.1 In a very simple example I try to describe an annulus using MeshTools package ...
10
votes
2answers
381 views

Generating Mesh of Rotated Graphics

I have a simple geometry that consists of a few rotated rectangles ...
9
votes
5answers
546 views

Grainy 2D RegionIntersection Plot: How can I make it smoother?

I have the following code to display three coloured disks and their coloured intersections. However, the result does not appear to have been anti-aliased enough. How can I make it smoother? ...
2
votes
2answers
106 views

Select Part of a boundary mesh

I would like to pick a part of a boundary mesh, for example bm=BoundaryMesh[Cuboid[]] Is it possible to select the part(side) ...
0
votes
1answer
87 views

How to auto-rotate a MeshRegion?

I have a 3D MeshRegion region1 as below: ...
8
votes
2answers
307 views

How to mesh a region with inclusions touching the boundary

Suppose you have a region composed of two materials. You define the inclusions of material 1 through, e.g., disks, ellipsoids, ...
4
votes
1answer
241 views

Adaptive Meshrefinement NDSolve&FiniteElements

In a simple example I try to solve the heat equation using NDSolve and Method->"FiniteElement". I know that NDSolve gives ...

1 2 3
4
5
13