cross product (recursively)

Started by
5 comments, last by _Josh 21 years, 11 months ago
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.
Advertisement
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
Actually its an extra credit problem. I didn''t know that was against the board rules. Close it if you like.
heh, the threatening aspect of your message is kind of blunted by the "Cheers, Timkin" bit...
_________________________________________________________________________________The wind shear alone from a pink golfball can take the head off a 90-pound midget from 300 yards.-Six String Samurai
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.
Keys to success: Ability, ambition and opportunity.
Actually I figured it out late last night Thanks for the help anyway.
_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.
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net

This topic is closed to new replies.

Advertisement