BezierSegment Sample / Interpolation Limitation

I was involved with the Kairos Interpolators and the Tranistion Runtime in vvvv.
I might not be aware of the crazy 2d timeline you are about to create, but the classic timeline where time is to the right and value is upwards, you typically don’t have the ArcLength issue, but another one that is quite related.

You typically want the user to feel at home like in a vector drawing application: be able to draw freely and interact normally. You end up with a classic bezier curve in 2d. Bezier(p) -> (x,y). But what the timeline needs is x -> y.

The typical solution is to go via p this way:

  • InvBezier_for_x(time) -> p
  • and then Bezier_for_y(p) -> value

like shown here:

So first you need to some do an inverse bezier starting with dimesion x/t, so that you then have the normal parameter p that alows you to sample in the other dimension y/value.

The implementation of the inverse bezier can again be either some sort of ArcLength-like search or it can be a cubic polynomial equation solver.
VL.CoreLib/src/Math/BezierSegmentHelpers.cs

The patch and the node are part of StdLibs. They might not be part of the standard node set, but just wanted to point you to the open source code. As always you could copy the code or go the IsFriend way and couple closely with CoreLib.

3 Likes