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]
n_moment_point.py 文件源码
python
阅读 24
收藏 0
点赞 0
评论 0
评论列表
文章目录