×
Login Register an account
Top Submissions Explore Upgoat Search Random Subverse Random Post Colorize! Site Rules Donate
1

Shortest Path Between Two Points On A Sphere

submitted by happytoes to mathematics 6 monthsOct 12, 2024 14:19:10 ago (+1/-0)     (www.youtube.com)

https://www.youtube.com/watch?v=F1J5CO3Nuf8

Hard core maths content. Instead of assuming that the path is a great circle and working out the distance, the video sets up a formula for integrating the length of an arbitrary path. Then it uses the Euler-Lagrange equation to obtain a differential equation for the shortest path. The resulting nightmare integral needs a clever substitution. Eventually it all simplifies and the path lies in a plane through the center of the sphere.


5 comments block

this is my favorite kind of math

When UDK first came out the main player object was a "Pawn" that you could customize, but I was unhappy with that, I wanted to write the whole thing and understand it.

I still brag about my PlayerEntities Camera Rotation function, so cool, in game camera third person rotation is tricky business, you need to calc the camera objects position in an imaginary sphere around the player model, which basically means your formula has to be able to take any full sphere (not just 360 arc) and determine any point along it for a certain angle then convert that to game-world-xyz coordinates based on the models position and pan values along all 3 axis.

It's actually rather simple, ONCE YOU LEARN IT. still cool.