13 votes

Distributing points on boundary (roughly) evenly

Edit For the original code,we can subdivide the line to add some points. ...
cvgmt's user avatar
  • 72.7k
12 votes
Accepted

Visualizing region outlines

3. Inspired by chayong's answer, a direct way to identify the boundary edges using Region`Mesh`MeshCellNormals: ...
kglr's user avatar
  • 395k
11 votes
Accepted

Graphics`Mesh`FindIntersections not working in Mathematica 13.3

$Version "13.3.1 for Microsoft Windows (64-bit) (July 24, 2023)" ...
cvgmt's user avatar
  • 72.7k
9 votes
Accepted

How to recursively subdivide a quadrilateral?

...
kglr's user avatar
  • 395k
9 votes

How to recursively subdivide a quadrilateral?

a starting point. ...
cvgmt's user avatar
  • 72.7k
8 votes
Accepted

Finer mesh for selected subregion of a solid 3D cylinder

Version 1 One way to do it could be to generate a 2D disk mesh with an appropriate refinement and the extrude that to 3D. ...
user21's user avatar
  • 39.8k
8 votes
Accepted

Slope-demarcated PlotStyle implementation

...
Syed's user avatar
  • 53.7k
8 votes
Accepted

Get interior of mesh region

...
kglr's user avatar
  • 395k
8 votes
Accepted

Calculate in which Voronoi cell a coordinate pair lies

The Voronoi diagram cells represent regions with the same nearest point, so you can easily do this with Nearest[coords->"Index"] to get the index of ...
flinty's user avatar
  • 25.3k
7 votes
Accepted

RegionDifference imperfection

Rationalizeing the two volumes before taking the region difference fixes the issue: ...
kglr's user avatar
  • 395k
7 votes

Solving a nonlinear PDE on a mesh with a variable density

Setting a large enough constant InitialSeeding for FEM seems to help :D : ...
xzczd's user avatar
  • 66.2k
7 votes
Accepted

Mean curvature calculation of a mesh (Surface Evolver)

Not sure what the Surface Evolver does, but the following should be a quite quick an appropriate approximation of the squared mean curvature integral. Note that I am using code from this post: https://...
Henrik Schumacher's user avatar
6 votes
Accepted

ToElementMesh with OpenCascadeShape returns incomplete region

Clear[bmesh]; bmesh = OpenCascadeShapeSurfaceMeshToBoundaryMesh[cyl, "ShapeSurfaceMeshOptions" -> {"AngularDeflection" -> 0.05}] <...
cvgmt's user avatar
  • 72.7k
6 votes
Accepted

Finding intersection of two curves using mesh functions

This maybe works like before: ...
Goofy's user avatar
  • 2,777
6 votes
Accepted

How can I transform a 2D mesh to 3D?

If the 2D mesh is watertight, you can create a BoundaryMeshRegion from it and then call DiscretizeRegion on it. The result fills ...
Henrik Schumacher's user avatar
6 votes
Accepted

How to get finer discretization of 3D polytope?

Edit I found that "Length" -> .2 work when we use ...
cvgmt's user avatar
  • 72.7k
6 votes
Accepted

Generating (or Obtaining) the 3D Mesh (Boundary or Element) from an Anatomy3D Image

You'd need to use DiscretizeGraphics[img] because AnatomyPlot3D returns a Graphics3D and not a 3D image.
user21's user avatar
  • 39.8k
5 votes
Accepted

Plotting the z(x,y) = 0 plane with Plot3D. How can I make the Mesh in polar coordinates?

Try Plot3D[0, {x, -10, 10}, {y, -10, 10},MeshFunctions -> {(Sqrt[#1^2 + #2^2]&), ArcTan[#1, #2] & } , MaxRecursion -> 4, PlotPoints -> 100]
Ulrich Neumann's user avatar
5 votes

Visualizing region outlines

Updated BoundaryMesh is not needed, faster than the previous version ...
chyanog's user avatar
  • 15.5k
5 votes
Accepted

Finding area under a region of a Parametric Plot using mesh functions

Hope I understood your question correctly. Using P3 as start, first take all the points ...
Ulrich Neumann's user avatar
5 votes
Accepted

Graphing the locus of points a unit distance from a rectangular prism

One way is RegionDilation according to a unit ball Ball[{0, 0, 0}, 1]. ...
cvgmt's user avatar
  • 72.7k
5 votes

Distributing points on boundary (roughly) evenly

Resample discrete points using LineScaledCoordinate. ...
miss's user avatar
  • 784
5 votes

Coarse mesh of a tube (cylinder surface)

For 2 dimension embeded in 3 dimension,sometimes use MaxCellMeasure -> {"Length" -> #} or ...
cvgmt's user avatar
  • 72.7k
5 votes
Accepted

Solving a nonlinear PDE on a mesh with a variable density

Transformation u[x,y]->1+v[x,y] enables a solution without InitialSeeding: ...
Ulrich Neumann's user avatar
5 votes

Calculate in which Voronoi cell a coordinate pair lies

...
Syed's user avatar
  • 53.7k
5 votes
Accepted

How can I add a marker or meshpoint to the start and end of a ListLinePlot or DateListPlot

...
Bob Hanlon's user avatar
  • 158k
5 votes
Accepted

Shading region under (or over) a curve in horizontal bands

...
kglr's user avatar
  • 395k
4 votes
Accepted

Crossing out region on surface

Add MeshShading -> {{Automatic, Automatic}, {HalftoneShading[], Automatic}} etc.
cvgmt's user avatar
  • 72.7k
4 votes

RegionDifference imperfection

You are using Region unnecessarily in some instances. ...
Bob Hanlon's user avatar
  • 158k
4 votes

How do I get ConvexHullMesh to return polygons instead of triangle as surface mesh?

Somewhere around version 12+ ConvexHullMesh now returns the desired output out of the box: ...
Greg Hurst's user avatar
  • 35.9k

Only top scored, non community-wiki answers of a minimum length are eligible