My first project! A simple Newtonian gravity simulation around a point source (planet). No trigonometry used whatsoever!* Use arrow keys to move around, but gravity is always pulling on you. Press spacebar to launch yourself off of the planet's surface at a high velocity. The atmosphere slows you down in your orbit. Can you get into a stable orbit? R to reverse velocity C to clear trail X to toggle trail Z to set velocity to zero F to enter a CCW circular(ish) orbit (the calculations aren't perfect) M to toggle the moon (which really serves no purpose at this point and is very glitchy - sometimes you need to double-press M) Q/W is the shortcut to change gravity (this can be used to achieve negative gravity!) S to toggle shadows *Except in the calculation of the X and Y components of the vector when F is pressed.
thanks to scratchscope11 set gravity to 75 for an almost perfict orbite