Closed johnfmorton closed 10 months ago
Hi George,
I've been playing with the spline and points on a path and wanted to share changes I've made for a project to these functions--if you find them worthwhile, great! If not, no problem.
I am drawing random shapes, and I wanted to be able to use "points on a line" to even out the distribution. The revised version makes sure you get exactly the number of points you ask for and that the last point always falls exactly on the end of the path.
Next, I wanted to make a spline so that the being and end points didn't overlap. That's what the revised spline function does. I intend for the new function's results to create the exact same shape created with your spline function.
Here's an example that shows you what the changes do: https://johnfmorton.github.io/svg-gen-closing-the-loop/
Thanks for all the work on this repo!
-John
I'm closing this pull request for the time being. It's not incorporating the 'tension' value like I intended.
Updated so a closed spline's path does not loop back over itself.