Deformed GPU Torus

Demo

Left torus approximates the heat equation (clicking applies heat). Right torus is the wave equation (like tapping water). The right also deforms the vertex positions.

I have the buffers set for both at 1000 by 1000. For the wave calculation (about 10 operations per pixel per update), that’s ~10 million floating point operations per frame!

Lastly, I like how similar the two equations are for heat and wave approximations. The wave update equation is almost the same as the heat equation, but it also includes the previous value (u_i^(n-1)) and different scaling.

5 Likes

I think my microwave oven is malfunctioning. The right donut always gets burnt:

2 Likes

lol. Maybe your microwave is using big time steps? I wanted to use the threejs clock, but I know that can cause issues. The wave equation is sensitive and needs well behaved delta times. I think that’s what’s happening here.

this may work. stopped using threejs clock delta time and just used a hardcoded dt