How does pr_vector() work ?
Si-Hanh NGUYEN
shn at allgfx.oz.au
Mon Feb 26 09:11:38 AEST 1990
Does anybody know the detailed algorithm used in pr_vector() of Sun
Pixrect ? The manual says that "pr_vector draws balanced vectors. (The
technique used is to balance the Breshenham error term)".
I have to fill some shapes which have straight edge(s) by pr_traprop(),
and I would like these edges align perfectly with lines drawn by
pr_vector() (or bold lines by pr_polygon_2()). I need to know how
pr_vector() works in order to derive the bit vector of chain of those
straight edges.
I have tried the Bresenham algorithm from Foley an Van Dam. It works
except when the line segment is in the 4th and 8th octant (Y-axis is from
top to bottom and slope of the line segment is in ]0,-1[).
Any help would be greatly appreciated.
Si-Hanh Nguyen
shn at allgfx.agi.oz
More information about the Comp.sys.sun
mailing list