Motorola DSP96002 User Manual page 601

32-bit digital signal processor
Table of Contents

Advertisement

lsr
dec
neg
move
move
move
; Draw first point
jsr
; Draw additional points
do
inc
add
cmp
dec
_draw1
jsr
_line_x_yn
rts
; Draw a single point
_draw_point
move
rts
B.1.44 Wire-Frame Graphics Rendering
WIRE-FRAME RENDITION OF A THREE DIMENSIONAL POLYLINE
OVERVIEW
This program displays a three dimensional polyline in two dimensions. The points of the polyline, as defined
in the input list, are projected into two dimensions using the perspective transformation. The projected
points are output to a display list that can be drawn by a graphics engine or a fast drawing program.
In order to maximize speed, two loops perform the graphics transformations: the trivial accept loop and the
trivial reject loop.
The trivial accept loop assumes that the last displayed point was inside the viewing pyramid and thus not
clipped. It pulls a new point from the input list, converts it to clipping space and checks if it is inside the
viewing pyramid. If so, the routine performs the perspective transformation, scales and translates the point
so it lies within the viewing window, and finally adds it to the display list.
B-82
d0
d0.l,d2.l
d2
d2.l,d4.l
d1
d0.l,r0
d2.l,m0
d1.l,n0
d1.l,d5.l
_draw_point
d4.l,_line_x_yn
d6
r0,d2.l
d5,d2
(r0)+n0
d4,d2
d7
ifge
_draw_point
d6.l,x:(r1)+
ON THE MOTOROLA DSP96002
Version 1.00
DSP96002 USER'S MANUAL
d7.l,y:
MOTOROLA

Advertisement

Table of Contents
loading

Table of Contents