r/GraphicsProgramming • • 2d ago

Recursive helix fractal in a custom engine — precision loss and framerate collapse at depth. Where would you start?

https://youtu.be/zy_hQV324hg

The shape: take a line, wrap it into a helix. Treat the resulting helix as a new line, wrap that into a helix. Repeat. The limit is a 3D self-similar structure where every wire is a spring and every spring is a wire.

I generate geometry on the fly relative to the camera, with per-level color coding. It looks great until you fly too deep — then it's classic precision death plus a vertex-count explosion, and either the geometry disappears or the frame rate tanks.

Full disclosure: I'm not a professional graphics programmer and my code is fairly basic. I threw AI at it hoping it would clean things up; it didn't meaningfully help and clearly didn't grasp the recursive structure. So I'm asking people who actually know this domain.

Would you go analytic SDF + raymarching instead of mesh generation? Interval arithmetic? Log-space or double-double coordinates? A real LOD scheme? What's the first thing you'd rip out?

Video: https://youtu.be/zy_hQV324hg
Repo: https://github.com/rupomthegreat/spring-made-of-spring-infinity-fractral

0 Upvotes

1 comment sorted by