Graphics Reference
In-Depth Information
Start
X X
1
Y Y
1
2
2
X
X - X
1
Δ
Y Y - Y
Δ
1
e
2 Y - X
Δ
Δ
i 1
Yes
i >
X
Δ
End
No
P l o t (X , Y)
X
X + 1
Yes
e < 0
e
e + 2 Y
Δ
i
i + 1
No
X Y + 1
e
e + 2 X
Δ
,
Fig. 1.3.
Flow chart for Bresenham's algorithm in the first octant.
local maxima and minima (or a global maximum or minimum) anywhere
within the interval as shown in Figures 1.4(a) and 1.4(b).
If we get pixels either directly connected or outward-corner connected to
the end pixels of the interval [
k
1
,k
2
] such that both the values
f
(
x
)atthese
pixels are larger or smaller than its value in the interval, then we assume
a maximum or minimum to exist at the midpoint of the interval, i.e., at
x
=(
k
1
+
k
2
)
/
2if(
k
1
+
k
2
), is even and at
x
=(
k
1
+
k
2
+1)
/
2if(
k
1
+
k
2
),
is odd. Consider this point or pixel in the discrete plane to be a key pixel.
Another example for the existence of a key pixel is depicted in Figure 1.5 for
which
f
(
x
) is not constant over an interval.
Search WWH ::
Custom Search