 |
PK_SPHERE_sf_t |
|
struct PK_SPHERE_sf_s
{
PK_AXIS2_sf_t basis_set; ---centre, drn. to north pole, drn. to u = 0
double radius; ---the radius of the sphere(>0)
};
typedef struct PK_SPHERE_sf_s PK_SPHERE_sf_t;
Specific Errors:
PK_ERROR_radius_le_0 radius less than or equal to zero
Used in:
PK_SPHERE_ask
PK_SPHERE_create
The parameterisation of the sphere is as follows:
C = basis_set.location
x = basis_set.ref_direction
y = basis_set.axis X basis_set.ref_direction ( cross product )
z = basis_set.axis
R = radius
S( u, v) = C + R( cos v )( ( cos u )x + ( sin u )y ) + R( sin v )z
where ( 0 <= u < 2PI; -PI/2 <= v < PI/2 )
Radius must be larger than zero.
The surface normal points away from the centre.