gosub100 8 hours ago

it's not that difficult. in javascript, you represent each point in (x,y,z), give it a mass, and every frame apply gravity, maybe with some noise added. every time the particle tries to move, you use trigonometry to transmit the forces through the edges to the other points + some damping amount so it doesn't runaway. the mass determines how much each point is affected by subsequent forces.

If you aren't ready for it in 3d, do it in 2d.

1
jeffreygoesto 7 hours ago

Then you read into things like runge-kutta and implicit methods that make your little simulation not blow up...