7 A
= c
.text(0, 0, r
"\bf A", [text
.halign
.center
, text
.vshift
.middlezero
])
8 B
= c
.text(1, 0, r
"\bf B", [text
.halign
.center
, text
.vshift
.middlezero
])
9 C
= c
.text(1, 1, r
"\bf C", [text
.halign
.center
, text
.vshift
.middlezero
])
10 D
= c
.text(0, 1, r
"\bf D", [text
.halign
.center
, text
.vshift
.middlezero
])
12 for X
in [A
, B
, C
, D
]:
13 # center is in true points
14 c
.stroke(path
.circle(unit
.t_pt(X
.center
[0]), unit
.t_pt(X
.center
[1]), "0.25 t"))
16 for X
,Y
in [[A
, B
], [B
, C
], [C
, D
], [D
, A
]]:
17 c
.stroke(connector
.arc(X
, Y
, boxdists
=0.2), [color
.rgb
.red
, deco
.earrow
.normal
])
19 c
.stroke(connector
.curve(D
, B
, boxdists
=0.2, relangle1
=45, relangle2
=-45, relbulge
=0.8),
20 [color
.rgb
.blue
, deco
.earrow
.normal
])
22 c
.writetofile("connect")