 |
PK_ELLIPSE_sf_t |
|
struct PK_ELLIPSE_sf_s
{
PK_AXIS2_sf_t basis_set; --- centre, plane normal, major axis
double R1; --- the larger radius of the ellipse(>0)
double R2; --- the smaller radius of the ellipse(>0)
};
typedef struct PK_ELLIPSE_sf_s PK_ELLIPSE_sf_t;
Specific Errors:
PK_ERROR_radius_le_0 radius less than or equal to zero
PK_ERROR_R1_R2_mismatch R1 less than or equal to R2
Used in:
PK_ELLIPSE_ask
PK_ELLIPSE_create
The parameterisation of the ellipse is as follows:
C = basis_set.location
x = basis_set.ref_direction ( major axis )
y = basis_set.axis X basis_set.ref_direction ( cross product )
z = basis_set.axis
R = R1
r = R2
P( t ) = C + (R cos t)x + (r sin t)y
where ( 0 <= t < 2PI )
R1 MUST be larger than R2. Both R1 and R2 must be larger than zero.