4. Ukázky (MP zdroják, GIF, PostScript)

Následuje několik ukázek. Některé z nich jsem vytvořil kdysi dříve pod METAFONTem, některá ukazují možnosti MetaPostu, některá jsou stažena z Internetu.

Některé ukázky využívají funkcí nadefinovaných v souborech maker makra.mf a mkmakra.mf. Odsud si je můžete stáhnout, abyste mohli ukázky modifikovat a rekompilovat. Také si můžete stáhnout archív se zdrojovými kódy všech obrázků a maker.
 

4.1. Ukázky z MetaPost user manual

 
prologues:=1;

beginfig(5);
z0 = (0,0);    z1 = (60,40);
z2 = (40,90);  z3 = (10,70);
z4 = (30,50);
path p; p = z0..z1..z2..z3..z4;
draw p;
for t=0 upto 3:
  draw point t of p--postcontrol t of p
    --precontrol t+1 of p--point t+1 of p
    dashed (evenly scaled .5);
endfor
dotlabels.top(0,2,4);
dotlabels.lft(3);
dotlabels.lrt(1);
endfig;

end
5
prologues:=1;


beginfig(6);
z0 = (0,0);    z1 = (60,40);
z2 = (40,90);  z3 = (10,70);
z4 = (30,50);
draw z0..z1{up}..z2{left}..z3..z4;
dotlabels.top(0,2,4);
dotlabels.lft(3);
dotlabels.lrt(1);
endfig;

end
6
prologues:=1;

beginfig(7)
for a=0 upto 9:
  draw (0,0){dir 45}..{dir -10a}(6cm,0);
endfor
endfig;
end
7
prologues:=1;

beginfig(8)
for a=0 upto 7:
  draw (0,0){dir 45}..{dir 10a}(6cm,0);
endfor
endfig;
end
8
prologues:=1;

beginfig(123);
path a, aa, b;
a = fullcircle scaled 2cm;
b = a shifted (0,1cm);
aa = halfcircle scaled 2cm;
draw aa;
draw b dashed evenly;
z1 = aa intersectionpoint reverse b;
z2 = reverse aa intersectionpoint b;
dotlabel.rt(btex 1 etex, z1);
dotlabel.lft(btex 2 etex, z2);
label.bot(btex \tt aa etex, point 0 of aa);
label.bot(btex \tt b etex, point 2 of b);
endfig;
end
123
prologues:=1;

beginfig(13);
z1=-z2=(.2in,0);
x3=-x6=.3in;
x3+y3=x6+y6=1.1in;
z4=1/3[z3,z6];
z5=2/3[z3,z6];
z20=whatever[z1,z3]=whatever[z2,z4];
z30=whatever[z1,z4]=whatever[z2,z5];
z40=whatever[z1,z5]=whatever[z2,z6];
draw z1--z20--z2--z30--z1--z40--z2;
pickup pencircle scaled 1pt;
draw z1--z2;
draw z3--z6;
%
dotlabels.bot(1,2);
dotlabels.rt(3);
dotlabels.lft(6);
dotlabels.top(20,30,40);
endfig;
end
13
prologues:=1;

beginfig(19);
numeric ux, uy;
120ux=1.2in; 4uy=2.4in;
draw (0,4uy)--(0,0)--(120ux,0);
pickup pencircle scaled 1pt;
draw (0,uy){right}
  for ix=1 upto 8:
    ..(15ix*ux, uy*2/(1+cosd 15ix))
  endfor;
label.bot(btex $x$ axis etex, (60ux,0));
label.lft(btex $y$ axis etex rotated 90,
          (0,2uy));
label.lft(
  btex $\displaystyle y={2\over1+\cos x}$ etex,
  (120ux, 4uy));
endfig;
end
19
prologues:=1;

beginfig(24);
h=2in; w=2.7in;
path p[], q[], pp;
for i=2 upto 4: ii:=i**2;
  p[i] = (w/ii,h){1,-ii}...(w/i,h/i)...(w,h/ii){ii,-1};
endfor
q0.5 = (0,0)--(w,0.5h);
q1.5 = (0,0)--(w/1.5,h);
pp = buildcycle(q0.5, p2, q1.5, p4);
fill pp withcolor .7white;
z0=center pp;
picture lab; lab=thelabel(btex $f&gt0$ etex, z0);
unfill bbox lab; draw lab;
draw q0.5; draw p2; draw q1.5; draw p4;
dotlabel.top(btex $P$ etex, p2 intersectionpoint q0.5);
dotlabel.rt(btex $Q$ etex, p2 intersectionpoint q1.5);
dotlabel.lft(btex $R$ etex, p4 intersectionpoint q1.5);
dotlabel.bot(btex $S$ etex, p4 intersectionpoint q0.5);
endfig;
end
24
prologues:=1;

beginfig(25);
numeric u;
u = .2in;
path a, b;
a = (0,0){up}..(4u,0)..(8u,0)..(8u,4u);
b = (10u,3u)..(5u,u)..(-u,u);
numeric t; t=0;
forsuffixes $=bot, llft, lrt, lft:
  dotlabel$(decimal t, point t of a);
  t:=t+1;
endfor
for i=0 upto 2:
   dotlabel.top(decimal i, point i of b);
endfor
pickup(pencircle scaled .3);
draw a;
pickup(pencircle scaled .8);
draw b;
% intersections (atime, btime):
% (0.2501,1.77225)
% (2.58316,0.23619)
% (0.75288,1.40094)
endfig;
end
25
prologues:=1;

beginfig(26);
numeric scf, #, t[]; 
3.2scf = 2.4in;
path fun;
# = .1;  % Keep the function single-valued
fun = ((0,-1#)..(1,.5#){right}..(1.9,.2#){right}..{curl .1}(3.2,2#))
  yscaled(1/#) scaled scf;
x1 = 2.5scf;
for i=1 upto 2:
  (t[i],whatever) =
    fun intersectiontimes ((x[i],-infinity)--(x[i],infinity));
  z[i] = point t[i] of fun;
  z[i]-(x[i+1],0) = whatever*direction t[i] of fun;
  draw (x[i],0)--z[i]--(x[i+1],0);
  fill fullcircle scaled 3bp shifted z[i];
endfor
label.bot(btex $x_1$ etex, (x1,0));
label.bot(btex $x_2$ etex, (x2,0));
label.bot(btex $x_3$ etex, (x3,0));
draw (0,0)--(3.2scf,0);
pickup pencircle scaled 1pt;
draw fun;
endfig;
end
26
prologues:=1;

beginfig(32);
draw dashpattern(on 15bp off 15bp) dashed evenly;
picture p;
p=currentpicture;
currentpicture:=nullpicture;
draw fullcircle scaled 1cm xscaled 3 dashed p;
endfig;
end
32
prologues:=1;

beginfig(37);
path p, q, r;
ahlength := 1.5cm;
pickup pencircle scaled .2cm;
p = (0,0)..{right}(2.5cm,2cm);
q = counterclockwise arrowhead p;
z0 = directionpoint up of q;
z.a = directionpoint right of q;
z.b = directionpoint (-1,-1) of q;
drawarrow p withcolor .4white;
pickup defaultpen;
undraw p;
undraw q;
ahlength:=4bp;
z.a1-z0 = .3cm*unitvector(z.a-z0) rotated 90;
z.a1-z.a2 = z0-z.a;
z.b1-z0 = .3cm*unitvector(z.b-z0) rotated -90;
z.b1-z.b2 = z0-z.b;
z.ab = whatever[z.a1,z.a2] = whatever[z.b1,z.b2];
z.a0-z.ab = .4cm*unitvector(z.a1-z.a2);
z.b0-z.ab = .4cm*unitvector(z.b1-z.b2);
drawdblarrow z.a1..z.a2;
label.lrt(btex \tt ahlength etex, .9[z.a1,z.a2]);
draw z.a1..z.a0 dashed evenly;
drawdblarrow z.b1..z.b2;
label.urt(btex \tt ahlength etex, .9[z.b1,z.b2]);
draw z.b1..z.b0 dashed evenly;
r = z.a0{(z.a2-z.a0) rotated 90}..{(z.b2-z.b0)rotated 90}z.b0;
draw r;
label.rt(btex \tt ahangle etex, point .5 of r);
endfig;
end
37
prologues:=1;

beginfig(38);
pickup pencircle scaled .2in yscaled .08 rotated 30;
x0=x3=x4;
z1-z0 = .45in*dir 30;
z2-z3 = whatever*(z1-z0);
z6-z5 = whatever*(z1-z0);
z1-z6 = 1.2*(z3-z0);
rt x3 = lft x2;
x5 = .55[x4,x6];
y4 = y6;
lft x3 = bot y5 = 0;
top y2 = .9in;
draw z0--z1--z2--z3--z4--z5--z6 withcolor .7white;
dotlabels.top(0,1,2,3,4,5,6);
endfig;
end
38
prologues:=1;

beginfig(40);
path p[];
p1 = (0,0){curl 0}..(5pt,-3pt)..{curl 0}(10pt,0);
p2 = p1..(p1 yscaled-1 shifted(10pt,0));
p0 = p2;
for i=1 upto 3:  p0:=p0.. p2 shifted (i*20pt,0);
  endfor
for j=0 upto 8:  draw p0 shifted (0,j*10pt);
  endfor
p3 = fullcircle shifted (.5,.5) scaled 72pt;
clip currentpicture to p3;
draw p3;
endfig;
end
40
prologues:=1;

marksize=4pt;
angle_radius=8pt;

def draw_mark(expr p, a) =
  begingroup
  save t, dm; pair dm;
  t = arctime a of p;
  dm = marksize*unitvector direction t of p
    rotated 90;
  draw (-.5dm.. .5dm) shifted point t of p;
  endgroup
enddef;

def draw_marked(expr p, n) =
  begingroup
  save amid;
  amid = .5*arclength p;
  for i=-(n-1)/2 upto (n-1)/2:
    draw_mark(p, amid+.6marksize*i);
  endfor
  draw p;
  endgroup
enddef;

def mark_angle(expr a, b, c, n) =
  begingroup
  save s, p; path p;
  p = unitvector(a-b){(a-b)rotated 90}..unitvector(c-b);
  s = .9marksize/length(point 1 of p - point 0 of p);
  if s< angle_radius: s:=angle_radius; fi
  draw_marked(p scaled s shifted b, n);
  endgroup
enddef;

def mark_rt_angle(expr a, b, c) =
  draw ((1,0)--(1,1)--(0,1))
       zscaled (angle_radius*unitvector(a-b)) shifted b
enddef;

beginfig(42);
pair a,b,c,d;
b=(0,0); c=(1.5in,0); a=(0,.6in);
d-c = (a-b) rotated 25;
dotlabel.lft("a",a);
dotlabel.lft("b",b);
dotlabel.bot("c",c);
dotlabel.llft("d",d);
z0=.5[a,d];
z1=.5[b,c];
(z.p-z0) dotprod (d-a) = 0;
(z.p-z1) dotprod (c-b) = 0;
draw a--d;
draw b--c;
draw z0--z.p--z1;
draw_marked(a--b, 1);
draw_marked(c--d, 1);
draw_marked(a--z.p, 2);
draw_marked(d--z.p, 2);
draw_marked(b--z.p, 3);
draw_marked(c--z.p, 3);
mark_angle(z.p, b, a, 1);
mark_angle(z.p, c, d, 1);
mark_angle(z.p, c, b, 2);
mark_angle(c, b, z.p, 2);
mark_rt_angle(z.p, z0, a);
mark_rt_angle(z.p, z1, b);
endfig;
end
42
prologues:=1;

def getmid(suffix p) =
  pair p.mid[], p.off[], p.dir[];
  for i=0 upto 36:
    p.dir[i] = dir(5*i);
    p.mid[i]+p.off[i] = directionpoint p.dir[i] of p;
    p.mid[i]-p.off[i] = directionpoint -p.dir[i] of p;
  endfor
enddef;

def joinup(suffix pt, d)(expr n) =
  begingroup
  save res, g; path res;
  res = pt[0]{d[0]};
  for i=1 upto n:
    g:= if (pt[i]-pt[i-1]) dotprod d[i] <0: - fi 1;
    res := res{g*d[i-1]}...{g*d[i]}pt[i];
  endfor
  res
  endgroup
enddef;

beginfig(45)
path p, q;
p = ((5,2)...(3,4)...(1,3)...(-2,-3)...(0,-5)...(3,-4)
     ...(5,-3)...cycle) scaled .3cm shifted (0,5cm);
getmid(p);
draw p;
draw joinup(p.mid, p.dir, 36)..cycle;
q = joinup(p.off, p.dir, 36);
draw q..(q rotated 180)..cycle;
drawoptions(dashed evenly);
for i=0 upto 3:
  draw p.mid[9i]-p.off[9i]..p.mid[9i]+p.off[9i];
  draw -p.off[9i]..p.off[9i];
endfor
endfig;
end
45
prologues:=1;

input boxes


beginfig(49);
boxjoin(a.se=b.sw; a.ne=b.nw);
boxit.a(btex\strut$\cdots$ etex);    boxit.ni(btex\strut$n_i$ etex);
boxit.di(btex\strut$d_i$ etex);      boxit.ni1(btex\strut$n_{i+1}$ etex);
boxit.di1(btex\strut$d_{i+1}$ etex); boxit.aa(btex\strut$\cdots$ etex);
boxit.nk(btex\strut$n_k$ etex);      boxit.dk(btex\strut$d_k$ etex);
drawboxed(di,a,ni,ni1,di1,aa,nk,dk); label.lft("ndtable:", a.w);
interim defaultdy:=7bp;
boxjoin(a.sw=b.nw; a.se=b.ne);
boxit.ba(); boxit.bb(); boxit.bc();
boxit.bd(btex $\vdots$ etex); boxit.be(); boxit.bf();
bd.dx=8bp; ba.ne=a.sw-(15bp,10bp);
drawboxed(ba,bb,bc,bd,be,bf); label.lft("hashtab:",ba.w);
vardef ndblock suffix $ =
  boxjoin(a.sw=b.nw; a.se=b.ne);
  forsuffixes $$=$1,$2,$3: boxit$$(); ($$dx,$$dy)=(5.5bp,4bp);
  endfor; enddef;
ndblock nda;  ndblock ndb;  ndblock ndc;
nda1.c-bb.c = ndb1.c-nda3.c = (whatever,0);
xpart ndb3.se = xpart ndc1.ne = xpart di.c;
ndc1.c - be.c = (whatever,0);
drawboxed(nda1,nda2,nda3, ndb1,ndb2,ndb3, ndc1,ndc2,ndc3);
drawarrow bb.c -- nda1.w;
drawarrow be.c -- ndc1.w;
drawarrow nda3.c -- ndb1.w;
drawarrow nda1.c{right}..{curl0}ni.c cutafter bpath ni;
drawarrow nda2.c{right}..{curl0}di.c cutafter bpath di;
drawarrow ndc1.c{right}..{curl0}ni1.c cutafter bpath ni1;
drawarrow ndc2.c{right}..{curl0}di1.c cutafter bpath di1;
drawarrow ndb1.c{right}..nk.c cutafter bpath nk;
drawarrow ndb2.c{right}..dk.c cutafter bpath dk;
x.ptr=xpart aa.c;   y.ptr=ypart ndc1.ne;
drawarrow subpath (0,.7) of (z.ptr..{left}ndc3.c) dashed evenly;
label.rt(btex \strut ndblock etex, z.ptr); endfig;
end
49
prologues:=1;

input boxes

vardef drawshadowed(text t) =
  fixsize(t);
  forsuffixes s=t:
    fill bpath.s shifted (1pt,-1pt);
    unfill bpath.s;
    drawboxed(s);
  endfor
enddef;

vardef cuta(suffix a,b) expr p =
  drawarrow p cutbefore bpath.a cutafter bpath.b;
  point .5*length p of p
enddef;

vardef self@# expr p =
  cuta(@#,@#) @#.c{curl0}..@#.c+p..{curl0}@#.c  enddef;

beginfig(52);
verbatimtex \def\stk#1#2{$\displaystyle{\matrix{#1\cr#2\cr}}$} etex
circleit.aa(btex\strut Start etex); aa.dx=aa.dy;
circleit.bb(btex \stk B{(a|b)^*a} etex);
circleit.cc(btex \stk C{b^*} etex);
circleit.dd(btex \stk D{(a|b)^*ab} etex);
circleit.ee(btex\strut Stop etex); ee.dx=ee.dy;
numeric hsep;
bb.c-aa.c = dd.c-bb.c = ee.c-dd.c = (hsep,0);
cc.c-bb.c = (0,.8hsep);
xpart(ee.e - aa.w) = 3.8in;
drawboxed(aa,bb,cc,dd,ee);
label.ulft(btex$b$etex, cuta(aa,cc) aa.c{dir50}..cc.c);
label.top(btex$b$etex, self.cc(0,30pt));
label.rt(btex$a$etex, cuta(cc,bb) cc.c..bb.c);
label.top(btex$a$etex, cuta(aa,bb) aa.c..bb.c);
label.llft(btex$a$etex, self.bb(-20pt,-35pt));
label.top(btex$b$etex, cuta(bb,dd) bb.c..dd.c);
label.top(btex$b$etex, cuta(dd,ee) dd.c..ee.c);
label.lrt(btex$a$etex, cuta(dd,bb) dd.c..{dir140}bb.c);
label.bot(btex$a$etex, cuta(ee,bb) ee.c..tension1.3 ..{dir115}bb.c);
label.urt(btex$b$etex, cuta(ee,cc) ee.c{(cc.c-ee.c)rotated-15}..cc.c);
endfig;
end
52

4.2. Obrázky stažené z Internetu

 
prologues:=1;

beginfig(1);
        path a[],aa[];
        color cl[];
        picture p;
        cl1=green;      %inicializace barevne palety
        cl2=blue;
        cl3=red;
        w=6cm;          %rozmer obrazku
        r=2cm;
        for i=1 upto 3: %3 zakladni kruznice
                a[i]=fullcircle scaled (r*2);
        endfor
        x.a1+x.a2=w;    %reseni lin.rovnic (umisteni stredu do rovnostr.troj.)
        x.a3=w/2;
        x.a2-x.a1=r;
        z.a3-z.a1=r * (cosd 60, sind 60);
        z.a2-z.a3=r * (cosd -60, sind -60);
        y.a1+y.a3=w;

        for i=1 upto 3: %vykresleni posunutych kruznic
                aa[i]=a[i] shifted z.a[i];
                fill aa[i] withcolor cl[i];
        endfor

        for i=1 upto 3: %vykresleni 2-pruniku souctem barev
                j:=i+1; if j=4: j:=1 fi;
                p := image(fill aa[i] withcolor cl[i]+cl[j]);
                clip p to aa[j];
                draw p ;
        endfor
        clip p to aa2;  %vykresleni 3-pruniku
        draw p withcolor cl1+cl2+cl3;
        draw z.a1--z.a2--z.a3--cycle;
endfig;

end
mpex1
prologues:=1;

beginfig(1);
        path squares[];
        numeric side;
        side=8cm;
        squares0=unitsquare scaled side;
        draw squares0;
        y1=0;x2=side;
        x1=side/25;y2=x1;
        d=angle(z2-z1);
        r=abs(z2-z1)/side;
        for i:=1 upto 80:
        squares[i]:=squares[i-1] shifted (-side/2,-side/2) 
        rotated d scaled r shifted (side/2,side/2);
        draw squares[i] withcolor (i/100)[blue,red];
        endfor
        endfig;
end
rot1

4.3. Můj obrázek nakreslený pro účely demonstrace MetaPostu

 
prologues:=1;

beginfig(1)
        fill fullcircle scaled 3cm shifted (3cm,3cm) withcolor (red+green);
        pickup penrazor scaled 3mm;
        z1=(0,0);
        z2=(3,2)*cm;
        z3=(0.7,1.1)*cm;
        draw z1..z2..z3{up}..cycle withcolor red;
        defaultfont:="cmss10";
        label(btex $\int_0^ax\;{\rm d}x={a^2\over2}$ etex rotated 20 scaled 4, (1,1)*cm);
        label("ahoj" infont defaultfont scaled 4,(1.5,3)*cm) withcolor green;
        label(btex aho\v\j etex scaled 4,(5,0)*cm);
endfig;

end
a1

4.4. Moje starší obrázky původně nakreslené v METAFONTu

verbatimtex \def\ds{\displaystyle}\def\Over{\ds\over\ds} etex
prologues:=1;

input makra
input mkmakra

u:=0.7mm;

def dejuhel(expr a,b,c,delka,znamenko) =
        draw (b+dir(angle(a-b))*delka){dir(angle(a-b)+90)}
           ..{dir(angle(c-b)+90)}(b+dir(angle(c-b))*delka);
enddef;

def kruznice(expr S,r) =
        draw fullcircle scaled 2r shifted S;
enddef;

def ctvrtkruznice(expr S,r,uhel) =
        draw quartercircle scaled 2r rotated uhel shifted S;
enddef;

def min(expr x,y) =
        if x< y:
                x
        else:
                y
        fi
enddef;

def KrivaSipka(expr bod,uhel,delka)=
begingroup
 save x,y;
 z1=(0,0); z2=(r'-r,-8u);
 draw ((z1{dir(0)}..{dir(-45)}z2) rotated uhel shifted bod);
 draw (sipka(delka,-45) shifted z2 rotated uhel shifted bod);
endgroup;
enddef;

beginfig(1)
 w:=80u;
 h:=80u;
 v:=25u;
 Fc:=10u;
 r':=min(w,h)/2;
 r:=min(w,h)/7;
 pocet:=6; delka:=3u;
 z1=(w/2,h/2);
 pero(.4u);
 kruznice(z1,r);
 for i:=(floor(pocet/2)-pocet) upto pocet:
  draw (sipka(delka,(90+i/pocet*360)) shifted (z1+r*dir(i/pocet*360)));
  KrivaSipka(z1+r'*dir(i/pocet*360),i/pocet*360+180,delka);
 endfor;
 pero(.6u);
 vektor(z1+r'*dir(4/pocet*360),v,delka,4/pocet*360+180);
 vektor(z1+r'*dir(4/pocet*360),Fc,delka,4/pocet*360+90);
 z10=z1+r'*dir(4/pocet*360);
 z11=z10+(v,0)rotated (4/pocet*360+180);
 z12=z10+(Fc,0)rotated (4/pocet*360+90);
 dejuhel(z12,z10,z11,4u,+1);
 drawdot z10+(2u,1u);

 label.lft(btex $\vec v$ etex,(x11-2u,y11-1u));
 label.rt(btex $\vec F_C$ etex,(x12+1u,y12));
 label.ulft(btex CORIOL\_2.mf etex,(w,0));
endfig;

def tyc(expr bod,uhel)=
 begingroup
  delka:=7.5u;
  draw (((-delka,0)--(delka,0)) rotated uhel shifted bod);
 endgroup;
enddef;

beginfig(2)
 w:=90u;
 h:=100u;
 path p[];
 s:=w/90;
 v:=h/100;
 hust=.05;
 polomer:=10u;
 polomer':=9u;
 r:=30u;
 z1=(10s,10v); z2=z1+60s*right; x3=1/2[x1,x2]; y3=90v;
 z4=1/2[z3,z2]; z5=z3-r*dir(angle(z3-z2));
 alfa=angle(z3-z1);
 mg:=20u; Mg:=15u; Fk:=10u; Fp:=mg/2+Mg;
 F:=20u;
 z6=z5+whatever*dir(angle(z3-z2)+90); x6=x5-Fk;
 z7=z3+F*dir(angle(z1-z3)+90);
 z8=z2+whatever*(z3-z2); z8=z7+whatever*(z5-z6);
 z9=z3+whatever*(z5-z6); z9=z7+whatever*(z3-z2);
 delka:=3u;
 pero(.2u);
 dashlineV(z5,z6,hust);
 dashlineV(z7,z8,hust);
 dashlineV(z7,z9,hust);
 pero(.4u);
 draw z1--z3--z2;
 draw(((-10u,0)--(10u,0)) shifted z1);
 draw(((-10u,0)--(10u,0)) shifted z2);
 XPopisek(z1,z3,delka,0,10u);
 XPopisek(z3,z5,delka,0,30u);
 PUhel(z2,0,polomer);
 PUhel(z3,angle(z1-z3),polomer);
 oblouk(z2,polomer,90,angle(z3-z2));
 oblouk(z3,polomer,angle(z1-z3),-90);
 oblouk(z3,polomer+2u,-90,angle(z2-z3));
 oblouk(z3,polomer,angle(z2-z3),(angle(z1-z3)+90));
 oblouk(z4,polomer,-90,angle(z4-z3));
 oblouk(z5,polomer,180,(angle(z3-z2)+90));
 oblouk(z2,polomer',90,angle(z3-z2));
 oblouk(z3,polomer',angle(z1-z3),-90);
 oblouk(z3,polomer'+2u,-90,angle(z2-z3));
 oblouk(z4,polomer',-90,angle(z4-z3));
 oblouk(z5,polomer',180,(angle(z3-z2)+90));
 pero(.6u);
 vektor(z2,Fp,delka,90);
 vektor(z4,Mg,delka,-90);
 vektor(z5,Fk,delka,180);
 vektor(z3,mg,delka,-90);
 vektor(z3,F,delka,angle(z1-z3)+90);

 label.ulft(btex $d$ etex,(1/2[x1,x3]-10u,1/2[y1,y3]+4u));
 label.rt(btex $r$ etex,(1/2[x3,x5]+30u,1/2[y3,y5]+10u));
 label.rt(btex $F_2$ etex,(x7+1u,y7));
 label.bot(btex ${m\over2}g$ etex,(x3-4u,y3-mg-1u));
 label.urt(btex $F_k$ etex,(x5-Fk+2u,y5+2u));
 label.bot(btex ${M\over2}g$ etex,(x4,y4-Mg-1u));
 label.top(btex $F_p$ etex,(x2,y2+Fp+1u));
 label.ulft(btex $\ds\alpha\Over2$ etex,(x2,y2+9u));
 label.llft(btex $90\!-\!\alpha$ etex,(x7+1u,y7-1u));
 label(btex STAFLE\_1.mf etex,(w/2,0));
endfig;

def vycarkuj(expr cesta,pocet) =
begingroup
        for i:=0 upto pocet-1:
                draw subpath ((i+0.5)/pocet,(i+1)/pocet) of cesta;
        endfor;
endgroup;
enddef;

%def vycarkujhust(expr cesta,hust) =
%begingroup
%        vycarkuj(cesta,floor((length cesta)/hust));
%endgroup;
%enddef;

beginfig(3)
 w:=80u;
 h:=80u;
        polomer:=30u;
        z1=(40u,40u);
        z2=(polomer,0) rotated 135;
        for i:=3 upto 8:
                z[i]=z[i-1] rotated 147;
        endfor;
        pickup pencircle scaled 0.4u;
        drawdot z1;
        draw fullcircle scaled 2polomer shifted z1;
        for i:=3 upto 6:
                draw (z1+z[i-1]){-z[i-1]}..{z[i]}(z1+z[i]);
        endfor;
        path abc,def;
        abc:=(z1+z[6]){-z[6]}..{z[7]}(z1+z[7]);
        def:=(z1+z[7]){-z[7]}..{z[8]}(z1+z[8]);
        vycarkuj(abc,10);
        vycarkuj(def,10);

        label(btex S etex,(x1,y1-2u));
        label.lft(btex po\v c. poloha etex,(x1+x2-1u,y1+y2));
        label.bot(btex FOUCLT\_1.mf etex,(w/2,h));
endfig;

end
coriol1

coriol2

coriol3

verbatimtex \def\ds{\displaystyle}\def\Over{\ds\over\ds} etex
prologues:=1;

input makra
input mkmakra

u=.6mm;

beginfig(1)
 w:=40u;
 h:=40u;
 numeric s,v,uhel,zpart,hust;
 s:=w/4;
 v:=h/4;
 uhel:=45;
 zpart:=s*cosd(uhel)++v*sind(uhel);
 hust:=0.1;
 z1=(1s,0v);
 z2=z1+s*right;
 z3=z2 ZMove(zpart,uhel,1/2);
 z4=z3+s*left;
 z7=z2+2v*up;
 z10=z3+2v*up;
 z11=z1+2v*up;
 z8=z7+s*right;
 z9=z10+s*right;
 z6=z7 ZMove(zpart,uhel,-1/2);
 z5=z6+s*left;
 for i:=5 upto 9:
  z[i+7]=z[i]+v*up;
 endfor;
 z17=z4+3v*up;
 x18=x1; y18=y5;
 x19=x3; y19=y7;
 pero(.5u);
 draw z18--z1--z2--z3--z19;
 draw z2--z7;
 for i:=5 upto 9:
  draw z[i+7]--z[i];
 endfor;
 for i:=5 upto 8:
  draw z[i+1]--z[i];
  draw z[i+8]--z[i+7];
 endfor;
 draw z12--z17--z16;
 pero(.15u);
 dashlineV(z1,z4,hust);
 dashlineV(z3,z4,hust);
 dashlineV(z17,z4,hust);
 dashlineV(z11,z5,hust);
 dashlineV(z11,z18,hust);
 dashlineV(z11,z7,hust);
 dashlineV(z10,z7,hust);
 dashlineV(z10,z9,hust);
 dashlineV(z10,z19,hust);
endfig;

beginfig(2)
 w:=40u;
 h:=40u;
 numeric s,v,uhel,zpart,hust;
 s:=w/4;
 v:=h/4;
 uhel:=45;
 zpart:=s*cosd(uhel)++v*sind(uhel);
 hust:=0.1;
 z1=(1s,0v);
 z2=z1+s*right;
 z3=z2 ZMove(zpart,uhel,1/2);
 z4=z3+s*left;
 z7=z2+v*up;
 z8=z7+s*left;
 z6=z7 ZMove(zpart,uhel,-1/2);
 z5=z6+s*left;
 z10=z6+v*up;
 z9=z10+s*left;
 z11=z7+v*up;
 z15=z8+v*up;
 z14=z3+2v*up;
 z12=z11+s*right;
 z13=z14+s*right;
 z16=z15+v*up;
 z17=z12+v*up;
 z18=z13+v*up;
 z19=z4+3v*up;
 x20=x3; y20=y11;
 x21=x1; y21=y5;
 pero(.5u);
 draw z21--z1--z2--z3--z20;
 draw z2--z11;
 draw z7--z6--z5--z9--z10--z6;
 draw z10--z11;
 draw z9--z15--z12--z17--z16--z15;
 draw z12--z13--z18--z19--z16;
 draw z17--z18;
 pero(.15u);
 dashlineV(z1,z4,hust);
 dashlineV(z3,z4,hust);
 dashlineV(z19,z4,hust);
 dashlineV(z8,z5,hust);
 dashlineV(z21,z8,hust);
 dashlineV(z8,z7,hust);
 dashlineV(z14,z13,hust);
 dashlineV(z14,z20,hust);
 dashlineV(z11,z14,hust);
endfig;

beginfig(3)
 w:=40u;
 h:=50u;
 numeric s,v,uhel,zpart,hust;
 s:=w/4;
 v:=h/5;
 uhel:=45;
 zpart:=s*cosd(uhel)++v*sind(uhel);
 hust:=0.1;
 z1=(0s,0v);
 z2=z1+s*right;
 z3=z2 ZMove(2zpart,uhel,1/2);
 z4=z3+s*left;
 z5=z1+v*up;
 z6=z2+v*up;
 z7=z6 ZMove(zpart,uhel,1/2);;
 z8=z7+s*left;
 z9=z7+v*up;
 z12=z9 ZMove(zpart,uhel,1/2);
 z10=z9+s*right;
 z11=z12+s*right;
 z14=z10+v*up;
 z15=z11+v*up;
 z13=z8+2v*up;
 z16=z4+3v*up;
 x17=x3; y17=y9;
 pero(.5u);
 draw z2--z6--z5--z1--z2--z3--z17;
 draw z6--z7--z8--z5;
 draw z8--z13--z14--z10--z9--z7;
 draw z10--z11--z15--z16--z13;
 draw z13--z16;
 draw z14--z15;
 pero(.15u);
 dashlineV(z1,z4,hust);
 dashlineV(z3,z4,hust);
 dashlineV(z16,z4,hust);
 dashlineV(z12,z9,hust);
 dashlineV(z12,z17,hust);
 dashlineV(z12,z11,hust);
endfig;

beginfig(4)
 w:=40u;
 h:=50u;
 numeric s,v,uhel,zpart,hust;
 s:=w/4;
 v:=h/5;
 uhel:=45;
 zpart:=s*cosd(uhel)++v*sind(uhel);
 hust:=0.1;
 z1=(0s,0v);
 z2-z1=z8-z5=z9-z12=z3-z4=3s*right;
 z6-z5=z11-z12=z7-z6=z10-z11=z14-z13=z15-z16=z18-z19=z11-z12=s*right;
 z5-z1=z13-z6=z16-z19=z12-z4=v*up;
 z12=z5 ZMove(zpart,uhel,1/2);
 z16=z13 ZMove(2zpart,uhel,1/2);
 x17=x6; y17=y12;
 pero(.5u);
 draw z1--z2--z8--z7--z14--z13--z6--z5--cycle;
 draw z17--z12--z5;
 draw z2--z3--z9--z8;
 draw z9--z10;
 draw z7--z18--z15--z14;
 draw z15--z16--z13;
 pero(.15u);
 dashlineV(z1,z4,hust);
 dashlineV(z3,z4,hust);
 dashlineV(z12,z4,hust);
 dashlineV(z6,z11,hust);
 dashlineV(z11,z17,hust);
 dashlineV(z19,z11,hust);
 dashlineV(z19,z16,hust);
 dashlineV(z19,z18,hust);
endfig;

beginfig(5)
 w:=40u;
 h:=30u;
 numeric s,v,uhel,zpart,hust;
 s:=w/4;
 v:=h/3;
 uhel:=45;
 zpart:=s*cosd(uhel)++v*sind(uhel);
 hust:=0.1;
 for i:=0 upto 3:
  for j:=0 upto 2:
   for k:=0 upto 2:
    z[i+10j+100k]=(i*s,j*v) ZMove(k*zpart,uhel,1/2);
   endfor;
  endfor;
 endfor;
 x1000=x11; y1000=y110;
 x1001=x102; y1001=y12;
 x1002=x222; y1002=y122;
 pero(.5u);
 draw z1000--z110--z10--z0--z2--z12--z13--z23--z21--z11--z10;
 draw z23--z123--z122--z222--z221--z21;
 draw z222--z1002;
 draw z2--z102--z1001;
 draw z13--z113--z123;
 pero(.15u);
 dashlineV(z0,z100,hust);
 dashlineV(z110,z100,hust);
 dashlineV(z102,z100,hust);
 dashlineV(z1000,z111,hust);
 dashlineV(z11,z111,hust);
 dashlineV(z211,z111,hust);
 dashlineV(z111,z112,hust);
 dashlineV(z12,z112,hust);
 dashlineV(z212,z112,hust);
 dashlineV(z113,z112,hust);
 dashlineV(z122,z112,hust);
 dashlineV(z1001,z112,hust);
 dashlineV(z1002,z212,hust);
 dashlineV(z211,z212,hust);
 dashlineV(z211,z221,hust);
endfig;

beginfig(6)
 w:=40u;
 h:=30u;
 numeric s,v,uhel,zpart,hust;
 s:=w/4;
 v:=h/3;
 uhel:=45;
 zpart:=s*cosd(uhel)++v*sind(uhel);
 hust:=0.1;
 for i:=0 upto 2:
  for j:=0 upto 2:
   for k:=0 upto 2:
    z[i+10j+100k]=(i*s,j*v) ZMove(k*zpart,uhel,1/2);
   endfor;
  endfor;
 endfor;
 pero(.5u);
 draw z111--z11--z10--z0--z1--z11;
 draw z1--z101--z111--z110--z10;
 draw z101--z102--z122--z120--z110;
 draw z102--z202--z222--z122;
 draw z222--z220--z120;
 pero(.15u);
 dashlineV(z0,z200,hust);
 dashlineV(z220,z200,hust);
 dashlineV(z202,z200,hust);
endfig;

beginfig(7)
 w:=40u;
 h:=30u;
 numeric s,v,uhel,zpart,hust;
 s:=w/4;
 v:=h/3;
 uhel:=45;
 zpart:=s*cosd(uhel)++v*sind(uhel);
 hust:=0.1;
 for i:=0 upto 3:
  for j:=0 upto 2:
   for k:=0 upto 2:
    z[i+10j+100k]=(i*s,j*v) ZMove(k*zpart,uhel,1/2);
   endfor;
  endfor;
 endfor;
 x1000=x111; y1000=y211;
 x1001=x1; y1001=y100;
 pero(.5u);
 draw z112--z12--z11--z1--z2--z12;
 draw z2--z102--z112--z111--z11;
 draw z213--z113--z112--z102--z103--z113;
 draw z103--z203--z213--z212--z112;
 draw z222--z122--z121--z111--z112--z122;
 draw z112--z212--z222--z221--z121;
 draw z1000--z210--z110--z111;
 draw z1001--z100--z110;
 pero(.15u);
 dashlineV(z1001,z101,hust);
 dashlineV(z1,z101,hust);
 dashlineV(z111,z101,hust);
 dashlineV(z1000,z211,hust);
 dashlineV(z111,z211,hust);
 dashlineV(z221,z211,hust);
 dashlineV(z100,z200,hust);
 dashlineV(z210,z200,hust);
 dashlineV(z203,z200,hust);
endfig;

beginfig(8)
 w:=40u;
 h:=30u;
 numeric s,v,uhel,zpart,hust;
 s:=w/4;
 v:=h/3;
 uhel:=45;
 zpart:=s*cosd(uhel)++v*sind(uhel);
 hust:=0.1;
 for i:=0 upto 3:
  for j:=0 upto 2:
   for k:=0 upto 2:
    z[i+10j+100k]=(i*s,j*v) ZMove(k*zpart,uhel,1/2);
   endfor;
  endfor;
 endfor;
 pero(.5u);
 draw z10--z0--z3--z13--z10--z110--z113--z13;
 draw z3--z203--z223--z123--z113;
 draw z223--z222--z122--z123;
 draw z112--z122;
 pero(.15u);
 dashlineV(z0,z100,hust);
 dashlineV(z110,z100,hust);
 dashlineV(z102,z100,hust);
 dashlineV(z102,z112,hust);
 dashlineV(z102,z202,hust);
 dashlineV(z203,z202,hust);
 dashlineV(z222,z202,hust);
endfig;

beginfig(10)
 w:=40u;
 h:=30u;
 numeric s,v,uhel,zpart,hust;
 s:=w/4;
 v:=h/3;
 uhel:=45;
 zpart:=s*cosd(uhel)++v*sind(uhel);
 hust:=0.1;
 z1=(0s,0v); z2=(1s,0v); z3=(1s,1v); z4=(2s,1v); z5=(2s,2v); z6=(0s,2v);
 z7=z1 ZMove(zpart,uhel,1/2);
 z8=z2 ZMove(zpart,uhel,1/2);
 z9=z3 ZMove(zpart,uhel,1/2);
 z10=z4 ZMove(zpart,uhel,1/2);
 z11=z5 ZMove(zpart,uhel,1/2);
 z12=(1s,2v) ZMove(zpart,uhel,1/2);
 z13=z12 ZMove(zpart,uhel,1/2);
 z14=z6 ZMove(zpart,uhel,1);
 z15=z9 ZMove(zpart,uhel,1/2);
 z17=(0s,1v) ZMove(zpart,uhel,1/2);
 z16=z17 ZMove(zpart,uhel,1/2);

 pero(.5u);
 draw z1--z2--z3--z4--z5--z6--cycle;
 draw z4--z10--z11--z12--z13--z14--z6;
 draw z5--z11;
 draw z2--z8;
 draw z8--(x9,y3);
 draw z13--(x13,y12);
 pero(.15u);
 dashlineV(z1,z7,hust);
 dashlineV(z7,z8,hust);
 dashlineV(z7,z17,hust);
 dashlineV(z17,z10,hust);
 dashlineV(z17,z16,hust);
 dashlineV(z16,z15,hust);
 dashlineV(z3,z15,hust);
 dashlineV(z14,z16,hust);
 dashlineV(z12,z8,hust);
 dashlineV(z13,z15,hust);
endfig;

beginfig(11)
 w:=40u;
 h:=30u;
 numeric s,v,uhel,zpart,hust;
 s:=w/4;
 v:=h/3;
 uhel:=45;
 zpart:=s*cosd(uhel)++v*sind(uhel);
 hust:=0.1;
 z1=(0s,0v); z2=(2s,0v); z3=(0s,1v); z4=(2s,1v);
 z5=z1 ZMove(zpart,uhel,1/2);
 z7=z3 ZMove(zpart,uhel,1/2);
 z8=z4 ZMove(zpart,uhel,1/2);
 z6=(1s,0v) ZMove(zpart,uhel,1/2);
 z10=z8+(0s,1v); z9=z10+(-1s,0v);
 z11=z9 ZMove(zpart,uhel,1/2);
 z12=z10 ZMove(zpart,uhel,1/2);
 z14=z6 ZMove(zpart,uhel,1/2);
 z13=(x12,y14);

 pero(.5u);
 draw z1--z2--z4--z3--cycle;
 draw z3--z7--z8--z4;
 draw (x6,y7)--z9--z10--z8;
 draw z9--z11--z12--z10;
 draw z2--z13--z12;
 pero(.15u);
 dashlineV(z1,z5,hust);
 dashlineV(z7,z5,hust);
 dashlineV(z5,z6,hust);
 dashlineV(z6,z9,hust);
 dashlineV(z14,z6,hust);
 dashlineV(z14,z11,hust);
 dashlineV(z13,z14,hust);
endfig;

end;
d31

d32

d33

d34

d35

d36

d37

d38

d310

d311

verbatimtex \def\ds{\displaystyle}\def\Over{\ds\over\ds} etex
prologues:=1;

input makra
input mkmakra

u:=1cm;
l:=0.2mm;
t:=0.1mm;

def dotcurveN(expr p,N)=
  tmp:=length(p);
  for t=0 upto N-1:
    drawdot point(tmp*t/(N-1)) of p;
  endfor
enddef;

beginfig(1)
  w:=3u;
  h:=3u;
  z1=(0,0); z2=(w,0);
  pickup pencircle scaled l;
  draw z1--z2;
  pickup pencircle scaled t;
  for i=1 upto 100:
    x3:=uniformdeviate w;
    x4:=x3;
    y3:=uniformdeviate h;
    y4:=uniformdeviate h;
    draw z3--z4;
  endfor;
  label.bot(btex zv\v et\v sen\'y pap\'\i r etex,(w/2,-4l));
endfig;

beginfig(2)
  w:=3u;
  h:=4u;
  z1=(1/5w,5/6h);
  pickup pencircle scaled 4l;
  drawdot z1;
  pickup pencircle scaled l;
  draw (0,0)--(w,0)--(w,h)--(0,h)--cycle;
  pickup pencircle scaled t;
  draw z1
    for i=1 upto 6:
      ..(z1+(u/8,(3/4-i)*u/2)){down}
      ..(z1+(-u/8,(1/4-i)*u/2)){down}
    endfor
    {down};
  draw z1
    for i=0 upto 10:
      ..(z1+(i*u/4+normaldeviate*(u/20),normaldeviate*(u/10)))
        {dir uniformdeviate 360}
    endfor
    ;
  label.urt(btex jehla etex,(x1,h+2l));
endfig;

end.
dest1

dest2

verbatimtex \def\ds{\displaystyle}\def\Over{\ds\over\ds} etex
prologues:=1;

input makra
input mkmakra

jedn=5mm;
u=1/10jedn;
cara=0.4mm;
popis=0.1mm;

uhelsipky=10;
delkasipky=0.5jedn;
delkauhlu=1jedn;

def sipka(expr odkud,kam,delka) =
        draw (kam-dir(angle(kam-odkud)+uhelsipky)*delka)--kam
           --(kam-dir(angle(kam-odkud)-uhelsipky)*delka);
enddef;

def sipkaa(expr kam,uhel,delka) =
        draw (kam-dir(uhel+uhelsipky)*delka)--kam
           --(kam-dir(uhel-uhelsipky)*delka);
enddef;

def dejuhel(expr a,b,c,delka,znamenko) =
        draw (b+dir(angle(a-b))*delka){dir(angle(a-b)+90)}
%           ..(b+( (a-b)/length(a-b)+(c-b)/length(c-b) )*znamenko/2)*delka)
%nepovedla se
           ..{dir(angle(c-b)+90)}(b+dir(angle(c-b))*delka);
enddef;

%fouclt_3 se nekreslĄ (¨krtnut˜)

beginfig(1)
  w:=11jedn;
  h:=9jedn;
        RR=5.5jedn;
        z1=(6jedn,0);
        z2=(0,0); z3=(12jedn,0);
        z4=(6jedn,-1jedn); z5=(6jedn,8.5jedn);

        pickup pencircle scaled cara;
        draw halfcircle scaled 2RR shifted z1;
        draw z2--z3; draw z4--z5;

        pickup pencircle scaled popis;
        z6=(RR,0) rotated 135 shifted z1;
        z7=(x6,y4);
        draw z1--z6--z7--z4;
        sipka(z4,z7,delkasipky);
        sipka(z7,z4,delkasipky);
        z8=(x1,y6);
        z9=(7/8[x1,x7],y1);
        z10=(x1,whatever)=z6+whatever*dir(angle(z6-z1)+90);
        draw z9--z10;
        draw z10--z6--z8;
        dejuhel(z6,z1,z2,delkauhlu,+1);
        dejuhel(z6,z10,z9,2*delkauhlu,+1);
          dejuhel(z6,z10,z9,1.9*delkauhlu,+1);
        dejuhel(z6,z10,z1,1.5*delkauhlu,+1);

        uhel=25;
        z11=whatever[z10,z9]=z8+whatever*dir uhel;
        draw z8--z11--z6;
        uhel:=angle(z10-z6);
        z13=z11+(RR/2)*dir uhel;
        z12=z11-(RR/2)*dir uhel;
        draw z12--z13;
        dejuhel(z6,z8,z11,delkauhlu,+1);
        dejuhel(z13,z11,z10,2*delkauhlu,+1);
        dejuhel(z12,z11,z9,2*delkauhlu,+1);
          dejuhel(z13,z11,z10,1.9*delkauhlu,+1);
          dejuhel(z12,z11,z9,1.9*delkauhlu,+1);

        z14=z6+(1jedn,0) rotated 135;
        z15=z14+z10-z6;
        draw z6--z14--z15--z10;
        sipka(z14,z15,delkasipky); sipka(z15,z14,delkasipky);

        pickup pencircle scaled cara;
        draw z6--z11;
        sipka(z6,z11,delkasipky);
        z16=z6-(0.6jedn,0) rotated 225; z17=2*z6-z16;
        z18=z11+z16-z6; z19=z11+z17-z6;
        draw z16--z17;
        draw z18--z19;

        label.urt(btex S etex,(x1+1u,y1+1u));
        label.top(btex 1 etex,(x6,y6+3u));
        label.lrt(btex 2 etex,(x11+1u,y11-1u));
        label.rt(btex X etex,(x10+1u,y10-2u));
        label.top(btex $a$ etex,((x7+x4)/2,y7+1u));
        label.ulft(btex $b$ etex,((x14+x15)/2,(y14+y15)/2));

        label.ulft(btex $\varphi$ etex,(x10,y10-1.5jedn));
        label.top(btex $\varphi$ etex,(x1-0.6jedn,y1+1u));
        label(btex $\omega'\!\!\Delta t$ etex,(x11,y12-1u));
        label.ulft(btex $\omega\!\Delta t$ etex,(x8-1u,y11));
        label.llft(btex FOUCLT\_3.mf etex,(x3,y10));
endfig;

end;

fouclt1
verbatimtex \def\ds{\displaystyle}\def\Over{\ds\over\ds} etex
prologues:=1;

input makra
input mkmakra

u=1mm;
v=1mm;

%def sipky
def sipka(expr cil,delka,smer)=
        draw ((-1,0.3)--(0,0)--(-1,-0.3)) scaled delka rotated
        smer shifted cil; enddef;

def kolo(expr stred,polomer)=
        draw (fullcircle scaled 2polomer shifted stred);enddef;


beginfig(1)
  w:=40u;
  h:=40u;
pickup pencircle scaled 0.2v;
z100=(0,0);z101=(0,h);z102=(w,h);z103=(w,0);
%draw z100--z101--z102--z103--z100;

RR=10u;
z1=(RR,RR);
kolo(z1,RR);
z2=(RR,3RR);
kolo(z2,RR);
z3=(RR+(sqrt(3))*RR,2RR);
kolo(z3,RR);

z4=(RR+((sqrt(3))/(3))*RR,2RR);
kolo(z4,RR);

x=(2/(sqrt(3)))*RR;
z5=(RR+((sqrt(3))/3)*RR-x,2RR);
z6=(RR+x,3RR);
z7=(RR+x,RR);
draw z1--z5--z2--z6--z3--z7--z1;
draw z5--z3;
draw z6--z1;
draw z2--z7;

z50=(RR,0) rotated 135;
z51=(RR,0) rotated 45;
z52=(z5+z2+z4)/3;
label.ulft("A",(x2+x50,y2+y50));
label.urt("B",(x3+x51,y3+y51));
label.llft("C",(x1-x51,y1-x51));
label("D",(x52,y52-1u));

%proofing:=2;
%labels(range 1 thru 300);
endfig;

end
hrach51
verbatimtex \def\ds{\displaystyle}
\def\Over{\ds\over\ds}
\def\prumer{\not o}etex
prologues:=1;

input makra
input mkmakra

u=1cm;
l=0.5mm;
t=0.2mm;

beginfig(1)
  w:=7u;
  h:=4u;
  z1=(w/2,1/10h);
  z2=(7/8w,y1);
  z3=(x2,2/5h);
  z4=(2/3[x1,x2],y3);
  z5=(x4-length(z4-z1),y4);
  z6=(x5,19/20h);
  z7=(x6+1/4u,y6);
  z8=(x5,3/5[y5,y6]);
  x9=x7; z9=z8+whatever*(z8-z4) rotated 90;
  z10=1/5[z8,z4];
  x12=x5; z12=z10+whatever*(z9-z8);
  z11=whatever[z8,z9]=z12+whatever*(z8-z4);
  z13=whatever[z4,z8]=z6+whatever*(z9-z8);
  z14=(3/5x8,y8);
  z15=(x14,y3);
  z16=(x14,y6);
  z20=z1+2/5(z4-z1)rotated -90;
  z21=(-3/2)[z1,z20];
  z22=3/2[z4,z8];
  delobl:=u/2;
  z51=z4+delobl*dir(angle(z8-z4));
  z52=(x4-delobl,y4);
  z53=(x4-7/6delobl,y4);
  z54=z4+7/6delobl*dir(angle(z1-z4));
  z55=(x1+delobl,y1);
  z56=z1+delobl*dir(angle(z20-z1));
  pickup pencircle scaled t;
  draw (0,y1)--(w,y1);
  draw (0,y3)--(w,y3);
  draw (0,y6)--(w,y6);
  draw z2--z3;
  draw z1--z4--z22;
  draw z6--z5..{z20-z1}z1;
  draw z21--z20;
  draw z7--(x7,y5);
  draw z6--z13;
  draw z15--z16; draw z8--z14;
  draw z11--z12--z10;
  delsip:=u/4;
  draw sipka(delsip,90) shifted z16;
  draw sipka(delsip,-90) shifted z14;
  draw sipka(delsip,90) shifted z14;
  draw sipka(delsip,-90) shifted z15;
  draw sipka(delsip,90) shifted z3;
  draw sipka(delsip,-90) shifted z2;
  draw sipka(delsip,-90) shifted z2;
  draw sipka(delsip,0) shifted z6;
  draw sipka(delsip,180) shifted z7;
  oblouk(z4,delobl,angle(z8-z4),180);
  oblouk(z4,7/6delobl,180,angle(z1-z4)+360);
  oblouk(z1,delobl,angle(z20-z1),0);
  pickup pencircle scaled l;
  draw z9--z11;
  draw z10--z8--z12;
  draw sipka(delsip,angle(z10-z8)) shifted z10;
  draw sipka(delsip,angle(z12-z8)) shifted z12;
  draw sipka(delsip,angle(z11-z8)) shifted z11;

  label.rt(btex $R$ etex,(x2+l,1/2[y2,y3]));
  label.lrt(btex $S$ etex,(x4+l,y4-l));
  label.lrt(btex $\theta$ etex,(x55,1/2[y55,y56]));
  label.ulft(btex $\varphi$ etex,(x52,1/2[y51,y52]));
  label.lrt(btex $r_2$ etex,(1/2[x1,x4],1/2[y1,y4]));
  label.llft(btex $90^\circ-\theta$ etex,(x53,1/2[y53,y54]));
  label.llft(btex $F_g$ etex,(x12-l,y12));
  label.urt(btex $F$ etex,(x10+l,y10));
  label.lft(btex $r$ etex,(x14-l,1/2[y14,y15]));
  label.lft(btex $\hat h$ etex,(x14-l,1/2[y14,y16]));
  label.top(btex $\d x$ etex,(1/2[x6,x7],y7+3l));
  label.lrt(btex $\d l$ etex,(x9+2l,y9-l));
  label.urt(btex obr. 3 etex,(0,0));
endfig;


beginfig(2)
  w:=6u;
  h:=5u;
  z1=(0,0); z2=(w/3,y1); z3=(w-x2,y2); z4=(w-x1,y1);
  z5=(x2,x2-x1); z6=(w-x5,y5); z8=(x5,y5+x5-x1); z9=(3/5[x5,x6],1/2[y5,y8]);
  z10=(x1,y5); z11=(w-x10,y10);
  path p[];
  p1=z10{up}..z8{right}..{down}z6;
  p2=p1 shifted (x5,0);
  z7=p1 intersectionpoint(p2);
  pickup pencircle scaled l;
  draw z2--z5; draw z3--z6;
  draw z1--z10..z8{right}..{dir(angle(z7-z5)-90)}z7;
  draw z4--z11..(w-x8,y8){left}..{dir(angle(z7-z6)+90)}z7;

  z12=(x9-length(z9-z5),y9);
  z13=(x12,1/5[y2,y12]);
  z14=(x12,h); z15=(x9,y14);
  z16=(1/5[x10,x5],y12); z17=(x16,y8);
  z18=3/5[z16,z17];
  z21=z8+u*dir(angle(z8-z9)-90);
  p3=z5{dir(angle(z9-z5)+90)}..z12{up}..z8--z21;
  z19=(z18--(w,y18))intersectionpoint p3;
  z20=(x15,1/2[y2,y5]);
  pickup pencircle scaled t;
  draw p3; draw z5--z8; draw z5--z9--z8;
  draw z10--z11;
  draw z13--z14--z15--z20; draw (x13-u/3,y13)--(x2+u/3,y13);
  draw (w,y16)--z16--z17--(w,y17);
  draw z18--z19--z9;
  draw (x19,y12)--(x19,y8);
  draw sipka(delsip,180) shifted (x2,y13);
  draw sipka(delsip,0) shifted z13;
  draw sipka(delsip,0) shifted z15;
  draw sipka(delsip,180) shifted z14;
  draw sipka(delsip,90) shifted z17;
  draw sipka(delsip,-90) shifted z16;
  draw sipka(delsip,90) shifted z18;
  draw sipka(delsip,-90) shifted z18;
  oblouk(z8,delobl,0,angle(z21-z8));
  oblouk(z9,delobl,angle(z5-z9),-90);
  oblouk(z9,delobl,angle(z19-z9),180);
  draw z1--z4;
  draw sipka(delsip,0) shifted z2;
  draw sipka(delsip,180) shifted z1;
  draw sipka(delsip,0) shifted z3;
  draw sipka(delsip,180) shifted z2;

  label.bot(btex $2R_{\rm prumer}$ etex,(1/2[x1,x2],y1-2l));
  label.bot(btex $d$ etex,(1/2[x2,x3],y1-2l));
  label.bot(btex $H_2O$ etex,(1/2[x3,x4],y1+u));
  label.bot(btex $x$ etex,(1/2[x13,x2],y13-3l));
  label.llft(btex $\theta$ etex,(x9-3l,y9-5/4delobl));
  label.ulft(btex $\varphi$ etex,(x9-5/4delobl,y9+l));
  label.urt(btex $\theta$ etex,(x8+5/4delobl,y8+4l));
  label.lft(btex $r$ etex,(x16-2l,1/2[y16,y18]));
  label.lft(btex $h$ etex,(x16-2l,1/2[y17,y18]));
  label.top(btex $R$ etex,(1/2[x14,x15],y14+2l));
  label.llft(btex obr. 5 etex,(w,h));
  label.ulft(btex $R$ etex,(1/2[x5,x9],1/2[y5,y9]+l));
endfig;

beginfig(3)
  w:=6u;
  h:=5u;
  z1=(0,0); z2=(2/3w,y1); z3=(2w-x2,y2); z4=(2w-x1,y1);
  z5=(x2,u); z6=(2w-x5,y5); z8=(x5,y5+x5-x1); z9=(3/5[x5,x6],1/2[y5,y8]);
  z10=(x1,y5); z11=(2w-x10,y10);
  path p[];
  p1=z10{up}..z8{right}..{down}z6;
  p2=p1 shifted (x5,0);
  z7=p1 intersectionpoint(p2);
  pickup pencircle scaled l;
  draw z2--z5;
  draw z1--z10..z8{right}..{dir(angle(z7-z5)-90)}z7;

  z12=(x9-length(z9-z5),y9);
  z13=(x12,1/5[y2,y12]);
  z14=(x12,h); z15=(x9,y14);
  z16=(3/5[x10,x5],y12); z17=(x16,y8);
  z18=1.5/5[z16,z17];
  z21=z8+u*dir(angle(z8-z9)-90);
  p3=z5{dir(angle(z9-z5)+90)}..z12{up}..z8--z21;
  z19=(z18--(w,y18))intersectionpoint p3;
  z20=(x15,1/2[y2,y5]);
  x13:=x19; x14:=x13;
  z50=(z13--z14) intersectionpoint p1;
  z51=(2/5[x1,x50],y50); z52=(x51,y17);
  pickup pencircle scaled t;
  draw p3; draw z5--z8; draw z5--z9--z8;
  draw z10--z5;
  draw (x13-u/3,y13)--(x2+u/3,y13);
  draw z9--z16--z17--(x9,y17);
  draw z13--z14; draw z18--z19--z9;
  draw z5--z50--z51--z52--z17;
  draw (x51,y51-u/2)--(x52,y52+u/2);
  draw sipka(delsip,180) shifted (x2,y13);
  draw sipka(delsip,0) shifted z13;
  draw sipka(delsip,90) shifted z17;
  draw sipka(delsip,-90) shifted z16;
  draw sipka(delsip,90) shifted z18;
  draw sipka(delsip,-90) shifted z18;
  draw sipka(delsip,90) shifted z51;
  draw sipka(delsip,-90) shifted z52;
  oblouk(z9,2delobl,angle(z19-z9),180);
  oblouk(z5,2delobl,90,angle(z50-z5));

  label.bot(btex $u$ etex,(1/2[x13,x2],y13-3l));
  label.ulft(btex $\varphi$ etex,(x9-5/2delobl,y9+l));
  label.lft(btex $r$ etex,(x16-2l,1/2[y16,y18]));
  label.lft(btex $h$ etex,(x16-2l,1/2[y17,y18]));
  label.urt(btex $R$ etex,(1/2[x8,x9],1/2[y8,y9]+l));
  label.lft(btex $y$ etex,(x51-2l,1/2[y51,y52]));
  label.rt(btex $\alpha$ etex,(x5+2l,y5+u));
  label.llft(btex obr. 6 etex,(0,h));
  label.llft(btex (detail obr\'azku 5) etex,(0,h-15pt));
endfig;

end
sprcha1

sprcha2

sprcha3

verbatimtex \def\ds{\displaystyle}\def\Over{\ds\over\ds} etex
prologues:=1;

input makra
input mkmakra

u:=0.8mm;

poc:=10u;
def trychtyr(expr poloha_pr_hor_rohu,dn,dt,hn,ht)= %                  __
 begingroup                                        % \  <---dn--->   / ^
  save x,y,p;                                      %  \             /  |
  path p;                                          %   \           /   |hn
  z1=(0,0);                                        %    \         /    |
  x2=x1+(dn-dt)/2;                                 %     \       /     |
  y2=y1-hn;                                        %   ___\     /______V
  z3=z2+ht*down;                                   %   ^  |    |
  z4=z1+dn/2*right;                                %   |  |    |
  z5=z3+dt/2*right;                                % ht|  |<dt>|
  p:=(z1--z2--z3) shifted poloha_pr_hor_rohu;      %   |  |    |
  draw p;                                          %   V__|    |
  draw p reflectedabout (z4,z5);
 endgroup;
enddef;

beginfig(1)
  w:=70u;
  h:=60u;
 numeric v[];
 p:=u;
 delka:=4u;
 dn:=.8w;
 dt:=w/6;
 hn:=h/2;
 ht:=h-hn-poc;
 alfa:=angle((hn,(dn-dt)/2));
 phi:=27;
 r:=h/15;
 r_cast:=h/15;
 v0:=.7ht;
 v1=v2=h/6;
 z100=(dn/2,0);
 z101=(dn/2,h);
 z0=(0,h);
 z1=z0+3delka*dir(270+alfa)+r_cast*dir(alfa);
 z2=z1 reflectedabout(z100,z101);
 x3=x1;
 z3=z0+whatever*dir(270+alfa);
 z4=z0+whatever*dir(270+alfa);
 y4=y1;
 z5=z4 reflectedabout(z100,z101);
 z6=z5+whatever*dir(270-alfa);
 y6=y8=h-.9hn;
 x9=x8=w;
 z7=1/2[z6,z8];
 z9=z7+whatever*dir(phi);
 x11=x1;
 y11=h-.9hn;
 z10=(dn/2,.8ht+poc);
 pero(p);
 odot(z1,p);
 odot(z2,p);
 trychtyr(z0,dn,dt,hn,ht);
 pero(.75u);
 vektor(z10,v0,delka,270);
 vektor(z1,v1,delka,270+alfa);          z21=z1+(v1,delka) rotated (270+alfa);
 vektor(z2,v2,delka,270-alfa);          z22=z1+(v1,delka) rotated (270-alfa);
 pero(.5u);
 kruznice(z1,r_cast);
 kruznice(z2,r_cast);
 oblouk(z1,r,270,270+alfa);
 oblouk(z3,2r,270,270+alfa);
 oblouk(z7,2r,0,phi);
 draw z4--z5;
 draw z6--z8;
 draw z7--z9;
 draw z1--z11;

label.top(btex ${\rm\vec\omega}$ etex,(x9,y9+1u));
label.urt(btex $\varphi$ etex,(x7+9u,y7+1u));
label.rt(btex ${\rm\vec{v}}$ etex,(x10+1u,y10-v0/2));
label.urt(btex ${\rm\vec{v}_1}$ etex,(1/2[x1,x21],1/2[y1,y21]-2u));
label.ulft(btex ${\rm\vec{v}_2}$ etex,(2*x10-1/2[x1,x21],1/2[y1,y21]-2u));
label.lrt(btex $\alpha$ etex,(x3+1u,y3-9u));
label(btex ${\rm\vec{F}_{C_1}}$ etex,(x1,y0));
label(btex ${\rm\vec{F}_{C_2}}$ etex,(x2,y0));
label.top(btex Obr. IV.1.6 etex,(x10,0));
endfig;

end;
tri1
verbatimtex \def\ds{\displaystyle}\def\Over{\ds\over\ds} etex
prologues:=1;

input makra
input mkmakra

u=1mm;
v=1mm;

%def sipky
def sipka(expr cil,delka,smer)=
        draw ((-1,0.3)--(0,0)--(-1,-0.3)) scaled delka rotated
        smer shifted cil; enddef;

def kolo(expr stred,polomer)=
        draw (fullcircle scaled 2polomer shifted stred);enddef;


beginfig(1);
  w:=60u;
  h:=60u;

pickup pencircle scaled 0.2v;
z100=(0,0);z101=(0,h);z102=(w,0);z103=(w,h);
%draw z100--z101--z103--z102--z100;

RR=25u;
z1=(w/2,h/2);
path p[];
p1=fullcircle scaled 2RR shifted z1;
draw p1;


z2=(0,h/2);
z3=(w,h/2);
z4=(w/2,0);
z5=(w/2,h);
draw z2--z3;
draw z5--z4;
sipka(z5,3u,90);
z99=(w/2,h/2+RR);
sipka(z99,3u,90);

z6=point 1.08 of p1;
pickup pencircle scaled 0.15v;
draw z1--z6;

z7=0.21[z1,z6];
pickup pencircle scaled 0.3v;
draw z7--z6;
sipka(z7,3u,angle(z7-z6));

z8=z7+0.4RR*right;
draw z6--z8;
sipka(z8,3u,angle(z8-z6));

z9=z6+0.4RR*right;
draw z6--z9;
sipka(z9,3u,0);

z10=z8+0.6RR*right;
pickup pencircle scaled 0.15v;
draw z7--z8--z10; draw z8--z9;

pickup pencircle scaled 0.15v;
z21=0.82[z7,z8];
z22=0.41[z7,z6];
draw z22{dir(angle(z6-z7)-90)}..{dir -90}z21;
sipka(z22,2u,angle(z6-z7)+85);


z23=0.53[z8,z6];
z24=0.56[z8,z10];
draw z23{dir(angle(z6-z8)-90)}..{dir -90}z24;
sipka(z23,2u,angle(z6-z8)+87);


z31=0.29[z6,z7];
z32=0.38[z6,z8];
draw z31{dir(angle(z6-z7)-90)}..{dir(angle(z6-z8)-90)}z32;

pickup pencircle scaled 0.1v;
z40=(w/2+14.4u,h/2+14.7u);
z41=(w/2+14.4u,h/2+24u); z45=z41+0.4RR*right;
draw z40--z41;
draw z41--z45;

label.llft(btex S etex,(x1,y1));
label.bot(btex $\vec g$ etex,(x8,y8-1u));
label(btex $\varphi'$ etex,(x7+2u,y7+4u));
label(btex $\varphi$ etex,(x8+6u,y8+1u));
label.ulft(btex $\vec a_g$ etex,(2/5[x6,x7],2/5[y6,y7]));
label.top(btex $\varphi-\varphi'$ etex,(1/2[x41,x45],y41));
label.rt(btex $\vec a_0$ etex,(x9+1u,y9));
label.lrt(btex $\vec\omega$ etex,(x5+2u,y5));
label.llft(btex $R_Z$ etex,(x99,y99-1u));

%proofing:=2;
%labels(range 1 thru 300);

endfig;

end
trosky21
verbatimtex \def\ds{\displaystyle}\def\Over{\ds\over\ds} etex
prologues:=1;

input makra
input mkmakra

u=1mm;
v=1mm;

%def sipky
def sipka(expr cil,delka,smer)=
        draw ((-1,0.3)--(0,0)--(-1,-0.3)) scaled delka rotated
        smer shifted cil; enddef;

def kolo(expr stred,polomer)=
        draw (fullcircle scaled 2polomer shifted stred);enddef;


beginfig(1)
  w:=70u;
  h:=60u;

pickup pencircle scaled 0.2v;
z100=(0,0);z101=(0,h);z102=(w,0);z103=(w,h);
%draw z100--z101--z103--z102--z100;

RR=18u;
z1=(3w/5,h/2);
path p[];
p1=fullcircle scaled 2RR shifted z1;
draw p1;


z2=point 2.9 of p1;
pickup pencircle scaled 0.15v;
draw z1--z2;

pickup pencircle scaled 0.2v;
z3=(0,h/2);
z6=z3+3u*right;
draw z1--z6;

z4=z2+27u*left;
draw z2--z4;

z10=0.67[z1,z3];
z11=1.4[z2,z10]; z12=1.4[z10,z2];
draw z11--z12;

pickup pencircle scaled 0.1v;
z61=0.4[z10,z2]; z62=0.3[z10,z1];
draw z62{dir 90}..{dir(angle(z2-z10)+90)}z61;
z64=0.4[z2,z10]; z65=z2+8.5u*left;
draw z64{dir(angle(z2-z10)+90)}..{dir 90}z65;
z68=0.17[z2,z10]; z69=0.2[z2,z1];
draw z68{dir(angle(z2-z10)-90)}..{dir(angle(z1-z2)+90)}z69;

pickup pencircle scaled 0.2v;
sipka(z6,3u,180);
sipka(z4,3u,180);

pickup pencircle scaled 0.1v;
z34=point 2.55 of p1;
z35=2.3[z34,z1];
z36=1.3[z1,z34];
draw z35--z36;

z44=point 0.555 of p1;
z45=2.3[z44,z1];
z46=1.3[z1,z44];
draw z45--z46;

z50=0.61[z1,z45]; z51=z1+1.3*0.61*RR*left;
draw z50{dir(angle(z1-z45)+90)}..{dir 90}z51;

z52=0.3[z1,z45]; z53=0.3999999[z1,z2];
draw z52{dir(angle(z1-z45)+90)}..{dir(angle(z1-z2)+90)}z53;

pickup pencircle scaled 1/3v;
drawdot z2+(0,-2u);

label.bot(btex $\beta$ etex,(x65+3u,y65));
label(btex $\beta$ etex,(x10+6u,y10+1u));
label.bot(btex $\alpha$ etex,(x51+3u,y51-1u));
label(btex $\varphi$ etex,(x53,y1));
label.bot(btex rovn\'\i k etex,(x45,y45));
label.top(btex rovn\'\i k etex,(x46,y46));
label.rt(btex ke Slunci etex,(x4-5u,(y4+y6)/2));

%proofing:=2;
%labels(range 1 thru 300);
endfig;

end
trosky51
verbatimtex \def\ds{\displaystyle}\def\Over{\ds\over\ds} etex
prologues:=1;

input makra
input mkmakra

u:=0.46mm;
p:=.6u;

def oblouk_elipsy(expr stred,polomer_x,splosteni,sklon,poc_uhel,konc_uhel)=
 %poc_uhel -> konc_uhel proti smeru
 %hodin. rucicek
 %poc_uhel,konc_uhel -- jako na kruznici
 ((dir(poc_uhel){dir(poc_uhel+90)}..dir((konc_uhel+poc_uhel)/2)..
  {dir(konc_uhel+90)}dir(konc_uhel)) xscaled polomer_x
  yscaled (polomer_x*splosteni) rotated sklon shifted stred);
enddef;

beginfig(1)
  w:=100u;
  h:=100u;
 pair SZP,JZP,SMP,JMP,JMP',SMP'',JMP'',A;
 delka:=3u;
 path P[];
 s:=w/100;
 v:=h/100;
 const:=1/4;
 r:=40s;
 hust:=0.03;
 odklon:=30;
 sklon_mag:=8; %maly
 z0=(60s,50v);
 SZP=z0+r*up;
 JZP=SZP rotatedabout(z0,180);
 SMP=z0+r*(up scaled (1-sind(sklon_mag)) rotated (odklon));
 JMP=SMP rotatedabout(z0,180);
 JMP'=z0+r*dir(angle(JMP-SMP));
 SMP''=z0+1.1r*dir(angle(SMP-JMP));
 JMP''=SMP'' rotatedabout(z0,180);
 pero(.75p);
 P1=oblouk_elipsy(z0,r,const,0,180,360);
 P2=oblouk_elipsy(z0+r*sind(sklon_mag)*dir(270+odklon),r*cosd(sklon_mag),
  const,odklon,180+sklon_mag,360-sklon_mag);
 draw P1;
 draw P2;
 draw SMP--SMP'';
 draw JMP'--JMP'';
 z1=point 1.4 of P1;
 z2=point 1.7 of P2;
 P3=SZP..{down}z1;
 draw P3;
 A=point .42 of P3;
 draw z2{dir(90+sklon_mag+30)}..A..SMP;
 draw SMP{dir(sklon_mag+35)}..{right}SZP;
 draw sipka(delka,10) shifted z1;
 draw sipka(delka,48) shifted z2;
 draw sipka(delka,115) shifted A;
 draw sipka(delka,153) shifted A;
 draw sipka(delka,3) shifted SZP;
 draw sipka(delka,215+sklon_mag) shifted SMP;
 pero(.5p);
 dashlineV(SMP,JMP,hust);
 dashlineV(JMP,JMP',hust);
 z10=(P1)intersectionpoint(P2);
 pero(p);
 draw (fullcircle scaled 2r shifted z0);
 q:=2p;
 pero(.9q);
 odot(SZP,q);
 odot(SMP,q);
 odot(JZP,q);
 odot(JMP,q);
 odot(z10,q);

 label(btex Obr. IV.1.8 etex,(w/2,-2.8u));
 label.llft(btex $\lambda$ etex,(x1-1u,y1-2u));
 label.llft(btex $\lambda_m$ etex,(x2+5u,y2-3u));
 label.rt(btex A etex,((xpart A)+2u,(ypart A)+3u));
 label.bot(btex SMP etex,(xpart SMP,(ypart SMP)-2u));
 label.top(btex SZP etex,(xpart SZP,(ypart SZP)+2u));
 label(btex $\delta$ etex,(0.5*((xpart SZP)+(xpart SMP))+2u,0.5*((ypart SMP)+(ypart SMP))+5u));
 label.top(btex JMP etex,((xpart JMP),(ypart JMP)+2u));
 label.top(btex JZP etex,((xpart JZP)-1u,(ypart JZP)+2.5u));

 label(btex magn. rovn\'\i k etex,(x2+27u,y2+8u));
 label(btex zem. rovn\'\i k etex,(x2+27u,y2-7u));

 label.lft(btex $\varphi$ etex,(((xpart A)+x1)/2,((ypart A)+y1)/2));
 label.rt(btex $\varphi_m$ etex,(((xpart A)+x2)/2,((ypart A)+y2)/2+3u));

endfig;

end;
zeme1