input lib figname("8-geom2_"); figtag("usecky"); beginfig(1); def drawusecka(expr p,q) = draw vertex(p); draw vertex(q); draw p--q; enddef; pair A[],B[]; A0 := origin; B0 := (4cm,1.5cm); A1 := (0.5cm,1.5cm); B1 := (1cm,0); A2 := (2cm,1.3cm); B2 := (3cm, -0.9cm); A3 := (1cm,-1.3cm); B3 := (3.5cm,0); z0 = whatever[A0,B0]; z0 = whatever[A1,B1]; z1 = whatever[A0,B0]; z1 = whatever[A2,B2]; z2 = whatever[A2,B2]; z2 = whatever[A3,B3]; for i:=0 upto 2: fill fullcircle scaled 7pt shifted z[i]; drawemptyvertex(z[i]); endfor for i:=0 upto 3: drawusecka(A[i], B[i]); endfor endfig; figtag("polorovina"); beginfig(2); pair A,B; A := origin; B := (1.7cm,0.5cm); an := angle(B-A); path p; p := from(.5[A,B],an+90,3cm)--from(.5[A,B],an-90,3cm); fill p--reverse(p shifted (A-0.8[A,B]))--cycle withcolor 0.8white; %fill p{dir (an+180)}..-0.35[A,B]..{dir an}cycle withcolor 0.8white; draw p withpen boldpen; pair C; C := point(0.9) of p; drawarrow from(C,an+180,0.1cm)--from(C,an+180,1cm) withpen boldpen; C := point(0.1) of p; drawarrow from(C,an+180,0.1cm)--from(C,an+180,1cm) withpen boldpen; label.rt(btex $p$ etex, point(0.15) of p); draw A--B dashed evenly; drawemptyvertex(A); drawemptyvertex(B); label.llft(btex $a$ etex, A); label.urt(btex $b$ etex, B); label(btex $B_a$ etex, A+2(-0.1cm,0.5cm)); label(btex $B_b$ etex, B+2(-0.1cm,0.5cm)); endfig; figtag("voroneho_diagram"); beginfig(3); u := 1.35cm; pair A[],B[]; A0 := origin; A1 := (-u,-u); A2 := (1.3u,-u); A3 := (1.50821u,0.7u); A4 := (0.6u,0.8u); A5 := (0.2u,1.9u); A6 := (-1.3u,1u); def osa(expr a, b, an,l) = from(.5[a,b], angle(b-a)+an, l) enddef; vardef prusecik_os(expr p,q,r) = save b; pair b; b = whatever[osa(p,q, 90,1cm), osa(p,q,-90,1cm)]; b = whatever[osa(q,r, 90,1cm), osa(q,r,-90,1cm)]; b enddef; B[0] := prusecik_os(A0,A1,A2); B[1] := prusecik_os(A0,A1,A6); B[2] := prusecik_os(A0,A4,A6); B[3] := prusecik_os(A4,A5,A6); B[4] := prusecik_os(A3,A4,A5); B[5] := prusecik_os(A0,A3,A4); B[6] := prusecik_os(A0,A2,A4); draw osa(A1,A2,-90,2cm)--B[0]--B[1]--osa(A1,A6,90,1.3cm) withpen boldpen; draw B[1]--B[2]--B[3]--osa(A6,A5,90,2cm) withpen boldpen; draw B[3]--B[4]--osa(A3,A5,-90,2.7cm) withpen boldpen; draw B[4]--B[5]--B[2] withpen boldpen; draw B[5]--B[6]--osa(A2,A3,-90,1.3cm) withpen boldpen; draw B[6]--B[0] withpen boldpen; draw A0--A1--A2--A0--A6--A1 dashed evenly; draw A6--A5--A4--A0 dashed evenly; draw A3--A2 dashed evenly; draw A3--A5 dashed evenly; draw A6--A4--A3 dashed evenly; for i:=0 upto 6: draw vertex(B[i]); endfor for i:=0 upto 6: drawemptyvertex(A[i]); endfor endfig; figtag("pasy_mnohouhelniku"); beginfig(4); u := 1.35cm; pair A[],B[]; A0 := origin; A1 := (-u,-u); A2 := (1.3u,-u); A3 := (1.50821u,0.7u); A4 := (0.6u,0.8u); A5 := (0.2u,1.9u); A6 := (-1.3u,1u); def osa(expr a, b, an,l) = from(.5[a,b], angle(b-a)+an, l) enddef; vardef prusecik_os(expr p,q,r) = save b; pair b; b = whatever[osa(p,q, 90,1cm), osa(p,q,-90,1cm)]; b = whatever[osa(q,r, 90,1cm), osa(q,r,-90,1cm)]; b enddef; def drawline(expr p) = draw ((-2.3u,p)--(2.5u,p)) cutbefore (D0--D1) cutafter (D2--D3) enddef; B[0] := prusecik_os(A0,A1,A2); B[1] := prusecik_os(A0,A1,A6); B[2] := prusecik_os(A0,A4,A6); B[3] := prusecik_os(A4,A5,A6); B[4] := prusecik_os(A3,A4,A5); B[5] := prusecik_os(A0,A3,A4); B[6] := prusecik_os(A0,A2,A4); pair C; C := origin; for i:=0 upto 6: C := C + B[i]; endfor C := C/6; pair D[]; D0 := C+(-2.25,2.25)*u; D1 := C+(-2.25,-2.25)*u; D2 := C+(2.25,-2.25)*u; D3 := C+(2.25,2.25)*u; draw B[0]--B[1]--B[2]--B[3]--B[4]--B[5]--B[6]--B[0] withpen boldpen; draw B[5]--B[2] withpen boldpen; pair E; E := 0.6[B0,B4]; drawline(ypart(E)); drawline(ypart(E)) cutbefore (B2--B5) cutafter (B4--B5) dashed evenly withpen bolderpen; drawemptyvertex(E); for i:=0 upto 6: drawline(ypart(B[i])) dashed evenly; endfor for i:=0 upto 6: draw vertex(B[i]); endfor endfig; figtag("upravy_stromu"); beginfig(5); u := 1cm; draw (0,0.1u)--(2.05u,-2.05u)--(-2.05u,-2.05u)--cycle; pair A[]; A0 := from(origin,-90,0.1u); A1 := from(A0, -70, 0.5u); A2 := from(A1, -110, 0.5u); A3 := from(A2, -80, 0.5u); A4 := from(A3, -120, 0.45u); path p; p := createpath(A0--A1--A2--A3--A4); path q; q := (p scaled 0.93 shifted (-0.15u,-0.15u))--(-1.85u,-1.95u)--cycle; fill q withcolor 0.8white; draw q; q := (p scaled 0.93 shifted (0.15u,-0.15u))--(1.85u,-1.95u)--cycle; fill q withcolor 0.8white; draw q; p := createpath(A0--from(A0,-110,0.1u)--A1--A2--A3--A4); draw p withpen boldpen; endfig; figtag("rychla_perzistence"); beginfig(6); u := 1cm; def drawtable(expr p, lab, sa, sb) = draw centersquare xscaled 2u yscaled (2u/3) shifted (p+(0,u/3)); draw centersquare xscaled 2u yscaled (2u/3) shifted (p-(0,u/3)); label(sa, p+(0,u/3)); label(sb, p-(0,u/3)); label.bot(lab, p-(0,2u/3)); enddef; pair A[]; for i:=0 upto 2: A[i] := (0,2u) rotated 120i; endfor drawtable(A1, btex $v$ etex, btex verze 2 etex, btex verze 1 etex); drawtable(A2, btex $v'$ etex, btex verze 3 etex, ""); drawtable(A0, btex $u$ etex, btex verze 2 etex, btex verze 1 etex); drawarrow from(A[2]+(0,u/3), 180, 7u/6)--from(A[1]+(0,u/3), 0, 7u/6); drawarrow from(A[0]+(0,-u/3), 180, 7u/6)..{dir -90}from(A[1]+(-3u/4,2u/3), 90, u/6); drawarrow from(A[0]+(0,u/3), 0, 7u/6)..{dir -90}from(A[2]+(3u/4,2u/3), 90, u/6); endfig; end