summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/doc
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-05-18 23:33:08 +0000
committerKarl Berry <karl@freefriends.org>2009-05-18 23:33:08 +0000
commit0a3a4a0193ef03921995cac67f8c91c6e352d059 (patch)
tree4fd204ddd01ff808c75e91ce290a9b28a1e90696 /Build/source/utils/asymptote/doc
parent7c769b8e95cd5bd87da30c618e5198d6d12461e1 (diff)
asymptote 1.73
git-svn-id: svn://tug.org/texlive/trunk@13217 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/doc')
-rw-r--r--Build/source/utils/asymptote/doc/FAQ/asy-faq.bfnn11
-rw-r--r--Build/source/utils/asymptote/doc/asymptote.texi90
-rw-r--r--Build/source/utils/asymptote/doc/flowchartdemo.asy4
3 files changed, 64 insertions, 41 deletions
diff --git a/Build/source/utils/asymptote/doc/FAQ/asy-faq.bfnn b/Build/source/utils/asymptote/doc/FAQ/asy-faq.bfnn
index a3095732cfd..ce582954dda 100644
--- a/Build/source/utils/asymptote/doc/FAQ/asy-faq.bfnn
+++ b/Build/source/utils/asymptote/doc/FAQ/asy-faq.bfnn
@@ -829,12 +829,13 @@ yaxis("$y$",RightTicks);
\question 27jun:functioncolor How can I fill a path with a function that defines the color of each location?
-General function shading is only supported by PDF, not PostScript, so this
-will have to wait until we produce PDF code directly.
+Use \courier{functionshade\} with a PDF tex engine, as illustrated
+by the example {functionshading.asy}.
-An approximate solution for now would be to superimpose a fine grid and
-specify colors to latticeshade depending on position as a single pen[][]
-lattice. Or use Gouraud shading.
+If you want to produce PostScript output, an approximate solution for now
+would be to superimpose a fine grid and specify colors to
+\courier{latticeshade\} that depend on position as a single pen[][]
+lattice. Alternatively, it may be more efficient to use \courier{tensorshade}.
\question 27jun:nonexplicitfun Is there a way to draw a function that is not explicitly given, such as (y - 2)^2 = x - 1 ?
diff --git a/Build/source/utils/asymptote/doc/asymptote.texi b/Build/source/utils/asymptote/doc/asymptote.texi
index 46043c85867..2c4872fd8e7 100644
--- a/Build/source/utils/asymptote/doc/asymptote.texi
+++ b/Build/source/utils/asymptote/doc/asymptote.texi
@@ -1772,15 +1772,16 @@ length(z);
@end example
returns the result 5. A synonym for @code{length(pair)} is @code{abs(pair)};
-@item real angle(pair z)
+@item real angle(pair z, bool warn=true)
@cindex @code{angle}
returns the angle of @code{z} in radians in the interval
-[-@code{pi},@code{pi}];
+[-@code{pi},@code{pi}] or @code{0} if @code{warn} is @code{false} and
+@code{z=(0,0)} (rather than producing an error);
@item real degrees(pair z, bool warn=true)
@cindex @code{degrees}
returns the angle of @code{z} in degrees in the interval [0,360)
-or @code{0} if @code{warn} is @code{false} and @code{z.x=z.y=0} (rather than
+or @code{0} if @code{warn} is @code{false} and @code{z=(0,0)} (rather than
producing an error);
@item pair unit(pair z)
@@ -1835,25 +1836,33 @@ Here are the built-in functions for triples:
returns the length @code{|v|} of the vector @code{v}.
A synonym for @code{length(triple)} is @code{abs(triple)};
-@item real polar(triple v)
+@item real polar(triple v, bool warn=true)
@cindex @code{polar}
-returns the colatitude of @code{v} measured from the @math{z} axis in radians;
+returns the colatitude of @code{v} measured from the @math{z} axis in radians
+or @code{0} if @code{warn} is @code{false} and @code{v=O} (rather than
+producing an error);
-@item real azimuth(triple v)
+@item real azimuth(triple v, bool warn=true)
@cindex @code{azimuth}
-returns the longitude of @code{v} measured from the @math{x} axis in radians;
+returns the longitude of @code{v} measured from the @math{x} axis in radians
+or @code{0} if @code{warn} is @code{false} and @code{v.x=v.y=0} (rather than
+producing an error);
-@item real colatitude(triple v)
+@item real colatitude(triple v, bool warn=true)
@cindex @code{colatitude}
-returns the colatitude of @code{v} measured from the @math{z} axis in degrees;
+returns the colatitude of @code{v} measured from the @math{z} axis in degrees
+or @code{0} if @code{warn} is @code{false} and @code{v=O} (rather than
+producing an error);
-@item real latitude(triple v)
+@item real latitude(triple v, bool warn=true)
@cindex @code{latitude}
-returns the latitude of @code{v} measured from the @math{xy} plane in degrees;
+returns the latitude of @code{v} measured from the @math{xy} plane in degrees
+or @code{0} if @code{warn} is @code{false} and @code{v=O} (rather than
+producing an error);
@item real longitude(triple v, bool warn=true)
@cindex @code{longitude}
-returns the longitude of @code{v} measured from the @math{x} axis in degrees;
+returns the longitude of @code{v} measured from the @math{x} axis in degrees
or @code{0} if @code{warn} is @code{false} and @code{v.x=v.y=0} (rather than
producing an error);
@@ -3213,16 +3222,18 @@ by calling the @code{shipout} function:
@anchor{shipout}
@cindex @code{shipout}
@verbatim
-void shipout(string prefix=defaultfilename, picture pic,
- orientation orientation=orientation,
- string format="", bool wait=false, bool view=true);
-void shipout(string prefix=defaultfilename,
+void shipout(string prefix=defaultfilename, picture pic=currentpicture,
orientation orientation=orientation,
- string format="", bool wait=false, bool view=true);
+ string format="", bool wait=false, bool view=true,
+ string options="", string script="",
+ projection P=currentprojection);
@end verbatim
@noindent
The default output format, @code{PostScript}, may be changed
with the @code{-f} or @code{-tex} command-line options.
+The @code{options}, @code{script}, and @code{projection} parameters
+are only relevant for 3D pictures.
+
A @code{shipout()} command is added implicitly at file exit if no
previous @code{shipout} commands have been executed.
@cindex @code{orientation}
@@ -5988,11 +5999,11 @@ interpolation in @code{Asymptote}, as illustrated in the example
This module, written by Philippe Ivaldi, provides an extensive set of
geometry routines, including @code{perpendicular} symbols and a @code{triangle}
structure. It is documented here:
-@url{http://piprim.tuxfamily.org/asymptote/geometry_en.pdf},
+@url{http://asymptote.sourceforge.net/geometry_en.pdf},
including an extensive set of examples,
-@url{http://piprim.tuxfamily.org/asymptote/travaux/}, and an index:
+@url{http://piprim.tuxfamily.org/asymptote/geometry/index.html}, and an index:
@quotation
-@url{http://piprim.tuxfamily.org/asymptote/travaux/modules/geometry_dev.asy.index.type.html}
+@url{http://piprim.tuxfamily.org/asymptote/geometry/modules/geometry.asy.index.type.html}
@end quotation
@node trembling
@@ -6001,7 +6012,7 @@ including an extensive set of examples,
This module, written by Philippe Ivaldi and illustrated in the example
@code{floatingdisk.asy}, allows one to draw wavy lines, as if drawn by
hand. Further examples are posted at
-@url{http://piprim.tuxfamily.org/asymptote/modules}
+@url{http://piprim.tuxfamily.org/asymptote/trembling/index.html}
@node stats
@section @code{stats}
@@ -7103,9 +7114,10 @@ as illustrated in this simple example of a flow field:
@cindex @code{vectorfield}
@verbatim
picture vectorfield(path vector(pair), pair a, pair b,
- int nx=nmesh, int ny=nx,
- bool autoscale=true, bool truesize=false,
- pen p=currentpen, arrowbar arrow=Arrow);
+ int nx=nmesh, int ny=nx, bool truesize=false,
+ real maxlength=truesize ? 0 : maxlength(a,b,nx,ny),
+ bool cond(pair z)=null, pen p=currentpen,
+ arrowbar arrow=Arrow, margin margin=PenMargin)
@end verbatim
as illustrated in this example:
@verbatiminclude vectorfield.asy
@@ -7652,25 +7664,22 @@ positive @math{y} axis is drawn at this angle in degrees.
@cindex @code{up}
@cindex @code{target}
@cindex @code{showtarget}
-@cindex @code{autoadjust}
@cindex @code{center}
-@item orthographic(triple camera, triple up=Z, triple target=O, @*@ @ @ @ @ @ @ @ @ @ @ @ @ bool showtarget=true, bool autoadjust=true, bool center=false)
+@item orthographic(triple camera, triple up=Z, triple target=O, @*@ @ @ @ @ @ @ @ @ @ @ @ @ bool showtarget=true, bool center=false)
This projects from three to two dimensions using the view as seen at a point
infinitely far away in the direction @code{unit(camera)}, orienting the camera
so that, if possible, the vector @code{up} points upwards. Parallel
lines are projected to parallel lines. The bounding volume is expanded
-to include @code{target} if @code{showtarget=true}. If @code{autoadjust=true},
-the camera will automatically be adjusted to lie outside the bounding volume
-for all possible interactive rotations about @code{target}.
+to include @code{target} if @code{showtarget=true}.
If @code{center=true}, the target will be adjusted to the center of the
bounding volume.
-@item orthographic(real x, real y, real z, triple up=Z, triple target=O, @*@ @ @ @ @ @ @ @ @ @ @ @ @ bool showtarget=true, bool autoadjust=true, bool center=false)
+@item orthographic(real x, real y, real z, triple up=Z, triple target=O, @*@ @ @ @ @ @ @ @ @ @ @ @ @ bool showtarget=true, bool center=false)
This is equivalent to
-@code{orthographic((x,y,z),up,target,showtarget,autoadjust,
-center)}.
+@code{orthographic((x,y,z),up,target,showtarget,center)}.
-@item perspective(triple camera, triple up=Z, triple target=O, @*@ @ @ @ @ @ @ @ @ @ @ @ bool showtarget=true, bool autoadjust=true, bool center=false)
+@cindex @code{autoadjust}
+@item perspective(triple camera, triple up=Z, triple target=O, @*@ @ @ @ @ @ @ @ @ @ @ @ bool showtarget=true, bool autoadjust=true, @*@ @ @ @ @ @ @ @ @ @ @ @ bool center=autoadjust)
@cindex @code{perspective}
@cindex @code{NURBS}
This projects from three to two dimensions, taking account of
@@ -7685,7 +7694,7 @@ for all possible interactive rotations about @code{target}.
If @code{center=true}, the target will be adjusted to the center of the
bounding volume.
-@item perspective(real x, real y, real z, triple up=Z, triple target=O, @*@ @ @ @ @ @ @ @ @ @ @ @ bool showtarget=true, bool autoadjust=true, bool center=false)
+@item perspective(real x, real y, real z, triple up=Z, triple target=O, @*@ @ @ @ @ @ @ @ @ @ @ @ bool showtarget=true, bool autoadjust=true, @*@ @ @ @ @ @ @ @ @ @ @ @ bool center=autoadjust)
This is equivalent to @code{perspective((x,y,z),up,target,showtarget,
autoadjust,center)}.
@end table
@@ -8055,6 +8064,19 @@ of a Gaussian surface:
A mesh can be drawn without surface filling by specifying @code{nullpen}
for the surfacepen.
+A vector field of @code{nu}@math{\times}@code{nv} arrows on a
+parametric surface @code{f} over @code{box(a,b)} can be drawn with the routine
+@cindex @code{vectorfield3}
+@verbatim
+picture vectorfield(path3 vector(pair v), triple f(pair z), pair a, pair b,
+ int nu=nmesh, int nv=nu, bool truesize=false,
+ real maxlength=truesize ? 0 : maxlength(f,a,b,nu,nv),
+ bool cond(pair z)=null, pen p=currentpen,
+ arrowbar3 arrow=Arrow3, margin3 margin=PenMargin3)
+@end verbatim
+as illustrated in the examples @code{vectorfield3.asy} and
+@code{vectorfieldsphere.asy}.
+
@node grid3
@section @code{grid3}
@cindex @code{grid3}
diff --git a/Build/source/utils/asymptote/doc/flowchartdemo.asy b/Build/source/utils/asymptote/doc/flowchartdemo.asy
index 74940d92f34..def70d0dd0f 100644
--- a/Build/source/utils/asymptote/doc/flowchartdemo.asy
+++ b/Build/source/utils/asymptote/doc/flowchartdemo.asy
@@ -19,9 +19,9 @@ draw(block5);
add(new void(picture pic, transform t) {
draw(pic,path(new pair[]{block1.right(t),block2.top(t)},Horizontal),
Arrow,PenMargin);
- draw(pic,Label("Yes",0.5),path(new pair[]{block2.left(t),block3.top(t)},
+ draw(pic,Label("Yes",0.5,NW),path(new pair[]{block2.left(t),block3.top(t)},
Horizontal),Arrow,PenMargin);
- draw(pic,Label("No",0.5,N),path(new pair[]{block2.right(t),block4.top(t)},
+ draw(pic,Label("No",0.5,NE),path(new pair[]{block2.right(t),block4.top(t)},
Horizontal),Arrow,PenMargin);
draw(pic,path(new pair[]{block3.bottom(t),block5.left(t)},Vertical),
Arrow,PenMargin);