home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / alt / sys / amiga / demos / 1016 < prev    next >
Encoding:
Internet Message Format  |  1992-07-25  |  1.9 KB

  1. Xref: sparky alt.sys.amiga.demos:1016 comp.sys.amiga.programmer:11634
  2. Path: sparky!uunet!olivea!mintaka.lcs.mit.edu!hal.gnu.ai.mit.edu!psteffn
  3. From: psteffn@hal.gnu.ai.mit.edu (Paul Steffen)
  4. Newsgroups: alt.sys.amiga.demos,comp.sys.amiga.programmer
  5. Subject: Re: HELP with filled vector vertex "fixes?"
  6. Message-ID: <1992Jul25.121320.15886@mintaka.lcs.mit.edu>
  7. Date: 25 Jul 92 12:13:20 GMT
  8. References: <1992Jul24.133525.1@happy.colorado.edu>
  9. Sender: news@mintaka.lcs.mit.edu
  10. Organization: /etc/organization
  11. Lines: 30
  12.  
  13. In article <1992Jul24.133525.1@happy.colorado.edu> kskelm@happy.colorado.edu writes:
  14. >
  15. >    I was looking at some filled-vector code and I was wondering: Why do
  16. >certain vertices need to be "fixed" (with BCHG's, etc), while others do not?
  17. >
  18. >    Toying with some of my own routines, I get lots of streaks and glitches
  19. >when I don't "fix" the vertices.  What, exactly, are the conditions under which
  20. >this needs to be done?
  21. >
  22. >    Thanks!
  23. >
  24. >Kevin
  25.  
  26. Well, the way the blitters fill mode is quite simple.  Imagine the blitter
  27. as being fed a string of bits.  Depending on current state of the blitter,
  28. it will output a string of 0's or 1's.  Anytime, there is a set bit on the
  29. blitter's input, the state is reversed.  Therefore;
  30. source = 0010010001000001001001   becomes,
  31. destin = 0011110001111111001111
  32.  
  33. Generally, what involves polygon filled vectors is plotting the lines first
  34. in a line mode where the blitter leaves one pixel per scan line. 
  35. As the blitter really only fills between the points, this is usually quite
  36. suffice.  The purpose of checking corners is merely to make sure that 
  37. the blitter doesn't miss a pixel as it's filling which causes the 'bleed'
  38. off to the left.  Obviously, if there is only 1 bit set on the line,
  39. the blitters logic will remain SET to the end of line so you need to make
  40. sure that the filling remains within the boundries of the polygon.
  41.  
  42. STratoHAK/TPPi
  43.