Discuss Scratch

KhiemGOM
Scratcher
2 posts

3D wireframe renderer

I made a 3D wireframe renderer: https://scratch.mit.edu/projects/749854233

Used matrix multiplication with rotation matrix to achieve the rotation, however, the result was not what I was expecting. I thought they would rotate around the axis but they seem to rotate around *somewhere* which I think is the shape's relative axis or something? Anyone have any idea what went wrong? (Sorry the code is too long for me to recreate here, read the code in see inside) I don't know what went wrong but the result was cool nevertheless.

You can also input new shape but it's kinda complicated, anyone got the edges and vertices table for other 3D shape? Would appreciate if you share more shapes!

Last edited by KhiemGOM (Oct. 24, 2022 16:13:49)

Powered by DjangoBB