You may view all the posts of the category « Official Gallery One-Pager » (Compiled with Asymptote version 2.14svn-r5318) /* This code comes from The Official Asymptote Gallery */ import three; currentlight=Headlamp; size(469.75499pt,0); currentprojection=perspective( camera=(160.119024441391,136.348802919248,253.822628496226), up=(-0.188035408976828,0.910392236102215,-0.368549401594584), target=(25.5462739598034,1.77605243766079,-9.93996244768584), zoom=5.59734733413271, angle=5.14449021168139, viewportshift=(0.813449720559684,-0.604674743165144), autoadjust=false); draw(scale3(4)*extrude(« $\displaystyle\int\limits_{-\infty}^{+\infty}\!\! e^{-\alpha x^2}\!\!=\sqrt{\frac{\pi}{\alpha}}$ »,2Z), material(blue,ambientpen=mediumgray)); $(document).ready(function(){$(« a#figd89839fe309810592366a695812682c5″).fancybox();});
Official Asymptote example – exp3
You may view all the posts of the category « Official Gallery One-Pager » (Compiled with Asymptote version 2.14svn-r5318) /* This code comes from The Official Asymptote Gallery */ import graph3; import palette; size(12cm,IgnoreAspect); currentprojection=orthographic(1,-2,1); real f(pair z) {return abs(exp(z));} real Arg(triple v) {return degrees(exp((v.x,v.y)),warn=false);} surface s=surface(f,(-2,-pi),(2,pi),20,Spline); s.colors(palette(s.map(Arg),Wheel())); draw(s,render(compression=Low,merge=true)); real xmin=point((-1,-1,-1)).x; real xmax=point((1,1,1)).x; draw((xmin,0,0)–(xmax,0,0),dashed); xaxis3(« $\mathop{\rm Re} z$ »,Bounds,InTicks); [...]
Official Asymptote example – cos3
You may view all the posts of the category « Official Gallery One-Pager » (Compiled with Asymptote version 2.14svn-r5318) /* This code comes from The Official Asymptote Gallery */ import graph3; import palette; size(12cm,IgnoreAspect); currentprojection=orthographic(1,-2,1); real f(pair z) {return abs(cos(z));} real Arg(triple v) {return degrees(cos((v.x,v.y)),warn=false);} surface s=surface(f,(-pi,-2),(pi,2),20,Spline); s.colors(palette(s.map(Arg),Wheel())); draw(s,render(compression=Low,merge=true)); real xmin=point((-1,-1,-1)).x; real xmax=point((1,1,1)).x; draw((xmin,0,0)–(xmax,0,0),dashed); xaxis3(« $\mathop{\rm Re} z$ »,Bounds,InTicks); [...]
Official Asymptote example – clockarray
You may view all the posts of the category « Official Gallery One-Pager » (Compiled with Asymptote version 2.14svn-r5318) /* This code comes from The Official Asymptote Gallery */ int nx=3; int ny=4; real xmargin=1cm; real ymargin=xmargin; size(settings.paperwidth,settings.paperheight); picture pic; real width=settings.paperwidth/nx-xmargin; real height=settings.paperheight/ny-ymargin; if(width <= 0 || height <= 0) abort(« margin too big »); size(pic,width,height); pen p=linewidth(0.5mm); [...]
Official Asymptote example – cards
You may view all the posts of the category « Official Gallery One-Pager » (Compiled with Asymptote version 2.14svn-r5318) /* This code comes from The Official Asymptote Gallery */ picture rect; size(rect,0,2.5cm); real x=1; real y=1.25; filldraw(rect,box((-x,-y)/2,(x,y)/2),lightolive); label(rect, »1″,(-x,y)*0.45,SE); label(rect, »2″,(x,y)*0.45,SW); label(rect, »3″,(-x,-y)*0.45,NE); label(rect, »4″,(x,-y)*0.45,NW); frame rectf=rect.fit(); frame toplef=rectf; frame toprig=xscale(-1)*rectf; frame botlef=yscale(-1)*rectf; frame botrig=xscale(-1)*yscale(-1)*rectf; size(0,7.5cm); add(toplef,(-x,y)); add(toprig,(x,y)); add(botlef,(-x,-y)); add(botrig,(x,-y)); $(document).ready(function(){$(« a#figd2f27a0e47fe84f966790b4bb881eb63″).fancybox();});
Official Asymptote example – billboard
You may view all the posts of the category « Official Gallery One-Pager » (Compiled with Asymptote version 2.14svn-r5318) /* This code comes from The Official Asymptote Gallery */ import three; size(100); currentprojection=perspective(1,-2,1); draw(unitbox); label(« Billboard »,X,red,Billboard); label(« Embedded »,Y,blue,Embedded);
Official Asymptote example – bigdiagonal
You may view all the posts of the category « Official Gallery One-Pager » (Compiled with Asymptote version 2.14svn-r5318) /* This code comes from The Official Asymptote Gallery */ size(0,100.5); draw((0,0)–(2,1),Arrow); $(document).ready(function(){$(« a#fig6bff994a0eb078cf8fa72dbdc71aadbe »).fancybox();});
Official Asymptote example – bars3
You may view all the posts of the category « Official Gallery One-Pager » (Compiled with Asymptote version 2.14svn-r5318) /* This code comes from The Official Asymptote Gallery */ import three; import palette; import graph3; size(300); currentprojection=perspective(-30,-30,30,up=Z); surface s; for(int i = 0; i < 10; ++i) { for(int j = 0; j < 10; ++j) { [...]
Official Asymptote example – SierpinskiSponge
You may view all the posts of the category « Official Gallery One-Pager » (Compiled with Asymptote version 2.14svn-r5318) /* This code comes from The Official Asymptote Gallery */ size(200); import palette; import three; currentprojection=orthographic(1,1,1); triple[] M={ (-1,-1,-1),(0,-1,-1),(1,-1,-1),(1,0,-1), (1,1,-1),(0,1,-1),(-1,1,-1),(-1,0,-1), (-1,-1,0),(1,-1,0),(1,1,0),(-1,1,0), (-1,-1,1),(0,-1,1),(1,-1,1),(1,0,1),(1,1,1),(0,1,1),(-1,1,1),(-1,0,1) }; surface[] Squares={ surface((1,-1,-1)–(1,1,-1)–(1,1,1)–(1,-1,1)–cycle), surface((-1,-1,-1)–(-1,1,-1)–(-1,1,1)–(-1,-1,1)–cycle), surface((1,1,-1)–(-1,1,-1)–(-1,1,1)–(1,1,1)–cycle), surface((1,-1,-1)–(-1,-1,-1)–(-1,-1,1)–(1,-1,1)–cycle), surface((1,-1,1)–(1,1,1)–(-1,1,1)–(-1,-1,1)–cycle), surface((1,-1,-1)–(1,1,-1)–(-1,1,-1)–(-1,-1,-1)–cycle), }; int[][] SquaresPoints={ {2,3,4,10,16,15,14,9}, {0,7,6,11,18,19,12,8}, {4,5,6,11,18,17,16,10}, {2,1,0,8,12,13,14,9}, [...]
Official Asymptote example – SierpinskiGasket
You may view all the posts of the category « Official Gallery One-Pager » (Compiled with Asymptote version 2.14svn-r5318) /* This code comes from The Official Asymptote Gallery */ size(200); import palette; import three; currentprojection=perspective(8,2,1); triple[] M={(0,0,1),1/3*(sqrt(8),0,-1), 1/3*((sqrt(8))*Cos(120),(sqrt(8))*Sin(120),-1), 1/3*((sqrt(8))*Cos(240),(sqrt(8))*Sin(240),-1)}; int level=5; surface s; void recur(triple p, real u, int l) { if(l < level) for(triple V : [...]







