summaryrefslogtreecommitdiff
path: root/info/drawing-with-metapost/src/curves-astroid.mp
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-04-15 03:01:57 +0000
committerNorbert Preining <norbert@preining.info>2023-04-15 03:01:57 +0000
commit78e6b19d4678a9d641c4afa4ca800288cfa0a9d5 (patch)
treead774593055c02ade73402379b9df52568f6940f /info/drawing-with-metapost/src/curves-astroid.mp
parentb17717e3829bc08efb71ec2537d9d894c8b82d45 (diff)
CTAN sync 202304150301
Diffstat (limited to 'info/drawing-with-metapost/src/curves-astroid.mp')
-rw-r--r--info/drawing-with-metapost/src/curves-astroid.mp21
1 files changed, 21 insertions, 0 deletions
diff --git a/info/drawing-with-metapost/src/curves-astroid.mp b/info/drawing-with-metapost/src/curves-astroid.mp
new file mode 100644
index 0000000000..b572205217
--- /dev/null
+++ b/info/drawing-with-metapost/src/curves-astroid.mp
@@ -0,0 +1,21 @@
+\documentclass{standalone}
+\usepackage{luamplib}
+\begin{document}
+\mplibtextextlabel{enable}
+\begin{mplibcode}
+beginfig(1);
+ path base; base = fullcircle scaled 300;
+ path astroid; astroid =
+ for t=0 step 1/16 until 8:
+ hide(pair a, b, p;
+ a = (xpart point t of base, 0);
+ b = (0, ypart point t of base);
+ draw a -- b withpen pencircle scaled 1/4 withcolor 3/4;
+ p = whatever[a, b]; p - point t of base = whatever * (a - b) rotated 90;
+ ) p --
+ endfor cycle;
+ draw astroid withcolor 2/3 red;
+endfig;
+\end{mplibcode}
+\end{document}
+