Hi All,
Anyone here has any idea how to create a closed loop bezier curve from a
set of defined control points.
I know it can be done through bspline, but only when the number of control
points are maybe less than 10 or something.
Once the control points are very high like 100 or more it takes a long time
and defeats the purpose.
Thanks
On 8/14/2025 2:43 AM, Sanjeev Prabhakar via Discuss wrote:
Anyone here has any idea how to create a closed loop bezier curve from
a set of defined control points.
I know it can be done through bspline, but only when the number of
control points are maybe less than 10 or something.
Once the control points are very high like 100 or more it takes a long
time and defeats the purpose.
Maybe I am not understanding your goal. Do you mean a single curve,
of a very high order, or do you mean numerous connected curves of lower
order (typically cubic, if I'm remembering correctly0?
I don't know beans about high-order Bezier curves, but connecting
low-order curves into a smooth loop is straightforward; you just ensure
that the begin and end points are the same, and that the adjacent
control points are co-linear with the begin/end point.
For b spline run time should depend linearly on the point count so 100 pts
should be fine.
For a single bezier the curve has the property that it passes through its
first and last point so just make them equal. If you want derivatives then
line up vectors given by the two endpoints at each end. I think this
computation is slower than b spline for many control points.
On Thu, Aug 14, 2025 at 11:06 Jordan Brown via Discuss <
discuss@lists.openscad.org> wrote:
On 8/14/2025 2:43 AM, Sanjeev Prabhakar via Discuss wrote:
Anyone here has any idea how to create a closed loop bezier curve from a
set of defined control points.
I know it can be done through bspline, but only when the number of control
points are maybe less than 10 or something.
Once the control points are very high like 100 or more it takes a long
time and defeats the purpose.
Maybe I am not understanding your goal. Do you mean a single curve, of
a very high order, or do you mean numerous connected curves of lower order
(typically cubic, if I'm remembering correctly0?
I don't know beans about high-order Bezier curves, but connecting
low-order curves into a smooth loop is straightforward; you just ensure
that the begin and end points are the same, and that the adjacent control
points are co-linear with the begin/end point.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
If I remember correctly order of bezier curve is 1 less than the control
points. E.g. cubic means 4 control points.
I am looking for very high order bezier curve with control points maybe >
100 or so. The equation for the same is simple and easy to implement. The
issue comes when a closed loop is required. In a regular bezier curve, it
starts and ends on the first and the last control points supplied.
Cubic Bspline curve is what you explained as connecting multiple curves of
4 control points each, but then these are not the same as bezier curves and
there could be a big distortion in many cases.
Making closed loop bspline curve is also difficult, it took sometime for me
to understand initially but now it's clear and the algorithm is quite
stable.
I have implemented some work around for closed loop of bezier, but not very
satisfactory as of now.
On Thu, 14 Aug, 2025, 8:35 pm Jordan Brown, openscad@jordan.maileater.net
wrote:
On 8/14/2025 2:43 AM, Sanjeev Prabhakar via Discuss wrote:
Anyone here has any idea how to create a closed loop bezier curve from a
set of defined control points.
I know it can be done through bspline, but only when the number of control
points are maybe less than 10 or something.
Once the control points are very high like 100 or more it takes a long
time and defeats the purpose.
Maybe I am not understanding your goal. Do you mean a single curve, of
a very high order, or do you mean numerous connected curves of lower order
(typically cubic, if I'm remembering correctly0?
I don't know beans about high-order Bezier curves, but connecting
low-order curves into a smooth loop is straightforward; you just ensure
that the begin and end points are the same, and that the adjacent control
points are co-linear with the begin/end point.
Bspline curves with control points 100 and cubic degree is fine.
But if you go for bspline curve with deg =99, it will take endless time as
per me.
On Thu, 14 Aug, 2025, 9:13 pm Adrian Mariano via Discuss, <
discuss@lists.openscad.org> wrote:
For b spline run time should depend linearly on the point count so 100 pts
should be fine.
For a single bezier the curve has the property that it passes through its
first and last point so just make them equal. If you want derivatives then
line up vectors given by the two endpoints at each end. I think this
computation is slower than b spline for many control points.
On Thu, Aug 14, 2025 at 11:06 Jordan Brown via Discuss <
discuss@lists.openscad.org> wrote:
On 8/14/2025 2:43 AM, Sanjeev Prabhakar via Discuss wrote:
Anyone here has any idea how to create a closed loop bezier curve from a
set of defined control points.
I know it can be done through bspline, but only when the number of
control points are maybe less than 10 or something.
Once the control points are very high like 100 or more it takes a long
time and defeats the purpose.
Maybe I am not understanding your goal. Do you mean a single curve, of
a very high order, or do you mean numerous connected curves of lower order
(typically cubic, if I'm remembering correctly0?
I don't know beans about high-order Bezier curves, but connecting
low-order curves into a smooth loop is straightforward; you just ensure
that the begin and end points are the same, and that the adjacent control
points are co-linear with the begin/end point.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org