TOC PREV NEXT INDEX

AGEllipse /AGEllipseObj

Synopsis

define an ellipse

AGGeometryPrimitive AGEllipse

{
     geometry+IPort2 = {2,0,0,2};
     AGColorfillColor = "transparent";
     AGColorframeColor = "antibackground";
     AGDistanceframeWidth = 0.25;
};

Description

AGEllipse and AGEllipseObj define an ellipse given two points. AGEllipseObj includes an AGDataObject for your convenience.

The center for the ellipse is defined as center = (geometry[2], geometry[1]).

The base vector is defined as baseVec = (0, geometry[2]-geometry[0]).

The up vector is defined as upVec = (geometry[3]-geometry[1], 0).

Subobjects

visibility

priority

Inherited from AGPrimitive through AGGeometryPrimitive .

geometry

Inherited from AGGeometryPrimitive .The geometry subobject is a four- or six- element floating-point array. Each pair of elements in the array define coordinate points. The first and third elements and the second and fourth elements specify points that define two vectors emanating from the center of the ellipse to the edge of the ellipse. When present, the fifth and six elements define the center of the ellipse and are redundant if the two vectors are aligned with the axes.

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

The ellipse is defined by a base vector and an up vector. 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 following figure shows two geometries and the ellipses they define:


In the figure arrows have been drawn to show the base and up vectors, and a parallelogram has been added to the first example to show how the ellipse is defined. The two vectors are not necessarily perpendicular, but must not be parallel or have zero length. By keeping the two vectors mutually perpendicular, you can define the size of a circle in terms of the radius, or for an ellipse, in terms of the major and minor radii.

fillColor

frameColor

frameWidth

Fill color, frame color, and frame width of the ellipse. If frameWidth is set to 0.0, no frame is drawn.

Example

Not Available

File

v/AG.v

See Also Related Modules

AGDataObject
AGGeometryPrimitive / AGRenderPrimitive
AGPrimitive

TOC PREV NEXT INDEX