summaryrefslogtreecommitdiff
path: root/info/drawing-with-metapost/src/arch-square.mp
diff options
context:
space:
mode:
Diffstat (limited to 'info/drawing-with-metapost/src/arch-square.mp')
-rw-r--r--info/drawing-with-metapost/src/arch-square.mp39
1 files changed, 39 insertions, 0 deletions
diff --git a/info/drawing-with-metapost/src/arch-square.mp b/info/drawing-with-metapost/src/arch-square.mp
new file mode 100644
index 0000000000..3511abf4e9
--- /dev/null
+++ b/info/drawing-with-metapost/src/arch-square.mp
@@ -0,0 +1,39 @@
+\documentclass[border=5mm]{standalone}
+\usepackage{luamplib}
+\begin{document}
+\mplibtextextlabel{enable}
+\begin{mplibcode}
+input colorbrewer-rgb
+input archimedean-tools
+beginfig(1);
+
+ path s;
+ s = poly 4 of (origin -- 42 right);
+ pair m;
+ m = median(s);
+
+ picture unit[];
+ unit0 = image(
+ fill s withcolor Oranges 8 5;
+ for i=1 upto length s:
+ draw m -- point i-1/2 of s;
+ endfor<D-`>
+
+ );
+ unit1 = image(fill s withcolor Blues 8 4);
+
+
+ pair u, v;
+ u = point 1 of s - point 0 of s;
+ v = point 3 of s - point 0 of s;
+
+
+ numeric n;
+ n = 4
+
+
+
+
+endfig;
+\end{mplibcode}
+\end{document}