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 with less than 4 control points #3

Open
CosminPerRam opened this issue Feb 17, 2021 · 1 comment
Open

Splines with less than 4 control points #3

CosminPerRam opened this issue Feb 17, 2021 · 1 comment

Comments

@CosminPerRam
Copy link

CosminPerRam commented Feb 17, 2021

Hello, thanks for the effort put into this library, I want to use it for a project of mine but I need to be able to create splines (Bezier and Catmull) using 3 control points (and 2, but that's just a straight line), not the coded minimum of 4.

I have been looking into on how to do it but I can't really wrap my head around the math for it and also to create an implementation, any help regarding this? Thanks.

@CycloneRing
Copy link

what do you mean less than 4 points
point 1 : start point
point 2 : bezier point 1
point 3 : bezier point 2
point 4 : end point

if you want to make straight line just place point 2 and 3 to center of point 1 and 2 using average coord in distance.

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