Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mathematica antialiasing algorithm

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?

like image 697
Tyler Durden Avatar asked Oct 21 '22 05:10

Tyler Durden


1 Answers

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.

like image 60
Bentoy13 Avatar answered Nov 02 '22 11:11

Bentoy13