Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!uakari!ames!uhccux!munnari.oz.au!murtoa.cs.mu.oz.au!ditmela!agi.oz!shn From: shn@allgfx.agi.oz (Si-Hanh NGUYEN) Newsgroups: comp.graphics Subject: How does pr_vector() work ? Message-ID: <1990Feb25.222157.26389@allgfx.agi.oz> Date: 25 Feb 90 22:21:57 GMT Organization: All Graphic R+D Lines: 20 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@allgfx.agi.oz