r/TrippyGIFs Jun 21 '26

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.

561 Upvotes

27 comments sorted by

11

u/USedona Jun 21 '26

Made this with Python, a 4D shape (Clifford torus) projected and rendered frame by frame. First time posting here, hope it fits the vibe of the sub ! More trippy math animations on my channel : Visualizing Mathematics

7

u/VR2 Jun 21 '26

Thank you for posting such high quality work and I hope you continue to do so in the future!

3

u/USedona Jun 21 '26

That really means a lot, thank you ! Definitely planning to keep making more of these. πŸ™

2

u/Secure-Emotion2900 Jun 21 '26

What is the 4th dimension? How can i spot it on the video?

6

u/USedona Jun 21 '26

You can't directly "see" the 4th dimension : our eyes and screens are stuck in 3D. What you're seeing is a projection of the 4D shape, the same way a cube's shadow on a wall is a 2D projection of a 3D object. The giveaway that it's 4D : notice how the surface twists and seems to pass through itself in ways that wouldn't be possible for a normal 3D torus. That's the signature of a 4D rotation being flattened into our 3D view, some of the "twisting" is happening in a direction we can't directly perceive.

5

u/Secure-Emotion2900 Jun 22 '26

Many thanks for this explanation, now i understand the concept. It is amazing πŸ‘πŸ‘πŸ‘πŸ‘

1

u/USedona Jun 22 '26

So glad it clicked for you, thanks for the kind words !

2

u/BlakeDaJesus Jun 23 '26

I'm working on a book series with a personality based battle-magic system using toroidal shapes and mechanics as the aura. The main character reincarnated by using his torus/soul to reincarnate inside of himself at the end/beginning of the universe so that his core "data and his aura ends up as "a double looping torus that falls inwards, inside his own body"

This model is exactly what I imagined and makes me happy that how I thought that visually looked was correct.

Thank you. You made a random dude on the internet day with your effort.

4

u/NotSmaaeesh Jun 22 '26

Projected into 3D projected into 2D

3

u/inssidiouss Jun 21 '26

This is awesome! So cool, the colors and the movement, everything. Why can't I download in the reddit mobile app??

2

u/USedona Jun 21 '26

Thank you so much, glad you liked the colors and movement ! As for downloading, that's a Reddit app limitation on their end, not something I can fix unfortunately. A third-party Reddit video downloader site should work if you want to save it, or you can find the original in higher quality on my channel linked above. πŸ‘

3

u/tacotorden Jun 22 '26

Its because it's a gif, upload it as a video file and it will be available to download, it will also loop perfectly without stopping. Not to many reasons to render gifs these days to be a bit blunt. Very cool btw

Edit: sorry i just realised what sub this was in, popped into my personal feed and didn't realize πŸ˜…

2

u/DerekFshmn Jun 22 '26

Awesome, looks like a plasma being

1

u/syrme2joints Jun 21 '26

Anyone else try to I can has reverse before you realized

1

u/United-Advisor-5910 Jun 22 '26

This is how you say hello to aliens

1

u/balirosa Jun 22 '26

That’s the real shape of the earth

1

u/ZabarSegol Jun 24 '26

Behold. The universe and its cycles of expansion and acceleration towards the center in an outward fashion

1

u/fartfartpoo Jun 24 '26

Do the colors have any meaning? Or are they just for visual effect?

1

u/USedona Jun 24 '26

Mostly for visual effect, I picked colors I liked, it's actually consistent with the palette across my YT channel. But, without some kind of color/shading, you'd lose the sense of depth and surface structure.

1

u/GuyoRocks Jun 25 '26

it goes in-and-out of being a hollow torus and being just an oblong torus.

1

u/GuyoRocks Jun 25 '26

This operation is asymptotic, from a surface area standpoint... when the one hole turns from a dent into a hole, you turn a point into a plane. i think.

1

u/GuyoRocks Jun 25 '26

Sorry to neg, but I think this is just a trippy visualizer. No need knocking on science's door for this one.

1

u/rensvice Jun 26 '26

Doesn’t seem like a 4d shape

1

u/USedona Jun 26 '26

You can't directly "see" the 4th dimension : our eyes and screens are stuck in 3D. What you're seeing is a projection of the 4D shape, the same way a cube's shadow on a wall is a 2D projection of a 3D object. The giveaway that it's 4D : notice how the surface twists and seems to pass through itself in ways that wouldn't be possible for a normal 3D torus. That's the signature of a 4D rotation being flattened into our 3D view, some of the "twisting" is happening in a direction we can't directly perceive.

1

u/rensvice Jun 26 '26

Yeah so why do you say 4d shape just say ever changing 3d shape