diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-30 03:00:43 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-30 03:00:43 +0000 |
commit | bbbe8128e7ae9d816a221377dbf5ff3969bb203b (patch) | |
tree | 0283a521760b879b30e61872f14f235645745675 /graphics/asymptote/examples | |
parent | 14ce8b68fe7df49e8a8891bb94c63b9a846da232 (diff) |
CTAN sync 201909300300
Diffstat (limited to 'graphics/asymptote/examples')
-rw-r--r-- | graphics/asymptote/examples/Klein.asy | 2 | ||||
-rw-r--r-- | graphics/asymptote/examples/Sierpinski.asy | 2 | ||||
-rw-r--r-- | graphics/asymptote/examples/SierpinskiSponge.asy | 11 | ||||
-rw-r--r-- | graphics/asymptote/examples/logo3.asy | 4 | ||||
-rw-r--r-- | graphics/asymptote/examples/pdb.asy | 4 | ||||
-rw-r--r-- | graphics/asymptote/examples/shellmethod.asy | 2 | ||||
-rw-r--r-- | graphics/asymptote/examples/triangles.asy | 4 | ||||
-rw-r--r-- | graphics/asymptote/examples/vertexshading.asy | 5 | ||||
-rw-r--r-- | graphics/asymptote/examples/washermethod.asy | 2 |
9 files changed, 19 insertions, 17 deletions
diff --git a/graphics/asymptote/examples/Klein.asy b/graphics/asymptote/examples/Klein.asy index 99914d9043..a5e7418fe6 100644 --- a/graphics/asymptote/examples/Klein.asy +++ b/graphics/asymptote/examples/Klein.asy @@ -2,8 +2,6 @@ import graph3; size(469pt); -viewportmargin=0; - currentprojection=perspective( camera=(25.0851928432063,-30.3337528952473,19.3728775115443), up=Z, diff --git a/graphics/asymptote/examples/Sierpinski.asy b/graphics/asymptote/examples/Sierpinski.asy index c0ff04971d..1b9fb5555b 100644 --- a/graphics/asymptote/examples/Sierpinski.asy +++ b/graphics/asymptote/examples/Sierpinski.asy @@ -14,4 +14,4 @@ void Sierpinski(pair A, real s, int q, bool top=true) } } -Sierpinski((0,1),1,9); +Sierpinski((0,1),1,5); diff --git a/graphics/asymptote/examples/SierpinskiSponge.asy b/graphics/asymptote/examples/SierpinskiSponge.asy index c398aa511c..deaf7c1dec 100644 --- a/graphics/asymptote/examples/SierpinskiSponge.asy +++ b/graphics/asymptote/examples/SierpinskiSponge.asy @@ -82,18 +82,15 @@ for(int n3=0; n3 < 20; ++n3) { for(int n2=0; n2 < 20; ++n2) { surface s1; for(int n1=0; n1 < 20; ++n1) { - for(int k=0; k < 6; ++k){ - transform3 T=scale3(u)*shift(M[n1])*scale3(0.5); + for(int k=0; k < 6; ++k) { if(Sponge3[n3][n2][n1][k] > 0) { - s1.append(T*Squares[k]); + s1.append(scale3(u)*shift(M[n1])*scale3(0.5)*Squares[k]); } } } - transform3 T=scale3(u)*shift(M[n2])*scale3(0.5); - s2.append(T*s1); + s2.append(scale3(u)*shift(M[n2])*scale3(0.5)*s1); } - transform3 T=scale3(u)*shift(M[n3])*scale3(0.5); - s3.append(T*s2); + s3.append(scale3(u)*shift(M[n3])*scale3(0.5)*s2); } s3.colors(palette(s3.map(abs),Rainbow())); draw(s3); diff --git a/graphics/asymptote/examples/logo3.asy b/graphics/asymptote/examples/logo3.asy index 93b5a331e9..c7947f1c41 100644 --- a/graphics/asymptote/examples/logo3.asy +++ b/graphics/asymptote/examples/logo3.asy @@ -1,9 +1,11 @@ import three; -size(560,320,IgnoreAspect); +//size(105,50,IgnoreAspect); +size(560,320,IgnoreAspect); // Fullsize size3(140,80,15); currentprojection=perspective(-2,20,10,up=Y); currentlight=White; +viewportmargin=(0,10); real a=-0.4; real b=0.95; diff --git a/graphics/asymptote/examples/pdb.asy b/graphics/asymptote/examples/pdb.asy index 41cd29faaf..43b771fdd0 100644 --- a/graphics/asymptote/examples/pdb.asy +++ b/graphics/asymptote/examples/pdb.asy @@ -10,7 +10,7 @@ currentlight=White; defaultrender.merge=true; // Fast low-quality rendering //defaultrender.merge=false; // Slow high-quality rendering bool pixel=false; // Set to true to draw dots as pixels. -real width=10; +real width=6; size(200); currentprojection=perspective(30,30,15); @@ -161,4 +161,4 @@ if(!error(input(viewfilename,check=false))) options="3Dviews="+viewfilename; shipout(prefix,options=options); - +currentpicture.erase(); diff --git a/graphics/asymptote/examples/shellmethod.asy b/graphics/asymptote/examples/shellmethod.asy index c8e541f2a6..98f88f624f 100644 --- a/graphics/asymptote/examples/shellmethod.asy +++ b/graphics/asymptote/examples/shellmethod.asy @@ -2,7 +2,7 @@ import graph3; import solids; size(400); -currentprojection=perspective(0,-1,30,up=Y); +currentprojection=perspective(2,3,30,up=Y); currentlight=light(gray(0.75),(0.25,-0.25,1),(0,1,0)); pen color=green; diff --git a/graphics/asymptote/examples/triangles.asy b/graphics/asymptote/examples/triangles.asy index fc62c58c12..da1b93d28b 100644 --- a/graphics/asymptote/examples/triangles.asy +++ b/graphics/asymptote/examples/triangles.asy @@ -1,12 +1,14 @@ import three; size(10cm); +currentlight=Headlamp; + triple[] v={O,X,X+Y,Y}; triple[] n={Z,X}; int[][] vi={{0,1,2},{2,3,0}}; -int[][] ni={{0,0,0},{1,1,1}}; +int[][] ni={{1,0,1},{1,1,1}}; // Adobe Reader exhibits a PRC rendering bug for opacities: pen[] p={red+opacity(0.5),green+opacity(0.5),blue+opacity(0.5), diff --git a/graphics/asymptote/examples/vertexshading.asy b/graphics/asymptote/examples/vertexshading.asy index a5555d66f7..fd5e9b2df8 100644 --- a/graphics/asymptote/examples/vertexshading.asy +++ b/graphics/asymptote/examples/vertexshading.asy @@ -4,9 +4,12 @@ size(200); currentprojection=perspective(4,5,5); +//draw(shift(2Z)*surface(O--X--Y--cycle),blue); + draw(surface(unitcircle3,new pen[] {red,green,blue,black})); draw(surface(shift(Z)*unitsquare3, - new pen[] {red,green+opacity(0.5),blue,black})); + new pen[] {red,green+opacity(0.5),blue,black}), + prc() ? nolight : currentlight); draw(surface(shift(X)*((0,0,0)..controls (1,0,0) and (2,0,0)..(3,0,0).. controls (2.5,sqrt(3)/2,0) and (2,sqrt(3),0).. (1.5,3*sqrt(3)/2,0).. diff --git a/graphics/asymptote/examples/washermethod.asy b/graphics/asymptote/examples/washermethod.asy index c3177aa111..a61c37e5e5 100644 --- a/graphics/asymptote/examples/washermethod.asy +++ b/graphics/asymptote/examples/washermethod.asy @@ -18,7 +18,7 @@ real x2=1.7787; real x3=1.8043; path[] p={graph(F,x1,x2,Spline), - graph(F,0.7,x1,Spline)--graph(F,x2,x3,Spline), + graph(F,0.7,x1,Spline)--graph(F,x2,x3,Spline)&cycle, graph(F,0,0.7,Spline)--graph(F,x3,2,Spline)}; pen[] pn=new pen[] {color1,color2,color1}; |