r/GraphicsProgramming • u/Maui-The-Magificent • Feb 16 '26
Constellation: Sharing Cadent Geometry (Avoiding normalization + geometry derived physics)
https://github.com/Mauitron/Cadent_GeometryHi!
I am going to be short:
For the first time, I am sharing a bit of code that I developed for my Rust no-std graphics engine. That is not entirely true, the code itself started as my solution for not having to normalize vectors. An attempt to have a unified unit to express everything. Turns out ended up building a geometry, which makes it more than just being a 'solution' for my engine. I am calling this geometry 'Cadent Geometry'. Cadent geometry is a internally consistent, and is thoroughly tested to be able to accurately close any path thrown at it.
Everything so far can be expressed by one irreducible formula, and one constant. That is all. and because its integer based, it is able to turn individual pixel computation for depth and curvature into 1 multiplication, and 1 bitshift.
many things such as gravity or acceleration also falls out from the geometry itself. So not only don't you have to normalize vectors, things like jumping becomes an emergent behavior of the world rather than being a separate system.
I am going to stop yapping. the link above leads to the no-std definition of said geometry.
I hope you find it interesting!
//Maui_the_Mammal says bye bye!
View all comments
Show parent comment
2
u/Maui-The-Magificent Feb 17 '26
One of the main benefits is not having to normalize vectors. that depth and curvature per pixel is just 1 multiplication and 1 bitshift. That is much more computationally cheap than having to do things like the inverse square root for vector normalization.
Another thing is having gravity be a part of the same thing, not as a separate system. Which mean that everything to a ball bouncing to the creation of a black whole appear naturally.
But there are drawbacks as well, the main one is that there is no solidified tooling for it. projecting geometry is tricking, the mental model is not Cartesian coordinates, which makes it tricky at first. stuff like that.