Each pixel correspond to a double pendulum and the pixel coordinate (x,y) are maped to initial angles (-pi,pi).
The function Uint32 pickColor(float o1, float o2) associate to a combination of angle, an intresting color.
We then for each time step compute the physics update on the GPU with CUDA.
Compared to the original python implementation, I added a dampening factor to the simulation and add support for CUDA.
Time taken to render 2000 frames at 512x512 resolution
| device | precision | time |
|---|---|---|
| 5900x | fp32 | 76.879s |
| RTX 3090 | fp32 | 5.502s |

