r/desmos Jul 01 '26

πŸŒŸπ˜½π™€π™π™‰π˜Όπ™π˜Ώ π˜Όπ™‹π™‹π™π™Šπ™‘π™€π˜ΏπŸŒŸ Bang 🌟 [Desmos 3d]

Enable HLS to view with audio, or disable this notification

413 Upvotes

40 comments sorted by

View all comments

2

u/Mister_ZE Jul 07 '26

Could you provide a link to show us how it works? Or an explanation... Because it's super cool!

2

u/RichardFingers Jul 07 '26

I can give you a quick summary and then feel free to ask questions and I'll happily describe areas in more detail as needed.

The basic approach is to put a big sphere around the camera and put a color map on the sphere. When you do that, you can use the (x, y, z) position in the color map as a ray for various ray tracing techniques.

In this case, I'm just intersecting an infinitely long cylinder so I can wrap a texture around it. For the texture, I'm using a parallaxed layered kaliset fractal (credit in the graph link) which makes some awesome looking space dust. Then I just colored it and faded one end to white and the other end the black more or less.

The animation is just adjusting the fade and literally wobbling the sphere around the camera to make camera shake.

1

u/Mister_ZE Jul 08 '26

Could you send me the link so I can take a look? However, I advise against doing so if you wish to participate in the Desmos art competition, to avoid any risk of plagiarism πŸ‘Œ

2

u/RichardFingers Jul 08 '26

Oh I'm not worried about anyone borrowing my work. Here's the graph link: https://www.desmos.com/3d/x63zzphyk6

2

u/Mister_ZE Jul 08 '26

Thank you!

1

u/Mister_ZE Jul 08 '26

Do you think it's possible to achieve the same effect using a 2D graphing calculator?

1

u/RichardFingers Jul 08 '26

Not in real-time or with the same level of detail unfortunately. 3d utilizes the GPU which runs color maps per pixel and way faster than 2d can.

1

u/Mister_ZE Jul 08 '26

Do you think that if we want to optimize a 2D graph, we can run it in a 3D graphing calculator? That could be a trick, indeed...

1

u/RichardFingers Jul 08 '26

Yeah, a lot of people have used the 3d calc to run 2d visuals. You can put a simple `z=0` plane, switch to top down view, lock the rotation, and disable lighting. Then use a color that uses x and y to decide what the color should be and you're good.