graph y-axis | | +----> x-axis / / t(time axis) basic math and phy Note:-I assume you know algebra and number theory x^2 + y^2 = r^2 // Circle x^2/a^2 + y^2/a^2 = 1 // Ellipse x^2/b^2 + y^2/b^2 = 1 // Ellipse E = KE + PE //energy = kinetic + potential v = d/t //velocity a = v/t //acceleration F = ma Fg = Gm1m2/r^2 //gravity Force g = Gm/r^2 //Acceleration Due to Gravity in earth F = mg //constant pi e Euler's Number c Speed of Light G Gravitational Constant h Planck's Constant //word orbital //path of object num suffix *s //time by second *x *y *xy //center coordinate of object *r *w *h *wh // radius width height *v *vx *vy //velocity of object M //mass of objectId 1M = earth mass 1s = 1d 1d = 1Au 1c -1s //infinite time loop 25@90xy!objId 25 distance 90 angel xy num suffix range of num from to 10-->25x 5s x from move 10x to 25x var graphScale position rotate //global var let pointShape = round|square let pointSize = let pointColor = #hex |colorName //plot use var s X,Y float value x,y int value by user define //std gv{} graph var t time var t=-1 infinite time until it stop it //particle x ,y //position vx,vy //velocity vector M //mass of particle r //radius of particle eq test:- //all use fill return (X*X/0.6) + (Y*Y/0.3) < 1 //Ellipse return X*X + Y*Y < 0.5 //circle return 0.3 < X && X < 0.7 && 0.3 < Y && Y < 0.8 //rectangle return x==2 //line return x==2*y //line base upon equation return Y < -0.4*X*X + 0.5*X + 0 // y < ax^2 +bx+c //parabolic trajectory return return Y*Y < 4*0.1*X //y^2 == 4ax //sine wave const A = 0.3; // Amplitude (normalized) const B = 2 * Math.PI; // Frequency (1 cycle over the width of the canvas) const C = 0; // Horizontal shift const D = 0.5; // Vertical shift normalized return Y < A * Math.sin(B * (X - C)) + D; /eq/circle circle (x - h)² + (y - k)² = r² eq:- (x-h)^2 +(y-k)^2 = r^2 h, k center position of circle r radius center position base x*x +y*y = r*r /eq/Ellipse horizontal (x - h)²/a² + (y - k)²/b² = 1 Vertical (x - h)²/b² + (y - k)²/a² = 1