diff options
author | Karl Berry <karl@freefriends.org> | 2010-06-14 23:14:16 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-06-14 23:14:16 +0000 |
commit | c2175edc7aa44ca0b526f008d473d6f8a8ac4933 (patch) | |
tree | d6c491676b413ad1922481f8c3fc7b64c3afc0a5 /Build/source/utils/asymptote/examples | |
parent | 5d08e9ff4fe5fc836d237ea08e82c82b27d558a2 (diff) |
asy 1.98
git-svn-id: svn://tug.org/texlive/trunk@18982 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/examples')
48 files changed, 108 insertions, 75 deletions
diff --git a/Build/source/utils/asymptote/examples/BezierPatch.asy b/Build/source/utils/asymptote/examples/BezierPatch.asy index 0e6b477eb13..8d770e058ae 100644 --- a/Build/source/utils/asymptote/examples/BezierPatch.asy +++ b/Build/source/utils/asymptote/examples/BezierPatch.asy @@ -1,7 +1,7 @@ import three; size(10cm); -currentlight=(0,0,1); +currentlight=Viewport; surface s=surface(patch(new triple[][] { {(0,0,0),(1,0,0),(1,0,0),(2,0,0)}, diff --git a/Build/source/utils/asymptote/examples/Klein.asy b/Build/source/utils/asymptote/examples/Klein.asy index b2f6d1b0e79..99914d90432 100644 --- a/Build/source/utils/asymptote/examples/Klein.asy +++ b/Build/source/utils/asymptote/examples/Klein.asy @@ -22,7 +22,7 @@ triple f(pair t) { } surface s=surface(f,(0,0),(2pi,2pi),8,8,Spline); -draw(s,lightolive+white,"bottle"); +draw(s,lightolive+white,"bottle",render(merge=true)); string lo="$\displaystyle u\in[0,\pi]: \cases{x=3\cos u(1+\sin u)+(2-\cos u)\cos u\cos v,\cr y=8\sin u+(2-\cos u)\sin u\cos v,\cr diff --git a/Build/source/utils/asymptote/examples/RiemannSurface.asy b/Build/source/utils/asymptote/examples/RiemannSurface.asy index f32ca4d7539..a1f1b665089 100644 --- a/Build/source/utils/asymptote/examples/RiemannSurface.asy +++ b/Build/source/utils/asymptote/examples/RiemannSurface.asy @@ -10,4 +10,4 @@ triple f(pair t) {return (exp(t.x)*cos(t.y),exp(t.x)*sin(t.y),t.y);} surface s=surface(f,(-4,-2pi),(0,4pi),8,16,Spline); s.colors(palette(s.map(zpart),Rainbow())); -draw(s); +draw(s,render(merge=true)); diff --git a/Build/source/utils/asymptote/examples/RiemannSurfaceRoot.asy b/Build/source/utils/asymptote/examples/RiemannSurfaceRoot.asy index 93bd7035842..8cb3af2cfa9 100644 --- a/Build/source/utils/asymptote/examples/RiemannSurfaceRoot.asy +++ b/Build/source/utils/asymptote/examples/RiemannSurfaceRoot.asy @@ -1,11 +1,10 @@ // Riemann surface of z^{1/n} import graph3; import palette; - + int n=3; size(200,300,keepAspect=false); -//settings.nothin=true; currentprojection=orthographic(10,10,30); currentlight=(10,10,5); @@ -14,4 +13,4 @@ triple f(pair t) {return (t.x*cos(t.y),t.x*sin(t.y),t.x^(1/n)*sin(t.y/n));} surface s=surface(f,(0,0),(1,2pi*n),8,16,Spline); s.colors(palette(s.map(zpart),Rainbow())); -draw(s,meshpen=black); +draw(s,meshpen=black,render(merge=true)); diff --git a/Build/source/utils/asymptote/examples/SierpinskiGasket.asy b/Build/source/utils/asymptote/examples/SierpinskiGasket.asy index 57251735db8..2e0d4facd64 100644 --- a/Build/source/utils/asymptote/examples/SierpinskiGasket.asy +++ b/Build/source/utils/asymptote/examples/SierpinskiGasket.asy @@ -28,4 +28,4 @@ recur(O,0.5,1); s.colors(palette(s.map(zpart),Rainbow())); -draw(s); +draw(s,render(merge=true)); diff --git a/Build/source/utils/asymptote/examples/SierpinskiSponge.asy b/Build/source/utils/asymptote/examples/SierpinskiSponge.asy index 209c3d182ed..328447d4ac4 100644 --- a/Build/source/utils/asymptote/examples/SierpinskiSponge.asy +++ b/Build/source/utils/asymptote/examples/SierpinskiSponge.asy @@ -39,4 +39,4 @@ sf.append(rotate(90,Y)*s); sf.append(rotate(90,Z)*s); sf.colors(palette(sf.map(abs),Rainbow())); -draw(sf); +draw(sf,render(compression=Low,merge=true)); diff --git a/Build/source/utils/asymptote/examples/basealign.asy b/Build/source/utils/asymptote/examples/basealign.asy index 8a34bdab4b7..4bf83c94033 100644 --- a/Build/source/utils/asymptote/examples/basealign.asy +++ b/Build/source/utils/asymptote/examples/basealign.asy @@ -1,5 +1,7 @@ import fontsize; import three; + +settings.autobillboard=false; currentprojection=orthographic(Z); defaultpen(fontsize(100pt)); diff --git a/Build/source/utils/asymptote/examples/cheese.asy b/Build/source/utils/asymptote/examples/cheese.asy index f283f5c8115..9a16e4130dc 100644 --- a/Build/source/utils/asymptote/examples/cheese.asy +++ b/Build/source/utils/asymptote/examples/cheese.asy @@ -9,4 +9,4 @@ real f(real x, real y, real z) { surface sf=surface(contour3(f,(-2pi,-2pi,-2pi),(2pi,2pi,2pi),12)); sf.colors(palette(sf.map(abs),Gradient(red,yellow))); -draw(sf,nolight); +draw(sf,nolight,render(merge=true)); diff --git a/Build/source/utils/asymptote/examples/cos3.asy b/Build/source/utils/asymptote/examples/cos3.asy index fa9c8f49550..ef8054d6627 100644 --- a/Build/source/utils/asymptote/examples/cos3.asy +++ b/Build/source/utils/asymptote/examples/cos3.asy @@ -6,15 +6,12 @@ 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); -} +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); +draw(s,render(compression=Low,merge=true)); real xmin=point((-1,-1,-1)).x; real xmax=point((1,1,1)).x; @@ -23,3 +20,6 @@ draw((xmin,0,0)--(xmax,0,0),dashed); xaxis3("$\mathop{\rm Re} z$",Bounds,InTicks); yaxis3("$\mathop{\rm Im} z$",Bounds,InTicks(beginlabel=false)); zaxis3("$|\cos(z)|$",Bounds,InTicks); + + + diff --git a/Build/source/utils/asymptote/examples/cyclohexane.asy b/Build/source/utils/asymptote/examples/cyclohexane.asy index 8e1ff466b9d..11b01551c8d 100644 --- a/Build/source/utils/asymptote/examples/cyclohexane.asy +++ b/Build/source/utils/asymptote/examples/cyclohexane.asy @@ -36,6 +36,8 @@ triple h12=rotate(120,c6,c5)*h11; pen Black=gray(0.4); +defaultrender=render(compression=Zero,merge=true); + draw(shift(c1)*carbon,Black); draw(shift(c2)*carbon,Black); draw(shift(c3)*carbon,Black); diff --git a/Build/source/utils/asymptote/examples/elevation.asy b/Build/source/utils/asymptote/examples/elevation.asy index 4e4579d98a9..1ff4ee38f28 100644 --- a/Build/source/utils/asymptote/examples/elevation.asy +++ b/Build/source/utils/asymptote/examples/elevation.asy @@ -6,6 +6,8 @@ currentprojection=orthographic(0.8,1,1); size(400,300,IgnoreAspect); +defaultrender.merge=true; + real f(pair z) {return cos(2*pi*z.x)*sin(2*pi*z.y);} surface s=surface(f,(-1/2,-1/2),(1/2,1/2),50,Spline); diff --git a/Build/source/utils/asymptote/examples/epix.asy b/Build/source/utils/asymptote/examples/epix.asy index df0cd3d336c..b833289bd80 100644 --- a/Build/source/utils/asymptote/examples/epix.asy +++ b/Build/source/utils/asymptote/examples/epix.asy @@ -6,7 +6,7 @@ currentprojection=perspective(4,2,3); real f(pair z) {return z.y^3/2-3z.x^2*z.y;} -draw(surface(f,(-1,-1),(1,1),nx=10,Spline),green); +draw(surface(f,(-1,-1),(1,1),nx=10,Spline),green,render(merge=true)); draw(Label("$y$",1),(0,0,0)--(0,2,0),red,Arrow3); draw(Label("$x$",1),(0,0,0)--(2,0,0),red,Arrow3); diff --git a/Build/source/utils/asymptote/examples/equilchord.asy b/Build/source/utils/asymptote/examples/equilchord.asy index ae3665b1a66..b93da942d08 100644 --- a/Build/source/utils/asymptote/examples/equilchord.asy +++ b/Build/source/utils/asymptote/examples/equilchord.asy @@ -15,7 +15,7 @@ draw((-a,-a,0)--(-a,a,0)--(a,a,0)--(a,-a,0)--cycle,lightgray); xaxis3(Label("$x$",1),red,Arrow3); yaxis3(Label("$y$",1),red,Arrow3); draw(circle((0,0,0),1),dashed); -draw(surface(F,(-1,-1),(t,1),20,monotonic),green,black); +draw(surface(F,(-1,-1),(t,1),20,monotonic),green,black,render(merge=true)); real y=sqrt(1-t^2); draw((t,y,0)--(t,-y,0)--(t,0,sqrt(3)*y)--cycle,blue); label("$1$",(1,0,0),-Y+X); diff --git a/Build/source/utils/asymptote/examples/exp3.asy b/Build/source/utils/asymptote/examples/exp3.asy index e7508a29297..39baba993f3 100644 --- a/Build/source/utils/asymptote/examples/exp3.asy +++ b/Build/source/utils/asymptote/examples/exp3.asy @@ -6,15 +6,12 @@ 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); -} +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); +draw(s,render(compression=Low,merge=true)); real xmin=point((-1,-1,-1)).x; real xmax=point((1,1,1)).x; diff --git a/Build/source/utils/asymptote/examples/extrudedcontour.asy b/Build/source/utils/asymptote/examples/extrudedcontour.asy index b5ad885a350..7b2f67459ce 100644 --- a/Build/source/utils/asymptote/examples/extrudedcontour.asy +++ b/Build/source/utils/asymptote/examples/extrudedcontour.asy @@ -8,15 +8,16 @@ real b=4; real f(pair z) {return (z.x+z.y)/(2+cos(z.x)*sin(z.y));} guide[][] g=contour(f,(-10,-10),(10,10),new real[]{8},150); +render render=render(merge=true); for(guide p:g[0]){ - draw(extrude(p,8Z),palered); - draw(path3(p),red+2pt); + draw(extrude(p,8Z),palered,render); + draw(path3(p),red+2pt,render); } -draw(lift(f,g),red+2pt); +draw(lift(f,g),red+2pt,render); surface s=surface(f,(0,0),(10,10),20,Spline); s.colors(palette(s.map(zpart),Rainbow()+opacity(0.5))); -draw(s); +draw(s,render); axes3("$x$","$y$","$z$",Arrow3); diff --git a/Build/source/utils/asymptote/examples/filesurface.asy b/Build/source/utils/asymptote/examples/filesurface.asy index 98adc045f07..2a93c96ec19 100644 --- a/Build/source/utils/asymptote/examples/filesurface.asy +++ b/Build/source/utils/asymptote/examples/filesurface.asy @@ -21,7 +21,7 @@ real[] level=uniform(min(f)*(1-sqrtEpsilon),max(f)*(1+sqrtEpsilon),4); s.colors(palette(s.map(new real(triple v) {return find(level >= v.z);}), Rainbow())); -draw(s,meshpen=thick()); +draw(s,meshpen=thick(),render(merge=true)); triple m=currentpicture.userMin; triple M=currentpicture.userMax; diff --git a/Build/source/utils/asymptote/examples/gamma3.asy b/Build/source/utils/asymptote/examples/gamma3.asy index e7fdde015e0..e522dad4e70 100644 --- a/Build/source/utils/asymptote/examples/gamma3.asy +++ b/Build/source/utils/asymptote/examples/gamma3.asy @@ -22,7 +22,7 @@ real Arg(triple v) } s.colors(palette(s.map(Arg),Wheel())); -draw(s); +draw(s,render(compression=Low,merge=true)); real xmin=point((-1,-1,-1)).x; real xmax=point((1,1,1)).x; diff --git a/Build/source/utils/asymptote/examples/magnetic.asy b/Build/source/utils/asymptote/examples/magnetic.asy index 4dc187f5770..3ae40466d43 100644 --- a/Build/source/utils/asymptote/examples/magnetic.asy +++ b/Build/source/utils/asymptote/examples/magnetic.asy @@ -10,7 +10,8 @@ real B(real z) {return 1-0.5cos(pi*z/10);} real f(real x, real y, real z) {return 0.5B(z)*(a(z)*x^2+b(z)*y^2)-1;} -draw(surface(contour3(f,(-2,-2,-10),(2,2,10),10)),blue+opacity(0.75)); +draw(surface(contour3(f,(-2,-2,-10),(2,2,10),10)),blue+opacity(0.75), + render(merge=true)); xaxis3(Label("$x$",1),red); yaxis3(Label("$y$",1),red); diff --git a/Build/source/utils/asymptote/examples/p-orbital.asy b/Build/source/utils/asymptote/examples/p-orbital.asy index d8b22bc2982..1932e098c67 100644 --- a/Build/source/utils/asymptote/examples/p-orbital.asy +++ b/Build/source/utils/asymptote/examples/p-orbital.asy @@ -2,6 +2,7 @@ import graph3; import palette; size(200); currentprojection=orthographic(6,8,2); +viewportmargin=(1cm,0); real c0=0.1; @@ -22,7 +23,9 @@ real R=abs((20,20,20)); surface s=surface(f,(0,0),(R,2pi),100,8,Spline,cond); s.colors(palette(s.map(abs),Gradient(palegreen,heavyblue))); -draw(s); + +render render=render(compression=Low,merge=true); +draw(s,render); draw(zscale3(-1)*s); axes3("$x$","$y$","$z$",Arrow3); diff --git a/Build/source/utils/asymptote/examples/parametricelevation.asy b/Build/source/utils/asymptote/examples/parametricelevation.asy index 52cec8728a5..ac0f0b09ad5 100644 --- a/Build/source/utils/asymptote/examples/parametricelevation.asy +++ b/Build/source/utils/asymptote/examples/parametricelevation.asy @@ -7,4 +7,4 @@ currentprojection=orthographic(4,2,4); triple f(pair z) {return expi(z.x,z.y);} surface s=surface(f,(0,0),(pi,2pi),10,Spline); -draw(s,mean(palette(s.map(zpart),BWRainbow())),black,nolight); +draw(s,mean(palette(s.map(zpart),BWRainbow())),black,nolight,render(merge=true)); diff --git a/Build/source/utils/asymptote/examples/parametricsurface.asy b/Build/source/utils/asymptote/examples/parametricsurface.asy index de669b59faf..299ea72eef7 100644 --- a/Build/source/utils/asymptote/examples/parametricsurface.asy +++ b/Build/source/utils/asymptote/examples/parametricsurface.asy @@ -20,4 +20,4 @@ surface s=surface(f,(0,0),(2pi,2pi),8,8,Spline); // draw(s,nullpen,meshpen=p); // surface & mesh -draw(s,lightgray,meshpen=p); +draw(s,lightgray,meshpen=p,render(merge=true)); diff --git a/Build/source/utils/asymptote/examples/pipeintersection.asy b/Build/source/utils/asymptote/examples/pipeintersection.asy index 5bf9cfbe6f3..6b0388f1378 100644 --- a/Build/source/utils/asymptote/examples/pipeintersection.asy +++ b/Build/source/utils/asymptote/examples/pipeintersection.asy @@ -9,4 +9,5 @@ real f(pair z) {return min(sqrt(1-z.x^2),sqrt(1-z.y^2));} surface s=surface(f,(0,0),(1,1),40,Spline); transform3 t=rotate(90,O,Z), t2=t*t, t3=t2*t, i=xscale3(-1)*zscale3(-1); -draw(surface(s,t*s,t2*s,t3*s,i*s,i*t*s,i*t2*s,i*t3*s),blue,render(merge=true)); +draw(surface(s,t*s,t2*s,t3*s,i*s,i*t*s,i*t2*s,i*t3*s),blue, + render(compression=Low,closed=true,merge=true)); diff --git a/Build/source/utils/asymptote/examples/roll.asy b/Build/source/utils/asymptote/examples/roll.asy index 088da3177f4..4d15ac0febe 100644 --- a/Build/source/utils/asymptote/examples/roll.asy +++ b/Build/source/utils/asymptote/examples/roll.asy @@ -7,4 +7,4 @@ return(t.x+t.y/4+sin(t.y),cos(t.y),sin(t.y)); } surface s=surface(f,(0,0),(2pi,2pi),7,20,Spline); -draw(s,olive); +draw(s,olive,render(merge=true)); diff --git a/Build/source/utils/asymptote/examples/shellsqrtx01.asy b/Build/source/utils/asymptote/examples/shellsqrtx01.asy index c4edec122c8..553200df14c 100644 --- a/Build/source/utils/asymptote/examples/shellsqrtx01.asy +++ b/Build/source/utils/asymptote/examples/shellsqrtx01.asy @@ -13,12 +13,14 @@ path p=graph(F,0,1,n=30,operator ..)--(1,0)--cycle; path3 p3=path3(p); revolution a=revolution(p3,X,alpha,0); -draw(surface(a),color); + +render render=render(compression=0,merge=true); +draw(surface(a),color,render); draw(p3,blue); surface s=surface(p); -draw(s,color); -draw(rotate(alpha,X)*s,color); +draw(s,color,render); +draw(rotate(alpha,X)*s,color,render); xaxis3(Label("$x$",1),xmax=1.25,dashed,Arrow3); yaxis3(Label("$y$",1),Arrow3); diff --git a/Build/source/utils/asymptote/examples/sin3.asy b/Build/source/utils/asymptote/examples/sin3.asy index d35cd271808..76551dacb95 100644 --- a/Build/source/utils/asymptote/examples/sin3.asy +++ b/Build/source/utils/asymptote/examples/sin3.asy @@ -6,15 +6,12 @@ currentprojection=orthographic(1,-2,1); real f(pair z) {return abs(sin(z));} -real Arg(triple v) -{ - return degrees(sin((v.x,v.y)),warn=false); -} +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); +draw(s,render(compression=Low,merge=true)); real xmin=point((-1,-1,-1)).x; real xmax=point((1,1,1)).x; diff --git a/Build/source/utils/asymptote/examples/sinc.asy b/Build/source/utils/asymptote/examples/sinc.asy index cd0d377e633..352585bdbe4 100644 --- a/Build/source/utils/asymptote/examples/sinc.asy +++ b/Build/source/utils/asymptote/examples/sinc.asy @@ -2,7 +2,7 @@ import graph3; import contour; currentprojection=orthographic(1,-2,1); -currentlight=(1,-1,0.5); +currentlight=White; size(12cm,0); @@ -11,8 +11,13 @@ real sinc(pair z) { return r != 0 ? sin(r)/r : 1; } +render render=render(compression=Low,merge=true); + draw(lift(sinc,contour(sinc,(-2,-2),(2,2),new real[] {0})),red); -draw(surface(sinc,(-2,-2),(2,2),Spline),lightgray+opacity(0.5)); +draw(surface(sinc,(-2,-2),(2,2),Spline),lightgray,render); + +draw(scale3(2*sqrt(2))*unitdisk,paleyellow+opacity(0.25),nolight,render); +draw(scale3(2*sqrt(2))*unitcircle3,red,render); xaxis3("$x$",Bounds,InTicks); yaxis3("$y$",Bounds,InTicks(beginlabel=false)); diff --git a/Build/source/utils/asymptote/examples/slidedemo.asy b/Build/source/utils/asymptote/examples/slidedemo.asy index 52ede757b47..7a753a54d61 100644 --- a/Build/source/utils/asymptote/examples/slidedemo.asy +++ b/Build/source/utils/asymptote/examples/slidedemo.asy @@ -93,11 +93,12 @@ triple F3(real x) {return (x,f(x),0);} path p=graph(pic,F,0,1,n=30,operator ..)--(1,0)--cycle; path3 p3=path3(p); revolution a=revolution(p3,X,alpha,0); -draw(pic,surface(a),color); +render render=render(compression=0,merge=true); +draw(pic,surface(a),color,render); draw(pic,p3,blue); surface s=surface(p); -draw(pic,s,color); -draw(pic,rotate(alpha,X)*s,color); +draw(pic,s,color,render); +draw(pic,rotate(alpha,X)*s,color,render); xaxis3(pic,Label("$x$",1),xmax=1.25,dashed,Arrow3); yaxis3(pic,Label("$y$",1),Arrow3); dot(pic,"$(1,1)$",(1,1,0)); diff --git a/Build/source/utils/asymptote/examples/soccerball.asy b/Build/source/utils/asymptote/examples/soccerball.asy index f481ef1b7ff..a37063dbb29 100644 --- a/Build/source/utils/asymptote/examples/soccerball.asy +++ b/Build/source/utils/asymptote/examples/soccerball.asy @@ -2,6 +2,8 @@ import graph3; size(400); currentlight.background=palegreen; +defaultrender=render(compression=Zero,merge=true); + real c=(1+sqrt(5))/2; triple[] z={(c,1,0),(-c,1,0),(-c,-1,0),(c,-1,0)}; diff --git a/Build/source/utils/asymptote/examples/sphere.asy b/Build/source/utils/asymptote/examples/sphere.asy index 41f3f548895..8d1b5fe50cd 100644 --- a/Build/source/utils/asymptote/examples/sphere.asy +++ b/Build/source/utils/asymptote/examples/sphere.asy @@ -3,4 +3,4 @@ import three; size(200); currentprojection=orthographic(5,4,3); -draw(unitsphere,green,render(compression=Zero)); +draw(unitsphere,green,render(compression=Zero,merge=true)); diff --git a/Build/source/utils/asymptote/examples/sphericalharmonic.asy b/Build/source/utils/asymptote/examples/sphericalharmonic.asy index d89d81aee86..9fbb16f624d 100644 --- a/Build/source/utils/asymptote/examples/sphericalharmonic.asy +++ b/Build/source/utils/asymptote/examples/sphericalharmonic.asy @@ -11,4 +11,4 @@ triple f(pair z) {return r(z.x,z.y)*expi(z.x,z.y);} surface s=surface(f,(0,0),(pi,2pi),50,Spline); s.colors(palette(s.map(abs),Gradient(yellow,red))); -draw(s); +draw(s,render(compression=Low,merge=true)); diff --git a/Build/source/utils/asymptote/examples/spiral3.asy b/Build/source/utils/asymptote/examples/spiral3.asy index cea9665a951..727ca3f6d3a 100644 --- a/Build/source/utils/asymptote/examples/spiral3.asy +++ b/Build/source/utils/asymptote/examples/spiral3.asy @@ -4,6 +4,7 @@ import palette; size3(10cm); currentprojection=orthographic(5,4,2); +viewportmargin=(2cm,0); real r(real t) {return 3exp(-0.1*t);} real x(real t) {return r(t)*cos(t);} @@ -15,5 +16,5 @@ path3 p=graph(x,y,z,0,6*pi,50,operator ..); tube T=tube(p,2); surface s=T.s; s.colors(palette(s.map(zpart),BWRainbow())); -draw(s); +draw(s,render(merge=true)); draw(T.center,thin()); diff --git a/Build/source/utils/asymptote/examples/splitpatch.asy b/Build/source/utils/asymptote/examples/splitpatch.asy index cfd5c9a4c93..200fb2c4c44 100644 --- a/Build/source/utils/asymptote/examples/splitpatch.asy +++ b/Build/source/utils/asymptote/examples/splitpatch.asy @@ -19,6 +19,8 @@ triple[][] B={ split S=split(A,B,10); //write(S.T.length); +defaultrender.merge=true; + for(int i=0; i < S.T.length; ++i) draw(surface(patch(S.T[i])),Pen(i)); draw(surface(patch(B)),blue); diff --git a/Build/source/utils/asymptote/examples/sqrtx01.asy b/Build/source/utils/asymptote/examples/sqrtx01.asy index 2ca9ac697d6..4d2b0a45dce 100644 --- a/Build/source/utils/asymptote/examples/sqrtx01.asy +++ b/Build/source/utils/asymptote/examples/sqrtx01.asy @@ -12,7 +12,7 @@ path p=graph(F,0,1,n=20,operator ..); path3 p3=path3(p); revolution a=revolution(p3,X,0,360); -draw(surface(a),color); +draw(surface(a),color,render(compression=Low,merge=true)); draw(p3,blue); real x=relpoint(p,0.5).x; diff --git a/Build/source/utils/asymptote/examples/sqrtx01y1.asy b/Build/source/utils/asymptote/examples/sqrtx01y1.asy index c944f43d268..dcb247f572e 100644 --- a/Build/source/utils/asymptote/examples/sqrtx01y1.asy +++ b/Build/source/utils/asymptote/examples/sqrtx01y1.asy @@ -2,6 +2,7 @@ import graph3; import solids; size(0,150); currentprojection=perspective(0,1,10,up=Y); +currentlight=White; real f(real x) {return sqrt(x);} pair F(real x) {return (x,f(x));} @@ -11,7 +12,7 @@ path p=graph(F,0,1,n=25,operator ..); path3 p3=path3(p); revolution a=revolution(p3,Y,0,360); -draw(surface(a),green); +draw(surface(a),green,render(compression=Low,merge=true)); draw(p3,blue); xtick((0,0,0)); diff --git a/Build/source/utils/asymptote/examples/stroke3.asy b/Build/source/utils/asymptote/examples/stroke3.asy index 6b386c3a0c9..75824d41dd3 100644 --- a/Build/source/utils/asymptote/examples/stroke3.asy +++ b/Build/source/utils/asymptote/examples/stroke3.asy @@ -1,2 +1,4 @@ import three; -draw(O--X,red,currentlight); +size(5cm); + +draw(O--X,red+1cm,currentlight); diff --git a/Build/source/utils/asymptote/examples/threeviews.asy b/Build/source/utils/asymptote/examples/threeviews.asy index 05c89e650ca..1bcc36ae8d7 100644 --- a/Build/source/utils/asymptote/examples/threeviews.asy +++ b/Build/source/utils/asymptote/examples/threeviews.asy @@ -8,7 +8,7 @@ settings.render=4; settings.toolbar=false; viewportmargin=(1cm,1cm); -draw(pic,scale3(0.5)*unitsphere,green); +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); diff --git a/Build/source/utils/asymptote/examples/torus.asy b/Build/source/utils/asymptote/examples/torus.asy index c64c16701ad..f89c82cde8b 100644 --- a/Build/source/utils/asymptote/examples/torus.asy +++ b/Build/source/utils/asymptote/examples/torus.asy @@ -17,4 +17,4 @@ triple f(pair t) { } surface s=surface(f,(radians(90),0),(radians(345),2pi),8,8,Spline); -draw(s,green); +draw(s,green,render(merge=true)); diff --git a/Build/source/utils/asymptote/examples/trefoilknot.asy b/Build/source/utils/asymptote/examples/trefoilknot.asy index 3c5e4aecc5a..8ea5b264b48 100644 --- a/Build/source/utils/asymptote/examples/trefoilknot.asy +++ b/Build/source/utils/asymptote/examples/trefoilknot.asy @@ -20,4 +20,4 @@ for (int i=pens.length-2; i >= 0 ; --i) path sec=scale(0.25)*texpath("$\pi$")[0]; coloredpath colorsec=coloredpath(sec, pens,colortype=coloredNodes); -draw(tube(p,colorsec)); +draw(tube(p,colorsec),render(merge=true)); diff --git a/Build/source/utils/asymptote/examples/trumpet.asy b/Build/source/utils/asymptote/examples/trumpet.asy index 032f8a7ffd6..842af2b23c2 100644 --- a/Build/source/utils/asymptote/examples/trumpet.asy +++ b/Build/source/utils/asymptote/examples/trumpet.asy @@ -4,9 +4,9 @@ size(200,0); currentlight=Viewport; triple f(pair t) { - return(10*sin(t.y),cos(t.x)*(cos(t.y)+log(abs(tan(t.y/2)))), - sin(t.x)*(cos(t.y)+log(abs(tan(t.y/2))))); + real u=log(abs(tan(t.y/2))); + return (10*sin(t.y),cos(t.x)*(cos(t.y)+u),sin(t.x)*(cos(t.y)+u)); } surface s=surface(f,(0,pi/2),(2pi,pi-0.1),7,15,Spline); -draw(s,olive); +draw(s,olive+0.25*white,render(compression=Low,merge=true)); diff --git a/Build/source/utils/asymptote/examples/truncatedIcosahedron.asy b/Build/source/utils/asymptote/examples/truncatedIcosahedron.asy index 436c6121b9f..e4d07a49e5b 100644 --- a/Build/source/utils/asymptote/examples/truncatedIcosahedron.asy +++ b/Build/source/utils/asymptote/examples/truncatedIcosahedron.asy @@ -2,6 +2,8 @@ import graph3; size(200); +defaultrender.merge=true; + real c=(1+sqrt(5))/2; triple[] z={(c,1,0),(-c,1,0),(-c,-1,0),(c,-1,0)}; diff --git a/Build/source/utils/asymptote/examples/twistedtubes.asy b/Build/source/utils/asymptote/examples/twistedtubes.asy index 4d38d86f4df..9121ad6444d 100644 --- a/Build/source/utils/asymptote/examples/twistedtubes.asy +++ b/Build/source/utils/asymptote/examples/twistedtubes.asy @@ -22,6 +22,8 @@ s2.colors(palette(s2.map(f),Rainbow)); s3.colors(palette(s3.map(f),Rainbow)); s4.colors(palette(s4.map(f),Rainbow)); +defaultrender.merge=true; + draw(s1); draw(s2); draw(s3); diff --git a/Build/source/utils/asymptote/examples/vectorfieldsphere.asy b/Build/source/utils/asymptote/examples/vectorfieldsphere.asy index 2348e09f855..7f1e49057a5 100644 --- a/Build/source/utils/asymptote/examples/vectorfieldsphere.asy +++ b/Build/source/utils/asymptote/examples/vectorfieldsphere.asy @@ -12,6 +12,6 @@ path3 vector(pair z) { return O--(v.y,v.z,v.x); } -add(vectorfield(vector,f,(0,0),(pi,2pi),10,0.25,red)); +add(vectorfield(vector,f,(0,0),(pi,2pi),10,0.25,red,render(merge=true))); -draw(unitsphere,gray+opacity(0.5)); +draw(unitsphere,gray+opacity(0.5),render(compression=0,merge=true)); diff --git a/Build/source/utils/asymptote/examples/washer.asy b/Build/source/utils/asymptote/examples/washer.asy index 083039e55a3..457ae69fb83 100644 --- a/Build/source/utils/asymptote/examples/washer.asy +++ b/Build/source/utils/asymptote/examples/washer.asy @@ -5,8 +5,9 @@ path3[] p=reverse(unitcircle3)^^scale3(0.5)*unitcircle3; path[] g=reverse(unitcircle)^^scale(0.5)*unitcircle; triple H=-0.4Z; -draw(surface(p,planar=true)); -draw(surface(shift(H)*p,planar=true)); +render render=render(merge=true); +draw(surface(p,planar=true),render); +draw(surface(shift(H)*p,planar=true),render); material m=material(lightgray,shininess=1.0); for(path pp : g) draw(extrude(pp,H),m); diff --git a/Build/source/utils/asymptote/examples/washermethod.asy b/Build/source/utils/asymptote/examples/washermethod.asy index 032ed6cbc85..9a18b871414 100644 --- a/Build/source/utils/asymptote/examples/washermethod.asy +++ b/Build/source/utils/asymptote/examples/washermethod.asy @@ -18,13 +18,15 @@ path[] p={graph(F,0.7476,1.8043,Spline)--cycle, pen[] pn=new pen[] {color1,color2,color1}; +render render=render(compression=0); + for(int i=0; i < p.length; ++i) { revolution a=revolution(path3(p[i]),Y,0,alpha); - draw(surface(a),pn[i]); + draw(surface(a),pn[i],render); surface s=surface(p[i]); - draw(s,pn[i]); - draw(rotate(alpha,Y)*s,pn[i]); + draw(s,pn[i],render); + draw(rotate(alpha,Y)*s,pn[i],render); } draw((4/3,0,0)--F3(4/3),dashed); diff --git a/Build/source/utils/asymptote/examples/wedge.asy b/Build/source/utils/asymptote/examples/wedge.asy index 6cf6a58975f..41b4326cf42 100644 --- a/Build/source/utils/asymptote/examples/wedge.asy +++ b/Build/source/utils/asymptote/examples/wedge.asy @@ -10,11 +10,13 @@ draw(shift(-4Z)*scale(4,4,8)*unitcylinder,green+opacity(0.2)); triple F(real x){return (x,sqrt(16-x^2),sqrt((16-x^2)/3));} path3 p=graph(F,0,4,operator ..); path3 q=reverse(p)--rotate(180,(0,4,4/sqrt(3)))*p--cycle; -draw(surface(q--cycle),red); + +render render=render(merge=true); +draw(surface(q--cycle),red,render); real t=2; path3 triangle=(t,0,0)--(t,sqrt(16-t^2),0)--F(t)--cycle; -draw(surface(triangle),blue); +draw(surface(triangle),blue,render); xaxis3("$x$",Arrow3,PenMargin3(0,0.25)); yaxis3("$y$",Arrow3,PenMargin3(0,0.25)); diff --git a/Build/source/utils/asymptote/examples/xxsq01.asy b/Build/source/utils/asymptote/examples/xxsq01.asy index 11a035f0418..23a38393a94 100644 --- a/Build/source/utils/asymptote/examples/xxsq01.asy +++ b/Build/source/utils/asymptote/examples/xxsq01.asy @@ -14,11 +14,11 @@ path p=graph(F,0,1,n=10,operator ..)--cycle; path3 p3=path3(p); revolution a=revolution(p3,X,-alpha,0); -draw(surface(a),color); - +render render=render(compression=0,merge=true); +draw(surface(a),color,render); surface s=surface(p); -draw(s,color); -draw(rotate(-alpha,X)*s,color); +draw(s,color,render); +draw(rotate(-alpha,X)*s,color,render); draw(p3,blue); diff --git a/Build/source/utils/asymptote/examples/xxsq01x-1.asy b/Build/source/utils/asymptote/examples/xxsq01x-1.asy index 2c4c9ec363c..6d645a49664 100644 --- a/Build/source/utils/asymptote/examples/xxsq01x-1.asy +++ b/Build/source/utils/asymptote/examples/xxsq01x-1.asy @@ -2,7 +2,7 @@ import graph3; import solids; size(300); currentprojection=perspective(0,2,10,up=Y); -currentlight=(0.25,-0.25,5); +currentlight=Viewport; pen color=green; @@ -14,6 +14,7 @@ path p=graph(F,0,1,n=10,operator ..)--cycle; path3 p3=path3(p); revolution a=revolution(-X,p3,Y,0,180); +render render=render(merge=true); draw(surface(a),color); surface s=surface(p); draw(s,color); diff --git a/Build/source/utils/asymptote/examples/xxsq01y.asy b/Build/source/utils/asymptote/examples/xxsq01y.asy index 53f77d1f9bb..770f4fc22cf 100644 --- a/Build/source/utils/asymptote/examples/xxsq01y.asy +++ b/Build/source/utils/asymptote/examples/xxsq01y.asy @@ -11,11 +11,13 @@ triple F3(real x) {return (x,f(x),0);} path p=graph(F,0,1,n=10,operator ..)--cycle; path3 p3=path3(p); -draw(surface(revolution(p3,Y,0,alpha)),color); +render render=render(compression=0,merge=true); + +draw(surface(revolution(p3,Y,0,alpha)),color,render); surface s=surface(p); -draw(s,color); -draw(rotate(alpha,Y)*s,color); +draw(s,color,render); +draw(rotate(alpha,Y)*s,color,render); draw(p3,blue); |