Plotting points in 2D and 3D.

Please note that this page is designed to help you practice 3D coordinates. This is not how you should draw shapes with Logo in either 2D or 3D. See the other Logo pages for the best ways into Logo graphics.

Aims and objectives.

Plot shapes on the xy plane and use basic Logo commands. Plot shapes using xyz coordinates. Activities and challenges using 3D coordinates. "Getting Started with Logo" If you need it!

Plot shapes on the xy plane and use basic Logo commands.

Drawing an object

Type these commands into the command line at the bottom of the commander window:

setxy 100 0
setxy 100 100
setxy 0 100
setxy 0 0

The drawing turtle starts from the xy coordinate origin which is located at thecentre of the screen. the x-axis is horizontal with positive values to the right. The y-axis is vertical with up positive.
setxy moves the turtle to the x y coordinates entered with the command. Thus setxy 100 100 sends the turtle from its current position to the point x y.

Other Commands

cs

Clears the screen and returns the turtle to the origin, 0 0.

pu setxy 200 200 pd

Lifts the drawing pen off the screen, moves it to 200 200 and then puts the pen down again.

To change the pen width, colour, or screen colours use the set menu.

If you need to remove a line set the pencolour to white and reverse your steps. When you have removed all the wrong lines set the pen back to the colour that you are using.

Challenge 1

Apply what you have learnt and draw two rectangles with sides 200 by 300.
Draw the first in red with the long side vertical and draw the other in blue with the longer side horizontal.

Working with 3D xyz Coordinates.

To put Logo into 3D mode you must type perspective into the command line.

To get Logo out of 3D mode you must type window into the command line.

Use these commands to draw the x y and z axes.

setxyz 0 0 500
setxyz 0 0 0
setxyz 0 500 0
setxyz 0 0 0
setxyz 500 0 0
setxyz 0 0 0

Now draw a cube with side 200 pixels.

setxyz 0 0 200
setxyz 0 200 200
setxyz 0 200 0
setxyz 0 0 0
setxyz 200 0 0
setxyz 200 200 0
setxyz 0 200 0
setxyz 0 200 200
setxyz 200 200 200
setxyz 200 200 0
setxyz 200 200 200
setxyz 200 0 200
setxyz 200 0 0
setxyz 200 0 200
setxyz 0 0 200

Further Activities and Challenges

If you join opposite corners of the top face to the other pair of opposite corners on the bottom face then you can draw a tetrahedron.

If you join the midpoints of all the faces together then you can draw an octahedron.

Last updated 23rd February 2010