mesh.py 文件源码

python
阅读 44 收藏 0 点赞 0 评论 0

项目:meshpy 作者: BerkeleyAutomation 项目源码 文件源码
def _signed_volume_of_tri(self, tri):
        """Return the signed volume of the given triangle.

        Parameters
        ----------
        tri : :obj:`numpy.ndarray` of int
            The triangle for which we wish to compute a signed volume.

        Returns
        -------
        float
            The signed volume associated with the triangle.
        """
        v1 = self.vertices_[tri[0], :]
        v2 = self.vertices_[tri[1], :]
        v3 = self.vertices_[tri[2], :]

        volume = (1.0 / 6.0) * (v1.dot(np.cross(v2, v3)))
        return volume
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号