cpp-spline icon indicating copy to clipboard operation
cpp-spline copied to clipboard

Splines with less than 4 control points

Open CosminPerRam opened this issue 3 years ago • 1 comments

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.

CosminPerRam avatar Feb 17 '21 12:02 CosminPerRam

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.

CycloneRing avatar Jun 30 '22 00:06 CycloneRing