summaryrefslogtreecommitdiff
path: root/Master/texmf/doc/asymptote/examples/animations/torusanimation.asy
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf/doc/asymptote/examples/animations/torusanimation.asy')
-rw-r--r--Master/texmf/doc/asymptote/examples/animations/torusanimation.asy7
1 files changed, 5 insertions, 2 deletions
diff --git a/Master/texmf/doc/asymptote/examples/animations/torusanimation.asy b/Master/texmf/doc/asymptote/examples/animations/torusanimation.asy
index 9073ab2b56a..8370a0c25af 100644
--- a/Master/texmf/doc/asymptote/examples/animations/torusanimation.asy
+++ b/Master/texmf/doc/asymptote/examples/animations/torusanimation.asy
@@ -26,8 +26,11 @@ for(int i=0; i < n; ++i) {
p[i]=graph(g,0,1,operator ..);
}
-revolution torus=revolution(shift(R*X)*Circle(O,a,Y,32),Z);
-surface s=surface(torus);
+triple f(pair t) {
+ return ((R+a*cos(t.y))*cos(t.x),(R+a*cos(t.y))*sin(t.x),a*sin(t.y));
+}
+
+surface s=surface(f,(0,0),(2pi,2pi),8,8,Spline);
for(int i=0; i < n; ++i){
picture fig;