- #1
Zengi
- 1
- 0
Hello everyone,
I am making a physics model for a game. This model works by extrapolating points in time through trajectories, pretty basic stuff. The problem is I need a trajectory for something on a 2d plane, with constant acceleration, and constant angular velocity. I've done almost all the leg work but I got stuck at the end when I need to solve it for t. I need to solve for t to predict when a trajectory will overlap a specific location. So, here is what I got so far.
Variable Constants:
V_i = initial velocity
a = acceleration
w = omega, angular velocity, projectiles turn rate
Variables = t , time
I started with the basic velocity equation.
v(t) = dx/dt
re-arranged it and took the integral of both sides
integral(dx) = integral(v(t)dt)
substituted v(t) for what I needed ( this equation will be the forward component )
x = integral(cos(wt)*(v_i+at)dt)
integrated the first half
x = (V_i*sin(wt))/w + ...
and then the second half and got the final equation
solving for c where at t = 0 x should be 0
[tex]x = \frac{V_{i}}{\omega}*sin(\omega*t) + \frac{a}{\omega^{2}}*cos(\omega*t) + \frac{a*t}{\omega}*sin(\omega*t) - \frac{a}{\omega^{2}}[/tex]
I followed the same process for the sideways version of the equation and obtained this one.
[tex]y = \frac{-V_{i}}{\omega}*cos(\omega*t) + \frac{a}{\omega^{2}}*sin(\omega*t) + \frac{-a*t}{\omega}*cos(\omega*t) - \frac{V_{i}}{\omega}[/tex]
I tested these equations and they work, much to my surprise. Tested them on a TI83 Plus using the X and Y mode. However, for my purposes I need to be able to get these in "t =" form.
I've been rearranging them back and forth for hours but I just can't seem to get it. I'm not sure it's even possible since there are several t's per x and some x's may not have a t at all so it's not exactly a function curve. Any help would be greatly appreciated.
I am making a physics model for a game. This model works by extrapolating points in time through trajectories, pretty basic stuff. The problem is I need a trajectory for something on a 2d plane, with constant acceleration, and constant angular velocity. I've done almost all the leg work but I got stuck at the end when I need to solve it for t. I need to solve for t to predict when a trajectory will overlap a specific location. So, here is what I got so far.
Variable Constants:
V_i = initial velocity
a = acceleration
w = omega, angular velocity, projectiles turn rate
Variables = t , time
I started with the basic velocity equation.
v(t) = dx/dt
re-arranged it and took the integral of both sides
integral(dx) = integral(v(t)dt)
substituted v(t) for what I needed ( this equation will be the forward component )
x = integral(cos(wt)*(v_i+at)dt)
integrated the first half
x = (V_i*sin(wt))/w + ...
and then the second half and got the final equation
solving for c where at t = 0 x should be 0
[tex]x = \frac{V_{i}}{\omega}*sin(\omega*t) + \frac{a}{\omega^{2}}*cos(\omega*t) + \frac{a*t}{\omega}*sin(\omega*t) - \frac{a}{\omega^{2}}[/tex]
I followed the same process for the sideways version of the equation and obtained this one.
[tex]y = \frac{-V_{i}}{\omega}*cos(\omega*t) + \frac{a}{\omega^{2}}*sin(\omega*t) + \frac{-a*t}{\omega}*cos(\omega*t) - \frac{V_{i}}{\omega}[/tex]
I tested these equations and they work, much to my surprise. Tested them on a TI83 Plus using the X and Y mode. However, for my purposes I need to be able to get these in "t =" form.
I've been rearranging them back and forth for hours but I just can't seem to get it. I'm not sure it's even possible since there are several t's per x and some x's may not have a t at all so it's not exactly a function curve. Any help would be greatly appreciated.