PoreMS 0.3
  • API
  • Molecule
  • Pore
  • Workflow
  • Pore shape examples
  • Site
    • Page
        • angle_polar
          • angle_polar()
    • angle_polar
      • angle_polar()
    Source

    angle_polar¶

    porems.geometry.angle_polar(pos, is_deg=False)¶

    Calculate the polar angle of a position vector \(\boldsymbol{a}\in\mathbb{R}^3\), which is the angle of the x-axis towards the reflected position vector on the x-y-plane

    \[\begin{split}\text{polar}(\boldsymbol{a})=\arctan2(x,y)\left\{ \begin{array}{ll} \tan^{-1}\left(\frac{y}{x}\right)&x>0\\ \tan^{-1}\left(\frac{y}{x}\right)+\pi&x<0,y>0\\ \pm\pi&x<0,y=0\\ \tan^{-1}\left(\frac{y}{x}\right)-\pi&x<0,y<0\\ +\frac{\pi}{2}&x=0,y>0\\ -\frac{\pi}{2}&x=0,y<0 \end{array} \right.\end{split}\]

    with \(x\) as the first vector entry and \(y\) as the second.

    Parameters:
    poslist

    Position vector \(\boldsymbol{a}\)

    is_degbool, optional

    True if the output should be in degree

    Returns:
    anglefloat

    Polar angle

    Back to top

    © Copyright 2021, Hamzeh Kraus.
    Created using Sphinx 7.4.6.