It's not 3D, but it's not a square or triangle either.
To make 3D code, you basically have to replace TURN with blocks that control pitch, yaw, and roll, and instead of drawing on the screen, you maintain a list of 3D coordinates of points visited by your replacement for MOVE. Then, separately, take the list of 3D coordinates and project them onto the plane of the state, which is where the trigonometry comes in. Then you have a list of 2D points, which you draw as usual.
To make it fancy, you let the user control the camera position and direction, which means projecting the 3D points onto a different 2D plane.
I don't think it's actually so very hard if you understand the trig. It's a lot of code, but using well-chosen custom blocks you can make each piece of the code simple.