← Timeline
2001 · BASIC, Pascal & olympiads

Pinball: vector physics

I wanted a third Space War without its collision problems, so I started on vector physics. Each ball is a rotating polygon, walls are arbitrary segments, and the step from the old position to the new one is intersected with every wall and nearby ball, so a fast ball can’t tunnel through. Penetration is pushed out along a mass-weighted normal, a bounce keeps 98% of the speed and adds spin, and balls can attract each other like planets. Free Pascal and a grid over the world took it from about 39 to over 200 frames per second. This is where the road to my physics coursework, Steel Engine and the master’s thesis began.

Free PascalPhysics

Video

Pictures

Pinball, September 2001: balls piling up, the line in each shows its rotation.