class_docstr: A reference frame in classical mechanics.
  
  ReferenceFrame is a class used to represent a reference frame in classical
  mechanics. It has a standard basis of three unit vectors in the frame's
  x, y, and z directions.
  
  It also can have a rotation relative to a parent frame; this rotation is
  defined by a direction cosine matrix relating this frame's basis vectors to
  the parent frame's basis vectors.  It can also have an angular velocity
  vector, defined in another frame.
docstr: ReferenceFrame initialization method.
  
  A ReferenceFrame has a set of orthonormal basis vectors, along with
  orientations relative to other ReferenceFrames and angular velocities
  relative to other ReferenceFrames.
  
  Parameters
  ==========
  
  indices : tuple of str
      Enables the reference frame's basis unit vectors to be accessed by
      Python's square bracket indexing notation using the provided three
      indice strings and alters the printing of the unit vectors to
      reflect this choice.
  latexs : tuple of str
      Alters the LaTeX printing of the reference frame's basis unit
      vectors to the provided three valid LaTeX strings.
  
  Examples
  ========
  
  >>> from sympy.physics.vector import ReferenceFrame, vlatex
  >>> N = ReferenceFrame('N')
  >>> N.x
  N.x
  >>> O = ReferenceFrame('O', indices=('1', '2', '3'))
  >>> O.x
  O['1']
  >>> O['1']
  O['1']
  >>> P = ReferenceFrame('P', latexs=('A1', 'A2', 'A3'))
  >>> vlatex(P.x)
  'A1'
  
  ``symbols()`` can be used to create multiple Reference Frames in one
  step, for example:
  
  >>> from sympy.physics.vector import ReferenceFrame
  >>> from sympy import symbols
  >>> A, B, C = symbols('A B C', cls=ReferenceFrame)
  >>> D, E = symbols('D E', cls=ReferenceFrame, indices=('1', '2', '3'))
  >>> A[0]
  A_x
  >>> D.x
  D['1']
  >>> E.y
  E['2']
  >>> type(A) == type(D)
  True
  
  Unit dyads for the ReferenceFrame can be accessed through the attributes ``xx``, ``xy``, etc. For example:
  
  >>> from sympy.physics.vector import ReferenceFrame
  >>> N = ReferenceFrame('N')
  >>> N.yz
  (N.y|N.z)
  >>> N.zx
  (N.z|N.x)
  >>> P = ReferenceFrame('P', indices=['1', '2', '3'])
  >>> P.xx
  (P['1']|P['1'])
  >>> P.zy
  (P['3']|P['2'])
  
  Unit dyadic is also accessible via the ``u`` attribute:
  
  >>> from sympy.physics.vector import ReferenceFrame
  >>> N = ReferenceFrame('N')
  >>> N.u
  (N.x|N.x) + (N.y|N.y) + (N.z|N.z)
  >>> P = ReferenceFrame('P', indices=['1', '2', '3'])
  >>> P.u
  (P['1']|P['1']) + (P['2']|P['2']) + (P['3']|P['3'])
docstr_tok: ["ReferenceFrame","initialization","method",".","A","ReferenceFrame","has","a","set","of","orthonormal","basis","vectors",",","along","with","orientations","relative","to","other","ReferenceFrames","and","angular","velocities","relative","to","other","ReferenceFrames",".","Parameters","==========","indices",":","tuple","of","str","Enables","the","reference","frame","'s","basis","unit","vectors","to","be","accessed","by","Python","'s","square","bracket","indexing","notation","using","the","provided","three","indice","strings","and","alters","the","printing","of","the","unit","vectors","to","reflect","this","choice",".","latexs",":","tuple","of","str","Alters","the","LaTeX","printing","of","the","reference","frame","'s","basis","unit","vectors","to","the","provided","three","valid","LaTeX","strings",".","Examples","========",">",">",">","from","sympy.physics.vector","import","ReferenceFrame",",","vlatex",">",">",">","N","=","ReferenceFrame","(","'N","'",")",">",">",">","N.x","N.x",">",">",">","O","=","ReferenceFrame","(","'","O","'",",","indices=","(","'","1","'",",","'","2","'",",","'","3","'",")",")",">",">",">","O.x","O","[","'","1","'","]",">",">",">","O","[","'","1","'","]","O","[","'","1","'","]",">",">",">","P","=","ReferenceFrame","(","'","P","'",",","latexs=","(","'A1","'",",","'A2","'",",","'A3","'",")",")",">",">",">","vlatex","(","P.x",")","'A1'","``","symbols","(",")","``","can","be","used","to","create","multiple","Reference","Frames","in","one","step",",","for","example",":",">",">",">","from","sympy.physics.vector","import","ReferenceFrame",">",">",">","from","sympy","import","symbols",">",">",">","A",",","B",",","C","=","symbols","(","'","A","B","C","'",",","cls=ReferenceFrame",")",">",">",">","D",",","E","=","symbols","(","'D","E","'",",","cls=ReferenceFrame",",","indices=","(","'","1","'",",","'","2","'",",","'","3","'",")",")",">",">",">","A","[","0","]","A_x",">",">",">","D.x","D","[","'","1","'","]",">",">",">","E.y","E","[","'","2","'","]",">",">",">","type","(","A",")","==","type","(","D",")","True","Unit","dyads","for","the","ReferenceFrame","can","be","accessed","through","the","attributes","``","xx","``",",","``","xy","``",",","etc",".","For","example",":",">",">",">","from","sympy.physics.vector","import","ReferenceFrame",">",">",">","N","=","ReferenceFrame","(","'N","'",")",">",">",">","N.yz","(","N.y|N.z",")",">",">",">","N.zx","(","N.z|N.x",")",">",">",">","P","=","ReferenceFrame","(","'","P","'",",","indices=","[","'","1","'",",","'","2","'",",","'","3","'","]",")",">",">",">","P.xx","(","P","[","'","1","'","]","|P","[","'","1","'","]",")",">",">",">","P.zy","(","P","[","'","3","'","]","|P","[","'","2","'","]",")","Unit","dyadic","is","also","accessible","via","the","``","u","``","attribute",":",">",">",">","from","sympy.physics.vector","import","ReferenceFrame",">",">",">","N","=","ReferenceFrame","(","'N","'",")",">",">",">","N.u","(","N.x|N.x",")","+","(","N.y|N.y",")","+","(","N.z|N.z",")",">",">",">","P","=","ReferenceFrame","(","'","P","'",",","indices=","[","'","1","'",",","'","2","'",",","'","3","'","]",")",">",">",">","P.u","(","P","[","'","1","'","]","|P","[","'","1","'","]",")","+","(","P","[","'","2","'","]","|P","[","'","2","'","]",")","+","(","P","[","'","3","'","]","|P","[","'","3","'","]",")"]
code: def __init__(self, name, indices=None, latexs=None, variables=None):
      """ReferenceFrame initialization method.
  
      A ReferenceFrame has a set of orthonormal basis vectors, along with
      orientations relative to other ReferenceFrames and angular velocities
      relative to other ReferenceFrames.
  
      Parameters
      ==========
  
      indices : tuple of str
          Enables the reference frame's basis unit vectors to be accessed by
          Python's square bracket indexing notation using the provided three
          indice strings and alters the printing of the unit vectors to
          reflect this choice.
      latexs : tuple of str
          Alters the LaTeX printing of the reference frame's basis unit
          vectors to the provided three valid LaTeX strings.
  
      Examples
      ========
  
      >>> from sympy.physics.vector import ReferenceFrame, vlatex
      >>> N = ReferenceFrame('N')
      >>> N.x
      N.x
      >>> O = ReferenceFrame('O', indices=('1', '2', '3'))
      >>> O.x
      O['1']
      >>> O['1']
      O['1']
      >>> P = ReferenceFrame('P', latexs=('A1', 'A2', 'A3'))
      >>> vlatex(P.x)
      'A1'
  
      ``symbols()`` can be used to create multiple Reference Frames in one
      step, for example:
  
      >>> from sympy.physics.vector import ReferenceFrame
      >>> from sympy import symbols
      >>> A, B, C = symbols('A B C', cls=ReferenceFrame)
      >>> D, E = symbols('D E', cls=ReferenceFrame, indices=('1', '2', '3'))
      >>> A[0]
      A_x
      >>> D.x
      D['1']
      >>> E.y
      E['2']
      >>> type(A) == type(D)
      True
  
      Unit dyads for the ReferenceFrame can be accessed through the attributes ``xx``, ``xy``, etc. For example:
  
      >>> from sympy.physics.vector import ReferenceFrame
      >>> N = ReferenceFrame('N')
      >>> N.yz
      (N.y|N.z)
      >>> N.zx
      (N.z|N.x)
      >>> P = ReferenceFrame('P', indices=['1', '2', '3'])
      >>> P.xx
      (P['1']|P['1'])
      >>> P.zy
      (P['3']|P['2'])
  
      Unit dyadic is also accessible via the ``u`` attribute:
  
      >>> from sympy.physics.vector import ReferenceFrame
      >>> N = ReferenceFrame('N')
      >>> N.u
      (N.x|N.x) + (N.y|N.y) + (N.z|N.z)
      >>> P = ReferenceFrame('P', indices=['1', '2', '3'])
      >>> P.u
      (P['1']|P['1']) + (P['2']|P['2']) + (P['3']|P['3'])
  
      """
  
      if not isinstance(name, str):
          raise TypeError("Need to supply a valid name")
      # The if statements below are for custom printing of basis-vectors for
      # each frame.
      # First case, when custom indices are supplied
      if indices is not None:
          if not isinstance(indices, (tuple, list)):
              raise TypeError("Supply the indices as a list")
          if len(indices) != 3:
              raise ValueError("Supply 3 indices")
          for i in indices:
              if not isinstance(i, str):
                  raise TypeError("Indices must be strings")
          self.str_vecs = [
              (name + "['" + indices[0] + "']"),
              (name + "['" + indices[1] + "']"),
              (name + "['" + indices[2] + "']"),
          ]
          self.pretty_vecs = [
              (name.lower() + "_" + indices[0]),
              (name.lower() + "_" + indices[1]),
              (name.lower() + "_" + indices[2]),
          ]
          self.latex_vecs = [
              (r"\mathbf{\hat{%s}_{%s}}" % (name.lower(), indices[0])),
              (r"\mathbf{\hat{%s}_{%s}}" % (name.lower(), indices[1])),
              (r"\mathbf{\hat{%s}_{%s}}" % (name.lower(), indices[2])),
          ]
          self.indices = indices
      # Second case, when no custom indices are supplied
      else:
          self.str_vecs = [(name + ".x"), (name + ".y"), (name + ".z")]
          self.pretty_vecs = [
              name.lower() + "_x",
              name.lower() + "_y",
              name.lower() + "_z",
          ]
          self.latex_vecs = [
              (r"\mathbf{\hat{%s}_x}" % name.lower()),
              (r"\mathbf{\hat{%s}_y}" % name.lower()),
              (r"\mathbf{\hat{%s}_z}" % name.lower()),
          ]
          self.indices = ["x", "y", "z"]
      # Different step, for custom latex basis vectors
      if latexs is not None:
          if not isinstance(latexs, (tuple, list)):
              raise TypeError("Supply the indices as a list")
          if len(latexs) != 3:
              raise ValueError("Supply 3 indices")
          for i in latexs:
              if not isinstance(i, str):
                  raise TypeError("Latex entries must be strings")
          self.latex_vecs = latexs
      self.name = name
      self._var_dict = {}
      # The _dcm_dict dictionary will only store the dcms of adjacent
      # parent-child relationships. The _dcm_cache dictionary will store
      # calculated dcm along with all content of _dcm_dict for faster
      # retrieval of dcms.
      self._dcm_dict = {}
      self._dcm_cache = {}
      self._ang_vel_dict = {}
      self._ang_acc_dict = {}
      self._dlist = [
          self._dcm_dict,
          self._ang_vel_dict,
          self._ang_acc_dict,
      ]
      self._cur = 0
      self._x = Vector([(Matrix([1, 0, 0]), self)])
      self._y = Vector([(Matrix([0, 1, 0]), self)])
      self._z = Vector([(Matrix([0, 0, 1]), self)])
      # Associate coordinate symbols wrt this frame
      if variables is not None:
          if not isinstance(variables, (tuple, list)):
              raise TypeError(
                  "Supply the variable names as a list/tuple"
              )
          if len(variables) != 3:
              raise ValueError("Supply 3 variable names")
          for i in variables:
              if not isinstance(i, str):
                  raise TypeError("Variable names must be strings")
      else:
          variables = [name + "_x", name + "_y", name + "_z"]
      self.varlist = (
          CoordinateSym(variables[0], self, 0),
          CoordinateSym(variables[1], self, 1),
          CoordinateSym(variables[2], self, 2),
      )
      ReferenceFrame._count += 1
      self.index = ReferenceFrame._count
  
imports: from sympy import diff, expand, sin, cos, sympify, eye, zeros, ImmutableMatrix, MatrixBase
  from sympy.core.symbol import Symbol
  from sympy.simplify.trigsimp import trigsimp
  from sympy.physics.vector.vector import Vector, _check_vector
  from sympy.utilities.misc import translate
  from warnings import warn
label_desc: Use image node_id 1 to create a new ReferenceFrame object  with example: obj = ReferenceFrame(name, indices, latexs, variables)