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); import geometry; triangle t=triangle(b=3,alpha=90,c=4); dot((0,0)); draw(t); draw(rotate(90)*t,red); draw(shift((-4,0))*t,blue); draw(reflect((0,0),(1,0))*t,green); draw(slant(2)*t,magenta);
Official Asymptote example – trefoilknot
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 tube; import graph3; import palette; currentlight=White; size(0,8cm); currentprojection=perspective(1,1,1,up=-Y); int e=1; real x(real t) {return cos(t)+2*cos(2t);} real y(real t) {return sin(t)-2*sin(2t);} real z(real t) {return 2*e*sin(3t);} path3 p=scale3(2)*graph(x,y,z,0,2pi,50,operator [...]
Official Asymptote example – treetest
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 drawtree; treeLevelStep = 2cm; TreeNode root = makeNode( « Root » ); TreeNode child1 = makeNode( root, « Child\_1″ ); TreeNode child2 = makeNode( root, « Child\_2″ ); TreeNode gchild1 = [...]
Official Asymptote example – transparency
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,150); if(settings.outformat == « ») settings.outformat= »pdf »; begingroup(); fill(shift(1.5dir(120))*unitcircle,green+opacity(0.75)); fill(shift(1.5dir(60))*unitcircle,red+opacity(0.75)); fill(unitcircle,blue+opacity(0.75)); endgroup(); $(document).ready(function(){$(« a#fig88902d8bb23a1e4297dde5a9fbbc6f88″).fancybox();});
Official Asymptote example – torus
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 graph3; currentprojection=perspective(5,4,4); real R=3; real a=1; /* import solids; revolution torus=revolution(reverse(Circle(R*X,a,Y,32)),Z,90,345); 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,(radians(90),0),(radians(345),2pi),8,8,Spline); draw(s,green,render(compression=Low,merge=true)); $(document).ready(function(){$(« a#fig2f104df071b8206d7947e5298453c1f9″).fancybox();});
Official Asymptote example – tile
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,90); import patterns; add(« tile »,tile()); add(« filledtilewithmargin »,tile(6mm,4mm,red,Fill),(1mm,1mm),(1mm,1mm)); add(« checker »,checker()); add(« brick »,brick()); real s=2.5; filldraw(unitcircle,pattern(« tile »)); filldraw(shift(s,0)*unitcircle,pattern(« filledtilewithmargin »)); filldraw(shift(2s,0)*unitcircle,pattern(« checker »)); filldraw(shift(3s,0)*unitcircle,pattern(« brick »)); $(document).ready(function(){$(« a#fig788fc264d5420c6f683868d973819081″).fancybox();});
Official Asymptote example – threeviews
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; picture pic; unitsize(pic,5cm); currentlight.viewport=false; settings.render=4; settings.toolbar=false; viewportmargin=(1cm,1cm); draw(pic,scale3(0.5)*unitsphere,green,render(compression=Low,merge=true)); draw(pic,Label(« $x$ »,1),O–X); draw(pic,Label(« $y$ »,1),O–Y); draw(pic,Label(« $z$ »,1),O–Z); // Europe and Asia: //addViews(pic,ThreeViewsFR); //addViews(pic,SixViewsFR); // United Kingdom, United States, Canada, and Australia: addViews(pic,ThreeViewsUS); [...]
Official Asymptote example – thermodynamics
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 */ // example file for roundedpath() in roundedpath.asy // written by stefan knorr // import needed packages import roundedpath; // function definition picture CreateKOOS(real Scale, string legend) // draw [...]
Official Asymptote example – textpath
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(300); fill(texpath(Label(« test »,TimesRoman())),pink); fill(texpath(Label(« test »,fontcommand(‘.fam T\n.ps 12′)),tex=false),red); pair z=10S; fill(texpath(Label(« $ \sqrt{x^2} $ »,z,TimesRoman())),pink); fill(texpath(Label(« $ sqrt {x sup 2} $ »,z,fontcommand(‘.fam T\n.ps 12′)), tex=false),red); $(document).ready(function(){$(« a#figc475ad503f6ede7422d261eca878af3d »).fancybox();});
Official Asymptote example – tensor
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); pen[][] p={{red,green,blue,cyan},{blue,green,magenta,rgb(black)}}; path G=(0,0){dir(-120)}..(1,0)..(1,1)..(0,1)..cycle; path[] g={G,subpath(G,2,1)..(2,0)..(2,1)..cycle}; pair[][] z={{(0.5,0.5),(0.5,0.5),(0.5,0.5),(0.5,0.5)},{(2,0.5),(2,0.5),(1.5,0.5),(2,0.5)}}; tensorshade(g,p,z); dot(g); $(document).ready(function(){$(« a#fig6fb5262d994891cc77603775c0c2a2ab »).fancybox();});







