MathGroup Archive 1994

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Response to VectorAnalysis

  • To: MATHGROUP at
  • Subject: [mg255] Re: [mg238] Response to VectorAnalysis
  • From: Jerry Keiper <keiper>
  • Date: Thu, 1 Dec 1994 08:54:29 -0600

  > Here is a follow on question regarding my understanding of
  > VectorAnalysis.  Does it convert vectors to cartesian vectors, perform
  > the requested operation and then convert back?  I'm wondering
  > why the Sin^2+Cos^2 terms show up in the first component of Mr. Chen's
  > operation.

You can decide for yourself.  Here is the code, straight out of the

  (* ===================== Cross Product ====================== *)

CrossProduct[v1_?$VecQ, v2_?$VecQ, coordsys_:$CoordinateSystem] :=
    Module[{cs = $ExpandCoordSys[coordsys], cv1, cv2, m},
	(m = Minors[{cv1, cv2}, 2][[1]];
	$CTFromCart[{m[[3]], -m[[2]], m[[1]]}, cs]) /; (cs =!= $Failed &&
				(cv1 = $CTToCart[v1, cs]) =!= $Failed &&
				(cv2 = $CTToCart[v2, cs]) =!= $Failed)];

Jerry B. Keiper
keiper at
Wolfram Research, Inc.

PS:  This is not meant as a criticism of the question, just an observation
regarding a continual criticism of Mathematica.  It never ceases to amaze
me that Mathematica is continually bashed, claiming that we don't reveal
the source code.  In fact much of the code is in top-level Mathematica
code, visible to anyone who wishes to see it, but very few people are
ever interested in looking at it.

  • Next by Date: Re: FindMinimum
  • Next by thread: Re: FindMinimum