diagrams / diagrams-contrib

User-contributed extensions to diagrams
BSD 3-Clause "New" or "Revised" License
27 stars 30 forks source link

High-level library for constructing (Bezier-based) paths #2

Closed fryguybob closed 12 years ago

fryguybob commented 12 years ago

(Imported from http://code.google.com/p/diagrams/issues/detail?id=18. Original issue from byor...@gmail.com on April 2, 2011, 06:25:22 PM UTC)

It is currently possible to construct a path with Bezier segments by specifying the control points directly. But it would be much nicer to have a higher-level interface for constructing them. For example:

fryguybob commented 12 years ago

(Imported. Original comment by fryguy...@gmail.com on April 30, 2011, 02:52:51 PM UTC)

I know how to convert a cubic spline into a series of Bezier segments. I also find Raph Levien's spiro quite interesting: http://www.levien.com/spiro/ (his PhD thesis is an excellent read on this topic in general).

fryguybob commented 12 years ago

(Imported. Original comment by byor...@gmail.com on August 16, 2011, 07:20:52 PM UTC)

I'm closing this since fryguybob has now implemented the CubicSpline module, as well as diagrams-spiro. There's perhaps more that could be done here (other interfaces to the spline generation? Implemeting the Hobby algorithm (used by Metafont)?) but essentially the ticket is complete.