UF_CURVE_conic_s (view source)
 
Defined in: uf_curve.h
 
Also known as:
 
Overview
Refer to the description

The matrix defines the orientation of the plane in which the conic lies,
in the same manner as the matrix for an arc. The X axis of the matrix
determines the orientation of angle zero.

A point on the conic (in the XY plane) is given by

For ellipse:

X = k1 cos (t)
Y = k2 sin (t)

For parabola:

X = t2 / k1
Y = t

For hyperbola:

X = k1 / cos (t)
Y = k2 sin (t) / cos (t)

where t is the parameter value.

NOTE that for an ellipse, the parameter values are NOT angles.
For a given parameter value, t, the angle (in radians) is the inverse
tangent (arctan) of Y/X. For angles between 0 and pi/2 the following
equation can be used to determine ellipse parameter values:

t = arctan( (k1 / k2) tan(angle) )

The parameter value returned must be adjusted when the angles are in
the pi/2 to 2pi range.

For example to find the correct conic_data.start_param to correspond to
a given ellipse start_angle in degrees:

conic_data.start_param = atan( (conic_data.k1 / conic_data.k2)
tan( DEGRA start_angle) );
modf((start_angle + 90)/180, &n_adj);
conic_data.start_param = (n_adj PI) + conic_data.start_param;


Data Members

matrix_tag
tag_t
tag of defining matrix for conic

conic_type
int
subtype: see uf_object_types.h

rotation_angle
double
angle of rotation of conic X from matrix X

start_param
double
start parameter value

end_param
double
end parameter value

center [ 3 ]
double
center of conic

k1
double
first shape parameter

k2
double
second shape parameter