arcLeft
The turtle is not limited to only moving in a straight line. arcLeft(angle,radius) moves the turtle counterclockwise along an angle degree arc of a radius sized circle. The center of the circle is radius pixels to the left of the starting turtle position and direction.
Examples
Example: One Ring to Rule Them All
Draw a full circle counterclockwise.
// Draw a full circle counterclockwise.
penColor("gold");
penWidth(15);
arcLeft(360, 50);
Example: Spiral
Spiral into the center of a circle.
// Spiral into the center of a circle.
for (var radius=50; radius>0; radius=radius-5) {
arcLeft(180, radius);
}

Draw a Quarter Circle
// Draw a quarter circle counterclockwise.
arcLeft(90, 25);
Example: Negative Angle
arcLeft always moves the turtle counterclockwise. For a negative angle the turtle moves (360+angle) degrees.
// arcLeft always moves the turtle counterclockwise.
// For a negative angle the turtle moves (360+angle) degrees.
arcLeft(-45, 100);
Syntax
arcLeft(angle, radius);
Parameters
Name | Type | Required? | Description |
---|---|---|---|
angle | number | The angle degree arc to move the turtle counterclockwise in a circle. | |
radius | number | The radius of the circle that is placed left of the turtle. radius must be >= 0. |
Returns
Tips
- Use penUp() before calling arcLeft() to have the turtle not draw as it moves.
- You can specify a radius of 0, which makes arcLeft() act the same as turnLeft().
- Use alternating with arcRight() to make wavy lines.
Found a bug in the documentation? Let us know at support@code.org.