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 in the clockwise direction. The size and shape of the elliptic arc is 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 turtle's current heading. The inline.semiaxis input is the distance from the turtle to the ellipse in the direction which the turtle is currently heading.

The startangle input is relative to the turtle's current heading. A startangle of 0 indicates that the elliptic arc should start inline.semiaxis turtle steps directly 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. The start position will always be on the same ellipse, regardless of startangle. For example, a startangle of 90 will start crosswise.semiaxis turtle steps to the turtle's left.

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