3/30/2023 - Documentation from my prototype walkthrough
Simply meant as a visual, this image very crudley shows how derivatives can be used to precicely calculate velocity and acceleration curves. This will also, hopefully, demonstrate how much difficulty might go into a calculus based appraoch to real time iterative orbit calculations and why an algebra based approach can get very close to the same results.
The method I have opted to use for the iterative calculations involved in my javascript physics engine. Such an approach is very much like a calculus based appraoch in that it can become much more accurate as my value of dt (change in time) decreases, much like how calculus methods sample an infinitely small dt. This approach allows me to recalculate new velocity and acceleration parameters at each new point in space and only needs an initial position and velocity as inputs.
As shown in my blog: a sigificant roadblock to my project was the ability of javscript to handle the large numbers implicit to orbital systems. This algorithm I designed allows my project to function entirely as a javascript based animation without any need for python calculations.
A quick key for those not currently in physics:
G = Gravitational Constant, M = Largest mass (the sun in our case), dt = time interval
g = Acceleration due to gravity, v = velocity, x = x position, y = y position
e = (ge, xe, Me, etc.) scientific notation exponential (e.g. x = 4x10^3, x = 4, xe = 3)
Note: This example is only for the X dimension
The current skeleton design of my project. This project is actually fairly lightweight only relying on my class for Orbital Mechanics (right) to calculate positions of animated objects. The animation software I chose, Three.JS, handles most other animation details with some basic javascript tweaking making the degree of detail much better than if I were to directly code the animation myself.
2/7/2023 - This is my proposed interface for when the user clicks on a single planetary object.
2/7/2023 - This is my proposed interface for when the user selects two objects.