TO ALL THE MATH BUFFS OUT THERE

General discussion.

Moderator: Forum Moderators

User avatar
TurkeyFromHell
Staff Sergeant
Staff Sergeant
Posts: 640
Joined: Tue Jan 23, 2007 12:22 pm
Contact:

TO ALL THE MATH BUFFS OUT THERE

Post by TurkeyFromHell » Sat Mar 24, 2007 3:35 pm

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..

User avatar
TurkeyFromHell
Staff Sergeant
Staff Sergeant
Posts: 640
Joined: Tue Jan 23, 2007 12:22 pm
Contact:

Post by TurkeyFromHell » Sat Mar 24, 2007 3:41 pm

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..

Quester115
Staff Sergeant
Staff Sergeant
Posts: 547
Joined: Wed May 03, 2006 8:10 pm
Location: at the Uni
Contact:

Post by Quester115 » Sat Mar 24, 2007 6:26 pm

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)
Image
[seeking truth in life, no matter how painful it can be]

User avatar
TurkeyFromHell
Staff Sergeant
Staff Sergeant
Posts: 640
Joined: Tue Jan 23, 2007 12:22 pm
Contact:

Post by TurkeyFromHell » Sat Mar 24, 2007 7:32 pm

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

Quester115
Staff Sergeant
Staff Sergeant
Posts: 547
Joined: Wed May 03, 2006 8:10 pm
Location: at the Uni
Contact:

Post by Quester115 » Sat Mar 24, 2007 7:36 pm

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)
Image
[seeking truth in life, no matter how painful it can be]

User avatar
TurkeyFromHell
Staff Sergeant
Staff Sergeant
Posts: 640
Joined: Tue Jan 23, 2007 12:22 pm
Contact:

Post by TurkeyFromHell » Sat Mar 24, 2007 9:01 pm

N isnt W+V because thats <wi+vi, wj+vj>, which doesnt hold true for most cases

Quester115
Staff Sergeant
Staff Sergeant
Posts: 547
Joined: Wed May 03, 2006 8:10 pm
Location: at the Uni
Contact:

Post by Quester115 » Sat Mar 24, 2007 10:16 pm

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
Image
[seeking truth in life, no matter how painful it can be]

User avatar
TurkeyFromHell
Staff Sergeant
Staff Sergeant
Posts: 640
Joined: Tue Jan 23, 2007 12:22 pm
Contact:

Post by TurkeyFromHell » Sun Mar 25, 2007 8:05 pm

....wow u really were bored

User avatar
Nard
Staff Sergeant
Staff Sergeant
Posts: 559
Joined: Thu Mar 30, 2006 11:35 pm
Location: Akron, Ohio
Contact:

Post by Nard » Sun Mar 25, 2007 8:35 pm

TurkeyFromHell wrote:....wow u really were bored
Hey the dude knows his math.
Image
Image
Signature by [IX]AnnaBeaver

User avatar
Nard
Staff Sergeant
Staff Sergeant
Posts: 559
Joined: Thu Mar 30, 2006 11:35 pm
Location: Akron, Ohio
Contact:

Post by Nard » Sun Mar 25, 2007 8:35 pm

TurkeyFromHell wrote:....wow u really were bored
Hey the dude knows his math.
Image
Image
Signature by [IX]AnnaBeaver

Post Reply

Return to “UT2004 General Discussion”