Page 1 of 3

TO ALL THE MATH BUFFS OUT THERE

Posted: Sat Mar 24, 2007 3:35 pm
by TurkeyFromHell
I have two arbitrary known vectors V and W. between them is a vector N with a rotation of ɑ away from V, and β away from W. The angle between V and W (ɑ+β) is θ. I need to figure out how to find N (magnitude is irrelevant) as a function V and W. To clarify, this is what we have:

Image

the magnitude of N DOES NOT MATTER for my purposes in the solution. any help would be greatly appreciated. i just really dont want to think any more on this..

Posted: Sat Mar 24, 2007 3:41 pm
by TurkeyFromHell
if i could find the orthogonal vector from V to N it would just be V+ that orthogonal vector, but im not sure how i owuld do that cuz idk what N is, and it hasto hold true for all rotations of V.. i think i might be giving myself a solution here lol


--edit--
ok so ive figured out that the magnitude of the orthogonal vector from V to N would be ||V||*tan(ɑ) (correct me if this is wrong some1 plz), and soo.. hm..

Posted: Sat Mar 24, 2007 6:26 pm
by Quester115
I'm assuming this is for a mutator of some sort.
Don't know too much Uscript...yet. So I don't know how vectors are expressed
but if I remember correct(its been a good year and a half since trig)
vector N = V + W
...
V<i1 , j1>
W<i2 , j2>
...
N = <i1+i2 , j1+j2>
...
which means the angle of N would be *arctan( (j1+j2)/(i1+i2) )


hope this helps, and if not I'll try again ;)
---------------------
Edit: used tan instead of arctan(arctan is correct)
---------------------
N<i3 , j3>

alpha = arctan(j3/i3) - arctan(j1/i1)
beta = arctan(j3/i3) - arctan(j2/j1)

Posted: Sat Mar 24, 2007 7:32 pm
by TurkeyFromHell
Quester115 wrote:I'm assuming this is for a mutator of some sort.
Don't know too much Uscript...yet. So I don't know how vectors are expressed
but if I remember correct(its been a good year and a half since trig)
vector N = V + W
...
V<i1 , j1>
W<i2 , j2>
...
N = <i1+i2 , j1+j2>
...
which means the angle of N would be *arctan( (j1+j2)/(i1+i2) )


hope this helps, and if not I'll try again ;)
---------------------
Edit: used tan instead of arctan(arctan is correct)
---------------------
N<i3 , j3>

alpha = arctan(j3/i3) - arctan(j1/i1)
beta = arctan(j3/i3) - arctan(j2/j1)

i know alpha and beta, i just need to find N

Posted: Sat Mar 24, 2007 7:36 pm
by Quester115
N seems to be as simple as just the addition of V and W... :|
--------
so do you want the angle of N? the <i,j> form? or something completely different :finga:
angle of n<i,j> is just arctan(j/i)

Posted: Sat Mar 24, 2007 9:01 pm
by TurkeyFromHell
N isnt W+V because thats <wi+vi, wj+vj>, which doesnt hold true for most cases

Posted: Sat Mar 24, 2007 10:16 pm
by Quester115
ok think I got ya now.

N isn't W+V, but just some vector between the two.

We know the angle between V and N. alpha

so we'll take the angle of V.
arctan(Vj/Vi) easy enough

then to get the angle of N its just the angle of V + alpha
arctan(Vj/Vi) + alpha

then to get the value for N just use that angle to get the trig form(with no magnitude)
N= <cos( arctan(Vj/Vi) + alpha ) , sin( arctan(Vj/Vi) + alpha ) >


edit: then i remember ut is a 3d game

Posted: Sun Mar 25, 2007 8:05 pm
by TurkeyFromHell
....wow u really were bored

Posted: Sun Mar 25, 2007 8:35 pm
by Nard
TurkeyFromHell wrote:....wow u really were bored
Hey the dude knows his math.

Posted: Sun Mar 25, 2007 8:35 pm
by Nard
TurkeyFromHell wrote:....wow u really were bored
Hey the dude knows his math.