summaryrefslogtreecommitdiff
path: root/Master/texmf/doc/asymptote
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-07-14 01:03:58 +0000
committerKarl Berry <karl@freefriends.org>2010-07-14 01:03:58 +0000
commit9633c5b1a6efafff942ac83e4ebc2a8d823ad6e7 (patch)
tree0c5e06769f2324a867df8211d8f43c84118d569f /Master/texmf/doc/asymptote
parent44e84d62c431623c767bd62f61ff4a102dea720b (diff)
asymptote 2.02
git-svn-id: svn://tug.org/texlive/trunk@19435 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf/doc/asymptote')
-rw-r--r--Master/texmf/doc/asymptote/CAD.pdfbin67395 -> 67565 bytes
-rw-r--r--Master/texmf/doc/asymptote/asymptote.pdfbin1553892 -> 1705483 bytes
-rw-r--r--Master/texmf/doc/asymptote/examples/animations/inlinemovie.tex6
-rw-r--r--Master/texmf/doc/asymptote/examples/animations/inlinemovie3.tex6
-rw-r--r--Master/texmf/doc/asymptote/examples/cards.asy26
-rw-r--r--Master/texmf/doc/asymptote/examples/externalprc.tex4
-rw-r--r--Master/texmf/doc/asymptote/examples/intro.asy8
-rw-r--r--Master/texmf/doc/asymptote/examples/latexusage-1.asy55
-rw-r--r--Master/texmf/doc/asymptote/examples/latexusage-2.asy23
-rw-r--r--Master/texmf/doc/asymptote/examples/latexusage-3.asy38
-rw-r--r--Master/texmf/doc/asymptote/examples/latexusage.tex20
-rw-r--r--Master/texmf/doc/asymptote/examples/slidemovies.asy46
-rw-r--r--Master/texmf/doc/asymptote/examples/washermethod.asy13
13 files changed, 63 insertions, 182 deletions
diff --git a/Master/texmf/doc/asymptote/CAD.pdf b/Master/texmf/doc/asymptote/CAD.pdf
index 327f2ff3b0b..59b899d3388 100644
--- a/Master/texmf/doc/asymptote/CAD.pdf
+++ b/Master/texmf/doc/asymptote/CAD.pdf
Binary files differ
diff --git a/Master/texmf/doc/asymptote/asymptote.pdf b/Master/texmf/doc/asymptote/asymptote.pdf
index d4a834d8dde..d480d1c6d84 100644
--- a/Master/texmf/doc/asymptote/asymptote.pdf
+++ b/Master/texmf/doc/asymptote/asymptote.pdf
Binary files differ
diff --git a/Master/texmf/doc/asymptote/examples/animations/inlinemovie.tex b/Master/texmf/doc/asymptote/examples/animations/inlinemovie.tex
index f3d9f5b0893..5f1eff9d4bb 100644
--- a/Master/texmf/doc/asymptote/examples/animations/inlinemovie.tex
+++ b/Master/texmf/doc/asymptote/examples/animations/inlinemovie.tex
@@ -7,9 +7,13 @@
Here is an inline PDF movie, generated with the commands
\begin{verbatim}
pdflatex inlinemovie
-asy inlinemovie
+asy inlinemovie-*.asy
pdflatex inlinemovie
\end{verbatim}
+or equivalently,
+\begin{verbatim}
+latexmk -pdf inlinemovie
+\end{verbatim}
\begin{center}
\begin{asy}
diff --git a/Master/texmf/doc/asymptote/examples/animations/inlinemovie3.tex b/Master/texmf/doc/asymptote/examples/animations/inlinemovie3.tex
index 46779e85b28..5131c652a11 100644
--- a/Master/texmf/doc/asymptote/examples/animations/inlinemovie3.tex
+++ b/Master/texmf/doc/asymptote/examples/animations/inlinemovie3.tex
@@ -7,9 +7,13 @@
Here is an inline 3D PDF movie, generated with the commands
\begin{verbatim}
pdflatex inlinemovie3
-asy inlinemovie3
+asy inlinemovie3-*.asy
pdflatex inlinemovie3
\end{verbatim}
+or equivalently,
+\begin{verbatim}
+latexmk -pdf inlinemovie3
+\end{verbatim}
\begin{center}
\begin{asy}
diff --git a/Master/texmf/doc/asymptote/examples/cards.asy b/Master/texmf/doc/asymptote/examples/cards.asy
new file mode 100644
index 00000000000..337a886ec86
--- /dev/null
+++ b/Master/texmf/doc/asymptote/examples/cards.asy
@@ -0,0 +1,26 @@
+picture rect;
+
+size(rect,0,2.5cm);
+
+real x=1;
+real y=1.25;
+
+filldraw(rect,box((-x,-y)/2,(x,y)/2),lightolive);
+
+label(rect,"1",(-x,y)*0.45,SE);
+label(rect,"2",(x,y)*0.45,SW);
+label(rect,"3",(-x,-y)*0.45,NE);
+label(rect,"4",(x,-y)*0.45,NW);
+
+frame rectf=rect.fit();
+frame toplef=rectf;
+frame toprig=xscale(-1)*rectf;
+frame botlef=yscale(-1)*rectf;
+frame botrig=xscale(-1)*yscale(-1)*rectf;
+
+size(0,7.5cm);
+
+add(toplef,(-x,y));
+add(toprig,(x,y));
+add(botlef,(-x,-y));
+add(botrig,(x,-y));
diff --git a/Master/texmf/doc/asymptote/examples/externalprc.tex b/Master/texmf/doc/asymptote/examples/externalprc.tex
index 96643d7cebf..e6d4ade1dcf 100644
--- a/Master/texmf/doc/asymptote/examples/externalprc.tex
+++ b/Master/texmf/doc/asymptote/examples/externalprc.tex
@@ -5,8 +5,8 @@
% asy -inlineimage teapot -render=4 -tex pdflatex
%
\documentclass[12pt]{article}
-\input teapot_.pre
+\input teapot.pre
\RequirePackage{color,graphicx}
\begin{document}
-\input teapot_.tex
+\input teapot.tex
\end{document}
diff --git a/Master/texmf/doc/asymptote/examples/intro.asy b/Master/texmf/doc/asymptote/examples/intro.asy
index 20b03c578dc..5d7ce12b184 100644
--- a/Master/texmf/doc/asymptote/examples/intro.asy
+++ b/Master/texmf/doc/asymptote/examples/intro.asy
@@ -352,13 +352,9 @@ item("Having prescribed outgoing and incoming path directions $e^{i\theta}$
at node~$z_0$ and $e^{i\phi}$ at node $z_1$ relative to the
vector $z_1-z_0$, the control points are determined as:");
-skip(-3);
-
equations("u&=&z_0+e^{i\theta}(z_1-z_0)f(\theta,-\phi),\nonumber\\
v&=&z_1-e^{i\phi}(z_1-z_0)f(-\phi,\theta),");
-skip(-3);
-
remark("where the relative distance function $f(\theta,\phi)$ is given by Hobby [1986].");
asyfigure("Hobbycontrol","height=9cm");
@@ -376,9 +372,13 @@ equation("\displaystyle x(t)=\sum_{k=0}^3 B_k(t) P_k, \qquad t\in [0,1].");
item("The resulting curve is also a B\'ezier curve:");
+skip(-2);
+
equations("x'_i(t)&=&\sum_{k=0}^3 B_k(t) A_{ij}(P_k)_j+C_i\nonumber\\
&=&\sum_{k=0}^3 B_k(t) P'_k,");
+skip(-2);
+
remark("where $P'_k$ is the transformed $k^{\rm th}$ control point, noting
$\displaystyle\sum_{k=0}^3 B_k(t)=1.$");
}
diff --git a/Master/texmf/doc/asymptote/examples/latexusage-1.asy b/Master/texmf/doc/asymptote/examples/latexusage-1.asy
deleted file mode 100644
index 7f0d6a2b3aa..00000000000
--- a/Master/texmf/doc/asymptote/examples/latexusage-1.asy
+++ /dev/null
@@ -1,55 +0,0 @@
-if(!settings.multipleView)
- settings.batchView=false;
-defaultfilename="latexusage-1";
-if(settings.render < 0) settings.render=4;
-settings.inlineimage=true;
-settings.embed=true;
-settings.outformat="";
-settings.toolbar=false;
-viewportmargin=(2,2);
-
-// Global Asymptote definitions can be put here.
-import three;
-usepackage("bm");
-texpreamble("\def\V#1{\bm{#1}}");
-// One can globally override the default toolbar settings here:
-// settings.toolbar=true;
-
-size(4cm,0);
-pen colour1=red;
-pen colour2=green;
-
-pair z0=(0,0);
-pair z1=(-1,0);
-pair z2=(1,0);
-real r=1.5;
-path c1=circle(z1,r);
-path c2=circle(z2,r);
-fill(c1,colour1);
-fill(c2,colour2);
-
-picture intersection=new picture;
-fill(intersection,c1,colour1+colour2);
-clip(intersection,c2);
-
-add(intersection);
-
-draw(c1);
-draw(c2);
-
-//draw("$\A$",box,z1); // Requires [inline] package option.
-//draw(Label("$\B$","$B$"),box,z2); // Requires [inline] package option.
-draw("$A$",box,z1);
-draw("$\V{B}$",box,z2);
-
-pair z=(0,-2);
-real m=3;
-margin BigMargin=Margin(0,m*dot(unit(z1-z),unit(z0-z)));
-
-draw(Label("$A\cap B$",0),conj(z)--z0,Arrow,BigMargin);
-draw(Label("$A\cup B$",0),z--z0,Arrow,BigMargin);
-draw(z--z1,Arrow,Margin(0,m));
-draw(z--z2,Arrow,Margin(0,m));
-
-shipout(bbox(0.25cm));
-viewportsize=(390.0pt,0);
diff --git a/Master/texmf/doc/asymptote/examples/latexusage-2.asy b/Master/texmf/doc/asymptote/examples/latexusage-2.asy
deleted file mode 100644
index b91be72419f..00000000000
--- a/Master/texmf/doc/asymptote/examples/latexusage-2.asy
+++ /dev/null
@@ -1,23 +0,0 @@
-if(!settings.multipleView)
- settings.batchView=false;
-defaultfilename="latexusage-2";
-if(settings.render < 0) settings.render=4;
-settings.inlineimage=true;
-settings.embed=true;
-settings.outformat="";
-settings.toolbar=false;
-viewportmargin=(2,2);
-
-// Global Asymptote definitions can be put here.
-import three;
-usepackage("bm");
-texpreamble("\def\V#1{\bm{#1}}");
-// One can globally override the default toolbar settings here:
-// settings.toolbar=true;
-
-
-currentprojection=orthographic(5,4,2);
-draw(unitcube,blue);
-label("$V-E+F=2$",(0,1,0.5),3Y,blue+fontsize(17pt));
-size(0,4cm);
-viewportsize=(390.0pt,0);
diff --git a/Master/texmf/doc/asymptote/examples/latexusage-3.asy b/Master/texmf/doc/asymptote/examples/latexusage-3.asy
deleted file mode 100644
index d3990c9cbfb..00000000000
--- a/Master/texmf/doc/asymptote/examples/latexusage-3.asy
+++ /dev/null
@@ -1,38 +0,0 @@
-if(!settings.multipleView)
- settings.batchView=false;
-defaultfilename="latexusage-3";
-if(settings.render < 0) settings.render=4;
-settings.inlineimage=true;
-settings.embed=true;
-settings.outformat="";
-settings.toolbar=false;
-viewportmargin=(2,2);
-
-// Global Asymptote definitions can be put here.
-import three;
-usepackage("bm");
-texpreamble("\def\V#1{\bm{#1}}");
-// One can globally override the default toolbar settings here:
-// settings.toolbar=true;
-
-
-pair z0=(0,0);
-pair z1=(2,0);
-pair z2=(5,0);
-pair zf=z1+0.75*(z2-z1);
-
-draw(z1--z2);
-dot(z1,red+0.15cm);
-dot(z2,darkgreen+0.3cm);
-label("$m$",z1,1.2N,red);
-label("$M$",z2,1.5N,darkgreen);
-label("$\hat{\ }$",zf,0.2*S,fontsize(24pt)+blue);
-
-pair s=-0.2*I;
-draw("$x$",z0+s--z1+s,N,red,Arrows,Bars,PenMargins);
-s=-0.5*I;
-draw("$\bar{x}$",z0+s--zf+s,blue,Arrows,Bars,PenMargins);
-s=-0.95*I;
-draw("$X$",z0+s--z2+s,darkgreen,Arrows,Bars,PenMargins);
-size(390.0pt,0);
-viewportsize=(390.0pt,0);
diff --git a/Master/texmf/doc/asymptote/examples/latexusage.tex b/Master/texmf/doc/asymptote/examples/latexusage.tex
index 6324238f1a2..ae555a476bd 100644
--- a/Master/texmf/doc/asymptote/examples/latexusage.tex
+++ b/Master/texmf/doc/asymptote/examples/latexusage.tex
@@ -3,13 +3,16 @@
% Use this form to include EPS (latex) or PDF (pdflatex) files:
\usepackage{asymptote}
-% Use this form with latex or pdflatex to include inline LaTeX code:
+% Use this form with latex or pdflatex to include inline LaTeX code by default:
%\usepackage[inline]{asymptote}
+% Use this form with latex or pdflatex to create PDF attachments by default:
+%\usepackage[attach]{asymptote}
+
% Enable this line to support PDF hyperlinks:
-%\usepackage{hyperref}\hypersetup{setpagesize=false}
+%\usepackage{hyperref}\hypersetup{setpagesize=false,unicode}
-% Enable this line for PDF attachments with asy environment option attach=true:
+% Enable this line to support the attach option:
%\usepackage[dvips]{attachfile2}
\begin{document}
@@ -76,11 +79,12 @@ shipout(bbox(0.25cm));
Each graph is drawn in its own environment. One can specify the width
and height to \LaTeX\ explicitly. This 3D example can be viewed
interactively either with Adobe Reader or Asymptote's fast OpenGL-based
-renderer. It is often desirable to embed such files as annotated attachments;
-this requires the optional \verb+\usepackage{attachfile2}+ package and
-the \verb+{attach=true}+ option:
+renderer. To support {\tt latexmk}, 3D figures should specify
+\verb+inline=true+. It is sometimes desirable to embed 3D files as annotated
+attachments; this requires the optional \verb+\usepackage{attachfile2}+
+package and the \verb+attach=true+ option:
\begin{center}
-\begin{asy}[height=4cm,attach=false]
+\begin{asy}[height=4cm,inline=true,attach=false]
currentprojection=orthographic(5,4,2);
draw(unitcube,blue);
label("$V-E+F=2$",(0,1,0.5),3Y,blue+fontsize(17pt));
@@ -89,7 +93,7 @@ label("$V-E+F=2$",(0,1,0.5),3Y,blue+fontsize(17pt));
One can also scale the figure to the full line width:
\begin{center}
-\begin{asy}[width=\the\linewidth]
+\begin{asy}[width=\the\linewidth,inline=true]
pair z0=(0,0);
pair z1=(2,0);
pair z2=(5,0);
diff --git a/Master/texmf/doc/asymptote/examples/slidemovies.asy b/Master/texmf/doc/asymptote/examples/slidemovies.asy
deleted file mode 100644
index ec724cf3326..00000000000
--- a/Master/texmf/doc/asymptote/examples/slidemovies.asy
+++ /dev/null
@@ -1,46 +0,0 @@
-// Slide demo.
-// Command-line options to enable stepping and/or reverse video:
-// asy [-u stepping=true] [-u reverse=true] slidedemo
-
-orientation=Landscape;
-
-settings.tex="pdflatex";
-
-import slide;
-
-// Optional movie modules:
-import animate; // For portable embedded PDF movies
-import external; // For portable external movies
-import embed; // For non-portable embedded movies
-
-usersetting();
-
-titlepage("Slides with {\tt Asymptote}: Animations","John C. Bowman",
- "University of Alberta","\today","http://asymptote.sf.net");
-
-title("Embedded PDF movies (portable)");
-animation a=animation("A");
-animation b=animation("B");
-int n=20;
-for(int i=0; i < 2n; ++i) {
- picture pic;
- size(pic,100);
- draw(pic,shift(0,sin(pi/n*i))*unitsquare);
- a.add(pic);
- if(i < 1.5n) b.add(rotate(45)*pic);
-}
-display(a.pdf("autoplay,loop,controls"));
-display(b.pdf("controls"));
-
-title("External Movie (portable)");
-display(external.embed("animations/wheel.mpg",
- "poster,text=wheel.mpg,label=wheel.mpg",20cm,5.6cm));
-display(external.link("animations/wheel.mpg","Play","play"));
-
-title("Embedded Movie (not portable)");
-// Generated needed files if they don't already exist.
-asy("mpg","animations/wheel");
-display(embed.embed("animations/wheel.mpg",
- "poster,text=wheel.mpg,label=wheel.mpg",
- 20cm,5.6cm));
-display(embed.link("animations/wheel.mpg","Play","play"));
diff --git a/Master/texmf/doc/asymptote/examples/washermethod.asy b/Master/texmf/doc/asymptote/examples/washermethod.asy
index 9a18b871414..d86bf8cd4df 100644
--- a/Master/texmf/doc/asymptote/examples/washermethod.asy
+++ b/Master/texmf/doc/asymptote/examples/washermethod.asy
@@ -12,9 +12,14 @@ pair F(real x) {return (x,f(x));}
triple F3(real x) {return (x,f(x),0);}
ngraph=12;
-path[] p={graph(F,0.7476,1.8043,Spline)--cycle,
- graph(F,0.7,0.7476,Spline)--graph(F,1.7787,1.8043,Spline)--cycle,
- graph(F,0,0.7,Spline)--graph(F,1.8043,2,Spline)--cycle};
+
+real x1=0.7476;
+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,0.7,Spline)--graph(F,x3,2,Spline)};
pen[] pn=new pen[] {color1,color2,color1};
@@ -24,7 +29,7 @@ for(int i=0; i < p.length; ++i) {
revolution a=revolution(path3(p[i]),Y,0,alpha);
draw(surface(a),pn[i],render);
- surface s=surface(p[i]);
+ surface s=surface(p[i]--cycle);
draw(s,pn[i],render);
draw(rotate(alpha,Y)*s,pn[i],render);
}