MOTOROLA
DSP96002 USER’S MANUAL
B-87
Substituting the value of t results in the determinant
y2 = | y2 w2-y2 |
| y1 w1-y1 |
-------------------
(w1-x1) - (w2-x2)
The equations for z2 and w2 are analogous. Since w2 has the same denominator as x2, y2 and z2, and
these will be divided by w2 in the perspective transformation, the division shown above does not need to
be performed.
Lines 151-162 determine which planes that the point is outside and call the appropriate clipping routines.
These routines (lines 520-617) calculate the determinants and return with the resulting coordinates in the
data registers.
The resulting point is transformed using the perspective transformation, scaled and translated in lines 168-
186. A code (-1.0) is stored in the display list to indicate that the next line to be drawn is not joined with
the current one. Control is then transferred to the trivial reject loop.
TRIVIAL REJECT LOOP
The trivial reject loop starts with the {1x4}{4x4} matrix multiplication to transform the input point to clipping
space. Next, the line joining the current point and the previously rejected point is tested for trivial rejection.
As mentioned earlier, trivial rejection occurs whenever both of the endpoints lie outside of one clipping
plane.
A sticky bit called Local Reject (LR) is defined as bit 5 of the CCR. It is cleared by the FCMP s,d instruction
whenever s <= d. In other words, the LR bit is cleared whenever the FCMP instruction finds the coordinate
inside of the boundary.
An additional instruction, FCMPG, is needed because trivial rejection occurs when both points are outside
of any boundary plane. Thus, an additional sticky bit called Reject (R) (bit 6 of the CCR) is used to "re-
member" that a trivial reject has occurred after comparisons against one boundary plane. The FCMPG
instruction affects R and is performed as the last comparison to a boundary plane. When FCMPG s,d is
executed, the R flag is cleared if the previous point was outside of the boundary (LR is set) and the current
point is outside of the boundary (s > d). The FCMPG instruction also resets the LR bit to 1 for comparison
to the next boundary plane.
To perform the trivial reject test, the LR and R bits are set to 1. The two points are tested against the X = -
W boundary plane and then tested against the X = W plane etc. The first point is tested using FCMP and
the second point is tested using FCMPG to clear the R bit if both comparisons were outside of the boundary.
At the end of these comparisons, if the R bit is 0, the line was trivially rejected. With this definition, the
trivial rejection test can be generalized to a polygon with any number of points. The execution time is of
order 6N cycles where N is the number of points.
The lines 225-236 perform the trivial reject test. Should the line be trivially rejected, the new coordinates
are stored for the next comparison and the reject loop repeats.
If the line is not trivially rejected, a check is made to determine if the current point is accepted. If so, control
is transferred to the reject loop single point clip routine. Otherwise the double point routine is entered.
REJECT LOOP SINGLE POINT CLIPPING CODE
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: ......