1newpage "eps", "tutorialjts3.eps", 60, 60
2worlds 5000, 1000, 6000, 2000
3
4let wkt1 = 'POLYGON ((5200 1200, 5337 1664, 5798 1643, 5347 1120, 5200 1200))'
5let wkt2 = 'POLYGON ((5100 1300, 5100 1900, 5500 1800, 5700 1350, 5100 1300))'
6
7# Draw both polygons in different colors.
8#
9linestyle 3
10clearpath
11addpath wkt1
12color "purple"
13stroke
14clearpath
15addpath wkt2
16color "forestgreen"
17stroke
18
19# Draw area of first polygon not covered by second polygon.
20#
21let wkt3 = difference(wkt1, wkt2)
22clearpath
23addpath wkt3
24linestyle 1
25color "yellow"
26stroke
27