This example demonstrates the creation of lines representing normal vectors to a surface.
ENTITY/SURF1,VECTOR
NUMBER/A(3),B(3),C(3)
.
.
.
A=SPOSF(SURF1,u,v)
B=SNORF(SURF1,u,v)
C=A+B
VECTOR=LINE/A,C
Since the values returned by SNORF are the components of a vector, to create a line normal to the surface, these values must be converted from vector components to line end points. This is accomplished by obtaining the coordinates of a point on the surface, using SPOSF, at the same U and V position and adding the values to the vector components. In the example above, A contains the coordinates of a point on the surface, B contains the components of a vector normal to the surface, and C contains the end point coordinates of a line.
Arrowheads have been added to the lines representing vectors to indicate the direction of the vector.
Lines Representing Vectors Normal to a Surface