summaryrefslogtreecommitdiff
path: root/graphics/asymptote/examples
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-12-28 03:01:00 +0000
committerNorbert Preining <norbert@preining.info>2021-12-28 03:01:00 +0000
commitecdf859b6ce481abfd530425dcf6f0f764bd0001 (patch)
tree13bc161dc046876ac6c92fce5f9f5034ba9aa573 /graphics/asymptote/examples
parent790995b7e79697514364450bf9c04f1b8d500838 (diff)
CTAN sync 202112280300
Diffstat (limited to 'graphics/asymptote/examples')
-rw-r--r--graphics/asymptote/examples/1overx.asy9
-rw-r--r--graphics/asymptote/examples/NURBSsurface.asy2
-rw-r--r--graphics/asymptote/examples/alignedaxis.asy2
-rw-r--r--graphics/asymptote/examples/layers.asy2
-rw-r--r--graphics/asymptote/examples/markregular.asy4
-rw-r--r--graphics/asymptote/examples/orthocenter.asy3
-rw-r--r--graphics/asymptote/examples/spectrum.asy2
-rw-r--r--graphics/asymptote/examples/strokepath.asy1
-rw-r--r--graphics/asymptote/examples/teapot.asy196
-rw-r--r--graphics/asymptote/examples/teapotIBL.asy2
-rw-r--r--graphics/asymptote/examples/transparency.asy3
-rw-r--r--graphics/asymptote/examples/workcone.asy2
12 files changed, 124 insertions, 104 deletions
diff --git a/graphics/asymptote/examples/1overx.asy b/graphics/asymptote/examples/1overx.asy
index 9bbbf282ac..dfaa049efb 100644
--- a/graphics/asymptote/examples/1overx.asy
+++ b/graphics/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/graphics/asymptote/examples/NURBSsurface.asy b/graphics/asymptote/examples/NURBSsurface.asy
index 4bfafefbc3..c537e5df15 100644
--- a/graphics/asymptote/examples/NURBSsurface.asy
+++ b/graphics/asymptote/examples/NURBSsurface.asy
@@ -59,7 +59,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/graphics/asymptote/examples/alignedaxis.asy b/graphics/asymptote/examples/alignedaxis.asy
index 542dcb9bc6..d32c389a74 100644
--- a/graphics/asymptote/examples/alignedaxis.asy
+++ b/graphics/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/graphics/asymptote/examples/layers.asy b/graphics/asymptote/examples/layers.asy
index 4fe745f6a3..3d80b31fb7 100644
--- a/graphics/asymptote/examples/layers.asy
+++ b/graphics/asymptote/examples/layers.asy
@@ -1,4 +1,4 @@
-usepackage("ocg");
+usepackage("ocgx2");
settings.tex="pdflatex";
size(0,150);
diff --git a/graphics/asymptote/examples/markregular.asy b/graphics/asymptote/examples/markregular.asy
index ea08b95223..8c3a51040b 100644
--- a/graphics/asymptote/examples/markregular.asy
+++ b/graphics/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/graphics/asymptote/examples/orthocenter.asy b/graphics/asymptote/examples/orthocenter.asy
index a7caaf1412..69ae5376b5 100644
--- a/graphics/asymptote/examples/orthocenter.asy
+++ b/graphics/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/graphics/asymptote/examples/spectrum.asy b/graphics/asymptote/examples/spectrum.asy
index 95c5f8a0d1..c6837ec781 100644
--- a/graphics/asymptote/examples/spectrum.asy
+++ b/graphics/asymptote/examples/spectrum.asy
@@ -1,5 +1,5 @@
import graph;
-usepackage("ocg");
+usepackage("ocgx2");
settings.tex="pdflatex";
// Dan Bruton algorithm
diff --git a/graphics/asymptote/examples/strokepath.asy b/graphics/asymptote/examples/strokepath.asy
index c857150ec5..5e5b2b9a96 100644
--- a/graphics/asymptote/examples/strokepath.asy
+++ b/graphics/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/graphics/asymptote/examples/teapot.asy b/graphics/asymptote/examples/teapot.asy
index f3328151fd..847ffd234d 100644
--- a/graphics/asymptote/examples/teapot.asy
+++ b/graphics/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/graphics/asymptote/examples/teapotIBL.asy b/graphics/asymptote/examples/teapotIBL.asy
new file mode 100644
index 0000000000..bd6afe3110
--- /dev/null
+++ b/graphics/asymptote/examples/teapotIBL.asy
@@ -0,0 +1,2 @@
+settings.ibl=true;
+import teapot;
diff --git a/graphics/asymptote/examples/transparency.asy b/graphics/asymptote/examples/transparency.asy
index 36e741d294..a01a87a454 100644
--- a/graphics/asymptote/examples/transparency.asy
+++ b/graphics/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/graphics/asymptote/examples/workcone.asy b/graphics/asymptote/examples/workcone.asy
index 594758bba6..da7629c773 100644
--- a/graphics/asymptote/examples/workcone.asy
+++ b/graphics/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);