PJ SHAD - Projected Surface - cosine Shading

(09/09/96)

PURPOSE

Apply shading to a surface representation. Intensity of each facet is equal to the cosine of the inclination.

SEE ALSO

PJ ST [Projected Surface - Creation]
PJ COL [Projected Surface - Coloring]

USAGE

.OPERATION: PJ SHAD

.INPUT FILE: SUR001
[Enter file containing the surface representation created with 'PJ ST'.]

.OUTPUT FILE: SUR002
[Enter file that will contain the shaded surface representation]

.INTERPOLATION FACTOR: 1
[If the surface representation was interpolated to a larger size, enter the factor by which the image was interpolated. Internally, the values contained in the input file are multiplied by this factor.]

.ILLUMIN. ANGLE, INTENSITY: 45, 0.5
[added the seceond light with 45 degree and 0.5 intensity]

.MIX FACTOR: 0.6
[A part of the surface representation's Z-buffer is added to the image containing only the cosine shading. If A1, A2, A3 are the three points of the facet used to calculate the inclination, the mixing is calculated using the formula:
F=COS-MIX*(A1+A2+A3)/(3*(FMAX-FMIN))+MIX
with F being the resulting value, COS the cosine of the inclination, MIX the Mix Factor, and FMAX and FMIN the maximum and minimum of the surface representation image (Z-buffer).]

SUBROUTINES

MRREFL

CALLER

VTIL2