Turtle Art: Difference between revisions
(add detail and conjecture from examining the source tree) |
(more limitations) |
||
Line 23: | Line 23: | ||
[[Turtle Art]] is an activity with a Logo-inspired graphical "turtle" that draws colorful art based on [[Scratch]]-like snap-together visual programming elements. |
[[Turtle Art]] is an activity with a Logo-inspired graphical "turtle" that draws colorful art based on [[Scratch]]-like snap-together visual programming elements. |
||
There are many restrictions compared to Logo. User defined procedures can't have parameters. Limited screen real-estate makes building large programs infeasible. Only simple variables are available, no lists or other data-structures. |
There are many restrictions compared to Logo. User defined procedures can't have parameters. Limited screen real-estate makes building large programs infeasible. Only simple variables are available, no lists or other data-structures. You can't make user defined functions which return a value. The conditionals and some of the functions only take constants or variables, not expressions. |
||
There are five palettes of program elements available for program construction. Conditions for the If block are a different shape than numeric parameters used by the other blocks. |
There are five palettes of program elements available for program construction. Conditions for the If block are a different shape than numeric parameters used by the other blocks. |
||
Line 48: | Line 48: | ||
*Numbers (violet) |
*Numbers (violet) |
||
**Values (can plug into a parameter) |
**Values (can plug into a parameter) |
||
***Number |
***Number (constant) |
||
***Infix operators(left,right) |
***Infix operators(left,right) |
||
**** +, -, *, /, mod |
**** +, -, *, /, mod |
||
***Random(min, max) |
***Random(min, max) (constants or boxes only) |
||
**Conditions (oval, plugs into an If block) |
**Conditions (oval, plugs into an If block) |
||
*** <, |
*** <, >, = (takes two constants or boxes) |
||
*** and, or, not ( |
*** and, or, not (takes other conditions) |
||
**Print(n) |
**Print(n) |
||
*Flow (orange) |
*Flow (orange) |
Revision as of 01:07, 15 November 2007
see more templates or propose new |
Turtle Art is an activity with a Logo-inspired graphical "turtle" that draws colorful art based on Scratch-like snap-together visual programming elements.
There are many restrictions compared to Logo. User defined procedures can't have parameters. Limited screen real-estate makes building large programs infeasible. Only simple variables are available, no lists or other data-structures. You can't make user defined functions which return a value. The conditionals and some of the functions only take constants or variables, not expressions.
There are five palettes of program elements available for program construction. Conditions for the If block are a different shape than numeric parameters used by the other blocks.
- Turtle (green)
- Clear
- Forward(n)
- Back(n)
- Left(angle)
- Right(angle)
- Arc(angle,radius)
- SetXY(x,y)
- SetH(heading)
- Turtle state values (can plug into a parameter)
- X, Y, heading
- Pen (cyan)
- Pen Up
- Pen Down
- Set Pen Size(n)
- Set Color(n)
- Set Shade(n)
- Fill Screen(color,shade)
- Pen state values (can plug into a parameter)
- Pen size, color, shade
- Numbers (violet)
- Values (can plug into a parameter)
- Number (constant)
- Infix operators(left,right)
- +, -, *, /, mod
- Random(min, max) (constants or boxes only)
- Conditions (oval, plugs into an If block)
- <, >, = (takes two constants or boxes)
- and, or, not (takes other conditions)
- Print(n)
- Values (can plug into a parameter)
- Flow (orange)
- Wait(n)
- Forever[stack] (no continuation)
- Repeat(n)[stack]
- If(condition)[then]
- If(condition)[then][else]
- Stop (no continuation)
- Connectors:
- jog right
- jog down
- My blocks (yellow)
- Named stack - a rhombus which tops a stack, equivalent to a procedure definition (but without parameters).
- "Stack" - blocks for invoking a named stack (no parameters)
- Store in "box"(n) - blocks for setting a variable
- "Box" (plugs into a parameter)
- My stuff (?)
- ? (no screenshot, and not in groups, but I see it in the source tree)
- 1input, 1inputs, 3inputs: looks like invoking a stack with 1/2/3 parameters
- boutput: looks like a blank condition
- opwithlip, opwithlipb: looks like box parameters that can be chained (socket on right)
There are also some icons at the bottom right for user control:
- Show/Hide the turtle
- Eraser
- Stop (for infinite loops)
<gallery>
Image:Turtle0.png|Turtle Art startup screen
Image:Turtle1.png|Clicking on the Blocks menu brings the basic tool set into view
Image:Turtle2.png|Drag blocks from the menu
Image:Turtle3.png|Click on the top block of a stack to execute the stack
Image:Turtle4.png|Other blocks can be found under the tabs
Image:Turtle5.png|
Image:Turtle6.png|Example projects are found on the Projects menu on the upper right of the screen
Image:542-turtleart-2.png
Image:Turtle-recursion-1.jpg|A recursive algorithm (difficult without parameters)