34
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 ...
32
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 ...
24
votes
22
votes
Accepted
Geodesics on a torus
I don't know if there's a simple way to find geodesics on a torus, but I can give you a general way to find geodesics on any curved surface.
First, I define the torus:
...
22
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 ...
21
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 ...
20
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 ...
17
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 ...
15
votes
Accepted
How to find the magnitude of a vector?
Norm in general assumes complex arguments and uses Abs to provide for that:
Norm[{x, y}]
Sqrt[Abs[x]^2 + Abs[y]^2]
For ...
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 ...
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 ...
13
votes
Accepted
How does a Pringle lose its curvature?
You need to delay the evaluation of the right-hand side of ScalarCurvature:
...
12
votes
Accepted
Computing Gaussian curvature
Note this parametric surface of unit sphere (S^2) should have constant Gaussian curvature: 1.
Surface:
x[u_, v_] := {Cos[u] Cos[v], Cos[u] Sin[v], Sin[u]}
...
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 ...
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 ...
11
votes
Accepted
Plot a space curve and its curvature
ArcCurvature is already built-in to Mathematica, so there is no need to compute curvature manually:
...
11
votes
Accepted
Visualization of Gaussian Curvature
I finally got around to fixing the routine in the math.SE answer the OP linked to. To make this answer self-contained, I'll reproduce the definitions here:
...
11
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 ...
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 ...
10
votes
Accepted
Expand wedge product
One idea is to use TensorReduce. I will assume that r is real, and that Dt[r] and ...
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,...
9
votes
Accepted
reconstruct a 3D curve from discrete curvature and torsion
The curvature and torsion are rates of turning of the Frenet-Serret frame and can be used to integrate the frame using an Euler-type method. The unit tangent vector of the frame is the velocity and ...
9
votes
Archimedean spiral from curvature
Ok, thanks to მამუკა ჯიბლაძე I got the following solution:
...
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 ...
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...
9
votes
9
votes
Accepted
Finding unit tangent, normal, and binormal vectors for interpolated function
First we get you interpolating function:
...
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 ...
8
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 ...
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
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
differential-geometry × 137tensors × 28
plotting × 25
differential-equations × 25
calculus-and-analysis × 22
computational-geometry × 13
physics × 9
vector-calculus × 8
geometry × 5
equation-solving × 4
numerical-integration × 4
graphics3d × 4
mesh × 4
coordinate-transformation × 4
graphics × 3
matrix × 3
function-construction × 3
manipulate × 3
linear-algebra × 3
symbolic × 3
dynamic × 3
parametric-functions × 3
code-request × 3
difference-equations × 3
splines × 3