Current Server Time - 4:39:43 AM                     
GameDev.Net Forums Math and Physics 4D Cross product?
Send Topic To a Friend | View Forum FAQ | Watch this thread
Post Reply
 
Reply to Message Edit Message laeuchli   Member since: 11/8/1999   Show Profile Email Poster
Posted - 17 January 2004 5:58:23 PM
Dear All,
Can someone point me to a place where I can see the equations for a 4D cross product? I can't seem to find a spot on the web..
Thanks,
Jesse

 
Reply to Message Edit Message SiCrane   Moderator   Member since: 12/10/1999   Show Profile Email Poster
Posted - 17 January 2004 6:01:57 PM
There's no such thing as a 4D cross product.

 
Reply to Message Edit Message laeuchli   Member since: 11/8/1999   Show Profile Email Poster
Posted - 17 January 2004 6:06:26 PM
Acctually I belive you can if you have 3 4D vectors..
Jesse

 
Reply to Message Edit Message Beer Hunter   Member since: 11/22/2000   From: Australia   Show Profile Email Poster
Posted - 17 January 2004 6:25:03 PM
In three dimensions, the cross product can be expressed in terms of a determinant. Extending this to four dimensions suggests:


A validility proof and simplified C source code can be found here.

 
Reply to Message Edit Message python_regious   Member since: 2/28/2001   From: Somewhere in the vauge vicinity of Betelgeuse   Show Profile Email Poster
Posted - 17 January 2004 10:11:41 PM
Yep, you can extend the vector product into any dimension you like, as long as it's greater than 2. You can do the 2 vector cross product in 3 and 7 dimensional space. For everything else you can multiply N-1, N dimensional vectors together, as a vector product. Sort of. The exact proof is on mathworld, and this subject ( with proof ) was posted about 4 months ago, so do a search.

You have to remember that you're unique, just like everybody else.

 
Reply to Message Edit Message grhodes_at_work   Moderator - Math and Physics   Member since: 5/31/2000   From: NC, USA   Show Profile Email Poster
Posted - 17 January 2004 11:31:25 PM
Actually, you can indeed have a cross product in 2 dimensions! As others pointed out, you need N - 1 vectors to calculate it, so for 3D you need 2 vectors, for 4D you need 3 vectors, and for 2D you need....1 vector! So, turns out, in 2D the cross product of a single vector is simply the normal to that vector. You also need a constraint to make the 2D cross product unique, and you might typically constrain it to be the normal found by rotating counterclockwise by 90 degrees.

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.

 
Reply to Message Edit Message grhodes_at_work   Moderator - Math and Physics   Member since: 5/31/2000   From: NC, USA   Show Profile Email Poster
Posted - 17 January 2004 11:31:54 PM
By the way, what do you need the 4D cross product for?

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.

 
Reply to Message Edit Message laeuchli   Member since: 11/8/1999   Show Profile Email Poster
Posted - 18 January 2004 12:35:57 AM
I wouldn't need it for anything, I just noticed that there was a DX3d fucntion that was for a 4D cross product...
Jesse

 
Reply to Message Edit Message python_regious   Member since: 2/28/2001   From: Somewhere in the vauge vicinity of Betelgeuse   Show Profile Email Poster
Posted - 18 January 2004 9:37:26 AM
quote:
Original post by grhodes_at_work
Actually, you can indeed have a cross product in 2 dimensions! As others pointed out, you need N - 1 vectors to calculate it, so for 3D you need 2 vectors, for 4D you need 3 vectors, and for 2D you need....1 vector! So, turns out, in 2D the cross product of a single vector is simply the normal to that vector. You also need a constraint to make the 2D cross product unique, and you might typically constrain it to be the normal found by rotating counterclockwise by 90 degrees.

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.


Yes of course, I mean't greater than or equal to two. The trick to find the normal to a 2D vector as:

If V is a vector [x, y] then the normal to that can be [y, -x], can be derived from the cross product determinant as:

| i j |
| x y |


You have to remember that you're unique, just like everybody else.

[edited by - python_regious on January 18, 2004 9:38:54 AM]

 
Reply to Message Edit Message Dmytry   Member since: 12/9/2003   From:   Show Profile Email Poster
Posted - 18 January 2004 11:06:14 AM
quote:
Original post by laeuchli
I wouldn't need it for anything, I just noticed that there was a DX3d fucntion that was for a 4D cross product...
Jesse


Wao...
Interesting,really interesting.. i'm wonder if it's work right.



About 2D crossproduct: i was somehow sure that 2d cross product is a scalar....maybe i was wrong...

What with 2D rotor(aka Nabla cross Field)?

also i'm pretty sure that 4d rotor are 6d vector.

[edited by - Dmytry on January 18, 2004 11:12:43 AM]

 
Reply to Message Edit Message ga   Member since: 3/11/2000   From:   Show Profile Email Poster
Posted - 19 January 2004 2:46:34 PM
quote:
Original post by Dmytry

About 2D crossproduct: i was somehow sure that 2d cross product is a scalar....maybe i was wrong...

What with 2D rotor(aka Nabla cross Field)?

also i'm pretty sure that 4d rotor are 6d vector.

[edited by - Dmytry on January 18, 2004 11:12:43 AM]


there's no 2D rotor since there's only one vector involved in the 2D cross product and the rotor needs 2.

I think you're referring to a 2D - pseudo - cross-product: set the z coordinate zero and you'll get a (0,0,z) vector as a result. then there's the 2D-pseudo-rotor rot V = dVy/dx - dVx/dy.



 
Reply to Message Edit Message grhodes_at_work   Moderator - Math and Physics   Member since: 5/31/2000   From: NC, USA   Show Profile Email Poster
Posted - 19 January 2004 6:02:02 PM
quote:
Original post by Dmytry About 2D crossproduct: i was somehow sure that 2d cross product is a scalar....maybe i was wrong...


I've heard that argument before, but it isn't quite right. The cross product always is the same order vector as the input vector(s). Thus, in 3D we have 2 input 3D vectors (x1,y1,z1) and (x2,y2,z2) that produce a cross product that is also a 3D vector (x3,y3,z3). The cross product here doesn't drop the z component. Same is true in 2D. You only need one input vector, (x1,y1) but the cross product is still a 2D vector (x2,y2).

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.

[edited by - grhodes_at_work on January 19, 2004 6:03:47 PM]

 
Reply to Message Edit Message Atheist   Member since: 7/6/2003   From: Germany   Show Profile Email Poster
Posted - 19 January 2004 7:53:38 PM
http://www.gamedev.net/community/forums/topic.asp?topic_id=181474

Iīd like to add that taking a "cross product" of n vectors in nD it should give you the signed volume of the paralleleptid (if thatīs the english name 4 it) created by the vectors.
So the question "is a cross product in 2D a scalar or a vector?" depends on the number of vectors you multiply which imho doesnīt have to be n-1 (at least I havenīt heard anything about a strict definition of THE vector product in other than 3D).

 
Reply to Message Edit Message python_regious   Member since: 2/28/2001   From: Somewhere in the vauge vicinity of Betelgeuse   Show Profile Email Poster
Posted - 19 January 2004 8:37:52 PM
Unforunately, the page that described the general cross product ( that extends into any dimension ), isn't there anymore. Though, I do point you to this thread, where it is sort of summarised, and a quote from the disappeared page:

quote:

Definition (generalized): The cross product of k vectors is a vector
perpendicular to the k vectors and of length equal to the k-volume
of the parallelepiped of the k vectors.

Theorem: The cross product of k vectors in R^n exists only for the following
pairs (n,k): (3,2), (7,2), (8,3), (n,n-1) and when n is even also for (n,1).



 
Reply to Message Edit Message YoshiN   Member since: 12/16/2001   From:   Show Profile Email Poster
Posted - 20 January 2004 12:37:21 AM
According to my multivariable calculus professor the crossproduct is defined by the determinate of the matrix containing the basis vectors and the vectors that you are crossing. Since the matrix obviously has to be square, the 2D cross product would have only 1 input vector but output a vector.

 
Reply to Message Edit Message Beer Hunter   Member since: 11/22/2000   From: Australia   Show Profile Email Poster
Posted - 20 January 2004 2:12:14 AM
quote:
Original post by python_regious
Unforunately, the page that described the general cross product ( that extends into any dimension ), isn't there anymore.
But it is here.

 
Reply to Message Edit Message Dmytry   Member since: 12/9/2003   From:   Show Profile Email Poster
Posted - 20 January 2004 6:20:51 AM
Hmmm.

But rotor in 2D are scalar.
And rotor in 4D are 6-D vector.
Why everyone writes "nabla cross field",if so?

I think best idea should be,really ,to define product of M N dimensional vectors,and number of components in resulting vector depend to N and M.

Or else we have problems with operators. Rotor are defined in 2d,3d,4d,5d,etc,and have as many components as many pairs of axises we have

About determinant of a matrix.
In very old book,not "defined as determinant" was written but "it's simpler to remember as determinant".

 
Reply to Message Edit Message ga   Member since: 3/11/2000   From:   Show Profile Email Poster
Posted - 20 January 2004 12:19:06 PM
Dmytry: i think you're right about rotors, it makes sense that way. you mean the 4D rotor of a vector field V then would be (dVx1/dx0 - dVx0/dx1, -(dVx2/dx0 - dVx0/dx2), dVx3/dx0 - dVx0/dx3, -(dVx2/dx1 - dVx1/dx2), dVx3/dx1 - dVx1/dx3, -(dVx3/dx2 - dVx2/dx3))?

so nabla cross field can only be used in 3D.

 
Reply to Message Edit Message python_regious   Member since: 2/28/2001   From: Somewhere in the vauge vicinity of Betelgeuse   Show Profile Email Poster
Posted - 20 January 2004 5:51:32 PM
quote:
Original post by Beer Hunter
quote:
Original post by python_regious
Unforunately, the page that described the general cross product ( that extends into any dimension ), isn't there anymore.
But it is here.


Hmmm... I tried the original link and it didn't work. Perhaps my computers buggering up...


You have to remember that you're unique, just like everybody else.

 
Reply to Message Edit Message Dmytry   Member since: 12/9/2003   From:   Show Profile Email Poster
Posted - 22 January 2004 6:24:35 PM
quote:
Original post by ga
Dmytry: i think you're right about rotors, it makes sense that way. you mean the 4D rotor of a vector field V then would be (dVx1/dx0 - dVx0/dx1, -(dVx2/dx0 - dVx0/dx2), dVx3/dx0 - dVx0/dx3, -(dVx2/dx1 - dVx1/dx2), dVx3/dx1 - dVx1/dx3, -(dVx3/dx2 - dVx2/dx3))?


Exactly.
quote:

so nabla cross field can only be used in 3D.

Maybe you're right,i got no good idea how to define good cross product of M N-dimensional vectors...

That idea about cross of two vectors only in 3d and 7d,and cross of n-1 vectors anywhere looks too ugly anyway (in 7d,both cross of 2 vectors and cross of 6 vectors are possible-it's looks too strange).Not like good math-like "dirty hacks" :O .
About that rotor-i never used 4d or 2d cross product(except pseudo-cross product).(but have used 2d rotor

Why cross product of N-dimensional vector(s) SHOULD be N-dimensional vector(s?) ? (i'm joking here ;-)

All times are ET (US)

Post Reply
 
Jump To:

Administrative Options:
Close Thread   Move/Archive Thread   Delete Thread   Reopen Thread


0.1572

About Us | Advertise on GameDev.net | Write for us
Đ 1999-2004 Gamedev.net, LLC. All rights reserved. Terms of Use Privacy Policy
Comments? Questions? Feedback? Click here!
GameDev.netTM, the GameDev.net logo, and GDNetTM are trademarks of GameDev.net, LLC