Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Splines #35

Open
srush opened this issue May 22, 2022 · 2 comments
Open

Splines #35

srush opened this issue May 22, 2022 · 2 comments

Comments

@srush
Copy link
Collaborator

srush commented May 22, 2022

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.

@danoneata
Copy link
Collaborator

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?

@srush
Copy link
Collaborator Author

srush commented May 23, 2022

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.

This was referenced Jul 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants