Difference between revisions of "TurtleForward Command"

From GeoGebra Manual
Jump to: navigation, search
({{command|scripting}} not {{command|3D}})
(command syntax: changed [ ] into ( ))
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|scripting}} 
 
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|scripting}} 
;TurtleForward[ <Turtle>, <Distance> ]
+
;TurtleForward( <Turtle>, <Distance> )
 
:The turtle moves forward with given distance.  
 
:The turtle moves forward with given distance.  
:{{example| 1=<div>If the turtle is at the origin of the coordinates and the [[File: Animate_Pause.png|link=]]'' Pause'' button is displayed the command <code><nowiki>TurtleForward[turtle, 2]</nowiki></code> moves the turtle to the point (2, 0). Otherwise you must press the [[File: Animate_Play.png|link=]]'' Play'' button so that the displacement is effected.</div>}}
+
:{{example| 1=<div>If the turtle is at the origin of the coordinates and the [[File: Animate_Pause.png|link=]]'' Pause'' button is displayed the command <code><nowiki>TurtleForward(turtle, 2)</nowiki></code> moves the turtle to the point (2, 0). Otherwise you must press the [[File: Animate_Play.png|link=]]'' Play'' button so that the displacement is effected.</div>}}
  
 
{{Note| See also [[Turtle Command|Turtle]],  [[TurtleBack Command|TurtleBack]],  [[TurtleLeft Command|TurtleLeft]] and  [[TurtleRight Command|TurtleRight]] commands.}}
 
{{Note| See also [[Turtle Command|Turtle]],  [[TurtleBack Command|TurtleBack]],  [[TurtleLeft Command|TurtleLeft]] and  [[TurtleRight Command|TurtleRight]] commands.}}

Latest revision as of 09:21, 12 October 2017


TurtleForward( <Turtle>, <Distance> )
The turtle moves forward with given distance.
Example:
If the turtle is at the origin of the coordinates and the Animate Pause.png Pause button is displayed the command TurtleForward(turtle, 2) moves the turtle to the point (2, 0). Otherwise you must press the Animate Play.png Play button so that the displacement is effected.


Note: See also Turtle, TurtleBack, TurtleLeft and TurtleRight commands.
© 2024 International GeoGebra Institute