Auto set anchor point for Bezier Curve

Hi everyone.
I managed to create curve line from P0 to P2 but I need to adjust manually the curve using P1 position.
So how to set P1 position automatically because all I need is P0 position and P2 position.

Thank you.

9125272--1266412--Screenshot_2.png

P0 and P2 alone are insufficient to produce P1.

Beyond that, photographs of code are not a thing. If you post a code snippet, ALWAYS USE CODE TAGS:

How to use code tags: Using code tags properly

If you’re just trying to simulate a ballistic trajectory it has nothing to do with bezier curves. An object undergoing constant acceleration (gravity) in a frictionless environment will trace some portion of a parabola (y = a x^2 +b)