Guest User

Untitled

a guest
Apr 16th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. The spiral algorithm works by assigning the length of the sides of the room as 5.5m (in actuality it is 6m, but due to Dennis' diameter of approximately 35cm we left 50cm as it is impossible for him to travel more than 5.65m parallel with the x or y axes). As can be seen from the diagram, if we let the first side be denoted by length {tau}, the first three sides Dennis must travel {tau}. Each time Dennis finishes an edge, we increment turnCount, and when turnCount becomes greater than three (inclusive) and every two sides thereafter, Dennis' diameter must be subtracted from {tau}, such that {tau} can be described by (5.5 - (ceiling((turnCount-2)/2)*circumference)) for all sides after the first.
Add Comment
Please, Sign In to add comment