Skip to content


S.Y. Lee edited this page Mar 4, 2019 · 1 revision

Rough sketch of Rotator classes


  1. Do the orient classes have to be immutable? Since they are more of 'helpers' than any actual SymPy entities? Would there be any SymPy related operations on them?



axis_orient = AxisOrienter(angle, axis)



new_axis_orient = -axis_orient #new_axis_orient will rotate by negative of original angle, about same axis

orientation_angle = axis_orient.angle

orientation_axis = axis_orient.axis

rotation_matrix = axis_orient.rotation_matrix


body_orient = BodyOrienter(angle1, angle2, angle3, rotation_order)



angle1 = body_orient.angle1

rotation_matrix = body_orient.rotation_matrix


(similar to body orienter)


q_orient = QuaternionOrienter(q0, q1, q2, q3)


rotation_matrix = q_orient.rotation_matrix

How will orientations be applied?

Using a CoordSysCartesian's orient_new method. The methods of type 'orient_new_<orientation_type>' will be scraped.The user would be able to provide as many orienters as he wants, in one call of 'orient_new'. This would mean an easy API for multiple rotations at a single go, without having to initialize intermediate coordinate systems. This not only reduces the code length, but also shortens the length of the frame tree, which would otherwise be filled with unnecessary 'intermediate' systems.

>>> some_system.orient_new('new_name', orienter1, orienter2, orienter3, ..., location = some_position_vector)

(some_position_vector is by default)

Moreover, the same orienter could be used by a user for orienting different system - either by coupling different combinations of orienters together, or by modifying the axis/angle/etc. and reapplying. THe same orienter could also be applied on different systems to get different new coordinate systems.

Clone this wiki locally
You can’t perform that action at this time.