% Creator: Finomaton 1.0
% Creation-Date: Tue Mar 04 22:24:45 CET 2008

input boxes
% Breadth of arrowheads (MetaPost default is 45)
ahangle := 30;
% Length of arrowheads (MetaPost default is 4bp)
ahlength := 4;
beginfig(1);
% for temporary paths (might be unused)
path p[];

% First, define and draw all the states
circleit.s74(btex \strut 1 etex);
s74.c = (58.8, -61.8);
drawboxed(s74);

circleit.s76(btex \strut 2 etex);
s76.c = (127.2, -61.8);
drawboxed(s76);
draw fullcircle scaled 0.85(ypart s76.n - ypart s76.s) shifted s76.c;

circleit.s79(btex \strut 3 etex);
s79.c = (94.2, -123.6);
drawboxed(s79);


% Next, draw the lines
p81 = directionpoint dir 151 of bpath s76..controls (140.4, -30.6) and (155.4, -43.2)..directionpoint dir 126 of bpath s76;
drawarrow p81;
label.urt(btex y etex, point 0.5 of p81);

p86 = (s74.c)..controls .5[(s74.c),(95.4, -34.2)] and .5[(95.4, -34.2),(s76.c)]..(s76.c) cutbefore bpath s74 cutafter bpath s76;
drawarrow p86;
label.top(btex x etex, point 0.5 of p86);

p90 = (s76.c)..controls .5[(s76.c),(94.8, -89.4)] and .5[(94.8, -89.4),(s74.c)]..(s74.c) cutbefore bpath s76 cutafter bpath s74;
drawarrow p90;
label.top(btex y, z etex, point 0.5 of p90);

p94 = (s76.c)..controls .5[(s76.c),(143.4, -109.8)] and .5[(143.4, -109.8),(s79.c)]..(s79.c) cutbefore bpath s76 cutafter bpath s79;
drawarrow p94;
label.lrt(btex z etex, point 0.5 of p94);

p98 = (s79.c)..controls .5[(s79.c),(90.6, -83.4)] and .5[(90.6, -83.4),(s76.c)]..(s76.c) cutbefore bpath s79 cutafter bpath s76;
drawarrow p98;
label.lrt(btex x etex, point 0.5 of p98);

p102 = (s74.c)..controls .5[(s74.c),(40.2, -111.6)] and .5[(40.2, -111.6),(s79.c)]..(s79.c) cutbefore bpath s74 cutafter bpath s79;
drawarrow p102;
label.llft(btex z etex, point 0.5 of p102);

p106 = (s79.c)..controls .5[(s79.c),(93.0, -84.0)] and .5[(93.0, -84.0),(s74.c)]..(s74.c) cutbefore bpath s79 cutafter bpath s74;
drawarrow p106;
label.llft(btex x, y etex, point 0.5 of p106);

p110 = directionpoint dir 339 of bpath s79..controls (84.6, -153.0) and (102.6, -153.0)..directionpoint dir 375 of bpath s79;
drawarrow p110;
label.bot(btex x etex, point 0.5 of p110);

drawarrow (47.4, -43.8)..controls .5[(47.4, -43.8),(49.8, -48.0)] and .5[(49.8, -48.0),(s74.c)]..(s74.c) cutafter bpath s74;


% Finally, create labels

endfig;
end
