go to www.geomview.org home page
 
Home

Overview
FAQ
Documentation

Download

Mailing List

Geomview For Windows?

Support
Users
Development

Bug Reporting
Contributing
Contact Us

Sponsors

 

Site Search

 

Advanced
Search

 
About the software@geom archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Closed REQ 5690]: rotation formula


  • To: software@geom.umn.edu
  • Subject: Re: [Closed REQ 5690]: rotation formula
  • From: daemon
  • Date: Sun, 31 Dec 1995 11:00:06 -0600 (CST)

The rotations are expressed, not as Euler angles, but as vectors whose
direction gives the axis of rotation and whose magnitude gives the
rotation angle (in radians).  The rotation matrix for "rotate X Y Z" comes from

  a = magnitude of vector(X Y Z)
  (x y z) = (X Y Z) / a;		(so (x y z) forms a unit vector)

  s = sin(a)
  c = cos(a)
  v = 1-c

Now the rotation matrix is

  x^2*v + c		x*y*v + z*s		x*z*v - y*s		0

  x*y*v - z*s		y^2*v + c		y*z*v + x*s		0

  x*z*v + y*s		y*z*v - x*s		z^2*v + c		0

  0			0			0			1

If you get the geomview source code, this appears in
   src/bin/geomview/common/transform.c  	(see _rotate()) and
   src/lib/geometry/transform3/tm3rotate.c	(see Tm3Rotate())


 
Home | Overview | FAQ | Documentation | Support | Download | Mailing List
Windows? | Development | Bug Reporting | Contributing | Contact Us | Sponsors
 
site hosted by
SourceForge Logo