georgedoescode / generative-utils

A collection of handy generative art utilities
MIT License
289 stars 22 forks source link

Update pointsInPath.js and spline.js #3

Closed johnfmorton closed 5 months ago

johnfmorton commented 10 months ago

Updated to more accurately calculate the spread of points on the length of the path.

johnfmorton commented 10 months ago

This fixes the previously submitted spline update from Dec 21, 2023. I had neglected to incorporate the tension value into that version. This new version of spline fixes that oversight.

I revised the original spline function because the original spline function created a path in which start and end portions overlapped. I'm creating paths that will be rendered on a plotter, and I didn't want this to overlap the path in this way.

johnfmorton commented 10 months ago

Also, I added a new script in the package.json so that npm run build will generate both versions of the dist code.

georgedoescode commented 6 months ago

Hey! Thanks so much for taking the time to look at this, John. I am currently in the process of completely rewriting this library, and I will be sure to include your changes in the rewrite.

It sounds as though you solved for the issue locally, so I may hold fire merging this as I'm trying not to touch the existing code. Let me know if that works, and I will close out this PR for now, and implement the changes in v2.

johnfmorton commented 5 months ago

I'm happy to help with this, George. Yes, I've got this issue solved locally. Since you're rewriting, I'll close this myself. As you work on v2, if I can look at any WIP, I'm happy to kick the tires on it if it's helpful. Thanks!