4 circle
= path
.circle(0, 0, 2)
5 line
= path
.line(-3, 1, 3, 2)
7 isects_circle
, isects_line
= circle
.intersect(line
)
9 arc1
, arc2
= circle
.split(isects_circle
)
11 arc
= arc1
.arclen()<arc2
.arclen() and arc1
or arc2
14 line1
, line2
, line3
= line
.split(isects_line
)
16 segment
= line2
<< arc
18 c
.fill(segment
, [color
.grey(0.5)])
20 c
.stroke(circle
, [style
.linewidth
.Thick
])
21 c
.stroke(line
, [style
.linewidth
.Thick
])
23 for isect
in isects_circle
:
24 c
.stroke(path
.line(0, 0, *circle
.at(isect
)))