from Ray import Ray import time if __name__ == "__main__": set_win_size(1400, 800) cones = [] r = 70 num_cones = 8 angle_offset = pi / 4 center = Point(520, 400) for n in range(num_cones): angle = 2 * pi * (n / num_cones) + angle_offset direction = Point(cos(angle), sin(angle)) cone = Shape.circle(center + direction * r, 10, resolution=10) cones.append(cone) r = 200 angle_scale = 78 / 100 num_cones = 12 angle_offset = angle_scale center = Point(520, 400) for n in range(num_cones + 1): angle = (2 * pi) * angle_scale * (n / num_cones) + angle_offset direction = Point(cos(angle), sin(angle)) cone = Shape.circle(center + direction * r, 10, resolution=10) cones.append(cone)
from Shape import Shape from Circle import Circle from Rectangle import Rectangle from Square import Square shaper = Shape("red", True) shaper.shape() shaper = Circle("blue", True, 1.0) shaper.circle() shaper = Rectangle("black", True, 1.0, 1.0) shaper.rectangle() shaper = Square("grey", True, 4) shaper.square()