Model.rotate#
- Model.rotate(axis_angle, rotation_angle)#
Rotates the model based on a user-defined rotation axis.
- Parameters:
axis_angle (double) – The angle in degrees which defines how far from horizontal the rotation axis is.
rotation_angle (double) – The angle in degrees which the model rotates.
Note
The rotation axis is defined by a line which runs horizontally through the center of the screen if the axis angle is zero. As the axis angle increases in magnitude, the axis of rotation rotates about the vector normal to the screen axis angle degrees.
Example#
Rotate the model about the horizontal screen axis 15 degrees#import hm import hm.entities as ent model = hm.Model() model.rotate(axis_angle=0.0, rotation_angle=15.0)
Rotate the model about the vertical screen axis 15 degrees#import hm import hm.entities as ent model = hm.Model() model.rotate(axis_angle=90.0, rotation_angle=15.0)