From: John Stone (
Date: Tue Jan 27 2009 - 22:29:29 CST

  The simplest way to perform rotation transformations on axes
that don't pass through the origin is to first perform a translation
that brings the endpoint of the axis to the origin, then perform the
rotation (about the origin), and then translate back. If I understood
your question correctly, you'd translate by (0,0,-1) first, then
rotate, then translate by (0,0,1) to finish. You should be able to
use this knowledge to form the correct trans command sequence, see
the documentation here:

  John Stone

On Fri, Jan 16, 2009 at 11:49:24AM -0700, Edward Lyman wrote:
> Hi all,
> I am trying to rotate a selection about an arbitrary axis which does
> not pass through the origin. It looks like 'trans' routine can give me
> the matrix i need, but i can't figure out which combo of axis, offset,
> center, and origin will do the trick.
> let's say i want to rotate 20 degrees about the axis {1,1,1} passing
> through the point {0,0,1}. can anyone give the trans command that will
> give me the matrix i seek?
> thx very much,
> Ed

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:                 Phone: 217-244-3349
  WWW:      Fax: 217-244-6078