Wednesday, March 28, 2012

Turtle Graphics

One system designed to teach students the basics of computer programming and control, is called ‘Turtle’ Graphics.  A ‘turtle’ is an on-screen object that follows command given to it by the user. As the turtle moves around the screen it drags a ‘pen’ that leaves a trail behind it.  The command language is called ‘LOGO’. LOGO has many commands, but the ones most commonly used are:

FORWARD n Move forwards n steps
BACKWARD n Move backwards n steps
LEFT n Turn left n degrees
RIGHT n Turn right n degrees
PENUP Lift the 'pen' up from the 'paper'
PENDOWN Drop the 'pen' down onto the 'paper'
REPEAT n    . . .
END REPEAT Repeat the commands between these twno commands n times  Using these commands, any number of shapes and patterns can be drawn. 

No comments:

BANJAR & TIRTHAN VALLEY Banjar is a town in Kullu district in the state of Himachal Pradesh, India. It is a part of Seraj region that ex...