3 circ1
= path
.normpath(path
.circle(0, 0, 1)) # you don't really need normpath,
4 circ2
= path
.normpath(path
.circle(1, 1, 1)) # but its better to have it once
6 (circ1a
, circ1b
), (circ2a
, circ2b
) = circ1
.intersect(circ2
)
7 intersection
= (circ1
.split([circ1b
, circ1a
])[1]
8 << circ2
.split([circ2a
, circ2b
])[1]
10 union
= (circ1
.split([circ1b
, circ1a
])[0]
11 << circ2
.split([circ2a
, circ2b
])[0]
15 c
.fill(union
, [color
.rgb
.blue
])
16 c
.fill(intersection
, [color
.rgb
.red
])
19 c
.writetofile("circles")