MathGroup Archive 2008

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

Search the Archive

Re: Should RotationMatrix work with symbolic vectors?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg85973] Re: Should RotationMatrix work with symbolic vectors?
  • From: Januk <ggroup at sarj.ca>
  • Date: Fri, 29 Feb 2008 06:21:24 -0500 (EST)
  • References: <fq5qdj$kol$1@smc.vnet.net>

Hi Steve,

I have no answer why RotationMatrix doesn't work with symbolic
arguments.  Perhaps it is simply too messy?

As for your display question, while perhaps not the most elegant
solution, the following seems to work:
av = {avx, avy, avz};
bv = {bvx, bvy, bvz};
crsprd = Normalize[av\[Cross]bv];
denominator = Mean[Denominator[crsprd]];
HoldForm[num/den] /. {den -> denominator, num -> crsprd*denominator}

Good luck!

On Feb 28, 3:12=A0am, Steve Gray <stev... at roadrunner.com> wrote:
> It works fine when the "source" and "destination" vectors are =A0numeric
> (it gives a matrix, say rm2, such that rm2.a2 is parallel to b2):
>
> a2 = {1, 2, 3};
> b2 = {3, 5, 7};
> rm2 = N[RotationMatrix[{a2, b2}]]
>
> {{0.997846, =A00.028474, 0.059102},
> {-0.0301974, 0.999138, 0.028474},
> {-0.0582406,-0.0301974,0.997846}}
>
> and
>
> Normalize[rm2.a2] =A0 =A0 =A0 =A0 =A0 =A0 =A0(* rm2.Normalize[a2] also wor=
ks *)
> {0.329293, 0.548821, 0.76835}
>
> which is a unit vector parallel to b2. So far, great. But unless a2
> and b2 have numeric values, RotationMatrix does nothing.
>
> avec = {a2x, a2y};
> bvec = {b2x, b2y};
> RotationMatrix[{avec, bvec}] =A0 (* gives *)
>
> RotationMatrix[{{a2x, a2y}, {b2x, b2y}}]
>
> Can't it handle symbolics like most functions?
>
> While I'm asking about vectors, consider this example:
>
> av = {avx, avy, avz};
> bv = {bvx, bvy, bvz};
> Normalize[av\[Cross]bv] =A0(* which gives *)
>
> {(-avz bvy + avy bvz)/Sqrt[Abs[-avy bvx + avx bvy]^2 +
> =A0 Abs[avz bvx -avx bvz]^2 + Abs[-avz bvy + avy bvz]^2],
>
> =A0(avz bvx - avx bvz)/Sqrt[Abs[-avy bvx + avx bvy]^2 +
> =A0 Abs[avz bvx - avx bvz]^2 + Abs[-avz bvy + avy bvz]^2],
>
> =A0(-avy bvx + avx bvy)/Sqrt[ Abs[-avy bvx + avx bvy]^2 +
> Abs[avz bvx - avx bvz]^2 + Abs[-avz bvy + avy bvz]^2]}
>
> All three vector components have the same denominator. What's a good
> way to automatically show that for clarity and speed?
>
> =A0I'd appreciate any information.
>
> Steve Gray



  • Prev by Date: Re: Labeling axes in VectorFieldPlot3D?
  • Next by Date: Magnification?
  • Previous by thread: Should RotationMatrix work with symbolic vectors?
  • Next by thread: option to fix the speed of exported avi file