summaryrefslogtreecommitdiff
path: root/graphics/asymptote/examples
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-07-08 03:01:45 +0000
committerNorbert Preining <norbert@preining.info>2020-07-08 03:01:45 +0000
commit8c3fedd243b69349b426144e5e2b94ef4aea6a4c (patch)
treef5842753f11a90141f3cc2e356c3a04766e8d81e /graphics/asymptote/examples
parentef87f13c4503a2aa4a9098cbf33e0bfcad19008e (diff)
CTAN sync 202007080301
Diffstat (limited to 'graphics/asymptote/examples')
-rw-r--r--graphics/asymptote/examples/Gouraud.asy2
-rw-r--r--graphics/asymptote/examples/axialshade.asy5
-rw-r--r--graphics/asymptote/examples/logo3.asy2
-rw-r--r--graphics/asymptote/examples/soccerball.asy1
-rw-r--r--graphics/asymptote/examples/unitoctant.asy41
-rw-r--r--graphics/asymptote/examples/unitoctantx.asy35
6 files changed, 58 insertions, 28 deletions
diff --git a/graphics/asymptote/examples/Gouraud.asy b/graphics/asymptote/examples/Gouraud.asy
index d49813e5e6..7df039e04c 100644
--- a/graphics/asymptote/examples/Gouraud.asy
+++ b/graphics/asymptote/examples/Gouraud.asy
@@ -1,6 +1,6 @@
size(200);
-pen[] p={red,green,blue,magenta};
+pen[] p={red,green,blue,yellow};
pair[] z={(-1,0),(0,0),(0,1),(1,0)};
int[] edges={0,0,0,1};
gouraudshade(z[0]--z[2]--z[3]--cycle,p,z,edges);
diff --git a/graphics/asymptote/examples/axialshade.asy b/graphics/asymptote/examples/axialshade.asy
new file mode 100644
index 0000000000..97977b2aea
--- /dev/null
+++ b/graphics/asymptote/examples/axialshade.asy
@@ -0,0 +1,5 @@
+size(0,100);
+
+axialshade(unitsquare,red,(0,0),blue,(1,1));
+
+
diff --git a/graphics/asymptote/examples/logo3.asy b/graphics/asymptote/examples/logo3.asy
index c7947f1c41..d510e9afb7 100644
--- a/graphics/asymptote/examples/logo3.asy
+++ b/graphics/asymptote/examples/logo3.asy
@@ -3,7 +3,7 @@ import three;
//size(105,50,IgnoreAspect);
size(560,320,IgnoreAspect); // Fullsize
size3(140,80,15);
-currentprojection=perspective(-2,20,10,up=Y);
+currentprojection=perspective(-2,30,10,up=Y);
currentlight=White;
viewportmargin=(0,10);
diff --git a/graphics/asymptote/examples/soccerball.asy b/graphics/asymptote/examples/soccerball.asy
index 5cf0f01505..4612769833 100644
--- a/graphics/asymptote/examples/soccerball.asy
+++ b/graphics/asymptote/examples/soccerball.asy
@@ -1,6 +1,7 @@
import graph3;
size(400);
currentlight.background=palegreen;
+settings.digits=15;
defaultrender=render(compression=Zero,merge=true);
diff --git a/graphics/asymptote/examples/unitoctant.asy b/graphics/asymptote/examples/unitoctant.asy
index e84fdd537c..967f1a6123 100644
--- a/graphics/asymptote/examples/unitoctant.asy
+++ b/graphics/asymptote/examples/unitoctant.asy
@@ -1,35 +1,24 @@
import graph3;
-currentprojection=orthographic(5,4,2);
+currentprojection=orthographic(5,5,8);
size(0,150);
-patch s=octant1x;
-draw(surface(s),green+opacity(0.5));
-draw(s.external(),blue);
+patch s0=octant1.s[0];
+patch s1=octant1.s[1];
+draw(surface(s0),green+opacity(0.5));
+draw(surface(s1),green+opacity(0.5));
+draw(s0.external(),blue);
+draw(s1.external(),blue);
-triple[][] P=s.P;
+triple[][] P0=s0.P;
+triple[][] P1=s1.P;
for(int i=0; i < 4; ++i)
- dot(P[i],red);
+ dot(P0[i],red+0.75mm);
+
+for(int i=0; i < 4; ++i)
+ dot(P1[i],red+0.65mm);
axes3("$x$","$y$",Label("$z$",align=Z));
-triple P00=P[0][0];
-triple P10=P[1][0];
-triple P01=P[0][1];
-triple P02=P[0][2];
-triple P11=P[1][1];
-triple P12=P[1][2];
-triple Q11=XYplane(xypart(P11));
-triple Q12=XYplane(xypart(P12));
-
-draw(P11--Q11,dashed);
-draw(P12--Q12,dashed);
-draw(O--Q12--Q11--(Q11.x,0,0));
-draw(Q12--(Q12.x,0,0));
-
-label("$(1,0,0)$",P00,-2Y);
-label("$(1,a,0)$",P10,-Z);
-label("$(1,0,a)$",P01,-2Y);
-label("$(a,0,1)$",P02,Z+X-Y);
-label("$(1,a,a)$",P11,3X);
-label("$(a,a^2,1)$",P12,7X+Y);
+
+
diff --git a/graphics/asymptote/examples/unitoctantx.asy b/graphics/asymptote/examples/unitoctantx.asy
new file mode 100644
index 0000000000..e84fdd537c
--- /dev/null
+++ b/graphics/asymptote/examples/unitoctantx.asy
@@ -0,0 +1,35 @@
+import graph3;
+
+currentprojection=orthographic(5,4,2);
+
+size(0,150);
+patch s=octant1x;
+draw(surface(s),green+opacity(0.5));
+draw(s.external(),blue);
+
+triple[][] P=s.P;
+
+for(int i=0; i < 4; ++i)
+ dot(P[i],red);
+
+axes3("$x$","$y$",Label("$z$",align=Z));
+triple P00=P[0][0];
+triple P10=P[1][0];
+triple P01=P[0][1];
+triple P02=P[0][2];
+triple P11=P[1][1];
+triple P12=P[1][2];
+triple Q11=XYplane(xypart(P11));
+triple Q12=XYplane(xypart(P12));
+
+draw(P11--Q11,dashed);
+draw(P12--Q12,dashed);
+draw(O--Q12--Q11--(Q11.x,0,0));
+draw(Q12--(Q12.x,0,0));
+
+label("$(1,0,0)$",P00,-2Y);
+label("$(1,a,0)$",P10,-Z);
+label("$(1,0,a)$",P01,-2Y);
+label("$(a,0,1)$",P02,Z+X-Y);
+label("$(1,a,a)$",P11,3X);
+label("$(a,a^2,1)$",P12,7X+Y);