Archived

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

_Josh

cross product (recursively)

Recommended Posts

_Josh    122
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 this post


Link to post
Share on other sites
Timkin    864
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 this post


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

Share this post


Link to post
Share on other sites
LilBudyWizer    491
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 this post


Link to post
Share on other sites
grhodes_at_work    1385
_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 this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.