Implementing and interpolating rotations from a computing input device
AssigneeUniversity of Utah Research Foundation
InventorsRobert Andrew Palais, Richard Sheldon Palais
Life of this patent
Estimating the term…
Abstract
Novel and simple methods, systems, and computer program products for implementing a 3D rotation using input from a mouse, trackball, or other input device are described. Methods of implementing rotations are presented which lead to new realizations of the 3D rotation group and its double-cover, the unit quaternions. New methods, systems, and computer program products are also presented for interpolating rotations of a 3D scene that is more efficient than previously-known quaternion-based methods. The new methods are also used to derive the quaternion composition formula from the geometry of 3D rotations.
Claims18
A computer program product for implementing a method for interpolating rotations from a computing input device, the computer program product comprising one or more computer storage devices having computer executable instructions encoded thereon which, when executed upon one or more computer processors, perform the method comprising:
- receiving one or more data structures comprising two rotations, A1 and A2;
- expressing each rotation as a composition of two reflections, each reflection having a common initial reflection for each of the rotations, such that A1=R1R and A2=R2R1 and each reflection Rj being of the form Rj=2ujujT−I;
- interpolating two unit vectors, u0 and u1, by us, 0<s<1, using a standard spherical interpolation on a two-dimensional unit sphere in three-dimensions;
- computing interpolated rotations using the formula AS=RsR.
A computer program product for implementing a method for constructing a rotation matrix for rotating a unit vector u0 to another unit vector u1 and preserving a plane and axis defined by the unit vectors for rotating a computer animated object, the computer program product comprising one or more computer storage devices having computer executable instructions encoded thereon which, when executed upon one or more computer processors, perform the method comprising:
- computing a sum, s, of the unit vectors, s=u0+u1;
- determining whether the sum, s, is equal to zero;
- generating a rotation matrix based upon the unit vectors and the sum, s;
- and
- computing a rotation matrix, A, as a result of the formula:
- A=I−2sst/(sts)+2u1uot.
A computer program product for implementing a method for rotating vectors defining a viewpoint of a viewer of a computer graphics output device to implement rotation of a computer generated image by taking a unit vector u0 to another unit vector u1 and preserving the plane and axis defined by the unit vectors, the computer program product comprising one or more computer storage devices having computer executable instructions encoded thereon which, when executed upon one or more computer processors, perform the method comprising:
- receiving data indicative of unit vectors u0 and u1 from a computer generated input device;
- computing a rotation as seen from the viewpoint by performing an inverse rotation A−1 on an orthogonal frame describing an orientation of a viewpoint, wherein performing the inverse rotation A−1 on an orthogonal frame comprises:
- constructing a sum s of the unit vectors, s=u0+u1;
- computing a normalization factor k=2/sTs;
- performing an inverse rotation for two of three vectors of a viewpoint frame, e0 and e1, by reflecting in s, then reflecting in computing u0, by applying the following equations:
- w=kssTej−ej, and
- A−1ej=2u0u0Twj−wj;
- and
- determining a third viewpoint orientation vector e2 by computing a cross product of the two vectors that have been rotated such that e2=e0×e1.
A computer program product for implementing a method for calculating a spherical interpolation of two unit quaternions, the computer program product comprising one or more computer storage devices having computer executable instructions encoded thereon which, when executed upon one or more computer processors, perform the method comprising:
- accessing a data structure comprising two unit quarternions, Q0 and Q1;
- determining that L((s+t)/2)=0.5(Q(s)+Q(t)) does not result in a unit quaternion;
- normalizing Q((s+t)/2)=L((s+t)/2)/∥L((s+t)/2)∥ to obtain unit quaternions with to equally spaced Qt values, wherein
- the normalization of Q((s+t)/2)=L((s+t)/2)/∥L((s+t)/2)∥ with s=0 and t=1 produces Q(½);
- the normalization of Q((s+t)/2)=L((s+t)/2)/∥L((s+t)/2)∥ with s=0 and t=½ produces Q(¼);
- and
- the normalization of Q((s+t)/2)=L((s+t)/2)/∥L((s+t)/2)∥ with s=½ and t=1 produces Q(¾).
A computer program product for implementing a method for mapping a point in an e1-e2 plane orthogonal to a vector e3 to a point in the plane orthogonal to an arbitrary given unit vector u, the computer program product comprising one or more computer storage devices having computer executable instructions encoded thereon which, when executed upon one or more computer processors, perform the method comprising:
- accessing a data structure comprising a vector v=c1e1+c2e2;
- rotating the vector v by applying a rotation taking e3 to u, wherein applying the rotation taking e3 to u to the vector v comprises:
- applying a reflection in e3 to the vector v, resulting in a vector w;
- and
- applying a reflection in a sum, e3+u, to the vector w.
A system for implementing a method for interpolating rotations from a computing input device, the system comprising one or more computer processors and one or more computer storage devices having computer executable instructions encoded thereon which, when executed upon the one or more computer processors, perform the method comprising:
- receiving one or more data structures comprising two rotations, A1 and A2;
- expressing each rotation as a composition of two reflections, each reflection having a common initial reflection for each of the rotations, such that A1=R1R and A2=R2R1 and each reflection Rj being of the form Rj=2ujujT−I;
- interpolating two unit vectors, u0 and u1, by us, 0<s<1, using a standard spherical interpolation on a two-dimensional unit sphere in three-dimensions;
- computing interpolated rotations using the formula AS=RsR.
A system for implementing a method for constructing a rotation matrix for rotating a unit vector u0 to another unit vector u1 and preserving a plane and axis defined by the unit vectors for rotating a computer animated object, the system comprising one or more computer processors and one or more computer storage devices having computer executable instructions encoded thereon which, when executed upon the one or more computer processors, perform the method comprising:
- computing a sum, s, of the unit vectors, s=u0+u1;
- determining whether the sum, s, is equal to zero;
- generating a rotation matrix based upon the unit vectors and the sum, s;
- and
- computing a rotation matrix, A, as a result of the formula:
- A=I−2sst/(sts)+2u1uot.
A system for implementing a method for rotating vectors defining a viewpoint of a viewer of a computer graphics output device to implement rotation of a computer generated image by taking a unit vector u0 to another unit vector u1 and preserving the plane and axis defined by the unit vectors, the system comprising one or more computer processors and one or more computer storage devices having computer executable instructions encoded thereon which, when executed upon the one or more computer processors, perform the method comprising:
- receiving data indicative of unit vectors u0 and u1 from a computer generated input device;
- computing a rotation as seen from the viewpoint by performing an inverse rotation A−1 on an orthogonal frame describing an orientation of a viewpoint, wherein performing the inverse rotation A−1 on an orthogonal frame comprises:
- constructing a sum s of the unit vectors, s=u0+u1;
- computing a normalization factor k=2/sTs;
- performing an inverse rotation for two of three vectors of a viewpoint frame, e0 and e1, by reflecting in s, then reflecting in computing u0, by applying the following equations:
- w=kssTej−ej, and
- A−1ej=2u0u0Twj−wj;
- and
- determining a third viewpoint orientation vector e2 by computing a cross product of the two vectors that have been rotated such that e2=e0×e1.
A system for implementing a method for calculating a spherical interpolation of two unit quaternions, the system comprising one or more computer processors and one or more computer storage devices having computer executable instructions encoded thereon which, when executed upon the one or more computer processors, perform the method comprising:
- accessing a data structure comprising two unit quarternions, Q0 and Q1;
- determining that L((s+t)/2)=0.5(Q(s)+Q(t)) does not result in a unit quaternion;
- normalizing Q((s+t)/2)=L((s+t)/2)/∥L((s+t)/2)∥ to obtain unit quaternions with to equally spaced Qt values, wherein
- the normalization of Q((s+t)/2)=L((s+t)/2)/∥L((s+t)/2)∥ with s=0 and t=1 produces Q(½);
- the normalization of Q((s+t)/2)=L((s+t)/2)/∥L((s+t)/2)∥ with s=0 and t=½ produces Q(¼);
- and
- the normalization of Q((s+t)/2)=L((s+t)/2)/∥L((s+t)/2)∥ with s=½ and t=1 produces Q(¾).
A system for implementing a method for mapping a point in an e1-e2 plane orthogonal to a vector e3 to a point in the plane orthogonal to an arbitrary given unit vector u, the system comprising one or more computer processors and one or more computer storage devices having computer executable instructions encoded thereon which, when executed upon the one or more computer processors, perform the method comprising:
- accessing a data structure comprising a vector v=c1e1+c2e2;
- rotating the vector v by applying a rotation taking e3 to u, wherein applying the rotation taking e3 to u to the vector v comprises:
- applying a reflection in e3 to the vector v, resulting in a vector w;
- and
- applying a reflection in a sum, e3+u, to the vector w.
Dependencies are inferred from the claim text.