1
$\begingroup$

I have a parabola equation $y = ax^2 + bx + c$ with vertex at (vertexX, vertexY)) which draws the object's moving trajectory (from point $A(0;0)$ to $B(X;Y)$). Also, I have a gravity vector ($G(0;-g)$).

How to find the initial velocity which I should to set to this object to move it by this trajectory?

I tried the (vertexY / b, vertexY) but it is too small and doesn't depend on gravity.

$\endgroup$

3 Answers 3

1
$\begingroup$

Let initial velocity be $(u_x,u_y)$

differentiating the parabolic equation w.r.t. x gives $\frac{dy}{dx} = b$ when $x=0$

so $$\frac{u_y}{u_x} = b$$

Also from the equations of motion horizontally and vertically using time $t$ to be the time to the vertex $(X,Y)$

$$t=\frac{X}{u_x}$$

$$Y = u_yt -\frac{gt^2}{2}$$

solving these three brings us to a suggestion for your initial velocity of

$$u_x = X(\frac{2}{g}(bX-Y))^{-0.5}$$

and $$u_y = bu_x$$

hope that works...

$\endgroup$
5
  • $\begingroup$ No, it doesn't work. Velocity is too small, bots even doesn't stop to touch ground $\endgroup$
    – Robotex
    Oct 1, 2021 at 14:22
  • 1
    $\begingroup$ @ Robotex could you give an example with $(X,Y)$ and $b$ and the value of $g$ used, let's put the numbers in and see if we are getting the same $u_x$, $u_y$ $\endgroup$ Oct 1, 2021 at 14:28
  • $\begingroup$ Oh, sorry, I made a mistake in formula. Looks like, that is working. Thank you :) $\endgroup$
    – Robotex
    Oct 1, 2021 at 14:35
  • 1
    $\begingroup$ @ Robotex OK, glad it helped $\endgroup$ Oct 1, 2021 at 14:36
  • $\begingroup$ @ Qmechanic the tag edit seems a bit late, the question has been live for 3 hours... $\endgroup$ Oct 1, 2021 at 14:43
0
$\begingroup$

First you have $x(0)=y(0)=0$. $v_y/0)/v_x(0)=b$, second you have $v_y(vertex)=0, and , v_y(t)=v_y(0)-g*t , y(vertex)=v_y(0)*t-g/2*t^2, x(t)=v_x(0)*t$ this should be enough to find a,b,c

$\endgroup$
1
  • $\begingroup$ I have a, b and c. I need to find V0 $\endgroup$
    – Robotex
    Oct 1, 2021 at 14:07
0
$\begingroup$

This formula gives approximately correct result (but with longer time than I put to formula):

Velocity = FVector( ((vertY / Props.JumpTime) + (0.5f * -GravityZ * Props.JumpTime)) / b, 0.0f, (vertY / Props.JumpTime) + (0.5f * -GravityZ * Props.JumpTime) );

VertY - the Y of highest point of parabola GravityZ - gravity magnitude Props.JumpTime - time for moving

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.