🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sun
Article #14067

How does pr_vector() work ?

#14067
From: Si-Hanh NGUYEN
Date: Sun, 25 Feb 1990 22:11
18 lines
1203 bytes
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
Technical Details
Message-ID: <5461@brazos.Rice.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!iuvax!mailrus!cs.utexas.edu!rice!sun-spots-request

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!iuvax!mailrus!cs.utexas.edu!rice!sun-spots-request
From: shn@allgfx.oz.au (Si-Hanh NGUYEN)
Newsgroups: comp.sys.sun
Subject: How does pr_vector() work ?
Keywords: Windows
Message-ID: <5461@brazos.Rice.edu>
Date: 25 Feb 90 22:11:38 GMT
Sender: root@rice.edu
Organization: Sun-Spots
Lines: 18
Approved: Sun-Spots@rice.edu
X-Sun-Spots-Digest: Volume 9, Issue 65, message 6