0

I'm trying to move a point along a quadratic (3 point) bezier curve at a constant speed, I know how to do this (calculating the positions for some amount of t values, storing this and getting the closest value later) the "brute force" way.

but I'm looking for a method that is faster/more efficient (even if its less accurate).

is there such a thing?

  • Be careful if you calculate the positions "for some t values"; you mention that you want to move at constant speed, but Bezier curve are not parametrized by arc length in their most simple equation. See also: [math.stackexchange: How to find the arc length parametrization of Bezier curve](https://math.stackexchange.com/questions/2237345/how-to-find-the-arc-length-parametrization-of-a-cubic-bezier). And also an external link https://fjorgedigital.com/insights/blog/can-bezier-curves-be-quickly-parameterized-by-arc-length/ – Stef Oct 08 '21 at 13:56
  • There isn't one. Sample "enough `t` values" (and include the derivative at each of those values) which for a quadratic curve is a pretty low number (depending on how strongly it's curved, anywhere from 10 to 16 should be more than enough) then interpolate between two `t` values based on where your point is and how fast it's going. It's a fast approach, and generally accurate enough. https://pomax.github.io/bezierinfo/#tracing – Mike 'Pomax' Kamermans Oct 08 '21 at 14:40
  • thanks to both of you, I will check out the resources you shared –  Oct 08 '21 at 14:56
  • Recently there has been a [similar question](https://stackoverflow.com/questions/69856578/how-to-move-along-a-bezier-curve-with-a-constant-velocity-without-a-costly-preco). Maybe some of the answers can help you too? – Dominik Mokriš Nov 06 '21 at 15:45

0 Answers0