Exemple #1
0
    def T(self):
        """:math:`\\frac{1}{6}` the volume of the tetrahedron defined by \
            :class:`~sknano.core.math.Vector`\ s `V1`, `V2`, and `V3`.

        .. math::
           T =
           \\frac{|\\mathbf{V}_1\\cdot(\\mathbf{V}_2\\times\\mathbf{V}_3)|}{6}

        """
        return np.abs(vec.scalar_triple_product(self.V1, self.V2, self.V3) / 6)
    def T(self):
        """:math:`\\frac{1}{6}` the volume of the tetrahedron defined by \
            :class:`~sknano.core.math.Vector`\ s `V1`, `V2`, and `V3`.

        .. math::
           T =
           \\frac{|\\mathbf{V}_1\\cdot(\\mathbf{V}_2\\times\\mathbf{V}_3)|}{6}

        """
        return np.abs(vec.scalar_triple_product(self.V1, self.V2, self.V3) / 6)
Exemple #3
0
    def volume(self):
        """Parallelepiped volume, :math:`V`.

        Computed as:

        .. math::

           V = |\\mathbf{u}\\cdot\\mathbf{v}\\times\\mathbf{w}|

        """
        return np.abs(vec.scalar_triple_product(self.u, self.v, self.w))
Exemple #4
0
    def volume(self):
        """Parallelepiped volume, :math:`V`.

        Computed as:

        .. math::

           V = |\\mathbf{u}\\cdot\\mathbf{v}\\times\\mathbf{w}|

        """
        return np.abs(vec.scalar_triple_product(self.u, self.v, self.w))
Exemple #5
0
    def Vv1v2v3(self):
        """Volume of the parallelepiped defined by \
            :class:`~sknano.core.math.Vector`\ s `v1`, `v2`, and `v3`.

        Computes the scalar triple product of vectors :math:`\\mathbf{v}_1`,
        :math:`\\mathbf{v}_2`, and :math:`\\mathbf{v}_3`:

        .. math::

           V_{v_1v_2v_3} =
           |\\mathbf{v}_1\\cdot(\\mathbf{v}_2\\times\\mathbf{v}_3)|

        """
        return np.abs(vec.scalar_triple_product(self.v1, self.v2, self.v3))
    def Vv1v2v3(self):
        """Volume of the parallelepiped defined by \
            :class:`~sknano.core.math.Vector`\ s `v1`, `v2`, and `v3`.

        Computes the scalar triple product of vectors :math:`\\mathbf{v}_1`,
        :math:`\\mathbf{v}_2`, and :math:`\\mathbf{v}_3`:

        .. math::

           V_{v_1v_2v_3} =
           |\\mathbf{v}_1\\cdot(\\mathbf{v}_2\\times\\mathbf{v}_3)|

        """
        return np.abs(vec.scalar_triple_product(self.v1, self.v2, self.v3))
def test16():
    u = Vector([1, 0, 0])
    v = Vector([1, 1, 0])
    w = Vector([0, 1, 1])
    assert_equals(vec.scalar_triple_product(u, v, w), 1)
Exemple #8
0
def test16():
    u = Vector([1, 0, 0])
    v = Vector([1, 1, 0])
    w = Vector([0, 1, 1])
    assert_equals(vec.scalar_triple_product(u, v, w), 1)