procedure sbball
This subroutine plots a shiny or matt coloured ball. All (x,y,z) values are taken to be given in world coordinates. The z-component of the eye-poisition should be positive and that of the ball-centre should be negative (< -radius); the viewing-screen is fixed at z=0.
Syntax
sbball EYE,CENTRE,RADIUS,IC1,IC2,LIGHT,LSHINE,X0,Y0,R0
Arguments
| ARGUMENT | TYPE I/O DIMENSION DESCRIPTION |
| EYE: | R*4 I 3 (x,y,z) coordinate of eye-position. |
| CENTRE: | R*4 I 3 (x,y,z) coordinate of ball-centre. |
| RADIUS: | R*4 I - Radius of ball. |
| IC1,IC2: | I*4 I - Lowest & highest colour-index to be |
| used for shading. | |
| LIGHT: | R*4 I 3 (x,y,z) direction of flood-light. |
| LSHINE: | L*1 I - Shiny ball if .TRUE., else diffuse. |
| X0,Y0: | R*4 O - Centre of projected ball. |
| R0: | R*4 O - Average radius of projected ball. |