Changes

Jump to navigation Jump to search
no edit summary
Line 64: Line 64:     
[[Image:WeGotGame.png|400px]] [[Image:WeGotGame2.png|400px]]
 
[[Image:WeGotGame.png|400px]] [[Image:WeGotGame2.png|400px]]
  −
  −
  −
      
===Portfolios===
 
===Portfolios===
Line 125: Line 121:  
</span>
 
</span>
   −
===The Turtle Palette (green)===
+
{{:Activities/Turtle_Art/Turtle}}
 
  −
====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-text-example.png]] [[Image:TA-image-example.png]]
  −
 
  −
====descriptions (1)====
  −
{|
  −
|-
  −
|[[Image:TA-clean.png]]||Clean||clear the screen and reset the turtle to center, pointed up (pen down, bright red)
  −
|-
  −
|[[Image:TA-forward.png]]||Forward (number)||move turtle forward
  −
|-
  −
|[[Image:TA-back.png]]||Back (number)||move turtle backward
  −
|-
  −
|[[Image:TA-left.png]]||Left (angle in degrees)||turn turtle counterclockwise
  −
|-
  −
|[[Image:TA-right.png]]||Right (angle in degrees)||turn turtle clockwise
  −
|-
  −
|[[Image:TA-arc.png]]||Arc (angle in degrees,radius)||move turtle along an arc
  −
|-
  −
|[[Image:TA-setxy.png]]||Setyx (xcor, ycor)||move turtle to position (xcor, ycor)  [(0, 0) is in the center of the screen.]
  −
|-
  −
|[[Image:TA-seth.png]]||Seth (heading)||set the heading of the turtle [0 is towards the top of the screen.]
  −
|-
  −
|[[Image:TA-text.png]]||Text (size)||draw text next to the turtle
  −
|-
  −
|[[Image:TA-image.png]]||Image||draw image (click on the Journal icon to search for an image from the Journal
  −
|-
  −
|[[Image:TA-xcoor.png]]||X coordinate||holds current x-coordinate value of the turtle (can be used in place of a number block)
  −
|-
  −
|[[Image:TA-ycoor.png]]||Y coordinate||holds current y-coordinate value of the turtle (can be used in place of a number block)
  −
|-
  −
|[[Image:TA-heading.png]]||Heading||holds current heading value of the turtle (can be used in place of a number block)
  −
|}
  −
 
  −
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
  −
 
  −
===The Pen Palette (cyan)===
  −
 
  −
====examples (2)====
  −
[[Image:TA-pensize-example.png]] [[Image:TA-pencolor-example.png]] [[Image:TA-penshade-example.png]] [[Image:TA-fill-example.png]]
  −
 
  −
====descriptions (2)====
  −
{|
  −
|-
  −
|[[Image:TA-penup.svg]]|| Pen Up || turtle will not draw when moved
  −
|-
  −
|[[Image:TA-pendn.svg]]|| Pen Down || turtle will draw when moved
  −
|-
  −
|[[Image:TA-setpensize.png]]|| Set Pen Size (number) || set size of the line drawn by the turtle
  −
|-
  −
|[[Image:TA-setpencolor.png]]|| Set Pen Color (number) || set color of the line drawn by the turtle
  −
|-
  −
|[[Image:TA-setpenshade.png]]|| Set Pen Shade (number) || set shade of the line drawn by the turtle
  −
|-
  −
|[[Image:TA-settextcolor.png]]|| Set Text Color (number) || set color of text drawn by the turtle
  −
|-
  −
|[[Image:TA-penfill.png]]|| Fill Screen(color,shade) || fills the background with (color, shade)
  −
|-
  −
|[[Image:TA-pensize.svg]]|| Pen size||
  −
|-
  −
|[[Image:TA-pencolor.svg]]|| Pen color||
  −
|-
  −
|[[Image:TA-penshade.svg]]|| Pen shade||
  −
|}
  −
 
  −
Colors and shades are represented by a number from 0 through 99. Using a number outside of this range is allowed, and will cause the value to be "wrapped around" (via a modulo, or "clock arithmetic" operation) to the 0 – 99 range. Color specifies a hue and shade specifies an admixture of white or black to the color.
  −
 
  −
===The Numbers Palette (purple)===
  −
 
  −
====examples (3)====
  −
[[Image:TA-plus-example.png]] [[Image:TA-mod-example.png]] [[Image:TA-pythagoras-example.png]]
  −
 
  −
[[Image:TA-minus-example.png]] [[Image:TA-status.png]]
  −
 
  −
====descriptions (3)====
  −
{|
  −
|-
  −
|[[Image:TA-number.svg]]||number||used as numeric input in mathematic operators
  −
|-
  −
|[[Image:TAplus.svg]]||addition||adds two numeric inputs
  −
|-
  −
|[[Image:TAminus.svg]]||subtraction||subtracts bottom numeric input from top numeric input
  −
|-
  −
|[[Image:TAproduct.svg]]||product||multiplies two numeric inputs
  −
|-
  −
|[[Image:TAdivision.svg]]||division||divides top numeric input (numerator) by bottom numeric input (denominator)
  −
|-
  −
|[[Image:TA-mod.svg]]||mod||modular (remainder) operator
  −
|-
  −
|[[Image:TA-left-bracket.svg]] [[Image:TA-right-bracket.svg]]||numeric extensions||identity operators used for extending blocks (See [[#examples (3)|example]] above)
  −
|-
  −
|[[Image:TA-sqrt.svg]]||square root||calculate square root
  −
|-
  −
|[[Image:TA-random.png]]||random||returns random number between minimum (left) and maximum (right) values
  −
|-
  −
|[[Image:TA-equal.png]]||equal?|| logical = operator (plugs into an If blocks on the [[#The Flow Palette (orange)|Flow Palette]])
  −
|-
  −
|[[Image:TA-greater.png]]||greater?|| logical > operator (plugs into an If blocks on the Flow Palette)
  −
|-
  −
|[[Image:TA-less.png]]||less?|| logical < operator (plugs into an If blocks on the Flow Palette)
  −
|-
  −
|[[Image:TA-and.svg]]||and|| logical ⋀ (and) operator (links conditional)
  −
|-
  −
|[[Image:TA-or.svg]]||or|| logical ⋁ (or) operator (links conditional)
  −
|-
  −
|[[Image:TA-not.svg]]||not|| logical ¬ (not) operator (links conditional)
  −
|-
  −
|[[Image:TA-print.svg]]||print|| Prints value in status block at bottom of the canvas (See [[#examples (3)|example]] above)
  −
|}
  −
 
  −
===The Sensors Palette (red)===
  −
 
  −
====examples (4)====
  −
[[Image:TA-kbexample.png]]
  −
 
  −
[[Image:TA-myfunc-example.png]] [[Image:TA-status-zero.png]]
  −
 
  −
====descriptions (4)====
  −
{|
  −
|-
  −
|[[Image:TA-querykb.svg]]||query for keyboard input||results stored in keyboard block
  −
|-
  −
|[[Image:TA-keyboard.svg]]||keyboard input||holds results of query-keyboard block
  −
|-
  −
|[[Image:TA-myfunc.png]]||my function||a programmable block: add your own math equation in the block, e.g., sin(x)
  −
|-
  −
|[[Image:TA-hres.svg]]||horizontal size||the canvas width
  −
|-
  −
|[[Image:TA-vres.svg]]||vertical size||the canvas height
  −
|-.
  −
|[[Image:TA-push.svg]]||push|| push value onto FILO (first-in last-out) heap
  −
|-.
  −
|[[Image:TA-pop.svg]]||pop|| pop value off FILO
  −
|-.
  −
|[[Image:TA-showheap.svg]]||show heap|| show FILO in status block at bottom of canvas
  −
|-.
  −
|[[Image:TA-emptyheap.svg]]||empty heap|| empty FILO
  −
|}
  −
 
  −
These additional blocks are available in the [[Activities/TAExperimental|experimental version of Turtle Art]]
  −
{|
  −
|-
  −
|[[Image:TAMyblock.svg]]|| [[#Programmable Brick|user-definable code]] || This block runs code found in the tamyblock.py module found in the Journal and editable in Pippy. Use the load Pippy button on the Save/Load toolbar to load your custom module.
  −
|-
  −
|[[Image:TA-volume.svg]]|| volume || microphone input volume
  −
|-
  −
|[[Image:TA-pitch.svg]]|| pitch || microphone input pitch
  −
|-
  −
|[[Image:TA-voltage.svg]]|| voltage || (OLPC XO-1 only)
  −
|-
  −
|[[Image:TA-resistance.svg]]|| resistance || (OLPC XO-1 only)
  −
|}
  −
 
  −
More details on how to use the sensors can be found in [http://tonyforster.blogspot.com/2009/03/data-logging-with-olpc.html Tony Forster's blog] and on the [http://wiki.laptop.org/go/Measure Measure] Activity page.
  −
 
  −
===The Flow Palette (orange)===
  −
 
  −
====examples (5)====
  −
[[Image:TA-if-example.png]]
  −
 
  −
====descriptions (5)====
  −
{|
  −
|-
  −
|[[Image:TA-wait.png]]||Wait(number) || wait specified number of seconds
  −
|-
  −
|[[Image:TA-forever.svg]]||Forever[stack] || (no continuation)
  −
|-
  −
|[[Image:TA-repeat.png]]||Repeat(number)[stack] || loop specified number of times
  −
|-
  −
|[[Image:TA-if.png]]||If(condition)[then] || uses boolean operators from Numbers palette
  −
|-
  −
|[[Image:TA-ifelse.png]]||-If(condition)[then][else] || uses boolean operators from Numbers palette
  −
|-
  −
|[[Image:TA-stopstack.png]]||Stop Stack || No continuation of current action
  −
|-
  −
|[[Image:TA-hor.png]]||horizontal spacer||jog stack right
  −
|-
  −
|[[Image:TA-ver.png]]||vertical spacer||jog stack down
  −
|}
     −
===The My Blocks Palette (yellow)===
+
{{:Activities/Turtle_Art/Pen}}
   −
====examples (6)====
+
{{:Activities/Turtle_Art/Numbers}}
[[Image:TA-box-example.png]]
     −
====descriptions (6)====
+
{{:Activities/Turtle_Art/Sensors}}
{|
  −
|-.
  −
|[[Image:TA-start.svg]]||start|| connects action to toolbar run buttons
  −
|-.
  −
|[[Image:TA-hat1.png]]||action 1 "hat"|| top of action 1 stack
  −
|-.
  −
|[[Image:TA-stack1.svg]]||action 1|| invoke action 1 stack
  −
|-.
  −
|[[Image:TA-hat2.png]]||action 2 "hat"|| top of action 2 stack
  −
|-.
  −
|[[Image:TA-stack2.svg]]||action 2|| invoke action 2 stack
  −
|-.
  −
|[[Image:TA-hat.png]]||nameable action "hat"|| top of named action stack
  −
|-.
  −
|[[Image:TA-stack.png]]||nameable action|| invoke named action stack
  −
|-.
  −
|[[Image:TA-storeinbox1.svg]]||store in box 1|| store numeric value in variable 1
  −
|-.
  −
|[[Image:TA-box1.svg]]||box 1|| variable 1 (numeric value)
  −
|-.
  −
|[[Image:TA-storeinbox2.svg]]||store in box 2|| store numeric value in variable 2
  −
|-.
  −
|[[Image:TA-box2.svg]]||box 2|| variable 2 (numeric value)
  −
|-.
  −
|[[Image:TA-storeinbox.png]]||store in nameable box|| store numeric value in named variable
  −
|-.
  −
|[[Image:TA-box.png]]||nameable box|| named variable (numeric value)
  −
|}
     −
===The Templates Palette (yellow)===
+
{{:Activities/Turtle_Art/Flow}}
   −
====examples (7)====
+
{{:Activities/Turtle_Art/Blocks}}
See [[#Quick Tutorial on using the portfolio features of Turtle Art|the tutorial]] below.
     −
====descriptions (7)====
+
{{:Activities/Turtle_Art/Templates}}
{|
  −
|-
  −
|[[Image:TA-journal.png]] → journal entry|| ||[[Image:TA-nopreview.png]] → no preview image found
  −
|-
  −
|[[Image:TA-template1.png]]||slide template 1:||title, image, text
  −
|-
  −
|[[Image:TA-template2.png]]||slide template 2:||title, image, text, image, text
  −
|-
  −
|[[Image:TA-template3.png]]||slide template 3:||title, image, text, image, text
  −
|-
  −
|[[Image:TA-template4.png]]||slide template 4:||title, image, image, image, image
  −
|-
  −
|[[Image:TA-template5.png]]||slide template 5:||title, text list
  −
|-
  −
|[[Image:TA-template6.png]]||slide template 6:||title, image
  −
|-
  −
|[[Image:TA-sounce.png]]||sound:||sound or voice over
  −
|-
  −
|[[Image:TA-audio-off.png]] → no sound loaded|| ||[[Image:TA-audio-on.png]] → audio file selected
  −
|-
  −
|[[Image:TA-hide-blocks.png]]||hide blocks||
  −
|}
      
==Quick Tutorial on using the portfolio features of Turtle Art==
 
==Quick Tutorial on using the portfolio features of Turtle Art==

Navigation menu