Lua physics basics
Basic physics functions and algorithms implemented in the Lua language. It helped me study physics.
Constants
- g (gravitational constants)
- mu (friction)
- G (for planets)
Functions
calcForce(m,a)calcFWithHooke(k,d)calcAfromForce(f,m)calcI(f,t)calcW(f,s)calcWFromAngle(f,angle)calcAttraction(m1,m2,dist)calcAccelAmmount(v,s)calcFInside(F_array_outside)calcFs(mu,Fny)calcFnyWithHooke(D,delta_l)calcEFromVAndM(m,v)calcEFromMech(E_kinematic,Er,Eh)
Misc.
- Vector class
- Physical object class with mass, position, velocity... and display_object_data()