FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Find the tangent of a function in certain points

 


Mgccl
I got a sprite of an arrow and I need to rotate it because the arrow don't just fly out straight.
My idea is:
for any point where the arrow passes, find a tangent line's slope(which can be turned into a angle so I can rotate the sprite).

I have find the way of knowing x,y positioning of the arrow though this equation:
x(t) = vt cos(theta)
y(t) = vt sin(theta) - (gt^2)/2
Where v is the initial velocity, theta is the angle, t is the time and g is the gravity.

anybody know any idea to find a tangent line's slope for any t for the above equation?
tidruG
moved to appropriate forum
uuuuuu
Hi, this is Uwe.
I have solved your problem, but it is late in the morning and I think if I post the solution I might make a mistake typing.
This is a multi-variable calculus problem, but I can just give you the formula so you can input it into your program.

Are you still interested in the solution?
(It will take me some time to type it out and explain it using a mathematical markup like LaTeX)

If so let me know and I'll post it later in the day.
But if you already have your solution please let me know.

Love,

Uwe
Reply to topic    Frihost Forum Index -> Lifestyle and News -> Jobs and Learning

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.