home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / mac / programm / 19766 < prev    next >
Encoding:
Text File  |  1992-12-14  |  1.6 KB  |  42 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!wupost!gumby!kzoo!k044477
  3. From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
  4. Subject: Re: 3D Graphics
  5. Message-ID: <1992Dec14.055810.18557@hobbes.kzoo.edu>
  6. Organization: Kalamazoo College
  7. References: <723298789.AA00239@insane.apana.org.au> <830021@hplvec.LVLD.HP.COM>
  8. Date: Mon, 14 Dec 1992 05:58:10 GMT
  9. Lines: 31
  10.  
  11. bayes@hplvec.LVLD.HP.COM (Scott Bayes) writes:
  12. >[someone else wrote:]
  13. >> [QuickDraw is good...]
  14. >> except for deciding where to break a 1-pixel off diagonal
  15. >> line :-)
  16. >
  17. >This has always annoyed me.  Bresenham's algorithm, which handles this
  18. >very well--optimally, one might say--has been around _forever_.  Why
  19. >does Apple choose to draw lines with "hooks" on the ends?
  20. >
  21. >*                **
  22. > ***        -->          ***
  23. >    ***                 ***
  24. >       ***                    **
  25.  
  26. Your illustration makes it appear that _LineTo doesn't divide up the
  27. remainder pixels properly;  that is, if n pixels are left over after
  28. drawing the "main" portion of the line, QD puts one on one end and n-1
  29. on the other end.  Most people would put n/2 on one end and (n+1)/2 on
  30. the other (integer arithmetic, you see).
  31.  
  32. This doesn't have much to do with Bresenham, does it?  He just gives an
  33. algorithm for drawing, and whether or not you divvy up the remainder
  34. pixels properly is up to you, right?
  35.  
  36. Do I read your illustration correctly?  Can anyone confirm that QuickDraw
  37. does this?  (Inquiring minds want to know...)
  38. -- 
  39.  Jamie McCarthy      Internet: k044477@kzoo.edu      AppleLink: j.mccarthy
  40.  "This sounds like a semantico-psychological backwardization of the
  41.   real world image."   - Dave Bloom (bloomda@ctrvax.vanderbilt.edu)
  42.