Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- constants
- w = 300
- angle = 90 works; angle = 130 doesn't work
- Wall 1:
- a = angle
- 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)
- => Draw wall at (center_x,center_y) with angle a
- Wall 2:
- a = a + angle
- 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)
- => Draw wall at (center_x,center_y) with angle a
- Wall 3:
- a = a + angle
- 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)
- => Draw wall at (center_x,center_y) with angle a
Advertisement
Add Comment
Please, Sign In to add comment