# Tag Info

### Can Mathematica solve Plateau's problem (finding a minimal surface with specified boundary)?

Edit: added Gradient -> grad[vars] option. Without this small option the code was several orders of magnitude slower. Yes, it can! Unfortunately, not ...
Accepted

### How to perform Loop subdivision on a triangle mesh with Mathematica?

We need quite a bit of preparation. In the first place we need methods to compute cell adjacency matrices from here. I copied the code for completeness. ...

### Can I get the curvature at any point of a random curve?

I guess the first step would always be to find an ordered list of points along the middle of the curve. That I can help with: First binarize and thin the image of the curve, so you get a 1-pixel wide ...
Accepted

### Numerically solving Helmholtz equation in 3D for arbitrary shapes

Version 11 has both symbolic and numeric eigensolvers, see here for an overview Here is a slightly different way to do it. We write a function that converts any PDE (1D/2D/3D) into discretized system ...
Accepted

### Can Mathematica solve Plateau's problem (finding a minimal surface with specified boundary)?

Here is a method that utilizes $H^1$-gradient flows. This is far quicker than the $L^2$-gradient flow (a.k.a. mean curvature flow) or using FindMinimum and friends, ...

### How to create word clouds?

There is now a built-in version of an algorithm in v10.1: WordCloud. I wonder whether any of your nice algorithms introduced here had any influence on the built-in ...

### How to estimate geodesics on discrete surfaces?

Geodesics in Heat Algorithm At the suggestion of @user21 I am splitting up my answers to help make the code(s) for calculating geodesics distances easier to find for other people interested in these ...
Accepted

### Faster way to compute the distance from a point to a surface in 3D

Well, you can use the undocumented RegionDistance which does exactly this as follows: (This answer, as written, only works for V9 as noted by Oska, for V10 see ...
Accepted

### How to speed up estimation of Mean and Gaussian curvatures on triangular meshes?

Note added 1/29/2020: the routines here have a bug where the mean curvature is sometimes computed with the opposite sign. I still need to work on how to fix this. I guess I should not have been ...
Accepted

### Finding length of intersection of two surfaces

Fixed (see below) Here's an approach: r1 = Exp[-x^3 - y] - 1 == z; r2 = y == z; We create ImplicitRegions: ...
Accepted

### Catmull-Clark and Doo-Sabin Subdivision Implementations

Catmull-Clark Subdivision Indeed, I have some code for Catmull-Clark subdivision and I planned to post it here for quite some time. This seems to be a good opportunity. The code is optimized for ...
Accepted

### Better way to calculate angle between lines?

This passed all test cases, I think: anglecalc[vec1_, vec2_] := Mod[(ArcTan @@ vec2) - (ArcTan @@ vec1), 2 π]
Accepted

### How to extract parts from atomic expressions like DelaunayMesh and Graph?

I'm going to take this as a general question, referring to all atomic objects, not just DelaunayMesh. By design, atomic objects like ...
Accepted

### GeoGraphics : path within a country

Here is a solution I can think of. Idea is to take the FullPolygon of a given country and then triangulate the region. Once that is done take the underlying ...
Accepted

### How to estimate geodesics on discrete surfaces?

Nothing really new from my side. But since I really like the heat method and because the authors of the Geodesics-in-Heat paper are good friends of mine (Max Wardetzky is even my doctor father), here ...
Accepted

### Making a graph or network interactively over an image

There are many ways to do this, modifying, improving my method or doing a completely different thing. My goal here is to show a very basic idea that should give you a start. ...

### Site - Cell Correspondence in Voronoi Diagram obtained via VoronoiMesh

Of course it's not good that Mathematica forget initial points for Voronoi mesh. May be it is a bug. However one can easily recover all generating points directly from the mesh. It's interesting from ...

### Find duplicates in list of InfiniteLine

DeleteDuplicates[lines, RegionWithin] {InfiniteLine[{{0, 0}, {1, 0}}], InfiniteLine[{{0, 1}, {1, 0}}]} Also ...

### How to speed up estimation of Mean and Gaussian curvatures on triangular meshes?

It took me a while, but the suggestion of @Michael E2 was quite helpful, and especially the post (Optimize inner loops). For those of you (like me) who are new to this style of programming in ...

### How to generate approximately equally spaced points efficiently

Many solutions similar to how to get $n$ equidistributed points on the unit sphere are possible, especially if one can accept that points are not on the edges of a region. For instance, one can use ...

### Site - Cell Correspondence in Voronoi Diagram obtained via VoronoiMesh

There is also a currently undocumented internal function that may be useful. RegionMeshMeshMemberCellIndex[mr] generates a function which can be applied to list ...
Accepted

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

There is a neat (and widely known) trick to produce n approximately evenly distributed points in a disk, or on any surface of revolution. Points are placed on a ...
Accepted

### How to generate approximately equally spaced points efficiently

Annealing Found this to be an interesting question and immediately I thought it to be a good application for simulated annealing. Here's a little unoptimized annealing function I wrote. The idea is ...

### Numerically solving Helmholtz equation in 3D for arbitrary shapes

This slightly modified function ...

### Determine whether points lie within a cow

One way is to compute the solid angle subtended by the cow viewed at the point by summing signed solid angles corresponding to the cow's polygonal faces. If the total is 4 pi, the point is inside the ...

### Converting a Sierpinski tetrahedron to a Graph

A natural and simple way to approach this problem, assuming that your SiPyramid function has been defined, is as follows: ...