- perspective drawing in 3D space
These programs use perspective mode to allow the turtle to move in 3D space. This adds a depth Z value to the normal 2D X and Y values.
Building shapes in 3D is not as easy as 2D. The turtle can roll and pitch, so there are often several different ways of drawing a given shape.
A 2D square has 4 edges and 4 corners. In 3D a cube has 6 faces, 8 corners and 12 edges.
Entering View 3D displays the lines, points and surfaces in fully rotateable 3D. Lights and fog can be added.
Note: Type in the command CS View3D to clear the View3D window and prevent too many shapes building up.
See perspective primitives.
You need to be in Perspective mode (type in 3D).
Copy and paste any one line of code into the XLogo command line and press <Enter> key to run. Widen the XLogo window to easily see and edit a long instruction.
You may need to first type in CS to clear the screen. You can change the default pen and screen color by selecting Tools / Preferences / Options from the XLogo menu.
To slow down the drawing speed add in your own Wait commands.
Try and work out the image each code will produce before you run it...
Also see 2D one liners.