def METHOD_NAME(depth, bounce):
    def add_ray_helper(depth, next_bounce):
        lines.append([len(points) + i for i in range(2)])
        depths.extend([depth, depth])
        points.extend([bounce.hit_pt, next_bounce.hit_pt])
        METHOD_NAME(depth + 1, next_bounce)
    # add more segments to the ray track rendering data
    if bounce.refl_bounce:
        add_ray_helper(depth, bounce.refl_bounce)
    if bounce.trans_bounce:
        add_ray_helper(depth, bounce.trans_bounce)