summaryrefslogtreecommitdiff
path: root/Master/texmf/doc/asymptote/examples/animations/cube.asy
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf/doc/asymptote/examples/animations/cube.asy')
-rw-r--r--Master/texmf/doc/asymptote/examples/animations/cube.asy46
1 files changed, 0 insertions, 46 deletions
diff --git a/Master/texmf/doc/asymptote/examples/animations/cube.asy b/Master/texmf/doc/asymptote/examples/animations/cube.asy
deleted file mode 100644
index 001e54466d8..00000000000
--- a/Master/texmf/doc/asymptote/examples/animations/cube.asy
+++ /dev/null
@@ -1,46 +0,0 @@
-import math;
-import bsp;
-import animation;
-
-size(100,100);
-
-animation a;
-
-void face(face[] faces, path3 p, int j, int k) {
- picture pic=faces.push(p);
- filldraw(pic,project(p),Pen(j));
- int sign=(k % 2 == 0) ? 1 : -1;
- transform t=scale(4)*transform(dir(p,0,sign),dir(p,0,-sign));
- label(pic,t*(string) j,project(0.5*(min(p)+max(p))));
-}
-
-void snapshot(transform3 t)
-{
- static transform3 s=shift(-0.5*(X+Y+Z));
- save();
-
- face[] faces;
- int j=-1;
- transform3 T=t*s;
- for(int k=0; k < 2; ++k) {
- face(faces,T*plane((1,0,0),(0,1,0),(0,0,k)),++j,k);
- face(faces,T*plane((0,1,0),(0,0,1),(k,0,0)),++j,k);
- face(faces,T*plane((0,0,1),(1,0,0),(0,k,0)),++j,k);
- }
- add(faces);
-
- a.add();
- restore();
-}
-
-int n=50;
-
-real step=360/n;
-for(int i=0; i < n; ++i)
- snapshot(rotate(i*step,X));
-for(int i=0; i < n; ++i)
- snapshot(rotate(i*step,Y));
-for(int i=0; i < n; ++i)
- snapshot(rotate(i*step,Z));
-
-a.movie(loops=10,delay=50);