BezierSegment Sample / Interpolation Limitation

Hi people,
i’m doing a bit of research around curves sampling and i’m facing some limitations.

1. Proper BezierSegment ArcLength Sampler, resolution independent.

  • This can be solvable using ArcLength and Binary search but i’m wondering if there is a lighter way to do it that doesn’t require these extra steps.
  • Am I using the right Bezier nodes? or are there other way to get this functionality?

2. Float64 interpolation mechanism.

  • As i see the generic Lerp node provided in VVVV uses Float32 as interpolation value.
  • Am i underrating the Float32 resolution?

See the attached patch to see what i mean.
BezierCurve Interpolation.vl (59.9 KB)

Thanks

A classic question. The short answer is that using a pre-calculated arc length look-up table (LUT) with a binary search is a standard and very effective method for resolution-independent sampling of a Bézier segment’s arc length.

Due to the mathematical nature of Bezier curves, there isn’t a “lighter” way to achieve the same quality of results.

For cubic and higher-order Bézier curves, there’s no direct mathematical formula to calculate the arc length for a given t value. The relationship between the parameter t and the actual distance along the curve is not linear. This means that stepping through t at a constant rate will produce points that are not evenly spaced. So, any method that aims for uniform spacing must use some form of approximation or pre-calculation.

Corves that have that properties are:

PH Curves (special subset of Bezier):

Euler Spirals (used for railroad and street planning):

2 Likes

I really like the freya holmèr videos about splines, for me really good explain all the facades of splines.

The Continuity of Splines

The Beauty of Bézier Curves