Re: [Algorithms] Polygon scan conversion accuracy...
Brought to you by:
vexxed72
From: Pierre T. <p.t...@wa...> - 2001-08-08 18:55:16
|
> It's just a matter of adding 0.5 and 0.5*delta to various starting positions > (as appropriate). It makes life easier if you actually draw some lines on > big-square graph paper - you can see where to add the various offsets. Errr ? It depends on your subpixel conventions. You can get rid of all 0.5 fixes by choosing appropriate rasterization rules - and it's actually recommended since it makes the code way easier/cleaner. No time to spot the bug in Warrick's code anyway, but the paper hint is a good one. Drawing things once and for all really helps. French-compliant algoers can have a look at that old one : http://www.codercorner.com/Subpixel.txt I think Chris Hecker also wrote some papers about scan-conversion in GDMag some years ago. The good old Fatmap2.txt was also the reference document for demomakers by that time, and maybe it can help as well. In any case it definitely sounds like subpixel-related inaccuracies so check your conventions and current FPU rounding mode. Sorry, no time for better help :( P. |