summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-06-23 17:47:38 +0200
committerErich Eckner <git@eckner.net>2018-06-23 17:47:38 +0200
commit83d120a88ca5dd5a0c4679a2b6f6ea7391b0a8a7 (patch)
tree105ef702ef3e1619dc6da17e8f2fb937e4e2ce64
downloadpolyeder-83d120a88ca5dd5a0c4679a2b6f6ea7391b0a8a7.tar.xz
statisch ok
-rw-r--r--.gitignore2
-rwxr-xr-xanimate2
-rw-r--r--polyeder.mp63
-rw-r--r--polyeder.tex7
4 files changed, 74 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..f2bf0b9
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+*.mps
+*.pdf
diff --git a/animate b/animate
new file mode 100755
index 0000000..13f4793
--- /dev/null
+++ b/animate
@@ -0,0 +1,2 @@
+#!/bin/sh
+
diff --git a/polyeder.mp b/polyeder.mp
new file mode 100644
index 0000000..c0dbcb1
--- /dev/null
+++ b/polyeder.mp
@@ -0,0 +1,63 @@
+input wurzel2008;
+input tftools;
+input tf3d;
+
+verbatimtex
+%&latex
+\documentclass[mpost]{wurzel2008}
+\begin{document}
+etex
+
+beginfig(1);
+
+ ddd Ecken[];
+ pair Kanten[];
+
+ centralperspective(3cm,4cm,4cm,(16cm,8cm,12cm));
+
+ for i=0 upto 1:
+ for j=0 upto 1:
+ Ecken[2*i+j]=(1-2*i,(1-2*j)*(1-i),(1-2*j)*i);
+ endfor
+ Kanten[i]=(2*i,2*i+1);
+ endfor
+
+ for i=0 upto 1:
+ Ecken[4+i]=.25[Ecken[i],Ecken[1-i]];
+ Ecken[6+i]=.3[Ecken[2+i],Ecken[4+i]];
+ Kanten[2+i]=(2+i,6+i);
+ Ecken[8+i]=Ecken[6+i]+whatever*(0,1,0)=(whatever,0,whatever);
+ Kanten[4+i]=(6+i,8+i);
+ Kanten[6+i]=(8+i,i);
+ Ecken[10+i]=.9[Ecken[3-i],Ecken[4+i]];
+ Kanten[8+i]=(3-i,10+i);
+ Kanten[10+i]=(10+i,i);
+ endfor
+ for i=0 upto 1:
+ Ecken[12+i]
+ = Ecken[6+i]+whatever*(Ecken[3]-Ecken[2])
+ = Ecken[1-i]+whatever*(Ecken[11-i]-Ecken[1-i])+whatever*(Ecken[9-i]-Ecken[1-i]);
+ Kanten[12+i]=(6+i,12+i);
+ Kanten[14+i]=(13-i,8+i);
+ endfor
+ for i=0 upto 1:
+ Ecken[14+i]
+ for j=0 upto 1:
+ = Ecken[j] + whatever*(Ecken[8+j]-Ecken[j]) + whatever*(Ecken[10+j]-Ecken[j])
+ endfor
+ = Ecken[2] + whatever*(Ecken[3]-Ecken[2]) + whatever*(Ecken[10+i]-Ecken[2]);
+ Kanten[16+i]=(10+i,14+i);
+ Kanten[18+i]=(13-i,14+i);
+ endfor
+ Kanten[20]=(14,15);
+
+ for i=0 upto 20:
+ draw dddpoint(Ecken[xpart Kanten[i]])--dddpoint(Ecken[ypart Kanten[i]]);
+ endfor
+% for i=0 upto 15:
+% newlabel.b(decimal i, dddpoint(Ecken[i]));
+% endfor
+
+endfig;
+
+end;
diff --git a/polyeder.tex b/polyeder.tex
new file mode 100644
index 0000000..2c15c9c
--- /dev/null
+++ b/polyeder.tex
@@ -0,0 +1,7 @@
+\documentclass{article}
+
+\usepackage{graphicx}
+
+\begin{document}
+\includegraphics{polyeder-01}
+\end{document}