summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
Diffstat (limited to 'Build')
-rw-r--r--Build/source/utils/README2
-rw-r--r--Build/source/utils/asymptote/ChangeLog336
-rw-r--r--Build/source/utils/asymptote/Makefile.in19
-rw-r--r--Build/source/utils/asymptote/ReleaseNotes35
-rw-r--r--Build/source/utils/asymptote/asy-keywords.el8
-rw-r--r--Build/source/utils/asymptote/asy.list516
-rw-r--r--Build/source/utils/asymptote/asymptote.spec2
-rw-r--r--Build/source/utils/asymptote/base/geometry.asy4
-rw-r--r--Build/source/utils/asymptote/base/ode.asy14
-rw-r--r--Build/source/utils/asymptote/base/palette.asy4
-rw-r--r--Build/source/utils/asymptote/base/plain_arrows.asy10
-rw-r--r--Build/source/utils/asymptote/base/slide.asy3
-rw-r--r--Build/source/utils/asymptote/base/smoothcontour3.asy1563
-rw-r--r--Build/source/utils/asymptote/base/three_surface.asy29
-rw-r--r--Build/source/utils/asymptote/base/three_tube.asy10
-rw-r--r--Build/source/utils/asymptote/base/trembling.asy27
-rw-r--r--Build/source/utils/asymptote/camp.tab.cc524
-rw-r--r--Build/source/utils/asymptote/camp.tab.h12
-rw-r--r--Build/source/utils/asymptote/config.guess760
-rw-r--r--Build/source/utils/asymptote/config.sub137
-rwxr-xr-xBuild/source/utils/asymptote/configure25
-rw-r--r--Build/source/utils/asymptote/configure.ac9
-rw-r--r--Build/source/utils/asymptote/doc/Bode.asy2
-rw-r--r--Build/source/utils/asymptote/doc/CAD.pdfbin67500 -> 67562 bytes
-rw-r--r--Build/source/utils/asymptote/doc/FAQ/asy-faq.info2
-rw-r--r--Build/source/utils/asymptote/doc/TeXShopAndAsymptote.pdfbin31527 -> 31481 bytes
-rw-r--r--Build/source/utils/asymptote/doc/asy-latex.dtx27
-rw-r--r--Build/source/utils/asymptote/doc/asy-latex.pdfbin194499 -> 194467 bytes
-rw-r--r--Build/source/utils/asymptote/doc/asy.13
-rw-r--r--Build/source/utils/asymptote/doc/asyRefCard.pdfbin53672 -> 53672 bytes
-rw-r--r--Build/source/utils/asymptote/doc/asymptote.pdfbin1272833 -> 1274426 bytes
-rw-r--r--Build/source/utils/asymptote/doc/asymptote.sty27
-rw-r--r--Build/source/utils/asymptote/doc/asymptote.texi119
-rw-r--r--Build/source/utils/asymptote/doc/latexusage.tex2
-rw-r--r--Build/source/utils/asymptote/doc/png/asymptote.info9964
-rw-r--r--Build/source/utils/asymptote/examples/lemniscate.asy20
-rw-r--r--Build/source/utils/asymptote/gc-7.4.0.tar.gzbin1060884 -> 0 bytes
-rw-r--r--Build/source/utils/asymptote/gc-7.4.2.tar.gzbin0 -> 1082597 bytes
-rw-r--r--Build/source/utils/asymptote/glrender.cc26
-rw-r--r--Build/source/utils/asymptote/lex.yy.cc33
-rw-r--r--Build/source/utils/asymptote/libatomic_ops-7.4.0.tar.gzbin455143 -> 0 bytes
-rw-r--r--Build/source/utils/asymptote/libatomic_ops-7.4.2.tar.gzbin0 -> 465710 bytes
-rw-r--r--Build/source/utils/asymptote/pair.h5
-rw-r--r--Build/source/utils/asymptote/path3.cc89
-rw-r--r--Build/source/utils/asymptote/path3.h4
-rw-r--r--Build/source/utils/asymptote/picture.cc30
-rw-r--r--Build/source/utils/asymptote/picture.h2
-rw-r--r--Build/source/utils/asymptote/runarray.cc69
-rw-r--r--Build/source/utils/asymptote/runarray.in9
-rw-r--r--Build/source/utils/asymptote/runlabel.cc94
-rw-r--r--Build/source/utils/asymptote/runlabel.in82
-rw-r--r--Build/source/utils/asymptote/runpair.cc57
-rw-r--r--Build/source/utils/asymptote/runpair.in12
-rw-r--r--Build/source/utils/asymptote/runpath.cc43
-rw-r--r--Build/source/utils/asymptote/runpath.in27
-rw-r--r--Build/source/utils/asymptote/runpath3d.cc358
-rw-r--r--Build/source/utils/asymptote/runpath3d.in59
-rw-r--r--Build/source/utils/asymptote/runpicture.cc109
-rw-r--r--Build/source/utils/asymptote/runpicture.in13
-rw-r--r--Build/source/utils/asymptote/settings.cc2
-rw-r--r--Build/source/utils/asymptote/stack.cc2
-rw-r--r--Build/source/utils/asymptote/texfile.cc16
62 files changed, 8961 insertions, 6395 deletions
diff --git a/Build/source/utils/README b/Build/source/utils/README
index c4f84c61cba..c285479fd92 100644
--- a/Build/source/utils/README
+++ b/Build/source/utils/README
@@ -5,7 +5,7 @@ Extra utilities we (optionally) compile for TeX Live.
See comments in ../texk/README.
-asymptote 2.31 - checked 17may14
+asymptote 2.33 - checked 12may15
update to TL from CTAN, to include prebuilt doc.
see http://tug.org/texlive/build.html#asymptote
and tlpkg/bin/tl-update-asy
diff --git a/Build/source/utils/asymptote/ChangeLog b/Build/source/utils/asymptote/ChangeLog
index 276abdb32df..b374e6954c8 100644
--- a/Build/source/utils/asymptote/ChangeLog
+++ b/Build/source/utils/asymptote/ChangeLog
@@ -1,4 +1,340 @@
------------------------------------------------------------------------
+r5707 | jcbowman | 2015-05-10 22:35:32 -0600 (Sun, 10 May 2015) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/smoothcontour3.asy
+
+Enable progress reporting if verbose > 1.
+
+------------------------------------------------------------------------
+r5706 | jcbowman | 2015-05-10 22:09:46 -0600 (Sun, 10 May 2015) | 2 lines
+Changed paths:
+ M /trunk/asymptote/asymptote.spec
+ M /trunk/asymptote/configure.ac
+ M /trunk/asymptote/doc/asymptote.texi
+
+Update to gc-7.4.2.
+
+------------------------------------------------------------------------
+r5705 | jcbowman | 2015-05-10 21:30:56 -0600 (Sun, 10 May 2015) | 3 lines
+Changed paths:
+ M /trunk/asymptote/doc/asymptote.texi
+ M /trunk/asymptote/picture.cc
+ M /trunk/asymptote/settings.cc
+
+Implement aligndir option for aligning picture to arbitrary point of page
+boundary.
+
+------------------------------------------------------------------------
+r5704 | jcbowman | 2015-05-10 17:50:49 -0600 (Sun, 10 May 2015) | 2 lines
+Changed paths:
+ M /trunk/asymptote/doc/latexusage.tex
+
+Fix default.
+
+------------------------------------------------------------------------
+r5703 | jcbowman | 2015-05-10 17:47:40 -0600 (Sun, 10 May 2015) | 2 lines
+Changed paths:
+ M /trunk/asymptote/doc/asy-latex.dtx
+ M /trunk/asymptote/doc/latexusage.tex
+
+Add \def\asylatexdir{DIR} option to support pdflatex -output-directory=DIR.
+
+------------------------------------------------------------------------
+r5702 | jcbowman | 2015-05-08 12:43:31 -0600 (Fri, 08 May 2015) | 2 lines
+Changed paths:
+ A /trunk/asymptote/base/smoothcontour3.asy
+ A /trunk/asymptote/examples/lemniscate.asy
+
+Added Charles Staats' smoothcontour3 module, with example.
+
+------------------------------------------------------------------------
+r5701 | jcbowman | 2015-05-08 11:42:00 -0600 (Fri, 08 May 2015) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/plain_arrows.asy
+
+Fix definition of SimpleHead.
+
+------------------------------------------------------------------------
+r5700 | jcbowman | 2015-05-08 09:01:42 -0600 (Fri, 08 May 2015) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/trembling.asy
+
+Remove outdated comments.
+
+------------------------------------------------------------------------
+r5699 | jcbowman | 2015-05-08 08:52:49 -0600 (Fri, 08 May 2015) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/palette.asy
+
+Fix image dimensions.
+
+------------------------------------------------------------------------
+r5698 | jcbowman | 2015-05-08 08:42:04 -0600 (Fri, 08 May 2015) | 3 lines
+Changed paths:
+ M /trunk/asymptote/base/three_surface.asy
+ M /trunk/asymptote/doc/asymptote.texi
+
+Change default meshlight to nolight so that mesh lines with positive width
+appear consistent with default single pixel width mesh lines.
+
+------------------------------------------------------------------------
+r5697 | jcbowman | 2015-05-07 19:00:00 -0600 (Thu, 07 May 2015) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/three_tube.asy
+
+Fix cond handling in parametric surfaces.
+
+------------------------------------------------------------------------
+r5696 | jcbowman | 2015-05-07 12:25:16 -0600 (Thu, 07 May 2015) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/geometry.asy
+
+Fix sign.
+
+------------------------------------------------------------------------
+r5695 | jcbowman | 2015-05-07 12:22:07 -0600 (Thu, 07 May 2015) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/geometry.asy
+
+Fix path arc(pair B, pair A, pair C, real r).
+
+------------------------------------------------------------------------
+r5694 | jcbowman | 2015-04-26 20:03:36 -0600 (Sun, 26 Apr 2015) | 2 lines
+Changed paths:
+ M /trunk/asymptote/doc/asymptote.texi
+ M /trunk/asymptote/texfile.cc
+
+Work around backwards incompatible dvisvgm pt to bp unit change on 2014-04-09.
+
+------------------------------------------------------------------------
+r5693 | jcbowman | 2015-04-08 16:55:28 -0600 (Wed, 08 Apr 2015) | 2 lines
+Changed paths:
+ M /trunk/asymptote/runpicture.in
+
+Force deconstruct to use the C locale.
+
+------------------------------------------------------------------------
+r5692 | jcbowman | 2015-04-06 23:07:04 -0600 (Mon, 06 Apr 2015) | 2 lines
+Changed paths:
+ M /trunk/asymptote/runarray.in
+
+Fix mismatched array delete operator.
+
+------------------------------------------------------------------------
+r5691 | jcbowman | 2015-04-06 18:18:26 -0600 (Mon, 06 Apr 2015) | 2 lines
+Changed paths:
+ M /trunk/asymptote/picture.cc
+ M /trunk/asymptote/picture.h
+ M /trunk/asymptote/runlabel.in
+
+Work around missing epswrite driver in ghostscript-9.15.
+
+------------------------------------------------------------------------
+r5690 | jcbowman | 2015-03-26 15:01:22 -0600 (Thu, 26 Mar 2015) | 2 lines
+Changed paths:
+ M /trunk/asymptote/texfile.cc
+
+Remove obsolete workaround for an Adobe Reader transparency artifact.
+
+------------------------------------------------------------------------
+r5689 | jcbowman | 2014-12-10 09:29:51 -0700 (Wed, 10 Dec 2014) | 2 lines
+Changed paths:
+ M /trunk/asymptote/doc/asy-latex.dtx
+ M /trunk/asymptote/texfile.cc
+
+Fix inline option when importing asymptote.sty with xelatex.
+
+------------------------------------------------------------------------
+r5688 | jcbowman | 2014-12-10 09:09:16 -0700 (Wed, 10 Dec 2014) | 2 lines
+Changed paths:
+ M /trunk/asymptote/doc/Bode.asy
+ M /trunk/asymptote/doc/asymptote.texi
+
+Fix documentation and example.
+
+------------------------------------------------------------------------
+r5687 | jcbowman | 2014-12-10 09:08:50 -0700 (Wed, 10 Dec 2014) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/ode.asy
+
+Rename function argument of integrate in ode.asy to correspond to documentation.
+
+------------------------------------------------------------------------
+r5686 | jcbowman | 2014-12-10 09:01:12 -0700 (Wed, 10 Dec 2014) | 2 lines
+Changed paths:
+ M /trunk/asymptote/runarray.in
+
+Simplify code.
+
+------------------------------------------------------------------------
+r5685 | jcbowman | 2014-09-24 15:20:00 -0600 (Wed, 24 Sep 2014) | 2 lines
+Changed paths:
+ M /trunk/asymptote/doc/asymptote.texi
+ M /trunk/asymptote/runpath.in
+
+Remove ambiguity from min(guide) and max(guide).
+
+------------------------------------------------------------------------
+r5684 | jcbowman | 2014-09-24 14:43:54 -0600 (Wed, 24 Sep 2014) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/slide.asy
+
+Indexed figures should always be stepped.
+
+------------------------------------------------------------------------
+r5683 | jcbowman | 2014-08-29 16:44:23 -0600 (Fri, 29 Aug 2014) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/three_surface.asy
+
+Fix overlap fuzz parameter.
+
+------------------------------------------------------------------------
+r5682 | jcbowman | 2014-06-20 14:51:28 -0600 (Fri, 20 Jun 2014) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/three_surface.asy
+ M /trunk/asymptote/doc/asymptote.texi
+ M /trunk/asymptote/path3.cc
+ M /trunk/asymptote/path3.h
+ M /trunk/asymptote/runpath3d.in
+
+Implement and document intersect(path, surface).
+
+------------------------------------------------------------------------
+r5681 | jcbowman | 2014-06-06 16:59:31 -0600 (Fri, 06 Jun 2014) | 4 lines
+Changed paths:
+ M /trunk/asymptote/glrender.cc
+
+Fix zoom/menu button.
+
+Fix play option.
+
+------------------------------------------------------------------------
+r5680 | jcbowman | 2014-05-26 10:57:02 -0600 (Mon, 26 May 2014) | 4 lines
+Changed paths:
+ M /trunk/asymptote/doc/asymptote.texi
+ M /trunk/asymptote/pair.h
+ M /trunk/asymptote/runpair.in
+
+Implement 2D scalar cross product.
+
+Improve documentation of orient and insphere functions.
+
+------------------------------------------------------------------------
+r5679 | jcbowman | 2014-05-23 00:39:03 -0600 (Fri, 23 May 2014) | 1 line
+Changed paths:
+ M /trunk/asymptote/asymptote.spec
+ M /trunk/asymptote/configure.ac
+
+Increment version to 2.33svn.
+------------------------------------------------------------------------
+r5678 | jcbowman | 2014-05-22 09:40:58 -0600 (Thu, 22 May 2014) | 3 lines
+Changed paths:
+ M /trunk/asymptote/Makefile.in
+
+Allow overriding CXXFLAGS with CFLAGS so that make CFLAGS="-g" disables
+optimization (for debugging).
+
+------------------------------------------------------------------------
+r5677 | jcbowman | 2014-05-22 01:12:56 -0600 (Thu, 22 May 2014) | 5 lines
+Changed paths:
+ M /trunk/asymptote/doc/asymptote.texi
+ M /trunk/asymptote/runpath.in
+ M /trunk/asymptote/runpath3d.in
+
+Rename side(pair,pair,pair) to orient(pair,pair,pair).
+Also provide interfaces to orient(triple,triple,triple,triple) and
+insphere(triple,triple,triple,triple,triple).
+Fix and update documentation of orient, incircle, and insphere.
+
+------------------------------------------------------------------------
+r5676 | jcbowman | 2014-05-19 13:16:29 -0600 (Mon, 19 May 2014) | 2 lines
+Changed paths:
+ M /trunk/asymptote/doc/png/Makefile.in
+
+Use gs instead of convert to generate latexusage.png.
+
+------------------------------------------------------------------------
+r5675 | jcbowman | 2014-05-19 08:27:39 -0600 (Mon, 19 May 2014) | 2 lines
+Changed paths:
+ M /trunk/asymptote/tests/arith/random.asy
+
+Guard agains random() returning a 16-bit result.
+
+------------------------------------------------------------------------
+r5674 | jcbowman | 2014-05-19 00:53:09 -0600 (Mon, 19 May 2014) | 2 lines
+Changed paths:
+ M /trunk/asymptote/drawlabel.cc
+
+Use random() instead of rand() everywhere.
+
+------------------------------------------------------------------------
+r5673 | jcbowman | 2014-05-19 00:44:20 -0600 (Mon, 19 May 2014) | 2 lines
+Changed paths:
+ M /trunk/asymptote/builtin.cc
+ M /trunk/asymptote/common.h
+ M /trunk/asymptote/drawlabel.cc
+ M /trunk/asymptote/runmath.in
+
+Use RANDOM_MAX rather than nonportable RAND_MAX.
+
+------------------------------------------------------------------------
+r5672 | jcbowman | 2014-05-19 00:43:14 -0600 (Mon, 19 May 2014) | 2 lines
+Changed paths:
+ M /trunk/asymptote/Makefile.in
+ D /trunk/asymptote/svnrevision
+
+Fix version mismatches when releases are imported via svn.
+
+------------------------------------------------------------------------
+r5671 | jcbowman | 2014-05-18 15:19:31 -0600 (Sun, 18 May 2014) | 2 lines
+Changed paths:
+ A /trunk/asymptote/tests/arith/random.asy
+
+Test that unitrand is in [0,1].
+
+------------------------------------------------------------------------
+r5670 | jcbowman | 2014-05-18 12:14:26 -0600 (Sun, 18 May 2014) | 2 lines
+Changed paths:
+ M /trunk/asymptote/configure.ac
+
+Remove obsolete test for texi2dvi4a2ps.
+
+------------------------------------------------------------------------
+r5669 | jcbowman | 2014-05-18 11:16:55 -0600 (Sun, 18 May 2014) | 2 lines
+Changed paths:
+ M /trunk/asymptote/runpair.in
+ M /trunk/asymptote/stack.cc
+
+Suppress compiler warnings.
+
+------------------------------------------------------------------------
+r5668 | jcbowman | 2014-05-17 13:24:35 -0600 (Sat, 17 May 2014) | 1 line
+Changed paths:
+ M /trunk/asymptote/settings.cc
+
+Document context tex engine.
+------------------------------------------------------------------------
+r5667 | jcbowman | 2014-05-17 09:54:46 -0600 (Sat, 17 May 2014) | 2 lines
+Changed paths:
+ M /trunk/asymptote/runlabel.in
+
+Enable libc++ workaround also for FreeBSD.
+
+------------------------------------------------------------------------
+r5666 | jcbowman | 2014-05-17 02:43:23 -0600 (Sat, 17 May 2014) | 2 lines
+Changed paths:
+ M /trunk/asymptote/base/math.asy
+
+Fix segment(bool[] b).
+
+------------------------------------------------------------------------
+r5665 | jcbowman | 2014-05-17 02:02:09 -0600 (Sat, 17 May 2014) | 1 line
+Changed paths:
+ M /trunk/asymptote/asymptote.spec
+ M /trunk/asymptote/configure.ac
+
+Increment version to 2.32svn.
+------------------------------------------------------------------------
r5664 | jcbowman | 2014-05-16 23:32:06 -0600 (Fri, 16 May 2014) | 3 lines
Changed paths:
M /trunk/asymptote/runlabel.in
diff --git a/Build/source/utils/asymptote/Makefile.in b/Build/source/utils/asymptote/Makefile.in
index 28b505342d2..eaedacec812 100644
--- a/Build/source/utils/asymptote/Makefile.in
+++ b/Build/source/utils/asymptote/Makefile.in
@@ -58,8 +58,8 @@ CONTEXTFILES = colo-asy.tex
ASY = ./asy -dir base -config "" -render=0
DEFS = @DEFS@ @OPTIONS@ @PTHREAD_CFLAGS@ -DFFTWPP_SINGLE_THREAD
-CFLAGS = @CFLAGS@
-OPTS = $(DEFS) @CPPFLAGS@ @CXXFLAGS@ $(CFLAGS)
+CFLAGS = @CXXFLAGS@ @CFLAGS@
+OPTS = $(DEFS) @CPPFLAGS@ $(CFLAGS)
INCL = -I. @INCL@
# Options for compiling the object files for the shared library.
@@ -90,15 +90,12 @@ latexdir = $(DESTDIR)@latexdir@
contextdir = $(DESTDIR)@contextdir@
INSTALL = @INSTALL@
REVISION = "const char *SVN_REVISION="
-revision = `LC_ALL="C" svn info 2>/dev/null | grep 'Revision' | sed -e 's/Revision: \(.*\)/-r\1/'`
last = `cat svnrevision.cc | sed -e 's/.*\"\(.*\)\";/\\1/'`
export prefix docdir exampledir mandir infodir INSTALL MAKE DESTDIR TEXI2DVI
-asy: version GUIversion
+asy: version
if test -n "$(MSDOS)"; then \
- cat asy.rc | sed -e "s/ASYMPTOTE_VERSION/@VERSION@$(revision)/" | \
- windres -o asy.o; \
$(CXX) $(OPTS) -o $(NAME) $(FILES:=.o) svnrevision.o asy.o $(LIBS) -s -static; \
else \
ln -sf GUI/xasy.py $(XNAME); \
@@ -106,7 +103,9 @@ asy: version GUIversion
fi
version: $(GCLIB) $(FILES:=.o)
- if test -r svnrevision; then \
+ $(eval revision := "")
+ if test "$(findstring svn,@PACKAGE_VERSION@)" = "svn"; then \
+ $(eval revision := `LC_ALL="C" svn info 2>/dev/null | grep 'Revision' | sed -e 's/Revision: \(.*\)/-r\1/'`) \
if test "$(revision)" != "$(last)"; then \
echo $(REVISION)\"$(revision)\"\; > svnrevision.cc; \
$(CXX) $(OPTS) $(INCL) -o svnrevision.o -c svnrevision.cc; \
@@ -120,10 +119,14 @@ version: $(GCLIB) $(FILES:=.o)
echo @set VERSION @VERSION@$(revision) > doc/version.texi
echo @set Datadir @datadir@ >> doc/version.texi
-GUIversion:
echo "#!/usr/bin/env python" > GUI/xasyVersion.py
echo xasyVersion = \"@VERSION@$(revision)\" >> GUI/xasyVersion.py
+ if test -n "$(MSDOS)"; then \
+ cat asy.rc | sed -e "s/ASYMPTOTE_VERSION/@VERSION@$(revision)/" | \
+ windres -o asy.o; \
+ fi
+
asymptote.so: $(COREFILES:=.pic.o)
$(CXX) $(OPTS) -shared -o asymptote.so svnrevision.o $(COREFILES:=.pic.o) $(SHAREDLIBS)
diff --git a/Build/source/utils/asymptote/ReleaseNotes b/Build/source/utils/asymptote/ReleaseNotes
index 63f9bb361fd..7d6d6d97fb5 100644
--- a/Build/source/utils/asymptote/ReleaseNotes
+++ b/Build/source/utils/asymptote/ReleaseNotes
@@ -1,3 +1,34 @@
+Release Notes for Version 2.33
+
+A work around was implemented for the missing epswrite driver in
+ghostscript-9.15. Deconstruction is now always done in the C locale.
+A work around for a unit change in dvisvgm-1.5.3 was implemented.
+The path arc(pair B, pair A, pair C, real r) function was fixed.
+The handling of the boolean condition in parametric surfaces was fixed.
+The default meshlight was changed to nolight so that mesh lines with
+positive width appear consistent with the default mesh lines.
+A nonsquare image dimension error was fixed. The definition of the
+SimpleHead arrowhead was fixed. The zoom/menu button and play option were
+fixed. An intersect(path, surface) function was implemented.
+A smoothcontour3 module written by Charles Staats and leminiscate example
+were added. The inline asymptote.sty option now works with xelatex.
+An obsolete workaround for an Adobe Reader transparency artifact
+was removed. A asylatexdir option was added to support the pdflatex
+-output-directory option. An aligndir option for aligning the picture to
+an arbitrary point of the page boundary was added. The garbage collector was
+updated to gc-7.4.2. The documentation was updated.
+
+Release Notes for Version 2.32
+
+The libc++ stringstream workaround was also enabled for FreeBSD.
+The segment(bool[] b) function was fixed. The side(pair,pair,pair) function
+was renamed to orient(pair,pair,pair) and an error in its documentation was
+corrected. New functions orient(triple,triple,triple,triple) and
+insphere(triple,triple,triple,triple,triple) were implemented. A random
+number generator incompatibility on some platforms was fixed. Support was
+removed for the obsolete utility texi2dvi4a2ps. Compiler warnings were
+suppressed.
+
Release Notes for Version 2.31
Hangs in 3D font generation and also in the "none" tex engine were fixed.
@@ -1917,3 +1948,7 @@ the frame for filling with a background color; they also return the boundary
as a guide. A workaround was added for a bug in gcc version 3.3 to
facilitate compilation under Darwin (MacOS). Many internal coding
improvements were made.
+
+LocalWords: epswrite ghostscript boolean meshlight nolight nonsquare asy
+LocalWords: SimpleHead smoothcontour3 writtten Staats lemniscate xelatex
+LocalWords: asymptote asylatexdir pdflatex aligndir
diff --git a/Build/source/utils/asymptote/asy-keywords.el b/Build/source/utils/asymptote/asy-keywords.el
index f9ef7269cc6..ea6435749f5 100644
--- a/Build/source/utils/asymptote/asy-keywords.el
+++ b/Build/source/utils/asymptote/asy-keywords.el
@@ -2,16 +2,16 @@
;; This file is automatically generated by asy-list.pl.
;; Changes will be overwritten.
;;
-(defvar asy-keywords-version "2.31")
+(defvar asy-keywords-version "2.33")
(defvar asy-keyword-name '(
and controls tension atleast curl if else while for do return break continue struct typedef new access import unravel from include quote static public private restricted this explicit true false null cycle newframe operator ))
(defvar asy-type-name '(
-Braid FitResult Label Legend Solution TreeNode abscissa arc arrowhead binarytree binarytreeNode block bool bool3 bounds bqe circle conic coord coordsys cputime ellipse file filltype frame grid3 guide horner hsv hyperbola indexedTransform int inversion key light line linefit marginT marker mass object pair parabola path path3 pen picture point position projection real revolution scaleT scientific segment side slice solution splitface string surface tensionSpecifier ticklocate ticksgridT tickvalues transform transformation tree triangle trilinear triple vector vertex void ))
+Braid FitResult Label Legend Solution TreeNode abscissa arc arrowhead binarytree binarytreeNode block bool bool3 bounds bqe circle conic coord coordsys cputime ellipse evaluatedpoint file filltype frame grid3 guide horner hsv hyperbola indexedTransform int inversion key light line linefit marginT marker mass object pair parabola patch path path3 pen picture point position positionedvector projection real revolution scaleT scientific segment side slice solution splitface string surface tensionSpecifier ticklocate ticksgridT tickvalues transform transformation tree triangle trilinear triple vector vertex void ))
(defvar asy-function-name '(
-AND Arc ArcArrow ArcArrows Arrow Arrows Automatic AvantGarde BBox BWRainbow BWRainbow2 Bar Bars BeginArcArrow BeginArrow BeginBar BeginDotMargin BeginMargin BeginPenMargin Blank Bookman Bottom BottomTop Bounds Break Broken BrokenLog CLZ CTZ Ceil Circle CircleBarIntervalMarker Cos Courier CrossIntervalMarker DOSendl DOSnewl DefaultFormat DefaultLogFormat Degrees Dir DotMargin DotMargins Dotted Draw Drawline Embed EndArcArrow EndArrow EndBar EndDotMargin EndMargin EndPenMargin Fill FillDraw Floor Format Full Gaussian Gaussrand Gaussrandpair Gradient Grayscale Helvetica Hermite HookHead InOutTicks InTicks Jn Label Landscape Left LeftRight LeftTicks Legend Linear Log LogFormat Margin Margins Mark MidArcArrow MidArrow NOT NewCenturySchoolBook NoBox NoMargin NoModifier NoTicks NoTicks3 NoZero NoZeroFormat None OR OmitFormat OmitTick OmitTickInterval OmitTickIntervals OutTicks Ox Oy Palatino PaletteTicks Pen PenMargin PenMargins Pentype Portrait RadialShade RadialShadeDraw Rainbow Range Relative Right RightTicks Rotate Round SQR Scale ScaleX ScaleY ScaleZ Seascape Shift Sin Slant Spline StickIntervalMarker Straight Symbol Tan TeXify Ticks Ticks3 TildeIntervalMarker TimesRoman Top TrueMargin UnFill UpsideDown Wheel X XEquals XOR XY XYEquals XYZero XYgrid XZEquals XZZero XZero XZgrid Y YEquals YXgrid YZ YZEquals YZZero YZero YZgrid Yn Z ZX ZXgrid ZYgrid ZapfChancery ZapfDingbats _begingroup3 _cputime _draw _eval _image _labelpath _projection _strokepath _texpath aCos aSin aTan abort abs accel acos acosh acot acsc activatequote add addArrow addMargins addSaveFunction addpenarc addpenline addseg adjust alias align all altitude angabscissa angle angpoint animate annotate anticomplementary antipedal apply approximate arc arcarrowsize arccircle arcdir arcfromcenter arcfromfocus arclength arcnodesnumber arcpoint arcsubtended arcsubtendedcenter arctime arctopath array arrow arrow2 arrowbase arrowbasepoints arrowsize ascii asec asin asinh ask assert asy asycode asydir asyfigure asyfilecode asyinclude asywrite atan atan2 atanh atbreakpoint atexit attach attract atupdate autoformat autoscale autoscale3 axes axes3 axialshade axis axiscoverage azimuth babel background bangles bar barmarksize barsize basealign baseline bbox beep begin beginclip begingroup beginpoint between bevel bezier bezierP bezierPP bezierPPP bezulate bibliography bibliographystyle binarytree binarytreeNode binomial bins bisector bisectorpoint bispline blend blockconnector box bqe brace breakpoint breakpoints brick buildRestoreDefaults buildRestoreThunk buildcycle bulletcolor byte calculateScaling canonical canonicalcartesiansystem cartesiansystem case1 case2 case3 cbrt cd ceil center centerToFocus centroid cevian change2 changecoordsys checkSegment checkconditionlength checker checkincreasing checklengths checkposition checktriangle choose circle circlebarframe circlemarkradius circlenodesnumber circumcenter circumcircle clamped clear clip clipdraw close cmyk code colatitude collect collinear color colorless colors colorspace comma compassmark complement complementary concat concurrent cone conic conicnodesnumber conictype conj connect containmentTree contains contour contour3 controlSpecifier convert coordinates coordsys copy copyPairOrTriple cos cosh cot countIntersections cputime crop cropcode cross crossframe crosshatch crossmarksize csc cubicroots curabscissa curlSpecifier curpoint currentarrow currentexitfunction currentmomarrow currentpolarconicroutine curve cut cutafter cutbefore cyclic cylinder deactivatequote debugger deconstruct defaultdir defaultformat defaultpen defined degenerate degrees delete deletepreamble determinant diagonal diamond diffdiv dir dirSpecifier dirtime display distance divisors do_overpaint dot dotframe dotsize downcase draw drawAll drawDoubleLine drawFermion drawGhost drawGluon drawMomArrow drawPRCcylinder drawPRCdisk drawPRCsphere drawPRCtube drawPhoton drawScalar drawVertex drawVertexBox drawVertexBoxO drawVertexBoxX drawVertexO drawVertexOX drawVertexTriangle drawVertexTriangleO drawVertexX drawarrow drawarrow2 drawline drawpixel drawtick duplicate elle ellipse ellipsenodesnumber embed embed3 embedplayer empty enclose end endScript endclip endgroup endgroup3 endl endpoint endpoints eof eol equation equations erase erasestep erf erfc error errorbar errorbars eval excenter excircle exit exitXasyMode exitfunction exp expfactors expi expm1 exradius extend extension extouch fabs factorial fermat fft fhorner figure file filecode fill filldraw filloutside fillrule filltype find finite finiteDifferenceJacobian firstcut firstframe fit fit2 fixedscaling floor flush fmdefaults fmod focusToCenter font fontcommand fontsize foot format frac frequency fromCenter fromFocus fspline functionshade gamma generate_random_backtrace generateticks gergonne getc getint getpair getreal getstring gettriple gluon gouraudshade graph graphic gray grestore grid grid3 gsave halfbox hatch hdiffdiv hermite hex histogram history hline hprojection hsv hyperbola hyperbolanodesnumber hyperlink hypot identity image incenter incentral incircle increasing incrementposition indexedTransform indexedfigure initXasyMode initdefaults input inradius insert inside integrate interactive interior interp interpolate intersect intersection intersectionpoint intersectionpoints intersections intouch inverse inversion invisible is3D isDuplicate isnan isogonal isogonalconjugate isotomic isotomicconjugate isparabola italic item jobname key kurtosis kurtosisexcess label labelaxis labelmargin labelpath labels labeltick labelx labelx3 labely labely3 labelz labelz3 lastcut latex latitude latticeshade layer layout ldexp leastsquares legend legenditem length lexorder lift light limits line linear linecap lineinversion linejoin linemargin lineskip linetype linewidth link list lm_enorm lm_evaluate_default lm_lmdif lm_lmpar lm_minimize lm_print_default lm_print_quiet lm_qrfac lm_qrsolv locale locate locatefile location log log10 log1p logaxiscoverage longitude lookup makeNode makedraw makepen map margin markangle markangleradius markanglespace markarc marker markinterval marknodes markrightangle markthin markuniform mass masscenter massformat math max max3 maxAfterTransform maxbezier maxbound maxcoords maxlength maxratio maxtimes mean medial median midpoint min min3 minAfterTransform minbezier minbound minipage minratio mintimes miterlimit mktemp momArrowPath momarrowsize monotonic multifigure nativeformat natural needshipout newl newpage newslide newton newtree nextframe nextnormal nextpage nib nodabscissa none norm normalvideo notaknot nowarn numberpage nurb object offset onpath opacity opposite orientation origin orthic orthocentercenter outformat outline outname outprefix output overloadedMessage overwrite pack pad pairs palette parabola parabolanodesnumber parallel parallelogram partialsum path path3 pattern pause pdf pedal periodic perp perpendicular perpendicularmark phantom phi1 phi2 phi3 photon piecewisestraight point polar polarconicroutine polargraph polygon postcontrol postscript pow10 ppoint prc prc0 prconly precision precontrol prepend printBytecode print_random_addresses project projection purge pwhermite quadrant quadraticroots quantize quarticroots quotient radialshade radians radicalcenter radicalline radius rand randompath rd readline realmult realquarticroots rectangle rectangular rectify reflect relabscissa relative relativedistance reldir relpoint reltime remainder remark removeDuplicates rename replace report resetdefaultpen restore restoredefaults reverse reversevideo rf rfind rgb rgba rgbint rms rotate rotateO rotation round roundbox roundedpath roundrectangle samecoordsys sameside sample save savedefaults saveline scale scale3 scaleO scaleT scaleless scientific search searchtree sec secondaryX secondaryY seconds section sector seek seekeof segment segmentlimits sequence setpens sgn sgnd sharpangle sharpdegrees shift shiftless shipout shipout3 show side simeq simpson sin sinh size size3 skewness skip slant sleep slope slopefield solve solveBVP sort sourceline sphere split sqrt square srand standardizecoordsys startScript stdev step stickframe stickmarksize stickmarkspace stop straight straightness string stripdirectory stripextension stripfile stripsuffix strokepath subdivide subitem subpath substr sum surface symmedial symmedian system tab tableau tan tangent tangential tangents tanh tell tensionSpecifier tensorshade tex texcolor texify texpath texpreamble texreset texshipout texsize textpath thick thin tick tickMax tickMax3 tickMin tickMin3 ticklabelshift ticklocate tildeframe tildemarksize tile tiling time times title titlepage topbox transform transformation transpose trembleFuzz triangle triangleAbc triangleabc triangulate tricoef tridiagonal trilinear trim truepoint tube uncycle unfill uniform unique unit unitrand unitsize unityroot unstraighten upcase updatefunction uperiodic upscale uptodate usepackage usersetting usetypescript usleep value variance variancebiased vbox vector vectorfield verbatim view vline vperiodic vprojection warn warning windingnumber write xaxis xaxis3 xaxis3At xaxisAt xequals xlimits xpart xscale xscaleO xtick xtick3 xtrans yaxis yaxis3 yaxis3At yaxisAt yequals ylimits ypart yscale yscaleO ytick ytick3 ytrans zaxis3 zaxis3At zero zero3 zlimits zpart ztick ztick3 ztrans ))
+AND Arc ArcArrow ArcArrows Arrow Arrows AtA Automatic AvantGarde B03 B13 B23 B33 BBox BWRainbow BWRainbow2 Bar Bars BeginArcArrow BeginArrow BeginBar BeginDotMargin BeginMargin BeginPenMargin Blank Bookman Bottom BottomTop Bounds Break Broken BrokenLog CLZ CTZ Ceil Circle CircleBarIntervalMarker Cos Courier CrossIntervalMarker DOSendl DOSnewl DefaultFormat DefaultLogFormat Degrees Dir DotMargin DotMargins Dotted Draw Drawline Embed EndArcArrow EndArrow EndBar EndDotMargin EndMargin EndPenMargin Fill FillDraw Floor Format Full Gaussian Gaussrand Gaussrandpair Gradient Grayscale Helvetica Hermite HookHead InOutTicks InTicks Jn Label Landscape Left LeftRight LeftTicks Legend Linear Log LogFormat Margin Margins Mark MidArcArrow MidArrow NOT NewCenturySchoolBook NoBox NoMargin NoModifier NoTicks NoTicks3 NoZero NoZeroFormat None OR OmitFormat OmitTick OmitTickInterval OmitTickIntervals OutTicks Ox Oy Palatino PaletteTicks Pen PenMargin PenMargins Pentype Portrait RadialShade RadialShadeDraw Rainbow Range Relative Right RightTicks Rotate Round SQR Scale ScaleX ScaleY ScaleZ Seascape Shift Sin Slant Spline StickIntervalMarker Straight Symbol Tan TeXify Ticks Ticks3 TildeIntervalMarker TimesRoman Top TrueMargin UnFill UpsideDown Wheel X XEquals XOR XY XYEquals XYZero XYgrid XZEquals XZZero XZero XZgrid Y YEquals YXgrid YZ YZEquals YZZero YZero YZgrid Yn Z ZX ZXgrid ZYgrid ZapfChancery ZapfDingbats _begingroup3 _cputime _draw _eval _image _labelpath _projection _strokepath _texpath aCos aSin aTan abort abs accel acos acosh acot acsc activatequote add addArrow addMargins addSaveFunction addpenarc addpenline addseg adjust alias align all altitude angabscissa angle angledegrees angpoint animate annotate anticomplementary antipedal apply applytranspose approximate arc arcarrowsize arccircle arcdir arcfromcenter arcfromfocus arclength arcnodesnumber arcpoint arcsubtended arcsubtendedcenter arctime arctopath array arrow arrow2 arrowbase arrowbasepoints arrowsize ascii asec asin asinh ask assert asy asycode asydir asyfigure asyfilecode asyinclude asywrite atan atan2 atanh atbreakpoint atexit attach attract atupdate autoformat autoscale autoscale3 axes axes3 axialshade axis axiscoverage azimuth babel background bangles bar barmarksize barsize basealign baseline bbox beep begin beginclip begingroup beginpoint between bevel bezier bezierP bezierPP bezierPPP bezulate bibliography bibliographystyle binarytree binarytreeNode binomial bins bisector bisectorpoint bispline blend blockconnector box bqe brace breakpoint breakpoints brick buildRestoreDefaults buildRestoreThunk buildcycle bulletcolor byte calculateScaling canonical canonicalcartesiansystem cartesiansystem case1 case2 case3 cbrt cd ceil center centerToFocus centroid cevian change2 changecoordsys checkSegment check_fpt_zero checkconditionlength checker checkincreasing checklengths checkposition checkpt checkptincube checktriangle choose circle circlebarframe circlemarkradius circlenodesnumber circumcenter circumcircle clamped clear clip clipdraw close cmyk code colatitude collect collinear color colorless colors colorspace comma compassmark complement complementary concat concurrent cone conic conicnodesnumber conictype conj connect containmentTree contains contour contour3 controlSpecifier convert coordinates coordsys copy copyPairOrTriple cos cosh cot countIntersections cputime crop cropcode cross crossframe crosshatch crossmarksize csc cubicroots curabscissa curlSpecifier curpoint currentarrow currentexitfunction currentmomarrow currentpolarconicroutine curve cut cutafter cutbefore cyclic cylinder deactivatequote debugger deconstruct defaultdir defaultformat defaultpen defined degenerate degrees delete deletepreamble determinant diagonal diamond diffdiv dir dirSpecifier dirtime display distance divisors do_overpaint dot dotframe dotsize downcase draw drawAll drawDoubleLine drawFermion drawGhost drawGluon drawMomArrow drawPRCcylinder drawPRCdisk drawPRCsphere drawPRCtube drawPhoton drawScalar drawVertex drawVertexBox drawVertexBoxO drawVertexBoxX drawVertexO drawVertexOX drawVertexTriangle drawVertexTriangleO drawVertexX drawarrow drawarrow2 drawline drawpixel drawtick duplicate elle ellipse ellipsenodesnumber embed embed3 embedplayer empty enclose end endScript endclip endgroup endgroup3 endl endpoint endpoints eof eol equation equations erase erasestep erf erfc error errorbar errorbars eval excenter excircle exit exitXasyMode exitfunction exp expfactors expi expm1 exradius extend extension extouch fabs factorial fermat fft fhorner figure file filecode fill filldraw filloutside fillrule filltype find findroot finite finiteDifferenceJacobian firstcut firstframe fit fit2 fixedscaling floor flush fmdefaults fmod focusToCenter font fontcommand fontsize foot format frac frequency fromCenter fromFocus fspline functionshade gamma generate_random_backtrace generateticks gergonne getc getint getpair getreal getstring gettriple gluon gouraudshade graph graphic gray grestore grid grid3 gsave halfbox hatch hdiffdiv hermite hex histogram history hline hprojection hsv hyperbola hyperbolanodesnumber hyperlink hypot identity image implicitsurface incenter incentral incircle increasing incrementposition indexedTransform indexedfigure initXasyMode initdefaults input inradius insert inside insphere integrate interactive interior interp interpolate intersect intersection intersectionpoint intersectionpoints intersections intouch inverse inversion invisible is3D isDuplicate isnan isogonal isogonalconjugate isotomic isotomicconjugate isparabola italic item jobname key kurtosis kurtosisexcess label labelaxis labelmargin labelpath labels labeltick labelx labelx3 labely labely3 labelz labelz3 lastcut latex latitude latticeshade layer layout ldexp leastsquares legend legenditem length lexorder lift light limits line linear linecap lineinversion linejoin linemargin lineskip linetype linewidth link list lm_enorm lm_evaluate_default lm_lmdif lm_lmpar lm_minimize lm_print_default lm_print_quiet lm_qrfac lm_qrsolv locale locate locatefile location log log10 log1p logaxiscoverage longitude lookup make3dgrid makeNode makecircle makedraw makepen map margin markangle markangleradius markanglespace markarc marker markinterval marknodes markrightangle markthin markuniform mass masscenter massformat math max max3 maxAfterTransform maxbezier maxbound maxcoords maxlength maxratio maxtimes mean medial median midpoint min min3 minAfterTransform minbezier minbound minipage minratio mintimes miterlimit mktemp momArrowPath momarrowsize monotonic multifigure nGrad nativeformat natural needshipout newl newpage newslide newton newtree nextframe nextnormal nextpage nib nodabscissa none norm normalout normalvideo notaknot nowarn numberpage nurb object offset onpath opacity opposite orient orientation origin orthic orthocentercenter outformat outline outname outprefix output overloadedMessage overwrite pack pad pairs palette parabola parabolanodesnumber parallel parallelogram partialsum patchwithnormals path path3 pathbetween pathinface pattern pause pdf pedal periodic perp perpendicular perpendicularmark phantom phi1 phi2 phi3 photon piecewisestraight point polar polarconicroutine polargraph polygon postcontrol postscript pow10 ppoint prc prc0 prconly precision precontrol prepend printBytecode print_random_addresses project projection projecttospan projecttospan_findcoeffs purge pwhermite quadpatches quadrant quadraticroots quantize quarticroots quotient radialshade radians radicalcenter radicalline radius rand randompath rd readline realmult realquarticroots rectangle rectangular rectify reflect relabscissa relative relativedistance reldir relpoint reltime remainder remark removeDuplicates rename replace report resetdefaultpen restore restoredefaults reverse reversevideo rf rfind rgb rgba rgbint rms rotate rotateO rotation round roundbox roundedpath roundrectangle samecoordsys sameside sample save savedefaults saveline scale scale3 scaleO scaleT scaleless scientific search searchtree sec secondaryX secondaryY seconds section sector seek seekeof segment segmentlimits sequence setpens sgn sgnd sharpangle sharpdegrees shift shiftless shipout shipout3 show simeq simpson sin sinh size size3 skewness skip slant sleep slice slope slopefield solve solveBVP sort sourceline sphere split sqrt square srand standardizecoordsys startScript stdev step stickframe stickmarksize stickmarkspace stop straight straightness string stripdirectory stripextension stripfile stripsuffix strokepath subdivide subitem subpath substr sum surface symmedial symmedian system tab tableau tan tangent tangential tangents tanh tell tensionSpecifier tensorshade tex texcolor texify texpath texpreamble texreset texshipout texsize textpath thick thin tick tickMax tickMax3 tickMin tickMin3 ticklabelshift ticklocate tildeframe tildemarksize tile tiling time times title titlepage topbox transform transformation transpose trembleFuzz triangle triangleAbc triangleabc triangletoquads triangulate tricoef tridiagonal trilinear trim truepoint tube uncycle unfill uniform unique unit unitrand unitsize unityroot unstraighten upcase updatefunction uperiodic upscale uptodate usepackage usersetting usetypescript usleep value variance variancebiased vbox vector vectorfield verbatim view vline vperiodic vprojection warn warning windingnumber write xaxis xaxis3 xaxis3At xaxisAt xequals xlimits xpart xscale xscaleO xtick xtick3 xtrans yaxis yaxis3 yaxis3At yaxisAt yequals ylimits ypart yscale yscaleO ytick ytick3 ytrans zaxis3 zaxis3At zero zero3 zlimits zpart ztick ztick3 ztrans ))
(defvar asy-variable-name '(
-AliceBlue Align Allow AntiqueWhite Apricot Aqua Aquamarine Aspect Azure BeginPoint Beige Bisque Bittersweet Black BlanchedAlmond Blue BlueGreen BlueViolet Both Break BrickRed Brown BurlyWood BurntOrange CCW CW CadetBlue CarnationPink Center Centered Cerulean Chartreuse Chocolate Coeff Coral CornflowerBlue Cornsilk Crimson Crop Cyan Dandelion DarkBlue DarkCyan DarkGoldenrod DarkGray DarkGreen DarkKhaki DarkMagenta DarkOliveGreen DarkOrange DarkOrchid DarkRed DarkSalmon DarkSeaGreen DarkSlateBlue DarkSlateGray DarkTurquoise DarkViolet DeepPink DeepSkyBlue DefaultHead DimGray DodgerBlue Dotted Down Draw E ENE EPS ESE E_Euler E_PC E_RK2 E_RK3BS Emerald EndPoint Euler Fill FillDraw FireBrick FloralWhite ForestGreen Fuchsia Gainsboro GhostWhite Gold Goldenrod Gray Green GreenYellow Honeydew HookHead Horizontal HotPink I IgnoreAspect IndianRed Indigo Ivory JOIN_IN JOIN_OUT JungleGreen Khaki LM_DWARF LM_MACHEP LM_SQRT_DWARF LM_SQRT_GIANT LM_USERTOL Label Lavender LavenderBlush LawnGreen Left LeftJustified LeftSide LemonChiffon LightBlue LightCoral LightCyan LightGoldenrodYellow LightGreen LightGrey LightPink LightSalmon LightSeaGreen LightSkyBlue LightSlateGray LightSteelBlue LightYellow Lime LimeGreen Linear Linen Log Logarithmic Magenta Mahogany Mark MarkFill MarkPath Maroon Max MediumAquamarine MediumBlue MediumOrchid MediumPurple MediumSeaGreen MediumSlateBlue MediumSpringGreen MediumTurquoise MediumVioletRed Melon MidPoint MidnightBlue Min MintCream MistyRose Moccasin Move MoveQuiet Mulberry N NE NNE NNW NW NavajoWhite Navy NavyBlue NoAlign NoCrop NoFill NoSide OldLace Olive OliveDrab OliveGreen Orange OrangeRed Orchid Ox Oy PC PaleGoldenrod PaleGreen PaleTurquoise PaleVioletRed PapayaWhip Peach PeachPuff Periwinkle Peru PineGreen Pink Plum PowderBlue ProcessBlue Purple RK2 RK3 RK3BS RK4 RK5 RK5DP RK5F RawSienna Red RedOrange RedViolet Rhodamine Right RightJustified RightSide RosyBrown RoyalBlue RoyalPurple RubineRed S SE SSE SSW SW SaddleBrown Salmon SandyBrown SeaGreen Seashell Sepia Sienna Silver SimpleHead SkyBlue SlateBlue SlateGray Snow SpringGreen SteelBlue Suppress SuppressQuiet Tan TeXHead Teal TealBlue Thistle Ticksize Tomato Turquoise UnFill Up VERSION Value Vertical Violet VioletRed W WNW WSW Wheat White WhiteSmoke WildStrawberry XYAlign YAlign Yellow YellowGreen YellowOrange addpenarc addpenline align allowstepping angularsystem animationdelay appendsuffix arcarrowangle arcarrowfactor arrow2sizelimit arrowangle arrowbarb arrowdir arrowfactor arrowhookfactor arrowlength arrowsizelimit arrowtexfactor authorpen axis axiscoverage axislabelfactor background backgroundcolor backgroundpen barfactor barmarksizefactor basealign baselinetemplate beveljoin bigvertexpen bigvertexsize black blue bm bottom bp bracedefaultratio braceinnerangle bracemidangle braceouterangle brown bullet byfoci byvertices camerafactor chartreuse circlemarkradiusfactor circlenodesnumberfactor circleprecision circlescale cm codefile codepen codeskip colorPen coloredNodes coloredSegments conditionlength conicnodesfactor count cputimeformat crossmarksizefactor currentcoordsys currentlight currentpatterns currentpen currentpicture currentposition currentprojection curvilinearsystem cuttings cyan darkblue darkbrown darkcyan darkgray darkgreen darkgrey darkmagenta darkolive darkred dashdotted dashed datepen dateskip debuggerlines debugging deepblue deepcyan deepgray deepgreen deepgrey deepmagenta deepred default defaultControl defaultS defaultbackpen defaultcoordsys defaultexcursion defaultfilename defaultformat defaultmassformat defaultpen defaultseparator diagnostics differentlengths dot dotfactor dotframe dotted doublelinepen doublelinespacing down duplicateFuzz ellipsenodesnumberfactor eps epsgeo epsilon evenodd expansionfactor extendcap fermionpen figureborder figuremattpen file3 firstnode firststep foregroundcolor fuchsia fuzz gapfactor ghostpen gluonamplitude gluonpen gluonratio gray green grey hatchepsilon havepagenumber heavyblue heavycyan heavygray heavygreen heavygrey heavymagenta heavyred hline hwratio hyperbolanodesnumberfactor identity4 ignore inXasyMode inch inches includegraphicscommand inf infinity institutionpen intMax intMin invert invisible itempen itemskip itemstep labelmargin landscape lastnode left legendhskip legendlinelength legendmargin legendmarkersize legendmaxrelativewidth legendvskip lightblue lightcyan lightgray lightgreen lightgrey lightmagenta lightolive lightred lightyellow linemargin lm_infmsg lm_shortmsg longdashdotted longdashed magenta magneticRadius mantissaBits markangleradius markangleradiusfactor markanglespace markanglespacefactor maxrefinements mediumblue mediumcyan mediumgray mediumgreen mediumgrey mediummagenta mediumred mediumyellow middle minDistDefault minblockheight minblockwidth mincirclediameter minipagemargin minipagewidth minvertexangle miterjoin mm momarrowfactor momarrowlength momarrowmargin momarrowoffset momarrowpen monoPen morepoints nCircle newbulletcolor ngraph nil nmesh nobasealign nodeMarginDefault nodesystem nomarker nopoint noprimary nullpath nullpen numarray ocgindex oldbulletcolor olive orange origin overpaint page pageheight pagemargin pagenumberalign pagenumberpen pagenumberposition pagewidth paleblue palecyan palegray palegreen palegrey palemagenta palered paleyellow parabolanodesnumberfactor perpfactor phi photonamplitude photonpen photonratio pi pink plain plain_bounds plain_scaling plus preamblenodes pt purple r3 r4a r4b randMax realDigits realEpsilon realMax realMin red relativesystem reverse right roundcap roundjoin royalblue salmon saveFunctions scalarpen sequencereal settings shipped signedtrailingzero solid springgreen sqrtEpsilon squarecap squarepen startposition stdin stdout stepfactor stepfraction steppagenumberpen stepping stickframe stickmarksizefactor stickmarkspacefactor swap textpen ticksize tildeframe tildemarksizefactor tinv titlealign titlepagepen titlepageposition titlepen titleskip top trailingzero treeLevelStep treeMinNodeWidth treeNodeStep trembleAngle trembleFrequency trembleRandom undefined unitcircle unitsquare up urlpen urlskip version vertexpen vertexsize viewportmargin viewportsize vline white wye xformStack yellow ylabelwidth zerotickfuzz zerowinding ))
+AliceBlue Align Allow AntiqueWhite Apricot Aqua Aquamarine Aspect Azure BeginPoint Beige Bisque Bittersweet Black BlanchedAlmond Blue BlueGreen BlueViolet Both Break BrickRed Brown BurlyWood BurntOrange CCW CW CadetBlue CarnationPink Center Centered Cerulean Chartreuse Chocolate Coeff Coral CornflowerBlue Cornsilk Crimson Crop Cyan Dandelion DarkBlue DarkCyan DarkGoldenrod DarkGray DarkGreen DarkKhaki DarkMagenta DarkOliveGreen DarkOrange DarkOrchid DarkRed DarkSalmon DarkSeaGreen DarkSlateBlue DarkSlateGray DarkTurquoise DarkViolet DeepPink DeepSkyBlue DefaultHead DimGray DodgerBlue Dotted Down Draw E ENE EPS ESE E_Euler E_PC E_RK2 E_RK3BS Emerald EndPoint Euler Fill FillDraw FireBrick FloralWhite ForestGreen Fuchsia Gainsboro GhostWhite Gold Goldenrod Gray Green GreenYellow Honeydew HookHead Horizontal HotPink I IgnoreAspect IndianRed Indigo Ivory JOIN_IN JOIN_OUT JungleGreen Khaki LM_DWARF LM_MACHEP LM_SQRT_DWARF LM_SQRT_GIANT LM_USERTOL Label Lavender LavenderBlush LawnGreen Left LeftJustified LeftSide LemonChiffon LightBlue LightCoral LightCyan LightGoldenrodYellow LightGreen LightGrey LightPink LightSalmon LightSeaGreen LightSkyBlue LightSlateGray LightSteelBlue LightYellow Lime LimeGreen Linear Linen Log Logarithmic Magenta Mahogany Mark MarkFill MarkPath Maroon Max MediumAquamarine MediumBlue MediumOrchid MediumPurple MediumSeaGreen MediumSlateBlue MediumSpringGreen MediumTurquoise MediumVioletRed Melon MidPoint MidnightBlue Min MintCream MistyRose Moccasin Move MoveQuiet Mulberry N NE NNE NNW NULL_VERTEX NW NavajoWhite Navy NavyBlue NoAlign NoCrop NoFill NoSide OldLace Olive OliveDrab OliveGreen Orange OrangeRed Orchid Ox Oy PC PaleGoldenrod PaleGreen PaleTurquoise PaleVioletRed PapayaWhip Peach PeachPuff Periwinkle Peru PineGreen Pink Plum PowderBlue ProcessBlue Purple RK2 RK3 RK3BS RK4 RK5 RK5DP RK5F RawSienna Red RedOrange RedViolet Rhodamine Right RightJustified RightSide RosyBrown RoyalBlue RoyalPurple RubineRed S SE SSE SSW SW SaddleBrown Salmon SandyBrown SeaGreen Seashell Sepia Sienna Silver SimpleHead SkyBlue SlateBlue SlateGray Snow SpringGreen SteelBlue Suppress SuppressQuiet Tan TeXHead Teal TealBlue Thistle Ticksize Tomato Turquoise UnFill Up VERSION Value Vertical Violet VioletRed W WNW WSW Wheat White WhiteSmoke WildStrawberry XHIGH XLOW XYAlign YAlign YHIGH YLOW Yellow YellowGreen YellowOrange ZHIGH ZLOW addpenarc addpenline align allowstepping angularsystem animationdelay appendsuffix arcarrowangle arcarrowfactor arrow2sizelimit arrowangle arrowbarb arrowdir arrowfactor arrowhookfactor arrowlength arrowsizelimit arrowtexfactor authorpen axis axiscoverage axislabelfactor background backgroundcolor backgroundpen barfactor barmarksizefactor basealign baselinetemplate bernstein beveljoin bigvertexpen bigvertexsize black blue bm bottom bp bracedefaultratio braceinnerangle bracemidangle braceouterangle brown bullet byfoci byvertices camerafactor chartreuse circlemarkradiusfactor circlenodesnumberfactor circleprecision circlescale cm codefile codepen codeskip colorPen coloredNodes coloredSegments conditionlength conicnodesfactor count cputimeformat crossmarksizefactor currentcoordsys currentlight currentpatterns currentpen currentpicture currentposition currentprojection curvilinearsystem cuttings cyan darkblue darkbrown darkcyan darkgray darkgreen darkgrey darkmagenta darkolive darkred dashdotted dashed datepen dateskip debuggerlines debugging deepblue deepcyan deepgray deepgreen deepgrey deepmagenta deepred default defaultControl defaultS defaultbackpen defaultcoordsys defaultexcursion defaultfilename defaultformat defaultmassformat defaultpen defaultseparator diagnostics differentlengths dot dotfactor dotframe dotted doublelinepen doublelinespacing down duplicateFuzz ellipsenodesnumberfactor eps epsgeo epsilon evenodd expansionfactor extendcap fermionpen figureborder figuremattpen file3 firstnode firststep foregroundcolor fuchsia fuzz gapfactor ghostpen gluonamplitude gluonpen gluonratio gray green grey hatchepsilon havepagenumber heavyblue heavycyan heavygray heavygreen heavygrey heavymagenta heavyred hline hwratio hyperbolanodesnumberfactor identity4 ignore inXasyMode inch inches includegraphicscommand inf infinity institutionpen intMax intMin invert invisible itempen itemskip itemstep labelmargin landscape lastnode left legendhskip legendlinelength legendmargin legendmarkersize legendmaxrelativewidth legendvskip lightblue lightcyan lightgray lightgreen lightgrey lightmagenta lightolive lightred lightyellow linemargin lm_infmsg lm_shortmsg longdashdotted longdashed magenta magneticRadius mantissaBits markangleradius markangleradiusfactor markanglespace markanglespacefactor maxrefinements mediumblue mediumcyan mediumgray mediumgreen mediumgrey mediummagenta mediumred mediumyellow middle minDistDefault minblockheight minblockwidth mincirclediameter minipagemargin minipagewidth minvertexangle miterjoin mm momarrowfactor momarrowlength momarrowmargin momarrowoffset momarrowpen monoPen morepoints nCircle newbulletcolor ngraph nil nmesh nobasealign nodeMarginDefault nodesystem nomarker nopoint noprimary nullpath nullpen numarray ocgindex oldbulletcolor olive orange origin overpaint page pageheight pagemargin pagenumberalign pagenumberpen pagenumberposition pagewidth paleblue palecyan palegray palegreen palegrey palemagenta palered paleyellow parabolanodesnumberfactor perpfactor phi photonamplitude photonpen photonratio pi pink plain plain_bounds plain_scaling plus preamblenodes pt purple r3 r4a r4b randMax realDigits realEpsilon realMax realMin red relativesystem reverse right roundcap roundjoin royalblue salmon saveFunctions scalarpen sequencereal settings shipped signedtrailingzero solid springgreen sqrtEpsilon squarecap squarepen startposition stdin stdout stepfactor stepfraction steppagenumberpen stepping stickframe stickmarksizefactor stickmarkspacefactor swap textpen ticksize tildeframe tildemarksizefactor tinv titlealign titlepagepen titlepageposition titlepen titleskip top trailingzero treeLevelStep treeMinNodeWidth treeNodeStep trembleAngle trembleFrequency trembleRandom undefined unitcircle unitsquare up urlpen urlskip version vertexpen vertexsize viewportmargin viewportsize vline white wye xformStack yellow ylabelwidth zerotickfuzz zerowinding ))
diff --git a/Build/source/utils/asymptote/asy.list b/Build/source/utils/asymptote/asy.list
index 8fcde70b569..e63fac45207 100644
--- a/Build/source/utils/asymptote/asy.list
+++ b/Build/source/utils/asymptote/asy.list
@@ -158,6 +158,8 @@ int JOIN_IN;
int JOIN_OUT;
projection currentprojection;
void endScript();
+real orient(pair a, pair b, pair c);
+real orient(triple a, triple b, triple c, triple d);
pen linetype(real[] pattern, real offset=<default>, bool scale=<default>, bool adjust=<default>);
real[] linetype(pen p=<default>);
pen linetype(string pattern, real offset=<default>, bool scale=<default>, bool adjust=<default>);
@@ -235,7 +237,7 @@ string min(string[][] a);
string min(string[][][] a);
pair min(pen p);
pair min(frame f);
-pair min(path p);
+pair min(explicit path p);
pair min(path[] p);
triple min(path3 p);
pair min(picture pic, bool user=<default>);
@@ -251,9 +253,9 @@ int search(void()()[] a, void key()(), bool less(void()(), void()()));
int search(real[] a, real key, bool less(real, real));
int search(guide[] a, guide key, bool less(guide, guide));
int search(coord[] a, coord key, bool less(coord, coord));
+int search(Legend[] a, Legend key, bool less(Legend, Legend));
int search(pair[] a, pair key, bool less(pair, pair));
int search(object[] a, object key, bool less(object, object));
-int search(Legend[] a, Legend key, bool less(Legend, Legend));
int search(frame[] a, frame key, bool less(frame, frame));
int search(coord[] a, coord key, bool less(coord, coord));
int search(Label[] a, Label key, bool less(Label, Label));
@@ -337,7 +339,7 @@ string max(string[][] a);
string max(string[][][] a);
pair max(pen p);
pair max(frame f);
-pair max(path p);
+pair max(explicit path p);
pair max(path[] p);
triple max(path3 p);
real max(real M, scaling s, coord[] c);
@@ -520,6 +522,7 @@ pen[] copy(pen[] a, int depth=<default>);
coord[] copy(coord[] a, int depth=<default>);
coord[] copy(coord[] a, int depth=<default>);
marker[] copy(marker[] a, int depth=<default>);
+Legend[] copy(Legend[] a, int depth=<default>);
Label[] copy(Label[] a, int depth=<default>);
pen[][] copy(pen[][] a, int depth=<default>);
path[] copy(path[] a, int depth=<default>);
@@ -532,7 +535,6 @@ pair[] copy(pair[] a, int depth=<default>);
bool3[] copy(bool3[] a, int depth=<default>);
object[] copy(object[] a, int depth=<default>);
picture[] copy(picture[] a, int depth=<default>);
-Legend[] copy(Legend[] a, int depth=<default>);
pair[][] copy(pair[][] a, int depth=<default>);
real[] abs(pair[] a);
real[] abs(triple[] a);
@@ -573,9 +575,9 @@ pen[][] map(pen[] f(pen[]), pen[][] a);
triple[] map(triple f(triple), triple[] a);
pen[] map(pen f(pen), pen[] a);
object[] map(object f(object), object[] a);
-Legend[] map(Legend f(Legend), Legend[] a);
pair[] map(pair f(pair), pair[] a);
coord[] map(coord f(coord), coord[] a);
+Legend[] map(Legend f(Legend), Legend[] a);
string[] map(string f(string), string[] a);
void()()[] map(void f()()(void()()), void()()[] a);
pair[][] map(pair[] f(pair[]), pair[][] a);
@@ -603,6 +605,7 @@ pen[][] sequence(pen[] f(int), int n);
coord[] sequence(coord f(int), int n);
coord[] sequence(coord f(int), int n);
marker[] sequence(marker f(int), int n);
+Legend[] sequence(Legend f(int), int n);
Label[] sequence(Label f(int), int n);
int[] sequence(int f(int), int n);
string[][] sequence(string[] f(int), int n);
@@ -616,7 +619,6 @@ pair[][] sequence(pair[] f(int), int n);
bool3[] sequence(bool3 f(int), int n);
object[] sequence(object f(int), int n);
picture[] sequence(picture f(int), int n);
-Legend[] sequence(Legend f(int), int n);
real[][] sequence(real[] f(int), int n);
real[] sequence(real f(int), int n);
int[] sequence(int n, int m);
@@ -739,7 +741,6 @@ pair[][] array(int n, pair[] value, int depth=<default>);
bool3[] array(int n, bool3 value, int depth=<default>);
object[] array(int n, object value, int depth=<default>);
picture[] array(int n, picture value, int depth=<default>);
-Legend[] array(int n, Legend value, int depth=<default>);
real[][] array(int n, real[] value, int depth=<default>);
real[] array(int n, real value, int depth=<default>);
triple[] array(int n, triple value, int depth=<default>);
@@ -749,6 +750,7 @@ pen[][] array(int n, pen[] value, int depth=<default>);
coord[] array(int n, coord value, int depth=<default>);
coord[] array(int n, coord value, int depth=<default>);
marker[] array(int n, marker value, int depth=<default>);
+Legend[] array(int n, Legend value, int depth=<default>);
Label[] array(int n, Label value, int depth=<default>);
int[] array(int n, int value, int depth=<default>);
string[][] array(int n, string[] value, int depth=<default>);
@@ -938,9 +940,9 @@ arrowhead HookHead(real dir=<default>, real barb=<default>);
real[] concat(... real[][]);
pair[] concat(... pair[][]);
coord[] concat(... coord[][]);
+Legend[] concat(... Legend[][]);
pen[] concat(... pen[][]);
object[] concat(... object[][]);
-Legend[] concat(... Legend[][]);
path[] concat(... path[][]);
coord[] concat(... coord[][]);
Label[] concat(... Label[][]);
@@ -969,8 +971,8 @@ bool alias(Label[] a, Label[] b);
bool alias(pair[] a, pair[] b);
bool alias(scaling a, scaling b);
bool alias(bounds a, bounds b);
-bool alias(scaleT a, scaleT b);
-bool alias(Legend a, Legend b);
+bool alias(coords3 a, coords3 b);
+bool alias(ScaleT a, ScaleT b);
bool alias(object a, object b);
bool alias(cputime a, cputime b);
bool alias(int[] a, int[] b);
@@ -980,10 +982,10 @@ bool alias(coord[] a, coord[] b);
bool alias(coords2 a, coords2 b);
bool alias(pairOrTriple a, pairOrTriple b);
bool alias(framedTransformStack a, framedTransformStack b);
+bool alias(Legend[] a, Legend[] b);
bool alias(real[][] a, real[][] b);
bool alias(bool3 a, bool3 b);
bool alias(bool3[] a, bool3[] b);
-bool alias(light a, light b);
bool alias(picture a, picture b);
bool alias(position a, position b);
bool alias(picture[] a, picture[] b);
@@ -992,7 +994,8 @@ bool alias(string[] a, string[] b);
bool alias(frame[] a, frame[] b);
bool alias(coords2 a, coords2 b);
bool alias(coord a, coord b);
-bool alias(autoscaleT a, autoscaleT b);
+bool alias(scaleT a, scaleT b);
+bool alias(Legend a, Legend b);
bool alias(bool[] a, bool[] b);
bool alias(void()()[] a, void()()[] b);
bool alias(pen[][] a, pen[][] b);
@@ -1001,11 +1004,10 @@ bool alias(freezableBounds a, freezableBounds b);
bool alias(transformation a, transformation b);
bool alias(align a, align b);
bool alias(object[] a, object[] b);
-bool alias(Legend[] a, Legend[] b);
bool alias(path[] a, path[] b);
bool alias(triple[] a, triple[] b);
bool alias(coord a, coord b);
-bool alias(coords3 a, coords3 b);
+bool alias(light a, light b);
bool alias(Label a, Label b);
bool alias(marker[] a, marker[] b);
bool alias(processtime a, processtime b);
@@ -1013,7 +1015,7 @@ bool alias(real[] a, real[] b);
bool alias(pen[] a, pen[] b);
bool alias(hsv a, hsv b);
bool alias(scaling a, scaling b);
-bool alias(ScaleT a, ScaleT b);
+bool alias(autoscaleT a, autoscaleT b);
bool alias(indexedTransform a, indexedTransform b);
real pi;
int getint(string name=<default>, int default=<default>, string prompt=<default>, bool store=<default>);
@@ -1046,10 +1048,10 @@ void()()[] sort(void()()[] a, bool less(void()(), void()()));
real[] sort(real[] a, bool less(real, real));
bool[] sort(bool[] a, bool less(bool, bool));
coord[] sort(coord[] a, bool less(coord, coord));
+Legend[] sort(Legend[] a, bool less(Legend, Legend));
pen[] sort(pen[] a, bool less(pen, pen));
pen[][] sort(pen[][] a, bool less(pen[], pen[]));
object[] sort(object[] a, bool less(object, object));
-Legend[] sort(Legend[] a, bool less(Legend, Legend));
guide[] sort(guide[] a, bool less(guide, guide));
real[][] sort(real[][] a, bool less(real[], real[]));
triple[] sort(triple[] a, bool less(triple, triple));
@@ -1166,7 +1168,6 @@ pair point(object F, pair dir, transform t=<default>);
pair point(frame f, pair dir);
pen longdashdotted;
void usepackage(string s, string options=<default>);
-real side(pair a, pair b, pair c);
void drawarrow(frame f, arrowhead arrowhead=<default>, path g, pen p=<default>, real size=<default>, real angle=<default>, filltype filltype=<default>, position position=<default>, bool forwards=<default>, marginT margin(path, pen)=<default>, bool center=<default>);
void drawarrow2(frame f, arrowhead arrowhead=<default>, path g, pen p=<default>, real size=<default>, real angle=<default>, filltype filltype=<default>, marginT margin(path, pen)=<default>);
pen fillrule(int n);
@@ -1238,6 +1239,7 @@ real legendlinelength;
bool diagnostics;
string minipage(string s, real width=<default>);
real legendmaxrelativewidth;
+real cross(explicit pair z, explicit pair w);
triple cross(triple u, triple v);
path cross(int n, bool round=<default>, real r=<default>);
string operator +(string a, string b);
@@ -1382,23 +1384,23 @@ pairOrTriple operator init();
framedTransformStack operator init();
hsv operator init();
scaling operator init();
-ScaleT operator init();
+autoscaleT operator init();
indexedTransform operator init();
coords2 operator init();
coord operator init();
-autoscaleT operator init();
-scaling operator init();
-bounds operator init();
scaleT operator init();
Legend operator init();
+scaling operator init();
+bounds operator init();
+coords3 operator init();
+ScaleT operator init();
object operator init();
cputime operator init();
coord operator init();
-coords3 operator init();
+light operator init();
Label operator init();
processtime operator init();
bool3 operator init();
-light operator init();
picture operator init();
position operator init();
arrowhead operator init();
@@ -1570,24 +1572,24 @@ bool operator ==(file a, file b);
bool operator ==(path a, path b);
bool operator ==(path3 a, path3 b);
bool operator ==(bool3 a, bool3 b);
-bool operator ==(light a, light b);
bool operator ==(picture a, picture b);
bool operator ==(position a, position b);
bool operator ==(arrowhead a, arrowhead b);
bool operator ==(coords2 a, coords2 b);
bool operator ==(coord a, coord b);
-bool operator ==(autoscaleT a, autoscaleT b);
+bool operator ==(scaleT a, scaleT b);
+bool operator ==(Legend a, Legend b);
bool operator ==(filltype a, filltype b);
bool operator ==(freezableBounds a, freezableBounds b);
bool operator ==(transformation a, transformation b);
bool operator ==(align a, align b);
bool operator ==(coord a, coord b);
-bool operator ==(coords3 a, coords3 b);
+bool operator ==(light a, light b);
bool operator ==(Label a, Label b);
bool operator ==(processtime a, processtime b);
bool operator ==(hsv a, hsv b);
bool operator ==(scaling a, scaling b);
-bool operator ==(ScaleT a, ScaleT b);
+bool operator ==(autoscaleT a, autoscaleT b);
bool operator ==(indexedTransform a, indexedTransform b);
bool operator ==(bool3 a, bool b);
bool operator ==(marginT a, marginT b);
@@ -1596,8 +1598,8 @@ bool operator ==(side a, side b);
bool operator ==(marker a, marker b);
bool operator ==(scaling a, scaling b);
bool operator ==(bounds a, bounds b);
-bool operator ==(scaleT a, scaleT b);
-bool operator ==(Legend a, Legend b);
+bool operator ==(coords3 a, coords3 b);
+bool operator ==(ScaleT a, ScaleT b);
bool operator ==(object a, object b);
bool operator ==(cputime a, cputime b);
bool operator ==(bool a, bool3 b);
@@ -1642,24 +1644,24 @@ bool operator !=(file a, file b);
bool operator !=(path a, path b);
bool operator !=(path3 a, path3 b);
bool operator !=(bool3 a, bool3 b);
-bool operator !=(light a, light b);
bool operator !=(picture a, picture b);
bool operator !=(position a, position b);
bool operator !=(arrowhead a, arrowhead b);
bool operator !=(coords2 a, coords2 b);
bool operator !=(coord a, coord b);
-bool operator !=(autoscaleT a, autoscaleT b);
+bool operator !=(scaleT a, scaleT b);
+bool operator !=(Legend a, Legend b);
bool operator !=(filltype a, filltype b);
bool operator !=(freezableBounds a, freezableBounds b);
bool operator !=(transformation a, transformation b);
bool operator !=(align a, align b);
bool operator !=(coord a, coord b);
-bool operator !=(coords3 a, coords3 b);
+bool operator !=(light a, light b);
bool operator !=(Label a, Label b);
bool operator !=(processtime a, processtime b);
bool operator !=(hsv a, hsv b);
bool operator !=(scaling a, scaling b);
-bool operator !=(ScaleT a, ScaleT b);
+bool operator !=(autoscaleT a, autoscaleT b);
bool operator !=(indexedTransform a, indexedTransform b);
bool operator !=(bool3 a, bool b);
bool operator !=(marginT a, marginT b);
@@ -1668,8 +1670,8 @@ bool operator !=(side a, side b);
bool operator !=(marker a, marker b);
bool operator !=(scaling a, scaling b);
bool operator !=(bounds a, bounds b);
-bool operator !=(scaleT a, scaleT b);
-bool operator !=(Legend a, Legend b);
+bool operator !=(coords3 a, coords3 b);
+bool operator !=(ScaleT a, ScaleT b);
bool operator !=(object a, object b);
bool operator !=(cputime a, cputime b);
bool operator !=(bool a, bool3 b);
@@ -1791,6 +1793,7 @@ frame Seascape(frame f);
bool interior(int windingnumber, pen fillrule);
real[] intersect(path p, path q, real fuzz=<default>);
real[] intersect(path3 p, path3 q, real fuzz=<default>);
+real[] intersect(path3 p, triple[][] p, real fuzz=<default>);
bool interactive();
real[][] intersections(path p, path q, real fuzz=<default>);
real[] intersections(path p, explicit pair a, explicit pair b, real fuzz=<default>);
@@ -1812,6 +1815,7 @@ real[] uniform(real a, real b, int n);
pair viewportsize;
pair viewportmargin;
string VERSION;
+real insphere(triple a, triple b, triple c, triple d, triple e);
void filldraw(picture pic=<default>, path[] g, pen fillpen=<default>, pen drawpen=<default>);
void filldraw(frame f, path[] g, pen fillpen=<default>, pen drawpen=<default>);
real dot(real[] a, real[] b);
@@ -1952,7 +1956,6 @@ bool shipped;
pair[] fft(pair[] a, int sign=<default>);
pair SE;
pen nobasealign;
-sCAD operator init();
real animationdelay;
animation operator init();
frame NoBox(frame f);
@@ -1999,6 +2002,16 @@ bsp operator init();
picture operator cast(face f);
face operator cast(path3 p);
void add(picture pic=<default>, face[] faces, projection P=<default>);
+sCAD operator init();
+surface surface(vertex[][] g);
+weighted operator init();
+bucket operator init();
+vertex operator init();
+object operator init();
+vertex[][] contour3(triple[][][] v, real[][][] f, real[][][] midpoint=<default>, projection P=<default>);
+vertex[][] contour3(real[][][] f, real[][][] midpoint=<default>, triple a, triple b, projection P=<default>);
+vertex[][] contour3(real f(real, real, real), triple a, triple b, int nx=<default>, int ny=<default>, int nz=<default>, projection P=<default>);
+real eps;
segment case1(pair p0, pair p1, int edge);
void draw(picture pic=<default>, Label[] L=<default>, guide[][] g, pen[] p);
void draw(picture pic=<default>, Label[] L=<default>, guide[][] g, pen p=<default>);
@@ -2018,15 +2031,6 @@ guide[][] contour(real f(real, real), pair a, pair b, real[] c, int nx=<default>
guide[][] contour(real f(pair), pair a, pair b, real[] c, int nx=<default>, int ny=<default>, guide join(... guide[])=<default>);
guide[][] contour(pair[] z, real[] f, real[] c, guide join(... guide[])=<default>);
real eps;
-surface surface(vertex[][] g);
-weighted operator init();
-bucket operator init();
-vertex operator init();
-object operator init();
-vertex[][] contour3(triple[][][] v, real[][][] f, real[][][] midpoint=<default>, projection P=<default>);
-vertex[][] contour3(real[][][] f, real[][][] midpoint=<default>, triple a, triple b, projection P=<default>);
-vertex[][] contour3(real f(real, real, real), triple a, triple b, int nx=<default>, int ny=<default>, int nz=<default>, projection P=<default>);
-real eps;
void draw(TreeNode root, pair pos);
real treeNodeStep;
void drawAll(TreeNode node, frame f);
@@ -2432,6 +2436,9 @@ transform projection(line l1, line l2, bool safe=<default>);
bool degenerate(conic c);
bool degenerate(circle c);
bool degenerate(ellipse el);
+segment segment(point A, point B);
+segment segment(line l);
+segment segment(explicit side side);
line line(point A, bool extendA=<default>, point B, bool extendB=<default>);
line line(segment s);
line line(real a, point A=<default>);
@@ -2647,9 +2654,6 @@ mass operator /(explicit mass M, real x);
mass operator /(explicit mass M, int x);
transform scaleO(real x);
real operator ^(point M, explicit circle c);
-segment segment(point A, point B);
-segment segment(line l);
-segment segment(explicit side side);
bool operator ==(coordsys c1, coordsys c2);
bool operator ==(explicit point M, explicit point N);
bool operator ==(explicit vector u, explicit vector v);
@@ -2797,6 +2801,118 @@ abscissa curabscissa(ellipse el, point M);
abscissa curabscissa(parabola p, point M);
abscissa curabscissa(conic co, point M);
abscissa curabscissa(arc a, point M);
+locateT operator init();
+void Straight(flatguide3)(... void(flatguide3)[]);
+void graph(flatguide3)(triple F(real), real, real, int)(void join(flatguide3)(... void(flatguide3)[]));
+void(flatguide3)[] graph(triple F(real), real, real, int)(void join(flatguide3)(... void(flatguide3)[]), bool3 cond(real));
+void graph(flatguide3)(picture pic=<default>, real x(real), real y(real), real z(real), real a, real b, int n=<default>, void join(flatguide3)(... void(flatguide3)[])=<default>);
+void(flatguide3)[] graph(picture pic=<default>, real x(real), real y(real), real z(real), real a, real b, int n=<default>, bool3 cond(real), void join(flatguide3)(... void(flatguide3)[])=<default>);
+void graph(flatguide3)(picture pic=<default>, triple v(real), real a, real b, int n=<default>, void join(flatguide3)(... void(flatguide3)[])=<default>);
+void(flatguide3)[] graph(picture pic=<default>, triple v(real), real a, real b, int n=<default>, bool3 cond(real), void join(flatguide3)(... void(flatguide3)[])=<default>);
+void graph(flatguide3)(picture pic=<default>, triple[] v, void join(flatguide3)(... void(flatguide3)[])=<default>);
+void(flatguide3)[] graph(picture pic=<default>, triple[] v, bool3[] cond, void join(flatguide3)(... void(flatguide3)[])=<default>);
+void graph(flatguide3)(picture pic=<default>, real[] x, real[] y, real[] z, void join(flatguide3)(... void(flatguide3)[])=<default>);
+void(flatguide3)[] graph(picture pic=<default>, real[] x, real[] y, real[] z, bool3[] cond, void join(flatguide3)(... void(flatguide3)[])=<default>);
+void graph(flatguide3)(triple F(path, real), path p, int n=<default>, void join(flatguide3)(... void(flatguide3)[])=<default>);
+void graph(flatguide3)(triple F(pair), path p, int n=<default>, void join(flatguide3)(... void(flatguide3)[])=<default>);
+void graph(flatguide3)(picture pic=<default>, real f(pair), path p, int n=<default>, void join(flatguide3)(... void(flatguide3)[])=<default>);
+void graph(flatguide3)(real f(pair), path p, int n=<default>, real T(pair), void join(flatguide3)(... void(flatguide3)[])=<default>);
+void(flatguide3)[][] lift(real f(real x, real y), guide[][] g, void join(flatguide3)(... void(flatguide3)[])=<default>);
+void(flatguide3)[][] lift(real f(pair z), guide[][] g, void join(flatguide3)(... void(flatguide3)[])=<default>);
+triple polar(real r, real theta, real phi);
+void polargraph(flatguide3)(real r(real, real), real theta(real), real phi(real), int n=<default>, void join(flatguide3)(... void(flatguide3)[])=<default>);
+void xaxis3At(picture pic=<default>, Label L=<default>, void axis(picture, axisT), real xmin=<default>, real xmax=<default>, pen p=<default>, void ticks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)=<default>, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>, bool above=<default>, bool opposite=<default>, bool opposite2=<default>, bool primary=<default>);
+void yaxis3At(picture pic=<default>, Label L=<default>, void axis(picture, axisT), real ymin=<default>, real ymax=<default>, pen p=<default>, void ticks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)=<default>, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>, bool above=<default>, bool opposite=<default>, bool opposite2=<default>, bool primary=<default>);
+void zaxis3At(picture pic=<default>, Label L=<default>, void axis(picture, axisT), real zmin=<default>, real zmax=<default>, pen p=<default>, void ticks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)=<default>, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>, bool above=<default>, bool opposite=<default>, bool opposite2=<default>, bool primary=<default>);
+void xaxis3(picture pic=<default>, Label L=<default>, void axis(picture, axisT)=<default>, real xmin=<default>, real xmax=<default>, pen p=<default>, void ticks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)=<default>, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>, bool above=<default>);
+void yaxis3(picture pic=<default>, Label L=<default>, void axis(picture, axisT)=<default>, real ymin=<default>, real ymax=<default>, pen p=<default>, void ticks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)=<default>, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>, bool above=<default>);
+void zaxis3(picture pic=<default>, Label L=<default>, void axis(picture, axisT)=<default>, real zmin=<default>, real zmax=<default>, pen p=<default>, void ticks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)=<default>, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>, bool above=<default>);
+bool uperiodic(triple[][] a);
+bool vperiodic(triple[][] a);
+void OutTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)(Label format=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, int N=<default>, int n=<default>, real Step=<default>, real step=<default>, bool begin=<default>, bool end=<default>, tickvalues modify(tickvalues)=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
+void OutTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)(Label format=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, real[] Ticks, real[] ticks=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
+void OutTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>);
+void axis(picture pic=<default>, Label L=<default>, path3 g, path3 g2=<default>, pen p=<default>, void ticks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>), ticklocate locate, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>, int[] divisor=<default>, bool above=<default>, bool opposite=<default>);
+void Bounds(picture, axisT)(int type=<default>, int type2=<default>, triple align=<default>, bool extend=<default>);
+void Bounds(picture, axisT);
+void XZZero(picture, axisT)(triple align=<default>, bool extend=<default>);
+void XZZero(picture, axisT);
+void YZZero(picture, axisT)(triple align=<default>, bool extend=<default>);
+void YZZero(picture, axisT);
+surface surface(triple[][] f, bool[][] cond=<default>);
+surface surface(real[][] f, real[] x, real[] y, real[] xsplinetype(real[], real[])=<default>, real[] ysplinetype(real[], real[])=<default>, bool[][] cond=<default>);
+surface surface(real[][] f, pair a, pair b, real[] xsplinetype(real[], real[]), real[] ysplinetype(real[], real[])=<default>, bool[][] cond=<default>);
+surface surface(real[][] f, pair a, pair b, bool[][] cond=<default>);
+surface surface(triple f(pair z), pair a, pair b, int nu=<default>, int nv=<default>, bool cond(pair z)=<default>);
+surface surface(triple f(pair z), pair a, pair b, int nu=<default>, int nv=<default>, real[](real[], real[])[] usplinetype, real[](real[], real[])[] vsplinetype=<default>, bool cond(pair z)=<default>);
+surface surface(real f(pair z), pair a, pair b, int nx=<default>, int ny=<default>, bool cond(pair z)=<default>);
+surface surface(real f(pair z), pair a, pair b, int nx=<default>, int ny=<default>, real[] xsplinetype(real[], real[]), real[] ysplinetype(real[], real[])=<default>, bool cond(pair z)=<default>);
+void XYEquals(picture, axisT)(real x, real y, triple align=<default>, bool extend=<default>);
+triple Dir(real)(triple dir);
+void draw(picture pic=<default>, Label[] L=<default>, void(flatguide3)[][] g, pen[] p, light light=<default>, string name=<default>, render render=<default>, interaction interaction=<default>);
+void draw(picture pic=<default>, Label[] L=<default>, void(flatguide3)[][] g, pen p=<default>, light light=<default>, string name=<default>, render render=<default>, interaction interaction=<default>);
+void Ticks3(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)(int sign, Label F=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, real[] Ticks=<default>, real[] ticks=<default>, int N=<default>, bool begin=<default>, bool end=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
+void Ticks3(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)(int sign, Label F=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, int N, int n=<default>, real Step=<default>, real step=<default>, bool begin=<default>, bool end=<default>, tickvalues modify(tickvalues)=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
+real maxlength(triple f(pair z), pair a, pair b, int nu, int nv);
+void drawtick(picture pic, real[][] T, path3 g, path3 g2, ticklocate locate, real val, real Size, int sign, pen p, bool extend);
+triple tickMin3(picture pic);
+triple tickMax3(picture pic);
+triple Scale(picture pic=<default>, triple v);
+real ScaleZ(picture pic=<default>, real z);
+picture vectorfield(path3 vector(pair v), triple f(pair z), pair a, pair b, int nu=<default>, int nv=<default>, bool truesize=<default>, real maxlength=<default>, bool cond(pair z)=<default>, pen p=<default>, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>, string name=<default>, render render=<default>);
+path3 Circle(triple c, real r, triple normal=<default>, int n=<default>);
+void InTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)(Label format=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, int N=<default>, int n=<default>, real Step=<default>, real step=<default>, bool begin=<default>, bool end=<default>, tickvalues modify(tickvalues)=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
+void InTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)(Label format=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, real[] Ticks, real[] ticks=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
+void InTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>);
+void Spline(flatguide3)(... void(flatguide3)[]);
+void InOutTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)(Label format=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, int N=<default>, int n=<default>, real Step=<default>, real step=<default>, bool begin=<default>, bool end=<default>, tickvalues modify(tickvalues)=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
+void InOutTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)(Label format=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, real[] Ticks, real[] ticks=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
+void InOutTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>);
+void axes3(picture pic=<default>, Label xlabel=<default>, Label ylabel=<default>, Label zlabel=<default>, bool extend=<default>, triple min=<default>, triple max=<default>, pen p=<default>, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>);
+void label(picture pic, Label L, triple v, real x, align align, string format, pen p);
+void labelx(picture pic=<default>, Label L=<default>, triple v, align align=<default>, string format=<default>, pen p=<default>);
+void labelx3(picture pic=<default>, Label L=<default>, real x, align align=<default>, string format=<default>, pen p=<default>);
+void labeltick(picture pic, real[][] T, path3 g, ticklocate locate, real val, int sign, real Size, string ticklabel(real), Label F, real norm=<default>);
+void labelaxis(picture pic, real[][] T, Label L, path3 g, ticklocate locate=<default>, int sign=<default>, bool ticklabels=<default>);
+void labely(picture pic=<default>, Label L=<default>, triple v, align align=<default>, string format=<default>, pen p=<default>);
+void labely3(picture pic=<default>, Label L=<default>, real y, align align=<default>, string format=<default>, pen p=<default>);
+void labelz(picture pic=<default>, Label L=<default>, triple v, align align=<default>, string format=<default>, pen p=<default>);
+void labelz3(picture pic=<default>, Label L=<default>, real z, align align=<default>, string format=<default>, pen p=<default>);
+void autoscale3(picture pic=<default>, void axis(picture, axisT));
+void xtick(picture pic=<default>, triple v, triple dir=<default>, real size=<default>, pen p=<default>);
+void xtick(picture pic=<default>, Label L, triple v, triple dir=<default>, string format=<default>, real size=<default>, pen p=<default>);
+void xtick3(picture pic=<default>, real x, triple dir=<default>, real size=<default>, pen p=<default>);
+void xtick3(picture pic=<default>, Label L, real x, triple dir=<default>, string format=<default>, real size=<default>, pen p=<default>);
+void ytick(picture pic=<default>, triple v, triple dir=<default>, real size=<default>, pen p=<default>);
+void ytick(picture pic=<default>, Label L, triple v, triple dir=<default>, string format=<default>, real size=<default>, pen p=<default>);
+void ytick3(picture pic=<default>, real y, triple dir=<default>, real size=<default>, pen p=<default>);
+void ytick3(picture pic=<default>, Label L, real y, triple dir=<default>, string format=<default>, real size=<default>, pen p=<default>);
+void ztick(picture pic=<default>, triple v, triple dir=<default>, real size=<default>, pen p=<default>);
+void ztick(picture pic=<default>, Label L, triple v, triple dir=<default>, string format=<default>, real size=<default>, pen p=<default>);
+void ztick3(picture pic=<default>, real z, triple dir=<default>, real size=<default>, pen p=<default>);
+void ztick3(picture pic=<default>, Label L, real z, triple dir=<default>, string format=<default>, real size=<default>, pen p=<default>);
+triple zero3(real);
+triple defaultdir(triple X, triple Y, triple Z, bool opposite=<default>, projection P);
+real xtrans(real[][] t, real x);
+real ytrans(real[][] t, real y);
+real ztrans(real[][] t, real z);
+ticklocate ticklocate(real a, real b, autoscaleT S=<default>, real tickmin=<default>, real tickmax=<default>, real time(real)=<default>, triple dir(real));
+triple ticklabelshift(triple align, pen p=<default>);
+path3 Arc(triple c, triple v1, triple v2, triple normal=<default>, bool direction=<default>, int n=<default>);
+path3 Arc(triple c, real r, real theta1, real phi1, real theta2, real phi2, triple normal=<default>, bool direction, int n=<default>);
+path3 Arc(triple c, real r, real theta1, real phi1, real theta2, real phi2, triple normal=<default>, int n=<default>);
+void limits(picture pic=<default>, triple min, triple max);
+void XZEquals(picture, axisT)(real x, real z, triple align=<default>, bool extend=<default>);
+void YZEquals(picture, axisT)(real y, real z, triple align=<default>, bool extend=<default>);
+void XYZero(picture, axisT)(triple align=<default>, bool extend=<default>);
+void XYZero(picture, axisT);
+void zlimits(picture pic=<default>, real min=<default>, real max=<default>, bool crop=<default>);
+void tick(picture pic=<default>, triple v, triple dir, real size=<default>, pen p=<default>);
+void tick(picture pic=<default>, Label L, real value, triple v, triple dir, string format=<default>, real size=<default>, pen p=<default>);
+surface bispline(real[][] z, real[][] p, real[][] q, real[][] r, real[] x, real[] y, bool[][] cond=<default>);
+path3[] segment(triple[] v, bool[] cond, void join(flatguide3)(... void(flatguide3)[])=<default>);
+void NoTicks3(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)();
+void NoTicks3(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>);
string DefaultFormat(real);
string DefaultLogFormat(real)(int base);
string DefaultLogFormat(real);
@@ -2824,9 +2940,6 @@ axisT axis;
void axis(picture pic=<default>, Label L=<default>, path g, path g2=<default>, pen p=<default>, void ticks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>), ticklocate locate, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, int[] divisor=<default>, bool above=<default>, bool opposite=<default>);
void drawtick(frame f, transform T, path g, path g2, ticklocate locate, real val, real Size, int sign, pen p, bool extend);
real maxlength(pair a, pair b, int nx, int ny);
-tickvalues OmitTickIntervals(tickvalues)(real[] a, real[] b);
-tickvalues OmitTickInterval(tickvalues)(real a, real b);
-tickvalues OmitTick(tickvalues)(... real[] x);
void errorbar(picture pic, pair z, pair dp, pair dm, pen p=<default>, real size=<default>);
void errorbars(picture pic=<default>, pair[] z, pair[] dp, pair[] dm=<default>, bool[] cond=<default>, pen p=<default>, real size=<default>);
void errorbars(picture pic=<default>, real[] x, real[] y, real[] dpx, real[] dpy, real[] dmx=<default>, real[] dmy=<default>, bool[] cond=<default>, pen p=<default>, real size=<default>);
@@ -2841,6 +2954,9 @@ void crop(picture pic=<default>);
picture vectorfield(path vector(real), path g, int n, bool truesize=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>);
picture vectorfield(path vector(pair), pair a, pair b, int nx=<default>, int ny=<default>, bool truesize=<default>, real maxlength=<default>, bool cond(pair z)=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>);
string OmitFormat(real)(string s=<default> ... real[] x);
+tickvalues OmitTickIntervals(tickvalues)(real[] a, real[] b);
+tickvalues OmitTickInterval(tickvalues)(real a, real b);
+tickvalues OmitTick(tickvalues)(... real[] x);
guide Straight(... guide[]);
int Min;
string trailingzero;
@@ -2851,23 +2967,19 @@ void labelx(picture pic=<default>, Label L, string format=<default>, explicit pe
path Arc(pair c, real r, real angle1, real angle2, bool direction, int n=<default>);
path Arc(pair c, real r, real angle1, real angle2, int n=<default>);
path Arc(pair c, explicit pair z1, explicit pair z2, bool direction=<default>, int n=<default>);
+pair labeltick(frame d, transform T, path g, ticklocate locate, real val, pair side, int sign, real Size, string ticklabel(real), Label F, real norm=<default>);
+void labelaxis(frame f, transform T, Label L, path g, ticklocate locate=<default>, int sign=<default>, bool ticklabels=<default>);
void labely(picture pic=<default>, Label L=<default>, explicit pair z, align align=<default>, string format=<default>, pen p=<default>);
void labely(picture pic=<default>, Label L=<default>, real y, align align=<default>, string format=<default>, pen p=<default>);
void labely(picture pic=<default>, Label L, string format=<default>, explicit pen p=<default>);
-pair labeltick(frame d, transform T, path g, ticklocate locate, real val, pair side, int sign, real Size, string ticklabel(real), Label F, real norm=<default>);
-void labelaxis(frame f, transform T, Label L, path g, ticklocate locate=<default>, int sign=<default>, bool ticklabels=<default>);
-void xaxisAt(picture pic=<default>, Label L=<default>, void axis(picture, axisT), real xmin=<default>, real xmax=<default>, pen p=<default>, void ticks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, bool above=<default>, bool opposite=<default>);
void xtick(picture pic=<default>, explicit pair z, pair dir=<default>, real size=<default>, pen p=<default>);
void xtick(picture pic=<default>, real x, pair dir=<default>, real size=<default>, pen p=<default>);
void xtick(picture pic=<default>, Label L, explicit pair z, pair dir=<default>, string format=<default>, real size=<default>, pen p=<default>);
void xtick(picture pic=<default>, Label L, real x, pair dir=<default>, string format=<default>, real size=<default>, pen p=<default>);
-void yaxisAt(picture pic=<default>, Label L=<default>, void axis(picture, axisT), real ymin=<default>, real ymax=<default>, pen p=<default>, void ticks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, bool above=<default>, bool opposite=<default>);
void ytick(picture pic=<default>, explicit pair z, pair dir=<default>, real size=<default>, pen p=<default>);
void ytick(picture pic=<default>, real y, pair dir=<default>, real size=<default>, pen p=<default>);
void ytick(picture pic=<default>, Label L, explicit pair z, pair dir=<default>, string format=<default>, real size=<default>, pen p=<default>);
void ytick(picture pic=<default>, Label L, real y, pair dir=<default>, string format=<default>, real size=<default>, pen p=<default>);
-void xaxis(picture pic=<default>, Label L=<default>, void axis(picture, axisT)=<default>, real xmin=<default>, real xmax=<default>, pen p=<default>, void ticks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, bool above=<default>);
-void yaxis(picture pic=<default>, Label L=<default>, void axis(picture, axisT)=<default>, real ymin=<default>, real ymax=<default>, pen p=<default>, void ticks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, bool above=<default>, bool autorotate=<default>);
picture secondaryX(picture primary=<default>, void f(picture));
picture secondaryY(picture primary=<default>, void f(picture));
Label Break;
@@ -2876,6 +2988,10 @@ scaleT Linear;
scaleT Linear(bool automin=<default>, bool automax=<default>, real s=<default>, real intercept=<default>);
pair tickMin(picture pic);
pair tickMax(picture pic);
+void xaxisAt(picture pic=<default>, Label L=<default>, void axis(picture, axisT), real xmin=<default>, real xmax=<default>, pen p=<default>, void ticks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, bool above=<default>, bool opposite=<default>);
+void yaxisAt(picture pic=<default>, Label L=<default>, void axis(picture, axisT), real ymin=<default>, real ymax=<default>, pen p=<default>, void ticks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, bool above=<default>, bool opposite=<default>);
+void xaxis(picture pic=<default>, Label L=<default>, void axis(picture, axisT)=<default>, real xmin=<default>, real xmax=<default>, pen p=<default>, void ticks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, bool above=<default>);
+void yaxis(picture pic=<default>, Label L=<default>, void axis(picture, axisT)=<default>, real ymin=<default>, real ymax=<default>, pen p=<default>, void ticks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, bool above=<default>, bool autorotate=<default>);
string autoformat(string format=<default>, real norm ... real[] a);
real linear(real)(real S(real x)=<default>, real Min, real Max);
pair polar(real r, real theta);
@@ -2887,6 +3003,7 @@ void LeftTicks(frame, transform, Label, pair, path, path, pen, bool(picture, pat
void LeftTicks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>);
tickvalues NoZero(tickvalues);
string NoZeroFormat(real);
+path[] segment(pair[] z, bool[] cond, guide join(... guide[])=<default>);
guide Hermite(... guide[])(real[] splinetype(real[], real[]));
guide Hermite(... guide[]);
path Circle(pair c, real r, int n=<default>);
@@ -2919,7 +3036,6 @@ ticklocate operator init();
locateT operator init();
tickvalues operator init();
axisT operator init();
-path[] segment(pair[] z, bool[] cond, guide join(... guide[])=<default>);
int Both;
void axes(picture pic=<default>, Label xlabel=<default>, Label ylabel=<default>, bool extend=<default>, pair min=<default>, pair max=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, bool above=<default>);
string signedtrailingzero;
@@ -2956,118 +3072,6 @@ void autoscale(picture pic=<default>, void axis(picture, axisT));
guide Spline(... guide[]);
void LeftRight(picture, axisT)(bool extend=<default>);
void LeftRight(picture, axisT);
-locateT operator init();
-void Straight(flatguide3)(... void(flatguide3)[]);
-void graph(flatguide3)(triple F(real), real, real, int)(void join(flatguide3)(... void(flatguide3)[]));
-void(flatguide3)[] graph(triple F(real), real, real, int)(void join(flatguide3)(... void(flatguide3)[]), bool3 cond(real));
-void graph(flatguide3)(picture pic=<default>, real x(real), real y(real), real z(real), real a, real b, int n=<default>, void join(flatguide3)(... void(flatguide3)[])=<default>);
-void(flatguide3)[] graph(picture pic=<default>, real x(real), real y(real), real z(real), real a, real b, int n=<default>, bool3 cond(real), void join(flatguide3)(... void(flatguide3)[])=<default>);
-void graph(flatguide3)(picture pic=<default>, triple v(real), real a, real b, int n=<default>, void join(flatguide3)(... void(flatguide3)[])=<default>);
-void(flatguide3)[] graph(picture pic=<default>, triple v(real), real a, real b, int n=<default>, bool3 cond(real), void join(flatguide3)(... void(flatguide3)[])=<default>);
-void graph(flatguide3)(picture pic=<default>, triple[] v, void join(flatguide3)(... void(flatguide3)[])=<default>);
-void(flatguide3)[] graph(picture pic=<default>, triple[] v, bool3[] cond, void join(flatguide3)(... void(flatguide3)[])=<default>);
-void graph(flatguide3)(picture pic=<default>, real[] x, real[] y, real[] z, void join(flatguide3)(... void(flatguide3)[])=<default>);
-void(flatguide3)[] graph(picture pic=<default>, real[] x, real[] y, real[] z, bool3[] cond, void join(flatguide3)(... void(flatguide3)[])=<default>);
-void graph(flatguide3)(triple F(path, real), path p, int n=<default>, void join(flatguide3)(... void(flatguide3)[])=<default>);
-void graph(flatguide3)(triple F(pair), path p, int n=<default>, void join(flatguide3)(... void(flatguide3)[])=<default>);
-void graph(flatguide3)(picture pic=<default>, real f(pair), path p, int n=<default>, void join(flatguide3)(... void(flatguide3)[])=<default>);
-void graph(flatguide3)(real f(pair), path p, int n=<default>, real T(pair), void join(flatguide3)(... void(flatguide3)[])=<default>);
-void(flatguide3)[][] lift(real f(real x, real y), guide[][] g, void join(flatguide3)(... void(flatguide3)[])=<default>);
-void(flatguide3)[][] lift(real f(pair z), guide[][] g, void join(flatguide3)(... void(flatguide3)[])=<default>);
-triple polar(real r, real theta, real phi);
-void polargraph(flatguide3)(real r(real, real), real theta(real), real phi(real), int n=<default>, void join(flatguide3)(... void(flatguide3)[])=<default>);
-void xaxis3At(picture pic=<default>, Label L=<default>, void axis(picture, axisT), real xmin=<default>, real xmax=<default>, pen p=<default>, void ticks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)=<default>, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>, bool above=<default>, bool opposite=<default>, bool opposite2=<default>, bool primary=<default>);
-void yaxis3At(picture pic=<default>, Label L=<default>, void axis(picture, axisT), real ymin=<default>, real ymax=<default>, pen p=<default>, void ticks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)=<default>, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>, bool above=<default>, bool opposite=<default>, bool opposite2=<default>, bool primary=<default>);
-void zaxis3At(picture pic=<default>, Label L=<default>, void axis(picture, axisT), real zmin=<default>, real zmax=<default>, pen p=<default>, void ticks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)=<default>, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>, bool above=<default>, bool opposite=<default>, bool opposite2=<default>, bool primary=<default>);
-void xaxis3(picture pic=<default>, Label L=<default>, void axis(picture, axisT)=<default>, real xmin=<default>, real xmax=<default>, pen p=<default>, void ticks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)=<default>, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>, bool above=<default>);
-void yaxis3(picture pic=<default>, Label L=<default>, void axis(picture, axisT)=<default>, real ymin=<default>, real ymax=<default>, pen p=<default>, void ticks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)=<default>, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>, bool above=<default>);
-bool uperiodic(triple[][] a);
-void zaxis3(picture pic=<default>, Label L=<default>, void axis(picture, axisT)=<default>, real zmin=<default>, real zmax=<default>, pen p=<default>, void ticks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)=<default>, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>, bool above=<default>);
-bool vperiodic(triple[][] a);
-void OutTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)(Label format=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, int N=<default>, int n=<default>, real Step=<default>, real step=<default>, bool begin=<default>, bool end=<default>, tickvalues modify(tickvalues)=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
-void OutTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)(Label format=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, real[] Ticks, real[] ticks=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
-void OutTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>);
-void axis(picture pic=<default>, Label L=<default>, path3 g, path3 g2=<default>, pen p=<default>, void ticks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>), ticklocate locate, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>, int[] divisor=<default>, bool above=<default>, bool opposite=<default>);
-void Bounds(picture, axisT)(int type=<default>, int type2=<default>, triple align=<default>, bool extend=<default>);
-void Bounds(picture, axisT);
-void XZZero(picture, axisT)(triple align=<default>, bool extend=<default>);
-void XZZero(picture, axisT);
-void YZZero(picture, axisT)(triple align=<default>, bool extend=<default>);
-void YZZero(picture, axisT);
-surface surface(triple[][] f, bool[][] cond=<default>);
-surface surface(real[][] f, real[] x, real[] y, real[] xsplinetype(real[], real[])=<default>, real[] ysplinetype(real[], real[])=<default>, bool[][] cond=<default>);
-surface surface(real[][] f, pair a, pair b, real[] xsplinetype(real[], real[]), real[] ysplinetype(real[], real[])=<default>, bool[][] cond=<default>);
-surface surface(real[][] f, pair a, pair b, bool[][] cond=<default>);
-surface surface(triple f(pair z), pair a, pair b, int nu=<default>, int nv=<default>, bool cond(pair z)=<default>);
-surface surface(triple f(pair z), pair a, pair b, int nu=<default>, int nv=<default>, real[](real[], real[])[] usplinetype, real[](real[], real[])[] vsplinetype=<default>, bool cond(pair z)=<default>);
-surface surface(real f(pair z), pair a, pair b, int nx=<default>, int ny=<default>, bool cond(pair z)=<default>);
-surface surface(real f(pair z), pair a, pair b, int nx=<default>, int ny=<default>, real[] xsplinetype(real[], real[]), real[] ysplinetype(real[], real[])=<default>, bool cond(pair z)=<default>);
-void XYEquals(picture, axisT)(real x, real y, triple align=<default>, bool extend=<default>);
-triple Dir(real)(triple dir);
-void draw(picture pic=<default>, Label[] L=<default>, void(flatguide3)[][] g, pen[] p, light light=<default>, string name=<default>, render render=<default>, interaction interaction=<default>);
-void draw(picture pic=<default>, Label[] L=<default>, void(flatguide3)[][] g, pen p=<default>, light light=<default>, string name=<default>, render render=<default>, interaction interaction=<default>);
-void Ticks3(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)(int sign, Label F=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, real[] Ticks=<default>, real[] ticks=<default>, int N=<default>, bool begin=<default>, bool end=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
-void Ticks3(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)(int sign, Label F=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, int N, int n=<default>, real Step=<default>, real step=<default>, bool begin=<default>, bool end=<default>, tickvalues modify(tickvalues)=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
-real maxlength(triple f(pair z), pair a, pair b, int nu, int nv);
-void drawtick(picture pic, real[][] T, path3 g, path3 g2, ticklocate locate, real val, real Size, int sign, pen p, bool extend);
-triple tickMin3(picture pic);
-triple tickMax3(picture pic);
-triple Scale(picture pic=<default>, triple v);
-real ScaleZ(picture pic=<default>, real z);
-picture vectorfield(path3 vector(pair v), triple f(pair z), pair a, pair b, int nu=<default>, int nv=<default>, bool truesize=<default>, real maxlength=<default>, bool cond(pair z)=<default>, pen p=<default>, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>, string name=<default>, render render=<default>);
-path3 Circle(triple c, real r, triple normal=<default>, int n=<default>);
-void InTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)(Label format=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, int N=<default>, int n=<default>, real Step=<default>, real step=<default>, bool begin=<default>, bool end=<default>, tickvalues modify(tickvalues)=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
-void InTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)(Label format=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, real[] Ticks, real[] ticks=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
-void InTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>);
-void Spline(flatguide3)(... void(flatguide3)[]);
-void InOutTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)(Label format=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, int N=<default>, int n=<default>, real Step=<default>, real step=<default>, bool begin=<default>, bool end=<default>, tickvalues modify(tickvalues)=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
-void InOutTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)(Label format=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, real[] Ticks, real[] ticks=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
-void InOutTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>);
-void axes3(picture pic=<default>, Label xlabel=<default>, Label ylabel=<default>, Label zlabel=<default>, bool extend=<default>, triple min=<default>, triple max=<default>, pen p=<default>, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>);
-void label(picture pic, Label L, triple v, real x, align align, string format, pen p);
-void labelx(picture pic=<default>, Label L=<default>, triple v, align align=<default>, string format=<default>, pen p=<default>);
-void labely(picture pic=<default>, Label L=<default>, triple v, align align=<default>, string format=<default>, pen p=<default>);
-void labeltick(picture pic, real[][] T, path3 g, ticklocate locate, real val, int sign, real Size, string ticklabel(real), Label F, real norm=<default>);
-void labelaxis(picture pic, real[][] T, Label L, path3 g, ticklocate locate=<default>, int sign=<default>, bool ticklabels=<default>);
-void labelx3(picture pic=<default>, Label L=<default>, real x, align align=<default>, string format=<default>, pen p=<default>);
-void labely3(picture pic=<default>, Label L=<default>, real y, align align=<default>, string format=<default>, pen p=<default>);
-void labelz(picture pic=<default>, Label L=<default>, triple v, align align=<default>, string format=<default>, pen p=<default>);
-void labelz3(picture pic=<default>, Label L=<default>, real z, align align=<default>, string format=<default>, pen p=<default>);
-void autoscale3(picture pic=<default>, void axis(picture, axisT));
-void xtick(picture pic=<default>, triple v, triple dir=<default>, real size=<default>, pen p=<default>);
-void xtick(picture pic=<default>, Label L, triple v, triple dir=<default>, string format=<default>, real size=<default>, pen p=<default>);
-void ytick(picture pic=<default>, triple v, triple dir=<default>, real size=<default>, pen p=<default>);
-void ytick(picture pic=<default>, Label L, triple v, triple dir=<default>, string format=<default>, real size=<default>, pen p=<default>);
-void xtick3(picture pic=<default>, real x, triple dir=<default>, real size=<default>, pen p=<default>);
-void xtick3(picture pic=<default>, Label L, real x, triple dir=<default>, string format=<default>, real size=<default>, pen p=<default>);
-void ytick3(picture pic=<default>, real y, triple dir=<default>, real size=<default>, pen p=<default>);
-void ytick3(picture pic=<default>, Label L, real y, triple dir=<default>, string format=<default>, real size=<default>, pen p=<default>);
-void ztick(picture pic=<default>, triple v, triple dir=<default>, real size=<default>, pen p=<default>);
-void ztick(picture pic=<default>, Label L, triple v, triple dir=<default>, string format=<default>, real size=<default>, pen p=<default>);
-void ztick3(picture pic=<default>, real z, triple dir=<default>, real size=<default>, pen p=<default>);
-void ztick3(picture pic=<default>, Label L, real z, triple dir=<default>, string format=<default>, real size=<default>, pen p=<default>);
-triple zero3(real);
-triple defaultdir(triple X, triple Y, triple Z, bool opposite=<default>, projection P);
-real xtrans(real[][] t, real x);
-real ytrans(real[][] t, real y);
-real ztrans(real[][] t, real z);
-ticklocate ticklocate(real a, real b, autoscaleT S=<default>, real tickmin=<default>, real tickmax=<default>, real time(real)=<default>, triple dir(real));
-triple ticklabelshift(triple align, pen p=<default>);
-path3 Arc(triple c, triple v1, triple v2, triple normal=<default>, bool direction=<default>, int n=<default>);
-path3 Arc(triple c, real r, real theta1, real phi1, real theta2, real phi2, triple normal=<default>, bool direction, int n=<default>);
-path3 Arc(triple c, real r, real theta1, real phi1, real theta2, real phi2, triple normal=<default>, int n=<default>);
-void limits(picture pic=<default>, triple min, triple max);
-void XZEquals(picture, axisT)(real x, real z, triple align=<default>, bool extend=<default>);
-void YZEquals(picture, axisT)(real y, real z, triple align=<default>, bool extend=<default>);
-void XYZero(picture, axisT)(triple align=<default>, bool extend=<default>);
-void XYZero(picture, axisT);
-void zlimits(picture pic=<default>, real min=<default>, real max=<default>, bool crop=<default>);
-void tick(picture pic=<default>, triple v, triple dir, real size=<default>, pen p=<default>);
-void tick(picture pic=<default>, Label L, real value, triple v, triple dir, string format=<default>, real size=<default>, pen p=<default>);
-surface bispline(real[][] z, real[][] p, real[][] q, real[][] r, real[] x, real[] y, bool[][] cond=<default>);
-path3[] segment(triple[] v, bool[] cond, void join(flatguide3)(... void(flatguide3)[])=<default>);
-void NoTicks3(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)();
-void NoTicks3(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>);
bool Crop;
int ngraph;
real epsilon;
@@ -3106,16 +3110,16 @@ grid3(picture pic)[] XYXgrid(position pos=<default>);
grid3(picture pic)[] XYXgrid;
grid3(picture pic)[] XY_XZgrid(position posa=<default>, position posb=<default>);
grid3(picture pic)[] XY_XZgrid;
-position middle;
grid3(picture pic)[] ZX_ZYgrid(position posa=<default>, position posb=<default>);
grid3(picture pic)[] ZX_ZYgrid;
+void xaxis3(picture pic=<default>, Label L=<default>, void axis(picture, axisT)=<default>, pen p=<default>, ticksgridT ticks(), bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, bool above=<default>);
+void yaxis3(picture pic=<default>, Label L=<default>, void axis(picture, axisT)=<default>, pen p=<default>, ticksgridT ticks(), bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, bool above=<default>);
+void zaxis3(picture pic=<default>, Label L=<default>, void axis(picture, axisT)=<default>, pen p=<default>, ticksgridT ticks(), bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, bool above=<default>);
grid3 XYgrid(picture pic)(position pos=<default>);
grid3 XYgrid(picture pic);
grid3 ZYgrid(picture pic)(position pos=<default>);
grid3 ZYgrid(picture pic);
-void xaxis3(picture pic=<default>, Label L=<default>, void axis(picture, axisT)=<default>, pen p=<default>, ticksgridT ticks(), bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, bool above=<default>);
-void yaxis3(picture pic=<default>, Label L=<default>, void axis(picture, axisT)=<default>, pen p=<default>, ticksgridT ticks(), bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, bool above=<default>);
-void zaxis3(picture pic=<default>, Label L=<default>, void axis(picture, axisT)=<default>, pen p=<default>, ticksgridT ticks(), bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, bool above=<default>);
+position middle;
void grid3(picture pic=<default>, grid3(picture pic)[][] gridroutine=<default>, int N=<default>, int n=<default>, real Step=<default>, real step=<default>, bool begin=<default>, bool end=<default>, pen pGrid=<default>, pen pgrid=<default>, bool above=<default>);
void grid3(picture pic=<default>, grid3(picture pic)[][] gridroutine, int N=<default>, int n=<default>, real Step=<default>, real step=<default>, bool begin=<default>, bool end=<default>, pen[] pGrid, pen[] pgrid, bool above=<default>);
ticksgridT OutTicks()(Label F=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, int N=<default>, int n=<default>, real Step=<default>, real step=<default>, bool begin=<default>, bool end=<default>, real Size=<default>, real size=<default>, pen pTick=<default>, pen ptick=<default>, grid3(picture pic)[][] gridroutine, pen pGrid=<default>, pen pgrid=<default>);
@@ -3152,16 +3156,16 @@ horner diffdiv(real[] x, real[] y);
horner hdiffdiv(real[] x, real[] y, real[] dy);
horner operator init();
real fhorner(real)(horner sh);
-void labelpath(frame f, Label L, path g, string justify=<default>, pen p=<default>);
-void labelpath(picture pic=<default>, Label L, path g, string justify=<default>, pen p=<default>);
-string LeftJustified;
-string Centered;
-string RightJustified;
surface labelpath(string s, path3 p, real angle=<default>, triple optional=<default>);
triple[] firstframe(path3 p, triple optional=<default>);
triple[] nextframe(path3 p, real reltimestart, triple[] start, real reltimeend, int subdiv=<default>);
real eps;
triple nextnormal(triple p, triple q);
+void labelpath(frame f, Label L, path g, string justify=<default>, pen p=<default>);
+void labelpath(picture pic=<default>, Label L, path g, string justify=<default>, pen p=<default>);
+string LeftJustified;
+string Centered;
+string RightJustified;
string[] lm_infmsg;
void lm_qrfac(int m, int n, real[] a, bool pivot, int[] ipvt, real[] rdiag, real[] acnorm, real[] wa);
void lm_qrsolv(int n, real[] r, int ldr, int[] ipvt, real[] diag, real[] qtb, real[] x, real[] sdiag, real[] wa);
@@ -3248,13 +3252,13 @@ bool rectangular(pair[][] m);
bool rectangular(triple[][] m);
bool polygon(path p);
pair unityroot(int n, int k=<default>);
+int[][] segmentlimits(bool[] b);
+int[][] segment(bool[] b);
real acot(real x);
pair[][] fft(pair[][] a, int sign=<default>);
real slope(path g, real x, int n=<default>);
real slope(path g, explicit pair z, int n=<default>);
picture grid(int Nx, int Ny, pen p=<default>);
-int[][] segmentlimits(bool[] b);
-int[][] segment(bool[] b);
real frac(real x);
real asec(real x);
real time(path g, real x, int n=<default>);
@@ -3279,7 +3283,7 @@ RKTableau E_Euler;
real error(real error, real initial, real lowOrder, real norm, real diff);
RKTableau RK5;
real stepfactor;
-solution integrate(real y, real c=<default>, real g(real t, real y), real a, real b=<default>, real h=<default>, int n=<default>, bool dynamic=<default>, real tolmin=<default>, real tolmax=<default>, real dtmin=<default>, real dtmax=<default>, RKTableau tableau, bool verbose=<default>);
+solution integrate(real y, real c=<default>, real f(real t, real y), real a, real b=<default>, real h=<default>, int n=<default>, bool dynamic=<default>, real tolmin=<default>, real tolmax=<default>, real dtmin=<default>, real dtmax=<default>, RKTableau tableau, bool verbose=<default>);
Solution integrate(real[] y, real[] f(real t, real[] y), real a, real b=<default>, real h=<default>, int n=<default>, bool dynamic=<default>, real tolmin=<default>, real tolmax=<default>, real dtmin=<default>, real dtmax=<default>, RKTableau tableau, bool verbose=<default>);
RKTableau RK4;
real[] newton(int iterations=<default>, real[] f(real[]), real[][] jacobian(real[]), real[] t);
@@ -3394,8 +3398,8 @@ pen backgroundcolor;
void normalvideo();
void title(string s, pair position=<default>, pair align=<default>, pen p=<default>, bool newslide=<default>);
pen titlepen;
-void nextpage(pen p=<default>);
real titleskip;
+void nextpage(pen p=<default>);
pair dateskip;
pair titlealign;
pen titlepagepen;
@@ -3422,8 +3426,8 @@ void incrementposition(pair z);
pen institutionpen;
void skip(real n=<default>);
bool stepping;
-void item(string s, pen p=<default>, bool step=<default>);
real pagemargin;
+void item(string s, pen p=<default>, bool step=<default>);
pen steppagenumberpen;
bool empty();
void currentexitfunction();
@@ -3449,6 +3453,60 @@ path curve(pair c, real f(real, real), pair a, pair b);
path curve(pair c, real f(real), pair a, pair b);
picture slopefield(real f(real, real), pair a, pair b, int nx=<default>, int ny=<default>, real tickfactor=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>);
picture slopefield(real f(real), pair a, pair b, int nx=<default>, int ny=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>);
+real[] apply(real[][] matrix, real[] v);
+real[] applytranspose(real[][] matrix, real[] v);
+real B23(real t);
+path3 pathinface(positionedvector v1, positionedvector v2, triple facenorm, triple edge1normout, triple edge2normout);
+path3 pathinface(positionedvector v1, positionedvector v2, int face, int edge1face, int edge2face);
+path3 bisector(path3 edgecycle, int[] savevertices);
+int XHIGH;
+int YHIGH;
+int ZHIGH;
+real B03(real t);
+real[][] AtA(real[][] matrix);
+real(real)[] bernstein;
+path3 pathbetween(positionedvector v1, positionedvector v2);
+path3 pathbetween(path3 edgecycle, int vertex1, int vertex2);
+patch patchwithnormals(path3 external, triple[] u0normals, triple[] u1normals, triple[] v0normals, triple[] v1normals);
+patch patchwithnormals(path3 external, triple normalat(triple));
+real angledegrees(triple a, triple b);
+triple projecttospan(triple toproject, triple v1, triple v2, real mincoeff=<default>);
+real[] projecttospan_findcoeffs(triple toproject, triple v1, triple v2, bool warn=<default>);
+triple nGrad(triple)(real f(triple));
+triple normalout(int face);
+patch[] quadpatches(path3 edgecycle, positionedvector[] corners, real f(triple), triple grad(triple), triple a, triple b);
+int NULL_VERTEX;
+int[] makecircle(edge[] edges);
+real B13(real t);
+bool check_fpt_zero(triple testpoint, real f(triple), triple grad(triple));
+bool checkptincube(triple pt, triple a, triple b);
+bool checkpt(triple testpt, real f(triple), triple grad(triple), triple a, triple b);
+int XLOW;
+int YLOW;
+int ZLOW;
+pathwithnormals_settings operator init();
+rootfinder_settings operator init();
+intset operator init();
+int_to_intset operator init();
+edge operator init();
+positionedvector operator init();
+evaluatedpoint operator init();
+gridwithzeros operator init();
+surface implicitsurface(real f(triple)=<default>, real ff(real, real, real)=<default>, triple a, triple b, int n=<default>, bool keyword overlapedges=<default>, int keyword nx=<default>, int keyword ny=<default>, int keyword nz=<default>, int keyword maxdepth=<default>);
+string operator cast(edge e);
+string operator cast(edge[] edges);
+string operator cast(positionedvector vv);
+triple operator cast(evaluatedpoint p);
+bool operator ==(edge a, edge b);
+patch[] triangletoquads(path3 external, real f(triple), triple grad(triple), triple a, triple b);
+real[] leastsquares(real[][] A, real[] b, bool warn=<default>);
+evaluatedpoint[][][] make3dgrid(triple a, triple b, int nx, int ny, int nz, real f(triple), bool allowzero=<default>);
+real B33(real t);
+evaluatedpoint[][] slice(evaluatedpoint[][] a, int start1, int end1, int start2, int end2);
+evaluatedpoint[][][] slice(evaluatedpoint[][][] a, int start1, int end1, int start2, int end2, int start3, int end3);
+positionedvector[][] slice(positionedvector[][] a, int start1, int end1, int start2, int end2);
+positionedvector[][][] slice(positionedvector[][][] a, int start1, int end1, int start2, int end2, int start3, int end3);
+real findroot(real f(real), real a, real b, real tolerance=<default>, real fa=<default>, real fb=<default>);
revolution operator *(real[][] t, revolution r);
skeleton operator init();
revolution operator init();
@@ -3461,8 +3519,6 @@ pen defaultbackpen;
path[] cylinder(path3 base, real h, triple axis=<default>, projection P);
revolution cylinder(triple c=<default>, real r, real h, triple axis=<default>);
revolution cone(triple c=<default>, real r, real h, triple axis=<default>, int n=<default>);
-void histogram(picture pic=<default>, real[] bins, real[] count, real low=<default>, pen fillpen=<default>, pen drawpen=<default>, bool bars=<default>, Label legend=<default>, real markersize=<default>);
-void histogram(picture pic=<default>, real[] data, real a, real b, int n, bool normalize=<default>, real low=<default>, pen fillpen=<default>, pen drawpen=<default>, bool bars=<default>, Label legend=<default>, real markersize=<default>);
real rms(real[] A);
int[] frequency(real[] data, real[] bins);
int[] frequency(real[] data, real a, real b, int n);
@@ -3472,28 +3528,33 @@ int[][] frequency(pair[] z, pair a, pair b, int nx, int ny=<default>);
real mean(real[] A);
int bins(real[] data, int max=<default>);
path topbox(pair a, pair b);
-real stdev(real[] A);
+void histogram(picture pic=<default>, real[] bins, real[] count, real low=<default>, pen fillpen=<default>, pen drawpen=<default>, bool bars=<default>, Label legend=<default>, real markersize=<default>);
+void histogram(picture pic=<default>, real[] data, real a, real b, int n, bool normalize=<default>, real low=<default>, pen fillpen=<default>, pen drawpen=<default>, bool bars=<default>, Label legend=<default>, real markersize=<default>);
path halfbox(pair a, pair b);
+real stdev(real[] A);
real variance(real[] A);
real legendmarkersize;
real variancebiased(real[] A);
-real Gaussian(real x, real sigma);
-real Gaussian(real x);
-pair Gaussrandpair();
-real Gaussrand();
linefit operator init();
real skewness(real[] A);
linefit leastsquares(real[] x, real[] y);
real kurtosis(real[] A);
real kurtosisexcess(real[] A);
+real Gaussian(real x, real sigma);
+real Gaussian(real x);
+pair Gaussrandpair();
+real Gaussrand();
+Component wye;
pair[] endpoints(guide[] a);
+Braid apply(Relation r, Braid b, int step, int place);
+real hwratio;
Relation r3;
+Relation r4a;
picture tableau(frame[] cards, bool number=<default>);
pair min(pair[] z);
Component bp;
Component phi;
real gapfactor;
-Braid apply(Relation r, Braid b, int step, int place);
Component bm;
Relation operator -(Relation r);
Component operator init();
@@ -3501,37 +3562,37 @@ Braid operator init();
Relation operator init();
Syzygy operator init();
Relation r4b;
-Component wye;
-real hwratio;
-Relation r4a;
pair max(pair[] z);
pen Orchid;
pen Magenta;
+pen VioletRed;
pen BrickRed;
-pen Salmon;
+pen Violet;
pen CadetBlue;
pen CarnationPink;
pen SpringGreen;
pen MidnightBlue;
pen OliveGreen;
+pen Thistle;
pen Apricot;
pen Cyan;
+pen DarkOrchid;
pen Red;
pen RawSienna;
pen Mahogany;
+pen WildStrawberry;
pen Gray;
pen Plum;
pen BlueGreen;
pen Cerulean;
-pen Aquamarine;
pen Blue;
pen BlueViolet;
pen RedOrange;
pen Goldenrod;
pen ForestGreen;
-pen Lavender;
pen BurntOrange;
pen Tan;
+pen Salmon;
pen Brown;
pen RubineRed;
pen TealBlue;
@@ -3544,34 +3605,31 @@ pen Fuchsia;
pen Peach;
pen PineGreen;
pen Dandelion;
-pen YellowOrange;
-pen Maroon;
-pen YellowGreen;
pen Black;
pen NavyBlue;
pen Rhodamine;
pen ProcessBlue;
-pen Sepia;
pen LimeGreen;
+pen Aquamarine;
pen Green;
pen GreenYellow;
-pen VioletRed;
-pen Violet;
+pen Lavender;
pen Emerald;
pen Mulberry;
pen RedViolet;
pen SkyBlue;
pen SeaGreen;
-pen Thistle;
pen Periwinkle;
-pen DarkOrchid;
+pen YellowOrange;
+pen Maroon;
+pen YellowGreen;
pen Yellow;
-pen WildStrawberry;
pen JungleGreen;
pen CornflowerBlue;
pen RoyalBlue;
pen Melon;
pen RoyalPurple;
+pen Sepia;
pen Turquoise;
int lookup(tree t, int key);
tree newtree();
@@ -3598,30 +3656,32 @@ real degrees(rmf a, rmf b);
string VERSION;
pen Orchid;
pen Indigo;
-pen GhostWhite;
pen Beige;
pen SlateBlue;
pen SlateGray;
+pen SandyBrown;
pen Magenta;
-pen Salmon;
+pen Violet;
pen CadetBlue;
pen DeepPink;
+pen DeepSkyBlue;
pen SpringGreen;
pen MidnightBlue;
-pen LavenderBlush;
pen Olive;
-pen Wheat;
pen OliveDrab;
+pen Thistle;
pen Chocolate;
+pen Cornsilk;
pen Cyan;
pen Gainsboro;
-pen SteelBlue;
+pen DarkOrchid;
pen Ivory;
pen PapayaWhip;
pen Red;
pen Pink;
pen MintCream;
pen DarkTurquoise;
+pen Seashell;
pen Gray;
pen MediumBlue;
pen MediumOrchid;
@@ -3632,17 +3692,14 @@ pen MediumAquamarine;
pen MediumSpringGreen;
pen MediumTurquoise;
pen MediumVioletRed;
+pen GhostWhite;
pen Plum;
-pen LemonChiffon;
-pen Aquamarine;
pen Blue;
pen Sienna;
pen Gold;
pen BlueViolet;
pen Goldenrod;
pen ForestGreen;
-pen Lavender;
-pen Aqua;
pen Chartreuse;
pen NavajoWhite;
pen Tan;
@@ -3650,8 +3707,11 @@ pen DarkMagenta;
pen AntiqueWhite;
pen PaleTurquoise;
pen IndianRed;
+pen LavenderBlush;
pen Crimson;
+pen Wheat;
pen Azure;
+pen Salmon;
pen LawnGreen;
pen Brown;
pen BurlyWood;
@@ -3665,29 +3725,27 @@ pen DimGray;
pen Orange;
pen OrangeRed;
pen Fuchsia;
+pen SteelBlue;
pen PeachPuff;
pen Honeydew;
-pen Maroon;
pen Bisque;
-pen YellowGreen;
pen RosyBrown;
pen Black;
pen Khaki;
pen FireBrick;
+pen LemonChiffon;
pen Snow;
-pen DarkOliveGreen;
-pen DarkOrange;
pen LimeGreen;
+pen Aqua;
pen Lime;
+pen Aquamarine;
pen OldLace;
-pen Silver;
pen Green;
pen GreenYellow;
+pen Lavender;
pen DarkCyan;
pen FloralWhite;
-pen Violet;
pen DarkRed;
-pen SandyBrown;
pen BlanchedAlmond;
pen PowderBlue;
pen DarkGray;
@@ -3696,23 +3754,23 @@ pen DarkGoldenrod;
pen SkyBlue;
pen SeaGreen;
pen DarkViolet;
-pen Thistle;
pen Teal;
pen AliceBlue;
-pen DeepSkyBlue;
pen HotPink;
pen DodgerBlue;
pen SaddleBrown;
pen Tomato;
pen DarkKhaki;
-pen DarkOrchid;
+pen Maroon;
+pen YellowGreen;
pen LightBlue;
pen LightCoral;
-pen Cornsilk;
pen LightCyan;
pen Yellow;
pen LightGreen;
+pen DarkOliveGreen;
pen PaleGreen;
+pen DarkOrange;
pen Linen;
pen LightGoldenrodYellow;
pen LightGrey;
@@ -3725,12 +3783,12 @@ pen LightSkyBlue;
pen LightSlateGray;
pen PaleVioletRed;
pen LightSteelBlue;
-pen LightYellow;
pen CornflowerBlue;
+pen LightYellow;
pen rgbint(int r, int g, int b);
pen Coral;
pen MistyRose;
-pen Seashell;
+pen Silver;
pen DarkSalmon;
pen DarkSeaGreen;
pen RoyalBlue;
diff --git a/Build/source/utils/asymptote/asymptote.spec b/Build/source/utils/asymptote/asymptote.spec
index b5f67a7994c..1ed3a2cef46 100644
--- a/Build/source/utils/asymptote/asymptote.spec
+++ b/Build/source/utils/asymptote/asymptote.spec
@@ -1,7 +1,7 @@
%{!?_texmf: %define _texmf %(eval "echo `kpsewhich -expand-var '$TEXMFLOCAL'`")}
Name: asymptote
-Version: 2.31
+Version: 2.33
Release: 1%{?dist}
Summary: Descriptive vector graphics language
diff --git a/Build/source/utils/asymptote/base/geometry.asy b/Build/source/utils/asymptote/base/geometry.asy
index 6dc10674bd9..580c49e2e69 100644
--- a/Build/source/utils/asymptote/base/geometry.asy
+++ b/Build/source/utils/asymptote/base/geometry.asy
@@ -7182,7 +7182,9 @@ void perpendicular(picture pic = currentpicture, pair z, pair align, path g,
// If r < 0, return the corresponding exterior arc of radius |r|.
path arc(explicit pair B, explicit pair A, explicit pair C, real r)
{
- return arc(A, r, degrees(B - A), degrees(C - A));
+ real BA = degrees(B - A);
+ real CA = degrees(C - A);
+ return arc(A, abs(r), BA, CA, (r < 0) ^ ((BA-CA) % 360 < 180) ? CW : CCW);
}
// *.......End of compatibility routines........*
diff --git a/Build/source/utils/asymptote/base/ode.asy b/Build/source/utils/asymptote/base/ode.asy
index 0b88060e081..712196a3018 100644
--- a/Build/source/utils/asymptote/base/ode.asy
+++ b/Build/source/utils/asymptote/base/ode.asy
@@ -258,7 +258,7 @@ void write(solution S)
// Integrate dy/dt+cy=f(t,y) from a to b using initial conditions y,
// specifying either the step size h or the number of steps n.
-solution integrate(real y, real c=0, real g(real t, real y), real a, real b=a,
+solution integrate(real y, real c=0, real f(real t, real y), real a, real b=a,
real h=0, int n=0, bool dynamic=false, real tolmin=0,
real tolmax=0, real dtmin=0, real dtmax=realMax,
RKTableau tableau, bool verbose=false)
@@ -273,8 +273,8 @@ solution integrate(real y, real c=0, real g(real t, real y), real a, real b=a,
else h=(b-a)/n;
}
- real f(real t, real y)=(c == 0 || tableau.exponential) ? g :
- new real(real t, real y) {return g(t,y)-c*y;};
+ real F(real t, real y)=(c == 0 || tableau.exponential) ? f :
+ new real(real t, real y) {return f(t,y)-c*y;};
tableau.stepDependence(h,c,tableau.a);
@@ -283,7 +283,7 @@ solution integrate(real y, real c=0, real g(real t, real y), real a, real b=a,
if(tableau.a.lowOrderWeights.length == 0) dynamic=false;
bool fsal=dynamic &&
(tableau.a.lowOrderWeights.length > tableau.a.highOrderWeights.length);
- if(fsal) f0=f(t,y);
+ if(fsal) f0=F(t,y);
real dt=h;
while(t < b) {
@@ -295,9 +295,9 @@ solution integrate(real y, real c=0, real g(real t, real y), real a, real b=a,
dt=h;
}
- real[] predictions={fsal ? f0 : f(t,y)};
+ real[] predictions={fsal ? f0 : F(t,y)};
for(int i=0; i < tableau.a.steps.length; ++i)
- predictions.push(f(t+h*tableau.a.steps[i],
+ predictions.push(F(t+h*tableau.a.steps[i],
tableau.a.factors[i]*y+h*dot(tableau.a.weights[i],
predictions)));
@@ -306,7 +306,7 @@ solution integrate(real y, real c=0, real g(real t, real y), real a, real b=a,
if(dynamic) {
real f1;
if(fsal) {
- f1=f(t+h,y0+highOrder);
+ f1=F(t+h,y0+highOrder);
predictions.push(f1);
}
real lowOrder=h*dot(tableau.a.lowOrderWeights,predictions);
diff --git a/Build/source/utils/asymptote/base/palette.asy b/Build/source/utils/asymptote/base/palette.asy
index 62ca83f1c9a..96bbf1550ec 100644
--- a/Build/source/utils/asymptote/base/palette.asy
+++ b/Build/source/utils/asymptote/base/palette.asy
@@ -118,11 +118,11 @@ bounds image(picture pic=currentpicture, real f(real, real),
real ymax=pic.scale.y.T(final.y);
real[][] data=new real[ny][nx];
for(int j=0; j < ny; ++j) {
- real y=pic.scale.y.Tinv(interp(ymin,ymax,(j+0.5)/nx));
+ real y=pic.scale.y.Tinv(interp(ymin,ymax,(j+0.5)/ny));
scalefcn Tinv=pic.scale.x.Tinv;
// Take center point of each bin
data[j]=sequence(new real(int i) {
- return f(Tinv(interp(xmin,xmax,(i+0.5)/ny)),y);
+ return f(Tinv(interp(xmin,xmax,(i+0.5)/nx)),y);
},nx);
}
return image(pic,data,range,initial,final,palette,transpose=false,
diff --git a/Build/source/utils/asymptote/base/plain_arrows.asy b/Build/source/utils/asymptote/base/plain_arrows.asy
index d4220103ce0..d7d79217dd4 100644
--- a/Build/source/utils/asymptote/base/plain_arrows.asy
+++ b/Build/source/utils/asymptote/base/plain_arrows.asy
@@ -83,17 +83,9 @@ SimpleHead.head=new path(path g, position position=EndPoint, pen p=currentpen,
path r=subpath(g,position,0);
pair x=point(r,0);
real t=arctime(r,size);
- pair y=point(r,t);
- path base=arrowbase(r,y,t,size);
path left=rotate(-angle,x)*r;
path right=rotate(angle,x)*r;
- real[] T=arrowbasepoints(base,left,right,1);
- pair denom=point(right,T[1])-y;
- real factor=denom != 0 ? length((point(left,T[0])-y)/denom) : 1;
- path left=rotate(-angle*factor,x)*r;
- path right=rotate(angle*factor,x)*r;
- real[] T=arrowbasepoints(base,left,right,1);
- return subpath(left,T[0],0)--subpath(right,0,T[1]);
+ return subpath(left,t,0)--subpath(right,0,t);
};
arrowhead HookHead(real dir=arrowdir, real barb=arrowbarb)
diff --git a/Build/source/utils/asymptote/base/slide.asy b/Build/source/utils/asymptote/base/slide.asy
index 0a3e0f65fab..433426c2f37 100644
--- a/Build/source/utils/asymptote/base/slide.asy
+++ b/Build/source/utils/asymptote/base/slide.asy
@@ -432,10 +432,13 @@ void indexedfigure(string prefix, int first, int last,
pair align=S, pen p=itempen, pen figuremattpen=figuremattpen,
bool step=itemstep)
{
+ bool Stepping=stepping;
+ stepping=true;
string[] s;
for(int i=first; i <= last; ++i)
s.push(prefix+string(i));
multifigure(s,options,caption,align,p,figuremattpen,step=step);
+ stepping=Stepping;
}
string[] codefile;
diff --git a/Build/source/utils/asymptote/base/smoothcontour3.asy b/Build/source/utils/asymptote/base/smoothcontour3.asy
new file mode 100644
index 00000000000..216f3269d92
--- /dev/null
+++ b/Build/source/utils/asymptote/base/smoothcontour3.asy
@@ -0,0 +1,1563 @@
+// Copyright 2015 Charles Staats III
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// smoothcontour3
+// An Asymptote module for drawing smooth implicitly defined surfaces
+// author: Charles Staats III
+// charles dot staats dot iii at gmail dot com
+
+import graph_settings; // for nmesh
+import three;
+
+/***********************************************/
+/******** LINEAR ALGEBRA ROUTINES **************/
+/******** LEAST-SQUARES **************/
+/***********************************************/
+
+// Apply a matrix to a vector.
+real[] apply(real[][] matrix, real[] v) {
+ real[] ans = new real[matrix.length];
+ for (int r = 0; r < matrix.length; ++r) {
+ ans[r] = 0;
+ for (int c = 0; c < v.length; ++c) {
+ ans[r] += matrix[r][c] * v[c];
+ }
+ }
+ return ans;
+}
+
+// Apply the transpose of a matrix to a vector,
+// without actually forming the transpose.
+real[] applytranspose(real[][] matrix, real[] v) {
+ real[] ans = new real[matrix[0].length];
+ for (int r = 0; r < ans.length; ++r) ans[r] = 0;
+ for (int c = 0; c < matrix.length; ++c) {
+ for (int r = 0; r < ans.length; ++r) {
+ ans[r] += matrix[c][r] * v[c];
+ }
+ }
+ return ans;
+}
+
+// For a matrix A, returns the matrix product
+// (A transposed) * A.
+// The transpose of A is never actually formed.
+real[][] AtA(real[][] matrix) {
+ real[][] toreturn = new real[matrix[0].length][matrix[0].length];
+ for (int i = 0; i < toreturn.length; ++i) {
+ for (int j = 0; j < toreturn.length; ++j) {
+ toreturn [i][j] = 0;
+ }
+ }
+ for (int k = 0; k < matrix.length; ++k) {
+ for (int i = 0; i < toreturn.length; ++i) {
+ for (int j = 0; j < toreturn.length; ++j) {
+ toreturn[i][j] += matrix[k][i] * matrix[k][j];
+ }
+ }
+ }
+ return toreturn;
+}
+
+// Assuming A is a matrix with independent columns, returns
+// the unique vector y minimizing |Ay - b|^2 (the L2 norm).
+// If the columns of A are not linearly independent,
+// throws an error (if warn == true) or returns an empty array
+// (if warn == false).
+real[] leastsquares(real[][] A, real[] b, bool warn = true) {
+ real[] solution = solve(AtA(A), applytranspose(A, b), warn=false);
+ if (solution.length == 0 && warn)
+ abort("Cannot compute least-squares approximation for " +
+ "a matrix with linearly dependent columns.");
+ return solution;
+}
+
+/***********************************************/
+/******** CREATING BEZIER PATCHES **************/
+/******** WITH SPECIFIED NORMALS **************/
+/***********************************************/
+
+// The weight given to minimizing the sum of squares of
+// the mixed partials at the corners of the bezier patch.
+// If this weight is zero, the result is undefined in
+// places and can be rather wild even where it is
+// defined.
+// The struct is used to as a namespace.
+struct pathwithnormals_settings {
+ static real wildnessweight = 1e-3;
+}
+private from pathwithnormals_settings unravel wildnessweight;
+
+// The Bernstein basis polynomials of degree 3:
+real B03(real t) { return (1-t)^3; }
+real B13(real t) { return 3*t*(1-t)^2; }
+real B23(real t) { return 3*t^2*(1-t); }
+real B33(real t) { return t^3; }
+
+private typedef real function(real);
+function[] bernstein = new function[] {B03, B13, B23, B33};
+
+// This function attempts to produce a Bezier patch
+// with the specified boundary path and normal directions.
+// For instance, the patch should be normal to
+// u0normals[0] at (0, 0.25),
+// normal to u0normals[1] at (0, 0.5), and
+// normal to u0normals[2] at (0, 0.75).
+// The actual normal (as computed by the patch.normal() function)
+// may be parallel to the specified normal, antiparallel, or
+// even zero.
+//
+// A small amount of deviation is allowed in order to stabilize
+// the algorithm (by keeping the mixed partials at the corners from
+// growing too large).
+//
+// Note that the specified normals are projected to be orthogonal to
+// the specified boundary path. However, the entries in the array
+// remain intact.
+patch patchwithnormals(path3 external, triple[] u0normals, triple[] u1normals,
+ triple[] v0normals, triple[] v1normals)
+{
+ assert(cyclic(external));
+ assert(length(external) == 4);
+ assert(u0normals.length == 3);
+ assert(u1normals.length == 3);
+ assert(v0normals.length == 3);
+ assert(v1normals.length == 3);
+
+ triple[][] controlpoints = new triple[4][4];
+ controlpoints[0][0] = point(external,0);
+ controlpoints[1][0] = postcontrol(external,0);
+ controlpoints[2][0] = precontrol(external,1);
+ controlpoints[3][0] = point(external,1);
+ controlpoints[3][1] = postcontrol(external,1);
+ controlpoints[3][2] = precontrol(external,2);
+ controlpoints[3][3] = point(external,2);
+ controlpoints[2][3] = postcontrol(external,2);
+ controlpoints[1][3] = precontrol(external,3);
+ controlpoints[0][3] = point(external,3);
+ controlpoints[0][2] = postcontrol(external,3);
+ controlpoints[0][1] = precontrol(external, 4);
+
+ real[][] matrix = new real[24][12];
+ for (int i = 0; i < matrix.length; ++i)
+ for (int j = 0; j < matrix[i].length; ++j)
+ matrix[i][j] = 0;
+ real[] rightvector = new real[24];
+ for (int i = 0; i < rightvector.length; ++i)
+ rightvector[i] = 0;
+
+ void addtocoeff(int i, int j, int count, triple coeffs) {
+ if (1 <= i && i <= 2 && 1 <= j && j <= 2) {
+ int position = 3 * (2 * (i-1) + (j-1));
+ matrix[count][position] += coeffs.x;
+ matrix[count][position+1] += coeffs.y;
+ matrix[count][position+2] += coeffs.z;
+ } else {
+ rightvector[count] -= dot(controlpoints[i][j], coeffs);
+ }
+ }
+
+ void addtocoeff(int i, int j, int count, real coeff) {
+ if (1 <= i && i <= 2 && 1 <= j && j <= 2) {
+ int position = 3 * (2 * (i-1) + (j-1));
+ matrix[count][position] += coeff;
+ matrix[count+1][position+1] += coeff;
+ matrix[count+2][position+2] += coeff;
+ } else {
+ rightvector[count] -= controlpoints[i][j].x * coeff;
+ rightvector[count+1] -= controlpoints[i][j].y * coeff;
+ rightvector[count+2] -= controlpoints[i][j].z * coeff;
+ }
+ }
+
+ int count = 0;
+
+ void apply_u0(int j, real a, triple n) {
+ real factor = 3 * bernstein[j](a);
+ addtocoeff(0,j,count,-factor*n);
+ addtocoeff(1,j,count,factor*n);
+ }
+ void apply_u0(real a, triple n) {
+ triple tangent = dir(external, 4-a);
+ n -= dot(n,tangent)*tangent;
+ n = unit(n);
+ for (int j = 0; j < 4; ++j) {
+ apply_u0(j,a,n);
+ }
+ ++count;
+ }
+ apply_u0(0.25, u0normals[0]);
+ apply_u0(0.5, u0normals[1]);
+ apply_u0(0.75, u0normals[2]);
+
+ void apply_u1(int j, real a, triple n) {
+ real factor = 3 * bernstein[j](a);
+ addtocoeff(3,j,count,factor*n);
+ addtocoeff(2,j,count,-factor*n);
+ }
+ void apply_u1(real a, triple n) {
+ triple tangent = dir(external, 1+a);
+ n -= dot(n,tangent)*tangent;
+ n = unit(n);
+ for (int j = 0; j < 4; ++j)
+ apply_u1(j,a,n);
+ ++count;
+ }
+ apply_u1(0.25, u1normals[0]);
+ apply_u1(0.5, u1normals[1]);
+ apply_u1(0.75, u1normals[2]);
+
+ void apply_v0(int i, real a, triple n) {
+ real factor = 3 * bernstein[i](a);
+ addtocoeff(i,0,count,-factor*n);
+ addtocoeff(i,1,count,factor*n);
+ }
+ void apply_v0(real a, triple n) {
+ triple tangent = dir(external, a);
+ n -= dot(n,tangent) * tangent;
+ n = unit(n);
+ for (int i = 0; i < 4; ++i)
+ apply_v0(i,a,n);
+ ++count;
+ }
+ apply_v0(0.25, v0normals[0]);
+ apply_v0(0.5, v0normals[1]);
+ apply_v0(0.75, v0normals[2]);
+
+ void apply_v1(int i, real a, triple n) {
+ real factor = 3 * bernstein[i](a);
+ addtocoeff(i,3,count,factor*n);
+ addtocoeff(i,2,count,-factor*n);
+ }
+ void apply_v1(real a, triple n) {
+ triple tangent = dir(external, 3-a);
+ n -= dot(n,tangent)*tangent;
+ n = unit(n);
+ for (int i = 0; i < 4; ++i)
+ apply_v1(i,a,n);
+ ++count;
+ }
+ apply_v1(0.25, v1normals[0]);
+ apply_v1(0.5, v1normals[1]);
+ apply_v1(0.75, v1normals[2]);
+
+ addtocoeff(0,0,count,9*wildnessweight);
+ addtocoeff(1,1,count,9*wildnessweight);
+ addtocoeff(0,1,count,-9*wildnessweight);
+ addtocoeff(1,0,count,-9*wildnessweight);
+ count+=3;
+ addtocoeff(3,3,count,9*wildnessweight);
+ addtocoeff(2,2,count,9*wildnessweight);
+ addtocoeff(3,2,count,-9*wildnessweight);
+ addtocoeff(2,3,count,-9*wildnessweight);
+ count+=3;
+ addtocoeff(0,3,count,9*wildnessweight);
+ addtocoeff(1,2,count,9*wildnessweight);
+ addtocoeff(1,3,count,-9*wildnessweight);
+ addtocoeff(0,2,count,-9*wildnessweight);
+ count += 3;
+ addtocoeff(3,0,count,9*wildnessweight);
+ addtocoeff(2,1,count,9*wildnessweight);
+ addtocoeff(3,1,count,-9*wildnessweight);
+ addtocoeff(2,0,count,-9*wildnessweight);
+ count += 3;
+
+ real[] solution = leastsquares(matrix, rightvector, warn=false);
+ if (solution.length == 0) { // if the matrix was singular
+ write("Warning: unable to solve matrix for specifying normals "
+ + "on bezier patch. Using standard method.");
+ return patch(external);
+ }
+
+ for (int i = 1; i <= 2; ++i) {
+ for (int j = 1; j <= 2; ++j) {
+ int position = 3 * (2 * (i-1) + (j-1));
+ controlpoints[i][j] = (solution[position],
+ solution[position+1],
+ solution[position+2]);
+ }
+ }
+
+ return patch(controlpoints);
+}
+
+// A wrapper for the previous function when the normal direction
+// is given as a function of direction. The wrapper can also
+// accommodate cyclic boundary paths of between one and four
+// segments, although the results are best by far when there
+// are four segments.
+patch patchwithnormals(path3 external, triple normalat(triple)) {
+ assert(cyclic(external));
+ assert(1 <= length(external) && length(external) <= 4);
+ while (length(external) < 4) external = external -- cycle;
+ triple[] u0normals = new triple[3];
+ triple[] u1normals = new triple[3];
+ triple[] v0normals = new triple[3];
+ triple[] v1normals = new triple[3];
+ for (int i = 1; i <= 3; ++i) {
+ v0normals[i-1] = unit(normalat(point(external, i/4)));
+ u1normals[i-1] = unit(normalat(point(external, 1 + i/4)));
+ v1normals[i-1] = unit(normalat(point(external, 3 - i/4)));
+ u0normals[i-1] = unit(normalat(point(external, 4 - i/4)));
+ }
+ return patchwithnormals(external, u0normals, u1normals, v0normals, v1normals);
+}
+
+/***********************************************/
+/*********** ROOT-FINDER UTILITY ***************/
+/***********************************************/
+
+// Namespace
+struct rootfinder_settings {
+ static real roottolerance = 1e-4;
+}
+
+// Find a root for the specified continuous (but not
+// necessarily differentiable) function. Whatever
+// value t is returned, it is guaranteed that either
+// t is within tolerance of a sign change, or
+// abs(f(t)) <= 0.1 tolerance.
+// An error is thrown if fa and fb are both positive
+// or both negative.
+//
+// In the current implementation, binary search is interleaved
+// with a modified version of linear interpolation.
+real findroot(real f(real), real a, real b,
+ real tolerance = rootfinder_settings.roottolerance,
+ real fa = f(a), real fb = f(b))
+{
+ if (fa == 0) return a;
+ if (fb == 0) return b;
+ real g(real);
+ if (fa < 0) {
+ assert(fb > 0);
+ g = f;
+ } else {
+ assert(fb < 0);
+ fa = -fa;
+ fb = -fb;
+ g = new real(real t) { return -f(t); };
+ }
+
+ real t = a;
+ real ft = fa;
+
+ while (b - a > tolerance && abs(ft) > 0.1*tolerance) {
+ t = a + (b - a) / 2;
+ ft = g(t);
+ if (ft == 0) return t;
+ else if (ft > 0) {
+ b = t;
+ fb = ft;
+ } else if (ft < 0) {
+ a = t;
+ fa = ft;
+ }
+
+ // linear interpolation
+ t = a - (b - a) / (fb - fa) * fa;
+
+ // If the interpolated value is close to one edge of
+ // the interval, move it farther away from the edge in
+ // an effort to catch the root in the middle.
+ if (t - a < (b-a)/8) t = a + 2*(t-a);
+ else if (b - t < (b-a)/8) t = b - 2*(b-t);
+
+ assert(t >= a && t <= b);
+
+ ft = g(t);
+ if (ft == 0) return t;
+ else if (ft > 0) {
+ b = t;
+ fb = ft;
+ } else if (ft < 0) {
+ a = t;
+ fa = ft;
+ }
+
+ }
+ return a - (b - a) / (fb - fa) * fa;
+}
+
+/***********************************************/
+/********* DUAL CUBE GRAPH UTILITY *************/
+/***********************************************/
+
+// Suppose a plane intersects a (hollow) cube, and
+// does not intersect any vertices. Then its intersection
+// with cube forms a cycle. The goal of the code below
+// is to reconstruct the order of the cycle
+// given only an unordered list of which edges the plane
+// intersects.
+//
+// Basically, the question is this: If we know the points
+// in which a more-or-less planar surface intersects the
+// edges of cube, how do we connect those points?
+//
+// When I wrote the code, I was thinking in terms of the
+// dual graph of a cube, in which "vertices" are really
+// faces of the cube and "edges" connect those "vertices."
+
+// An enum for the different "vertices" (i.e. faces)
+// available. NULL_VERTEX is primarily intended as a
+// return value to indicate the absence of a desired
+// vertex.
+private int NULL_VERTEX = -1;
+private int XHIGH = 0;
+private int XLOW = 1;
+private int YHIGH = 2;
+private int YLOW = 3;
+private int ZHIGH = 4;
+private int ZLOW = 5;
+
+// An unordered set of nonnegative integers.
+// Since the intent is to use
+// only the six values from the enum above, no effort
+// was made to use scalable algorithms.
+struct intset {
+ private bool[] ints = new bool[0];
+ private int size = 0;
+
+ bool contains(int item) {
+ assert(item >= 0);
+ if (item >= ints.length) return false;
+ return ints[item];
+ }
+
+ // Returns true if the item was added (i.e., was
+ // not already present).
+ bool add(int item) {
+ assert(item >= 0);
+ while (item >= ints.length) ints.push(false);
+ if (ints[item]) return false;
+ ints[item] = true;
+ ++size;
+ return true;
+ }
+
+ int[] elements() {
+ int[] toreturn;
+ for (int i = 0; i < ints.length; ++i) {
+ if (ints[i]) toreturn.push(i);
+ }
+ return toreturn;
+ }
+
+ int size() { return size; }
+}
+
+// A map from integers to sets of integers. Again, no
+// attempt is made to use scalable data structures.
+struct int_to_intset {
+ int[] keys = new int[0];
+ intset[] values = new intset[0];
+
+ void add(int key, int value) {
+ for (int i = 0; i < keys.length; ++i) {
+ if (keys[i] == key) {
+ values[i].add(value);
+ return;
+ }
+ }
+ keys.push(key);
+ intset newset;
+ values.push(newset);
+ newset.add(value);
+ }
+
+ private int indexOf(int key) {
+ for (int i = 0; i < keys.length; ++i) {
+ if (keys[i] == key) return i;
+ }
+ return -1;
+ }
+
+ int[] get(int key) {
+ int i = indexOf(key);
+ if (i < 0) return new int[0];
+ else return values[i].elements();
+ }
+
+ int numvalues(int key) {
+ int i = indexOf(key);
+ if (i < 0) return 0;
+ else return values[i].size();
+ }
+
+ int numkeys() {
+ return keys.length;
+ }
+}
+
+// A struct intended to represent an undirected edge between
+// two "vertices."
+struct edge {
+ int start;
+ int end;
+ void operator init(int a, int b) {
+ start = a;
+ end = b;
+ }
+ bool bordersvertex(int v) { return start == v || end == v; }
+}
+
+string operator cast(edge e) {
+ int a, b;
+ if (e.start <= e.end) {a = e.start; b = e.end;}
+ else {a = e.end; b = e.start; }
+ return (string)a + " <-> " + (string)b;
+}
+
+bool operator == (edge a, edge b) {
+ if (a.start == b.start && a.end == b.end) return true;
+ if (a.start == b.end && a.end == b.start) return true;
+ return false;
+}
+
+string operator cast(edge[] edges) {
+ string toreturn = "{ ";
+ for (int i = 0; i < edges.length; ++i) {
+ toreturn += edges[i];
+ if (i < edges.length-1) toreturn += ", ";
+ }
+ return toreturn + " }";
+}
+
+// Finally, the function that strings together a list of edges
+// into a cycle. It makes assumptions that hold true if the
+// list of edges did in fact come from a plane intersection
+// containing no vertices of the cube. For instance, such a
+// plane can contain at most two noncollinear points of any
+// one face; consequently, no face can border more than two of
+// the selected edges.
+//
+// If the underlying assumptions prove to be false, the function
+// returns null.
+int[] makecircle(edge[] edges) {
+ if (edges.length == 0) return new int[0];
+ int_to_intset graph;
+ for (edge e : edges) {
+ graph.add(e.start, e.end);
+ graph.add(e.end, e.start);
+ }
+ int currentvertex = edges[0].start;
+ int startvertex = currentvertex;
+ int lastvertex = NULL_VERTEX;
+ int[] toreturn = new int[0];
+ do {
+ toreturn.push(currentvertex);
+ int[] adjacentvertices = graph.get(currentvertex);
+ if (adjacentvertices.length != 2) return null;
+ for (int v : adjacentvertices) {
+ if (v != lastvertex) {
+ lastvertex = currentvertex;
+ currentvertex = v;
+ break;
+ }
+ }
+ } while (currentvertex != startvertex);
+ if (toreturn.length != graph.numkeys()) return null;
+ toreturn.cyclic = true;
+ return toreturn;
+}
+
+/***********************************************/
+/********** PATHS BETWEEN POINTS ***************/
+/***********************************************/
+// Construct paths between two points with additional
+// constraints; for instance, the path must be orthogonal
+// to a certain vector at each of the endpoints, must
+// lie within a specified plane or a specified face
+// of a rectangular solid,....
+
+// A vector (typically a normal vector) at a specified position.
+struct positionedvector {
+ triple position;
+ triple direction;
+ void operator init(triple position, triple direction) {
+ this.position = position;
+ this.direction = direction;
+ }
+}
+
+string operator cast(positionedvector vv) {
+ return "position: " + (string)(vv.position) + " vector: " + (string)vv.direction;
+}
+
+// The angle, in degrees, between two vectors.
+real angledegrees(triple a, triple b) {
+ real lengthprod = abs(a) * abs(b);
+ if (lengthprod == 0) return 0;
+ return aCos(dot(a,b) / lengthprod);
+}
+
+// A path (single curved segment) between two points. At each point
+// is specified a vector orthogonal to the path.
+path3 pathbetween(positionedvector v1, positionedvector v2) {
+ triple n1 = unit(v1.direction);
+ triple n2 = unit(v2.direction);
+
+ triple p1 = v1.position;
+ triple p2 = v2.position;
+ triple delta = p2-p1;
+
+ triple dir1 = delta - dot(delta, n1)*n1;
+ triple dir2 = delta - dot(delta, n2)*n2;
+ return p1 {dir1} .. {dir2} p2;
+}
+
+// Assuming v1 and v2 are linearly independent, returns an array {a, b}
+// such that a v1 + b v2 is the orthogonal projection of toproject onto
+// the span of v1 and v2. If v1 and v2 are dependent, returns an empty array
+// (if warn==false) or throws an error (if warn==true).
+real[] projecttospan_findcoeffs(triple toproject, triple v1, triple v2,
+ bool warn=false) {
+ real[][] matrix = {{v1.x, v2.x},
+ {v1.y, v2.y},
+ {v1.z, v2.z}};
+ real[] desiredanswer = {toproject.x, toproject.y, toproject.z};
+ return leastsquares(matrix, desiredanswer, warn=warn);
+}
+
+// Project the triple toproject into the span of a and b, but restrict
+// to the quarter-plane of linear combinations a v1 + b v2 such that
+// a >= mincoeff and b >= mincoeff. If v1 and v2 are linearly dependent,
+// return a random (positive) linear combination.
+triple projecttospan(triple toproject, triple v1, triple v2,
+ real mincoeff = 0.05) {
+ real[] coeffs = projecttospan_findcoeffs(toproject, v1, v2, warn=false);
+ real a, b;
+ if (coeffs.length == 0) {
+ a = mincoeff + unitrand();
+ b = mincoeff + unitrand();
+ } else {
+ a = max(coeffs[0], mincoeff);
+ b = max(coeffs[1], mincoeff);
+ }
+ return a*v1 + b*v2;
+}
+
+// A path between two specified vertices of a cyclic path. The
+// path tangent at each endpoint is guaranteed to lie within the
+// quarter-plane spanned by positive linear combinations of the
+// tangents of the two outgoing paths at that endpoint.
+path3 pathbetween(path3 edgecycle, int vertex1, int vertex2) {
+ triple point1 = point(edgecycle, vertex1);
+ triple point2 = point(edgecycle, vertex2);
+
+ triple v1 = -dir(edgecycle, vertex1, sign=-1);
+ triple v2 = dir(edgecycle, vertex1, sign= 1);
+ triple direction1 = projecttospan(unit(point2-point1), v1, v2);
+
+ v1 = -dir(edgecycle, vertex2, sign=-1);
+ v2 = dir(edgecycle, vertex2, sign= 1);
+ triple direction2 = projecttospan(unit(point1-point2), v1, v2);
+
+ return point1 {direction1} .. {-direction2} point2;
+}
+
+// This function applies a heuristic to choose two "opposite"
+// vertices (separated by three segments) of edgecycle, which
+// is required to be a cyclic path consisting of 5 or 6 segments.
+// The two chosen vertices are pushed to savevertices.
+//
+// The function returns a path between the two chosen vertices. The
+// path tangent at each endpoint is guaranteed to lie within the
+// quarter-plane spanned by positive linear combinations of the
+// tangents of the two outgoing paths at that endpoint.
+path3 bisector(path3 edgecycle, int[] savevertices) {
+ real mincoeff = 0.05;
+ assert(cyclic(edgecycle));
+ int n = length(edgecycle);
+ assert(n >= 5 && n <= 6);
+ triple[] forwarddirections = sequence(new triple(int i) {
+ return dir(edgecycle, i, sign=1);
+ }, n);
+ forwarddirections.cyclic = true;
+ triple[] backwarddirections = sequence(new triple(int i) {
+ return -dir(edgecycle, i, sign=-1);
+ }, n);
+ backwarddirections.cyclic = true;
+ real[] angles = sequence(new real(int i) {
+ return angledegrees(forwarddirections[i], backwarddirections[i]);
+ }, n);
+ angles.cyclic = true;
+ int lastindex = (n == 5 ? 4 : 2);
+ real maxgoodness = 0;
+ int chosenindex = -1;
+ triple directionout, directionin;
+ for (int i = 0; i <= lastindex; ++i) {
+ int opposite = i + 3;
+ triple vec = unit(point(edgecycle, opposite) - point(edgecycle, i));
+ real[] coeffsbegin = projecttospan_findcoeffs(vec, forwarddirections[i],
+ backwarddirections[i]);
+ if (coeffsbegin.length == 0) continue;
+ coeffsbegin[0] = max(coeffsbegin[0], mincoeff);
+ coeffsbegin[1] = max(coeffsbegin[1], mincoeff);
+
+ real[] coeffsend = projecttospan_findcoeffs(-vec, forwarddirections[opposite],
+ backwarddirections[opposite]);
+ if (coeffsend.length == 0) continue;
+ coeffsend[0] = max(coeffsend[0], mincoeff);
+ coeffsend[1] = max(coeffsend[1], mincoeff);
+
+ real goodness = angles[i] * angles[opposite] * coeffsbegin[0] * coeffsend[0]
+ * coeffsbegin[1] * coeffsend[1];
+ if (goodness > maxgoodness) {
+ maxgoodness = goodness;
+ directionout = coeffsbegin[0] * forwarddirections[i] +
+ coeffsbegin[1] * backwarddirections[i];
+ directionin = -(coeffsend[0] * forwarddirections[opposite] +
+ coeffsend[1] * backwarddirections[opposite]);
+ chosenindex = i;
+ }
+ }
+ if (chosenindex == -1) {
+ savevertices.push(0);
+ savevertices.push(3);
+ return pathbetween(edgecycle, 0, 3);
+ } else {
+ savevertices.push(chosenindex);
+ savevertices.push(chosenindex+3);
+ return point(edgecycle, chosenindex) {directionout} ..
+ {directionin} point(edgecycle, chosenindex + 3);
+ }
+}
+
+// A path between two specified points (with specified normals) that lies
+// within a specified face of a rectangular solid.
+path3 pathinface(positionedvector v1, positionedvector v2,
+ triple facenorm, triple edge1normout, triple edge2normout)
+{
+ triple dir1 = cross(v1.direction, facenorm);
+ real dotprod = dot(dir1, edge1normout);
+ if (dotprod > 0) dir1 = -dir1;
+ // Believe it or not, this "tiebreaker" is actually relevant at times,
+ // for instance, when graphing the cone x^2 + y^2 = z^2 over the region
+ // -1 <= x,y,z <= 1.
+ else if (dotprod == 0 && dot(dir1, v2.position - v1.position) < 0) dir1 = -dir1;
+
+ triple dir2 = cross(v2.direction, facenorm);
+ dotprod = dot(dir2, edge2normout);
+ if (dotprod < 0) dir2 = -dir2;
+ else if (dotprod == 0 && dot(dir2, v2.position - v1.position) < 0) dir2 = -dir2;
+
+ return v1.position {dir1} .. {dir2} v2.position;
+}
+
+triple normalout(int face) {
+ if (face == XHIGH) return X;
+ else if (face == YHIGH) return Y;
+ else if (face == ZHIGH) return Z;
+ else if (face == XLOW) return -X;
+ else if (face == YLOW) return -Y;
+ else if (face == ZLOW) return -Z;
+ else return O;
+}
+
+// A path between two specified points (with specified normals) that lies
+// within a specified face of a rectangular solid.
+path3 pathinface(positionedvector v1, positionedvector v2,
+ int face, int edge1face, int edge2face) {
+ return pathinface(v1, v2, normalout(face), normalout(edge1face),
+ normalout(edge2face));
+}
+
+/***********************************************/
+/******** DRAWING IMPLICIT SURFACES ************/
+/***********************************************/
+
+// Quadrilateralization:
+// Produce a surface (array of *nondegenerate* Bezier patches) with a
+// specified three-segment boundary. The surface should approximate the
+// zero locus of the specified f with its specified gradient.
+//
+// If it is not possible to produce the desired result without leaving the
+// specified rectangular region, returns a length-zero array.
+//
+// Dividing a triangle into smaller quadrilaterals this way is opposite
+// the usual trend in mathematics. However, the pathwithnormals algorithm
+// does a poor job of choosing a good surface when the boundary path does
+// not consist of four positive-length segments.
+patch[] triangletoquads(path3 external, real f(triple), triple grad(triple),
+ triple a, triple b) {
+ static real epsilon = 1e-3;
+ assert(length(external) == 3);
+ assert(cyclic(external));
+
+ triple c0 = point(external, 0);
+ triple c1 = point(external, 1);
+ triple c2 = point(external, 2);
+
+ triple center = (c0 + c1 + c2) / 3;
+ triple n = unit(cross(c1-c0, c2-c0));
+
+ real g(real t) { return f(center + t*n); }
+
+ real tmin = -realMax, tmax = realMax;
+ void absorb(real t) {
+ if (t < 0) tmin = max(t,tmin);
+ else tmax = min(t,tmax);
+ }
+ if (n.x != 0) {
+ absorb((a.x - center.x) / n.x);
+ absorb((b.x - center.x) / n.x);
+ }
+ if (n.y != 0) {
+ absorb((a.y - center.y) / n.y);
+ absorb((b.y - center.y) / n.y);
+ }
+ if (n.z != 0) {
+ absorb((a.z - center.z) / n.z);
+ absorb((b.z - center.z) / n.z);
+ }
+
+ real fa = g(tmin);
+ real fb = g(tmax);
+ if ((fa > 0 && fb > 0) || (fa < 0 && fb < 0)) {
+ return new patch[0];
+ } else {
+ real t = findroot(g, tmin, tmax, fa=fa, fb=fb);
+ center += t * n;
+ }
+
+ n = unit(grad(center));
+
+ triple m0 = point(external, 0.5);
+ positionedvector m0 = positionedvector(m0, unit(grad(m0)));
+ triple m1 = point(external, 1.5);
+ positionedvector m1 = positionedvector(m1, unit(grad(m1)));
+ triple m2 = point(external, 2.5);
+ positionedvector m2 = positionedvector(m2, unit(grad(m2)));
+ positionedvector c = positionedvector(center, unit(grad(center)));
+
+ path3 pathto_m0 = pathbetween(c, m0);
+ path3 pathto_m1 = pathbetween(c, m1);
+ path3 pathto_m2 = pathbetween(c, m2);
+
+ path3 quad0 = subpath(external, 0, 0.5)
+ & reverse(pathto_m0)
+ & pathto_m2
+ & subpath(external, -0.5, 0)
+ & cycle;
+ path3 quad1 = subpath(external, 1, 1.5)
+ & reverse(pathto_m1)
+ & pathto_m0
+ & subpath(external, 0.5, 1)
+ & cycle;
+ path3 quad2 = subpath(external, 2, 2.5)
+ & reverse(pathto_m2)
+ & pathto_m1
+ & subpath(external, 1.5, 2)
+ & cycle;
+
+ return new patch[] {patchwithnormals(quad0, grad),
+ patchwithnormals(quad1, grad),
+ patchwithnormals(quad2, grad)};
+}
+
+// Returns true if the point is "nonsingular" (in the sense that the magnitude
+// of the gradient is not too small) AND very close to the zero locus of f
+// (assuming f is locally linear).
+bool check_fpt_zero(triple testpoint, real f(triple), triple grad(triple)) {
+ real testval = f(testpoint);
+ real slope = abs(grad(testpoint));
+ static real tolerance = 2*rootfinder_settings.roottolerance;
+ return !(slope > tolerance && abs(testval) / slope > tolerance);
+}
+
+// Returns true if pt lies within the rectangular solid with
+// opposite corners at a and b.
+bool checkptincube(triple pt, triple a, triple b) {
+ real xmin = a.x;
+ real xmax = b.x;
+ real ymin = a.y;
+ real ymax = b.y;
+ real zmin = a.z;
+ real zmax = b.z;
+ if (xmin > xmax) { real t = xmax; xmax=xmin; xmin=t; }
+ if (ymin > ymax) { real t = ymax; ymax=ymin; ymin=t; }
+ if (zmin > zmax) { real t = zmax; zmax=zmin; zmin=t; }
+
+ return ((xmin <= pt.x) && (pt.x <= xmax) &&
+ (ymin <= pt.y) && (pt.y <= ymax) &&
+ (zmin <= pt.z) && (pt.z <= zmax));
+
+}
+
+// A convenience function for combining the previous two tests.
+bool checkpt(triple testpt, real f(triple), triple grad(triple),
+ triple a, triple b) {
+ return checkptincube(testpt, a, b) &&
+ check_fpt_zero(testpt, f, grad);
+}
+
+// Attempts to fill in the boundary cycle with a collection of
+// patches to approximate smoothly the zero locus of f. If unable to
+// do so while satisfying certain checks, returns null.
+// This is distinct from returning an empty
+// array, which merely indicates that the boundary cycle is too small
+// to be worth filling in.
+patch[] quadpatches(path3 edgecycle, positionedvector[] corners,
+ real f(triple), triple grad(triple),
+ triple a, triple b) {
+ assert(corners.cyclic);
+
+ // The tolerance for considering two points "essentially identical."
+ static real tolerance = 2.5 * rootfinder_settings.roottolerance;
+
+ // If there are two neighboring vertices that are essentially identical,
+ // unify them into one.
+ for (int i = 0; i < corners.length; ++i) {
+ if (abs(corners[i].position - corners[i+1].position) < tolerance) {
+ if (corners.length == 2) return new patch[0];
+ corners.delete(i);
+ edgecycle = subpath(edgecycle, 0, i)
+ & subpath(edgecycle, i+1, length(edgecycle))
+ & cycle;
+ --i;
+ assert(length(edgecycle) == corners.length);
+ }
+ }
+
+ static real areatolerance = tolerance^2;
+
+ assert(corners.length >= 2);
+ if (corners.length == 2) {
+ // If the area is too small, just ignore it; otherwise, subdivide.
+ real area0 = abs(cross(-dir(edgecycle, 0, sign=-1, normalize=false),
+ dir(edgecycle, 0, sign=1, normalize=false)));
+ real area1 = abs(cross(-dir(edgecycle, 1, sign=-1, normalize=false),
+ dir(edgecycle, 1, sign=1, normalize=false)));
+ if (area0 < areatolerance && area1 < areatolerance) return new patch[0];
+ else return null;
+ }
+ if (length(edgecycle) > 6) abort("too many edges: not possible.");
+
+ for (int i = 0; i < length(edgecycle); ++i) {
+ if (angledegrees(dir(edgecycle,i,sign=1),
+ dir(edgecycle,i+1,sign=-1)) > 80) {
+ return null;
+ }
+ }
+
+ if (length(edgecycle) == 3) {
+ patch[] toreturn = triangletoquads(edgecycle, f, grad, a, b);
+ if (toreturn.length == 0) return null;
+ else return toreturn;
+ }
+ if (length(edgecycle) == 4) {
+ return new patch[] {patchwithnormals(edgecycle, grad)};
+ }
+
+ int[] bisectorindices;
+ path3 middleguide = bisector(edgecycle, bisectorindices);
+
+ triple testpoint = point(middleguide, 0.5);
+ if (!checkpt(testpoint, f, grad, a, b)) {
+ return null;
+ }
+
+ patch[] toreturn = null;
+ path3 firstpatch = subpath(edgecycle, bisectorindices[0], bisectorindices[1])
+ & reverse(middleguide) & cycle;
+ if (length(edgecycle) == 5) {
+ path3 secondpatch = middleguide
+ & subpath(edgecycle, bisectorindices[1], 5+bisectorindices[0]) & cycle;
+ toreturn = triangletoquads(secondpatch, f, grad, a, b);
+ if (toreturn.length == 0) return null;
+ toreturn.push(patchwithnormals(firstpatch, grad));
+ } else {
+ // now length(edgecycle) == 6
+ path3 secondpatch = middleguide
+ & subpath(edgecycle, bisectorindices[1], 6+bisectorindices[0])
+ & cycle;
+ toreturn = new patch[] {patchwithnormals(firstpatch, grad),
+ patchwithnormals(secondpatch, grad)};
+ }
+ return toreturn;
+}
+
+// Numerical gradient of a function
+typedef triple vectorfunction(triple);
+vectorfunction nGrad(real f(triple)) {
+ static real epsilon = 1e-3;
+ return new triple(triple v) {
+ return ( (f(v + epsilon*X) - f(v - epsilon*X)) / (2 epsilon),
+ (f(v + epsilon*Y) - f(v - epsilon*Y)) / (2 epsilon),
+ (f(v + epsilon*Z) - f(v - epsilon*Z)) / (2 epsilon) );
+ };
+}
+
+// A point together with a value at that location.
+struct evaluatedpoint {
+ triple pt;
+ real value;
+ void operator init(triple pt, real value) {
+ this.pt = pt;
+ this.value = value;
+ }
+}
+
+triple operator cast(evaluatedpoint p) { return p.pt; }
+
+// Compute the values of a function at every vertex of an nx by ny by nz
+// array of rectangular solids.
+evaluatedpoint[][][] make3dgrid(triple a, triple b, int nx, int ny, int nz,
+ real f(triple), bool allowzero = false)
+{
+ evaluatedpoint[][][] toreturn = new evaluatedpoint[nx+1][ny+1][nz+1];
+ for (int i = 0; i <= nx; ++i) {
+ for (int j = 0; j <= ny; ++j) {
+ for (int k = 0; k <= nz; ++k) {
+ triple pt = (interp(a.x, b.x, i/nx),
+ interp(a.y, b.y, j/ny),
+ interp(a.z, b.z, k/nz));
+ real value = f(pt);
+ if (value == 0 && !allowzero) value = 1e-5;
+ toreturn[i][j][k] = evaluatedpoint(pt, value);
+ }
+ }
+ }
+ return toreturn;
+}
+
+// The following utilities make, for instance, slice(A, i, j, k, l)
+// equivalent to what A[i:j][k:l] ought to mean for two- and three-
+// -dimensional arrays of evaluatedpoints and of positionedvectors.
+typedef evaluatedpoint T;
+T[][] slice(T[][] a, int start1, int end1, int start2, int end2) {
+ T[][] toreturn = new T[end1-start1][];
+ for (int i = start1; i < end1; ++i) {
+ toreturn[i-start1] = a[i][start2:end2];
+ }
+ return toreturn;
+}
+T[][][] slice(T[][][] a, int start1, int end1,
+ int start2, int end2,
+ int start3, int end3) {
+ T[][][] toreturn = new T[end1-start1][][];
+ for (int i = start1; i < end1; ++i) {
+ toreturn[i-start1] = slice(a[i], start2, end2, start3, end3);
+ }
+ return toreturn;
+}
+typedef positionedvector T;
+T[][] slice(T[][] a, int start1, int end1, int start2, int end2) {
+ T[][] toreturn = new T[end1-start1][];
+ for (int i = start1; i < end1; ++i) {
+ toreturn[i-start1] = a[i][start2:end2];
+ }
+ return toreturn;
+}
+T[][][] slice(T[][][] a, int start1, int end1,
+ int start2, int end2,
+ int start3, int end3) {
+ T[][][] toreturn = new T[end1-start1][][];
+ for (int i = start1; i < end1; ++i) {
+ toreturn[i-start1] = slice(a[i], start2, end2, start3, end3);
+ }
+ return toreturn;
+}
+
+// An object of class gridwithzeros stores the values of a function at each vertex
+// of a three-dimensional grid, together with zeros of the function along edges
+// of the grid and the gradient of the function at each such zero.
+struct gridwithzeros {
+ int nx, ny, nz;
+ evaluatedpoint[][][] corners;
+ positionedvector[][][] xdirzeros;
+ positionedvector[][][] ydirzeros;
+ positionedvector[][][] zdirzeros;
+ triple grad(triple);
+ real f(triple);
+ int maxdepth;
+
+ // Populate the edges with zeros that have a sign change and are not already
+ // populated.
+ void fillzeros() {
+ for (int j = 0; j < ny+1; ++j) {
+ for (int k = 0; k < nz+1; ++k) {
+ real y = corners[0][j][k].pt.y;
+ real z = corners[0][j][k].pt.z;
+ real f_along_x(real t) { return f((t, y, z)); }
+ for (int i = 0; i < nx; ++i) {
+ if (xdirzeros[i][j][k] != null) continue;
+ evaluatedpoint start = corners[i][j][k];
+ evaluatedpoint end = corners[i+1][j][k];
+ if ((start.value > 0 && end.value > 0) || (start.value < 0 && end.value < 0))
+ xdirzeros[i][j][k] = null;
+ else {
+ triple root = (0,y,z);
+ root += X * findroot(f_along_x, start.pt.x, end.pt.x,
+ fa=start.value, fb=end.value);
+ triple normal = grad(root);
+ xdirzeros[i][j][k] = positionedvector(root, normal);
+ }
+ }
+ }
+ }
+
+ for (int i = 0; i < nx+1; ++i) {
+ for (int k = 0; k < nz+1; ++k) {
+ real x = corners[i][0][k].pt.x;
+ real z = corners[i][0][k].pt.z;
+ real f_along_y(real t) { return f((x, t, z)); }
+ for (int j = 0; j < ny; ++j) {
+ if (ydirzeros[i][j][k] != null) continue;
+ evaluatedpoint start = corners[i][j][k];
+ evaluatedpoint end = corners[i][j+1][k];
+ if ((start.value > 0 && end.value > 0) || (start.value < 0 && end.value < 0))
+ ydirzeros[i][j][k] = null;
+ else {
+ triple root = (x,0,z);
+ root += Y * findroot(f_along_y, start.pt.y, end.pt.y,
+ fa=start.value, fb=end.value);
+ triple normal = grad(root);
+ ydirzeros[i][j][k] = positionedvector(root, normal);
+ }
+ }
+ }
+ }
+
+ for (int i = 0; i < nx+1; ++i) {
+ for (int j = 0; j < ny+1; ++j) {
+ real x = corners[i][j][0].pt.x;
+ real y = corners[i][j][0].pt.y;
+ real f_along_z(real t) { return f((x, y, t)); }
+ for (int k = 0; k < nz; ++k) {
+ if (zdirzeros[i][j][k] != null) continue;
+ evaluatedpoint start = corners[i][j][k];
+ evaluatedpoint end = corners[i][j][k+1];
+ if ((start.value > 0 && end.value > 0) || (start.value < 0 && end.value < 0))
+ zdirzeros[i][j][k] = null;
+ else {
+ triple root = (x,y,0);
+ root += Z * findroot(f_along_z, start.pt.z, end.pt.z,
+ fa=start.value, fb=end.value);
+ triple normal = grad(root);
+ zdirzeros[i][j][k] = positionedvector(root, normal);
+ }
+ }
+ }
+ }
+ }
+
+ // Fill in the grid vertices and the zeros along edges. Each cube starts at
+ // depth one and the depth increases each time it subdivides; maxdepth is the
+ // maximum subdivision depth. When a cube at maxdepth cannot be resolved to
+ // patches, it is left empty.
+ void operator init(int nx, int ny, int nz,
+ real f(triple), triple a, triple b,
+ int maxdepth = 6) {
+ this.nx = nx;
+ this.ny = ny;
+ this.nz = nz;
+ grad = nGrad(f);
+ this.f = f;
+ this.maxdepth = maxdepth;
+ corners = make3dgrid(a, b, nx, ny, nz, f);
+ xdirzeros = new positionedvector[nx][ny+1][nz+1];
+ ydirzeros = new positionedvector[nx+1][ny][nz+1];
+ zdirzeros = new positionedvector[nx+1][ny+1][nz];
+
+ for (int i = 0; i <= nx; ++i) {
+ for (int j = 0; j <= ny; ++j) {
+ for (int k = 0; k <= nz; ++k) {
+ if (i < nx) xdirzeros[i][j][k] = null;
+ if (j < ny) ydirzeros[i][j][k] = null;
+ if (k < nz) zdirzeros[i][j][k] = null;
+ }
+ }
+ }
+
+ fillzeros();
+ }
+
+ // Doubles nx, ny, and nz by halving the sizes of the cubes along the x, y, and z
+ // directions (resulting in 8 times as many cubes). Already existing data about
+ // function values and zeros is copied; vertices and edges with no such pre-existing
+ // data are populated.
+ //
+ // Returns true if subdivide succeeded, false if it failed (because maxdepth
+ // was exceeded).
+ bool subdivide() {
+ if (maxdepth <= 1) {
+ return false;
+ }
+ --maxdepth;
+ triple a = corners[0][0][0];
+ triple b = corners[nx][ny][nz];
+ nx *= 2;
+ ny *= 2;
+ nz *= 2;
+ evaluatedpoint[][][] oldcorners = corners;
+ corners = new evaluatedpoint[nx+1][ny+1][nz+1];
+ for (int i = 0; i <= nx; ++i) {
+ for (int j = 0; j <= ny; ++j) {
+ for (int k = 0; k <= nz; ++k) {
+ if (i % 2 == 0 && j % 2 == 0 && k % 2 == 0) {
+ corners[i][j][k] = oldcorners[quotient(i,2)][quotient(j,2)][quotient(k,2)];
+ } else {
+ triple pt = (interp(a.x, b.x, i/nx),
+ interp(a.y, b.y, j/ny),
+ interp(a.z, b.z, k/nz));
+ real value = f(pt);
+ if (value == 0) value = 1e-5;
+ corners[i][j][k] = evaluatedpoint(pt, value);
+ }
+ }
+ }
+ }
+
+ positionedvector[][][] oldxdir = xdirzeros;
+ xdirzeros = new positionedvector[nx][ny+1][nz+1];
+ for (int i = 0; i < nx; ++i) {
+ for (int j = 0; j < ny + 1; ++j) {
+ for (int k = 0; k < nz + 1; ++k) {
+ if (j % 2 != 0 || k % 2 != 0) {
+ xdirzeros[i][j][k] = null;
+ } else {
+ positionedvector zero = oldxdir[quotient(i,2)][quotient(j,2)][quotient(k,2)];
+ if (zero == null) {
+ xdirzeros[i][j][k] = null;
+ continue;
+ }
+ real x = zero.position.x;
+ if (x > interp(a.x, b.x, i/nx) && x < interp(a.x, b.x, (i+1)/nx)) {
+ xdirzeros[i][j][k] = zero;
+ } else {
+ xdirzeros[i][j][k] = null;
+ }
+ }
+ }
+ }
+ }
+
+ positionedvector[][][] oldydir = ydirzeros;
+ ydirzeros = new positionedvector[nx+1][ny][nz+1];
+ for (int i = 0; i < nx+1; ++i) {
+ for (int j = 0; j < ny; ++j) {
+ for (int k = 0; k < nz + 1; ++k) {
+ if (i % 2 != 0 || k % 2 != 0) {
+ ydirzeros[i][j][k] = null;
+ } else {
+ positionedvector zero = oldydir[quotient(i,2)][quotient(j,2)][quotient(k,2)];
+ if (zero == null) {
+ ydirzeros[i][j][k] = null;
+ continue;
+ }
+ real y = zero.position.y;
+ if (y > interp(a.y, b.y, j/ny) && y < interp(a.y, b.y, (j+1)/ny)) {
+ ydirzeros[i][j][k] = zero;
+ } else {
+ ydirzeros[i][j][k] = null;
+ }
+ }
+ }
+ }
+ }
+
+ positionedvector[][][] oldzdir = zdirzeros;
+ zdirzeros = new positionedvector[nx+1][ny+1][nz];
+ for (int i = 0; i < nx + 1; ++i) {
+ for (int j = 0; j < ny + 1; ++j) {
+ for (int k = 0; k < nz; ++k) {
+ if (i % 2 != 0 || j % 2 != 0) {
+ zdirzeros[i][j][k] = null;
+ } else {
+ positionedvector zero = oldzdir[quotient(i,2)][quotient(j,2)][quotient(k,2)];
+ if (zero == null) {
+ zdirzeros[i][j][k] = null;
+ continue;
+ }
+ real z = zero.position.z;
+ if (z > interp(a.z, b.z, k/nz) && z < interp(a.z, b.z, (k+1)/nz)) {
+ zdirzeros[i][j][k] = zero;
+ } else {
+ zdirzeros[i][j][k] = null;
+ }
+ }
+ }
+ }
+ }
+
+ fillzeros();
+ return true;
+ }
+
+ // Forward declaration of the draw method, which will be called by drawcube().
+ patch[] draw(bool[] reportactive = null);
+
+ // Construct the patches, assuming that we are working
+ // with a single cube (nx = ny = nz = 1). This method will subdivide the
+ // cube if necessary. The parameter reportactive should be an array of
+ // length 6. Setting an entry to true indicates that the surface abuts the
+ // corresponding face (according to the earlier enum), and thus that the
+ // algorithm should be sure that something is drawn in the cube sharing
+ // that face--even if all the vertices of that cube have the same sign.
+ patch[] drawcube(bool[] reportactive = null) {
+ // First, determine which edges (if any) actually have zeros on them.
+ edge[] zeroedges = new edge[0];
+ positionedvector[] zeros = new positionedvector[0];
+
+ int currentface, nextface;
+
+ void pushifnonnull(positionedvector v) {
+ if (v != null) {
+ zeroedges.push(edge(currentface, nextface));
+ zeros.push(v);
+ }
+ }
+ positionedvector findzero(int face1, int face2) {
+ edge e = edge(face1, face2);
+ for (int i = 0; i < zeroedges.length; ++i) {
+ if (zeroedges[i] == e) return zeros[i];
+ }
+ return null;
+ }
+
+ currentface = XLOW;
+ nextface = YHIGH;
+ pushifnonnull(zdirzeros[0][1][0]);
+ nextface = YLOW;
+ pushifnonnull(zdirzeros[0][0][0]);
+ nextface = ZHIGH;
+ pushifnonnull(ydirzeros[0][0][1]);
+ nextface = ZLOW;
+ pushifnonnull(ydirzeros[0][0][0]);
+
+ currentface = XHIGH;
+ nextface = YHIGH;
+ pushifnonnull(zdirzeros[1][1][0]);
+ nextface = YLOW;
+ pushifnonnull(zdirzeros[1][0][0]);
+ nextface = ZHIGH;
+ pushifnonnull(ydirzeros[1][0][1]);
+ nextface = ZLOW;
+ pushifnonnull(ydirzeros[1][0][0]);
+
+ currentface = YHIGH;
+ nextface = ZHIGH;
+ pushifnonnull(xdirzeros[0][1][1]);
+ currentface = ZHIGH;
+ nextface = YLOW;
+ pushifnonnull(xdirzeros[0][0][1]);
+ currentface = YLOW;
+ nextface = ZLOW;
+ pushifnonnull(xdirzeros[0][0][0]);
+ currentface = ZLOW;
+ nextface = YHIGH;
+ pushifnonnull(xdirzeros[0][1][0]);
+
+ //Now, string those edges together to make a circle.
+
+ patch[] subdividecube() {
+ if (!subdivide()) {
+ return new patch[0];
+ }
+ return draw(reportactive);
+ }
+ if (zeroedges.length < 3) {
+ return subdividecube();
+ }
+ int[] faceorder = makecircle(zeroedges);
+ if (alias(faceorder,null)) {
+ return subdividecube();
+ }
+ positionedvector[] patchcorners = new positionedvector[0];
+ for (int i = 0; i < faceorder.length; ++i) {
+ patchcorners.push(findzero(faceorder[i], faceorder[i+1]));
+ }
+ patchcorners.cyclic = true;
+
+ //Now, produce the cyclic path around the edges.
+ path3 edgecycle;
+ for (int i = 0; i < faceorder.length; ++i) {
+ path3 currentpath = pathinface(patchcorners[i], patchcorners[i+1],
+ faceorder[i+1], faceorder[i],
+ faceorder[i+2]);
+ triple testpoint = point(currentpath, 0.5);
+ if (!checkpt(testpoint, f, grad, corners[0][0][0], corners[1][1][1])) {
+ return subdividecube();
+ }
+
+ edgecycle = edgecycle & currentpath;
+ }
+ edgecycle = edgecycle & cycle;
+
+ patch[] toreturn = quadpatches(edgecycle, patchcorners, f, grad,
+ corners[0][0][0], corners[1][1][1]);
+ if (alias(toreturn, null)) return subdividecube();
+ return toreturn;
+ }
+
+ // Extracts the specified cube as a gridwithzeros object with
+ // nx = ny = nz = 1.
+ gridwithzeros getcube(int i, int j, int k) {
+ gridwithzeros cube = new gridwithzeros;
+ cube.grad = grad;
+ cube.f = f;
+ cube.nx = 1;
+ cube.ny = 1;
+ cube.nz = 1;
+ cube.maxdepth = maxdepth;
+ cube.corners = slice(corners,i,i+2,j,j+2,k,k+2);
+ cube.xdirzeros = slice(xdirzeros,i,i+1,j,j+2,k,k+2);
+ cube.ydirzeros = slice(ydirzeros,i,i+2,j,j+1,k,k+2);
+ cube.zdirzeros = slice(zdirzeros,i,i+2,j,j+2,k,k+1);
+ return cube;
+ }
+
+ // Returns an array of patches representing the surface.
+ // The parameter reportactive should be an array of
+ // length 6. Setting an entry to true indicates that the surface abuts the
+ // corresponding face of the cube that bounds the entire grid.
+ //
+ // If reportactive == null, it is assumed that this is a top-level call;
+ // a dot is printed to stdout for each cube drawn as a very rough
+ // progress indicator.
+ //
+ // If reportactive != null, then it is assumed that the caller had a strong
+ // reason to believe that this grid contains a part of the surface; the
+ // grid will subdivide all the way to maxdepth if necessary to find points
+ // on the surface.
+ draw = new patch[](bool[] reportactive = null) {
+ // A list of all the patches not already drawn but known
+ // to contain part of the surface. This "queue" is
+ // actually implemented as stack for simplicity, since
+ // it does not make any difference. In a multi-threaded
+ // version of the algorithm, a queue (shared across all threads)
+ // would make more sense than a stack.
+ triple[] queue = new triple[0];
+ bool[][][] enqueued = new bool[nx][ny][nz];
+ for (int i = 0; i < enqueued.length; ++i) {
+ for (int j = 0; j < enqueued[i].length; ++j) {
+ for (int k = 0; k < enqueued[i][j].length; ++k) {
+ enqueued[i][j][k] = false;
+ }
+ }
+ }
+
+ void enqueue(int i, int j, int k) {
+ if (i >= 0 && i < nx
+ && j >= 0 && j < ny
+ && k >= 0 && k < nz
+ && !enqueued[i][j][k]) {
+ queue.push((i,j,k));
+ enqueued[i][j][k] = true;
+ }
+ if (!alias(reportactive, null)) {
+ if (i < 0) reportactive[XLOW] = true;
+ if (i >= nx) reportactive[XHIGH] = true;
+ if (j < 0) reportactive[YLOW] = true;
+ if (j >= ny) reportactive[YHIGH] = true;
+ if (k < 0) reportactive[ZLOW] = true;
+ if (k >= nz) reportactive[ZHIGH] = true;
+ }
+ }
+
+ for (int i = 0; i < nx+1; ++i) {
+ for (int j = 0; j < ny+1; ++j) {
+ for (int k = 0; k < nz+1; ++k) {
+ if (i < nx && xdirzeros[i][j][k] != null) {
+ for (int jj = j-1; jj <= j; ++jj)
+ for (int kk = k-1; kk <= k; ++kk)
+ enqueue(i, jj, kk);
+ }
+ if (j < ny && ydirzeros[i][j][k] != null) {
+ for (int ii = i-1; ii <= i; ++ii)
+ for (int kk = k-1; kk <= k; ++kk)
+ enqueue(ii, j, kk);
+ }
+ if (k < nz && zdirzeros[i][j][k] != null) {
+ for (int ii = i-1; ii <= i; ++ii)
+ for (int jj = j-1; jj <= j; ++jj)
+ enqueue(ii, jj, k);
+ }
+ }
+ }
+ }
+
+ if (!alias(reportactive, null) && queue.length == 0) {
+ if (subdivide()) return draw(reportactive);
+ }
+
+ patch[] surface = new patch[0];
+
+ while (queue.length > 0) {
+ triple coord = queue.pop();
+ int i = floor(coord.x);
+ int j = floor(coord.y);
+ int k = floor(coord.z);
+ bool[] reportface = array(6, false);
+ patch[] toappend = getcube(i,j,k).drawcube(reportface);
+ if (reportface[XLOW]) enqueue(i-1,j,k);
+ if (reportface[XHIGH]) enqueue(i+1,j,k);
+ if (reportface[YLOW]) enqueue(i,j-1,k);
+ if (reportface[YHIGH]) enqueue(i,j+1,k);
+ if (reportface[ZLOW]) enqueue(i,j,k-1);
+ if (reportface[ZHIGH]) enqueue(i,j,k+1);
+ surface.append(toappend);
+ if (settings.verbose > 1 && alias(reportactive, null)) write(stdout, '.');
+ }
+ if (settings.verbose > 1 && alias(reportactive, null)) write(stdout, '\n');
+ return surface;
+ };
+}
+
+// The external interface of this whole module. Accepts exactly one
+// function (throws an error if two or zero functions are specified).
+// The function should be differentiable. (Whatever you do, do not
+// pass in an indicator function!) Ideally, the zero locus of the
+// function should be smooth; singularities will significantly slow
+// down the algorithm and potentially give bad results.
+//
+// Returns a plot of the zero locus of the function within the
+// rectangular solid with opposite corners at a and b.
+//
+// Additional parameters:
+// n - the number of initial segments in each of the x, y, z directions.
+// overlapedges - if true, the patches of the surface are slightly enlarged
+// to compensate for an artifact in which the viewer can see through the
+// boundary between patches. (Some of this may actually be a result of
+// edges not lining up perfectly, but I'm fairly sure a lot of it arises
+// purely as a rendering artifact.)
+// nx - override n in the x direction
+// ny - override n in the y direction
+// nz - override n in the z direction
+// maxdepth - the maximum depth to which the algorithm will subdivide in
+// an effort to find patches that closely approximate the true surface.
+surface implicitsurface(real f(triple) = null, real ff(real,real,real) = null,
+ triple a, triple b,
+ int n = nmesh,
+ bool keyword overlapedges = false,
+ int keyword nx=n, int keyword ny=n,
+ int keyword nz=n,
+ int keyword maxdepth = 8) {
+ if (f == null && ff == null)
+ abort("implicitsurface called without specifying a function.");
+ if (f != null && ff != null)
+ abort("Only specify one function when calling implicitsurface.");
+ if (f == null) f = new real(triple w) { return ff(w.x, w.y, w.z); };
+ gridwithzeros grid = gridwithzeros(nx, ny, nz, f, a, b, maxdepth=maxdepth);
+ patch[] patches = grid.draw();
+ if (overlapedges) {
+ for (int i = 0; i < patches.length; ++i) {
+ triple center = patches[i].point(1/2,1/2);
+ patches[i] = shift(center) * scale3(1.01) * shift(-center) * patches[i];
+ }
+ }
+ return surface(...patches);
+}
diff --git a/Build/source/utils/asymptote/base/three_surface.asy b/Build/source/utils/asymptote/base/three_surface.asy
index bf070e2a4a9..faf56b546f4 100644
--- a/Build/source/utils/asymptote/base/three_surface.asy
+++ b/Build/source/utils/asymptote/base/three_surface.asy
@@ -1115,6 +1115,21 @@ patch subpatch(patch s, pair a, pair b)
return patch(subpatch(s.P,a,b),s.straight,s.planar);
}
+// return an array containing an intersection times of path p and surface s.
+real[] intersect(path3 p, patch s, real fuzz=-1)
+{
+ return intersect(p,s.P,fuzz);
+}
+
+// return an array containing an intersection times of path p and surface s.
+real[] intersect(path3 p, surface s, real fuzz=-1)
+{
+ for(int i=0; i < s.s.length; ++i) {
+ real[] T=intersect(p,s.s[i].P,fuzz);
+ if(T.length > 0) return T;
+ }
+ return new real[];
+}
// return an array containing all intersection times of path p and patch s.
real[][] intersections(path3 p, patch s, real fuzz=-1)
@@ -1168,8 +1183,8 @@ bool overlap(triple[][] p, triple[][] q, real fuzz=-1)
triple qmin=minbound(q);
triple qmax=maxbound(q);
- static real Fuzz=1000*realEpsilon;
- real fuzz=max(10*fuzz,Fuzz*max(abs(pmin),abs(pmax)));
+ if(fuzz == -1)
+ fuzz=1000*realEpsilon*max(abs(pmin),abs(pmax),abs(qmin),abs(qmax));
return
pmax.x+fuzz >= qmin.x &&
@@ -1363,7 +1378,7 @@ nullpens.cyclic=true;
void draw(transform t=identity(), frame f, surface s, int nu=1, int nv=1,
material[] surfacepen, pen[] meshpen=nullpens,
- light light=currentlight, light meshlight=light, string name="",
+ light light=currentlight, light meshlight=nolight, string name="",
render render=defaultrender, projection P=currentprojection)
{
bool is3D=is3D();
@@ -1450,7 +1465,7 @@ void draw(transform t=identity(), frame f, surface s, int nu=1, int nv=1,
void draw(transform t=identity(), frame f, surface s, int nu=1, int nv=1,
material surfacepen=currentpen, pen meshpen=nullpen,
- light light=currentlight, light meshlight=light, string name="",
+ light light=currentlight, light meshlight=nolight, string name="",
render render=defaultrender, projection P=currentprojection)
{
material[] surfacepen={surfacepen};
@@ -1462,7 +1477,7 @@ void draw(transform t=identity(), frame f, surface s, int nu=1, int nv=1,
void draw(picture pic=currentpicture, surface s, int nu=1, int nv=1,
material[] surfacepen, pen[] meshpen=nullpens,
- light light=currentlight, light meshlight=light, string name="",
+ light light=currentlight, light meshlight=nolight, string name="",
render render=defaultrender)
{
if(s.empty()) return;
@@ -1507,7 +1522,7 @@ void draw(picture pic=currentpicture, surface s, int nu=1, int nv=1,
void draw(picture pic=currentpicture, surface s, int nu=1, int nv=1,
material surfacepen=currentpen, pen meshpen=nullpen,
- light light=currentlight, light meshlight=light, string name="",
+ light light=currentlight, light meshlight=nolight, string name="",
render render=defaultrender)
{
material[] surfacepen={surfacepen};
@@ -1519,7 +1534,7 @@ void draw(picture pic=currentpicture, surface s, int nu=1, int nv=1,
void draw(picture pic=currentpicture, surface s, int nu=1, int nv=1,
material[] surfacepen, pen meshpen,
- light light=currentlight, light meshlight=light, string name="",
+ light light=currentlight, light meshlight=nolight, string name="",
render render=defaultrender)
{
pen[] meshpen={meshpen};
diff --git a/Build/source/utils/asymptote/base/three_tube.asy b/Build/source/utils/asymptote/base/three_tube.asy
index 8b621e92dda..bbbd5a65633 100644
--- a/Build/source/utils/asymptote/base/three_tube.asy
+++ b/Build/source/utils/asymptote/base/three_tube.asy
@@ -83,8 +83,10 @@ private real[][][] bispline0(real[][] z, real[][] p, real[][] q, real[][] r,
count=0;
for(int i=0; i < n; ++i) {
bool[] condi=cond[i];
+ bool[] condp=cond[i+1];
for(int j=0; j < m; ++j)
- if(condi[j]) ++count;
+ if(all || (condi[j] && condi[j+1] && condp[j] && condp[j+1]))
+ ++count;
}
}
@@ -104,8 +106,9 @@ private real[][][] bispline0(real[][] z, real[][] p, real[][] q, real[][] r,
real[] qi=q[i];
real[] qp=q[ip];
bool[] condi=all ? null : cond[i];
+ bool[] condp=all ? null : cond[i+1];
for(int j=0; j < m; ++j) {
- if(all || condi[j]) {
+ if(all || (condi[j] && condi[j+1] && condp[j] && condp[j+1])) {
real yj=y[j];
int jp=j+1;
real yp=y[jp];
@@ -214,7 +217,8 @@ surface surface(triple f(pair z), real[] u, real[] v,
bool[] activei=all ? null : active[i];
for(int j=0; j <= nv; ++j) {
pair z=(ui,v[j]);
- triple f=(all || (activei[j]=cond(z))) ? f(z) : O;
+ if(!all) activei[j]=cond(z);
+ triple f=f(z);
fxi[j]=f.x;
fyi[j]=f.y;
fzi[j]=f.z;
diff --git a/Build/source/utils/asymptote/base/trembling.asy b/Build/source/utils/asymptote/base/trembling.asy
index 6f6f5973332..f9f0d6a7474 100644
--- a/Build/source/utils/asymptote/base/trembling.asy
+++ b/Build/source/utils/asymptote/base/trembling.asy
@@ -29,10 +29,7 @@
real magneticRadius=1; // unit is bp in postscript coordinates.
real trembleFuzz(){return min(1e-3,magneticRadius/10);}
-/* <asyxml> <variable type="real" signature="trembleAngle"> <code> </asyxml> */
real trembleAngle=4, trembleFrequency=0.5, trembleRandom=2;
-/* <asyxml> </code> <documentation> Variables used by the routine 'tremble'.
- </documentation> </variable> </asyxml> */
struct tremble
{
@@ -58,13 +55,8 @@ struct tremble
return op;
}
- /* <asyxml> <function type="pair" signature="attract(pair,path,real)"> <code>
- </asyxml> */
real atime(pair m, path g, real fuzz=trembleFuzz())
- {/* <asyxml> </code> <documentation> Return the time of the point on path g
- nearest to 'm'.
- 'fuzz' is the argument 'fuzz' of 'intersect'. </documentation> </function>
- </asyxml> */
+ {// Return the time of the point on path g nearest to m, within fuzz.
if(length(g) == 0) return 0.0;
real[] t=intersect(m,g,fuzz);
if(t.length > 0) return t[1];
@@ -91,11 +83,8 @@ struct tremble
return ot;
}
- /* <asyxml> <function type="path" signature="addnode(path,real)"> <code>
- </asyxml> */
path addnode(path g, real t)
- {/* <asyxml> </code> <documentation> Add a node to 'g' at point(g,t).
- </documentation> </function> </asyxml> */
+ {// Add a node to 'g' at point(g,t).
real l=length(g);
real rt=t % 1;
if(l == 0 || (t > l && !cyclic(g)) || rt == 0) return g;
@@ -129,11 +118,8 @@ struct tremble
return og;
}
- /* <asyxml> <function type="path" signature="addnodes(path,int)"> <code>
- </asyxml> */
path addnodes(path g, int n)
- {/* <asyxml> </code> <documentation> Add 'n' nodes between each node of 'g'.
- </documentation> </function> </asyxml> */
+ {// Add 'n' nodes between each node of 'g'.
real l=length(g);
if(n == 0 || l == 0) return g;
path og=g;
@@ -148,8 +134,6 @@ struct tremble
return og;
}
- /* <asyxml> <function type="path"
- signature="tremble(path,real,real,real,real,pair[] )"> <code> </asyxml> */
void operator init(real angle=trembleAngle, real frequency=trembleFrequency,
real random=trembleRandom, real fuzz=trembleFuzz()) {
this.angle=angle;
@@ -159,7 +143,7 @@ struct tremble
}
path deform(path g...pair[] magneticPoints) {
- /* <asyxml> </code> <documentation> Return g as it was handwriting.
+ /* Return g as it was handwriting.
The postcontrols and precontrols of the nodes of g will be rotated
by an angle proportional to 'angle'(in degrees).
If frequency < 1, floor(1/frequency) nodes will be added to g to
@@ -169,8 +153,7 @@ struct tremble
'random' controls the randomized coefficient which will be multiplied
by 'angle'.
random is 0 means don't use randomized coefficient;
- The higher 'random' is, the more the trembling is randomized.
- </documentation> </function> </asyxml> */
+ The higher 'random' is, the more the trembling is randomized. */
if(length(g) == 0) return g;
g=addnodes(g,fuzz*abs(max(g)-min(g))...magneticPoints);
path tg=g;
diff --git a/Build/source/utils/asymptote/camp.tab.cc b/Build/source/utils/asymptote/camp.tab.cc
index b04a4535dd5..64fce3227e8 100644
--- a/Build/source/utils/asymptote/camp.tab.cc
+++ b/Build/source/utils/asymptote/camp.tab.cc
@@ -1,4 +1,4 @@
-/* A Bison parser, made by GNU Bison 2.6.1. */
+/* A Bison parser, made by GNU Bison 2.7. */
/* Bison implementation for Yacc-like parsers in C
@@ -44,7 +44,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.6.1"
+#define YYBISON_VERSION "2.7"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -62,7 +62,7 @@
/* Copy the first part of user declarations. */
-/* Line 336 of yacc.c */
+/* Line 371 of yacc.c */
#line 1 "camp.y"
/*****
@@ -122,7 +122,7 @@ using namespace absyntax;
using sym::symbol;
using mem::string;
-/* Line 336 of yacc.c */
+/* Line 371 of yacc.c */
#line 127 "camp.tab.c"
# ifndef YY_NULL
@@ -143,8 +143,8 @@ using mem::string;
/* In a future release of Bison, this section will be replaced
by #include "camp.tab.h". */
-#ifndef YY_CAMP_TAB_H
-# define YY_CAMP_TAB_H
+#ifndef YY_YY_CAMP_TAB_H_INCLUDED
+# define YY_YY_CAMP_TAB_H_INCLUDED
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 1
@@ -221,7 +221,7 @@ extern int yydebug;
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
{
-/* Line 350 of yacc.c */
+/* Line 387 of yacc.c */
#line 60 "camp.y"
position pos;
@@ -270,7 +270,7 @@ typedef union YYSTYPE
absyntax::formals *fls;
-/* Line 350 of yacc.c */
+/* Line 387 of yacc.c */
#line 275 "camp.tab.c"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
@@ -294,11 +294,11 @@ int yyparse ();
#endif
#endif /* ! YYPARSE_PARAM */
-#endif /* !YY_CAMP_TAB_H */
+#endif /* !YY_YY_CAMP_TAB_H_INCLUDED */
/* Copy the second part of user declarations. */
-/* Line 353 of yacc.c */
+/* Line 390 of yacc.c */
#line 303 "camp.tab.c"
#ifdef short
@@ -352,24 +352,24 @@ typedef short int yytype_int16;
# if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
-# define YY_(msgid) dgettext ("bison-runtime", msgid)
+# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
# endif
# endif
# ifndef YY_
-# define YY_(msgid) msgid
+# define YY_(Msgid) Msgid
# endif
#endif
/* Suppress unused-variable warnings by "using" E. */
#if ! defined lint || defined __GNUC__
-# define YYUSE(e) ((void) (e))
+# define YYUSE(E) ((void) (E))
#else
-# define YYUSE(e) /* empty */
+# define YYUSE(E) /* empty */
#endif
/* Identity function, used to suppress warnings about constant conditions. */
#ifndef lint
-# define YYID(n) (n)
+# define YYID(N) (N)
#else
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
@@ -1102,10 +1102,10 @@ static const yytype_int16 yytable[] =
131
};
-#define yypact_value_is_default(yystate) \
- ((yystate) == (-282))
+#define yypact_value_is_default(Yystate) \
+ (!!((Yystate) == (-282)))
-#define yytable_value_is_error(yytable_value) \
+#define yytable_value_is_error(Yytable_value) \
YYID (0)
static const yytype_int16 yycheck[] =
@@ -1387,47 +1387,18 @@ do \
} \
while (YYID (0))
-
+/* Error token number */
#define YYTERROR 1
#define YYERRCODE 256
-/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
- If N is 0, then set CURRENT to the empty location which ends
- the previous symbol: RHS[0] (always defined). */
-
-#ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N) \
- do \
- if (YYID (N)) \
- { \
- (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
- (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
- (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
- (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
- } \
- else \
- { \
- (Current).first_line = (Current).last_line = \
- YYRHSLOC (Rhs, 0).last_line; \
- (Current).first_column = (Current).last_column = \
- YYRHSLOC (Rhs, 0).last_column; \
- } \
- while (YYID (0))
-#endif
-
-#define YYRHSLOC(Rhs, K) ((Rhs)[K])
-
-
/* This macro is provided for backward compatibility. */
-
#ifndef YY_LOCATION_PRINT
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
#endif
/* YYLEX -- calling `yylex' with the right arguments. */
-
#ifdef YYLEX_PARAM
# define YYLEX yylex (YYLEX_PARAM)
#else
@@ -1490,7 +1461,7 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep)
switch (yytype)
{
default:
- break;
+ break;
}
}
@@ -1732,7 +1703,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
{
YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
YYSIZE_T yysize = yysize0;
- YYSIZE_T yysize1;
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
/* Internationalized format string. */
const char *yyformat = YY_NULL;
@@ -1795,11 +1765,13 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
break;
}
yyarg[yycount++] = yytname[yyx];
- yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
- if (! (yysize <= yysize1
- && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
- return 2;
- yysize = yysize1;
+ {
+ YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
+ if (! (yysize <= yysize1
+ && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
+ }
}
}
}
@@ -1819,10 +1791,12 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
# undef YYCASE_
}
- yysize1 = yysize + yystrlen (yyformat);
- if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
- return 2;
- yysize = yysize1;
+ {
+ YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
+ if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
+ }
if (*yymsg_alloc < yysize)
{
@@ -1882,7 +1856,7 @@ yydestruct (yymsg, yytype, yyvaluep)
{
default:
- break;
+ break;
}
}
@@ -1892,8 +1866,17 @@ yydestruct (yymsg, yytype, yyvaluep)
/* The lookahead symbol. */
int yychar;
+
+#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END
+#endif
+#ifndef YY_INITIAL_VALUE
+# define YY_INITIAL_VALUE(Value) /* Nothing. */
+#endif
+
/* The semantic value of the lookahead symbol. */
-YYSTYPE yylval;
+YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
/* Number of syntax errors so far. */
int yynerrs;
@@ -1951,7 +1934,7 @@ yyparse ()
int yyn;
int yyresult;
/* Lookahead token as an internal (translated) token number. */
- int yytoken;
+ int yytoken = 0;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
@@ -1969,9 +1952,8 @@ yyparse ()
Keep to zero when no symbol should be popped. */
int yylen = 0;
- yytoken = 0;
- yyss = yyssa;
- yyvs = yyvsa;
+ yyssp = yyss = yyssa;
+ yyvsp = yyvs = yyvsa;
yystacksize = YYINITDEPTH;
YYDPRINTF ((stderr, "Starting parse\n"));
@@ -1980,13 +1962,6 @@ yyparse ()
yyerrstatus = 0;
yynerrs = 0;
yychar = YYEMPTY; /* Cause a token to be read. */
-
- /* Initialize stack pointers.
- Waste one element of value and location stack
- so that they stay on the same level as the state stack.
- The wasted elements are never initialized. */
- yyssp = yyss;
- yyvsp = yyvs;
goto yysetstate;
/*------------------------------------------------------------.
@@ -2127,7 +2102,9 @@ yybackup:
yychar = YYEMPTY;
yystate = yyn;
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
*++yyvsp = yylval;
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
goto yynewstate;
@@ -2164,561 +2141,561 @@ yyreduce:
switch (yyn)
{
case 2:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 191 "camp.y"
{ absyntax::root = (yyvsp[(1) - (1)].b); }
break;
case 3:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 195 "camp.y"
{ (yyval.b) = new file(lexerPos(), false); }
break;
case 4:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 197 "camp.y"
{ (yyval.b) = (yyvsp[(1) - (2)].b); (yyval.b)->add((yyvsp[(2) - (2)].run)); }
break;
case 5:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 201 "camp.y"
{ (yyval.b) = new block(lexerPos(), true); }
break;
case 6:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 203 "camp.y"
{ (yyval.b) = (yyvsp[(1) - (2)].b); (yyval.b)->add((yyvsp[(2) - (2)].run)); }
break;
case 7:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 207 "camp.y"
{ (yyval.n) = new simpleName((yyvsp[(1) - (1)].ps).pos, (yyvsp[(1) - (1)].ps).sym); }
break;
case 8:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 208 "camp.y"
{ (yyval.n) = new qualifiedName((yyvsp[(2) - (3)].pos), (yyvsp[(1) - (3)].n), (yyvsp[(3) - (3)].ps).sym); }
break;
case 9:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 209 "camp.y"
{ (yyval.n) = new simpleName((yyvsp[(1) - (1)].ps).pos,
symbol::trans("operator answer")); }
break;
case 10:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 214 "camp.y"
{ (yyval.run) = (yyvsp[(1) - (1)].d); }
break;
case 11:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 215 "camp.y"
{ (yyval.run) = (yyvsp[(1) - (1)].s); }
break;
case 12:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 217 "camp.y"
{ (yyval.run) = new modifiedRunnable((yyvsp[(1) - (2)].ml)->getPos(), (yyvsp[(1) - (2)].ml), (yyvsp[(2) - (2)].d)); }
break;
case 13:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 219 "camp.y"
{ (yyval.run) = new modifiedRunnable((yyvsp[(1) - (2)].ml)->getPos(), (yyvsp[(1) - (2)].ml), (yyvsp[(2) - (2)].s)); }
break;
case 14:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 223 "camp.y"
{ (yyval.ml) = new modifierList((yyvsp[(1) - (1)].mod).pos); (yyval.ml)->add((yyvsp[(1) - (1)].mod).val); }
break;
case 15:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 224 "camp.y"
{ (yyval.ml) = new modifierList((yyvsp[(1) - (1)].perm).pos); (yyval.ml)->add((yyvsp[(1) - (1)].perm).val); }
break;
case 16:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 226 "camp.y"
{ (yyval.ml) = (yyvsp[(1) - (2)].ml); (yyval.ml)->add((yyvsp[(2) - (2)].mod).val); }
break;
case 17:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 228 "camp.y"
{ (yyval.ml) = (yyvsp[(1) - (2)].ml); (yyval.ml)->add((yyvsp[(2) - (2)].perm).val); }
break;
case 18:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 232 "camp.y"
{ (yyval.d) = (yyvsp[(1) - (1)].vd); }
break;
case 19:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 233 "camp.y"
{ (yyval.d) = (yyvsp[(1) - (1)].d); }
break;
case 20:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 234 "camp.y"
{ (yyval.d) = (yyvsp[(1) - (1)].d); }
break;
case 21:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 236 "camp.y"
{ (yyval.d) = new accessdec((yyvsp[(1) - (3)].pos), (yyvsp[(2) - (3)].ipl)); }
break;
case 22:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 238 "camp.y"
{ (yyval.d) = new unraveldec((yyvsp[(1) - (5)].pos), (yyvsp[(2) - (5)].n), (yyvsp[(4) - (5)].ipl)); }
break;
case 23:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 240 "camp.y"
{ (yyval.d) = new unraveldec((yyvsp[(1) - (5)].pos), (yyvsp[(2) - (5)].n), WILDCARD); }
break;
case 24:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 241 "camp.y"
{ (yyval.d) = new unraveldec((yyvsp[(1) - (3)].pos), (yyvsp[(2) - (3)].n), WILDCARD); }
break;
case 25:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 243 "camp.y"
{ (yyval.d) = new fromaccessdec((yyvsp[(1) - (5)].pos), (yyvsp[(2) - (5)].ps).sym, (yyvsp[(4) - (5)].ipl)); }
break;
case 26:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 245 "camp.y"
{ (yyval.d) = new fromaccessdec((yyvsp[(1) - (5)].pos), (yyvsp[(2) - (5)].ps).sym, WILDCARD); }
break;
case 27:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 247 "camp.y"
{ (yyval.d) = new importdec((yyvsp[(1) - (3)].pos), (yyvsp[(2) - (3)].ip)); }
break;
case 28:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 248 "camp.y"
{ (yyval.d) = new includedec((yyvsp[(1) - (3)].pos), (yyvsp[(2) - (3)].ps).sym); }
break;
case 29:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 250 "camp.y"
{ (yyval.d) = new includedec((yyvsp[(1) - (3)].pos), (yyvsp[(2) - (3)].stre)->getString()); }
break;
case 30:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 254 "camp.y"
{ (yyval.ip) = new idpair((yyvsp[(1) - (1)].ps).pos, (yyvsp[(1) - (1)].ps).sym); }
break;
case 31:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 256 "camp.y"
{ (yyval.ip) = new idpair((yyvsp[(1) - (3)].ps).pos, (yyvsp[(1) - (3)].ps).sym, (yyvsp[(2) - (3)].ps).sym , (yyvsp[(3) - (3)].ps).sym); }
break;
case 32:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 260 "camp.y"
{ (yyval.ipl) = new idpairlist(); (yyval.ipl)->add((yyvsp[(1) - (1)].ip)); }
break;
case 33:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 262 "camp.y"
{ (yyval.ipl) = (yyvsp[(1) - (3)].ipl); (yyval.ipl)->add((yyvsp[(3) - (3)].ip)); }
break;
case 34:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 266 "camp.y"
{ (yyval.ps) = (yyvsp[(1) - (1)].ps); }
break;
case 35:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 267 "camp.y"
{ (yyval.ps).pos = (yyvsp[(1) - (1)].stre)->getPos();
(yyval.ps).sym = symbol::literalTrans((yyvsp[(1) - (1)].stre)->getString()); }
break;
case 36:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 272 "camp.y"
{ (yyval.ip) = new idpair((yyvsp[(1) - (1)].ps).pos, (yyvsp[(1) - (1)].ps).sym); }
break;
case 37:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 274 "camp.y"
{ (yyval.ip) = new idpair((yyvsp[(1) - (3)].ps).pos, (yyvsp[(1) - (3)].ps).sym, (yyvsp[(2) - (3)].ps).sym , (yyvsp[(3) - (3)].ps).sym); }
break;
case 38:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 278 "camp.y"
{ (yyval.ipl) = new idpairlist(); (yyval.ipl)->add((yyvsp[(1) - (1)].ip)); }
break;
case 39:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 280 "camp.y"
{ (yyval.ipl) = (yyvsp[(1) - (3)].ipl); (yyval.ipl)->add((yyvsp[(3) - (3)].ip)); }
break;
case 40:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 284 "camp.y"
{ (yyval.vd) = (yyvsp[(1) - (2)].vd); }
break;
case 41:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 288 "camp.y"
{ (yyval.vd) = new vardec((yyvsp[(1) - (2)].t)->getPos(), (yyvsp[(1) - (2)].t), (yyvsp[(2) - (2)].dil)); }
break;
case 42:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 292 "camp.y"
{ (yyval.t) = (yyvsp[(1) - (1)].t); }
break;
case 43:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 293 "camp.y"
{ (yyval.t) = new arrayTy((yyvsp[(1) - (2)].n), (yyvsp[(2) - (2)].dim)); }
break;
case 44:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 297 "camp.y"
{ (yyval.t) = new nameTy((yyvsp[(1) - (1)].n)); }
break;
case 45:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 301 "camp.y"
{ (yyval.dim) = new dimensions((yyvsp[(1) - (2)].pos)); }
break;
case 46:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 302 "camp.y"
{ (yyval.dim) = (yyvsp[(1) - (3)].dim); (yyval.dim)->increase(); }
break;
case 47:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 306 "camp.y"
{ (yyval.elist) = new explist((yyvsp[(1) - (3)].pos)); (yyval.elist)->add((yyvsp[(2) - (3)].e)); }
break;
case 48:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 308 "camp.y"
{ (yyval.elist) = (yyvsp[(1) - (4)].elist); (yyval.elist)->add((yyvsp[(3) - (4)].e)); }
break;
case 49:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 312 "camp.y"
{ (yyval.dil) = new decidlist((yyvsp[(1) - (1)].di)->getPos()); (yyval.dil)->add((yyvsp[(1) - (1)].di)); }
break;
case 50:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 314 "camp.y"
{ (yyval.dil) = (yyvsp[(1) - (3)].dil); (yyval.dil)->add((yyvsp[(3) - (3)].di)); }
break;
case 51:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 318 "camp.y"
{ (yyval.di) = new decid((yyvsp[(1) - (1)].dis)->getPos(), (yyvsp[(1) - (1)].dis)); }
break;
case 52:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 320 "camp.y"
{ (yyval.di) = new decid((yyvsp[(1) - (3)].dis)->getPos(), (yyvsp[(1) - (3)].dis), (yyvsp[(3) - (3)].vi)); }
break;
case 53:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 324 "camp.y"
{ (yyval.dis) = new decidstart((yyvsp[(1) - (1)].ps).pos, (yyvsp[(1) - (1)].ps).sym); }
break;
case 54:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 325 "camp.y"
{ (yyval.dis) = new decidstart((yyvsp[(1) - (2)].ps).pos, (yyvsp[(1) - (2)].ps).sym, (yyvsp[(2) - (2)].dim)); }
break;
case 55:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 326 "camp.y"
{ (yyval.dis) = new fundecidstart((yyvsp[(1) - (3)].ps).pos, (yyvsp[(1) - (3)].ps).sym, 0,
new formals((yyvsp[(2) - (3)].pos))); }
break;
case 56:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 329 "camp.y"
{ (yyval.dis) = new fundecidstart((yyvsp[(1) - (4)].ps).pos, (yyvsp[(1) - (4)].ps).sym, 0, (yyvsp[(3) - (4)].fls)); }
break;
case 57:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 333 "camp.y"
{ (yyval.vi) = (yyvsp[(1) - (1)].e); }
break;
case 58:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 334 "camp.y"
{ (yyval.vi) = (yyvsp[(1) - (1)].ai); }
break;
case 59:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 339 "camp.y"
{ (yyval.b) = (yyvsp[(2) - (3)].b); }
break;
case 60:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 343 "camp.y"
{ (yyval.ai) = new arrayinit((yyvsp[(1) - (2)].pos)); }
break;
case 61:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 345 "camp.y"
{ (yyval.ai) = new arrayinit((yyvsp[(1) - (4)].pos)); (yyval.ai)->addRest((yyvsp[(3) - (4)].vi)); }
break;
case 62:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 347 "camp.y"
{ (yyval.ai) = (yyvsp[(2) - (3)].ai); }
break;
case 63:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 349 "camp.y"
{ (yyval.ai) = (yyvsp[(2) - (5)].ai); (yyval.ai)->addRest((yyvsp[(4) - (5)].vi)); }
break;
case 64:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 353 "camp.y"
{ (yyval.ai) = new arrayinit((yyvsp[(1) - (1)].pos)); }
break;
case 65:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 354 "camp.y"
{ (yyval.ai) = (yyvsp[(1) - (1)].ai); }
break;
case 66:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 355 "camp.y"
{ (yyval.ai) = (yyvsp[(1) - (2)].ai); }
break;
case 67:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 359 "camp.y"
{ (yyval.ai) = new arrayinit((yyvsp[(1) - (1)].vi)->getPos());
(yyval.ai)->add((yyvsp[(1) - (1)].vi));}
break;
case 68:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 362 "camp.y"
{ (yyval.ai) = (yyvsp[(1) - (3)].ai); (yyval.ai)->add((yyvsp[(3) - (3)].vi)); }
break;
case 69:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 366 "camp.y"
{ (yyval.fls) = new formals((yyvsp[(1) - (1)].fl)->getPos()); (yyval.fls)->add((yyvsp[(1) - (1)].fl)); }
break;
case 70:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 367 "camp.y"
{ (yyval.fls) = new formals((yyvsp[(1) - (2)].pos)); (yyval.fls)->addRest((yyvsp[(2) - (2)].fl)); }
break;
case 71:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 369 "camp.y"
{ (yyval.fls) = (yyvsp[(1) - (3)].fls); (yyval.fls)->add((yyvsp[(3) - (3)].fl)); }
break;
case 72:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 371 "camp.y"
{ (yyval.fls) = (yyvsp[(1) - (3)].fls); (yyval.fls)->addRest((yyvsp[(3) - (3)].fl)); }
break;
case 73:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 375 "camp.y"
{ (yyval.boo) = true; }
break;
case 74:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 376 "camp.y"
{ (yyval.boo) = false; }
break;
case 75:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 381 "camp.y"
{ (yyval.fl) = new formal((yyvsp[(2) - (2)].t)->getPos(), (yyvsp[(2) - (2)].t), 0, 0, (yyvsp[(1) - (2)].boo), 0); }
break;
case 76:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 383 "camp.y"
{ (yyval.fl) = new formal((yyvsp[(2) - (3)].t)->getPos(), (yyvsp[(2) - (3)].t), (yyvsp[(3) - (3)].dis), 0, (yyvsp[(1) - (3)].boo), 0); }
break;
case 77:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 385 "camp.y"
{ (yyval.fl) = new formal((yyvsp[(2) - (5)].t)->getPos(), (yyvsp[(2) - (5)].t), (yyvsp[(3) - (5)].dis), (yyvsp[(5) - (5)].vi), (yyvsp[(1) - (5)].boo), 0); }
break;
case 78:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 388 "camp.y"
{ bool k = checkKeyword((yyvsp[(3) - (4)].ps).pos, (yyvsp[(3) - (4)].ps).sym);
(yyval.fl) = new formal((yyvsp[(2) - (4)].t)->getPos(), (yyvsp[(2) - (4)].t), (yyvsp[(4) - (4)].dis), 0, (yyvsp[(1) - (4)].boo), k); }
break;
case 79:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 391 "camp.y"
{ bool k = checkKeyword((yyvsp[(3) - (6)].ps).pos, (yyvsp[(3) - (6)].ps).sym);
(yyval.fl) = new formal((yyvsp[(2) - (6)].t)->getPos(), (yyvsp[(2) - (6)].t), (yyvsp[(4) - (6)].dis), (yyvsp[(6) - (6)].vi), (yyvsp[(1) - (6)].boo), k); }
break;
case 80:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 397 "camp.y"
{ (yyval.d) = new fundec((yyvsp[(3) - (5)].pos), (yyvsp[(1) - (5)].t), (yyvsp[(2) - (5)].ps).sym, new formals((yyvsp[(3) - (5)].pos)), (yyvsp[(5) - (5)].s)); }
break;
case 81:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 399 "camp.y"
{ (yyval.d) = new fundec((yyvsp[(3) - (6)].pos), (yyvsp[(1) - (6)].t), (yyvsp[(2) - (6)].ps).sym, (yyvsp[(4) - (6)].fls), (yyvsp[(6) - (6)].s)); }
break;
case 82:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 403 "camp.y"
{ (yyval.d) = new recorddec((yyvsp[(1) - (3)].pos), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].b)); }
break;
case 83:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 404 "camp.y"
{ (yyval.d) = new typedec((yyvsp[(1) - (2)].pos), (yyvsp[(2) - (2)].vd)); }
break;
case 84:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 408 "camp.y"
{ (yyval.slice) = new slice((yyvsp[(1) - (1)].pos), 0, 0); }
break;
case 85:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 409 "camp.y"
{ (yyval.slice) = new slice((yyvsp[(2) - (2)].pos), (yyvsp[(1) - (2)].e), 0); }
break;
case 86:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 410 "camp.y"
{ (yyval.slice) = new slice((yyvsp[(1) - (2)].pos), 0, (yyvsp[(2) - (2)].e)); }
break;
case 87:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 411 "camp.y"
{ (yyval.slice) = new slice((yyvsp[(2) - (3)].pos), (yyvsp[(1) - (3)].e), (yyvsp[(3) - (3)].e)); }
break;
case 88:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 415 "camp.y"
{ (yyval.e) = new fieldExp((yyvsp[(2) - (3)].pos), (yyvsp[(1) - (3)].e), (yyvsp[(3) - (3)].ps).sym); }
break;
case 89:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 416 "camp.y"
{ (yyval.e) = new subscriptExp((yyvsp[(2) - (4)].pos),
new nameExp((yyvsp[(1) - (4)].n)->getPos(), (yyvsp[(1) - (4)].n)), (yyvsp[(3) - (4)].e)); }
break;
case 90:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 418 "camp.y"
{ (yyval.e) = new subscriptExp((yyvsp[(2) - (4)].pos), (yyvsp[(1) - (4)].e), (yyvsp[(3) - (4)].e)); }
break;
case 91:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 419 "camp.y"
{ (yyval.e) = new sliceExp((yyvsp[(2) - (4)].pos),
new nameExp((yyvsp[(1) - (4)].n)->getPos(), (yyvsp[(1) - (4)].n)), (yyvsp[(3) - (4)].slice)); }
break;
case 92:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 421 "camp.y"
{ (yyval.e) = new sliceExp((yyvsp[(2) - (4)].pos), (yyvsp[(1) - (4)].e), (yyvsp[(3) - (4)].slice)); }
break;
case 93:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 422 "camp.y"
{ (yyval.e) = new callExp((yyvsp[(2) - (3)].pos),
new nameExp((yyvsp[(1) - (3)].n)->getPos(), (yyvsp[(1) - (3)].n)),
@@ -2726,7 +2703,7 @@ yyreduce:
break;
case 94:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 426 "camp.y"
{ (yyval.e) = new callExp((yyvsp[(2) - (4)].pos),
new nameExp((yyvsp[(1) - (4)].n)->getPos(), (yyvsp[(1) - (4)].n)),
@@ -2734,295 +2711,295 @@ yyreduce:
break;
case 95:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 429 "camp.y"
{ (yyval.e) = new callExp((yyvsp[(2) - (3)].pos), (yyvsp[(1) - (3)].e), new arglist()); }
break;
case 96:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 431 "camp.y"
{ (yyval.e) = new callExp((yyvsp[(2) - (4)].pos), (yyvsp[(1) - (4)].e), (yyvsp[(3) - (4)].alist)); }
break;
case 97:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 433 "camp.y"
{ (yyval.e) = (yyvsp[(2) - (3)].e); }
break;
case 98:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 435 "camp.y"
{ (yyval.e) = new nameExp((yyvsp[(2) - (3)].n)->getPos(), (yyvsp[(2) - (3)].n)); }
break;
case 99:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 436 "camp.y"
{ (yyval.e) = new thisExp((yyvsp[(1) - (1)].pos)); }
break;
case 100:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 440 "camp.y"
{ (yyval.arg).name = symbol::nullsym; (yyval.arg).val=(yyvsp[(1) - (1)].e); }
break;
case 101:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 441 "camp.y"
{ (yyval.arg).name = (yyvsp[(1) - (3)].ps).sym; (yyval.arg).val=(yyvsp[(3) - (3)].e); }
break;
case 102:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 445 "camp.y"
{ (yyval.alist) = new arglist(); (yyval.alist)->add((yyvsp[(1) - (1)].arg)); }
break;
case 103:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 447 "camp.y"
{ (yyval.alist) = new arglist(); (yyval.alist)->addRest((yyvsp[(2) - (2)].arg)); }
break;
case 104:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 449 "camp.y"
{ (yyval.alist) = (yyvsp[(1) - (3)].alist); (yyval.alist)->add((yyvsp[(3) - (3)].arg)); }
break;
case 105:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 451 "camp.y"
{ (yyval.alist) = (yyvsp[(1) - (3)].alist); (yyval.alist)->addRest((yyvsp[(3) - (3)].arg)); }
break;
case 106:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 456 "camp.y"
{ (yyval.alist) = new arglist(); (yyval.alist)->add((yyvsp[(1) - (3)].e)); (yyval.alist)->add((yyvsp[(3) - (3)].e)); }
break;
case 107:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 457 "camp.y"
{ (yyval.alist) = (yyvsp[(1) - (3)].alist); (yyval.alist)->add((yyvsp[(3) - (3)].e)); }
break;
case 108:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 461 "camp.y"
{ (yyval.e) = new nameExp((yyvsp[(1) - (1)].n)->getPos(), (yyvsp[(1) - (1)].n)); }
break;
case 109:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 462 "camp.y"
{ (yyval.e) = (yyvsp[(1) - (1)].e); }
break;
case 110:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 463 "camp.y"
{ (yyval.e) = (yyvsp[(1) - (1)].e); }
break;
case 111:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 464 "camp.y"
{ (yyval.e) = (yyvsp[(1) - (1)].stre); }
break;
case 112:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 466 "camp.y"
{ (yyval.e) = new scaleExp((yyvsp[(1) - (2)].e)->getPos(), (yyvsp[(1) - (2)].e), (yyvsp[(2) - (2)].e)); }
break;
case 113:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 468 "camp.y"
{ (yyval.e) = new castExp((yyvsp[(2) - (4)].n)->getPos(), new nameTy((yyvsp[(2) - (4)].n)), (yyvsp[(4) - (4)].e)); }
break;
case 114:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 470 "camp.y"
{ (yyval.e) = new castExp((yyvsp[(2) - (5)].n)->getPos(), new arrayTy((yyvsp[(2) - (5)].n), (yyvsp[(3) - (5)].dim)), (yyvsp[(5) - (5)].e)); }
break;
case 115:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 472 "camp.y"
{ (yyval.e) = new unaryExp((yyvsp[(1) - (2)].ps).pos, (yyvsp[(2) - (2)].e), (yyvsp[(1) - (2)].ps).sym); }
break;
case 116:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 474 "camp.y"
{ (yyval.e) = new unaryExp((yyvsp[(1) - (2)].ps).pos, (yyvsp[(2) - (2)].e), (yyvsp[(1) - (2)].ps).sym); }
break;
case 117:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 475 "camp.y"
{ (yyval.e) = new unaryExp((yyvsp[(1) - (2)].ps).pos, (yyvsp[(2) - (2)].e), (yyvsp[(1) - (2)].ps).sym); }
break;
case 118:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 476 "camp.y"
{ (yyval.e) = new binaryExp((yyvsp[(2) - (3)].ps).pos, (yyvsp[(1) - (3)].e), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].e)); }
break;
case 119:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 477 "camp.y"
{ (yyval.e) = new binaryExp((yyvsp[(2) - (3)].ps).pos, (yyvsp[(1) - (3)].e), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].e)); }
break;
case 120:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 478 "camp.y"
{ (yyval.e) = new binaryExp((yyvsp[(2) - (3)].ps).pos, (yyvsp[(1) - (3)].e), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].e)); }
break;
case 121:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 479 "camp.y"
{ (yyval.e) = new binaryExp((yyvsp[(2) - (3)].ps).pos, (yyvsp[(1) - (3)].e), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].e)); }
break;
case 122:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 480 "camp.y"
{ (yyval.e) = new binaryExp((yyvsp[(2) - (3)].ps).pos, (yyvsp[(1) - (3)].e), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].e)); }
break;
case 123:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 481 "camp.y"
{ (yyval.e) = new binaryExp((yyvsp[(2) - (3)].ps).pos, (yyvsp[(1) - (3)].e), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].e)); }
break;
case 124:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 482 "camp.y"
{ (yyval.e) = new binaryExp((yyvsp[(2) - (3)].ps).pos, (yyvsp[(1) - (3)].e), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].e)); }
break;
case 125:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 483 "camp.y"
{ (yyval.e) = new binaryExp((yyvsp[(2) - (3)].ps).pos, (yyvsp[(1) - (3)].e), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].e)); }
break;
case 126:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 484 "camp.y"
{ (yyval.e) = new binaryExp((yyvsp[(2) - (3)].ps).pos, (yyvsp[(1) - (3)].e), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].e)); }
break;
case 127:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 485 "camp.y"
{ (yyval.e) = new binaryExp((yyvsp[(2) - (3)].ps).pos, (yyvsp[(1) - (3)].e), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].e)); }
break;
case 128:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 486 "camp.y"
{ (yyval.e) = new equalityExp((yyvsp[(2) - (3)].ps).pos, (yyvsp[(1) - (3)].e), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].e)); }
break;
case 129:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 487 "camp.y"
{ (yyval.e) = new equalityExp((yyvsp[(2) - (3)].ps).pos, (yyvsp[(1) - (3)].e), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].e)); }
break;
case 130:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 488 "camp.y"
{ (yyval.e) = new andExp((yyvsp[(2) - (3)].ps).pos, (yyvsp[(1) - (3)].e), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].e)); }
break;
case 131:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 489 "camp.y"
{ (yyval.e) = new orExp((yyvsp[(2) - (3)].ps).pos, (yyvsp[(1) - (3)].e), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].e)); }
break;
case 132:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 490 "camp.y"
{ (yyval.e) = new binaryExp((yyvsp[(2) - (3)].ps).pos, (yyvsp[(1) - (3)].e), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].e)); }
break;
case 133:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 491 "camp.y"
{ (yyval.e) = new binaryExp((yyvsp[(2) - (3)].ps).pos, (yyvsp[(1) - (3)].e), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].e)); }
break;
case 134:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 492 "camp.y"
{ (yyval.e) = new binaryExp((yyvsp[(2) - (3)].ps).pos, (yyvsp[(1) - (3)].e), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].e)); }
break;
case 135:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 493 "camp.y"
{ (yyval.e) = new binaryExp((yyvsp[(2) - (3)].ps).pos, (yyvsp[(1) - (3)].e), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].e)); }
break;
case 136:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 494 "camp.y"
{ (yyval.e) = new binaryExp((yyvsp[(2) - (3)].ps).pos, (yyvsp[(1) - (3)].e), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].e)); }
break;
case 137:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 496 "camp.y"
{ (yyval.e) = new newRecordExp((yyvsp[(1) - (2)].pos), (yyvsp[(2) - (2)].t)); }
break;
case 138:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 498 "camp.y"
{ (yyval.e) = new newArrayExp((yyvsp[(1) - (3)].pos), (yyvsp[(2) - (3)].t), (yyvsp[(3) - (3)].elist), 0, 0); }
break;
case 139:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 500 "camp.y"
{ (yyval.e) = new newArrayExp((yyvsp[(1) - (4)].pos), (yyvsp[(2) - (4)].t), (yyvsp[(3) - (4)].elist), (yyvsp[(4) - (4)].dim), 0); }
break;
case 140:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 502 "camp.y"
{ (yyval.e) = new newArrayExp((yyvsp[(1) - (3)].pos), (yyvsp[(2) - (3)].t), 0, (yyvsp[(3) - (3)].dim), 0); }
break;
case 141:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 504 "camp.y"
{ (yyval.e) = new newArrayExp((yyvsp[(1) - (4)].pos), (yyvsp[(2) - (4)].t), 0, (yyvsp[(3) - (4)].dim), (yyvsp[(4) - (4)].ai)); }
break;
case 142:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 506 "camp.y"
{ (yyval.e) = new newFunctionExp((yyvsp[(1) - (5)].pos), (yyvsp[(2) - (5)].t), new formals((yyvsp[(3) - (5)].pos)), (yyvsp[(5) - (5)].s)); }
break;
case 143:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 508 "camp.y"
{ (yyval.e) = new newFunctionExp((yyvsp[(1) - (6)].pos),
new arrayTy((yyvsp[(2) - (6)].t)->getPos(), (yyvsp[(2) - (6)].t), (yyvsp[(3) - (6)].dim)),
@@ -3031,13 +3008,13 @@ yyreduce:
break;
case 144:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 513 "camp.y"
{ (yyval.e) = new newFunctionExp((yyvsp[(1) - (6)].pos), (yyvsp[(2) - (6)].t), (yyvsp[(4) - (6)].fls), (yyvsp[(6) - (6)].s)); }
break;
case 145:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 515 "camp.y"
{ (yyval.e) = new newFunctionExp((yyvsp[(1) - (7)].pos),
new arrayTy((yyvsp[(2) - (7)].t)->getPos(), (yyvsp[(2) - (7)].t), (yyvsp[(3) - (7)].dim)),
@@ -3046,31 +3023,31 @@ yyreduce:
break;
case 146:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 520 "camp.y"
{ (yyval.e) = new conditionalExp((yyvsp[(2) - (5)].pos), (yyvsp[(1) - (5)].e), (yyvsp[(3) - (5)].e), (yyvsp[(5) - (5)].e)); }
break;
case 147:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 521 "camp.y"
{ (yyval.e) = new assignExp((yyvsp[(2) - (3)].pos), (yyvsp[(1) - (3)].e), (yyvsp[(3) - (3)].e)); }
break;
case 148:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 522 "camp.y"
{ (yyval.e) = new callExp((yyvsp[(1) - (3)].pos), new nameExp((yyvsp[(1) - (3)].pos), SYM_TUPLE), (yyvsp[(2) - (3)].alist)); }
break;
case 149:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 524 "camp.y"
{ (yyvsp[(2) - (3)].j)->pushFront((yyvsp[(1) - (3)].e)); (yyvsp[(2) - (3)].j)->pushBack((yyvsp[(3) - (3)].e)); (yyval.e) = (yyvsp[(2) - (3)].j); }
break;
case 150:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 526 "camp.y"
{ (yyvsp[(2) - (2)].se)->setSide(camp::OUT);
joinExp *jexp =
@@ -3080,311 +3057,311 @@ yyreduce:
break;
case 151:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 532 "camp.y"
{ (yyval.e) = new prefixExp((yyvsp[(1) - (2)].ps).pos, (yyvsp[(2) - (2)].e), SYM_PLUS); }
break;
case 152:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 534 "camp.y"
{ (yyval.e) = new prefixExp((yyvsp[(1) - (2)].ps).pos, (yyvsp[(2) - (2)].e), SYM_MINUS); }
break;
case 153:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 537 "camp.y"
{ (yyval.e) = new postfixExp((yyvsp[(2) - (2)].ps).pos, (yyvsp[(1) - (2)].e), SYM_PLUS); }
break;
case 154:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 538 "camp.y"
{ (yyval.e) = new selfExp((yyvsp[(2) - (3)].ps).pos, (yyvsp[(1) - (3)].e), (yyvsp[(2) - (3)].ps).sym, (yyvsp[(3) - (3)].e)); }
break;
case 155:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 540 "camp.y"
{ (yyval.e) = new quoteExp((yyvsp[(1) - (4)].pos), (yyvsp[(3) - (4)].b)); }
break;
case 156:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 546 "camp.y"
{ (yyval.j) = new joinExp((yyvsp[(1) - (1)].ps).pos,(yyvsp[(1) - (1)].ps).sym); }
break;
case 157:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 548 "camp.y"
{ (yyval.j) = (yyvsp[(1) - (1)].j); }
break;
case 158:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 550 "camp.y"
{ (yyvsp[(1) - (2)].se)->setSide(camp::OUT);
(yyval.j) = (yyvsp[(2) - (2)].j); (yyval.j)->pushFront((yyvsp[(1) - (2)].se)); }
break;
case 159:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 553 "camp.y"
{ (yyvsp[(2) - (2)].se)->setSide(camp::IN);
(yyval.j) = (yyvsp[(1) - (2)].j); (yyval.j)->pushBack((yyvsp[(2) - (2)].se)); }
break;
case 160:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 556 "camp.y"
{ (yyvsp[(1) - (3)].se)->setSide(camp::OUT); (yyvsp[(3) - (3)].se)->setSide(camp::IN);
(yyval.j) = (yyvsp[(2) - (3)].j); (yyval.j)->pushFront((yyvsp[(1) - (3)].se)); (yyval.j)->pushBack((yyvsp[(3) - (3)].se)); }
break;
case 161:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 561 "camp.y"
{ (yyval.se) = new specExp((yyvsp[(2) - (4)].ps).pos, (yyvsp[(2) - (4)].ps).sym, (yyvsp[(3) - (4)].e)); }
break;
case 162:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 562 "camp.y"
{ (yyval.se) = new specExp((yyvsp[(1) - (3)].pos), symbol::opTrans("spec"), (yyvsp[(2) - (3)].e)); }
break;
case 163:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 564 "camp.y"
{ (yyval.se) = new specExp((yyvsp[(1) - (5)].pos), symbol::opTrans("spec"),
new pairExp((yyvsp[(3) - (5)].pos), (yyvsp[(2) - (5)].e), (yyvsp[(4) - (5)].e))); }
break;
case 164:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 567 "camp.y"
{ (yyval.se) = new specExp((yyvsp[(1) - (7)].pos), symbol::opTrans("spec"),
new tripleExp((yyvsp[(3) - (7)].pos), (yyvsp[(2) - (7)].e), (yyvsp[(4) - (7)].e), (yyvsp[(6) - (7)].e))); }
break;
case 165:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 572 "camp.y"
{ (yyval.j) = new joinExp((yyvsp[(1) - (1)].ps).pos, (yyvsp[(1) - (1)].ps).sym); }
break;
case 166:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 574 "camp.y"
{ (yyval.j) = new joinExp((yyvsp[(1) - (3)].ps).pos, (yyvsp[(1) - (3)].ps).sym); (yyval.j)->pushBack((yyvsp[(2) - (3)].e)); }
break;
case 167:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 576 "camp.y"
{ (yyval.j) = new joinExp((yyvsp[(1) - (3)].ps).pos, (yyvsp[(1) - (3)].ps).sym); (yyval.j)->pushBack((yyvsp[(2) - (3)].e)); }
break;
case 168:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 577 "camp.y"
{ (yyval.j) = new joinExp((yyvsp[(1) - (1)].ps).pos, (yyvsp[(1) - (1)].ps).sym); }
break;
case 169:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 578 "camp.y"
{ (yyval.j) = new joinExp((yyvsp[(1) - (1)].ps).pos, (yyvsp[(1) - (1)].ps).sym); }
break;
case 170:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 582 "camp.y"
{ (yyval.e) = new binaryExp((yyvsp[(1) - (2)].ps).pos, (yyvsp[(2) - (2)].e), (yyvsp[(1) - (2)].ps).sym,
new booleanExp((yyvsp[(1) - (2)].ps).pos, false)); }
break;
case 171:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 585 "camp.y"
{ (yyval.e) = new ternaryExp((yyvsp[(1) - (4)].ps).pos, (yyvsp[(2) - (4)].e), (yyvsp[(1) - (4)].ps).sym, (yyvsp[(4) - (4)].e),
new booleanExp((yyvsp[(1) - (4)].ps).pos, false)); }
break;
case 172:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 588 "camp.y"
{ (yyval.e) = new binaryExp((yyvsp[(1) - (3)].ps).pos, (yyvsp[(3) - (3)].e), (yyvsp[(1) - (3)].ps).sym,
new booleanExp((yyvsp[(2) - (3)].ps).pos, true)); }
break;
case 173:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 591 "camp.y"
{ (yyval.e) = new ternaryExp((yyvsp[(1) - (5)].ps).pos, (yyvsp[(3) - (5)].e), (yyvsp[(1) - (5)].ps).sym, (yyvsp[(5) - (5)].e),
new booleanExp((yyvsp[(2) - (5)].ps).pos, true)); }
break;
case 174:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 596 "camp.y"
{ (yyval.e) = new unaryExp((yyvsp[(1) - (2)].ps).pos, (yyvsp[(2) - (2)].e), (yyvsp[(1) - (2)].ps).sym); }
break;
case 175:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 598 "camp.y"
{ (yyval.e) = new binaryExp((yyvsp[(1) - (4)].ps).pos, (yyvsp[(2) - (4)].e), (yyvsp[(1) - (4)].ps).sym, (yyvsp[(4) - (4)].e)); }
break;
case 176:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 602 "camp.y"
{ (yyval.s) = new emptyStm((yyvsp[(1) - (1)].pos)); }
break;
case 177:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 603 "camp.y"
{ (yyval.s) = (yyvsp[(1) - (1)].s); }
break;
case 178:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 604 "camp.y"
{ (yyval.s) = (yyvsp[(1) - (2)].s); }
break;
case 179:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 606 "camp.y"
{ (yyval.s) = new ifStm((yyvsp[(1) - (5)].pos), (yyvsp[(3) - (5)].e), (yyvsp[(5) - (5)].s)); }
break;
case 180:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 608 "camp.y"
{ (yyval.s) = new ifStm((yyvsp[(1) - (7)].pos), (yyvsp[(3) - (7)].e), (yyvsp[(5) - (7)].s), (yyvsp[(7) - (7)].s)); }
break;
case 181:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 610 "camp.y"
{ (yyval.s) = new whileStm((yyvsp[(1) - (5)].pos), (yyvsp[(3) - (5)].e), (yyvsp[(5) - (5)].s)); }
break;
case 182:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 612 "camp.y"
{ (yyval.s) = new doStm((yyvsp[(1) - (7)].pos), (yyvsp[(2) - (7)].s), (yyvsp[(5) - (7)].e)); }
break;
case 183:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 614 "camp.y"
{ (yyval.s) = new forStm((yyvsp[(1) - (9)].pos), (yyvsp[(3) - (9)].run), (yyvsp[(5) - (9)].e), (yyvsp[(7) - (9)].sel), (yyvsp[(9) - (9)].s)); }
break;
case 184:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 616 "camp.y"
{ (yyval.s) = new extendedForStm((yyvsp[(1) - (8)].pos), (yyvsp[(3) - (8)].t), (yyvsp[(4) - (8)].ps).sym, (yyvsp[(6) - (8)].e), (yyvsp[(8) - (8)].s)); }
break;
case 185:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 617 "camp.y"
{ (yyval.s) = new breakStm((yyvsp[(1) - (2)].pos)); }
break;
case 186:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 618 "camp.y"
{ (yyval.s) = new continueStm((yyvsp[(1) - (2)].pos)); }
break;
case 187:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 619 "camp.y"
{ (yyval.s) = new returnStm((yyvsp[(1) - (2)].pos)); }
break;
case 188:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 620 "camp.y"
{ (yyval.s) = new returnStm((yyvsp[(1) - (3)].pos), (yyvsp[(2) - (3)].e)); }
break;
case 189:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 624 "camp.y"
{ (yyval.s) = new expStm((yyvsp[(1) - (1)].e)->getPos(), (yyvsp[(1) - (1)].e)); }
break;
case 190:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 628 "camp.y"
{ (yyval.s) = new blockStm((yyvsp[(1) - (1)].b)->getPos(), (yyvsp[(1) - (1)].b)); }
break;
case 191:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 632 "camp.y"
{ (yyval.run) = 0; }
break;
case 192:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 633 "camp.y"
{ (yyval.run) = (yyvsp[(1) - (1)].sel); }
break;
case 193:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 634 "camp.y"
{ (yyval.run) = (yyvsp[(1) - (1)].vd); }
break;
case 194:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 638 "camp.y"
{ (yyval.e) = 0; }
break;
case 195:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 639 "camp.y"
{ (yyval.e) = (yyvsp[(1) - (1)].e); }
break;
case 196:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 643 "camp.y"
{ (yyval.sel) = 0; }
break;
case 197:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 644 "camp.y"
{ (yyval.sel) = (yyvsp[(1) - (1)].sel); }
break;
case 198:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 648 "camp.y"
{ (yyval.sel) = new stmExpList((yyvsp[(1) - (1)].s)->getPos()); (yyval.sel)->add((yyvsp[(1) - (1)].s)); }
break;
case 199:
-/* Line 1787 of yacc.c */
+/* Line 1792 of yacc.c */
#line 650 "camp.y"
{ (yyval.sel) = (yyvsp[(1) - (3)].sel); (yyval.sel)->add((yyvsp[(3) - (3)].s)); }
break;
-/* Line 1787 of yacc.c */
-#line 3388 "camp.tab.c"
+/* Line 1792 of yacc.c */
+#line 3365 "camp.tab.c"
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
@@ -3547,7 +3524,9 @@ yyerrlab1:
YY_STACK_PRINT (yyss, yyssp);
}
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
*++yyvsp = yylval;
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
/* Shift the error token. */
@@ -3613,4 +3592,3 @@ yyreturn:
}
-
diff --git a/Build/source/utils/asymptote/camp.tab.h b/Build/source/utils/asymptote/camp.tab.h
index 50c87c2ad63..dcc8e342fd1 100644
--- a/Build/source/utils/asymptote/camp.tab.h
+++ b/Build/source/utils/asymptote/camp.tab.h
@@ -1,4 +1,4 @@
-/* A Bison parser, made by GNU Bison 2.6.1. */
+/* A Bison parser, made by GNU Bison 2.7. */
/* Bison interface for Yacc-like parsers in C
@@ -30,8 +30,8 @@
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
-#ifndef YY_CAMP_TAB_H
-# define YY_CAMP_TAB_H
+#ifndef YY_YY_CAMP_TAB_H_INCLUDED
+# define YY_YY_CAMP_TAB_H_INCLUDED
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 1
@@ -108,7 +108,7 @@ extern int yydebug;
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
{
-/* Line 2049 of yacc.c */
+/* Line 2058 of yacc.c */
#line 60 "camp.y"
position pos;
@@ -157,7 +157,7 @@ typedef union YYSTYPE
absyntax::formals *fls;
-/* Line 2049 of yacc.c */
+/* Line 2058 of yacc.c */
#line 162 "camp.tab.h"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
@@ -181,4 +181,4 @@ int yyparse ();
#endif
#endif /* ! YYPARSE_PARAM */
-#endif /* !YY_CAMP_TAB_H */
+#endif /* !YY_YY_CAMP_TAB_H_INCLUDED */
diff --git a/Build/source/utils/asymptote/config.guess b/Build/source/utils/asymptote/config.guess
index f7eb141e75a..f32079abda6 100644
--- a/Build/source/utils/asymptote/config.guess
+++ b/Build/source/utils/asymptote/config.guess
@@ -1,12 +1,14 @@
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright 1992-2015 Free Software Foundation, Inc.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+# Free Software Foundation, Inc.
-timestamp='2015-03-04'
+timestamp='2008-01-23'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
+# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
@@ -15,22 +17,26 @@ timestamp='2015-03-04'
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that
-# program. This Exception is an additional permission under section 7
-# of the GNU General Public License, version 3 ("GPLv3").
-#
-# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner <per@bothner.com>.
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted ChangeLog entry.
#
-# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+# This script attempts to guess a canonical system name similar to
+# config.sub. If it succeeds, it prints the system name on stdout, and
+# exits with 0. Otherwise, it exits with 1.
#
-# Please send patches to <config-patches@gnu.org>.
-
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
me=`echo "$0" | sed -e 's,.*/,,'`
@@ -50,7 +56,8 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright 1992-2015 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -132,33 +139,12 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-case "${UNAME_SYSTEM}" in
-Linux|GNU|GNU/*)
- # If the system lacks a compiler, then just pick glibc.
- # We could probably try harder.
- LIBC=gnu
-
- eval $set_cc_for_build
- cat <<-EOF > $dummy.c
- #include <features.h>
- #if defined(__UCLIBC__)
- LIBC=uclibc
- #elif defined(__dietlibc__)
- LIBC=dietlibc
- #else
- LIBC=gnu
- #endif
- EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
- ;;
-esac
-
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:NetBSD:*:*)
# NetBSD (nbsd) targets should (where applicable) match one or
- # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
# switched to ELF, *-*-netbsd* would select the old
# object file format. This provides both forward
@@ -168,30 +154,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# Note: NetBSD doesn't particularly care about the vendor
# portion of the name. We always set it to "unknown".
sysctl="sysctl -n hw.machine_arch"
- UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
- /sbin/$sysctl 2>/dev/null || \
- /usr/sbin/$sysctl 2>/dev/null || \
- echo unknown)`
+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
case "${UNAME_MACHINE_ARCH}" in
armeb) machine=armeb-unknown ;;
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
sh5el) machine=sh5le-unknown ;;
- earmv*)
- arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
- endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
- machine=${arch}${endian}-unknown
- ;;
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac
# The Operating System including object format, if it has switched
# to ELF recently, or will in the future.
case "${UNAME_MACHINE_ARCH}" in
- arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ELF__
+ | grep __ELF__ >/dev/null
then
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
# Return netbsd for either. FIX?
@@ -201,14 +180,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
fi
;;
*)
- os=netbsd
- ;;
- esac
- # Determine ABI tags.
- case "${UNAME_MACHINE_ARCH}" in
- earm*)
- expr='s/^earmv[0-9]/-eabi/;s/eb$//'
- abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
+ os=netbsd
;;
esac
# The OS release
@@ -227,11 +199,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
- echo "${machine}-${os}${release}${abi}"
- exit ;;
- *:Bitrig:*:*)
- UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
- echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+ echo "${machine}-${os}${release}"
exit ;;
*:OpenBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
@@ -255,7 +223,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
;;
*5.*)
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
;;
esac
# According to Compaq, /usr/sbin/psrinfo has been available on
@@ -301,10 +269,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
- exitcode=$?
- trap '' 0
- exit $exitcode ;;
+ exit ;;
Alpha\ *:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# Should we change UNAME_MACHINE based on the output of uname instead
@@ -330,12 +295,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
echo s390-ibm-zvmoe
exit ;;
*:OS400:*:*)
- echo powerpc-ibm-os400
+ echo powerpc-ibm-os400
exit ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit ;;
- arm*:riscos:*:*|arm*:RISCOS:*:*)
+ arm:riscos:*:*|arm:RISCOS:*:*)
echo arm-unknown-riscos
exit ;;
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
@@ -359,33 +324,14 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
case `/usr/bin/uname -p` in
sparc) echo sparc-icl-nx7; exit ;;
esac ;;
- s390x:SunOS:*:*)
- echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
sun4H:SunOS:5.*:*)
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
- i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
- echo i386-pc-auroraux${UNAME_RELEASE}
- exit ;;
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
- eval $set_cc_for_build
- SUN_ARCH="i386"
- # If there is a compiler, see if it is configured for 64-bit objects.
- # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
- # This test works for both compilers.
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
- if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- SUN_ARCH="x86_64"
- fi
- fi
- echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
@@ -429,23 +375,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# MiNT. But MiNT is downward compatible to TOS, so this should
# be no problem.
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
+ echo m68k-atari-mint${UNAME_RELEASE}
exit ;;
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
+ exit ;;
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
+ echo m68k-atari-mint${UNAME_RELEASE}
exit ;;
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
- echo m68k-milan-mint${UNAME_RELEASE}
- exit ;;
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
- echo m68k-hades-mint${UNAME_RELEASE}
- exit ;;
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
- echo m68k-unknown-mint${UNAME_RELEASE}
- exit ;;
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
m68k:machten:*:*)
echo m68k-apple-machten${UNAME_RELEASE}
exit ;;
@@ -515,8 +461,8 @@ EOF
echo m88k-motorola-sysv3
exit ;;
AViiON:dgux:*:*)
- # DG/UX returns AViiON for all architectures
- UNAME_PROCESSOR=`/usr/bin/uname -p`
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
then
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
@@ -529,7 +475,7 @@ EOF
else
echo i586-dg-dgux${UNAME_RELEASE}
fi
- exit ;;
+ exit ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
echo m88k-dolphin-sysv3
exit ;;
@@ -586,16 +532,15 @@ EOF
echo rs6000-ibm-aix3.2
fi
exit ;;
- *:AIX:*:[4567])
+ *:AIX:*:[456])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
else
IBM_ARCH=powerpc
fi
- if [ -x /usr/bin/lslpp ] ; then
- IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
- awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
else
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
fi
@@ -630,52 +575,52 @@ EOF
9000/[678][0-9][0-9])
if [ -x /usr/bin/getconf ]; then
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
- case "${sc_cpu_version}" in
- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
- 532) # CPU_PA_RISC2_0
- case "${sc_kernel_bits}" in
- 32) HP_ARCH="hppa2.0n" ;;
- 64) HP_ARCH="hppa2.0w" ;;
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
- esac ;;
- esac
+ esac ;;
+ esac
fi
if [ "${HP_ARCH}" = "" ]; then
eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ sed 's/^ //' << EOF >$dummy.c
- #define _HPUX_SOURCE
- #include <stdlib.h>
- #include <unistd.h>
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
- int main ()
- {
- #if defined(_SC_KERNEL_BITS)
- long bits = sysconf(_SC_KERNEL_BITS);
- #endif
- long cpu = sysconf (_SC_CPU_VERSION);
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
- switch (cpu)
- {
- case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
- case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
- case CPU_PA_RISC2_0:
- #if defined(_SC_KERNEL_BITS)
- switch (bits)
- {
- case 64: puts ("hppa2.0w"); break;
- case 32: puts ("hppa2.0n"); break;
- default: puts ("hppa2.0"); break;
- } break;
- #else /* !defined(_SC_KERNEL_BITS) */
- puts ("hppa2.0"); break;
- #endif
- default: puts ("hppa1.0"); break;
- }
- exit (0);
- }
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
EOF
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
test -z "$HP_ARCH" && HP_ARCH=hppa
@@ -695,7 +640,7 @@ EOF
# => hppa64-hp-hpux11.23
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
- grep -q __LP64__
+ grep __LP64__ >/dev/null
then
HP_ARCH="hppa2.0w"
else
@@ -766,22 +711,22 @@ EOF
exit ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
- exit ;;
+ exit ;;
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
- exit ;;
+ exit ;;
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
echo c34-convex-bsd
- exit ;;
+ exit ;;
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
echo c38-convex-bsd
- exit ;;
+ exit ;;
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd
- exit ;;
+ exit ;;
CRAY*Y-MP:*:*:*)
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
@@ -805,14 +750,14 @@ EOF
exit ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit ;;
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
5000:UNIX_System_V:4.*:*)
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
@@ -824,39 +769,34 @@ EOF
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:FreeBSD:*:*)
- UNAME_PROCESSOR=`/usr/bin/uname -p`
- case ${UNAME_PROCESSOR} in
+ case ${UNAME_MACHINE} in
+ pc98)
+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
amd64)
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
*)
- echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
esac
exit ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
- *:MINGW64*:*)
- echo ${UNAME_MACHINE}-pc-mingw64
- exit ;;
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
- *:MSYS*:*)
- echo ${UNAME_MACHINE}-pc-msys
- exit ;;
i*:windows32*:*)
- # uname -m includes "-pc" on this system.
- echo ${UNAME_MACHINE}-mingw32
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
exit ;;
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
- *:Interix*:*)
- case ${UNAME_MACHINE} in
+ *:Interix*:[3456]*)
+ case ${UNAME_MACHINE} in
x86)
echo i586-pc-interix${UNAME_RELEASE}
exit ;;
- authenticamd | genuineintel | EM64T)
+ EM64T | authenticamd)
echo x86_64-unknown-interix${UNAME_RELEASE}
exit ;;
IA64)
@@ -866,9 +806,6 @@ EOF
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
exit ;;
- 8664:Windows_NT:*)
- echo x86_64-pc-mks
- exit ;;
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
@@ -889,160 +826,210 @@ EOF
exit ;;
*:GNU:*:*)
# the GNU system
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
exit ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
- aarch64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- aarch64_be:Linux:*:*)
- UNAME_MACHINE=aarch64_be
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- alpha:Linux:*:*)
- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
- EV5) UNAME_MACHINE=alphaev5 ;;
- EV56) UNAME_MACHINE=alphaev56 ;;
- PCA56) UNAME_MACHINE=alphapca56 ;;
- PCA57) UNAME_MACHINE=alphapca56 ;;
- EV6) UNAME_MACHINE=alphaev6 ;;
- EV67) UNAME_MACHINE=alphaev67 ;;
- EV68*) UNAME_MACHINE=alphaev68 ;;
- esac
- objdump --private-headers /bin/sh | grep -q ld.so.1
- if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- arc:Linux:*:* | arceb:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
arm*:Linux:*:*)
eval $set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
else
- if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ARM_PCS_VFP
- then
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
- else
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
- fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi
fi
exit ;;
avr32*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
cris:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ echo cris-axis-linux-gnu
exit ;;
crisv32:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-${LIBC}
- exit ;;
- e2k:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo crisv32-axis-linux-gnu
exit ;;
frv:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- hexagon:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- i*86:Linux:*:*)
- echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+ echo frv-unknown-linux-gnu
exit ;;
ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
m32r*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
- mips:Linux:*:* | mips64:Linux:*:*)
+ mips:Linux:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#undef CPU
- #undef ${UNAME_MACHINE}
- #undef ${UNAME_MACHINE}el
+ #undef mips
+ #undef mipsel
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=${UNAME_MACHINE}el
+ CPU=mipsel
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=${UNAME_MACHINE}
+ CPU=mips
#else
CPU=
#endif
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
- openrisc*:Linux:*:*)
- echo or1k-unknown-linux-${LIBC}
+ mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips64
+ #undef mips64el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mips64el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips64
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+ or32:Linux:*:*)
+ echo or32-unknown-linux-gnu
exit ;;
- or32:Linux:*:* | or1k*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu
exit ;;
- padre:Linux:*:*)
- echo sparc-unknown-linux-${LIBC}
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
exit ;;
- parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-${LIBC}
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
- PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
- *) echo hppa-unknown-linux-${LIBC} ;;
+ PA7*) echo hppa1.1-unknown-linux-gnu ;;
+ PA8*) echo hppa2.0-unknown-linux-gnu ;;
+ *) echo hppa-unknown-linux-gnu ;;
esac
exit ;;
- ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-${LIBC}
- exit ;;
- ppc:Linux:*:*)
- echo powerpc-unknown-linux-${LIBC}
- exit ;;
- ppc64le:Linux:*:*)
- echo powerpc64le-unknown-linux-${LIBC}
- exit ;;
- ppcle:Linux:*:*)
- echo powerpcle-unknown-linux-${LIBC}
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
+ echo ${UNAME_MACHINE}-ibm-linux
exit ;;
sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- tile*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
vax:Linux:*:*)
- echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+ echo ${UNAME_MACHINE}-dec-linux-gnu
exit ;;
x86_64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo x86_64-unknown-linux-gnu
exit ;;
xtensa*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
+ i*86:Linux:*:*)
+ # The BFD linker knows what the default object file format is, so
+ # first see if it will tell us. cd to the root directory to prevent
+ # problems with other programs or directories called `ld' in the path.
+ # Set LC_ALL=C to ensure ld outputs messages in English.
+ ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+ | sed -ne '/supported targets:/!d
+ s/[ ][ ]*/ /g
+ s/.*supported targets: *//
+ s/ .*//
+ p'`
+ case "$ld_supported_targets" in
+ elf32-i386)
+ TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+ ;;
+ a.out-i386-linux)
+ echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+ exit ;;
+ coff-i386)
+ echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+ exit ;;
+ "")
+ # Either a pre-BFD a.out linker (linux-gnuoldld) or
+ # one that does not give us useful --help.
+ echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+ exit ;;
+ esac
+ # Determine whether the default compiler is a.out or elf
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <features.h>
+ #ifdef __ELF__
+ # ifdef __GLIBC__
+ # if __GLIBC__ >= 2
+ LIBC=gnu
+ # else
+ LIBC=gnulibc1
+ # endif
+ # else
+ LIBC=gnulibc1
+ # endif
+ #else
+ #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+ LIBC=gnu
+ #else
+ LIBC=gnuaout
+ #endif
+ #endif
+ #ifdef __dietlibc__
+ LIBC=dietlibc
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^LIBC/{
+ s: ::g
+ p
+ }'`"
+ test x"${LIBC}" != x && {
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ exit
+ }
+ test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
+ ;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
# earlier versions are messed up and put the nodename in both
@@ -1050,11 +1037,11 @@ EOF
echo i386-sequent-sysv4
exit ;;
i*86:UNIX_SV:4.2MP:2.*)
- # Unixware is an offshoot of SVR4, but it has its own version
- # number series starting with 2...
- # I am not positive that other SVR4 systems won't match this,
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
# I just have to hope. -- rms.
- # Use sysv4.2uw... so that sysv4* matches it.
+ # Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
exit ;;
i*86:OS/2:*:*)
@@ -1071,7 +1058,7 @@ EOF
i*86:syllable:*:*)
echo ${UNAME_MACHINE}-pc-syllable
exit ;;
- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit ;;
i*86:*DOS:*:*)
@@ -1086,7 +1073,7 @@ EOF
fi
exit ;;
i*86:*:5:[678]*)
- # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
case `/bin/uname -X | grep "^Machine"` in
*486*) UNAME_MACHINE=i486 ;;
*Pentium) UNAME_MACHINE=i586 ;;
@@ -1114,13 +1101,10 @@ EOF
exit ;;
pc:*:*:*)
# Left here for compatibility:
- # uname -m prints for DJGPP always 'pc', but it prints nothing about
- # the processor, so we play safe by assuming i586.
- # Note: whatever this is, it MUST be the same as what config.sub
- # prints for the "djgpp" host, or else GDB configury will decide that
- # this is a cross-build.
- echo i586-pc-msdosdjgpp
- exit ;;
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i386.
+ echo i386-pc-msdosdjgpp
+ exit ;;
Intel:Mach:3*:*)
echo i386-pc-mach3
exit ;;
@@ -1155,18 +1139,8 @@ EOF
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4; exit; } ;;
- NCR*:*:4.2:* | MPRAS*:*:4.2:*)
- OS_REL='.3'
- test -r /etc/.relid \
- && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
echo m68k-unknown-lynxos${UNAME_RELEASE}
exit ;;
@@ -1179,7 +1153,7 @@ EOF
rs6000:LynxOS:2.*:*)
echo rs6000-unknown-lynxos${UNAME_RELEASE}
exit ;;
- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
echo powerpc-unknown-lynxos${UNAME_RELEASE}
exit ;;
SM[BE]S:UNIX_SV:*:*)
@@ -1199,10 +1173,10 @@ EOF
echo ns32k-sni-sysv
fi
exit ;;
- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
- # says <Richard.M.Bartel@ccMail.Census.GOV>
- echo i586-unisys-sysv4
- exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit ;;
*:UNIX_System_V:4*:FTX*)
# From Gerald Hewes <hewes@openmarket.com>.
# How about differentiating between stratus architectures? -djm
@@ -1228,11 +1202,11 @@ EOF
exit ;;
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then
- echo mips-nec-sysv${UNAME_RELEASE}
+ echo mips-nec-sysv${UNAME_RELEASE}
else
- echo mips-unknown-sysv${UNAME_RELEASE}
+ echo mips-unknown-sysv${UNAME_RELEASE}
fi
- exit ;;
+ exit ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
echo powerpc-be-beos
exit ;;
@@ -1242,12 +1216,6 @@ EOF
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
echo i586-pc-beos
exit ;;
- BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
- echo i586-pc-haiku
- exit ;;
- x86_64:Haiku:*:*)
- echo x86_64-unknown-haiku
- exit ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
exit ;;
@@ -1274,31 +1242,9 @@ EOF
exit ;;
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
- eval $set_cc_for_build
- if test "$UNAME_PROCESSOR" = unknown ; then
- UNAME_PROCESSOR=powerpc
- fi
- if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- case $UNAME_PROCESSOR in
- i386) UNAME_PROCESSOR=x86_64 ;;
- powerpc) UNAME_PROCESSOR=powerpc64 ;;
- esac
- fi
- fi
- elif test "$UNAME_PROCESSOR" = i386 ; then
- # Avoid executing cc on OS X 10.9, as it ships with a stub
- # that puts up a graphical alert prompting to install
- # developer tools. Any system running Mac OS X 10.7 or
- # later (Darwin 11 and later) is required to have a 64-bit
- # processor. This is not true of the ARM version of Darwin
- # that Apple uses in portable devices.
- UNAME_PROCESSOR=x86_64
- fi
+ case $UNAME_PROCESSOR in
+ unknown) UNAME_PROCESSOR=powerpc ;;
+ esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
@@ -1312,10 +1258,7 @@ EOF
*:QNX:*:4*)
echo i386-pc-qnx
exit ;;
- NEO-?:NONSTOP_KERNEL:*:*)
- echo neo-tandem-nsk${UNAME_RELEASE}
- exit ;;
- NSE-*:NONSTOP_KERNEL:*:*)
+ NSE-?:NONSTOP_KERNEL:*:*)
echo nse-tandem-nsk${UNAME_RELEASE}
exit ;;
NSR-?:NONSTOP_KERNEL:*:*)
@@ -1360,13 +1303,13 @@ EOF
echo pdp10-unknown-its
exit ;;
SEI:*:*:SEIUX)
- echo mips-sei-seiux${UNAME_RELEASE}
+ echo mips-sei-seiux${UNAME_RELEASE}
exit ;;
*:DragonFly:*:*)
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit ;;
*:*VMS:*:*)
- UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
case "${UNAME_MACHINE}" in
A*) echo alpha-dec-vms ; exit ;;
I*) echo ia64-dec-vms ; exit ;;
@@ -1381,13 +1324,158 @@ EOF
i*86:rdos:*:*)
echo ${UNAME_MACHINE}-pc-rdos
exit ;;
- i*86:AROS:*:*)
- echo ${UNAME_MACHINE}-pc-aros
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+# include <sys/param.h>
+# if defined (BSD)
+# if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+# else
+# if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# endif
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# else
+ printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ c34*)
+ echo c34-convex-bsd
exit ;;
- x86_64:VMkernel:*:*)
- echo ${UNAME_MACHINE}-unknown-esx
+ c38*)
+ echo c38-convex-bsd
exit ;;
-esac
+ c4*)
+ echo c4-convex-bsd
+ exit ;;
+ esac
+fi
cat >&2 <<EOF
$0: unable to guess system type
diff --git a/Build/source/utils/asymptote/config.sub b/Build/source/utils/asymptote/config.sub
index 8f1229c6f7d..59bb593f109 100644
--- a/Build/source/utils/asymptote/config.sub
+++ b/Build/source/utils/asymptote/config.sub
@@ -1,18 +1,24 @@
#! /bin/sh
# Configuration validation subroutine script.
-# Copyright 1992-2015 Free Software Foundation, Inc.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+# 2011, 2012 Free Software Foundation, Inc.
-timestamp='2015-03-08'
+timestamp='2012-04-18'
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine. It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
@@ -20,12 +26,11 @@ timestamp='2015-03-08'
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that
-# program. This Exception is an additional permission under section 7
-# of the GNU General Public License, version 3 ("GPLv3").
+# the same distribution terms that you use for the rest of that program.
-# Please send patches to <config-patches@gnu.org>.
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted GNU ChangeLog entry.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
@@ -68,7 +73,9 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
-Copyright 1992-2015 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -116,8 +123,8 @@ esac
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
- linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
- knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
+ linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+ knetbsd*-gnu* | netbsd*-gnu* | \
kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
@@ -149,7 +156,7 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple | -axis | -knuth | -cray | -microblaze*)
+ -apple | -axis | -knuth | -cray | -microblaze)
os=
basic_machine=$1
;;
@@ -252,24 +259,21 @@ case $basic_machine in
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
- | arc | arceb \
- | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
- | avr | avr32 \
- | be32 | be64 \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+ | be32 | be64 \
| bfin \
- | c4x | c8051 | clipper \
+ | c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
- | e2k | epiphany \
- | fido | fr30 | frv | ft32 \
+ | epiphany \
+ | fido | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| hexagon \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
- | k1om \
| le32 | le64 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
- | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
+ | maxq | mb | microblaze | mcore | mep | metag \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@@ -283,26 +287,23 @@ case $basic_machine in
| mips64vr5900 | mips64vr5900el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
- | mipsisa32r6 | mipsisa32r6el \
| mipsisa64 | mipsisa64el \
| mipsisa64r2 | mipsisa64r2el \
- | mipsisa64r6 | mipsisa64r6el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
- | mipsr5900 | mipsr5900el \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| moxie \
| mt \
| msp430 \
| nds32 | nds32le | nds32be \
- | nios | nios2 | nios2eb | nios2el \
+ | nios | nios2 \
| ns16k | ns32k \
- | open8 | or1k | or1knd | or32 \
+ | open8 \
+ | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
| pyramid \
- | riscv32 | riscv64 \
| rl78 | rx \
| score \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
@@ -313,7 +314,6 @@ case $basic_machine in
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| ubicom32 \
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
- | visium \
| we32k \
| x86 | xc16x | xstormy16 | xtensa \
| z8k | z80)
@@ -328,10 +328,7 @@ case $basic_machine in
c6x)
basic_machine=tic6x-unknown
;;
- leon|leon[3-9])
- basic_machine=sparc-$basic_machine
- ;;
- m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
basic_machine=$basic_machine-unknown
os=-none
;;
@@ -373,28 +370,26 @@ case $basic_machine in
| aarch64-* | aarch64_be-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
- | c8051-* | clipper-* | craynv-* | cydra-* \
+ | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
- | e2k-* | elxsi-* \
+ | elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| hexagon-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
- | k1om-* \
| le32-* | le64-* \
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
- | microblaze-* | microblazeel-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
@@ -408,22 +403,18 @@ case $basic_machine in
| mips64vr5900-* | mips64vr5900el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
- | mipsisa32r6-* | mipsisa32r6el-* \
| mipsisa64-* | mipsisa64el-* \
| mipsisa64r2-* | mipsisa64r2el-* \
- | mipsisa64r6-* | mipsisa64r6el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
- | mipsr5900-* | mipsr5900el-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
| mt-* \
| msp430-* \
| nds32-* | nds32le-* | nds32be-* \
- | nios-* | nios2-* | nios2eb-* | nios2el-* \
+ | nios-* | nios2-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| open8-* \
- | or1k*-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
@@ -441,7 +432,6 @@ case $basic_machine in
| ubicom32-* \
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
| vax-* \
- | visium-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \
@@ -518,9 +508,6 @@ case $basic_machine in
basic_machine=i386-pc
os=-aros
;;
- asmjs)
- basic_machine=asmjs-unknown
- ;;
aux)
basic_machine=m68k-apple
os=-aux
@@ -782,9 +769,6 @@ case $basic_machine in
basic_machine=m68k-isi
os=-sysv
;;
- leon-*|leon[3-9]-*)
- basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
- ;;
m68knommu)
basic_machine=m68k-unknown
os=-linux
@@ -804,15 +788,11 @@ case $basic_machine in
basic_machine=ns32k-utek
os=-sysv
;;
- microblaze*)
+ microblaze)
basic_machine=microblaze-xilinx
;;
- mingw64)
- basic_machine=x86_64-pc
- os=-mingw64
- ;;
mingw32)
- basic_machine=i686-pc
+ basic_machine=i386-pc
os=-mingw32
;;
mingw32ce)
@@ -840,10 +820,6 @@ case $basic_machine in
basic_machine=powerpc-unknown
os=-morphos
;;
- moxiebox)
- basic_machine=moxie-unknown
- os=-moxiebox
- ;;
msdos)
basic_machine=i386-pc
os=-msdos
@@ -852,7 +828,7 @@ case $basic_machine in
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
msys)
- basic_machine=i686-pc
+ basic_machine=i386-pc
os=-msys
;;
mvs)
@@ -1043,11 +1019,7 @@ case $basic_machine in
basic_machine=i586-unknown
os=-pw32
;;
- rdos | rdos64)
- basic_machine=x86_64-pc
- os=-rdos
- ;;
- rdos32)
+ rdos)
basic_machine=i386-pc
os=-rdos
;;
@@ -1374,29 +1346,29 @@ case $os in
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* | -plan9* \
+ | -sym* | -kopensolaris* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* | -cloudabi* \
+ | -aos* | -aros* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
- | -bitrig* | -openbsd* | -solidbsd* \
+ | -openbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
- | -linux-newlib* | -linux-musl* | -linux-uclibc* \
- | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
+ | -mingw32* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1520,6 +1492,9 @@ case $os in
-aros*)
os=-aros
;;
+ -kaos*)
+ os=-kaos
+ ;;
-zvmoe)
os=-zvmoe
;;
@@ -1568,12 +1543,6 @@ case $basic_machine in
c4x-* | tic4x-*)
os=-coff
;;
- c8051-*)
- os=-elf
- ;;
- hexagon-*)
- os=-elf
- ;;
tic54x-*)
os=-coff
;;
diff --git a/Build/source/utils/asymptote/configure b/Build/source/utils/asymptote/configure
index a4a401476e2..0821cd5e8b7 100755
--- a/Build/source/utils/asymptote/configure
+++ b/Build/source/utils/asymptote/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for Asymptote 2.31.
+# Generated by GNU Autoconf 2.69 for Asymptote 2.33.
#
# Report bugs to <http://sourceforge.net/projects/asymptote>.
#
@@ -580,8 +580,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='Asymptote'
PACKAGE_TARNAME='asymptote'
-PACKAGE_VERSION='2.31'
-PACKAGE_STRING='Asymptote 2.31'
+PACKAGE_VERSION='2.33'
+PACKAGE_STRING='Asymptote 2.33'
PACKAGE_BUGREPORT='http://sourceforge.net/projects/asymptote'
PACKAGE_URL=''
@@ -1281,7 +1281,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures Asymptote 2.31 to adapt to many kinds of systems.
+\`configure' configures Asymptote 2.33 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1346,7 +1346,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of Asymptote 2.31:";;
+ short | recursive ) echo "Configuration of Asymptote 2.33:";;
esac
cat <<\_ACEOF
@@ -1459,7 +1459,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-Asymptote configure 2.31
+Asymptote configure 2.33
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2045,7 +2045,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by Asymptote $as_me 2.31, which was
+It was created by Asymptote $as_me 2.33, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -4076,7 +4076,7 @@ fi
fi
-for ac_prog in texi2dvi texi2dvi4a2ps
+for ac_prog in texi2dvi
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
@@ -5761,7 +5761,7 @@ fi
-GCVERSION=7.4.0
+GCVERSION=7.4.2
GCFILE=gc-$GCVERSION
as_ac_File=`$as_echo "ac_cv_file_$GCFILE.tar.gz" | $as_tr_sh`
@@ -8508,7 +8508,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by Asymptote $as_me 2.31, which was
+This file was extended by Asymptote $as_me 2.33, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -8570,7 +8570,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-Asymptote config.status 2.31
+Asymptote config.status 2.33
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
@@ -9310,7 +9310,8 @@ else
echo FOR EXAMPLE, USE THE COMMANDS:
echo
echo wget http://hboehm.info/gc/gc_source/$GCFILE.tar.gz
- echo wget http://hboehm.info/gc/gc_source/libatomic_ops-$GCVERSION.tar.gz
+ echo wget http://www.ivmaisoft.com/_bin/atomic_ops/libatomic_ops-$GCVERSION.tar.gz
+
echo
exit 1
diff --git a/Build/source/utils/asymptote/configure.ac b/Build/source/utils/asymptote/configure.ac
index d16863b450d..5fd42b54226 100644
--- a/Build/source/utils/asymptote/configure.ac
+++ b/Build/source/utils/asymptote/configure.ac
@@ -3,7 +3,7 @@
# this file.
AC_PREREQ(2)
-AC_INIT([Asymptote],[2.31],[http://sourceforge.net/projects/asymptote])
+AC_INIT([Asymptote],[2.33],[http://sourceforge.net/projects/asymptote])
VERSION=$PACKAGE_VERSION
AC_SUBST(VERSION)
m4_include([ax_pthread.m4])
@@ -51,7 +51,7 @@ else
fi
])
-AC_CHECK_PROGS(TEXI2DVI,[texi2dvi texi2dvi4a2ps],
+AC_CHECK_PROGS(TEXI2DVI,[texi2dvi],
[echo texi2dvi is missing! Please put http://asymptote.sourceforge.net/asymptote.pdf in the doc directory, touch doc/asymptote.pdf, and run configure again; exit 1;])
AC_SUBST(TEXI2DVI)
@@ -121,7 +121,7 @@ AC_CHECK_HEADER(unordered_map,AC_DEFINE(HAVE_UNORDERED_MAP,1,
[Define to 1 if you have tr1/unordered_map]),
[AC_CHECK_HEADER(ext/hash_map,,OPTIONS=$OPTIONS"-DNOHASH ")])])
-GCVERSION=7.4.0
+GCVERSION=7.4.2
GCFILE=gc-$GCVERSION
AC_CHECK_FILE($GCFILE.tar.gz,
@@ -375,7 +375,8 @@ if test "x$GCDIR" != "x" ; then
echo FOR EXAMPLE, USE THE COMMANDS:
echo
echo wget http://hboehm.info/gc/gc_source/$GCFILE.tar.gz
- echo wget http://hboehm.info/gc/gc_source/libatomic_ops-$GCVERSION.tar.gz
+ echo wget http://www.ivmaisoft.com/_bin/atomic_ops/libatomic_ops-$GCVERSION.tar.gz
+
echo
exit 1
])
diff --git a/Build/source/utils/asymptote/doc/Bode.asy b/Build/source/utils/asymptote/doc/Bode.asy
index a35540e9749..6cc634299ff 100644
--- a/Build/source/utils/asymptote/doc/Bode.asy
+++ b/Build/source/utils/asymptote/doc/Bode.asy
@@ -3,7 +3,7 @@ texpreamble("\def\Arg{\mathop {\rm Arg}\nolimits}");
size(10cm,5cm,IgnoreAspect);
-real ampl(real x) {return 2.5/(1+x^2);}
+real ampl(real x) {return 2.5/sqrt(1+x^2);}
real phas(real x) {return -atan(x)/pi;}
scale(Log,Log);
diff --git a/Build/source/utils/asymptote/doc/CAD.pdf b/Build/source/utils/asymptote/doc/CAD.pdf
index ba59db86d8a..abcc0b4467d 100644
--- a/Build/source/utils/asymptote/doc/CAD.pdf
+++ b/Build/source/utils/asymptote/doc/CAD.pdf
Binary files differ
diff --git a/Build/source/utils/asymptote/doc/FAQ/asy-faq.info b/Build/source/utils/asymptote/doc/FAQ/asy-faq.info
index a49da13ab3b..ddc224e6744 100644
--- a/Build/source/utils/asymptote/doc/FAQ/asy-faq.info
+++ b/Build/source/utils/asymptote/doc/FAQ/asy-faq.info
@@ -10,7 +10,7 @@ END-INFO-DIR-ENTRY
File: asy-faq.info, Node: Top, Next: Question 1.1, Up: (dir)
ASYMPTOTE FREQUENTLY ASKED QUESTIONS
- 16 May 2014
+ 10 May 2015
This is the list of Frequently Asked Questions about Asymptote (asy).
diff --git a/Build/source/utils/asymptote/doc/TeXShopAndAsymptote.pdf b/Build/source/utils/asymptote/doc/TeXShopAndAsymptote.pdf
index 82a110f254f..91b906c0637 100644
--- a/Build/source/utils/asymptote/doc/TeXShopAndAsymptote.pdf
+++ b/Build/source/utils/asymptote/doc/TeXShopAndAsymptote.pdf
Binary files differ
diff --git a/Build/source/utils/asymptote/doc/asy-latex.dtx b/Build/source/utils/asymptote/doc/asy-latex.dtx
index 04b3a265b6d..7ce3c409ab4 100644
--- a/Build/source/utils/asymptote/doc/asy-latex.dtx
+++ b/Build/source/utils/asymptote/doc/asy-latex.dtx
@@ -11,7 +11,7 @@ ____________________________
The ASYMPTOTE package
(C) 2003 Tom Prince
-(C) 2003-2010 John Bowman
+(C) 2003-2015 John Bowman
(C) 2010 Will Robertson
Adapted from comment.sty
@@ -38,7 +38,7 @@ Licence: GPL2+
%</driver>
%<pkg>\ProvidesPackage{asymptote}
%<*pkg>
- [2012/08/25 v1.27 Asymptote style file for LaTeX]
+ [2015/05/10 v1.29 Asymptote style file for LaTeX]
%</pkg>
%
%<*driver>
@@ -302,7 +302,9 @@ Licence: GPL2+
% \end{macrocode}
%
% \begin{macrocode}
+\def\asylatexdir{}
\def\asydir{}
+\def\ASYasydir{}
\def\ASYprefix{}
% \end{macrocode}
%
@@ -314,6 +316,7 @@ Licence: GPL2+
\newif\ifASYPDF
\ifxetex
\ASYPDFtrue
+ \usepackage{everypage}
\else
\ifpdf
\ASYPDFtrue
@@ -431,6 +434,16 @@ Licence: GPL2+
\next%
}
\endgroup
+\def\asy@init{
+ \def\ASYlatexdir{}
+ \ifx\asylatexdir\empty\else
+ \def\ASYlatexdir{\asylatexdir/}%
+ \fi
+ \ifx\asydir\empty\else
+ \def\ASYasydir{\asydir/}%
+ \fi
+ \def\ASYprefix{\ASYlatexdir\ASYasydir}%
+}
% \end{macrocode}
%
% \subsection{User interface}
@@ -448,9 +461,7 @@ Licence: GPL2+
% \end{macrocode}
%
% \begin{macrocode}
- \ifx\asydir\empty\else
- \def\ASYprefix{\asydir/}%
- \fi
+ \asy@init
\immediate\write\AsyPreStream{%
\noexpand\InputIfFileExists{%
\ASYprefix\noexpand\jobname-\the\c@asy.pre}{}{}%
@@ -470,7 +481,7 @@ Licence: GPL2+
%
% \begin{macrocode}
\def\asy@write@graphic@header{%
- \immediate\openout\AsyStream=\ASYprefix\jobname-\the\c@asy.asy\relax
+ \immediate\openout\AsyStream=\ASYasydir\jobname-\the\c@asy.asy\relax
\gdef\AsyFile{\ASYprefix\Jobname-\the\c@asy}%
\immediate\write\AsyStream{%
if(!settings.multipleView) settings.batchView=false;^^J%
@@ -610,9 +621,7 @@ Licence: GPL2+
\ifASYattach
\ASYinlinefalse
\fi
- \ifx\asydir\empty\else
- \def\ASYprefix{\asydir/}%
- \fi
+ \asy@init
\immediate\write\AsyPreStream{%
\noexpand\InputIfFileExists{%
\ASYprefix\noexpand\jobname-\the\c@asy.pre}{}{}%
diff --git a/Build/source/utils/asymptote/doc/asy-latex.pdf b/Build/source/utils/asymptote/doc/asy-latex.pdf
index 33812486191..ddf5de3b8be 100644
--- a/Build/source/utils/asymptote/doc/asy-latex.pdf
+++ b/Build/source/utils/asymptote/doc/asy-latex.pdf
Binary files differ
diff --git a/Build/source/utils/asymptote/doc/asy.1 b/Build/source/utils/asymptote/doc/asy.1
index dfa595489be..8fd79e1fdec 100644
--- a/Build/source/utils/asymptote/doc/asy.1
+++ b/Build/source/utils/asymptote/doc/asy.1
@@ -37,6 +37,9 @@ View output; command-line only.
.B \-a,\-align C|B|T|Z
Center, Bottom, Top, or Zero page alignment [C].
.TP
+.B \-aligndir pair
+Directional page alignment (overrides align) [(0,0)].
+.TP
.B \-antialias n
Antialiasing width for rasterized output [2].
.TP
diff --git a/Build/source/utils/asymptote/doc/asyRefCard.pdf b/Build/source/utils/asymptote/doc/asyRefCard.pdf
index 66f8027aee6..686d007d700 100644
--- a/Build/source/utils/asymptote/doc/asyRefCard.pdf
+++ b/Build/source/utils/asymptote/doc/asyRefCard.pdf
Binary files differ
diff --git a/Build/source/utils/asymptote/doc/asymptote.pdf b/Build/source/utils/asymptote/doc/asymptote.pdf
index 69f952a418e..fbdf5df6f1c 100644
--- a/Build/source/utils/asymptote/doc/asymptote.pdf
+++ b/Build/source/utils/asymptote/doc/asymptote.pdf
Binary files differ
diff --git a/Build/source/utils/asymptote/doc/asymptote.sty b/Build/source/utils/asymptote/doc/asymptote.sty
index 4a2f484caad..2915f1238d1 100644
--- a/Build/source/utils/asymptote/doc/asymptote.sty
+++ b/Build/source/utils/asymptote/doc/asymptote.sty
@@ -9,7 +9,7 @@
%% The ASYMPTOTE package
%%
%% (C) 2003 Tom Prince
-%% (C) 2003-2010 John Bowman
+%% (C) 2003-2015 John Bowman
%% (C) 2010 Will Robertson
%%
%% Adapted from comment.sty
@@ -17,7 +17,7 @@
%% Licence: GPL2+
%%
\ProvidesPackage{asymptote}
- [2012/08/25 v1.27 Asymptote style file for LaTeX]
+ [2015/05/10 v1.29 Asymptote style file for LaTeX]
\def\Asymptote{{\tt Asymptote}}
\InputIfFileExists{\jobname.pre}{}{}
\newbox\ASYbox
@@ -93,11 +93,14 @@
\ASYattachtrue
}
\ProcessOptions*
+\def\asylatexdir{}
\def\asydir{}
+\def\ASYasydir{}
\def\ASYprefix{}
\newif\ifASYPDF
\ifxetex
\ASYPDFtrue
+ \usepackage{everypage}
\else
\ifpdf
\ASYPDFtrue
@@ -182,15 +185,23 @@
\next%
}
\endgroup
+\def\asy@init{
+ \def\ASYlatexdir{}
+ \ifx\asylatexdir\empty\else
+ \def\ASYlatexdir{\asylatexdir/}%
+ \fi
+ \ifx\asydir\empty\else
+ \def\ASYasydir{\asydir/}%
+ \fi
+ \def\ASYprefix{\ASYlatexdir\ASYasydir}%
+}
\newcommand\asy[1][]{%
\stepcounter{asy}%
\setkeys{ASYkeys}{#1}%
\ifASYattach
\ASYinlinefalse
\fi
- \ifx\asydir\empty\else
- \def\ASYprefix{\asydir/}%
- \fi
+ \asy@init
\immediate\write\AsyPreStream{%
\noexpand\InputIfFileExists{%
\ASYprefix\noexpand\jobname-\the\c@asy.pre}{}{}%
@@ -204,7 +215,7 @@
\asy@input@graphic
}
\def\asy@write@graphic@header{%
- \immediate\openout\AsyStream=\ASYprefix\jobname-\the\c@asy.asy\relax
+ \immediate\openout\AsyStream=\ASYasydir\jobname-\the\c@asy.asy\relax
\gdef\AsyFile{\ASYprefix\Jobname-\the\c@asy}%
\immediate\write\AsyStream{%
if(!settings.multipleView) settings.batchView=false;^^J%
@@ -322,9 +333,7 @@
\ifASYattach
\ASYinlinefalse
\fi
- \ifx\asydir\empty\else
- \def\ASYprefix{\asydir/}%
- \fi
+ \asy@init
\immediate\write\AsyPreStream{%
\noexpand\InputIfFileExists{%
\ASYprefix\noexpand\jobname-\the\c@asy.pre}{}{}%
diff --git a/Build/source/utils/asymptote/doc/asymptote.texi b/Build/source/utils/asymptote/doc/asymptote.texi
index 8dc6ac4605b..cf427557d9f 100644
--- a/Build/source/utils/asymptote/doc/asymptote.texi
+++ b/Build/source/utils/asymptote/doc/asymptote.texi
@@ -589,8 +589,8 @@ cd asymptote-x.xx
@end verbatim
By default the system version of the Boehm garbage collector will be
used; if it is old we recommend first putting
-@url{http://hboehm.info/gc/gc_source/gc-7.4.0.tar.gz}
-@url{http://hboehm.info/gc/gc_source/libatomic_ops-7.4.0.tar.gz}
+@url{http://hboehm.info/gc/gc_source/gc-7.4.2.tar.gz}
+@url{http://www.ivmaisoft.com/_bin/atomic_ops/libatomic_ops-7.4.2.tar.gz}
in the @code{Asymptote} source directory.
On @code{UNIX} platforms (other than @code{MacOS X}), we recommend
@@ -1495,7 +1495,7 @@ be specified as an absolute compass direction (pair) or a direction
in the local direction of the path. For convenience @code{LeftSide},
@code{Center}, and @code{RightSide} are defined as @code{Relative(W)},
@code{Relative((0,0))}, and @code{Relative(E)}, respectively.
-Multiplying @code{LeftSide}, @code{Center}, @code{RightSide} on the
+Multiplying @code{LeftSide} and @code{RightSide} on the
left by a real scaling factor will move the label further away from or
closer to the path.
@@ -1897,6 +1897,38 @@ returns the element-by-element product @code{(z.x*w.x,z.y*w.y)};
@cindex @code{dot}
returns the dot product @code{z.x*w.x+z.y*w.y};
+@item real cross(explicit pair z, explicit pair w)
+@cindex @code{cross}
+returns the 2D scalar product @code{z.x*w.y-z.y*w.x};
+
+@cindex @code{orient}
+@item real orient(pair a, pair b, pair c);
+returns a positive (negative) value if @code{a--b--c--cycle} is oriented
+counterclockwise (clockwise) or zero if all three points are colinear.
+Equivalently, a positive (negative) value is returned if
+@code{c} lies to the left (right) of the line through @code{a} and @code{b}
+or zero if @code{c} lies on this line.
+The value returned can be expressed in terms of the 2D scalar cross product
+as @code{cross(a-c,b-c)}, which is the determinant
+@verbatim
+|a.x a.y 1|
+|b.x b.y 1|
+|c.x c.y 1|
+@end verbatim
+
+@cindex @code{incircle}
+@item real incircle(pair a, pair b, pair c, pair d);
+returns a positive (negative) value if @code{d} lies inside (outside)
+the circle passing through the counterclockwise-oriented points @code{a,b,c}
+or zero if @code{d} lies on the this circle.
+The value returned is the determinant
+@verbatim
+|a.x a.y a.x^2+a.y^2 1|
+|b.x b.y b.x^2+b.y^2 1|
+|c.x c.y c.x^2+c.y^2 1|
+|d.x d.y d.x^2+d.y^2 1|
+@end verbatim
+
@item pair minbound(pair z, pair w)
@cindex @code{minbound}
returns @code{(min(z.x,w.x),min(z.y,w.y))};
@@ -2262,7 +2294,8 @@ path arc(pair c, real r, real angle1, real angle2, bool direction);
Here the direction can be specified as CCW (counter-clockwise) or CW
(clockwise). For convenience, an arc centered at @code{c} from pair
@code{z1} to @code{z2} (assuming @code{|z2-c|=|z1-c|}) in the may also
-be constructed with @verbatim
+be constructed with
+@verbatim
path arc(pair c, explicit pair z1, explicit pair z2,
bool direction=CCW)
@end verbatim
@@ -2577,11 +2610,6 @@ otherwise.
returns an arbitrary point strictly inside a cyclic path @code{p}
according to the fill rule @code{fillrule} (@pxref{fillrule}).
-@cindex @code{incircle}
-@item real incircle(pair a, pair b, pair c, pair d);
-determines the side of the counterclockwise circle through @code{a,b,c} that
-@code{d} lies on (negative=inside, 0=on circle, positive=right).
-
@cindex @code{strokepath}
@item path[] strokepath(path g, pen p=currentpen);
returns the path array that @code{PostScript} would fill in drawing path
@@ -5322,7 +5350,7 @@ For arrays @code{x} and @code{y} of the same length, returns the pair array
@cindex @code{fft}
@item pair[] fft(pair[] a, int sign=1)
-returns the Fast Fourier Transform of @code{a} (if the optional
+returns the unnormalized Fast Fourier Transform of @code{a} (if the optional
@code{FFTW} package is installed), using the given @code{sign}. Here
is a simple example:
@verbatim
@@ -6243,7 +6271,7 @@ line through @code{(0,z.y)}.
returns the @code{n}th @code{y} value of @code{g} at @code{x}.
@cindex @code{value}
-@item real value(path g, real x, int n=0)
+@item real value(path g, explicit pair z, int n=0)
returns the @code{n}th @code{x} value of @code{g} at @code{y=z.y}.
@cindex @code{slope}
@@ -7658,15 +7686,15 @@ the routines
@verbatim
void draw(picture pic=currentpicture, surface s, int nu=1, int nv=1,
material surfacepen=currentpen, pen meshpen=nullpen,
- light light=currentlight, light meshlight=light, string name="",
+ light light=currentlight, light meshlight=nolight, string name="",
render render=defaultrender);
void draw(picture pic=currentpicture, surface s, int nu=1, int nv=1,
material[] surfacepen, pen meshpen,
- light light=currentlight, light meshlight=light, string name="",
+ light light=currentlight, light meshlight=nolight, string name="",
render render=defaultrender);
void draw(picture pic=currentpicture, surface s, int nu=1, int nv=1,
material[] surfacepen, pen[] meshpen=nullpens,
- light light=currentlight, light meshlight=light, string name="",
+ light light=currentlight, light meshlight=nolight, string name="",
render render=defaultrender);
@end verbatim
@@ -8308,11 +8336,19 @@ Three-dimensional versions of the path functions @code{length},
The routine
@cindex @code{intersections}
@verbatim
+real[] intersect(path3 p, surface s, real fuzz=-1);
+@end verbatim
+@noindent
+returns a real array of length 3 containing the intersection times, if any,
+of a path @code{p} with a surface @code{s}.
+The routine
+@verbatim
real[][] intersections(path3 p, surface s, real fuzz=-1);
@end verbatim
@noindent
-returns the intersection times of a path @code{p} with a surface
-@code{s} as a sorted array of real arrays of length 3, and
+returns all (unless there are infinitey many) intersection times of a
+path @code{p} with a surface @code{s} as a sorted array of real arrays
+of length 3, and
@cindex @code{intersectionpoints}
@verbatim
triple[] intersectionpoints(path3 p, surface s, real fuzz=-1);
@@ -8321,6 +8357,39 @@ triple[] intersectionpoints(path3 p, surface s, real fuzz=-1);
returns the corresponding intersection points.
Here, the computations are performed to the absolute error specified by
@code{fuzz}, or if @code{fuzz < 0}, to machine precision.
+The routine
+@cindex @code{orient}
+@verbatim
+real orient(triple a, triple b, triple c, triple d);
+@end verbatim
+@noindent
+is a numerically robust computation of @code{dot(cross(a-d,b-d),c-d)},
+which is the determinant
+@verbatim
+|a.x a.y a.z 1|
+|b.x b.y b.z 1|
+|c.x c.y c.z 1|
+|d.x d.y d.z 1|
+@end verbatim
+
+The routine
+@cindex @code{insphere}
+@verbatim
+real insphere(triple a, triple b, triple c, triple d, triple e);
+@end verbatim
+@noindent
+returns a positive (negative) value if @code{e} lies inside (outside)
+the sphere passing through points @code{a,b,c,d} oriented so that
+@code{dot(cross(a-d,b-d),c-d)} is positive,
+or zero if all five points are cospherical.
+The value returned is the determinant
+@verbatim
+|a.x a.y a.z a.x^2+a.y^2+a.z^2 1|
+|b.x b.y b.z b.x^2+b.y^2+b.z^2 1|
+|c.x c.y c.z c.x^2+c.y^2+c.z^2 1|
+|d.x d.y d.z d.x^2+d.y^2+d.z^2 1|
+|e.x e.y e.z e.x^2+e.y^2+e.z^2 1|
+@end verbatim
Here is an example showing all five guide3 connectors:
@verbatiminclude join3.asy
@@ -9080,7 +9149,7 @@ produced using the @code{-f} option (or @code{outformat} setting).
@cindex @code{dvisvgm}
@cindex @code{libgs}
To produce @acronym{SVG} output, you will need @code{dvisvgm} (version
-0.8.7 or later) from @url{http://dvisvgm.sourceforge.net} and must use
+1.5.3 or later) from @url{http://dvisvgm.sourceforge.net} and must use
the @code{latex} or @code{tex} tex engine. You might need to adjust
the configuration variable @code{libgs} to point to the location of
your @code{Ghostscript} library @code{libgs.so} (or to an empty
@@ -9113,15 +9182,17 @@ to execute arbitrary shell commands. The default mode, @code{-safe},
disables this call.
@cindex offset
-@cindex @code{align}
+@cindex @code{aligndir}
A @code{PostScript} offset may be specified as a pair (in @code{bp}
units) with the @code{-O} option:
@verbatim
asy -O 0,0 file
@end verbatim
@noindent
-The default offset is zero. The default value of the page alignment
-setting @code{align} is @code{Center}.
+The default offset is zero. The pair @code{aligndir} specifies
+an optional direction on the boundary of the page (mapped to the
+rectangle [-1,1]@math{\times}[-1,1]) to which the picture should be aligned; the
+default value @code{(0,0)} species center alignment.
@cindex @code{-c}
The @code{-c} (@code{command}) option may be used to execute arbitrary
@@ -9568,7 +9639,7 @@ Mark Henning, Steve Melenchuk, Martin Wiebusch, and Stefan Knorr.
@c LocalWords: latexusage tex bbox PostScript subdirectory gcc emacs ASYDIR
@c LocalWords: documentclass usepackage subpath shipout sqrt xN Mx bw AcroRd
@c LocalWords: xscale xaxis yaxis BeginBar GIF postprocessing fpu de rpair xy
-@c LocalWords: ImageMagick cd asymptote Hy
+@c LocalWords: ImageMagick cd asymptote Hy 0pt 1filll 's 3D 2D 'asy
@c LocalWords: startup natively xasy tkinter VxN yingyang currentpicture toc
@c LocalWords: MetaPost MetaFont Hammerlindl Healy texinfo autoload setq setf
@c LocalWords: printindex setfilename settitle dircategory direntry titlepage
@@ -9750,6 +9821,8 @@ Mark Henning, Steve Melenchuk, Martin Wiebusch, and Stefan Knorr.
@c LocalWords: generalaxis3 vectorfield3 margin3 grid3xyz 5unit 2D
@c LocalWords: slopefield1 144x144 1filll 'load 'asy 'lasy 'auto 4g
@c LocalWords: libgs 'load 'asy 'lasy 'auto 5bp 1cm 2S 100pt 3t 5mm
-@c LocalWords: bracedefaultratio incircle 12pt 25cm 3x 5x 3y 602e
-@c LocalWords: 2x 2y 3sin 10cm 204e 10x Ai 5E
+@c LocalWords: bracedefaultratio incircle 12pt 25cm 3x 5x 3y 602e '
+@c LocalWords: 2x 2y 3sin 10cm 204e 10x Ai 5E offaxis 'load 'lasy
@c LocalWords: 5cm 2N 2E 2n 100d 5z 5y 5unit dvisvgmOptions 144x144
+@c LocalWords: 4g texengines coplanar
+@c LocalWords: insphere cospherical 5unit luatex lualatex
diff --git a/Build/source/utils/asymptote/doc/latexusage.tex b/Build/source/utils/asymptote/doc/latexusage.tex
index 910cef5bf10..b70df067963 100644
--- a/Build/source/utils/asymptote/doc/latexusage.tex
+++ b/Build/source/utils/asymptote/doc/latexusage.tex
@@ -14,6 +14,8 @@
\begin{document}
+% Optional subdirectory for latex files (no spaces):
+\def\asylatexdir{}
% Optional subdirectory for asy files (no spaces):
\def\asydir{}
diff --git a/Build/source/utils/asymptote/doc/png/asymptote.info b/Build/source/utils/asymptote/doc/png/asymptote.info
index 826df53294f..da43840df7d 100644
--- a/Build/source/utils/asymptote/doc/png/asymptote.info
+++ b/Build/source/utils/asymptote/doc/png/asymptote.info
@@ -1,9 +1,9 @@
-This is asymptote.info, produced by makeinfo version 4.13 from
-../asymptote.texi.
+This is asymptote.info, produced by makeinfo version 5.1 from
+asymptote.texi.
-This file documents `Asymptote', version 2.31.
+This file documents 'Asymptote', version 2.33.
- `http://asymptote.sourceforge.net'
+ <http://asymptote.sourceforge.net>
Copyright (C) 2004-14 Andy Hammerlindl, John Bowman, and Tom Prince.
@@ -11,7 +11,6 @@ This file documents `Asymptote', version 2.31.
document under the terms of the GNU Lesser General Public License
(see the file LICENSE in the top-level source directory).
-
INFO-DIR-SECTION Languages
START-INFO-DIR-ENTRY
* asymptote: (asymptote/asymptote). Vector graphics language.
@@ -23,9 +22,9 @@ File: asymptote.info, Node: Top, Next: Description, Up: (dir)
Asymptote
*********
-This file documents `Asymptote', version 2.31.
+This file documents 'Asymptote', version 2.33.
- `http://asymptote.sourceforge.net'
+ <http://asymptote.sourceforge.net>
Copyright (C) 2004-14 Andy Hammerlindl, John Bowman, and Tom Prince.
@@ -33,39 +32,38 @@ This file documents `Asymptote', version 2.31.
document under the terms of the GNU Lesser General Public License
(see the file LICENSE in the top-level source directory).
-
* Menu:
-* Description:: What is `Asymptote'?
+* Description:: What is 'Asymptote'?
* Installation:: Downloading and installing
* Tutorial:: Getting started
* Drawing commands:: Four primitive graphics commands
* Bezier curves:: Path connectors and direction specifiers
-* Programming:: The `Asymptote' vector graphics language
-* LaTeX usage:: Embedding `Asymptote' commands within `LaTeX'
-* Base modules:: Base modules shipped with `Asymptote'
+* Programming:: The 'Asymptote' vector graphics language
+* LaTeX usage:: Embedding 'Asymptote' commands within 'LaTeX'
+* Base modules:: Base modules shipped with 'Asymptote'
* Options:: Command-line options
-* Interactive mode:: Typing `Asymptote' commands interactively
+* Interactive mode:: Typing 'Asymptote' commands interactively
* GUI:: Graphical user interface
-* PostScript to Asymptote:: `Asymptote' backend to `pstoedit'
+* PostScript to Asymptote:: 'Asymptote' backend to 'pstoedit'
* Help:: Where to get help and submit bug reports
* Debugger:: Squish those bugs!
* Credits:: Contributions and acknowledgments
* Index:: General index
- --- The Detailed Node Listing ---
+ -- The Detailed Node Listing --
Installation
-* UNIX binary distributions:: Prebuilt `UNIX' binaries
-* MacOS X binary distributions:: Prebuilt `MacOS X' binaries
-* Microsoft Windows:: Prebuilt `Microsoft Windows' binary
-* Configuring:: Configuring `Asymptote' for your system
-* Search paths:: Where `Asymptote' looks for your files
-* Compiling from UNIX source:: Building `Asymptote' from scratch
-* Editing modes:: Convenient `emacs' and `vim' modes
+* UNIX binary distributions:: Prebuilt 'UNIX' binaries
+* MacOS X binary distributions:: Prebuilt 'MacOS X' binaries
+* Microsoft Windows:: Prebuilt 'Microsoft Windows' binary
+* Configuring:: Configuring 'Asymptote' for your system
+* Search paths:: Where 'Asymptote' looks for your files
+* Compiling from UNIX source:: Building 'Asymptote' from scratch
+* Editing modes:: Convenient 'emacs' and 'vim' modes
* Subversion:: Getting the latest development source
-* Uninstall:: Goodbye, `Asymptote'!
+* Uninstall:: Goodbye, 'Asymptote'!
Drawing commands
@@ -89,7 +87,7 @@ Programming
* Functions:: Traditional and high-order functions
* Arrays:: Dynamic vectors
* Casts:: Implicit and explicit casts
-* Import:: Importing external `Asymptote' modules
+* Import:: Importing external 'Asymptote' modules
* Static:: Where to allocate your variable?
Operators
@@ -112,9 +110,9 @@ Arrays
Base modules
-* plain:: Default `Asymptote' base file
+* plain:: Default 'Asymptote' base file
* simplex:: Linear programming: simplex method
-* math:: Extend `Asymptote''s math capabilities
+* math:: Extend 'Asymptote''s math capabilities
* interpolate:: Interpolation routines
* geometry:: Geometry routines
* trembling:: Wavy lines
@@ -129,11 +127,11 @@ Base modules
* roundedpath:: Round the sharp corners of paths
* animation:: Embedded PDF and MPEG movies
* embed:: Embedding movies, sounds, and 3D objects
-* slide:: Making presentations with `Asymptote'
-* MetaPost:: `MetaPost' compatibility routines
-* unicode:: Accept `unicode' (UTF-8) characters
-* latin1:: Accept `ISO 8859-1' characters
-* babel:: Interface to `LaTeX' `babel' package
+* slide:: Making presentations with 'Asymptote'
+* MetaPost:: 'MetaPost' compatibility routines
+* unicode:: Accept 'unicode' (UTF-8) characters
+* latin1:: Accept 'ISO 8859-1' characters
+* babel:: Interface to 'LaTeX' 'babel' package
* labelpath:: Drawing curved labels
* labelpath3:: Drawing curved labels in 3D
* annotate:: Annotate your PDF files
@@ -154,53 +152,54 @@ Base modules
Graphical User Interface
-* GUI installation:: Installing `xasy'
+* GUI installation:: Installing 'xasy'
* GUI usage::
+

File: asymptote.info, Node: Description, Next: Installation, Prev: Top, Up: Top
1 Description
*************
-`Asymptote' is a powerful descriptive vector graphics language that
+'Asymptote' is a powerful descriptive vector graphics language that
provides a mathematical coordinate-based framework for technical
-drawing. Labels and equations are typeset with `LaTeX', for overall
+drawing. Labels and equations are typeset with 'LaTeX', for overall
document consistency, yielding the same high-quality level of
-typesetting that `LaTeX' provides for scientific text. By default it
-produces `PostScript' output, but it can also generate any format that
-the `ImageMagick' package can produce.
-
- A major advantage of `Asymptote' over other graphics packages is
-that it is a high-level programming language, as opposed to just a
-graphics program: it can therefore exploit the best features of the
-script (command-driven) and graphical-user-interface (GUI) methods for
-producing figures. The rudimentary GUI `xasy' included with the package
-allows one to move script-generated objects around. To make `Asymptote'
+typesetting that 'LaTeX' provides for scientific text. By default it
+produces 'PostScript' output, but it can also generate any format that
+the 'ImageMagick' package can produce.
+
+ A major advantage of 'Asymptote' over other graphics packages is that
+it is a high-level programming language, as opposed to just a graphics
+program: it can therefore exploit the best features of the script
+(command-driven) and graphical-user-interface (GUI) methods for
+producing figures. The rudimentary GUI 'xasy' included with the package
+allows one to move script-generated objects around. To make 'Asymptote'
accessible to the average user, this GUI is currently being developed
into a full-fledged interface that can generate objects directly.
-However, the script portion of the language is now ready for general
-use by users who are willing to learn a few simple `Asymptote' graphics
+However, the script portion of the language is now ready for general use
+by users who are willing to learn a few simple 'Asymptote' graphics
commands (*note Drawing commands::).
- `Asymptote' is mathematically oriented (e.g. one can use complex
-multiplication to rotate a vector) and uses `LaTeX' to do the
-typesetting of labels. This is an important feature for scientific
-applications. It was inspired by an earlier drawing program (with a
-weaker syntax and capabilities) called `MetaPost'.
+ 'Asymptote' is mathematically oriented (e.g. one can use complex
+multiplication to rotate a vector) and uses 'LaTeX' to do the
+typesetting of labels. This is an important feature for scientific
+applications. It was inspired by an earlier drawing program (with a
+weaker syntax and capabilities) called 'MetaPost'.
- The `Asymptote' vector graphics language provides:
+ The 'Asymptote' vector graphics language provides:
* a standard for typesetting mathematical figures, just as
- TeX/`LaTeX' is the de-facto standard for typesetting equations.
+ TeX/'LaTeX' is the de-facto standard for typesetting equations.
- * `LaTeX' typesetting of labels, for overall document consistency;
+ * 'LaTeX' typesetting of labels, for overall document consistency;
- * the ability to generate and embed 3D vector PRC graphics within
- PDF files;
+ * the ability to generate and embed 3D vector PRC graphics within PDF
+ files;
* a natural coordinate-based framework for technical drawing,
- inspired by `MetaPost', with a much cleaner, powerful C++-like
+ inspired by 'MetaPost', with a much cleaner, powerful C++-like
programming syntax;
* compilation of figures into virtual machine code for speed, without
@@ -214,7 +213,7 @@ weaker syntax and capabilities) called `MetaPost'.
* sensible defaults for graphical features, with the ability to
override;
- * a high-level mathematically oriented interface to the `PostScript'
+ * a high-level mathematically oriented interface to the 'PostScript'
language for vector graphics, including affine transforms and
complex variables;
@@ -224,22 +223,18 @@ weaker syntax and capabilities) called `MetaPost'.
constraint issues between fixed-sized objects (labels and
arrowheads) and objects that should scale with figure size;
-
- Many of the features of `Asymptote' are written in the `Asymptote'
-language itself. While the stock version of `Asymptote' is designed for
-mathematics typesetting needs, one can write `Asymptote' modules that
-tailor it to specific applications. A scientific graphing module has
-already been written (*note graph::). Examples of `Asymptote' code and
+ Many of the features of 'Asymptote' are written in the 'Asymptote'
+language itself. While the stock version of 'Asymptote' is designed for
+mathematics typesetting needs, one can write 'Asymptote' modules that
+tailor it to specific applications. A scientific graphing module has
+already been written (*note graph::). Examples of 'Asymptote' code and
output, including animations, are available at
-
- `http://asymptote.sourceforge.net/gallery/'.
- Links to many external resources, including an excellent user-written
-`Asymptote' tutorial can be found at
-
- `http://asymptote.sourceforge.net/links.html'.
- A quick reference card for `Asymptote' is available at
-
- `http://asymptote.sourceforge.net/asyRefCard.pdf'.
+ <http://asymptote.sourceforge.net/gallery/>.
+Links to many external resources, including an excellent user-written
+'Asymptote' tutorial can be found at
+ <http://asymptote.sourceforge.net/links.html>.
+ A quick reference card for 'Asymptote' is available at
+ <http://asymptote.sourceforge.net/asyRefCard.pdf>.

File: asymptote.info, Node: Installation, Next: Tutorial, Prev: Description, Up: Top
@@ -249,25 +244,23 @@ File: asymptote.info, Node: Installation, Next: Tutorial, Prev: Description,
* Menu:
-* UNIX binary distributions:: Prebuilt `UNIX' binaries
-* MacOS X binary distributions:: Prebuilt `MacOS X' binaries
-* Microsoft Windows:: Prebuilt `Microsoft Windows' binary
-* Configuring:: Configuring `Asymptote' for your system
-* Search paths:: Where `Asymptote' looks for your files
-* Compiling from UNIX source:: Building `Asymptote' from scratch
-* Editing modes:: Convenient `emacs' and `vim' modes
+* UNIX binary distributions:: Prebuilt 'UNIX' binaries
+* MacOS X binary distributions:: Prebuilt 'MacOS X' binaries
+* Microsoft Windows:: Prebuilt 'Microsoft Windows' binary
+* Configuring:: Configuring 'Asymptote' for your system
+* Search paths:: Where 'Asymptote' looks for your files
+* Compiling from UNIX source:: Building 'Asymptote' from scratch
+* Editing modes:: Convenient 'emacs' and 'vim' modes
* Subversion:: Getting the latest development source
-* Uninstall:: Goodbye, `Asymptote'!
+* Uninstall:: Goodbye, 'Asymptote'!
- After following the instructions for your specific distribution,
-please see also *note Configuring::.
+After following the instructions for your specific distribution, please
+see also *note Configuring::.
We recommend subscribing to new release announcements at
-
- `http://freecode.com/projects/asy'
- Users may also wish to monitor the `Asymptote' forum:
-
- `http://sourceforge.net/p/asymptote/discussion/409349'
+ <http://freecode.com/projects/asy>
+Users may also wish to monitor the 'Asymptote' forum:
+ <http://sourceforge.net/p/asymptote/discussion/409349>

File: asymptote.info, Node: UNIX binary distributions, Next: MacOS X binary distributions, Up: Installation
@@ -275,26 +268,25 @@ File: asymptote.info, Node: UNIX binary distributions, Next: MacOS X binary di
2.1 UNIX binary distributions
=============================
-We release both `tgz' and RPM binary distributions of `Asymptote'. The
-root user can install the `Linux i386' `tgz' distribution of version
-`x.xx' of `Asymptote' with the commands:
+We release both 'tgz' and RPM binary distributions of 'Asymptote'. The
+root user can install the 'Linux i386' 'tgz' distribution of version
+'x.xx' of 'Asymptote' with the commands:
tar -C / -zxf asymptote-x.xx.i386.tgz
texhash
- The `texhash' command, which installs LaTeX style files, is optional.
-The executable file will be `/usr/local/bin/asy') and example code will
-be installed by default in `/usr/local/share/doc/asymptote/examples'.
+The 'texhash' command, which installs LaTeX style files, is optional.
+The executable file will be '/usr/local/bin/asy') and example code will
+be installed by default in '/usr/local/share/doc/asymptote/examples'.
-Fedora users can easily install the most recent version of `Asymptote'
+Fedora users can easily install the most recent version of 'Asymptote'
with the command
yum --enablerepo=rawhide install asymptote
-To install the latest version of `Asymptote' on a Debian-based
+To install the latest version of 'Asymptote' on a Debian-based
distribution (e.g. Ubuntu, Mepis, Linspire) follow the instructions for
-compiling from `UNIX' source (*note Compiling from UNIX source::).
+compiling from 'UNIX' source (*note Compiling from UNIX source::).
Alternatively, Debian users can install one of Hubert Chan's prebuilt
-`Asymptote' binaries from
-
- `http://ftp.debian.org/debian/pool/main/a/asymptote'
+'Asymptote' binaries from
+ <http://ftp.debian.org/debian/pool/main/a/asymptote>

File: asymptote.info, Node: MacOS X binary distributions, Next: Microsoft Windows, Prev: UNIX binary distributions, Up: Installation
@@ -302,21 +294,21 @@ File: asymptote.info, Node: MacOS X binary distributions, Next: Microsoft Wind
2.2 MacOS X binary distributions
================================
-`MacOS X' users can either compile the `UNIX' source code (*note
-Compiling from UNIX source::) or install the contributed `Asymptote'
+'MacOS X' users can either compile the 'UNIX' source code (*note
+Compiling from UNIX source::) or install the contributed 'Asymptote'
binary available at
-`http://www.hmug.org/pub/MacOS_X/X/Applications/Publishing/asymptote/'
+ <http://www.hmug.org/pub/MacOS_X/X/Applications/Publishing/asymptote/>
Because these preconfigured binary distributions have strict
architecture and library dependencies that many installations do not
-satisfy, we recommend installing `Asymptote' directly from the official
+satisfy, we recommend installing 'Asymptote' directly from the official
source:
- `http://sourceforge.net/project/showfiles.php?group_id=120000'
+ <http://sourceforge.net/project/showfiles.php?group_id=120000>
-Note that many `MacOS X' (and FreeBSD) systems lack the GNU `readline'
-library. For full interactive functionality, GNU `readline' version 4.3
+Note that many 'MacOS X' (and FreeBSD) systems lack the GNU 'readline'
+library. For full interactive functionality, GNU 'readline' version 4.3
or later must be installed.

@@ -325,38 +317,38 @@ File: asymptote.info, Node: Microsoft Windows, Next: Configuring, Prev: MacOS
2.3 Microsoft Windows
=====================
-Users of the `Microsoft Windows' operating system can install the
-self-extracting `Asymptote' executable `asymptote-x.xx-setup.exe',
-where `x.xx' denotes the latest version.
+Users of the 'Microsoft Windows' operating system can install the
+self-extracting 'Asymptote' executable 'asymptote-x.xx-setup.exe', where
+'x.xx' denotes the latest version.
A working TeX implementation (such as the one available at
-`http://www.miktex.org') will be required to typeset labels. You will
-also need to install `GPL Ghostscript' from
-`http://sourceforge.net/projects/ghostscript/'.
-
- To view the default `PostScript' output, you can install the program
-`gsview' available from `http://www.cs.wisc.edu/~ghost/gsview/'. A
-better (and free) `PostScript' viewer available at
-`http://psview.sourceforge.net/' (which in particular works properly in
+<http://www.miktex.org>) will be required to typeset labels. You will
+also need to install 'GPL Ghostscript' from
+<http://sourceforge.net/projects/ghostscript/>.
+
+ To view the default 'PostScript' output, you can install the program
+'gsview' available from <http://www.cs.wisc.edu/~ghost/gsview/>. A
+better (and free) 'PostScript' viewer available at
+<http://psview.sourceforge.net/> (which in particular works properly in
interactive mode) unfortunately currently requires some manual
-configuration. Specifically, if version `x.xx' of `psview' is extracted
-to the directory `c:\Program Files' one needs to put
+configuration. Specifically, if version 'x.xx' of 'psview' is extracted
+to the directory 'c:\Program Files' one needs to put
import settings;
psviewer="c:\Program Files\psview-x.xx\psv.exe";
- in the optional `Asymptote' configuration file; *note configuration
+in the optional 'Asymptote' configuration file; *note configuration
file::).
- The `ImageMagick' package from
+ The 'ImageMagick' package from
- `http://www.imagemagick.org/script/binary-releases.php'
+ <http://www.imagemagick.org/script/binary-releases.php>
is required to support output formats other than EPS, PDF, SVG, and PNG
-(*note convert::). The `Python 2' interpreter from
-`http://www.python.org' is only required if you wish to try out the
+(*note convert::). The 'Python 2' interpreter from
+<http://www.python.org> is only required if you wish to try out the
graphical user interface (*note GUI::).
-Example code will be installed by default in the `examples'
-subdirectory of the installation directory (by default, `C:\Program
+Example code will be installed by default in the 'examples' subdirectory
+of the installation directory (by default, 'C:\Program
Files\Asymptote').

@@ -365,66 +357,64 @@ File: asymptote.info, Node: Configuring, Next: Search paths, Prev: Microsoft
2.4 Configuring
===============
-In interactive mode, or when given the `-V' option (the default when
-running `Asymptote' on a single file under `MSDOS'), `Asymptote' will
-automatically invoke the `PostScript' viewer `gv' (under `UNIX') or
-`gsview' (under `MSDOS' to display graphical output. These defaults may
-be overridden with the configuration variable `psviewer'. The
-`PostScript' viewer should be capable of automatically redrawing
-whenever the output file is updated. The default `UNIX' `PostScript'
-viewer `gv' supports this (via a `SIGHUP' signal). Version `gv-3.6.3'
-or later (from `http://ftp.gnu.org/gnu/gv/') is required for
-interactive mode to work properly. Users of `ggv' will need to enable
-`Watch file' under `Edit/Postscript Viewer Preferences'. Users of
-`gsview' will need to enable `Options/Auto Redisplay' (however, under
-`MSDOS' it is still necessary to click on the `gsview' window; under
-`UNIX' one must manually redisplay by pressing the `r' key). A better
-(and free) multiplatform alternative to `gsview' is `psview' (*note
-psview::).
-
- Configuration variables are most easily set as `Asymptote' variables
-in an optional configuration file `config.asy' *note configuration
+In interactive mode, or when given the '-V' option (the default when
+running 'Asymptote' on a single file under 'MSDOS'), 'Asymptote' will
+automatically invoke the 'PostScript' viewer 'gv' (under 'UNIX') or
+'gsview' (under 'MSDOS' to display graphical output. These defaults may
+be overridden with the configuration variable 'psviewer'. The
+'PostScript' viewer should be capable of automatically redrawing
+whenever the output file is updated. The default 'UNIX' 'PostScript'
+viewer 'gv' supports this (via a 'SIGHUP' signal). Version 'gv-3.6.3'
+or later (from <http://ftp.gnu.org/gnu/gv/>) is required for interactive
+mode to work properly. Users of 'ggv' will need to enable 'Watch file'
+under 'Edit/Postscript Viewer Preferences'. Users of 'gsview' will need
+to enable 'Options/Auto Redisplay' (however, under 'MSDOS' it is still
+necessary to click on the 'gsview' window; under 'UNIX' one must
+manually redisplay by pressing the 'r' key). A better (and free)
+multiplatform alternative to 'gsview' is 'psview' (*note psview::).
+
+ Configuration variables are most easily set as 'Asymptote' variables
+in an optional configuration file 'config.asy' *note configuration
file::). Here are the default values of several important configuration
-variables under `UNIX':
-
+variables under 'UNIX':
import settings;
psviewer="gv";
pdfviewer="acroread";
gs="gs";
-Under `MSDOS', the (installation-dependent) default values of these
-configuration variables are determined automatically from the
-`Microsoft Windows' registry. Viewer settings (such as `psviewer' and
-`pdfviewer') can be set to the string `cmd' to request the application
-normally associated with the corresponding file type.
-
- For PDF format output, the `gs' setting specifies the location of
-the `PostScript'-to-PDF processor `Ghostscript', available from
-`http://sourceforge.net/projects/ghostscript/'.
-
- The setting `pdfviewer' specifies the location of the PDF viewer. On
-`UNIX' systems, to support automatic document reloading in `Adobe
-Reader', we recommend copying the file `reload.js' from the `Asymptote'
-system directory (by default, `/usr/local/share/asymptote' under `UNIX'
-to `~/.adobe/Acrobat/x.x/JavaScripts/', where `x.x' represents the
-appropriate `Adobe Reader' version number. The automatic document
+Under 'MSDOS', the (installation-dependent) default values of these
+configuration variables are determined automatically from the 'Microsoft
+Windows' registry. Viewer settings (such as 'psviewer' and 'pdfviewer')
+can be set to the string 'cmd' to request the application normally
+associated with the corresponding file type.
+
+ For PDF format output, the 'gs' setting specifies the location of the
+'PostScript'-to-PDF processor 'Ghostscript', available from
+<http://sourceforge.net/projects/ghostscript/>.
+
+ The setting 'pdfviewer' specifies the location of the PDF viewer. On
+'UNIX' systems, to support automatic document reloading in 'Adobe
+Reader', we recommend copying the file 'reload.js' from the 'Asymptote'
+system directory (by default, '/usr/local/share/asymptote' under 'UNIX'
+to '~/.adobe/Acrobat/x.x/JavaScripts/', where 'x.x' represents the
+appropriate 'Adobe Reader' version number. The automatic document
reload feature must then be explicitly enabled by putting
import settings;
pdfreload=true;
pdfreloadOptions="-tempFile";
- in the `Asymptote' configuration file. This reload feature is not
-useful under `MSDOS' since the document cannot be updated anyway on
-that operating system until it is first closed by `Adobe Reader'.
+in the 'Asymptote' configuration file. This reload feature is not
+useful under 'MSDOS' since the document cannot be updated anyway on that
+operating system until it is first closed by 'Adobe Reader'.
- The configuration variable `dir' can be used to adjust the search
+ The configuration variable 'dir' can be used to adjust the search
path (*note Search paths::).
- By default, `Asymptote' attempts to center the figure on the page,
-assuming that the paper type is `letter'. The default paper type may be
-changed to `a4' with the configuration variable `papertype'. Alignment
+ By default, 'Asymptote' attempts to center the figure on the page,
+assuming that the paper type is 'letter'. The default paper type may be
+changed to 'a4' with the configuration variable 'papertype'. Alignment
to other paper sizes can be obtained by setting the configuration
-variables `paperwidth' and `paperheight'.
+variables 'paperwidth' and 'paperheight'.
The following configuration variables normally do not require
adjustment:
@@ -437,11 +427,12 @@ libgs
convert
display
animate
- Warnings (such as "unbounded" and "offaxis") may be enabled or
+
+ Warnings (such as "unbounded" and "offaxis") may be enabled or
disabled with the functions
warn(string s);
nowarn(string s);
- or by directly modifying the string array `settings.suppress', which
+or by directly modifying the string array 'settings.suppress', which
lists all disabled warnings.
Configuration variables may also be set or overwritten with a
@@ -449,21 +440,17 @@ command-line option:
asy -psviewer=gsview -V venn
Alternatively, system environment versions of the above configuration
-variables may be set in the conventional way. The corresponding
+variables may be set in the conventional way. The corresponding
environment variable name is obtained by converting the configuration
-variable name to upper case and prepending `ASYMPTOTE_': for example,
-to set the environment variable
+variable name to upper case and prepending 'ASYMPTOTE_': for example, to
+set the environment variable
ASYMPTOTE_PSVIEWER="C:\Program Files\Ghostgum\gsview\gsview32.exe";
- under `Microsoft Windows XP':
- 1. Click on the `Start' button;
-
- 2. Right-click on `My Computer';
-
- 3. Choose `View system information';
-
- 4. Click the `Advanced' tab;
-
- 5. Click the `Environment Variables' button.
+under 'Microsoft Windows XP':
+ 1. Click on the 'Start' button;
+ 2. Right-click on 'My Computer';
+ 3. Choose 'View system information';
+ 4. Click the 'Advanced' tab;
+ 5. Click the 'Environment Variables' button.

File: asymptote.info, Node: Search paths, Next: Compiling from UNIX source, Prev: Configuring, Up: Installation
@@ -471,22 +458,19 @@ File: asymptote.info, Node: Search paths, Next: Compiling from UNIX source, P
2.5 Search paths
================
-In looking for `Asymptote' system files, `asy' will search the
-following paths, in the order listed:
+In looking for 'Asymptote' system files, 'asy' will search the following
+paths, in the order listed:
1. The current directory;
-
2. A list of one or more directories specified by the configuration
- variable `dir' or environment variable `ASYMPTOTE_DIR' (separated
- by `:' under UNIX and `;' under `MSDOS');
-
+ variable 'dir' or environment variable 'ASYMPTOTE_DIR' (separated
+ by ':' under UNIX and ';' under 'MSDOS');
3. The directory specified by the environment variable
- `ASYMPTOTE_HOME'; if this variable is not set, the directory
- `.asy' in the user's home directory (`%USERPROFILE%\.asy' under
- `MSDOS') is used;
-
- 4. The `Asymptote' system directory (by default,
- `/usr/local/share/asymptote' under `UNIX' and `C:\Program
- Files\Asymptote' under `MSDOS').
+ 'ASYMPTOTE_HOME'; if this variable is not set, the directory '.asy'
+ in the user's home directory ('%USERPROFILE%\.asy' under 'MSDOS')
+ is used;
+ 4. The 'Asymptote' system directory (by default,
+ '/usr/local/share/asymptote' under 'UNIX' and 'C:\Program
+ Files\Asymptote' under 'MSDOS').

File: asymptote.info, Node: Compiling from UNIX source, Next: Editing modes, Prev: Search paths, Up: Installation
@@ -494,67 +478,66 @@ File: asymptote.info, Node: Compiling from UNIX source, Next: Editing modes,
2.6 Compiling from UNIX source
==============================
-To compile and install a `UNIX' executable from a source release
-`x.xx', first execute the commands:
+To compile and install a 'UNIX' executable from a source release 'x.xx',
+first execute the commands:
gunzip asymptote-x.xx.src.tgz
tar -xf asymptote-x.xx.src.tar
cd asymptote-x.xx
- By default the system version of the Boehm garbage collector will be
+ By default the system version of the Boehm garbage collector will be
used; if it is old we recommend first putting
-`http://hboehm.info/gc/gc_source/gc-7.4.0.tar.gz'
-`http://hboehm.info/gc/gc_source/libatomic_ops-7.4.0.tar.gz' in the
-`Asymptote' source directory.
+<http://hboehm.info/gc/gc_source/gc-7.4.2.tar.gz>
+<http://www.ivmaisoft.com/_bin/atomic_ops/libatomic_ops-7.4.2.tar.gz> in
+the 'Asymptote' source directory.
- On `UNIX' platforms (other than `MacOS X'), we recommend using
-version `2.8.1' of the `freeglut' library. To compile `freeglut',
+ On 'UNIX' platforms (other than 'MacOS X'), we recommend using
+version '2.8.1' of the 'freeglut' library. To compile 'freeglut',
download
-
- `http://prdownloads.sourceforge.net/freeglut/freeglut-2.8.1.tar.gz'
- and type (as the root user):
+ <http://prdownloads.sourceforge.net/freeglut/freeglut-2.8.1.tar.gz>
+and type (as the root user):
gunzip freeglut-2.8.1.tar.gz
tar -xf freeglut-2.8.1.tar
cd freeglut-2.8.1
./configure --prefix=/usr
make install
cd ..
- Then compile `Asymptote' with the commands
+
+ Then compile 'Asymptote' with the commands
./configure
make all
make install
- Be sure to use GNU `make' (on non-GNU systems this command may be
-called `gmake'). To build the documentation, you may need to install
-the `texinfo-tex' package. If you get errors from a broken `texinfo' or
-`pdftex' installation, simply put
-
- `http://asymptote.sourceforge.net/asymptote.pdf'
- in the directory `doc' and repeat the command `make all'.
+Be sure to use GNU 'make' (on non-GNU systems this command may be called
+'gmake'). To build the documentation, you may need to install the
+'texinfo-tex' package. If you get errors from a broken 'texinfo' or
+'pdftex' installation, simply put
+ <http://asymptote.sourceforge.net/asymptote.pdf>
+in the directory 'doc' and repeat the command 'make all'.
For a (default) system-wide installation, the last command should be
-done as the root user. To install without root privileges, change the
-`./configure' command to
+done as the root user. To install without root privileges, change the
+'./configure' command to
./configure --prefix=$HOME/asymptote
- One can disable use of the Boehm garbage collector by configuring with
-`./configure --disable-gc'. For a list of other configuration options,
-say `./configure --help'. For example, one can tell configure to look
-for header files and libraries in nonstandard locations:
+ One can disable use of the Boehm garbage collector by configuring
+with './configure --disable-gc'. For a list of other configuration
+options, say './configure --help'. For example, one can tell configure
+to look for header files and libraries in nonstandard locations:
./configure CFLAGS=-I/opt/usr/include LDFLAGS=-L/opt/usr/lib
- If you are compiling `Asymptote' with `gcc', you will need a
+ If you are compiling 'Asymptote' with 'gcc', you will need a
relatively recent version (e.g. 3.4.4 or later). For full interactive
-functionality, you will need version 4.3 or later of the GNU `readline'
-library. The file `gcc3.3.2curses.patch' in the `patches' directory can
+functionality, you will need version 4.3 or later of the GNU 'readline'
+library. The file 'gcc3.3.2curses.patch' in the 'patches' directory can
be used to patch the broken curses.h header file (or a local copy
-thereof in the current directory) on some `AIX' and `IRIX' systems.
+thereof in the current directory) on some 'AIX' and 'IRIX' systems.
- The `FFTW' library is only required if you want `Asymptote' to be
+ The 'FFTW' library is only required if you want 'Asymptote' to be
able to take Fourier transforms of data (say, to compute an audio power
-spectrum). The `GSL' library is only required if you require the
+spectrum). The 'GSL' library is only required if you require the
special functions that it supports.
- If you don't want to install `Asymptote' system wide, just make sure
-the compiled binary `asy' and GUI script `xasy' are in your path and
-set the configuration variable `dir' to point to the directory `base'
-(in the top level directory of the `Asymptote' source code).
+ If you don't want to install 'Asymptote' system wide, just make sure
+the compiled binary 'asy' and GUI script 'xasy' are in your path and set
+the configuration variable 'dir' to point to the directory 'base' (in
+the top level directory of the 'Asymptote' source code).

File: asymptote.info, Node: Editing modes, Next: Subversion, Prev: Compiling from UNIX source, Up: Installation
@@ -562,53 +545,52 @@ File: asymptote.info, Node: Editing modes, Next: Subversion, Prev: Compiling
2.7 Editing modes
=================
-Users of `emacs' can edit `Asymptote' code with the mode `asy-mode',
-after enabling it by putting the following lines in their `.emacs'
-initialization file, replacing `ASYDIR' with the location of the
-`Asymptote' system directory (by default, `/usr/local/share/asymptote'
-or `C:\Program Files\Asymptote' under `MSDOS'):
+Users of 'emacs' can edit 'Asymptote' code with the mode 'asy-mode',
+after enabling it by putting the following lines in their '.emacs'
+initialization file, replacing 'ASYDIR' with the location of the
+'Asymptote' system directory (by default, '/usr/local/share/asymptote'
+or 'C:\Program Files\Asymptote' under 'MSDOS'):
(add-to-list 'load-path "ASYDIR")
(autoload 'asy-mode "asy-mode.el" "Asymptote major mode." t)
(autoload 'lasy-mode "asy-mode.el" "hybrid Asymptote/Latex major mode." t)
(autoload 'asy-insinuate-latex "asy-mode.el" "Asymptote insinuate LaTeX." t)
(add-to-list 'auto-mode-alist '("\\.asy$" . asy-mode))
- Particularly useful key bindings in this mode are `C-c C-c', which
-compiles and displays the current buffer, and the key binding `C-c ?',
+Particularly useful key bindings in this mode are 'C-c C-c', which
+compiles and displays the current buffer, and the key binding 'C-c ?',
which shows the available function prototypes for the command at the
cursor. For full functionality you should also install the Apache
-Software Foundation package `two-mode-mode':
-
- `http://www.dedasys.com/freesoftware/files/two-mode-mode.el'
- Once installed, you can use the hybrid mode `lasy-mode' to edit a
-LaTeX file containing embedded `Asymptote' code (*note LaTeX usage::).
-This mode can be enabled within `latex-mode' with the key sequence `M-x
-lasy-mode <RET>'. On `UNIX' systems, additional keywords will be
-generated from all `asy' files in the space-separated list of
-directories specified by the environment variable `ASYMPTOTE_SITEDIR'.
-Further documentation of `asy-mode' is available within `emacs' by
-pressing the sequence keys `C-h f asy-mode <RET>'.
-
- Fans of `vim' can customize `vim' for `Asymptote' with
-
-`cp /usr/local/share/asymptote/asy.vim ~/.vim/syntax/asy.vim'
-
-and add the following to their `~/.vimrc' file:
+Software Foundation package 'two-mode-mode':
+ <http://www.dedasys.com/freesoftware/files/two-mode-mode.el>
+Once installed, you can use the hybrid mode 'lasy-mode' to edit a LaTeX
+file containing embedded 'Asymptote' code (*note LaTeX usage::). This
+mode can be enabled within 'latex-mode' with the key sequence 'M-x
+lasy-mode <RET>'. On 'UNIX' systems, additional keywords will be
+generated from all 'asy' files in the space-separated list of
+directories specified by the environment variable 'ASYMPTOTE_SITEDIR'.
+Further documentation of 'asy-mode' is available within 'emacs' by
+pressing the sequence keys 'C-h f asy-mode <RET>'.
+
+ Fans of 'vim' can customize 'vim' for 'Asymptote' with
+
+'cp /usr/local/share/asymptote/asy.vim ~/.vim/syntax/asy.vim'
+
+and add the following to their '~/.vimrc' file:
augroup filetypedetect
au BufNewFile,BufRead *.asy setf asy
augroup END
filetype plugin on
If any of these directories or files don't exist, just create them.
-To set `vim' up to run the current asymptote script using `:make' just
-add to `~/.vim/ftplugin/asy.vim':
+To set 'vim' up to run the current asymptote script using ':make' just
+add to '~/.vim/ftplugin/asy.vim':
setlocal makeprg=asy\ %
setlocal errorformat=%f:\ %l.%c:\ %m
- Syntax highlighting support for the KDE editor `Kate' can be enabled
-by running `asy-kate.sh' in the `/usr/local/share/asymptote' directory
-and putting the generated `asymptote.xml' file in
-`~/.kde/share/apps/katepart/syntax/'.
+ Syntax highlighting support for the KDE editor 'Kate' can be enabled
+by running 'asy-kate.sh' in the '/usr/local/share/asymptote' directory
+and putting the generated 'asymptote.xml' file in
+'~/.kde/share/apps/katepart/syntax/'.

File: asymptote.info, Node: Subversion, Next: Uninstall, Prev: Editing modes, Up: Installation
@@ -617,7 +599,7 @@ File: asymptote.info, Node: Subversion, Next: Uninstall, Prev: Editing modes,
====================
The following commands are needed to install the latest development
-version of `Asymptote' using `Subversion':
+version of 'Asymptote' using 'Subversion':
svn co http://svn.code.sf.net/p/asymptote/code/trunk/asymptote
cd asymptote
./autogen.sh
@@ -625,7 +607,7 @@ cd asymptote
make all
make install
-To compile without optimization, use the command `make CFLAGS=-g'.
+To compile without optimization, use the command 'make CFLAGS=-g'.

File: asymptote.info, Node: Uninstall, Prev: Subversion, Up: Installation
@@ -633,12 +615,12 @@ File: asymptote.info, Node: Uninstall, Prev: Subversion, Up: Installation
2.9 Uninstall
=============
-To uninstall an `Linux i386' binary distribution, use the commands
+To uninstall an 'Linux i386' binary distribution, use the commands
tar -zxvf asymptote-x.xx.i386.tgz | xargs --replace=% rm /%
texhash
-To uninstall all `Asymptote' files installed from a source
-distribution, use the command
+To uninstall all 'Asymptote' files installed from a source distribution,
+use the command
make uninstall

@@ -651,93 +633,90 @@ File: asymptote.info, Node: Tutorial, Next: Drawing commands, Prev: Installat
=========================
To draw a line from coordinate (0,0) to coordinate (100,100), create a
-text file `test.asy' containing
-
+text file 'test.asy' containing
draw((0,0)--(100,100));
- Then execute the command
+
+Then execute the command
asy -V test
- Alternatively, `MSDOS' users can drag and drop `test.asy' onto the
-Desktop `asy' icon (or make `Asymptote' the default application for the
-extension `asy').
+Alternatively, 'MSDOS' users can drag and drop 'test.asy' onto the
+Desktop 'asy' icon (or make 'Asymptote' the default application for the
+extension 'asy').
-This method, known as _batch mode_, outputs a `PostScript' file
-`test.eps'. If you prefer PDF output, use the command line
+This method, known as _batch mode_, outputs a 'PostScript' file
+'test.eps'. If you prefer PDF output, use the command line
asy -V -f pdf test
- In either case, the `-V' option opens up a viewer window so you can
+ In either case, the '-V' option opens up a viewer window so you can
immediately view the result:
-
-Here, the `--' connector joins the two points `(0,0)' and `(100,100)'
+ [diagonal]
+Here, the '--' connector joins the two points '(0,0)' and '(100,100)'
with a line segment.
3.2 Drawing in interactive mode
===============================
-Another method is _interactive mode_, where `Asymptote' reads
-individual commands as they are entered by the user. To try this out,
-enter `Asymptote''s interactive mode by clicking on the `Asymptote'
-icon or typing the command `asy'. Then type
+Another method is _interactive mode_, where 'Asymptote' reads individual
+commands as they are entered by the user. To try this out, enter
+'Asymptote''s interactive mode by clicking on the 'Asymptote' icon or
+typing the command 'asy'. Then type
draw((0,0)--(100,100));
- followed by `Enter', to obtain the above image. At this point you can
-type further `draw' commands, which will be added to the displayed
-figure, `erase' to clear the canvas,
+followed by 'Enter', to obtain the above image. At this point you can
+type further 'draw' commands, which will be added to the displayed
+figure, 'erase' to clear the canvas,
input test;
- to execute all of the commands contained in the file `test.asy', or
-`quit' to exit interactive mode. You can use the arrow keys in
-interactive mode to edit previous lines. The tab key will
-automatically complete unambiguous words; otherwise, hitting tab again
-will show the possible choices. Further commands specific to
-interactive mode are described in *note Interactive mode::.
+to execute all of the commands contained in the file 'test.asy', or
+'quit' to exit interactive mode. You can use the arrow keys in
+interactive mode to edit previous lines. The tab key will automatically
+complete unambiguous words; otherwise, hitting tab again will show the
+possible choices. Further commands specific to interactive mode are
+described in *note Interactive mode::.
3.3 Figure size
===============
-In `Asymptote', coordinates like `(0,0)' and `(100,100)', called
-_pairs_, are expressed in `PostScript' "big points" (1 `bp' = 1/72
-`inch') and the default line width is `0.5bp'. However, it is often
-inconvenient to work directly in `PostScript' coordinates. The next
+In 'Asymptote', coordinates like '(0,0)' and '(100,100)', called
+_pairs_, are expressed in 'PostScript' "big points" (1 'bp' = 1/72
+'inch') and the default line width is '0.5bp'. However, it is often
+inconvenient to work directly in 'PostScript' coordinates. The next
example produces identical output to the previous example, by scaling
-the line `(0,0)--(1,1)' to fit a rectangle of width `100.5 bp' and
-height `100.5 bp' (the extra `0.5bp' accounts for the line width):
+the line '(0,0)--(1,1)' to fit a rectangle of width '100.5 bp' and
+height '100.5 bp' (the extra '0.5bp' accounts for the line width):
size(100.5,100.5);
draw((0,0)--(1,1));
+ [diagonal]
-
-One can also specify the size in `pt' (1 `pt' = 1/72.27 `inch'), `cm',
-`mm', or `inches'. Two nonzero size arguments (or a single size
+ One can also specify the size in 'pt' (1 'pt' = 1/72.27 'inch'),
+'cm', 'mm', or 'inches'. Two nonzero size arguments (or a single size
argument) restrict the size in both directions, preserving the aspect
-ratio. If 0 is given as a size argument, no restriction is made in
-that direction; the overall scaling will be determined by the other
-direction (*note size::):
-
+ratio. If 0 is given as a size argument, no restriction is made in that
+direction; the overall scaling will be determined by the other direction
+(*note size::):
size(0,100.5);
draw((0,0)--(2,1),Arrow);
+ [bigdiagonal]
-
-To connect several points and create a cyclic path, use the `cycle'
+ To connect several points and create a cyclic path, use the 'cycle'
keyword:
-
size(3cm);
draw((0,0)--(1,0)--(1,1)--(0,1)--cycle);
+ [square]
+For convenience, the path '(0,0)--(1,0)--(1,1)--(0,1)--cycle' may be
+replaced with the predefined variable 'unitsquare', or equivalently,
+'box((0,0),(1,1))'.
-For convenience, the path `(0,0)--(1,0)--(1,1)--(0,1)--cycle' may be
-replaced with the predefined variable `unitsquare', or equivalently,
-`box((0,0),(1,1))'.
-
- To make the user coordinates represent multiples of exactly `1cm':
+ To make the user coordinates represent multiples of exactly '1cm':
unitsize(1cm);
draw(unitsquare);
3.4 Labels
==========
-Adding labels is easy in `Asymptote'; one specifies the label as a
-double-quoted `LaTeX' string, a coordinate, and an optional alignment
+Adding labels is easy in 'Asymptote'; one specifies the label as a
+double-quoted 'LaTeX' string, a coordinate, and an optional alignment
direction:
-
size(3cm);
draw(unitsquare);
label("$A$",(0,0),SW);
@@ -745,61 +724,59 @@ label("$B$",(1,0),SE);
label("$C$",(1,1),NE);
label("$D$",(0,1),NW);
+ [labelsquare]
-
-`Asymptote' uses the standard compass directions `E=(1,0)', `N=(0,1)',
-`NE=unit(N+E)', and `ENE=unit(E+NE)', etc., which along with the
-directions `up', `down', `right', and `left' are defined as pairs in
-the `Asymptote' base module `plain' (a user who has a local variable
-named `E' may access the compass direction `E' by prefixing it with the
-name of the module where it is defined: `plain.E').
+ 'Asymptote' uses the standard compass directions 'E=(1,0)',
+'N=(0,1)', 'NE=unit(N+E)', and 'ENE=unit(E+NE)', etc., which along with
+the directions 'up', 'down', 'right', and 'left' are defined as pairs in
+the 'Asymptote' base module 'plain' (a user who has a local variable
+named 'E' may access the compass direction 'E' by prefixing it with the
+name of the module where it is defined: 'plain.E').
3.5 Paths
=========
-This example draws a path that approximates a quarter circle,
-terminated with an arrowhead:
-
+This example draws a path that approximates a quarter circle, terminated
+with an arrowhead:
size(100,0);
draw((1,0){up}..{left}(0,1),Arrow);
-
-Here the directions `up' and `left' in braces specify the incoming and
-outgoing directions at the points `(1,0)' and `(0,1)', respectively.
+ [quartercircle]
+Here the directions 'up' and 'left' in braces specify the incoming and
+outgoing directions at the points '(1,0)' and '(0,1)', respectively.
In general, a path is specified as a list of points (or other paths)
-interconnected with `--', which denotes a straight line segment, or
-`..', which denotes a cubic spline (*note Bezier curves::). Specifying
-a final `..cycle' creates a cyclic path that connects smoothly back to
-the initial node, as in this approximation (accurate to within 0.06%)
-of a unit circle:
+interconnected with '--', which denotes a straight line segment, or
+'..', which denotes a cubic spline (*note Bezier curves::). Specifying
+a final '..cycle' creates a cyclic path that connects smoothly back to
+the initial node, as in this approximation (accurate to within 0.06%) of
+a unit circle:
path unitcircle=E..N..W..S..cycle;
-An `Asymptote' path, being connected, is equivalent to a `Postscript
-subpath'. The `^^' binary operator, which requests that the pen be
+An 'Asymptote' path, being connected, is equivalent to a 'Postscript
+subpath'. The '^^' binary operator, which requests that the pen be
moved (without drawing or affecting endpoint curvatures) from the final
-point of the left-hand path to the initial point of the right-hand
-path, may be used to group several `Asymptote' paths into a `path[]'
-array (equivalent to a `PostScript' path):
-
+point of the left-hand path to the initial point of the right-hand path,
+may be used to group several 'Asymptote' paths into a 'path[]' array
+(equivalent to a 'PostScript' path):
size(0,100);
path unitcircle=E..N..W..S..cycle;
path g=scale(2)*unitcircle;
filldraw(unitcircle^^g,evenodd+yellow,black);
+ [superpath]
-The `PostScript' even-odd fill rule here specifies that only the region
+The 'PostScript' even-odd fill rule here specifies that only the region
bounded between the two unit circles is filled (*note fillrule::). In
this example, the same effect can be achieved by using the default zero
-winding number fill rule, if one is careful to alternate the
-orientation of the paths:
+winding number fill rule, if one is careful to alternate the orientation
+of the paths:
filldraw(unitcircle^^reverse(g),yellow,black);
- The `^^' operator is used by the `box(triple, triple)' function in
-the module `three.asy' to construct the edges of a cube `unitbox'
+ The '^^' operator is used by the 'box(triple, triple)' function in
+the module 'three.asy' to construct the edges of a cube 'unitbox'
without retracing steps (*note three::):
-
import three;
currentprojection=orthographic(5,4,2,center=true);
@@ -816,18 +793,18 @@ label("(1,0,0)",(1,0,0),S);
label("(0,1,0)",(0,1,0),E);
label("(0,0,1)",(0,0,1),Z);
+ [cube]
+ See section *note graph:: (or the online 'Asymptote' gallery and
+external links posted at <http://asymptote.sourceforge.net>) for further
+examples, including two-dimensional and interactive three-dimensional
+scientific graphs. Additional examples have been posted by Philippe
+Ivaldi at <http://www.piprime.fr/asymptote>. Excellent user-written
+'Asymptote' tutorials are also available:
-See section *note graph:: (or the online `Asymptote' gallery and
-external links posted at `http://asymptote.sourceforge.net') for
-further examples, including two-dimensional and interactive
-three-dimensional scientific graphs. Additional examples have been
-posted by Philippe Ivaldi at `http://www.piprime.fr/asymptote'.
-Excellent user-written `Asymptote' tutorials are also available:
-
- `http://www.artofproblemsolving.com/Wiki/index.php/Asymptote:_Basics'
+ <http://www.artofproblemsolving.com/Wiki/index.php/Asymptote:_Basics>
-`http://math.uchicago.edu/~cstaats/Charles_Staats_III/Notes_and_papers_files/asymptote_tutorial.pdf'
+ <http://math.uchicago.edu/~cstaats/Charles_Staats_III/Notes_and_papers_files/asymptote_tutorial.pdf>

File: asymptote.info, Node: Drawing commands, Next: Bezier curves, Prev: Tutorial, Up: Top
@@ -835,30 +812,30 @@ File: asymptote.info, Node: Drawing commands, Next: Bezier curves, Prev: Tuto
4 Drawing commands
******************
-All of `Asymptote''s graphical capabilities are based on four primitive
-commands. The three `PostScript' drawing commands `draw', `fill', and
-`clip' add objects to a picture in the order in which they are
-executed, with the most recently drawn object appearing on top. The
-labeling command `label' can be used to add text labels and external
-EPS images, which will appear on top of the `PostScript' objects (since
-this is normally what one wants), but again in the relative order in
-which they were executed. After drawing objects on a picture, the
-picture can be output with the `shipout' function (*note shipout::).
-
- If you wish to draw `PostScript' objects on top of labels (or
-verbatim `tex' commands; *note tex::), the `layer' command may be used
-to start a new `PostScript/LaTeX' layer:
+All of 'Asymptote''s graphical capabilities are based on four primitive
+commands. The three 'PostScript' drawing commands 'draw', 'fill', and
+'clip' add objects to a picture in the order in which they are executed,
+with the most recently drawn object appearing on top. The labeling
+command 'label' can be used to add text labels and external EPS images,
+which will appear on top of the 'PostScript' objects (since this is
+normally what one wants), but again in the relative order in which they
+were executed. After drawing objects on a picture, the picture can be
+output with the 'shipout' function (*note shipout::).
+
+ If you wish to draw 'PostScript' objects on top of labels (or
+verbatim 'tex' commands; *note tex::), the 'layer' command may be used
+to start a new 'PostScript/LaTeX' layer:
void layer(picture pic=currentpicture);
- The `layer' function gives one full control over the order in which
-objects are drawn. Layers are drawn sequentially, with the most recent
-layer appearing on top. Within each layer, labels, images, and verbatim
-`tex' commands are always drawn after the `PostScript' objects in that
+ The 'layer' function gives one full control over the order in which
+objects are drawn. Layers are drawn sequentially, with the most recent
+layer appearing on top. Within each layer, labels, images, and verbatim
+'tex' commands are always drawn after the 'PostScript' objects in that
layer.
- While some of these drawing commands take many options, they all
-have sensible default values (for example, the picture argument
-defaults to currentpicture).
+ While some of these drawing commands take many options, they all have
+sensible default values (for example, the picture argument defaults to
+currentpicture).
* Menu:
@@ -878,82 +855,81 @@ void draw(picture pic=currentpicture, Label L="", path g,
arrowbar arrow=None, arrowbar bar=None, margin margin=NoMargin,
Label legend="", marker marker=nomarker);
-Draw the path `g' on the picture `pic' using pen `p' for drawing, with
-optional drawing attributes (Label `L', explicit label alignment
-`align', arrows and bars `arrow' and `bar', margins `margin', legend,
-and markers `marker'). Only one parameter, the path, is required. For
-convenience, the arguments `arrow' and `bar' may be specified in either
-order. The argument `legend' is a Label to use in constructing an
+ Draw the path 'g' on the picture 'pic' using pen 'p' for drawing,
+with optional drawing attributes (Label 'L', explicit label alignment
+'align', arrows and bars 'arrow' and 'bar', margins 'margin', legend,
+and markers 'marker'). Only one parameter, the path, is required. For
+convenience, the arguments 'arrow' and 'bar' may be specified in either
+order. The argument 'legend' is a Label to use in constructing an
optional legend entry.
- Bars are useful for indicating dimensions. The possible values of
-`bar' are `None', `BeginBar', `EndBar' (or equivalently `Bar'), and
-`Bars' (which draws a bar at both ends of the path). Each of these bar
-specifiers (except for `None') will accept an optional real argument
-that denotes the length of the bar in `PostScript' coordinates. The
-default bar length is `barsize(pen)'.
-
- The possible values of `arrow' are `None', `Blank' (which draws no
-arrows or path), `BeginArrow', `MidArrow', `EndArrow' (or equivalently
-`Arrow'), and `Arrows' (which draws an arrow at both ends of the path).
-All of the arrow specifiers except for `None' and `Blank' may be given
-the optional arguments arrowhead `arrowhead' (one of the predefined
-arrowhead styles `DefaultHead', `SimpleHead', `HookHead', `TeXHead'),
-real `size' (arrowhead size in `PostScript' coordinates), real `angle'
-(arrowhead angle in degrees), filltype `filltype' (one of `FillDraw',
-`Fill', `NoFill', `UnFill', `Draw') and (except for `MidArrow' and
-`Arrows') a real `position' (in the sense of `point(path p, real t)')
-along the path where the tip of the arrow should be placed. The default
-arrowhead size when drawn with a pen `p' is `arrowsize(p)'. There are
-also arrow versions with slightly modified default values of `size' and
-`angle' suitable for curved arrows: `BeginArcArrow', `EndArcArrow' (or
-equivalently `ArcArrow'), `MidArcArrow', and `ArcArrows'.
+ Bars are useful for indicating dimensions. The possible values of
+'bar' are 'None', 'BeginBar', 'EndBar' (or equivalently 'Bar'), and
+'Bars' (which draws a bar at both ends of the path). Each of these bar
+specifiers (except for 'None') will accept an optional real argument
+that denotes the length of the bar in 'PostScript' coordinates. The
+default bar length is 'barsize(pen)'.
+
+ The possible values of 'arrow' are 'None', 'Blank' (which draws no
+arrows or path), 'BeginArrow', 'MidArrow', 'EndArrow' (or equivalently
+'Arrow'), and 'Arrows' (which draws an arrow at both ends of the path).
+All of the arrow specifiers except for 'None' and 'Blank' may be given
+the optional arguments arrowhead 'arrowhead' (one of the predefined
+arrowhead styles 'DefaultHead', 'SimpleHead', 'HookHead', 'TeXHead'),
+real 'size' (arrowhead size in 'PostScript' coordinates), real 'angle'
+(arrowhead angle in degrees), filltype 'filltype' (one of 'FillDraw',
+'Fill', 'NoFill', 'UnFill', 'Draw') and (except for 'MidArrow' and
+'Arrows') a real 'position' (in the sense of 'point(path p, real t)')
+along the path where the tip of the arrow should be placed. The default
+arrowhead size when drawn with a pen 'p' is 'arrowsize(p)'. There are
+also arrow versions with slightly modified default values of 'size' and
+'angle' suitable for curved arrows: 'BeginArcArrow', 'EndArcArrow' (or
+equivalently 'ArcArrow'), 'MidArcArrow', and 'ArcArrows'.
Margins can be used to shrink the visible portion of a path by
-`labelmargin(p)' to avoid overlap with other drawn objects. Typical
-values of `margin' are `NoMargin', `BeginMargin', `EndMargin' (or
-equivalently `Margin'), and `Margins' (which leaves a margin at both
-ends of the path). One may use `Margin(real begin, real end)' to
+'labelmargin(p)' to avoid overlap with other drawn objects. Typical
+values of 'margin' are 'NoMargin', 'BeginMargin', 'EndMargin' (or
+equivalently 'Margin'), and 'Margins' (which leaves a margin at both
+ends of the path). One may use 'Margin(real begin, real end)' to
specify the size of the beginning and ending margin, respectively, in
-multiples of the units `labelmargin(p)' used for aligning labels.
-Alternatively, `BeginPenMargin', `EndPenMargin' (or equivalently
-`PenMargin'), `PenMargins', `PenMargin(real begin, real end)' specify a
+multiples of the units 'labelmargin(p)' used for aligning labels.
+Alternatively, 'BeginPenMargin', 'EndPenMargin' (or equivalently
+'PenMargin'), 'PenMargins', 'PenMargin(real begin, real end)' specify a
margin in units of the pen line width, taking account of the pen line
-width when drawing the path or arrow. For example, use `DotMargin', an
-abbreviation for `PenMargin(-0.5*dotfactor,0.5*dotfactor)', to draw
-from the usual beginning point just up to the boundary of an end dot of
-width `dotfactor*linewidth(p)'. The qualifiers `BeginDotMargin',
-`EndDotMargin', and `DotMargins' work similarly. The qualifier
-`TrueMargin(real begin, real end)' allows one to specify a margin
-directly in `PostScript' units, independent of the pen line width.
+width when drawing the path or arrow. For example, use 'DotMargin', an
+abbreviation for 'PenMargin(-0.5*dotfactor,0.5*dotfactor)', to draw from
+the usual beginning point just up to the boundary of an end dot of width
+'dotfactor*linewidth(p)'. The qualifiers 'BeginDotMargin',
+'EndDotMargin', and 'DotMargins' work similarly. The qualifier
+'TrueMargin(real begin, real end)' allows one to specify a margin
+directly in 'PostScript' units, independent of the pen line width.
The use of arrows, bars, and margins is illustrated by the examples
-`Pythagoras.asy', `sqrtx01.asy', and `triads.asy'.
+'Pythagoras.asy', 'sqrtx01.asy', and 'triads.asy'.
- The legend for a picture `pic' can be fit and aligned to a frame
-with the routine:
+ The legend for a picture 'pic' can be fit and aligned to a frame with
+the routine:
frame legend(picture pic=currentpicture, int perline=1,
real xmargin=legendmargin, real ymargin=xmargin,
real linelength=legendlinelength,
real hskip=legendhskip, real vskip=legendvskip,
real maxwidth=0, real maxheight=0,
bool hstretch=false, bool vstretch=false, pen p=currentpen);
- Here `xmargin' and `ymargin' specify the surrounding x and y margins,
-`perline' specifies the number of entries per line (default 1; 0 means
-choose this number automatically), `linelength' specifies the length of
-the path lines, `hskip' and `vskip' specify the line skip (as a
-multiple of the legend entry size), `maxwidth' and `maxheight' specify
-optional upper limits on the width and height of the resulting legend
-(0 means unlimited), `hstretch' and `vstretch' allow the legend to
-stretch horizontally or vertically, and `p' specifies the pen used to
-draw the bounding box. The legend frame can then be added and aligned
-about a point on a picture `dest' using `add' or `attach' (*note add
-about::).
+Here 'xmargin' and 'ymargin' specify the surrounding x and y margins,
+'perline' specifies the number of entries per line (default 1; 0 means
+choose this number automatically), 'linelength' specifies the length of
+the path lines, 'hskip' and 'vskip' specify the line skip (as a multiple
+of the legend entry size), 'maxwidth' and 'maxheight' specify optional
+upper limits on the width and height of the resulting legend (0 means
+unlimited), 'hstretch' and 'vstretch' allow the legend to stretch
+horizontally or vertically, and 'p' specifies the pen used to draw the
+bounding box. The legend frame can then be added and aligned about a
+point on a picture 'dest' using 'add' or 'attach' (*note add about::).
To draw a dot, simply draw a path containing a single point. The
-`dot' command defined in the module `plain' draws a dot having a
+'dot' command defined in the module 'plain' draws a dot having a
diameter equal to an explicit pen line width or the default line width
-magnified by `dotfactor' (6 by default), using the specified filltype
+magnified by 'dotfactor' (6 by default), using the specified filltype
(*note filltype::):
void dot(picture pic=currentpicture, pair z, pen p=currentpen,
filltype filltype=Fill);
@@ -965,19 +941,19 @@ void dot(picture pic=currentpicture, Label[] L=new Label[], pair[] z,
void dot(picture pic=currentpicture, Label L, pen p=currentpen,
filltype filltype=Fill);
- If the variable `Label' is given as the `Label' argument to the
-second routine, the `format' argument will be used to format a string
-based on the dot location (here `defaultformat' is `"$%.4g$"'). The
-third routine draws a dot at every point of a pair array `z'. One can
+ If the variable 'Label' is given as the 'Label' argument to the
+second routine, the 'format' argument will be used to format a string
+based on the dot location (here 'defaultformat' is '"$%.4g$"'). The
+third routine draws a dot at every point of a pair array 'z'. One can
also draw a dot at every node of a path:
void dot(picture pic=currentpicture, Label[] L=new Label[],
path g, align align=RightSide, string format=defaultformat,
pen p=currentpen, filltype filltype=Fill);
- See *note pathmarkers:: and *note markers:: for more general methods
+ See *note pathmarkers:: and *note markers:: for more general methods
for marking path nodes.
- To draw a fixed-sized object (in `PostScript' coordinates) about the
-user coordinate `origin', use the routine
+ To draw a fixed-sized object (in 'PostScript' coordinates) about the
+user coordinate 'origin', use the routine
void draw(pair origin, picture pic=currentpicture, Label L="", path g,
align align=NoAlign, pen p=currentpen, arrowbar arrow=None,
arrowbar bar=None, margin margin=NoMargin, Label legend="",
@@ -991,18 +967,18 @@ File: asymptote.info, Node: fill, Next: clip, Prev: draw, Up: Drawing comman
void fill(picture pic=currentpicture, path g, pen p=currentpen);
-Fill the interior region bounded by the cyclic path `g' on the picture
-`pic', using the pen `p'.
+ Fill the interior region bounded by the cyclic path 'g' on the
+picture 'pic', using the pen 'p'.
- There is also a convenient `filldraw' command, which fills the path
-and then draws in the boundary. One can specify separate pens for each
+ There is also a convenient 'filldraw' command, which fills the path
+and then draws in the boundary. One can specify separate pens for each
operation:
void filldraw(picture pic=currentpicture, path g, pen fillpen=currentpen,
pen drawpen=currentpen);
- This fixed-size version of `fill' allows one to fill an object
-described in `PostScript' coordinates about the user coordinate
-`origin':
+ This fixed-size version of 'fill' allows one to fill an object
+described in 'PostScript' coordinates about the user coordinate
+'origin':
void fill(pair origin, picture pic=currentpicture, path g, pen p=currentpen);
This is just a convenient abbreviation for the commands:
@@ -1010,90 +986,89 @@ picture opic;
fill(opic,g,p);
add(pic,opic,origin);
- The routine
+ The routine
void filloutside(picture pic=currentpicture, path g, pen p=currentpen);
- fills the region exterior to the path `g', out to the current boundary
-of picture `pic'.
+fills the region exterior to the path 'g', out to the current boundary
+of picture 'pic'.
Lattice gradient shading varying smoothly over a two-dimensional
-array of pens `p', using fill rule `fillrule', can be produced with
+array of pens 'p', using fill rule 'fillrule', can be produced with
void latticeshade(picture pic=currentpicture, path g, bool stroke=false,
pen fillrule=currentpen, pen[][] p)
- If `stroke=true', the region filled is the same as the region that
-would be drawn by `draw(pic,g,fillrule+zerowinding)'; in this case the
-path `g' need not be cyclic. The pens in `p' must belong to the same
-color space. One can use the functions `rgb(pen)' or `cmyk(pen)' to
+ If 'stroke=true', the region filled is the same as the region that
+would be drawn by 'draw(pic,g,fillrule+zerowinding)'; in this case the
+path 'g' need not be cyclic. The pens in 'p' must belong to the same
+color space. One can use the functions 'rgb(pen)' or 'cmyk(pen)' to
promote pens to a higher color space, as illustrated in the example file
-`latticeshading.asy'.
+'latticeshading.asy'.
- Axial gradient shading varying smoothly from `pena' to `penb' in the
-direction of the line segment `a--b' can be achieved with
+ Axial gradient shading varying smoothly from 'pena' to 'penb' in the
+direction of the line segment 'a--b' can be achieved with
void axialshade(picture pic=currentpicture, path g, bool stroke=false,
pen pena, pair a, bool extenda=true,
pen penb, pair b, bool extendb=true);
- The boolean parameters `extenda' and `extendb' indicate whether the
-shading should extend beyond the axis endpoints `a' and `b'.
+The boolean parameters 'extenda' and 'extendb' indicate whether the
+shading should extend beyond the axis endpoints 'a' and 'b'.
- Radial gradient shading varying smoothly from `pena' on the circle
-with center `a' and radius `ra' to `penb' on the circle with center `b'
-and radius `rb' is similar:
+ Radial gradient shading varying smoothly from 'pena' on the circle
+with center 'a' and radius 'ra' to 'penb' on the circle with center 'b'
+and radius 'rb' is similar:
void radialshade(picture pic=currentpicture, path g, bool stroke=false,
pen pena, pair a, real ra, bool extenda=true,
pen penb, pair b, real rb, bool extendb=true);
- The boolean parameters `extenda' and `extendb' indicate whether the
-shading should extend beyond the radii `a' and `b'. Illustrations of
-radial shading are provided in the example files `shade.asy',
-`ring.asy', and `shadestroke.asy'.
-
- Gouraud shading using fill rule `fillrule' and the vertex colors in
-the pen array `p' on a triangular lattice defined by the vertices `z'
-and edge flags `edges' is implemented with
+The boolean parameters 'extenda' and 'extendb' indicate whether the
+shading should extend beyond the radii 'a' and 'b'. Illustrations of
+radial shading are provided in the example files 'shade.asy',
+'ring.asy', and 'shadestroke.asy'.
+
+ Gouraud shading using fill rule 'fillrule' and the vertex colors in
+the pen array 'p' on a triangular lattice defined by the vertices 'z'
+and edge flags 'edges' is implemented with
void gouraudshade(picture pic=currentpicture, path g, bool stroke=false,
pen fillrule=currentpen, pen[] p, pair[] z,
int[] edges);
void gouraudshade(picture pic=currentpicture, path g, bool stroke=false,
pen fillrule=currentpen, pen[] p, int[] edges);
- In the second form, the elements of `z' are taken to be successive
-nodes of path `g'. The pens in `p' must belong to the same color space.
+In the second form, the elements of 'z' are taken to be successive nodes
+of path 'g'. The pens in 'p' must belong to the same color space.
Illustrations of Gouraud shading are provided in the example file
-`Gouraud.asy' and in the solid geometry module `solids.asy'. The edge
+'Gouraud.asy' and in the solid geometry module 'solids.asy'. The edge
flags used in Gouraud shading are documented here:
+ <http://partners.adobe.com/public/developer/en/ps/sdk/TN5600.SmoothShading.pdf>.
- `http://partners.adobe.com/public/developer/en/ps/sdk/TN5600.SmoothShading.pdf'.
-
- Tensor product shading using fill rule `fillrule' on patches bounded
-by the n cyclic paths of length 4 in path array `b', using the vertex
-colors specified in the n \times 4 pen array `p' and internal control
-points in the n \times 4 array `z', is implemented with
+ Tensor product shading using fill rule 'fillrule' on patches bounded
+by the n cyclic paths of length 4 in path array 'b', using the vertex
+colors specified in the n \times 4 pen array 'p' and internal control
+points in the n \times 4 array 'z', is implemented with
void tensorshade(picture pic=currentpicture, path[] g, bool stroke=false,
pen fillrule=currentpen, pen[][] p, path[] b=g,
pair[][] z=new pair[][]);
- If the array `z' is empty, Coons shading, in which the color control
-points are calculated automatically, is used. The pens in `p' must
+If the array 'z' is empty, Coons shading, in which the color control
+points are calculated automatically, is used. The pens in 'p' must
belong to the same color space. A simpler interface for the case of a
single patch (n=1) is also available:
void tensorshade(picture pic=currentpicture, path g, bool stroke=false,
pen fillrule=currentpen, pen[] p, path b=g,
pair[] z=new pair[]);
- One can also smoothly shade the regions between consecutive paths of a
-sequence using a given array of pens:
+ One can also smoothly shade the regions between consecutive paths of
+a sequence using a given array of pens:
void draw(picture pic=currentpicture, pen fillrule=currentpen, path[] g,
pen[] p);
- Illustrations of tensor product and Coons shading are provided in the
-example files `tensor.asy', `Coons.asy', `BezierSurface.asy', and
-`rainbow.asy'.
+Illustrations of tensor product and Coons shading are provided in the
+example files 'tensor.asy', 'Coons.asy', 'BezierSurface.asy', and
+'rainbow.asy'.
More general shading possibilities are available using TeX engines
that produce PDF output (*note texengines::): the routine
void functionshade(picture pic=currentpicture, path[] g, bool stroke=false,
pen fillrule=currentpen, string shader);
- shades on picture `pic' the interior of path `g' according to fill
-rule `fillrule' using the `PostScript' calculator routine specified by
-the string `shader'; this routine takes 2 arguments, each in [0,1], and
-returns `colors(fillrule).length' color components. Function shading
-is illustrated in the example `functionshading.asy'.
+shades on picture 'pic' the interior of path 'g' according to fill rule
+'fillrule' using the 'PostScript' calculator routine specified by the
+string 'shader'; this routine takes 2 arguments, each in [0,1], and
+returns 'colors(fillrule).length' color components. Function shading is
+illustrated in the example 'functionshading.asy'.
- The following routine uses `evenodd' clipping together with the `^^'
+ The following routine uses 'evenodd' clipping together with the '^^'
operator to unfill a region:
void unfill(picture pic=currentpicture, path g);
@@ -1107,11 +1082,11 @@ File: asymptote.info, Node: clip, Next: label, Prev: fill, Up: Drawing comma
void clip(picture pic=currentpicture, path g, stroke=false,
pen fillrule=currentpen);
-Clip the current contents of picture `pic' to the region bounded by the
-path `g', using fill rule `fillrule' (*note fillrule::). If
-`stroke=true', the clipped portion is the same as the region that would
-be drawn with `draw(pic,g,fillrule+zerowinding)'; in this case the path
-`g' need not be cyclic. For an illustration of picture clipping, see
+ Clip the current contents of picture 'pic' to the region bounded by
+the path 'g', using fill rule 'fillrule' (*note fillrule::). If
+'stroke=true', the clipped portion is the same as the region that would
+be drawn with 'draw(pic,g,fillrule+zerowinding)'; in this case the path
+'g' need not be cyclic. For an illustration of picture clipping, see
the first example in *note LaTeX usage::.

@@ -1123,12 +1098,12 @@ File: asymptote.info, Node: label, Prev: clip, Up: Drawing commands
void label(picture pic=currentpicture, Label L, pair position,
align align=NoAlign, pen p=currentpen, filltype filltype=NoFill)
-Draw Label `L' on picture `pic' using pen `p'. If `align' is `NoAlign',
-the label will be centered at user coordinate `position'; otherwise it
-will be aligned in the direction of `align' and displaced from
-`position' by the `PostScript' offset `align*labelmargin(p)'. The
-constant `Align' can be used to align the bottom-left corner of the
-label at `position'. The Label `L' can either be a string or the
+ Draw Label 'L' on picture 'pic' using pen 'p'. If 'align' is
+'NoAlign', the label will be centered at user coordinate 'position';
+otherwise it will be aligned in the direction of 'align' and displaced
+from 'position' by the 'PostScript' offset 'align*labelmargin(p)'. The
+constant 'Align' can be used to align the bottom-left corner of the
+label at 'position'. The Label 'L' can either be a string or the
structure obtained by calling one of the functions
Label Label(string s="", pair position, align align=NoAlign,
pen p=nullpen, embed embed=Rotate, filltype filltype=NoFill);
@@ -1138,86 +1113,85 @@ Label Label(Label L, pair position, align align=NoAlign,
pen p=nullpen, embed embed=L.embed, filltype filltype=NoFill);
Label Label(Label L, align align=NoAlign,
pen p=nullpen, embed embed=L.embed, filltype filltype=NoFill);
- The text of a Label can be scaled, slanted, rotated, or shifted by
+ The text of a Label can be scaled, slanted, rotated, or shifted by
multiplying it on the left by an affine transform (*note Transforms::).
-For example, `rotate(45)*xscale(2)*L' first scales `L' in the x
-direction and then rotates it counterclockwise by 45 degrees. The final
-position of a Label can also be shifted by a `PostScript' coordinate
-translation: `shift(10,0)*L'. An explicit pen specified within the
-Label overrides other pen arguments. The `embed' argument determines
+For example, 'rotate(45)*xscale(2)*L' first scales 'L' in the x
+direction and then rotates it counterclockwise by 45 degrees. The final
+position of a Label can also be shifted by a 'PostScript' coordinate
+translation: 'shift(10,0)*L'. An explicit pen specified within the
+Label overrides other pen arguments. The 'embed' argument determines
how the Label should transform with the embedding picture:
-`Shift'
+'Shift'
only shift with embedding picture;
-`Rotate'
+'Rotate'
only shift and rotate with embedding picture (default);
-`Rotate(pair z)'
- rotate with (picture-transformed) vector `z'.
+'Rotate(pair z)'
+ rotate with (picture-transformed) vector 'z'.
-`Slant'
+'Slant'
only shift, rotate, slant, and reflect with embedding picture;
-`Scale'
+'Scale'
shift, rotate, slant, reflect, and scale with embedding picture.
-
To add a label to a path, use
void label(picture pic=currentpicture, Label L, path g, align align=NoAlign,
pen p=currentpen, filltype filltype=NoFill);
- By default the label will be positioned at the midpoint of the path.
-An alternative label position (in the sense of `point(path p, real t)')
-may be specified as a real value for `position' in constructing the
-Label. The position `Relative(real)' specifies a location relative to
-the total arclength of the path. These convenient abbreviations are
-predefined:
+ By default the label will be positioned at the midpoint of the path.
+An alternative label position (in the sense of 'point(path p, real t)')
+may be specified as a real value for 'position' in constructing the
+Label. The position 'Relative(real)' specifies a location relative to
+the total arclength of the path. These convenient abbreviations are
+predefined:
position BeginPoint=Relative(0);
position MidPoint=Relative(0.5);
position EndPoint=Relative(1);
- Path labels are aligned in the direction `align', which may be
+ Path labels are aligned in the direction 'align', which may be
specified as an absolute compass direction (pair) or a direction
-`Relative(pair)' measured relative to a north axis in the local
-direction of the path. For convenience `LeftSide', `Center', and
-`RightSide' are defined as `Relative(W)', `Relative((0,0))', and
-`Relative(E)', respectively. Multiplying `LeftSide', `Center',
-`RightSide' on the left by a real scaling factor will move the label
-further away from or closer to the path.
-
- A label with a fixed-size arrow of length `arrowlength' pointing to
-`b' from direction `dir' can be produced with the routine
+'Relative(pair)' measured relative to a north axis in the local
+direction of the path. For convenience 'LeftSide', 'Center', and
+'RightSide' are defined as 'Relative(W)', 'Relative((0,0))', and
+'Relative(E)', respectively. Multiplying 'LeftSide' and 'RightSide' on
+the left by a real scaling factor will move the label further away from
+or closer to the path.
+
+ A label with a fixed-size arrow of length 'arrowlength' pointing to
+'b' from direction 'dir' can be produced with the routine
void arrow(picture pic=currentpicture, Label L="", pair b, pair dir,
real length=arrowlength, align align=NoAlign,
pen p=currentpen, arrowbar arrow=Arrow, margin margin=EndMargin);
- If no alignment is specified (either in the Label or as an explicit
-argument), the optional Label will be aligned in the direction `dir',
-using margin `margin'.
-
- The function `string graphic(string name, string options="")'
-returns a string that can be used to include an encapsulated
-`PostScript' (EPS) file. Here, `name' is the name of the file to
-include and `options' is a string containing a comma-separated list of
-optional bounding box (`bb=llx lly urx ury'), width (`width=value'),
-height (`height=value'), rotation (`angle=value'), scaling
-(`scale=factor'), clipping (`clip=bool'), and draft mode (`draft=bool')
-parameters. The `layer()' function can be used to force future objects
-to be drawn on top of the included image:
+ If no alignment is specified (either in the Label or as an explicit
+argument), the optional Label will be aligned in the direction 'dir',
+using margin 'margin'.
+
+ The function 'string graphic(string name, string options="")' returns
+a string that can be used to include an encapsulated 'PostScript' (EPS)
+file. Here, 'name' is the name of the file to include and 'options' is
+a string containing a comma-separated list of optional bounding box
+('bb=llx lly urx ury'), width ('width=value'), height ('height=value'),
+rotation ('angle=value'), scaling ('scale=factor'), clipping
+('clip=bool'), and draft mode ('draft=bool') parameters. The 'layer()'
+function can be used to force future objects to be drawn on top of the
+included image:
label(graphic("file.eps","width=1cm"),(0,0),NE);
layer();
- The `string baseline(string s, string template="\strut")' function
+ The 'string baseline(string s, string template="\strut")' function
can be used to enlarge the bounding box of labels to match a given
template, so that their baselines will be typeset on a horizontal line.
-See `Pythagoras.asy' for an example.
+See 'Pythagoras.asy' for an example.
One can prevent labels from overwriting one another with the
-`overwrite' pen attribute (*note overwrite::).
+'overwrite' pen attribute (*note overwrite::).
- The structure `object' defined in `plain_Label.asy' allows Labels
-and frames to be treated in a uniform manner. A group of objects may
-be packed together into single frame with the routine
+ The structure 'object' defined in 'plain_Label.asy' allows Labels and
+frames to be treated in a uniform manner. A group of objects may be
+packed together into single frame with the routine
frame pack(pair align=2S ... object inset[]);
- To draw or fill a box (or ellipse or other path) around a Label and
+To draw or fill a box (or ellipse or other path) around a Label and
return the bounding object, use one of the routines
object draw(picture pic=currentpicture, Label L, envelope e,
real xmargin=0, real ymargin=xmargin, pen p=currentpen,
@@ -1225,18 +1199,17 @@ object draw(picture pic=currentpicture, Label L, envelope e,
object draw(picture pic=currentpicture, Label L, envelope e, pair position,
real xmargin=0, real ymargin=xmargin, pen p=currentpen,
filltype filltype=NoFill, bool above=true);
- Here `envelope' is a boundary-drawing routine such as `box',
-`roundbox', or `ellipse' defined in `plain_boxes.asy' (*note
-envelope::).
-
- The function `path[] texpath(Label L)' returns the path array that
-TeX would fill to draw the Label `L'.
+Here 'envelope' is a boundary-drawing routine such as 'box', 'roundbox',
+or 'ellipse' defined in 'plain_boxes.asy' (*note envelope::).
- The `string minipage(string s, width=100pt)' function can be used to
-format string `s' into a paragraph of width `width'. This example uses
-`minipage', `clip', and `graphic' to produce a CD label:
+ The function 'path[] texpath(Label L)' returns the path array that
+TeX would fill to draw the Label 'L'.
+ The 'string minipage(string s, width=100pt)' function can be used to
+format string 's' into a paragraph of width 'width'. This example uses
+'minipage', 'clip', and 'graphic' to produce a CD label:
+ [CDlabel]
size(11.7cm,11.7cm);
asy(nativeformat(),"logo");
fill(unitcircle^^(scale(2/11.7)*unitcircle),
@@ -1259,36 +1232,37 @@ File: asymptote.info, Node: Bezier curves, Next: Programming, Prev: Drawing c
***************
Each interior node of a cubic spline may be given a direction prefix or
-suffix `{dir}': the direction of the pair `dir' specifies the direction
+suffix '{dir}': the direction of the pair 'dir' specifies the direction
of the incoming or outgoing tangent, respectively, to the curve at that
-node. Exterior nodes may be given direction specifiers only on their
+node. Exterior nodes may be given direction specifiers only on their
interior side.
A cubic spline between the node z_0, with postcontrol point c_0, and
the node z_1, with precontrol point c_1, is computed as the Bezier curve
+ [(1-t)^3*z_0+3t(1-t)^2*c_0+3t^2(1-t)*c_1+t^3*z_1 for 0 <=t <= 1.]
-
-As illustrated in the diagram below, the third-order midpoint (m_5)
+ As illustrated in the diagram below, the third-order midpoint (m_5)
constructed from two endpoints z_0 and z_1 and two control points c_0
and c_1, is the point corresponding to t=1/2 on the Bezier curve formed
-by the quadruple (z_0, c_0, c_1, z_1). This allows one to recursively
+by the quadruple (z_0, c_0, c_1, z_1). This allows one to recursively
construct the desired curve, by using the newly extracted third-order
midpoint as an endpoint and the respective second- and first-order
midpoints as control points:
+ [bezier2]
-
-Here m_0, m_1 and m_2 are the first-order midpoints, m_3 and m_4 are
+ Here m_0, m_1 and m_2 are the first-order midpoints, m_3 and m_4 are
the second-order midpoints, and m_5 is the third-order midpoint. The
-curve is then constructed by recursively applying the algorithm to
-(z_0, m_0, m_3, m_5) and (m_5, m_4, m_2, z_1).
+curve is then constructed by recursively applying the algorithm to (z_0,
+m_0, m_3, m_5) and (m_5, m_4, m_2, z_1).
In fact, an analogous property holds for points located at any
fraction t in [0,1] of each segment, not just for midpoints (t=1/2).
The Bezier curve constructed in this manner has the following
properties:
+
* It is entirely contained in the convex hull of the given four
points.
@@ -1296,50 +1270,47 @@ properties:
point and finishes heading from the second control point to the
second endpoint.
-
The user can specify explicit control points between two nodes like
this:
draw((0,0)..controls (0,100) and (100,100)..(100,0));
- However, it is usually more convenient to just use the `..'
-operator, which tells `Asymptote' to choose its own control points
-using the algorithms described in Donald Knuth's monograph, The
-MetaFontbook, Chapter 14. The user can still customize the guide (or
-path) by specifying direction, tension, and curl values.
+ However, it is usually more convenient to just use the '..' operator,
+which tells 'Asymptote' to choose its own control points using the
+algorithms described in Donald Knuth's monograph, The MetaFontbook,
+Chapter 14. The user can still customize the guide (or path) by
+specifying direction, tension, and curl values.
The higher the tension, the straighter the curve is, and the more it
approximates a straight line. One can change the spline tension from
its default value of 1 to any real value greater than or equal to 0.75
-(cf. John D. Hobby, Discrete and Computational Geometry 1, 1986):
+(cf. John D. Hobby, Discrete and Computational Geometry 1, 1986):
draw((100,0)..tension 2 ..(100,100)..(0,100));
draw((100,0)..tension 3 and 2 ..(100,100)..(0,100));
draw((100,0)..tension atleast 2 ..(100,100)..(0,100));
- In these examples there is a space between `2' and `..'. This is
-needed as `2.' is interpreted as a numerical constant.
+ In these examples there is a space between '2' and '..'. This is
+needed as '2.' is interpreted as a numerical constant.
The curl parameter specifies the curvature at the endpoints of a path
(0 means straight; the default value of 1 means approximately circular):
draw((100,0){curl 0}..(100,100)..{curl 0}(0,100));
- The `MetaPost ...' path connector, which requests, when possible, an
+ The 'MetaPost ...' path connector, which requests, when possible, an
inflection-free curve confined to a triangle defined by the endpoints
-and directions, is implemented in `Asymptote' as the convenient
-abbreviation `::' for `..tension atleast 1 ..' (the ellipsis `...' is
-used in `Asymptote' to indicate a variable number of arguments; *note
+and directions, is implemented in 'Asymptote' as the convenient
+abbreviation '::' for '..tension atleast 1 ..' (the ellipsis '...' is
+used in 'Asymptote' to indicate a variable number of arguments; *note
Rest arguments::). For example, compare
-
draw((0,0){up}..(100,25){right}..(200,0){down});
-
+ [dots]
with
-
draw((0,0){up}::(100,25){right}::(200,0){down});
+ [colons]
-
-The `---' connector is an abbreviation for `..tension atleast
-infinity..' and the `&' connector concatenates two paths, after first
+ The '---' connector is an abbreviation for '..tension atleast
+infinity..' and the '&' connector concatenates two paths, after first
stripping off the last node of the first path (which normally should
coincide with the first node of the second path).
@@ -1349,9 +1320,9 @@ File: asymptote.info, Node: Programming, Next: LaTeX usage, Prev: Bezier curv
6 Programming
*************
-Here is a short introductory example to the `Asymptote' programming
+Here is a short introductory example to the 'Asymptote' programming
language that highlights the similarity of its control structures with
-those of C, C++, and Java:
+those of C, C++, and Java:
// This is a comment.
// Declaration: Declare x to be a real variable;
@@ -1372,8 +1343,9 @@ for(int i=0; i < 10; ++i) {
write(i);
}
- `Asymptote' supports `while', `do', `break', and `continue'
-statements just as in C/C++. It also supports the Java-style shorthand
+
+ 'Asymptote' supports 'while', 'do', 'break', and 'continue'
+statements just as in C/C++. It also supports the Java-style shorthand
for iterating over all elements of an array:
// Iterate over an array
@@ -1381,7 +1353,7 @@ int[] array={1,1,2,3,5};
for(int k : array) {
write(k);
}
- In addition, it supports many features beyond the ones found in those
+In addition, it supports many features beyond the ones found in those
languages.
* Menu:
@@ -1399,7 +1371,7 @@ languages.
* Functions:: Traditional and high-order functions
* Arrays:: Dynamic vectors
* Casts:: Implicit and explicit casts
-* Import:: Importing external `Asymptote' modules
+* Import:: Importing external 'Asymptote' modules
* Static:: Where to allocate your variable?

@@ -1408,48 +1380,50 @@ File: asymptote.info, Node: Data types, Next: Paths and guides, Up: Programmi
6.1 Data types
==============
-`Asymptote' supports the following data types (in addition to
+'Asymptote' supports the following data types (in addition to
user-defined types):
-`void'
+'void'
The void type is used only by functions that take or return no
arguments.
-`bool'
- a boolean type that can only take on the values `true' or `false'.
- For example: bool b=true;
+'bool'
+ a boolean type that can only take on the values 'true' or 'false'.
+ For example:
+ bool b=true;
- defines a boolean variable `b' and initializes it to the value
- `true'. If no initializer is given: bool b;
+ defines a boolean variable 'b' and initializes it to the value
+ 'true'. If no initializer is given:
+ bool b;
- the value `false' is assumed.
+ the value 'false' is assumed.
-`bool3'
- an extended boolean type that can take on the values `true',
- `default', or `false'. A bool3 type can be cast to or from a bool.
- The default initializer for bool3 is `default'.
+'bool3'
+ an extended boolean type that can take on the values 'true',
+ 'default', or 'false'. A bool3 type can be cast to or from a bool.
+ The default initializer for bool3 is 'default'.
-`int'
- an integer type; if no initializer is given, the implicit value `0'
- is assumed. The minimum allowed value of an integer is `intMin'
- and the maximum value is `intMax'.
+'int'
+ an integer type; if no initializer is given, the implicit value '0'
+ is assumed. The minimum allowed value of an integer is 'intMin'
+ and the maximum value is 'intMax'.
-`real'
+'real'
a real number; this should be set to the highest-precision native
- floating-point type on the architecture. The implicit initializer
- for reals is `0.0'. Real numbers have precision `realEpsilon',
- with `realDigits' significant digits. The smallest positive real
- number is `realMin' and the largest positive real number is
- `realMax'. The variable `inf' and function `bool isnan(real x)'
+ floating-point type on the architecture. The implicit initializer
+ for reals is '0.0'. Real numbers have precision 'realEpsilon',
+ with 'realDigits' significant digits. The smallest positive real
+ number is 'realMin' and the largest positive real number is
+ 'realMax'. The variable 'inf' and function 'bool isnan(real x)'
are useful when floating-point exceptions are masked with the
- `-mask' command-line option (the default in interactive mode).
+ '-mask' command-line option (the default in interactive mode).
-`pair'
+'pair'
complex number, that is, an ordered pair of real components
- `(x,y)'. The real and imaginary parts of a pair `z' can read as
- `z.x' and `z.y'. We say that `x' and `y' are virtual members of
+ '(x,y)'. The real and imaginary parts of a pair 'z' can read as
+ 'z.x' and 'z.y'. We say that 'x' and 'y' are virtual members of
the data element pair; they cannot be directly modified, however.
- The implicit initializer for pairs is `(0.0,0.0)'.
+ The implicit initializer for pairs is '(0.0,0.0)'.
There are a number of ways to take the complex conjugate of a pair:
pair z=(3,4);
@@ -1457,315 +1431,327 @@ user-defined types):
z=z.x-I*z.y;
z=conj(z);
- Here `I' is the pair `(0,1)'. A number of built-in functions are
+ Here 'I' is the pair '(0,1)'. A number of built-in functions are
defined for pairs:
- `pair conj(pair z)'
- returns the conjugate of `z';
+ 'pair conj(pair z)'
+ returns the conjugate of 'z';
- `real length(pair z)'
- returns the complex modulus `|z|' of its argument `z'. For
+ 'real length(pair z)'
+ returns the complex modulus '|z|' of its argument 'z'. For
example,
pair z=(3,4);
length(z);
- returns the result 5. A synonym for `length(pair)' is
- `abs(pair)';
+ returns the result 5. A synonym for 'length(pair)' is
+ 'abs(pair)';
- `real angle(pair z, bool warn=true)'
- returns the angle of `z' in radians in the interval
- [-`pi',`pi'] or `0' if `warn' is `false' and `z=(0,0)'
- (rather than producing an error);
+ 'real angle(pair z, bool warn=true)'
+ returns the angle of 'z' in radians in the interval
+ [-'pi','pi'] or '0' if 'warn' is 'false' and 'z=(0,0)' (rather
+ than producing an error);
- `real degrees(pair z, bool warn=true)'
- returns the angle of `z' in degrees in the interval [0,360)
- or `0' if `warn' is `false' and `z=(0,0)' (rather than
- producing an error);
+ 'real degrees(pair z, bool warn=true)'
+ returns the angle of 'z' in degrees in the interval [0,360) or
+ '0' if 'warn' is 'false' and 'z=(0,0)' (rather than producing
+ an error);
- `pair unit(pair z)'
- returns a unit vector in the direction of the pair `z';
+ 'pair unit(pair z)'
+ returns a unit vector in the direction of the pair 'z';
- `pair expi(real angle)'
- returns a unit vector in the direction `angle' measured in
+ 'pair expi(real angle)'
+ returns a unit vector in the direction 'angle' measured in
radians;
- `pair dir(real degrees)'
- returns a unit vector in the direction `degrees' measured in
+ 'pair dir(real degrees)'
+ returns a unit vector in the direction 'degrees' measured in
degrees;
- `real xpart(pair z)'
- returns `z.x';
-
- `real ypart(pair z)'
- returns `z.y';
-
- `pair realmult(pair z, pair w)'
- returns the element-by-element product `(z.x*w.x,z.y*w.y)';
-
- `real dot(explicit pair z, explicit pair w)'
- returns the dot product `z.x*w.x+z.y*w.y';
-
- `pair minbound(pair z, pair w)'
- returns `(min(z.x,w.x),min(z.y,w.y))';
-
- `pair maxbound(pair z, pair w)'
- returns `(max(z.x,w.x),max(z.y,w.y))'.
-
-
-`triple'
- an ordered triple of real components `(x,y,z)' used for
- three-dimensional drawings. The respective components of a triple
- `v' can read as `v.x', `v.y', and `v.z'. The implicit initializer
- for triples is `(0.0,0.0,0.0)'.
+ 'real xpart(pair z)'
+ returns 'z.x';
+
+ 'real ypart(pair z)'
+ returns 'z.y';
+
+ 'pair realmult(pair z, pair w)'
+ returns the element-by-element product '(z.x*w.x,z.y*w.y)';
+
+ 'real dot(explicit pair z, explicit pair w)'
+ returns the dot product 'z.x*w.x+z.y*w.y';
+
+ 'real cross(explicit pair z, explicit pair w)'
+ returns the 2D scalar product 'z.x*w.y-z.y*w.x';
+
+ 'real orient(pair a, pair b, pair c);'
+ returns a positive (negative) value if 'a--b--c--cycle' is
+ oriented counterclockwise (clockwise) or zero if all three
+ points are colinear. Equivalently, a positive (negative)
+ value is returned if 'c' lies to the left (right) of the line
+ through 'a' and 'b' or zero if 'c' lies on this line. The
+ value returned can be expressed in terms of the 2D scalar
+ cross product as 'cross(a-c,b-c)', which is the determinant
+ |a.x a.y 1|
+ |b.x b.y 1|
+ |c.x c.y 1|
+
+ 'real incircle(pair a, pair b, pair c, pair d);'
+ returns a positive (negative) value if 'd' lies inside
+ (outside) the circle passing through the
+ counterclockwise-oriented points 'a,b,c' or zero if 'd' lies
+ on the this circle. The value returned is the determinant
+ |a.x a.y a.x^2+a.y^2 1|
+ |b.x b.y b.x^2+b.y^2 1|
+ |c.x c.y c.x^2+c.y^2 1|
+ |d.x d.y d.x^2+d.y^2 1|
+
+ 'pair minbound(pair z, pair w)'
+ returns '(min(z.x,w.x),min(z.y,w.y))';
+
+ 'pair maxbound(pair z, pair w)'
+ returns '(max(z.x,w.x),max(z.y,w.y))'.
+
+'triple'
+ an ordered triple of real components '(x,y,z)' used for
+ three-dimensional drawings. The respective components of a triple
+ 'v' can read as 'v.x', 'v.y', and 'v.z'. The implicit initializer
+ for triples is '(0.0,0.0,0.0)'.
Here are the built-in functions for triples:
- `real length(triple v)'
- returns the length `|v|' of the vector `v'. A synonym for
- `length(triple)' is `abs(triple)';
+ 'real length(triple v)'
+ returns the length '|v|' of the vector 'v'. A synonym for
+ 'length(triple)' is 'abs(triple)';
- `real polar(triple v, bool warn=true)'
- returns the colatitude of `v' measured from the z axis in
- radians or `0' if `warn' is `false' and `v=O' (rather than
+ 'real polar(triple v, bool warn=true)'
+ returns the colatitude of 'v' measured from the z axis in
+ radians or '0' if 'warn' is 'false' and 'v=O' (rather than
producing an error);
- `real azimuth(triple v, bool warn=true)'
- returns the longitude of `v' measured from the x axis in
- radians or `0' if `warn' is `false' and `v.x=v.y=0' (rather
+ 'real azimuth(triple v, bool warn=true)'
+ returns the longitude of 'v' measured from the x axis in
+ radians or '0' if 'warn' is 'false' and 'v.x=v.y=0' (rather
than producing an error);
- `real colatitude(triple v, bool warn=true)'
- returns the colatitude of `v' measured from the z axis in
- degrees or `0' if `warn' is `false' and `v=O' (rather than
+ 'real colatitude(triple v, bool warn=true)'
+ returns the colatitude of 'v' measured from the z axis in
+ degrees or '0' if 'warn' is 'false' and 'v=O' (rather than
producing an error);
- `real latitude(triple v, bool warn=true)'
- returns the latitude of `v' measured from the xy plane in
- degrees or `0' if `warn' is `false' and `v=O' (rather than
+ 'real latitude(triple v, bool warn=true)'
+ returns the latitude of 'v' measured from the xy plane in
+ degrees or '0' if 'warn' is 'false' and 'v=O' (rather than
producing an error);
- `real longitude(triple v, bool warn=true)'
- returns the longitude of `v' measured from the x axis in
- degrees or `0' if `warn' is `false' and `v.x=v.y=0' (rather
+ 'real longitude(triple v, bool warn=true)'
+ returns the longitude of 'v' measured from the x axis in
+ degrees or '0' if 'warn' is 'false' and 'v.x=v.y=0' (rather
than producing an error);
- `triple unit(triple v)'
- returns a unit triple in the direction of the triple `v';
+ 'triple unit(triple v)'
+ returns a unit triple in the direction of the triple 'v';
- `triple expi(real polar, real azimuth)'
- returns a unit triple in the direction `(polar,azimuth)'
+ 'triple expi(real polar, real azimuth)'
+ returns a unit triple in the direction '(polar,azimuth)'
measured in radians;
- `triple dir(real colatitude, real longitude)'
+ 'triple dir(real colatitude, real longitude)'
returns a unit triple in the direction
- `(colatitude,longitude)' measured in degrees;
+ '(colatitude,longitude)' measured in degrees;
- `real xpart(triple v)'
- returns `v.x';
+ 'real xpart(triple v)'
+ returns 'v.x';
- `real ypart(triple v)'
- returns `v.y';
+ 'real ypart(triple v)'
+ returns 'v.y';
- `real zpart(triple v)'
- returns `v.z';
+ 'real zpart(triple v)'
+ returns 'v.z';
- `real dot(triple u, triple v)'
- returns the dot product `u.x*v.x+u.y*v.y+u.z*v.z';
+ 'real dot(triple u, triple v)'
+ returns the dot product 'u.x*v.x+u.y*v.y+u.z*v.z';
- `triple cross(triple u, triple v)'
+ 'triple cross(triple u, triple v)'
returns the cross product
- `(u.y*v.z-u.z*v.y,u.z*v.x-u.x*v.z,u.x*v.y-v.x*u.y)';
-
- `triple minbound(triple u, triple v)'
- returns `(min(u.x,v.x),min(u.y,v.y),min(u.z,v.z))';
+ '(u.y*v.z-u.z*v.y,u.z*v.x-u.x*v.z,u.x*v.y-v.x*u.y)';
- `triple maxbound(triple u, triple v)'
- returns `(max(u.x,v.x),max(u.y,v.y),max(u.z,v.z)').
+ 'triple minbound(triple u, triple v)'
+ returns '(min(u.x,v.x),min(u.y,v.y),min(u.z,v.z))';
+ 'triple maxbound(triple u, triple v)'
+ returns '(max(u.x,v.x),max(u.y,v.y),max(u.z,v.z)').
-`string'
- a character string, implemented using the STL `string' class.
+'string'
+ a character string, implemented using the STL 'string' class.
- Strings delimited by double quotes (`"') are subject to the
- following mappings to allow the use of double quotes in TeX (e.g.
- for using the `babel' package, *note babel::):
+ Strings delimited by double quotes ('"') are subject to the
+ following mappings to allow the use of double quotes in TeX
+ (e.g. for using the 'babel' package, *note babel::):
* \" maps to "
-
* \\ maps to \\
- Strings delimited by single quotes (`'') have the same mappings as
- character strings in ANSI `C':
+ Strings delimited by single quotes (''') have the same mappings as
+ character strings in ANSI 'C':
* \' maps to '
-
* \" maps to "
-
- * \? maps to ?
-
+ * \? maps to ?
* \\ maps to backslash
-
* \a maps to alert
-
* \b maps to backspace
-
* \f maps to form feed
-
* \n maps to newline
-
* \r maps to carriage return
-
* \t maps to tab
-
* \v maps to vertical tab
-
* \0-\377 map to corresponding octal byte
-
* \x0-\xFF map to corresponding hexadecimal byte
- The implicit initializer for strings is the empty string `""'.
- Strings may be concatenated with the `+' operator. In the following
- string functions, position `0' denotes the start of the string:
- `int length(string s)'
- returns the length of the string `s';
-
- `int find(string s, string t, int pos=0)'
- returns the position of the first occurrence of string `t' in
- string `s' at or after position `pos', or -1 if `t' is not a
- substring of `s';
-
- `int rfind(string s, string t, int pos=-1)'
- returns the position of the last occurrence of string `t' in
- string `s' at or before position `pos' (if `pos'=-1, at the
- end of the string `s'), or -1 if `t' is not a substring of
- `s';
-
- `string insert(string s, int pos, string t)'
- returns the string formed by inserting string `t' at position
- `pos' in `s';
-
- `string erase(string s, int pos, int n)'
- returns the string formed by erasing the string of length `n'
- (if `n'=-1, to the end of the string `s') at position `pos'
- in `s';
-
- `string substr(string s, int pos, int n=-1)'
- returns the substring of `s' starting at position `pos' and
- of length `n' (if `n'=-1, until the end of the string `s');
-
- `string reverse(string s)'
- returns the string formed by reversing string `s';
-
- `string replace(string s, string before, string after)'
- returns a string with all occurrences of the string `before'
- in the string `s' changed to the string `after';
-
- `string replace(string s, string[][] table)'
- returns a string constructed by translating in string `s' all
- occurrences of the string `before' in an array `table' of
- string pairs {`before',`after'} to the corresponding string
- `after';
-
- `string[] split(string s, string delimiter="")'
- returns an array of strings obtained by splitting `s' into
- substrings delimited by `delimiter' (an empty delimiter
+ The implicit initializer for strings is the empty string '""'.
+ Strings may be concatenated with the '+' operator. In the
+ following string functions, position '0' denotes the start of the
+ string:
+
+ 'int length(string s)'
+ returns the length of the string 's';
+
+ 'int find(string s, string t, int pos=0)'
+ returns the position of the first occurrence of string 't' in
+ string 's' at or after position 'pos', or -1 if 't' is not a
+ substring of 's';
+
+ 'int rfind(string s, string t, int pos=-1)'
+ returns the position of the last occurrence of string 't' in
+ string 's' at or before position 'pos' (if 'pos'=-1, at the
+ end of the string 's'), or -1 if 't' is not a substring of
+ 's';
+
+ 'string insert(string s, int pos, string t)'
+ returns the string formed by inserting string 't' at position
+ 'pos' in 's';
+
+ 'string erase(string s, int pos, int n)'
+ returns the string formed by erasing the string of length 'n'
+ (if 'n'=-1, to the end of the string 's') at position 'pos' in
+ 's';
+
+ 'string substr(string s, int pos, int n=-1)'
+ returns the substring of 's' starting at position 'pos' and of
+ length 'n' (if 'n'=-1, until the end of the string 's');
+
+ 'string reverse(string s)'
+ returns the string formed by reversing string 's';
+
+ 'string replace(string s, string before, string after)'
+ returns a string with all occurrences of the string 'before'
+ in the string 's' changed to the string 'after';
+
+ 'string replace(string s, string[][] table)'
+ returns a string constructed by translating in string 's' all
+ occurrences of the string 'before' in an array 'table' of
+ string pairs {'before','after'} to the corresponding string
+ 'after';
+
+ 'string[] split(string s, string delimiter="")'
+ returns an array of strings obtained by splitting 's' into
+ substrings delimited by 'delimiter' (an empty delimiter
signifies a space, but with duplicate delimiters discarded);
- `string format(string s, int n, string locale="")'
- returns a string containing `n' formatted according to the
- C-style format string `s' using locale `locale' (or the
+ 'string format(string s, int n, string locale="")'
+ returns a string containing 'n' formatted according to the
+ C-style format string 's' using locale 'locale' (or the
current locale if an empty string is specified);
- `string format(string s=defaultformat, string s=defaultseparator, real x, string locale="")'
- returns a string containing `x' formatted according to the
- C-style format string `s' using locale `locale' (or the
- current locale if an empty string is specified), following
- the behaviour of the C function `fprintf'), except that only
- one data field is allowed, trailing zeros are removed by
- default (unless `#' is specified), and (if the format string
- specifies math mode) TeX is used to typeset scientific
- notation using the `defaultseparator="\!\times\!";';
+ 'string format(string s=defaultformat, string s=defaultseparator, real x, string locale="")'
+ returns a string containing 'x' formatted according to the
+ C-style format string 's' using locale 'locale' (or the
+ current locale if an empty string is specified), following the
+ behaviour of the C function 'fprintf'), except that only one
+ data field is allowed, trailing zeros are removed by default
+ (unless '#' is specified), and (if the format string specifies
+ math mode) TeX is used to typeset scientific notation using
+ the 'defaultseparator="\!\times\!";';
- `int hex(string s);'
- casts a hexidecimal string `s' to an integer;
+ 'int hex(string s);'
+ casts a hexidecimal string 's' to an integer;
- `int ascii(string s);'
- returns the ASCII code for the first character of string `s';
+ 'int ascii(string s);'
+ returns the ASCII code for the first character of string 's';
- `string string(real x, int digits=realDigits)'
- casts `x' to a string using precision `digits' and the C
+ 'string string(real x, int digits=realDigits)'
+ casts 'x' to a string using precision 'digits' and the C
locale;
- `string locale(string s="")'
+ 'string locale(string s="")'
sets the locale to the given string, if nonempty, and returns
the current locale;
- `string time(string format="%a %b %d %T %Z %Y")'
+ 'string time(string format="%a %b %d %T %Z %Y")'
returns the current time formatted by the ANSI C routine
- `strftime' according to the string `format' using the current
- locale. Thus time();
+ 'strftime' according to the string 'format' using the current
+ locale. Thus
+ time();
time("%a %b %d %H:%M:%S %Z %Y");
are equivalent ways of returning the current time in the
- default format used by the `UNIX' `date' command;
+ default format used by the 'UNIX' 'date' command;
- `int seconds(string t="", string format="")'
+ 'int seconds(string t="", string format="")'
returns the time measured in seconds after the Epoch (Thu Jan
01 00:00:00 UTC 1970) as determined by the ANSI C routine
- `strptime' according to the string `format' using the current
- locale, or the current time if `t' is the empty string. Note
- that the `"%Z"' extension to the POSIX `strptime'
- specification is ignored by the current GNU C Library. If an
- error occurs, the value -1 is returned. Here are some
- examples: seconds("Mar 02 11:12:36 AM PST 2007","%b %d %r PST %Y");
+ 'strptime' according to the string 'format' using the current
+ locale, or the current time if 't' is the empty string. Note
+ that the '"%Z"' extension to the POSIX 'strptime'
+ specification is ignored by the current GNU C Library. If an
+ error occurs, the value -1 is returned. Here are some
+ examples:
+ seconds("Mar 02 11:12:36 AM PST 2007","%b %d %r PST %Y");
seconds(time("%b %d %r %z %Y"),"%b %d %r %z %Y");
seconds(time("%b %d %r %Z %Y"),"%b %d %r "+time("%Z")+" %Y");
1+(seconds()-seconds("Jan 1","%b %d"))/(24*60*60);
- The last example returns today's ordinal date, measured from
+ The last example returns today's ordinal date, measured from
the beginning of the year.
- `string time(int seconds, string format="%a %b %d %T %Z %Y")'
- returns the time corresponding to `seconds' seconds after the
+ 'string time(int seconds, string format="%a %b %d %T %Z %Y")'
+ returns the time corresponding to 'seconds' seconds after the
Epoch (Thu Jan 01 00:00:00 UTC 1970) formatted by the ANSI C
- routine `strftime' according to the string `format' using the
- current locale. For example, to return the date corresponding
- to 24 hours ago: time(seconds()-24*60*60);
-
- `int system(string s)'
-
- `int system(string[] s)'
- if the setting `safe' is false, call the arbitrary system
- command `s';
-
- `void asy(string format, bool overwrite=false ... string[] s)'
- conditionally process each file name in array `s' in a new
- environment, using format `format', overwriting the output
- file only if `overwrite' is true;
-
- `void abort(string s="")'
+ routine 'strftime' according to the string 'format' using the
+ current locale. For example, to return the date corresponding
+ to 24 hours ago:
+ time(seconds()-24*60*60);
+
+ 'int system(string s)'
+ 'int system(string[] s)'
+ if the setting 'safe' is false, call the arbitrary system
+ command 's';
+
+ 'void asy(string format, bool overwrite=false ... string[] s)'
+ conditionally process each file name in array 's' in a new
+ environment, using format 'format', overwriting the output
+ file only if 'overwrite' is true;
+
+ 'void abort(string s="")'
aborts execution (with a non-zero return code in batch mode);
- if string `s' is nonempty, a diagnostic message constructed
- from the source file, line number, and `s' is printed;
+ if string 's' is nonempty, a diagnostic message constructed
+ from the source file, line number, and 's' is printed;
- `void assert(bool b, string s="")'
- aborts execution with an error message constructed from `s' if
- `b=false';
+ 'void assert(bool b, string s="")'
+ aborts execution with an error message constructed from 's' if
+ 'b=false';
- `void exit()'
+ 'void exit()'
exits (with a zero error return code in batch mode);
- `void sleep(int seconds)'
+ 'void sleep(int seconds)'
pauses for the given number of seconds;
- `void usleep(int microseconds)'
+ 'void usleep(int microseconds)'
pauses for the given number of microseconds;
- `void beep()'
+ 'void beep()'
produces a beep on the console;
-
-
- As in C/C++, complicated types may be abbreviated with `typedef'
-(see the example in *note Functions::).
+ As in C/C++, complicated types may be abbreviated with 'typedef' (see
+the example in *note Functions::).

File: asymptote.info, Node: Paths and guides, Next: Pens, Prev: Data types, Up: Programming
@@ -1773,48 +1759,57 @@ File: asymptote.info, Node: Paths and guides, Next: Pens, Prev: Data types,
6.2 Paths and guides
====================
-`path'
+'path'
a cubic spline resolved into a fixed path. The implicit
- initializer for paths is `nullpath'.
+ initializer for paths is 'nullpath'.
- For example, the routine `circle(pair c, real r)', which returns a
- Bezier curve approximating a circle of radius `r' centered on `c',
- is based on `unitcircle' (*note unitcircle::): path circle(pair c, real r)
+ For example, the routine 'circle(pair c, real r)', which returns a
+ Bezier curve approximating a circle of radius 'r' centered on 'c',
+ is based on 'unitcircle' (*note unitcircle::):
+ path circle(pair c, real r)
{
return shift(c)*scale(r)*unitcircle;
}
- If high accuracy is needed, a true circle may be produced with the
- routine `Circle' defined in the module `graph.asy': import graph;
+ If high accuracy is needed, a true circle may be produced with the
+ routine 'Circle' defined in the module 'graph.asy':
+ import graph;
path Circle(pair c, real r, int n=nCircle);
- A circular arc consistent with `circle' centered on `c' with
- radius `r' from `angle1' to `angle2' degrees, drawing
- counterclockwise if `angle2 >= angle1', can be constructed with path arc(pair c, real r, real angle1, real angle2);
- One may also specify the direction explicitly: path arc(pair c, real r, real angle1, real angle2, bool direction);
- Here the direction can be specified as CCW (counter-clockwise) or
- CW (clockwise). For convenience, an arc centered at `c' from pair
- `z1' to `z2' (assuming `|z2-c|=|z1-c|') in the may also be
- constructed with path arc(pair c, explicit pair z1, explicit pair z2,
+ A circular arc consistent with 'circle' centered on 'c' with radius
+ 'r' from 'angle1' to 'angle2' degrees, drawing counterclockwise if
+ 'angle2 >= angle1', can be constructed with
+ path arc(pair c, real r, real angle1, real angle2);
+ One may also specify the direction explicitly:
+ path arc(pair c, real r, real angle1, real angle2, bool direction);
+ Here the direction can be specified as CCW (counter-clockwise) or
+ CW (clockwise). For convenience, an arc centered at 'c' from pair
+ 'z1' to 'z2' (assuming '|z2-c|=|z1-c|') in the may also be
+ constructed with
+ path arc(pair c, explicit pair z1, explicit pair z2,
bool direction=CCW)
If high accuracy is needed, true arcs may be produced with routines
- in the module `graph.asy' that produce Bezier curves with `n'
- control points: import graph;
+ in the module 'graph.asy' that produce Bezier curves with 'n'
+ control points:
+ import graph;
path Arc(pair c, real r, real angle1, real angle2, bool direction,
int n=nCircle);
path Arc(pair c, real r, real angle1, real angle2, int n=nCircle);
path Arc(pair c, explicit pair z1, explicit pair z2,
bool direction=CCW, int n=nCircle);
- An ellipse can be drawn with the routine path ellipse(pair c, real a, real b)
+ An ellipse can be drawn with the routine
+ path ellipse(pair c, real a, real b)
{
return shift(c)*scale(a,b)*unitcircle;
}
- A brace can be constructed between pairs `a' and `b' with path brace(pair a, pair b, real amplitude=bracedefaultratio*length(b-a));
+ A brace can be constructed between pairs 'a' and 'b' with
+ path brace(pair a, pair b, real amplitude=bracedefaultratio*length(b-a));
This example illustrates the use of all five guide connectors
- discussed in *note Tutorial:: and *note Bezier curves::: size(300,0);
+ discussed in *note Tutorial:: and *note Bezier curves:::
+ size(300,0);
pair[] z=new pair[10];
z[0]=(0,100); z[1]=(50,0); z[2]=(180,0);
@@ -1830,259 +1825,250 @@ File: asymptote.info, Node: Paths and guides, Next: Pens, Prev: Data types,
dot(z);
-
+ [join]
Here are some useful functions for paths:
- `int length(path p);'
- This is the number of (linear or cubic) segments in path `p'.
- If `p' is cyclic, this is the same as the number of nodes in
- `p'.
+ 'int length(path p);'
+ This is the number of (linear or cubic) segments in path 'p'.
+ If 'p' is cyclic, this is the same as the number of nodes in
+ 'p'.
- `int size(path p);'
- This is the number of nodes in the path `p'. If `p' is
- cyclic, this is the same as `length(p)'.
+ 'int size(path p);'
+ This is the number of nodes in the path 'p'. If 'p' is
+ cyclic, this is the same as 'length(p)'.
- `bool cyclic(path p);'
- returns `true' iff path `p' is cyclic.
+ 'bool cyclic(path p);'
+ returns 'true' iff path 'p' is cyclic.
- `bool straight(path p, int i);'
- returns `true' iff the segment of path `p' between node `i'
- and node `i+1' is straight.
+ 'bool straight(path p, int i);'
+ returns 'true' iff the segment of path 'p' between node 'i'
+ and node 'i+1' is straight.
- `bool piecewisestraight(path p)'
- returns `true' iff the path `p' is piecewise straight.
+ 'bool piecewisestraight(path p)'
+ returns 'true' iff the path 'p' is piecewise straight.
- `pair point(path p, int t);'
- If `p' is cyclic, return the coordinates of node `t' mod
- `length(p)'. Otherwise, return the coordinates of node `t',
- unless `t' < 0 (in which case `point(0)' is returned) or `t'
- > `length(p)' (in which case `point(length(p))' is returned).
+ 'pair point(path p, int t);'
+ If 'p' is cyclic, return the coordinates of node 't' mod
+ 'length(p)'. Otherwise, return the coordinates of node 't',
+ unless 't' < 0 (in which case 'point(0)' is returned) or 't' >
+ 'length(p)' (in which case 'point(length(p))' is returned).
- `pair point(path p, real t);'
+ 'pair point(path p, real t);'
This returns the coordinates of the point between node
- `floor(t)' and `floor(t)+1' corresponding to the cubic spline
- parameter `t-floor(t)' (*note Bezier curves::). If `t' lies
- outside the range [0,`length(p)'], it is first reduced modulo
- `length(p)' in the case where `p' is cyclic or else converted
- to the corresponding endpoint of `p'.
-
- `pair dir(path p, int t, int sign=0, bool normalize=true);'
- If `sign < 0', return the direction (as a pair) of the
- incoming tangent to path `p' at node `t'; if `sign > 0',
- return the direction of the outgoing tangent. If `sign=0',
+ 'floor(t)' and 'floor(t)+1' corresponding to the cubic spline
+ parameter 't-floor(t)' (*note Bezier curves::). If 't' lies
+ outside the range [0,'length(p)'], it is first reduced modulo
+ 'length(p)' in the case where 'p' is cyclic or else converted
+ to the corresponding endpoint of 'p'.
+
+ 'pair dir(path p, int t, int sign=0, bool normalize=true);'
+ If 'sign < 0', return the direction (as a pair) of the
+ incoming tangent to path 'p' at node 't'; if 'sign > 0',
+ return the direction of the outgoing tangent. If 'sign=0',
the mean of these two directions is returned.
- `pair dir(path p, real t, bool normalize=true);'
- returns the direction of the tangent to path `p' at the point
- between node `floor(t)' and `floor(t)+1' corresponding to the
- cubic spline parameter `t-floor(t)' (*note Bezier curves::).
+ 'pair dir(path p, real t, bool normalize=true);'
+ returns the direction of the tangent to path 'p' at the point
+ between node 'floor(t)' and 'floor(t)+1' corresponding to the
+ cubic spline parameter 't-floor(t)' (*note Bezier curves::).
- `pair dir(path p)'
+ 'pair dir(path p)'
returns dir(p,length(p)).
- `pair dir(path p, path q)'
+ 'pair dir(path p, path q)'
returns unit(dir(p)+dir(q)).
- `pair accel(path p, int t, int sign=0);'
- If `sign < 0', return the acceleration of the incoming path
- `p' at node `t'; if `sign > 0', return the acceleration of
- the outgoing path. If `sign=0', the mean of these two
+ 'pair accel(path p, int t, int sign=0);'
+ If 'sign < 0', return the acceleration of the incoming path
+ 'p' at node 't'; if 'sign > 0', return the acceleration of the
+ outgoing path. If 'sign=0', the mean of these two
accelerations is returned.
- `pair accel(path p, real t);'
- returns the acceleration of the path `p' at the point `t'.
+ 'pair accel(path p, real t);'
+ returns the acceleration of the path 'p' at the point 't'.
- `real radius(path p, real t);'
- returns the radius of curvature of the path `p' at the point
- `t'.
+ 'real radius(path p, real t);'
+ returns the radius of curvature of the path 'p' at the point
+ 't'.
- `pair precontrol(path p, int t);'
- returns the precontrol point of `p' at node `t'.
+ 'pair precontrol(path p, int t);'
+ returns the precontrol point of 'p' at node 't'.
- `pair precontrol(path p, real t);'
- returns the effective precontrol point of `p' at parameter
- `t'.
+ 'pair precontrol(path p, real t);'
+ returns the effective precontrol point of 'p' at parameter
+ 't'.
- `pair postcontrol(path p, int t);'
- returns the postcontrol point of `p' at node `t'.
+ 'pair postcontrol(path p, int t);'
+ returns the postcontrol point of 'p' at node 't'.
- `pair postcontrol(path p, real t);'
- returns the effective postcontrol point of `p' at parameter
- `t'.
+ 'pair postcontrol(path p, real t);'
+ returns the effective postcontrol point of 'p' at parameter
+ 't'.
- `real arclength(path p);'
+ 'real arclength(path p);'
returns the length (in user coordinates) of the piecewise
- linear or cubic curve that path `p' represents.
+ linear or cubic curve that path 'p' represents.
- `real arctime(path p, real L);'
+ 'real arctime(path p, real L);'
returns the path "time", a real number between 0 and the
- length of the path in the sense of `point(path p, real t)',
- at which the cumulative arclength (measured from the
- beginning of the path) equals `L'.
+ length of the path in the sense of 'point(path p, real t)', at
+ which the cumulative arclength (measured from the beginning of
+ the path) equals 'L'.
- `real arcpoint(path p, real L);'
- returns `point(p,arctime(p,L))'.
+ 'real arcpoint(path p, real L);'
+ returns 'point(p,arctime(p,L))'.
- `real dirtime(path p, pair z);'
+ 'real dirtime(path p, pair z);'
returns the first "time", a real number between 0 and the
- length of the path in the sense of `point(path, real)', at
- which the tangent to the path has the direction of pair `z',
+ length of the path in the sense of 'point(path, real)', at
+ which the tangent to the path has the direction of pair 'z',
or -1 if this never happens.
- `real reltime(path p, real l);'
- returns the time on path `p' at the relative fraction `l' of
+ 'real reltime(path p, real l);'
+ returns the time on path 'p' at the relative fraction 'l' of
its arclength.
- `pair relpoint(path p, real l);'
- returns the point on path `p' at the relative fraction `l' of
+ 'pair relpoint(path p, real l);'
+ returns the point on path 'p' at the relative fraction 'l' of
its arclength.
- `pair midpoint(path p);'
- returns the point on path `p' at half of its arclength.
+ 'pair midpoint(path p);'
+ returns the point on path 'p' at half of its arclength.
- `path reverse(path p);'
- returns a path running backwards along `p'.
+ 'path reverse(path p);'
+ returns a path running backwards along 'p'.
- `path subpath(path p, int a, int b);'
- returns the subpath of `p' running from node `a' to node `b'.
- If `a' < `b', the direction of the subpath is reversed.
+ 'path subpath(path p, int a, int b);'
+ returns the subpath of 'p' running from node 'a' to node 'b'.
+ If 'a' < 'b', the direction of the subpath is reversed.
- `path subpath(path p, real a, real b);'
- returns the subpath of `p' running from path time `a' to path
- time `b', in the sense of `point(path, real)'. If `a' < `b',
+ 'path subpath(path p, real a, real b);'
+ returns the subpath of 'p' running from path time 'a' to path
+ time 'b', in the sense of 'point(path, real)'. If 'a' < 'b',
the direction of the subpath is reversed.
- `real[] intersect(path p, path q, real fuzz=-1);'
- If `p' and `q' have at least one intersection point, return a
+ 'real[] intersect(path p, path q, real fuzz=-1);'
+ If 'p' and 'q' have at least one intersection point, return a
real array of length 2 containing the times representing the
- respective path times along `p' and `q', in the sense of
- `point(path, real)', for one such intersection point (as
- chosen by the algorithm described on page 137 of `The
+ respective path times along 'p' and 'q', in the sense of
+ 'point(path, real)', for one such intersection point (as
+ chosen by the algorithm described on page 137 of 'The
MetaFontbook'). The computations are performed to the
- absolute error specified by `fuzz', or if `fuzz < 0', to
- machine precision. If the paths do not intersect, return a
+ absolute error specified by 'fuzz', or if 'fuzz < 0', to
+ machine precision. If the paths do not intersect, return a
real array of length 0.
- `real[][] intersections(path p, path q, real fuzz=-1);'
+ 'real[][] intersections(path p, path q, real fuzz=-1);'
Return all (unless there are infinitely many) intersection
- times of paths `p' and `q' as a sorted array of real arrays
- of length 2 (*note sort::). The computations are performed to
- the absolute error specified by `fuzz', or if `fuzz < 0', to
+ times of paths 'p' and 'q' as a sorted array of real arrays of
+ length 2 (*note sort::). The computations are performed to
+ the absolute error specified by 'fuzz', or if 'fuzz < 0', to
machine precision.
- `real[] intersections(path p, explicit pair a, explicit pair b, real fuzz=-1);'
+ 'real[] intersections(path p, explicit pair a, explicit pair b, real fuzz=-1);'
Return all (unless there are infinitely many) intersection
- times of path `p' with the (infinite) line through points `a'
- and `b' as a sorted array. The intersections returned are
+ times of path 'p' with the (infinite) line through points 'a'
+ and 'b' as a sorted array. The intersections returned are
guaranteed to be correct to within the absolute error
- specified by `fuzz', or if `fuzz < 0', to machine precision.
+ specified by 'fuzz', or if 'fuzz < 0', to machine precision.
- `real[] times(path p, real x)'
- returns all intersection times of path `p' with the vertical
- line through `(x,0)'.
+ 'real[] times(path p, real x)'
+ returns all intersection times of path 'p' with the vertical
+ line through '(x,0)'.
- `real[] times(path p, explicit pair z)'
- returns all intersection times of path `p' with the
- horizontal line through `(0,z.y)'.
+ 'real[] times(path p, explicit pair z)'
+ returns all intersection times of path 'p' with the horizontal
+ line through '(0,z.y)'.
- `real[] mintimes(path p)'
+ 'real[] mintimes(path p)'
returns an array of length 2 containing times at which path
- `p' reaches its minimal horizontal and vertical extents,
+ 'p' reaches its minimal horizontal and vertical extents,
respectively.
- `real[] maxtimes(path p)'
+ 'real[] maxtimes(path p)'
returns an array of length 2 containing times at which path
- `p' reaches its maximal horizontal and vertical extents,
+ 'p' reaches its maximal horizontal and vertical extents,
respectively.
- `pair intersectionpoint(path p, path q, real fuzz=-1);'
+ 'pair intersectionpoint(path p, path q, real fuzz=-1);'
returns the intersection point
- `point(p,intersect(p,q,fuzz)[0])'.
+ 'point(p,intersect(p,q,fuzz)[0])'.
- `pair[] intersectionpoints(path p, path q, real fuzz=-1);'
+ 'pair[] intersectionpoints(path p, path q, real fuzz=-1);'
returns an array containing all intersection points of the
- paths `p' and `q'.
+ paths 'p' and 'q'.
- `pair extension(pair P, pair Q, pair p, pair q);'
+ 'pair extension(pair P, pair Q, pair p, pair q);'
returns the intersection point of the extensions of the line
- segments `P--Q' and `p--q', or if the lines are parallel,
- `(infinity,infinity)'.
+ segments 'P--Q' and 'p--q', or if the lines are parallel,
+ '(infinity,infinity)'.
- `slice cut(path p, path knife, int n);'
- returns the portions of path `p' before and after the `n'th
- intersection of `p' with path `knife' as a structure `slice'
+ 'slice cut(path p, path knife, int n);'
+ returns the portions of path 'p' before and after the 'n'th
+ intersection of 'p' with path 'knife' as a structure 'slice'
(if no intersection exist is found, the entire path is
- considered to be `before' the intersection): struct slice {
+ considered to be 'before' the intersection):
+ struct slice {
path before,after;
}
- The argument `n' is treated as modulo the number of
+ The argument 'n' is treated as modulo the number of
intersections.
- `slice firstcut(path p, path knife);'
- equivalent to `cut(p,knife,0);' Note that `firstcut.after'
- plays the role of the `MetaPost cutbefore' command.
+ 'slice firstcut(path p, path knife);'
+ equivalent to 'cut(p,knife,0);' Note that 'firstcut.after'
+ plays the role of the 'MetaPost cutbefore' command.
- `slice lastcut(path p, path knife);'
- equivalent to `cut(p,knife,-1);' Note that `lastcut.before'
- plays the role of the `MetaPost cutafter' command.
+ 'slice lastcut(path p, path knife);'
+ equivalent to 'cut(p,knife,-1);' Note that 'lastcut.before'
+ plays the role of the 'MetaPost cutafter' command.
- `path buildcycle(... path[] p);'
+ 'path buildcycle(... path[] p);'
This returns the path surrounding a region bounded by a list
- of two or more consecutively intersecting paths, following
- the behaviour of the `MetaPost buildcycle' command.
+ of two or more consecutively intersecting paths, following the
+ behaviour of the 'MetaPost buildcycle' command.
- `pair min(path p);'
+ 'pair min(path p);'
returns the pair (left,bottom) for the path bounding box of
- path `p'.
-
- `pair max(path p);'
- returns the pair (right,top) for the path bounding box of
- path `p'.
-
- `int windingnumber(path p, pair z);'
- returns the winding number of the cyclic path `p' relative to
- the point `z'. The winding number is positive if the path
- encircles `z' in the counterclockwise direction. If `z' lies
- on `p' the constant `undefined' (defined to be the largest
- odd integer) is returned.
-
- `bool interior(int windingnumber, pen fillrule)'
- returns true if `windingnumber' corresponds to an interior
- point according to `fillrule'.
-
- `bool inside(path p, pair z, pen fillrule=currentpen);'
- returns `true' iff the point `z' lies inside or on the edge of
- the region bounded by the cyclic path `p' according to the
- fill rule `fillrule' (*note fillrule::).
-
- `int inside(path p, path q, pen fillrule=currentpen);'
- returns `1' if the cyclic path `p' strictly contains `q'
- according to the fill rule `fillrule' (*note fillrule::), `-1'
- if the cyclic path `q' strictly contains `p', and `0'
+ path 'p'.
+
+ 'pair max(path p);'
+ returns the pair (right,top) for the path bounding box of path
+ 'p'.
+
+ 'int windingnumber(path p, pair z);'
+ returns the winding number of the cyclic path 'p' relative to
+ the point 'z'. The winding number is positive if the path
+ encircles 'z' in the counterclockwise direction. If 'z' lies
+ on 'p' the constant 'undefined' (defined to be the largest odd
+ integer) is returned.
+
+ 'bool interior(int windingnumber, pen fillrule)'
+ returns true if 'windingnumber' corresponds to an interior
+ point according to 'fillrule'.
+
+ 'bool inside(path p, pair z, pen fillrule=currentpen);'
+ returns 'true' iff the point 'z' lies inside or on the edge of
+ the region bounded by the cyclic path 'p' according to the
+ fill rule 'fillrule' (*note fillrule::).
+
+ 'int inside(path p, path q, pen fillrule=currentpen);'
+ returns '1' if the cyclic path 'p' strictly contains 'q'
+ according to the fill rule 'fillrule' (*note fillrule::), '-1'
+ if the cyclic path 'q' strictly contains 'p', and '0'
otherwise.
- `pair inside(path p, pen fillrule=currentpen);'
- returns an arbitrary point strictly inside a cyclic path `p'
- according to the fill rule `fillrule' (*note fillrule::).
-
- `real side(pair a, pair b, pair c);'
- determines the side of `a--b' that c lies on (negative=left,
- zero=on `a--b', positive=right).
-
- `real incircle(pair a, pair b, pair c, pair d);'
- determines the side of the counterclockwise circle through
- `a,b,c' that `d' lies on (negative=inside, 0=on circle,
- positive=right).
+ 'pair inside(path p, pen fillrule=currentpen);'
+ returns an arbitrary point strictly inside a cyclic path 'p'
+ according to the fill rule 'fillrule' (*note fillrule::).
- `path[] strokepath(path g, pen p=currentpen);'
- returns the path array that `PostScript' would fill in
- drawing path `g' with pen `p'.
+ 'path[] strokepath(path g, pen p=currentpen);'
+ returns the path array that 'PostScript' would fill in drawing
+ path 'g' with pen 'p'.
-
-`guide'
+'guide'
an unresolved cubic spline (list of cubic-spline nodes and control
- points). The implicit initializer for a guide is `nullpath'; this
+ points). The implicit initializer for a guide is 'nullpath'; this
is useful for building up a guide within a loop.
A guide is similar to a path except that the computation of the
@@ -2116,14 +2102,17 @@ File: asymptote.info, Node: Paths and guides, Next: Pens, Prev: Data types,
draw(solved,dashed);
+ [mexicanhat]
We point out an efficiency distinction in the use of guides and
- paths: guide g;
+ paths:
+ guide g;
for(int i=0; i < 10; ++i)
g=g--(i,i);
path p=g;
- runs in linear time, whereas path p;
+ runs in linear time, whereas
+ path p;
for(int i=0; i < 10; ++i)
p=p--(i,i);
@@ -2131,166 +2120,170 @@ File: asymptote.info, Node: Paths and guides, Next: Pens, Prev: Data types,
copied at each step of the iteration.
The following routines can be used to examine the individual
- elements of a guide without actually resolving the guide to a
- fixed path (except for internal cycles, which are resolved):
+ elements of a guide without actually resolving the guide to a fixed
+ path (except for internal cycles, which are resolved):
- `int size(guide g);'
- Analogous to `size(path p)'.
+ 'int size(guide g);'
+ Analogous to 'size(path p)'.
- `int length(guide g);'
- Analogous to `length(path p)'.
+ 'int length(guide g);'
+ Analogous to 'length(path p)'.
- `bool cyclic(path p);'
- Analogous to `cyclic(path p)'.
+ 'bool cyclic(path p);'
+ Analogous to 'cyclic(path p)'.
- `pair point(guide g, int t);'
- Analogous to `point(path p, int t)'.
+ 'pair point(guide g, int t);'
+ Analogous to 'point(path p, int t)'.
- `guide reverse(guide g);'
- Analogous to `reverse(path p)'. If `g' is cyclic and also
- contains a secondary cycle, it is first solved to a path,
- then reversed. If `g' is not cyclic but contains an internal
- cycle, only the internal cycle is solved before reversal. If
+ 'guide reverse(guide g);'
+ Analogous to 'reverse(path p)'. If 'g' is cyclic and also
+ contains a secondary cycle, it is first solved to a path, then
+ reversed. If 'g' is not cyclic but contains an internal
+ cycle, only the internal cycle is solved before reversal. If
there are no internal cycles, the guide is reversed but not
solved to a path.
- `pair[] dirSpecifier(guide g, int i);'
+ 'pair[] dirSpecifier(guide g, int i);'
This returns a pair array of length 2 containing the outgoing
(in element 0) and incoming (in element 1) direction
- specifiers (or `(0,0)' if none specified) for the segment of
- guide `g' between nodes `i' and `i+1'.
+ specifiers (or '(0,0)' if none specified) for the segment of
+ guide 'g' between nodes 'i' and 'i+1'.
- `pair[] controlSpecifier(guide g, int i);'
- If the segment of guide `g' between nodes `i' and `i+1' has
+ 'pair[] controlSpecifier(guide g, int i);'
+ If the segment of guide 'g' between nodes 'i' and 'i+1' has
explicit outgoing and incoming control points, they are
returned as elements 0 and 1, respectively, of a two-element
- array. Otherwise, an empty array is returned.
+ array. Otherwise, an empty array is returned.
- `tensionSpecifier tensionSpecifier(guide g, int i);'
+ 'tensionSpecifier tensionSpecifier(guide g, int i);'
This returns the tension specifier for the segment of guide
- `g' between nodes `i' and `i+1'. The individual components of
- the `tensionSpecifier' type can be accessed as the virtual
- members `in', `out', and `atLeast'.
+ 'g' between nodes 'i' and 'i+1'. The individual components of
+ the 'tensionSpecifier' type can be accessed as the virtual
+ members 'in', 'out', and 'atLeast'.
- `real[] curlSpecifier(guide g);'
+ 'real[] curlSpecifier(guide g);'
This returns an array containing the initial curl specifier
(in element 0) and final curl specifier (in element 1) for
- guide `g'.
-
+ guide 'g'.
As a technical detail we note that a direction specifier given to
- `nullpath' modifies the node on the other side: the guides a..{up}nullpath..b;
+ 'nullpath' modifies the node on the other side: the guides
+ a..{up}nullpath..b;
c..nullpath{up}..d;
e..{up}nullpath{down}..f;
- are respectively equivalent to a..nullpath..{up}b;
+ are respectively equivalent to
+ a..nullpath..{up}b;
c{up}..nullpath..d;
e{down}..nullpath..{up}f;
-

File: asymptote.info, Node: Pens, Next: Transforms, Prev: Paths and guides, Up: Programming
6.3 Pens
========
-In `Asymptote', pens provide a context for the four basic drawing
-commands (*note Drawing commands::). They are used to specify the
+In 'Asymptote', pens provide a context for the four basic drawing
+commands (*note Drawing commands::). They are used to specify the
following drawing attributes: color, line type, line width, line cap,
line join, fill rule, text alignment, font, font size, pattern,
-overwrite mode, and calligraphic transforms on the pen nib. The default
-pen used by the drawing routines is called `currentpen'. This provides
-the same functionality as the `MetaPost' command `pickup'. The
-implicit initializer for pens is `defaultpen'.
+overwrite mode, and calligraphic transforms on the pen nib. The default
+pen used by the drawing routines is called 'currentpen'. This provides
+the same functionality as the 'MetaPost' command 'pickup'. The implicit
+initializer for pens is 'defaultpen'.
Pens may be added together with the nonassociative binary operator
-`+'. This will add the colors of the two pens. All other non-default
-attributes of the rightmost pen will override those of the leftmost
-pen. Thus, one can obtain a yellow dashed pen by saying
-`dashed+red+green' or `red+green+dashed' or `red+dashed+green'. The
-binary operator `*' can be used to scale the color of a pen by a real
-number, until it saturates with one or more color components equal to 1.
-
- * Colors are specified using one of the following colorspaces:
- `pen gray(real g);'
- This produces a grayscale color, where the intensity `g' lies
+'+'. This will add the colors of the two pens. All other non-default
+attributes of the rightmost pen will override those of the leftmost pen.
+Thus, one can obtain a yellow dashed pen by saying 'dashed+red+green' or
+'red+green+dashed' or 'red+dashed+green'. The binary operator '*' can
+be used to scale the color of a pen by a real number, until it saturates
+with one or more color components equal to 1.
+
+ * Colors are specified using one of the following colorspaces:
+ 'pen gray(real g);'
+ This produces a grayscale color, where the intensity 'g' lies
in the interval [0,1], with 0.0 denoting black and 1.0
denoting white.
- `pen rgb(real r, real g, real b);'
+ 'pen rgb(real r, real g, real b);'
This produces an RGB color, where each of the red, green, and
- blue intensities `r', `g', `b', lies in the interval [0,1].
+ blue intensities 'r', 'g', 'b', lies in the interval [0,1].
- `pen cmyk(real c, real m, real y, real k);'
+ 'pen cmyk(real c, real m, real y, real k);'
This produces a CMYK color, where each of the cyan, magenta,
- yellow, and black intensities `c', `m', `y', `k', lies in the
+ yellow, and black intensities 'c', 'm', 'y', 'k', lies in the
interval [0,1].
- `pen invisible;'
+ 'pen invisible;'
This special pen writes in invisible ink, but adjusts the
bounding box as if something had been drawn (like the
- `\phantom' command in TeX). The function `bool
+ '\phantom' command in TeX). The function 'bool
invisible(pen)' can be used to test whether a pen is
invisible.
+ The default color is 'black'; this may be changed with the routine
+ 'defaultpen(pen)'. The function 'colorspace(pen p)' returns the
+ colorspace of pen 'p' as a string ('"gray"', '"rgb"', '"cmyk"', or
+ '""').
- The default color is `black'; this may be changed with the routine
- `defaultpen(pen)'. The function `colorspace(pen p)' returns the
- colorspace of pen `p' as a string (`"gray"', `"rgb"', `"cmyk"', or
- `""').
-
- The function `real[] colors(pen)' returns the color components of
- a pen. The functions `pen gray(pen)', `pen rgb(pen)', and `pen
+ The function 'real[] colors(pen)' returns the color components of a
+ pen. The functions 'pen gray(pen)', 'pen rgb(pen)', and 'pen
cmyk(pen)' return new pens obtained by converting their arguments
to the respective color spaces. The function
- `colorless(pen=currentpen)' returns a copy of its argument with
- the color attributes stripped (to avoid color mixing).
+ 'colorless(pen=currentpen)' returns a copy of its argument with the
+ color attributes stripped (to avoid color mixing).
A 6-character RGB hexidecimal string can be converted to a pen with
- the routine pen rgb(string s);
- A pen can be converted to a hexidecimal string with
-
+ the routine
+ pen rgb(string s);
+ A pen can be converted to a hexidecimal string with
* string hex(pen p);
- Various shades and mixtures of the grayscale primary colors
- `black' and `white', RGB primary colors `red', `green', and
- `blue', and RGB secondary colors `cyan', `magenta', and `yellow'
- are defined as named colors, along with the CMYK primary colors
- `Cyan', `Magenta', `Yellow', and `Black', in the module `plain':
-
-
-
- The standard 140 RGB `X11' colors can be imported with the command import x11colors;
- and the standard 68 CMYK TeX colors can be imported with the
- command import texcolors;
- Note that there is some overlap between these two standards and
- the definitions of some colors (e.g. `Green') actually disagree.
-
- `Asymptote' also comes with a `asycolors.sty' `LaTeX' package that
- defines to `LaTeX' CMYK versions of `Asymptote''s predefined
- colors, so that they can be used directly within `LaTeX' strings.
- Normally, such colors are passed to `LaTeX' via a pen argument;
- however, to change the color of only a portion of a string, say
- for a slide presentation, (*note slide::) it may be desirable to
- specify the color directly to `LaTeX'. This file can be passed to
- `LaTeX' with the `Asymptote' command usepackage("asycolors");
-
- The structure `hsv' defined in `plain_pens.asy' may be used to
- convert between HSV and RGB spaces, where the hue `h' is an angle
- in [0,360) and the saturation `s' and value `v' lie in `[0,1]': pen p=hsv(180,0.5,0.75);
+ Various shades and mixtures of the grayscale primary colors 'black'
+ and 'white', RGB primary colors 'red', 'green', and 'blue', and RGB
+ secondary colors 'cyan', 'magenta', and 'yellow' are defined as
+ named colors, along with the CMYK primary colors 'Cyan', 'Magenta',
+ 'Yellow', and 'Black', in the module 'plain':
+
+ [colors]
+
+ The standard 140 RGB 'X11' colors can be imported with the command
+ import x11colors;
+ and the standard 68 CMYK TeX colors can be imported with the
+ command
+ import texcolors;
+ Note that there is some overlap between these two standards and the
+ definitions of some colors (e.g. 'Green') actually disagree.
+
+ 'Asymptote' also comes with a 'asycolors.sty' 'LaTeX' package that
+ defines to 'LaTeX' CMYK versions of 'Asymptote''s predefined
+ colors, so that they can be used directly within 'LaTeX' strings.
+ Normally, such colors are passed to 'LaTeX' via a pen argument;
+ however, to change the color of only a portion of a string, say for
+ a slide presentation, (*note slide::) it may be desirable to
+ specify the color directly to 'LaTeX'. This file can be passed to
+ 'LaTeX' with the 'Asymptote' command
+ usepackage("asycolors");
+
+ The structure 'hsv' defined in 'plain_pens.asy' may be used to
+ convert between HSV and RGB spaces, where the hue 'h' is an angle
+ in [0,360) and the saturation 's' and value 'v' lie in '[0,1]':
+ pen p=hsv(180,0.5,0.75);
write(p); // ([default], red=0.375, green=0.75, blue=0.75)
hsv q=p;
write(q.h,q.s,q.v); // 180 0.5 0.75
- * Line types are specified with the function `pen linetype(real[] a,
- real offset=0, bool scale=true, bool adjust=true)', where `a' is
- an array of real array numbers. The optional parameter `offset'
- specifies where in the pattern to begin. The first number
- specifies how far (if `scale' is `true', in units of the pen line
- width; otherwise in `PostScript' units) to draw with the pen on,
+ * Line types are specified with the function 'pen linetype(real[] a,
+ real offset=0, bool scale=true, bool adjust=true)', where 'a' is an
+ array of real array numbers. The optional parameter 'offset'
+ specifies where in the pattern to begin. The first number
+ specifies how far (if 'scale' is 'true', in units of the pen line
+ width; otherwise in 'PostScript' units) to draw with the pen on,
the second number specifies how far to draw with the pen off, and
- so on. If `adjust' is `true', these spacings are automatically
- adjusted by `Asymptote' to fit the arclength of the path. Here are
- the predefined line types: pen solid=linetype(new real[]);
+ so on. If 'adjust' is 'true', these spacings are automatically
+ adjusted by 'Asymptote' to fit the arclength of the path. Here are
+ the predefined line types:
+ pen solid=linetype(new real[]);
pen dotted=linetype(new real[] {0,4});
pen dashed=linetype(new real[] {8,8});
pen longdashed=linetype(new real[] {24,8});
@@ -2299,106 +2292,113 @@ number, until it saturates with one or more color components equal to 1.
pen Dotted(pen p=currentpen) {return linetype(new real[] {0,3})+2*linewidth(p);}
pen Dotted=Dotted();
+ [linetype]
+ The default line type is 'solid'; this may be changed with
+ 'defaultpen(pen)'. The line type of a pen can be determined with
+ the functions 'real[] linetype(pen p=currentpen)', 'real offset(pen
+ p)', 'bool scale(pen p)', and 'bool adjust(pen p)'.
- The default line type is `solid'; this may be changed with
- `defaultpen(pen)'. The line type of a pen can be determined with
- the functions `real[] linetype(pen p=currentpen)', `real
- offset(pen p)', `bool scale(pen p)', and `bool adjust(pen p)'.
-
- * The pen line width is specified in `PostScript' units with `pen
- linewidth(real)'. The default line width is 0.5 bp; this value may
- be changed with `defaultpen(pen)'. The line width of a pen is
- returned by `real linewidth(pen p=currentpen)'. For convenience,
- in the module `plain_pens' we define void defaultpen(real w) {defaultpen(linewidth(w));}
+ * The pen line width is specified in 'PostScript' units with 'pen
+ linewidth(real)'. The default line width is 0.5 bp; this value may
+ be changed with 'defaultpen(pen)'. The line width of a pen is
+ returned by 'real linewidth(pen p=currentpen)'. For convenience,
+ in the module 'plain_pens' we define
+ void defaultpen(real w) {defaultpen(linewidth(w));}
pen operator +(pen p, real w) {return p+linewidth(w);}
pen operator +(real w, pen p) {return linewidth(w)+p;}
- so that one may set the line width like this: defaultpen(2);
+ so that one may set the line width like this:
+ defaultpen(2);
pen p=red+0.5;
- * A pen with a specific `PostScript' line cap is returned on calling
- `linecap' with an integer argument: pen squarecap=linecap(0);
+ * A pen with a specific 'PostScript' line cap is returned on calling
+ 'linecap' with an integer argument:
+ pen squarecap=linecap(0);
pen roundcap=linecap(1);
pen extendcap=linecap(2);
- The default line cap, `roundcap', may be changed with
- `defaultpen(pen)'. The line cap of a pen is returned by `int
+ The default line cap, 'roundcap', may be changed with
+ 'defaultpen(pen)'. The line cap of a pen is returned by 'int
linecap(pen p=currentpen)'.
- * A pen with a specific `PostScript' join style is returned on
- calling `linejoin' with an integer argument: pen miterjoin=linejoin(0);
+ * A pen with a specific 'PostScript' join style is returned on
+ calling 'linejoin' with an integer argument:
+ pen miterjoin=linejoin(0);
pen roundjoin=linejoin(1);
pen beveljoin=linejoin(2);
- The default join style, `roundjoin', may be changed with
- `defaultpen(pen)'.The join style of a pen is returned by `int
+ The default join style, 'roundjoin', may be changed with
+ 'defaultpen(pen)'.The join style of a pen is returned by 'int
linejoin(pen p=currentpen)'.
- * A pen with a specific `PostScript' miter limit is returned by
- calling `miterlimit(real)'. The default miterlimit, `10.0', may
- be changed with `defaultpen(pen)'. The miter limit of a pen is
- returned by `real miterlimit(pen p=currentpen)'.
+ * A pen with a specific 'PostScript' miter limit is returned by
+ calling 'miterlimit(real)'. The default miterlimit, '10.0', may be
+ changed with 'defaultpen(pen)'. The miter limit of a pen is
+ returned by 'real miterlimit(pen p=currentpen)'.
- * A pen with a specific `PostScript' fill rule is returned on
- calling `fillrule' with an integer argument: pen zerowinding=fillrule(0);
+ * A pen with a specific 'PostScript' fill rule is returned on calling
+ 'fillrule' with an integer argument:
+ pen zerowinding=fillrule(0);
pen evenodd=fillrule(1);
The fill rule, which identifies the algorithm used to determine the
- insideness of a path or array of paths, only affects the `clip',
- `fill', and `inside' functions. For the `zerowinding' fill rule, a
- point `z' is outside the region bounded by a path if the number of
+ insideness of a path or array of paths, only affects the 'clip',
+ 'fill', and 'inside' functions. For the 'zerowinding' fill rule, a
+ point 'z' is outside the region bounded by a path if the number of
upward intersections of the path with the horizontal line
- `z--z+infinity' minus the number of downward intersections is
- zero. For the `evenodd' fill rule, `z' is considered to be outside
- the region if the total number of such intersections is even. The
- default fill rule, `zerowinding', may be changed with
- `defaultpen(pen)'. The fill rule of a pen is returned by `int
+ 'z--z+infinity' minus the number of downward intersections is zero.
+ For the 'evenodd' fill rule, 'z' is considered to be outside the
+ region if the total number of such intersections is even. The
+ default fill rule, 'zerowinding', may be changed with
+ 'defaultpen(pen)'. The fill rule of a pen is returned by 'int
fillrule(pen p=currentpen)'.
- * A pen with a specific text alignment setting is returned on
- calling `basealign' with an integer argument: pen nobasealign=basealign(0);
+ * A pen with a specific text alignment setting is returned on calling
+ 'basealign' with an integer argument:
+ pen nobasealign=basealign(0);
pen basealign=basealign(1);
- The default setting, `nobasealign',which may be changed with
- `defaultpen(pen)', causes the label alignment routines to use the
- full label bounding box for alignment. In contrast, `basealign'
+ The default setting, 'nobasealign',which may be changed with
+ 'defaultpen(pen)', causes the label alignment routines to use the
+ full label bounding box for alignment. In contrast, 'basealign'
requests that the TeX baseline be respected. The base align
- setting of a pen is returned by `int basealigin(pen p=currentpen)'.
+ setting of a pen is returned by 'int basealigin(pen p=currentpen)'.
* The font size is specified in TeX points (1 pt = 1/72.27 inches)
- with the function `pen fontsize(real size, real
+ with the function 'pen fontsize(real size, real
lineskip=1.2*size)'. The default font size, 12pt, may be changed
- with `defaultpen(pen)'. Nonstandard font sizes may require
- inserting import fontsize;
- at the beginning of the file (this requires the `type1cm' package
+ with 'defaultpen(pen)'. Nonstandard font sizes may require
+ inserting
+ import fontsize;
+ at the beginning of the file (this requires the 'type1cm' package
available from
-
- `http://mirror.ctan.org/macros/latex/contrib/type1cm/'
- and included in recent `LaTeX' distributions). The font size and
- line skip of a pen can be examined with the routines `real
- fontsize(pen p=currentpen)' and `real lineskip(pen p=currentpen)',
+ <http://mirror.ctan.org/macros/latex/contrib/type1cm/>
+ and included in recent 'LaTeX' distributions). The font size and
+ line skip of a pen can be examined with the routines 'real
+ fontsize(pen p=currentpen)' and 'real lineskip(pen p=currentpen)',
respectively.
- * A pen using a specific `LaTeX' `NFSS' font is returned by calling
- the function `pen font(string encoding, string family, string
- series, string shape)'. The default setting,
- `font("OT1","cmr","m","n")', corresponds to 12pt Computer Modern
- Roman; this may be changed with `defaultpen(pen)'. The font
- setting of a pen is returned by `string font(pen p=currentpen)'.
+ * A pen using a specific 'LaTeX' 'NFSS' font is returned by calling
+ the function 'pen font(string encoding, string family, string
+ series, string shape)'. The default setting,
+ 'font("OT1","cmr","m","n")', corresponds to 12pt Computer Modern
+ Roman; this may be changed with 'defaultpen(pen)'. The font
+ setting of a pen is returned by 'string font(pen p=currentpen)'.
Support for standardized international characters is provided by
- the `unicode' package (*note unicode::).
+ the 'unicode' package (*note unicode::).
Alternatively, one may select a fixed-size TeX font (on which
- `fontsize' has no effect) like `"cmr12"' (12pt Computer Modern
- Roman) or `"pcrr"' (Courier) using the function `pen font(string
- name)'. An optional size argument can also be given to scale the
- font to the requested size: `pen font(string name, real size)'.
+ 'fontsize' has no effect) like '"cmr12"' (12pt Computer Modern
+ Roman) or '"pcrr"' (Courier) using the function 'pen font(string
+ name)'. An optional size argument can also be given to scale the
+ font to the requested size: 'pen font(string name, real size)'.
- A nonstandard font command can be generated with `pen
+ A nonstandard font command can be generated with 'pen
fontcommand(string)'.
- A convenient interface to the following standard `PostScript'
- fonts is also provided: pen AvantGarde(string series="m", string shape="n");
+ A convenient interface to the following standard 'PostScript' fonts
+ is also provided:
+ pen AvantGarde(string series="m", string shape="n");
pen Bookman(string series="m", string shape="n");
pen Courier(string series="m", string shape="n");
pen Helvetica(string series="m", string shape="n");
@@ -2409,36 +2409,40 @@ number, until it saturates with one or more color components equal to 1.
pen Symbol(string series="m", string shape="n");
pen ZapfDingbats(string series="m", string shape="n");
- * The transparency of a pen can be changed with the command: pen opacity(real opacity=1, string blend="Compatible");
- The opacity can be varied from `0' (fully transparent) to the
- default value of `1' (opaque), and `blend' specifies one of the
- following foreground-background blending operations: "Compatible","Normal","Multiply","Screen","Overlay","SoftLight",
+ * The transparency of a pen can be changed with the command:
+ pen opacity(real opacity=1, string blend="Compatible");
+ The opacity can be varied from '0' (fully transparent) to the
+ default value of '1' (opaque), and 'blend' specifies one of the
+ following foreground-background blending operations:
+ "Compatible","Normal","Multiply","Screen","Overlay","SoftLight",
"HardLight","ColorDodge","ColorBurn","Darken","Lighten","Difference",
"Exclusion","Hue","Saturation","Color","Luminosity",
- as described in
+ as described in
- `http://partners.adobe.com/public/developer/en/pdf/PDFReference16.pdf'.
- Since `PostScript' does not support transparency, this feature is
- only effective with the `-f pdf' output format option; other
+ <http://partners.adobe.com/public/developer/en/pdf/PDFReference16.pdf>.
+ Since 'PostScript' does not support transparency, this feature is
+ only effective with the '-f pdf' output format option; other
formats can be produced from the resulting PDF file with the
- `ImageMagick' `convert' program. Labels are always drawn with an
- `opacity' of 1. A simple example of transparent filling is
- provided in the example file `transparency.asy'.
-
- * `PostScript' commands within a `picture' may be used to create a
- tiling pattern, identified by the string `name', for `fill' and
- `draw' operations by adding it to the global `PostScript' frame
- `currentpatterns', with optional left-bottom margin `lb' and
- right-top margin `rt'. import patterns;
+ 'ImageMagick' 'convert' program. Labels are always drawn with an
+ 'opacity' of 1. A simple example of transparent filling is
+ provided in the example file 'transparency.asy'.
+
+ * 'PostScript' commands within a 'picture' may be used to create a
+ tiling pattern, identified by the string 'name', for 'fill' and
+ 'draw' operations by adding it to the global 'PostScript' frame
+ 'currentpatterns', with optional left-bottom margin 'lb' and
+ right-top margin 'rt'.
+ import patterns;
void add(string name, picture pic, pair lb=0, pair rt=0);
- To `fill' or `draw' using pattern `name', use the pen
- `pattern("name")'. For example, rectangular tilings can be
- constructed using the routines `picture tile(real Hx=5mm, real
- Hy=0, pen p=currentpen, filltype filltype=NoFill)', `picture
- checker(real Hx=5mm, real Hy=0, pen p=currentpen)', and `picture
+ To 'fill' or 'draw' using pattern 'name', use the pen
+ 'pattern("name")'. For example, rectangular tilings can be
+ constructed using the routines 'picture tile(real Hx=5mm, real
+ Hy=0, pen p=currentpen, filltype filltype=NoFill)', 'picture
+ checker(real Hx=5mm, real Hy=0, pen p=currentpen)', and 'picture
brick(real Hx=5mm, real Hy=0, pen p=currentpen)' defined in
- `patterns.asy': size(0,90);
+ 'patterns.asy':
+ size(0,90);
import patterns;
add("tile",tile());
@@ -2452,11 +2456,12 @@ number, until it saturates with one or more color components equal to 1.
filldraw(shift(2s,0)*unitcircle,pattern("checker"));
filldraw(shift(3s,0)*unitcircle,pattern("brick"));
+ [tile]
-
- Hatch patterns can be generated with the routines `picture
- hatch(real H=5mm, pair dir=NE, pen p=currentpen)', `picture
- crosshatch(real H=5mm, pen p=currentpen)': size(0,100);
+ Hatch patterns can be generated with the routines 'picture
+ hatch(real H=5mm, pair dir=NE, pen p=currentpen)', 'picture
+ crosshatch(real H=5mm, pen p=currentpen)':
+ size(0,100);
import patterns;
add("hatch",hatch());
@@ -2468,14 +2473,15 @@ number, until it saturates with one or more color components equal to 1.
filldraw(shift(s,0)*unitsquare,pattern("hatchback"));
filldraw(shift(2s,0)*unitsquare,pattern("crosshatch"));
+ [hatch]
-
- You may need to turn off aliasing in your `PostScript' viewer for
- patterns to appear correctly. Custom patterns can easily be
- constructed, following the examples in `patterns.asy'. The tiled
- pattern can even incorporate shading (*note gradient shading::),
- as illustrated in this example (not included in the manual because
- not all printers support `PostScript' 3): size(0,100);
+ You may need to turn off aliasing in your 'PostScript' viewer for
+ patterns to appear correctly. Custom patterns can easily be
+ constructed, following the examples in 'patterns.asy'. The tiled
+ pattern can even incorporate shading (*note gradient shading::), as
+ illustrated in this example (not included in the manual because not
+ all printers support 'PostScript' 3):
+ size(0,100);
import patterns;
real d=4mm;
@@ -2487,12 +2493,11 @@ number, until it saturates with one or more color components equal to 1.
filldraw(unitcircle,pattern("shadedtiling"));
-
* One can specify a custom pen nib as an arbitrary polygonal path
- with `pen makepen(path)'; this path represents the mark to be
- drawn for paths containing a single point. This pen nib path can be
- recovered from a pen with `path nib(pen)'. Unlike in `MetaPost',
+ with 'pen makepen(path)'; this path represents the mark to be drawn
+ for paths containing a single point. This pen nib path can be
+ recovered from a pen with 'path nib(pen)'. Unlike in 'MetaPost',
the path need not be convex:
size(200);
@@ -2505,43 +2510,41 @@ number, until it saturates with one or more color components equal to 1.
draw((0.5,-1.5),nonconvex);
draw((0,-1.5)..(1,-0.5)..(2,-1.5),nonconvex);
+ [makepen]
-
- The value `nullpath' represents a circular pen nib (the default);
+ The value 'nullpath' represents a circular pen nib (the default);
an elliptical pen can be achieved simply by multiplying the pen by
- a transform: `yscale(2)*currentpen'.
+ a transform: 'yscale(2)*currentpen'.
* One can prevent labels from overwriting one another by using the
- pen attribute `overwrite', which takes a single argument:
+ pen attribute 'overwrite', which takes a single argument:
- `Allow'
- Allow labels to overwrite one another. This is the default
- behaviour (unless overridden with `defaultpen(pen)'.
+ 'Allow'
+ Allow labels to overwrite one another. This is the default
+ behaviour (unless overridden with 'defaultpen(pen)'.
- `Suppress'
+ 'Suppress'
Suppress, with a warning, each label that would overwrite
another label.
- `SuppressQuiet'
+ 'SuppressQuiet'
Suppress, without warning, each label that would overwrite
another label.
- `Move'
+ 'Move'
Move a label that would overwrite another out of the way and
issue a warning. As this adjustment is during the final
- output phase (in `PostScript' coordinates) it could result in
+ output phase (in 'PostScript' coordinates) it could result in
a larger figure than requested.
- `MoveQuiet'
+ 'MoveQuiet'
Move a label that would overwrite another out of the way,
without warning. As this adjustment is during the final
- output phase (in `PostScript' coordinates) it could result in
+ output phase (in 'PostScript' coordinates) it could result in
a larger figure than requested.
-
-
- The routine `defaultpen()' returns the current default pen
-attributes. Calling the routine `resetdefaultpen()' resets all pen
+ The routine 'defaultpen()' returns the current default pen
+attributes. Calling the routine 'resetdefaultpen()' resets all pen
default attributes to their initial values.

@@ -2550,56 +2553,47 @@ File: asymptote.info, Node: Transforms, Next: Frames and pictures, Prev: Pens
6.4 Transforms
==============
-`Asymptote' makes extensive use of affine transforms. A pair `(x,y)' is
-transformed by the transform `t=(t.x,t.y,t.xx,t.xy,t.yx,t.yy)' to
-`(x',y')', where
+'Asymptote' makes extensive use of affine transforms. A pair '(x,y)' is
+transformed by the transform 't=(t.x,t.y,t.xx,t.xy,t.yx,t.yy)' to
+'(x',y')', where
x' = t.x + t.xx * x + t.xy * y
y' = t.y + t.yx * x + t.yy * y
- This is equivalent to the `PostScript' transformation `[t.xx t.yx t.xy
+This is equivalent to the 'PostScript' transformation '[t.xx t.yx t.xy
t.yy t.x t.y]'.
Transforms can be applied to pairs, guides, paths, pens, strings,
transforms, frames, and pictures by multiplication (via the binary
-operator `*') on the left (*note circle:: for an example). Transforms
+operator '*') on the left (*note circle:: for an example). Transforms
can be composed with one another and inverted with the function
-`transform inverse(transform t)'; they can also be raised to any
-integer power with the `^' operator.
+'transform inverse(transform t)'; they can also be raised to any integer
+power with the '^' operator.
The built-in transforms are:
-`transform identity();'
+'transform identity();'
the identity transform;
-
-`transform shift(pair z);'
- translates by the pair `z';
-
-`transform shift(real x, real y);'
- translates by the pair `(x,y)';
-
-`transform xscale(real x);'
- scales by `x' in the x direction;
-
-`transform yscale(real y);'
- scales by `y' in the y direction;
-
-`transform scale(real s);'
- scale by `s' in both x and y directions;
-
-`transform scale(real x, real y);'
- scale by `x' in the x direction and by `y' in the y direction;
-
-`transform slant(real s);'
- maps `(x,y)' -> `(x+s*y,y)';
-
-`transform rotate(real angle, pair z=(0,0));'
- rotates by `angle' in degrees about `z';
-
-`transform reflect(pair a, pair b);'
- reflects about the line `a--b'.
-
- The implicit initializer for transforms is `identity()'. The
-routines `shift(transform t)' and `shiftless(transform t)' return the
-transforms `(t.x,t.y,0,0,0,0)' and `(0,0,t.xx,t.xy,t.yx,t.yy)'
+'transform shift(pair z);'
+ translates by the pair 'z';
+'transform shift(real x, real y);'
+ translates by the pair '(x,y)';
+'transform xscale(real x);'
+ scales by 'x' in the x direction;
+'transform yscale(real y);'
+ scales by 'y' in the y direction;
+'transform scale(real s);'
+ scale by 's' in both x and y directions;
+'transform scale(real x, real y);'
+ scale by 'x' in the x direction and by 'y' in the y direction;
+'transform slant(real s);'
+ maps '(x,y)' -> '(x+s*y,y)';
+'transform rotate(real angle, pair z=(0,0));'
+ rotates by 'angle' in degrees about 'z';
+'transform reflect(pair a, pair b);'
+ reflects about the line 'a--b'.
+
+ The implicit initializer for transforms is 'identity()'. The
+routines 'shift(transform t)' and 'shiftless(transform t)' return the
+transforms '(t.x,t.y,0,0,0,0)' and '(0,0,t.xx,t.xy,t.yx,t.yy)'
respectively.

@@ -2608,25 +2602,29 @@ File: asymptote.info, Node: Frames and pictures, Next: Files, Prev: Transform
6.5 Frames and pictures
=======================
-`frame'
- Frames are canvases for drawing in `PostScript' coordinates. While
+'frame'
+ Frames are canvases for drawing in 'PostScript' coordinates. While
working with frames directly is occasionally necessary for
constructing deferred drawing routines, pictures are usually more
convenient to work with. The implicit initializer for frames is
- `newframe'. The function `bool empty(frame f)' returns `true' only
- if the frame `f' is empty. A frame may be erased with the
- `erase(frame)' routine. The functions `pair min(frame)' and `pair
- max(frame)' return the (left,bottom) and (right,top) coordinates
- of the frame bounding box, respectively. The contents of frame
- `src' may be appended to frame `dest' with the command void add(frame dest, frame src);
- or prepended with void prepend(frame dest, frame src);
- A frame obtained by aligning frame `f' in the direction `align',
- in a manner analogous to the `align' argument of `label' (*note
- label::), is returned by frame align(frame f, pair align);
-
- To draw or fill a box or ellipse around a label or frame and
- return the boundary as a path, use one of the predefined
- `envelope' routines path box(frame f, Label L="", real xmargin=0,
+ 'newframe'. The function 'bool empty(frame f)' returns 'true' only
+ if the frame 'f' is empty. A frame may be erased with the
+ 'erase(frame)' routine. The functions 'pair min(frame)' and 'pair
+ max(frame)' return the (left,bottom) and (right,top) coordinates of
+ the frame bounding box, respectively. The contents of frame 'src'
+ may be appended to frame 'dest' with the command
+ void add(frame dest, frame src);
+ or prepended with
+ void prepend(frame dest, frame src);
+ A frame obtained by aligning frame 'f' in the direction 'align', in
+ a manner analogous to the 'align' argument of 'label' (*note
+ label::), is returned by
+ frame align(frame f, pair align);
+
+ To draw or fill a box or ellipse around a label or frame and return
+ the boundary as a path, use one of the predefined 'envelope'
+ routines
+ path box(frame f, Label L="", real xmargin=0,
real ymargin=xmargin, pen p=currentpen,
filltype filltype=NoFill, bool above=true);
path roundbox(frame f, Label L="", real xmargin=0,
@@ -2636,182 +2634,196 @@ File: asymptote.info, Node: Frames and pictures, Next: Files, Prev: Transform
real ymargin=xmargin, pen p=currentpen,
filltype filltype=NoFill, bool above=true);
-`picture'
+'picture'
Pictures are high-level structures (*note Structures::) defined in
- the module `plain' that provide canvases for drawing in user
- coordinates. The default picture is called `currentpicture'. A
- new picture can be created like this: picture pic;
- Anonymous pictures can be made by the expression `new picture'.
+ the module 'plain' that provide canvases for drawing in user
+ coordinates. The default picture is called 'currentpicture'. A
+ new picture can be created like this:
+ picture pic;
+ Anonymous pictures can be made by the expression 'new picture'.
- The `size' routine specifies the dimensions of the desired picture:
+ The 'size' routine specifies the dimensions of the desired picture:
void size(picture pic=currentpicture, real x, real y=x,
bool keepAspect=Aspect);
- If the `x' and `y' sizes are both 0, user coordinates will be
- interpreted as `PostScript' coordinates. In this case, the
- transform mapping `pic' to the final output frame is `identity()'.
+ If the 'x' and 'y' sizes are both 0, user coordinates will be
+ interpreted as 'PostScript' coordinates. In this case, the
+ transform mapping 'pic' to the final output frame is 'identity()'.
- If exactly one of `x' or `y' is 0, no size restriction is imposed
+ If exactly one of 'x' or 'y' is 0, no size restriction is imposed
in that direction; it will be scaled the same as the other
direction.
- If `keepAspect' is set to `Aspect' or `true', the picture will be
- scaled with its aspect ratio preserved such that the final width
- is no more than `x' and the final height is no more than `y'.
+ If 'keepAspect' is set to 'Aspect' or 'true', the picture will be
+ scaled with its aspect ratio preserved such that the final width is
+ no more than 'x' and the final height is no more than 'y'.
- If `keepAspect' is set to `IgnoreAspect' or `false', the picture
- will be scaled in both directions so that the final width is `x'
- and the height is `y'.
+ If 'keepAspect' is set to 'IgnoreAspect' or 'false', the picture
+ will be scaled in both directions so that the final width is 'x'
+ and the height is 'y'.
- To make the user coordinates of picture `pic' represent multiples
- of `x' units in the x direction and `y' units in the y direction,
- use void unitsize(picture pic=currentpicture, real x, real y=x);
- When nonzero, these `x' and `y' values override the corresponding
- size parameters of picture `pic'.
+ To make the user coordinates of picture 'pic' represent multiples
+ of 'x' units in the x direction and 'y' units in the y direction,
+ use
+ void unitsize(picture pic=currentpicture, real x, real y=x);
+ When nonzero, these 'x' and 'y' values override the corresponding
+ size parameters of picture 'pic'.
- The routine void size(picture pic=currentpicture, real xsize, real ysize,
+ The routine
+ void size(picture pic=currentpicture, real xsize, real ysize,
pair min, pair max);
- forces the final picture scaling to map the user coordinates
- `box(min,max)' to a region of width `xsize' and height `ysize'
+ forces the final picture scaling to map the user coordinates
+ 'box(min,max)' to a region of width 'xsize' and height 'ysize'
(when these parameters are nonzero).
- Alternatively, calling the routine transform fixedscaling(picture pic=currentpicture, pair min,
+ Alternatively, calling the routine
+ transform fixedscaling(picture pic=currentpicture, pair min,
pair max, pen p=nullpen, bool warn=false);
- will cause picture `pic' to use a fixed scaling to map user
- coordinates in `box(min,max)' to the (already specified) picture
- size, taking account of the width of pen `p'. A warning will be
+ will cause picture 'pic' to use a fixed scaling to map user
+ coordinates in 'box(min,max)' to the (already specified) picture
+ size, taking account of the width of pen 'p'. A warning will be
issued if the final picture exceeds the specified size.
- A picture `pic' can be fit to a frame and output to a file
- `prefix'.`format' using image format `format' by calling the
- `shipout' function: void shipout(string prefix=defaultfilename, picture pic=currentpicture,
+ A picture 'pic' can be fit to a frame and output to a file
+ 'prefix'.'format' using image format 'format' by calling the
+ 'shipout' function:
+ void shipout(string prefix=defaultfilename, picture pic=currentpicture,
orientation orientation=orientation,
string format="", bool wait=false, bool view=true,
string options="", string script="",
light light=currentlight, projection P=currentprojection)
- The default output format, `PostScript', may be changed with the
- `-f' or `-tex' command-line options. The `options', `script', and
- `projection' parameters are only relevant for 3D pictures. If
- `defaultfilename' is an empty string, the prefix `outprefix()'
- will be used.
-
- A `shipout()' command is added implicitly at file exit if no
- previous `shipout' commands have been executed. The default page
- orientation is `Portrait'; this may be modified by changing the
- variable `orientation'. To output in landscape mode, simply set
- the variable `orientation=Landscape' or issue the command shipout(Landscape);
-
- To rotate the page by -90 degrees, use the orientation `Seascape'. The
- orientation `UpsideDown' rotates the page by 180 degrees.
-
- A picture `pic' can be explicitly fit to a frame by calling frame pic.fit(real xsize=pic.xsize, real ysize=pic.ysize,
+ The default output format, 'PostScript', may be changed with the
+ '-f' or '-tex' command-line options. The 'options', 'script', and
+ 'projection' parameters are only relevant for 3D pictures. If
+ 'defaultfilename' is an empty string, the prefix 'outprefix()' will
+ be used.
+
+ A 'shipout()' command is added implicitly at file exit if no
+ previous 'shipout' commands have been executed. The default page
+ orientation is 'Portrait'; this may be modified by changing the
+ variable 'orientation'. To output in landscape mode, simply set
+ the variable 'orientation=Landscape' or issue the command
+ shipout(Landscape);
+
+ To rotate the page by -90 degrees, use the orientation 'Seascape'.
+ The orientation 'UpsideDown' rotates the page by 180 degrees.
+
+ A picture 'pic' can be explicitly fit to a frame by calling
+ frame pic.fit(real xsize=pic.xsize, real ysize=pic.ysize,
bool keepAspect=pic.keepAspect);
- The default size and aspect ratio settings are those given to the
- `size' command (which default to `0', `0', and `true',
+ The default size and aspect ratio settings are those given to the
+ 'size' command (which default to '0', '0', and 'true',
respectively). The transformation that would currently be used to
- fit a picture `pic' to a frame is returned by the member function
- `pic.calculateTransform()'.
+ fit a picture 'pic' to a frame is returned by the member function
+ 'pic.calculateTransform()'.
In certain cases (e.g. 2D graphs) where only an approximate size
- estimate for `pic' is available, the picture fitting routine frame pic.scale(real xsize=this.xsize, real ysize=this.ysize,
+ estimate for 'pic' is available, the picture fitting routine
+ frame pic.scale(real xsize=this.xsize, real ysize=this.ysize,
bool keepAspect=this.keepAspect);
- (which scales the resulting frame, including labels and fixed-size
+ (which scales the resulting frame, including labels and fixed-size
objects) will enforce perfect compliance with the requested size
specification, but should not normally be required.
To draw a bounding box with margins around a picture, fit the
- picture to a frame using the function frame bbox(picture pic=currentpicture, real xmargin=0,
+ picture to a frame using the function
+ frame bbox(picture pic=currentpicture, real xmargin=0,
real ymargin=xmargin, pen p=currentpen,
filltype filltype=NoFill);
- Here `filltype' specifies one of the following fill types:
- `FillDraw'
+ Here 'filltype' specifies one of the following fill types:
+ 'FillDraw'
Fill the interior and draw the boundary.
- `FillDraw(real xmargin=0, real ymargin=xmargin, pen fillpen=nullpen,'
- `pen drawpen=nullpen)' If `fillpen' is `nullpen', fill with
- the drawing pen; otherwise fill with pen `fillpen'. If
- `drawpen' is `nullpen', draw the boundary with `fillpen';
- otherwise with `drawpen'. An optional margin of `xmargin' and
- `ymargin' can be specified.
+ 'FillDraw(real xmargin=0, real ymargin=xmargin, pen fillpen=nullpen,'
+ 'pen drawpen=nullpen)' If 'fillpen' is 'nullpen', fill with
+ the drawing pen; otherwise fill with pen 'fillpen'. If
+ 'drawpen' is 'nullpen', draw the boundary with 'fillpen';
+ otherwise with 'drawpen'. An optional margin of 'xmargin' and
+ 'ymargin' can be specified.
- `Fill'
+ 'Fill'
Fill the interior.
- `Fill(real xmargin=0, real ymargin=xmargin, pen p=nullpen)'
- If `p' is `nullpen', fill with the drawing pen; otherwise
- fill with pen `p'. An optional margin of `xmargin' and
- `ymargin' can be specified.
+ 'Fill(real xmargin=0, real ymargin=xmargin, pen p=nullpen)'
+ If 'p' is 'nullpen', fill with the drawing pen; otherwise fill
+ with pen 'p'. An optional margin of 'xmargin' and 'ymargin'
+ can be specified.
- `NoFill'
+ 'NoFill'
Do not fill.
- `Draw'
+ 'Draw'
Draw only the boundary.
- `Draw(real xmargin=0, real ymargin=xmargin, pen p=nullpen)'
- If `p' is `nullpen', draw the boundary with the drawing pen;
- otherwise draw with pen `p'. An optional margin of `xmargin'
- and `ymargin' can be specified.
+ 'Draw(real xmargin=0, real ymargin=xmargin, pen p=nullpen)'
+ If 'p' is 'nullpen', draw the boundary with the drawing pen;
+ otherwise draw with pen 'p'. An optional margin of 'xmargin'
+ and 'ymargin' can be specified.
- `UnFill'
+ 'UnFill'
Clip the region.
- `UnFill(real xmargin=0, real ymargin=xmargin)'
- Clip the region and surrounding margins `xmargin' and
- `ymargin'.
+ 'UnFill(real xmargin=0, real ymargin=xmargin)'
+ Clip the region and surrounding margins 'xmargin' and
+ 'ymargin'.
- `RadialShade(pen penc, pen penr)'
- Fill varying radially from `penc' at the center of the
- bounding box to `penr' at the edge.
+ 'RadialShade(pen penc, pen penr)'
+ Fill varying radially from 'penc' at the center of the
+ bounding box to 'penr' at the edge.
- `RadialShadeDraw(real xmargin=0, real ymargin=xmargin, pen penc,'
- `pen penr, pen drawpen=nullpen)' Fill with RadialShade and
+ 'RadialShadeDraw(real xmargin=0, real ymargin=xmargin, pen penc,'
+ 'pen penr, pen drawpen=nullpen)' Fill with RadialShade and
draw the boundary.
-
For example, to draw a bounding box around a picture with a 0.25 cm
- margin and output the resulting frame, use the command: shipout(bbox(0.25cm));
- A `picture' may be fit to a frame with the background color pen
- `p', using the function `bbox(p,Fill)'.
+ margin and output the resulting frame, use the command:
+ shipout(bbox(0.25cm));
+ A 'picture' may be fit to a frame with the background color pen
+ 'p', using the function 'bbox(p,Fill)'.
- The functions pair min(picture pic, user=false);
+ The functions
+ pair min(picture pic, user=false);
pair max(picture pic, user=false);
pair size(picture pic, user=false);
- calculate the bounds that picture `pic' would have if it were
+ calculate the bounds that picture 'pic' would have if it were
currently fit to a frame using its default size specification. If
- `user' is `false' the returned value is in `PostScript'
+ 'user' is 'false' the returned value is in 'PostScript'
coordinates, otherwise it is in user coordinates.
- The function pair point(picture pic=currentpicture, pair dir, bool user=true);
- is a convenient way of determining the point on the bounding box
- of `pic' in the direction `dir' relative to its center, ignoring
- the contributions from fixed-size objects (such as labels and
- arrowheads). If `user' is `true' the returned value is in user
- coordinates, otherwise it is in `PostScript' coordinates.
-
- The function pair truepoint(picture pic=currentpicture, pair dir, bool user=true);
- is identical to `point', except that it also accounts for
- fixed-size objects, using the scaling transform that picture `pic'
+ The function
+ pair point(picture pic=currentpicture, pair dir, bool user=true);
+ is a convenient way of determining the point on the bounding box of
+ 'pic' in the direction 'dir' relative to its center, ignoring the
+ contributions from fixed-size objects (such as labels and
+ arrowheads). If 'user' is 'true' the returned value is in user
+ coordinates, otherwise it is in 'PostScript' coordinates.
+
+ The function
+ pair truepoint(picture pic=currentpicture, pair dir, bool user=true);
+ is identical to 'point', except that it also accounts for
+ fixed-size objects, using the scaling transform that picture 'pic'
would have if currently fit to a frame using its default size
- specification. If `user' is `true' the returned value is in user
- coordinates, otherwise it is in `PostScript' coordinates.
+ specification. If 'user' is 'true' the returned value is in user
+ coordinates, otherwise it is in 'PostScript' coordinates.
- Sometimes it is useful to draw objects on separate pictures and
- add one picture to another using the `add' function: void add(picture src, bool group=true,
+ Sometimes it is useful to draw objects on separate pictures and add
+ one picture to another using the 'add' function:
+ void add(picture src, bool group=true,
filltype filltype=NoFill, bool above=true);
void add(picture dest, picture src, bool group=true,
filltype filltype=NoFill, bool above=true);
- The first example adds `src' to `currentpicture'; the second one
- adds `src' to `dest'. The `group' option specifies whether or not
- the graphical user interface `xasy' should treat all of the
- elements of `src' as a single entity (*note GUI::), `filltype'
- requests optional background filling or clipping, and `above'
- specifies whether to add `src' above or below existing objects.
-
- There are also routines to add a picture or frame `src' specified
- in postscript coordinates to another picture `dest' (or
- `currentpicture') about the user coordinate `position': void add(picture src, pair position, bool group=true,
+ The first example adds 'src' to 'currentpicture'; the second one
+ adds 'src' to 'dest'. The 'group' option specifies whether or not
+ the graphical user interface 'xasy' should treat all of the
+ elements of 'src' as a single entity (*note GUI::), 'filltype'
+ requests optional background filling or clipping, and 'above'
+ specifies whether to add 'src' above or below existing objects.
+
+ There are also routines to add a picture or frame 'src' specified
+ in postscript coordinates to another picture 'dest' (or
+ 'currentpicture') about the user coordinate 'position':
+ void add(picture src, pair position, bool group=true,
filltype filltype=NoFill, bool above=true);
void add(picture dest, picture src, pair position,
bool group=true, filltype filltype=NoFill, bool above=true);
@@ -2821,13 +2833,13 @@ File: asymptote.info, Node: Frames and pictures, Next: Files, Prev: Transform
pair align, bool group=true, filltype filltype=NoFill,
bool above=true);
- The optional `align' argument in the last form specifies a
+ The optional 'align' argument in the last form specifies a
direction to use for aligning the frame, in a manner analogous to
- the `align' argument of `label' (*note label::). However, one key
- difference is that when `align' is not specified, labels are
+ the 'align' argument of 'label' (*note label::). However, one key
+ difference is that when 'align' is not specified, labels are
centered, whereas frames and pictures are aligned so that their
- origin is at `position'. Illustrations of frame alignment can be
- found in the examples *note errorbars:: and *note image::. If you
+ origin is at 'position'. Illustrations of frame alignment can be
+ found in the examples *note errorbars:: and *note image::. If you
want to align three or more subpictures, group them two at a time:
picture pic1;
@@ -2851,10 +2863,12 @@ File: asymptote.info, Node: Frames and pictures, Next: Files, Prev: Transform
add(pic3.fit(),(0,0),10S);
+ [subpictures]
- Alternatively, one can use `attach' to automatically increase the
- size of picture `dest' to accommodate adding a frame `src' about
- the user coordinate `position': void attach(picture dest=currentpicture, frame src,
+ Alternatively, one can use 'attach' to automatically increase the
+ size of picture 'dest' to accommodate adding a frame 'src' about
+ the user coordinate 'position':
+ void attach(picture dest=currentpicture, frame src,
pair position=0, bool group=true,
filltype filltype=NoFill, bool above=true);
void attach(picture dest=currentpicture, frame src,
@@ -2862,41 +2876,47 @@ File: asymptote.info, Node: Frames and pictures, Next: Files, Prev: Transform
filltype filltype=NoFill, bool above=true);
To erase the contents of a picture (but not the size
- specification), use the function void erase(picture pic=currentpicture);
+ specification), use the function
+ void erase(picture pic=currentpicture);
- To save a snapshot of `currentpicture', `currentpen', and
- `currentprojection', use the function `save()'.
+ To save a snapshot of 'currentpicture', 'currentpen', and
+ 'currentprojection', use the function 'save()'.
- To restore a snapshot of `currentpicture', `currentpen', and
- `currentprojection', use the function `restore()'.
+ To restore a snapshot of 'currentpicture', 'currentpen', and
+ 'currentprojection', use the function 'restore()'.
Many further examples of picture and frame operations are provided
- in the base module `plain'.
+ in the base module 'plain'.
- It is possible to insert verbatim `PostScript' commands in a
- picture with one of the routines void postscript(picture pic=currentpicture, string s);
+ It is possible to insert verbatim 'PostScript' commands in a
+ picture with one of the routines
+ void postscript(picture pic=currentpicture, string s);
void postscript(picture pic=currentpicture, string s, pair min,
pair max)
- Here `min' and `max' can be used to specify explicit bounds
- associated with the resulting `PostScript' code.
+ Here 'min' and 'max' can be used to specify explicit bounds
+ associated with the resulting 'PostScript' code.
- Verbatim TeX commands can be inserted in the intermediate `LaTeX'
- output file with one of the functions void tex(picture pic=currentpicture, string s);
+ Verbatim TeX commands can be inserted in the intermediate 'LaTeX'
+ output file with one of the functions
+ void tex(picture pic=currentpicture, string s);
void tex(picture pic=currentpicture, string s, pair min, pair max)
- Here `min' and `max' can be used to specify explicit bounds
+ Here 'min' and 'max' can be used to specify explicit bounds
associated with the resulting TeX code.
To issue a global TeX command (such as a TeX macro definition) in
the TeX preamble (valid for the remainder of the top-level module)
- use: void texpreamble(string s);
+ use:
+ void texpreamble(string s);
The TeX environment can be reset to its initial state, clearing all
- macro definitions, with the function void texreset();
-
- The routine void usepackage(string s, string options="");
- provides a convenient abbreviation for texpreamble("\usepackage["+options+"]{"+s+"}");
- that can be used for importing `LaTeX' packages.
+ macro definitions, with the function
+ void texreset();
+ The routine
+ void usepackage(string s, string options="");
+ provides a convenient abbreviation for
+ texpreamble("\usepackage["+options+"]{"+s+"}");
+ that can be used for importing 'LaTeX' packages.

File: asymptote.info, Node: Files, Next: Variable initializers, Prev: Frames and pictures, Up: Programming
@@ -2904,54 +2924,54 @@ File: asymptote.info, Node: Files, Next: Variable initializers, Prev: Frames
6.6 Files
=========
-`Asymptote' can read and write text files (including comma-separated
+'Asymptote' can read and write text files (including comma-separated
value) files and portable XDR (External Data Representation) binary
files.
An input file must first be opened with
input(string name="", bool check=true, string comment="#", string mode="");
- reading is then done by assignment:
+ reading is then done by assignment:
file fin=input("test.txt");
real a=fin;
- If the optional boolean argument `check' is `false', no check will
-be made that the file exists. If the file does not exist or is not
-readable, the function `bool error(file)' will return `true'. The
-first character of the string `comment' specifies a comment character.
-If this character is encountered in a data file, the remainder of the
-line is ignored. When reading strings, a comment character followed
+ If the optional boolean argument 'check' is 'false', no check will be
+made that the file exists. If the file does not exist or is not
+readable, the function 'bool error(file)' will return 'true'. The first
+character of the string 'comment' specifies a comment character. If
+this character is encountered in a data file, the remainder of the line
+is ignored. When reading strings, a comment character followed
immediately by another comment character is treated as a single literal
comment character.
One can change the current working directory for read operations to
-the contents of the string `s' with the function `string cd(string s)',
-which returns the new working directory. If `string s' is empty, the
+the contents of the string 's' with the function 'string cd(string s)',
+which returns the new working directory. If 'string s' is empty, the
path is reset to the value it had at program startup.
When reading pairs, the enclosing parenthesis are optional. Strings
are also read by assignment, by reading characters up to but not
-including a newline. In addition, `Asymptote' provides the function
-`string getc(file)' to read the next character (treating the comment
+including a newline. In addition, 'Asymptote' provides the function
+'string getc(file)' to read the next character (treating the comment
character as an ordinary character) and return it as a string.
- A file named `name' can be open for output with
+ A file named 'name' can be open for output with
file output(string name="", bool update=false, string comment="#", string mode="");
- If `update=false', any existing data in the file will be erased and
-only write operations can be used on the file. If `update=true', any
+If 'update=false', any existing data in the file will be erased and only
+write operations can be used on the file. If 'update=true', any
existing data will be preserved, the position will be set to the
end-of-file, and both reading and writing operations will be enabled.
For security reasons, writing to files in directories other than the
-current directory is allowed only if the `-globalwrite' (or `-nosafe')
-command-line option is specified. The function `string mktemp(string
-s)' may be used to create and return the name of a unique temporary
-file in the current directory based on the string `s'.
+current directory is allowed only if the '-globalwrite' (or '-nosafe')
+command-line option is specified. The function 'string mktemp(string
+s)' may be used to create and return the name of a unique temporary file
+in the current directory based on the string 's'.
- There are two special files: `stdin', which reads from the keyboard,
-and `stdout', which writes to the terminal. The implicit initializer
-for files is `null'.
+ There are two special files: 'stdin', which reads from the keyboard,
+and 'stdout', which writes to the terminal. The implicit initializer
+for files is 'null'.
- Data of a built-in type `T' can be written to an output file by
-calling one of the functions
+ Data of a built-in type 'T' can be written to an output file by
+calling one of the functions
write(string s="", T x, suffix suffix=endl ... T[]);
write(file file, string s="", T x, suffix suffix=none ... T[]);
write(file file=stdout, string s="", explicit T[] x ... T[][]);
@@ -2959,63 +2979,64 @@ write(file file=stdout, T[][]);
write(file file=stdout, T[][][]);
write(suffix suffix=endl);
write(file file, suffix suffix=none);
- If `file' is not specified, `stdout' is used and terminated by default
-with a newline. If specified, the optional identifying string `s' is
-written before the data `x'. An arbitrary number of data values may be
-listed when writing scalars or one-dimensional arrays. The `suffix' may
-be one of the following: `none' (do nothing), `flush' (output buffered
-data), `endl' (terminate with a newline and flush), `newl' (terminate
-with a newline), `DOSendl' (terminate with a DOS newline and flush),
-`DOSnewl' (terminate with a DOS newline), `tab' (terminate with a tab),
-or `comma' (terminate with a comma). Here are some simple examples of
-data output:
+ If 'file' is not specified, 'stdout' is used and terminated by
+default with a newline. If specified, the optional identifying string
+'s' is written before the data 'x'. An arbitrary number of data values
+may be listed when writing scalars or one-dimensional arrays. The
+'suffix' may be one of the following: 'none' (do nothing), 'flush'
+(output buffered data), 'endl' (terminate with a newline and flush),
+'newl' (terminate with a newline), 'DOSendl' (terminate with a DOS
+newline and flush), 'DOSnewl' (terminate with a DOS newline), 'tab'
+(terminate with a tab), or 'comma' (terminate with a comma). Here are
+some simple examples of data output:
file fout=output("test.txt");
write(fout,1); // Writes "1"
write(fout); // Writes a new line
write(fout,"List: ",1,2,3); // Writes "List: 1 2 3"
- A file may be opened with `mode="xdr"', to read or write double
+
+ A file may be opened with 'mode="xdr"', to read or write double
precision (64-bit) reals and single precision (32-bit) integers in Sun
Microsystem's XDR (External Data Representation) portable binary format
-(available on all `UNIX' platforms). Alternatively, a file may also be
-opened with `mode="binary"' to read or write double precision reals and
+(available on all 'UNIX' platforms). Alternatively, a file may also be
+opened with 'mode="binary"' to read or write double precision reals and
single precision integers in the native (nonportable) machine binary
-format. The virtual member functions `file singlereal(bool b=true)'
-and `file singleint(bool b=true)' be used to change the precision of
-real and integer I/O operations, respectively, for an XDR or binary
-file `f'. Similarly, the function `file signedint(bool b=true)' can be
-used to modify the signedness of integer reads and writes for an XDR or
-binary file `f'.
-
- The virtual members `name', `mode', `singlereal', `singleint', and
-`signedint' may be used to query the respective parameters for a given
+format. The virtual member functions 'file singlereal(bool b=true)' and
+'file singleint(bool b=true)' be used to change the precision of real
+and integer I/O operations, respectively, for an XDR or binary file 'f'.
+Similarly, the function 'file signedint(bool b=true)' can be used to
+modify the signedness of integer reads and writes for an XDR or binary
+file 'f'.
+
+ The virtual members 'name', 'mode', 'singlereal', 'singleint', and
+'signedint' may be used to query the respective parameters for a given
file.
One can test a file for end-of-file with the boolean function
-`eof(file)', end-of-line with `eol(file)', and for I/O errors with
-`error(file)'. One can flush the output buffers with `flush(file)',
-clear a previous I/O error with `clear(file)', and close the file with
-`close(file)'. The function `int precision(file file=stdout, int
-digits=0)' sets the number of digits of output precision for `file' to
-`digits', provided `digits' is nonzero, and returns the previous
-precision setting. The function `int tell(file)' returns the current
-position in a file relative to the beginning. The routine `seek(file
+'eof(file)', end-of-line with 'eol(file)', and for I/O errors with
+'error(file)'. One can flush the output buffers with 'flush(file)',
+clear a previous I/O error with 'clear(file)', and close the file with
+'close(file)'. The function 'int precision(file file=stdout, int
+digits=0)' sets the number of digits of output precision for 'file' to
+'digits', provided 'digits' is nonzero, and returns the previous
+precision setting. The function 'int tell(file)' returns the current
+position in a file relative to the beginning. The routine 'seek(file
file, int pos)' can be used to change this position, where a negative
-value for the position `pos' is interpreted as relative to the
-end-of-file. For example, one can rewind a file `file' with the command
-`seek(file,0)' and position to the final character in the file with
-`seek(file,-1)'. The command `seekeof(file)' sets the position to the
+value for the position 'pos' is interpreted as relative to the
+end-of-file. For example, one can rewind a file 'file' with the command
+'seek(file,0)' and position to the final character in the file with
+'seek(file,-1)'. The command 'seekeof(file)' sets the position to the
end of the file.
- Assigning `settings.scroll=n' for a positive integer `n' requests a
-pause after every `n' output lines to `stdout'. One may then press
-`Enter' to continue to the next `n' output lines, `s' followed by
-`Enter' to scroll without further interruption, or `q' followed by
-`Enter' to quit the current output operation. If `n' is negative, the
-output scrolls a page at a time (i.e. by one less than the current
-number of display lines). The default value, `settings.scroll=0',
+ Assigning 'settings.scroll=n' for a positive integer 'n' requests a
+pause after every 'n' output lines to 'stdout'. One may then press
+'Enter' to continue to the next 'n' output lines, 's' followed by
+'Enter' to scroll without further interruption, or 'q' followed by
+'Enter' to quit the current output operation. If 'n' is negative, the
+output scrolls a page at a time (i.e. by one less than the current
+number of display lines). The default value, 'settings.scroll=0',
specifies continuous scrolling.
- The routines
+ The routines
string getstring(string name="", string default="", string prompt="",
bool store=true);
int getint(string name="", int default=0, string prompt="",
@@ -3026,38 +3047,38 @@ pair getpair(string name="", pair default=0, string prompt="",
bool store=true);
triple gettriple(string name="", triple default=(0,0,0), string prompt="",
bool store=true);
- defined in the module `plain' may be used to prompt for a value from
-`stdin' using the GNU `readline' library. If `store=true', the history
-of values for `name' is stored in the file `".asy_history_"+name'
-(*note history::). The most recent value in the history will be used to
+defined in the module 'plain' may be used to prompt for a value from
+'stdin' using the GNU 'readline' library. If 'store=true', the history
+of values for 'name' is stored in the file '".asy_history_"+name' (*note
+history::). The most recent value in the history will be used to
provide a default value for subsequent runs. The default value
-(initially `default') is displayed after `prompt'. These functions are
-based on the internal routines
+(initially 'default') is displayed after 'prompt'. These functions are
+based on the internal routines
string readline(string prompt="", string name="", bool tabcompletion=false);
void saveline(string name, string value, bool store=true);
- Here, `readline' prompts the user with the default value formatted
-according to `prompt', while `saveline' is used to save the string
-`value' in a local history named `name', optionally storing the local
-history in a file `".asy_history_"+name'.
-
- The routine `history(string name, int n=1)' can be used to look up
-the `n' most recent values (or all values up to `historylines' if
-`n=0') entered for string `name'. The routine `history(int n=0)'
-returns the interactive history. For example,
+ Here, 'readline' prompts the user with the default value formatted
+according to 'prompt', while 'saveline' is used to save the string
+'value' in a local history named 'name', optionally storing the local
+history in a file '".asy_history_"+name'.
+
+ The routine 'history(string name, int n=1)' can be used to look up
+the 'n' most recent values (or all values up to 'historylines' if 'n=0')
+entered for string 'name'. The routine 'history(int n=0)' returns the
+interactive history. For example,
write(output("transcript.asy"),history());
- outputs the interactive history to the file `transcript.asy'.
+outputs the interactive history to the file 'transcript.asy'.
- The function `int delete(string s)' deletes the file named by the
-string `s'. Unless the `-globalwrite' (or `-nosafe') option is enabled,
-the file must reside in the current directory. The function `int
-rename(string from, string to)' may be used to rename file `from' to
-file `to'. Unless the `-globalwrite' (or `-nosafe') option is enabled,
+ The function 'int delete(string s)' deletes the file named by the
+string 's'. Unless the '-globalwrite' (or '-nosafe') option is enabled,
+the file must reside in the current directory. The function 'int
+rename(string from, string to)' may be used to rename file 'from' to
+file 'to'. Unless the '-globalwrite' (or '-nosafe') option is enabled,
this operation is restricted to the current directory. The functions
int convert(string args="", string file="", string format="");
int animate(string args="", string file="", string format="");
- call the `ImageMagick' commands `convert' and `animate', respectively,
-with the arguments `args' and the file name constructed from the
-strings `file' and `format'.
+call the 'ImageMagick' commands 'convert' and 'animate', respectively,
+with the arguments 'args' and the file name constructed from the strings
+'file' and 'format'.

File: asymptote.info, Node: Variable initializers, Next: Structures, Prev: Files, Up: Programming
@@ -3065,75 +3086,67 @@ File: asymptote.info, Node: Variable initializers, Next: Structures, Prev: Fi
6.7 Variable initializers
=========================
-A variable can be assigned a value when it is declared, as in `int
-x=3;' where the variable `x' is assigned the value `3'. As well as
-literal constants such as `3', arbitary expressions can be used as
-initializers, as in `real x=2*sin(pi/2);'.
+A variable can be assigned a value when it is declared, as in 'int x=3;'
+where the variable 'x' is assigned the value '3'. As well as literal
+constants such as '3', arbitary expressions can be used as initializers,
+as in 'real x=2*sin(pi/2);'.
A variable is not added to the namespace until after the initializer
is evaluated, so for example, in
int x=2;
int x=5*x;
- the `x' in the initializer on the second line refers to the variable
-`x' declared on the first line. The second line, then, declares a
-variable `x' shadowing the original `x' and initializes it to the value
-`10'.
+the 'x' in the initializer on the second line refers to the variable 'x'
+declared on the first line. The second line, then, declares a variable
+'x' shadowing the original 'x' and initializes it to the value '10'.
Variables of most types can be declared without an explicit
initializer and they will be initialized by the default initializer of
that type:
- * Variables of the numeric types `int', `real', and `pair' are all
- initialized to zero; variables of type `triple' are initialized to
- `O=(0,0,0)'.
-
- * `boolean' variables are initialized to `false'.
-
- * `string' variables are initialized to the empty string.
-
- * `transform' variables are initialized to the identity
+ * Variables of the numeric types 'int', 'real', and 'pair' are all
+ initialized to zero; variables of type 'triple' are initialized to
+ 'O=(0,0,0)'.
+ * 'boolean' variables are initialized to 'false'.
+ * 'string' variables are initialized to the empty string.
+ * 'transform' variables are initialized to the identity
transformation.
-
- * `path' and `guide' variables are initialized to `nullpath'.
-
- * `pen' variables are initialized to the default pen.
-
- * `frame' and `picture' variables are initialized to empty frames
- and pictures, respectively.
-
- * `file' variables are initialized to `null'.
+ * 'path' and 'guide' variables are initialized to 'nullpath'.
+ * 'pen' variables are initialized to the default pen.
+ * 'frame' and 'picture' variables are initialized to empty frames and
+ pictures, respectively.
+ * 'file' variables are initialized to 'null'.
The default initializers for user-defined array, structure, and
function types are explained in their respective sections. Some types,
-such as `code', do not have default initializers. When a variable of
+such as 'code', do not have default initializers. When a variable of
such a type is introduced, the user must initialize it by explicitly
giving it a value.
- The default initializer for any type `T' can be redeclared by
-defining the function `T operator init()'. For instance, `int'
+ The default initializer for any type 'T' can be redeclared by
+defining the function 'T operator init()'. For instance, 'int'
variables are usually initialized to zero, but in
int operator init() {
return 3;
}
int y;
-the variable `y' is initialized to `3'. This example was given for
-illustrative purposes; redeclaring the initializers of built-in types
-is not recommended. Typically, `operator init' is used to define
-sensible defaults for user-defined types.
+the variable 'y' is initialized to '3'. This example was given for
+illustrative purposes; redeclaring the initializers of built-in types is
+not recommended. Typically, 'operator init' is used to define sensible
+defaults for user-defined types.
- The special type `var' may be used to infer the type of a variable
+ The special type 'var' may be used to infer the type of a variable
from its initializer. If the initializer is an expression of a unique
type, then the variable will be defined with that type. For instance,
var x=5;
var y=4.3;
var reddash=red+dashed;
- is equivalent to
+is equivalent to
int x=5;
real y=4.3;
pen reddash=red+dashed;
- `var' may also be used with the extended `for' loop syntax.
+ 'var' may also be used with the extended 'for' loop syntax.
int[] a = {1,2,3};
for (var x : a)
@@ -3146,13 +3159,13 @@ File: asymptote.info, Node: Structures, Next: Operators, Prev: Variable initi
==============
Users may also define their own data types as structures, along with
-user-defined operators, much as in C++. By default, structure members
-are `public' (may be read and modified anywhere in the code), but may be
-optionally declared `restricted' (readable anywhere but writeable only
-inside the structure where they are defined) or `private' (readable and
-writable only inside the structure). In a structure definition, the
-keyword `this' can be used as an expression to refer to the enclosing
-structure. Any code at the top-level scope within the structure is
+user-defined operators, much as in C++. By default, structure members
+are 'public' (may be read and modified anywhere in the code), but may be
+optionally declared 'restricted' (readable anywhere but writeable only
+inside the structure where they are defined) or 'private' (readable and
+writable only inside the structure). In a structure definition, the
+keyword 'this' can be used as an expression to refer to the enclosing
+structure. Any code at the top-level scope within the structure is
executed on initialization.
Variables hold references to structures. That is, in the example:
@@ -3164,16 +3177,15 @@ T foo;
T bar=foo;
bar.x=5;
- The variable `foo' holds a reference to an instance of the structure
-`T'. When `bar' is assigned the value of `foo', it too now holds a
-reference to the same instance as `foo' does. The assignment `bar.x=5'
-changes the value of the field `x' in that instance, so that `foo.x'
-will also be equal to `5'.
+ The variable 'foo' holds a reference to an instance of the structure
+'T'. When 'bar' is assigned the value of 'foo', it too now holds a
+reference to the same instance as 'foo' does. The assignment 'bar.x=5'
+changes the value of the field 'x' in that instance, so that 'foo.x'
+will also be equal to '5'.
- The expression `new T' creates a new instance of the structure `T'
-and returns a reference to that instance. In creating the new
-instance, any code in the body of the record definition is executed.
-For example:
+ The expression 'new T' creates a new instance of the structure 'T'
+and returns a reference to that instance. In creating the new instance,
+any code in the body of the record definition is executed. For example:
int Tcount=0;
struct T {
int x;
@@ -3182,14 +3194,14 @@ struct T {
T foo=new T;
T foo;
- Here, `new T' produces a new instance of the class, which causes
-`Tcount' to be incremented, tracking the number of instances produced.
-The declarations `T foo=new T' and `T foo' are equivalent: the second
-form implicitly creates a new instance of `T'. That is, after the
-definition of a structure `T', a variable of type `T' is initialized to
-a new instance (`new T') by default. During the definition of the
-structure, however, variables of type `T' are initialized to `null' by
-default. This special behaviour is to avoid infinite recursion of
+Here, 'new T' produces a new instance of the class, which causes
+'Tcount' to be incremented, tracking the number of instances produced.
+The declarations 'T foo=new T' and 'T foo' are equivalent: the second
+form implicitly creates a new instance of 'T'. That is, after the
+definition of a structure 'T', a variable of type 'T' is initialized to
+a new instance ('new T') by default. During the definition of the
+structure, however, variables of type 'T' are initialized to 'null' by
+default. This special behaviour is to avoid infinite recursion of
creating new instances in code such as
struct tree {
int value;
@@ -3197,19 +3209,19 @@ struct tree {
tree right;
}
- The expression `null' can be cast to any structure type to yield a
-null reference, a reference that does not actually refer to any
-instance of the structure. Trying to use a field of a null reference
-will cause an error.
+ The expression 'null' can be cast to any structure type to yield a
+null reference, a reference that does not actually refer to any instance
+of the structure. Trying to use a field of a null reference will cause
+an error.
- The function `bool alias(T,T)' checks to see if two structure
+ The function 'bool alias(T,T)' checks to see if two structure
references refer to the same instance of the structure (or both to
-`null'). In example at the beginning of this section, `alias(foo,bar)'
-would return true, but `alias(foo,new T)' would return false, as `new
-T' creates a new instance of the structure `T'. The boolean operators
-`==' and `!=' are by default equivalent to `alias' and `!alias'
-respectively, but may be overwritten for a particular type (for
-example, to do a deep comparison).
+'null'). In example at the beginning of this section, 'alias(foo,bar)'
+would return true, but 'alias(foo,new T)' would return false, as 'new T'
+creates a new instance of the structure 'T'. The boolean operators '=='
+and '!=' are by default equivalent to 'alias' and '!alias' respectively,
+but may be overwritten for a particular type (for example, to do a deep
+comparison).
Here is a simple example that illustrates the use of structures:
struct S {
@@ -3230,8 +3242,9 @@ S operator + (S s1, S s2)
write((s+s).f(0)); // Outputs 2
- It is often convenient to have functions that construct new
-instances of a structure. Say we have a `Person' structure:
+
+ It is often convenient to have functions that construct new instances
+of a structure. Say we have a 'Person' structure:
struct Person {
string firstname;
string lastname;
@@ -3240,12 +3253,12 @@ struct Person {
Person joe;
joe.firstname="Joe";
joe.lastname="Jones";
- Creating a new Person is a chore; it takes three lines to create a new
+Creating a new Person is a chore; it takes three lines to create a new
instance and to initialize its fields (that's still considerably less
effort than creating a new person in real life, though).
We can reduce the work by defining a constructor function
-`Person(string,string)':
+'Person(string,string)':
struct Person {
string firstname;
string lastname;
@@ -3261,11 +3274,11 @@ struct Person {
Person joe=Person.Person("Joe", "Jones");
While it is now easier than before to create a new instance, we still
-have to refer to the constructor by the qualified name `Person.Person'.
+have to refer to the constructor by the qualified name 'Person.Person'.
If we add the line
from Person unravel Person;
- immediately after the structure definition, then the constructor can
-be used without qualification: `Person joe=Person("Joe", "Jones");'.
+immediately after the structure definition, then the constructor can be
+used without qualification: 'Person joe=Person("Joe", "Jones");'.
The constructor is now easy to use, but it is quite a hassle to
define. If you write a lot of constructors, you will find that you are
@@ -3274,11 +3287,11 @@ neighbourhood Asymptote developers have devised a way to automate much
of the process.
If, in the body of a structure, Asymptote encounters the definition
-of a function of the form `void operator init(ARGS)', it implicitly
-defines a constructor function of the arguments `ARGS' that uses the
-`void operator init' function to initialize a new instance of the
+of a function of the form 'void operator init(ARGS)', it implicitly
+defines a constructor function of the arguments 'ARGS' that uses the
+'void operator init' function to initialize a new instance of the
structure. That is, it essentially defines the following constructor
-(assuming the structure is called `Foo'):
+(assuming the structure is called 'Foo'):
static Foo Foo(ARGS) {
Foo instance;
@@ -3288,7 +3301,7 @@ structure. That is, it essentially defines the following constructor
This constructor is also implicitly copied to the enclosing scope
after the end of the structure definition, so that it can used
-subsequently without qualifying it by the structure name. Our `Person'
+subsequently without qualifying it by the structure name. Our 'Person'
example can thus be implemented as:
struct Person {
string firstname;
@@ -3302,21 +3315,21 @@ struct Person {
Person joe=Person("Joe", "Jones");
- The use of `operator init' to implicitly define constructors should
+ The use of 'operator init' to implicitly define constructors should
not be confused with its use to define default values for variables
(*note Variable initializers::). Indeed, in the first case, the return
-type of the `operator init' must be `void' while in the second, it must
-be the (non-`void') type of the variable.
-
- The function `cputime()' returns a structure `cputime' with
-cumulative CPU times broken down into the fields `parent.user',
-`parent.system', `child.user', and `child.system'. For convenience, the
-incremental fields `change.user' and `change.system' indicate the
-change in the corresponding total parent and child CPU times since the
-last call to `cputime()'. The function
+type of the 'operator init' must be 'void' while in the second, it must
+be the (non-'void') type of the variable.
+
+ The function 'cputime()' returns a structure 'cputime' with
+cumulative CPU times broken down into the fields 'parent.user',
+'parent.system', 'child.user', and 'child.system'. For convenience, the
+incremental fields 'change.user' and 'change.system' indicate the change
+in the corresponding total parent and child CPU times since the last
+call to 'cputime()'. The function
void write(file file=stdout, string s="", cputime c,
string format=cputimeformat, suffix suffix=none);
- displays the incremental user cputime followed by "u", the incremental
+displays the incremental user cputime followed by "u", the incremental
system cputime followed by "s", the total user cputime followed by "U",
and the total system cputime followed by "S".
@@ -3353,8 +3366,8 @@ c.f(); // Outputs 1;
write(c.parent.x); // Outputs 2;
write(c.y); // Outputs 3;
- For further examples of structures, see `Legend' and `picture' in
-the `Asymptote' base module `plain'.
+ For further examples of structures, see 'Legend' and 'picture' in the
+'Asymptote' base module 'plain'.

File: asymptote.info, Node: Operators, Next: Implicit scaling, Prev: Structures, Up: Programming
@@ -3374,83 +3387,66 @@ File: asymptote.info, Node: Arithmetic & logical, Next: Self & prefix operator
6.9.1 Arithmetic & logical operators
------------------------------------
-`Asymptote' uses the standard binary arithmetic operators. However,
+'Asymptote' uses the standard binary arithmetic operators. However,
when one integer is divided by another, both arguments are converted to
real values before dividing and a real quotient is returned (since this
-is usually what is intended). The function `int quotient(int x, int y)'
-returns the greatest integer less than or equal to `x/y'. In all other
+is usually what is intended). The function 'int quotient(int x, int y)'
+returns the greatest integer less than or equal to 'x/y'. In all other
cases both operands are promoted to the same type, which will also be
the type of the result:
-`+'
- addition
-
-`-'
- subtraction
-
-`*'
- multiplication
-
-`/'
- division
-
-`%'
+'+'
+ addition
+'-'
+ subtraction
+'*'
+ multiplication
+'/'
+ division
+'%'
modulo; the result always has the same sign as the divisor. In
- particular, this makes `q*quotient(p,q)+p%q == p' for all integers
- `p' and nonzero integers `q'.
-
-`^'
+ particular, this makes 'q*quotient(p,q)+p%q == p' for all integers
+ 'p' and nonzero integers 'q'.
+'^'
power; if the exponent (second argument) is an int, recursive
multiplication is used; otherwise, logarithms and exponentials are
- used (`**' is a synonym for `^').
-
+ used ('**' is a synonym for '^').
The usual boolean operators are also defined:
-`=='
- equals
-
-`!='
- not equals
-
-`<'
- less than
-
-`<='
- less than or equals
-
-`>='
- greater than or equals
-
-`>'
- greater than
-
-`&&'
- and (with conditional evaluation of right-hand argument)
-
-`&'
- and
-
-`||'
- or (with conditional evaluation of right-hand argument)
-
-`|'
- or
-
-`^'
- xor
-
-`!'
+'=='
+ equals
+'!='
+ not equals
+'<'
+ less than
+'<='
+ less than or equals
+'>='
+ greater than or equals
+'>'
+ greater than
+'&&'
+ and (with conditional evaluation of right-hand argument)
+'&'
+ and
+'||'
+ or (with conditional evaluation of right-hand argument)
+'|'
+ or
+'^'
+ xor
+'!'
not
- `Asymptote' also supports the C-like conditional syntax:
+ 'Asymptote' also supports the C-like conditional syntax:
bool positive=(pi > 0) ? true : false;
- The function `T interp(T a, T b, real t)' returns `(1-t)*a+t*b' for
-nonintegral built-in arithmetic types `T'. If `a' and `b' are pens,
+ The function 'T interp(T a, T b, real t)' returns '(1-t)*a+t*b' for
+nonintegral built-in arithmetic types 'T'. If 'a' and 'b' are pens,
they are first promoted to the same color space.
- `Asymptote' also defines bitwise functions `int AND(int,int)', `int
-OR(int,int)', `int XOR(int,int)', `int NOT(int)', `int CLZ(int)' (count
-leading zeros), and `int CTZ(int)' (count trailing zeros).
+ 'Asymptote' also defines bitwise functions 'int AND(int,int)', 'int
+OR(int,int)', 'int XOR(int,int)', 'int NOT(int)', 'int CLZ(int)' (count
+leading zeros), and 'int CTZ(int)' (count trailing zeros).

File: asymptote.info, Node: Self & prefix operators, Next: User-defined operators, Prev: Arithmetic & logical, Up: Operators
@@ -3458,9 +3454,9 @@ File: asymptote.info, Node: Self & prefix operators, Next: User-defined operat
6.9.2 Self & prefix operators
-----------------------------
-As in C, each of the arithmetic operators `+', `-', `*', `/', `%', and
-`^' can be used as a self operator. The prefix operators `++'
-(increment by one) and `--' (decrement by one) are also defined. For
+As in C, each of the arithmetic operators '+', '-', '*', '/', '%', and
+'^' can be used as a self operator. The prefix operators '++'
+(increment by one) and '--' (decrement by one) are also defined. For
example,
int i=1;
i += 2;
@@ -3471,11 +3467,11 @@ int i=1;
i=i+2;
int j=i=i+1;
- However, postfix operators like `i++' and `i--' are not defined
-(because of the inherent ambiguities that would arise with the `--'
-path-joining operator). In the rare instances where `i++' and `i--' are
-really needed, one can substitute the expressions `(++i-1)' and
-`(--i+1)', respectively.
+ However, postfix operators like 'i++' and 'i--' are not defined
+(because of the inherent ambiguities that would arise with the '--'
+path-joining operator). In the rare instances where 'i++' and 'i--' are
+really needed, one can substitute the expressions '(++i-1)' and
+'(--i+1)', respectively.

File: asymptote.info, Node: User-defined operators, Prev: Self & prefix operators, Up: Operators
@@ -3483,14 +3479,14 @@ File: asymptote.info, Node: User-defined operators, Prev: Self & prefix operat
6.9.3 User-defined operators
----------------------------
-The following symbols may be used with `operator' to define or redefine
+The following symbols may be used with 'operator' to define or redefine
operators on structures and built-in types:
- + * / % ^ ! < > == != <= >= & | ^^ .. :: -- --- ++
<< >> $ $$ @ @@
- The operators on the second line have precedence one higher than the
-boolean operators `<', `>', `<=', and `>='.
+The operators on the second line have precedence one higher than the
+boolean operators '<', '>', '<=', and '>='.
- Guide operators like `..' may be overloaded, say, to write a user
+ Guide operators like '..' may be overloaded, say, to write a user
function that produces a new guide from a given guide:
guide dots(... guide[] g)=operator ..;
@@ -3554,28 +3550,31 @@ File: asymptote.info, Node: Functions, Next: Arrays, Prev: Implicit scaling,
6.11 Functions
==============
-`Asymptote' functions are treated as variables with a signature
-(non-function variables have null signatures). Variables with the same
+'Asymptote' functions are treated as variables with a signature
+(non-function variables have null signatures). Variables with the same
name are allowed, so long as they have distinct signatures.
- Functions arguments are passed by value. To pass an argument by
+ Functions arguments are passed by value. To pass an argument by
reference, simply enclose it in a structure (*note Structures::).
- Here are some significant features of `Asymptote' functions:
+ Here are some significant features of 'Asymptote' functions:
1. Variables with signatures (functions) and without signatures
- (nonfunction variables) are distinct: int x, x();
+ (nonfunction variables) are distinct:
+ int x, x();
x=5;
x=new int() {return 17;};
x=x(); // calls x() and puts the result, 17, in the scalar x
- 2. Traditional function definitions are allowed: int sqr(int x)
+ 2. Traditional function definitions are allowed:
+ int sqr(int x)
{
return x*x;
}
sqr=null; // but the function is still just a variable.
- 3. Casting can be used to resolve ambiguities: int a, a(), b, b(); // Valid: creates four variables.
+ 3. Casting can be used to resolve ambiguities:
+ int a, a(), b, b(); // Valid: creates four variables.
a=b; // Invalid: assignment is ambiguous.
a=(int) b; // Valid: resolves ambiguity.
(int) (a=b); // Valid: resolves ambiguity.
@@ -3584,7 +3583,8 @@ reference, simply enclose it in a structure (*note Structures::).
int c();
c=a; // Valid: only one possible assignment.
- 4. Anonymous (so-called "high-order") functions are also allowed: typedef int intop(int);
+ 4. Anonymous (so-called "high-order") functions are also allowed:
+ typedef int intop(int);
intop adder(int m)
{
return new int(int n) {return m+n;};
@@ -3592,11 +3592,12 @@ reference, simply enclose it in a structure (*note Structures::).
intop addby7=adder(7);
write(addby7(1)); // Writes 8.
- 5. One may redefine a function `f', even for calls to `f' in
+ 5. One may redefine a function 'f', even for calls to 'f' in
previously declared functions, by assigning another (anonymous or
- named) function to it. However, if `f' is overloaded by a new
+ named) function to it. However, if 'f' is overloaded by a new
function definition, previous calls will still access the original
- version of `f', as illustrated in this example: void f() {
+ version of 'f', as illustrated in this example:
+ void f() {
write("hi");
}
@@ -3617,7 +3618,8 @@ reference, simply enclose it in a structure (*note Structures::).
6. Anonymous functions can be used to redefine a function variable
that has been declared (and implicitly initialized to the null
- function) but not yet explicitly defined: void f(bool b);
+ function) but not yet explicitly defined:
+ void f(bool b);
void g(bool b) {
if(b) f(b);
@@ -3631,15 +3633,14 @@ reference, simply enclose it in a structure (*note Structures::).
g(true); // Writes true, then writes false.
-
- `Asymptote' is the only language we know of that treats functions as
+ 'Asymptote' is the only language we know of that treats functions as
variables, but allows overloading by distinguishing variables based on
their signatures.
- Functions are allowed to call themselves recursively. As in C++,
+ Functions are allowed to call themselves recursively. As in C++,
infinite nested recursion will generate a stack overflow (reported as a
segmentation fault, unless a fully working version of the GNU library
-`libsigsegv' (e.g. 2.4 or later) is installed at configuration time).
+'libsigsegv' (e.g. 2.4 or later) is installed at configuration time).
* Menu:
@@ -3654,17 +3655,17 @@ File: asymptote.info, Node: Default arguments, Next: Named arguments, Up: Fun
6.11.1 Default arguments
------------------------
-`Asymptote' supports a more flexible mechanism for default function
+'Asymptote' supports a more flexible mechanism for default function
arguments than C++: they may appear anywhere in the function prototype.
Because certain data types are implicitly cast to more sophisticated
types (*note Casts::) one can often avoid ambiguities by ordering
function arguments from the simplest to the most complicated. For
example, given
real f(int a=1, real b=0) {return a+b;}
- then `f(1)' returns 1.0, but `f(1.0)' returns 2.0.
+then 'f(1)' returns 1.0, but 'f(1.0)' returns 2.0.
- The value of a default argument is determined by evaluating the
-given `Asymptote' expression in the scope where the called function is
+ The value of a default argument is determined by evaluating the given
+'Asymptote' expression in the scope where the called function is
defined.

@@ -3674,42 +3675,42 @@ File: asymptote.info, Node: Named arguments, Next: Rest arguments, Prev: Defa
----------------------
It is sometimes difficult to remember the order in which arguments
-appear in a function declaration. Named (keyword) arguments make calling
-functions with multiple arguments easier. Unlike in the C and C++
-languages, an assignment in a function argument is interpreted as an
+appear in a function declaration. Named (keyword) arguments make
+calling functions with multiple arguments easier. Unlike in the C and
+C++ languages, an assignment in a function argument is interpreted as an
assignment to a parameter of the same name in the function signature,
-_not within the local scope_. The command-line option `-d' may be used
-to check `Asymptote' code for cases where a named argument may be
+_not within the local scope_. The command-line option '-d' may be used
+to check 'Asymptote' code for cases where a named argument may be
mistaken for a local assignment.
When matching arguments to signatures, first all of the keywords are
matched, then the arguments without names are matched against the
-unmatched formals as usual. For example,
+unmatched formals as usual. For example,
int f(int x, int y) {
return 10x+y;
}
write(f(4,x=3));
- outputs 34, as `x' is already matched when we try to match the unnamed
-argument `4', so it gets matched to the next item, `y'.
+outputs 34, as 'x' is already matched when we try to match the unnamed
+argument '4', so it gets matched to the next item, 'y'.
For the rare occasions where it is desirable to assign a value to
local variable within a function argument (generally _not_ a good
programming practice), simply enclose the assignment in parentheses.
-For example, given the definition of `f' in the previous example,
+For example, given the definition of 'f' in the previous example,
int x;
write(f(4,(x=3)));
- is equivalent to the statements
+is equivalent to the statements
int x;
x=3;
write(f(4,3));
- and outputs 43.
+and outputs 43.
- Parameters can be specified as "keyword-only" by putting `keyword'
-immediately before the parameter name, as in `int f(int keyword x)' or
-`int f(int keyword x=77)'. This forces the caller of the function to
+ Parameters can be specified as "keyword-only" by putting 'keyword'
+immediately before the parameter name, as in 'int f(int keyword x)' or
+'int f(int keyword x=77)'. This forces the caller of the function to
use a named argument to give a value for this parameter. That is,
-`f(x=42)' is legal, but `f(25)' is not. Keyword-only parameters must
-be listed after normal parameters in a function definition.
+'f(x=42)' is legal, but 'f(25)' is not. Keyword-only parameters must be
+listed after normal parameters in a function definition.
As a technical detail, we point out that, since variables of the same
name but different signatures are allowed in the same scope, the code
@@ -3717,16 +3718,16 @@ int f(int x, int x()) {
return x+x();
}
int seven() {return 7;}
- is legal in `Asymptote', with `f(2,seven)' returning 9. A named
+is legal in 'Asymptote', with 'f(2,seven)' returning 9. A named
argument matches the first unmatched formal of the same name, so
-`f(x=2,x=seven)' is an equivalent call, but `f(x=seven,2)' is not, as
-the first argument is matched to the first formal, and `int ()' cannot
-be implicitly cast to `int'. Default arguments do not affect which
-formal a named argument is matched to, so if `f' were defined as
+'f(x=2,x=seven)' is an equivalent call, but 'f(x=seven,2)' is not, as
+the first argument is matched to the first formal, and 'int ()' cannot
+be implicitly cast to 'int'. Default arguments do not affect which
+formal a named argument is matched to, so if 'f' were defined as
int f(int x=3, int x()) {
return x+x();
}
- then `f(x=seven)' would be illegal, even though `f(seven)' obviously
+then 'f(x=seven)' would be illegal, even though 'f(seven)' obviously
would be allowed.

@@ -3760,7 +3761,7 @@ subtract(10); // returns 10
subtract(); // illegal
Putting an argument into a rest array is called _packing_. One can
-give an explicit list of arguments for the rest argument, so `subtract'
+give an explicit list of arguments for the rest argument, so 'subtract'
could alternatively be implemented as
int subtract(int start ... int[] subs) {
return start - sum(... subs);
@@ -3768,33 +3769,32 @@ int subtract(int start ... int[] subs) {
One can even combine normal arguments with rest arguments:
sum(1,2,3 ... new int[] {4,5,6}); // returns 21
- This builds a new six-element array that is passed to `sum' as `nums'.
+This builds a new six-element array that is passed to 'sum' as 'nums'.
The opposite operation, _unpacking_, is not allowed:
subtract(... new int[] {10, 1, 2});
- is illegal, as the start formal is not matched.
+is illegal, as the start formal is not matched.
If no arguments are packed, then a zero-length array (as opposed to
-`null') is bound to the rest parameter. Note that default arguments are
+'null') is bound to the rest parameter. Note that default arguments are
ignored for rest formals and the rest argument is not bound to a
keyword.
- In some cases, keyword-only parameters are helpful to avoid
-arguments intended for the rest parameter to be assigned to other
-parameters. For example, here the use of `keyword' is to avoid
-`pnorm(1.0,2.0,0.3)' matching `1.0' to `p'.
+ In some cases, keyword-only parameters are helpful to avoid arguments
+intended for the rest parameter to be assigned to other parameters. For
+example, here the use of 'keyword' is to avoid 'pnorm(1.0,2.0,0.3)'
+matching '1.0' to 'p'.
real pnorm(real keyword p=2.0 ... real[] v)
{
return sum(v^p)^(1/p);
}
- The overloading resolution in `Asymptote' is similar to the function
-matching rules used in C++. Every argument match is given a score.
+ The overloading resolution in 'Asymptote' is similar to the function
+matching rules used in C++. Every argument match is given a score.
Exact matches score better than matches with casting, and matches with
formals (regardless of casting) score better than packing an argument
into the rest array. A candidate is maximal if all of the arguments
-score as well in it as with any other candidate. If there is one
-unique maximal candidate, it is chosen; otherwise, there is an
-ambiguity error.
+score as well in it as with any other candidate. If there is one unique
+maximal candidate, it is chosen; otherwise, there is an ambiguity error.
int f(path g);
int f(guide g);
@@ -3824,87 +3824,86 @@ File: asymptote.info, Node: Mathematical functions, Prev: Rest arguments, Up:
6.11.4 Mathematical functions
-----------------------------
-`Asymptote' has built-in versions of the standard `libm' mathematical
-real(real) functions `sin', `cos', `tan', `asin', `acos', `atan',
-`exp', `log', `pow10', `log10', `sinh', `cosh', `tanh', `asinh',
-`acosh', `atanh', `sqrt', `cbrt', `fabs', `expm1', `log1p', as well as
-the identity function `identity'. `Asymptote' also defines the order
-`n' Bessel functions of the first kind `Jn(int n, real)' and second kind
-`Yn(int n, real)', as well as the gamma function `gamma', the error
-function `erf', and the complementary error function `erfc'. The
-standard real(real, real) functions `atan2', `hypot', `fmod',
-`remainder' are also included.
-
- The functions `degrees(real radians)' and `radians(real degrees)'
-can be used to convert between radians and degrees. The function
-`Degrees(real radians)' returns the angle in degrees in the interval
-[0,360). For convenience, `Asymptote' defines variants `Sin', `Cos',
-`Tan', `aSin', `aCos', and `aTan' of the standard trigonometric
+'Asymptote' has built-in versions of the standard 'libm' mathematical
+real(real) functions 'sin', 'cos', 'tan', 'asin', 'acos', 'atan', 'exp',
+'log', 'pow10', 'log10', 'sinh', 'cosh', 'tanh', 'asinh', 'acosh',
+'atanh', 'sqrt', 'cbrt', 'fabs', 'expm1', 'log1p', as well as the
+identity function 'identity'. 'Asymptote' also defines the order 'n'
+Bessel functions of the first kind 'Jn(int n, real)' and second kind
+'Yn(int n, real)', as well as the gamma function 'gamma', the error
+function 'erf', and the complementary error function 'erfc'. The
+standard real(real, real) functions 'atan2', 'hypot', 'fmod',
+'remainder' are also included.
+
+ The functions 'degrees(real radians)' and 'radians(real degrees)' can
+be used to convert between radians and degrees. The function
+'Degrees(real radians)' returns the angle in degrees in the interval
+[0,360). For convenience, 'Asymptote' defines variants 'Sin', 'Cos',
+'Tan', 'aSin', 'aCos', and 'aTan' of the standard trigonometric
functions that use degrees rather than radians. We also define complex
-versions of the `sqrt', `sin', `cos', `exp', `log', and `gamma'
+versions of the 'sqrt', 'sin', 'cos', 'exp', 'log', and 'gamma'
functions.
- The functions `floor', `ceil', and `round' differ from their usual
+ The functions 'floor', 'ceil', and 'round' differ from their usual
definitions in that they all return an int value rather than a real
-(since that is normally what one wants). The functions `Floor',
-`Ceil', and `Round' are respectively similar, except that if the result
-cannot be converted to a valid int, they return `intMax' for positive
-arguments and `intMin' for negative arguments, rather than generating
-an integer overflow. We also define a function `sgn', which returns
-the sign of its real argument as an integer (-1, 0, or 1).
-
- There is an `abs(int)' function, as well as an `abs(real)' function
-(equivalent to `fabs(real)'), an `abs(pair)' function (equivalent to
-`length(pair)').
-
- Random numbers can be seeded with `srand(int)' and generated with
-the `int rand()' function, which returns a random integer between 0 and
-the integer `randMax'. The `unitrand()' function returns a random
-number uniformly distributed in the interval [0,1]. A Gaussian random
-number generator `Gaussrand' and a collection of statistics routines,
-including `histogram', are provided in the base file `stats.asy'. The
-functions `factorial(int n)', which returns n!, and `choose(int n, int
-k)', which returns n!/(k!(n-k)!), are also defined.
+(since that is normally what one wants). The functions 'Floor', 'Ceil',
+and 'Round' are respectively similar, except that if the result cannot
+be converted to a valid int, they return 'intMax' for positive arguments
+and 'intMin' for negative arguments, rather than generating an integer
+overflow. We also define a function 'sgn', which returns the sign of
+its real argument as an integer (-1, 0, or 1).
+
+ There is an 'abs(int)' function, as well as an 'abs(real)' function
+(equivalent to 'fabs(real)'), an 'abs(pair)' function (equivalent to
+'length(pair)').
+
+ Random numbers can be seeded with 'srand(int)' and generated with the
+'int rand()' function, which returns a random integer between 0 and the
+integer 'randMax'. The 'unitrand()' function returns a random number
+uniformly distributed in the interval [0,1]. A Gaussian random number
+generator 'Gaussrand' and a collection of statistics routines, including
+'histogram', are provided in the base file 'stats.asy'. The functions
+'factorial(int n)', which returns n!, and 'choose(int n, int k)', which
+returns n!/(k!(n-k)!), are also defined.
When configured with the GNU Scientific Library (GSL), available from
-`http://www.gnu.org/software/gsl/', `Asymptote' contains an internal
-module `gsl' that defines the airy functions `Ai(real)', `Bi(real)',
-`Ai_deriv(real)', `Bi_deriv(real)', `zero_Ai(int)', `zero_Bi(int)',
-`zero_Ai_deriv(int)', `zero_Bi_deriv(int)', the Bessel functions
-`I(int, real)', `K(int, real)', `j(int, real)', `y(int, real)',
-`i_scaled(int, real)', `k_scaled(int, real)', `J(real, real)', `Y(real,
-real)', `I(real, real)', `K(real, real)', `zero_J(real, int)', the
-elliptic functions `F(real, real)', `E(real, real)', and `P(real,
-real)', the Jacobi elliptic functions `real[] sncndn(real,real)', the
-exponential/trigonometric integrals `Ei', `Si', and `Ci', the Legendre
-polynomials `Pl(int, real)', and the Riemann zeta function
-`zeta(real)'. For example, to compute the sine integral `Si' of 1.0:
+<http://www.gnu.org/software/gsl/>, 'Asymptote' contains an internal
+module 'gsl' that defines the airy functions 'Ai(real)', 'Bi(real)',
+'Ai_deriv(real)', 'Bi_deriv(real)', 'zero_Ai(int)', 'zero_Bi(int)',
+'zero_Ai_deriv(int)', 'zero_Bi_deriv(int)', the Bessel functions 'I(int,
+real)', 'K(int, real)', 'j(int, real)', 'y(int, real)', 'i_scaled(int,
+real)', 'k_scaled(int, real)', 'J(real, real)', 'Y(real, real)',
+'I(real, real)', 'K(real, real)', 'zero_J(real, int)', the elliptic
+functions 'F(real, real)', 'E(real, real)', and 'P(real, real)', the
+Jacobi elliptic functions 'real[] sncndn(real,real)', the
+exponential/trigonometric integrals 'Ei', 'Si', and 'Ci', the Legendre
+polynomials 'Pl(int, real)', and the Riemann zeta function 'zeta(real)'.
+For example, to compute the sine integral 'Si' of 1.0:
import gsl;
write(Si(1.0));
- `Asymptote' also provides a few general purpose numerical routines:
+ 'Asymptote' also provides a few general purpose numerical routines:
-``real newton(int iterations=100, real f(real), real fprime(real), real x, bool verbose=false);''
+'real newton(int iterations=100, real f(real), real fprime(real), real x, bool verbose=false);'
Use Newton-Raphson iteration to solve for a root of a real-valued
- differentiable function `f', given its derivative `fprime' and an
- initial guess `x'. Diagnostics for each iteration are printed if
- `verbose=true'. If the iteration fails after the maximum allowed
- number of loops (`iterations'), `realMax' is returned.
+ differentiable function 'f', given its derivative 'fprime' and an
+ initial guess 'x'. Diagnostics for each iteration are printed if
+ 'verbose=true'. If the iteration fails after the maximum allowed
+ number of loops ('iterations'), 'realMax' is returned.
-``real newton(int iterations=100, real f(real), real fprime(real), real x1, real x2, bool verbose=false);''
+'real newton(int iterations=100, real f(real), real fprime(real), real x1, real x2, bool verbose=false);'
Use bracketed Newton-Raphson bisection to solve for a root of a
- real-valued differentiable function `f' within an interval
- [`x1',`x2'] (on which the endpoint values of `f' have opposite
- signs), given its derivative `fprime'. Diagnostics for each
- iteration are printed if `verbose=true'. If the iteration fails
- after the maximum allowed number of loops (`iterations'),
- `realMax' is returned.
-
-``real simpson(real f(real), real a, real b, real acc=realEpsilon, real dxmax=b-a)''
- returns the integral of `f' from `a' to `b' using adaptive Simpson
+ real-valued differentiable function 'f' within an interval
+ ['x1','x2'] (on which the endpoint values of 'f' have opposite
+ signs), given its derivative 'fprime'. Diagnostics for each
+ iteration are printed if 'verbose=true'. If the iteration fails
+ after the maximum allowed number of loops ('iterations'), 'realMax'
+ is returned.
+
+'real simpson(real f(real), real a, real b, real acc=realEpsilon, real dxmax=b-a)'
+ returns the integral of 'f' from 'a' to 'b' using adaptive Simpson
integration.
-

File: asymptote.info, Node: Arrays, Next: Casts, Prev: Functions, Up: Programming
@@ -3915,79 +3914,70 @@ File: asymptote.info, Node: Arrays, Next: Casts, Prev: Functions, Up: Progra
* Slices:: Python-style array slices
- Appending `[]' to a built-in or user-defined type yields an array.
-The array element `i' of an array `A' can be accessed as `A[i]'. By
+Appending '[]' to a built-in or user-defined type yields an array. The
+array element 'i' of an array 'A' can be accessed as 'A[i]'. By
default, attempts to access or assign to an array element using a
-negative index generates an error. Reading an array element with an
+negative index generates an error. Reading an array element with an
index beyond the length of the array also generates an error; however,
-assignment to an element beyond the length of the array causes the
-array to be resized to accommodate the new element. One can also index
-an array `A' with an integer array `B': the array `A[B]' is formed by
-indexing array `A' with successive elements of array `B'. A convenient
-Java-style shorthand exists for iterating over all elements of an
-array; see *note array iteration::.
+assignment to an element beyond the length of the array causes the array
+to be resized to accommodate the new element. One can also index an
+array 'A' with an integer array 'B': the array 'A[B]' is formed by
+indexing array 'A' with successive elements of array 'B'. A convenient
+Java-style shorthand exists for iterating over all elements of an array;
+see *note array iteration::.
The declaration
real[] A;
-initializes `A' to be an empty (zero-length) array. Empty arrays should
-be distinguished from null arrays. If we say
+initializes 'A' to be an empty (zero-length) array. Empty arrays should
+be distinguished from null arrays. If we say
real[] A=null;
-then `A' cannot be dereferenced at all (null arrays have no length and
+then 'A' cannot be dereferenced at all (null arrays have no length and
cannot be read from or assigned to).
Arrays can be explicitly initialized like this:
real[] A={0,1,2};
- Array assignment in `Asymptote' does a shallow copy: only the
-pointer is copied (if one copy if modified, the other will be too).
-The `copy' function listed below provides a deep copy of an array.
-
- Every array `A' of type `T[]' has the virtual members
- * `int length',
-
- * `int cyclic',
-
- * `int[] keys',
-
- * `T push(T x)',
-
- * `void append(T[] a)',
-
- * `T pop()',
-
- * `void insert(int i ... T[] x)',
-
- * `void delete(int i, int j=i)',
-
- * `void delete()', and
-
- * `bool initialized(int n)'.
-
- The member `A.length' evaluates to the length of the array. Setting
-`A.cyclic=true' signifies that array indices should be reduced modulo
-the current array length. Reading from or writing to a nonempty cyclic
+ Array assignment in 'Asymptote' does a shallow copy: only the pointer
+is copied (if one copy if modified, the other will be too). The 'copy'
+function listed below provides a deep copy of an array.
+
+ Every array 'A' of type 'T[]' has the virtual members
+ * 'int length',
+ * 'int cyclic',
+ * 'int[] keys',
+ * 'T push(T x)',
+ * 'void append(T[] a)',
+ * 'T pop()',
+ * 'void insert(int i ... T[] x)',
+ * 'void delete(int i, int j=i)',
+ * 'void delete()', and
+ * 'bool initialized(int n)'.
+
+ The member 'A.length' evaluates to the length of the array. Setting
+'A.cyclic=true' signifies that array indices should be reduced modulo
+the current array length. Reading from or writing to a nonempty cyclic
array never leads to out-of-bounds errors or array resizing.
- The member `A.keys' evaluates to an array of integers containing the
+ The member 'A.keys' evaluates to an array of integers containing the
indices of initialized entries in the array in ascending order. Hence,
-for an array of length `n' with all entries initialized, `A.keys'
-evaluates to `{0,1,...,n-1}'. A new keys array is produced each time
-`A.keys' is evaluated.
-
- The functions `A.push' and `A.append' append their arguments onto
-the end of the array, while `A.insert(int i ... T[] x)' inserts `x'
-into the array at index `i'. For convenience `A.push' returns the
-pushed item. The function `A.pop()' pops and returns the last element,
-while `A.delete(int i, int j=i)' deletes elements with indices in the
-range [`i',`j'], shifting the position of all higher-indexed elements
-down. If no arguments are given, `A.delete()' provides a convenient way
-of deleting all elements of `A'. The routine `A.initialized(int n)' can
-be used to examine whether the element at index `n' is initialized.
-Like all `Asymptote' functions, `push', `append', `pop', `insert',
-`delete', and `initialized' can be "pulled off" of the array and used
-on their own. For example,
+for an array of length 'n' with all entries initialized, 'A.keys'
+evaluates to '{0,1,...,n-1}'. A new keys array is produced each time
+'A.keys' is evaluated.
+
+ The functions 'A.push' and 'A.append' append their arguments onto the
+end of the array, while 'A.insert(int i ... T[] x)' inserts 'x' into the
+array at index 'i'. For convenience 'A.push' returns the pushed item.
+The function 'A.pop()' pops and returns the last element, while
+'A.delete(int i, int j=i)' deletes elements with indices in the range
+['i','j'], shifting the position of all higher-indexed elements down.
+If no arguments are given, 'A.delete()' provides a convenient way of
+deleting all elements of 'A'. The routine 'A.initialized(int n)' can be
+used to examine whether the element at index 'n' is initialized. Like
+all 'Asymptote' functions, 'push', 'append', 'pop', 'insert', 'delete',
+and 'initialized' can be "pulled off" of the array and used on their
+own. For example,
int[] A={1};
A.push(2); // A now contains {1,2}.
A.append(A); // A now contains {1,2,1,2}.
@@ -4001,160 +3991,158 @@ A.insert(1,3); // A now contains {2,3}.
A.insert(1 ... A); // A now contains {2,2,3,3}
A.insert(2,4,5); // A now contains {2,2,4,5,3,3}.
- The `[]' suffix can also appear after the variable name; this is
-sometimes convenient for declaring a list of variables and arrays of
-the same type:
+ The '[]' suffix can also appear after the variable name; this is
+sometimes convenient for declaring a list of variables and arrays of the
+same type:
real a,A[];
- This declares `a' to be `real' and implicitly declares `A' to be of
-type `real[]'.
+This declares 'a' to be 'real' and implicitly declares 'A' to be of type
+'real[]'.
- In the following list of built-in array functions, `T' represents a
-generic type. Note that the internal functions `alias', `array',
-`copy', `concat', `sequence', `map', and `transpose', which depend on
-type `T[]', are defined only after the first declaration of a variable
-of type `T[]'.
+ In the following list of built-in array functions, 'T' represents a
+generic type. Note that the internal functions 'alias', 'array',
+'copy', 'concat', 'sequence', 'map', and 'transpose', which depend on
+type 'T[]', are defined only after the first declaration of a variable
+of type 'T[]'.
-`new T[]'
- returns a new empty array of type `T[]';
+'new T[]'
+ returns a new empty array of type 'T[]';
-`new T[] {list}'
- returns a new array of type `T[]' initialized with `list' (a comma
+'new T[] {list}'
+ returns a new array of type 'T[]' initialized with 'list' (a comma
delimited list of elements).
-`new T[n]'
- returns a new array of `n' elements of type `T[]'. These `n'
- array elements are not initialized unless they are arrays
- themselves (in which case they are each initialized to empty
- arrays).
+'new T[n]'
+ returns a new array of 'n' elements of type 'T[]'. These 'n' array
+ elements are not initialized unless they are arrays themselves (in
+ which case they are each initialized to empty arrays).
-`T[] array(int n, T value, int depth=intMax)'
- returns an array consisting of `n' copies of `value'. If `value'
- is itself an array, a deep copy of `value' is made for each entry.
- If `depth' is specified, this deep copying only recurses to the
+'T[] array(int n, T value, int depth=intMax)'
+ returns an array consisting of 'n' copies of 'value'. If 'value'
+ is itself an array, a deep copy of 'value' is made for each entry.
+ If 'depth' is specified, this deep copying only recurses to the
specified number of levels.
-`int[] sequence(int n)'
- if `n >= 1' returns the array `{0,1,...,n-1}' (otherwise returns a
+'int[] sequence(int n)'
+ if 'n >= 1' returns the array '{0,1,...,n-1}' (otherwise returns a
null array);
-`int[] sequence(int n, int m)'
- if `m >= n' returns an array `{n,n+1,...,m}' (otherwise returns a
+'int[] sequence(int n, int m)'
+ if 'm >= n' returns an array '{n,n+1,...,m}' (otherwise returns a
null array);
-`T[] sequence(T f(int), int n)'
- if `n >= 1' returns the sequence `{f_i :i=0,1,...n-1}' given a
- function `T f(int)' and integer `int n' (otherwise returns a null
+'T[] sequence(T f(int), int n)'
+ if 'n >= 1' returns the sequence '{f_i :i=0,1,...n-1}' given a
+ function 'T f(int)' and integer 'int n' (otherwise returns a null
array);
-`T[] map(T f(T), T[] a)'
- returns the array obtained by applying the function `f' to each
- element of the array `a'. This is equivalent to `sequence(new
+'T[] map(T f(T), T[] a)'
+ returns the array obtained by applying the function 'f' to each
+ element of the array 'a'. This is equivalent to 'sequence(new
T(int i) {return f(a[i]);},a.length)'.
-`int[] reverse(int n)'
- if `n >= 1' returns the array `{n-1,n-2,...,0}' (otherwise returns
+'int[] reverse(int n)'
+ if 'n >= 1' returns the array '{n-1,n-2,...,0}' (otherwise returns
a null array);
-`int[] complement(int[] a, int n)'
- returns the complement of the integer array `a' in
- `{0,1,2,...,n-1}', so that `b[complement(a,b.length)]' yields the
- complement of `b[a]'.
+'int[] complement(int[] a, int n)'
+ returns the complement of the integer array 'a' in
+ '{0,1,2,...,n-1}', so that 'b[complement(a,b.length)]' yields the
+ complement of 'b[a]'.
-`real[] uniform(real a, real b, int n)'
- if `n >= 1' returns a uniform partition of `[a,b]' into `n'
+'real[] uniform(real a, real b, int n)'
+ if 'n >= 1' returns a uniform partition of '[a,b]' into 'n'
subintervals (otherwise returns a null array);
-`int find(bool[], int n=1)'
- returns the index of the `n'th `true' value or -1 if not found.
- If `n' is negative, search backwards from the end of the array for
- the `-n'th value;
+'int find(bool[], int n=1)'
+ returns the index of the 'n'th 'true' value or -1 if not found. If
+ 'n' is negative, search backwards from the end of the array for the
+ '-n'th value;
-`int search(T[] a, T key)'
- For built-in ordered types `T', searches a sorted array `a' of `n'
- elements for k, returning the index `i' if `a[i] <= key < a[i+1]',
- `-1' if `key' is less than all elements of `a', or `n-1' if `key'
- is greater than or equal to the last element of `a'.
+'int search(T[] a, T key)'
+ For built-in ordered types 'T', searches a sorted array 'a' of 'n'
+ elements for k, returning the index 'i' if 'a[i] <= key < a[i+1]',
+ '-1' if 'key' is less than all elements of 'a', or 'n-1' if 'key'
+ is greater than or equal to the last element of 'a'.
-`int search(T[] a, T key, bool less(T i, T j))'
- searches an array `a' sorted in ascending order such that element
- `i' precedes element `j' if `less(i,j)' is true;
+'int search(T[] a, T key, bool less(T i, T j))'
+ searches an array 'a' sorted in ascending order such that element
+ 'i' precedes element 'j' if 'less(i,j)' is true;
-`T[] copy(T[] a)'
- returns a deep copy of the array `a';
+'T[] copy(T[] a)'
+ returns a deep copy of the array 'a';
-`T[] concat(... T[][] a)'
+'T[] concat(... T[][] a)'
returns a new array formed by concatenating the given
one-dimensional arrays given as arguments;
-`bool alias(T[] a, T[] b)'
- returns `true' if the arrays `a' and `b' are identical;
+'bool alias(T[] a, T[] b)'
+ returns 'true' if the arrays 'a' and 'b' are identical;
-`T[] sort(T[] a)'
- For built-in ordered types `T', returns a copy of `a' sorted in
+'T[] sort(T[] a)'
+ For built-in ordered types 'T', returns a copy of 'a' sorted in
ascending order;
-`T[][] sort(T[][] a)'
- For built-in ordered types `T', returns a copy of `a' with the rows
+'T[][] sort(T[][] a)'
+ For built-in ordered types 'T', returns a copy of 'a' with the rows
sorted by the first column, breaking ties with successively higher
- columns. For example: string[][] a={{"bob","9"},{"alice","5"},{"pete","7"},
+ columns. For example:
+ string[][] a={{"bob","9"},{"alice","5"},{"pete","7"},
{"alice","4"}};
// Row sort (by column 0, using column 1 to break ties):
write(sort(a));
- produces alice 4
+ produces
+ alice 4
alice 5
bob 9
pete 7
-`T[] sort(T[] a, bool less(T i, T j))'
- returns a copy of `a' stably sorted in ascending order such that
- element `i' precedes element `j' if `less(i,j)' is true.
+'T[] sort(T[] a, bool less(T i, T j))'
+ returns a copy of 'a' stably sorted in ascending order such that
+ element 'i' precedes element 'j' if 'less(i,j)' is true.
-`T[][] transpose(T[][] a)'
- returns the transpose of `a'.
+'T[][] transpose(T[][] a)'
+ returns the transpose of 'a'.
-`T[][][] transpose(T[][][] a, int[] perm)'
- returns the 3D transpose of `a' obtained by applying the
- permutation `perm' of `new int[]{0,1,2}' to the indices of each
+'T[][][] transpose(T[][][] a, int[] perm)'
+ returns the 3D transpose of 'a' obtained by applying the
+ permutation 'perm' of 'new int[]{0,1,2}' to the indices of each
entry.
-`T sum(T[] a)'
- For arithmetic types `T', returns the sum of `a'. In the case
- where `T' is `bool', the number of true elements in `a' is
+'T sum(T[] a)'
+ For arithmetic types 'T', returns the sum of 'a'. In the case
+ where 'T' is 'bool', the number of true elements in 'a' is
returned.
-`T min(T[] a)'
-
-`T min(T[][] a)'
-
-`T min(T[][][] a)'
- For built-in ordered types `T', returns the minimum element of `a'.
-
-`T max(T[] a)'
+'T min(T[] a)'
+'T min(T[][] a)'
+'T min(T[][][] a)'
+ For built-in ordered types 'T', returns the minimum element of 'a'.
-`T max(T[][] a)'
+'T max(T[] a)'
+'T max(T[][] a)'
+'T max(T[][][] a)'
+ For built-in ordered types 'T', returns the maximum element of 'a'.
-`T max(T[][][] a)'
- For built-in ordered types `T', returns the maximum element of `a'.
-
-`T[] min(T[] a, T[] b)'
- For built-in ordered types `T', and arrays `a' and `b' of the same
+'T[] min(T[] a, T[] b)'
+ For built-in ordered types 'T', and arrays 'a' and 'b' of the same
length, returns an array composed of the minimum of the
- corresponding elements of `a' and `b'.
+ corresponding elements of 'a' and 'b'.
-`T[] max(T[] a, T[] b)'
- For built-in ordered types `T', and arrays `a' and `b' of the same
+'T[] max(T[] a, T[] b)'
+ For built-in ordered types 'T', and arrays 'a' and 'b' of the same
length, returns an array composed of the maximum of the
- corresponding elements of `a' and `b'.
+ corresponding elements of 'a' and 'b'.
-`pair[] pairs(real[] x, real[] y);'
- For arrays `x' and `y' of the same length, returns the pair array
- `sequence(new pair(int i) {return (x[i],y[i]);},x.length)'.
+'pair[] pairs(real[] x, real[] y);'
+ For arrays 'x' and 'y' of the same length, returns the pair array
+ 'sequence(new pair(int i) {return (x[i],y[i]);},x.length)'.
-`pair[] fft(pair[] a, int sign=1)'
- returns the Fast Fourier Transform of `a' (if the optional `FFTW'
- package is installed), using the given `sign'. Here is a simple
- example: int n=4;
+'pair[] fft(pair[] a, int sign=1)'
+ returns the unnormalized Fast Fourier Transform of 'a' (if the
+ optional 'FFTW' package is installed), using the given 'sign'.
+ Here is a simple example:
+ int n=4;
pair[] f=sequence(n);
write(f);
pair[] g=fft(f,-1);
@@ -4164,29 +4152,31 @@ of type `T[]'.
write();
write(f/n);
-`real dot(real[] a, real[] b)'
- returns the dot product of the vectors `a' and `b'.
+'real dot(real[] a, real[] b)'
+ returns the dot product of the vectors 'a' and 'b'.
-`pair dot(pair[] a, pair[] b)'
- returns the complex dot product `sum(a*conj(b))' of the vectors
- `a' and `b'.
+'pair dot(pair[] a, pair[] b)'
+ returns the complex dot product 'sum(a*conj(b))' of the vectors 'a'
+ and 'b'.
-`real[] tridiagonal(real[] a, real[] b, real[] c, real[] f);'
- Solve the periodic tridiagonal problem L`x'=`f' and return the
- solution `x', where `f' is an n vector and L is the n \times n
- matrix [ b[0] c[0] a[0] ]
+'real[] tridiagonal(real[] a, real[] b, real[] c, real[] f);'
+ Solve the periodic tridiagonal problem L'x'='f' and return the
+ solution 'x', where 'f' is an n vector and L is the n \times n
+ matrix
+ [ b[0] c[0] a[0] ]
[ a[1] b[1] c[1] ]
[ a[2] b[2] c[2] ]
[ ... ]
[ c[n-1] a[n-1] b[n-1] ]
- For Dirichlet boundary conditions (denoted here by `u[-1]' and
- `u[n]'), replace `f[0]' by `f[0]-a[0]u[-1]' and
- `f[n-1]-c[n-1]u[n]'; then set `a[0]=c[n-1]=0'.
-
-`real[] solve(real[][] a, real[] b, bool warn=true)'
- Solve the linear equation `a'x=`b' by LU decomposition and return
- the solution x, where `a' is an n \times n matrix and `b' is an
- array of length n. For example: import math;
+ For Dirichlet boundary conditions (denoted here by 'u[-1]' and
+ 'u[n]'), replace 'f[0]' by 'f[0]-a[0]u[-1]' and
+ 'f[n-1]-c[n-1]u[n]'; then set 'a[0]=c[n-1]=0'.
+
+'real[] solve(real[][] a, real[] b, bool warn=true)'
+ Solve the linear equation 'a'x='b' by LU decomposition and return
+ the solution x, where 'a' is an n \times n matrix and 'b' is an
+ array of length n. For example:
+ import math;
real[][] a={{1,-2,3,0},{4,-5,6,2},{-7,-8,10,5},{1,50,1,-2}};
real[] b={7,19,33,3};
real[] x=solve(a,b);
@@ -4194,92 +4184,90 @@ of type `T[]'.
write(b); write();
write(x); write();
write(a*x);
- If `a' is a singular matrix and `warn' is `false', return an
- empty array. If the matrix `a' is tridiagonal, the routine
- `tridiagonal' provides a more efficient algorithm (*note
- tridiagonal::).
-
-`real[][] solve(real[][] a, real[][] b, bool warn=true)'
- Solve the linear equation `a'x=`b' and return the solution x,
- where `a' is an n \times n matrix and `b' is an n \times m matrix.
- If `a' is a singular matrix and `warn' is `false', return an empty
+ If 'a' is a singular matrix and 'warn' is 'false', return an empty
+ array. If the matrix 'a' is tridiagonal, the routine 'tridiagonal'
+ provides a more efficient algorithm (*note tridiagonal::).
+
+'real[][] solve(real[][] a, real[][] b, bool warn=true)'
+ Solve the linear equation 'a'x='b' and return the solution x, where
+ 'a' is an n \times n matrix and 'b' is an n \times m matrix. If
+ 'a' is a singular matrix and 'warn' is 'false', return an empty
matrix.
-`real[][] identity(int n);'
+'real[][] identity(int n);'
returns the n \times n identity matrix.
-`real[][] diagonal(... real[] a)'
+'real[][] diagonal(... real[] a)'
returns the diagonal matrix with diagonal entries given by a.
-`real[][] inverse(real[][] a)'
- returns the inverse of a square matrix `a'.
+'real[][] inverse(real[][] a)'
+ returns the inverse of a square matrix 'a'.
-``real[] quadraticroots(real a, real b, real c);''
+'real[] quadraticroots(real a, real b, real c);'
This numerically robust solver returns the real roots of the
- quadratic equation ax^2+bx+c=0, in ascending order. Multiple roots
+ quadratic equation ax^2+bx+c=0, in ascending order. Multiple roots
are listed separately.
-``pair[] quadraticroots(explicit pair a, explicit pair b, explicit pair c);''
+'pair[] quadraticroots(explicit pair a, explicit pair b, explicit pair c);'
This numerically robust solver returns the complex roots of the
quadratic equation ax^2+bx+c=0.
-``real[] cubicroots(real a, real b, real c, real d);''
+'real[] cubicroots(real a, real b, real c, real d);'
This numerically robust solver returns the real roots of the cubic
- equation ax^3+bx^2+cx+d=0. Multiple roots are listed separately.
-
+ equation ax^3+bx^2+cx+d=0. Multiple roots are listed separately.
- `Asymptote' includes a full set of vectorized array instructions for
-arithmetic (including self) and logical operations. These
+ 'Asymptote' includes a full set of vectorized array instructions for
+arithmetic (including self) and logical operations. These
element-by-element instructions are implemented in C++ code for speed.
Given
real[] a={1,2};
real[] b={3,2};
- then `a == b' and `a >= 2' both evaluate to the vector `{false, true}'. To
-test whether all components of `a' and `b' agree, use the boolean
-function `all(a == b)'. One can also use conditionals like `(a >= 2) ?
-a : b', which returns the array `{3,2}', or `write((a >= 2) ? a :
-null', which returns the array `{2}'.
+then 'a == b' and 'a >= 2' both evaluate to the vector '{false, true}'.
+To test whether all components of 'a' and 'b' agree, use the boolean
+function 'all(a == b)'. One can also use conditionals like '(a >= 2) ?
+a : b', which returns the array '{3,2}', or 'write((a >= 2) ? a : null',
+which returns the array '{2}'.
- All of the standard built-in `libm' functions of signature
-`real(real)' also take a real array as an argument, effectively like an
-implicit call to `map'.
+ All of the standard built-in 'libm' functions of signature
+'real(real)' also take a real array as an argument, effectively like an
+implicit call to 'map'.
As with other built-in types, arrays of the basic data types can be
-read in by assignment. In this example, the code
+read in by assignment. In this example, the code
file fin=input("test.txt");
real[] A=fin;
-reads real values into `A' until the end-of-file is reached (or an I/O
+reads real values into 'A' until the end-of-file is reached (or an I/O
error occurs).
- The virtual members `dimension', `line', `csv', `word', and `read'
-of a file are useful for reading arrays. For example, if line mode is
-set with `file line(bool b=true)', then reading will stop once the end
-of the line is reached instead:
+ The virtual members 'dimension', 'line', 'csv', 'word', and 'read' of
+a file are useful for reading arrays. For example, if line mode is set
+with 'file line(bool b=true)', then reading will stop once the end of
+the line is reached instead:
file fin=input("test.txt");
real[] A=fin.line();
- Since string reads by default read up to the end of line anyway,
-line mode normally has no effect on string array reads. However, there
-is a white-space delimiter mode for reading strings, `file word(bool
+ Since string reads by default read up to the end of line anyway, line
+mode normally has no effect on string array reads. However, there is a
+white-space delimiter mode for reading strings, 'file word(bool
b=true)', which causes string reads to respect white-space delimiters,
instead of the default end-of-line delimiter:
file fin=input("test.txt").line().word();
real[] A=fin;
- Another useful mode is comma-separated-value mode, `file csv(bool
+ Another useful mode is comma-separated-value mode, 'file csv(bool
b=true)', which causes reads to respect comma delimiters:
file fin=csv(input("test.txt"));
real[] A=fin;
- To restrict the number of values read, use the `file dimension(int)'
+ To restrict the number of values read, use the 'file dimension(int)'
function:
file fin=input("test.txt");
real[] A=dimension(fin,10);
This reads 10 values into A, unless end-of-file (or end-of-line in
-line mode) occurs first. Attempting to read beyond the end of the file
-will produce a runtime error message. Specifying a value of 0 for the
+line mode) occurs first. Attempting to read beyond the end of the file
+will produce a runtime error message. Specifying a value of 0 for the
integer limit is equivalent to the previous example of reading until
end-of-file (or end-of-line in line mode) is encountered.
@@ -4288,20 +4276,20 @@ in like this:
file fin=input("test.txt");
real[][] A=fin.dimension(2,3);
real[][][] B=fin.dimension(2,3,4);
- Again, an integer limit of zero means no restriction.
+Again, an integer limit of zero means no restriction.
Sometimes the array dimensions are stored with the data as integer
-fields at the beginning of an array. Such 1, 2, or 3 dimensional arrays
-can be read in with the virtual member functions `read(1)', `read(2)',
-or `read(3)', respectively:
+fields at the beginning of an array. Such 1, 2, or 3 dimensional arrays
+can be read in with the virtual member functions 'read(1)', 'read(2)',
+or 'read(3)', respectively:
file fin=input("test.txt");
real[] A=fin.read(1);
real[][] B=fin.read(2);
real[][][] C=fin.read(3);
One, two, and three-dimensional arrays of the basic data types can be
-output with the functions `write(file,T[])', `write(file,T[][])',
-`write(file,T[][][])', respectively.
+output with the functions 'write(file,T[])', 'write(file,T[][])',
+'write(file,T[][][])', respectively.

File: asymptote.info, Node: Slices, Up: Arrays
@@ -4310,17 +4298,17 @@ File: asymptote.info, Node: Slices, Up: Arrays
-------------
Asymptote allows a section of an array to be addressed as a slice using
-a Python-like syntax. If `A' is an array, the expression `A[m:n]'
-returns a new array consisting of the elements of `A' with indices from
-`m' up to but not including `n'. For example,
+a Python-like syntax. If 'A' is an array, the expression 'A[m:n]'
+returns a new array consisting of the elements of 'A' with indices from
+'m' up to but not including 'n'. For example,
int[] x={0,1,2,3,4,5,6,7,8,9};
int[] y=x[2:6]; // y={2,3,4,5};
int[] z=x[5:10]; // z={5,6,7,8,9};
- If the left index is omitted, it is taken be `0'. If the right
-index is omitted it is taken to be the length of the array. If both
-are omitted, the slice then goes from the start of the array to the
-end, producing a non-cyclic deep copy of the array. For example:
+ If the left index is omitted, it is taken be '0'. If the right index
+is omitted it is taken to be the length of the array. If both are
+omitted, the slice then goes from the start of the array to the end,
+producing a non-cyclic deep copy of the array. For example:
int[] x={0,1,2,3,4,5,6,7,8,9};
int[] y=x[:4]; // y={0,1,2,3}
int[] z=x[5:]; // z={5,6,7,8,9}
@@ -4330,8 +4318,8 @@ int[] w=x[:]; // w={0,1,2,3,4,5,6,7,8,9}, distinct from array x.
either of the indices. If the indices exceed the length of the array,
however, they are politely truncated to that length.
- For cyclic arrays, the slice `A[m:n]' still consists of the cells
-with indices in the set [`m',`n'), but now negative values and values
+ For cyclic arrays, the slice 'A[m:n]' still consists of the cells
+with indices in the set ['m','n'), but now negative values and values
beyond the length of the array are allowed. The indices simply wrap
around. For example:
@@ -4342,9 +4330,8 @@ int[] z=x[-5:5]; // z={5,6,7,8,9,0,1,2,3,4}
int[] w=x[-3:17]; // w={7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6}
Notice that with cyclic arrays, it is possible to include the same
-element of the original array multiple times within a slice.
-Regardless of the original array, arrays produced by slices are always
-non-cyclic.
+element of the original array multiple times within a slice. Regardless
+of the original array, arrays produced by slices are always non-cyclic.
If the left and right indices of a slice are the same, the result is
an empty array. If the array being sliced is empty, the result is an
@@ -4354,7 +4341,7 @@ will yield an error.
Slices can also be assigned to, changing the value of the original
array. If the array being assigned to the slice has a different length
than the slice itself, elements will be inserted or removed from the
-array to accommodate it. For instance:
+array to accommodate it. For instance:
string[] toppings={"mayo", "salt", "ham", "lettuce"};
toppings[0:2]=new string[] {"mustard", "pepper"};
// Now toppings={"mustard", "pepper", "ham", "lettuce"}
@@ -4364,29 +4351,29 @@ toppings[0:3]=new string[] {"tomato"};
// Now toppings={"tomato", "bacon", "lettuce"}
If an array is assigned to a slice of itself, a copy of the original
-array is assigned to the slice. That is, code such as `x[m:n]=x' is
-equivalent to `x[m:n]=copy(x)'. One can use the shorthand `x[m:m]=y'
-to insert the contents of the array `y' into the array `x' starting at
-the location just before `x[m]'.
+array is assigned to the slice. That is, code such as 'x[m:n]=x' is
+equivalent to 'x[m:n]=copy(x)'. One can use the shorthand 'x[m:m]=y' to
+insert the contents of the array 'y' into the array 'x' starting at the
+location just before 'x[m]'.
For a cyclic array, a slice is bridging if it addresses cells up to
-the end of the array and then continues on to address cells at the
-start of the array. For instance, if `A' is a cyclic array of length
-10, `A[8:12]', `A[-3:1]', and `A[5:25]' are bridging slices whereas
-`A[3:7]', `A[7:10]', `A[-3:0]' and `A[103:107]' are not. Bridging
-slices can only be assigned to if the number of elements in the slice
-is exactly equal to the number of elements we are assigning to it.
+the end of the array and then continues on to address cells at the start
+of the array. For instance, if 'A' is a cyclic array of length 10,
+'A[8:12]', 'A[-3:1]', and 'A[5:25]' are bridging slices whereas
+'A[3:7]', 'A[7:10]', 'A[-3:0]' and 'A[103:107]' are not. Bridging
+slices can only be assigned to if the number of elements in the slice is
+exactly equal to the number of elements we are assigning to it.
Otherwise, there is no clear way to decide which of the new entries
-should be `A[0]' and an error is reported. Non-bridging slices may be
+should be 'A[0]' and an error is reported. Non-bridging slices may be
assigned an array of any length.
- For a cyclic array `A' an expression of the form
-`A[A.length:A.length]' is equivalent to the expression `A[0:0]' and so
+ For a cyclic array 'A' an expression of the form
+'A[A.length:A.length]' is equivalent to the expression 'A[0:0]' and so
assigning to this slice will insert values at the start of the array.
-`A.append()' can be used to insert values at the end of the array.
+'A.append()' can be used to insert values at the end of the array.
- It is illegal to assign to a slice of a cyclic array that repeats
-any of the cells.
+ It is illegal to assign to a slice of a cyclic array that repeats any
+of the cells.

File: asymptote.info, Node: Casts, Next: Import, Prev: Arrays, Up: Programming
@@ -4394,23 +4381,23 @@ File: asymptote.info, Node: Casts, Next: Import, Prev: Arrays, Up: Programmi
6.13 Casts
==========
-`Asymptote' implicitly casts `int' to `real', `int' to `pair', `real'
-to `pair', `pair' to `path', `pair' to `guide', `path' to `guide',
-`guide' to `path', `real' to `pen', `pair[]' to `guide[]', `pair[]' to
-`path[]', `path' to `path[]', and `guide' to `path[]', along with
-various three-dimensional casts defined in `three.asy'. Implicit casts
-are automatically attempted on assignment and when trying to match
-function calls with possible function signatures. Implicit casting can
-be inhibited by declaring individual arguments `explicit' in the
-function signature, say to avoid an ambiguous function call in the
-following example, which outputs 0:
+'Asymptote' implicitly casts 'int' to 'real', 'int' to 'pair', 'real' to
+'pair', 'pair' to 'path', 'pair' to 'guide', 'path' to 'guide', 'guide'
+to 'path', 'real' to 'pen', 'pair[]' to 'guide[]', 'pair[]' to 'path[]',
+'path' to 'path[]', and 'guide' to 'path[]', along with various
+three-dimensional casts defined in 'three.asy'. Implicit casts are
+automatically attempted on assignment and when trying to match function
+calls with possible function signatures. Implicit casting can be
+inhibited by declaring individual arguments 'explicit' in the function
+signature, say to avoid an ambiguous function call in the following
+example, which outputs 0:
int f(pair a) {return 0;}
int f(explicit real x) {return 1;}
write(f(0));
- Other conversions, say `real' to `int' or `real' to `string',
-require an explicit cast:
+ Other conversions, say 'real' to 'int' or 'real' to 'string', require
+an explicit cast:
int i=(int) 2.5;
string s=(string) 2.5;
@@ -4418,7 +4405,7 @@ real[] a={2.5,-3.5};
int[] b=(int []) a;
write(stdout,b); // Outputs 2,-3
- Casting to user-defined types is also possible using `operator cast':
+ Casting to user-defined types is also possible using 'operator cast':
struct rpair {
real radius;
real angle;
@@ -4434,18 +4421,18 @@ x.angle=pi/6;
write(x); // Outputs (0.866025403784439,0.5)
- One must use care when defining new cast operators. Suppose that in
-some code one wants all integers to represent multiples of 100. To
+ One must use care when defining new cast operators. Suppose that in
+some code one wants all integers to represent multiples of 100. To
convert them to reals, one would first want to multiply them by 100.
However, the straightforward implementation
real operator cast(int x) {return x*100;}
- is equivalent to an infinite recursion, since the result `x*100' needs
-itself to be cast from an integer to a real. Instead, we want to use
-the standard conversion of int to real:
+ is equivalent to an infinite recursion, since the result 'x*100'
+needs itself to be cast from an integer to a real. Instead, we want to
+use the standard conversion of int to real:
real convert(int x) {return x*100;}
real operator cast(int x)=convert;
- Explicit casts are implemented similarly, with `operator ecast'.
+ Explicit casts are implemented similarly, with 'operator ecast'.

File: asymptote.info, Node: Import, Next: Static, Prev: Casts, Up: Programming
@@ -4453,32 +4440,31 @@ File: asymptote.info, Node: Import, Next: Static, Prev: Casts, Up: Programmi
6.14 Import
===========
-While `Asymptote' provides many features by default, some applications
-require specialized features contained in external `Asymptote' modules.
+While 'Asymptote' provides many features by default, some applications
+require specialized features contained in external 'Asymptote' modules.
For instance, the lines
access graph;
graph.axes();
- draw x and y axes on a two-dimensional graph. Here, the command looks
-up the module under the name `graph' in a global dictionary of modules
-and puts it in a new variable named `graph'. The module is a
-structure, and we can refer to its fields as we usually would with a
-structure.
+draw x and y axes on a two-dimensional graph. Here, the command looks
+up the module under the name 'graph' in a global dictionary of modules
+and puts it in a new variable named 'graph'. The module is a structure,
+and we can refer to its fields as we usually would with a structure.
Often, one wants to use module functions without having to specify
the module name. The code
from graph access axes;
- adds the `axes' field of `graph' into the local name space, so that
-subsequently, one can just write `axes()'. If the given name is
-overloaded, all types and variables of that name are added. To add
-more than one name, just use a comma-separated list:
+adds the 'axes' field of 'graph' into the local name space, so that
+subsequently, one can just write 'axes()'. If the given name is
+overloaded, all types and variables of that name are added. To add more
+than one name, just use a comma-separated list:
from graph access axes, xaxis, yaxis;
- Wild card notation can be used to add all non-private fields and types
+Wild card notation can be used to add all non-private fields and types
of a module to the local name space:
from graph access *;
Similarly, one can add the non-private fields and types of a
-structure to the local environment with the `unravel' keyword:
+structure to the local environment with the 'unravel' keyword:
struct matrix {
real a,b,c,d;
}
@@ -4487,7 +4473,7 @@ real det(matrix m) {
unravel m;
return a*d-b*c;
}
- Alternatively, one can unravel selective fields:
+ Alternatively, one can unravel selective fields:
real det(matrix m) {
from m unravel a,b,c as C,d;
return a*d-b*C;
@@ -4495,12 +4481,12 @@ real det(matrix m) {
The command
import graph;
- is a convenient abbreviation for the commands
+ is a convenient abbreviation for the commands
access graph;
unravel graph;
- That is, `import graph' first loads a module into a structure called
-`graph' and then adds its non-private fields and types to the local
-environment. This way, if a member variable (or function) is
+ That is, 'import graph' first loads a module into a structure called
+'graph' and then adds its non-private fields and types to the local
+environment. This way, if a member variable (or function) is
overwritten with a local variable (or function of the same signature),
the original one can still be accessed by qualifying it with the module
name.
@@ -4508,84 +4494,84 @@ name.
Wild card importing will work fine in most cases, but one does not
usually know all of the internal types and variables of a module, which
can also change as the module writer adds or changes features of the
-module. As such, it is prudent to add `import' commands at the start
-of an `Asymptote' file, so that imported names won't shadow locally
-defined functions. Still, imported names may shadow other imported
-names, depending on the order in which they were imported, and imported
+module. As such, it is prudent to add 'import' commands at the start of
+an 'Asymptote' file, so that imported names won't shadow locally defined
+functions. Still, imported names may shadow other imported names,
+depending on the order in which they were imported, and imported
functions may cause overloading resolution problems if they have the
same name as local functions defined later.
To rename modules or fields when adding them to the local
-environment, use `as':
+environment, use 'as':
access graph as graph2d;
from graph access xaxis as xline, yaxis as yline;
The command
import graph as graph2d;
- is a convenient abbreviation for the commands
+ is a convenient abbreviation for the commands
access graph as graph2d;
unravel graph2d;
- Except for a few built-in modules, such as `settings', all modules
-are implemented as `Asymptote' files. When looking up a module that
-has not yet been loaded, `Asymptote' searches the standard search paths
-(*note Search paths::) for the matching file. The file corresponding
-to that name is read and the code within it is interpreted as the body
-of a structure defining the module.
+ Except for a few built-in modules, such as 'settings', all modules
+are implemented as 'Asymptote' files. When looking up a module that has
+not yet been loaded, 'Asymptote' searches the standard search paths
+(*note Search paths::) for the matching file. The file corresponding to
+that name is read and the code within it is interpreted as the body of a
+structure defining the module.
- If the file name contains nonalphanumeric characters, enclose it
-with quotation marks:
+ If the file name contains nonalphanumeric characters, enclose it with
+quotation marks:
-`access "/usr/local/share/asymptote/graph.asy" as graph;'
+'access "/usr/local/share/asymptote/graph.asy" as graph;'
-`from "/usr/local/share/asymptote/graph.asy" access axes;'
+'from "/usr/local/share/asymptote/graph.asy" access axes;'
-`import "/usr/local/share/asymptote/graph.asy" as graph;'
+'import "/usr/local/share/asymptote/graph.asy" as graph;'
It is an error if modules import themselves (or each other in a
cycle). The module name to be imported must be known at compile time.
- However, you can import an `Asymptote' module determined by the
-string `s' at runtime like this:
+ However, you can import an 'Asymptote' module determined by the
+string 's' at runtime like this:
eval("import "+s,true);
To conditionally execute an array of asy files, use
void asy(string format, bool overwrite ... string[] s);
- The file will only be processed, using output format `format', if
-overwrite is `true' or the output file is missing.
+ The file will only be processed, using output format 'format', if
+overwrite is 'true' or the output file is missing.
- One can evaluate an `Asymptote' expression (without any return
-value, however) contained in the string `s' with:
+ One can evaluate an 'Asymptote' expression (without any return value,
+however) contained in the string 's' with:
void eval(string s, bool embedded=false);
- It is not necessary to terminate the string `s' with a semicolon. If
-`embedded' is `true', the string will be evaluated at the top level of
-the current environment. If `embedded' is `false' (the default), the
+ It is not necessary to terminate the string 's' with a semicolon. If
+'embedded' is 'true', the string will be evaluated at the top level of
+the current environment. If 'embedded' is 'false' (the default), the
string will be evaluated in an independent environment, sharing the same
-`settings' module (*note settings::).
+'settings' module (*note settings::).
- One can evaluate arbitrary `Asymptote' code (which may contain
+ One can evaluate arbitrary 'Asymptote' code (which may contain
unescaped quotation marks) with the command
void eval(code s, bool embedded=false);
- Here `code' is a special type used with `quote {}' to enclose
-`Asymptote code' like this:
+ Here 'code' is a special type used with 'quote {}' to enclose
+'Asymptote code' like this:
real a=1;
code s=quote {
write(a);
};
eval(s,true); // Outputs 1
- To include the contents of an existing file `graph' verbatim (as if
+ To include the contents of an existing file 'graph' verbatim (as if
the contents of the file were inserted at that point), use one of the
forms:
include graph;
-`include "/usr/local/share/asymptote/graph.asy";'
+'include "/usr/local/share/asymptote/graph.asy";'
To list all global functions and variables defined in a module named
-by the contents of the string `s', use the function
+by the contents of the string 's', use the function
void list(string s, bool imports=false);
- Imported global functions and variables are also listed if `imports'
-is `true'.
+Imported global functions and variables are also listed if 'imports' is
+'true'.

File: asymptote.info, Node: Static, Prev: Import, Up: Programming
@@ -4606,8 +4592,8 @@ struct s {
}
}
-there is one instance of the variable `c' for each object `s' (as
-opposed to each call of `count').
+there is one instance of the variable 'c' for each object 's' (as
+opposed to each call of 'count').
Similarly, in
int factorial(int n) {
@@ -4619,19 +4605,19 @@ int factorial(int n) {
return helper(n);
}
-there is one instance of `x' for every call to `factorial' (and not for
-every call to `helper'), so this is a correct, but ugly, implementation
+there is one instance of 'x' for every call to 'factorial' (and not for
+every call to 'helper'), so this is a correct, but ugly, implementation
of factorial.
- Similarly, a static variable declared within a structure is
-allocated in the block where the structure is defined. Thus,
+ Similarly, a static variable declared within a structure is allocated
+in the block where the structure is defined. Thus,
struct A {
struct B {
static pair z;
}
}
-creates one object `z' for each object of type `A' created.
+creates one object 'z' for each object of type 'A' created.
In this example,
int pow(int n, int k) {
@@ -4648,7 +4634,7 @@ int pow(int n, int k) {
return A.x;
}
-there is one instance of `x' for each call to `pow', so this is an ugly
+there is one instance of 'x' for each call to 'pow', so this is an ugly
implementation of exponentiation.
Loop constructs allocate a new frame in every iteration. This is so
@@ -4663,27 +4649,27 @@ for(int i=0; i < 10; ++i) {
}
f();
- Here, every iteration of the loop has its own variable `x', so `f()'
-will write `5'. If a variable in a loop is declared static, it will be
-allocated where the enclosing function or structure was defined (just
-as if it were declared static outside of the loop). For instance, in:
+ Here, every iteration of the loop has its own variable 'x', so 'f()'
+will write '5'. If a variable in a loop is declared static, it will be
+allocated where the enclosing function or structure was defined (just as
+if it were declared static outside of the loop). For instance, in:
void f() {
static int x;
for(int i=0; i < 10; ++i) {
static int y;
}
}
- both `x' and `y' will be allocated in the same place, which is also
-where `f' is also allocated.
+both 'x' and 'y' will be allocated in the same place, which is also
+where 'f' is also allocated.
- Statements may also be declared static, in which case they are run
-at the place where the enclosing function or structure is defined.
+ Statements may also be declared static, in which case they are run at
+the place where the enclosing function or structure is defined.
Declarations or statements not enclosed in a function or structure
definition are already at the top level, so static modifiers are
meaningless. A warning is given in such a case.
- Since structures can have static fields, it is not always clear for
-a qualified name whether the qualifier is a variable or a type. For
+ Since structures can have static fields, it is not always clear for a
+qualified name whether the qualifier is a variable or a type. For
instance, in:
struct A {
@@ -4692,7 +4678,7 @@ struct A {
pair A;
int y=A.x;
- does the `A' in `A.x' refer to the structure or to the pair variable.
+does the 'A' in 'A.x' refer to the structure or to the pair variable.
It is the convention in Asymptote that, if there is a non-function
variable with the same name as the qualifier, the qualifier refers to
that variable, and not to the type. This is regardless of what fields
@@ -4701,21 +4687,21 @@ the variable actually possesses.

File: asymptote.info, Node: LaTeX usage, Next: Base modules, Prev: Programming, Up: Top
-7 `LaTeX' usage
+7 'LaTeX' usage
***************
-`Asymptote' comes with a convenient `LaTeX' style file `asymptote.sty'
-that makes `LaTeX' `Asymptote'-aware. Entering `Asymptote' code
-directly into the `LaTeX' source file, at the point where it is needed,
-keeps figures organized and avoids the need to invent new file names
-for each figure. Simply add the line `\usepackage{asymptote}' at the
-beginning of your file and enclose your `Asymptote' code within a
-`\begin{asy}...\end{asy}' environment. As with the `LaTeX' `comment'
-environment, the `\end{asy}' command must appear on a line by itself,
+'Asymptote' comes with a convenient 'LaTeX' style file 'asymptote.sty'
+that makes 'LaTeX' 'Asymptote'-aware. Entering 'Asymptote' code
+directly into the 'LaTeX' source file, at the point where it is needed,
+keeps figures organized and avoids the need to invent new file names for
+each figure. Simply add the line '\usepackage{asymptote}' at the
+beginning of your file and enclose your 'Asymptote' code within a
+'\begin{asy}...\end{asy}' environment. As with the 'LaTeX' 'comment'
+environment, the '\end{asy}' command must appear on a line by itself,
with no trailing commands/comments. A blank line is not allowed after
-`\begin{asy}'.
+'\begin{asy}'.
- The sample `LaTeX' file below, named `latexusage.tex', can be run as
+ The sample 'LaTeX' file below, named 'latexusage.tex', can be run as
follows:
latex latexusage
asy latexusage-*.asy
@@ -4725,53 +4711,50 @@ or
pdflatex latexusage
asy latexusage-*.asy
pdflatex latexusage
- To switch between using inline Asymptote code with `latex' and
-`pdflatex' you may first need to remove the files `latexusage-*.tex'.
-
- An even better method for processing a `LaTeX' file with embedded
-`Asymptote' code is to use the `latexmk' utility from
-
- `http://mirror.ctan.org/support/latexmk/'
- after putting the contents of
-`http://sourceforge.net/p/asymptote/code/HEAD/tree/trunk/asymptote/doc/latexmkrc'
-in a file `latexmkrc' in the same directory. The command
+To switch between using inline Asymptote code with 'latex' and
+'pdflatex' you may first need to remove the files 'latexusage-*.tex'.
+
+ An even better method for processing a 'LaTeX' file with embedded
+'Asymptote' code is to use the 'latexmk' utility from
+ <http://mirror.ctan.org/support/latexmk/>
+after putting the contents of
+<http://sourceforge.net/p/asymptote/code/HEAD/tree/trunk/asymptote/doc/latexmkrc>
+in a file 'latexmkrc' in the same directory. The command
latexmk -pdf latexusage
- will then call `Asymptote' automatically, recompiling only the figures
-that have changed. Since each figure is compiled in a separate system
+will then call 'Asymptote' automatically, recompiling only the figures
+that have changed. Since each figure is compiled in a separate system
process, this method also tends to use less memory. To store the
-figures in a separate directory named `asy', one can define
+figures in a separate directory named 'asy', one can define
\def\asydir{asy}
- in `latexusage.tex' and put the contents of
-`http://sourceforge.net/p/asymptote/code/HEAD/tree/trunk/asymptote/doc/latexmkrc_asydir'
-in a file `latexmkrc' in the same directory. External `Asymptote' code
-in `filename.asy' should be included with
+ in 'latexusage.tex' and put the contents of
+<http://sourceforge.net/p/asymptote/code/HEAD/tree/trunk/asymptote/doc/latexmkrc_asydir>
+in a file 'latexmkrc' in the same directory. External 'Asymptote' code
+in 'filename.asy' should be included with
\asyinclude[<options>]{<filename.asy>}
- so that `latexmk' will recognize when the code is changed. Note that
-`latemk' requires `perl', available from `http://www.perl.org/'.
-
- One can specify `width', `height', `keepAspect', `viewportwidth',
-`viewportheight', `attach', and `inline'. `keyval'-style options to
-the `asy' and `asyinclude' environments. Three-dimensional PRC files
-may either be embedded within the page (the default) or attached as
-annotated (but printable) attachments, using the `attach' option and
-the `attachfile2' (or older `attachfile') `LaTeX' package. The
-`inline' option generates inline `LaTeX' code instead of EPS or PDF
-files. This makes 2D LaTeX symbols visible to the
-`\begin{asy}...\end{asy}' environment. In this mode, Asymptote
-correctly aligns 2D LaTeX symbols defined outside of
-`\begin{asy}...\end{asy}', but treats their size as zero; an optional
-second string can be given to `Label' to provide an estimate of the
-unknown label size.
-
- Note that if the `latex' TeX engine is used with the `inline'
-option, labels might not show up in DVI viewers that cannot handle raw
-`PostScript' code. One can use `dvips'/`dvipdf' to produce
-`PostScript'/PDF output (we recommend using the modified version of
-`dvipdf' in the `Asymptote' patches directory, which accepts the `dvips
+so that 'latexmk' will recognize when the code is changed. Note that
+'latemk' requires 'perl', available from <http://www.perl.org/>.
+
+ One can specify 'width', 'height', 'keepAspect', 'viewportwidth',
+'viewportheight', 'attach', and 'inline'. 'keyval'-style options to the
+'asy' and 'asyinclude' environments. Three-dimensional PRC files may
+either be embedded within the page (the default) or attached as
+annotated (but printable) attachments, using the 'attach' option and the
+'attachfile2' (or older 'attachfile') 'LaTeX' package. The 'inline'
+option generates inline 'LaTeX' code instead of EPS or PDF files. This
+makes 2D LaTeX symbols visible to the '\begin{asy}...\end{asy}'
+environment. In this mode, Asymptote correctly aligns 2D LaTeX symbols
+defined outside of '\begin{asy}...\end{asy}', but treats their size as
+zero; an optional second string can be given to 'Label' to provide an
+estimate of the unknown label size.
+
+ Note that if the 'latex' TeX engine is used with the 'inline' option,
+labels might not show up in DVI viewers that cannot handle raw
+'PostScript' code. One can use 'dvips'/'dvipdf' to produce
+'PostScript'/PDF output (we recommend using the modified version of
+'dvipdf' in the 'Asymptote' patches directory, which accepts the 'dvips
-z' hyperdvi option).
- Here now is `latexusage.tex':
-
+ Here now is 'latexusage.tex':
\documentclass[12pt]{article}
% Use this form to include EPS (latex) or PDF (pdflatex) files:
@@ -4788,6 +4771,8 @@ option, labels might not show up in DVI viewers that cannot handle raw
\begin{document}
+% Optional subdirectory for latex files (no spaces):
+\def\asylatexdir{}
% Optional subdirectory for asy files (no spaces):
\def\asydir{}
@@ -4889,20 +4874,20 @@ draw("$X$",z0+s--z2+s,darkgreen,Arrows,Bars,PenMargins);
\end{asy}
\end{center}
\end{document}
-
+[latexusage]

File: asymptote.info, Node: Base modules, Next: Options, Prev: LaTeX usage, Up: Top
8 Base modules
**************
-`Asymptote' currently ships with the following base modules:
+'Asymptote' currently ships with the following base modules:
* Menu:
-* plain:: Default `Asymptote' base file
+* plain:: Default 'Asymptote' base file
* simplex:: Linear programming: simplex method
-* math:: Extend `Asymptote''s math capabilities
+* math:: Extend 'Asymptote''s math capabilities
* interpolate:: Interpolation routines
* geometry:: Geometry routines
* trembling:: Wavy lines
@@ -4917,11 +4902,11 @@ File: asymptote.info, Node: Base modules, Next: Options, Prev: LaTeX usage,
* roundedpath:: Round the sharp corners of paths
* animation:: Embedded PDF and MPEG movies
* embed:: Embedding movies, sounds, and 3D objects
-* slide:: Making presentations with `Asymptote'
-* MetaPost:: `MetaPost' compatibility routines
-* unicode:: Accept `unicode' (UTF-8) characters
-* latin1:: Accept `ISO 8859-1' characters
-* babel:: Interface to `LaTeX' `babel' package
+* slide:: Making presentations with 'Asymptote'
+* MetaPost:: 'MetaPost' compatibility routines
+* unicode:: Accept 'unicode' (UTF-8) characters
+* latin1:: Accept 'ISO 8859-1' characters
+* babel:: Interface to 'LaTeX' 'babel' package
* labelpath:: Drawing curved labels
* labelpath3:: Drawing curved labels in 3D
* annotate:: Annotate your PDF files
@@ -4943,210 +4928,205 @@ File: asymptote.info, Node: Base modules, Next: Options, Prev: LaTeX usage,

File: asymptote.info, Node: plain, Next: simplex, Up: Base modules
-8.1 `plain'
+8.1 'plain'
===========
-This is the default `Asymptote' base file, which defines key parts of
-the drawing language (such as the `picture' structure).
+This is the default 'Asymptote' base file, which defines key parts of
+the drawing language (such as the 'picture' structure).
- By default, an implicit `private import plain;' occurs before
+ By default, an implicit 'private import plain;' occurs before
translating a file and before the first command given in interactive
mode. This also applies when translating files for module definitions
-(except when translating `plain', of course). This means that the
-types and functions defined in `plain' are accessible in almost all
-`Asymptote' code. Use the `-noautoplain' command-line option to disable
+(except when translating 'plain', of course). This means that the types
+and functions defined in 'plain' are accessible in almost all
+'Asymptote' code. Use the '-noautoplain' command-line option to disable
this feature.

File: asymptote.info, Node: simplex, Next: math, Prev: plain, Up: Base modules
-8.2 `simplex'
+8.2 'simplex'
=============
This package solves the two-variable linear programming problem using
-the simplex method. It is used by the module `plain' for automatic
+the simplex method. It is used by the module 'plain' for automatic
sizing of pictures.

File: asymptote.info, Node: math, Next: interpolate, Prev: simplex, Up: Base modules
-8.3 `math'
+8.3 'math'
==========
-This package extends `Asymptote''s mathematical capabilities with
-useful functions such as
+This package extends 'Asymptote''s mathematical capabilities with useful
+functions such as
-`void drawline(picture pic=currentpicture, pair P, pair Q, pen p=currentpen);'
- draw the visible portion of the (infinite) line going through `P'
- and `Q', without altering the size of picture `pic', using pen `p'.
+'void drawline(picture pic=currentpicture, pair P, pair Q, pen p=currentpen);'
+ draw the visible portion of the (infinite) line going through 'P'
+ and 'Q', without altering the size of picture 'pic', using pen 'p'.
-`real intersect(triple P, triple Q, triple n, triple Z);'
+'real intersect(triple P, triple Q, triple n, triple Z);'
returns the intersection time of the extension of the line segment
- `PQ' with the plane perpendicular to `n' and passing through `Z'.
+ 'PQ' with the plane perpendicular to 'n' and passing through 'Z'.
-`triple intersectionpoint(triple n0, triple P0, triple n1, triple P1);'
+'triple intersectionpoint(triple n0, triple P0, triple n1, triple P1);'
Return any point on the intersection of the two planes with normals
- `n0' and `n1' passing through points `P0' and `P1', respectively.
- If the planes are parallel, return `(infinity,infinity,infinity)'.
+ 'n0' and 'n1' passing through points 'P0' and 'P1', respectively.
+ If the planes are parallel, return '(infinity,infinity,infinity)'.
-`pair[] quarticroots(real a, real b, real c, real d, real e);'
+'pair[] quarticroots(real a, real b, real c, real d, real e);'
returns the four complex roots of the quartic equation
ax^4+bx^3+cx^2+dx+e=0.
-`pair[][] fft(pair[][] a, int sign=1)'
+'pair[][] fft(pair[][] a, int sign=1)'
returns the two-dimensional Fourier transform of a using the given
- `sign'.
+ 'sign'.
-`real time(path g, real x, int n=0)'
- returns the `n'th intersection time of path `g' with the vertical
+'real time(path g, real x, int n=0)'
+ returns the 'n'th intersection time of path 'g' with the vertical
line through x.
-`real time(path g, explicit pair z, int n=0)'
- returns the `n'th intersection time of path `g' with the horizontal
- line through `(0,z.y)'.
+'real time(path g, explicit pair z, int n=0)'
+ returns the 'n'th intersection time of path 'g' with the horizontal
+ line through '(0,z.y)'.
-`real value(path g, real x, int n=0)'
- returns the `n'th `y' value of `g' at `x'.
+'real value(path g, real x, int n=0)'
+ returns the 'n'th 'y' value of 'g' at 'x'.
-`real value(path g, real x, int n=0)'
- returns the `n'th `x' value of `g' at `y=z.y'.
+'real value(path g, explicit pair z, int n=0)'
+ returns the 'n'th 'x' value of 'g' at 'y=z.y'.
-`real slope(path g, real x, int n=0)'
- returns the `n'th slope of `g' at `x'.
+'real slope(path g, real x, int n=0)'
+ returns the 'n'th slope of 'g' at 'x'.
-`real slope(path g, explicit pair z, int n=0)'
- returns the `n'th slope of `g' at `y=z.y'.
+'real slope(path g, explicit pair z, int n=0)'
+ returns the 'n'th slope of 'g' at 'y=z.y'.
int[][] segment(bool[] b) returns the indices of consecutive
- true-element segments of bool[] `b'.
+ true-element segments of bool[] 'b'.
-`real[] partialsum(real[] a)'
- returns the partial sums of a real array `a'.
+'real[] partialsum(real[] a)'
+ returns the partial sums of a real array 'a'.
-`real[] partialsum(real[] a, real[] dx)'
- returns the partial `dx'-weighted sums of a real array `a'.
+'real[] partialsum(real[] a, real[] dx)'
+ returns the partial 'dx'-weighted sums of a real array 'a'.
-`bool increasing(real[] a, bool strict=false)'
- returns, if `strict=false', whether `i > j' implies `a[i] >=
- a[j]', or if `strict=true', whether `i > j' implies implies `a[i]
- > a[j]'.
+'bool increasing(real[] a, bool strict=false)'
+ returns, if 'strict=false', whether 'i > j' implies 'a[i] >= a[j]',
+ or if 'strict=true', whether 'i > j' implies implies 'a[i] > a[j]'.
-`int unique(real[] a, real x)'
- if the sorted array `a' does not contain `x', insert it
- sequentially, returning the index of `x' in the resulting array.
+'int unique(real[] a, real x)'
+ if the sorted array 'a' does not contain 'x', insert it
+ sequentially, returning the index of 'x' in the resulting array.
-`bool lexorder(pair a, pair b)'
- returns the strict lexicographical partial order of `a' and `b'.
+'bool lexorder(pair a, pair b)'
+ returns the strict lexicographical partial order of 'a' and 'b'.
-`bool lexorder(triple a, triple b)'
- returns the strict lexicographical partial order of `a' and `b'.
+'bool lexorder(triple a, triple b)'
+ returns the strict lexicographical partial order of 'a' and 'b'.

File: asymptote.info, Node: interpolate, Next: geometry, Prev: math, Up: Base modules
-8.4 `interpolate'
+8.4 'interpolate'
=================
This module implements Lagrange, Hermite, and standard cubic spline
-interpolation in `Asymptote', as illustrated in the example
-`interpolate1.asy'.
+interpolation in 'Asymptote', as illustrated in the example
+'interpolate1.asy'.

File: asymptote.info, Node: geometry, Next: trembling, Prev: interpolate, Up: Base modules
-8.5 `geometry'
+8.5 'geometry'
==============
This module, written by Philippe Ivaldi, provides an extensive set of
-geometry routines, including `perpendicular' symbols and a `triangle'
-structure. Link to the documentation for the `geometry' module are
-posted here: `http://asymptote.sourceforge.net/links.html', including
-an extensive set of examples,
-`http://www.piprime.fr/files/asymptote/geometry/', and an index:
-
- `http://www.piprime.fr/files/asymptote/geometry/modules/geometry.asy.index.type.html'
+geometry routines, including 'perpendicular' symbols and a 'triangle'
+structure. Link to the documentation for the 'geometry' module are
+posted here: <http://asymptote.sourceforge.net/links.html>, including an
+extensive set of examples,
+<http://www.piprime.fr/files/asymptote/geometry/>, and an index:
+ <http://www.piprime.fr/files/asymptote/geometry/modules/geometry.asy.index.type.html>

File: asymptote.info, Node: trembling, Next: stats, Prev: geometry, Up: Base modules
-8.6 `trembling'
+8.6 'trembling'
===============
This module, written by Philippe Ivaldi and illustrated in the example
-`floatingdisk.asy', allows one to draw wavy lines, as if drawn by hand.
+'floatingdisk.asy', allows one to draw wavy lines, as if drawn by hand.

File: asymptote.info, Node: stats, Next: patterns, Prev: trembling, Up: Base modules
-8.7 `stats'
+8.7 'stats'
===========
This package implements a Gaussian random number generator and a
-collection of statistics routines, including `histogram' and
-`leastsquares'.
+collection of statistics routines, including 'histogram' and
+'leastsquares'.

File: asymptote.info, Node: patterns, Next: markers, Prev: stats, Up: Base modules
-8.8 `patterns'
+8.8 'patterns'
==============
-This package implements `Postscript' tiling patterns and includes
+This package implements 'Postscript' tiling patterns and includes
several convenient pattern generation routines.

File: asymptote.info, Node: markers, Next: tree, Prev: patterns, Up: Base modules
-8.9 `markers'
+8.9 'markers'
=============
This package implements specialized routines for marking paths and
angles. The principal mark routine provided by this package is
markroutine markinterval(int n=1, frame f, bool rotated=false);
- which centers `n' copies of frame `f' within uniformly space intervals
+which centers 'n' copies of frame 'f' within uniformly space intervals
in arclength along the path, optionally rotated by the angle of the
local tangent.
- The `marker' (*note marker::) routine can be used to construct new
+ The 'marker' (*note marker::) routine can be used to construct new
markers from these predefined frames:
frame stickframe(int n=1, real size=0, pair space=0, real angle=0,
pair offset=0, pen p=currentpen);
-
frame circlebarframe(int n=1, real barsize=0,
real radius=0,real angle=0,
pair offset=0, pen p=currentpen,
filltype filltype=NoFill, bool above=false);
-
frame crossframe(int n=3, real size=0, pair space=0,
real angle=0, pair offset=0, pen p=currentpen);
-
frame tildeframe(int n=1, real size=0, pair space=0,
real angle=0, pair offset=0, pen p=currentpen);
For convenience, this module also constructs the markers
-`StickIntervalMarker', `CrossIntervalMarker',
-`CircleBarIntervalMarker', and `TildeIntervalMarker' from the above
-frames. The example `markers1.asy' illustrates the use of these markers:
-
+'StickIntervalMarker', 'CrossIntervalMarker', 'CircleBarIntervalMarker',
+and 'TildeIntervalMarker' from the above frames. The example
+'markers1.asy' illustrates the use of these markers:
+ [markers1]
-This package also provides a routine for marking an angle AOB:
+ This package also provides a routine for marking an angle AOB:
void markangle(picture pic=currentpicture, Label L="",
int n=1, real radius=0, real space=0,
pair A, pair O, pair B, arrowbar arrow=None,
pen p=currentpen, margin margin=NoMargin,
marker marker=nomarker);
- as illustrated in the example `markers2.asy'.
-
+as illustrated in the example 'markers2.asy'.
+ [markers2]

File: asymptote.info, Node: tree, Next: binarytree, Prev: markers, Up: Base modules
-8.10 `tree'
+8.10 'tree'
===========
This package implements an example of a dynamic binary search tree.
@@ -5154,13 +5134,12 @@ This package implements an example of a dynamic binary search tree.

File: asymptote.info, Node: binarytree, Next: drawtree, Prev: tree, Up: Base modules
-8.11 `binarytree'
+8.11 'binarytree'
=================
This module can be used to draw an arbitrary binary tree and includes an
input routine for the special case of a binary search tree, as
-illustrated in the example `binarytreetest.asy':
-
+illustrated in the example 'binarytreetest.asy':
import binarytree;
picture pic,pic2;
@@ -5175,153 +5154,150 @@ add(pic.fit(),(0,0),10N);
add(pic2.fit(),(0,0),10S);
+ [binarytreetest]

File: asymptote.info, Node: drawtree, Next: syzygy, Prev: binarytree, Up: Base modules
-8.12 `drawtree'
+8.12 'drawtree'
===============
-This is a simple tree drawing module used by the example `treetest.asy'.
+This is a simple tree drawing module used by the example 'treetest.asy'.

File: asymptote.info, Node: syzygy, Next: feynman, Prev: drawtree, Up: Base modules
-8.13 `syzygy'
+8.13 'syzygy'
=============
This module automates the drawing of braids, relations, and syzygies,
along with the corresponding equations, as illustrated in the example
-`knots.asy'.
+'knots.asy'.

File: asymptote.info, Node: feynman, Next: roundedpath, Prev: syzygy, Up: Base modules
-8.14 `feynman'
+8.14 'feynman'
==============
This package, contributed by Martin Wiebusch, is useful for drawing
-Feynman diagrams, as illustrated by the examples `eetomumu.asy' and
-`fermi.asy'.
+Feynman diagrams, as illustrated by the examples 'eetomumu.asy' and
+'fermi.asy'.

File: asymptote.info, Node: roundedpath, Next: animation, Prev: feynman, Up: Base modules
-8.15 `roundedpath'
+8.15 'roundedpath'
==================
This package, contributed by Stefan Knorr, is useful for rounding the
sharp corners of paths, as illustrated in the example file
-`roundpath.asy'.
+'roundpath.asy'.

File: asymptote.info, Node: animation, Next: embed, Prev: roundedpath, Up: Base modules
-8.16 `animation'
+8.16 'animation'
================
This module allows one to generate animations, as illustrated by the
-files `wheel.asy', `wavepacket.asy', and `cube.asy' in the `animations'
-subdirectory of the examples directory. These animations use the
-`ImageMagick' `convert' program to merge multiple images into a GIF or
+files 'wheel.asy', 'wavepacket.asy', and 'cube.asy' in the 'animations'
+subdirectory of the examples directory. These animations use the
+'ImageMagick' 'convert' program to merge multiple images into a GIF or
MPEG movie.
- The related `animate' module, derived from the `animation' module,
+ The related 'animate' module, derived from the 'animation' module,
generates higher-quality portable clickable PDF movies, with optional
-controls. This requires installing the package
-
- `http://mirror.ctan.org/macros/latex/contrib/animate/animate.sty'
- (version 2007/11/30 or later) in a new directory `animate' in the
-local `LaTeX' directory (for example, in
-`/usr/local/share/texmf/tex/latex/animate'). On `UNIX' systems, one
-must then execute the command `texhash'.
-
- The example `pdfmovie.asy' in the `animations' directory, along with
-the slide presentations `slidemovies.asy' and `intro.asy', illustrate
-the use of embedded PDF movies. The examples `inlinemovie.tex' and
-`inlinemovie3.tex' show how to generate and embed PDF movies directly
-within a `LaTeX' file (*note LaTeX usage::). The member function
+controls. This requires installing the package
+ <http://mirror.ctan.org/macros/latex/contrib/animate/animate.sty>
+(version 2007/11/30 or later) in a new directory 'animate' in the local
+'LaTeX' directory (for example, in
+'/usr/local/share/texmf/tex/latex/animate'). On 'UNIX' systems, one
+must then execute the command 'texhash'.
+
+ The example 'pdfmovie.asy' in the 'animations' directory, along with
+the slide presentations 'slidemovies.asy' and 'intro.asy', illustrate
+the use of embedded PDF movies. The examples 'inlinemovie.tex' and
+'inlinemovie3.tex' show how to generate and embed PDF movies directly
+within a 'LaTeX' file (*note LaTeX usage::). The member function
string pdf(fit fit=NoBox, real delay=animationdelay, string options="",
bool keep=settings.keep, bool multipage=true);
- of the `animate' structure accepts any of the `animate.sty' options,
-as described here:
-
- `http://mirror.ctan.org/macros/latex/contrib/animate/doc/animate.pdf'
+of the 'animate' structure accepts any of the 'animate.sty' options, as
+described here:
+ <http://mirror.ctan.org/macros/latex/contrib/animate/doc/animate.pdf>

File: asymptote.info, Node: embed, Next: slide, Prev: animation, Up: Base modules
-8.17 `embed'
+8.17 'embed'
============
-This module provides an interface to the `LaTeX' package (included with
-`MikTeX')
-
- `http://mirror.ctan.org/macros/latex/contrib/media9'
- for embedding movies, sounds, and 3D objects into a PDF document.
+This module provides an interface to the 'LaTeX' package (included with
+'MikTeX')
+ <http://mirror.ctan.org/macros/latex/contrib/media9>
+for embedding movies, sounds, and 3D objects into a PDF document.
A more portable method for embedding movie files, which should work
-on any platform and does not require the `media9' package, is provided
-by using the `external' module instead of `embed'.
+on any platform and does not require the 'media9' package, is provided
+by using the 'external' module instead of 'embed'.
Examples of the above two interfaces is provided in the file
-`embeddedmovie.asy' and `externalmovie.asy' in the `animations'
-subdirectory of the examples directory. For a higher quality embedded
-movie generated directly by `Asymptote', use the `animate' module along
-with the `animate.sty' package to embed a portable PDF animation (*note
+'embeddedmovie.asy' and 'externalmovie.asy' in the 'animations'
+subdirectory of the examples directory. For a higher quality embedded
+movie generated directly by 'Asymptote', use the 'animate' module along
+with the 'animate.sty' package to embed a portable PDF animation (*note
animate::).
- An example of embedding `U3D' code is provided in the file
-`embeddedu3d.asy'.
+ An example of embedding 'U3D' code is provided in the file
+'embeddedu3d.asy'.

File: asymptote.info, Node: slide, Next: MetaPost, Prev: embed, Up: Base modules
-8.18 `slide'
+8.18 'slide'
============
This package provides a simple yet high-quality facility for making
-presentation slides, including portable embedded PDF animations (see
-the file `slidemovies.asy'). A simple example is provided in the file
-`slidedemo.asy'.
+presentation slides, including portable embedded PDF animations (see the
+file 'slidemovies.asy'). A simple example is provided in the file
+'slidedemo.asy'.

File: asymptote.info, Node: MetaPost, Next: unicode, Prev: slide, Up: Base modules
-8.19 `MetaPost'
+8.19 'MetaPost'
===============
-This package provides some useful routines to help `MetaPost' users
-migrate old `MetaPost' code to `Asymptote'. Further contributions here
+This package provides some useful routines to help 'MetaPost' users
+migrate old 'MetaPost' code to 'Asymptote'. Further contributions here
are welcome.
- Unlike `MetaPost', `Asymptote' does not implicitly solve linear
-equations and therefore does not have the notion of a `whatever'
-unknown. The routine `extension' (*note extension::) provides a useful
-replacement for a common use of `whatever': finding the intersection
-point of the lines through `P', `Q' and `p', `q'. For less common
-occurrences of `whatever', one can use the built-in explicit linear
-equation solver `solve' instead.
+ Unlike 'MetaPost', 'Asymptote' does not implicitly solve linear
+equations and therefore does not have the notion of a 'whatever'
+unknown. The routine 'extension' (*note extension::) provides a useful
+replacement for a common use of 'whatever': finding the intersection
+point of the lines through 'P', 'Q' and 'p', 'q'. For less common
+occurrences of 'whatever', one can use the built-in explicit linear
+equation solver 'solve' instead.

File: asymptote.info, Node: unicode, Next: latin1, Prev: MetaPost, Up: Base modules
-8.20 `unicode'
+8.20 'unicode'
==============
-Import this package at the beginning of the file to instruct `LaTeX' to
-accept `unicode' (UTF-8) standardized international characters. To use
+Import this package at the beginning of the file to instruct 'LaTeX' to
+accept 'unicode' (UTF-8) standardized international characters. To use
Cyrillic fonts, you will need to change the font encoding:
import unicode;
texpreamble("\usepackage{mathtext}\usepackage[russian]{babel}");
defaultpen(font("T2A","cmr","m","n"));
- Support for Chinese, Japanese, and Korean fonts is provided by the CJK
+Support for Chinese, Japanese, and Korean fonts is provided by the CJK
package:
-
- `http://mirror.ctan.org/languages/chinese/CJK/'
- The following commands enable the CJK song family (within a label,
-you can also temporarily switch to another family, say kai, by
-prepending `"\CJKfamily{kai}"' to the label string):
+ <http://mirror.ctan.org/languages/chinese/CJK/>
+The following commands enable the CJK song family (within a label, you
+can also temporarily switch to another family, say kai, by prepending
+'"\CJKfamily{kai}"' to the label string):
texpreamble("\usepackage{CJK}
\AtBeginDocument{\begin{CJK*}{GBK}{song}}
\AtEndDocument{\clearpage\end{CJK*}}");
@@ -5329,21 +5305,21 @@ texpreamble("\usepackage{CJK}

File: asymptote.info, Node: latin1, Next: babel, Prev: unicode, Up: Base modules
-8.21 `latin1'
+8.21 'latin1'
=============
-If you don't have `LaTeX' support for `unicode' installed, you can
+If you don't have 'LaTeX' support for 'unicode' installed, you can
enable support for Western European languages (ISO 8859-1) by importing
-the module `latin1'. This module can be used as a template for
+the module 'latin1'. This module can be used as a template for
providing support for other ISO 8859 alphabets.

File: asymptote.info, Node: babel, Next: labelpath, Prev: latin1, Up: Base modules
-8.22 `babel'
+8.22 'babel'
============
-This module implements the `LaTeX' `babel' package in `Asymptote'. For
+This module implements the 'LaTeX' 'babel' package in 'Asymptote'. For
example:
import babel;
babel("german");
@@ -5351,65 +5327,65 @@ babel("german");

File: asymptote.info, Node: labelpath, Next: labelpath3, Prev: babel, Up: Base modules
-8.23 `labelpath'
+8.23 'labelpath'
================
-This module uses the `PSTricks' `pstextpath' macro to fit labels along
-a path (properly kerned, as illustrated in the example file
-`curvedlabel.asy'), using the command
+This module uses the 'PSTricks' 'pstextpath' macro to fit labels along a
+path (properly kerned, as illustrated in the example file
+'curvedlabel.asy'), using the command
void labelpath(picture pic=currentpicture, Label L, path g,
string justify=Centered, pen p=currentpen);
- Here `justify' is one of `LeftJustified', `Centered', or
-`RightJustified'. The x component of a shift transform applied to the
-Label is interpreted as a shift along the curve, whereas the y
-component is interpreted as a shift away from the curve. All other
-Label transforms are ignored. This package requires the `latex' tex
-engine and inherits the limitations of the `PSTricks' `\pstextpath'
-macro.
+Here 'justify' is one of 'LeftJustified', 'Centered', or
+'RightJustified'. The x component of a shift transform applied to the
+Label is interpreted as a shift along the curve, whereas the y component
+is interpreted as a shift away from the curve. All other Label
+transforms are ignored. This package requires the 'latex' tex engine
+and inherits the limitations of the 'PSTricks' '\pstextpath' macro.

File: asymptote.info, Node: labelpath3, Next: annotate, Prev: labelpath, Up: Base modules
-8.24 `labelpath3'
+8.24 'labelpath3'
=================
This module, contributed by Jens Schwaiger, implements a 3D version of
-`labelpath' that does not require the `PSTricks' package. An example
-is provided in `curvedlabel3.asy'.
+'labelpath' that does not require the 'PSTricks' package. An example is
+provided in 'curvedlabel3.asy'.

File: asymptote.info, Node: annotate, Next: CAD, Prev: labelpath3, Up: Base modules
-8.25 `annotate'
+8.25 'annotate'
===============
-This module supports PDF annotations for viewing with `Adobe Reader',
+This module supports PDF annotations for viewing with 'Adobe Reader',
via the function
void annotate(picture pic=currentpicture, string title, string text,
pair position);
- Annotations are illustrated in the example file `annotation.asy'.
-Currently, annotations are only implemented for the `latex' (default)
-and `tex' TeX engines.
+Annotations are illustrated in the example file 'annotation.asy'.
+Currently, annotations are only implemented for the 'latex' (default)
+and 'tex' TeX engines.

File: asymptote.info, Node: CAD, Next: graph, Prev: annotate, Up: Base modules
-8.26 `CAD'
+8.26 'CAD'
==========
This package, contributed by Mark Henning, provides basic pen
definitions and measurement functions for simple 2D CAD drawings
-according to DIN 15. It is documented separately, in the file `CAD.pdf'.
+according to DIN 15. It is documented separately, in the file
+'CAD.pdf'.

File: asymptote.info, Node: graph, Next: palette, Prev: CAD, Up: Base modules
-8.27 `graph'
+8.27 'graph'
============
This package implements two-dimensional linear and logarithmic graphs,
including automatic scale and tick selection (with the ability to
-override manually). A graph is a `guide' (that can be drawn with the
+override manually). A graph is a 'guide' (that can be drawn with the
draw command, with an optional legend) constructed with one of the
following routines:
@@ -5420,30 +5396,28 @@ following routines:
int n=ngraph, real T(real)=identity, bool3 cond(real),
interpolate join=operator --);
- Returns a graph using the scaling information for picture `pic'
- (*note automatic scaling::) of the function `f' on the interval
- [`T'(`a'),`T'(`b')], sampling at `n' points evenly spaced in
- [`a',`b'], optionally restricted by the bool3 function `cond' on
- [`a',`b']. If `cond' is:
- * `true', the point is added to the existing guide;
-
- * `default', the point is added to a new guide;
-
- * `false', the point is omitted and a new guide is begun.
+ Returns a graph using the scaling information for picture 'pic'
+ (*note automatic scaling::) of the function 'f' on the interval
+ ['T'('a'),'T'('b')], sampling at 'n' points evenly spaced in
+ ['a','b'], optionally restricted by the bool3 function 'cond' on
+ ['a','b']. If 'cond' is:
+ * 'true', the point is added to the existing guide;
+ * 'default', the point is added to a new guide;
+ * 'false', the point is omitted and a new guide is begun.
The points are connected using the interpolation specified by
- `join':
- * `operator --' (linear interpolation; the abbreviation
- `Straight' is also accepted);
+ 'join':
- * `operator ..' (piecewise Bezier cubic spline interpolation;
- the abbreviation `Spline' is also accepted);
+ * 'operator --' (linear interpolation; the abbreviation
+ 'Straight' is also accepted);
- * `Hermite' (standard cubic spline interpolation using boundary
- condition `notaknot', `natural', `periodic', `clamped(real
- slopea, real slopeb)'), or `monotonic'. The abbreviation
- `Hermite' is equivalent to `Hermite(notaknot)' for
- nonperiodic data and `Hermite(periodic)' for periodic data).
+ * 'operator ..' (piecewise Bezier cubic spline interpolation;
+ the abbreviation 'Spline' is also accepted);
+ * 'Hermite' (standard cubic spline interpolation using boundary
+ condition 'notaknot', 'natural', 'periodic', 'clamped(real
+ slopea, real slopeb)'), or 'monotonic'. The abbreviation
+ 'Hermite' is equivalent to 'Hermite(notaknot)' for nonperiodic
+ data and 'Hermite(periodic)' for periodic data).
* guide graph(picture pic=currentpicture, real x(real), real y(real),
real a, real b, int n=ngraph, real T(real)=identity,
@@ -5452,11 +5426,11 @@ following routines:
real a, real b, int n=ngraph, real T(real)=identity,
bool3 cond(real), interpolate join=operator --);
- Returns a graph using the scaling information for picture `pic' of
- the parametrized function (`x'(t),`y'(t)) for t in the interval
- [`T'(`a'),`T'(`b')], sampling at `n' points evenly spaced in
- [`a',`b'], optionally restricted by the bool3 function `cond' on
- [`a',`b'], using the given interpolation type.
+ Returns a graph using the scaling information for picture 'pic' of
+ the parametrized function ('x'(t),'y'(t)) for t in the interval
+ ['T'('a'),'T'('b')], sampling at 'n' points evenly spaced in
+ ['a','b'], optionally restricted by the bool3 function 'cond' on
+ ['a','b'], using the given interpolation type.
* guide graph(picture pic=currentpicture, pair z(real), real a, real b,
int n=ngraph, real T(real)=identity,
@@ -5465,89 +5439,88 @@ following routines:
int n=ngraph, real T(real)=identity, bool3 cond(real),
interpolate join=operator --);
- Returns a graph using the scaling information for picture `pic' of
- the parametrized function `z'(t) for t in the interval
- [`T'(`a'),`T'(`b')], sampling at `n' points evenly spaced in
- [`a',`b'], optionally restricted by the bool3 function `cond' on
- [`a',`b'], using the given interpolation type.
+ Returns a graph using the scaling information for picture 'pic' of
+ the parametrized function 'z'(t) for t in the interval
+ ['T'('a'),'T'('b')], sampling at 'n' points evenly spaced in
+ ['a','b'], optionally restricted by the bool3 function 'cond' on
+ ['a','b'], using the given interpolation type.
* guide graph(picture pic=currentpicture, pair[] z,
interpolate join=operator --);
guide[] graph(picture pic=currentpicture, pair[] z, bool3[] cond,
interpolate join=operator --);
- Returns a graph using the scaling information for picture `pic' of
- the elements of the array `z', optionally restricted to those
- indices for which the elements of the boolean array `cond' are
- `true', using the given interpolation type.
+ Returns a graph using the scaling information for picture 'pic' of
+ the elements of the array 'z', optionally restricted to those
+ indices for which the elements of the boolean array 'cond' are
+ 'true', using the given interpolation type.
* guide graph(picture pic=currentpicture, real[] x, real[] y,
interpolate join=operator --);
guide[] graph(picture pic=currentpicture, real[] x, real[] y,
bool3[] cond, interpolate join=operator --);
- Returns a graph using the scaling information for picture `pic' of
- the elements of the arrays (`x',`y'), optionally restricted to
- those indices for which the elements of the boolean array `cond'
- are `true', using the given interpolation type.
+ Returns a graph using the scaling information for picture 'pic' of
+ the elements of the arrays ('x','y'), optionally restricted to
+ those indices for which the elements of the boolean array 'cond'
+ are 'true', using the given interpolation type.
* guide polargraph(picture pic=currentpicture, real f(real), real a,
real b, int n=ngraph, interpolate join=operator --);
Returns a polar-coordinate graph using the scaling information for
- picture `pic' of the function `f' on the interval [`a',`b'],
- sampling at `n' evenly spaced points, with the given interpolation
+ picture 'pic' of the function 'f' on the interval ['a','b'],
+ sampling at 'n' evenly spaced points, with the given interpolation
type.
* guide polargraph(picture pic=currentpicture, real[] r, real[] theta,
interpolate join=operator--);
- Returns a polar-coordinate graph using the scaling information for
- picture `pic' of the elements of the arrays (`r',`theta'), using
+ Returns a polar-coordinate graph using the scaling information for
+ picture 'pic' of the elements of the arrays ('r','theta'), using
the given interpolation type.
-
An axis can be drawn on a picture with one of the following commands:
* void xaxis(picture pic=currentpicture, Label L="", axis axis=YZero,
real xmin=-infinity, real xmax=infinity, pen p=currentpen,
ticks ticks=NoTicks, arrowbar arrow=None, bool above=false);
- Draw an x axis on picture `pic' from x=`xmin' to x=`xmax' using
- pen `p', optionally labelling it with Label `L'. The relative
- label location along the axis (a real number from [0,1]) defaults
- to 1 (*note Label::), so that the label is drawn at the end of the
- axis. An infinite value of `xmin' or `xmax' specifies that the
+ Draw an x axis on picture 'pic' from x='xmin' to x='xmax' using pen
+ 'p', optionally labelling it with Label 'L'. The relative label
+ location along the axis (a real number from [0,1]) defaults to 1
+ (*note Label::), so that the label is drawn at the end of the axis.
+ An infinite value of 'xmin' or 'xmax' specifies that the
corresponding axis limit will be automatically determined from the
- picture limits. The optional `arrow' argument takes the same
- values as in the `draw' command (*note arrows::). The axis is
- drawn before any existing objects in `pic' unless `above=true'.
- The axis placement is determined by one of the following `axis'
+ picture limits. The optional 'arrow' argument takes the same
+ values as in the 'draw' command (*note arrows::). The axis is
+ drawn before any existing objects in 'pic' unless 'above=true'.
+ The axis placement is determined by one of the following 'axis'
types:
- `YZero(bool extend=true)'
+ 'YZero(bool extend=true)'
Request an x axis at y=0 (or y=1 on a logarithmic axis)
extending to the full dimensions of the picture, unless
- `extend'=false.
+ 'extend'=false.
- `YEquals(real Y, bool extend=true)'
- Request an x axis at y=`Y' extending to the full dimensions
- of the picture, unless `extend'=false.
+ 'YEquals(real Y, bool extend=true)'
+ Request an x axis at y='Y' extending to the full dimensions of
+ the picture, unless 'extend'=false.
- `Bottom(bool extend=false)'
+ 'Bottom(bool extend=false)'
Request a bottom axis.
- `Top(bool extend=false)'
+ 'Top(bool extend=false)'
Request a top axis.
- `BottomTop(bool extend=false)'
+ 'BottomTop(bool extend=false)'
Request a bottom and top axis.
-
Custom axis types can be created by following the examples in
- `graph.asy'. One can easily override the default values for the
- standard axis types: import graph;
+ 'graph.asy'. One can easily override the default values for the
+ standard axis types:
+ import graph;
YZero=new axis(bool extend=true) {
return new void(picture pic, axisT axis) {
@@ -5562,98 +5535,85 @@ following routines:
};
YZero=YZero();
- The default tick option is `NoTicks'. The options `LeftTicks',
- `RightTicks', or `Ticks' can be used to draw ticks on the left,
+
+ The default tick option is 'NoTicks'. The options 'LeftTicks',
+ 'RightTicks', or 'Ticks' can be used to draw ticks on the left,
right, or both sides of the path, relative to the direction in
which the path is drawn. These tick routines accept a number of
- optional arguments: ticks LeftTicks(Label format="", ticklabel ticklabel=null,
+ optional arguments:
+ ticks LeftTicks(Label format="", ticklabel ticklabel=null,
bool beginlabel=true, bool endlabel=true,
int N=0, int n=0, real Step=0, real step=0,
bool begin=true, bool end=true, tickmodifier modify=None,
real Size=0, real size=0, bool extend=false,
pen pTick=nullpen, pen ptick=nullpen);
- If any of these parameters are omitted, reasonable defaults will
- be chosen:
- `Label format'
- override the default tick label format (`defaultformat',
+ If any of these parameters are omitted, reasonable defaults will be
+ chosen:
+ 'Label format'
+ override the default tick label format ('defaultformat',
initially "$%.4g$"), rotation, pen, and alignment (for
- example, `LeftSide', `Center', or `RightSide') relative to
- the axis. To enable `LaTeX' math mode fonts, the format
- string should begin and end with `$' *note format::. If the
- format string is `trailingzero', trailing zeros will be added
- to the tick labels; if the format string is `"%"', the tick
- label will be suppressed;
-
- `ticklabel'
- is a function `string(real x)' returning the label (by
- default, format(format.s,x)) for each major tick value `x';
-
- `bool beginlabel'
+ example, 'LeftSide', 'Center', or 'RightSide') relative to the
+ axis. To enable 'LaTeX' math mode fonts, the format string
+ should begin and end with '$' *note format::. If the format
+ string is 'trailingzero', trailing zeros will be added to the
+ tick labels; if the format string is '"%"', the tick label
+ will be suppressed;
+ 'ticklabel'
+ is a function 'string(real x)' returning the label (by
+ default, format(format.s,x)) for each major tick value 'x';
+ 'bool beginlabel'
include the first label;
-
- `bool endlabel'
+ 'bool endlabel'
include the last label;
-
- `int N'
+ 'int N'
when automatic scaling is enabled (the default; *note
automatic scaling::), divide a linear axis evenly into this
many intervals, separated by major ticks; for a logarithmic
axis, this is the number of decades between labelled ticks;
-
- `int n'
- divide each interval into this many subintervals, separated
- by minor ticks;
-
- `real Step'
- the tick value spacing between major ticks (if `N'=`0');
-
- `real step'
- the tick value spacing between minor ticks (if `n'=`0');
-
- `bool begin'
+ 'int n'
+ divide each interval into this many subintervals, separated by
+ minor ticks;
+ 'real Step'
+ the tick value spacing between major ticks (if 'N'='0');
+ 'real step'
+ the tick value spacing between minor ticks (if 'n'='0');
+ 'bool begin'
include the first major tick;
-
- `bool end'
+ 'bool end'
include the last major tick;
-
- `tickmodifier modify;'
- an optional function that takes and returns a `tickvalue'
- structure having real[] members `major' and `minor'
- consisting of the tick values (to allow modification of the
- automatically generated tick values);
-
- `real Size'
- the size of the major ticks (in `PostScript' coordinates);
-
- `real size'
- the size of the minor ticks (in `PostScript' coordinates);
-
- `bool extend;'
+ 'tickmodifier modify;'
+ an optional function that takes and returns a 'tickvalue'
+ structure having real[] members 'major' and 'minor' consisting
+ of the tick values (to allow modification of the automatically
+ generated tick values);
+ 'real Size'
+ the size of the major ticks (in 'PostScript' coordinates);
+ 'real size'
+ the size of the minor ticks (in 'PostScript' coordinates);
+ 'bool extend;'
extend the ticks between two axes (useful for drawing a grid
on the graph);
-
- `pen pTick'
+ 'pen pTick'
an optional pen used to draw the major ticks;
-
- `pen ptick'
+ 'pen ptick'
an optional pen used to draw the minor ticks.
-
- For convenience, the predefined tickmodifiers `OmitTick(... real[]
- x)', `OmitTickInterval(real a, real b)', and
- `OmitTickIntervals(real[] a, real[] b)' can be used to remove
- specific auto-generated ticks and their labels. The
- `OmitFormat(string s=defaultformat ... real[] x)' ticklabel can be
+ For convenience, the predefined tickmodifiers 'OmitTick(... real[]
+ x)', 'OmitTickInterval(real a, real b)', and
+ 'OmitTickIntervals(real[] a, real[] b)' can be used to remove
+ specific auto-generated ticks and their labels. The
+ 'OmitFormat(string s=defaultformat ... real[] x)' ticklabel can be
used to remove specific tick labels but not the corresponding
- ticks. The tickmodifier `NoZero' is an abbreviation for
- `OmitTick(0)' and the ticklabel `NoZeroFormat' is an abbrevation
- for `OmitFormat(0)'.
+ ticks. The tickmodifier 'NoZero' is an abbreviation for
+ 'OmitTick(0)' and the ticklabel 'NoZeroFormat' is an abbrevation
+ for 'OmitFormat(0)'.
It is also possible to specify custom tick locations with
- `LeftTicks', `RightTicks', and `Ticks' by passing explicit real
- arrays `Ticks' and (optionally) `ticks' containing the locations
- of the major and minor ticks, respectively: ticks LeftTicks(Label format="", ticklabel ticklabel=null,
+ 'LeftTicks', 'RightTicks', and 'Ticks' by passing explicit real
+ arrays 'Ticks' and (optionally) 'ticks' containing the locations of
+ the major and minor ticks, respectively:
+ ticks LeftTicks(Label format="", ticklabel ticklabel=null,
bool beginlabel=true, bool endlabel=true,
real[] Ticks, real[] ticks=new real[],
real Size=0, real size=0, bool extend=false,
@@ -5664,87 +5624,90 @@ following routines:
ticks ticks=NoTicks, arrowbar arrow=None, bool above=false,
bool autorotate=true);
- Draw a y axis on picture `pic' from y=`ymin' to y=`ymax' using pen
- `p', optionally labelling it with a Label `L' that is autorotated
- unless `autorotate=false'. The relative location of the label (a
- real number from [0,1]) defaults to 1 (*note Label::). An infinite
- value of `ymin' or `ymax' specifies that the corresponding axis
+ Draw a y axis on picture 'pic' from y='ymin' to y='ymax' using pen
+ 'p', optionally labelling it with a Label 'L' that is autorotated
+ unless 'autorotate=false'. The relative location of the label (a
+ real number from [0,1]) defaults to 1 (*note Label::). An infinite
+ value of 'ymin' or 'ymax' specifies that the corresponding axis
limit will be automatically determined from the picture limits.
- The optional `arrow' argument takes the same values as in the
- `draw' command (*note arrows::). The axis is drawn before any
- existing objects in `pic' unless `above=true'. The tick type is
- specified by `ticks' and the axis placement is determined by one
- of the following `axis' types:
+ The optional 'arrow' argument takes the same values as in the
+ 'draw' command (*note arrows::). The axis is drawn before any
+ existing objects in 'pic' unless 'above=true'. The tick type is
+ specified by 'ticks' and the axis placement is determined by one of
+ the following 'axis' types:
- `XZero(bool extend=true)'
+ 'XZero(bool extend=true)'
Request a y axis at x=0 (or x=1 on a logarithmic axis)
extending to the full dimensions of the picture, unless
- `extend'=false.
+ 'extend'=false.
- `XEquals(real X, bool extend=true)'
- Request a y axis at x=`X' extending to the full dimensions of
- the picture, unless `extend'=false.
+ 'XEquals(real X, bool extend=true)'
+ Request a y axis at x='X' extending to the full dimensions of
+ the picture, unless 'extend'=false.
- `Left(bool extend=false)'
+ 'Left(bool extend=false)'
Request a left axis.
- `Right(bool extend=false)'
+ 'Right(bool extend=false)'
Request a right axis.
- `LeftRight(bool extend=false)'
+ 'LeftRight(bool extend=false)'
Request a left and right axis.
-
- * For convenience, the functions void xequals(picture pic=currentpicture, Label L="", real x,
+ * For convenience, the functions
+ void xequals(picture pic=currentpicture, Label L="", real x,
bool extend=false, real ymin=-infinity, real ymax=infinity,
pen p=currentpen, ticks ticks=NoTicks, bool above=true,
arrowbar arrow=None);
- and void yequals(picture pic=currentpicture, Label L="", real y,
+ and
+ void yequals(picture pic=currentpicture, Label L="", real y,
bool extend=false, real xmin=-infinity, real xmax=infinity,
pen p=currentpen, ticks ticks=NoTicks, bool above=true,
arrowbar arrow=None);
- can be respectively used to call `yaxis' and `xaxis' with the
- appropriate axis types `XEquals(x,extend)' and
- `YEquals(y,extend)'. This is the recommended way of drawing
- vertical or horizontal lines and axes at arbitrary locations.
+ can be respectively used to call 'yaxis' and 'xaxis' with the
+ appropriate axis types 'XEquals(x,extend)' and 'YEquals(y,extend)'.
+ This is the recommended way of drawing vertical or horizontal lines
+ and axes at arbitrary locations.
* void axes(picture pic=currentpicture, Label xlabel="", Label ylabel="",
bool extend=true,
pair min=(-infinity,-infinity), pair max=(infinity,infinity),
pen p=currentpen, arrowbar arrow=None, bool above=false);
- This convenience routine draws both x and y axes on picture `pic'
- from `min' to `max', with optional labels `xlabel' and `ylabel'
- and any arrows specified by `arrow'. The axes are drawn on top of
- existing objects in `pic' only if `above=true'.
+ This convenience routine draws both x and y axes on picture 'pic'
+ from 'min' to 'max', with optional labels 'xlabel' and 'ylabel' and
+ any arrows specified by 'arrow'. The axes are drawn on top of
+ existing objects in 'pic' only if 'above=true'.
* void axis(picture pic=currentpicture, Label L="", path g,
pen p=currentpen, ticks ticks, ticklocate locate,
arrowbar arrow=None, int[] divisor=new int[],
bool above=false, bool opposite=false);
- This routine can be used to draw on picture `pic' a general axis
- based on an arbitrary path `g', using pen `p'. One can optionally
- label the axis with Label `L' and add an arrow `arrow'. The tick
- type is given by `ticks'. The optional integer array `divisor'
+ This routine can be used to draw on picture 'pic' a general axis
+ based on an arbitrary path 'g', using pen 'p'. One can optionally
+ label the axis with Label 'L' and add an arrow 'arrow'. The tick
+ type is given by 'ticks'. The optional integer array 'divisor'
specifies what tick divisors to try in the attempt to produce
- uncrowded tick labels. A `true' value for the flag `opposite'
- identifies an unlabelled secondary axis (typically drawn opposite
- a primary axis). The axis is drawn before any existing objects in
- `pic' unless `above=true'. The tick locator `ticklocate' is
- constructed by the routine ticklocate ticklocate(real a, real b, autoscaleT S=defaultS,
+ uncrowded tick labels. A 'true' value for the flag 'opposite'
+ identifies an unlabelled secondary axis (typically drawn opposite a
+ primary axis). The axis is drawn before any existing objects in
+ 'pic' unless 'above=true'. The tick locator 'ticklocate' is
+ constructed by the routine
+ ticklocate ticklocate(real a, real b, autoscaleT S=defaultS,
real tickmin=-infinity, real tickmax=infinity,
real time(real)=null, pair dir(real)=zero);
- where `a' and `b' specify the respective tick values at
- `point(g,0)' and `point(g,length(g))', `S' specifies the
- autoscaling transformation, the function `real time(real v)'
- returns the time corresponding to the value `v', and `pair
- dir(real t)' returns the absolute tick direction as a function of
- `t' (zero means draw the tick perpendicular to the axis).
+ where 'a' and 'b' specify the respective tick values at
+ 'point(g,0)' and 'point(g,length(g))', 'S' specifies the
+ autoscaling transformation, the function 'real time(real v)'
+ returns the time corresponding to the value 'v', and 'pair dir(real
+ t)' returns the absolute tick direction as a function of 't' (zero
+ means draw the tick perpendicular to the axis).
* These routines are useful for manually putting ticks and labels on
- axes (if the variable `Label' is given as the `Label' argument,
- the `format' argument will be used to format a string based on the
- tick location): void xtick(picture pic=currentpicture, Label L="", explicit pair z,
+ axes (if the variable 'Label' is given as the 'Label' argument, the
+ 'format' argument will be used to format a string based on the tick
+ location):
+ void xtick(picture pic=currentpicture, Label L="", explicit pair z,
pair dir=N, string format="",
real size=Ticksize, pen p=currentpen);
void xtick(picture pic=currentpicture, Label L="", real x,
@@ -5774,7 +5737,8 @@ following routines:
Here are some simple examples of two-dimensional graphs:
1. This example draws a textbook-style graph of y= exp(x), with the y
- axis starting at y=0: import graph;
+ axis starting at y=0:
+ import graph;
size(150,0);
real f(real x) {return exp(x);}
@@ -5789,13 +5753,14 @@ following routines:
label("$e^x$",F(1),SE);
+ [exp]
- 2. The next example draws a scientific-style graph with a legend.
- The position of the legend can be adjusted either explicitly or by
- using the graphical user interface `xasy' (*note GUI::). If an
- `UnFill(real xmargin=0, real ymargin=xmargin)' or `Fill(pen)'
- option is specified to `add', the legend will obscure any
- underlying objects. Here we illustrate how to clip the portion of
+ 2. The next example draws a scientific-style graph with a legend. The
+ position of the legend can be adjusted either explicitly or by
+ using the graphical user interface 'xasy' (*note GUI::). If an
+ 'UnFill(real xmargin=0, real ymargin=xmargin)' or 'Fill(pen)'
+ option is specified to 'add', the legend will obscure any
+ underlying objects. Here we illustrate how to clip the portion of
the picture covered by a label:
import graph;
@@ -5815,9 +5780,10 @@ following routines:
add(legend(),point(E),20E,UnFill);
+ [lineargraph0]
-
- To specify a fixed size for the graph proper, use `attach': import graph;
+ To specify a fixed size for the graph proper, use 'attach':
+ import graph;
size(250,200,IgnoreAspect);
@@ -5833,7 +5799,9 @@ following routines:
label("LABEL",point(0),UnFill(1mm));
attach(legend(),truepoint(E),20E,UnFill);
- A legend can have multiple entries per line: import graph;
+
+ A legend can have multiple entries per line:
+ import graph;
size(8cm,6cm,IgnoreAspect);
typedef real realfcn(real);
@@ -5849,11 +5817,12 @@ following routines:
attach(legend(2),(point(S).x,truepoint(S).y),10S,UnFill);
+ [legend]
-
- 3. This example draws a graph of one array versus another (both of
- the same size) using custom tick locations and a smaller font size
- for the tick labels on the y axis. import graph;
+ 3. This example draws a graph of one array versus another (both of the
+ same size) using custom tick locations and a smaller font size for
+ the tick labels on the y axis.
+ import graph;
size(200,150,IgnoreAspect);
@@ -5866,9 +5835,10 @@ following routines:
yaxis("$y$",LeftRight,
RightTicks(Label(fontsize(8pt)),new real[]{0,4,9}));
+ [datagraph]
-
- 4. This example shows how to graph columns of data read from a file. import graph;
+ 4. This example shows how to graph columns of data read from a file.
+ import graph;
size(200,150,IgnoreAspect);
@@ -5884,31 +5854,34 @@ following routines:
xaxis("$x$",BottomTop,LeftTicks);
yaxis("$y$",LeftRight,RightTicks);
-
+ [filegraph]
5. The next example draws two graphs of an array of coordinate pairs,
- using frame alignment and data markers. In the left-hand graph, the
- markers, constructed with marker marker(path g, markroutine markroutine=marknodes,
+ using frame alignment and data markers. In the left-hand graph,
+ the markers, constructed with
+ marker marker(path g, markroutine markroutine=marknodes,
pen p=currentpen, filltype filltype=NoFill,
bool above=true);
- using the path `unitcircle' (*note filltype::), are drawn below
- each node. Any frame can be converted to a marker, using marker marker(frame f, markroutine markroutine=marknodes,
+ using the path 'unitcircle' (*note filltype::), are drawn below
+ each node. Any frame can be converted to a marker, using
+ marker marker(frame f, markroutine markroutine=marknodes,
bool above=true);
- In the right-hand graph, the unit n-sided regular polygon
- `polygon(int n)' and the unit n-point cyclic cross `cross(int n,
- bool round=true, real r=0)' (where `r' is an optional "inner"
+ In the right-hand graph, the unit n-sided regular polygon
+ 'polygon(int n)' and the unit n-point cyclic cross 'cross(int n,
+ bool round=true, real r=0)' (where 'r' is an optional "inner"
radius) are used to build a custom marker frame. Here
- `markuniform(bool centered=false, int n, bool rotated=false)' adds
- this frame at `n' uniformly spaced points along the arclength of
+ 'markuniform(bool centered=false, int n, bool rotated=false)' adds
+ this frame at 'n' uniformly spaced points along the arclength of
the path, optionally rotated by the angle of the local tangent to
the path (if centered is true, the frames will be centered within
- `n' evenly spaced arclength intervals). Alternatively, one can use
- markroutine `marknodes' to request that the marks be placed at each
- Bezier node of the path, or markroutine `markuniform(pair z(real
- t), real a, real b, int n)' to place marks at points `z(t)' for n
- evenly spaced values of `t' in `[a,b]'.
-
- These markers are predefined: marker[] Mark={
+ 'n' evenly spaced arclength intervals). Alternatively, one can use
+ markroutine 'marknodes' to request that the marks be placed at each
+ Bezier node of the path, or markroutine 'markuniform(pair z(real
+ t), real a, real b, int n)' to place marks at points 'z(t)' for n
+ evenly spaced values of 't' in '[a,b]'.
+
+ These markers are predefined:
+ marker[] Mark={
marker(scale(circlescale)*unitcircle),
marker(polygon(3)),marker(polygon(4)),
marker(polygon(5)),marker(invert*polygon(3)),
@@ -5921,7 +5894,7 @@ following routines:
marker(invert*polygon(3),Fill)
};
- The example also illustrates the `errorbar' routines:
+ The example also illustrates the 'errorbar' routines:
void errorbars(picture pic=currentpicture, pair[] z, pair[] dp,
pair[] dm={}, bool[] cond={}, pen p=currentpen,
@@ -5932,9 +5905,10 @@ following routines:
bool[] cond={}, pen p=currentpen, real size=0);
Here, the positive and negative extents of the error are given by
- the absolute values of the elements of the pair array `dp' and the
- optional pair array `dm'. If `dm' is not specified, the positive
- and negative extents of the error are assumed to be equal. import graph;
+ the absolute values of the elements of the pair array 'dp' and the
+ optional pair array 'dm'. If 'dm' is not specified, the positive
+ and negative extents of the error are assumed to be equal.
+ import graph;
picture pic;
real xsize=200, ysize=140;
@@ -5977,8 +5951,10 @@ following routines:
add(pic2.fit(),(5mm,0),E);
+ [errorbars]
- 6. A custom mark routine can be also be specified: import graph;
+ 6. A custom mark routine can be also be specified:
+ import graph;
size(200,100,IgnoreAspect);
@@ -6016,9 +5992,10 @@ following routines:
xaxis("$x$",BottomTop,LeftTicks);
yaxis("$y$",LeftRight,RightTicks);
+ [graphmarkers]
-
- 7. This example shows how to label an axis with arbitrary strings. import graph;
+ 7. This example shows how to label an axis with arbitrary strings.
+ import graph;
size(400,150,IgnoreAspect);
@@ -6036,19 +6013,22 @@ following routines:
return month[round(x % 12)];}));
yaxis("$y$",LeftRight,RightTicks(4));
-
+ [monthaxis]
8. The next example draws a graph of a parametrized curve. The calls
- to xlimits(picture pic=currentpicture, real min=-infinity,
+ to
+ xlimits(picture pic=currentpicture, real min=-infinity,
real max=infinity, bool crop=NoCrop);
- and the analogous function `ylimits' can be uncommented to set
- the respective axes limits for picture `pic' to the specified
- `min' and `max' values. Alternatively, the function void limits(picture pic=currentpicture, pair min, pair max, bool crop=NoCrop);
- can be used to limit the axes to the box having opposite vertices
- at the given pairs). Existing objects in picture `pic' will be
- cropped to lie within the given limits if `crop'=`Crop'. The
- function `crop(picture pic)' can be used to crop a graph to the
- current graph limits. import graph;
+ and the analogous function 'ylimits' can be uncommented to set the
+ respective axes limits for picture 'pic' to the specified 'min' and
+ 'max' values. Alternatively, the function
+ void limits(picture pic=currentpicture, pair min, pair max, bool crop=NoCrop);
+ can be used to limit the axes to the box having opposite vertices
+ at the given pairs). Existing objects in picture 'pic' will be
+ cropped to lie within the given limits if 'crop'='Crop'. The
+ function 'crop(picture pic)' can be used to crop a graph to the
+ current graph limits.
+ import graph;
size(0,200);
@@ -6064,8 +6044,11 @@ following routines:
+ [parametricgraph]
+
The next example illustrates how one can extract a common axis
- scaling factor. import graph;
+ scaling factor.
+ import graph;
axiscoverage=0.9;
size(200,IgnoreAspect);
@@ -6081,41 +6064,45 @@ following routines:
xaxis("$x/10^{"+(string) xscale+"}$",BottomTop,LeftTicks);
yaxis("$y/10^{"+(string) yscale+"}$",LeftRight,RightTicks(trailingzero));
-
+ [scaledgraph]
Axis scaling can be requested and/or automatic selection of the
- axis limits can be inhibited with one of these `scale' routines: void scale(picture pic=currentpicture, scaleT x, scaleT y);
+ axis limits can be inhibited with one of these 'scale' routines:
+ void scale(picture pic=currentpicture, scaleT x, scaleT y);
void scale(picture pic=currentpicture, bool xautoscale=true,
bool yautoscale=xautoscale, bool zautoscale=yautoscale);
- This sets the scalings for picture `pic'. The `graph' routines
- accept an optional `picture' argument for determining the
+ This sets the scalings for picture 'pic'. The 'graph' routines
+ accept an optional 'picture' argument for determining the
appropriate scalings to use; if none is given, it uses those set
- for `currentpicture'.
+ for 'currentpicture'.
- Two frequently used scaling routines `Linear' and `Log' are
- predefined in `graph'.
+ Two frequently used scaling routines 'Linear' and 'Log' are
+ predefined in 'graph'.
All picture coordinates (including those in paths and those given
- to the `label' and `limits' functions) are always treated as linear
- (post-scaled) coordinates. Use pair Scale(picture pic=currentpicture, pair z);
- to convert a graph coordinate into a scaled picture coordinate.
+ to the 'label' and 'limits' functions) are always treated as linear
+ (post-scaled) coordinates. Use
+ pair Scale(picture pic=currentpicture, pair z);
+ to convert a graph coordinate into a scaled picture coordinate.
The x and y components can be individually scaled using the
- analogous routines real ScaleX(picture pic=currentpicture, real x);
+ analogous routines
+ real ScaleX(picture pic=currentpicture, real x);
real ScaleY(picture pic=currentpicture, real y);
The predefined scaling routines can be given two optional boolean
- arguments: `automin=false' and `automax=automin'. These default to
- `false' but can be respectively set to `true' to enable automatic
- selection of "nice" axis minimum and maximum values. The `Linear'
+ arguments: 'automin=false' and 'automax=automin'. These default to
+ 'false' but can be respectively set to 'true' to enable automatic
+ selection of "nice" axis minimum and maximum values. The 'Linear'
scaling can also take as optional final arguments a multiplicative
- scaling factor and intercept (e.g. for a depth axis, `Linear(-1)'
+ scaling factor and intercept (e.g. for a depth axis, 'Linear(-1)'
requests axis reversal).
For example, to draw a log/log graph of a function, use
- `scale(Log,Log)': import graph;
+ 'scale(Log,Log)':
+ import graph;
size(200,200,IgnoreAspect);
@@ -6133,8 +6120,10 @@ following routines:
yaxis("$y$",LeftRight,RightTicks);
+ [loggraph]
- By extending the ticks, one can easily produce a logarithmic grid: import graph;
+ By extending the ticks, one can easily produce a logarithmic grid:
+ import graph;
size(200,200,IgnoreAspect);
real f(real t) {return 1/t;}
@@ -6149,8 +6138,11 @@ following routines:
+ [loggrid]
+
One can also specify custom tick locations and formats for
- logarithmic axes: import graph;
+ logarithmic axes:
+ import graph;
size(300,175,IgnoreAspect);
scale(Log,Log);
@@ -6162,8 +6154,10 @@ following routines:
yaxis("$\nu_{\rm upp}$ [Hz]",LeftRight,RightTicks(DefaultFormat));
+ [logticks]
- It is easy to draw logarithmic graphs with respect to other bases: import graph;
+ It is easy to draw logarithmic graphs with respect to other bases:
+ import graph;
size(200,IgnoreAspect);
// Base-2 logarithmic scale on y-axis:
@@ -6181,12 +6175,13 @@ following routines:
yaxis("$y$",ymin=1,ymax=f(5),RightTicks(Label(Fill(white))),EndArrow);
xaxis("$x$",xmin=-5,xmax=5,LeftTicks,EndArrow);
+ [log2graph]
-
- Here is an example of "broken" linear x and logarithmic y axes
- that omit the segments [3,8] and [100,1000], respectively. In the
- case of a logarithmic axis, the break endpoints are automatically
- rounded to the nearest integral power of the base. import graph;
+ Here is an example of "broken" linear x and logarithmic y axes that
+ omit the segments [3,8] and [100,1000], respectively. In the case
+ of a logarithmic axis, the break endpoints are automatically
+ rounded to the nearest integral power of the base.
+ import graph;
size(200,150,IgnoreAspect);
@@ -6212,17 +6207,20 @@ following routines:
label(Break,(point(E).x,ScaleY(c)));
+ [brokenaxis]
- 9. `Asymptote' can draw secondary axes with the routines picture secondaryX(picture primary=currentpicture, void f(picture));
+ 9. 'Asymptote' can draw secondary axes with the routines
+ picture secondaryX(picture primary=currentpicture, void f(picture));
picture secondaryY(picture primary=currentpicture, void f(picture));
- In this example, `secondaryY' is used to draw a secondary linear y
- axis against a primary logarithmic y axis: import graph;
+ In this example, 'secondaryY' is used to draw a secondary linear y
+ axis against a primary logarithmic y axis:
+ import graph;
texpreamble("\def\Arg{\mathop {\rm Arg}\nolimits}");
size(10cm,5cm,IgnoreAspect);
- real ampl(real x) {return 2.5/(1+x^2);}
+ real ampl(real x) {return 2.5/sqrt(1+x^2);}
real phas(real x) {return -atan(x)/pi;}
scale(Log,Log);
@@ -6245,8 +6243,10 @@ following routines:
add(q);
+ [Bode]
- A secondary logarithmic y axis can be drawn like this: import graph;
+ A secondary logarithmic y axis can be drawn like this:
+ import graph;
size(9cm,6cm,IgnoreAspect);
string data="secondaryaxis.csv";
@@ -6279,8 +6279,10 @@ following routines:
label(shift(5mm*N)*"Proportion of crows",point(NW),E);
+ [secondaryaxis]
- 10. Here is a histogram example, which uses the `stats' module. import graph;
+ 10. Here is a histogram example, which uses the 'stats' module.
+ import graph;
import stats;
size(400,200,IgnoreAspect);
@@ -6300,9 +6302,11 @@ following routines:
yaxis("$dP/dx$",LeftRight,RightTicks(trailingzero));
+ [histogram]
- 11. Here is an example of reading column data in from a file and a
- least-squares fit, using the `stats' module. size(400,200,IgnoreAspect);
+ 11. Here is an example of reading column data in from a file and a
+ least-squares fit, using the 'stats' module.
+ size(400,200,IgnoreAspect);
import graph;
import stats;
@@ -6358,9 +6362,10 @@ following routines:
xaxis("$T$",BottomTop,LeftTicks);
yaxis("$\xi$",LeftRight,RightTicks);
+ [leastsquares]
-
- 12. Here is an example that illustrates the general `axis' routine. import graph;
+ 12. Here is an example that illustrates the general 'axis' routine.
+ import graph;
size(0,100);
path g=ellipse((0,0),1,2);
@@ -6372,12 +6377,14 @@ following routines:
path h=(0,0)--max(abs(max(g)),abs(min(g)))*dir(v);
return intersect(g,h)[0];}));
+ [generalaxis]
-
- 13. To draw a vector field of `n' arrows evenly spaced along the
- arclength of a path, use the routine picture vectorfield(path vector(real), path g, int n, bool truesize=false,
+ 13. To draw a vector field of 'n' arrows evenly spaced along the
+ arclength of a path, use the routine
+ picture vectorfield(path vector(real), path g, int n, bool truesize=false,
pen p=currentpen, arrowbar arrow=Arrow);
- as illustrated in this simple example of a flow field: import graph;
+ as illustrated in this simple example of a flow field:
+ import graph;
defaultpen(1.0);
size(0,150,IgnoreAspect);
@@ -6409,14 +6416,17 @@ following routines:
add(vectorfield(vector(NE,NE),(0,0)--(0,point(N).y),n,true));
+ [flow]
- 14. To draw a vector field of `nx'\times`ny' arrows in `box(a,b)', use
- the routine picture vectorfield(path vector(pair), pair a, pair b,
+ 14. To draw a vector field of 'nx'\times'ny' arrows in 'box(a,b)', use
+ the routine
+ picture vectorfield(path vector(pair), pair a, pair b,
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)
- as illustrated in this example: import graph;
+ as illustrated in this example:
+ import graph;
size(100);
pair a=(0,0);
@@ -6426,56 +6436,59 @@ following routines:
add(vectorfield(vector,a,b));
+ [vectorfield]
+
+ 15. The following scientific graphs, which illustrate many features of
+ 'Asymptote''s graphics routines, were generated from the examples
+ 'diatom.asy' and 'westnile.asy', using the comma-separated data in
+ 'diatom.csv' and 'westnile.csv'.
- 15. The following scientific graphs, which illustrate many features of
- `Asymptote''s graphics routines, were generated from the examples
- `diatom.asy' and `westnile.asy', using the comma-separated data in
- `diatom.csv' and `westnile.csv'.
+ [diatom]
+ [westnile]

File: asymptote.info, Node: palette, Next: three, Prev: graph, Up: Base modules
-8.28 `palette'
+8.28 'palette'
==============
-`Asymptote' can also generate color density images and palettes. The
-following palettes are predefined in `palette.asy':
+'Asymptote' can also generate color density images and palettes. The
+following palettes are predefined in 'palette.asy':
-`pen[] Grayscale(int NColors=256)'
+'pen[] Grayscale(int NColors=256)'
a grayscale palette;
-`pen[] Rainbow(int NColors=32766)'
+'pen[] Rainbow(int NColors=32766)'
a rainbow spectrum;
-`pen[] BWRainbow(int NColors=32761)'
+'pen[] BWRainbow(int NColors=32761)'
a rainbow spectrum tapering off to black/white at the ends;
-`pen[] BWRainbow2(int NColors=32761)'
+'pen[] BWRainbow2(int NColors=32761)'
a double rainbow palette tapering off to black/white at the ends,
with a linearly scaled intensity.
-`pen[] Wheel(int NColors=32766)'
+'pen[] Wheel(int NColors=32766)'
a full color wheel palette;
-`pen[] Gradient(int NColors=256 ... pen[] p)'
+'pen[] Gradient(int NColors=256 ... pen[] p)'
a palette varying linearly over the specified array of pens, using
NColors in each interpolation interval;
-
- The function `cmyk(pen[] Palette)' may be used to convert any of
+ The function 'cmyk(pen[] Palette)' may be used to convert any of
these palettes to the CMYK colorspace.
- A color density plot using palette `palette' can be generated from a
-function `f'(x,y) and added to a picture `pic':
+ A color density plot using palette 'palette' can be generated from a
+function 'f'(x,y) and added to a picture 'pic':
bounds image(picture pic=currentpicture, real f(real, real),
range range=Full, pair initial, pair final,
int nx=ngraph, int ny=nx, pen[] palette, bool antialias=false)
- The function `f' will be sampled at `nx' and `ny' evenly spaced points
-over a rectangle defined by the points `initial' and `final',
-respecting the current graphical scaling of `pic'. The color space is
-scaled according to the z axis scaling (*note automatic scaling::). A
+ The function 'f' will be sampled at 'nx' and 'ny' evenly spaced
+points over a rectangle defined by the points 'initial' and 'final',
+respecting the current graphical scaling of 'pic'. The color space is
+scaled according to the z axis scaling (*note automatic scaling::). A
bounds structure for the function values is returned:
struct bounds {
real min;
@@ -6483,28 +6496,28 @@ struct bounds {
// Possible tick intervals:
int[] divisor;
}
- This information can be used for generating an optional palette bar.
+This information can be used for generating an optional palette bar.
The palette color space corresponds to a range of values specified by
-the argument `range', which can be `Full', `Automatic', or an explicit
-range `Range(real min, real max)'. Here `Full' specifies a range
+the argument 'range', which can be 'Full', 'Automatic', or an explicit
+range 'Range(real min, real max)'. Here 'Full' specifies a range
varying from the minimum to maximum values of the function over the
-sampling interval, while `Automatic' selects "nice" limits. The
-example `imagecontour.asy' illustrates how level sets (contour lines)
-can be drawn on a color density plot (*note contour::).
+sampling interval, while 'Automatic' selects "nice" limits. The example
+'imagecontour.asy' illustrates how level sets (contour lines) can be
+drawn on a color density plot (*note contour::).
A color density plot can also be generated from an explicit real[][]
-array `data':
+array 'data':
bounds image(picture pic=currentpicture, real[][] f, range range=Full,
pair initial, pair final, pen[] palette,
bool transpose=(initial.x < final.x && initial.y < final.y),
bool copy=true, bool antialias=false);
- If the initial point is to the left and below the final point, by
+If the initial point is to the left and below the final point, by
default the array indices are interpreted according to the Cartesian
convention (first index: x, second index: y) rather than the usual
matrix convention (first index: -y, second index: x).
To construct an image from an array of irregularly spaced points and
-an array of values `f' at these points, use one of the routines
+an array of values 'f' at these points, use one of the routines
bounds image(picture pic=currentpicture, pair[] z, real[] f,
range range=Full, pen[] palette)
bounds image(picture pic=currentpicture, real[] x, real[] y, real[] f,
@@ -6515,11 +6528,11 @@ void palette(picture pic=currentpicture, Label L="", bounds bounds,
pair initial, pair final, axis axis=Right, pen[] palette,
pen p=currentpen, paletteticks ticks=PaletteTicks,
bool copy=true, bool antialias=false);
- The color space of `palette' is taken to be over bounds `bounds' with
-scaling given by the z scaling of `pic'. The palette orientation is
-specified by `axis', which may be one of `Right', `Left', `Top', or
-`Bottom'. The bar is drawn over the rectangle from `initial' to
-`final'. The argument `paletteticks' is a special tick type (*note
+ The color space of 'palette' is taken to be over bounds 'bounds' with
+scaling given by the z scaling of 'pic'. The palette orientation is
+specified by 'axis', which may be one of 'Right', 'Left', 'Top', or
+'Bottom'. The bar is drawn over the rectangle from 'initial' to
+'final'. The argument 'paletteticks' is a special tick type (*note
ticks::) that takes the following arguments:
paletteticks PaletteTicks(Label format="", ticklabel ticklabel=null,
bool beginlabel=true, bool endlabel=true,
@@ -6551,9 +6564,10 @@ palette(bar,"$A$",range,(0,0),(0.5cm,8cm),Right,Palette,
PaletteTicks("$%+#.1f$"));
add(bar.fit(),point(E),30E);
+ [image]
-
-Here is an example that uses logarithmic scaling of the function values:
+ Here is an example that uses logarithmic scaling of the function
+values:
import graph;
import palette;
@@ -6578,8 +6592,10 @@ palette("$f(x,y)$",range,(0,200),(100,250),Top,Palette,
-One can also draw an image directly from a two-dimensional pen array or
-a function `pen f(int, int)':
+ [logimage]
+
+ One can also draw an image directly from a two-dimensional pen array
+or a function 'pen f(int, int)':
void image(picture pic=currentpicture, pen[][] data,
pair initial, pair final,
bool transpose=(initial.x < final.x && initial.y < final.y),
@@ -6588,7 +6604,7 @@ void image(picture pic=currentpicture, pen f(int, int), int width, int height,
pair initial, pair final,
bool transpose=(initial.x < final.x && initial.y < final.y),
bool antialias=false);
- as illustrated in the following examples:
+as illustrated in the following examples:
size(200);
@@ -6605,6 +6621,7 @@ for(int i=0; i < n; ++i)
image(v,(0,0),(1,1));
+ [penimage]
import palette;
@@ -6634,9 +6651,9 @@ pen f(int u, int v) {
image(f,N,N,(0,0),(300,300),antialias=true);
+ [penfunctionimage]
-
-For convenience, the module `palette' also defines functions that may
+ For convenience, the module 'palette' also defines functions that may
be used to construct a pen array from a given function and palette:
pen[] palette(real[] f, pen[] palette);
pen[][] palette(real[][] f, pen[] palette);
@@ -6644,23 +6661,22 @@ pen[][] palette(real[][] f, pen[] palette);

File: asymptote.info, Node: three, Next: obj, Prev: palette, Up: Base modules
-8.29 `three'
+8.29 'three'
============
-This module fully extends the notion of guides and paths in `Asymptote'
-to three dimensions. It introduces the new types guide3, path3, and
+This module fully extends the notion of guides and paths in 'Asymptote'
+to three dimensions. It introduces the new types guide3, path3, and
surface. Guides in three dimensions are specified with the same syntax
-as in two dimensions except that triples `(x,y,z)' are used in place of
-pairs `(x,y)' for the nodes and direction specifiers. This
+as in two dimensions except that triples '(x,y,z)' are used in place of
+pairs '(x,y)' for the nodes and direction specifiers. This
generalization of John Hobby's spline algorithm is shape-invariant under
three-dimensional rotation, scaling, and shifting, and reduces in the
-planar case to the two-dimensional algorithm used in `Asymptote',
-`MetaPost', and `MetaFont' [cf. J. C. Bowman, Proceedings in Applied
+planar case to the two-dimensional algorithm used in 'Asymptote',
+'MetaPost', and 'MetaFont' [cf. J. C. Bowman, Proceedings in Applied
Mathematics and Mechanics, 7:1, 2010021-2010022 (2007)].
For example, a unit circle in the XY plane may be filled and drawn
like this:
-
import three;
size(100);
@@ -6671,9 +6687,8 @@ draw(O--Z,red+dashed,Arrow3);
draw(((-1,-1,0)--(1,-1,0)--(1,1,0)--(-1,1,0)--cycle));
dot(g,red);
-
+ [unitcircle3]
and then distorted into a saddle:
-
import three;
size(100,0);
@@ -6682,363 +6697,332 @@ draw(g);
draw(((-1,-1,0)--(1,-1,0)--(1,1,0)--(-1,1,0)--cycle));
dot(g,red);
+ [saddle]
-Module `three' provides constructors for converting two-dimensional
-paths to three-dimensional ones, and vice-versa:
+ Module 'three' provides constructors for converting two-dimensional
+paths to three-dimensional ones, and vice-versa:
path3 path3(path p, triple plane(pair)=XYplane);
path path(path3 p, pair P(triple)=xypart);
A Bezier surface, the natural two-dimensional generalization of
-Bezier curves, is defined in `three_surface.asy' as a structure
-containing an array of Bezier patches. Surfaces may drawn with one of
+Bezier curves, is defined in 'three_surface.asy' as a structure
+containing an array of Bezier patches. Surfaces may drawn with one of
the routines
void draw(picture pic=currentpicture, surface s, int nu=1, int nv=1,
material surfacepen=currentpen, pen meshpen=nullpen,
- light light=currentlight, light meshlight=light, string name="",
+ light light=currentlight, light meshlight=nolight, string name="",
render render=defaultrender);
void draw(picture pic=currentpicture, surface s, int nu=1, int nv=1,
material[] surfacepen, pen meshpen,
- light light=currentlight, light meshlight=light, string name="",
+ light light=currentlight, light meshlight=nolight, string name="",
render render=defaultrender);
void draw(picture pic=currentpicture, surface s, int nu=1, int nv=1,
material[] surfacepen, pen[] meshpen=nullpens,
- light light=currentlight, light meshlight=light, string name="",
+ light light=currentlight, light meshlight=nolight, string name="",
render render=defaultrender);
- The parameters `nu' and `nv' specify the number of subdivisions for
-drawing optional mesh lines for each Bezier patch. The optional `name'
+ The parameters 'nu' and 'nv' specify the number of subdivisions for
+drawing optional mesh lines for each Bezier patch. The optional 'name'
parameter is used as a prefix for naming the surface patches in the PRC
-model tree. Here material is a structure defined in `three_light.asy':
+model tree. Here material is a structure defined in 'three_light.asy':
struct material {
pen[] p; // diffusepen,ambientpen,emissivepen,specularpen
real opacity;
real shininess;
...
}
- These material properties are used to implement `OpenGL'-style
-lighting, based on the Phong-Blinn specular model. Sample Bezier
-surfaces are contained in the example files `BezierSurface.asy',
-`teapot.asy', and `parametricsurface.asy'. The structure `render'
-contains specialized rendering options documented at the beginning of
-module `three.asy'.
-
- The examples `elevation.asy' and `sphericalharmonic.asy' illustrate
+These material properties are used to implement 'OpenGL'-style lighting,
+based on the Phong-Blinn specular model. Sample Bezier surfaces are
+contained in the example files 'BezierSurface.asy', 'teapot.asy', and
+'parametricsurface.asy'. The structure 'render' contains specialized
+rendering options documented at the beginning of module 'three.asy'.
+
+ The examples 'elevation.asy' and 'sphericalharmonic.asy' illustrate
how to draw a surface with patch-dependent colors. The examples
-`vertexshading' and `smoothelevation' illustrate vertex-dependent
-colors, which is supported for both `Asymptote''s native `OpenGL'
-renderer and two-dimensional projections. Since the PRC output format
+'vertexshading' and 'smoothelevation' illustrate vertex-dependent
+colors, which is supported for both 'Asymptote''s native 'OpenGL'
+renderer and two-dimensional projections. Since the PRC output format
does not currently support vertex shading of Bezier surfaces, PRC
patches are shaded with the mean of the four vertex colors.
- A surface can be constructed from a cyclic `path3' with the
+ A surface can be constructed from a cyclic 'path3' with the
constructor
surface surface(path3 external, triple[] internal=new triple[],
triple[] normals=new triple[], pen[] colors=new pen[],
bool3 planar=default);
- and then filled:
+and then filled:
draw(surface(path3(polygon(5))),red,nolight);
draw(surface(unitcircle3),red,nolight);
draw(surface(unitcircle3,new pen[] {red,green,blue,black}),nolight);
- The last example constructs a patch with vertex-specific colors. A
-three-dimensional planar surface in the plane `plane' can be
-constructed from a two-dimensional cyclic path `g' with the constructor
+The last example constructs a patch with vertex-specific colors. A
+three-dimensional planar surface in the plane 'plane' can be constructed
+from a two-dimensional cyclic path 'g' with the constructor
surface surface(path p, triple plane(pair)=XYplane);
- and then filled:
+and then filled:
draw(surface((0,0)--E+2N--2E--E+N..0.2E..cycle),red);
- Planar Bezier surfaces patches are constructed using Orest Shardt's
-`bezulate' routine, which decomposes (possibly nonsimply connected)
-regions bounded (according to the `zerowinding' fill rule) by simple
+Planar Bezier surfaces patches are constructed using Orest Shardt's
+'bezulate' routine, which decomposes (possibly nonsimply connected)
+regions bounded (according to the 'zerowinding' fill rule) by simple
cyclic paths (intersecting only at the endpoints) into subregions
-bounded by cyclic paths of length `4' or less.
+bounded by cyclic paths of length '4' or less.
A more efficient routine also exists for drawing tessellations
composed of many 3D triangles, with specified vertices, and optional
-normals or vertex colors:
+normals or vertex colors:
void draw(picture pic=currentpicture, triple[] v, int[][] vi,
triple[] n={}, int[][] ni={}, material m=currentpen, pen[] p={},
int[][] pi={}, light light=currentlight);
- Here, the triple array `v' lists the distinct vertices, while the
-array `vi' lists integer arrays of length 3 containing the indices of
-`v' corresponding to the vertices of each triangle. Similarly, the
-arguments `n' and `ni' contain optional normal data and `p' and `pi'
+ Here, the triple array 'v' lists the distinct vertices, while the
+array 'vi' lists integer arrays of length 3 containing the indices of
+'v' corresponding to the vertices of each triangle. Similarly, the
+arguments 'n' and 'ni' contain optional normal data and 'p' and 'pi'
contain optional pen vertex data. An example of this tessellation
-facility is given in `triangles.asy'.
+facility is given in 'triangles.asy'.
Arbitrary thick three-dimensional curves and line caps (which the
-`OpenGL' standard does not require implementations to provide) are
+'OpenGL' standard does not require implementations to provide) are
constructed with
tube tube(path3 p, real width, render render=defaultrender);
- this returns a tube structure representing a tube of diameter `width'
-centered approximately on `g'. The tube structure consists of a surface
-`s' and the actual tube center, path3 `center'. Drawing thick lines as
-tubes can be slow to render, especially with the `Adobe Reader'
-renderer. The setting `thick=false' can be used to disable this feature
-and force all lines to be drawn with `linewidth(0)' (one pixel wide,
-regardless of the resolution). By default, mesh and contour lines in
-three-dimensions are always drawn thin, unless an explicit line width
-is given in the pen parameter or the setting `thin' is set to `false'.
-The pens `thin()' and `thick()' defined in plain_pens.asy can also be
-used to override these defaults for specific draw commands.
-
-There are four choices for viewing 3D `Asymptote' output:
- 1. Use the native `Asymptote' adaptive `OpenGL'-based renderer (with
- the command-line option `-V' and the default settings
- `outformat=""' and `render=-1'). If you encounter warnings from
- your graphics card driver, try specifying `-glOptions=-indirect'
- on the command line. On `UNIX' systems with graphics support for
+this returns a tube structure representing a tube of diameter 'width'
+centered approximately on 'g'. The tube structure consists of a surface
+'s' and the actual tube center, path3 'center'. Drawing thick lines as
+tubes can be slow to render, especially with the 'Adobe Reader'
+renderer. The setting 'thick=false' can be used to disable this feature
+and force all lines to be drawn with 'linewidth(0)' (one pixel wide,
+regardless of the resolution). By default, mesh and contour lines in
+three-dimensions are always drawn thin, unless an explicit line width is
+given in the pen parameter or the setting 'thin' is set to 'false'. The
+pens 'thin()' and 'thick()' defined in plain_pens.asy can also be used
+to override these defaults for specific draw commands.
+
+There are four choices for viewing 3D 'Asymptote' output:
+ 1. Use the native 'Asymptote' adaptive 'OpenGL'-based renderer (with
+ the command-line option '-V' and the default settings
+ 'outformat=""' and 'render=-1'). If you encounter warnings from
+ your graphics card driver, try specifying '-glOptions=-indirect' on
+ the command line. On 'UNIX' systems with graphics support for
multisampling, the sample width can be controlled with the setting
- `multisample'. An initial screen position can be specified with
- the pair setting `position', where negative values are interpreted
- as relative to the corresponding maximum screen dimension. The
- default settings import settings;
+ 'multisample'. An initial screen position can be specified with
+ the pair setting 'position', where negative values are interpreted
+ as relative to the corresponding maximum screen dimension. The
+ default settings
+ import settings;
leftbutton=new string[] {"rotate","zoom","shift","pan"};
middlebutton=new string[] {"menu"};
rightbutton=new string[] {"zoom/menu","rotateX","rotateY","rotateZ"};
wheelup=new string[] {"zoomin"};
wheeldown=new string[] {"zoomout"};
- bind the mouse buttons as follows:
+ bind the mouse buttons as follows:
* Left: rotate
-
* Shift Left: zoom
-
* Ctrl Left: shift viewport
-
* Alt Left: pan
-
* Middle: menu (must be unmodified; ignores Shift, Ctrl, and
Alt)
-
* Wheel Up: zoom in
-
* Wheel Down: zoom out
-
* Right: zoom/menu (must be unmodified)
-
* Right double click: menu
-
* Shift Right: rotate about the X axis
-
* Ctrl Right: rotate about the Y axis
-
* Alt Right: rotate about the Z axis
- The keyboard shortcuts are:
+ The keyboard shortcuts are:
* h: home
-
* f: toggle fitscreen
-
* x: spin about the X axis
-
* y: spin about the Y axis
-
* z: spin about the Z axis
-
* s: stop spinning
-
* m: rendering mode (solid/mesh/patch)
-
* e: export
-
* c: show camera parameters
-
* p: play animation
-
* r: reverse animation
-
* : step animation
-
* +: expand
-
* =: expand
-
* >: expand
-
* -: shrink
-
* _: shrink
-
* <: shrink
-
* q: exit
-
* Ctrl-q: exit
- 2. Render the scene to a specified rasterized format `outformat' at
- the resolution of `n' pixels per `bp', as specified by the setting
- `render=n'. A negative value of `n' is interpreted as `|2n|' for
- EPS and PDF formats and `|n|' for other formats. The default value
- of `render' is -1. By default, the scene is internally rendered
- at twice the specified resolution; this can be disabled by setting
- `antialias=1'. High resolution rendering is done by tiling the
- image. If your graphics card allows it, the rendering can be made
- more efficient by increasing the maximum tile size `maxtile' to
- your screen dimensions (indicated by `maxtile=(0,0)'. If your
+ 2. Render the scene to a specified rasterized format 'outformat' at
+ the resolution of 'n' pixels per 'bp', as specified by the setting
+ 'render=n'. A negative value of 'n' is interpreted as '|2n|' for
+ EPS and PDF formats and '|n|' for other formats. The default value
+ of 'render' is -1. By default, the scene is internally rendered at
+ twice the specified resolution; this can be disabled by setting
+ 'antialias=1'. High resolution rendering is done by tiling the
+ image. If your graphics card allows it, the rendering can be made
+ more efficient by increasing the maximum tile size 'maxtile' to
+ your screen dimensions (indicated by 'maxtile=(0,0)'. If your
video card generates unwanted black stripes in the output, try
- setting the horizontal and vertical components of `maxtiles' to
- something less than your screen dimensions. The tile size is also
- limited by the setting `maxviewport', which restricts the maximum
- width and height of the viewport. On `UNIX' systems some graphics
- drivers support batch mode (`-noV') rendering in an iconified
- window; this can be enabled with the setting `iconify=true'. Some
- (broken) `UNIX' graphics drivers may require the command line
- setting `-glOptions=-indirect', which requests (slower) indirect
+ setting the horizontal and vertical components of 'maxtiles' to
+ something less than your screen dimensions. The tile size is also
+ limited by the setting 'maxviewport', which restricts the maximum
+ width and height of the viewport. On 'UNIX' systems some graphics
+ drivers support batch mode ('-noV') rendering in an iconified
+ window; this can be enabled with the setting 'iconify=true'. Some
+ (broken) 'UNIX' graphics drivers may require the command line
+ setting '-glOptions=-indirect', which requests (slower) indirect
rendering.
3. Embed the 3D PRC format in a PDF file and view the resulting PDF
- file with version `9.0' or later of `Adobe Reader'. In addition
- to the default `settings.prc=true', this requires
- `settings.outformat="pdf"', which can be specified by the command
- line option `-f pdf', put in the `Asymptote' configuration file
+ file with version '9.0' or later of 'Adobe Reader'. In addition to
+ the default 'settings.prc=true', this requires
+ 'settings.outformat="pdf"', which can be specified by the command
+ line option '-f pdf', put in the 'Asymptote' configuration file
(*note configuration file::), or specified in the script before
- `three.asy' (or `graph3.asy') is imported. The `media9' LaTeX
- package is also required (*note embed::). The example `pdb.asy'
+ 'three.asy' (or 'graph3.asy') is imported. The 'media9' LaTeX
+ package is also required (*note embed::). The example 'pdb.asy'
illustrates how one can generate a list of predefined views (see
- `100d.views'). A stationary preview image with a resolution of
- `n' pixels per `bp' can be embedded with the setting `render=n';
- this allows the file to be viewed with other `PDF' viewers.
- Alternatively, the file `externalprc.tex' illustrates how the
+ '100d.views'). A stationary preview image with a resolution of 'n'
+ pixels per 'bp' can be embedded with the setting 'render=n'; this
+ allows the file to be viewed with other 'PDF' viewers.
+ Alternatively, the file 'externalprc.tex' illustrates how the
resulting PRC and rendered image files can be extracted and
- processed in a separate `LaTeX' file. However, see *note LaTeX
- usage:: for an easier way to embed three-dimensional `Asymptote'
- pictures within `LaTeX'. For specialized applications where only
- the raw PRC file is required, specify `settings.outformat="prc"'.
+ processed in a separate 'LaTeX' file. However, see *note LaTeX
+ usage:: for an easier way to embed three-dimensional 'Asymptote'
+ pictures within 'LaTeX'. For specialized applications where only
+ the raw PRC file is required, specify 'settings.outformat="prc"'.
The open-source PRC specification is available from
- `http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/API_References/PRCReference/PRC_Format_Specification/'.
+ <http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/API_References/PRCReference/PRC_Format_Specification/>.
4. Project the scene to a two-dimensional vector (EPS or PDF) format
- with `render=0'. Only limited hidden surface removal facilities
+ with 'render=0'. Only limited hidden surface removal facilities
are currently available with this approach (*note PostScript3D::).
-
Automatic picture sizing in three dimensions is accomplished with
-double deferred drawing. The maximal desired dimensions of the scene in
+double deferred drawing. The maximal desired dimensions of the scene in
each of the three dimensions can optionally be specified with the
-routine
+routine
void size3(picture pic=currentpicture, real x, real y=x, real z=y,
bool keepAspect=pic.keepAspect);
- The resulting simplex linear programming problem is then solved to
+The resulting simplex linear programming problem is then solved to
produce a 3D version of a frame (actually implemented as a 3D picture).
The result is then fit with another application of deferred drawing to
the viewport dimensions corresponding to the usual two-dimensional
-picture `size' parameters. The global pair `viewportmargin' may be used
+picture 'size' parameters. The global pair 'viewportmargin' may be used
to add horizontal and vertical margins to the viewport dimensions.
-Alternatively, a minimum `viewportsize' may be specified. A 3D picture
-`pic' can be explicitly fit to a 3D frame by calling
+Alternatively, a minimum 'viewportsize' may be specified. A 3D picture
+'pic' can be explicitly fit to a 3D frame by calling
frame pic.fit3(projection P=currentprojection);
- and then added to picture `dest' about `position' with
+and then added to picture 'dest' about 'position' with
void add(picture dest=currentpicture, frame src, triple position=(0,0,0));
- For convenience, the `three' module defines `O=(0,0,0)',
-`X=(1,0,0)', `Y=(0,1,0)', and `Z=(0,0,1)', along with a unitcircle in
-the XY plane:
+ For convenience, the 'three' module defines 'O=(0,0,0)', 'X=(1,0,0)',
+'Y=(0,1,0)', and 'Z=(0,0,1)', along with a unitcircle in the XY plane:
path3 unitcircle3=X..Y..-X..-Y..cycle;
A general (approximate) circle can be drawn perpendicular to the
-direction `normal' with the routine
+direction 'normal' with the routine
path3 circle(triple c, real r, triple normal=Z);
- A circular arc centered at `c' with radius `r' from
-`c+r*dir(theta1,phi1)' to `c+r*dir(theta2,phi2)', drawing
+ A circular arc centered at 'c' with radius 'r' from
+'c+r*dir(theta1,phi1)' to 'c+r*dir(theta2,phi2)', drawing
counterclockwise relative to the normal vector
-`cross(dir(theta1,phi1),dir(theta2,phi2))' if `theta2 > theta1' or if
-`theta2 == theta1' and `phi2 >= phi1', can be constructed with
+'cross(dir(theta1,phi1),dir(theta2,phi2))' if 'theta2 > theta1' or if
+'theta2 == theta1' and 'phi2 >= phi1', can be constructed with
path3 arc(triple c, real r, real theta1, real phi1, real theta2, real phi2,
triple normal=O);
- The normal must be explicitly specified if `c' and the endpoints are
-colinear. If `r' < 0, the complementary arc of radius `|r|' is
-constructed. For convenience, an arc centered at `c' from triple `v1'
-to `v2' (assuming `|v2-c|=|v1-c|') in the direction CCW
+ The normal must be explicitly specified if 'c' and the endpoints are
+colinear. If 'r' < 0, the complementary arc of radius '|r|' is
+constructed. For convenience, an arc centered at 'c' from triple 'v1'
+to 'v2' (assuming '|v2-c|=|v1-c|') in the direction CCW
(counter-clockwise) or CW (clockwise) may also be constructed with
path3 arc(triple c, triple v1, triple v2, triple normal=O,
bool direction=CCW);
- When high accuracy is needed, the routines `Circle' and `Arc' defined
-in `graph3' may be used instead. See *note GaussianSurface:: for an
+When high accuracy is needed, the routines 'Circle' and 'Arc' defined in
+'graph3' may be used instead. See *note GaussianSurface:: for an
example of a three-dimensional circular arc.
- The representation `O--O+u--O+u+v--O+v--cycle' of the plane passing
-through point `O' with normal `cross(u,v)' is returned by
+ The representation 'O--O+u--O+u+v--O+v--cycle' of the plane passing
+through point 'O' with normal 'cross(u,v)' is returned by
path3 plane(triple u, triple v, triple O=O);
- A three-dimensional box with opposite vertices at triples `v1' and
-`v2' may be drawn with the function
+ A three-dimensional box with opposite vertices at triples 'v1' and
+'v2' may be drawn with the function
path3[] box(triple v1, triple v2);
- For example, a unit box is predefined as
+For example, a unit box is predefined as
path3[] unitbox=box(O,(1,1,1));
- `Asymptote' also provides optimized definitions for the
-three-dimensional paths `unitsquare3' and `unitcircle3', along with the
-surfaces `unitdisk', `unitplane', `unitcube', `unitcylinder',
-`unitcone', `unitsolidcone', `unitfrustum(real t1, real t2)',
-`unitsphere', and `unithemisphere'.
+ 'Asymptote' also provides optimized definitions for the
+three-dimensional paths 'unitsquare3' and 'unitcircle3', along with the
+surfaces 'unitdisk', 'unitplane', 'unitcube', 'unitcylinder',
+'unitcone', 'unitsolidcone', 'unitfrustum(real t1, real t2)',
+'unitsphere', and 'unithemisphere'.
These projections to two dimensions are predefined:
-`oblique'
-
-`oblique(real angle)'
- The point `(x,y,z)' is projected to `(x-0.5z,y-0.5z)'. If an
+'oblique'
+'oblique(real angle)'
+ The point '(x,y,z)' is projected to '(x-0.5z,y-0.5z)'. If an
optional real argument is given, the negative z axis is drawn at
- this angle in degrees. The projection `obliqueZ' is a synonym for
- `oblique'.
-
-`obliqueX'
+ this angle in degrees. The projection 'obliqueZ' is a synonym for
+ 'oblique'.
-`obliqueX(real angle)'
- The point `(x,y,z)' is projected to `(y-0.5x,z-0.5x)'. If an
+'obliqueX'
+'obliqueX(real angle)'
+ The point '(x,y,z)' is projected to '(y-0.5x,z-0.5x)'. If an
optional real argument is given, the negative x axis is drawn at
this angle in degrees.
-`obliqueY'
-
-`obliqueY(real angle)'
- The point `(x,y,z)' is projected to `(x+0.5y,z+0.5y)'. If an
+'obliqueY'
+'obliqueY(real angle)'
+ The point '(x,y,z)' is projected to '(x+0.5y,z+0.5y)'. If an
optional real argument is given, the positive y axis is drawn at
this angle in degrees.
-`orthographic(triple camera, triple up=Z, triple target=O,
- real zoom=1, pair viewportshift=0, bool showtarget=true,
- bool center=false)'
+'orthographic(triple camera, triple up=Z, triple target=O,
+ real zoom=1, pair viewportshift=0, 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 `unit(camera)',
- orienting the camera so that, if possible, the vector `up' points
- upwards. Parallel lines are projected to parallel lines. The
- bounding volume is expanded to include `target' if
- `showtarget=true'. If `center=true', the target will be adjusted
+ at a point infinitely far away in the direction 'unit(camera)',
+ orienting the camera so that, if possible, the vector 'up' points
+ upwards. Parallel lines are projected to parallel lines. The
+ bounding volume is expanded to include 'target' if
+ 'showtarget=true'. If 'center=true', the target will be adjusted
to the center of the bounding volume.
-`orthographic(real x, real y, real z, triple up=Z, triple target=O,
- real zoom=1, pair viewportshift=0, bool showtarget=true,
- bool center=false)'
- This is equivalent to orthographic((x,y,z),up,target,zoom,viewportshift,showtarget,center)
-
- The routine triple camera(real alpha, real beta);
- can be used to compute the camera position with the x axis below
- the horizontal at angle `alpha', the y axis below the horizontal
- at angle `beta', and the z axis up.
-
-`perspective(triple camera, triple up=Z, triple target=O,
- real zoom=1, real angle=0, pair viewportshift=0,
- bool showtarget=true, bool autoadjust=true,
- bool center=autoadjust)'
+'orthographic(real x, real y, real z, triple up=Z, triple target=O,
+ real zoom=1, pair viewportshift=0, bool showtarget=true,
+ bool center=false)'
+ This is equivalent to
+ orthographic((x,y,z),up,target,zoom,viewportshift,showtarget,center)
+
+ The routine
+ triple camera(real alpha, real beta);
+ can be used to compute the camera position with the x axis below
+ the horizontal at angle 'alpha', the y axis below the horizontal at
+ angle 'beta', and the z axis up.
+
+'perspective(triple camera, triple up=Z, triple target=O,
+ real zoom=1, real angle=0, pair viewportshift=0,
+ bool showtarget=true, bool autoadjust=true,
+ bool center=autoadjust)'
This projects from three to two dimensions, taking account of
- perspective, as seen from the location `camera' looking at
- `target', orienting the camera so that, if possible, the vector
- `up' points upwards. If `render=0', projection of
+ perspective, as seen from the location 'camera' looking at
+ 'target', orienting the camera so that, if possible, the vector
+ 'up' points upwards. If 'render=0', projection of
three-dimensional cubic Bezier splines is implemented by
approximating a two-dimensional nonuniform rational B-spline
(NURBS) with a two-dimensional Bezier curve containing additional
- nodes and control points. If `autoadjust=true', the camera will
+ nodes and control points. If 'autoadjust=true', the camera will
automatically be adjusted to lie outside the bounding volume for
- all possible interactive rotations about `target'. If
- `center=true', the target will be adjusted to the center of the
+ all possible interactive rotations about 'target'. If
+ 'center=true', the target will be adjusted to the center of the
bounding volume.
-`perspective(real x, real y, real z, triple up=Z, triple target=O,
- real zoom=1, real angle=0, pair viewportshift=0,
- bool showtarget=true, bool autoadjust=true,
- bool center=autoadjust)'
- This is equivalent to perspective((x,y,z),up,target,zoom,angle,viewportshift,showtarget,
+'perspective(real x, real y, real z, triple up=Z, triple target=O,
+ real zoom=1, real angle=0, pair viewportshift=0,
+ bool showtarget=true, bool autoadjust=true,
+ bool center=autoadjust)'
+ This is equivalent to
+ perspective((x,y,z),up,target,zoom,angle,viewportshift,showtarget,
autoadjust,center)
-The default projection, `currentprojection', is initially set to
-`perspective(5,4,2)'.
+The default projection, 'currentprojection', is initially set to
+'perspective(5,4,2)'.
We also define standard orthographic views used in technical drawing:
projection LeftView=orthographic(-X,showtarget=true);
@@ -7047,15 +7031,15 @@ projection FrontView=orthographic(-Y,showtarget=true);
projection BackView=orthographic(Y,showtarget=true);
projection BottomView=orthographic(-Z,showtarget=true);
projection TopView=orthographic(Z,showtarget=true);
- The function
+The function
void addViews(picture dest=currentpicture, picture src,
projection[][] views=SixViewsUS,
bool group=true, filltype filltype=NoFill);
- adds to picture `dest' an array of views of picture `src' using the
-layout projection[][] `views'. The default layout `SixViewsUS' aligns
-the projection `FrontView' below `TopView' and above `BottomView', to
-the right of `LeftView' and left of `RightView' and `BackView'. The
-predefined layouts are:
+adds to picture 'dest' an array of views of picture 'src' using the
+layout projection[][] 'views'. The default layout 'SixViewsUS' aligns
+the projection 'FrontView' below 'TopView' and above 'BottomView', to
+the right of 'LeftView' and left of 'RightView' and 'BackView'. The
+predefined layouts are:
projection[][] ThreeViewsUS={{TopView},
{FrontView,RightView}};
@@ -7075,109 +7059,124 @@ projection[][] ThreeViews={{FrontView,TopView,RightView}};
projection[][] SixViews={{FrontView,TopView,RightView},
{BackView,BottomView,LeftView}};
+
A triple or path3 can be projected to a pair or path, with
-`project(triple, projection P=currentprojection)' or `project(path3,
+'project(triple, projection P=currentprojection)' or 'project(path3,
projection P=currentprojection)'.
It is occasionally useful to be able to invert a projection, sending
-a pair `z' onto the plane perpendicular to `normal' and passing through
-`point':
+a pair 'z' onto the plane perpendicular to 'normal' and passing through
+'point':
triple invert(pair z, triple normal, triple point,
projection P=currentprojection);
- A pair `z' on the projection plane can be inverted to a triple with
-the routine
+A pair 'z' on the projection plane can be inverted to a triple with the
+routine
triple invert(pair z, projection P=currentprojection);
- A pair direction `dir' on the projection plane can be inverted to a
-triple direction relative to a point `v' with the routine
+A pair direction 'dir' on the projection plane can be inverted to a
+triple direction relative to a point 'v' with the routine
triple invert(pair dir, triple v, projection P=currentprojection).
Three-dimensional objects may be transformed with one of the
following built-in transform3 types (the identity transformation is
-`identity4'):
-
-`shift(triple v)'
- translates by the triple `v';
-
-`xscale3(real x)'
- scales by `x' in the x direction;
-
-`yscale3(real y)'
- scales by `y' in the y direction;
-
-`zscale3(real z)'
- scales by `z' in the z direction;
-
-`scale3(real s)'
- scales by `s' in the x, y, and z directions;
-
-`scale(real x, real y, real z)'
- scales by `x' in the x direction, by `y' in the y direction, and
- by `z' in the z direction;
-
-`rotate(real angle, triple v)'
- rotates by `angle' in degrees about an axis `v' through the origin;
-
-`rotate(real angle, triple u, triple v)'
- rotates by `angle' in degrees about the axis `u--v';
-
-`reflect(triple u, triple v, triple w)'
- reflects about the plane through `u', `v', and `w'.
+'identity4'):
+
+'shift(triple v)'
+ translates by the triple 'v';
+'xscale3(real x)'
+ scales by 'x' in the x direction;
+'yscale3(real y)'
+ scales by 'y' in the y direction;
+'zscale3(real z)'
+ scales by 'z' in the z direction;
+'scale3(real s)'
+ scales by 's' in the x, y, and z directions;
+'scale(real x, real y, real z)'
+ scales by 'x' in the x direction, by 'y' in the y direction, and by
+ 'z' in the z direction;
+'rotate(real angle, triple v)'
+ rotates by 'angle' in degrees about an axis 'v' through the origin;
+'rotate(real angle, triple u, triple v)'
+ rotates by 'angle' in degrees about the axis 'u--v';
+'reflect(triple u, triple v, triple w)'
+ reflects about the plane through 'u', 'v', and 'w'.
When not multiplied on the left by a transform3, three-dimensional
TeX Labels are drawn as Bezier surfaces directly on the projection
-plane:
+plane:
void label(picture pic=currentpicture, Label L, triple position,
align align=NoAlign, pen p=currentpen,
light light=nolight, string name="",
render render=defaultrender, interaction interaction=
settings.autobillboard ? Billboard : Embedded)
- The optional `name' parameter is used as a prefix for naming the label
-patches in the PRC model tree. The default interaction is `Billboard',
+The optional 'name' parameter is used as a prefix for naming the label
+patches in the PRC model tree. The default interaction is 'Billboard',
which means that labels are rotated interactively so that they always
-face the camera. The interaction `Embedded' means that the label
-interacts as a normal `3D' surface, as illustrated in the example
-`billboard.asy'. Alternatively, a label can be transformed from the
-`XY' plane by an explicit transform3 or mapped to a specified
-two-dimensional plane with the predefined transform3 types `XY', `YZ',
-`ZX', `YX', `ZY', `ZX'. There are also modified versions of these
-transforms that take an optional argument `projection
+face the camera. The interaction 'Embedded' means that the label
+interacts as a normal '3D' surface, as illustrated in the example
+'billboard.asy'. Alternatively, a label can be transformed from the
+'XY' plane by an explicit transform3 or mapped to a specified
+two-dimensional plane with the predefined transform3 types 'XY', 'YZ',
+'ZX', 'YX', 'ZY', 'ZX'. There are also modified versions of these
+transforms that take an optional argument 'projection
P=currentprojection' that rotate and/or flip the label so that it is
more readable from the initial viewpoint.
- A transform3 that projects in the direction `dir' onto the plane
-with normal `n' through point `O' is returned by
+ A transform3 that projects in the direction 'dir' onto the plane with
+normal 'n' through point 'O' is returned by
transform3 planeproject(triple n, triple O=O, triple dir=n);
- One can use
+One can use
triple normal(path3 p);
- to find the unit normal vector to a planar three-dimensional path `p'.
-As illustrated in the example `planeproject.asy', a transform3 that
-projects in the direction `dir' onto the plane defined by a planar path
-`p' is returned by
+to find the unit normal vector to a planar three-dimensional path 'p'.
+As illustrated in the example 'planeproject.asy', a transform3 that
+projects in the direction 'dir' onto the plane defined by a planar path
+'p' is returned by
transform3 planeproject(path3 p, triple dir=normal(p));
- The functions
+ The functions
surface extrude(path p, triple axis=Z);
surface extrude(Label L, triple axis=Z);
- return the surface obtained by extruding path `p' or Label `L' along
-`axis'.
+return the surface obtained by extruding path 'p' or Label 'L' along
+'axis'.
- Three-dimensional versions of the path functions `length', `size',
-`point', `dir', `accel', `radius', `precontrol', `postcontrol',
-`arclength', `arctime', `reverse', `subpath', `intersect',
-`intersections', `intersectionpoint', `intersectionpoints', `min',
-`max', `cyclic', and `straight' are also defined.
+ Three-dimensional versions of the path functions 'length', 'size',
+'point', 'dir', 'accel', 'radius', 'precontrol', 'postcontrol',
+'arclength', 'arctime', 'reverse', 'subpath', 'intersect',
+'intersections', 'intersectionpoint', 'intersectionpoints', 'min',
+'max', 'cyclic', and 'straight' are also defined.
- The routine
+ The routine
+real[] intersect(path3 p, surface s, real fuzz=-1);
+returns a real array of length 3 containing the intersection times, if
+any, of a path 'p' with a surface 's'. The routine
real[][] intersections(path3 p, surface s, real fuzz=-1);
- returns the intersection times of a path `p' with a surface `s' as a
-sorted array of real arrays of length 3, and
+returns all (unless there are infinitey many) intersection times of a
+path 'p' with a surface 's' as a sorted array of real arrays of length
+3, and
triple[] intersectionpoints(path3 p, surface s, real fuzz=-1);
- returns the corresponding intersection points. Here, the computations
-are performed to the absolute error specified by `fuzz', or if `fuzz <
-0', to machine precision.
+returns the corresponding intersection points. Here, the computations
+are performed to the absolute error specified by 'fuzz', or if 'fuzz <
+0', to machine precision. The routine
+real orient(triple a, triple b, triple c, triple d);
+is a numerically robust computation of 'dot(cross(a-d,b-d),c-d)', which
+is the determinant
+|a.x a.y a.z 1|
+|b.x b.y b.z 1|
+|c.x c.y c.z 1|
+|d.x d.y d.z 1|
- Here is an example showing all five guide3 connectors:
+ The routine
+real insphere(triple a, triple b, triple c, triple d, triple e);
+returns a positive (negative) value if 'e' lies inside (outside) the
+sphere passing through points 'a,b,c,d' oriented so that
+'dot(cross(a-d,b-d),c-d)' is positive, or zero if all five points are
+cospherical. The value returned is the determinant
+|a.x a.y a.z a.x^2+a.y^2+a.z^2 1|
+|b.x b.y b.z b.x^2+b.y^2+b.z^2 1|
+|c.x c.y c.z c.x^2+c.y^2+c.z^2 1|
+|d.x d.y d.z d.x^2+d.y^2+d.z^2 1|
+|e.x e.y e.z e.x^2+e.y^2+e.z^2 1|
+ Here is an example showing all five guide3 connectors:
import graph3;
size(200);
@@ -7200,59 +7199,59 @@ draw(p,grey+linewidth(4mm),currentlight);
xaxis3(Label(XY()*"$x$",align=-3Y),red,above=true);
yaxis3(Label(XY()*"$y$",align=-3X),red,above=true);
-
-
-Three-dimensional versions of bars or arrows can be drawn with one of
-the specifiers `None', `Blank', `BeginBar3', `EndBar3' (or equivalently
-`Bar3'), `Bars3', `BeginArrow3', `MidArrow3', `EndArrow3' (or
-equivalently `Arrow3'), `Arrows3', `BeginArcArrow3', `EndArcArrow3' (or
-equivalently `ArcArrow3'), `MidArcArrow3', and `ArcArrows3'.
-Three-dimensional bars accept the optional arguments `(real size=0,
-triple dir=O)'. If `size=O', the default bar length is used; if
-`dir=O', the bar is drawn perpendicular to the path and the initial
-viewing direction. The predefined three-dimensional arrowhead styles
-are `DefaultHead3', `HookHead3', `TeXHead3'. Versions of the
-two-dimensional arrowheads lifted to three-dimensional space and
-aligned according to the initial viewpoint (or an optionally specified
-`normal' vector) are also defined: `DefaultHead2(triple normal=O)',
-`HookHead2(triple normal=O)', `TeXHead2(triple normal=O)'. These are
-illustrated in the example `arrows3.asy'.
-
- Module `three' also defines the three-dimensional margins
-`NoMargin3', `BeginMargin3', `EndMargin3', `Margin3', `Margins3',
-`BeginPenMargin2', `EndPenMargin2', `PenMargin2', `PenMargins2',
-`BeginPenMargin3', `EndPenMargin3', `PenMargin3', `PenMargins3',
-`BeginDotMargin3', `EndDotMargin3', `DotMargin3', `DotMargins3',
-`Margin3', and `TrueMargin3'.
+ [join3]
+
+ Three-dimensional versions of bars or arrows can be drawn with one of
+the specifiers 'None', 'Blank', 'BeginBar3', 'EndBar3' (or equivalently
+'Bar3'), 'Bars3', 'BeginArrow3', 'MidArrow3', 'EndArrow3' (or
+equivalently 'Arrow3'), 'Arrows3', 'BeginArcArrow3', 'EndArcArrow3' (or
+equivalently 'ArcArrow3'), 'MidArcArrow3', and 'ArcArrows3'.
+Three-dimensional bars accept the optional arguments '(real size=0,
+triple dir=O)'. If 'size=O', the default bar length is used; if
+'dir=O', the bar is drawn perpendicular to the path and the initial
+viewing direction. The predefined three-dimensional arrowhead styles
+are 'DefaultHead3', 'HookHead3', 'TeXHead3'. Versions of the
+two-dimensional arrowheads lifted to three-dimensional space and aligned
+according to the initial viewpoint (or an optionally specified 'normal'
+vector) are also defined: 'DefaultHead2(triple normal=O)',
+'HookHead2(triple normal=O)', 'TeXHead2(triple normal=O)'. These are
+illustrated in the example 'arrows3.asy'.
+
+ Module 'three' also defines the three-dimensional margins
+'NoMargin3', 'BeginMargin3', 'EndMargin3', 'Margin3', 'Margins3',
+'BeginPenMargin2', 'EndPenMargin2', 'PenMargin2', 'PenMargins2',
+'BeginPenMargin3', 'EndPenMargin3', 'PenMargin3', 'PenMargins3',
+'BeginDotMargin3', 'EndDotMargin3', 'DotMargin3', 'DotMargins3',
+'Margin3', and 'TrueMargin3'.
The routine
void pixel(picture pic=currentpicture, triple v, pen p=currentpen,
real width=1);
- can be used to draw on picture `pic' a pixel of width `width' at
-position `v' using pen `p'.
+can be used to draw on picture 'pic' a pixel of width 'width' at
+position 'v' using pen 'p'.
Further three-dimensional examples are provided in the files
-`near_earth.asy', `conicurv.asy', and (in the `animations'
-subdirectory) `cube.asy'.
+'near_earth.asy', 'conicurv.asy', and (in the 'animations' subdirectory)
+'cube.asy'.
Limited support for projected vector graphics (effectively
-three-dimensional nonrendered `PostScript') is available with the
-setting `render=0'. This currently only works for piecewise planar
-surfaces, such as those produced by the parametric `surface' routines
-in the `graph3' module. Surfaces produced by the `solids' package will
-also be properly rendered if the parameter `nslices' is sufficiently
+three-dimensional nonrendered 'PostScript') is available with the
+setting 'render=0'. This currently only works for piecewise planar
+surfaces, such as those produced by the parametric 'surface' routines in
+the 'graph3' module. Surfaces produced by the 'solids' package will
+also be properly rendered if the parameter 'nslices' is sufficiently
large.
- In the module `bsp', hidden surface removal of planar pictures is
+ In the module 'bsp', hidden surface removal of planar pictures is
implemented using a binary space partition and picture clipping. A
-planar path is first converted to a structure `face' derived from
-`picture'. A `face' may be given to a two-dimensional drawing routine
-in place of any `picture' argument. An array of such faces may then be
+planar path is first converted to a structure 'face' derived from
+'picture'. A 'face' may be given to a two-dimensional drawing routine
+in place of any 'picture' argument. An array of such faces may then be
drawn, removing hidden surfaces:
void add(picture pic=currentpicture, face[] faces,
projection P=currentprojection);
- Labels may be projected to two dimensions, using projection `P', onto
-the plane passing through point `O' with normal `cross(u,v)' by
+ Labels may be projected to two dimensions, using projection 'P', onto
+the plane passing through point 'O' with normal 'cross(u,v)' by
multiplying it on the left by the transform
transform transform(triple u, triple v, triple O=O,
projection P=currentprojection);
@@ -7260,7 +7259,6 @@ transform transform(triple u, triple v, triple O=O,
Here is an example that shows how a binary space partition may be
used to draw a two-dimensional vector graphics projection of three
orthogonal intersecting planes:
-
size(6cm,0);
import bsp;
@@ -7281,30 +7279,31 @@ filldraw(faces.push(g),project(g),green);
add(faces);
+ [planes]

File: asymptote.info, Node: obj, Next: graph3, Prev: three, Up: Base modules
-8.30 `obj'
+8.30 'obj'
==========
This module allows one to construct surfaces from simple obj files, as
-illustrated in the example files `galleon.asy' and `triceratops.asy'.
+illustrated in the example files 'galleon.asy' and 'triceratops.asy'.

File: asymptote.info, Node: graph3, Next: grid3, Prev: obj, Up: Base modules
-8.31 `graph3'
+8.31 'graph3'
=============
This module implements three-dimensional versions of the functions in
-`graph.asy'. To draw an x axis in three dimensions, use the routine
+'graph.asy'. To draw an x axis in three dimensions, use the routine
void xaxis3(picture pic=currentpicture, Label L="", axis axis=YZZero,
real xmin=-infinity, real xmax=infinity, pen p=currentpen,
ticks3 ticks=NoTicks3, arrowbar3 arrow=None, bool above=false);
- Analogous routines `yaxis' and `zaxis' can be used to draw y and z
-axes in three dimensions. There is also a routine for drawing all
-three axis:
+Analogous routines 'yaxis' and 'zaxis' can be used to draw y and z axes
+in three dimensions. There is also a routine for drawing all three
+axis:
void axes3(picture pic=currentpicture,
Label xlabel="", Label ylabel="", Label zlabel="",
bool extend=false,
@@ -7320,20 +7319,19 @@ axis YZZero(triple align=O, bool extend=false);
axis XZZero(triple align=O, bool extend=false);
axis XYZero(triple align=O, bool extend=false);
axis Bounds(int type=Both, int type2=Both, triple align=O, bool extend=false);
- The optional `align' parameter to these routines can be used to
-specify the default axis and tick label alignments. The `Bounds' axis
-accepts two type parameters, each of which must be one of `Min', `Max',
-or `Both'. These parameters specify which of the four possible
+The optional 'align' parameter to these routines can be used to specify
+the default axis and tick label alignments. The 'Bounds' axis accepts
+two type parameters, each of which must be one of 'Min', 'Max', or
+'Both'. These parameters specify which of the four possible
three-dimensional bounding box edges should be drawn.
- The three-dimensional tick options are `NoTicks3', `InTicks',
-`OutTicks', and `InOutTicks'. These specify the tick directions for the
-`Bounds' axis type; other axis types inherit the direction that would
-be used for the `Bounds(Min,Min)' axis.
+ The three-dimensional tick options are 'NoTicks3', 'InTicks',
+'OutTicks', and 'InOutTicks'. These specify the tick directions for the
+'Bounds' axis type; other axis types inherit the direction that would be
+used for the 'Bounds(Min,Min)' axis.
Here is an example of a helix and bounding box axes with ticks and
axis labels, using orthographic projection:
-
import graph3;
size(0,200);
@@ -7355,11 +7353,10 @@ xaxis3(XZ()*"$x$",Bounds,red,InTicks(Label,2,2));
yaxis3(YZ()*"$y$",Bounds,red,InTicks(beginlabel=false,Label,2,2));
zaxis3(XZ()*"$z$",Bounds,red,InTicks);
+ [helix]
-
-The next example illustrates three-dimensional x, y, and z axes,
-without autoscaling of the axis limits:
-
+ The next example illustrates three-dimensional x, y, and z axes,
+without autoscaling of the axis limits:
import graph3;
size(0,200);
@@ -7373,10 +7370,9 @@ xaxis3("$x$",0,1,red,OutTicks(2,2));
yaxis3("$y$",0,1,red,OutTicks(2,2));
zaxis3("$z$",1,30,red,OutTicks(beginlabel=false));
+ [axis3]
-
-One can also place ticks along a general three-dimensional axis:
-
+ One can also place ticks along a general three-dimensional axis:
import graph3;
size(0,100);
@@ -7391,8 +7387,9 @@ axis(Label("C",position=0,align=15X),g,InTicks(endlabel=false,8,end=false),
new triple(real t) {return cross(dir(g,t),Z);}));
+ [generalaxis3]
-Surface plots of matrices and functions over the region `box(a,b)' in
+ Surface plots of matrices and functions over the region 'box(a,b)' in
the XY plane are also implemented:
surface surface(real[][] f, pair a, pair b, bool[][] cond={});
surface surface(real[][] f, pair a, pair b, splinetype xsplinetype,
@@ -7414,16 +7411,15 @@ surface surface(triple f(pair z), pair a, pair b, int nu=nmesh, int nv=nu,
surface surface(triple f(pair z), pair a, pair b, int nu=nmesh, int nv=nu,
splinetype[] usplinetype, splinetype[] vsplinetype=Spline,
bool cond(pair z)=null);
- The final two versions draw parametric surfaces for a function f(u,v)
-over the parameter space `box(a,b)', as illustrated in the example
-`parametricsurface.asy'. An optional splinetype `Spline' may be
-specified. The boolean array or function `cond' can be used to control
+The final two versions draw parametric surfaces for a function f(u,v)
+over the parameter space 'box(a,b)', as illustrated in the example
+'parametricsurface.asy'. An optional splinetype 'Spline' may be
+specified. The boolean array or function 'cond' can be used to control
which surface mesh cells are actually drawn (by default all mesh cells
-over `box(a,b)' are drawn). Surface lighting is illustrated in the
-example files `parametricsurface.asy' and `sinc.asy'. Lighting can be
-disabled by setting `light=nolight', as in this example of a Gaussian
+over 'box(a,b)' are drawn). Surface lighting is illustrated in the
+example files 'parametricsurface.asy' and 'sinc.asy'. Lighting can be
+disabled by setting 'light=nolight', as in this example of a Gaussian
surface:
-
import graph3;
size(200,0);
@@ -7446,30 +7442,29 @@ draw(s,lightgray,meshpen=black+thick(),nolight,render(merge=true));
label("$O$",O,-Z+Y,red);
-
-A mesh can be drawn without surface filling by specifying `nullpen' for
+ [GaussianSurface]
+A mesh can be drawn without surface filling by specifying 'nullpen' for
the surfacepen.
- A vector field of `nu'\times`nv' arrows on a parametric surface `f'
-over `box(a,b)' can be drawn with the routine
+ A vector field of 'nu'\times'nv' arrows on a parametric surface 'f'
+over 'box(a,b)' can be drawn with the routine
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)
- as illustrated in the examples `vectorfield3.asy' and
-`vectorfieldsphere.asy'.
+ as illustrated in the examples 'vectorfield3.asy' and
+'vectorfieldsphere.asy'.

File: asymptote.info, Node: grid3, Next: solids, Prev: graph3, Up: Base modules
-8.32 `grid3'
+8.32 'grid3'
============
This module, contributed by Philippe Ivaldi, can be used for drawing 3D
-grids. Here is an example (further examples can be found in `grid3.asy'
-and at `http://www.piprime.fr/files/asymptote/grid3/'):
-
+grids. Here is an example (further examples can be found in 'grid3.asy'
+and at <http://www.piprime.fr/files/asymptote/grid3/>):
import grid3;
size(8cm,0,IgnoreAspect);
@@ -7488,18 +7483,18 @@ zaxis3(Label("$z$",position=EndPoint,align=(-1,0.5)),Bounds(Min,Min),
OutTicks(beginlabel=false));
+ [grid3xyz]

File: asymptote.info, Node: solids, Next: tube, Prev: grid3, Up: Base modules
-8.33 `solids'
+8.33 'solids'
=============
-This solid geometry package defines a structure `revolution' that can
-be used to fill and draw surfaces of revolution. The following example
+This solid geometry package defines a structure 'revolution' that can be
+used to fill and draw surfaces of revolution. The following example
uses it to display the outline of a circular cylinder of radius 1 with
-axis `O--1.5unit(Y+Z)' with perspective projection:
-
+axis 'O--1.5unit(Y+Z)' with perspective projection:
import solids;
size(0,100);
@@ -7507,12 +7502,12 @@ size(0,100);
revolution r=cylinder(O,1,1.5,Y+Z);
draw(r,heavygreen);
+ [cylinderskeleton]
+ Further illustrations are provided in the example files
+'cylinder.asy', 'cones.asy', 'hyperboloid.asy', and 'torus.asy'.
-Further illustrations are provided in the example files `cylinder.asy',
-`cones.asy', `hyperboloid.asy', and `torus.asy'.
-
- The structure `skeleton' contains the three-dimensional wireframe
+ The structure 'skeleton' contains the three-dimensional wireframe
used to visualize a volume of revolution:
struct skeleton {
struct curve {
@@ -7528,64 +7523,64 @@ struct skeleton {

File: asymptote.info, Node: tube, Next: flowchart, Prev: solids, Up: Base modules
-8.34 `tube'
+8.34 'tube'
===========
-This package extends the `tube' surfaces constructed in
-`three_arrows.asy' to arbitrary cross sections, colors, and spine
-transformations. The routine
+This package extends the 'tube' surfaces constructed in
+'three_arrows.asy' to arbitrary cross sections, colors, and spine
+transformations. The routine
surface tube(path3 g, coloredpath section,
transform T(real)=new transform(real t) {return identity();},
real corner=1, real relstep=0);
- draws a tube along `g' with cross section `section', after applying
-the transformation `T(t)' at `relpoint(g,t)'. The parameter `corner'
-controls the number of elementary tubes at the angular points of `g'. A
-nonzero value of `relstep' specifies a fixed relative time step (in the
-sense of `relpoint(g,t)') to use in constructing elementary tubes along
-`g'. The type `coloredpath' is a generalization of `path' to which a
-`path' can be cast:
+draws a tube along 'g' with cross section 'section', after applying the
+transformation 'T(t)' at 'relpoint(g,t)'. The parameter 'corner'
+controls the number of elementary tubes at the angular points of 'g'. A
+nonzero value of 'relstep' specifies a fixed relative time step (in the
+sense of 'relpoint(g,t)') to use in constructing elementary tubes along
+'g'. The type 'coloredpath' is a generalization of 'path' to which a
+'path' can be cast:
struct coloredpath
{
path p;
pen[] pens(real);
int colortype=coloredSegments;
}
- Here `p' defines the cross section and the method `pens(real t)'
-returns an array of pens (interpreted as a cyclic array) used for
-shading the tube patches at `relpoint(g,t)'. If
-`colortype=coloredSegments', the tube patches are filled as if each
-segment of the section was colored with the pen returned by `pens(t)',
-whereas if `colortype=coloredNodes', the tube components are vertex
-shaded as if the nodes of the section were colored.
-
- A `coloredpath' can be constructed with one of the routines:
+Here 'p' defines the cross section and the method 'pens(real t)' returns
+an array of pens (interpreted as a cyclic array) used for shading the
+tube patches at 'relpoint(g,t)'. If 'colortype=coloredSegments', the
+tube patches are filled as if each segment of the section was colored
+with the pen returned by 'pens(t)', whereas if 'colortype=coloredNodes',
+the tube components are vertex shaded as if the nodes of the section
+were colored.
+
+ A 'coloredpath' can be constructed with one of the routines:
coloredpath coloredpath(path p, pen[] pens(real),
int colortype=coloredSegments);
coloredpath coloredpath(path p, pen[] pens=new pen[] {currentpen},
int colortype=coloredSegments);
coloredpath coloredpath(path p, pen pen(real));
- In the second case, the pens are independent of the relative time. In
+In the second case, the pens are independent of the relative time. In
the third case, the array of pens contains only one pen, which depends
of the relative time.
- The casting of `path' to `coloredpath' allows the use of a `path'
-instead of a `coloredpath'; in this case the shading behaviour is the
+ The casting of 'path' to 'coloredpath' allows the use of a 'path'
+instead of a 'coloredpath'; in this case the shading behaviour is the
default shading behavior for a surface.
- An example of `tube' is provided in the file `trefoilknot.asy'.
+ An example of 'tube' is provided in the file 'trefoilknot.asy'.
Further examples can be found at
-`http://www.piprime.fr/files/asymptote/tube/'.
+<http://www.piprime.fr/files/asymptote/tube/>.

File: asymptote.info, Node: flowchart, Next: contour, Prev: tube, Up: Base modules
-8.35 `flowchart'
+8.35 'flowchart'
================
-This package provides routines for drawing flowcharts. The primary
-structure is a `block', which represents a single block on the
-flowchart. The following eight functions return a position on the
-appropriate edge of the block, given picture transform `t':
+This package provides routines for drawing flowcharts. The primary
+structure is a 'block', which represents a single block on the
+flowchart. The following eight functions return a position on the
+appropriate edge of the block, given picture transform 't':
pair block.top(transform t=identity());
pair block.left(transform t=identity());
@@ -7595,24 +7590,21 @@ pair block.topleft(transform t=identity());
pair block.topright(transform t=identity());
pair block.bottomleft(transform t=identity());
pair block.bottomright(transform t=identity());
-
To obtain an arbitrary position along the boundary of the block in user
coordinates, use:
pair block.position(real x, transform t=identity());
-
-The center of the block in user coordinates is stored in `block.center'
-and the block size in `PostScript' coordinates is given by `block.size'.
+The center of the block in user coordinates is stored in 'block.center'
+and the block size in 'PostScript' coordinates is given by 'block.size'.
A frame containing the block is returned by
frame block.draw(pen p=currentpen);
-
The following block generation routines accept a Label, string, or
frame for their object argument:
-"rectangular block with an optional header (and padding `dx' around header and body):"
+"rectangular block with an optional header (and padding 'dx' around header and body):"
block rectangle(object header, object body, pair center=(0,0),
pen headerpen=mediumgray, pen bodypen=invisible,
pen drawpen=currentpen,
@@ -7655,16 +7647,15 @@ frame for their object argument:
pen drawpen=currentpen, real dh=5, real dw=5,
real minwidth=minblockwidth, real minheight=minblockheight);
-
- To draw paths joining the pairs in `point' with right-angled lines,
-use the routine:
+ To draw paths joining the pairs in 'point' with right-angled lines,
+use the routine:
path path(pair point[] ... flowdir dir[]);
- The entries in `dir' identify whether successive segments between the
-pairs specified by `point' should be drawn in the `Horizontal' or
-`Vertical' direction.
+The entries in 'dir' identify whether successive segments between the
+pairs specified by 'point' should be drawn in the 'Horizontal' or
+'Vertical' direction.
Here is a simple flowchart example (see also the example
-`controlsystem.asy'):
+'controlsystem.asy'):
size(0,300);
@@ -7694,64 +7685,62 @@ add(new void(picture pic, transform t) {
block3--Down--Right--Arrow--block5;
});
-
+ [flowchartdemo]

File: asymptote.info, Node: contour, Next: contour3, Prev: flowchart, Up: Base modules
-8.36 `contour'
+8.36 'contour'
==============
This package draws contour lines. To construct contours corresponding
-to the values in a real array `c' for a function `f' on `box(a,b)', use
+to the values in a real array 'c' for a function 'f' on 'box(a,b)', use
the routine
guide[][] contour(real f(real, real), pair a, pair b,
real[] c, int nx=ngraph, int ny=nx,
interpolate join=operator --, int subsample=1);
- The integers `nx' and `ny' define the resolution. The default
-resolution, `ngraph x ngraph' (here `ngraph' defaults to `100') can be
+The integers 'nx' and 'ny' define the resolution. The default
+resolution, 'ngraph x ngraph' (here 'ngraph' defaults to '100') can be
increased for greater accuracy. The default interpolation operator is
-`operator --' (linear). Spline interpolation (`operator ..') may
+'operator --' (linear). Spline interpolation ('operator ..') may
produce smoother contours but it can also lead to overshooting. The
-`subsample' parameter indicates the number of interior points that
-should be used to sample contours within each `1 x 1' box; the default
-value of `1' is usually sufficient.
+'subsample' parameter indicates the number of interior points that
+should be used to sample contours within each '1 x 1' box; the default
+value of '1' is usually sufficient.
To construct contours for an array of data values on a uniform
-two-dimensional lattice on `box(a,b)', use
+two-dimensional lattice on 'box(a,b)', use
guide[][] contour(real[][] f, pair a, pair b, real[] c,
interpolate join=operator --, int subsample=1);
To construct contours for an array of data values on a nonoverlapping
-regular mesh specified by the two-dimensional array `z',
+regular mesh specified by the two-dimensional array 'z',
guide[][] contour(pair[][] z, real[][] f, real[] c,
interpolate join=operator --, int subsample=1);
- To construct contours for an array of values `f' specified at
-irregularly positioned points `z', use the routine
+To construct contours for an array of values 'f' specified at
+irregularly positioned points 'z', use the routine
guide[][] contour(pair[] z, real[] f, real[] c, interpolate join=operator --);
- The contours themselves can be drawn with one of the routines
+The contours themselves can be drawn with one of the routines
void draw(picture pic=currentpicture, Label[] L=new Label[],
guide[][] g, pen p=currentpen);
void draw(picture pic=currentpicture, Label[] L=new Label[],
guide[][] g, pen[] p);
- The following simple example draws the contour at value `1' for the
+ The following simple example draws the contour at value '1' for the
function z=x^2+y^2, which is a unit circle:
-
import contour;
size(75);
real f(real a, real b) {return a^2+b^2;}
draw(contour(f,(-1,-1),(1,1),new real[] {1}));
+ [onecontour]
-
-The next example draws and labels multiple contours for the function
-z=x^2-y^2 with the resolution `100 x 100', using a dashed pen for
+ The next example draws and labels multiple contours for the function
+z=x^2-y^2 with the resolution '100 x 100', using a dashed pen for
negative contours and a solid pen for positive (and zero) contours:
-
import contour;
size(200);
@@ -7772,11 +7761,10 @@ Label[] Labels=sequence(new Label(int i) {
draw(Labels,contour(f,(-1,-1),(1,1),c),p);
+ [multicontour]
-
-The next example illustrates how contour lines can be drawn on color
+ The next example illustrates how contour lines can be drawn on color
density images:
-
import graph;
import palette;
import contour;
@@ -7816,11 +7804,10 @@ yaxis("$y$",LeftRight,RightTicks,above=true);
palette("$f(x,y)$",range,point(NW)+(0,0.5),point(NE)+(0,1),Top,Palette,
PaletteTicks(N=Divs,n=divs,Tickpen,tickpen));
+ [imagecontour]
-
-Finally, here is an example that illustrates the construction of
+ Finally, here is an example that illustrates the construction of
contours from irregularly spaced data:
-
import contour;
size(200);
@@ -7843,10 +7830,10 @@ for(int i=0; i < n; ++i) {
draw(contour(points,values,new real[]{0.25,0.5,1},operator ..),blue);
+ [irregularcontour]
-
-In the above example, the contours of irregularly spaced data are
-constructed by first creating a triangular mesh from an array `z' of
+ In the above example, the contours of irregularly spaced data are
+constructed by first creating a triangular mesh from an array 'z' of
pairs:
int[][] triangulate(pair[] z);
@@ -7871,28 +7858,27 @@ for(int i=0; i < trn.length; ++i) {
for(int i=0; i < np; ++i)
dot(points[i],red);
+ [triangulate]
-
-The example `Gouraudcontour' illustrates how to produce color density
-images over such irregular triangular meshes. `Asymptote' uses a
-robust version of Paul Bourke's Delaunay triangulation algorithm based
-on the public-domain exact arithmetic predicates written by Jonathan
-Shewchuk.
+ The example 'Gouraudcontour' illustrates how to produce color density
+images over such irregular triangular meshes. 'Asymptote' uses a robust
+version of Paul Bourke's Delaunay triangulation algorithm based on the
+public-domain exact arithmetic predicates written by Jonathan Shewchuk.

File: asymptote.info, Node: contour3, Next: slopefield, Prev: contour, Up: Base modules
-8.37 `contour3'
+8.37 'contour3'
===============
This package draws surfaces described as the null space of real-valued
functions of (x,y,z) or real[][][] matrices. Its usage is illustrated
-in the example file `magnetic.asy'.
+in the example file 'magnetic.asy'.

File: asymptote.info, Node: slopefield, Next: ode, Prev: contour3, Up: Base modules
-8.38 `slopefield'
+8.38 'slopefield'
=================
To draw a slope field for the differential equation dy/dx=f(x,y) (or
@@ -7901,22 +7887,22 @@ picture slopefield(real f(real,real), pair a, pair b,
int nx=nmesh, int ny=nx,
real tickfactor=0.5, pen p=currentpen,
arrowbar arrow=None);
- Here, the points `a' and `b' are the lower left and upper right
-corners of the rectangle in which the slope field is to be drawn, `nx'
-and `ny' are the respective number of ticks in the x and y directions,
-`tickfactor' is the fraction of the minimum cell dimension to use for
-drawing ticks, and `p' is the pen to use for drawing the slope fields.
-The return value is a picture that can be added to `currentpicture' via
-the `add(picture)' command.
-
- The function
+Here, the points 'a' and 'b' are the lower left and upper right corners
+of the rectangle in which the slope field is to be drawn, 'nx' and 'ny'
+are the respective number of ticks in the x and y directions,
+'tickfactor' is the fraction of the minimum cell dimension to use for
+drawing ticks, and 'p' is the pen to use for drawing the slope fields.
+The return value is a picture that can be added to 'currentpicture' via
+the 'add(picture)' command.
+
+ The function
path curve(pair c, real f(real,real), pair a, pair b);
- takes a point (`c') and a slope field-defining function `f' and
-returns, as a path, the curve passing through that point. The points
-`a' and `b' represent the rectangular boundaries over which the curve
-is interpolated.
+takes a point ('c') and a slope field-defining function 'f' and returns,
+as a path, the curve passing through that point. The points 'a' and 'b'
+represent the rectangular boundaries over which the curve is
+interpolated.
- Both `slopefield' and `curve' alternatively accept a function `real
+ Both 'slopefield' and 'curve' alternatively accept a function 'real
f(real)' that depends on x only, as seen in this example:
import slopefield;
@@ -7929,14 +7915,16 @@ draw(curve((0,0),func,(-3,-3),(3,3)),red);
+ [slopefield1]
+

File: asymptote.info, Node: ode, Prev: slopefield, Up: Base modules
-8.39 `ode'
+8.39 'ode'
==========
-The `ode' module, illustrated in the example `odetest.asy', implements
-a number of explicit numerical integration schemes for ordinary
+The 'ode' module, illustrated in the example 'odetest.asy', implements a
+number of explicit numerical integration schemes for ordinary
differential equations.

@@ -7945,15 +7933,15 @@ File: asymptote.info, Node: Options, Next: Interactive mode, Prev: Base modul
9 Command-line options
**********************
-Type `asy -h' to see the full list of command-line options supported by
-`Asymptote':
-
+Type 'asy -h' to see the full list of command-line options supported by
+'Asymptote':
Usage: ../asy [options] [file ...]
Options (negate by replacing - with -no):
-V,-View View output; command-line only
-a,-align C|B|T|Z Center, Bottom, Top, or Zero page alignment [C]
+-aligndir pair Directional page alignment (overrides align) [(0,0)]
-antialias n Antialiasing width for rasterized output [2]
-arcballradius pixels Arcball radius [750]
-auto3D Automatically activate 3D scene [true]
@@ -8038,30 +8026,31 @@ Options (negate by replacing - with -no):
-zoomfactor factor Zoom step factor [1.05]
-zoomstep step Mouse motion zoom step [0.1]
- All boolean options can be negated by prepending `no' to the option
+
+ All boolean options can be negated by prepending 'no' to the option
name.
- If no arguments are given, `Asymptote' runs in interactive mode
-(*note Interactive mode::). In this case, the default output file is
-`out.eps'.
+ If no arguments are given, 'Asymptote' runs in interactive mode
+(*note Interactive mode::). In this case, the default output file is
+'out.eps'.
- If `-' is given as the file argument, `Asymptote' reads from
-standard input.
+ If '-' is given as the file argument, 'Asymptote' reads from standard
+input.
If multiple files are specified, they are treated as separate
-`Asymptote' runs.
+'Asymptote' runs.
- If the string `autoimport' is nonempty, a module with this name is
+ If the string 'autoimport' is nonempty, a module with this name is
automatically imported for each run as the final step in loading module
-`plain'.
-
- Default option values may be entered as `Asymptote' code in a
-configuration file named `config.asy' (or the file specified by the
-environment variable `ASYMPTOTE_CONFIG' or `-config' option).
-`Asymptote' will look for this file in its usual search path (*note
-Search paths::). Typically the configuration file is placed in the
-`.asy' directory in the user's home directory (`%USERPROFILE%\.asy'
-under `MSDOS'). Configuration variables are accessed using the long
+'plain'.
+
+ Default option values may be entered as 'Asymptote' code in a
+configuration file named 'config.asy' (or the file specified by the
+environment variable 'ASYMPTOTE_CONFIG' or '-config' option).
+'Asymptote' will look for this file in its usual search path (*note
+Search paths::). Typically the configuration file is placed in the
+'.asy' directory in the user's home directory ('%USERPROFILE%\.asy'
+under 'MSDOS'). Configuration variables are accessed using the long
form of the option names:
import settings;
outformat="pdf";
@@ -8069,96 +8058,94 @@ batchView=false;
interactiveView=true;
batchMask=false;
interactiveMask=true;
- Command-line options override these defaults. Most configuration
+ Command-line options override these defaults. Most configuration
variables may also be changed at runtime. The advanced configuration
-variables `dvipsOptions', `hyperrefOptions', `convertOptions',
-`gsOptions', `psviewerOptions', `pdfviewerOptions', `pdfreloadOptions',
-`glOptions', and `dvisvgmOptions' allow specialized options to be
-passed as a string to the respective applications or libraries. The
-default value of `hyperrefOptions' is
-`setpagesize=false,unicode,pdfborder=0 0 0'.
+variables 'dvipsOptions', 'hyperrefOptions', 'convertOptions',
+'gsOptions', 'psviewerOptions', 'pdfviewerOptions', 'pdfreloadOptions',
+'glOptions', and 'dvisvgmOptions' allow specialized options to be passed
+as a string to the respective applications or libraries. The default
+value of 'hyperrefOptions' is 'setpagesize=false,unicode,pdfborder=0 0
+0'.
If you insert
import plain;
settings.autoplain=true;
- at the beginning of the configuration file, it can contain arbitrary
-`Asymptote' code.
-
- The default output format is EPS for the (default) `latex' and `tex'
-tex engine and PDF for the `pdflatex', `xelatex', `context', `luatex',
-and `lualatex' tex engines. Alternative output formats may be produced
-using the `-f' option (or `outformat' setting).
-
- To produce SVG output, you will need `dvisvgm' (version 0.8.7 or
-later) from `http://dvisvgm.sourceforge.net' and must use the `latex'
-or `tex' tex engine. You might need to adjust the configuration
-variable `libgs' to point to the location of your `Ghostscript' library
-`libgs.so' (or to an empty string, depending on how `dvisvgm' was
+at the beginning of the configuration file, it can contain arbitrary
+'Asymptote' code.
+
+ The default output format is EPS for the (default) 'latex' and 'tex'
+tex engine and PDF for the 'pdflatex', 'xelatex', 'context', 'luatex',
+and 'lualatex' tex engines. Alternative output formats may be produced
+using the '-f' option (or 'outformat' setting).
+
+ To produce SVG output, you will need 'dvisvgm' (version 1.5.3 or
+later) from <http://dvisvgm.sourceforge.net> and must use the 'latex' or
+'tex' tex engine. You might need to adjust the configuration variable
+'libgs' to point to the location of your 'Ghostscript' library
+'libgs.so' (or to an empty string, depending on how 'dvisvgm' was
configured).
- `Asymptote' can also produce any output format supported by the
-`ImageMagick' `convert' program (version 6.3.5 or later recommended; an
-`Invalid Parameter' error message indicates that the `MSDOS' utility
-`convert' is being used instead of the one that comes with
-`ImageMagick'). The optional setting `-render n' requests an output
-resolution of `n' pixels per `bp'. Antialiasing is controlled by the
-parameter `antialias', which by default specifies a sampling width of 2
-pixels. To give other options to `convert', use the `convertOptions'
-setting or call convert manually. This example emulates how `Asymptote'
-produces antialiased `tiff' output at one pixel per `bp':
+ 'Asymptote' can also produce any output format supported by the
+'ImageMagick' 'convert' program (version 6.3.5 or later recommended; an
+'Invalid Parameter' error message indicates that the 'MSDOS' utility
+'convert' is being used instead of the one that comes with
+'ImageMagick'). The optional setting '-render n' requests an output
+resolution of 'n' pixels per 'bp'. Antialiasing is controlled by the
+parameter 'antialias', which by default specifies a sampling width of 2
+pixels. To give other options to 'convert', use the 'convertOptions'
+setting or call convert manually. This example emulates how 'Asymptote'
+produces antialiased 'tiff' output at one pixel per 'bp':
asy -o - venn | convert -alpha Off -density 144x144 -geometry 50%x eps:- venn.tiff
- If the option `-nosafe' is given, `Asymptote' runs in unsafe mode.
-This enables the `int system(string s)' and `int system(string[] s)'
-calls, allowing one to execute arbitrary shell commands. The default
-mode, `-safe', disables this call.
+ If the option '-nosafe' is given, 'Asymptote' runs in unsafe mode.
+This enables the 'int system(string s)' and 'int system(string[] s)'
+calls, allowing one to execute arbitrary shell commands. The default
+mode, '-safe', disables this call.
- A `PostScript' offset may be specified as a pair (in `bp' units)
-with the `-O' option:
+ A 'PostScript' offset may be specified as a pair (in 'bp' units) with
+the '-O' option:
asy -O 0,0 file
- The default offset is zero. The default value of the page alignment
-setting `align' is `Center'.
-
- The `-c' (`command') option may be used to execute arbitrary
-`Asymptote' code on the command line as a string. It is not necessary
-to terminate the string with a semicolon. Multiple `-c' options are
-executed in the order they are given. For example
+The default offset is zero. The pair 'aligndir' specifies an optional
+direction on the boundary of the page (mapped to the rectangle
+[-1,1]\times[-1,1]) to which the picture should be aligned; the default
+value '(0,0)' species center alignment.
+
+ The '-c' ('command') option may be used to execute arbitrary
+'Asymptote' code on the command line as a string. It is not necessary
+to terminate the string with a semicolon. Multiple '-c' options are
+executed in the order they are given. For example
asy -c 2+2 -c "sin(1)" -c "size(100); draw(unitsquare)"
- produces the output
+produces the output
4
0.841470984807897
- and draws a unitsquare of size `100'.
+and draws a unitsquare of size '100'.
- The `-u' (`user') option may be used to specify arbitrary
-`Asymptote' settings on the command line as a string. It is not
-necessary to terminate the string with a semicolon. Multiple `-u'
-options are executed in the order they are given. Command-line code like
-`-u x=sqrt(2)' can be executed within a module like this:
+ The '-u' ('user') option may be used to specify arbitrary 'Asymptote'
+settings on the command line as a string. It is not necessary to
+terminate the string with a semicolon. Multiple '-u' options are
+executed in the order they are given. Command-line code like '-u
+x=sqrt(2)' can be executed within a module like this:
real x;
usersetting();
write(x);
- When the `-l' (`listvariables') option is used with file arguments,
-only global functions and variables defined in the specified file(s)
-are listed.
+ When the '-l' ('listvariables') option is used with file arguments,
+only global functions and variables defined in the specified file(s) are
+listed.
- Additional debugging output is produced with each additional `-v'
+ Additional debugging output is produced with each additional '-v'
option:
-`-v'
+'-v'
Display top-level module and final output file names.
-
-`-vv'
- Also display imported and included module names and final `LaTeX'
- and `dvips' processing information.
-
-`-vvv'
- Also output `LaTeX' bidirectional pipe diagnostics.
-
-`-vvvv'
+'-vv'
+ Also display imported and included module names and final 'LaTeX'
+ and 'dvips' processing information.
+'-vvv'
+ Also output 'LaTeX' bidirectional pipe diagnostics.
+'-vvvv'
Also output knot guide solver diagnostics.
-
-`-vvvvv'
- Also output `Asymptote' traceback diagnostics.
+'-vvvvv'
+ Also output 'Asymptote' traceback diagnostics.

File: asymptote.info, Node: Interactive mode, Next: GUI, Prev: Options, Up: Top
@@ -8166,24 +8153,22 @@ File: asymptote.info, Node: Interactive mode, Next: GUI, Prev: Options, Up:
10 Interactive mode
*******************
-Interactive mode is entered by executing the command `asy' with no file
-arguments. When the `-multiline' option is disabled (the default), each
-line must be a complete `Asymptote' statement (unless explicitly
-continued by a final backslash character `\'); it is not necessary to
+Interactive mode is entered by executing the command 'asy' with no file
+arguments. When the '-multiline' option is disabled (the default), each
+line must be a complete 'Asymptote' statement (unless explicitly
+continued by a final backslash character '\'); it is not necessary to
terminate input lines with a semicolon. If one assigns
-`settings.multiline=true', interactive code can be entered over
-multiple lines; in this mode, the automatic termination of interactive
-input lines by a semicolon is inhibited. Multiline mode is useful for
-cutting and pasting `Asymptote' code directly into the interactive
-input buffer.
+'settings.multiline=true', interactive code can be entered over multiple
+lines; in this mode, the automatic termination of interactive input
+lines by a semicolon is inhibited. Multiline mode is useful for cutting
+and pasting 'Asymptote' code directly into the interactive input buffer.
Interactive mode can be conveniently used as a calculator:
-expressions entered at the interactive prompt (for which a
-corresponding `write' function exists) are automatically evaluated and
-written to `stdout'. If the expression is non-writable, its type
-signature will be printed out instead. In either case, the expression
-can be referred to using the symbol `%' in the next line input at the
-prompt. For example:
+expressions entered at the interactive prompt (for which a corresponding
+'write' function exists) are automatically evaluated and written to
+'stdout'. If the expression is non-writable, its type signature will be
+printed out instead. In either case, the expression can be referred to
+using the symbol '%' in the next line input at the prompt. For example:
> 2+3
5
> %*4
@@ -8197,53 +8182,47 @@ prompt. For example:
> %.size(200,0)
>
- The `%' symbol, when used as a variable, is shorthand for the
-identifier `operator answer', which is set by the prompt after each
+ The '%' symbol, when used as a variable, is shorthand for the
+identifier 'operator answer', which is set by the prompt after each
written expression evaluation.
The following special commands are supported only in interactive mode
and must be entered immediately after the prompt:
-`help'
+'help'
view the manual;
-
-`erase'
- erase `currentpicture';
-
-`reset'
- reset the `Asymptote' environment to its initial state, except for
+'erase'
+ erase 'currentpicture';
+'reset'
+ reset the 'Asymptote' environment to its initial state, except for
changes to the settings module (*note settings::), the current
- directory (*note cd::), and breakpoints (*note Debugger::);
-
-`input FILE'
- does an interactive reset, followed by the command `include FILE'.
- If the file name `FILE' contains nonalphanumeric characters,
- enclose it with quotation marks. A trailing semi-colon followed
- by optional `Asymptote' commands may be entered on the same line.
-
-`quit'
- exit interactive mode (`exit' is a synonym; the abbreviation `q'
- is also accepted unless there exists a top-level variable named
- `q'). A history of the most recent 1000 (this number can be
- changed with the `historylines' configuration variable) previous
- commands will be retained in the file `.asy/history' in the user's
- home directory (unless the command-line option `-localhistory' was
- specified, in which case the history will be stored in the file
- `.asy_history' in the current directory).
-
-
- Typing `ctrl-C' interrupts the execution of `Asymptote' code and
+ directory (*note cd::), and breakpoints (*note Debugger::);
+'input FILE'
+ does an interactive reset, followed by the command 'include FILE'.
+ If the file name 'FILE' contains nonalphanumeric characters,
+ enclose it with quotation marks. A trailing semi-colon followed by
+ optional 'Asymptote' commands may be entered on the same line.
+'quit'
+ exit interactive mode ('exit' is a synonym; the abbreviation 'q' is
+ also accepted unless there exists a top-level variable named 'q').
+ A history of the most recent 1000 (this number can be changed with
+ the 'historylines' configuration variable) previous commands will
+ be retained in the file '.asy/history' in the user's home directory
+ (unless the command-line option '-localhistory' was specified, in
+ which case the history will be stored in the file '.asy_history' in
+ the current directory).
+
+ Typing 'ctrl-C' interrupts the execution of 'Asymptote' code and
returns control to the interactive prompt.
- Interactive mode is implemented with the GNU `readline' library,
-with command history and auto-completion. To customize the key
-bindings, see:
-`http://cnswww.cns.cwru.edu/php/chet/readline/readline.html'
+ Interactive mode is implemented with the GNU 'readline' library, with
+command history and auto-completion. To customize the key bindings,
+see: <http://cnswww.cns.cwru.edu/php/chet/readline/readline.html>
- The file `asymptote.py' in the `Asymptote' system directory provides
-an alternative way of entering `Asymptote' commands interactively,
-coupled with the full power of `Python'. Copy this file to your `Python
-path' and then execute from within `Python' the commands
+ The file 'asymptote.py' in the 'Asymptote' system directory provides
+an alternative way of entering 'Asymptote' commands interactively,
+coupled with the full power of 'Python'. Copy this file to your 'Python
+path' and then execute from within 'Python' the commands
from asymptote import *
g=asy()
g.size(200)
@@ -8260,13 +8239,13 @@ File: asymptote.info, Node: GUI, Next: PostScript to Asymptote, Prev: Interac
***************************
In the event that adjustments to the final figure are required, the
-preliminary Graphical User Interface (GUI) `xasy' included with
-`Asymptote' allows you to move graphical objects and draw new ones.
-The modified figure can then be saved as a normal `Asymptote' file.
+preliminary Graphical User Interface (GUI) 'xasy' included with
+'Asymptote' allows you to move graphical objects and draw new ones. The
+modified figure can then be saved as a normal 'Asymptote' file.
* Menu:
-* GUI installation:: Installing `xasy'
+* GUI installation:: Installing 'xasy'
* GUI usage::

@@ -8275,26 +8254,22 @@ File: asymptote.info, Node: GUI installation, Next: GUI usage, Up: GUI
11.1 GUI installation
=====================
-As `xasy' is written in the interactive scripting language `Python/TK',
-it requires `Python' (`http://www.python.org'), the `Python Imaging
-Library' (`http://www.pythonware.com/products/pil/'), and the `tkinter'
-package (included with `Python' under `Microsoft Windows') be
-installed. `Fedora Linux' users can either install `tkinter' with the
-commands
+As 'xasy' is written in the interactive scripting language 'Python/TK',
+it requires 'Python' (<http://www.python.org>), the 'Python Imaging
+Library' (<http://www.pythonware.com/products/pil/>), and the 'tkinter'
+package (included with 'Python' under 'Microsoft Windows') be installed.
+'Fedora Linux' users can either install 'tkinter' with the commands
yum install tkinter
yum install tk-devel
- or manually install the `tkinter', `tix', `tk', and `tk-devel'
-packages.
+or manually install the 'tkinter', 'tix', 'tk', and 'tk-devel' packages.
Pictures are deconstructed into the PNG image format, which supports
-full alpha channel transparency. Under `Microsoft Windows', this
-requires `Python 2.7.4' and the `Python Imaging Library':
-
- `http://www.python.org/ftp/python/2.7.4/python-2.7.4.msi'
-
- `http://effbot.org/downloads/PIL-1.1.7.win32-py2.7.exe'.
- On `UNIX' systems, place
-`http://effbot.org/downloads/Imaging-1.1.7.tar.gz' in the `Asymptote'
+full alpha channel transparency. Under 'Microsoft Windows', this
+requires 'Python 2.7.4' and the 'Python Imaging Library':
+ <http://www.python.org/ftp/python/2.7.4/python-2.7.4.msi>
+ <http://effbot.org/downloads/PIL-1.1.7.win32-py2.7.exe>.
+On 'UNIX' systems, place
+<http://effbot.org/downloads/Imaging-1.1.7.tar.gz> in the 'Asymptote'
source directory, and type (as the root user):
tar -zxf Imaging-1.1.7.tar.gz
cd Imaging-1.1.7
@@ -8307,38 +8282,38 @@ File: asymptote.info, Node: GUI usage, Prev: GUI installation, Up: GUI
==============
A wheel mouse is convenient for raising and lowering objects within
-`xasy', to expose the object to be moved. If a wheel mouse is not
-available, mouse `Button-2' can be used to repeatedly lower an object
-instead. When run from the command line, `xasy' accepts a command line
-option `-x n', which sets the initial magnification to `n'.
+'xasy', to expose the object to be moved. If a wheel mouse is not
+available, mouse 'Button-2' can be used to repeatedly lower an object
+instead. When run from the command line, 'xasy' accepts a command line
+option '-x n', which sets the initial magnification to 'n'.
Deconstruction of compound objects (such as arrows) can be prevented
by enclosing them within the commands
void begingroup(picture pic=currentpicture);
void endgroup(picture pic=currentpicture);
- By default, the elements of a picture or frame will be grouped
-together on adding them to a picture. However, the elements of a frame
+ By default, the elements of a picture or frame will be grouped
+together on adding them to a picture. However, the elements of a frame
added to another frame are not grouped together by default: their
elements will be individually deconstructed (*note add::).

File: asymptote.info, Node: PostScript to Asymptote, Next: Help, Prev: GUI, Up: Top
-12 `PostScript' to `Asymptote'
+12 'PostScript' to 'Asymptote'
******************************
-The excellent `PostScript' editor `pstoedit' (version 3.50 or later;
-available from `http://sourceforge.net/projects/pstoedit/') includes an
-`Asymptote' backend. Unlike virtually all other `pstoedit' backends,
-this driver includes native clipping, even-odd fill rule, `PostScript'
-subpath, and full image support. Here is an example: `asy -V
+The excellent 'PostScript' editor 'pstoedit' (version 3.50 or later;
+available from <http://sourceforge.net/projects/pstoedit/>) includes an
+'Asymptote' backend. Unlike virtually all other 'pstoedit' backends,
+this driver includes native clipping, even-odd fill rule, 'PostScript'
+subpath, and full image support. Here is an example: 'asy -V
/usr/local/share/doc/asymptote/examples/venn.asy'
pstoedit -f asy venn.eps test.asy
asy -V test
-If the line widths aren't quite correct, try giving `pstoedit' the
-`-dis' option. If the fonts aren't typeset correctly, try giving
-`pstoedit' the `-dt' option.
+If the line widths aren't quite correct, try giving 'pstoedit' the
+'-dis' option. If the fonts aren't typeset correctly, try giving
+'pstoedit' the '-dt' option.

File: asymptote.info, Node: Help, Next: Debugger, Prev: PostScript to Asymptote, Up: Top
@@ -8347,37 +8322,32 @@ File: asymptote.info, Node: Help, Next: Debugger, Prev: PostScript to Asympto
*******
A list of frequently asked questions (FAQ) is maintained at
-
- `http://asymptote.sourceforge.net/FAQ'
- Questions on installing and using `Asymptote' that are not addressed
-in the FAQ should be sent to the `Asymptote' forum:
-
- `http://sourceforge.net/p/asymptote/discussion/409349'
- Including an example that illustrates what you are trying to do will
-help you get useful feedback. `LaTeX' problems can often be diagnosed
-with the `-vv' or `-vvv' command-line options. Contributions in the
-form of patches or `Asymptote' modules can be posted here:
-
- `http://sourceforge.net/tracker/?atid=685685&group_id=120000'
- To receive announcements of upcoming releases, please subscribe to
-`Asymptote' at
-
- `http://freecode.com/projects/asy'
- If you find a bug in `Asymptote', please check (if possible) whether
-the bug is still present in the latest `Subversion' developmental code
-(*note Subversion::) before submitting a bug report. New bugs can be
+ <http://asymptote.sourceforge.net/FAQ>
+Questions on installing and using 'Asymptote' that are not addressed in
+the FAQ should be sent to the 'Asymptote' forum:
+ <http://sourceforge.net/p/asymptote/discussion/409349>
+Including an example that illustrates what you are trying to do will
+help you get useful feedback. 'LaTeX' problems can often be diagnosed
+with the '-vv' or '-vvv' command-line options. Contributions in the
+form of patches or 'Asymptote' modules can be posted here:
+ <http://sourceforge.net/tracker/?atid=685685&group_id=120000>
+To receive announcements of upcoming releases, please subscribe to
+'Asymptote' at
+ <http://freecode.com/projects/asy>
+If you find a bug in 'Asymptote', please check (if possible) whether the
+bug is still present in the latest 'Subversion' developmental code
+(*note Subversion::) before submitting a bug report. New bugs can be
submitted using the Bug Tracking System at
-
- `http://sourceforge.net/projects/asymptote'
- To see if the bug has already been fixed, check bugs with Status
-`Closed' and recent lines in
-
- `http://asymptote.sourceforge.net/ChangeLog'
- `Asymptote' can be configured with the optional GNU library
-`libsigsegv', available from `http://libsigsegv.sourceforge.net', which
-allows one to distinguish user-generated `Asymptote' stack overflows
+ <http://sourceforge.net/projects/asymptote>
+To see if the bug has already been fixed, check bugs with Status
+'Closed' and recent lines in
+ <http://asymptote.sourceforge.net/ChangeLog>
+
+ 'Asymptote' can be configured with the optional GNU library
+'libsigsegv', available from <http://libsigsegv.sourceforge.net>, which
+allows one to distinguish user-generated 'Asymptote' stack overflows
(*note stack overflow::) from true segmentation faults (due to internal
-C++ programming errors; please submit the `Asymptote' code that
+C++ programming errors; please submit the 'Asymptote' code that
generates such segmentation faults along with your bug report).

@@ -8387,63 +8357,61 @@ File: asymptote.info, Node: Debugger, Next: Credits, Prev: Help, Up: Top
***********
Asymptote now includes a line-based (as opposed to code-based) debugger
-that can assist the user in following flow control. To set a break
-point in file `file' at line `line', use the command
+that can assist the user in following flow control. To set a break
+point in file 'file' at line 'line', use the command
void stop(string file, int line, code s=quote{});
- The optional argument `s' may be used to conditionally set the variable
-`ignore' in `plain_debugger.asy' to `true'. For example, the first 10
-instances of this breakpoint will be ignored (the variable `int
-count=0' is defined in `plain_debugger.asy'):
+The optional argument 's' may be used to conditionally set the variable
+'ignore' in 'plain_debugger.asy' to 'true'. For example, the first 10
+instances of this breakpoint will be ignored (the variable 'int count=0'
+is defined in 'plain_debugger.asy'):
stop("test",2,quote{ignore=(++count <= 10);});
- To set a break point in file `file' at the first line containing the
-string `text', use
+ To set a break point in file 'file' at the first line containing the
+string 'text', use
void stop(string file, string text, code s=quote{});
- To list all breakpoints, use:
+To list all breakpoints, use:
void breakpoints();
- To clear a breakpoint, use:
+To clear a breakpoint, use:
void clear(string file, int line);
- To clear all breakpoints, use:
+To clear all breakpoints, use:
void clear();
The following commands may be entered at the debugging prompt:
-``h''
- help;
-
-``c''
+'h'
+ help;
+'c'
continue execution;
-``i''
+'i'
step to the next instruction;
-``s''
+'s'
step to the next executable line;
-``n''
+'n'
step to the next executable line in the current file;
-``f''
+'f'
step to the next file;
-``r''
+'r'
return to the file associated with the most recent breakpoint;
-``t''
- toggle tracing (`-vvvvv') mode;
+'t'
+ toggle tracing ('-vvvvv') mode;
-``q''
+'q'
quit debugging and end execution;
-``x''
+'x'
exit the debugger and run to completion.
- Arbitrary `Asymptote' code may also be entered at the debugging
-prompt; however, since the debugger is implemented with `eval',
-currently only top-level (global) variables can be displayed or
-modified.
+Arbitrary 'Asymptote' code may also be entered at the debugging prompt;
+however, since the debugger is implemented with 'eval', currently only
+top-level (global) variables can be displayed or modified.
The debugging prompt may be entered manually with the call
void breakpoint(code s=quote{});
@@ -8454,21 +8422,21 @@ File: asymptote.info, Node: Credits, Next: Index, Prev: Debugger, Up: Top
15 Acknowledgments
******************
-Financial support for the development of `Asymptote' was generously
+Financial support for the development of 'Asymptote' was generously
provided by the Natural Sciences and Engineering Research Council of
Canada, the Pacific Institute for Mathematical Sciences, and the
University of Alberta Faculty of Science.
We also would like to acknowledge the previous work of John D. Hobby,
-author of the program `MetaPost' that inspired the development of
-`Asymptote', and Donald E. Knuth, author of TeX and `MetaFont' (on
-which `MetaPost' is based).
+author of the program 'MetaPost' that inspired the development of
+'Asymptote', and Donald E. Knuth, author of TeX and 'MetaFont' (on which
+'MetaPost' is based).
- The authors of `Asymptote' are Andy Hammerlindl, John Bowman, and
-Tom Prince. Sean Healy designed the `Asymptote' logo. Other
-contributors include Michail Vidiassov, Radoslav Marinov, Orest Shardt,
-Chris Savage, Philippe Ivaldi, Olivier Guibe', Jacques Pienaar, Mark
-Henning, Steve Melenchuk, Martin Wiebusch, and Stefan Knorr.
+ The authors of 'Asymptote' are Andy Hammerlindl, John Bowman, and Tom
+Prince. Sean Healy designed the 'Asymptote' logo. Other contributors
+include Michail Vidiassov, Radoslav Marinov, Orest Shardt, Chris Savage,
+Philippe Ivaldi, Olivier Guibe', Jacques Pienaar, Mark Henning, Steve
+Melenchuk, Martin Wiebusch, and Stefan Knorr.

File: asymptote.info, Node: Index, Prev: Credits, Up: Top
@@ -8479,1515 +8447,1675 @@ Index
* Menu:
-* !: Arithmetic & logical.
- (line 68)
-* != <1>: Arithmetic & logical.
- (line 38)
-* !=: Structures. (line 63)
-* % <1>: Interactive mode. (line 17)
-* %: Arithmetic & logical.
- (line 23)
-* %=: Self & prefix operators.
- (line 6)
-* & <1>: Arithmetic & logical.
- (line 56)
-* &: Bezier curves. (line 86)
-* &&: Arithmetic & logical.
- (line 53)
-* * <1>: Arithmetic & logical.
- (line 17)
-* *: Pens. (line 15)
-* **: Arithmetic & logical.
- (line 31)
-* *=: Self & prefix operators.
- (line 6)
-* + <1>: Arithmetic & logical.
- (line 13)
-* +: Pens. (line 15)
-* ++: Self & prefix operators.
- (line 6)
-* +=: Self & prefix operators.
- (line 6)
-* -: Arithmetic & logical.
- (line 14)
-* -- <1>: Self & prefix operators.
- (line 6)
-* --: Tutorial. (line 127)
-* ---: Bezier curves. (line 86)
-* -=: Self & prefix operators.
- (line 6)
-* -c: Options. (line 180)
-* -l: Options. (line 199)
-* -u: Options. (line 190)
-* -V <1>: Tutorial. (line 19)
-* -V: Configuring. (line 6)
-* ..: Tutorial. (line 127)
-* .asy: Search paths. (line 14)
-* /: Arithmetic & logical.
- (line 20)
-* /=: Self & prefix operators.
- (line 6)
-* 2D graphs: graph. (line 6)
-* 3D graphs: graph3. (line 6)
-* 3D grids: grid3. (line 6)
-* 3D PostScript: three. (line 594)
-* :: Arithmetic & logical.
- (line 73)
-* ::: Bezier curves. (line 70)
-* <: Arithmetic & logical.
- (line 41)
-* <=: Arithmetic & logical.
- (line 44)
-* == <1>: Arithmetic & logical.
- (line 37)
-* ==: Structures. (line 63)
-* >: Arithmetic & logical.
- (line 50)
-* >=: Arithmetic & logical.
- (line 47)
-* ?: Arithmetic & logical.
- (line 73)
-* ^: Arithmetic & logical.
- (line 28)
-* ^=: Self & prefix operators.
- (line 6)
-* ^^: Tutorial. (line 134)
-* a4: Configuring. (line 61)
-* abort: Data types. (line 339)
-* abs <1>: Mathematical functions.
- (line 35)
-* abs: Data types. (line 62)
-* accel <1>: three. (line 520)
-* accel: Paths and guides. (line 117)
-* access: Import. (line 6)
-* acknowledgments: Credits. (line 6)
-* aCos: Mathematical functions.
- (line 20)
-* acos: Mathematical functions.
- (line 6)
-* acosh: Mathematical functions.
- (line 6)
-* add <1>: three. (line 284)
-* add: Frames and pictures. (line 196)
-* addViews: three. (line 406)
-* adjust: Pens. (line 115)
-* Ai: Mathematical functions.
- (line 48)
-* Ai_deriv: Mathematical functions.
- (line 48)
+* '!': Arithmetic & logical.
+ (line 52)
+* '!=': Structures. (line 62)
+* '!=' <1>: Arithmetic & logical.
+ (line 32)
+* '%': Arithmetic & logical.
+ (line 20)
+* '%' <1>: Interactive mode. (line 16)
+* '%=': Self & prefix operators.
+ (line 6)
+* '&': Bezier curves. (line 84)
+* '&' <1>: Arithmetic & logical.
+ (line 44)
+* '&&': Arithmetic & logical.
+ (line 42)
+* '*': Pens. (line 15)
+* '*' <1>: Arithmetic & logical.
+ (line 16)
+* '**': Arithmetic & logical.
+ (line 26)
+* '*=': Self & prefix operators.
+ (line 6)
+* '+': Pens. (line 15)
+* '+' <1>: Arithmetic & logical.
+ (line 13)
+* '++': Self & prefix operators.
+ (line 6)
+* '+=': Self & prefix operators.
+ (line 6)
+* '-': Arithmetic & logical.
+ (line 14)
+* '--': Tutorial. (line 123)
+* '--' <1>: Self & prefix operators.
+ (line 6)
+* '---': Bezier curves. (line 84)
+* '-=': Self & prefix operators.
+ (line 6)
+* '-c': Options. (line 183)
+* '-l': Options. (line 202)
+* '-u': Options. (line 193)
+* '-V': Configuring. (line 6)
+* '-V' <1>: Tutorial. (line 19)
+* '..': Tutorial. (line 123)
+* '.asy': Search paths. (line 12)
+* '/': Arithmetic & logical.
+ (line 18)
+* '/=': Self & prefix operators.
+ (line 6)
+* 2D graphs: graph. (line 6)
+* 3D graphs: graph3. (line 6)
+* 3D grids: grid3. (line 6)
+* 3D 'PostScript': three. (line 576)
+* ':': Arithmetic & logical.
+ (line 56)
+* '::': Bezier curves. (line 70)
+* '<': Arithmetic & logical.
+ (line 34)
+* '<=': Arithmetic & logical.
+ (line 36)
+* '==': Structures. (line 62)
+* '==' <1>: Arithmetic & logical.
+ (line 31)
+* '>': Arithmetic & logical.
+ (line 40)
+* '>=': Arithmetic & logical.
+ (line 38)
+* '?': Arithmetic & logical.
+ (line 56)
+* '^': Arithmetic & logical.
+ (line 24)
+* '^' <1>: Arithmetic & logical.
+ (line 50)
+* '^=': Self & prefix operators.
+ (line 6)
+* '^^': Tutorial. (line 130)
+* '|': Arithmetic & logical.
+ (line 48)
+* '||': Arithmetic & logical.
+ (line 46)
+* 'a4': Configuring. (line 59)
+* 'abort': Data types. (line 355)
+* 'abs': Data types. (line 64)
+* 'abs' <1>: Mathematical functions.
+ (line 35)
+* 'accel': Paths and guides. (line 126)
+* 'accel' <1>: Paths and guides. (line 132)
+* 'accel' <2>: three. (line 480)
+* 'access': Import. (line 6)
+* acknowledgments: Credits. (line 6)
+* 'acos': Mathematical functions.
+ (line 6)
+* 'aCos': Mathematical functions.
+ (line 20)
+* 'acosh': Mathematical functions.
+ (line 6)
+* 'add': Frames and pictures.
+ (line 212)
+* 'add' <1>: Frames and pictures.
+ (line 226)
+* 'add' <2>: three. (line 252)
+* 'addViews': three. (line 373)
+* 'adjust': Pens. (line 119)
+* 'Ai': Mathematical functions.
+ (line 48)
* Airy: Mathematical functions.
- (line 48)
-* alias <1>: Arrays. (line 181)
-* alias: Structures. (line 63)
-* align: Options. (line 174)
-* Align: label. (line 12)
-* all: Arrays. (line 329)
-* Allow: Pens. (line 327)
-* AND: Arithmetic & logical.
- (line 80)
-* and: Bezier curves. (line 56)
-* angle: Data types. (line 70)
-* animate <1>: animation. (line 12)
-* animate <2>: Files. (line 154)
-* animate: Configuring. (line 67)
-* animation: animation. (line 6)
-* annotate: annotate. (line 6)
-* antialias <1>: Options. (line 145)
-* antialias: three. (line 222)
-* append <1>: Arrays. (line 39)
-* append: Files. (line 36)
-* arc: three. (line 296)
-* Arc: Paths and guides. (line 32)
-* arc: Paths and guides. (line 22)
-* ArcArrow: draw. (line 26)
-* ArcArrow3: three. (line 561)
-* ArcArrows: draw. (line 26)
-* ArcArrows3: three. (line 561)
-* arclength <1>: three. (line 520)
-* arclength: Paths and guides. (line 144)
-* arcpoint: Paths and guides. (line 154)
-* arctime <1>: three. (line 520)
-* arctime: Paths and guides. (line 148)
-* arguments: Default arguments. (line 6)
+ (line 48)
+* 'Ai_deriv': Mathematical functions.
+ (line 48)
+* alias: Structures. (line 62)
+* 'alias': Arrays. (line 171)
+* 'Align': label. (line 12)
+* 'aligndir': Options. (line 175)
+* 'all': Arrays. (line 319)
+* 'Allow': Pens. (line 343)
+* 'and': Bezier curves. (line 56)
+* 'AND': Arithmetic & logical.
+ (line 63)
+* 'angle': Data types. (line 72)
+* 'animate': Configuring. (line 65)
+* 'animate' <1>: Files. (line 155)
+* 'animate' <2>: animation. (line 12)
+* 'animation': animation. (line 6)
+* animation: animation. (line 6)
+* 'annotate': annotate. (line 6)
+* 'antialias': three. (line 191)
+* 'antialias' <1>: Options. (line 146)
+* append: Files. (line 36)
+* 'append': Arrays. (line 39)
+* 'arc': Paths and guides. (line 24)
+* 'Arc': Paths and guides. (line 37)
+* 'arc' <1>: three. (line 263)
+* 'ArcArrow': draw. (line 26)
+* 'ArcArrow3': three. (line 543)
+* 'ArcArrows': draw. (line 26)
+* 'ArcArrows3': three. (line 543)
+* 'arclength': Paths and guides. (line 153)
+* 'arclength' <1>: three. (line 480)
+* 'arcpoint': Paths and guides. (line 163)
+* 'arctime': Paths and guides. (line 157)
+* 'arctime' <1>: three. (line 480)
+* arguments: Default arguments. (line 6)
* arithmetic operators: Arithmetic & logical.
- (line 6)
-* array: Arrays. (line 122)
-* array iteration: Programming. (line 33)
-* arrays: Arrays. (line 6)
-* arrow: label. (line 71)
-* Arrow: draw. (line 26)
-* arrow: Drawing commands. (line 31)
-* arrow keys: Tutorial. (line 37)
-* Arrow3: three. (line 561)
-* Arrows: draw. (line 26)
-* arrows: draw. (line 26)
-* Arrows3: three. (line 561)
-* as: Import. (line 68)
-* ascii: Data types. (line 286)
-* aSin: Mathematical functions.
- (line 20)
-* asin: Mathematical functions.
- (line 6)
-* asinh: Mathematical functions.
- (line 6)
-* Aspect: Frames and pictures. (line 54)
-* assert: Data types. (line 344)
-* assignment: Programming. (line 8)
-* asy <1>: Import. (line 102)
-* asy: Data types. (line 334)
-* asy-mode: Editing modes. (line 6)
-* asy.vim: Editing modes. (line 33)
-* asyinclude: LaTeX usage. (line 46)
-* asymptote.sty: LaTeX usage. (line 6)
-* asymptote.xml: Editing modes. (line 49)
-* ASYMPTOTE_CONFIG: Options. (line 116)
-* aTan: Mathematical functions.
- (line 20)
-* atan: Mathematical functions.
- (line 6)
-* atan2: Mathematical functions.
- (line 6)
-* atanh: Mathematical functions.
- (line 6)
-* atleast: Bezier curves. (line 56)
-* attach <1>: graph. (line 416)
-* attach <2>: LaTeX usage. (line 51)
-* attach: Frames and pictures. (line 252)
-* autoadjust: three. (line 372)
-* autoimport: Options. (line 112)
-* automatic scaling: graph. (line 682)
-* axialshade: fill. (line 43)
-* axis <1>: graph3. (line 67)
-* axis: graph. (line 879)
-* azimuth: Data types. (line 126)
-* babel: babel. (line 6)
-* background color: Frames and pictures. (line 168)
-* BackView: three. (line 399)
-* Bar: draw. (line 19)
-* Bar3: three. (line 561)
-* Bars: draw. (line 19)
-* Bars3: three. (line 561)
-* barsize: draw. (line 19)
-* base modules: Base modules. (line 6)
-* basealign: Pens. (line 168)
-* baseline: label. (line 91)
-* batch mode: Tutorial. (line 6)
-* beep: Data types. (line 357)
-* BeginArcArrow: draw. (line 26)
-* BeginArcArrow3: three. (line 561)
-* BeginArrow: draw. (line 26)
-* BeginArrow3: three. (line 561)
-* BeginBar: draw. (line 19)
-* BeginBar3: three. (line 561)
-* BeginDotMargin: draw. (line 42)
-* BeginDotMargin3: three. (line 577)
-* BeginMargin: draw. (line 42)
-* BeginMargin3: three. (line 577)
-* BeginPenMargin: draw. (line 42)
-* BeginPenMargin2: three. (line 577)
-* BeginPenMargin3: three. (line 577)
-* BeginPoint: label. (line 56)
+ (line 6)
+* 'array': Arrays. (line 112)
+* array iteration: Programming. (line 34)
+* arrays: Arrays. (line 6)
+* 'arrow': Drawing commands. (line 31)
+* 'Arrow': draw. (line 26)
+* 'arrow' <1>: label. (line 70)
+* arrow keys: Tutorial. (line 37)
+* 'Arrow3': three. (line 543)
+* arrows: draw. (line 26)
+* 'Arrows': draw. (line 26)
+* 'Arrows3': three. (line 543)
+* 'as': Import. (line 67)
+* 'ascii': Data types. (line 300)
+* 'ascii' <1>: Data types. (line 300)
+* 'asin': Mathematical functions.
+ (line 6)
+* 'aSin': Mathematical functions.
+ (line 20)
+* 'asinh': Mathematical functions.
+ (line 6)
+* 'Aspect': Frames and pictures.
+ (line 59)
+* 'assert': Data types. (line 360)
+* assignment: Programming. (line 8)
+* 'asy': Data types. (line 350)
+* 'asy' <1>: Import. (line 101)
+* 'asy-mode': Editing modes. (line 6)
+* 'asy.vim': Editing modes. (line 32)
+* 'asyinclude': LaTeX usage. (line 45)
+* 'asymptote.sty': LaTeX usage. (line 6)
+* 'asymptote.xml': Editing modes. (line 48)
+* 'ASYMPTOTE_CONFIG': Options. (line 117)
+* 'atan': Mathematical functions.
+ (line 6)
+* 'aTan': Mathematical functions.
+ (line 20)
+* 'atan2': Mathematical functions.
+ (line 6)
+* 'atanh': Mathematical functions.
+ (line 6)
+* 'atleast': Bezier curves. (line 56)
+* 'attach': Frames and pictures.
+ (line 271)
+* 'attach' <1>: LaTeX usage. (line 50)
+* 'attach' <2>: graph. (line 405)
+* 'autoadjust': three. (line 338)
+* 'autoimport': Options. (line 113)
+* automatic scaling: graph. (line 689)
+* automatic scaling <1>: graph. (line 689)
+* 'axialshade': fill. (line 43)
+* 'axis': graph. (line 904)
+* 'axis' <1>: graph. (line 987)
+* 'axis' <2>: graph3. (line 66)
+* 'axis' <3>: graph3. (line 82)
+* 'azimuth': Data types. (line 152)
+* 'babel': babel. (line 6)
+* background color: Frames and pictures.
+ (line 180)
+* 'BackView': three. (line 366)
+* 'Bar': draw. (line 19)
+* 'Bar3': three. (line 543)
+* 'Bars': draw. (line 19)
+* 'Bars3': three. (line 543)
+* 'barsize': draw. (line 19)
+* base modules: Base modules. (line 6)
+* 'basealign': Pens. (line 177)
+* 'baseline': label. (line 90)
+* batch mode: Tutorial. (line 5)
+* 'beep': Data types. (line 373)
+* 'BeginArcArrow': draw. (line 26)
+* 'BeginArcArrow3': three. (line 543)
+* 'BeginArrow': draw. (line 26)
+* 'BeginArrow3': three. (line 543)
+* 'BeginBar': draw. (line 19)
+* 'BeginBar3': three. (line 543)
+* 'BeginDotMargin': draw. (line 42)
+* 'BeginDotMargin3': three. (line 559)
+* 'BeginMargin': draw. (line 42)
+* 'BeginMargin3': three. (line 559)
+* 'BeginPenMargin': draw. (line 42)
+* 'BeginPenMargin2': three. (line 559)
+* 'BeginPenMargin3': three. (line 559)
+* 'BeginPoint': label. (line 55)
* Bessel: Mathematical functions.
- (line 48)
-* bevel: flowchart. (line 75)
-* beveljoin: Pens. (line 138)
-* Bezier curves: Bezier curves. (line 6)
-* bezulate: three. (line 104)
-* Bi: Mathematical functions.
- (line 48)
-* Bi_deriv: Mathematical functions.
- (line 48)
-* Billboard: three. (line 490)
-* binary: Files. (line 75)
-* binary format: Files. (line 75)
+ (line 48)
+* 'bevel': flowchart. (line 72)
+* 'beveljoin': Pens. (line 145)
+* Bezier curves: Bezier curves. (line 6)
+* 'bezulate': three. (line 102)
+* 'Bi': Mathematical functions.
+ (line 48)
+* 'Billboard': three. (line 450)
+* 'binary': Files. (line 76)
+* binary format: Files. (line 76)
* binary operators: Arithmetic & logical.
- (line 6)
-* binarytree: binarytree. (line 6)
-* black stripes: three. (line 222)
-* Blank: draw. (line 26)
-* block.bottom: flowchart. (line 19)
-* block.bottomleft: flowchart. (line 19)
-* block.bottomright: flowchart. (line 19)
-* block.center: flowchart. (line 26)
-* block.draw: flowchart. (line 31)
-* block.left: flowchart. (line 19)
-* block.position: flowchart. (line 24)
-* block.right: flowchart. (line 19)
-* block.top: flowchart. (line 19)
-* block.topleft: flowchart. (line 19)
-* block.topright: flowchart. (line 19)
-* bool: Data types. (line 14)
-* bool3: Data types. (line 23)
+ (line 6)
+* 'binarytree': binarytree. (line 6)
+* 'Bi_deriv': Mathematical functions.
+ (line 48)
+* 'black stripes': three. (line 191)
+* 'Blank': draw. (line 26)
+* 'block.bottom': flowchart. (line 19)
+* 'block.bottomleft': flowchart. (line 19)
+* 'block.bottomright': flowchart. (line 19)
+* 'block.center': flowchart. (line 24)
+* 'block.draw': flowchart. (line 29)
+* 'block.left': flowchart. (line 19)
+* 'block.position': flowchart. (line 23)
+* 'block.right': flowchart. (line 19)
+* 'block.top': flowchart. (line 19)
+* 'block.topleft': flowchart. (line 19)
+* 'block.topright': flowchart. (line 19)
+* 'bool': Data types. (line 14)
+* 'bool3': Data types. (line 25)
* boolean operators: Arithmetic & logical.
- (line 6)
-* Bottom: graph. (line 134)
-* BottomTop: graph. (line 140)
-* BottomView: three. (line 399)
-* bounding box: Frames and pictures. (line 168)
-* Bounds: graph3. (line 21)
-* box <1>: three. (line 318)
-* box: Frames and pictures. (line 22)
-* bp: Tutorial. (line 26)
-* brace: Paths and guides. (line 44)
-* break: Programming. (line 29)
-* breakpoints: Debugger. (line 21)
-* brick: Pens. (line 251)
-* broken axis: graph. (line 782)
-* bug reports: Help. (line 23)
-* buildcycle: Paths and guides. (line 260)
-* Button-1: GUI. (line 6)
-* Button-2: GUI. (line 6)
-* BWRainbow: palette. (line 15)
-* BWRainbow2: palette. (line 18)
-* C string: Data types. (line 191)
-* CAD: CAD. (line 6)
-* calculateTransform: Frames and pictures. (line 107)
-* camera: three. (line 367)
-* casts: Casts. (line 6)
-* cbrt: Mathematical functions.
- (line 6)
-* cd: Files. (line 25)
-* ceil: Mathematical functions.
- (line 26)
-* center: three. (line 351)
-* Center: label. (line 61)
-* checker: Pens. (line 251)
-* Chinese: unicode. (line 12)
-* choose: Mathematical functions.
- (line 39)
-* Ci: Mathematical functions.
- (line 48)
-* circle <1>: flowchart. (line 64)
-* circle: three. (line 292)
-* Circle: Paths and guides. (line 17)
-* circle: Paths and guides. (line 10)
-* circlebarframe: markers. (line 18)
-* CJK: unicode. (line 12)
-* clamped: graph. (line 37)
-* clear <1>: Debugger. (line 23)
-* clear: Files. (line 92)
-* clip: fill. (line 115)
-* CLZ: Arithmetic & logical.
- (line 80)
-* cm: Tutorial. (line 63)
-* cmd: Configuring. (line 34)
-* cmyk: Pens. (line 34)
-* colatitude: Data types. (line 131)
-* color: Pens. (line 23)
-* coloredNodes: tube. (line 25)
-* coloredpath: tube. (line 18)
-* coloredSegments: tube. (line 25)
-* colorless: Pens. (line 54)
-* colors: Pens. (line 51)
-* comma: Files. (line 61)
-* comma-separated-value mode: Arrays. (line 362)
-* command-line options <1>: Options. (line 6)
-* command-line options: Configuring. (line 85)
-* comment character: Files. (line 16)
-* compass directions: Tutorial. (line 106)
+ (line 6)
+* 'Bottom': graph. (line 131)
+* 'BottomTop': graph. (line 137)
+* 'BottomView': three. (line 366)
+* bounding box: Frames and pictures.
+ (line 180)
+* 'Bounds': graph3. (line 21)
+* 'box': Frames and pictures.
+ (line 25)
+* 'box' <1>: Frames and pictures.
+ (line 130)
+* 'box' <2>: three. (line 285)
+* 'box' <3>: three. (line 287)
+* 'bp': Tutorial. (line 26)
+* 'brace': Paths and guides. (line 51)
+* 'break': Programming. (line 30)
+* 'breakpoints': Debugger. (line 21)
+* brick: Pens. (line 265)
+* broken axis: graph. (line 800)
+* bug reports: Help. (line 19)
+* 'buildcycle': Paths and guides. (line 270)
+* 'Button-1': GUI. (line 6)
+* 'Button-2': GUI. (line 6)
+* 'BWRainbow': palette. (line 15)
+* 'BWRainbow2': palette. (line 18)
+* 'C' string: Data types. (line 215)
+* 'CAD': CAD. (line 6)
+* 'calculateTransform': Frames and pictures.
+ (line 118)
+* 'camera': three. (line 332)
+* casts: Casts. (line 6)
+* 'cbrt': Mathematical functions.
+ (line 6)
+* 'cd': Files. (line 25)
+* 'ceil': Mathematical functions.
+ (line 26)
+* 'Center': label. (line 60)
+* 'center': three. (line 315)
+* checker: Pens. (line 265)
+* Chinese: unicode. (line 12)
+* 'choose': Mathematical functions.
+ (line 39)
+* 'Ci': Mathematical functions.
+ (line 48)
+* 'circle': Paths and guides. (line 10)
+* 'Circle': Paths and guides. (line 18)
+* 'circle' <1>: three. (line 259)
+* 'circle' <2>: flowchart. (line 61)
+* 'circlebarframe': markers. (line 18)
+* CJK: unicode. (line 12)
+* 'clamped': graph. (line 36)
+* 'clear': Files. (line 93)
+* 'clear' <1>: Debugger. (line 23)
+* 'clip': fill. (line 114)
+* 'CLZ': Arithmetic & logical.
+ (line 63)
+* 'cm': Tutorial. (line 63)
+* 'cmd': Configuring. (line 32)
+* 'cmyk': Pens. (line 34)
+* 'colatitude': Data types. (line 157)
+* color: Pens. (line 23)
+* 'coloredNodes': tube. (line 25)
+* 'coloredpath': tube. (line 18)
+* 'coloredSegments': tube. (line 25)
+* 'colorless': Pens. (line 53)
+* 'colors': Pens. (line 50)
+* 'comma': Files. (line 61)
+* comma-separated-value mode: Arrays. (line 351)
+* command-line options: Configuring. (line 84)
+* command-line options <1>: Options. (line 6)
+* comment character: Files. (line 16)
+* compass directions: Tutorial. (line 103)
* Compiling from UNIX source: Compiling from UNIX source.
- (line 6)
-* complement: Arrays. (line 150)
-* concat: Arrays. (line 177)
+ (line 6)
+* 'complement': Arrays. (line 140)
+* 'concat': Arrays. (line 167)
+* conditional: Programming. (line 8)
* conditional <1>: Arithmetic & logical.
- (line 73)
-* conditional: Programming. (line 8)
-* config <1>: Options. (line 116)
-* config: Configuring. (line 67)
-* configuration file <1>: Options. (line 116)
-* configuration file: Configuring. (line 23)
-* configuring: Configuring. (line 6)
-* conj: Data types. (line 59)
-* constructors: Structures. (line 91)
-* context: Options. (line 145)
-* continue <1>: Debugger. (line 31)
-* continue: Programming. (line 29)
-* contour: contour. (line 9)
-* contour3: contour3. (line 6)
-* controls <1>: three. (line 6)
-* controls: Bezier curves. (line 45)
-* controlSpecifier: Paths and guides. (line 393)
-* convert <1>: Options. (line 145)
-* convert <2>: animation. (line 6)
-* convert <3>: Files. (line 154)
-* convert: Configuring. (line 67)
-* convertOptions: Options. (line 131)
-* Coons shading: fill. (line 78)
-* copy: Arrays. (line 174)
-* Cos: Mathematical functions.
- (line 20)
-* cos: Mathematical functions.
- (line 6)
-* cosh: Mathematical functions.
- (line 6)
-* cputime: Structures. (line 169)
-* crop: graph. (line 637)
-* cropping graphs: graph. (line 637)
-* cross <1>: graph. (line 485)
-* cross: Data types. (line 169)
-* crossframe: markers. (line 23)
-* crosshatch: Pens. (line 267)
-* csv: Arrays. (line 362)
-* CTZ: Arithmetic & logical.
- (line 80)
-* cubicroots: Arrays. (line 318)
-* curl <1>: three. (line 6)
-* curl: Bezier curves. (line 66)
-* curlSpecifier: Paths and guides. (line 405)
-* currentpen: Pens. (line 6)
-* currentprojection: three. (line 396)
-* curve: slopefield. (line 20)
-* custom axis types: graph. (line 144)
-* custom mark routine: graph. (line 577)
-* custom tick locations: graph. (line 249)
-* cut: Paths and guides. (line 242)
-* cycle <1>: three. (line 6)
-* cycle: Tutorial. (line 75)
-* cyclic <1>: three. (line 520)
-* cyclic <2>: Arrays. (line 39)
-* cyclic: Paths and guides. (line 76)
-* Cyrillic: unicode. (line 7)
-* dashdotted: Pens. (line 95)
-* dashed: Pens. (line 95)
-* data types: Data types. (line 6)
-* date: Data types. (line 298)
+ (line 56)
+* 'config': Configuring. (line 65)
+* 'config' <1>: Options. (line 117)
+* configuration file: Configuring. (line 22)
+* configuration file <1>: Options. (line 117)
+* configuring: Configuring. (line 6)
+* 'conj': Data types. (line 61)
+* constructors: Structures. (line 91)
+* 'context': Options. (line 146)
+* 'continue': Programming. (line 30)
+* 'continue' <1>: Debugger. (line 31)
+* 'contour': contour. (line 6)
+* 'contour3': contour3. (line 6)
+* 'controls': Bezier curves. (line 45)
+* 'controls' <1>: three. (line 6)
+* 'controlSpecifier': Paths and guides. (line 396)
+* 'convert': Configuring. (line 65)
+* 'convert' <1>: Files. (line 155)
+* 'convert' <2>: animation. (line 6)
+* 'convert' <3>: Options. (line 146)
+* 'convertOptions': Options. (line 132)
+* Coons shading: fill. (line 77)
+* 'copy': Arrays. (line 164)
+* 'cos': Mathematical functions.
+ (line 6)
+* 'Cos': Mathematical functions.
+ (line 20)
+* 'cosh': Mathematical functions.
+ (line 6)
+* 'cputime': Structures. (line 169)
+* 'crop': graph. (line 638)
+* cropping graphs: graph. (line 638)
+* 'cross': Data types. (line 105)
+* 'cross' <1>: Data types. (line 195)
+* 'cross' <2>: graph. (line 479)
+* 'crossframe': markers. (line 22)
+* crosshatch: Pens. (line 282)
+* 'csv': Arrays. (line 351)
+* 'CTZ': Arithmetic & logical.
+ (line 63)
+* 'cubicroots': Arrays. (line 308)
+* 'curl': Bezier curves. (line 66)
+* 'curl' <1>: three. (line 6)
+* 'curlSpecifier': Paths and guides. (line 408)
+* 'currentpen': Pens. (line 6)
+* 'currentprojection': three. (line 363)
+* 'curve': slopefield. (line 20)
+* custom axis types: graph. (line 140)
+* custom mark routine: graph. (line 576)
+* custom tick locations: graph. (line 232)
+* 'cut': Paths and guides. (line 251)
+* 'cycle': Tutorial. (line 74)
+* 'cycle' <1>: Tutorial. (line 123)
+* 'cycle' <2>: three. (line 6)
+* 'cyclic': Paths and guides. (line 85)
+* 'cyclic' <1>: Paths and guides. (line 376)
+* 'cyclic' <2>: Arrays. (line 39)
+* 'cyclic' <3>: three. (line 480)
+* Cyrillic: unicode. (line 7)
+* 'dashdotted': Pens. (line 98)
+* 'dashed': Pens. (line 98)
+* data types: Data types. (line 6)
+* 'date': Data types. (line 312)
* Debian: UNIX binary distributions.
- (line 19)
-* debugger: Debugger. (line 6)
-* declaration: Programming. (line 8)
-* deconstruct: GUI usage. (line 6)
-* default arguments: Default arguments. (line 6)
-* defaultformat: graph. (line 175)
-* DefaultHead: draw. (line 26)
-* DefaultHead3: three. (line 561)
-* defaultpen: Pens. (line 46)
-* defaultrender: three. (line 47)
-* deferred drawing: simplex. (line 6)
-* Degrees: Mathematical functions.
- (line 17)
-* degrees <1>: Mathematical functions.
- (line 17)
-* degrees: Data types. (line 75)
-* delete <1>: Arrays. (line 39)
-* delete: Files. (line 149)
-* description: Description. (line 6)
-* diagonal: Arrays. (line 303)
-* diamond: flowchart. (line 57)
-* dimension: Arrays. (line 367)
-* dir <1>: three. (line 520)
-* dir <2>: Paths and guides. (line 100)
-* dir <3>: Data types. (line 87)
-* dir: Search paths. (line 10)
-* direction specifier: Bezier curves. (line 6)
-* directory: Files. (line 25)
-* dirSpecifier: Paths and guides. (line 387)
-* dirtime: Paths and guides. (line 157)
-* display: Configuring. (line 67)
-* do: Programming. (line 29)
-* DOSendl: Files. (line 61)
-* DOSnewl: Files. (line 61)
-* dot <1>: Arrays. (line 259)
-* dot <2>: Data types. (line 100)
-* dot: draw. (line 83)
-* DotMargin: draw. (line 42)
-* DotMargin3: three. (line 577)
-* DotMargins: draw. (line 42)
-* DotMargins3: three. (line 577)
-* dotted: Pens. (line 95)
-* double deferred drawing: three. (line 269)
-* double precision: Files. (line 75)
-* draw: three. (line 112)
-* Draw: Frames and pictures. (line 147)
-* draw: draw. (line 110)
-* Draw: draw. (line 26)
-* draw: Drawing commands. (line 31)
-* drawing commands: Drawing commands. (line 6)
-* drawline: math. (line 9)
-* drawtree: drawtree. (line 9)
-* dvips: Configuring. (line 67)
-* dvipsOptions: Options. (line 131)
-* dvisvgm <1>: Options. (line 150)
-* dvisvgm: Configuring. (line 67)
-* dvisvgmOptions: Options. (line 131)
-* E <1>: Mathematical functions.
- (line 48)
-* E: Tutorial. (line 106)
-* Editing modes: Editing modes. (line 6)
-* Ei: Mathematical functions.
- (line 48)
-* ellipse <1>: Frames and pictures. (line 22)
-* ellipse: Paths and guides. (line 39)
+ (line 19)
+* debugger: Debugger. (line 6)
+* declaration: Programming. (line 8)
+* 'deconstruct': GUI usage. (line 6)
+* default arguments: Default arguments. (line 6)
+* 'defaultformat': graph. (line 174)
+* 'DefaultHead': draw. (line 26)
+* 'DefaultHead3': three. (line 543)
+* 'defaultpen': Pens. (line 45)
+* 'defaultpen' <1>: Pens. (line 118)
+* 'defaultpen' <2>: Pens. (line 123)
+* 'defaultpen' <3>: Pens. (line 135)
+* 'defaultpen' <4>: Pens. (line 188)
+* 'defaultpen' <5>: Pens. (line 343)
+* 'defaultpen' <6>: Pens. (line 367)
+* 'defaultrender': three. (line 46)
+* 'deferred drawing': simplex. (line 6)
+* 'degrees': Data types. (line 77)
+* 'degrees' <1>: Mathematical functions.
+ (line 17)
+* 'Degrees': Mathematical functions.
+ (line 17)
+* 'delete': Files. (line 150)
+* 'delete' <1>: Arrays. (line 39)
+* description: Description. (line 6)
+* 'diagonal': Arrays. (line 293)
+* 'diamond': flowchart. (line 54)
+* 'dimension': Arrays. (line 356)
+* 'dir': Search paths. (line 9)
+* 'dir' <1>: Data types. (line 89)
+* 'dir' <2>: Data types. (line 179)
+* 'dir' <3>: Paths and guides. (line 109)
+* 'dir' <4>: three. (line 480)
+* direction specifier: Bezier curves. (line 6)
+* directory: Files. (line 25)
+* 'dirSpecifier': Paths and guides. (line 390)
+* 'dirtime': Paths and guides. (line 166)
+* 'display': Configuring. (line 65)
+* 'do': Programming. (line 30)
+* 'DOSendl': Files. (line 61)
+* 'DOSnewl': Files. (line 61)
+* 'dot': draw. (line 82)
+* 'dot' <1>: Data types. (line 102)
+* 'dot' <2>: Data types. (line 192)
+* 'dot' <3>: Arrays. (line 248)
+* 'dot' <4>: Arrays. (line 251)
+* 'DotMargin': draw. (line 42)
+* 'DotMargin3': three. (line 559)
+* 'DotMargins': draw. (line 42)
+* 'DotMargins3': three. (line 559)
+* 'dotted': Pens. (line 98)
+* 'double deferred drawing': three. (line 237)
+* double precision: Files. (line 76)
+* 'draw': Drawing commands. (line 31)
+* 'Draw': draw. (line 26)
+* 'draw' <1>: draw. (line 109)
+* 'Draw' <1>: Frames and pictures.
+ (line 160)
+* 'draw' <2>: three. (line 110)
+* drawing commands: Drawing commands. (line 6)
+* 'drawline': math. (line 9)
+* 'drawtree': drawtree. (line 6)
+* 'dvips': Configuring. (line 65)
+* 'dvipsOptions': Options. (line 132)
+* 'dvisvgm': Configuring. (line 65)
+* 'dvisvgm' <1>: Options. (line 151)
+* 'dvisvgmOptions': Options. (line 132)
+* 'E': Tutorial. (line 103)
+* 'E' <1>: Mathematical functions.
+ (line 48)
+* Editing modes: Editing modes. (line 6)
+* 'Ei': Mathematical functions.
+ (line 48)
+* 'ellipse': Paths and guides. (line 45)
+* 'ellipse' <1>: Frames and pictures.
+ (line 25)
* elliptic functions: Mathematical functions.
- (line 48)
-* else: Programming. (line 8)
-* emacs: Editing modes. (line 6)
-* embed: embed. (line 6)
-* Embedded: three. (line 490)
-* empty: Frames and pictures. (line 7)
-* EndArcArrow: draw. (line 26)
-* EndArcArrow3: three. (line 561)
-* EndArrow: draw. (line 26)
-* EndArrow3: three. (line 561)
-* EndBar: draw. (line 19)
-* EndBar3: three. (line 561)
-* EndDotMargin: draw. (line 42)
-* EndDotMargin3: three. (line 577)
-* endl: Files. (line 61)
-* EndMargin: draw. (line 42)
-* EndMargin3: three. (line 577)
-* EndPenMargin: draw. (line 42)
-* EndPenMargin2: three. (line 577)
-* EndPenMargin3: three. (line 577)
-* EndPoint: label. (line 56)
-* envelope: Frames and pictures. (line 22)
-* environment variables: Configuring. (line 89)
-* eof <1>: Arrays. (line 344)
-* eof: Files. (line 92)
-* eol <1>: Arrays. (line 344)
-* eol: Files. (line 92)
-* EPS <1>: Options. (line 145)
-* EPS: label. (line 79)
-* erase <1>: Frames and pictures. (line 7)
-* erase <2>: Data types. (line 241)
-* erase: Tutorial. (line 37)
-* erf: Mathematical functions.
- (line 6)
-* erfc: Mathematical functions.
- (line 6)
-* error: Files. (line 16)
-* error bars: graph. (line 533)
-* errorbars: graph. (line 485)
-* eval: Import. (line 98)
-* evenodd <1>: Pens. (line 152)
-* evenodd: Tutorial. (line 148)
-* exit <1>: Debugger. (line 57)
-* exit <2>: Interactive mode. (line 59)
-* exit: Data types. (line 348)
-* exp: Mathematical functions.
- (line 6)
-* expi: Data types. (line 83)
-* explicit: Casts. (line 6)
-* explicit casts: Casts. (line 21)
-* expm1: Mathematical functions.
- (line 6)
+ (line 48)
+* 'else': Programming. (line 8)
+* 'emacs': Editing modes. (line 6)
+* 'embed': embed. (line 6)
+* 'Embedded': three. (line 450)
+* 'empty': Frames and pictures.
+ (line 7)
+* 'EndArcArrow': draw. (line 26)
+* 'EndArcArrow3': three. (line 543)
+* 'EndArrow': draw. (line 26)
+* 'EndArrow3': three. (line 543)
+* 'EndBar': draw. (line 19)
+* 'EndBar3': three. (line 543)
+* 'EndDotMargin': draw. (line 42)
+* 'EndDotMargin3': three. (line 559)
+* 'endl': Files. (line 61)
+* 'EndMargin': draw. (line 42)
+* 'EndMargin3': three. (line 559)
+* 'EndPenMargin': draw. (line 42)
+* 'EndPenMargin2': three. (line 559)
+* 'EndPenMargin3': three. (line 559)
+* 'EndPoint': label. (line 55)
+* 'envelope': Frames and pictures.
+ (line 25)
+* environment variables: Configuring. (line 88)
+* 'eof': Files. (line 93)
+* 'eof' <1>: Arrays. (line 333)
+* 'eol': Files. (line 93)
+* 'eol' <1>: Arrays. (line 333)
+* EPS: label. (line 78)
+* 'EPS': Options. (line 146)
+* erase: Tutorial. (line 37)
+* 'erase': Data types. (line 255)
+* 'erase' <1>: Frames and pictures.
+ (line 7)
+* 'erase' <2>: Frames and pictures.
+ (line 279)
+* 'erf': Mathematical functions.
+ (line 6)
+* 'erfc': Mathematical functions.
+ (line 6)
+* 'error': Files. (line 16)
+* 'error' <1>: Files. (line 93)
+* error bars: graph. (line 530)
+* 'errorbars': graph. (line 479)
+* 'eval': Import. (line 97)
+* 'eval' <1>: Import. (line 107)
+* evenodd: Tutorial. (line 144)
+* 'evenodd': Pens. (line 160)
+* 'exit': Data types. (line 364)
+* 'exit' <1>: Interactive mode. (line 54)
+* 'exit' <2>: Debugger. (line 56)
+* 'exp': Mathematical functions.
+ (line 6)
+* 'expi': Data types. (line 85)
+* 'expi' <1>: Data types. (line 175)
+* 'explicit': Casts. (line 6)
+* explicit casts: Casts. (line 21)
+* 'expm1': Mathematical functions.
+ (line 6)
* exponential integral: Mathematical functions.
- (line 48)
-* extendcap: Pens. (line 129)
-* extension <1>: MetaPost. (line 10)
-* extension: Paths and guides. (line 237)
-* external: embed. (line 12)
-* extrude: three. (line 514)
-* F: Mathematical functions.
- (line 48)
-* fabs: Mathematical functions.
- (line 6)
-* face: three. (line 602)
-* factorial: Mathematical functions.
- (line 39)
+ (line 48)
+* 'extendcap': Pens. (line 135)
+* 'extension': Paths and guides. (line 246)
+* 'extension' <1>: MetaPost. (line 10)
+* 'external': embed. (line 11)
+* 'extrude': three. (line 474)
+* 'F': Mathematical functions.
+ (line 48)
+* 'fabs': Mathematical functions.
+ (line 6)
+* 'face': three. (line 584)
+* 'factorial': Mathematical functions.
+ (line 39)
* Fedora: UNIX binary distributions.
- (line 15)
-* feynman: feynman. (line 6)
-* fft <1>: math. (line 26)
-* fft: Arrays. (line 246)
-* FFTW: Compiling from UNIX source.
- (line 58)
-* file <1>: Debugger. (line 45)
-* file: Files. (line 6)
-* Fill: Frames and pictures. (line 133)
-* fill <1>: fill. (line 17)
-* fill: draw. (line 116)
-* Fill: draw. (line 26)
-* FillDraw: Frames and pictures. (line 123)
-* filldraw: fill. (line 11)
-* FillDraw: draw. (line 26)
-* filloutside: fill. (line 27)
-* fillrule: Pens. (line 152)
-* find <1>: Arrays. (line 159)
-* find: Data types. (line 226)
-* firstcut: Paths and guides. (line 252)
-* fit: Frames and pictures. (line 103)
-* fit3: three. (line 282)
-* fixedscaling: Frames and pictures. (line 74)
-* floor: Mathematical functions.
- (line 26)
-* flowchart: flowchart. (line 6)
-* flush: Files. (line 61)
-* fmod: Mathematical functions.
- (line 6)
-* font: Pens. (line 192)
-* font command: Pens. (line 192)
-* fontcommand: Pens. (line 207)
-* fontsize: Pens. (line 178)
-* for: Programming. (line 8)
-* format <1>: Options. (line 145)
-* format: Data types. (line 269)
-* forum: Help. (line 6)
-* frame: Frames and pictures. (line 7)
-* from: Import. (line 17)
-* FrontView: three. (line 399)
-* function declarations: Functions. (line 67)
-* function shading: fill. (line 100)
-* Function shading: fill. (line 100)
+ (line 15)
+* 'feynman': feynman. (line 6)
+* 'fft': Arrays. (line 234)
+* 'fft' <1>: math. (line 26)
+* 'FFTW': Compiling from UNIX source.
+ (line 57)
+* 'file': Files. (line 6)
+* 'file' <1>: Debugger. (line 44)
+* 'Fill': draw. (line 26)
+* 'fill': draw. (line 114)
+* 'fill' <1>: fill. (line 17)
+* 'Fill' <1>: Frames and pictures.
+ (line 146)
+* 'FillDraw': draw. (line 26)
+* 'filldraw': fill. (line 11)
+* 'FillDraw' <1>: Frames and pictures.
+ (line 136)
+* 'filloutside': fill. (line 27)
+* 'fillrule': Pens. (line 160)
+* 'find': Data types. (line 240)
+* 'find' <1>: Arrays. (line 149)
+* 'firstcut': Paths and guides. (line 262)
+* 'fit': Frames and pictures.
+ (line 113)
+* 'fit3': three. (line 250)
+* 'fixedscaling': Frames and pictures.
+ (line 81)
+* 'floor': Mathematical functions.
+ (line 26)
+* 'flowchart': flowchart. (line 6)
+* 'flush': Files. (line 61)
+* 'flush' <1>: Files. (line 93)
+* 'fmod': Mathematical functions.
+ (line 6)
+* 'font': Pens. (line 202)
+* 'font command': Pens. (line 202)
+* 'fontcommand': Pens. (line 217)
+* 'fontsize': Pens. (line 188)
+* 'for': Programming. (line 8)
+* 'format': Data types. (line 283)
+* 'format' <1>: Options. (line 146)
+* forum: Help. (line 6)
+* 'frame': Frames and pictures.
+ (line 7)
+* 'from': Import. (line 16)
+* 'FrontView': three. (line 366)
+* function declarations: Functions. (line 72)
+* Function shading: fill. (line 99)
+* function shading: fill. (line 99)
+* functions: Functions. (line 6)
* functions <1>: Mathematical functions.
- (line 6)
-* functions: Functions. (line 6)
-* functionshade: fill. (line 100)
-* gamma: Mathematical functions.
- (line 6)
-* Gaussrand: Mathematical functions.
- (line 39)
-* geometry: geometry. (line 6)
-* getc: Files. (line 30)
-* getpair: Files. (line 117)
-* getreal: Files. (line 117)
-* getstring: Files. (line 117)
-* gettriple: Files. (line 117)
-* glOptions <1>: Options. (line 131)
-* glOptions: three. (line 222)
+ (line 6)
+* 'functionshade': fill. (line 99)
+* 'gamma': Mathematical functions.
+ (line 6)
+* 'Gaussrand': Mathematical functions.
+ (line 39)
+* 'geometry': geometry. (line 6)
+* 'getc': Files. (line 30)
+* 'getpair': Files. (line 118)
+* 'getreal': Files. (line 118)
+* 'getstring': Files. (line 118)
+* 'gettriple': Files. (line 118)
+* 'glOptions': three. (line 191)
+* 'glOptions' <1>: Options. (line 132)
* GNU Scientific Library: Mathematical functions.
- (line 48)
-* gouraudshade: fill. (line 62)
-* Gradient: palette. (line 25)
-* gradient shading: fill. (line 32)
-* graph: graph. (line 6)
-* graph3: graph3. (line 6)
-* graphic: label. (line 79)
-* graphical user interface: GUI. (line 6)
-* gray: Pens. (line 25)
-* Grayscale: palette. (line 9)
-* grayscale: Pens. (line 25)
-* grid <1>: graph. (line 733)
-* grid: Pens. (line 251)
-* grid3: grid3. (line 6)
-* gs: Configuring. (line 6)
-* gsl: Mathematical functions.
- (line 48)
-* GSL: Compiling from UNIX source.
- (line 58)
-* gsOptions: Options. (line 131)
-* GUI: GUI. (line 6)
-* GUI installation: GUI installation. (line 6)
-* GUI usage: GUI usage. (line 6)
-* guide: Paths and guides. (line 314)
-* guide3: three. (line 6)
-* hatch: Pens. (line 267)
-* height: LaTeX usage. (line 51)
-* help <1>: Debugger. (line 30)
-* help <2>: Help. (line 6)
-* help: Interactive mode. (line 44)
-* Hermite: graph. (line 37)
-* Hermite(splinetype splinetype: graph. (line 37)
-* hex <1>: Pens. (line 60)
-* hex: Data types. (line 283)
-* hexidecimal <1>: Pens. (line 59)
-* hexidecimal: Data types. (line 283)
-* hidden surface removal: three. (line 602)
-* histogram: Mathematical functions.
- (line 39)
-* history <1>: Interactive mode. (line 59)
-* history: Files. (line 142)
-* historylines: Interactive mode. (line 64)
-* HookHead: draw. (line 26)
-* HookHead3: three. (line 561)
-* Horizontal: flowchart. (line 81)
-* hyperrefOptions: Options. (line 131)
-* hypot: Mathematical functions.
- (line 6)
-* I: Mathematical functions.
- (line 48)
-* i_scaled: Mathematical functions.
- (line 48)
-* iconic: three. (line 222)
-* identity <1>: Arrays. (line 300)
-* identity <2>: Mathematical functions.
- (line 6)
-* identity: Transforms. (line 24)
-* identity4: three. (line 450)
-* if: Programming. (line 8)
-* IgnoreAspect: Frames and pictures. (line 58)
-* image: palette. (line 34)
-* ImageMagick <1>: Options. (line 145)
-* ImageMagick <2>: animation. (line 6)
-* ImageMagick: Configuring. (line 67)
-* images: palette. (line 6)
-* implicit casts: Casts. (line 6)
-* implicit linear solver: MetaPost. (line 10)
-* implicit scaling: Implicit scaling. (line 6)
-* import: Import. (line 46)
-* inches: Tutorial. (line 63)
-* incircle: Paths and guides. (line 303)
-* include: Import. (line 127)
-* including images: label. (line 79)
-* increasing: math. (line 59)
-* inf: Data types. (line 33)
-* inheritance: Structures. (line 181)
-* initialized: Arrays. (line 39)
+ (line 48)
+* 'gouraudshade': fill. (line 62)
+* 'Gradient': palette. (line 25)
+* gradient shading: fill. (line 32)
+* 'graph': graph. (line 6)
+* 'graph3': graph3. (line 6)
+* 'graphic': label. (line 78)
+* graphical user interface: GUI. (line 6)
+* 'gray': Pens. (line 25)
+* grayscale: Pens. (line 25)
+* 'Grayscale': palette. (line 9)
+* grid: Pens. (line 265)
+* grid <1>: graph. (line 745)
+* 'grid3': grid3. (line 6)
+* 'gs': Configuring. (line 6)
+* 'GSL': Compiling from UNIX source.
+ (line 57)
+* 'gsl': Mathematical functions.
+ (line 48)
+* 'gsOptions': Options. (line 132)
+* GUI: GUI. (line 6)
+* GUI installation: GUI installation. (line 6)
+* GUI usage: GUI usage. (line 6)
+* 'guide': Paths and guides. (line 314)
+* 'guide3': three. (line 6)
+* hatch: Pens. (line 282)
+* 'height': LaTeX usage. (line 50)
+* 'help': Interactive mode. (line 42)
+* help: Help. (line 6)
+* 'help' <1>: Debugger. (line 30)
+* 'Hermite': graph. (line 36)
+* 'Hermite(splinetype splinetype': graph. (line 36)
+* 'hex': Data types. (line 297)
+* 'hex' <1>: Pens. (line 60)
+* 'hexidecimal': Data types. (line 297)
+* 'hexidecimal' <1>: Pens. (line 58)
+* hidden surface removal: three. (line 584)
+* 'histogram': Mathematical functions.
+ (line 39)
+* 'history': Files. (line 143)
+* 'history' <1>: Interactive mode. (line 54)
+* 'historylines': Interactive mode. (line 57)
+* 'HookHead': draw. (line 26)
+* 'HookHead3': three. (line 543)
+* 'Horizontal': flowchart. (line 77)
+* 'hyperrefOptions': Options. (line 132)
+* 'hypot': Mathematical functions.
+ (line 6)
+* 'I': Mathematical functions.
+ (line 48)
+* 'iconic': three. (line 191)
+* 'identity': Transforms. (line 24)
+* 'identity' <1>: Mathematical functions.
+ (line 6)
+* 'identity' <2>: Arrays. (line 290)
+* 'identity4': three. (line 418)
+* 'if': Programming. (line 8)
+* 'IgnoreAspect': Frames and pictures.
+ (line 63)
+* 'image': palette. (line 33)
+* 'image' <1>: palette. (line 58)
+* 'ImageMagick': Configuring. (line 65)
+* 'ImageMagick' <1>: animation. (line 6)
+* 'ImageMagick' <2>: Options. (line 146)
+* images: palette. (line 6)
+* implicit casts: Casts. (line 6)
+* 'implicit linear solver': MetaPost. (line 10)
+* implicit scaling: Implicit scaling. (line 6)
+* 'import': Import. (line 45)
+* 'inches': Tutorial. (line 63)
+* 'incircle': Data types. (line 119)
+* 'include': Import. (line 126)
+* including images: label. (line 78)
+* 'increasing': math. (line 59)
+* 'inf': Data types. (line 35)
+* inheritance: Structures. (line 181)
+* 'initialized': Arrays. (line 39)
* initializers: Variable initializers.
- (line 6)
-* inline: LaTeX usage. (line 51)
-* InOutTicks: graph3. (line 35)
-* input <1>: Interactive mode. (line 48)
-* input: Files. (line 10)
-* insert <1>: Arrays. (line 39)
-* insert: Data types. (line 237)
-* inside: Paths and guides. (line 284)
-* inst: Debugger. (line 36)
-* installation: Installation. (line 6)
-* int: Data types. (line 28)
+ (line 6)
+* 'inline': LaTeX usage. (line 50)
+* 'InOutTicks': graph3. (line 35)
+* 'input': Files. (line 10)
+* 'input' <1>: Files. (line 12)
+* 'input' <2>: Interactive mode. (line 45)
+* 'input' <3>: Interactive mode. (line 49)
+* 'insert': Data types. (line 251)
+* 'insert' <1>: Arrays. (line 39)
+* 'inside': Paths and guides. (line 294)
+* 'inside' <1>: Paths and guides. (line 299)
+* 'inside' <2>: Paths and guides. (line 305)
+* 'insphere': three. (line 506)
+* 'inst': Debugger. (line 35)
+* installation: Installation. (line 6)
+* 'int': Data types. (line 30)
* integer division: Arithmetic & logical.
- (line 6)
-* interactive mode: Interactive mode. (line 6)
-* interior: Paths and guides. (line 280)
-* international characters: unicode. (line 6)
-* interp: Arithmetic & logical.
- (line 76)
-* interpolate: interpolate. (line 6)
-* intersect <1>: three. (line 520)
-* intersect <2>: math. (line 13)
-* intersect: Paths and guides. (line 186)
-* intersectionpoint <1>: three. (line 520)
-* intersectionpoint <2>: math. (line 17)
-* intersectionpoint: Paths and guides. (line 229)
-* intersectionpoints <1>: three. (line 520)
-* intersectionpoints: Paths and guides. (line 233)
-* intersections <1>: three. (line 520)
-* intersections: Paths and guides. (line 197)
-* InTicks: graph3. (line 35)
-* intMax: Data types. (line 28)
-* intMin: Data types. (line 28)
-* inverse <1>: Arrays. (line 306)
-* inverse: Transforms. (line 16)
-* invert: three. (line 440)
-* invisible: Pens. (line 39)
-* isnan: Data types. (line 33)
-* J: Mathematical functions.
- (line 6)
-* Japanese: unicode. (line 12)
-* K: Mathematical functions.
- (line 48)
-* k_scaled: Mathematical functions.
- (line 48)
-* Kate: Editing modes. (line 49)
-* KDE editor: Editing modes. (line 49)
-* keepAspect <1>: LaTeX usage. (line 51)
-* keepAspect: Frames and pictures. (line 54)
-* keyboard bindings:: three. (line 181)
-* keys: Arrays. (line 39)
-* keyword: Named arguments. (line 37)
-* keyword-only: Named arguments. (line 37)
-* keywords: Named arguments. (line 6)
-* Korean: unicode. (line 12)
-* label: three. (line 484)
-* Label <1>: graph. (line 343)
-* Label: label. (line 14)
-* label: clip. (line 16)
-* Label: draw. (line 98)
-* labelpath: labelpath. (line 6)
-* labelpath3: labelpath3. (line 6)
-* labelx: graph. (line 343)
-* labely: graph. (line 343)
-* Landscape: Frames and pictures. (line 95)
-* lastcut: Paths and guides. (line 256)
-* lasy-mode: Editing modes. (line 6)
-* latex: Options. (line 145)
-* LaTeX fonts: Pens. (line 192)
-* LaTeX usage: LaTeX usage. (line 6)
-* latexmk: LaTeX usage. (line 30)
-* latin1: latin1. (line 6)
-* latitude: Data types. (line 136)
-* latticeshade: fill. (line 32)
-* layer: Drawing commands. (line 16)
-* leastsquares <1>: graph. (line 901)
-* leastsquares: stats. (line 6)
-* Left: graph. (line 284)
-* LeftRight: graph. (line 290)
-* LeftSide: label. (line 61)
-* LeftTicks: graph. (line 161)
-* LeftView: three. (line 399)
-* legend <1>: graph. (line 432)
-* legend <2>: draw. (line 64)
-* legend: Drawing commands. (line 31)
+ (line 6)
+* interactive mode: Interactive mode. (line 6)
+* 'interior': Paths and guides. (line 290)
+* international characters: unicode. (line 6)
+* 'interp': Arithmetic & logical.
+ (line 59)
+* 'interpolate': interpolate. (line 6)
+* 'intersect': Paths and guides. (line 195)
+* 'intersect' <1>: math. (line 13)
+* 'intersect' <2>: three. (line 480)
+* 'intersectionpoint': Paths and guides. (line 238)
+* 'intersectionpoint' <1>: math. (line 17)
+* 'intersectionpoint' <2>: three. (line 480)
+* 'intersectionpoints': Paths and guides. (line 242)
+* 'intersectionpoints' <1>: three. (line 480)
+* 'intersectionpoints' <2>: three. (line 493)
+* 'intersections': Paths and guides. (line 206)
+* 'intersections' <1>: Paths and guides. (line 213)
+* 'intersections' <2>: three. (line 480)
+* 'intersections' <3>: three. (line 486)
+* 'InTicks': graph3. (line 35)
+* 'intMax': Data types. (line 30)
+* 'intMin': Data types. (line 30)
+* 'inverse': Transforms. (line 16)
+* 'inverse' <1>: Arrays. (line 296)
+* 'invert': three. (line 408)
+* 'invisible': Pens. (line 39)
+* 'isnan': Data types. (line 35)
+* 'i_scaled': Mathematical functions.
+ (line 48)
+* 'J': Mathematical functions.
+ (line 6)
+* 'J' <1>: Mathematical functions.
+ (line 48)
+* Japanese: unicode. (line 12)
+* 'K': Mathematical functions.
+ (line 48)
+* 'Kate': Editing modes. (line 48)
+* 'KDE editor': Editing modes. (line 48)
+* 'keepAspect': Frames and pictures.
+ (line 59)
+* 'keepAspect' <1>: Frames and pictures.
+ (line 63)
+* 'keepAspect' <2>: LaTeX usage. (line 50)
+* keyboard bindings:: three. (line 169)
+* 'keys': Arrays. (line 39)
+* 'keyword': Named arguments. (line 37)
+* keyword-only: Named arguments. (line 37)
+* keywords: Named arguments. (line 6)
+* Korean: unicode. (line 12)
+* 'k_scaled': Mathematical functions.
+ (line 48)
+* 'Label': draw. (line 97)
+* 'label': clip. (line 15)
+* 'Label' <1>: label. (line 14)
+* Label: graph. (line 329)
+* 'label' <1>: three. (line 444)
+* 'labelpath': labelpath. (line 6)
+* 'labelpath3': labelpath3. (line 6)
+* labelx: graph. (line 329)
+* labely: graph. (line 329)
+* 'Landscape': Frames and pictures.
+ (line 104)
+* 'lastcut': Paths and guides. (line 266)
+* 'lasy-mode': Editing modes. (line 6)
+* 'latex': Options. (line 146)
+* 'LaTeX fonts': Pens. (line 202)
+* 'LaTeX' usage: LaTeX usage. (line 6)
+* 'latexmk': LaTeX usage. (line 30)
+* 'latin1': latin1. (line 6)
+* 'latitude': Data types. (line 162)
+* 'latticeshade': fill. (line 32)
+* 'layer': Drawing commands. (line 16)
+* 'leastsquares': stats. (line 6)
+* 'leastsquares' <1>: graph. (line 928)
+* 'Left': graph. (line 268)
+* 'LeftRight': graph. (line 274)
+* 'LeftSide': label. (line 60)
+* 'LeftTicks': graph. (line 159)
+* 'LeftTicks' <1>: graph. (line 232)
+* 'LeftView': three. (line 366)
+* legend: Drawing commands. (line 31)
+* 'legend': draw. (line 64)
+* 'legend' <1>: graph. (line 423)
* Legendre: Mathematical functions.
- (line 48)
-* length <1>: three. (line 520)
-* length <2>: Arrays. (line 39)
-* length <3>: Paths and guides. (line 67)
-* length: Data types. (line 62)
-* letter: Configuring. (line 61)
-* lexorder: math. (line 68)
-* libgs <1>: Options. (line 150)
-* libgs: Configuring. (line 67)
-* libm routines: Mathematical functions.
- (line 6)
-* libsigsegv <1>: Help. (line 33)
-* libsigsegv: Functions. (line 88)
-* limits: graph. (line 637)
-* line: Arrays. (line 344)
-* line mode: Arrays. (line 344)
-* Linear: graph. (line 682)
-* linecap: Pens. (line 129)
-* linejoin: Pens. (line 138)
-* lineskip: Pens. (line 178)
-* linetype: Pens. (line 115)
-* linewidth: Pens. (line 119)
-* locale: Data types. (line 293)
-* Log: graph. (line 682)
-* log: Mathematical functions.
- (line 6)
-* log-log graph: graph. (line 713)
-* log10: Mathematical functions.
- (line 6)
-* log1p: Mathematical functions.
- (line 6)
-* log2 graph: graph. (line 762)
-* logarithmic graph: graph. (line 713)
+ (line 48)
+* 'length': Data types. (line 64)
+* 'length' <1>: Data types. (line 143)
+* 'length' <2>: Data types. (line 237)
+* 'length' <3>: Paths and guides. (line 76)
+* 'length' <4>: Paths and guides. (line 373)
+* 'length' <5>: Arrays. (line 39)
+* 'length' <6>: three. (line 480)
+* 'letter': Configuring. (line 59)
+* 'lexorder': math. (line 67)
+* 'lexorder' <1>: math. (line 70)
+* 'libgs': Configuring. (line 65)
+* 'libgs' <1>: Options. (line 151)
+* 'libm' routines: Mathematical functions.
+ (line 6)
+* 'libsigsegv': Functions. (line 93)
+* 'libsigsegv' <1>: Help. (line 28)
+* 'limits': graph. (line 638)
+* 'line': Arrays. (line 333)
+* 'line' <1>: Arrays. (line 337)
+* line mode: Arrays. (line 333)
+* 'Linear': graph. (line 689)
+* 'linecap': Pens. (line 135)
+* 'linejoin': Pens. (line 145)
+* 'lineskip': Pens. (line 188)
+* 'linetype': Pens. (line 119)
+* 'linewidth': Pens. (line 123)
+* 'locale': Data types. (line 307)
+* 'log': Mathematical functions.
+ (line 6)
+* 'Log': graph. (line 689)
+* log-log graph: graph. (line 723)
+* 'log10': Mathematical functions.
+ (line 6)
+* 'log1p': Mathematical functions.
+ (line 6)
+* 'log2' graph: graph. (line 779)
+* logarithmic graph: graph. (line 723)
* logical operators: Arithmetic & logical.
- (line 6)
-* longdashdotted: Pens. (line 95)
-* longdashed: Pens. (line 95)
-* longitude: Data types. (line 141)
-* loop: Programming. (line 8)
-* lualatex: Options. (line 145)
-* luatex: Options. (line 145)
-* MacOS X binary distributions: MacOS X binary distributions.
- (line 6)
-* makepen: Pens. (line 300)
-* map: Arrays. (line 141)
-* Margin: draw. (line 42)
-* Margin3: three. (line 577)
-* margins: three. (line 275)
-* Margins: draw. (line 42)
-* Margins3: three. (line 577)
-* mark: graph. (line 485)
-* markangle: markers. (line 38)
-* marker: graph. (line 485)
-* markers: markers. (line 6)
-* marknodes: graph. (line 485)
-* markuniform: graph. (line 485)
-* mask: Data types. (line 33)
-* math: math. (line 6)
+ (line 6)
+* 'longdashdotted': Pens. (line 98)
+* 'longdashed': Pens. (line 98)
+* 'longitude': Data types. (line 167)
+* loop: Programming. (line 8)
+* 'lualatex': Options. (line 146)
+* 'luatex': Options. (line 146)
+* 'MacOS X' binary distributions: MacOS X binary distributions.
+ (line 6)
+* 'makepen': Pens. (line 318)
+* 'map': Arrays. (line 131)
+* 'Margin': draw. (line 42)
+* 'Margin' <1>: draw. (line 42)
+* 'Margin3': three. (line 559)
+* 'Margin3' <1>: three. (line 559)
+* 'Margins': draw. (line 42)
+* margins: three. (line 243)
+* 'Margins3': three. (line 559)
+* 'mark': graph. (line 479)
+* 'markangle': markers. (line 35)
+* 'marker': graph. (line 479)
+* 'markers': markers. (line 6)
+* 'marknodes': graph. (line 479)
+* 'markuniform': graph. (line 479)
+* 'mask': Data types. (line 35)
+* 'math': math. (line 6)
* mathematical functions: Mathematical functions.
- (line 6)
-* max <1>: three. (line 520)
-* max <2>: Arrays. (line 225)
-* max <3>: Frames and pictures. (line 7)
-* max: Paths and guides. (line 269)
-* maxbound: Data types. (line 106)
-* maxtile: three. (line 222)
-* maxtimes: Paths and guides. (line 224)
-* maxviewport: three. (line 222)
-* MetaPost: MetaPost. (line 6)
-* MetaPost ... : Bezier curves. (line 70)
-* MetaPost cutafter: Paths and guides. (line 257)
-* MetaPost cutbefore: Paths and guides. (line 253)
-* MetaPost pickup: Pens. (line 6)
-* MetaPost whatever: MetaPost. (line 10)
-* Microsoft Windows: Microsoft Windows. (line 6)
-* MidArcArrow: draw. (line 26)
-* MidArcArrow3: three. (line 561)
-* MidArrow: draw. (line 26)
-* MidArrow3: three. (line 561)
-* midpoint: Paths and guides. (line 171)
-* MidPoint: label. (line 56)
-* min <1>: three. (line 520)
-* min <2>: Arrays. (line 218)
-* min <3>: Frames and pictures. (line 7)
-* min: Paths and guides. (line 265)
-* minbound: Data types. (line 103)
-* minipage: label. (line 118)
-* mintimes: Paths and guides. (line 219)
-* miterjoin: Pens. (line 138)
-* miterlimit: Pens. (line 147)
-* mktemp: Files. (line 44)
-* mm: Tutorial. (line 63)
-* mode: Files. (line 75)
-* monotonic: graph. (line 37)
-* mouse: GUI. (line 6)
-* mouse bindings: three. (line 149)
-* Move: Pens. (line 339)
-* MoveQuiet: Pens. (line 345)
-* multisample: three. (line 140)
-* N: Tutorial. (line 106)
-* name: Files. (line 88)
-* named arguments: Named arguments. (line 6)
-* natural: graph. (line 37)
-* new <1>: Arrays. (line 109)
-* new: Structures. (line 6)
-* newframe: Frames and pictures. (line 7)
-* newl: Files. (line 61)
-* newton: Mathematical functions.
- (line 66)
-* next: Debugger. (line 42)
-* NFSS: Pens. (line 192)
-* nobasealign: Pens. (line 168)
-* NoFill <1>: Frames and pictures. (line 141)
-* NoFill: draw. (line 26)
-* NoMargin: draw. (line 42)
-* NoMargin3: three. (line 577)
-* none: Files. (line 61)
-* None: draw. (line 19)
-* normal: three. (line 506)
-* nosafe: Options. (line 169)
-* NOT: Arithmetic & logical.
- (line 80)
-* notaknot: graph. (line 37)
-* NoTicks: graph. (line 161)
-* NoTicks3: graph3. (line 35)
-* null: Structures. (line 6)
-* nullpen <1>: Frames and pictures. (line 127)
-* nullpen: label. (line 14)
-* NURBS: three. (line 376)
-* O: three. (line 287)
-* obj: obj. (line 9)
-* oblique: three. (line 332)
-* obliqueX: three. (line 340)
-* obliqueY: three. (line 347)
-* obliqueZ: three. (line 332)
-* ode: ode. (line 9)
-* offset <1>: Options. (line 174)
-* offset: Pens. (line 115)
-* OmitTick: graph. (line 239)
-* OmitTickInterval: graph. (line 239)
-* OmitTickIntervals: graph. (line 239)
-* opacity: Pens. (line 222)
-* open: Files. (line 12)
-* OpenGL: three. (line 140)
-* operator: User-defined operators.
- (line 6)
-* operator --: graph. (line 31)
-* operator ..: graph. (line 34)
-* operator answer: Interactive mode. (line 37)
-* operator cast: Casts. (line 30)
-* operator ecast: Casts. (line 57)
-* operator init <1>: Structures. (line 134)
-* operator init: Variable initializers.
- (line 6)
-* operators: Operators. (line 6)
-* options: Options. (line 6)
-* OR: Arithmetic & logical.
- (line 80)
-* orientation: Frames and pictures. (line 95)
-* orthographic: three. (line 351)
-* outformat: three. (line 140)
-* outprefix: Frames and pictures. (line 83)
-* output <1>: Options. (line 145)
-* output: Files. (line 36)
-* OutTicks: graph3. (line 35)
-* overloading functions: Functions. (line 44)
-* overwrite: Pens. (line 324)
-* P: Mathematical functions.
- (line 48)
-* pack: label. (line 101)
-* packing: Rest arguments. (line 30)
-* pair <1>: Data types. (line 43)
-* pair: Tutorial. (line 51)
-* pairs: Arrays. (line 242)
-* paperheight: Configuring. (line 61)
-* papertype: Configuring. (line 61)
-* paperwidth: Configuring. (line 61)
-* parallelogram: flowchart. (line 50)
-* parametric surface: graph3. (line 101)
-* parametrized curve: graph. (line 637)
-* partialsum: math. (line 53)
-* patch-dependent colors: three. (line 81)
-* path <1>: flowchart. (line 81)
-* path <2>: three. (line 43)
-* path: Paths and guides. (line 7)
-* path markers: graph. (line 485)
-* path3: three. (line 6)
-* path[]: Tutorial. (line 134)
-* patterns <1>: patterns. (line 6)
-* patterns: Pens. (line 238)
-* PDF: Options. (line 145)
-* pdflatex: Options. (line 145)
-* pdfreloadOptions: Options. (line 131)
-* pdfviewer: Configuring. (line 6)
-* pdfviewerOptions: Options. (line 131)
-* pen: Pens. (line 6)
-* PenMargin: draw. (line 42)
-* PenMargin2: three. (line 577)
-* PenMargin3: three. (line 577)
-* PenMargins: draw. (line 42)
-* PenMargins2: three. (line 577)
-* PenMargins3: three. (line 577)
-* periodic: graph. (line 37)
-* perl: LaTeX usage. (line 30)
-* perpendicular: geometry. (line 6)
-* perspective: three. (line 376)
-* picture: Frames and pictures. (line 35)
-* picture alignment: Frames and pictures. (line 209)
-* piecewisestraight: Paths and guides. (line 83)
-* pixel: three. (line 584)
-* Pl: Mathematical functions.
- (line 48)
-* plain: plain. (line 6)
-* planar: three. (line 89)
-* plane: three. (line 314)
-* planeproject: three. (line 503)
-* point <1>: three. (line 520)
-* point: Paths and guides. (line 86)
-* polar: Data types. (line 121)
-* polargraph: graph. (line 90)
-* polygon: graph. (line 485)
-* pop: Arrays. (line 39)
-* Portrait: Frames and pictures. (line 95)
-* postcontrol <1>: three. (line 520)
-* postcontrol: Paths and guides. (line 137)
+ (line 6)
+* 'max': Paths and guides. (line 279)
+* 'max' <1>: Frames and pictures.
+ (line 7)
+* 'max' <2>: Arrays. (line 215)
+* 'max' <3>: Arrays. (line 225)
+* 'max' <4>: three. (line 480)
+* 'maxbound': Data types. (line 133)
+* 'maxbound' <1>: Data types. (line 203)
+* 'maxtile': three. (line 191)
+* 'maxtimes': Paths and guides. (line 233)
+* 'maxviewport': three. (line 191)
+* 'MetaPost': MetaPost. (line 6)
+* 'MetaPost ... ': Bezier curves. (line 70)
+* 'MetaPost cutafter': Paths and guides. (line 267)
+* 'MetaPost cutbefore': Paths and guides. (line 263)
+* 'MetaPost pickup': Pens. (line 6)
+* 'MetaPost whatever': MetaPost. (line 10)
+* Microsoft Windows: Microsoft Windows. (line 6)
+* 'MidArcArrow': draw. (line 26)
+* 'MidArcArrow3': three. (line 543)
+* 'MidArrow': draw. (line 26)
+* 'MidArrow3': three. (line 543)
+* 'MidPoint': label. (line 55)
+* 'midpoint': Paths and guides. (line 180)
+* 'min': Paths and guides. (line 275)
+* 'min' <1>: Frames and pictures.
+ (line 7)
+* 'min' <2>: Arrays. (line 210)
+* 'min' <3>: Arrays. (line 220)
+* 'min' <4>: three. (line 480)
+* 'minbound': Data types. (line 130)
+* 'minbound' <1>: Data types. (line 200)
+* 'minipage': label. (line 116)
+* 'mintimes': Paths and guides. (line 228)
+* 'miterjoin': Pens. (line 145)
+* 'miterlimit': Pens. (line 155)
+* 'mktemp': Files. (line 44)
+* 'mm': Tutorial. (line 63)
+* 'mode': Files. (line 76)
+* 'mode' <1>: Files. (line 89)
+* 'monotonic': graph. (line 36)
+* mouse: GUI. (line 6)
+* mouse bindings: three. (line 147)
+* 'Move': Pens. (line 355)
+* 'MoveQuiet': Pens. (line 361)
+* 'multisample': three. (line 138)
+* 'N': Tutorial. (line 103)
+* 'name': Files. (line 89)
+* named arguments: Named arguments. (line 6)
+* 'natural': graph. (line 36)
+* 'new': Structures. (line 6)
+* 'new' <1>: Arrays. (line 100)
+* 'new' <2>: Arrays. (line 103)
+* 'newframe': Frames and pictures.
+ (line 7)
+* 'newl': Files. (line 61)
+* 'newton': Mathematical functions.
+ (line 66)
+* 'newton' <1>: Mathematical functions.
+ (line 73)
+* 'next': Debugger. (line 41)
+* 'NFSS': Pens. (line 202)
+* 'nobasealign': Pens. (line 177)
+* 'NoFill': draw. (line 26)
+* 'NoFill' <1>: Frames and pictures.
+ (line 154)
+* 'NoMargin': draw. (line 42)
+* 'NoMargin3': three. (line 559)
+* 'None': draw. (line 19)
+* 'None' <1>: draw. (line 26)
+* 'none': Files. (line 61)
+* 'normal': three. (line 466)
+* 'nosafe': Options. (line 170)
+* 'NOT': Arithmetic & logical.
+ (line 63)
+* 'notaknot': graph. (line 36)
+* 'NoTicks': graph. (line 159)
+* 'NoTicks3': graph3. (line 35)
+* 'null': Structures. (line 6)
+* 'nullpen': label. (line 14)
+* 'nullpen' <1>: Frames and pictures.
+ (line 140)
+* 'nullpen' <2>: Frames and pictures.
+ (line 149)
+* 'NURBS': three. (line 342)
+* 'O': three. (line 255)
+* 'obj': obj. (line 6)
+* 'oblique': three. (line 298)
+* 'obliqueX': three. (line 305)
+* 'obliqueY': three. (line 311)
+* 'obliqueZ': three. (line 298)
+* 'ode': ode. (line 6)
+* 'offset': Pens. (line 119)
+* offset: Options. (line 175)
+* 'OmitTick': graph. (line 222)
+* 'OmitTickInterval': graph. (line 222)
+* 'OmitTickIntervals': graph. (line 222)
+* 'opacity': Pens. (line 233)
+* open: Files. (line 12)
+* 'OpenGL': three. (line 138)
+* 'operator': User-defined operators.
+ (line 6)
+* 'operator --': graph. (line 30)
+* 'operator ..': graph. (line 33)
+* 'operator answer': Interactive mode. (line 35)
+* 'operator cast': Casts. (line 30)
+* 'operator ecast': Casts. (line 57)
+* 'operator init': Variable initializers.
+ (line 6)
+* 'operator init' <1>: Structures. (line 134)
+* operators: Operators. (line 6)
+* options: Options. (line 6)
+* 'OR': Arithmetic & logical.
+ (line 63)
+* 'orient': Data types. (line 107)
+* 'orient' <1>: three. (line 497)
+* 'orientation': Frames and pictures.
+ (line 104)
+* 'orthographic': three. (line 315)
+* 'outformat': three. (line 138)
+* 'outprefix': Frames and pictures.
+ (line 91)
+* 'output': Files. (line 36)
+* 'output' <1>: Options. (line 146)
+* 'OutTicks': graph3. (line 35)
+* overloading functions: Functions. (line 48)
+* 'overwrite': Pens. (line 340)
+* 'P': Mathematical functions.
+ (line 48)
+* 'pack': label. (line 100)
+* packing: Rest arguments. (line 30)
+* 'pair': Tutorial. (line 51)
+* 'pair' <1>: Data types. (line 45)
+* 'pairs': Arrays. (line 230)
+* 'paperheight': Configuring. (line 59)
+* 'papertype': Configuring. (line 59)
+* 'paperwidth': Configuring. (line 59)
+* 'parallelogram': flowchart. (line 47)
+* parametric surface: graph3. (line 99)
+* parametrized curve: graph. (line 638)
+* 'partialsum': math. (line 53)
+* 'partialsum' <1>: math. (line 56)
+* patch-dependent colors: three. (line 79)
+* 'path': Paths and guides. (line 7)
+* 'path' <1>: three. (line 42)
+* 'path' <2>: flowchart. (line 77)
+* path markers: graph. (line 479)
+* 'path3': three. (line 6)
+* 'path3' <1>: three. (line 42)
+* 'path[]': Tutorial. (line 130)
+* patterns: Pens. (line 251)
+* 'patterns': patterns. (line 6)
+* 'PDF': Options. (line 146)
+* 'pdflatex': Options. (line 146)
+* 'pdfreloadOptions': Options. (line 132)
+* 'pdfviewer': Configuring. (line 6)
+* 'pdfviewerOptions': Options. (line 132)
+* 'pen': Pens. (line 6)
+* 'PenMargin': draw. (line 42)
+* 'PenMargin2': three. (line 559)
+* 'PenMargin3': three. (line 559)
+* 'PenMargins': draw. (line 42)
+* 'PenMargins2': three. (line 559)
+* 'PenMargins3': three. (line 559)
+* 'periodic': graph. (line 36)
+* 'perl': LaTeX usage. (line 30)
+* 'perpendicular': geometry. (line 6)
+* 'perspective': three. (line 342)
+* 'picture': Frames and pictures.
+ (line 39)
+* picture alignment: Frames and pictures.
+ (line 226)
+* 'piecewisestraight': Paths and guides. (line 92)
+* 'pixel': three. (line 566)
+* 'Pl': Mathematical functions.
+ (line 48)
+* 'plain': plain. (line 6)
+* 'planar': three. (line 87)
+* 'plane': three. (line 281)
+* 'planeproject': three. (line 463)
+* 'point': Paths and guides. (line 95)
+* 'point' <1>: Paths and guides. (line 379)
+* 'point' <2>: three. (line 480)
+* 'polar': Data types. (line 147)
+* 'polargraph': graph. (line 88)
+* 'polygon': graph. (line 479)
+* 'pop': Arrays. (line 39)
+* 'Portrait': Frames and pictures.
+ (line 104)
+* 'postcontrol': Paths and guides. (line 146)
+* 'postcontrol' <1>: three. (line 480)
* postfix operators: Self & prefix operators.
- (line 19)
-* postscript: Frames and pictures. (line 271)
-* PostScript fonts: Pens. (line 210)
-* PostScript subpath: Tutorial. (line 134)
-* pow10: Mathematical functions.
- (line 6)
-* prc: three. (line 243)
-* precision: Files. (line 92)
-* precontrol <1>: three. (line 520)
-* precontrol: Paths and guides. (line 130)
+ (line 19)
+* 'postscript': Frames and pictures.
+ (line 292)
+* 'PostScript fonts': Pens. (line 220)
+* 'PostScript' subpath: Tutorial. (line 130)
+* 'pow10': Mathematical functions.
+ (line 6)
+* 'prc': three. (line 212)
+* 'precision': Files. (line 93)
+* 'precontrol': Paths and guides. (line 139)
+* 'precontrol' <1>: three. (line 480)
* prefix operators: Self & prefix operators.
- (line 6)
-* private: Structures. (line 6)
-* programming: Programming. (line 6)
-* pstoedit: PostScript to Asymptote.
- (line 6)
-* psview: Microsoft Windows. (line 16)
-* psviewer: Configuring. (line 6)
-* psviewerOptions: Options. (line 131)
-* pt: Tutorial. (line 63)
-* public: Structures. (line 6)
-* push: Arrays. (line 39)
-* Python usage: Interactive mode. (line 80)
-* quadraticroots: Arrays. (line 309)
-* quarticroots: math. (line 22)
-* quick reference: Description. (line 80)
-* quit <1>: Debugger. (line 54)
-* quit <2>: Interactive mode. (line 59)
-* quit: Tutorial. (line 37)
-* quote: Import. (line 116)
-* quotient: Arithmetic & logical.
- (line 6)
-* RadialShade: Frames and pictures. (line 159)
-* radialshade: fill. (line 51)
-* RadialShadeDraw: Frames and pictures. (line 163)
-* radians: Mathematical functions.
- (line 17)
-* radius <1>: three. (line 520)
-* radius: Paths and guides. (line 126)
-* Rainbow: palette. (line 12)
-* rand: Mathematical functions.
- (line 39)
-* randMax: Mathematical functions.
- (line 39)
-* read: Arrays. (line 385)
-* reading: Files. (line 12)
-* reading string arrays: Arrays. (line 354)
-* readline: Files. (line 134)
-* real: Data types. (line 33)
-* realDigits: Data types. (line 33)
-* realEpsilon: Data types. (line 33)
-* realMax: Data types. (line 33)
-* realMin: Data types. (line 33)
-* realmult: Data types. (line 97)
-* rectangle: flowchart. (line 37)
-* recursion: Functions. (line 88)
-* reference: Description. (line 80)
-* reflect: Transforms. (line 51)
-* Relative: label. (line 51)
-* relpoint: Paths and guides. (line 167)
-* reltime: Paths and guides. (line 163)
-* remainder: Mathematical functions.
- (line 6)
-* rename: Files. (line 151)
-* render <1>: Options. (line 145)
-* render: three. (line 47)
-* replace: Data types. (line 254)
-* resetdefaultpen: Pens. (line 353)
-* rest arguments: Rest arguments. (line 6)
-* restore: Frames and pictures. (line 265)
-* restricted: Structures. (line 6)
-* return: Debugger. (line 48)
-* reverse <1>: three. (line 520)
-* reverse <2>: Arrays. (line 146)
-* reverse <3>: Paths and guides. (line 174)
-* reverse: Data types. (line 250)
-* rewind: Files. (line 92)
-* rfind: Data types. (line 231)
-* rgb: Pens. (line 30)
+ (line 6)
+* 'private': Structures. (line 6)
+* programming: Programming. (line 6)
+* 'pstoedit': PostScript to Asymptote.
+ (line 6)
+* 'psview': Microsoft Windows. (line 16)
+* 'psviewer': Configuring. (line 6)
+* 'psviewerOptions': Options. (line 132)
+* 'pt': Tutorial. (line 63)
+* 'public': Structures. (line 6)
+* 'push': Arrays. (line 39)
+* 'Python' usage: Interactive mode. (line 72)
+* 'quadraticroots': Arrays. (line 299)
+* 'quadraticroots' <1>: Arrays. (line 304)
+* 'quarticroots': math. (line 22)
+* quick reference: Description. (line 77)
+* quit: Tutorial. (line 37)
+* 'quit': Interactive mode. (line 54)
+* 'quit' <1>: Debugger. (line 53)
+* 'quote': Import. (line 115)
+* 'quotient': Arithmetic & logical.
+ (line 6)
+* 'radialshade': fill. (line 51)
+* 'RadialShade': Frames and pictures.
+ (line 172)
+* 'RadialShadeDraw': Frames and pictures.
+ (line 176)
+* 'radians': Mathematical functions.
+ (line 17)
+* 'radius': Paths and guides. (line 135)
+* 'radius' <1>: three. (line 480)
+* 'Rainbow': palette. (line 12)
+* 'rand': Mathematical functions.
+ (line 39)
+* 'randMax': Mathematical functions.
+ (line 39)
+* 'read': Arrays. (line 374)
+* reading: Files. (line 12)
+* reading string arrays: Arrays. (line 343)
+* 'readline': Files. (line 135)
+* 'real': Data types. (line 35)
+* 'realDigits': Data types. (line 35)
+* 'realEpsilon': Data types. (line 35)
+* 'realMax': Data types. (line 35)
+* 'realMin': Data types. (line 35)
+* 'realmult': Data types. (line 99)
+* 'rectangle': flowchart. (line 34)
+* recursion: Functions. (line 93)
+* reference: Description. (line 77)
+* 'reflect': Transforms. (line 42)
+* 'Relative': label. (line 50)
+* 'Relative' <1>: label. (line 60)
+* 'relpoint': Paths and guides. (line 176)
+* 'reltime': Paths and guides. (line 172)
+* 'remainder': Mathematical functions.
+ (line 6)
+* 'rename': Files. (line 152)
+* 'render': three. (line 46)
+* 'render' <1>: three. (line 138)
+* 'render' <2>: Options. (line 146)
+* 'replace': Data types. (line 268)
+* 'resetdefaultpen': Pens. (line 367)
+* rest arguments: Rest arguments. (line 6)
+* 'restore': Frames and pictures.
+ (line 286)
+* 'restricted': Structures. (line 6)
+* 'return': Debugger. (line 47)
+* 'reverse': Data types. (line 264)
+* 'reverse' <1>: Paths and guides. (line 183)
+* 'reverse' <2>: Paths and guides. (line 382)
+* 'reverse' <3>: Arrays. (line 136)
+* 'reverse' <4>: three. (line 480)
+* rewind: Files. (line 93)
+* 'rfind': Data types. (line 245)
+* 'rgb': Pens. (line 30)
+* 'rgb' <1>: Pens. (line 58)
* Riemann zeta function: Mathematical functions.
- (line 48)
-* Right: graph. (line 287)
-* RightSide: label. (line 61)
-* RightTicks: graph. (line 161)
-* RightView: three. (line 399)
-* rotate: three. (line 471)
-* Rotate: label. (line 36)
-* Rotate(pair z): label. (line 39)
-* round: Mathematical functions.
- (line 26)
-* roundcap: Pens. (line 129)
-* roundedpath: roundedpath. (line 6)
-* roundjoin: Pens. (line 138)
-* roundrectangle: flowchart. (line 69)
+ (line 48)
+* 'Right': graph. (line 271)
+* 'RightSide': label. (line 60)
+* 'RightTicks': graph. (line 159)
+* 'RightTicks' <1>: graph. (line 232)
+* 'RightView': three. (line 366)
+* 'Rotate': label. (line 36)
+* 'rotate': three. (line 434)
+* 'Rotate(pair z)': label. (line 39)
+* 'round': Mathematical functions.
+ (line 26)
+* 'roundcap': Pens. (line 135)
+* 'roundedpath': roundedpath. (line 6)
+* 'roundjoin': Pens. (line 145)
+* 'roundrectangle': flowchart. (line 66)
* RPM: UNIX binary distributions.
- (line 6)
-* runtime imports: Import. (line 98)
-* Russian: unicode. (line 7)
-* S: Tutorial. (line 106)
-* safe: Options. (line 169)
-* save: Frames and pictures. (line 262)
-* saveline: Files. (line 134)
-* scale: three. (line 470)
-* Scale: graph. (line 698)
-* scale <1>: graph. (line 682)
-* scale <2>: Transforms. (line 39)
-* scale: Pens. (line 115)
-* Scale: label. (line 45)
-* scale3: three. (line 467)
-* scaled graph: graph. (line 663)
-* scientific graph: graph. (line 397)
-* scroll: Files. (line 108)
-* search: Arrays. (line 164)
-* search paths: Search paths. (line 6)
-* Seascape: Frames and pictures. (line 100)
-* secondary axis: graph. (line 812)
-* secondaryX: graph. (line 812)
-* secondaryY: graph. (line 812)
-* seconds: Data types. (line 306)
-* seek: Files. (line 92)
-* seekeof: Files. (line 92)
-* segment: math. (line 50)
-* segmentation fault: Help. (line 33)
+ (line 6)
+* runtime imports: Import. (line 97)
+* Russian: unicode. (line 7)
+* 'S': Tutorial. (line 103)
+* 'safe': Options. (line 170)
+* 'save': Frames and pictures.
+ (line 283)
+* 'saveline': Files. (line 135)
+* 'Scale': label. (line 45)
+* 'scale': Pens. (line 119)
+* 'scale' <1>: Transforms. (line 34)
+* 'scale' <2>: Transforms. (line 36)
+* 'scale' <3>: graph. (line 689)
+* 'Scale' <1>: graph. (line 706)
+* 'scale' <4>: three. (line 433)
+* 'scale3': three. (line 431)
+* scaled graph: graph. (line 669)
+* scientific graph: graph. (line 386)
+* 'scroll': Files. (line 109)
+* 'search': Arrays. (line 154)
+* 'search' <1>: Arrays. (line 160)
+* search paths: Search paths. (line 6)
+* 'Seascape': Frames and pictures.
+ (line 110)
+* secondary axis: graph. (line 832)
+* 'secondaryX': graph. (line 832)
+* 'secondaryY': graph. (line 832)
+* 'seconds': Data types. (line 321)
+* 'seek': Files. (line 93)
+* 'seekeof': Files. (line 93)
+* 'segment': math. (line 50)
+* segmentation fault: Help. (line 28)
* self operators: Self & prefix operators.
- (line 6)
-* sequence: Arrays. (line 128)
-* settings <1>: Options. (line 116)
-* settings: Configuring. (line 23)
-* sgn: Mathematical functions.
- (line 26)
-* shading: fill. (line 32)
-* shift <1>: three. (line 455)
-* shift: Transforms. (line 27)
-* Shift: label. (line 33)
-* shiftless: Transforms. (line 53)
-* shipout: Frames and pictures. (line 83)
-* showtarget: three. (line 351)
-* Si: Mathematical functions.
- (line 48)
-* side: Paths and guides. (line 299)
-* signedint: Files. (line 75)
-* SimpleHead: draw. (line 26)
-* simplex: simplex. (line 6)
-* simpson: Mathematical functions.
- (line 82)
-* Sin: Mathematical functions.
- (line 20)
-* sin: Mathematical functions.
- (line 6)
-* single precision: Files. (line 75)
-* singleint: Files. (line 75)
-* singlereal: Files. (line 75)
-* sinh: Mathematical functions.
- (line 6)
-* SixViews: three. (line 414)
-* SixViewsFR: three. (line 414)
-* SixViewsUS: three. (line 414)
-* size <1>: Options. (line 145)
-* size <2>: three. (line 520)
-* size <3>: Frames and pictures. (line 43)
-* size: Paths and guides. (line 72)
-* size3: three. (line 272)
-* slant: Transforms. (line 45)
-* Slant: label. (line 42)
-* sleep: Data types. (line 351)
-* slice: Paths and guides. (line 242)
-* slices: Slices. (line 6)
-* slide: slide. (line 6)
-* slope: math. (line 44)
-* slopefield: slopefield. (line 6)
-* sncndn: Mathematical functions.
- (line 48)
-* solid: Pens. (line 95)
-* solids: solids. (line 9)
-* solve: Arrays. (line 278)
-* sort: Arrays. (line 184)
-* Spline <1>: graph3. (line 101)
-* Spline: graph. (line 34)
-* split: Data types. (line 263)
-* sqrt: Mathematical functions.
- (line 6)
-* squarecap: Pens. (line 129)
-* srand: Mathematical functions.
- (line 39)
-* stack overflow <1>: Help. (line 33)
-* stack overflow: Functions. (line 88)
-* static: Static. (line 6)
-* stats: stats. (line 6)
-* stdin: Files. (line 48)
-* stdout: Files. (line 48)
-* step: Debugger. (line 39)
-* stickframe: markers. (line 16)
-* stop: Debugger. (line 10)
-* straight: three. (line 520)
-* Straight: graph. (line 31)
-* straight: Paths and guides. (line 79)
-* strftime: Data types. (line 298)
-* string: Data types. (line 181)
-* stroke: fill. (line 36)
-* strokepath: Paths and guides. (line 308)
-* strptime: Data types. (line 306)
-* struct: Structures. (line 6)
-* structures: Structures. (line 6)
-* subpath <1>: three. (line 520)
-* subpath: Paths and guides. (line 177)
-* subpictures: Frames and pictures. (line 103)
-* substr: Data types. (line 246)
-* Subversion: Subversion. (line 6)
-* sum: Arrays. (line 213)
-* superpath: Tutorial. (line 134)
-* Suppress: Pens. (line 331)
-* SuppressQuiet: Pens. (line 335)
-* surface <1>: graph3. (line 101)
-* surface: three. (line 47)
-* SVG: Options. (line 150)
-* SVN: Subversion. (line 6)
-* system <1>: Options. (line 169)
-* system: Data types. (line 328)
-* syzygy: syzygy. (line 6)
-* tab: Files. (line 61)
-* tab completion: Tutorial. (line 37)
-* Tan: Mathematical functions.
- (line 20)
-* tan: Mathematical functions.
- (line 6)
-* tanh: Mathematical functions.
- (line 6)
-* target: three. (line 351)
-* tell: Files. (line 92)
-* tension <1>: three. (line 6)
-* tension: Bezier curves. (line 56)
-* tensionSpecifier: Paths and guides. (line 399)
-* tensor product shading: fill. (line 78)
-* tensorshade: fill. (line 78)
-* tessellation: three. (line 112)
-* tex <1>: Options. (line 145)
-* tex: Frames and pictures. (line 278)
-* TeX fonts: Pens. (line 201)
-* TeX string: Data types. (line 181)
-* texcommand: Configuring. (line 67)
-* TeXHead: draw. (line 26)
-* TeXHead3: three. (line 561)
-* texpath <1>: label. (line 115)
-* texpath: Configuring. (line 67)
-* texpreamble: Frames and pictures. (line 286)
-* texreset: Frames and pictures. (line 289)
-* textbook graph: graph. (line 372)
-* tgz: UNIX binary distributions.
- (line 6)
-* thick: three. (line 123)
-* thin: three. (line 123)
-* this: Structures. (line 6)
-* three: three. (line 6)
-* ThreeViews: three. (line 414)
-* ThreeViewsFR: three. (line 414)
-* ThreeViewsUS: three. (line 414)
-* tick: graph. (line 343)
-* Ticks: graph. (line 161)
-* ticks: graph. (line 161)
-* tildeframe: markers. (line 26)
-* tile: Pens. (line 251)
-* tilings: Pens. (line 238)
-* time <1>: math. (line 30)
-* time: Data types. (line 298)
-* times: Paths and guides. (line 211)
-* Top: graph. (line 137)
-* TopView: three. (line 399)
-* trace: Debugger. (line 51)
-* trailingzero: graph. (line 175)
-* transform <1>: three. (line 495)
-* transform: Transforms. (line 6)
-* transform3: three. (line 450)
-* transparency: Pens. (line 222)
-* transpose: Arrays. (line 205)
-* tree: tree. (line 9)
-* trembling: trembling. (line 6)
-* triangle: geometry. (line 6)
-* triangles: three. (line 112)
-* triangulate: contour. (line 156)
-* tridiagonal: Arrays. (line 266)
+ (line 6)
+* 'sequence': Arrays. (line 118)
+* 'settings': Configuring. (line 22)
+* 'settings' <1>: Options. (line 117)
+* 'sgn': Mathematical functions.
+ (line 26)
+* shading: fill. (line 32)
+* 'Shift': label. (line 33)
+* 'shift': Transforms. (line 26)
+* 'shift' <1>: Transforms. (line 28)
+* 'shift' <2>: Transforms. (line 44)
+* 'shift' <3>: three. (line 423)
+* 'shiftless': Transforms. (line 44)
+* 'shipout': Frames and pictures.
+ (line 91)
+* 'showtarget': three. (line 315)
+* 'Si': Mathematical functions.
+ (line 48)
+* 'signedint': Files. (line 76)
+* 'signedint' <1>: Files. (line 89)
+* 'SimpleHead': draw. (line 26)
+* 'simplex': simplex. (line 6)
+* 'simpson': Mathematical functions.
+ (line 82)
+* 'sin': Mathematical functions.
+ (line 6)
+* 'Sin': Mathematical functions.
+ (line 20)
+* single precision: Files. (line 76)
+* 'singleint': Files. (line 76)
+* 'singleint' <1>: Files. (line 89)
+* 'singlereal': Files. (line 76)
+* 'singlereal' <1>: Files. (line 89)
+* 'sinh': Mathematical functions.
+ (line 6)
+* 'SixViews': three. (line 381)
+* 'SixViewsFR': three. (line 381)
+* 'SixViewsUS': three. (line 381)
+* 'size': Paths and guides. (line 81)
+* 'size' <1>: Paths and guides. (line 370)
+* 'size' <2>: Frames and pictures.
+ (line 48)
+* 'size' <3>: Frames and pictures.
+ (line 74)
+* 'size' <4>: three. (line 480)
+* 'size' <5>: Options. (line 146)
+* 'size3': three. (line 240)
+* 'Slant': label. (line 42)
+* 'slant': Transforms. (line 38)
+* 'sleep': Data types. (line 367)
+* 'slice': Paths and guides. (line 251)
+* 'slice' <1>: Paths and guides. (line 262)
+* slices: Slices. (line 6)
+* 'slide': slide. (line 6)
+* 'slope': math. (line 44)
+* 'slope' <1>: math. (line 47)
+* 'slopefield': slopefield. (line 6)
+* 'sncndn': Mathematical functions.
+ (line 48)
+* 'solid': Pens. (line 98)
+* 'solids': solids. (line 6)
+* 'solve': Arrays. (line 268)
+* 'solve' <1>: Arrays. (line 284)
+* 'sort': Arrays. (line 174)
+* 'sort' <1>: Arrays. (line 178)
+* 'sort' <2>: Arrays. (line 193)
+* 'Spline': graph. (line 33)
+* 'Spline' <1>: graph3. (line 99)
+* 'split': Data types. (line 277)
+* 'sqrt': Mathematical functions.
+ (line 6)
+* 'squarecap': Pens. (line 135)
+* 'srand': Mathematical functions.
+ (line 39)
+* stack overflow: Functions. (line 93)
+* stack overflow <1>: Functions. (line 93)
+* stack overflow <2>: Help. (line 28)
+* 'static': Static. (line 6)
+* 'stats': stats. (line 6)
+* 'stdin': Files. (line 48)
+* 'stdout': Files. (line 48)
+* 'step': Debugger. (line 38)
+* 'stickframe': markers. (line 16)
+* 'stop': Debugger. (line 10)
+* 'straight': Paths and guides. (line 88)
+* 'Straight': graph. (line 30)
+* 'straight' <1>: three. (line 480)
+* 'strftime': Data types. (line 312)
+* 'strftime' <1>: Data types. (line 337)
+* 'string': Data types. (line 206)
+* 'string' <1>: Data types. (line 303)
+* 'stroke': fill. (line 36)
+* 'stroke' <1>: fill. (line 113)
+* 'strokepath': Paths and guides. (line 309)
+* 'strptime': Data types. (line 321)
+* 'struct': Structures. (line 6)
+* structures: Structures. (line 6)
+* 'subpath': Paths and guides. (line 186)
+* 'subpath' <1>: three. (line 480)
+* subpictures: Frames and pictures.
+ (line 113)
+* 'substr': Data types. (line 260)
+* Subversion: Subversion. (line 6)
+* 'sum': Arrays. (line 205)
+* superpath: Tutorial. (line 130)
+* 'Suppress': Pens. (line 347)
+* 'SuppressQuiet': Pens. (line 351)
+* 'surface': three. (line 46)
+* 'surface' <1>: three. (line 87)
+* 'surface' <2>: three. (line 98)
+* 'surface' <3>: graph3. (line 99)
+* 'SVG': Options. (line 151)
+* SVN: Subversion. (line 6)
+* 'system': Data types. (line 345)
+* 'system' <1>: Options. (line 170)
+* 'syzygy': syzygy. (line 6)
+* 'tab': Files. (line 61)
+* tab completion: Tutorial. (line 37)
+* 'tan': Mathematical functions.
+ (line 6)
+* 'Tan': Mathematical functions.
+ (line 20)
+* 'tanh': Mathematical functions.
+ (line 6)
+* 'target': three. (line 315)
+* 'tell': Files. (line 93)
+* 'tension': Bezier curves. (line 56)
+* 'tension' <1>: three. (line 6)
+* 'tensionSpecifier': Paths and guides. (line 402)
+* tensor product shading: fill. (line 77)
+* 'tensorshade': fill. (line 77)
+* 'tessellation': three. (line 110)
+* 'tex': Frames and pictures.
+ (line 300)
+* 'tex' <1>: Options. (line 146)
+* 'TeX fonts': Pens. (line 211)
+* TeX string: Data types. (line 206)
+* 'texcommand': Configuring. (line 65)
+* 'TeXHead': draw. (line 26)
+* 'TeXHead3': three. (line 543)
+* 'texpath': Configuring. (line 65)
+* 'texpath' <1>: label. (line 113)
+* 'texpreamble': Frames and pictures.
+ (line 309)
+* 'texreset': Frames and pictures.
+ (line 313)
+* textbook graph: graph. (line 359)
+* 'tgz': UNIX binary distributions.
+ (line 6)
+* 'thick': three. (line 121)
+* 'thin': three. (line 121)
+* 'this': Structures. (line 6)
+* 'three': three. (line 6)
+* 'ThreeViews': three. (line 381)
+* 'ThreeViewsFR': three. (line 381)
+* 'ThreeViewsUS': three. (line 381)
+* tick: graph. (line 329)
+* 'ticks': graph. (line 159)
+* 'Ticks': graph. (line 159)
+* 'Ticks' <1>: graph. (line 232)
+* 'tildeframe': markers. (line 24)
+* tile: Pens. (line 265)
+* tilings: Pens. (line 251)
+* 'time': Data types. (line 312)
+* 'time' <1>: Data types. (line 337)
+* 'time' <2>: math. (line 30)
+* 'time' <3>: math. (line 34)
+* 'times': Paths and guides. (line 220)
+* 'times' <1>: Paths and guides. (line 224)
+* 'Top': graph. (line 134)
+* 'TopView': three. (line 366)
+* 'trace': Debugger. (line 50)
+* 'trailingzero': graph. (line 174)
+* 'transform': Transforms. (line 6)
+* 'transform' <1>: three. (line 455)
+* 'transform3': three. (line 418)
+* transparency: Pens. (line 233)
+* 'transpose': Arrays. (line 197)
+* 'transpose' <1>: Arrays. (line 200)
+* 'tree': tree. (line 6)
+* 'trembling': trembling. (line 6)
+* 'triangle': geometry. (line 6)
+* 'triangles': three. (line 110)
+* 'triangulate': contour. (line 149)
+* 'tridiagonal': Arrays. (line 255)
* trigonometric integrals: Mathematical functions.
- (line 48)
-* triple: Data types. (line 110)
-* TrueMargin: draw. (line 42)
-* TrueMargin3: three. (line 577)
-* tube <1>: tube. (line 6)
-* tube: three. (line 123)
-* tutorial: Tutorial. (line 6)
-* type1cm: Pens. (line 178)
-* typedef <1>: Functions. (line 36)
-* typedef: Data types. (line 361)
-* U3D: embed. (line 23)
-* undefined: Paths and guides. (line 273)
-* UnFill: Frames and pictures. (line 152)
-* unfill: fill. (line 110)
-* UnFill: draw. (line 26)
-* unicode: unicode. (line 6)
-* uniform: Arrays. (line 155)
-* Uninstall: Uninstall. (line 6)
-* unique: math. (line 64)
-* unit: Data types. (line 80)
-* unitbox <1>: three. (line 320)
-* unitbox: Tutorial. (line 155)
-* unitcircle <1>: three. (line 287)
-* unitcircle: Tutorial. (line 128)
-* unitrand: Mathematical functions.
- (line 39)
-* unitsize <1>: Frames and pictures. (line 64)
-* unitsize: Tutorial. (line 86)
+ (line 48)
+* 'triple': Data types. (line 136)
+* 'TrueMargin': draw. (line 42)
+* 'TrueMargin3': three. (line 559)
+* 'tube': three. (line 121)
+* 'tube' <1>: tube. (line 6)
+* tutorial: Tutorial. (line 6)
+* 'type1cm': Pens. (line 188)
+* 'typedef': Data types. (line 376)
+* 'typedef' <1>: Functions. (line 39)
+* 'U3D': embed. (line 22)
+* 'undefined': Paths and guides. (line 283)
+* 'UnFill': draw. (line 26)
+* unfill: fill. (line 109)
+* 'UnFill' <1>: Frames and pictures.
+ (line 165)
+* 'UnFill' <2>: Frames and pictures.
+ (line 168)
+* 'unicode': unicode. (line 6)
+* 'uniform': Arrays. (line 145)
+* Uninstall: Uninstall. (line 6)
+* 'unique': math. (line 63)
+* 'unit': Data types. (line 82)
+* 'unit' <1>: Data types. (line 172)
+* 'unitbox': Tutorial. (line 151)
+* 'unitbox' <1>: three. (line 287)
+* 'unitcircle': Tutorial. (line 124)
+* 'unitcircle' <1>: Tutorial. (line 124)
+* 'unitcircle' <2>: three. (line 255)
+* 'unitrand': Mathematical functions.
+ (line 39)
+* 'unitsize': Tutorial. (line 84)
+* 'unitsize' <1>: Frames and pictures.
+ (line 69)
* UNIX binary distributions: UNIX binary distributions.
- (line 6)
-* unpacking: Rest arguments. (line 39)
-* unravel: Import. (line 30)
-* up: three. (line 351)
-* update: Files. (line 36)
-* UpsideDown: Frames and pictures. (line 95)
-* usepackage: Frames and pictures. (line 291)
-* user coordinates: Tutorial. (line 86)
+ (line 6)
+* unpacking: Rest arguments. (line 39)
+* 'unravel': Import. (line 29)
+* 'up': three. (line 315)
+* 'update': Files. (line 36)
+* 'UpsideDown': Frames and pictures.
+ (line 104)
+* 'UpsideDown' <1>: Frames and pictures.
+ (line 110)
+* 'usepackage': Frames and pictures.
+ (line 316)
+* user coordinates: Tutorial. (line 84)
* user-defined operators: User-defined operators.
- (line 6)
-* usleep: Data types. (line 354)
-* value: math. (line 38)
-* var: Variable initializers.
- (line 63)
+ (line 6)
+* 'usleep': Data types. (line 370)
+* 'value': math. (line 38)
+* 'value' <1>: math. (line 41)
+* 'var': Variable initializers.
+ (line 55)
* variable initializers: Variable initializers.
- (line 6)
-* vectorfield: graph. (line 974)
-* vectorfield3: graph3. (line 160)
-* vectorization: Arrays. (line 323)
-* verbatim: Frames and pictures. (line 271)
-* vertex-dependent colors: three. (line 81)
-* Vertical: flowchart. (line 81)
-* viewportheight: LaTeX usage. (line 51)
-* viewportmargin: three. (line 275)
-* viewportsize: three. (line 275)
-* viewportwidth: LaTeX usage. (line 51)
-* views: three. (line 243)
-* vim: Editing modes. (line 33)
-* virtual functions: Structures. (line 181)
-* void: Data types. (line 10)
-* W: Tutorial. (line 106)
-* whatever: Paths and guides. (line 237)
-* Wheel: palette. (line 22)
-* wheel mouse: GUI. (line 6)
-* while: Programming. (line 29)
-* white-space string delimiter mode: Arrays. (line 354)
-* width: LaTeX usage. (line 51)
-* windingnumber: Paths and guides. (line 273)
-* word: Arrays. (line 354)
-* write <1>: Arrays. (line 394)
-* write: Files. (line 53)
-* X: three. (line 287)
-* xasy: GUI. (line 6)
-* xaxis3: graph3. (line 7)
-* xdr: Files. (line 75)
-* xelatex: Options. (line 145)
-* xequals: graph. (line 294)
-* XEquals: graph. (line 280)
-* xlimits: graph. (line 637)
-* XOR: Arithmetic & logical.
- (line 80)
-* xpart: Data types. (line 91)
-* xscale: Transforms. (line 33)
-* xscale3: three. (line 458)
-* xtick: graph. (line 343)
-* XY: three. (line 480)
-* XYEquals: graph3. (line 21)
-* XYZero: graph3. (line 21)
-* XZEquals: graph3. (line 21)
-* XZero: graph. (line 275)
-* XZZero: graph3. (line 21)
-* Y <1>: three. (line 287)
-* Y: Mathematical functions.
- (line 6)
-* yaxis3: graph3. (line 7)
-* yequals: graph. (line 294)
-* YEquals: graph. (line 130)
-* ylimits: graph. (line 637)
-* ypart: Data types. (line 94)
-* yscale: Transforms. (line 36)
-* yscale3: three. (line 461)
-* ytick: graph. (line 343)
-* YX: three. (line 495)
-* YZ: three. (line 495)
-* YZEquals: graph3. (line 21)
-* YZero: graph. (line 125)
-* YZZero: graph3. (line 21)
-* Z: three. (line 287)
-* zaxis3: graph3. (line 7)
-* zero_Ai: Mathematical functions.
- (line 48)
-* zero_Ai_deriv: Mathematical functions.
- (line 48)
-* zero_Bi: Mathematical functions.
- (line 48)
-* zero_Bi_deriv: Mathematical functions.
- (line 48)
-* zero_J: Mathematical functions.
- (line 48)
-* zerowinding: Pens. (line 152)
-* zeta: Mathematical functions.
- (line 48)
-* zpart: Data types. (line 163)
-* zscale3: three. (line 464)
-* ZX: three. (line 495)
-* ZY: three. (line 495)
-* |: Arithmetic & logical.
- (line 62)
-* ||: Arithmetic & logical.
- (line 59)
+ (line 6)
+* 'vectorfield': graph. (line 1003)
+* 'vectorfield' <1>: graph. (line 1042)
+* 'vectorfield3': graph3. (line 157)
+* vectorization: Arrays. (line 312)
+* verbatim: Frames and pictures.
+ (line 292)
+* vertex-dependent colors: three. (line 79)
+* 'Vertical': flowchart. (line 77)
+* 'viewportheight': LaTeX usage. (line 50)
+* 'viewportmargin': three. (line 243)
+* 'viewportsize': three. (line 243)
+* 'viewportwidth': LaTeX usage. (line 50)
+* 'views': three. (line 212)
+* 'vim': Editing modes. (line 32)
+* virtual functions: Structures. (line 181)
+* 'void': Data types. (line 10)
+* 'W': Tutorial. (line 103)
+* 'whatever': Paths and guides. (line 246)
+* 'Wheel': palette. (line 22)
+* wheel mouse: GUI. (line 6)
+* 'while': Programming. (line 30)
+* white-space string delimiter mode: Arrays. (line 343)
+* 'width': LaTeX usage. (line 50)
+* 'windingnumber': Paths and guides. (line 283)
+* 'word': Arrays. (line 343)
+* 'write': Files. (line 53)
+* 'write' <1>: Arrays. (line 383)
+* 'X': three. (line 255)
+* 'xasy': GUI. (line 6)
+* 'xaxis3': graph3. (line 7)
+* 'xdr': Files. (line 76)
+* 'xelatex': Options. (line 146)
+* 'XEquals': graph. (line 264)
+* 'xequals': graph. (line 277)
+* 'xlimits': graph. (line 638)
+* 'XOR': Arithmetic & logical.
+ (line 63)
+* 'xpart': Data types. (line 93)
+* 'xpart' <1>: Data types. (line 183)
+* 'xscale': Transforms. (line 30)
+* 'xscale3': three. (line 425)
+* xtick: graph. (line 329)
+* 'XY': three. (line 440)
+* 'XY' <1>: three. (line 455)
+* 'XYEquals': graph3. (line 21)
+* 'XYZero': graph3. (line 21)
+* 'XZEquals': graph3. (line 21)
+* 'XZero': graph. (line 259)
+* 'XZZero': graph3. (line 21)
+* 'Y': Mathematical functions.
+ (line 6)
+* 'Y' <1>: Mathematical functions.
+ (line 48)
+* 'Y' <2>: three. (line 255)
+* 'yaxis3': graph3. (line 7)
+* 'YEquals': graph. (line 127)
+* 'yequals': graph. (line 277)
+* 'ylimits': graph. (line 638)
+* 'ypart': Data types. (line 96)
+* 'ypart' <1>: Data types. (line 186)
+* 'yscale': Transforms. (line 32)
+* 'yscale3': three. (line 427)
+* ytick: graph. (line 329)
+* 'YX': three. (line 455)
+* 'YZ': three. (line 455)
+* 'YZEquals': graph3. (line 21)
+* 'YZero': graph. (line 122)
+* 'YZZero': graph3. (line 21)
+* 'Z': three. (line 255)
+* 'zaxis3': graph3. (line 7)
+* 'zerowinding': Pens. (line 160)
+* 'zero_Ai': Mathematical functions.
+ (line 48)
+* 'zero_Ai_deriv': Mathematical functions.
+ (line 48)
+* 'zero_Bi': Mathematical functions.
+ (line 48)
+* 'zero_Bi_deriv': Mathematical functions.
+ (line 48)
+* 'zero_J': Mathematical functions.
+ (line 48)
+* 'zeta': Mathematical functions.
+ (line 48)
+* 'zpart': Data types. (line 189)
+* 'zscale3': three. (line 429)
+* 'ZX': three. (line 455)
+* 'ZX' <1>: three. (line 455)
+* 'ZY': three. (line 455)

Tag Table:
-Node: Top575
-Node: Description6859
-Node: Installation10473
-Node: UNIX binary distributions11516
-Node: MacOS X binary distributions12622
-Node: Microsoft Windows13506
-Ref: psview14216
-Node: Configuring15150
-Node: Search paths19385
-Node: Compiling from UNIX source20227
-Node: Editing modes23124
+Node: Top570
+Node: Description6852
+Node: Installation10467
+Node: UNIX binary distributions11502
+Node: MacOS X binary distributions12607
+Node: Microsoft Windows13495
+Ref: psview14203
+Node: Configuring15139
+Node: Search paths19379
+Node: Compiling from UNIX source20218
+Node: Editing modes23128
Node: Subversion25556
Node: Uninstall26004
Node: Tutorial26354
-Ref: unitcircle30652
-Node: Drawing commands32708
-Node: draw34419
-Ref: arrows35567
-Node: fill40810
-Ref: gradient shading41854
-Node: clip46417
-Node: label47009
-Ref: Label47607
-Node: Bezier curves53410
-Node: Programming57112
-Ref: array iteration57926
-Node: Data types59032
-Ref: format68229
-Node: Paths and guides72482
-Ref: circle72736
-Ref: extension82294
-Node: Pens89349
-Ref: fillrule96717
-Ref: basealign97614
-Ref: transparency100431
-Ref: makepen103874
-Ref: overwrite104712
-Node: Transforms105922
-Node: Frames and pictures107713
-Ref: envelope108854
-Ref: size109937
-Ref: unitsize110924
-Ref: shipout111984
-Ref: filltype114317
-Ref: add117454
-Ref: add about118400
-Ref: tex121338
-Node: Files122212
-Ref: cd123195
-Ref: scroll127869
-Node: Variable initializers130784
-Node: Structures133509
-Node: Operators140984
-Node: Arithmetic & logical141298
-Node: Self & prefix operators143271
-Node: User-defined operators144059
-Node: Implicit scaling144970
-Node: Functions145533
-Ref: stack overflow148286
-Node: Default arguments148850
-Node: Named arguments149589
-Node: Rest arguments152160
-Node: Mathematical functions155281
-Node: Arrays159946
-Ref: sort166935
-Ref: tridiagonal169339
-Ref: solve170567
-Node: Slices174761
-Node: Casts178651
-Node: Import180616
-Node: Static185853
-Node: LaTeX usage188747
-Node: Base modules195142
-Node: plain197642
-Node: simplex198294
-Node: math198567
-Node: interpolate201272
-Node: geometry201551
-Node: trembling202145
-Node: stats202414
-Node: patterns202674
-Node: markers202910
-Node: tree204693
-Node: binarytree204881
-Node: drawtree205501
-Node: syzygy205705
-Node: feynman205979
-Node: roundedpath206254
-Node: animation206537
-Ref: animate206957
-Node: embed208078
-Node: slide209036
-Node: MetaPost209376
-Node: unicode210092
-Node: latin1210971
-Node: babel211339
-Node: labelpath211568
-Node: labelpath3212388
-Node: annotate212699
-Node: CAD213170
-Node: graph213480
-Ref: ticks220609
-Ref: pathmarkers233936
-Ref: marker234401
-Ref: markuniform234752
-Ref: errorbars236543
-Ref: automatic scaling240580
-Node: palette251209
-Ref: images251327
-Ref: image255499
-Ref: logimage255977
-Ref: penimage257038
-Ref: penfunctionimage257259
-Node: three257983
-Ref: PostScript3D283662
-Node: obj285354
-Node: graph3285606
-Ref: GaussianSurface290761
-Node: grid3291865
-Node: solids292605
-Node: tube293553
-Node: flowchart295788
-Node: contour300357
-Node: contour3305447
-Node: slopefield305754
-Node: ode307191
-Node: Options307451
-Ref: configuration file313504
-Ref: settings313504
-Ref: texengines314743
-Ref: convert314743
-Node: Interactive mode317913
-Ref: history320066
-Node: GUI321371
-Node: GUI installation321874
-Node: GUI usage323004
-Node: PostScript to Asymptote323907
-Node: Help324663
-Node: Debugger326389
-Node: Credits328174
-Node: Index329106
+Ref: unitcircle30896
+Node: Drawing commands33039
+Node: draw34754
+Ref: arrows35911
+Node: fill41159
+Ref: gradient shading42205
+Node: clip46767
+Node: label47363
+Ref: Label47963
+Node: Bezier curves53806
+Node: Programming57699
+Ref: array iteration58514
+Node: Data types59619
+Ref: format70021
+Node: Paths and guides74322
+Ref: circle74576
+Ref: extension84257
+Node: Pens91035
+Ref: fillrule98540
+Ref: basealign99444
+Ref: transparency102278
+Ref: makepen105821
+Ref: overwrite106698
+Node: Transforms107912
+Node: Frames and pictures109694
+Ref: envelope110852
+Ref: size111945
+Ref: unitsize112932
+Ref: shipout114005
+Ref: filltype116356
+Ref: add119528
+Ref: add about120477
+Ref: tex123480
+Node: Files124375
+Ref: cd125362
+Ref: scroll130047
+Node: Variable initializers132965
+Node: Structures135682
+Node: Operators143160
+Node: Arithmetic & logical143474
+Node: Self & prefix operators145415
+Node: User-defined operators146204
+Node: Implicit scaling147114
+Node: Functions147677
+Ref: stack overflow150462
+Node: Default arguments151027
+Node: Named arguments151765
+Node: Rest arguments154335
+Node: Mathematical functions157456
+Node: Arrays162119
+Ref: sort169101
+Ref: tridiagonal171530
+Ref: solve172761
+Node: Slices176954
+Node: Casts180847
+Node: Import182818
+Node: Static188065
+Node: LaTeX usage190958
+Node: Base modules197438
+Node: plain199938
+Node: simplex200591
+Node: math200865
+Node: interpolate203574
+Node: geometry203853
+Node: trembling204447
+Node: stats204716
+Node: patterns204976
+Node: markers205212
+Node: tree207070
+Node: binarytree207255
+Node: drawtree207920
+Node: syzygy208121
+Node: feynman208395
+Node: roundedpath208670
+Node: animation208953
+Ref: animate209374
+Node: embed210491
+Node: slide211446
+Node: MetaPost211787
+Node: unicode212506
+Node: latin1213380
+Node: babel213749
+Node: labelpath213979
+Node: labelpath3214800
+Node: annotate215111
+Node: CAD215581
+Node: graph215892
+Ref: ticks223030
+Ref: pathmarkers236620
+Ref: marker237090
+Ref: markuniform237444
+Ref: errorbars239242
+Ref: automatic scaling243521
+Node: palette254813
+Ref: images254931
+Ref: image259105
+Ref: logimage259624
+Ref: penimage260728
+Ref: penfunctionimage260989
+Node: three261759
+Ref: PostScript3D288548
+Node: obj290286
+Node: graph3290535
+Ref: GaussianSurface295811
+Node: grid3296959
+Node: solids297742
+Node: tube298733
+Node: flowchart300967
+Node: contour305574
+Node: contour3310876
+Node: slopefield311183
+Node: ode312664
+Node: Options312921
+Ref: configuration file319061
+Ref: settings319061
+Ref: texengines320304
+Ref: convert320304
+Node: Interactive mode323627
+Ref: history325776
+Node: GUI327080
+Node: GUI installation327584
+Node: GUI usage328709
+Node: PostScript to Asymptote329617
+Node: Help330375
+Node: Debugger332082
+Node: Credits333838
+Node: Index334772

End Tag Table
diff --git a/Build/source/utils/asymptote/examples/lemniscate.asy b/Build/source/utils/asymptote/examples/lemniscate.asy
new file mode 100644
index 00000000000..b151e43c18b
--- /dev/null
+++ b/Build/source/utils/asymptote/examples/lemniscate.asy
@@ -0,0 +1,20 @@
+settings.outformat = "png";;
+settings.render = 16;
+size(8cm);
+
+import smoothcontour3;
+
+// Erdos lemniscate of order n:
+real erdos(pair z, int n) { return abs(z^n-1)^2 - 1; }
+
+real h = 0.12;
+
+real lemn3(real x, real y) { return erdos((x,y), 3); }
+
+real f(real x, real y, real z) {
+ return lemn3(x,y)^2 + (16*abs((x,y))^4 + 1) * (z^2 - h^2);
+}
+
+draw(implicitsurface(f,a=(-3,-3,-3),b=(3,3,3),overlapedges=true),
+ surfacepen=material(diffusepen=gray(0.5),emissivepen=gray(0.4),
+ specularpen=gray(0.1)));
diff --git a/Build/source/utils/asymptote/gc-7.4.0.tar.gz b/Build/source/utils/asymptote/gc-7.4.0.tar.gz
deleted file mode 100644
index 67d331616e3..00000000000
--- a/Build/source/utils/asymptote/gc-7.4.0.tar.gz
+++ /dev/null
Binary files differ
diff --git a/Build/source/utils/asymptote/gc-7.4.2.tar.gz b/Build/source/utils/asymptote/gc-7.4.2.tar.gz
new file mode 100644
index 00000000000..b02100ff038
--- /dev/null
+++ b/Build/source/utils/asymptote/gc-7.4.2.tar.gz
Binary files differ
diff --git a/Build/source/utils/asymptote/glrender.cc b/Build/source/utils/asymptote/glrender.cc
index 401f7a91ecd..0ee98868e8a 100644
--- a/Build/source/utils/asymptote/glrender.cc
+++ b/Build/source/utils/asymptote/glrender.cc
@@ -654,7 +654,6 @@ void screen()
void nextframe(int)
{
- glFinish();
#ifdef HAVE_PTHREAD
endwait(readySignal,readyLock);
#endif
@@ -950,6 +949,19 @@ void mouse(int button, int state, int x, int y)
int mod=glutGetModifiers();
string Action=action(button,mod);
+ if(!Menu) {
+ if(mod == 0 && state == GLUT_UP && !Motion && Action == "zoom/menu") {
+ MenuButton=button;
+ glutMotionFunc(NULL);
+ glutTimerFunc(getSetting<Int>("doubleclick"),timeout,0);
+ glutAttachMenu(button);
+ Menu=true;
+ return;
+ } else Motion=false;
+ }
+
+ disableMenu();
+
if(Action == "zoomin") {
glutMotionFunc(NULL);
mousewheel(0,1,x,y);
@@ -961,18 +973,6 @@ void mouse(int button, int state, int x, int y)
return;
}
- if(Menu) disableMenu();
- else {
- if(mod == 0 && state == GLUT_UP && !Motion && Action == "zoom/menu") {
- MenuButton=button;
- glutMotionFunc(NULL);
- glutAttachMenu(button);
- Menu=true;
- glutTimerFunc(getSetting<Int>("doubleclick"),timeout,0);
- return;
- } else Motion=false;
- }
-
if(state == GLUT_DOWN) {
if(Action == "rotate" || Action == "rotateX" || Action == "rotateY") {
arcball.mouse_down(x,Height-y);
diff --git a/Build/source/utils/asymptote/lex.yy.cc b/Build/source/utils/asymptote/lex.yy.cc
index f0fc59573eb..6c972a70b64 100644
--- a/Build/source/utils/asymptote/lex.yy.cc
+++ b/Build/source/utils/asymptote/lex.yy.cc
@@ -18,7 +18,7 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 39
+#define YY_FLEX_SUBMINOR_VERSION 37
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
@@ -217,7 +217,6 @@ extern FILE *yyin, *yyout;
#define EOB_ACT_LAST_MATCH 2
#define YY_LESS_LINENO(n)
- #define YY_LINENO_REWIND_TO(ptr)
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
@@ -422,8 +421,6 @@ int yylineno = 1;
extern char *yytext;
#define yytext_ptr yytext
-/* %% [1.5] DFA */
-
/* %if-c-only Standard (non-C++) definition */
static yy_state_type yy_get_previous_state (void );
@@ -439,7 +436,7 @@ static void yy_fatal_error (yyconst char msg[] );
#define YY_DO_BEFORE_ACTION \
(yytext_ptr) = yy_bp; \
/* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\
- yyleng = (int) (yy_cp - yy_bp); \
+ yyleng = (size_t) (yy_cp - yy_bp); \
(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
/* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\
@@ -496,7 +493,7 @@ static yyconst flex_int16_t yy_accept[335] =
117, 117, 100, 0
} ;
-static yyconst YY_CHAR yy_ec[256] =
+static yyconst flex_int32_t yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
@@ -528,7 +525,7 @@ static yyconst YY_CHAR yy_ec[256] =
1, 1, 1, 1, 1
} ;
-static yyconst YY_CHAR yy_meta[62] =
+static yyconst flex_int32_t yy_meta[62] =
{ 0,
1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 3, 3,
@@ -996,7 +993,7 @@ void getstring(void)
-#line 1000 "lex.yy.cc"
+#line 997 "lex.yy.cc"
#define INITIAL 0
#define lexcomment 1
@@ -1242,6 +1239,12 @@ YY_DECL
register char *yy_cp, *yy_bp;
register int yy_act;
+/* %% [7.0] user's declarations go here */
+#line 209 "camp.l"
+
+
+#line 1247 "lex.yy.cc"
+
if ( !(yy_init) )
{
(yy_init) = 1;
@@ -1276,13 +1279,6 @@ YY_DECL
yy_load_buffer_state( );
}
- {
-/* %% [7.0] user's declarations go here */
-#line 209 "camp.l"
-
-
-#line 1285 "lex.yy.cc"
-
while ( 1 ) /* loops until end-of-file is reached */
{
/* %% [8.0] yymore()-related code goes here */
@@ -1301,7 +1297,7 @@ YY_DECL
yy_match:
do
{
- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
+ register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
if ( yy_accept[yy_current_state] )
{
(yy_last_accepting_state) = yy_current_state;
@@ -1396,7 +1392,6 @@ YY_RULE_SETUP
case 5:
/* rule 5 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
-YY_LINENO_REWIND_TO(yy_bp + 1);
(yy_c_buf_p) = yy_cp = yy_bp + 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
@@ -1446,7 +1441,6 @@ YY_RULE_SETUP
case 11:
/* rule 11 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
-YY_LINENO_REWIND_TO(yy_bp + 1);
(yy_c_buf_p) = yy_cp = yy_bp + 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
@@ -2098,7 +2092,7 @@ YY_RULE_SETUP
#line 443 "camp.l"
ECHO;
YY_BREAK
-#line 2102 "lex.yy.cc"
+#line 2096 "lex.yy.cc"
case YY_END_OF_BUFFER:
{
@@ -2228,7 +2222,6 @@ ECHO;
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
- } /* end of user's declarations */
} /* end of yylex */
/* %ok-for-header */
diff --git a/Build/source/utils/asymptote/libatomic_ops-7.4.0.tar.gz b/Build/source/utils/asymptote/libatomic_ops-7.4.0.tar.gz
deleted file mode 100644
index 2eaab058650..00000000000
--- a/Build/source/utils/asymptote/libatomic_ops-7.4.0.tar.gz
+++ /dev/null
Binary files differ
diff --git a/Build/source/utils/asymptote/libatomic_ops-7.4.2.tar.gz b/Build/source/utils/asymptote/libatomic_ops-7.4.2.tar.gz
new file mode 100644
index 00000000000..ec463474e58
--- /dev/null
+++ b/Build/source/utils/asymptote/libatomic_ops-7.4.2.tar.gz
Binary files differ
diff --git a/Build/source/utils/asymptote/pair.h b/Build/source/utils/asymptote/pair.h
index 51d93503efa..c66b2289296 100644
--- a/Build/source/utils/asymptote/pair.h
+++ b/Build/source/utils/asymptote/pair.h
@@ -159,6 +159,11 @@ public:
return z.x*w.x+z.y*w.y;
}
+ friend double cross(const pair& z, const pair& w)
+ {
+ return z.x*w.y-z.y*w.x;
+ }
+
// Return the principal branch of the square root (non-negative real part).
friend pair Sqrt(const pair& z) {
double mag=z.length();
diff --git a/Build/source/utils/asymptote/path3.cc b/Build/source/utils/asymptote/path3.cc
index 69adf4947b4..86029b6e60e 100644
--- a/Build/source/utils/asymptote/path3.cc
+++ b/Build/source/utils/asymptote/path3.cc
@@ -1075,9 +1075,9 @@ bool intersections(double& U, double& V, const triple& v, triple *P,
return false;
}
-void intersections(std::vector<double>& T, std::vector<double>& U,
+bool intersections(std::vector<double>& T, std::vector<double>& U,
std::vector<double>& V, path3& p, triple *P,
- double fuzz, unsigned depth)
+ double fuzz, bool single, unsigned depth)
{
if(errorstream::interrupt) throw interrupted();
@@ -1114,7 +1114,7 @@ void intersections(std::vector<double>& T, std::vector<double>& U,
T.push_back(0.5);
U.push_back(0.5);
V.push_back(0.5);
- return;
+ return true;
}
Int lp=p.length();
@@ -1138,7 +1138,7 @@ void intersections(std::vector<double>& T, std::vector<double>& U,
V1.push_back(v);
add(T,U,V,T1,U1,V1,p,1.0,0.0,0.0,0.0,fuzz2);
}
- return;
+ return T1.size() > 0;
}
tscale=toffset=0.5;
} else {
@@ -1162,62 +1162,109 @@ void intersections(std::vector<double>& T, std::vector<double>& U,
Split<triple> c9(c3.m2,c2.m2,c1.m2,c0.m2);
Split<triple> c10(P[15],P[11],P[7],P[3]);
+ static size_t maxcount=9;
+ size_t count=0;
+
+ bool Short=lp == 1;
+
// Check all 4 Bezier subpatches against p0.
triple Q0[]={P[0],c0.m0,c0.m3,c0.m5,c4.m2,c5.m2,c6.m2,c7.m2,
c4.m4,c5.m4,c6.m4,c7.m4,c4.m5,c5.m5,c6.m5,c7.m5};
- intersections(T1,U1,V1,p0,Q0,fuzz,depth);
- add(T,U,V,T1,U1,V1,p,tscale,0.0,0.0,0.0,fuzz2);
+ if(intersections(T1,U1,V1,p0,Q0,fuzz,single,depth)) {
+ add(T,U,V,T1,U1,V1,p,tscale,0.0,0.0,0.0,fuzz2);
+ if(single || depth <= mindepth)
+ return true;
+ count += T1.size();
+ if(Short && count > maxcount) return true;
+ }
T1.clear();
U1.clear();
V1.clear();
triple Q1[]={c0.m5,c0.m4,c0.m2,P[3],c7.m2,c8.m2,c9.m2,c10.m2,
c7.m4,c8.m4,c9.m4,c10.m4,c7.m5,c8.m5,c9.m5,c10.m5};
- intersections(T1,U1,V1,p0,Q1,fuzz,depth);
- add(T,U,V,T1,U1,V1,p,tscale,0.0,0.0,0.5,fuzz2);
+ if(intersections(T1,U1,V1,p0,Q1,fuzz,single,depth)) {
+ add(T,U,V,T1,U1,V1,p,tscale,0.0,0.0,0.5,fuzz2);
+ if(single || depth <= mindepth)
+ return true;
+ count += T1.size();
+ if(Short && count > maxcount) return true;
+ }
T1.clear();
U1.clear();
V1.clear();
triple Q2[]={c7.m5,c8.m5,c9.m5,c10.m5,c7.m3,c8.m3,c9.m3,c10.m3,
c7.m0,c8.m0,c9.m0,c10.m0,c3.m5,c3.m4,c3.m2,P[15]};
- intersections(T1,U1,V1,p0,Q2,fuzz,depth);
- add(T,U,V,T1,U1,V1,p,tscale,0.0,0.5,0.5,fuzz2);
+ if(intersections(T1,U1,V1,p0,Q2,fuzz,single,depth)) {
+ add(T,U,V,T1,U1,V1,p,tscale,0.0,0.5,0.5,fuzz2);
+ if(single || depth <= mindepth)
+ return true;
+ count += T1.size();
+ if(Short && count > maxcount) return true;
+ }
T1.clear();
U1.clear();
V1.clear();
triple Q3[]={c4.m5,c5.m5,c6.m5,c7.m5,c4.m3,c5.m3,c6.m3,c7.m3,
c4.m0,c5.m0,c6.m0,c7.m0,P[12],c3.m0,c3.m3,c3.m5};
- intersections(T1,U1,V1,p0,Q3,fuzz,depth);
- add(T,U,V,T1,U1,V1,p,tscale,0.0,0.5,0.0,fuzz2);
+ if(intersections(T1,U1,V1,p0,Q3,fuzz,single,depth)) {
+ add(T,U,V,T1,U1,V1,p,tscale,0.0,0.5,0.0,fuzz2);
+ if(single || depth <= mindepth)
+ return true;
+ count += T1.size();
+ if(Short && count > maxcount) return true;
+ }
// Check all 4 Bezier subpatches against p1.
T1.clear();
U1.clear();
V1.clear();
- intersections(T1,U1,V1,p1,Q0,fuzz,depth);
- add(T,U,V,T1,U1,V1,p,tscale,toffset,0.0,0.0,fuzz2);
+ if(intersections(T1,U1,V1,p1,Q0,fuzz,single,depth)) {
+ add(T,U,V,T1,U1,V1,p,tscale,toffset,0.0,0.0,fuzz2);
+ if(single || depth <= mindepth)
+ return true;
+ count += T1.size();
+ if(Short && count > maxcount) return true;
+ }
T1.clear();
U1.clear();
V1.clear();
- intersections(T1,U1,V1,p1,Q1,fuzz,depth);
- add(T,U,V,T1,U1,V1,p,tscale,toffset,0.0,0.5,fuzz2);
+ if(intersections(T1,U1,V1,p1,Q1,fuzz,single,depth)) {
+ add(T,U,V,T1,U1,V1,p,tscale,toffset,0.0,0.5,fuzz2);
+ if(single || depth <= mindepth)
+ return true;
+ count += T1.size();
+ if(Short && count > maxcount) return true;
+ }
T1.clear();
U1.clear();
V1.clear();
- intersections(T1,U1,V1,p1,Q2,fuzz,depth);
- add(T,U,V,T1,U1,V1,p,tscale,toffset,0.5,0.5,fuzz2);
+ if(intersections(T1,U1,V1,p1,Q2,fuzz,single,depth)) {
+ add(T,U,V,T1,U1,V1,p,tscale,toffset,0.5,0.5,fuzz2);
+ if(single || depth <= mindepth)
+ return true;
+ count += T1.size();
+ if(Short && count > maxcount) return true;
+ }
T1.clear();
U1.clear();
V1.clear();
- intersections(T1,U1,V1,p1,Q3,fuzz,depth);
- add(T,U,V,T1,U1,V1,p,tscale,toffset,0.5,0.0,fuzz2);
+ if(intersections(T1,U1,V1,p1,Q3,fuzz,single,depth)) {
+ add(T,U,V,T1,U1,V1,p,tscale,toffset,0.5,0.0,fuzz2);
+ if(single || depth <= mindepth)
+ return true;
+ count += T1.size();
+ if(Short && count > maxcount) return true;
+ }
+
+ return T.size() > 0;
}
-
+ return false;
}
} //namespace camp
diff --git a/Build/source/utils/asymptote/path3.h b/Build/source/utils/asymptote/path3.h
index 60fb7e68c99..7df33243d8a 100644
--- a/Build/source/utils/asymptote/path3.h
+++ b/Build/source/utils/asymptote/path3.h
@@ -345,9 +345,9 @@ bool intersections(double& s, double& t, std::vector<double>& S,
void intersections(std::vector<double>& S, path3& g,
const triple& p, const triple& q, double fuzz);
-void intersections(std::vector<double>& T, std::vector<double>& U,
+bool intersections(std::vector<double>& T, std::vector<double>& U,
std::vector<double>& V, path3& p, triple *P,
- double fuzz, unsigned depth=maxdepth);
+ double fuzz, bool single, unsigned depth=maxdepth);
bool intersections(double& U, double& V, const triple& v, triple *P,
double fuzz, unsigned depth=maxdepth);
diff --git a/Build/source/utils/asymptote/picture.cc b/Build/source/utils/asymptote/picture.cc
index d855e1f00e6..51b3122ec58 100644
--- a/Build/source/utils/asymptote/picture.cc
+++ b/Build/source/utils/asymptote/picture.cc
@@ -495,13 +495,15 @@ void texinit()
pd.TeXpipepreamble.clear();
}
-int opentex(const string& texname, const string& prefix)
+int opentex(const string& texname, const string& prefix, bool dvi)
{
string aux=auxname(prefix,"aux");
unlink(aux.c_str());
bool context=settings::context(getSetting<string>("tex"));
mem::vector<string> cmd;
cmd.push_back(texprogram());
+ if(dvi)
+ cmd.push_back("-output-format=dvi");
if(context) {
cmd.push_back("--nonstopmode");
cmd.push_back(texname);
@@ -598,7 +600,8 @@ bool picture::texprocess(const string& texname, const string& outname,
cmd.push_back("-T"+String(getSetting<double>("paperwidth"))+"bp,"+
String(paperHeight)+"bp");
push_split(cmd,getSetting<string>("dvipsOptions"));
- cmd.push_back("-t"+papertype);
+ if(getSetting<string>("papertype") != "")
+ cmd.push_back("-t"+papertype);
if(verbose <= 1) cmd.push_back("-q");
cmd.push_back("-o"+psname);
cmd.push_back(dviname);
@@ -932,21 +935,28 @@ bool picture::shipout(picture *preamble, const string& Prefix,
SetPageDimensions();
+ pair aligndir=getSetting<pair>("aligndir");
string origin=getSetting<string>("align");
pair bboxshift=(origin == "Z" && epsformat) ?
pair(0.0,0.0) : pair(-b.left,-b.bottom);
+
if(epsformat) {
bboxshift += getSetting<pair>("offset");
- if(origin != "Z" && origin != "B") {
- double yexcess=max(getSetting<double>("paperheight")-
- (b.top-b.bottom+1.0),0.0);
- if(origin == "T") bboxshift += pair(0.0,yexcess);
- else {
- double xexcess=max(getSetting<double>("paperwidth")-
- (b.right-b.left+1.0),0.0);
- bboxshift += pair(0.5*xexcess,0.5*yexcess);
+ double yexcess=max(getSetting<double>("paperheight")-
+ (b.top-b.bottom+1.0),0.0);
+ double xexcess=max(getSetting<double>("paperwidth")-
+ (b.right-b.left+1.0),0.0);
+ if(aligndir == pair(0,0)) {
+ if(origin != "Z" && origin != "B") {
+ if(origin == "T") bboxshift += pair(0.0,yexcess);
+ else bboxshift += pair(0.5*xexcess,0.5*yexcess);
}
+ } else {
+ double scale=max(abs(aligndir.getx()),abs(aligndir.gety()));
+ if(scale != 0) aligndir *= 0.5/scale;
+ bboxshift +=
+ pair((aligndir.getx()+0.5)*xexcess,(aligndir.gety()+0.5)*yexcess);
}
}
diff --git a/Build/source/utils/asymptote/picture.h b/Build/source/utils/asymptote/picture.h
index 0e8897f701e..a25bcd93cdf 100644
--- a/Build/source/utils/asymptote/picture.h
+++ b/Build/source/utils/asymptote/picture.h
@@ -116,7 +116,7 @@ inline picture *transformed(const vm::array& t, picture *p)
}
void texinit();
-int opentex(const string& texname, const string& prefix);
+int opentex(const string& texname, const string& prefix, bool dvi=false);
const char *texpathmessage();
diff --git a/Build/source/utils/asymptote/runarray.cc b/Build/source/utils/asymptote/runarray.cc
index eaf9b41513b..66ff7469db2 100644
--- a/Build/source/utils/asymptote/runarray.cc
+++ b/Build/source/utils/asymptote/runarray.cc
@@ -1262,8 +1262,8 @@ void array3Transpose(stack *Stack)
}
}
- delete [] i;
- delete [] size;
+ delete[] i;
+ delete[] size;
{Stack->push<array*>(c); return;}
}
@@ -1345,7 +1345,7 @@ void gen_runarray47(stack *Stack)
copyArray2C(A,a,true,0,NoGC);
inverse(A,n);
a=copyCArray2(n,n,A);
- delete A;
+ delete[] A;
{Stack->push<realarray2*>(a); return;}
}
@@ -1942,8 +1942,8 @@ void gen_runarray64(stack *Stack)
Int sign=vm::pop<Int>(Stack,1);
pairarray * a=vm::pop<pairarray *>(Stack);
#line 1613 "runarray.in"
- unsigned n=(unsigned) checkArray(a);
#ifdef HAVE_LIBFFTW3
+ unsigned n=(unsigned) checkArray(a);
array *c=new array(n);
if(n) {
Complex *f=fftwpp::ComplexAlign(n);
@@ -1962,7 +1962,6 @@ void gen_runarray64(stack *Stack)
fftwpp::deleteAlign(f);
}
#else
- unused(&n);
unused(&sign);
array *c=new array(0);
error("Please install fftw3, run ./configure, and recompile");
@@ -1970,12 +1969,12 @@ void gen_runarray64(stack *Stack)
{Stack->push<pairarray*>(c); return;}
}
-#line 1642 "runarray.in"
+#line 1641 "runarray.in"
// Intarray2* triangulate(pairarray *z);
void gen_runarray65(stack *Stack)
{
pairarray * z=vm::pop<pairarray *>(Stack);
-#line 1643 "runarray.in"
+#line 1642 "runarray.in"
size_t nv=checkArray(z);
// Call robust version of Gilles Dumoulin's port of Paul Bourke's
// triangulation code.
@@ -2009,12 +2008,12 @@ void gen_runarray65(stack *Stack)
{Stack->push<Intarray2*>(t); return;}
}
-#line 1677 "runarray.in"
+#line 1676 "runarray.in"
// real norm(realarray *a);
void gen_runarray66(stack *Stack)
{
realarray * a=vm::pop<realarray *>(Stack);
-#line 1678 "runarray.in"
+#line 1677 "runarray.in"
size_t n=checkArray(a);
real M=0.0;
for(size_t i=0; i < n; ++i) {
@@ -2024,12 +2023,12 @@ void gen_runarray66(stack *Stack)
{Stack->push<real>(M); return;}
}
-#line 1688 "runarray.in"
+#line 1687 "runarray.in"
// real norm(realarray2 *a);
void gen_runarray67(stack *Stack)
{
realarray2 * a=vm::pop<realarray2 *>(Stack);
-#line 1689 "runarray.in"
+#line 1688 "runarray.in"
size_t n=checkArray(a);
real M=0.0;
for(size_t i=0; i < n; ++i) {
@@ -2043,12 +2042,12 @@ void gen_runarray67(stack *Stack)
{Stack->push<real>(M); return;}
}
-#line 1703 "runarray.in"
+#line 1702 "runarray.in"
// real norm(triplearray2 *a);
void gen_runarray68(stack *Stack)
{
triplearray2 * a=vm::pop<triplearray2 *>(Stack);
-#line 1704 "runarray.in"
+#line 1703 "runarray.in"
size_t n=checkArray(a);
real M=0.0;
for(size_t i=0; i < n; ++i) {
@@ -2062,12 +2061,12 @@ void gen_runarray68(stack *Stack)
{Stack->push<real>(sqrt(M)); return;}
}
-#line 1718 "runarray.in"
+#line 1717 "runarray.in"
// real change2(triplearray2 *a);
void gen_runarray69(stack *Stack)
{
triplearray2 * a=vm::pop<triplearray2 *>(Stack);
-#line 1719 "runarray.in"
+#line 1718 "runarray.in"
size_t n=checkArray(a);
if(n == 0) {Stack->push<real>(0.0); return;}
@@ -2088,13 +2087,13 @@ void gen_runarray69(stack *Stack)
{Stack->push<real>(M); return;}
}
-#line 1740 "runarray.in"
+#line 1739 "runarray.in"
// triple minbezier(triplearray2 *P, triple b);
void gen_runarray70(stack *Stack)
{
triple b=vm::pop<triple>(Stack);
triplearray2 * P=vm::pop<triplearray2 *>(Stack);
-#line 1741 "runarray.in"
+#line 1740 "runarray.in"
real *A=copyTripleArray2Components(P,true,4);
b=triple(bound(A,::min,b.getx(),sqrtFuzz*norm(A,16)),
bound(A+16,::min,b.gety(),sqrtFuzz*norm(A+16,16)),
@@ -2103,13 +2102,13 @@ void gen_runarray70(stack *Stack)
{Stack->push<triple>(b); return;}
}
-#line 1750 "runarray.in"
+#line 1749 "runarray.in"
// triple maxbezier(triplearray2 *P, triple b);
void gen_runarray71(stack *Stack)
{
triple b=vm::pop<triple>(Stack);
triplearray2 * P=vm::pop<triplearray2 *>(Stack);
-#line 1751 "runarray.in"
+#line 1750 "runarray.in"
real *A=copyTripleArray2Components(P,true,4);
b=triple(bound(A,::max,b.getx(),sqrtFuzz*norm(A,16)),
bound(A+16,::max,b.gety(),sqrtFuzz*norm(A+16,16)),
@@ -2118,13 +2117,13 @@ void gen_runarray71(stack *Stack)
{Stack->push<triple>(b); return;}
}
-#line 1760 "runarray.in"
+#line 1759 "runarray.in"
// pair minratio(triplearray2 *P, pair b);
void gen_runarray72(stack *Stack)
{
pair b=vm::pop<pair>(Stack);
triplearray2 * P=vm::pop<triplearray2 *>(Stack);
-#line 1761 "runarray.in"
+#line 1760 "runarray.in"
triple *A;
copyArray2C(A,P,true,4);
real fuzz=sqrtFuzz*norm(A,16);
@@ -2134,13 +2133,13 @@ void gen_runarray72(stack *Stack)
{Stack->push<pair>(b); return;}
}
-#line 1771 "runarray.in"
+#line 1770 "runarray.in"
// pair maxratio(triplearray2 *P, pair b);
void gen_runarray73(stack *Stack)
{
pair b=vm::pop<pair>(Stack);
triplearray2 * P=vm::pop<triplearray2 *>(Stack);
-#line 1772 "runarray.in"
+#line 1771 "runarray.in"
triple *A;
copyArray2C(A,P,true,4);
real fuzz=sqrtFuzz*norm(A,16);
@@ -2150,11 +2149,11 @@ void gen_runarray73(stack *Stack)
{Stack->push<pair>(b); return;}
}
-#line 1782 "runarray.in"
+#line 1781 "runarray.in"
// realarray* _projection();
void gen_runarray74(stack *Stack)
{
-#line 1783 "runarray.in"
+#line 1782 "runarray.in"
#ifdef HAVE_GL
array *a=new array(14);
gl::projection P=gl::camera();
@@ -2321,25 +2320,25 @@ void gen_runarray_venv(venv &ve)
addFunc(ve, run::gen_runarray63, primReal(), SYM(simpson), formal(realRealFunction(), SYM(f), false, false), formal(primReal(), SYM(a), false, false), formal(primReal(), SYM(b), false, false), formal(primReal(), SYM(acc), true, false), formal(primReal(), SYM(dxmax), true, false));
#line 1611 "runarray.in"
addFunc(ve, run::gen_runarray64, pairArray(), SYM(fft), formal(pairArray(), SYM(a), false, false), formal(primInt(), SYM(sign), true, false));
-#line 1642 "runarray.in"
+#line 1641 "runarray.in"
addFunc(ve, run::gen_runarray65, IntArray2(), SYM(triangulate), formal(pairArray(), SYM(z), false, false));
-#line 1677 "runarray.in"
+#line 1676 "runarray.in"
addFunc(ve, run::gen_runarray66, primReal(), SYM(norm), formal(realArray(), SYM(a), false, false));
-#line 1688 "runarray.in"
+#line 1687 "runarray.in"
addFunc(ve, run::gen_runarray67, primReal(), SYM(norm), formal(realArray2(), SYM(a), false, false));
-#line 1703 "runarray.in"
+#line 1702 "runarray.in"
addFunc(ve, run::gen_runarray68, primReal(), SYM(norm), formal(tripleArray2(), SYM(a), false, false));
-#line 1718 "runarray.in"
+#line 1717 "runarray.in"
addFunc(ve, run::gen_runarray69, primReal(), SYM(change2), formal(tripleArray2(), SYM(a), false, false));
-#line 1740 "runarray.in"
+#line 1739 "runarray.in"
addFunc(ve, run::gen_runarray70, primTriple(), SYM(minbezier), formal(tripleArray2(), SYM(p), false, false), formal(primTriple(), SYM(b), false, false));
-#line 1750 "runarray.in"
+#line 1749 "runarray.in"
addFunc(ve, run::gen_runarray71, primTriple(), SYM(maxbezier), formal(tripleArray2(), SYM(p), false, false), formal(primTriple(), SYM(b), false, false));
-#line 1760 "runarray.in"
+#line 1759 "runarray.in"
addFunc(ve, run::gen_runarray72, primPair(), SYM(minratio), formal(tripleArray2(), SYM(p), false, false), formal(primPair(), SYM(b), false, false));
-#line 1771 "runarray.in"
+#line 1770 "runarray.in"
addFunc(ve, run::gen_runarray73, primPair(), SYM(maxratio), formal(tripleArray2(), SYM(p), false, false), formal(primPair(), SYM(b), false, false));
-#line 1782 "runarray.in"
+#line 1781 "runarray.in"
addFunc(ve, run::gen_runarray74, realArray(), SYM(_projection));
}
diff --git a/Build/source/utils/asymptote/runarray.in b/Build/source/utils/asymptote/runarray.in
index c9f80a12297..ca2f0bc6d39 100644
--- a/Build/source/utils/asymptote/runarray.in
+++ b/Build/source/utils/asymptote/runarray.in
@@ -1044,8 +1044,8 @@ array* :array3Transpose(array *a, array *perm)
}
}
- delete [] i;
- delete [] size;
+ delete[] i;
+ delete[] size;
return c;
}
@@ -1109,7 +1109,7 @@ realarray2 *inverse(realarray2 *a)
copyArray2C(A,a,true,0,NoGC);
inverse(A,n);
a=copyCArray2(n,n,A);
- delete A;
+ delete[] A;
return a;
}
@@ -1611,8 +1611,8 @@ real simpson(callableReal *f, real a, real b, real acc=DBL_EPSILON,
// Compute the fast Fourier transform of a pair array
pairarray* fft(pairarray *a, Int sign=1)
{
- unsigned n=(unsigned) checkArray(a);
#ifdef HAVE_LIBFFTW3
+ unsigned n=(unsigned) checkArray(a);
array *c=new array(n);
if(n) {
Complex *f=fftwpp::ComplexAlign(n);
@@ -1631,7 +1631,6 @@ pairarray* fft(pairarray *a, Int sign=1)
fftwpp::deleteAlign(f);
}
#else
- unused(&n);
unused(&sign);
array *c=new array(0);
error("Please install fftw3, run ./configure, and recompile");
diff --git a/Build/source/utils/asymptote/runlabel.cc b/Build/source/utils/asymptote/runlabel.cc
index 2df1d839bfb..e19997b9982 100644
--- a/Build/source/utils/asymptote/runlabel.cc
+++ b/Build/source/utils/asymptote/runlabel.cc
@@ -64,7 +64,7 @@ function *realRealFunction();
#include "drawlabel.h"
#include "locate.h"
- using namespace camp;
+using namespace camp;
using namespace vm;
using namespace settings;
@@ -131,7 +131,7 @@ void showpath(std::ostream& ps)
fillpath(ps);
}
-array *readpath(const string& psname, bool keep,
+array *readpath(const string& psname, bool keep, bool pdf=false,
double hscale=1.0, double vsign=1.0)
{
double vscale=vsign*hscale;
@@ -155,15 +155,15 @@ array *readpath(const string& psname, bool keep,
#else
const string null="/dev/null";
#endif
- cmd.push_back("-sDEVICE=epswrite");
+ cmd.push_back("-sDEVICE=eps2write");
cmd.push_back("-sOutputFile="+null);
cmd.push_back(stripDir(psname));
iopipestream gs(cmd,"gs","Ghostscript");
- while(true) {
+ while(gs.running()) {
stringstream buf;
string s=gs.readline();
- if(s.empty() || !gs.running()) break;
- gs << newl;
+ if(s.empty()) break;
+ if(!pdf) gs << newl;
// Workaround broken stringstream container in MacOS 10.9 libc++.
#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__ )
@@ -332,7 +332,7 @@ void gen_runlabel3(stack *Stack)
string dviname=auxname(prefix,"dvi");
bbox b;
string texengine=getSetting<string>("tex");
- bool pdf=settings::pdf(texengine);
+ bool xe=settings::xe(texengine);
texfile tex(texname,b,true);
tex.miniprologue();
@@ -347,7 +347,7 @@ void gen_runlabel3(stack *Stack)
else
tex.verbatimline("\\newpage");
}
- if(!pdf) {
+ if(!xe) {
tex.verbatimline("\\special{ps:");
tex.verbatimline(ASYx);
tex.verbatimline(ASYy);
@@ -363,35 +363,48 @@ void gen_runlabel3(stack *Stack)
tex.epilogue(true);
tex.close();
- int status=opentex(texname,prefix);
+ int status=opentex(texname,prefix,!xe);
- string pdfname;
+ string pdfname,pdfname2,psname2;
if(!status) {
- if(pdf) {
+ if(xe) {
pdfname=auxname(prefix,"pdf");
+ pdfname2=auxname(prefix+"_","pdf");
+ psname2=auxname(prefix+"_","ps");
if(!fs::exists(pdfname)) {Stack->push<patharray2*>(new array(n)); return;}
- std::ofstream ps(psname.c_str());
+ std::ofstream ps(psname.c_str(),std::ios::binary);
if(!ps) cannotwrite(psname);
showpath(ps);
- mem::vector<string> cmd;
- cmd.push_back(getSetting<string>("gs"));
- cmd.push_back("-q");
- cmd.push_back("-dNOCACHE");
- cmd.push_back("-dNOPAUSE");
- cmd.push_back("-dBATCH");
- if(safe) cmd.push_back("-dSAFER");
- cmd.push_back("-sDEVICE=epswrite");
- cmd.push_back("-sOutputFile=-");
- cmd.push_back(pdfname);
- iopipestream gs(cmd,"gs","Ghostscript");
- while(true) {
- string line=gs.readline();
- if(line.empty() || !gs.running()) break;
- ps << line;
+ mem::vector<string> pcmd;
+ pcmd.push_back(getSetting<string>("gs"));
+ pcmd.push_back("-q");
+ pcmd.push_back("-dNOCACHE");
+ pcmd.push_back("-dNOPAUSE");
+ pcmd.push_back("-dBATCH");
+ if(safe) pcmd.push_back("-dSAFER");
+ pcmd.push_back("-sDEVICE=pdfwrite");
+ pcmd.push_back("-sOutputFile="+pdfname2);
+ pcmd.push_back(pdfname);
+ status=System(pcmd,0,true,"gs");
+ if(status == 0) {
+ mem::vector<string> cmd;
+ cmd.push_back(getSetting<string>("gs"));
+ cmd.push_back("-q");
+ cmd.push_back("-dNOCACHE");
+ cmd.push_back("-dNOPAUSE");
+ cmd.push_back("-dBATCH");
+ if(safe) cmd.push_back("-dSAFER");
+ cmd.push_back("-sDEVICE=eps2write");
+ cmd.push_back("-sOutputFile="+psname2);
+ cmd.push_back(pdfname2);
+ status=System(cmd,0,true,"gs");
+
+ std::ifstream in(psname2.c_str(),std::ios::binary);
+ ps << in.rdbuf();
+ ps.close();
}
- ps.close();
} else {
if(!fs::exists(dviname)) {Stack->push<patharray2*>(new array(n)); return;}
mem::vector<string> dcmd;
@@ -416,9 +429,11 @@ void gen_runlabel3(stack *Stack)
if(!getSetting<bool>("keepaux"))
unlink(auxname(prefix,"aux").c_str());
unlink(auxname(prefix,"log").c_str());
- if(pdf)
+ if(xe) {
unlink(pdfname.c_str());
- else
+ unlink(pdfname2.c_str());
+ unlink(psname2.c_str());
+ } else
unlink(dviname.c_str());
if(settings::context(texengine)) {
unlink(auxname(prefix,"top").c_str());
@@ -426,16 +441,17 @@ void gen_runlabel3(stack *Stack)
unlink(auxname(prefix,"tui").c_str());
}
}
- {Stack->push<patharray2*>(pdf ? readpath(psname,keep,0.1) : readpath(psname,keep,0.12,-1.0)); return;}
+ {Stack->push<patharray2*>(xe ? readpath(psname,keep,true,0.1) :
+ readpath(psname,keep,false,0.12,-1.0)); return;}
}
-#line 359 "runlabel.in"
+#line 375 "runlabel.in"
// patharray2* textpath(stringarray *s, penarray *p);
void gen_runlabel4(stack *Stack)
{
penarray * p=vm::pop<penarray *>(Stack);
stringarray * s=vm::pop<stringarray *>(Stack);
-#line 360 "runlabel.in"
+#line 376 "runlabel.in"
size_t n=checkArrays(s,p);
if(n == 0) {Stack->push<patharray2*>(new array(0)); return;}
@@ -476,7 +492,7 @@ void gen_runlabel4(stack *Stack)
cmd2.push_back("-dBATCH");
cmd2.push_back("-P");
if(safe) cmd2.push_back("-dSAFER");
- cmd2.push_back("-sDEVICE=epswrite");
+ cmd2.push_back("-sDEVICE=eps2write");
cmd2.push_back("-sOutputFile=-");
cmd2.push_back("-");
iopipestream gs(cmd2,"gs","Ghostscript");
@@ -505,16 +521,16 @@ void gen_runlabel4(stack *Stack)
bool keep=getSetting<bool>("keep");
if(!keep) // Delete temporary files.
unlink(textname.c_str());
- {Stack->push<patharray2*>(readpath(psname,keep,0.1)); return;}
+ {Stack->push<patharray2*>(readpath(psname,keep,false,0.1)); return;}
}
-#line 433 "runlabel.in"
+#line 449 "runlabel.in"
// patharray* _strokepath(path g, pen p=CURRENTPEN);
void gen_runlabel5(stack *Stack)
{
pen p=vm::pop<pen>(Stack,CURRENTPEN);
path g=vm::pop<path>(Stack);
-#line 434 "runlabel.in"
+#line 450 "runlabel.in"
array *P=new array(0);
if(g.size() == 0) {Stack->push<patharray*>(P); return;}
@@ -552,9 +568,9 @@ void gen_runlabel_venv(venv &ve)
addFunc(ve, run::gen_runlabel2, realArray(), SYM(texsize), formal(primString(), SYM(s), false, false), formal(primPen(), SYM(p), true, false));
#line 251 "runlabel.in"
addFunc(ve, run::gen_runlabel3, pathArray2() , SYM(_texpath), formal(stringArray() , SYM(s), false, false), formal(penArray() , SYM(p), false, false));
-#line 359 "runlabel.in"
+#line 375 "runlabel.in"
addFunc(ve, run::gen_runlabel4, pathArray2() , SYM(textpath), formal(stringArray() , SYM(s), false, false), formal(penArray() , SYM(p), false, false));
-#line 433 "runlabel.in"
+#line 449 "runlabel.in"
addFunc(ve, run::gen_runlabel5, pathArray() , SYM(_strokepath), formal(primPath(), SYM(g), false, false), formal(primPen(), SYM(p), true, false));
}
diff --git a/Build/source/utils/asymptote/runlabel.in b/Build/source/utils/asymptote/runlabel.in
index 961e2e9e65a..b4595741251 100644
--- a/Build/source/utils/asymptote/runlabel.in
+++ b/Build/source/utils/asymptote/runlabel.in
@@ -20,7 +20,7 @@ pen => primPen()
#include "drawlabel.h"
#include "locate.h"
- using namespace camp;
+using namespace camp;
using namespace vm;
using namespace settings;
@@ -87,7 +87,7 @@ void showpath(std::ostream& ps)
fillpath(ps);
}
-array *readpath(const string& psname, bool keep,
+array *readpath(const string& psname, bool keep, bool pdf=false,
double hscale=1.0, double vsign=1.0)
{
double vscale=vsign*hscale;
@@ -111,15 +111,15 @@ array *readpath(const string& psname, bool keep,
#else
const string null="/dev/null";
#endif
- cmd.push_back("-sDEVICE=epswrite");
+ cmd.push_back("-sDEVICE=eps2write");
cmd.push_back("-sOutputFile="+null);
cmd.push_back(stripDir(psname));
iopipestream gs(cmd,"gs","Ghostscript");
- while(true) {
+ while(gs.running()) {
stringstream buf;
string s=gs.readline();
- if(s.empty() || !gs.running()) break;
- gs << newl;
+ if(s.empty()) break;
+ if(!pdf) gs << newl;
// Workaround broken stringstream container in MacOS 10.9 libc++.
#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__ )
@@ -259,7 +259,7 @@ patharray2 *_texpath(stringarray *s, penarray *p)
string dviname=auxname(prefix,"dvi");
bbox b;
string texengine=getSetting<string>("tex");
- bool pdf=settings::pdf(texengine);
+ bool xe=settings::xe(texengine);
texfile tex(texname,b,true);
tex.miniprologue();
@@ -274,7 +274,7 @@ patharray2 *_texpath(stringarray *s, penarray *p)
else
tex.verbatimline("\\newpage");
}
- if(!pdf) {
+ if(!xe) {
tex.verbatimline("\\special{ps:");
tex.verbatimline(ASYx);
tex.verbatimline(ASYy);
@@ -290,35 +290,48 @@ patharray2 *_texpath(stringarray *s, penarray *p)
tex.epilogue(true);
tex.close();
- int status=opentex(texname,prefix);
+ int status=opentex(texname,prefix,!xe);
- string pdfname;
+ string pdfname,pdfname2,psname2;
if(!status) {
- if(pdf) {
+ if(xe) {
pdfname=auxname(prefix,"pdf");
+ pdfname2=auxname(prefix+"_","pdf");
+ psname2=auxname(prefix+"_","ps");
if(!fs::exists(pdfname)) return new array(n);
- std::ofstream ps(psname.c_str());
+ std::ofstream ps(psname.c_str(),std::ios::binary);
if(!ps) cannotwrite(psname);
showpath(ps);
- mem::vector<string> cmd;
- cmd.push_back(getSetting<string>("gs"));
- cmd.push_back("-q");
- cmd.push_back("-dNOCACHE");
- cmd.push_back("-dNOPAUSE");
- cmd.push_back("-dBATCH");
- if(safe) cmd.push_back("-dSAFER");
- cmd.push_back("-sDEVICE=epswrite");
- cmd.push_back("-sOutputFile=-");
- cmd.push_back(pdfname);
- iopipestream gs(cmd,"gs","Ghostscript");
- while(true) {
- string line=gs.readline();
- if(line.empty() || !gs.running()) break;
- ps << line;
+ mem::vector<string> pcmd;
+ pcmd.push_back(getSetting<string>("gs"));
+ pcmd.push_back("-q");
+ pcmd.push_back("-dNOCACHE");
+ pcmd.push_back("-dNOPAUSE");
+ pcmd.push_back("-dBATCH");
+ if(safe) pcmd.push_back("-dSAFER");
+ pcmd.push_back("-sDEVICE=pdfwrite");
+ pcmd.push_back("-sOutputFile="+pdfname2);
+ pcmd.push_back(pdfname);
+ status=System(pcmd,0,true,"gs");
+ if(status == 0) {
+ mem::vector<string> cmd;
+ cmd.push_back(getSetting<string>("gs"));
+ cmd.push_back("-q");
+ cmd.push_back("-dNOCACHE");
+ cmd.push_back("-dNOPAUSE");
+ cmd.push_back("-dBATCH");
+ if(safe) cmd.push_back("-dSAFER");
+ cmd.push_back("-sDEVICE=eps2write");
+ cmd.push_back("-sOutputFile="+psname2);
+ cmd.push_back(pdfname2);
+ status=System(cmd,0,true,"gs");
+
+ std::ifstream in(psname2.c_str(),std::ios::binary);
+ ps << in.rdbuf();
+ ps.close();
}
- ps.close();
} else {
if(!fs::exists(dviname)) return new array(n);
mem::vector<string> dcmd;
@@ -343,9 +356,11 @@ patharray2 *_texpath(stringarray *s, penarray *p)
if(!getSetting<bool>("keepaux"))
unlink(auxname(prefix,"aux").c_str());
unlink(auxname(prefix,"log").c_str());
- if(pdf)
+ if(xe) {
unlink(pdfname.c_str());
- else
+ unlink(pdfname2.c_str());
+ unlink(psname2.c_str());
+ } else
unlink(dviname.c_str());
if(settings::context(texengine)) {
unlink(auxname(prefix,"top").c_str());
@@ -353,7 +368,8 @@ patharray2 *_texpath(stringarray *s, penarray *p)
unlink(auxname(prefix,"tui").c_str());
}
}
- return pdf ? readpath(psname,keep,0.1) : readpath(psname,keep,0.12,-1.0);
+ return xe ? readpath(psname,keep,true,0.1) :
+ readpath(psname,keep,false,0.12,-1.0);
}
patharray2 *textpath(stringarray *s, penarray *p)
@@ -398,7 +414,7 @@ patharray2 *textpath(stringarray *s, penarray *p)
cmd2.push_back("-dBATCH");
cmd2.push_back("-P");
if(safe) cmd2.push_back("-dSAFER");
- cmd2.push_back("-sDEVICE=epswrite");
+ cmd2.push_back("-sDEVICE=eps2write");
cmd2.push_back("-sOutputFile=-");
cmd2.push_back("-");
iopipestream gs(cmd2,"gs","Ghostscript");
@@ -427,7 +443,7 @@ patharray2 *textpath(stringarray *s, penarray *p)
bool keep=getSetting<bool>("keep");
if(!keep) // Delete temporary files.
unlink(textname.c_str());
- return readpath(psname,keep,0.1);
+ return readpath(psname,keep,false,0.1);
}
patharray *_strokepath(path g, pen p=CURRENTPEN)
diff --git a/Build/source/utils/asymptote/runpair.cc b/Build/source/utils/asymptote/runpair.cc
index 4e68bf1a1a5..80936e7bd0d 100644
--- a/Build/source/utils/asymptote/runpair.cc
+++ b/Build/source/utils/asymptote/runpair.cc
@@ -234,7 +234,7 @@ void gen_runpair13(stack *Stack)
{
real deg=vm::pop<real>(Stack);
#line 122 "runpair.in"
- int n=deg/90.0;
+ int n=(int) (deg/90.0);
if(deg == n*90.0) {
int m=n % 4;
if(m < 0) m += 4;
@@ -251,7 +251,7 @@ void gen_runpair14(stack *Stack)
{
real deg=vm::pop<real>(Stack);
#line 135 "runpair.in"
- int n=deg/90.0;
+ int n=(int) (deg/90.0);
if(deg == n*90.0) {
int m=n % 4;
if(m < 0) m += 4;
@@ -268,7 +268,7 @@ void gen_runpair15(stack *Stack)
{
real deg=vm::pop<real>(Stack);
#line 148 "runpair.in"
- int n=deg/90.0;
+ int n=(int) (deg/90.0);
if(deg == n*90.0) {
int m=n % 4;
if(m < 0) m += 4;
@@ -418,56 +418,67 @@ void gen_runpair30(stack *Stack)
{Stack->push<real>(dot(z,w)); return;}
}
-#line 237 "runpair.in"
-// pair bezier(pair a, pair b, pair c, pair d, real t);
+// Return the 2D scalar cross product z.x*w.y-z.y*w.x.
+#line 238 "runpair.in"
+// real cross(explicit pair z, explicit pair w);
void gen_runpair31(stack *Stack)
{
+ pair w=vm::pop<pair>(Stack);
+ pair z=vm::pop<pair>(Stack);
+#line 239 "runpair.in"
+ {Stack->push<real>(cross(z,w)); return;}
+}
+
+#line 243 "runpair.in"
+// pair bezier(pair a, pair b, pair c, pair d, real t);
+void gen_runpair32(stack *Stack)
+{
real t=vm::pop<real>(Stack);
pair d=vm::pop<pair>(Stack);
pair c=vm::pop<pair>(Stack);
pair b=vm::pop<pair>(Stack);
pair a=vm::pop<pair>(Stack);
-#line 238 "runpair.in"
+#line 244 "runpair.in"
real onemt=1-t;
real onemt2=onemt*onemt;
{Stack->push<pair>(onemt2*onemt*a+t*(3.0*(onemt2*b+t*onemt*c)+t*t*d)); return;}
}
-#line 244 "runpair.in"
+#line 250 "runpair.in"
// pair bezierP(pair a, pair b, pair c, pair d, real t);
-void gen_runpair32(stack *Stack)
+void gen_runpair33(stack *Stack)
{
real t=vm::pop<real>(Stack);
pair d=vm::pop<pair>(Stack);
pair c=vm::pop<pair>(Stack);
pair b=vm::pop<pair>(Stack);
pair a=vm::pop<pair>(Stack);
-#line 245 "runpair.in"
+#line 251 "runpair.in"
{Stack->push<pair>(3.0*(t*t*(d-a+3.0*(b-c))+t*(2.0*(a+c)-4.0*b)+b-a)); return;}
}
-#line 249 "runpair.in"
+#line 255 "runpair.in"
// pair bezierPP(pair a, pair b, pair c, pair d, real t);
-void gen_runpair33(stack *Stack)
+void gen_runpair34(stack *Stack)
{
real t=vm::pop<real>(Stack);
pair d=vm::pop<pair>(Stack);
pair c=vm::pop<pair>(Stack);
pair b=vm::pop<pair>(Stack);
pair a=vm::pop<pair>(Stack);
-#line 250 "runpair.in"
+#line 256 "runpair.in"
{Stack->push<pair>(6.0*(t*(d-a+3.0*(b-c))+a+c-2.0*b)); return;}
}
-#line 254 "runpair.in"
+#line 260 "runpair.in"
// pair bezierPPP(pair a, pair b, pair c, pair d);
-void gen_runpair34(stack *Stack)
+void gen_runpair35(stack *Stack)
{
pair d=vm::pop<pair>(Stack);
pair c=vm::pop<pair>(Stack);
pair b=vm::pop<pair>(Stack);
pair a=vm::pop<pair>(Stack);
-#line 255 "runpair.in"
+#line 261 "runpair.in"
{Stack->push<pair>(6.0*(d-a+3.0*(b-c))); return;}
}
@@ -540,13 +551,15 @@ void gen_runpair_venv(venv &ve)
#line 231 "runpair.in"
addFunc(ve, run::gen_runpair30, primReal(), SYM(dot), formal(primPair(), SYM(z), false, true), formal(primPair(), SYM(w), false, true));
#line 237 "runpair.in"
- addFunc(ve, run::gen_runpair31, primPair(), SYM(bezier), formal(primPair(), SYM(a), false, false), formal(primPair(), SYM(b), false, false), formal(primPair(), SYM(c), false, false), formal(primPair(), SYM(d), false, false), formal(primReal(), SYM(t), false, false));
-#line 244 "runpair.in"
- addFunc(ve, run::gen_runpair32, primPair(), SYM(bezierP), formal(primPair(), SYM(a), false, false), formal(primPair(), SYM(b), false, false), formal(primPair(), SYM(c), false, false), formal(primPair(), SYM(d), false, false), formal(primReal(), SYM(t), false, false));
-#line 249 "runpair.in"
- addFunc(ve, run::gen_runpair33, primPair(), SYM(bezierPP), formal(primPair(), SYM(a), false, false), formal(primPair(), SYM(b), false, false), formal(primPair(), SYM(c), false, false), formal(primPair(), SYM(d), false, false), formal(primReal(), SYM(t), false, false));
-#line 254 "runpair.in"
- addFunc(ve, run::gen_runpair34, primPair(), SYM(bezierPPP), formal(primPair(), SYM(a), false, false), formal(primPair(), SYM(b), false, false), formal(primPair(), SYM(c), false, false), formal(primPair(), SYM(d), false, false));
+ addFunc(ve, run::gen_runpair31, primReal(), SYM(cross), formal(primPair(), SYM(z), false, true), formal(primPair(), SYM(w), false, true));
+#line 243 "runpair.in"
+ addFunc(ve, run::gen_runpair32, primPair(), SYM(bezier), formal(primPair(), SYM(a), false, false), formal(primPair(), SYM(b), false, false), formal(primPair(), SYM(c), false, false), formal(primPair(), SYM(d), false, false), formal(primReal(), SYM(t), false, false));
+#line 250 "runpair.in"
+ addFunc(ve, run::gen_runpair33, primPair(), SYM(bezierP), formal(primPair(), SYM(a), false, false), formal(primPair(), SYM(b), false, false), formal(primPair(), SYM(c), false, false), formal(primPair(), SYM(d), false, false), formal(primReal(), SYM(t), false, false));
+#line 255 "runpair.in"
+ addFunc(ve, run::gen_runpair34, primPair(), SYM(bezierPP), formal(primPair(), SYM(a), false, false), formal(primPair(), SYM(b), false, false), formal(primPair(), SYM(c), false, false), formal(primPair(), SYM(d), false, false), formal(primReal(), SYM(t), false, false));
+#line 260 "runpair.in"
+ addFunc(ve, run::gen_runpair35, primPair(), SYM(bezierPPP), formal(primPair(), SYM(a), false, false), formal(primPair(), SYM(b), false, false), formal(primPair(), SYM(c), false, false), formal(primPair(), SYM(d), false, false));
}
} // namespace trans
diff --git a/Build/source/utils/asymptote/runpair.in b/Build/source/utils/asymptote/runpair.in
index d6604454f5e..6170cd82feb 100644
--- a/Build/source/utils/asymptote/runpair.in
+++ b/Build/source/utils/asymptote/runpair.in
@@ -120,7 +120,7 @@ real Degrees(real radians)
real Sin(real deg)
{
- int n=deg/90.0;
+ int n=(int) (deg/90.0);
if(deg == n*90.0) {
int m=n % 4;
if(m < 0) m += 4;
@@ -133,7 +133,7 @@ real Sin(real deg)
real Cos(real deg)
{
- int n=deg/90.0;
+ int n=(int) (deg/90.0);
if(deg == n*90.0) {
int m=n % 4;
if(m < 0) m += 4;
@@ -146,7 +146,7 @@ real Cos(real deg)
real Tan(real deg)
{
- int n=deg/90.0;
+ int n=(int) (deg/90.0);
if(deg == n*90.0) {
int m=n % 4;
if(m < 0) m += 4;
@@ -234,6 +234,12 @@ real dot(explicit pair z, explicit pair w)
return dot(z,w);
}
+// Return the 2D scalar cross product z.x*w.y-z.y*w.x.
+real cross(explicit pair z, explicit pair w)
+{
+ return cross(z,w);
+}
+
pair bezier(pair a, pair b, pair c, pair d, real t)
{
real onemt=1-t;
diff --git a/Build/source/utils/asymptote/runpath.cc b/Build/source/utils/asymptote/runpath.cc
index 64a0d08b8e3..9c4781dacea 100644
--- a/Build/source/utils/asymptote/runpath.cc
+++ b/Build/source/utils/asymptote/runpath.cc
@@ -484,7 +484,7 @@ void gen_runpath31(stack *Stack)
}
#line 266 "runpath.in"
-// pair min(path p);
+// pair min(explicit path p);
void gen_runpath32(stack *Stack)
{
path p=vm::pop<path>(Stack);
@@ -493,7 +493,7 @@ void gen_runpath32(stack *Stack)
}
#line 271 "runpath.in"
-// pair max(path p);
+// pair max(explicit path p);
void gen_runpath33(stack *Stack)
{
path p=vm::pop<path>(Stack);
@@ -698,22 +698,35 @@ void gen_runpath44(stack *Stack)
{Stack->push<bool>(fillrule.inside(g.windingnumber(z))); return;}
}
-// Determine the side of a--b that c lies on
-// (negative=left, zero=on line, positive=right).
-#line 421 "runpath.in"
-// real side(pair a, pair b, pair c);
+// Return a positive (negative) value if a--b--c--cycle is oriented
+// counterclockwise (clockwise) or zero if all three points are colinear.
+// Equivalently, return a positive (negative) value if c lies to the
+// left (right) of the line through a and b or zero if c lies on this line.
+// The value returned is the determinant
+// |a.x a.y 1|
+// |b.x b.y 1|
+// |c.x c.y 1|
+//
+#line 428 "runpath.in"
+// real orient(pair a, pair b, pair c);
void gen_runpath45(stack *Stack)
{
pair c=vm::pop<pair>(Stack);
pair b=vm::pop<pair>(Stack);
pair a=vm::pop<pair>(Stack);
-#line 422 "runpath.in"
+#line 429 "runpath.in"
{Stack->push<real>(orient2d(a,b,c)); return;}
}
-// Determine the side of the counterclockwise circle through a,b,c that d
-// lies on (negative=inside, 0=on circle, positive=right).
-#line 428 "runpath.in"
+// Return a positive (negative) value if d lies inside (outside)
+// the circle passing through the counterclockwise-oriented points a,b,c
+// or zero if d lies on this circle.
+// The value returned is the determinant
+// |a.x a.y a.x^2+a.y^2 1|
+// |b.x b.y b.x^2+b.y^2 1|
+// |c.x c.y c.x^2+c.y^2 1|
+// |d.x d.y d.x^2+d.y^2 1|
+#line 441 "runpath.in"
// real incircle(pair a, pair b, pair c, pair d);
void gen_runpath46(stack *Stack)
{
@@ -721,7 +734,7 @@ void gen_runpath46(stack *Stack)
pair c=vm::pop<pair>(Stack);
pair b=vm::pop<pair>(Stack);
pair a=vm::pop<pair>(Stack);
-#line 429 "runpath.in"
+#line 442 "runpath.in"
{Stack->push<real>(incircle(a.getx(),a.gety(),b.getx(),b.gety(),c.getx(),c.gety(),
d.getx(),d.gety())); return;}
}
@@ -797,9 +810,9 @@ void gen_runpath_venv(venv &ve)
#line 261 "runpath.in"
addFunc(ve, run::gen_runpath31, primPath(), SYM_AMPERSAND, formal(primPath(), SYM(p), false, false), formal(primPath(), SYM(q), false, false));
#line 266 "runpath.in"
- addFunc(ve, run::gen_runpath32, primPair(), SYM(min), formal(primPath(), SYM(p), false, false));
+ addFunc(ve, run::gen_runpath32, primPair(), SYM(min), formal(primPath(), SYM(p), false, true));
#line 271 "runpath.in"
- addFunc(ve, run::gen_runpath33, primPair(), SYM(max), formal(primPath(), SYM(p), false, false));
+ addFunc(ve, run::gen_runpath33, primPair(), SYM(max), formal(primPath(), SYM(p), false, true));
#line 276 "runpath.in"
addFunc(ve, run::gen_runpath34, primInt(), SYM(size), formal(pathArray() , SYM(p), false, false));
#line 285 "runpath.in"
@@ -823,8 +836,8 @@ void gen_runpath_venv(venv &ve)
#line 414 "runpath.in"
addFunc(ve, run::gen_runpath44, primBoolean(), SYM(inside), formal(primPath(), SYM(g), false, false), formal(primPair(), SYM(z), false, false), formal(primPen(), SYM(fillrule), true, false));
#line 419 "runpath.in"
- addFunc(ve, run::gen_runpath45, primReal(), SYM(side), formal(primPair(), SYM(a), false, false), formal(primPair(), SYM(b), false, false), formal(primPair(), SYM(c), false, false));
-#line 426 "runpath.in"
+ addFunc(ve, run::gen_runpath45, primReal(), SYM(orient), formal(primPair(), SYM(a), false, false), formal(primPair(), SYM(b), false, false), formal(primPair(), SYM(c), false, false));
+#line 433 "runpath.in"
addFunc(ve, run::gen_runpath46, primReal(), SYM(incircle), formal(primPair(), SYM(a), false, false), formal(primPair(), SYM(b), false, false), formal(primPair(), SYM(c), false, false), formal(primPair(), SYM(d), false, false));
}
diff --git a/Build/source/utils/asymptote/runpath.in b/Build/source/utils/asymptote/runpath.in
index b39a082a4b3..41978efe873 100644
--- a/Build/source/utils/asymptote/runpath.in
+++ b/Build/source/utils/asymptote/runpath.in
@@ -263,12 +263,12 @@ path &(path p, path q)
return camp::concat(p,q);
}
-pair min(path p)
+pair min(explicit path p)
{
return p.min();
}
-pair max(path p)
+pair max(explicit path p)
{
return p.max();
}
@@ -416,15 +416,28 @@ bool inside(path g, pair z, pen fillrule=CURRENTPEN)
return fillrule.inside(g.windingnumber(z));
}
-// Determine the side of a--b that c lies on
-// (negative=left, zero=on line, positive=right).
-real side(pair a, pair b, pair c)
+// Return a positive (negative) value if a--b--c--cycle is oriented
+// counterclockwise (clockwise) or zero if all three points are colinear.
+// Equivalently, return a positive (negative) value if c lies to the
+// left (right) of the line through a and b or zero if c lies on this line.
+// The value returned is the determinant
+// |a.x a.y 1|
+// |b.x b.y 1|
+// |c.x c.y 1|
+//
+real orient(pair a, pair b, pair c)
{
return orient2d(a,b,c);
}
-// Determine the side of the counterclockwise circle through a,b,c that d
-// lies on (negative=inside, 0=on circle, positive=right).
+// Return a positive (negative) value if d lies inside (outside)
+// the circle passing through the counterclockwise-oriented points a,b,c
+// or zero if d lies on this circle.
+// The value returned is the determinant
+// |a.x a.y a.x^2+a.y^2 1|
+// |b.x b.y b.x^2+b.y^2 1|
+// |c.x c.y c.x^2+c.y^2 1|
+// |d.x d.y d.x^2+d.y^2 1|
real incircle(pair a, pair b, pair c, pair d)
{
return incircle(a.getx(),a.gety(),b.getx(),b.gety(),c.getx(),c.gety(),
diff --git a/Build/source/utils/asymptote/runpath3d.cc b/Build/source/utils/asymptote/runpath3d.cc
index 9cdf644ee41..e8a2421836f 100644
--- a/Build/source/utils/asymptote/runpath3d.cc
+++ b/Build/source/utils/asymptote/runpath3d.cc
@@ -63,6 +63,7 @@ function *realRealFunction();
#include "path3.h"
#include "array.h"
#include "drawsurface.h"
+#include "predicates.h"
using namespace camp;
using namespace vm;
@@ -88,7 +89,7 @@ using types::tripleArray2;
#endif
namespace run {
-#line 39 "runpath3d.in"
+#line 40 "runpath3d.in"
// path3 path3(triplearray *pre, triplearray *point, triplearray *post, boolarray *straight, bool cyclic);
void gen_runpath3d0(stack *Stack)
{
@@ -97,7 +98,7 @@ void gen_runpath3d0(stack *Stack)
triplearray * post=vm::pop<triplearray *>(Stack);
triplearray * point=vm::pop<triplearray *>(Stack);
triplearray * pre=vm::pop<triplearray *>(Stack);
-#line 41 "runpath3d.in"
+#line 42 "runpath3d.in"
size_t n=checkArrays(pre,point);
checkEqual(n,checkArray(post));
checkEqual(n,checkArray(straight));
@@ -112,94 +113,94 @@ void gen_runpath3d0(stack *Stack)
{Stack->push<path3>(path3(nodes,(Int) n,cyclic)); return;}
}
-#line 56 "runpath3d.in"
+#line 57 "runpath3d.in"
void nullPath3(stack *Stack)
{
-#line 57 "runpath3d.in"
+#line 58 "runpath3d.in"
{Stack->push<path3>(nullpath3); return;}
}
-#line 61 "runpath3d.in"
+#line 62 "runpath3d.in"
// bool ==(path3 a, path3 b);
void gen_runpath3d2(stack *Stack)
{
path3 b=vm::pop<path3>(Stack);
path3 a=vm::pop<path3>(Stack);
-#line 62 "runpath3d.in"
+#line 63 "runpath3d.in"
{Stack->push<bool>(a == b); return;}
}
-#line 66 "runpath3d.in"
+#line 67 "runpath3d.in"
// bool !=(path3 a, path3 b);
void gen_runpath3d3(stack *Stack)
{
path3 b=vm::pop<path3>(Stack);
path3 a=vm::pop<path3>(Stack);
-#line 67 "runpath3d.in"
+#line 68 "runpath3d.in"
{Stack->push<bool>(!(a == b)); return;}
}
-#line 71 "runpath3d.in"
+#line 72 "runpath3d.in"
// triple point(path3 p, Int t);
void gen_runpath3d4(stack *Stack)
{
Int t=vm::pop<Int>(Stack);
path3 p=vm::pop<path3>(Stack);
-#line 72 "runpath3d.in"
+#line 73 "runpath3d.in"
{Stack->push<triple>(p.point((Int) t)); return;}
}
-#line 76 "runpath3d.in"
+#line 77 "runpath3d.in"
// triple point(path3 p, real t);
void gen_runpath3d5(stack *Stack)
{
real t=vm::pop<real>(Stack);
path3 p=vm::pop<path3>(Stack);
-#line 77 "runpath3d.in"
+#line 78 "runpath3d.in"
{Stack->push<triple>(p.point(t)); return;}
}
-#line 81 "runpath3d.in"
+#line 82 "runpath3d.in"
// triple precontrol(path3 p, Int t);
void gen_runpath3d6(stack *Stack)
{
Int t=vm::pop<Int>(Stack);
path3 p=vm::pop<path3>(Stack);
-#line 82 "runpath3d.in"
+#line 83 "runpath3d.in"
{Stack->push<triple>(p.precontrol((Int) t)); return;}
}
-#line 86 "runpath3d.in"
+#line 87 "runpath3d.in"
// triple precontrol(path3 p, real t);
void gen_runpath3d7(stack *Stack)
{
real t=vm::pop<real>(Stack);
path3 p=vm::pop<path3>(Stack);
-#line 87 "runpath3d.in"
+#line 88 "runpath3d.in"
{Stack->push<triple>(p.precontrol(t)); return;}
}
-#line 91 "runpath3d.in"
+#line 92 "runpath3d.in"
// triple postcontrol(path3 p, Int t);
void gen_runpath3d8(stack *Stack)
{
Int t=vm::pop<Int>(Stack);
path3 p=vm::pop<path3>(Stack);
-#line 92 "runpath3d.in"
+#line 93 "runpath3d.in"
{Stack->push<triple>(p.postcontrol((Int) t)); return;}
}
-#line 96 "runpath3d.in"
+#line 97 "runpath3d.in"
// triple postcontrol(path3 p, real t);
void gen_runpath3d9(stack *Stack)
{
real t=vm::pop<real>(Stack);
path3 p=vm::pop<path3>(Stack);
-#line 97 "runpath3d.in"
+#line 98 "runpath3d.in"
{Stack->push<triple>(p.postcontrol(t)); return;}
}
-#line 101 "runpath3d.in"
+#line 102 "runpath3d.in"
// triple dir(path3 p, Int t, Int sign=0, bool normalize=true);
void gen_runpath3d10(stack *Stack)
{
@@ -207,49 +208,49 @@ void gen_runpath3d10(stack *Stack)
Int sign=vm::pop<Int>(Stack,0);
Int t=vm::pop<Int>(Stack);
path3 p=vm::pop<path3>(Stack);
-#line 102 "runpath3d.in"
+#line 103 "runpath3d.in"
{Stack->push<triple>(p.dir(t,sign,normalize)); return;}
}
-#line 106 "runpath3d.in"
+#line 107 "runpath3d.in"
// triple dir(path3 p, real t, bool normalize=true);
void gen_runpath3d11(stack *Stack)
{
bool normalize=vm::pop<bool>(Stack,true);
real t=vm::pop<real>(Stack);
path3 p=vm::pop<path3>(Stack);
-#line 107 "runpath3d.in"
+#line 108 "runpath3d.in"
{Stack->push<triple>(p.dir(t,normalize)); return;}
}
-#line 111 "runpath3d.in"
+#line 112 "runpath3d.in"
// triple accel(path3 p, Int t, Int sign=0);
void gen_runpath3d12(stack *Stack)
{
Int sign=vm::pop<Int>(Stack,0);
Int t=vm::pop<Int>(Stack);
path3 p=vm::pop<path3>(Stack);
-#line 112 "runpath3d.in"
+#line 113 "runpath3d.in"
{Stack->push<triple>(p.accel(t,sign)); return;}
}
-#line 116 "runpath3d.in"
+#line 117 "runpath3d.in"
// triple accel(path3 p, real t);
void gen_runpath3d13(stack *Stack)
{
real t=vm::pop<real>(Stack);
path3 p=vm::pop<path3>(Stack);
-#line 117 "runpath3d.in"
+#line 118 "runpath3d.in"
{Stack->push<triple>(p.accel(t)); return;}
}
-#line 121 "runpath3d.in"
+#line 122 "runpath3d.in"
// real radius(path3 p, real t);
void gen_runpath3d14(stack *Stack)
{
real t=vm::pop<real>(Stack);
path3 p=vm::pop<path3>(Stack);
-#line 122 "runpath3d.in"
+#line 123 "runpath3d.in"
triple v=p.dir(t,false);
triple a=p.accel(t);
real d=dot(a,v);
@@ -260,7 +261,7 @@ void gen_runpath3d14(stack *Stack)
{Stack->push<real>(denom > 0 ? r/sqrt(denom) : 0.0); return;}
}
-#line 133 "runpath3d.in"
+#line 134 "runpath3d.in"
// real radius(triple z0, triple c0, triple c1, triple z1, real t);
void gen_runpath3d15(stack *Stack)
{
@@ -269,7 +270,7 @@ void gen_runpath3d15(stack *Stack)
triple c1=vm::pop<triple>(Stack);
triple c0=vm::pop<triple>(Stack);
triple z0=vm::pop<triple>(Stack);
-#line 134 "runpath3d.in"
+#line 135 "runpath3d.in"
triple v=(3.0*(z1-z0)+9.0*(c0-c1))*t*t+(6.0*(z0+c1)-12.0*c0)*t+3.0*(c0-z0);
triple a=6.0*(z1-z0+3.0*(c0-c1))*t+6.0*(z0+c1)-12.0*c0;
real d=dot(a,v);
@@ -280,83 +281,83 @@ void gen_runpath3d15(stack *Stack)
{Stack->push<real>(denom > 0 ? r/sqrt(denom) : 0.0); return;}
}
-#line 145 "runpath3d.in"
+#line 146 "runpath3d.in"
// path3 reverse(path3 p);
void gen_runpath3d16(stack *Stack)
{
path3 p=vm::pop<path3>(Stack);
-#line 146 "runpath3d.in"
+#line 147 "runpath3d.in"
{Stack->push<path3>(p.reverse()); return;}
}
-#line 150 "runpath3d.in"
+#line 151 "runpath3d.in"
// path3 subpath(path3 p, Int a, Int b);
void gen_runpath3d17(stack *Stack)
{
Int b=vm::pop<Int>(Stack);
Int a=vm::pop<Int>(Stack);
path3 p=vm::pop<path3>(Stack);
-#line 151 "runpath3d.in"
+#line 152 "runpath3d.in"
{Stack->push<path3>(p.subpath((Int) a, (Int) b)); return;}
}
-#line 155 "runpath3d.in"
+#line 156 "runpath3d.in"
// path3 subpath(path3 p, real a, real b);
void gen_runpath3d18(stack *Stack)
{
real b=vm::pop<real>(Stack);
real a=vm::pop<real>(Stack);
path3 p=vm::pop<path3>(Stack);
-#line 156 "runpath3d.in"
+#line 157 "runpath3d.in"
{Stack->push<path3>(p.subpath(a,b)); return;}
}
-#line 160 "runpath3d.in"
+#line 161 "runpath3d.in"
// Int length(path3 p);
void gen_runpath3d19(stack *Stack)
{
path3 p=vm::pop<path3>(Stack);
-#line 161 "runpath3d.in"
+#line 162 "runpath3d.in"
{Stack->push<Int>(p.length()); return;}
}
-#line 165 "runpath3d.in"
+#line 166 "runpath3d.in"
// bool cyclic(path3 p);
void gen_runpath3d20(stack *Stack)
{
path3 p=vm::pop<path3>(Stack);
-#line 166 "runpath3d.in"
+#line 167 "runpath3d.in"
{Stack->push<bool>(p.cyclic()); return;}
}
-#line 170 "runpath3d.in"
+#line 171 "runpath3d.in"
// bool straight(path3 p, Int t);
void gen_runpath3d21(stack *Stack)
{
Int t=vm::pop<Int>(Stack);
path3 p=vm::pop<path3>(Stack);
-#line 171 "runpath3d.in"
+#line 172 "runpath3d.in"
{Stack->push<bool>(p.straight(t)); return;}
}
-#line 175 "runpath3d.in"
+#line 176 "runpath3d.in"
// path3 unstraighten(path3 p);
void gen_runpath3d22(stack *Stack)
{
path3 p=vm::pop<path3>(Stack);
-#line 176 "runpath3d.in"
+#line 177 "runpath3d.in"
{Stack->push<path3>(p.unstraighten()); return;}
}
// Return the maximum perpendicular deviation of segment i of path3 g
// from a straight line.
-#line 182 "runpath3d.in"
+#line 183 "runpath3d.in"
// real straightness(path3 p, Int t);
void gen_runpath3d23(stack *Stack)
{
Int t=vm::pop<Int>(Stack);
path3 p=vm::pop<path3>(Stack);
-#line 183 "runpath3d.in"
+#line 184 "runpath3d.in"
if(p.straight(t)) {Stack->push<real>(0); return;}
triple z0=p.point(t);
triple u=unit(p.point(t+1)-z0);
@@ -366,7 +367,7 @@ void gen_runpath3d23(stack *Stack)
// Return the maximum perpendicular deviation of z0..controls c0 and c1..z1
// from a straight line.
-#line 193 "runpath3d.in"
+#line 194 "runpath3d.in"
// real straightness(triple z0, triple c0, triple c1, triple z1);
void gen_runpath3d24(stack *Stack)
{
@@ -374,47 +375,47 @@ void gen_runpath3d24(stack *Stack)
triple c1=vm::pop<triple>(Stack);
triple c0=vm::pop<triple>(Stack);
triple z0=vm::pop<triple>(Stack);
-#line 194 "runpath3d.in"
+#line 195 "runpath3d.in"
triple u=unit(z1-z0);
{Stack->push<real>(::max(length(perp(c0-z0,u)),length(perp(c1-z0,u)))); return;}
}
-#line 199 "runpath3d.in"
+#line 200 "runpath3d.in"
// bool piecewisestraight(path3 p);
void gen_runpath3d25(stack *Stack)
{
path3 p=vm::pop<path3>(Stack);
-#line 200 "runpath3d.in"
+#line 201 "runpath3d.in"
{Stack->push<bool>(p.piecewisestraight()); return;}
}
-#line 204 "runpath3d.in"
+#line 205 "runpath3d.in"
// real arclength(path3 p);
void gen_runpath3d26(stack *Stack)
{
path3 p=vm::pop<path3>(Stack);
-#line 205 "runpath3d.in"
+#line 206 "runpath3d.in"
{Stack->push<real>(p.arclength()); return;}
}
-#line 209 "runpath3d.in"
+#line 210 "runpath3d.in"
// real arctime(path3 p, real dval);
void gen_runpath3d27(stack *Stack)
{
real dval=vm::pop<real>(Stack);
path3 p=vm::pop<path3>(Stack);
-#line 210 "runpath3d.in"
+#line 211 "runpath3d.in"
{Stack->push<real>(p.arctime(dval)); return;}
}
-#line 214 "runpath3d.in"
+#line 215 "runpath3d.in"
// realarray* intersect(path3 p, path3 q, real fuzz=-1);
void gen_runpath3d28(stack *Stack)
{
real fuzz=vm::pop<real>(Stack,-1);
path3 q=vm::pop<path3>(Stack);
path3 p=vm::pop<path3>(Stack);
-#line 215 "runpath3d.in"
+#line 216 "runpath3d.in"
bool exact=fuzz <= 0.0;
if(fuzz < 0)
fuzz=BigFuzz*::max(::max(length(p.max()),length(p.min())),
@@ -431,14 +432,14 @@ void gen_runpath3d28(stack *Stack)
{Stack->push<realarray*>(new array(0)); return;}
}
-#line 232 "runpath3d.in"
+#line 233 "runpath3d.in"
// realarray2* intersections(path3 p, path3 q, real fuzz=-1);
void gen_runpath3d29(stack *Stack)
{
real fuzz=vm::pop<real>(Stack,-1);
path3 q=vm::pop<path3>(Stack);
path3 p=vm::pop<path3>(Stack);
-#line 233 "runpath3d.in"
+#line 234 "runpath3d.in"
bool exact=fuzz <= 0.0;
if(fuzz < 0)
fuzz=BigFuzz*::max(::max(length(p.max()),length(p.min())),
@@ -470,20 +471,45 @@ void gen_runpath3d29(stack *Stack)
{Stack->push<realarray2*>(V); return;}
}
-#line 265 "runpath3d.in"
-// realarray2* intersections(path3 p, triplearray2 *P, real fuzz=-1);
+#line 266 "runpath3d.in"
+// realarray* intersect(path3 p, triplearray2 *P, real fuzz=-1);
void gen_runpath3d30(stack *Stack)
{
real fuzz=vm::pop<real>(Stack,-1);
triplearray2 * P=vm::pop<triplearray2 *>(Stack);
path3 p=vm::pop<path3>(Stack);
-#line 266 "runpath3d.in"
+#line 267 "runpath3d.in"
triple *A;
copyArray2C(A,P,true,4);
if(fuzz <= 0) fuzz=BigFuzz*::max(::max(length(p.max()),length(p.min())),
norm(A,16));
std::vector<real> T,U,V;
- intersections(T,U,V,p,A,fuzz);
+ bool found=intersections(T,U,V,p,A,fuzz,true);
+ delete[] A;
+ if(found) {
+ array *W=new array(3);
+ (*W)[0]=T[0];
+ (*W)[1]=U[0];
+ (*W)[2]=V[0];
+ {Stack->push<realarray*>(W); return;}
+ } else
+ {Stack->push<realarray*>(new array(0)); return;}
+}
+
+#line 285 "runpath3d.in"
+// realarray2* intersections(path3 p, triplearray2 *P, real fuzz=-1);
+void gen_runpath3d31(stack *Stack)
+{
+ real fuzz=vm::pop<real>(Stack,-1);
+ triplearray2 * P=vm::pop<triplearray2 *>(Stack);
+ path3 p=vm::pop<path3>(Stack);
+#line 286 "runpath3d.in"
+ triple *A;
+ copyArray2C(A,P,true,4);
+ if(fuzz <= 0) fuzz=BigFuzz*::max(::max(length(p.max()),length(p.min())),
+ norm(A,16));
+ std::vector<real> T,U,V;
+ intersections(T,U,V,p,A,fuzz,false);
delete[] A;
size_t n=T.size();
array *W=new array(n);
@@ -497,49 +523,49 @@ void gen_runpath3d30(stack *Stack)
{Stack->push<realarray2*>(W); return;} // Sorting will done in asy.
}
-#line 286 "runpath3d.in"
+#line 306 "runpath3d.in"
// Int size(path3 p);
-void gen_runpath3d31(stack *Stack)
+void gen_runpath3d32(stack *Stack)
{
path3 p=vm::pop<path3>(Stack);
-#line 287 "runpath3d.in"
+#line 307 "runpath3d.in"
{Stack->push<Int>(p.size()); return;}
}
-#line 291 "runpath3d.in"
+#line 311 "runpath3d.in"
// path3 &(path3 p, path3 q);
-void gen_runpath3d32(stack *Stack)
+void gen_runpath3d33(stack *Stack)
{
path3 q=vm::pop<path3>(Stack);
path3 p=vm::pop<path3>(Stack);
-#line 292 "runpath3d.in"
+#line 312 "runpath3d.in"
{Stack->push<path3>(camp::concat(p,q)); return;}
}
-#line 296 "runpath3d.in"
+#line 316 "runpath3d.in"
// triple min(path3 p);
-void gen_runpath3d33(stack *Stack)
+void gen_runpath3d34(stack *Stack)
{
path3 p=vm::pop<path3>(Stack);
-#line 297 "runpath3d.in"
+#line 317 "runpath3d.in"
{Stack->push<triple>(p.min()); return;}
}
-#line 301 "runpath3d.in"
+#line 321 "runpath3d.in"
// triple max(path3 p);
-void gen_runpath3d34(stack *Stack)
+void gen_runpath3d35(stack *Stack)
{
path3 p=vm::pop<path3>(Stack);
-#line 302 "runpath3d.in"
+#line 322 "runpath3d.in"
{Stack->push<triple>(p.max()); return;}
}
-#line 306 "runpath3d.in"
+#line 326 "runpath3d.in"
// realarray* mintimes(path3 p);
-void gen_runpath3d35(stack *Stack)
+void gen_runpath3d36(stack *Stack)
{
path3 p=vm::pop<path3>(Stack);
-#line 307 "runpath3d.in"
+#line 327 "runpath3d.in"
array *V=new array(3);
triple v=p.mintimes();
(*V)[0]=v.getx();
@@ -548,12 +574,12 @@ void gen_runpath3d35(stack *Stack)
{Stack->push<realarray*>(V); return;}
}
-#line 316 "runpath3d.in"
+#line 336 "runpath3d.in"
// realarray* maxtimes(path3 p);
-void gen_runpath3d36(stack *Stack)
+void gen_runpath3d37(stack *Stack)
{
path3 p=vm::pop<path3>(Stack);
-#line 317 "runpath3d.in"
+#line 337 "runpath3d.in"
array *V=new array(3);
triple v=p.maxtimes();
(*V)[0]=v.getx();
@@ -562,120 +588,178 @@ void gen_runpath3d36(stack *Stack)
{Stack->push<realarray*>(V); return;}
}
-#line 326 "runpath3d.in"
+#line 346 "runpath3d.in"
// path3 *(realarray2 *t, path3 g);
-void gen_runpath3d37(stack *Stack)
+void gen_runpath3d38(stack *Stack)
{
path3 g=vm::pop<path3>(Stack);
realarray2 * t=vm::pop<realarray2 *>(Stack);
-#line 327 "runpath3d.in"
+#line 347 "runpath3d.in"
{Stack->push<path3>(transformed(*t,g)); return;}
}
-#line 331 "runpath3d.in"
+#line 351 "runpath3d.in"
// pair minratio(path3 g);
-void gen_runpath3d38(stack *Stack)
+void gen_runpath3d39(stack *Stack)
{
path3 g=vm::pop<path3>(Stack);
-#line 332 "runpath3d.in"
+#line 352 "runpath3d.in"
{Stack->push<pair>(g.ratio(::min)); return;}
}
-#line 336 "runpath3d.in"
+#line 356 "runpath3d.in"
// pair maxratio(path3 g);
-void gen_runpath3d39(stack *Stack)
+void gen_runpath3d40(stack *Stack)
{
path3 g=vm::pop<path3>(Stack);
-#line 337 "runpath3d.in"
+#line 357 "runpath3d.in"
{Stack->push<pair>(g.ratio(::max)); return;}
}
+// Return a negative (positive) value if a--b--c--cycle is oriented
+// counterclockwise (clockwise) when viewed from d or zero if all four
+// points are coplanar.
+// The value returned is the determinant
+// |a.x a.y a.z 1|
+// |b.x b.y b.z 1|
+// |c.x c.y c.z 1|
+// |d.x d.y d.z 1|
+#line 369 "runpath3d.in"
+// real orient(triple a, triple b, triple c, triple d);
+void gen_runpath3d41(stack *Stack)
+{
+ triple d=vm::pop<triple>(Stack);
+ triple c=vm::pop<triple>(Stack);
+ triple b=vm::pop<triple>(Stack);
+ triple a=vm::pop<triple>(Stack);
+#line 370 "runpath3d.in"
+ real A[]={a.getx(),a.gety(),a.getz()};
+ real B[]={b.getx(),b.gety(),b.getz()};
+ real C[]={c.getx(),c.gety(),c.getz()};
+ real D[]={d.getx(),d.gety(),d.getz()};
+ {Stack->push<real>(orient3d(A,B,C,D)); return;}
+}
+
+// Return a positive (negative) value if e lies inside (outside)
+// the sphere passing through the points a,b,c,d oriented so that
+// a--b--c--cycle appears in clockwise order when viewed from d
+// or zero if all five points are cospherical.
+// The value returned is the determinant
+// |a.x a.y a.z a.x^2+a.y^2+a.z^2 1|
+// |b.x b.y b.z b.x^2+b.y^2+b.z^2 1|
+// |c.x c.y c.z c.x^2+c.y^2+c.z^2 1|
+// |d.x d.y d.z d.x^2+d.y^2+d.z^2 1|
+// |e.x e.y e.z e.x^2+e.y^2+e.z^2 1|
+#line 388 "runpath3d.in"
+// real insphere(triple a, triple b, triple c, triple d, triple e);
+void gen_runpath3d42(stack *Stack)
+{
+ triple e=vm::pop<triple>(Stack);
+ triple d=vm::pop<triple>(Stack);
+ triple c=vm::pop<triple>(Stack);
+ triple b=vm::pop<triple>(Stack);
+ triple a=vm::pop<triple>(Stack);
+#line 389 "runpath3d.in"
+ real A[]={a.getx(),a.gety(),a.getz()};
+ real B[]={b.getx(),b.gety(),b.getz()};
+ real C[]={c.getx(),c.gety(),c.getz()};
+ real D[]={d.getx(),d.gety(),d.getz()};
+ real E[]={e.getx(),e.gety(),e.getz()};
+ {Stack->push<real>(insphere(A,B,C,D,E)); return;}
+}
+
} // namespace run
namespace trans {
void gen_runpath3d_venv(venv &ve)
{
-#line 39 "runpath3d.in"
+#line 40 "runpath3d.in"
addFunc(ve, run::gen_runpath3d0, primPath3(), SYM(path3), formal(tripleArray(), SYM(pre), false, false), formal(tripleArray(), SYM(point), false, false), formal(tripleArray(), SYM(post), false, false), formal(booleanArray(), SYM(straight), false, false), formal(primBoolean(), SYM(cyclic), false, false));
-#line 56 "runpath3d.in"
+#line 57 "runpath3d.in"
REGISTER_BLTIN(run::nullPath3,"nullPath3");
-#line 61 "runpath3d.in"
+#line 62 "runpath3d.in"
addFunc(ve, run::gen_runpath3d2, primBoolean(), SYM_EQ, formal(primPath3(), SYM(a), false, false), formal(primPath3(), SYM(b), false, false));
-#line 66 "runpath3d.in"
+#line 67 "runpath3d.in"
addFunc(ve, run::gen_runpath3d3, primBoolean(), SYM_NEQ, formal(primPath3(), SYM(a), false, false), formal(primPath3(), SYM(b), false, false));
-#line 71 "runpath3d.in"
+#line 72 "runpath3d.in"
addFunc(ve, run::gen_runpath3d4, primTriple(), SYM(point), formal(primPath3(), SYM(p), false, false), formal(primInt(), SYM(t), false, false));
-#line 76 "runpath3d.in"
+#line 77 "runpath3d.in"
addFunc(ve, run::gen_runpath3d5, primTriple(), SYM(point), formal(primPath3(), SYM(p), false, false), formal(primReal(), SYM(t), false, false));
-#line 81 "runpath3d.in"
+#line 82 "runpath3d.in"
addFunc(ve, run::gen_runpath3d6, primTriple(), SYM(precontrol), formal(primPath3(), SYM(p), false, false), formal(primInt(), SYM(t), false, false));
-#line 86 "runpath3d.in"
+#line 87 "runpath3d.in"
addFunc(ve, run::gen_runpath3d7, primTriple(), SYM(precontrol), formal(primPath3(), SYM(p), false, false), formal(primReal(), SYM(t), false, false));
-#line 91 "runpath3d.in"
+#line 92 "runpath3d.in"
addFunc(ve, run::gen_runpath3d8, primTriple(), SYM(postcontrol), formal(primPath3(), SYM(p), false, false), formal(primInt(), SYM(t), false, false));
-#line 96 "runpath3d.in"
+#line 97 "runpath3d.in"
addFunc(ve, run::gen_runpath3d9, primTriple(), SYM(postcontrol), formal(primPath3(), SYM(p), false, false), formal(primReal(), SYM(t), false, false));
-#line 101 "runpath3d.in"
+#line 102 "runpath3d.in"
addFunc(ve, run::gen_runpath3d10, primTriple(), SYM(dir), formal(primPath3(), SYM(p), false, false), formal(primInt(), SYM(t), false, false), formal(primInt(), SYM(sign), true, false), formal(primBoolean(), SYM(normalize), true, false));
-#line 106 "runpath3d.in"
+#line 107 "runpath3d.in"
addFunc(ve, run::gen_runpath3d11, primTriple(), SYM(dir), formal(primPath3(), SYM(p), false, false), formal(primReal(), SYM(t), false, false), formal(primBoolean(), SYM(normalize), true, false));
-#line 111 "runpath3d.in"
+#line 112 "runpath3d.in"
addFunc(ve, run::gen_runpath3d12, primTriple(), SYM(accel), formal(primPath3(), SYM(p), false, false), formal(primInt(), SYM(t), false, false), formal(primInt(), SYM(sign), true, false));
-#line 116 "runpath3d.in"
+#line 117 "runpath3d.in"
addFunc(ve, run::gen_runpath3d13, primTriple(), SYM(accel), formal(primPath3(), SYM(p), false, false), formal(primReal(), SYM(t), false, false));
-#line 121 "runpath3d.in"
+#line 122 "runpath3d.in"
addFunc(ve, run::gen_runpath3d14, primReal(), SYM(radius), formal(primPath3(), SYM(p), false, false), formal(primReal(), SYM(t), false, false));
-#line 133 "runpath3d.in"
+#line 134 "runpath3d.in"
addFunc(ve, run::gen_runpath3d15, primReal(), SYM(radius), formal(primTriple(), SYM(z0), false, false), formal(primTriple(), SYM(c0), false, false), formal(primTriple(), SYM(c1), false, false), formal(primTriple(), SYM(z1), false, false), formal(primReal(), SYM(t), false, false));
-#line 145 "runpath3d.in"
+#line 146 "runpath3d.in"
addFunc(ve, run::gen_runpath3d16, primPath3(), SYM(reverse), formal(primPath3(), SYM(p), false, false));
-#line 150 "runpath3d.in"
+#line 151 "runpath3d.in"
addFunc(ve, run::gen_runpath3d17, primPath3(), SYM(subpath), formal(primPath3(), SYM(p), false, false), formal(primInt(), SYM(a), false, false), formal(primInt(), SYM(b), false, false));
-#line 155 "runpath3d.in"
+#line 156 "runpath3d.in"
addFunc(ve, run::gen_runpath3d18, primPath3(), SYM(subpath), formal(primPath3(), SYM(p), false, false), formal(primReal(), SYM(a), false, false), formal(primReal(), SYM(b), false, false));
-#line 160 "runpath3d.in"
+#line 161 "runpath3d.in"
addFunc(ve, run::gen_runpath3d19, primInt(), SYM(length), formal(primPath3(), SYM(p), false, false));
-#line 165 "runpath3d.in"
+#line 166 "runpath3d.in"
addFunc(ve, run::gen_runpath3d20, primBoolean(), SYM(cyclic), formal(primPath3(), SYM(p), false, false));
-#line 170 "runpath3d.in"
+#line 171 "runpath3d.in"
addFunc(ve, run::gen_runpath3d21, primBoolean(), SYM(straight), formal(primPath3(), SYM(p), false, false), formal(primInt(), SYM(t), false, false));
-#line 175 "runpath3d.in"
+#line 176 "runpath3d.in"
addFunc(ve, run::gen_runpath3d22, primPath3(), SYM(unstraighten), formal(primPath3(), SYM(p), false, false));
-#line 180 "runpath3d.in"
+#line 181 "runpath3d.in"
addFunc(ve, run::gen_runpath3d23, primReal(), SYM(straightness), formal(primPath3(), SYM(p), false, false), formal(primInt(), SYM(t), false, false));
-#line 191 "runpath3d.in"
+#line 192 "runpath3d.in"
addFunc(ve, run::gen_runpath3d24, primReal(), SYM(straightness), formal(primTriple(), SYM(z0), false, false), formal(primTriple(), SYM(c0), false, false), formal(primTriple(), SYM(c1), false, false), formal(primTriple(), SYM(z1), false, false));
-#line 199 "runpath3d.in"
+#line 200 "runpath3d.in"
addFunc(ve, run::gen_runpath3d25, primBoolean(), SYM(piecewisestraight), formal(primPath3(), SYM(p), false, false));
-#line 204 "runpath3d.in"
+#line 205 "runpath3d.in"
addFunc(ve, run::gen_runpath3d26, primReal(), SYM(arclength), formal(primPath3(), SYM(p), false, false));
-#line 209 "runpath3d.in"
+#line 210 "runpath3d.in"
addFunc(ve, run::gen_runpath3d27, primReal(), SYM(arctime), formal(primPath3(), SYM(p), false, false), formal(primReal(), SYM(dval), false, false));
-#line 214 "runpath3d.in"
+#line 215 "runpath3d.in"
addFunc(ve, run::gen_runpath3d28, realArray(), SYM(intersect), formal(primPath3(), SYM(p), false, false), formal(primPath3(), SYM(q), false, false), formal(primReal(), SYM(fuzz), true, false));
-#line 232 "runpath3d.in"
+#line 233 "runpath3d.in"
addFunc(ve, run::gen_runpath3d29, realArray2(), SYM(intersections), formal(primPath3(), SYM(p), false, false), formal(primPath3(), SYM(q), false, false), formal(primReal(), SYM(fuzz), true, false));
-#line 265 "runpath3d.in"
- addFunc(ve, run::gen_runpath3d30, realArray2(), SYM(intersections), formal(primPath3(), SYM(p), false, false), formal(tripleArray2(), SYM(p), false, false), formal(primReal(), SYM(fuzz), true, false));
-#line 286 "runpath3d.in"
- addFunc(ve, run::gen_runpath3d31, primInt(), SYM(size), formal(primPath3(), SYM(p), false, false));
-#line 291 "runpath3d.in"
- addFunc(ve, run::gen_runpath3d32, primPath3(), SYM_AMPERSAND, formal(primPath3(), SYM(p), false, false), formal(primPath3(), SYM(q), false, false));
-#line 296 "runpath3d.in"
- addFunc(ve, run::gen_runpath3d33, primTriple(), SYM(min), formal(primPath3(), SYM(p), false, false));
-#line 301 "runpath3d.in"
- addFunc(ve, run::gen_runpath3d34, primTriple(), SYM(max), formal(primPath3(), SYM(p), false, false));
+#line 266 "runpath3d.in"
+ addFunc(ve, run::gen_runpath3d30, realArray(), SYM(intersect), formal(primPath3(), SYM(p), false, false), formal(tripleArray2(), SYM(p), false, false), formal(primReal(), SYM(fuzz), true, false));
+#line 285 "runpath3d.in"
+ addFunc(ve, run::gen_runpath3d31, realArray2(), SYM(intersections), formal(primPath3(), SYM(p), false, false), formal(tripleArray2(), SYM(p), false, false), formal(primReal(), SYM(fuzz), true, false));
#line 306 "runpath3d.in"
- addFunc(ve, run::gen_runpath3d35, realArray(), SYM(mintimes), formal(primPath3(), SYM(p), false, false));
+ addFunc(ve, run::gen_runpath3d32, primInt(), SYM(size), formal(primPath3(), SYM(p), false, false));
+#line 311 "runpath3d.in"
+ addFunc(ve, run::gen_runpath3d33, primPath3(), SYM_AMPERSAND, formal(primPath3(), SYM(p), false, false), formal(primPath3(), SYM(q), false, false));
#line 316 "runpath3d.in"
- addFunc(ve, run::gen_runpath3d36, realArray(), SYM(maxtimes), formal(primPath3(), SYM(p), false, false));
+ addFunc(ve, run::gen_runpath3d34, primTriple(), SYM(min), formal(primPath3(), SYM(p), false, false));
+#line 321 "runpath3d.in"
+ addFunc(ve, run::gen_runpath3d35, primTriple(), SYM(max), formal(primPath3(), SYM(p), false, false));
#line 326 "runpath3d.in"
- addFunc(ve, run::gen_runpath3d37, primPath3(), SYM_TIMES, formal(realArray2(), SYM(t), false, false), formal(primPath3(), SYM(g), false, false));
-#line 331 "runpath3d.in"
- addFunc(ve, run::gen_runpath3d38, primPair(), SYM(minratio), formal(primPath3(), SYM(g), false, false));
+ addFunc(ve, run::gen_runpath3d36, realArray(), SYM(mintimes), formal(primPath3(), SYM(p), false, false));
#line 336 "runpath3d.in"
- addFunc(ve, run::gen_runpath3d39, primPair(), SYM(maxratio), formal(primPath3(), SYM(g), false, false));
+ addFunc(ve, run::gen_runpath3d37, realArray(), SYM(maxtimes), formal(primPath3(), SYM(p), false, false));
+#line 346 "runpath3d.in"
+ addFunc(ve, run::gen_runpath3d38, primPath3(), SYM_TIMES, formal(realArray2(), SYM(t), false, false), formal(primPath3(), SYM(g), false, false));
+#line 351 "runpath3d.in"
+ addFunc(ve, run::gen_runpath3d39, primPair(), SYM(minratio), formal(primPath3(), SYM(g), false, false));
+#line 356 "runpath3d.in"
+ addFunc(ve, run::gen_runpath3d40, primPair(), SYM(maxratio), formal(primPath3(), SYM(g), false, false));
+#line 361 "runpath3d.in"
+ addFunc(ve, run::gen_runpath3d41, primReal(), SYM(orient), formal(primTriple(), SYM(a), false, false), formal(primTriple(), SYM(b), false, false), formal(primTriple(), SYM(c), false, false), formal(primTriple(), SYM(d), false, false));
+#line 378 "runpath3d.in"
+ addFunc(ve, run::gen_runpath3d42, primReal(), SYM(insphere), formal(primTriple(), SYM(a), false, false), formal(primTriple(), SYM(b), false, false), formal(primTriple(), SYM(c), false, false), formal(primTriple(), SYM(d), false, false), formal(primTriple(), SYM(e), false, false));
}
} // namespace trans
diff --git a/Build/source/utils/asymptote/runpath3d.in b/Build/source/utils/asymptote/runpath3d.in
index f4e355d838f..74c337748f7 100644
--- a/Build/source/utils/asymptote/runpath3d.in
+++ b/Build/source/utils/asymptote/runpath3d.in
@@ -17,6 +17,7 @@ triplearray2* => tripleArray2()
#include "path3.h"
#include "array.h"
#include "drawsurface.h"
+#include "predicates.h"
using namespace camp;
using namespace vm;
@@ -262,6 +263,25 @@ realarray2* intersections(path3 p, path3 q, real fuzz=-1)
return V;
}
+realarray* intersect(path3 p, triplearray2 *P, real fuzz=-1)
+{
+ triple *A;
+ copyArray2C(A,P,true,4);
+ if(fuzz <= 0) fuzz=BigFuzz*::max(::max(length(p.max()),length(p.min())),
+ norm(A,16));
+ std::vector<real> T,U,V;
+ bool found=intersections(T,U,V,p,A,fuzz,true);
+ delete[] A;
+ if(found) {
+ array *W=new array(3);
+ (*W)[0]=T[0];
+ (*W)[1]=U[0];
+ (*W)[2]=V[0];
+ return W;
+ } else
+ return new array(0);
+}
+
realarray2* intersections(path3 p, triplearray2 *P, real fuzz=-1)
{
triple *A;
@@ -269,7 +289,7 @@ realarray2* intersections(path3 p, triplearray2 *P, real fuzz=-1)
if(fuzz <= 0) fuzz=BigFuzz*::max(::max(length(p.max()),length(p.min())),
norm(A,16));
std::vector<real> T,U,V;
- intersections(T,U,V,p,A,fuzz);
+ intersections(T,U,V,p,A,fuzz,false);
delete[] A;
size_t n=T.size();
array *W=new array(n);
@@ -337,3 +357,40 @@ pair maxratio(path3 g)
{
return g.ratio(::max);
}
+
+// Return a negative (positive) value if a--b--c--cycle is oriented
+// counterclockwise (clockwise) when viewed from d or zero if all four
+// points are coplanar.
+// The value returned is the determinant
+// |a.x a.y a.z 1|
+// |b.x b.y b.z 1|
+// |c.x c.y c.z 1|
+// |d.x d.y d.z 1|
+real orient(triple a, triple b, triple c, triple d)
+{
+ real A[]={a.getx(),a.gety(),a.getz()};
+ real B[]={b.getx(),b.gety(),b.getz()};
+ real C[]={c.getx(),c.gety(),c.getz()};
+ real D[]={d.getx(),d.gety(),d.getz()};
+ return orient3d(A,B,C,D);
+}
+
+// Return a positive (negative) value if e lies inside (outside)
+// the sphere passing through the points a,b,c,d oriented so that
+// a--b--c--cycle appears in clockwise order when viewed from d
+// or zero if all five points are cospherical.
+// The value returned is the determinant
+// |a.x a.y a.z a.x^2+a.y^2+a.z^2 1|
+// |b.x b.y b.z b.x^2+b.y^2+b.z^2 1|
+// |c.x c.y c.z c.x^2+c.y^2+c.z^2 1|
+// |d.x d.y d.z d.x^2+d.y^2+d.z^2 1|
+// |e.x e.y e.z e.x^2+e.y^2+e.z^2 1|
+real insphere(triple a, triple b, triple c, triple d, triple e)
+{
+ real A[]={a.getx(),a.gety(),a.getz()};
+ real B[]={b.getx(),b.gety(),b.getz()};
+ real C[]={c.getx(),c.gety(),c.getz()};
+ real D[]={d.getx(),d.gety(),d.getz()};
+ real E[]={e.getx(),e.gety(),e.getz()};
+ return insphere(A,B,C,D,E);
+}
diff --git a/Build/source/utils/asymptote/runpicture.cc b/Build/source/utils/asymptote/runpicture.cc
index 00b77c4fa53..a950c28b15a 100644
--- a/Build/source/utils/asymptote/runpicture.cc
+++ b/Build/source/utils/asymptote/runpicture.cc
@@ -898,7 +898,20 @@ void gen_runpicture45(stack *Stack)
b=group->bounds();
b *= magnification;
+ const char *oldlocale=setlocale(LC_NUMERIC,NULL);
+ bool override=oldlocale && strcmp(oldlocale,"C") != 0;
+ if(override) {
+ oldlocale=StrdupNoGC(oldlocale);
+ setlocale(LC_NUMERIC,"C");
+ }
+
fprintf(pipeout,"%g %g %g %g\n",b.left,b.right,b.bottom,b.top);
+
+ if(override) {
+ setlocale(LC_NUMERIC,oldlocale);
+ delete[] oldlocale;
+ }
+
fflush(pipeout);
++n;
++p;
@@ -934,7 +947,7 @@ void gen_runpicture45(stack *Stack)
// Three-dimensional picture and surface operations
// Bezier curve
-#line 615 "runpicture.in"
+#line 628 "runpicture.in"
// void _draw(picture *f, path3 g, triple center=Zero, pen p, Int interaction=0);
void gen_runpicture46(stack *Stack)
{
@@ -943,13 +956,13 @@ void gen_runpicture46(stack *Stack)
triple center=vm::pop<triple>(Stack,Zero);
path3 g=vm::pop<path3>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 616 "runpicture.in"
+#line 629 "runpicture.in"
if(g.size() > 0)
f->append(new drawPath3(g,center,p,(Interaction) intcast(interaction)));
}
// Bezier patch
-#line 622 "runpicture.in"
+#line 635 "runpicture.in"
// void draw(picture *f, triplearray2 *P, triple center, bool straight, penarray *p, real opacity, real shininess, real PRCshininess, triple normal, penarray *colors, Int interaction, bool prc=true);
void gen_runpicture47(stack *Stack)
{
@@ -965,14 +978,14 @@ void gen_runpicture47(stack *Stack)
triple center=vm::pop<triple>(Stack);
triplearray2 * P=vm::pop<triplearray2 *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 625 "runpicture.in"
+#line 638 "runpicture.in"
f->append(new drawSurface(*P,center,straight,*p,opacity,shininess,
PRCshininess,normal,*colors,
(Interaction) intcast(interaction),prc));
}
// General NURBS curve
-#line 632 "runpicture.in"
+#line 645 "runpicture.in"
// void draw(picture *f, triplearray *P, realarray *knot, realarray *weights=emptyarray, pen p);
void gen_runpicture48(stack *Stack)
{
@@ -981,12 +994,12 @@ void gen_runpicture48(stack *Stack)
realarray * knot=vm::pop<realarray *>(Stack);
triplearray * P=vm::pop<triplearray *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 634 "runpicture.in"
+#line 647 "runpicture.in"
f->append(new drawNurbsPath3(*P,knot,weights,p));
}
// General NURBS surface
-#line 639 "runpicture.in"
+#line 652 "runpicture.in"
// void draw(picture *f, triplearray2 *P, realarray *uknot, realarray *vknot, realarray2 *weights=emptyarray, penarray *p, real opacity, real shininess, real PRCshininess, penarray *colors);
void gen_runpicture49(stack *Stack)
{
@@ -1000,13 +1013,13 @@ void gen_runpicture49(stack *Stack)
realarray * uknot=vm::pop<realarray *>(Stack);
triplearray2 * P=vm::pop<triplearray2 *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 642 "runpicture.in"
+#line 655 "runpicture.in"
f->append(new drawNurbs(*P,uknot,vknot,weights,*p,opacity,shininess,
PRCshininess,*colors));
}
// PRC unit sphere
-#line 648 "runpicture.in"
+#line 661 "runpicture.in"
// void drawPRCsphere(picture *f, realarray2 *t, bool half=false, penarray *p, real opacity, real shininess, Int type);
void gen_runpicture50(stack *Stack)
{
@@ -1017,12 +1030,12 @@ void gen_runpicture50(stack *Stack)
bool half=vm::pop<bool>(Stack,false);
realarray2 * t=vm::pop<realarray2 *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 650 "runpicture.in"
+#line 663 "runpicture.in"
f->append(new drawSphere(*t,half,*p,opacity,shininess,intcast(type)));
}
// PRC unit cylinder
-#line 655 "runpicture.in"
+#line 668 "runpicture.in"
// void drawPRCcylinder(picture *f, realarray2 *t, penarray *p, real opacity, real shininess);
void gen_runpicture51(stack *Stack)
{
@@ -1031,12 +1044,12 @@ void gen_runpicture51(stack *Stack)
penarray * p=vm::pop<penarray *>(Stack);
realarray2 * t=vm::pop<realarray2 *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 657 "runpicture.in"
+#line 670 "runpicture.in"
f->append(new drawCylinder(*t,*p,opacity,shininess));
}
// PRC unit disk
-#line 662 "runpicture.in"
+#line 675 "runpicture.in"
// void drawPRCdisk(picture *f, realarray2 *t, penarray *p, real opacity, real shininess);
void gen_runpicture52(stack *Stack)
{
@@ -1045,12 +1058,12 @@ void gen_runpicture52(stack *Stack)
penarray * p=vm::pop<penarray *>(Stack);
realarray2 * t=vm::pop<realarray2 *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 664 "runpicture.in"
+#line 677 "runpicture.in"
f->append(new drawDisk(*t,*p,opacity,shininess));
}
// General PRC tube
-#line 669 "runpicture.in"
+#line 682 "runpicture.in"
// void drawPRCtube(picture *f, path3 center, path3 g, penarray *p, real opacity, real shininess);
void gen_runpicture53(stack *Stack)
{
@@ -1060,12 +1073,12 @@ void gen_runpicture53(stack *Stack)
path3 g=vm::pop<path3>(Stack);
path3 center=vm::pop<path3>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 671 "runpicture.in"
+#line 684 "runpicture.in"
f->append(new drawTube(center,g,*p,opacity,shininess));
}
// Draw pixel
-#line 676 "runpicture.in"
+#line 689 "runpicture.in"
// void drawpixel(picture *f, triple v, pen p, real width=1.0);
void gen_runpicture54(stack *Stack)
{
@@ -1073,12 +1086,12 @@ void gen_runpicture54(stack *Stack)
pen p=vm::pop<pen>(Stack);
triple v=vm::pop<triple>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 677 "runpicture.in"
+#line 690 "runpicture.in"
f->append(new drawPixel(v,p,width));
}
// Draw triangles
-#line 682 "runpicture.in"
+#line 695 "runpicture.in"
// void draw(picture *f, triplearray *v, Intarray2 *vi, triplearray *n, Intarray2 *ni, penarray *p, real opacity, real shininess, real PRCshininess, penarray *c=emptyarray, Intarray2 *ci=emptyarray);
void gen_runpicture55(stack *Stack)
{
@@ -1093,63 +1106,63 @@ void gen_runpicture55(stack *Stack)
Intarray2 * vi=vm::pop<Intarray2 *>(Stack);
triplearray * v=vm::pop<triplearray *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 686 "runpicture.in"
+#line 699 "runpicture.in"
f->append(new drawTriangles(*v,*vi,*n,*ni,*p,opacity,shininess,PRCshininess,
*c,*ci));
}
-#line 691 "runpicture.in"
+#line 704 "runpicture.in"
// triple min3(picture *f);
void gen_runpicture56(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 692 "runpicture.in"
+#line 705 "runpicture.in"
{Stack->push<triple>(f->bounds3().Min()); return;}
}
-#line 696 "runpicture.in"
+#line 709 "runpicture.in"
// triple max3(picture *f);
void gen_runpicture57(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 697 "runpicture.in"
+#line 710 "runpicture.in"
{Stack->push<triple>(f->bounds3().Max()); return;}
}
-#line 701 "runpicture.in"
+#line 714 "runpicture.in"
// triple size3(picture *f);
void gen_runpicture58(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 702 "runpicture.in"
+#line 715 "runpicture.in"
bbox3 b=f->bounds3();
{Stack->push<triple>(b.Max()-b.Min()); return;}
}
-#line 707 "runpicture.in"
+#line 720 "runpicture.in"
// pair minratio(picture *f);
void gen_runpicture59(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 708 "runpicture.in"
+#line 721 "runpicture.in"
{Stack->push<pair>(f->ratio(::min)); return;}
}
-#line 712 "runpicture.in"
+#line 725 "runpicture.in"
// pair maxratio(picture *f);
void gen_runpicture60(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 713 "runpicture.in"
+#line 726 "runpicture.in"
{Stack->push<pair>(f->ratio(::max)); return;}
}
-#line 717 "runpicture.in"
+#line 730 "runpicture.in"
// bool is3D(picture *f);
void gen_runpicture61(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 718 "runpicture.in"
+#line 731 "runpicture.in"
{Stack->push<bool>(f->have3D()); return;}
}
@@ -1251,37 +1264,37 @@ void gen_runpicture_venv(venv &ve)
addFunc(ve, run::gen_runpicture44, primVoid(), SYM(shipout3), formal(primString() , SYM(prefix), false, false), formal(primPicture(), SYM(f), false, false));
#line 481 "runpicture.in"
addFunc(ve, run::gen_runpicture45, primVoid(), SYM(deconstruct), formal(primPicture(), SYM(f), false, false), formal(primPicture(), SYM(preamble), true, false), formal(primReal(), SYM(magnification), true, false), formal(transformFunction(), SYM(xform), false, false));
-#line 611 "runpicture.in"
+#line 624 "runpicture.in"
addFunc(ve, run::gen_runpicture46, primVoid(), SYM(_draw), formal(primPicture(), SYM(f), false, false), formal(primPath3(), SYM(g), false, false), formal(primTriple(), SYM(center), true, false), formal(primPen(), SYM(p), false, false), formal(primInt(), SYM(interaction), true, false));
-#line 621 "runpicture.in"
+#line 634 "runpicture.in"
addFunc(ve, run::gen_runpicture47, primVoid(), SYM(draw), formal(primPicture(), SYM(f), false, false), formal(tripleArray2(), SYM(p), false, false), formal(primTriple(), SYM(center), false, false), formal(primBoolean(), SYM(straight), false, false), formal(penArray() , SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false), formal(primReal(), SYM(prcshininess), false, false), formal(primTriple(), SYM(normal), false, false), formal(penArray() , SYM(colors), false, false), formal(primInt(), SYM(interaction), false, false), formal(primBoolean(), SYM(prc), true, false));
-#line 631 "runpicture.in"
+#line 644 "runpicture.in"
addFunc(ve, run::gen_runpicture48, primVoid(), SYM(draw), formal(primPicture(), SYM(f), false, false), formal(tripleArray(), SYM(p), false, false), formal(realArray(), SYM(knot), false, false), formal(realArray(), SYM(weights), true, false), formal(primPen(), SYM(p), false, false));
-#line 638 "runpicture.in"
+#line 651 "runpicture.in"
addFunc(ve, run::gen_runpicture49, primVoid(), SYM(draw), formal(primPicture(), SYM(f), false, false), formal(tripleArray2(), SYM(p), false, false), formal(realArray(), SYM(uknot), false, false), formal(realArray(), SYM(vknot), false, false), formal(realArray2(), SYM(weights), true, false), formal(penArray() , SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false), formal(primReal(), SYM(prcshininess), false, false), formal(penArray() , SYM(colors), false, false));
-#line 647 "runpicture.in"
+#line 660 "runpicture.in"
addFunc(ve, run::gen_runpicture50, primVoid(), SYM(drawPRCsphere), formal(primPicture(), SYM(f), false, false), formal(realArray2(), SYM(t), false, false), formal(primBoolean(), SYM(half), true, false), formal(penArray() , SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false), formal(primInt(), SYM(type), false, false));
-#line 654 "runpicture.in"
+#line 667 "runpicture.in"
addFunc(ve, run::gen_runpicture51, primVoid(), SYM(drawPRCcylinder), formal(primPicture(), SYM(f), false, false), formal(realArray2(), SYM(t), false, false), formal(penArray() , SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false));
-#line 661 "runpicture.in"
+#line 674 "runpicture.in"
addFunc(ve, run::gen_runpicture52, primVoid(), SYM(drawPRCdisk), formal(primPicture(), SYM(f), false, false), formal(realArray2(), SYM(t), false, false), formal(penArray() , SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false));
-#line 668 "runpicture.in"
+#line 681 "runpicture.in"
addFunc(ve, run::gen_runpicture53, primVoid(), SYM(drawPRCtube), formal(primPicture(), SYM(f), false, false), formal(primPath3(), SYM(center), false, false), formal(primPath3(), SYM(g), false, false), formal(penArray() , SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false));
-#line 675 "runpicture.in"
+#line 688 "runpicture.in"
addFunc(ve, run::gen_runpicture54, primVoid(), SYM(drawpixel), formal(primPicture(), SYM(f), false, false), formal(primTriple(), SYM(v), false, false), formal(primPen(), SYM(p), false, false), formal(primReal(), SYM(width), true, false));
-#line 681 "runpicture.in"
+#line 694 "runpicture.in"
addFunc(ve, run::gen_runpicture55, primVoid(), SYM(draw), formal(primPicture(), SYM(f), false, false), formal(tripleArray(), SYM(v), false, false), formal(IntArray2(), SYM(vi), false, false), formal(tripleArray(), SYM(n), false, false), formal(IntArray2(), SYM(ni), false, false), formal(penArray() , SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false), formal(primReal(), SYM(prcshininess), false, false), formal(penArray() , SYM(c), true, false), formal(IntArray2(), SYM(ci), true, false));
-#line 691 "runpicture.in"
+#line 704 "runpicture.in"
addFunc(ve, run::gen_runpicture56, primTriple(), SYM(min3), formal(primPicture(), SYM(f), false, false));
-#line 696 "runpicture.in"
+#line 709 "runpicture.in"
addFunc(ve, run::gen_runpicture57, primTriple(), SYM(max3), formal(primPicture(), SYM(f), false, false));
-#line 701 "runpicture.in"
+#line 714 "runpicture.in"
addFunc(ve, run::gen_runpicture58, primTriple(), SYM(size3), formal(primPicture(), SYM(f), false, false));
-#line 707 "runpicture.in"
+#line 720 "runpicture.in"
addFunc(ve, run::gen_runpicture59, primPair(), SYM(minratio), formal(primPicture(), SYM(f), false, false));
-#line 712 "runpicture.in"
+#line 725 "runpicture.in"
addFunc(ve, run::gen_runpicture60, primPair(), SYM(maxratio), formal(primPicture(), SYM(f), false, false));
-#line 717 "runpicture.in"
+#line 730 "runpicture.in"
addFunc(ve, run::gen_runpicture61, primBoolean(), SYM(is3D), formal(primPicture(), SYM(f), false, false));
}
diff --git a/Build/source/utils/asymptote/runpicture.in b/Build/source/utils/asymptote/runpicture.in
index 40209ed5860..e3896c4882d 100644
--- a/Build/source/utils/asymptote/runpicture.in
+++ b/Build/source/utils/asymptote/runpicture.in
@@ -576,7 +576,20 @@ void deconstruct(picture *f, picture *preamble=NULL, real magnification=1,
b=group->bounds();
b *= magnification;
+ const char *oldlocale=setlocale(LC_NUMERIC,NULL);
+ bool override=oldlocale && strcmp(oldlocale,"C") != 0;
+ if(override) {
+ oldlocale=StrdupNoGC(oldlocale);
+ setlocale(LC_NUMERIC,"C");
+ }
+
fprintf(pipeout,"%g %g %g %g\n",b.left,b.right,b.bottom,b.top);
+
+ if(override) {
+ setlocale(LC_NUMERIC,oldlocale);
+ delete[] oldlocale;
+ }
+
fflush(pipeout);
++n;
++p;
diff --git a/Build/source/utils/asymptote/settings.cc b/Build/source/utils/asymptote/settings.cc
index 93556ad62be..7b3d43529f9 100644
--- a/Build/source/utils/asymptote/settings.cc
+++ b/Build/source/utils/asymptote/settings.cc
@@ -1147,6 +1147,8 @@ void initSettings() {
addOption(new versionOption("version", 0, "Show version"));
addOption(new pairSetting("offset", 'O', "pair", "PostScript offset"));
+ addOption(new pairSetting("aligndir", 0, "pair",
+ "Directional page alignment (overrides align)"));
addOption(new alignSetting("align", 'a', "C|B|T|Z",
"Center, Bottom, Top, or Zero page alignment",
"C"));
diff --git a/Build/source/utils/asymptote/stack.cc b/Build/source/utils/asymptote/stack.cc
index 99a71e79348..acfd05c1493 100644
--- a/Build/source/utils/asymptote/stack.cc
+++ b/Build/source/utils/asymptote/stack.cc
@@ -279,7 +279,7 @@ void stack::runWithOrWithoutClosure(lambda *l, vars_t vars, vars_t parent)
# define FRAMEVAR(frame,n) (frame[(n)])
#else
// Link to the variables, be they in a closure or on the stack.
- mem::vector<item> *varlink;
+ mem::vector<item> *varlink=NULL;
# define SET_VARLINK assert(vars); varlink = &vars->vars
# define VAR(n) ( (*varlink)[(n) + frameStart] )
diff --git a/Build/source/utils/asymptote/texfile.cc b/Build/source/utils/asymptote/texfile.cc
index 67874e3cb42..a7873bb2729 100644
--- a/Build/source/utils/asymptote/texfile.cc
+++ b/Build/source/utils/asymptote/texfile.cc
@@ -98,7 +98,7 @@ void texfile::prologue()
}
}
- if(settings::xe(texengine))
+ if(settings::xe(texengine) && !inlinetex)
*out << "\\usepackage{everypage}%" << newl;
if(settings::latex(texengine)) {
@@ -136,14 +136,6 @@ void texfile::prologue()
}
}
-// Workaround Adobe Reader transparency artifact:
- if(settings::pdf(texengine)) {
- if(settings::xe(texengine))
- *out << "\\AddEverypageHook{\\special{pdf: put @thispage <</Group << /S /Transparency /I true /CS /DeviceRGB>> >>}}%" << newl;
- else
- *out << "\\pdfpageattr{/Group <</S /Transparency /I true /CS /DeviceRGB>>}%" << newl;
- }
-
beginpage();
}
@@ -357,9 +349,9 @@ void svgtexfile::endspecial()
void svgtexfile::begintransform()
{
- *out << "<g transform='matrix(1 0 0 1 "
- << (-Hoffset+1.99*settings::cm)*ps2tex << " "
- << (1.9*settings::cm+box.top)*ps2tex
+ *out << "<g transform='matrix(" << tex2ps << " 0 0 " << tex2ps <<" "
+ << (-Hoffset+1.99*settings::cm) << " "
+ << (1.9*settings::cm+box.top)
<< ")'>" << nl;
}