home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / graphics / 13241 < prev    next >
Encoding:
Text File  |  1992-12-29  |  1.3 KB  |  40 lines

  1. Newsgroups: comp.graphics
  2. Path: sparky!uunet!munnari.oz.au!hp9000.csc.cuhk.hk!cucs5.cs.cuhk.hk!hclam
  3. From: hclam@cuse1.se.cuhk.hk (LAM Ho Cheong)
  4. Subject: Re: How many dots in a circle?
  5. Message-ID: <1992Dec28.073738.15072@cucs5.cs.cuhk.hk>
  6. Sender: news@cucs5.cs.cuhk.hk
  7. Organization: Faculty of Engineering, The Chinese U. of Hong Kong
  8. References: <1992Dec22.134450.15558@cactus.org> <1992Dec23.031735.13264@proto.com>
  9. Date: Mon, 28 Dec 1992 07:37:38 GMT
  10. Lines: 28
  11.  
  12. For each quadrant, the drawing algorithm should increment either in x
  13. or y direction one unit each time.  As such, to move from the top-left
  14. corner to the bottom-right corner requires a total of r-1 + r-1 + 1 moves,
  15. where r is the radius.  r-1 moves occur for the x direction and r-1
  16. moves occur for the y direction.  So, adding the last dot gives a total
  17. of 2r-1.  In fact, any arbritary line from the top-left to the bottom-right,
  18. not just for circle, requires the same number of points.
  19.  
  20. For example, r = 5
  21.  
  22. ***..        **...
  23. ..*..        .**..
  24. ..**.        ..***
  25. ...*.        ....*
  26. ...**   or   ....*   or any other line
  27.  
  28. a total of 9 *'s
  29.  
  30. Therefore, for the whole circle, the total number of dots amounts to 8r-4 
  31. with the same argument (4r-2 moves for each of x, y directions).
  32.  
  33. Am I right?
  34.  
  35.  
  36. HC
  37. Computer Science Department
  38. The Chinese University of Hong Kong
  39.  
  40.