PEXtEllipse2(3PEXt)

NAME
PEXtEllipse2, PEXtEllipsoid2 — create hollow or filled ellipses

SYNOPSIS
#include <PEXt/PEXt.h>
#include <PEXt/Primitive.h>

void PEXtEllipse2 (x, y, z, radius, eccentricity, num_segments)
    Pfloat    x, y, z;
    Pfloat    radius;
    Pfloat    eccentricity;
    Pint    num_segments;

void PEXtEllipsoid2(x, y, z, radius, eccentricity, num_segments)
    Pfloat    x, y, z;
    Pfloat    radius;
    Pfloat    eccentricity;
    Pint    num_segments;

  Required PHIGS Operating States
(PHOP, *, STOP, *)

DESCRIPTION
These convenience procedures create approximations to an ellipse in the XY plane with its center at (x, y, z) of the given eccentricity and radius. PEXtEllipse2 creates the outline of an ellipse using a single PPOLYLINE structure element. PEXtEllipsoid2 creates a solid ellipse using a single FILL AREA structure element. The radius parameter specifies the length of the major axis of the ellipse. The major axis of the ellipse is coincident with the Y axis if the eccentricity parameter is greater than 1.0. Otherwise, the major axis of the ellipse is coincident with the X axis. The approximation uses num_segments polyline segments to approximate the ellipse. If the current edit mode is set to PINSERT, then the structure element is inserted into the currently open structure at the current element pointer position; otherwise the structure element replaces the element in the currently open structure at the current element pointer position.

RETURN VALUE
None

BUGS
A plane normal should be introduced to specify the plane of the ellipse.

The error tolerance should be specified using a curvature metric instead of a subdivision metric.

There should be a way to specify an ellipse whose axes are not coincident with the X and Y axes.

The routine should detect the condition when the subdivision count causes the structure element to become too large for the protocol transmission packet size.

AUTHOR
Rich Thomson <rthomson@dsd.es.com>
Design Systems Division
Evans & Sutherland Computer Corporation