What is turtle graphics?
Discipline that underlines the representation and display of geometric shapes in two and these dimensional space .
A Turtle graphics toolkit provides a simple and enjoyable way to draw pictures in a window
Turtle graphics is non standard ,open source python module .
Overview of turtle graphics
Turtle graphics originally developed as a part of the childrens programmimg language logo .
It was created by seymour papert and his collegues at MIT in the late 1960s
Analogy ;Turtle crawing on a piece of paper ,with pen tied to its tail .
It is like a sheet of paper on a window on a display screen .
position specified with x,y coordinates.
various method and description of turtle graphics:
turtle () creates and return a new turtle object
forward() move the turtle forward by the specified amount
backward() move the turtle backward by the specified amount
right() turns the turtle clockwise
left() turns the turtle counter clockwise
penup() pick up the turtle pen
pendown() puts down the turtle pen
color() change the color of the turtle pen
fillcolor() change the color of the turtle will use to fill polygon
goto() move the turtle with the position x,y
beginfill() remember the starting point for a filled polygon
endfill() close the polygon and fill with current fill color
dot() Leave the dot at a current position
stamp() Leaves an impression of a turtle shape at the current location
shape() should be arrow classic turtle or circle
Various method and parameter of turtle graphics
turtle() none
forward() amount
backward() amount
right() angle
left() angle
penup() none
pendown() none
color() colorname
fillcolor() colorname
goto() x,y
beginfill() none
endfill() none
dot() none
stamp() none
shape() shapename
0 Comments