36 votes

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 ...
Dunlop's user avatar
  • 4,023
33 votes
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 ...
J. M.'s missing motivation's user avatar
24 votes
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 ...
Henrik Schumacher's user avatar
22 votes

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 ...
Dunlop's user avatar
  • 4,023
22 votes

The time-like geodesics (orbits) in the Schwarzschild spacetime

Studying basic solutions at the theoretical physics it is advantageous when one can get an exact solution. At the first sight one can see that the solution can be given in terms of elliptic functions ...
Artes's user avatar
  • 57.3k
18 votes

How to estimate geodesics on discrete surfaces?

Here is an exact algorithm but heavier to implement and to optimise. I chose to implement the "Line of Sight Algorithm" from Balasubramanian, Polimeni and Schwartz (REF). Exact Line of Sight ...
Dunlop's user avatar
  • 4,023
14 votes
Accepted

Solving the Frenet Serret equations for non-constant curvature and torsion, obtaining parametric equations

Okay, this'll be a short answer just to show what you can do. What you are trying for here is essentially an inverse to FrenetSerretSystem, which will give the ...
Jason B.'s user avatar
  • 68.4k
14 votes
Accepted

Can Mathematica solve nonlinear, coupled differential equations?

There were syntactic and conceptual problems with your formulation. Conceptually, NDSolve is a numerical solver, so you need to specify boundary conditions as ...
MarcoB's user avatar
  • 67.2k
13 votes
Accepted

How does a Pringle lose its curvature?

You need to delay the evaluation of the right-hand side of ScalarCurvature: ...
SPPearce's user avatar
  • 5,653
12 votes

How to calculate scalar curvature, Ricci tensor and Christoffel symbols in Mathematica?

Since Version 9, functions to do this have been built into Mathematica but not documented. They live in the SymbolicTensors package which underlies ...
Itai Seggev's user avatar
  • 14.1k
11 votes
Accepted

RegionNearest and neighborhoods

If you don't mind using undocumented stuff, you can access lots of useful properties by converting the BoundaryMeshRegion to a ...
Simon Woods's user avatar
11 votes
Accepted

Estimating Principal Curvature Directions on Discrete Surfaces

For this answer, I shall be doing something slightly more ambitious. In particular, I will be computing the so-called curvature tensor, which encodes information on the normal vector $\mathbf n$, the ...
J. M.'s missing motivation's user avatar
11 votes

How to estimate geodesics on discrete surfaces?

IGraph/M's IGMeshGraph function makes it easy to implement the graph-based solution. This function constructs a graph in which vertices correspond to mesh vertices ...
Szabolcs's user avatar
  • 235k
11 votes
Accepted

Expand wedge product

One idea is to use TensorReduce. I will assume that r is real, and that Dt[r] and ...
Carl Woll's user avatar
  • 131k
11 votes
Accepted

Curve shortening flow

This is roughly the algorithm in the link. Like it says there, it's potentially numerically unstable. The funny curlicue example in the OP was not provided, so I can't check that. In fact, most of the ...
Goofy's user avatar
  • 2,777
10 votes

Compute covariant derivative in Mathematica

There is undocumented functionality in the SymbolicTensors package, which underlies CoordinateChartData, CoordinateTransformData,...
Itai Seggev's user avatar
  • 14.1k
10 votes
Accepted

How can I draw a sphere in the Minkowski space?

A sphere means all point that have the same distance from the some origin, for simplicity we consider the unit sphere at the origin. The only thing that is different from the usual R^3 is the metric ...
Daniel Huber's user avatar
  • 51.8k
10 votes

Prove $R^\top R = I_3$ and find skew-symmetric matrix $R^\top \dot R$

My method of solving this in a manner, that does not require loads of computation and with an acceptable number of terms is using a little bit of tensor algebra. The fundamental steps are: Express $R,...
Andrea's user avatar
  • 1,015
10 votes
Accepted

Finding unit tangent, normal, and binormal vectors for interpolated function

First we get you interpolating function: ...
Daniel Huber's user avatar
  • 51.8k
10 votes
Accepted

How to use MMA to solve the minimal surface?

Since the Lagrange's Equation only work for the surfaces as graphs of functions,that is,the surface must be the form of {x,y,f[x,y]} and ...
cvgmt's user avatar
  • 72.9k
9 votes

How to estimate geodesics on discrete surfaces?

Graph Based Algorithm (Dijkstra) One algorithm that already gives an approximation to the shortest path (which approximates a geodesic), is the algorithm already implemented in Mathematica for ...
Dunlop's user avatar
  • 4,023
9 votes
Accepted

Please explain what's going on with this Geodesic Equation of a Sphere

There is an obvious typo in the derivation of the equations of motion on a sphere. First, we write down the coordinates and the metric tensor for a sphere with a given radius ...
Alex Trounev's user avatar
  • 44.6k
9 votes

Archimedean spiral from curvature

Ok, thanks to მამუკა ჯიბლაძე I got the following solution: ...
Robert Nowak's user avatar
9 votes
Accepted

It seems Eigensystem[m] returns vectors that are not eigenvectors

Classical problem. You want to compute the eigensystem of the second fundamental form with respect to the first fundamental form. Thus you have to solve a generalized eigensystem. This can be done ...
Henrik Schumacher's user avatar
9 votes

Coordinate-free derivative

A solution using FeynCalc would be to write ex = CVD[v, i]/Sqrt[CSPD[v, v]] which corresponds to $ \frac{v^i}{\sqrt{v^2}} $ (CVD...
vsht's user avatar
  • 3,517
9 votes

Coordinate-free derivative

Maybe you could use the following approach: ...
Carl Woll's user avatar
  • 131k
8 votes

Estimating Principal Curvature Directions on Discrete Surfaces

OK, at least here is an attempt to solve my problem. Hopefully these thoughts and code may be useful to others. It seems like there is no single ideal algorithm to solve this problem. Some work ...
Dunlop's user avatar
  • 4,023
8 votes

Trying to plot a wormhole; getting bad results

Providing your math is correct, I see two problems: You need to do the revolution with a single slice through your surface ...
m_goldberg's user avatar
  • 108k
8 votes

The time-like geodesics (orbits) in the Schwarzschild spacetime

I like the analytical solution @Artes. Nevertheless, if we need to find a numerical solution using NDSolve[], then we can differentiate the equation and use the ...
Alex Trounev's user avatar
  • 44.6k
8 votes

Coordinate-free derivative

You can abuse the variational derivative functionality in xTensor to do this: ...
Michael Seifert's user avatar

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