n_moment_point.py 文件源码

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

项目:multi-contact-zmp 作者: stephane-caron 项目源码 文件源码
def compute_polyhedron_shadow(n, light_poly, ground_poly, inf_dist=1000):
    light_hull = ConvexHull(light_poly)
    ground_hull = ConvexHull(ground_poly)
    light_vertices = [light_poly[i] for i in light_hull.vertices]
    ground_vertices = [ground_poly[i] for i in ground_hull.vertices]
    rays = [gv - lv for gv in ground_vertices for lv in light_vertices]
    return ground_vertices + [v + inf_dist * r
                              for v in ground_vertices for r in rays]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号