Part 14 of Denthor's Pascal graphics tutorial