From: John Stone (johns_at_ks.uiuc.edu)
Date: Wed Jan 10 2007 - 12:55:53 CST

Hi,
  If you want the view direction vector, you can get this with
(in current versions of VMD, things will change in the future
 as I begin enabling camera manipulation features that are currently
 experimental):

If a molecule is loaded, you can get this with:
  set eye_vector [vectrans \
    [measure inverse [lindex [molinfo top get rotate_matrix] 0]] {0 0 -1} \
  ]

Cheers,
  John Stone

On Wed, Jan 10, 2007 at 10:23:29AM -0800, Eric Peterson wrote:
> Does someone know a method to find out what the normal axis is to the
> current "window" the user is looking though at the molecules rendered by
> VMD? I would have thought the "display" tcl command could return this
> information but I don't see anything in it that tells you what the relative
> rotation of the current scene is to the xyz axes.
>
> Eric
>

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email: johns_at_ks.uiuc.edu                 Phone: 217-244-3349
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078