summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/asymptote/examples/cylinder.asy
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/asymptote/examples/cylinder.asy')
-rw-r--r--Master/texmf-dist/doc/asymptote/examples/cylinder.asy19
1 files changed, 14 insertions, 5 deletions
diff --git a/Master/texmf-dist/doc/asymptote/examples/cylinder.asy b/Master/texmf-dist/doc/asymptote/examples/cylinder.asy
index 88ff1394bac..07c59f35d8d 100644
--- a/Master/texmf-dist/doc/asymptote/examples/cylinder.asy
+++ b/Master/texmf-dist/doc/asymptote/examples/cylinder.asy
@@ -1,8 +1,17 @@
-import solids;
-
size(0,100);
+import solids;
currentlight=Viewport;
-revolution r=cylinder(O,1,1.5,Y+Z);
-draw(surface(r),green,render(merge=true));
-draw(r,blue);
+triple v=O;
+real r=1;
+real h=1.5;
+triple axis=Y+Z;
+
+// Optimized cylinder
+surface cylinder=shift(v)*align(unit(axis))*scale(r,r,h)*unitcylinder;
+draw(cylinder,green,render(merge=true));
+
+// Skeleton
+revolution r=cylinder(v,r,h,axis);
+//draw(surface(r),green,render(merge=true));
+draw(r,blue+0.15mm);