Previous: clp2d Up: ../plot79_c.html Next: clpl2
SUBROUTINE CLP3D (U1,V1,W1,MOVED1, U2,V2,W2,MOVED2, VISSEG) C$ (3-D Unit Cube Line Segment Clip) C$ The points P1=(U1,V1,W1) and P2=(U2,V2,W2) are adjusted to C$ encompass only that part of the line joining them which C$ lies within the unit cube. The input arguments are: C$ C$ (U1,V1,W1) Coordinates of P1 C$ (U2,V2,W2) Coordinates of P2 C$ C$ The output arguments are: C$ C$ (U1,V1,W1) Possibly-adjusted coordinates of P1 C$ (U2,V2,W2) Possibly-adjusted coordinates of P2 C$ MOVED1 .TRUE. - P1 was moved C$ .FALSE. - P2 unchanged C$ MOVED2 .TRUE. - P2 was moved C$ .FALSE. - P2 unchanged C$ VISSEG .TRUE. - Some portion of the line is visible C$ .FALSE. - Line segment invisible C$ C$ This routine is adapted from the general polyhedral clip C$ routine, CLPPH (written by John Halleck of the University C$ of Utah Computing Center), for the special case of 3-D C$ curvilinear coordinates in the unit cube, for which the C$ inward-pointing edge normals are (1,0,0,0), (0,1,0,0), C$ (-1,0,0,1), (0,-1,0,1), (0,0,1,0), and (0,0,-1,1). C$ (07-JAN-82)