summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/latex-tipps-und-tricks/disk.mp
blob: 8a5d5d1c74bd249e4db299e40f12dec243f8f077 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
u=1cm;

beginfig(1);
r=3;
path p[], is;
% grau markierter Kreisring
p[1] :=
  (0.5r*u,0)..(0,0.5r*u)..(-0.5r*u,0)..(0,-0.5r*u)..cycle;
p[2] :=
  (0.6r*u,0)..(0,0.6r*u)..(-0.6r*u,0)..(0,-0.6r*u)..cycle;
fill p2 withcolor 0.5white; unfill p1;
% dunkelgrauer Kreissektor von 110 bis 160 Grad
p3 := (0,0)--(r*u,0) rotated 110;
p4 := (0,0)--(r*u,0) rotated 160;
is := buildcycle(p1,p3,p2,p4);
fill is withcolor 0.3white;
% äußere und innere Ringe
draw (r*u,0)..(0,r*u)..(-r*u,0)..(0,-r*u)..cycle;
draw (0.1r*u,0)..(0,0.1r*u)..(-0.1r*u,0)..
     (0,-0.1r*u)..cycle;
draw p1; draw p2;
% Beschriftung
z1=(0.9r*u,0.8r*u);  z2=(-0.7r*u,0.8r*u);
drawarrow z1{left}--(0.6*r*u,0) rotated 45;
drawarrow z2--(0.6*r*u,0) rotated 130;
label.urt("Spur",z1);
label.ulft("Sektor",z2);
endfig;
end;