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!
4
u/eggdropsoap Feb 17 '26
I think you’ve found an interesting encoding of position on the implicit function of the sphere, with the choice of K-derived bit shift / division selecting different level sets/isosurfaces that are equivalent to spheres of different binary-exponential radii.
Moving in a spherically-curved manifold would generate gravity-like motion naturally. It’s one way of thinking of real gravity: as the result of straight paths projected onto curved regions of 4D spacetime.
For your writeup, you might want to mine the reference section at the end of a paper like Grimm and Hughes (1995) for foundational computing & math work on manifold embeddings. More recent work on isosurfaces (and signed distance fields) might also be good sources of ideas to mine.
3
u/SevenCell Feb 16 '26
pretty sure my brain is too smooth for this, but I'm trying real hard -
If I understand properly when you talk about how black holes emerge, is that something analoguous to euler gimbal lock? So if 2 of the 3 circles defining a point come too close or superpose, you essentially can no disentangle their influence on the final result?
3
u/heavy-minium Feb 16 '26
Damn, usually I can read stuff that is way over my knowledge/skills and still derive some understanding out of it, but not this time, lol.
Are there any research papers adjacent to this, maybe? Or a few Wikipedia articles on the major concepts?
2
u/heyheyhey27 Feb 27 '26
Looks interesting, but I think for more people to pay attention to this you need to provide a simpler explanation of the space. Like when you say it's defined by three circles, what are those circles? What does a position on each circle mean? Can you draw a 2D diagram?
You should also reach out to ZenoRogue, the undisputed master of game development in crazy non-euclidean geometries.
1
u/dumdub Feb 16 '26
Another AI induced psychosis...
3
u/[deleted] Feb 16 '26
[removed] — view removed comment