1begin trail grade 2 # Draw a line marking a park trail. Line color and 3 # style depends on grade of trail. 4 # 5 if grade eq 'vehicle' 6 then 7 color "black" 8 linestyle 0.5 9 elif grade eq 'maintained' 10 then 11 color "gray" 12 linestyle 0.5, 'butt', 'bevel', 0, 2, 2 13 else 14 # Unmaintained track is dotted line. 15 # 16 color "#A52A2A" 17 linestyle 0.5, 'butt', 'bevel', 0, 1, 1 18 endif 19 stroke 20end 21 22newpage "eps", "tutorialprocedures1.eps", 60, 30 23 24# Draw trails of differing grades. In a real application this 25# data would be read from a Geographic Information System (GIS). 26# 27clearpath 28move 10, 10 29draw 15, 16, 26, 24, 38, 29 30trail 'vehicle' 31clearpath 32move 17, 16 33draw 24, 15, 29, 12, 34, 5 34trail 'maintained' 35clearpath 36move 24, 23 37draw 12, 26, 6, 28 38trail 'maintained' 39clearpath 40move 30, 11 41draw 36, 9, 40, 10, 46, 9, 54, 8 42trail 'unmaintained' 43