Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- For now, just draw 3 walls. The angles are constants for now, with 45°.
- Start values:
- w = 300
- sum_a = 0
- Wall 1:
- a = 45
- start_x = 400
- start_y = 400
- center_x = start_x + (w/2) * cos(a)
- center_y = start_y + (w/2) * sin(a)
- end_x = start_x + w * cos(a)
- end_y = start_y + w * sin(a)
- sum_a = sum_a + a
- => Draw wall at (center_x,center_y) with angle sum_a
- Wall 2:
- a = 45
- start_x = end_x
- start_y = end_y
- center_x = start_x + (w/2) * cos(a)
- center_y = start_y + (w/2) * sin(a)
- end_x = start_x + w * cos(a)
- end_y = start_y + w * sin(a)
- sum_a = sum_a + a
- => Draw wall at (center_x,center_y) with angle sum_a
- Wall 3:
- a = 45
- start_x = end_x
- start_y = end_y
- center_x = start_x + (w/2) * cos(a)
- center_y = start_y + (w/2) * sin(a)
- end_x = start_x + w * cos(a)
- end_y = start_y + w * sin(a)
- sum_a = sum_a + a
- => Draw wall at (center_x,center_y) with angle sum_a
Advertisement
Add Comment
Please, Sign In to add comment