def make_rated_out_shapes(self, data):
     shapes = []
     for info in data[VIZ_KEY_BALL_RATING_OUT]:
         x, y, radius, rating = info
         x, y, radius = transform_relative_to_pixel(x, y, radius, self.image_width, self.image_height)
         shapes.extend(red_ball(x, y, radius))
         shapes.extend(red_text(x, y, "R: %.0f" % rating))
     return shapes
 def make_small_out_shapes(self, data):
     shapes = []
     for info in data[VIZ_KEY_BALL_SMALL_OUT]:
         x, y, radius, radius_to_be_pic = info
         x, y, radius = transform_relative_to_pixel(x, y, self.image_width, self.image_height)
         relation = radius / radius_to_be_pic
         shapes.extend(red_ball(x, y, radius))
         shapes.extend(green_text(x, y, "S: %.2f" % relation))
     return shapes
 def make_body_out_shapes(self, data):
     shapes = []
     for info in data[VIZ_KEY_BALL_BODY_OUT]:
         x, y, radius, dist = info
         x, y, radius = transform_relative_to_pixel(x, y, radius, self.image_width, self.image_height)
         relation = dist / self.max_distance_to_motor
         shapes.extend(red_ball(x, y, radius))
         shapes.extend(yellow_text(x, y, "B: %.2f" % relation))
     return shapes
 def make_far_out_shapes(self, data):
     shapes = []
     for info in data[VIZ_KEY_BALL_FAR_OUT]:
         x, y, radius, dist = info
         x, y, radius = transform_relative_to_pixel(x, y, radius, self.image_width, self.image_height)
         relation = dist / self.max_ball_distance
         shapes.extend(red_ball(x, y, radius))
         shapes.extend(white_text(x, y, "F: %.0f" % relation))
     return shapes