Activities/Turtle Art/Turtle

From Sugar Labs

Jump to: navigation, search
english | español | HowTo [ID# 46904] 


The Turtle Palette (green)

examples (1)

Image:TA-forward-example.png Image:TA-back-example.png Image:TA-forward-right-example.png Image:TA-arc-example.png Image:TA-seth-example.png Image:TA-heading-example.png Image:TA-show-example.png Image:TA-text-example.png Image:TA-image-example.png

descriptions (1)

Image:TA-clean.pngCleanclear the screen and reset the turtle to center, pointed up (pen down, bright red)
Image:TA-forward.pngForward (number)move turtle forward
Image:TA-back.pngBack (number)move turtle backward
Image:TA-left.pngLeft (angle in degrees)turn turtle counterclockwise
Image:TA-right.pngRight (angle in degrees)turn turtle clockwise
Image:TA-arc.pngArc (angle in degrees,radius)move turtle along an arc
Image:TA-setxy.pngSetyx (xcor, ycor)move turtle to position (xcor, ycor) [(0, 0) is in the center of the screen.]
Image:TA-seth.pngSeth (heading)set the heading of the turtle [0 is towards the top of the screen.]
Image:TA-show.svgShow (media)draw text, images, or play sounds
Image:TA-setscale.svgSet scale (media)Set the scale of images
Image:TA-container.svgContainerLoad a media object from the Journal (plugs into the Show block)
Image:TA-xcoor.pngX coordinateholds current x-coordinate value of the turtle (can be used in place of a number block)
Image:TA-ycoor.pngY coordinateholds current y-coordinate value of the turtle (can be used in place of a number block)
Image:TA-heading.pngHeadingholds current heading value of the turtle (can be used in place of a number block)
Image:TA-scale.svgScaleholds current scale value

Turtle state values (can plug into a parameter):

  • X, Y – Zeros for each are at center screen. Negative values are left and down; positive values are right and up.
  • Heading – Zero is pointed up. Heading is in degrees clockwise.
  • Angles are degrees from 0 to 360 (for larger values and smaller values all multiples of 360 are subtracted or added to get the value into the range 0..360).
Examples: 90 means a right angle (90 degrees), clockwise; –30 means a 30-degree angle, counterclockwise
Personal tools
Sugar
Teams
Projects
Local Labs
Google Translations
Using the Wiki