'Creates a new CoordSys3D oriented in the user-specified way
with respect to this system.
Please refer to the documentation of the orienter classes
for more information about the orientation procedure.
Parameters
name : str
The name of the new CoordSys3D instance.
orienters : iterable/Orienter
An Orienter or an iterable of Orienters for orienting the
new coordinate system.
If an Orienter is provided, it is applied to get the new
system.
If an iterable is provided, the orienters will be applied
in the order in which they appear in the iterable.
location : Vector(optional)
The location of the new coordinate system\'s origin wrt this
system\'s origin. If not specified, the origins are taken to
be coincident.
vector_names, variable_names : iterable(optional)
Iterables of 3 strings each, with custom names for base
vectors and base scalars of the new system respectively.
Used for simple str printing.
Examples
>>> from sympy.vector import CoordSys3D
>>> from sympy import symbols
>>> q0, q1, q2, q3 = symbols(\'q0 q1 q2 q3\')
>>> N = CoordSys3D(\'N\')
Using an AxisOrienter
>>> from sympy.vector import AxisOrienter
>>> axis_orienter = AxisOrienter(q1, N.i + 2 * N.j)
>>> A = N.orient_new(\'A\', (axis_orienter, ))
Using a BodyOrienter
>>> from sympy.vector import BodyOrienter
>>> body_orienter = BodyOrienter(q1, q2, q3, \'123\')
>>> B = N.orient_new(\'B\', (body_orienter, ))
Using a SpaceOrienter
>>> from sympy.vector import SpaceOrienter
>>> space_orienter = SpaceOrienter(q1, q2, q3, \'312\')
>>> C = N.orient_new(\'C\', (space_orienter, ))
Using a QuaternionOrienter
>>> from sympy.vector import QuaternionOrienter
>>> q_orienter = QuaternionOrienter(q0, q1, q2, q3)
>>> D = N.orient_new(\'D\', (q_orienter, ))'

def orient_new(self, name, orienters, location=None, vector_names=None, variable_names=None):

    if isinstance(orienters, Orienter):
        if isinstance(orienters, AxisOrienter):
            final_matrix = orienters.rotation_matrix(self)
        else:
            final_matrix = orienters.rotation_matrix()
        final_matrix = trigsimp(final_matrix)
    else:
        final_matrix = Matrix(eye(3))
        for orienter in orienters:
            if isinstance(orienter, AxisOrienter):
                final_matrix *= orienter.rotation_matrix(self)
            else:
                final_matrix *= orienter.rotation_matrix()
    return CoordSys3D(name, rotation_matrix=final_matrix, vector_names=vector_names, variable_names=variable_names, location=location, parent=self)
