generative-utils icon indicating copy to clipboard operation
generative-utils copied to clipboard

Update pointsInPath.js and spline.js

Open johnfmorton opened this issue 2 years ago • 2 comments

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

johnfmorton avatar Dec 21 '23 20:12 johnfmorton

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 avatar Dec 22 '23 16:12 johnfmorton

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

johnfmorton avatar Dec 22 '23 16:12 johnfmorton

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.

georgedoescode avatar May 16 '24 10:05 georgedoescode

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!

johnfmorton avatar May 16 '24 12:05 johnfmorton