coonswarp.py 文件源码

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

项目:RasterFairy 作者: Quasimondo 项目源码 文件源码
def getPointOnHull( hullPoints,t, totalLength ):
    lh = len(hullPoints)
    for j in range(lh+1):
        sideLength = distance.euclidean(hullPoints[j%lh],hullPoints[(j+1)%lh])
        t_sub = sideLength / totalLength;
        if t > t_sub:
            t-= t_sub;
        else :
            return lerp(hullPoints[j%lh],hullPoints[(j+1)%lh], t / t_sub );
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号