I am interested in finding an antialiasing algorithm which can be used on a line of any shape (not just straight lines).
I notice that Mathematica seems to have a very good algorithm and can draw fine lines 1 or 2 pixels wide. My current best effort algorithm generally requires more like 3 pixels so my lines are somewhat thicker than Mathematica's.
Does anybody know what algorithm Mathematica uses for antialiasing, or can recommend a high-quality algorithm that can be used to generate sub-2-pixel antialiased lines and curves?
One of the most used algorithm for drawing unaliased lines is Wu's line algorithm.
On this basis, you can draw polygons easily; this site explains how to derive this algorithm to draw ellipses.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With