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
1
vote
1answer
48 views

Find the average of the Fat cantor set based on its distribution

Suppose we have $P:A\to[0,1]$, where $A$ is the fat cantor set denoted as $C$. We produce $C$ by removing $1/4$ of $[0,1]$ around mid-point $1/2$ $$C_{1}=[0,3/8]\cup [5/8,1]$$ $$C_{1,1}=[0,3/8] \ \ ...
5
votes
1answer
64 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
34 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
26 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 ...
6
votes
2answers
83 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
138 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
104 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
48 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
30 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
94 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": ...
0
votes
0answers
33 views

Plotting non-square data array without interpolation

This is a related question to the one I posed a while ago at Non-square data array distorted when using InterpolationOrder->0 in ListDensityPlot I am trying to plot XYZ data that does not ...
5
votes
1answer
64 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
35 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
42 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
308 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
221 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
45 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
76 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
561 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
75 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
100 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
50 views

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

modified question In the following example ...
4
votes
1answer
86 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
75 views

Scaling and Stretching a Mesh

I have a Voronoi mesh, given by ...
9
votes
1answer
100 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 ...
16
votes
1answer
547 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
107 views

Algorithms used for DelaunayMesh

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

VoronoiMesh as a Graph

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

Updating a graph under ODE dynamics (vertex model)

Consider the following graph, which is obtained from a VoronoiMesh ...
3
votes
1answer
75 views

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

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
49 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 ...
5
votes
1answer
178 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 ...
12
votes
2answers
570 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
137 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
163 views

Selecting Edges and Corners in a Mesh

Consider the following VoronoiMesh obtained after a few iterations of Lloyd's relaxation algorithm ...
1
vote
0answers
63 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
594 views

VoronoiMesh as a TogglerBar

Is it possible to use a VoronoiMesh to define a TogglerBar or SetterBar type ...
10
votes
3answers
737 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, ...
0
votes
0answers
45 views

How to perform adaptive mesh refinement on a 3D element consisting of 4 superimposed meshes on AceFem?

I'm trying to perform adaptive mesh refinement on a body that is composed of 4 separate meshes joined together. The body is composed of the following individual meshes: ...
7
votes
1answer
87 views

Is this a bug of BoundingRegion?

...
4
votes
1answer
65 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
65 views

Colouring cells in a Voronoi mesh [closed]

Consider the following code ...
11
votes
3answers
205 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). ...
7
votes
2answers
116 views

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

The default rendering of a region can be rather uninformative. Consider this simple example. DiscretizeRegion[Rectangle[{0, 0}, {2, 1}], MaxCellMeasure -> 2] ...
6
votes
1answer
147 views

Area of an Annulus (MeshTools<>NIntegrate)

In a very simple example I try to describe an annulus using MeshTools package mesh2D = AnnulusMesh[{0, 0}, { 1 , 2 }, {-Pi, Pi}, {36, 10}]; The area given ...
10
votes
2answers
316 views

Generating Mesh of Rotated Graphics

I have a simple geometry that consists of a few rotated rectangles ...
10
votes
5answers
527 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
66 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
64 views

How to auto-rotate a MeshRegion?

I have a 3D MeshRegion region1 as below: ...
8
votes
2answers
163 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, ...

1
2 3 4 5
10