Lesson goal: Draw with cubes

Previous: 3D graphics and the light source | Home | Next: Drawing lines in 3D

In a previous lesson, you did some drawing with spheres. You can also draw here with cubes (sort of like Minecraft...we guess).

Also, remember, you are coding now. You can use for-loops and such to draw lots of cubes; they don't have to be placed one at a time. See example #4.
cube(x,y,z,width,height,depth,"color")
Move the mouse over a dotted box for more information.

You can find a list of color codes here. The 3D drawing area will appear under your code-editor. You might have to scroll down to see it.

Now you try. Fill in a x,y,z and width, length, and height of your cube.

Type your code here:


See your results here: