Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

To visualize an eigenvector and value calculation I tried to display the eigenvectors (scaled by the eigenvalues) as arrows in a Graphics3D plot using Manipulate. The (symmetric) matrix is a function of three variables, so I used the sliders to set the point at which I evaluated the matrix.

This worked rather nicely, but as I change the Manipulate sliders, the box size and orientation and scaling changes which kills the effectiveness of the animation attempt.

I'm looking for a Graphics3D option that would prevent this dynamic scaling of the bounding box size and orientation. ViewAngle and ViewCenter looked the most appropriate, but didn't produce the result I expected.

Any idea how to do this?

For reference (and possible experimentation), here's the notebook content for the visualization:

Clear[o, e, e1, e2, e3, standardBasis, ee, ev, arrows, \
arrowsReference,  x, y , z , p]
o := {0, 0, 0}
e1 := {1, 0, 0}
e2 := {0, 1, 0}
e3 := {0, 0, 1}
standardBasis := {e1, e2, e3}
Manipulate[
 e := {{2 y, x, x}, {x, 0, z}, {x, z, -1}} ;
 p := {x, y, z} ;
 ev = Eigenvalues[e] ;
 (*
 Taking the orthonormal eigenvectors, and scaling them by their \
eigenvalues to get a feel for their magnitude and direction.
  *)
 ee := ev Map[ Normalize, Eigenvectors[e]]  //
   N ; (* note: sneaky multiplication of lists, pairwise eigenvalue \
times eigenvector as in:
 a = {1.5, 2}
 b = {2, 3}
  a b

 which produces: {3, 6}
 *)
 arrows = Table[Arrow[{p, p + Part[ee, i]}], {i, 3}] ;
 arrowsReference =
  Table[Arrow[{p, p + Part[standardBasis, i]}], {i, 3}] ;
 Graphics3D[{Red, Arrowheads[.05], arrows, Blue, Arrow[{o, p}],
   Green, arrowsReference}, Boxed -> True, Axes -> True],
 {{x, 1}, -10, 10},
 {{y, 2}, -10, 10},
 {{z, 4}, -10, 10}]
share|improve this question
2  
Have you tried setting SphericalRegion -> True in Graphics3D[]? –  J. M. Feb 8 '12 at 3:00
    
I hadn't tried SphericalRegion, but it doesn't change things noticeably. –  Peeter Joot Feb 8 '12 at 3:10
add comment

1 Answer

up vote 3 down vote accepted

Have you tried setting PlotRange->10 ?

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.