DiGrande.it

Blind, Braille and Embossing Technologies

This site uses cookies to personalize content and ads, provide social media features and analyze links. By closing this banner or continuing to browse, you consent to their use.
Read the DiGrande.it Cookie Policy

TurtlePos- Place and orient the turtle in the plane

Instruction that positions and orients the turtle in the plane.

- TurtlePos(X,Y,R)

Parameters:

- (int) X: horizontal position of the turtle;

- (int) Y: vertical position of the turtle;

- (float) R: orientation of the turtle in degrees from 0 to 359.

Description:

Use the TurtlePos instruction to place the turtle in the plane. The R rotation orients the turtle on the plane. The value 0 orients the turtle upwards, the value 90 orients the turtle to the right, etc.

If the TurtlePos instruction is not used, at the beginning the turtle is always placed in the middle of the graph and oriented at 0 degrees.

The constants TurtleX and TurtleY contain the current position of the turtle. Instead, the TurtleR constant contains its orientation, expressed in degrees from 0 to 359.