PolyMesh.py 文件源码

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

项目:laplacian-meshes 作者: bmershon 项目源码 文件源码
def getPrincipalAxes(self):
        X = self.VPos - self.getCentroid()
        XTX = (X.T).dot(X)
        (lambdas, axes) = linalg.eig(XTX)
        #Put the eigenvalues in decreasing order
        idx = lambdas.argsort()[::-1]
        lambdas = lambdas[idx]
        axes = axes[:, idx]
        T = X.dot(axes)
        maxProj = T.max(0)
        minProj = T.min(0)
        axes = axes.T #Put each axis on each row to be consistent with everything else
        return (axes, maxProj, minProj)        

    #Delete the parts of the mesh below "plane".  If fillHoles
    #is true, plug up the holes that result from the cut
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号