[Date Index]
[Thread Index]
[Author Index]
Re: What's wrong?
*To*: mathgroup at smc.vnet.net
*Subject*: [mg75327] Re: What's wrong?
*From*: jesse.woodroffe at gmail.com
*Date*: Wed, 25 Apr 2007 05:37:45 -0400 (EDT)
*References*: <f0kbuc$r25$1@smc.vnet.net>
>From the documentation on CrossProduct:
"...give the result when the vectors are given in the coordinate
system coordsys"
Mathematica's interpreting the vectors as being defined in a spherical
coordinate system, with each coordinate triplet being read as
{r,theta,phi}, not {x,y,z}. As a result, the second vector in your
cross product has r = 0, i.e. zero length. Hence the (somewhat)
confusing, although correct result.
If you want to actually use spherical vectors in this case, you'd
probably want to use the CoordinatesFromCartesian command. To
illustrate,
In[]:= cartx = CoordinatesFromCartesian[{1,0,0},Spherical]
Out[]:= {1,Pi/2,0}
In[]:= carty = CoordinatesFromCartesian[{0,1,0},Spherical]
Out[]:= {1,Pi/2,Pi/2}
In[]:= sphericalCross = CrossProduct[cartx,carty,Spherical]
Out[]:= {1,0,0}
In[]:= CoordinatesToCartesian[{1,0,0},Spherical]
Out[]:= {0,0,1}
Owing to the geometrical nature of the operation, I think that it's
safe to say that if you're interested in taking the cross product of
two vectors in an orthonormal basis {e1,e2,e3}, then the result should
be insensitive to the labels you assign to the bases, so long as
you're consistent in your interpretation (handedness &c.).
Jesse Woodroffe
On Apr 24, 2:34 am, "gogoan... at yahoo.com.hk" <gogoan... at yahoo.com.hk>
wrote:
> In[1]:=
> <<Calculus`VectorAnalysis`
>
> In[2]:=
> CrossProduct[{1,0,0},{0,1,0},Spherical]
>
> Out[2]=
> {0,0,0}
>
> Isn't the result supposed to be {0,0,1}, even in spherical
> coordinates?
>
> lion
Prev by Date:
**Re: Exporting images without white borders**
Next by Date:
**"hard" simplification**
Previous by thread:
**Re: What's wrong?**
Next by thread:
**Re: What's wrong?**
| |