ELLIPSEARC

Synopsis
ELLIPSEARC angle crosswise.semiaxis inline.semiaxis startangle
Description

Draws part of (or all of) an ellipse based on the turtle heading, turtle position and given inputs. ELLIPSEARC does not move the turtle. The center-point of the elliptic arc is the turtle's current position. The elliptic arc starts at a location given by startangle and sweeps an angle equal to angle degrees in the clockwise direction.

The size and shape of the elliptic arc are determined by the crosswise.semiaxis and inline.semiaxis inputs. The crosswise.semiaxis input is the distance from the turtle to the ellipse in the direction perpendicular to the turtle's current heading. The inline.semiaxis input is the distance from the turtle to the ellipse in the direction in which the turtle is currently heading. This implies that the turtle's heading determines the orientation of the ellipse.

The startangle input is relative to the turtle's current heading. A startangle of 0 indicates that the elliptic arc starts behind the turtle. The startangle is measured in a clockwise direction, so a value of 90 indicates that the elliptic arc should start to the turtle's left (90 degrees clockwise from behind the turtle).

Normally the elliptic arc is draw clockwise, but if the angle input is negative, then the elliptic arc is draw counter-clockwise.

Example

A 2D example:

ELLIPSEARC 360 100 200 0
CLEARSCREEN
ELLIPSEARC 90 50 50 0
CLEARSCREEN
ELLIPSEARC 90 50 50 90

A 3D example:

PERSPECTIVE
REPEAT 72 [ELLIPSEARC 90 100 150 45 RIGHTROLL 5]

See Also
ELLIPSEARC2

SourceForge.net Logo