[
Contact
]
[
Links
]
[
Previous : 14 / 20 : Bresenham´s line drawing algorithm
]
[
Up
]
[
Next : 16 / 20 : Another look at Bresenham (2)
]
Another look at Bresenham
from a more mathematical point of view...
...from computer code optimisation to geometry
main equations
(1) y = m x + b = DY/DX * x + b
y0 = m x0 + b
y1 = m x1 + b
(2) m = (y1 - y0)/(x1 - x0) = DY/DX
b = y0 - m x0
working hypothesis
(3) Let's consider for the demonstration that 0 <= m <= 1 and x0 < x1
<=> from one given step of the algo, we only have to chose between 2 pixels for the next step.
(and DX > 0)
which of two possible pixel positions is closer to the line path at each sample step
eScience
<
Computer Graphics
:
Line drawing
>
[
Contact
]
[
Links
]
[
Previous : 14 / 20 : Bresenham´s line drawing algorithm
]
[
Up
]
[
Next : 16 / 20 : Another look at Bresenham (2)
]
See the "Links" link above to find out the sources of the proposed informations
Pascal Vuylsteker
/
eScience
/
Computer Science
/
ANU
Last modified: 20/4/2004
TOC
-
Print
Send your comments at :
<Hugh.Fisher@anu.edu.au>