diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /info/examples/ltt/disk.mp |
Initial commit
Diffstat (limited to 'info/examples/ltt/disk.mp')
-rw-r--r-- | info/examples/ltt/disk.mp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/info/examples/ltt/disk.mp b/info/examples/ltt/disk.mp new file mode 100644 index 0000000000..421a34abad --- /dev/null +++ b/info/examples/ltt/disk.mp @@ -0,0 +1,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;
|