turtlegraph - Turtle Graphics Turtle graphics was first...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Turtle Graphics Turtle graphics was first developed as part of the childrens programming language Logo in the late 1960s. It exemplifies OOP extremely well. There are various versions of Turtle Graphics defined for Python. The version were going to use is defined in Chapter 7 of your textbook. It is not the version from Lamberts earlier book. Objects are turtles that move about on a screen (window). The turtles tail can be up or down. When it is down, the turtle draws on the screen as it moves. CS313E Slideset 3: 4 Turtle Graphics The Turtles State A turtle has a given position designated by its ( x , y ) coordinates, with (0 , 0) being in the middle of the window. The state of the turtle consists of: Position: denoted by its current x and y coordinates Heading: denoted by an angle in degrees. East is 0 degrees; north is 90 degrees; west is 180 degrees; south is 270 degrees. Color: initially blue, the color can be set to 16 million colors Width: the width of the line drawn as the turtle moves (initially 2 pixels) Down: an attribute indicating that the turtles tail is down. CS313E Slideset 3: 5 Turtle Graphics Turtle Methods Some of the methods are listing on p. 250 of your textbook....
View Full Document

This note was uploaded on 11/21/2011 for the course CS 329E taught by Professor Mitra during the Spring '11 term at University of Texas at Austin.

Page1 / 11

turtlegraph - Turtle Graphics Turtle graphics was first...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online