# NAME

GDX_CONIC - Parametric Conic Arc

# GENERAL DESCRIPTION

A GDX Parametric Conic Arc represents a curve obtained by intersecting a circular cone with a plane. The GDX Parametric Conic Arc can be one of three types (as indicated by the CRVTYP field): gdx_parabola, gdx_ellipse, or gdx_hyperbola. Each conic type is parametrically defined using parameters stored in the COEFFS field. Note that the parameters defined by the COEFFS field differ for each conic type as described in the sections below.

The parameterization given in the sections below defines the entity in 2D standard position. The conic is transformed from standard position to 2D definition space by first applying the translation (defined by appropriate values in the COEFFS array field) and then the rotation (defined by the ANGLE field). The conic is then transformed from definition space to model space by applying the transformation matrix (defined by the MATRIX field), if any. The order of applying transformations is indicated symbolically below:

[MATRIX] [ANGLE] [translation (X,Y,Z)] [x(u), y(u), 0.0]

Note that the transformations may not be applied in the order that is considered intuitive.

# DDF SPECIFICATION

    entity 0:0 GDX_CONIC "Parametric Conic Arc" {

    char
    CRVTYP;

    double
    COEFFS[5];

    double
    T0;

    double
    T1;

    double
    ANGLE;

    double
    MATRIX[];

    };

# FIELD DESCRIPTIONS

CRVTYP

The type of the GDX Conic. To set or check this value, use one of the following 3 enumerated types (available by including gdx_Interface.h):

gdx_parabola
gdx_ellipse
gdx_hyperbola
COEFFS

An array containing the coefficients of the parametric equations, the 2D location, and the Z depth of the conic.

gdx_parabola:
COEFFS[0]

= X translation from standard position.

COEFFS[1]

= Y translation from standard position.

COEFFS[2]

= 2.0 * focal distance (2.0 * F).

COEFFS[3]

= Evaluation constant (2.0 * COEFFS[2]).

COEFFS[4]

= Z translation from standard position.

gdx_ellipse:
COEFFS[0]

= R1 = radius 1 (directed along horizontal axis)

COEFFS[1]

= R2 = radius 2 (directed along vertical axis)

COEFFS[2]

= X translation from standard position.

COEFFS[3]

= Y translation from standard position.

COEFFS[4]

= Z translation from standard position.

gdx_hyperbola:
COEFFS[0]

= A = semi axis. This is the distance from the vertex to the intersection of the asymptotes.

COEFFS[1]

= B = semi imaginary axis. This is the vertical distance from the vertex to either of the two asymptotes.

COEFFS[2]

= X translation from standard position.

COEFFS[3]

= Y translation from standard position.

COEFFS[4]

= Z translation from standard position.

T0

The GDX Conic starting parameter.

T1

The GDX Conic ending parameter.

ANGLE

The rotation angle, in radians, of the GDX Conic relative to standard position.

MATRIX

The transformation matrix that positions the GDX Conic from definition space to model space. This matrix is a GDX_MATRIX (typedef available by including gdx_Interface.h) which is a 1D array of 12 doubles that represent a 3x4 matrix. For a detailed description of the fields corresponding to a GDX_MATRIX, see the gdx_entity_intro manual page. For efficiency considerations, this field should be set to NULL if the conic being represented is 2D.

# PARAMETERIZATION (STANDARD POSITION)

gdx_parabola: x(u) = F*u*u y(u) = 2.0*F*u

gdx_ellipse: x(u) = R1 * cos(u) y(u) = R2 * sin(u)

gdx_hyperbola: x(u) = A / cos(u) y(u) = B * tan(u)

# PARAMETRIC RANGE

gdx_parabola: -infinity < u < +infinity

gdx_ellipse: 0.0 <= u <= MTH_2_PI

gdx_hyperbola: -MTH_HALF_PI < u < +MTH_HALF_PI

# IMPLICIT EQUATION (STANDARD POSITION)

gdx_parabola: C(x,y,z) = 4*F*x - y*y = 0

gdx_ellipse: C(x,y,z) = (x*x)/(R1*R1) + (y*y)/(R2*R2) - 1.0 = 0

gdx_hyperbola: C(x,y,z) = (x*x)/(A*A) - (y*y)/(B*B) - 1.0 = 0

# RESTRICTIONS

gdx_parabola: T0 != T1

gdx_ellipse: R1 > 0.0 R2 > 0.0 0.0 <= T0 < MTH_2_PI T0 < T1 <= T0 + MTH_2_PI

gdx_hyperbola: A > 0.0 B > 0.0 T0 != T1