mailr9062 - /1.3/maths_fns/rotation_matrix.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on May 28, 2009 - 15:37:
Author: bugman
Date: Thu May 28 15:37:08 2009
New Revision: 9062

URL: http://svn.gna.org/viewcvs/relax?rev=9062&view=rev
Log:
Renamed random_R() to R_random_axis().


Modified:
    1.3/maths_fns/rotation_matrix.py

Modified: 1.3/maths_fns/rotation_matrix.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/maths_fns/rotation_matrix.py?rev=9062&r1=9061&r2=9062&view=diff
==============================================================================
--- 1.3/maths_fns/rotation_matrix.py (original)
+++ 1.3/maths_fns/rotation_matrix.py Thu May 28 15:37:08 2009
@@ -204,6 +204,21 @@
     matrix[2,2] =  cos_b
 
 
+def R_random_axis(matrix, angle=0.0):
+    """Generate a random rotation matrix of fixed angle via the axis-angle 
notation.
+
+    Uniform point sampling on a unit sphere is used to generate a random 
axis orientation.  This,
+    together with the fixed rotation angle, is used to generate the random 
rotation matrix.
+    """
+
+    # Random rotation axis.
+    rot_axis = zeros(3, float64)
+    random_rot_axis(rot_axis)
+
+    # Generate the rotation matrix.
+    R_axis_angle(matrix, rot_axis, angle)
+
+
 def random_rot_axis(axis):
     """Generate a random rotation axis.
 
@@ -225,19 +240,3 @@
     axis[0] = cos(theta) * sin(phi)
     axis[1] = sin(theta) * sin(phi)
     axis[2] = cos(phi)
-
-
-def random_R(matrix, angle=0.0):
-    """Generate a random rotation matrix of fixed angle via the axis-angle 
notation.
-
-    Uniform point sampling on a unit sphere is used to generate a random 
axis orientation.  This,
-    together with the fixed rotation angle, is used to generate the random 
rotation matrix.
-
-    """
-
-    # Random rotation axis.
-    rot_axis = zeros(3, float64)
-    random_rot_axis(rot_axis)
-
-    # Generate the rotation matrix.
-    R_axis_angle(matrix, rot_axis, angle)




Related Messages


Powered by MHonArc, Updated Thu May 28 16:00:05 2009