Draw a house with a rectangle as the body, a triangle as the roof, and a rectangle as the door and windows. a sun in the sky using a circle and lines radiating outwards.
The loop runs 8 times, and in each iteration:
Here's a step-by-step visualization of the rays being drawn:
Iteration 0 (i = 0):
Angle: 0 radians (0 degrees) Endpoint: (440, 50) A ray is drawn from (400, 50) to (440, 50). Iteration 1 (i = 1):
Angle: π/4 radians (45 degrees) Endpoint: (428.28, 78.28) A ray is drawn from (400, 50) to (428.28, 78.28). Iteration 2 (i = 2):
Angle: π/2 radians (90 degrees) Endpoint: (400, 90) A ray is drawn from (400, 50) to (400, 90). Iteration 3 (i = 3):
Angle: 3π/4 radians (135 degrees) Endpoint: (371.72, 78.28) A ray is drawn from (400, 50) to (371.72, 78.28). Iteration 4 (i = 4):
Angle: π radians (180 degrees) Endpoint: (360, 50) A ray is drawn from (400, 50) to (360, 50). Iteration 5 (i = 5):
Angle: 5π/4 radians (225 degrees) Endpoint: (371.72, 21.72) A ray is drawn from (400, 50) to (371.72, 21.72). Iteration 6 (i = 6):
Angle: 3π/2 radians (270 degrees) Endpoint: (400, 10) A ray is drawn from (400, 50) to (400, 10). Iteration 7 (i = 7):
Angle: 7π/4 radians (315 degrees) Endpoint: (428.28, 21.72) A ray is drawn from (400, 50) to (428.28, 21.72). By the end of the loop, 8 evenly spaced rays are drawn around the central point (400, 50).