Hello! I’ve been messing around with bezier curves for a bit, specifically for projectile trajectory. Now I’ve been wanting to achieve something. But I do not know what values to plug in.

This is the trajectory I am aiming for:

Excuse me for the bad sketch.

The formula I use (from wiki):

```
function quadBezier(t, p0, p1, p2)
return (1 - t)^2 * p0 + 2 * (1 - t) * t * p1 + t^2 * p2
end
```

What I want to know is, what values should I plug in for p0/2 to get this trajectory?

Let me know.

2 Likes

It would all depend on the distance from start to finish, plus this is a 2D version so if you want it in 3D you would need to do some extra math.

P0 is the start point
P1 Is a point that raises the curves height (It will not reach this point)
P2 Is the end point for the curve

These images are from the Bezier curve API and will show this visually.

1 Like

Can’t help you figure out what to plug in if you don’t tell us what you’re trying to achieve

1 Like

Hey, late replied guys sorry. Ended up getting my ideal trajectory by using a cubic bezier instead of a quadratic bezier.

I know you solved this but

Projectiles make parabolic trajectories

Which you can represent exactly with a quadratic bezier if you wanted:

But I feel like you’d have better results just computing and using the parabola in the first place. This wiki page has some good info:

Projectile motion is a form of motion experienced by an object or particle (a projectile) that is projected near Earth's surface and moves along a curved path under the action of gravity only (in particular, the effects of air resistance are passive and assumed to be negligible). This curved path was shown by Galileo to be a parabola, but may also be a straight line in the special case when it is thrown directly upwards. The study of such motions is called ballistics, and such a trajectory is a b...

I plotted some of those equations here which you might also find useful: Projectile Motion Calculation

Thank you, I’ll be sure to check it out.