turtle_goto {TurtleGraphics}R Documentation

Set the Turtle's Position and Direction

Description

turtle_goto and turtle_setpos move the Turtle to a given location without changing its direction.

turtle_setangle rotates the Turtle to a given (absolute) angle, where 0 denotes a north-facing Turtle.

Usage

turtle_goto(x, y)

turtle_setpos(x, y)

turtle_setangle(angle)

Arguments

x, y

numeric; coordinates specifying new Turtle's location.

angle

numeric; rotation angle in degrees.

Details

The terrarium must be initialized prior to using these functions, see turtle_init.

If the given location (x, y) lies outside the terrarium, the behavior of these functions depends on the mode argument in turtle_init.

turtle_goto may draw the path between the current Turtle's position and the new location. Its behavior depends on the current plot settings, see turtle_up, turtle_down. In case of turtle_setpos, however, the path drawing is always disabled.

See Also

Other TurtleGraphics: TurtleGraphics-package, turtle_do, turtle_getpos, turtle_init, turtle_move, turtle_param, turtle_reset, turtle_show, turtle_status, turtle_turn, turtle_up


[Package TurtleGraphics version 1.0-8 Index]