summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/latex-tipps-und-tricks/simple.mp
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/latex-tipps-und-tricks/simple.mp')
-rw-r--r--Master/texmf-dist/doc/latex/latex-tipps-und-tricks/simple.mp30
1 files changed, 30 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/latex-tipps-und-tricks/simple.mp b/Master/texmf-dist/doc/latex/latex-tipps-und-tricks/simple.mp
new file mode 100644
index 00000000000..fa102cc4653
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/latex-tipps-und-tricks/simple.mp
@@ -0,0 +1,30 @@
+beginfig(1);
+u:=5mm; % Einheitslänge
+
+% Polygon, direkte Punktelisten
+draw (6u,0)--(8u,0)--(8u,4u); % Linie
+draw (8u,4u)..(6u,4u)..(6u,0); % Kurve
+
+% Rechteck und Quadrat, Angabe von Pfadvariablen
+path q; % Variable Typ Pfad
+q := unitsquare; % Einheitsquadrat
+fill q xscaled 4u yscaled 8u withcolor .8white;
+draw q scaled 3u shifted (u,u);
+
+% grauer Kreisring
+path p[]; % Array vom Typ path
+p1 := (3u,0)..(0,3u)..(-3u,0)..(0,-3u)..cycle;
+p2 := (2u,0)..(0,2u)..(-2u,0)..(0,-2u)..cycle;
+fill p1 shifted (15u,3u) withcolor 0.6white; % graue Kreisscheibe
+unfill p2 shifted(15u,3u); % Loch in der Mitte
+
+% Beschriftung
+z1=(10u,2u); % Startpunkte
+z2=(10u,6u);
+drawarrow z1--(8u,u);
+drawarrow z2--(6u,4u);
+label.rt("Linie",z1);
+label.rt("Kurve",z2);
+
+endfig;
+end;