B-86
DSP96002 USER’S MANUAL
MOTOROLA
n0 = 0.0 for z limit test and double point clipping
n5 = -1.0 for end of polyline marker
TRIVIAL ACCEPT LOOP
The transformation from object space to screen space is performed in lines 19-33. This is a {1x4}{4x4}
matrix multiplication but because the W coordinate of the {1x4} input vector {X Y Z W} is always equal to
one, four multiplications can be eliminated.
Lines 39-47 determine if the point is within the viewing pyramid. The FCMP s,d instruction is designed to
clear the sticky accept (A) bit (bit 7 in the CCR) whenever s > d. By switching the order of the operands,
the FCMP instruction can be used to test both the maximum and minimum boundaries of a window. To
test acceptance, the A bit is set in line 40 and the X and Y coordinates are compared to the boundaries -
W and W. The Z coordinate is compared to the boundaries 0 and W. If the A bit remains set, the point is
within the viewing pyramid and is transformed to screen coordinates.
If the A bit is clear, the reject loop is entered. Note that the A bit is only affected by the CMP, CMPG, FCMP
and FCMPG instructions.
The reciprocal 1/W is calculated in lines 53-58. The result is accurate to approximately 32 bits. It is multi-
plied by the X coordinate and then by the X scale to scale the data to the output screen. The coordinate
is then translated to screen space. The procedure is repeated for the Y coordinate and the coordinates
are added to the display list.
For additional points the accept loop code is almost identical to the first point code except that if the new
point is not within the viewing pyramid, a jump to a single point clipping routine is performed.
ACCEPT LOOP SINGLE POINT CLIPPING CODE
The method used for clipping a line when one point is inside the viewing pyramid and one point is outside
is a special case of a general clipping algorithm presented in [1] and is used in the double point clipping
code.
Suppose that the line between points P1 and P2 was rejected because the x coordinate of P2, x2, was
larger than w2. Then,
y2 = y1 + t (y2 - y1)
where
t = w1 - x1
---------------------
(w1 - x1) - (w2 - x2)
Summary of Contents for DSP96002
Page 3: ...1 2 DSP96002 USER S MANUAL MOTOROLA ...
Page 38: ...MOTOROLA DSP96002 USER S MANUAL 3 15 Figure 3 4 Modulo Arithmetic Unit Block Diagram ...
Page 39: ...3 16 DSP96002 USER S MANUAL MOTOROLA ...
Page 53: ...4 14 DSP96002 USER S MANUAL MOTOROLA ...
Page 76: ...MOTOROLA DSP96002 USER S MANUAL 5 23 Figure 5 8 Address Modifier Summary ...
Page 86: ...6 10 DSP96002 USER S MANUAL MOTOROLA ...
Page 101: ...MOTOROLA DSP96002 USER S MANUAL 7 15 Figure 7 9 HI Block Diagram One Port ...
Page 140: ...7 54 DSP96002 USER S MANUAL MOTOROLA ...
Page 166: ...9 10 DSP96002 USER S MANUAL MOTOROLA ...
Page 181: ...MOTOROLA DSP96002 USER S MANUAL 10 15 Figure 10 8 Program Address Bus FIFO ...
Page 337: ...MOTOROLA DSP96002 USER S MANUAL A 149 ...
Page 404: ...A 216 DSP96002 USER S MANUAL MOTOROLA PC xxxx D ...
Page 460: ...A 272 DSP96002 USER S MANUAL MOTOROLA SIOP Not affected ...
Page 484: ...A 296 DSP96002 USER S MANUAL MOTOROLA SSH PC SSL SR SP 1 SP ...
Page 519: ...MOTOROLA DSP96002 USER S MANUAL A 331 ...
Page 718: ...MOTOROLA DSP96002 USER S MANUAL B 199 ...
Page 871: ... MOTOROLA INC 1994 MOTOROLA TECHNICAL DATA SEMICONDUCTOR M Addendum ...
Page 888: ...MOTOROLA INDEX 1 INDEX ...
Page 889: ......