def render_ray(self, ray_pkg, start_seg, tfrms): poly = [] ray, op_delta, wvl = ray_pkg transform_ray_seg(poly, start_seg, tfrms[0]) for i, r in enumerate(ray[1:], 1): transform_ray_seg(poly, r, tfrms[i]) return np.array(poly)
def render_shape(self, rayset, start_bundle, tfrms): poly1 = [] transform_ray_seg(poly1, start_bundle[3], tfrms[0]) for i, r in enumerate(rayset['+Y'].ray[1:], 1): transform_ray_seg(poly1, r, tfrms[i]) poly2 = [] transform_ray_seg(poly2, start_bundle[4], tfrms[0]) for i, r in enumerate(rayset['-Y'].ray[1:], 1): transform_ray_seg(poly2, r, tfrms[i]) poly2.reverse() poly1.extend(poly2) bbox = bbox_from_poly(poly1) return poly1, bbox