Acceleration through curved paths

In summary, the challenge presented is how to calculate and perform uniform acceleration for an object following a non-linear path with known starting and ending velocities, four points, and a center of a circle. The suggested approaches include using Bezier curves, defining R1-3 values, and creating a more natural curvature for the arcs. It is also recommended to resolve the challenge geometrically and to seek a mathematical approach. Additionally, it is stated that uniform acceleration may not be applicable, but the speed can vary uniformly as a function of time. The velocity vector will be tangent to the path, but its magnitude will grow at a constant rate.
  • #36
As @hmmm27 said above you can use circles of different radii to adjust the bulge. I wasn't sure if the points are equidistant around the arc as drawn here but if not it is easy to adjust for that. But these are all circles with different centers so the equations are easy. The object comes in from the left at ##E## and leaves at ##F##.

geogebra-export (1).png

Update: I'm calling this the Mickey Mouse version...
 
Last edited:
Physics news on Phys.org
  • #37
bob012345 said:
As @hmmm27 said above you can use circles of different radii to adjust the bulge. I wasn't sure if the points are equidistant around the arc as drawn here but if not it is easy to adjust for that. But these are all circles with different centers so the equations are easy. The object comes in from the left at ##E## and leaves at ##F##.

View attachment 290835

Those circles appear to have “only approximately equal” tangents at the intersection points. That may be good enough.

(For the matching of tangent lines for circles, the centers and the intersection points should be collinear.)

How strict is the requirement (that is, what is the tolerance ) for matching the tangent lines?
 
Last edited:
  • Like
Likes bob012345 and Lnewqban
  • #38
Here's a GeoGebra file I just made:
https://www.geogebra.org/m/gvehkkfc
1634531569055.png


The [itex] T_{22} [/itex] control point is forced to be on the tangent line defined by [itex] T_2 [/itex] and [itex] P_2 [/itex], and similarly for [itex] T_{33} [/itex]. The arc-length of each arc is computed with GeoGebra's Length function... but a formula or algorithm is probably preferred. See the GeoGebra code for details.

Here are the curves:
Curve(P_1 (1 - t)³ + T_1 * 3(1 - t)² t + T_{2} * 3 (1 - t) t² + P_2 t³, t, 0, 1)
Curve(P_2 (1 - t)³ + T_{22} * 3(1 - t)² t + T_{32} * 3 (1 - t) t² + P_3 t³, t, 0, 1)
Curve(P_3 (1 - t)³ + T_{33} * 3(1 - t)² t + T_{43} * 3 (1 - t) t² + P_4 t³, t, 0, 1)

Play around with it.

UPDATE:
In addition the link ( https://pomax.github.io/bezierinfo/ ) I posted earlier,
these might be interesting
https://pomax.github.io/bezierjs/
https://raphlinus.github.io/curves/2018/12/28/bezier-arclength.html
https://math.stackexchange.com/questions/12186/arc-length-of-bézier-curves
https://fjorgedigital.com/insights/blog/can-bezier-curves-be-quickly-parameterized-by-arc-length/
https://stackoverflow.com/questions/17099776/trying-to-find-length-of-a-bezier-curve-with-4-points [this might be useful]
 
Last edited:
  • Like
Likes Cato11, bob012345 and Lnewqban
  • #39
Here's a constrained version:
https://www.geogebra.org/m/sxjwma2q

Given [itex] A [/itex] and [itex] P_1 [/itex], [itex] P_2 [/itex], [itex] P_3 [/itex], and [itex] P_4 [/itex]
the arcs are constrained to be symmetrical
by forcing their tangent lines to intersect at a point on
the diameter through the midpoint of the arc-points

PF-accelerationThroughCurvedPaths-v2.png


I would think that this constraint would force these Bezier curves to have a simpler form,
maybe to the point where the arc-length may expressed in closed form.
 
  • Like
Likes Cato11
  • #40
Hi All, I am happy to report that I have made some progress on this problem. In fact I think it is solved as far as my case is concerned!

Let's start with the formulation of the curve and take as an example a cubic bezier curve. Such a curve has two positional points (p0, p1) as well as two control points (c0, c1). If we want a curve to start at position 'p0' with velocity 'v0' and end at position 'p1' with velocity 'v1' after a specific time 't', then we must place the control points accordingly. How? By using the following equations:

p0 = p0
c0 = p0 + v0 * t / 3
c1 = p1 - v1 * t / 3
p1 = p1

Essentially we take the formula for a cubic bezier curve and differentiate with respect to time (as someone rightly said at the start of the thread!). By solving for c0 and c1 we get an expression for the control points given a required velocity. Once the points are placed, we evaluate position using the cubic bezier equation and passing in elapsed time (as animated in my post #14).

The result is a very smooth acceleration through the curve, as evidenced here with a spline that is composed of three separate curves:

Acceleration.gif


It's pretty awesome! It is important to ensure that when transitioning from one curve to another, the 'p1' and 'v1' of the curve that is being exited equals the 'p0' and 'v0' of the curve being entered. This provides continuity across the entire spline, preventing sharp turns or unnatural acceleration. The only challenge with this method is that the control points are placed for us, so if you want a very specific shape it requires splitting the spline into more curves for more precise control. This isn't necessarily a problem though. The main issue for me was achieving the acceleration so it's awesome to see it working.

Huge thanks to everyone here who helped by offering advice. And I must extend a massive shout-out to DMGregory over on GameDev StackExchange as he explained the solution and helped me to understand it.
Now I begin the exciting task of generating some complex looking curves!
 
  • Like
Likes bob012345, Lnewqban and hmmm27
Back
Top