NEC µPD72257 Preliminary User's Manual page 228

Graphics controllers
Table of Contents

Advertisement

Chapter 8
228
If n
is normalized that means if the length of n
p
p
and n
is the projection of
0
P to the line. In this case f(x,y) is describing the distance of the pixel with the
coordinates (x,y) to the line.
To calculate the distance of every pixel of the bounding box incrementally first the
distance to the line at origin has to be calculated:
Then the increments for a step in x direction and a step in y direction have to be
calculated:
f
p
e
(
+
)
x
f
(
p
+
e
)
x
f
p
e
(
+
)
y
This means the new distance can be calculated from the old distance with the
increments a and b . A step in x direction changes the distance by a and a step
in y direction changes the distance by b . The distance of the origin to the line is c .
With this information the whole bounding box can be scanned. In case the
bounding box top left corner is not at the origin an offset has to be added.
Preliminary User's Manual S19203EE1V3UM00
p
p
to n
and this is the distance d of the point
0
f
(
, 0
) 0
=
p
n
=
c
0
(
)
p
e
p
n
f
p
e
=
+
=
(
)
+
x
0
1
with
e
 
 
=
x
0
(
)
=
p
+
e
p
n
=
f
(
p
)
+
e
x
0
(
)
p
e
p
n
f
p
=
+
=
(
)
+
y
0
0
with
e
=
 
 
y
1
Drawing Engine
is 1 then the dot product of
n
f
p
a
=
(
)
+
x
n
=
f
(
p
)
+
a
x
e
n
f
p
b
=
(
)
+
y

Advertisement

Table of Contents
loading

This manual is also suitable for:

Μpd72256

Table of Contents