TOC PREV NEXT INDEX

AGArc/AGArcObj

Synopsis

Define an elliptical arc

AGGeometryPrimitive AGArc
{
     geometry+IPort2 = {2,0,0,2};
     AGColor fillColor ="transparent";
     AGColor frameColor = "antibackground";
     AGDistance frameWidth = 0.25;
     AGFloat arcAngleInterval[2] = {-45.0,45.0};
     AGArcTypeEnum arcType = "line";
};

Input Port

AGGeometryPrimitive => geometry

Output Port

obj => Obj (for AGArcObj)

Description

AGArc and AGArcObj define an elliptical arc given by 2 or 3 points and an angle interval. The arc is drawn on the edge of the ellipse defined by the geometry between the start angle and end angle specified in the arcAngleInterval.

If only two points are given in the geometry then the center of the ellipse is defined as center = {geometry[1][0], geometry[0][1]}. The default geometry will thus define an ellipse with center in {0,0}. If three points are given then the third point is the center of the ellipse.

The base vector is a vector from the center of the ellipse to the first point in the geometry. The direction of the base vector defines the line corresponding to the base of a parallelogram encompassing the arc's ellipse. The up vector is a vector from the center of the ellipse to the second point in the geometry. The direction of the up vector defines the line corresponding to the side of the parallelogram.

The base vector also defines the zero degree angle. You define the start and end angles as degrees of rotation counterclockwise from the zero degree. Negative angles measure a clockwise rotation.

If the up vector is between 0 and 180 degrees relative to the base vector, the arc is drawn counterclockwise along the edge of the ellipse from the start angle to the end angle. If the position of the up vector is beyond 180 degrees, that arc is drawn clockwise.

Subobjects

visibility

priority

Inherited from AGPrimitive through AGGeometryPrimitive .

geometry

Inherited from AGGeometryPrimitive .

fillColor

frameColor

frameWidth

The fill color, frame color and frame width of the arc. If frameWidth is set to 0.0, no frame is drawn. If arcType is set to "line" then nothing is filled and fillColor is not used.

arcAngleInterval

An array of two elements giving the start and end angle of the arc.

Zero degree is given by the base vector in the ellipse (see description above).

Integers. The x and y location within the view window.

arcType

There are three arc types: "line", "pie" and "chord". "line" draws a line on the edge of the ellipse in the angle interval given by arcAngleInterval; the arc is not closed. "pie" draws the arc as in the line type and also draws the radiis from the center of the ellipse to the points defined by the start and end angles. "chord" draws the arc and closes it by drawing a line between the start and end angles. The "pie" and "chord" types fill the arc with fillColor.

Example

Not Available

File

v/AG.v

See Also Related Modules

AGGeometryPrimitive / AGRenderPrimitive
AGPrimitive

TOC PREV NEXT INDEX