Physics math question

TheKidPunisher
Autonomous Entity
Autonomous Entity
Posts: 565

Re: Physics math question

Post#21 » 22 Jul 2017, 23:13

mcompany wrote:
TheKidPunisher wrote:So you only have to derivate the equation miojo give,

Vx= Ax t + Vx0
Vy= Ay t + Vy0

With your initial value and according your name of variable
Vx=a
Vy= g t +b

Also, saying "Vx=a" is like saying "the sky is a sky", and the following is true for "Vy=b". I just said that those were their literal definitions


As you accelaration in X is 0, your velocity in X is constant so you dont have to search an equation

mcompany
Autonomous Entity
Autonomous Entity
Posts: 872

Re: Physics math question

Post#22 » 22 Jul 2017, 23:19

Well I need an equation for solving for the velocity components, but yes, that is true

TheKidPunisher
Autonomous Entity
Autonomous Entity
Posts: 565

Re: Physics math question

Post#23 » 22 Jul 2017, 23:32

Why do you not accept:
A(Ax,Ay) --> A(0,g)
V(Vx,Vy) --> V(Vx0,gt +Vy0)
P(X,Y) --> P(Vx0*t+X0,(1/2)g(t²)+Vy0*t+Y0)

You have all with that: acceleration, velocity and position!

mcompany
Autonomous Entity
Autonomous Entity
Posts: 872

Re: Physics math question

Post#24 » 22 Jul 2017, 23:59

You still aren't understanding that I am specifically looking for vx0 and vy0, and the I already know P(x,y), A(0,g), and the total vector v0, and making an equation to solve for P(x,y) is nonsensical because I already know it

TheKidPunisher
Autonomous Entity
Autonomous Entity
Posts: 565

Re: Physics math question

Post#25 » 23 Jul 2017, 00:04

mcompany wrote:You still aren't understanding that I am specifically looking for vx0 and vy0, and the I already know P(x,y), A(0,g), and the total vector v0, and making an equation to solve for P(x,y) is nonsensical because I already know it


You are right, i think i really dont get what you want...
i really would like to help you as i like math but i think i have to give up, sry

mcompany
Autonomous Entity
Autonomous Entity
Posts: 872

Re: Physics math question

Post#26 » 23 Jul 2017, 00:18

mcompany wrote:solve for either a or b, given x, y, g, and v

mcompany wrote:I want the initial velocity components (or the initial velocity's angle, whichever is easier), given the initial velocity vector (v), given an acceleration in the y direction (gravity, or g) with no acceleration in the x direction, and given the the object passes through the point at (x,y).

mcompany wrote:
TheKidPunisher wrote:So why the equation miojo gave you are not good for you?

normally a simple parabola is solved when you get all the initial value...

Sure but then
Vx=(x)/T
Vy=(y-0.5*(g*(t^2))/T

What is "T" and what is "t"?

mcompany wrote:You still aren't understanding that I am specifically looking for vx0 and vy0, and the I already know P(x,y), A(0,g), and the total vector v0, and making an equation to solve for P(x,y) is nonsensical because I already know it

Um... ok

TheKidPunisher
Autonomous Entity
Autonomous Entity
Posts: 565

Re: Physics math question

Post#27 » 23 Jul 2017, 04:32

So you already have the parabola and you want the initial parameter vector?

Or you want to choose initial parameter to have a specific parabola?

TheKidPunisher
Autonomous Entity
Autonomous Entity
Posts: 565

Re: Physics math question

Post#28 » 23 Jul 2017, 06:13

oh i think i got it (finally^^ i really have some problem when the text of the problem is in english...)!

Do you confirm that you have this informations:
P0(X0,Y0) initial position of the projectile
P1(X1,Y1) a (random) point of your parabola
The value of the vector velocity initial V0 but not his component (Vx0,Vy0)
And i understand that if all time the acceleration is A(0,g)

And finally you search the value of component of the velocity (or atleast the angle of the vector)

If it is ok, i got a solution for you. but i'm tired i will write it, after sleep if you agree all of the previous points.

mcompany
Autonomous Entity
Autonomous Entity
Posts: 872

Re: Physics math question

Post#29 » 23 Jul 2017, 06:33

Yes

Miojo
Script
Script
Posts: 37

Re: Physics math question

Post#30 » 23 Jul 2017, 07:12

T=t. I wrote that on mobile

mcompany
Autonomous Entity
Autonomous Entity
Posts: 872

Re: Physics math question

Post#31 » 23 Jul 2017, 10:05

Ok

TheKidPunisher
Autonomous Entity
Autonomous Entity
Posts: 565

Re: Physics math question

Post#32 » 23 Jul 2017, 13:32

sry i just wake up.

We suppose an angle w, the angle between the X direction and the direction of the vector V0

So we got Vx0=V0*cos(w) and Vy0=V0*sin(w)


We calculate the differance of position between the point P(X,Y) at instant t on the parabola and the initial point P0(X0,Y0) at instant t0

We obtain: X-X0=Vx0*t+X0-Vx0*t0-X0 but t0=0 so (X-X0)/(Vx0)=t [equation 1]

We calculate the same for Y-Y0

Y-Y0=(1/2)*g*t²+Vy0*t+Y0-(1/2)*g*t0²-Vy0*t0-Y0 but t0=0

so Y=(1/2)*g*t²+Vy0*t+Y0

You replace t by his value in the [equation 1] and after some simplification you got:

Y=(1/2)*g*(X-X0)²/(Vx0)²+Vy0*(X-X0)/(Vx0)+Y0

If you consider the origin at P0(X0=0,Y0=0) it will simplify the calculation after(if not use the same technique as below but with a bigger equation):

Y=(1/2)*g*(X)²/(Vx0)²+Vy0*(X)/(Vx0)
And with the power of trigo:
1/(Vx0)²=1/(V0*cos(w))²=(1+[tan(w)]²)/V0²
and Vy0/Vx0=V0*sin(w)/V0*cos(w)=tan(w)

we replace them in the equation:
Y=(1/2)*g*(X)²(1+[tan(w)]²)/V0²+X*tan(w)

Then you use the by point P1 the parabola pass by:
Y1=(1/2)*g*(X1)²(1+[tan(w)]²)/V0²+X1*tan(w)

And i let you do the rest, it is now a polynome and 2 degre (solve it conserdiring tan(w)=T so you have to solveY1=(1/2)*g*(X1)²(1+T²)/V0²+X1*T

Then when it solve use the value S you find and do w=arctan(S)


Caution: you will have these case:
-if P1 is out of range: polynome insolvable
-if P1 is at max range : 1 solution (noramlly it will be w=45°)
-if P1 is between max range and initial position so 2 solutions (one with w>45° and other with w<45°)


Hope it is what you want, if you prefer Vx0 and Vy0 value just do the calculation with the value of w in the first equation:Vx0=V0*cos(w) and Vy0=V0*sin(w)

Tell me if you have questions.

TheKidPunisher
Autonomous Entity
Autonomous Entity
Posts: 565

Re: Physics math question

Post#33 » 24 Jul 2017, 17:37

So it was what you needed?

pier4r
Skynet
Skynet
Posts: 3390

Re: Physics math question

Post#34 » 24 Jul 2017, 18:07

Quite a work Kid. I did not went through your idea so far. I'd like to give it a go by myself first .
http://www.reddit.com/r/Gladiabots/wiki/players/pier4r_nvidia_shield_k1 -> Gladiabots CHAT, stats, insights and more ;

TheKidPunisher
Autonomous Entity
Autonomous Entity
Posts: 565

Re: Physics math question

Post#35 » 24 Jul 2017, 18:11

Oh so it was you
mcompany wrote:So, one of my friends …


Do as you want but feel free to use my idea or ask me some questions about it.

pier4r
Skynet
Skynet
Posts: 3390

Re: Physics math question

Post#36 » 24 Jul 2017, 22:18

No, mcompany posted the same on telegram and I was attacking the problem but then I had to go.

You could see the conversation if you scroll back enough in telegram.
http://www.reddit.com/r/Gladiabots/wiki/players/pier4r_nvidia_shield_k1 -> Gladiabots CHAT, stats, insights and more ;

TheKidPunisher
Autonomous Entity
Autonomous Entity
Posts: 565

Re: Physics math question

Post#37 » 24 Jul 2017, 23:05

i didnt go on telegram since a long time, maybe i will be back when i will play seriously

TheKidPunisher
Autonomous Entity
Autonomous Entity
Posts: 565

Re: Physics math question

Post#38 » 25 Jul 2017, 17:47

I didnt ask: what type of game is he making?

A «Worms» like game?

Return to “Off topic”

Who is online

Users browsing this forum: No registered users and 1 guest