#3 almost done, but it still sometimes colors the stroke red before it should. Check the nested for loop where the segments are tested against one another.