luser-dr00g / xpost

A PostScript interpreter in C
Other
93 stars 12 forks source link

Increase performance of `flattenpath` algorithm #30

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.
2.
3. all curve drawing

What is the expected output? What do you see instead?

Xpost currently converts curves into line segments using a recursive 
DeCasteljau subdivision. But there's an algorithm called "adaptive subdivision" 
which may be quite a bit faster (and with better quality) by reducing the 
number of line segments on the uninteresting spans of the curve.

Illustration:
http://codegolf.stackexchange.com/a/22155/2381

Article:
http://www.antigrain.com/research/adaptive_bezier/index.html#PAGE_ADAPTIVE_BEZIE
R

Please use labels and text to provide additional information.

Original issue reported on code.google.com by luser.droog on 8 Sep 2014 at 7:26