Open srush opened 2 years ago
Yes; if we want curvy segments, we could also have Bézier curves, which would be simpler to render since they are already supported by both PyCairo and SVG. But I assume that cubic splines are somewhat more intuitive to specify?! Out of curiosity, are there some diagrams that you would like to draw and would require splines?
Yeah it looks like diagrams converts splines to bezier curves internally. Guess splines are easier for users.
No I don't actually need splines. Bends are enough for me. Just seemed interesting.
Lo-pri: The Haskell cubic spline api seems pretty doable now that we have paths / trails. I think this could be implemented as a Spline shape that takes a path and renders it using https://docs.scipy.org/doc/scipy/tutorial/interpolate.html
https://hackage.haskell.org/package/diagrams-lib-1.4.5.1/docs/Diagrams-CubicSpline.html#g:1
Downside is this brings in a scipy dependency and is maybe not that important a feature.