diff options
author | Karl Berry <karl@freefriends.org> | 2022-02-27 23:41:11 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-02-27 23:41:11 +0000 |
commit | 8027f287eb46d487a0e379911bdbc4d6c2bf44e4 (patch) | |
tree | b6e3aeebab3f5c2560ae1ab892b76cca269eb05e /Master/texmf-dist/doc/asymptote | |
parent | a4855ce49e2101557c17547c2d22594e1b2a215c (diff) |
asymptote 2.78 support files
git-svn-id: svn://tug.org/texlive/trunk@62265 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/asymptote')
27 files changed, 195 insertions, 128 deletions
diff --git a/Master/texmf-dist/doc/asymptote/CAD.pdf b/Master/texmf-dist/doc/asymptote/CAD.pdf Binary files differindex f55807bb30c..c9e5dc9942a 100644 --- a/Master/texmf-dist/doc/asymptote/CAD.pdf +++ b/Master/texmf-dist/doc/asymptote/CAD.pdf diff --git a/Master/texmf-dist/doc/asymptote/TeXShopAndAsymptote.pdf b/Master/texmf-dist/doc/asymptote/TeXShopAndAsymptote.pdf Binary files differindex 50759d15e8f..b585bd4ef0d 100644 --- a/Master/texmf-dist/doc/asymptote/TeXShopAndAsymptote.pdf +++ b/Master/texmf-dist/doc/asymptote/TeXShopAndAsymptote.pdf diff --git a/Master/texmf-dist/doc/asymptote/asy-latex.pdf b/Master/texmf-dist/doc/asymptote/asy-latex.pdf Binary files differindex 953b91a2a06..3e57a01df6a 100644 --- a/Master/texmf-dist/doc/asymptote/asy-latex.pdf +++ b/Master/texmf-dist/doc/asymptote/asy-latex.pdf diff --git a/Master/texmf-dist/doc/asymptote/asyRefCard.pdf b/Master/texmf-dist/doc/asymptote/asyRefCard.pdf Binary files differindex 697d5a67b89..63dc23bf577 100644 --- a/Master/texmf-dist/doc/asymptote/asyRefCard.pdf +++ b/Master/texmf-dist/doc/asymptote/asyRefCard.pdf diff --git a/Master/texmf-dist/doc/asymptote/asymptote.pdf b/Master/texmf-dist/doc/asymptote/asymptote.pdf Binary files differindex 26289f9316f..a2098dfa94c 100644 --- a/Master/texmf-dist/doc/asymptote/asymptote.pdf +++ b/Master/texmf-dist/doc/asymptote/asymptote.pdf diff --git a/Master/texmf-dist/doc/asymptote/examples/1overx.asy b/Master/texmf-dist/doc/asymptote/examples/1overx.asy index 9bbbf282aca..dfaa049efb5 100644 --- a/Master/texmf-dist/doc/asymptote/examples/1overx.asy +++ b/Master/texmf-dist/doc/asymptote/examples/1overx.asy @@ -1,16 +1,11 @@ import graph; size(200,IgnoreAspect); -real f(real x) {return 1/x;}; +real f(real x) {return 1/x;} bool3 branch(real x) { - static int lastsign=0; - if(x == 0) return false; - int sign=sgn(x); - bool b=lastsign == 0 || sign == lastsign; - lastsign=sign; - return b ? true : default; + return x != 0; } draw(graph(f,-1,1,branch)); diff --git a/Master/texmf-dist/doc/asymptote/examples/NURBScurve.asy b/Master/texmf-dist/doc/asymptote/examples/NURBScurve.asy index 9ad121ecc65..736ff67588b 100644 --- a/Master/texmf-dist/doc/asymptote/examples/NURBScurve.asy +++ b/Master/texmf-dist/doc/asymptote/examples/NURBScurve.asy @@ -1,3 +1,6 @@ +settings.outformat="pdf"; +settings.prc=true; + import three; size(10cm); @@ -31,4 +34,3 @@ real[] weights=array(P.length,1.0); weights[2]=5; draw(P,knot,weights,red); - diff --git a/Master/texmf-dist/doc/asymptote/examples/NURBSsphere.asy b/Master/texmf-dist/doc/asymptote/examples/NURBSsphere.asy index 484e8c4cd15..e169d70343e 100644 --- a/Master/texmf-dist/doc/asymptote/examples/NURBSsphere.asy +++ b/Master/texmf-dist/doc/asymptote/examples/NURBSsphere.asy @@ -1,3 +1,6 @@ +settings.outformat="pdf"; +settings.prc=true; + import three; /* Reference: diff --git a/Master/texmf-dist/doc/asymptote/examples/NURBSsurface.asy b/Master/texmf-dist/doc/asymptote/examples/NURBSsurface.asy index 4bfafefbc33..bfa314ac66a 100644 --- a/Master/texmf-dist/doc/asymptote/examples/NURBSsurface.asy +++ b/Master/texmf-dist/doc/asymptote/examples/NURBSsurface.asy @@ -1,3 +1,6 @@ +settings.outformat="pdf"; +settings.prc=true; + import three; size(10cm); @@ -59,7 +62,7 @@ draw(P,uknot,vknot,new pen[] {red,green,blue,magenta}); // udegree=3, vdegree=3, nu=4, nv=4; real[] uknot={0,0,0,0,1,1,1,1}; real[] vknot={0,0,0,0,1,1,1,1}; -triple[][] P=scale3(20)*octant1.P; +triple[][] P=scale3(20)*octant1x.P; // Optional weights: real[][] weights=array(P.length,array(P[0].length,1.0)); diff --git a/Master/texmf-dist/doc/asymptote/examples/alignedaxis.asy b/Master/texmf-dist/doc/asymptote/examples/alignedaxis.asy index 542dcb9bc60..d32c389a74b 100644 --- a/Master/texmf-dist/doc/asymptote/examples/alignedaxis.asy +++ b/Master/texmf-dist/doc/asymptote/examples/alignedaxis.asy @@ -91,7 +91,7 @@ real Aerr2(real x){return Aerr(x,0.75);} draw(pic2p,graph(pic2p,Aerr2,1e-4,1),black+1.2); ylimits(pic2p,-5,95); -yaxis(pic2p,"phase (deg)",LeftRight,RightTicks(new real[] {0,45.1,90})); +yaxis(pic2p,"phase (deg)",LeftRight,RightTicks(new real[] {0,50,90})); xaxis(pic2p,"$f/f_\mathrm{Ny}$",BottomTop,LeftTicks(N=5)); yequals(pic2p,0,Dotted); yequals(pic2p,45,Dotted); diff --git a/Master/texmf-dist/doc/asymptote/examples/fillcontour.asy b/Master/texmf-dist/doc/asymptote/examples/fillcontour.asy index 0197386670f..b92b65ef46c 100644 --- a/Master/texmf-dist/doc/asymptote/examples/fillcontour.asy +++ b/Master/texmf-dist/doc/asymptote/examples/fillcontour.asy @@ -2,28 +2,40 @@ import graph; import palette; import contour; -size(12cm,IgnoreAspect); +size(10cm,10cm); -pair a=(pi/2,0); -pair b=(3pi/2,2pi); +pair a=(0,0); +pair b=(2pi,2pi); real f(real x, real y) {return cos(x)*sin(y);} -int N=100; +int N=200; int Divs=10; +int divs=1; +int n=Divs*divs; defaultpen(1bp); +pen Tickpen=black; +pen tickpen=gray+0.5*linewidth(currentpen); +pen[] Palette=quantize(BWRainbow(),n); -bounds range=bounds(-1,1); +bounds range=image(f,Automatic,a,b,3N,Palette,n); real[] Cvals=uniform(range.min,range.max,Divs); -guide[][] g=contour(f,a,b,Cvals,N,operator --); +draw(contour(f,a,b,Cvals,N,operator --),Tickpen+squarecap+beveljoin); -pen[] Palette=quantize(Rainbow(),Divs); +// Major contours +real[] Cvals=uniform(range.min,range.max,Divs); +draw(contour(f,a,b,Cvals,N,operator --),Tickpen+squarecap+beveljoin); + +// Minor contours (if divs > 1) +real[] cvals; +for(int i=0; i < Cvals.length-1; ++i) + cvals.append(uniform(Cvals[i],Cvals[i+1],divs)[1:divs]); +draw(contour(f,a,b,cvals,N,operator --),tickpen); -pen[][] interior=interior(g,extend(Palette,grey,black)); -fill(g,interior); -draw(g); +xaxis("$x$",BottomTop,LeftTicks,above=true); +yaxis("$y$",LeftRight,RightTicks,above=true); palette("$f(x,y)$",range,point(SE)+(0.5,0),point(NE)+(1,0),Right,Palette, - PaletteTicks("$%+#0.1f$",N=Divs)); + PaletteTicks("$%+#0.1f$",N=Divs,n=divs,Tickpen,tickpen)); diff --git a/Master/texmf-dist/doc/asymptote/examples/graphwithderiv.asy b/Master/texmf-dist/doc/asymptote/examples/graphwithderiv.asy new file mode 100644 index 00000000000..2dfd1da02d3 --- /dev/null +++ b/Master/texmf-dist/doc/asymptote/examples/graphwithderiv.asy @@ -0,0 +1,11 @@ +unitsize(2cm); +import graph; +pair F(real t) { + return (1.3*t,-4.5*t^2+3.0*t+1.0); +} +pair Fprime(real t) { + return (1.3,-9.0*t+3.0); +} +path g=graphwithderiv(F,Fprime,0,0.9,4); +dot(g,red); +draw(g,arrow=Arrow(TeXHead)); diff --git a/Master/texmf-dist/doc/asymptote/examples/imagecontour.asy b/Master/texmf-dist/doc/asymptote/examples/imagecontour.asy index d61b6148c53..18c4cb772cc 100644 --- a/Master/texmf-dist/doc/asymptote/examples/imagecontour.asy +++ b/Master/texmf-dist/doc/asymptote/examples/imagecontour.asy @@ -2,7 +2,7 @@ import graph; import palette; import contour; -size(10cm,10cm,IgnoreAspect); +size(10cm,10cm); pair a=(0,0); pair b=(2pi,2pi); @@ -11,7 +11,7 @@ real f(real x, real y) {return cos(x)*sin(y);} int N=200; int Divs=10; -int divs=2; +int divs=1; defaultpen(1bp); pen Tickpen=black; @@ -21,18 +21,17 @@ pen[] Palette=BWRainbow(); bounds range=image(f,Automatic,a,b,N,Palette); // Major contours - real[] Cvals=uniform(range.min,range.max,Divs); -draw(contour(f,a,b,Cvals,N,operator --),Tickpen); +draw(contour(f,a,b,Cvals,N,operator --),Tickpen+squarecap+beveljoin); -// Minor contours +// Minor contours (if divs > 1) real[] cvals; for(int i=0; i < Cvals.length-1; ++i) cvals.append(uniform(Cvals[i],Cvals[i+1],divs)[1:divs]); -draw(contour(f,a,b,cvals,N,operator --),tickpen); +draw(contour(f,a,b,cvals,N,operator --),tickpen+squarecap+beveljoin); xaxis("$x$",BottomTop,LeftTicks,above=true); yaxis("$y$",LeftRight,RightTicks,above=true); -palette("$f(x,y)$",range,point(NW)+(0,0.5),point(NE)+(0,1),Top,Palette, - PaletteTicks(N=Divs,n=divs,Tickpen,tickpen)); +palette("$f(x,y)$",range,point(SE)+(0.5,0),point(NE)+(1,0),Right,Palette, + PaletteTicks("$%+#0.1f$",N=Divs,n=divs,Tickpen,tickpen)); diff --git a/Master/texmf-dist/doc/asymptote/examples/interpolate1.asy b/Master/texmf-dist/doc/asymptote/examples/interpolate1.asy index 19d77449abd..10bc7ef4f6b 100644 --- a/Master/texmf-dist/doc/asymptote/examples/interpolate1.asy +++ b/Master/texmf-dist/doc/asymptote/examples/interpolate1.asy @@ -1,5 +1,5 @@ // Lagrange and Hermite interpolation in Asymptote -// Author: Olivier Guibé +// Author: Olivier Guibé import interpolate; import graph; diff --git a/Master/texmf-dist/doc/asymptote/examples/latexusage.tex b/Master/texmf-dist/doc/asymptote/examples/latexusage.tex index 07b0e56a356..9701a25af9b 100644 --- a/Master/texmf-dist/doc/asymptote/examples/latexusage.tex +++ b/Master/texmf-dist/doc/asymptote/examples/latexusage.tex @@ -21,6 +21,7 @@ \begin{asydef} // Global Asymptote definitions can be put here. +settings.prc=true; import three; usepackage("bm"); texpreamble("\def\V#1{\bm{#1}}"); diff --git a/Master/texmf-dist/doc/asymptote/examples/layers.asy b/Master/texmf-dist/doc/asymptote/examples/layers.asy index 4fe745f6a3c..3d80b31fb7a 100644 --- a/Master/texmf-dist/doc/asymptote/examples/layers.asy +++ b/Master/texmf-dist/doc/asymptote/examples/layers.asy @@ -1,4 +1,4 @@ -usepackage("ocg"); +usepackage("ocgx2"); settings.tex="pdflatex"; size(0,150); diff --git a/Master/texmf-dist/doc/asymptote/examples/legend.asy b/Master/texmf-dist/doc/asymptote/examples/legend.asy index b00cdd14e6b..246c787c833 100644 --- a/Master/texmf-dist/doc/asymptote/examples/legend.asy +++ b/Master/texmf-dist/doc/asymptote/examples/legend.asy @@ -4,7 +4,7 @@ size(8cm,6cm,IgnoreAspect); typedef real realfcn(real); realfcn F(real p) { return new real(real x) {return sin(p*x);}; -}; +} for(int i=1; i < 5; ++i) draw(graph(F(i*pi),0,1),Pen(i), diff --git a/Master/texmf-dist/doc/asymptote/examples/markregular.asy b/Master/texmf-dist/doc/asymptote/examples/markregular.asy index ea08b952238..8c3a51040b3 100644 --- a/Master/texmf-dist/doc/asymptote/examples/markregular.asy +++ b/Master/texmf-dist/doc/asymptote/examples/markregular.asy @@ -7,11 +7,11 @@ real ymin=-2,ymax=10; real f(real x) {return x^2;} -marker cross=marker(scale(4)*rotate(45)*cross(4), +marker mark=marker(scale(4)*plus, markuniform(new pair(real t) {return Scale((t,f(t)));}, xmin,xmax,round(2*(xmax-xmin))),1bp+red); -draw(graph(f,xmin,xmax,n=400),linewidth(1bp),cross); +draw(graph(f,xmin,xmax,n=400),linewidth(1bp),mark); ylimits(-2.5,10,Crop); diff --git a/Master/texmf-dist/doc/asymptote/examples/orthocenter.asy b/Master/texmf-dist/doc/asymptote/examples/orthocenter.asy index a7caaf14126..69ae5376b5f 100644 --- a/Master/texmf-dist/doc/asymptote/examples/orthocenter.asy +++ b/Master/texmf-dist/doc/asymptote/examples/orthocenter.asy @@ -2,8 +2,7 @@ import geometry; import math; size(7cm,0); - -if(!settings.xasy && settings.outformat != "svg") settings.tex="pdflatex"; +settings.tex="pdflatex"; real theta=degrees(asin(0.5/sqrt(7))); diff --git a/Master/texmf-dist/doc/asymptote/examples/secondaryaxis.asy b/Master/texmf-dist/doc/asymptote/examples/secondaryaxis.asy index 85143f7acec..b611eb4ed2e 100644 --- a/Master/texmf-dist/doc/asymptote/examples/secondaryaxis.asy +++ b/Master/texmf-dist/doc/asymptote/examples/secondaryaxis.asy @@ -11,7 +11,7 @@ string[] columnlabel=in; real[][] a=in; a=transpose(a); real[] t=a[0], susceptible=a[1], infectious=a[2], dead=a[3], larvae=a[4]; -real[] susceptibleM=a[5], exposed=a[6],infectiousM=a[7]; +real[] susceptibleM=a[5], exposed=a[6], infectiousM=a[7]; scale(true); @@ -29,4 +29,3 @@ picture secondary=secondaryY(new void(picture pic) { add(secondary); label(shift(5mm*N)*"Proportion of crows",point(NW),E); - diff --git a/Master/texmf-dist/doc/asymptote/examples/spectrum.asy b/Master/texmf-dist/doc/asymptote/examples/spectrum.asy index 95c5f8a0d1b..c6837ec7810 100644 --- a/Master/texmf-dist/doc/asymptote/examples/spectrum.asy +++ b/Master/texmf-dist/doc/asymptote/examples/spectrum.asy @@ -1,5 +1,5 @@ import graph; -usepackage("ocg"); +usepackage("ocgx2"); settings.tex="pdflatex"; // Dan Bruton algorithm diff --git a/Master/texmf-dist/doc/asymptote/examples/strokepath.asy b/Master/texmf-dist/doc/asymptote/examples/strokepath.asy index c857150ec58..5e5b2b9a964 100644 --- a/Master/texmf-dist/doc/asymptote/examples/strokepath.asy +++ b/Master/texmf-dist/doc/asymptote/examples/strokepath.asy @@ -5,7 +5,6 @@ frame f; // Equivalent to draw(f,g,p): fill(f,strokepath(g,p),red); shipout("strokepathframe",f); -shipped=false; size(400); diff --git a/Master/texmf-dist/doc/asymptote/examples/teapot.asy b/Master/texmf-dist/doc/asymptote/examples/teapot.asy index f3328151fde..847ffd234dc 100644 --- a/Master/texmf-dist/doc/asymptote/examples/teapot.asy +++ b/Master/texmf-dist/doc/asymptote/examples/teapot.asy @@ -1,204 +1,232 @@ import three; -import settings; size(20cm); currentprojection=perspective(250,-250,250); currentlight=Viewport; -triple[][][] Q= +triple[][][] Q={ { - { {(39.68504,0,68.0315),(37.91339,0,71.75197),(40.74803,0,71.75197),(42.51969,0,68.0315)}, {(39.68504,-22.22362,68.0315),(37.91339,-21.2315,71.75197),(40.74803,-22.8189,71.75197),(42.51969,-23.81102,68.0315)}, {(22.22362,-39.68504,68.0315),(21.2315,-37.91339,71.75197),(22.8189,-40.74803,71.75197),(23.81102,-42.51969,68.0315)}, {(0,-39.68504,68.0315),(0,-37.91339,71.75197),(0,-40.74803,71.75197),(0,-42.51969,68.0315)} - }, - { + }, + { {(0,-39.68504,68.0315),(0,-37.91339,71.75197),(0,-40.74803,71.75197),(0,-42.51969,68.0315)}, {(-22.22362,-39.68504,68.0315),(-21.2315,-37.91339,71.75197),(-22.8189,-40.74803,71.75197),(-23.81102,-42.51969,68.0315)}, {(-39.68504,-22.22362,68.0315),(-37.91339,-21.2315,71.75197),(-40.74803,-22.8189,71.75197),(-42.51969,-23.81102,68.0315)}, {(-39.68504,0,68.0315),(-37.91339,0,71.75197),(-40.74803,0,71.75197),(-42.51969,0,68.0315)} - }, - { + }, + { {(-39.68504,0,68.0315),(-37.91339,0,71.75197),(-40.74803,0,71.75197),(-42.51969,0,68.0315)}, {(-39.68504,22.22362,68.0315),(-37.91339,21.2315,71.75197),(-40.74803,22.8189,71.75197),(-42.51969,23.81102,68.0315)}, {(-22.22362,39.68504,68.0315),(-21.2315,37.91339,71.75197),(-22.8189,40.74803,71.75197),(-23.81102,42.51969,68.0315)}, {(0,39.68504,68.0315),(0,37.91339,71.75197),(0,40.74803,71.75197),(0,42.51969,68.0315)} - }, - { + }, + { {(0,39.68504,68.0315),(0,37.91339,71.75197),(0,40.74803,71.75197),(0,42.51969,68.0315)}, {(22.22362,39.68504,68.0315),(21.2315,37.91339,71.75197),(22.8189,40.74803,71.75197),(23.81102,42.51969,68.0315)}, {(39.68504,22.22362,68.0315),(37.91339,21.2315,71.75197),(40.74803,22.8189,71.75197),(42.51969,23.81102,68.0315)}, {(39.68504,0,68.0315),(37.91339,0,71.75197),(40.74803,0,71.75197),(42.51969,0,68.0315)} - }, - { + }, + { {(42.51969,0,68.0315),(49.60629,0,53.1496),(56.69291,0,38.26771),(56.69291,0,25.51181)}, {(42.51969,-23.81102,68.0315),(49.60629,-27.77952,53.1496),(56.69291,-31.74803,38.26771),(56.69291,-31.74803,25.51181)}, {(23.81102,-42.51969,68.0315),(27.77952,-49.60629,53.1496),(31.74803,-56.69291,38.26771),(31.74803,-56.69291,25.51181)}, {(0,-42.51969,68.0315),(0,-49.60629,53.1496),(0,-56.69291,38.26771),(0,-56.69291,25.51181)} - }, - { + }, + { {(0,-42.51969,68.0315),(0,-49.60629,53.1496),(0,-56.69291,38.26771),(0,-56.69291,25.51181)}, {(-23.81102,-42.51969,68.0315),(-27.77952,-49.60629,53.1496),(-31.74803,-56.69291,38.26771),(-31.74803,-56.69291,25.51181)}, {(-42.51969,-23.81102,68.0315),(-49.60629,-27.77952,53.1496),(-56.69291,-31.74803,38.26771),(-56.69291,-31.74803,25.51181)}, {(-42.51969,0,68.0315),(-49.60629,0,53.1496),(-56.69291,0,38.26771),(-56.69291,0,25.51181)} - }, - { + }, + { {(-42.51969,0,68.0315),(-49.60629,0,53.1496),(-56.69291,0,38.26771),(-56.69291,0,25.51181)}, {(-42.51969,23.81102,68.0315),(-49.60629,27.77952,53.1496),(-56.69291,31.74803,38.26771),(-56.69291,31.74803,25.51181)}, {(-23.81102,42.51969,68.0315),(-27.77952,49.60629,53.1496),(-31.74803,56.69291,38.26771),(-31.74803,56.69291,25.51181)}, {(0,42.51969,68.0315),(0,49.60629,53.1496),(0,56.69291,38.26771),(0,56.69291,25.51181)} - }, - { + }, + { {(0,42.51969,68.0315),(0,49.60629,53.1496),(0,56.69291,38.26771),(0,56.69291,25.51181)}, {(23.81102,42.51969,68.0315),(27.77952,49.60629,53.1496),(31.74803,56.69291,38.26771),(31.74803,56.69291,25.51181)}, {(42.51969,23.81102,68.0315),(49.60629,27.77952,53.1496),(56.69291,31.74803,38.26771),(56.69291,31.74803,25.51181)}, {(42.51969,0,68.0315),(49.60629,0,53.1496),(56.69291,0,38.26771),(56.69291,0,25.51181)} - }, - { + }, + { {(56.69291,0,25.51181),(56.69291,0,12.7559),(42.51969,0,6.377957),(42.51969,0,4.251961)}, {(56.69291,-31.74803,25.51181),(56.69291,-31.74803,12.7559),(42.51969,-23.81102,6.377957),(42.51969,-23.81102,4.251961)}, {(31.74803,-56.69291,25.51181),(31.74803,-56.69291,12.7559),(23.81102,-42.51969,6.377957),(23.81102,-42.51969,4.251961)}, {(0,-56.69291,25.51181),(0,-56.69291,12.7559),(0,-42.51969,6.377957),(0,-42.51969,4.251961)} - }, - { + }, + { {(0,-56.69291,25.51181),(0,-56.69291,12.7559),(0,-42.51969,6.377957),(0,-42.51969,4.251961)}, {(-31.74803,-56.69291,25.51181),(-31.74803,-56.69291,12.7559),(-23.81102,-42.51969,6.377957),(-23.81102,-42.51969,4.251961)}, {(-56.69291,-31.74803,25.51181),(-56.69291,-31.74803,12.7559),(-42.51969,-23.81102,6.377957),(-42.51969,-23.81102,4.251961)}, {(-56.69291,0,25.51181),(-56.69291,0,12.7559),(-42.51969,0,6.377957),(-42.51969,0,4.251961)} - }, - { + }, + { {(-56.69291,0,25.51181),(-56.69291,0,12.7559),(-42.51969,0,6.377957),(-42.51969,0,4.251961)}, {(-56.69291,31.74803,25.51181),(-56.69291,31.74803,12.7559),(-42.51969,23.81102,6.377957),(-42.51969,23.81102,4.251961)}, {(-31.74803,56.69291,25.51181),(-31.74803,56.69291,12.7559),(-23.81102,42.51969,6.377957),(-23.81102,42.51969,4.251961)}, {(0,56.69291,25.51181),(0,56.69291,12.7559),(0,42.51969,6.377957),(0,42.51969,4.251961)} - }, - { + }, + { {(0,56.69291,25.51181),(0,56.69291,12.7559),(0,42.51969,6.377957),(0,42.51969,4.251961)}, {(31.74803,56.69291,25.51181),(31.74803,56.69291,12.7559),(23.81102,42.51969,6.377957),(23.81102,42.51969,4.251961)}, {(56.69291,31.74803,25.51181),(56.69291,31.74803,12.7559),(42.51969,23.81102,6.377957),(42.51969,23.81102,4.251961)}, {(56.69291,0,25.51181),(56.69291,0,12.7559),(42.51969,0,6.377957),(42.51969,0,4.251961)} - }, - { + }, + { {(-45.35433,0,57.40157),(-65.19685,0,57.40157),(-76.53543,0,57.40157),(-76.53543,0,51.02362)}, {(-45.35433,-8.503932,57.40157),(-65.19685,-8.503932,57.40157),(-76.53543,-8.503932,57.40157),(-76.53543,-8.503932,51.02362)}, {(-42.51969,-8.503932,63.77952),(-70.86614,-8.503932,63.77952),(-85.03937,-8.503932,63.77952),(-85.03937,-8.503932,51.02362)}, {(-42.51969,0,63.77952),(-70.86614,0,63.77952),(-85.03937,0,63.77952),(-85.03937,0,51.02362)} - }, - { + }, + { {(-42.51969,0,63.77952),(-70.86614,0,63.77952),(-85.03937,0,63.77952),(-85.03937,0,51.02362)}, {(-42.51969,8.503932,63.77952),(-70.86614,8.503932,63.77952),(-85.03937,8.503932,63.77952),(-85.03937,8.503932,51.02362)}, {(-45.35433,8.503932,57.40157),(-65.19685,8.503932,57.40157),(-76.53543,8.503932,57.40157),(-76.53543,8.503932,51.02362)}, {(-45.35433,0,57.40157),(-65.19685,0,57.40157),(-76.53543,0,57.40157),(-76.53543,0,51.02362)} - }, - { + }, + { {(-76.53543,0,51.02362),(-76.53543,0,44.64566),(-70.86614,0,31.88976),(-56.69291,0,25.51181)}, {(-76.53543,-8.503932,51.02362),(-76.53543,-8.503932,44.64566),(-70.86614,-8.503932,31.88976),(-56.69291,-8.503932,25.51181)}, {(-85.03937,-8.503932,51.02362),(-85.03937,-8.503932,38.26771),(-75.11811,-8.503932,26.5748),(-53.85826,-8.503932,17.00787)}, {(-85.03937,0,51.02362),(-85.03937,0,38.26771),(-75.11811,0,26.5748),(-53.85826,0,17.00787)} - }, - { + }, + { {(-85.03937,0,51.02362),(-85.03937,0,38.26771),(-75.11811,0,26.5748),(-53.85826,0,17.00787)}, {(-85.03937,8.503932,51.02362),(-85.03937,8.503932,38.26771),(-75.11811,8.503932,26.5748),(-53.85826,8.503932,17.00787)}, {(-76.53543,8.503932,51.02362),(-76.53543,8.503932,44.64566),(-70.86614,8.503932,31.88976),(-56.69291,8.503932,25.51181)}, {(-76.53543,0,51.02362),(-76.53543,0,44.64566),(-70.86614,0,31.88976),(-56.69291,0,25.51181)} - }, - { + }, + { {(48.18897,0,40.3937),(73.70078,0,40.3937),(65.19685,0,59.52755),(76.53543,0,68.0315)}, {(48.18897,-18.70866,40.3937),(73.70078,-18.70866,40.3937),(65.19685,-7.086619,59.52755),(76.53543,-7.086619,68.0315)}, {(48.18897,-18.70866,17.00787),(87.87401,-18.70866,23.38582),(68.0315,-7.086619,57.40157),(93.5433,-7.086619,68.0315)}, {(48.18897,0,17.00787),(87.87401,0,23.38582),(68.0315,0,57.40157),(93.5433,0,68.0315)} - }, - { + }, + { {(48.18897,0,17.00787),(87.87401,0,23.38582),(68.0315,0,57.40157),(93.5433,0,68.0315)}, {(48.18897,18.70866,17.00787),(87.87401,18.70866,23.38582),(68.0315,7.086619,57.40157),(93.5433,7.086619,68.0315)}, {(48.18897,18.70866,40.3937),(73.70078,18.70866,40.3937),(65.19685,7.086619,59.52755),(76.53543,7.086619,68.0315)}, {(48.18897,0,40.3937),(73.70078,0,40.3937),(65.19685,0,59.52755),(76.53543,0,68.0315)} - }, - { + }, + { {(76.53543,0,68.0315),(79.37007,0,70.15748),(82.20472,0,70.15748),(79.37007,0,68.0315)}, {(76.53543,-7.086619,68.0315),(79.37007,-7.086619,70.15748),(82.20472,-4.251961,70.15748),(79.37007,-4.251961,68.0315)}, {(93.5433,-7.086619,68.0315),(99.92125,-7.086619,70.68897),(97.79527,-4.251961,71.22047),(90.70866,-4.251961,68.0315)}, {(93.5433,0,68.0315),(99.92125,0,70.68897),(97.79527,0,71.22047),(90.70866,0,68.0315)} - }, - { + }, + { {(93.5433,0,68.0315),(99.92125,0,70.68897),(97.79527,0,71.22047),(90.70866,0,68.0315)}, {(93.5433,7.086619,68.0315),(99.92125,7.086619,70.68897),(97.79527,4.251961,71.22047),(90.70866,4.251961,68.0315)}, {(76.53543,7.086619,68.0315),(79.37007,7.086619,70.15748),(82.20472,4.251961,70.15748),(79.37007,4.251961,68.0315)}, {(76.53543,0,68.0315),(79.37007,0,70.15748),(82.20472,0,70.15748),(79.37007,0,68.0315)} - }, - { + }, + { + {(5.669294,0,76.53543),(11.33858,0,72.28346),(36.85039,0,72.28346),(36.85039,0,68.0315)}, + {(5.669294,-3.174809,76.53543),(11.33858,-6.349609,72.28346),(36.85039,-20.63622,72.28346),(36.85039,-20.63622,68.0315)}, + {(3.174809,-5.669294,76.53543),(6.349609,-11.33858,72.28346),(20.63622,-36.85039,72.28346),(20.63622,-36.85039,68.0315)}, + {(0,-5.669294,76.53543),(0,-11.33858,72.28346),(0,-36.85039,72.28346),(0,-36.85039,68.0315)} + }, + { + {(0,-5.669294,76.53543),(0,-11.33858,72.28346),(0,-36.85039,72.28346),(0,-36.85039,68.0315)}, + {(-3.174809,-5.669294,76.53543),(-6.349609,-11.33858,72.28346),(-20.63622,-36.85039,72.28346),(-20.63622,-36.85039,68.0315)}, + {(-5.669294,-3.174809,76.53543),(-11.33858,-6.349609,72.28346),(-36.85039,-20.63622,72.28346),(-36.85039,-20.63622,68.0315)}, + {(-5.669294,0,76.53543),(-11.33858,0,72.28346),(-36.85039,0,72.28346),(-36.85039,0,68.0315)}, + }, + { + {(-5.669294,0,76.53543),(-11.33858,0,72.28346),(-36.85039,0,72.28346),(-36.85039,0,68.0315)}, + {(-5.669294,3.174809,76.53543),(-11.33858,6.349609,72.28346),(-36.85039,20.63622,72.28346),(-36.85039,20.63622,68.0315)}, + {(-3.174809,5.669294,76.53543),(-6.349609,11.33858,72.28346),(-20.63622,36.85039,72.28346),(-20.63622,36.85039,68.0315)}, + {(0,5.669294,76.53543),(0,11.33858,72.28346),(0,36.85039,72.28346),(0,36.85039,68.0315)} + }, + { + {(0,5.669294,76.53543),(0,11.33858,72.28346),(0,36.85039,72.28346),(0,36.85039,68.0315)}, + {(3.174809,5.669294,76.53543),(6.349609,11.33858,72.28346),(20.63622,36.85039,72.28346),(20.63622,36.85039,68.0315)}, + {(5.669294,3.174809,76.53543),(11.33858,6.349609,72.28346),(36.85039,20.63622,72.28346),(36.85039,20.63622,68.0315)}, + {(5.669294,0,76.53543),(11.33858,0,72.28346),(36.85039,0,72.28346),(36.85039,0,68.0315)} + } +}; + +triple[][][] Q0={ + { {(0,0,89.29133),(22.67716,0,89.29133),(0,0,80.7874),(5.669294,0,76.53543)}, {(0,0,89.29133),(22.67716,-12.7559,89.29133),(0,0,80.7874),(5.669294,-3.174809,76.53543)}, {(0,0,89.29133),(12.7559,-22.67716,89.29133),(0,0,80.7874),(3.174809,-5.669294,76.53543)}, {(0,0,89.29133),(0,-22.67716,89.29133),(0,0,80.7874),(0,-5.669294,76.53543)} - }, - { + }, + { {(0,0,89.29133),(0,-22.67716,89.29133),(0,0,80.7874),(0,-5.669294,76.53543)}, {(0,0,89.29133),(-12.7559,-22.67716,89.29133),(0,0,80.7874),(-3.174809,-5.669294,76.53543)}, {(0,0,89.29133),(-22.67716,-12.7559,89.29133),(0,0,80.7874),(-5.669294,-3.174809,76.53543)}, {(0,0,89.29133),(-22.67716,0,89.29133),(0,0,80.7874),(-5.669294,0,76.53543)} - }, - { + }, + { {(0,0,89.29133),(-22.67716,0,89.29133),(0,0,80.7874),(-5.669294,0,76.53543)}, {(0,0,89.29133),(-22.67716,12.7559,89.29133),(0,0,80.7874),(-5.669294,3.174809,76.53543)}, {(0,0,89.29133),(-12.7559,22.67716,89.29133),(0,0,80.7874),(-3.174809,5.669294,76.53543)}, {(0,0,89.29133),(0,22.67716,89.29133),(0,0,80.7874),(0,5.669294,76.53543)} - }, - { + }, + { {(0,0,89.29133),(0,22.67716,89.29133),(0,0,80.7874),(0,5.669294,76.53543)}, {(0,0,89.29133),(12.7559,22.67716,89.29133),(0,0,80.7874),(3.174809,5.669294,76.53543)}, {(0,0,89.29133),(22.67716,12.7559,89.29133),(0,0,80.7874),(5.669294,3.174809,76.53543)}, {(0,0,89.29133),(22.67716,0,89.29133),(0,0,80.7874),(5.669294,0,76.53543)} - }, - { - {(5.669294,0,76.53543),(11.33858,0,72.28346),(36.85039,0,72.28346),(36.85039,0,68.0315)}, - {(5.669294,-3.174809,76.53543),(11.33858,-6.349609,72.28346),(36.85039,-20.63622,72.28346),(36.85039,-20.63622,68.0315)}, - {(3.174809,-5.669294,76.53543),(6.349609,-11.33858,72.28346),(20.63622,-36.85039,72.28346),(20.63622,-36.85039,68.0315)}, - {(0,-5.669294,76.53543),(0,-11.33858,72.28346),(0,-36.85039,72.28346),(0,-36.85039,68.0315)} - }, - { - {(0,-5.669294,76.53543),(0,-11.33858,72.28346),(0,-36.85039,72.28346),(0,-36.85039,68.0315)}, - {(-3.174809,-5.669294,76.53543),(-6.349609,-11.33858,72.28346),(-20.63622,-36.85039,72.28346),(-20.63622,-36.85039,68.0315)}, - {(-5.669294,-3.174809,76.53543),(-11.33858,-6.349609,72.28346),(-36.85039,-20.63622,72.28346),(-36.85039,-20.63622,68.0315)}, - {(-5.669294,0,76.53543),(-11.33858,0,72.28346),(-36.85039,0,72.28346),(-36.85039,0,68.0315)}, - }, - { - {(-5.669294,0,76.53543),(-11.33858,0,72.28346),(-36.85039,0,72.28346),(-36.85039,0,68.0315)}, - {(-5.669294,3.174809,76.53543),(-11.33858,6.349609,72.28346),(-36.85039,20.63622,72.28346),(-36.85039,20.63622,68.0315)}, - {(-3.174809,5.669294,76.53543),(-6.349609,11.33858,72.28346),(-20.63622,36.85039,72.28346),(-20.63622,36.85039,68.0315)}, - {(0,5.669294,76.53543),(0,11.33858,72.28346),(0,36.85039,72.28346),(0,36.85039,68.0315)} - }, - { - {(0,5.669294,76.53543),(0,11.33858,72.28346),(0,36.85039,72.28346),(0,36.85039,68.0315)}, - {(3.174809,5.669294,76.53543),(6.349609,11.33858,72.28346),(20.63622,36.85039,72.28346),(20.63622,36.85039,68.0315)}, - {(5.669294,3.174809,76.53543),(11.33858,6.349609,72.28346),(36.85039,20.63622,72.28346),(36.85039,20.63622,68.0315)}, - {(5.669294,0,76.53543),(11.33858,0,72.28346),(36.85039,0,72.28346),(36.85039,0,68.0315)}, - }, - { + }, + { {(0,0,0),(40.3937,0,0),(42.51969,0,2.12598),(42.51969,0,4.251961)}, {(0,0,0),(40.3937,22.62047,0),(42.51969,23.81102,2.12598),(42.51969,23.81102,4.251961)}, {(0,0,0),(22.62047,40.3937,0),(23.81102,42.51969,2.12598),(23.81102,42.51969,4.251961)}, {(0,0,0),(0,40.3937,0),(0,42.51969,2.12598),(0,42.51969,4.251961)} - }, - { + }, + { {(0,0,0),(0,40.3937,0),(0,42.51969,2.12598),(0,42.51969,4.251961)}, {(0,0,0),(-22.62047,40.3937,0),(-23.81102,42.51969,2.12598),(-23.81102,42.51969,4.251961)}, {(0,0,0),(-40.3937,22.62047,0),(-42.51969,23.81102,2.12598),(-42.51969,23.81102,4.251961)}, {(0,0,0),(-40.3937,0,0),(-42.51969,0,2.12598),(-42.51969,0,4.251961)} - }, - { + }, + { {(0,0,0),(-40.3937,0,0),(-42.51969,0,2.12598),(-42.51969,0,4.251961)}, {(0,0,0),(-40.3937,-22.62047,0),(-42.51969,-23.81102,2.12598),(-42.51969,-23.81102,4.251961)}, {(0,0,0),(-22.62047,-40.3937,0),(-23.81102,-42.51969,2.12598),(-23.81102,-42.51969,4.251961)}, {(0,0,0),(0,-40.3937,0),(0,-42.51969,2.12598),(0,-42.51969,4.251961)} - }, - { + }, + { {(0,0,0),(0,-40.3937,0),(0,-42.51969,2.12598),(0,-42.51969,4.251961)}, {(0,0,0),(22.62047,-40.3937,0),(23.81102,-42.51969,2.12598),(23.81102,-42.51969,4.251961)}, {(0,0,0),(40.3937,-22.62047,0),(42.51969,-23.81102,2.12598),(42.51969,-23.81102,4.251961)}, {(0,0,0),(40.3937,0,0),(42.51969,0,2.12598),(42.51969,0,4.251961)} - } - }; + } +}; + +surface regularize(triple[][] P, real fraction=0.02) +{ + triple[][][] B=hsplit(P,fraction); + triple[][] T=B[0]; + surface s=surface(T[0][0]..controls T[0][1] and T[0][2].. + T[0][3]..controls T[1][3] and T[2][3].. + T[3][3]..controls T[3][2] and T[3][1]..cycle); + s.append(surface(patch(B[1]))); + return s; +} + +surface S=surface(Q); +for(triple[][] q : Q0) + S.append(regularize(q)); + +pen color; +real metallic; + +if(settings.ibl) { + color=white; + metallic=1; +} else { + color=blue; + metallic=0; +} -draw(surface(Q),material(blue, shininess=0.85, metallic=0),render(compression=Low)); +draw(S,material(color,shininess=0.85,metallic=metallic), + render(compression=Single)); diff --git a/Master/texmf-dist/doc/asymptote/examples/teapotIBL.asy b/Master/texmf-dist/doc/asymptote/examples/teapotIBL.asy new file mode 100644 index 00000000000..bd6afe31102 --- /dev/null +++ b/Master/texmf-dist/doc/asymptote/examples/teapotIBL.asy @@ -0,0 +1,2 @@ +settings.ibl=true; +import teapot; diff --git a/Master/texmf-dist/doc/asymptote/examples/transparency.asy b/Master/texmf-dist/doc/asymptote/examples/transparency.asy index 36e741d294d..a01a87a4545 100644 --- a/Master/texmf-dist/doc/asymptote/examples/transparency.asy +++ b/Master/texmf-dist/doc/asymptote/examples/transparency.asy @@ -1,8 +1,5 @@ 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)); diff --git a/Master/texmf-dist/doc/asymptote/examples/twoSpheres.asy b/Master/texmf-dist/doc/asymptote/examples/twoSpheres.asy new file mode 100644 index 00000000000..c043ae37315 --- /dev/null +++ b/Master/texmf-dist/doc/asymptote/examples/twoSpheres.asy @@ -0,0 +1,17 @@ +import three; +import palette; + +size(20cm); + +currentprojection=orthographic(1,1,1); + +draw(box((-2,-2,-1),(2,2,1))); + +draw(shift(-Z)*surface(box((-2,-2),(2,2))),blue); +draw(shift(Z)*surface(box((-2,-2),(2,2))),orange+opacity(0.5)); + +surface s=unitsphere; +s.colors(palette(s.map(zpart),Gradient(green+opacity(0.6),white, + green+opacity(0.6)))); +draw(shift(0.5X+0.5Y)*s); +draw(shift(-0.5X-0.5Y)*s); diff --git a/Master/texmf-dist/doc/asymptote/examples/workcone.asy b/Master/texmf-dist/doc/asymptote/examples/workcone.asy index 594758bba64..da7629c773d 100644 --- a/Master/texmf-dist/doc/asymptote/examples/workcone.asy +++ b/Master/texmf-dist/doc/asymptote/examples/workcone.asy @@ -20,7 +20,7 @@ render render=render(compression=0,merge=true); draw(scale(x1,x1,-s1)*shift(-Z)*unitcone,lightblue+opacity(0.5),render); -path3 p=(x2,0,s2)--(x,0,s+0.005); +path3 p=(x2,0,s2)--(x,0,s); revolution a=revolution(p,Z); draw(surface(a),lightblue+opacity(0.5),render); |