Share your repls and programming experiences

← Back to all posts
4d Renderer
programmeruser

Use the arrow keys to move along the x and y axes, w/s for the z axis, a/d for the w axis (the 4th dimension), and q/e to rotate along the z and the w axes.
Faster than @fuzzyastrocat's renderer since it uses perspective projection instead of raymarching.

Voters
HenryShears
TheDNAHero
fuzzyastrocat
firefish
programmeruser
Comments
hotnewtop
fuzzyastrocat

Nicely done, you beat me (or my motivation? :D) to it!

One thing though, the cube itself rotates but the camera does not. It'd be nice if that was possible too (since, use this in a larger project, you'd likely need to do that).

programmeruser

@fuzzyastrocat thanks. I'm not sure how to implement camera movements though. It seems like it has something to do with a view matrix but I'm not sure how to implement it

fuzzyastrocat

@programmeruser There's a great resource on view matrices (or rather, all of 3D rendering in general) somewhere, but unfortunately I can't seem to find it again. The only thing I can say is that view matrices are actually not very complex, despite what it may seem, so if you can find a good tutorial it'll be very beneficial.