Re:The Beauty of Bresenham's Algorithm
by textminer on Tuesday August 07, 2012 @11:06PM
(#4353671)
How does a computer distinguish an irrational number from a good, (necessarily rational) floating-point approximation of one?
[ Parent
| on HN ]
The algorithm only works with points with integer coordinates, so the slope is always rational.
Re:The Beauty of Bresenham's Algorithm
by FredBrach on Wednesday August 08, 2012 @12:43AM
(#4353950)
I think you have the last words because line drawing algorithms become irrelevant if you use a Floating Point Unit.
just:
{ x++ and y+=slope } or { y++ and x+= 1./slope }
Then slopes are always rational in line drawing algorithms.