.. # split from OEMathFunctions.rst:536

.. include:: ../substitutions

.. oe:namespace:: OEMath

.. meta::
   :keywords: OEGeom3DTetraCoord

.. oe:function:: OEGeom3DTetraCoord

   .. oe:language:: c++ java csharp

      .. oe:api::

         template<class T>
         void OEGeom3DTetraCoord(T* dst, const T* center, const T* r1,
                                 const T* r2, T len)
         template<class T>
         void OEGeom3DTetraCoord(T* dst, const T* center, const T* r1,
                                 const T* r2, const T* r3, T len)

   .. oe:language:: python

      .. oe:api:: python

         OEGeom3DTetraCoord(dst: OEFloatArray, center: OEFloatArray,
                            r1: OEFloatArray, r2: OEFloatArray, len: float) -> None
         OEGeom3DTetraCoord(dst: OEDoubleArray, center: OEDoubleArray,
                            r1: OEDoubleArray, r2: OEDoubleArray, len: float) -> None
         OEGeom3DTetraCoord(dst: OEFloatArray, center: OEFloatArray,
                            r1: OEFloatArray, r2: OEFloatArray,
                            r3: OEFloatArray, len: float) -> None
         OEGeom3DTetraCoord(dst: OEDoubleArray, center: OEDoubleArray,
                            r1: OEDoubleArray, r2: OEDoubleArray,
                            r3: OEDoubleArray, len: float) -> None

   Calculates cartesian coordinate point ``dst`` that has a distance of ``len`` from the
   point ``center``, and corresponds to a tetrahedral atom location with respect to the
   given coordinates.  The first form places the new coordinates at the known tetrahedral
   angle based on the bisecting vector between :math:`(r1-center)` and :math:`(r2-center)`.  
   The second form places it on the direction perpendicular to the plane of the three given
   coordinates ``r1``, ``r2``, and ``r3``.
