#### Archived

This topic is now archived and is closed to further replies.

# cross product (recursively)

This topic is 5919 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I''m trying to solve a problem with LISP involving making a function that computes the cross product. For example: (xprod ''(a b) ''(c d e)) = ((a c) (a d) (a e) (b c)...(b e)) Can anyone help me out with an algorithm or even source code? I could do it quite easily with iteration, but I have to do it recursively.

##### Share on other sites
Sounds VERY much like homework to me. Can you justify that this is NOT homework (and hence stop me from closing this thread)?

Cheers,

Timkin

##### Share on other sites
Actually its an extra credit problem. I didn''t know that was against the board rules. Close it if you like.

##### Share on other sites
heh, the threatening aspect of your message is kind of blunted by the "Cheers, Timkin" bit...

##### Share on other sites
Cheat. Make a cross product function that returns an n component vector orthogonal to n-1 n component vectors. Use the determinant representation of the cross product to determine how to do the recursion. Stop when you get one 2 component vector.

##### Share on other sites
Actually I figured it out late last night Thanks for the help anyway.

##### Share on other sites
_Josh,

There is a forum FAQ that describes my policy on homework. You can view it here:

http://www.gamedev.net/community/forums/showfaq.asp?forum_id=20

No harm done this time, but I am going to close the thread since you clearly were looking for an answer to a homework problem.

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.

##### Share on other sites

This topic is 5919 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

This topic is now closed to further replies.

1. 1
Rutin
24
2. 2
3. 3
JoeJ
20
4. 4
5. 5

• 9
• 46
• 41
• 23
• 13
• ### Forum Statistics

• Total Topics
631749
• Total Posts
3002033
×