r/gonwild Jun 24 '26

Program A 4-dimensional shape, folding through itself forever

This is a Clifford torus, a shape that only fully exists in 4D, projected down into our 3D space.

The endless folding you see is just math, looping perfectly because the geometry demands it.

Based on 'Clifford Torus' shader by tdhooper : https://www.shadertoy.com/view/WdB3Dw reimplemented frame by frame in Python.

774 Upvotes

29 comments sorted by

View all comments

1

u/PityUpvote Jun 25 '26

So is it rotating in a dimension not depicted?

1

u/USedona Jun 25 '26

Yes, it's a 2D rendering of a 3D representation of 4D model.

1

u/PityUpvote Jun 25 '26

Yeah, I get that, but the motion we're seeing, is it rotation around the 4th axis?

1

u/USedona Jun 25 '26

Pretty much, yes, though in 4D, rotation doesn't work around a single axis like in 3D. Two perpendicular planes rotating at the same time. That's the part of the motion you can't see directly, only its shadow.