For Programmers: Free Programming Magazines  


Home > Archive > Mathematica > April 2007 > Re: CrossProduct in Spherical Coordinates









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: CrossProduct in Spherical Coordinates
Roger Bagula

2007-04-25, 8:10 am

gogoant06@yahoo.com.hk wrote:

>Dear all,
>
>I am really new to mathematica and I have met a damn simple problem.
>
>In[1]:=
><<Calculus`VectorAnalysis`
>
>In[2]:=
>CrossProduct[{1,0,0},{0,1,0},Spherical]
>
>Out[2]=
>{0,0,0}
>
>Why? Isn't the result supposed to be {0,0,1}, even in spherical
>coordinates?
>
>best regards,
>lion
>
>
>
>

The answer that you are thinking about it wrong:
spherical polar coordinates are { r, theta, phi}
without an r value in the coordinate the output will always be zero.
You need at least an angle and a radius to get any output at all.
Examples:
In[32]:=
CrossProduct[{1,0,1},{1,1,0},Spherical]

Out[32]=
{Sin[1], =CF=80/2, =CF=80/2}

In[33]:=
CrossProduct[{1,0,1},{0,1,1},Spherical]

Out[33]=
{0,0,0}

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com