summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/asymptote
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-04-06 15:21:10 +0000
committerKarl Berry <karl@freefriends.org>2018-04-06 15:21:10 +0000
commitf43901a2e69137a91d953d854976bf91dc5905a5 (patch)
treef68c911b3d3e61ea5d343b2144c07e3f82d0b2b5 /Master/texmf-dist/doc/asymptote
parent02985bccb92d6c159bbcd4621c92edb0dedb263b (diff)
asymptote 2.43
git-svn-id: svn://tug.org/texlive/trunk@47325 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/asymptote')
-rw-r--r--Master/texmf-dist/doc/asymptote/CAD.pdfbin67517 -> 66745 bytes
-rw-r--r--Master/texmf-dist/doc/asymptote/TeXShopAndAsymptote.pdfbin31416 -> 32019 bytes
-rw-r--r--Master/texmf-dist/doc/asymptote/asy-latex.pdfbin194549 -> 194542 bytes
-rw-r--r--Master/texmf-dist/doc/asymptote/asyRefCard.pdfbin53677 -> 54839 bytes
-rw-r--r--Master/texmf-dist/doc/asymptote/asymptote.pdfbin1295140 -> 1288339 bytes
-rw-r--r--Master/texmf-dist/doc/asymptote/examples/linearregression.asy64
-rw-r--r--Master/texmf-dist/doc/asymptote/examples/venn.asy1
7 files changed, 64 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/asymptote/CAD.pdf b/Master/texmf-dist/doc/asymptote/CAD.pdf
index 30932b86142..f8e5c47ba57 100644
--- a/Master/texmf-dist/doc/asymptote/CAD.pdf
+++ b/Master/texmf-dist/doc/asymptote/CAD.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/asymptote/TeXShopAndAsymptote.pdf b/Master/texmf-dist/doc/asymptote/TeXShopAndAsymptote.pdf
index 1f5a1b68f65..61994b71e30 100644
--- a/Master/texmf-dist/doc/asymptote/TeXShopAndAsymptote.pdf
+++ b/Master/texmf-dist/doc/asymptote/TeXShopAndAsymptote.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/asymptote/asy-latex.pdf b/Master/texmf-dist/doc/asymptote/asy-latex.pdf
index a4175f6eefb..335a0be9f3a 100644
--- a/Master/texmf-dist/doc/asymptote/asy-latex.pdf
+++ b/Master/texmf-dist/doc/asymptote/asy-latex.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/asymptote/asyRefCard.pdf b/Master/texmf-dist/doc/asymptote/asyRefCard.pdf
index 208c4eedc18..8a7d6609281 100644
--- a/Master/texmf-dist/doc/asymptote/asyRefCard.pdf
+++ b/Master/texmf-dist/doc/asymptote/asyRefCard.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/asymptote/asymptote.pdf b/Master/texmf-dist/doc/asymptote/asymptote.pdf
index 49d678f6514..27a38e6c33a 100644
--- a/Master/texmf-dist/doc/asymptote/asymptote.pdf
+++ b/Master/texmf-dist/doc/asymptote/asymptote.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/asymptote/examples/linearregression.asy b/Master/texmf-dist/doc/asymptote/examples/linearregression.asy
new file mode 100644
index 00000000000..a1cc6ff6bcb
--- /dev/null
+++ b/Master/texmf-dist/doc/asymptote/examples/linearregression.asy
@@ -0,0 +1,64 @@
+import graph3;
+import math; // for the leastsquares routine
+
+Billboard.targetsize = true; // Perspective should not affect the labels.
+currentprojection = perspective(60 * (5, 2, 3));
+
+file duncan = input("linearregression.dat");
+
+string headers = duncan;
+
+real[][] independentvars;
+real[] dependentvars;
+
+while (!eof(duncan)) {
+ string line = duncan;
+ string[] entries = split(line);
+ if (entries.length < 5) continue;
+ string type = entries[1];
+ real income = (real)(entries[2]);
+ real education = (real)(entries[3]);
+ real prestige = (real)(entries[4]);
+
+ // include 1.0 for the residue
+ independentvars.push(new real[] {income, education, 1.0});
+ dependentvars.push(prestige);
+}
+
+real[] coeffs = leastsquares(independentvars, dependentvars, warn=false);
+if (coeffs.length == 0) {
+ abort("Unable to find regression: independent variables are "
+ + "linearly dependent.");
+}
+
+real f(pair xy) {
+ return coeffs[0] * xy.x // income
+ + coeffs[1] * xy.y // education
+ + coeffs[2]; // residue
+}
+
+real xmin = infinity, xmax = -infinity, ymin = infinity, ymax = -infinity;
+for (real[] row : independentvars) {
+ if (row[0] < xmin) xmin = row[0];
+ if (row[0] > xmax) xmax = row[0];
+ if (row[1] < ymin) ymin = row[1];
+ if (row[1] > ymax) ymax = row[1];
+}
+
+// Draw the plane
+draw(surface(f, (xmin, ymin), (xmax, ymax)),
+ surfacepen=emissive(blue + opacity(0.6)),
+ meshpen = blue);
+
+for (int ii = 0; ii < independentvars.length; ++ii) {
+ triple pt = (independentvars[ii][0], independentvars[ii][1],
+ dependentvars[ii]);
+ draw(shift(pt) * unitsphere, material(yellow, emissivepen=0.2*yellow));
+ real z = f((pt.x, pt.y));
+ if (pt.z > z) draw (pt -- (pt.x, pt.y, z), green);
+ else draw(pt -- (pt.x, pt.y, z), red);
+}
+
+xaxis3("income", Bounds(Min, Min), InTicks);
+yaxis3("education", Bounds(Min, Min), InTicks);
+zaxis3("prestige", Bounds(Min, Min), InTicks);
diff --git a/Master/texmf-dist/doc/asymptote/examples/venn.asy b/Master/texmf-dist/doc/asymptote/examples/venn.asy
index f56440ba0a4..33100a72e87 100644
--- a/Master/texmf-dist/doc/asymptote/examples/venn.asy
+++ b/Master/texmf-dist/doc/asymptote/examples/venn.asy
@@ -34,4 +34,3 @@ draw(z--z1,Arrow,Margin(0,m));
draw(z--z2,Arrow,Margin(0,m));
shipout(bbox(0.25cm));
-currentpicture.uptodate=true;