This is a simple simulation of an acceleration field with a terrain based on an elevation function.
The elevation function takes three arguments: x, y and t (time). The terrain is updated every frame.
- Input argument (optional): RPN of the elevation function, e.g.: "0.01 x * 0.1 y * + t * sin 0.01 y * 0.1 t * + sin +" (the default)
- Space button: freeze/unfreeze the terrain
- Left mouse button: drop a ball, the ball will follow the terrain and find a local minimum
- topographic map (red is high, green in the middle, blue is low)
- acceleration field (arrows pointing towards the local minimum)
- balls