texlive[43422] Build/source/utils/asymptote: asy 2.40 sources

commits+karl at tug.org commits+karl at tug.org
Tue Mar 7 19:10:03 CET 2017


Revision: 43422
          http://tug.org/svn/texlive?view=revision&revision=43422
Author:   karl
Date:     2017-03-07 19:10:02 +0100 (Tue, 07 Mar 2017)
Log Message:
-----------
asy 2.40 sources

Modified Paths:
--------------
    trunk/Build/source/utils/README
    trunk/Build/source/utils/asymptote/ChangeLog
    trunk/Build/source/utils/asymptote/Makefile.in
    trunk/Build/source/utils/asymptote/README
    trunk/Build/source/utils/asymptote/ReleaseNotes
    trunk/Build/source/utils/asymptote/angle.h
    trunk/Build/source/utils/asymptote/asy-keywords.el
    trunk/Build/source/utils/asymptote/asy.list
    trunk/Build/source/utils/asymptote/asymptote.spec
    trunk/Build/source/utils/asymptote/base/asymptote.py
    trunk/Build/source/utils/asymptote/base/graph.asy
    trunk/Build/source/utils/asymptote/base/graph3.asy
    trunk/Build/source/utils/asymptote/base/ode.asy
    trunk/Build/source/utils/asymptote/base/palette.asy
    trunk/Build/source/utils/asymptote/base/plain.asy
    trunk/Build/source/utils/asymptote/base/plain_pens.asy
    trunk/Build/source/utils/asymptote/base/plain_picture.asy
    trunk/Build/source/utils/asymptote/base/smoothcontour3.asy
    trunk/Build/source/utils/asymptote/base/solids.asy
    trunk/Build/source/utils/asymptote/base/three.asy
    trunk/Build/source/utils/asymptote/base/three_surface.asy
    trunk/Build/source/utils/asymptote/builtin.cc
    trunk/Build/source/utils/asymptote/castop.h
    trunk/Build/source/utils/asymptote/config.guess
    trunk/Build/source/utils/asymptote/config.sub
    trunk/Build/source/utils/asymptote/configure
    trunk/Build/source/utils/asymptote/configure.ac
    trunk/Build/source/utils/asymptote/doc/CAD.pdf
    trunk/Build/source/utils/asymptote/doc/FAQ/asy-faq.info
    trunk/Build/source/utils/asymptote/doc/TeXShopAndAsymptote.pdf
    trunk/Build/source/utils/asymptote/doc/asy-latex.dtx
    trunk/Build/source/utils/asymptote/doc/asy-latex.pdf
    trunk/Build/source/utils/asymptote/doc/asyRefCard.pdf
    trunk/Build/source/utils/asymptote/doc/asymptote.pdf
    trunk/Build/source/utils/asymptote/doc/asymptote.sty
    trunk/Build/source/utils/asymptote/doc/asymptote.texi
    trunk/Build/source/utils/asymptote/doc/png/asymptote.info
    trunk/Build/source/utils/asymptote/drawelement.h
    trunk/Build/source/utils/asymptote/drawpath3.cc
    trunk/Build/source/utils/asymptote/drawpath3.h
    trunk/Build/source/utils/asymptote/drawsurface.cc
    trunk/Build/source/utils/asymptote/drawsurface.h
    trunk/Build/source/utils/asymptote/examples/washermethod.asy
    trunk/Build/source/utils/asymptote/glrender.cc
    trunk/Build/source/utils/asymptote/glrender.h
    trunk/Build/source/utils/asymptote/install-sh
    trunk/Build/source/utils/asymptote/item.h
    trunk/Build/source/utils/asymptote/lex.yy.cc
    trunk/Build/source/utils/asymptote/patches/README
    trunk/Build/source/utils/asymptote/picture.cc
    trunk/Build/source/utils/asymptote/revision.cc
    trunk/Build/source/utils/asymptote/runarray.cc
    trunk/Build/source/utils/asymptote/runarray.in
    trunk/Build/source/utils/asymptote/runlabel.cc
    trunk/Build/source/utils/asymptote/runlabel.in
    trunk/Build/source/utils/asymptote/runmath.cc
    trunk/Build/source/utils/asymptote/runmath.in
    trunk/Build/source/utils/asymptote/runpicture.cc
    trunk/Build/source/utils/asymptote/runpicture.in
    trunk/Build/source/utils/asymptote/settings.cc
    trunk/Build/source/utils/asymptote/settings.h
    trunk/Build/source/utils/asymptote/texfile.cc
    trunk/Build/source/utils/asymptote/triple.h
    trunk/Build/source/utils/asymptote/util.h

Added Paths:
-----------
    trunk/Build/source/utils/asymptote/beziercurve.cc
    trunk/Build/source/utils/asymptote/beziercurve.h
    trunk/Build/source/utils/asymptote/bezierpatch.cc
    trunk/Build/source/utils/asymptote/bezierpatch.h
    trunk/Build/source/utils/asymptote/examples/BezierSaddle.asy
    trunk/Build/source/utils/asymptote/examples/colorpatch.asy
    trunk/Build/source/utils/asymptote/gc-7.6.0.tar.gz
    trunk/Build/source/utils/asymptote/libatomic_ops-7.4.4.tar.gz

Removed Paths:
-------------
    trunk/Build/source/utils/asymptote/beziertriangle.cc
    trunk/Build/source/utils/asymptote/gc-7.4.2.tar.gz
    trunk/Build/source/utils/asymptote/libatomic_ops-7.4.2.tar.gz

Property Changed:
----------------
    trunk/Build/source/utils/asymptote/

Modified: trunk/Build/source/utils/README
===================================================================
--- trunk/Build/source/utils/README	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/README	2017-03-07 18:10:02 UTC (rev 43422)
@@ -5,8 +5,7 @@
 See comments in ../texk/README.
 
 
-asymptote 2.38 - checked 13may16
-  (this version for dev build testing only, not to be installed)
+asymptote 2.40 - checked 7mar17
   update to TL from CTAN, to include prebuilt doc.
   see http://tug.org/texlive/build.html#asymptote
   and tlpkg/bin/tl-update-asy

Index: trunk/Build/source/utils/asymptote
===================================================================
--- trunk/Build/source/utils/asymptote	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote	2017-03-07 18:10:02 UTC (rev 43422)

Property changes on: trunk/Build/source/utils/asymptote
___________________________________________________________________
Modified: svn:ignore
## -6,9 +6,7 ##
 binaries
 config.h
 config.status
-gc-7.4.0
 record.d.*
 svnrevision.cc
 xasy
-gc-*
 errors.temp
Modified: trunk/Build/source/utils/asymptote/ChangeLog
===================================================================
--- trunk/Build/source/utils/asymptote/ChangeLog	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/ChangeLog	2017-03-07 18:10:02 UTC (rev 43422)
@@ -1,3 +1,634 @@
+commit 5a6d3626f3589f7fdc7193dea97ae335ad70b242
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Wed Mar 1 23:43:49 2017 -0700
+
+    Increase adaptive rendering constant to 1.0.
+
+commit 35a65e91254f9326e70fcca3c334cc40cb5cb867
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Wed Mar 1 22:18:51 2017 -0700
+
+    Update to more recent system versions of glu32.dll and opengl32.dll libraries,
+    so that UNIX subdivision crack fix also works under MSDOS.
+
+commit f846f1d090b8ef8910a891a62b7ddfb945ec8280
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Wed Mar 1 22:09:50 2017 -0700
+
+    Fix multisample detection; remove MSDOS workarounds (tested with
+    freeglut-2.8.1).
+
+commit 8de2b9cae38a5bdfc29bbe6ee8bec9def0515c5c
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Sat Feb 25 01:45:58 2017 -0700
+
+    Use Straightness also for Bezier triangles.
+
+commit d4330f044f54bce7122052a8b2e860a39944f58d
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Sat Feb 25 01:31:01 2017 -0700
+
+    Optimize Straightness function.
+
+commit 8e6fb2dc64f2a7cf43a13f97752f2c5d902f381a
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Fri Feb 24 10:54:48 2017 -0700
+
+    Fix straightness test.
+
+commit f72338e8be394ab6716a7b488f016bbf7d3123d3
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Mon Feb 20 11:50:43 2017 -0700
+
+    Fix CFLAGS.
+
+commit 12af4538ad099cd597c9f6b3c816823fdc0ca7d4
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Sun Feb 19 11:44:53 2017 -0700
+
+    Localize declarations.
+
+commit 23a14592eb04fd15a7d062ccc693b225e927a0fe
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Sun Feb 19 11:37:30 2017 -0700
+
+    Force draw on color change.
+
+commit 6d5ef929f22eb9d7b4f82fe2d828eb6a6b39395f
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Sat Feb 18 20:03:01 2017 -0700
+
+    Move compare function to bezierpatch.cc.
+
+commit 5da211a76c91fc77111e4ffff2849c14846f95fc
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Wed Feb 15 18:25:34 2017 -0700
+
+    Update credits and example.
+
+commit 322fba942949338ce0b2a15e6f8a38c5c7f95ff1
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Wed Feb 15 15:19:55 2017 -0700
+
+    Simplify code.
+
+commit 9a0372b48f142f6429015f80a18071ee77b796da
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Wed Feb 15 07:52:52 2017 -0700
+
+    Revert "Detect material change also for specified vertex colors."
+    
+    This reverts commit c7878da529adde75a929a755dae7a42b2e9a3486.
+
+commit c7878da529adde75a929a755dae7a42b2e9a3486
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Wed Feb 15 07:45:14 2017 -0700
+
+    Detect material change also for specified vertex colors.
+
+commit af2b9b1592e3849c5e5c986fd92c745076eedb22
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Tue Feb 14 23:30:51 2017 -0700
+
+    Derive drawBezierPatch and drawBezierTriangle from drawSurface.
+
+commit 6036e20c654c10dc4514cc95162378578f5f15d5
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Tue Feb 14 23:29:17 2017 -0700
+
+    Don't override command-line CFLAGS.
+
+commit 53cd8fef6985ff057380289b58ba721c0bcbe4b0
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Tue Feb 14 16:52:42 2017 -0700
+
+    Work around broken CYGWIN headers.
+
+commit 5d2776ee98f73db470c4c02eb8dbb2cf02e01618
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Tue Feb 14 16:48:15 2017 -0700
+
+    Improve subdivision crack filling for Bezier triangles.
+
+commit f181de0b91d7fe3d0f009b096e12741fa10ebde2
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Tue Feb 14 09:27:51 2017 -0700
+
+    Update comments.
+
+commit 97881b9e66a053fcbec8298f3cd4c47549f1fbc1
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Mon Feb 13 14:12:20 2017 -0700
+
+    Fix warning message.
+
+commit 846025fa2fb7293558825b23eff3c87ad9f22e84
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Mon Feb 13 13:49:42 2017 -0700
+
+    Implement transparency workaround also for Bezier triangles.
+
+commit 064ad7478a319f0c98aaae524c72b5d068c1b359
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Mon Feb 13 11:33:35 2017 -0700
+
+    Implement transparency workaround also for Bezier triangles.
+
+commit 1c8b95b6e6f9bd0773861d233f880ff553f72ed1
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Mon Feb 13 03:56:02 2017 -0700
+
+    Remove unused code.
+
+commit f2de95a07077aaf2e4c812f0cd2706be14e4f3b1
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Mon Feb 13 03:54:10 2017 -0700
+
+    Test empty flag in BezierPatch::draw().
+
+commit 64134306851cc52f0fc134a7c6933f79f60149da
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Mon Feb 13 03:45:36 2017 -0700
+
+    Simplify code; update example.
+
+commit 42ef8903cabfc20ceef8971025d71e5a91458700
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Mon Feb 13 03:39:20 2017 -0700
+
+    Remove unused variable.
+
+commit f2964231df4f5220c07db04faccd99d05ac73580
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Mon Feb 13 03:36:51 2017 -0700
+
+    Simplify code.
+
+commit e209592e78c8fd8da53ee343768931a6ed23c89b
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Sun Feb 12 23:01:31 2017 -0700
+
+    Fix example.
+
+commit 0e09443aec3a961b46dc86b1c0a388d203a1f6bb
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Sun Feb 12 22:59:39 2017 -0700
+
+    Fix example.
+
+commit e9face7d68b591bcd39a0c2a8eddc458bb6910b3
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Sun Feb 12 22:46:06 2017 -0700
+
+    Update examples.
+
+commit 31c6630d550fab51331756a4d78bc6f199b226ea
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Sun Feb 12 14:59:39 2017 -0700
+
+    Partially work around OpenGL transparency bug by sorting transparent triangles
+    by their centroid depth.
+
+commit ca09f95435e91eefcffd15050657e53debc1f829
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Sun Feb 12 14:52:21 2017 -0700
+
+    Fix segmentation fault.
+
+commit 8388a6050b59764a1669bd7f56aa8864c4261dfc
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Sat Feb 11 19:49:58 2017 -0700
+
+    Update to gc-7.6.0.
+
+commit 0eb3950fd75f3ce45617a83ad1f8e30778e14d3b
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Wed Feb 8 12:21:48 2017 -0700
+
+    Fix stride.
+
+commit 7161eef9c86df2124549a42c0723610ca9e1acee
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Mon Feb 6 16:35:21 2017 -0700
+
+    Support compilation without OpenGL.
+
+commit 723495103fb4d189f6d1ec1349ecdd01275b89b0
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Fri Jan 27 14:23:35 2017 -0700
+
+    Fix post-release version number.
+
+commit 0c0164bdaba74be22c294aebdb880c6798ab6bbc
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Wed Jan 25 00:17:22 2017 -0700
+
+    Increment version to 2.40.
+
+commit 6895ed3fb866609fae46b01bd6e44b2f2bcf281f
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Tue Jan 24 22:43:43 2017 -0700
+
+    Update asymptote.py.
+
+commit 51cb6d02c8ce6599ce9975e315308ec99af60d7e
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Tue Jan 24 20:20:11 2017 -0700
+
+    Remove unwanted extension from shipout prefix.
+
+commit 80b4d2b25e304a4b11c60a28082130d1a17d44dd
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Tue Jan 24 14:24:59 2017 -0700
+
+    Use pdf 3D label processor also for luatex and lualatex tex engines.
+
+commit e793d86adc45d3738b9b69ad20212f5c9c18c364
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Tue Jan 24 13:50:47 2017 -0700
+
+    Reduce tubegranularity.
+
+commit 9366137351acf3cf45cf7c7de563f13d5a39bb95
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Tue Jan 24 13:37:02 2017 -0700
+
+    Make invalid string casts return an uninitialized variable.
+    
+    Add bool initialized(T) function for basic types T.
+
+commit 4c744193cc8fdd51d277e9566a114a589772ae4d
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Tue Jan 24 09:28:10 2017 -0700
+
+    Move lualatex test into TeX code.
+
+commit 9a8586b5f6c9581eb7cb93fe9775e1756de3c5c8
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Tue Jan 24 09:01:40 2017 -0700
+
+    Revert "Remove requirement to call nosetpagesize() when changing to lualatex engine."
+    
+    This reverts commit 70fccdee30727275b3b1cab79da18287837601e2.
+
+commit 70fccdee30727275b3b1cab79da18287837601e2
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Tue Jan 24 08:44:36 2017 -0700
+
+    Remove requirement to call nosetpagesize() when changing to lualatex engine.
+
+commit 7d9b49adf9e555e13dcea584e74bcd12f9636a49
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Sat Jan 21 16:59:00 2017 -0700
+
+    Reinstate patch outline mode.
+
+commit a96ffbbfba55fc69b27b1c6052545bbf99ee23f8
+Merge: 0be6f55 16ae9ee
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Sat Jan 21 15:45:27 2017 -0700
+
+    Merge branch 'master' of github.com:vectorgraphics/asymptote
+
+commit 0be6f55679c4b6cb0f7fe14c22b1f4b676e54d5f
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Sat Jan 21 15:45:17 2017 -0700
+
+    Add missing file.
+
+commit 1d32440f4abd08287e4b9672c98e41139540607c
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Sat Jan 21 15:43:00 2017 -0700
+
+    Split BezierCurver render and draw operations.
+
+commit 16ae9ee4892076ca4f1ba20581cfd8001459f4fd
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Sat Jan 21 15:43:00 2017 -0700
+
+    Split BezierCurver render and draw operations.
+
+commit ee78ea2311ce61048b7e559b6a3f510eb98387c3
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Sat Jan 21 11:24:49 2017 -0700
+
+    Implement Bezier curver renderer.
+
+commit fee686ab993af55e63a877c438d2fa233059f079
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Fri Jan 20 23:25:26 2017 -0700
+
+    Fix offscreen array sizes.
+
+commit 56326208e7a3f341556bd3d964fffeb8e9cba0a8
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Fri Jan 20 19:28:07 2017 -0700
+
+    Optimize billboard mode.
+
+commit eb0da243e2cd1d6738efbad9e549dad8c2bfafc2
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Wed Jan 18 00:41:22 2017 -0700
+
+    Cull offscreen Bezier triangles.
+
+commit b57705207c7b62a68ef90dacdfd5919248197135
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Wed Jan 18 00:20:12 2017 -0700
+
+    Cull offscreen subpatches.
+
+commit 189c89074852706cc3d8f6648dd30517465e9445
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Sun Jan 8 14:27:49 2017 -0700
+
+    Fix flatness test.
+
+commit a524000c1352b11fe4e3aa7d1335cc393841d29e
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Sat Jan 7 21:04:34 2017 -0700
+
+    Fix flatness test.
+
+commit 168b1f284139482deb8044c4328a10e57fbfec47
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Sat Jan 7 21:03:13 2017 -0700
+
+    Simplify code.
+
+commit 12363c3ba5048faca607ab2656e19d26b402b5cd
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Sat Jan 7 19:28:32 2017 -0700
+
+    Improve flatness test; simply code.
+
+commit 01f66ecfb744df300c04c760d81475b4d1e5450c
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Sat Jan 7 19:18:01 2017 -0700
+
+    Fix typo.
+
+commit adc9c3a165b8e74ed2728ec0203ce68234629ff3
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Sat Jan 7 19:16:44 2017 -0700
+
+    Add deepyellow synonym for olive color.
+
+commit 1cc7f83d73cbe2ece3e7e4f0e7640b2ec5cbe684
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Sat Nov 26 10:56:46 2016 -0700
+
+    Remove requirement to call nosetpagesize() after changing TeX engine.
+
+commit 33ed6c683a960b0a29951d3c7f8efbb15f64aaaf
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Fri Nov 25 16:50:06 2016 -0700
+
+    Implement robust workaround for graphicx.sty bug.
+
+commit 967f09a6fd79b84b8803fca8d9871c7f11f4942a
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Mon Nov 14 11:53:44 2016 -0700
+
+    Update asymptote.sty to force nosetpagesize also with xelatex TeX engine.
+
+commit 988530d0daf78c580ed305d07d0d23e140b2b52d
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Tue Nov 8 10:00:05 2016 -0700
+
+    Workaround setpagesize graphicx side effect when using asymptote.sty.
+
+commit 866ef9c47bedec14d1584b443bbcf02ba5be5b60
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Tue Nov 8 01:15:57 2016 -0700
+
+    Portably fix graphicx setpagesize bug.
+
+commit 27948832401841f1fd4c1ec6fa3f71e5a246dcc0
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Mon Nov 7 21:49:54 2016 -0700
+
+    Fix principalBranch.
+
+commit 529bc76b4f31e59332383c3068ef4b5e41c49865
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Tue Nov 1 00:19:20 2016 -0600
+
+    Minor optimization.
+
+commit 4aa1ffb19dfac6705a728f6b3ddeda353dee1868
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Sun Oct 30 02:46:17 2016 -0600
+
+    Minor optimization.
+
+commit 4e1d019889f5609205ecc2856afacb867ed8b66d
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Wed Oct 26 22:57:10 2016 -0600
+
+    Add paletteticks NoTicks option.
+
+commit 0a0f231cd247d3341f188fad28f00d29813cdee6
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Mon Oct 24 23:33:49 2016 -0600
+
+    Avoid empty axis labels.
+
+commit bd70d164fb84e06f0ff8aa5cb03b08d8adbf688b
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Sun Sep 4 22:06:31 2016 -0600
+
+    Implement improved workaround to recent graphicx incompatibilities, which
+    also works with inline TeX mode.
+
+commit 2f209f9ed847db0068c0ac85fa6c98571eeb9462
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Sun Aug 28 23:36:02 2016 -0600
+
+    Implement general workarounds for recently introduced graphicx and lualatex
+    backwards incompatibilities.
+
+commit afb95149c62f8c27605fc01ae75b9ce1bf678431
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Fri Aug 26 00:31:58 2016 -0600
+
+    Add patched version of plain.asy for TL2016 only.
+
+commit 758d08612b2895663947a31f68341caaceaf8a20
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Tue Aug 23 03:26:28 2016 -0600
+
+    Revert "Revert "Revert "Workaround pdflatex pdfpagewidth and pageheight bug in TeXLive 2016."""
+    
+    This reverts commit 896202ca85c76a5e09c1c68193b3459600586127.
+
+commit fe2510c2d5696fa8f259e535b022cae86938c735
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Mon Aug 15 14:12:30 2016 -0600
+
+    Revert "Add gl-matrix javascript library."
+    
+    This reverts commit 9878b4dc4358da80777666dc9cf80e351a80f937.
+
+commit 9878b4dc4358da80777666dc9cf80e351a80f937
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Mon Aug 15 10:20:27 2016 -0600
+
+    Add gl-matrix javascript library.
+
+commit 896202ca85c76a5e09c1c68193b3459600586127
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Thu Aug 4 00:07:00 2016 -0400
+
+    Revert "Revert "Workaround pdflatex pdfpagewidth and pageheight bug in TeXLive 2016.""
+    
+    This reverts commit b8ef9a8ae04ac345188cb31eab591945cd2a2abf.
+
+commit 421b733a96996452bd474b80988741fdb2ece342
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Thu Aug 4 00:06:29 2016 -0400
+
+    Revert "Implement alternative workaround for graphicx pagesize bug."
+    
+    This reverts commit 545f2b55cca742e6df16df2362fba18702171d50.
+
+commit 545f2b55cca742e6df16df2362fba18702171d50
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Wed Aug 3 23:10:17 2016 -0400
+
+    Implement alternative workaround for graphicx pagesize bug.
+
+commit b8ef9a8ae04ac345188cb31eab591945cd2a2abf
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Wed Aug 3 23:09:25 2016 -0400
+
+    Revert "Workaround pdflatex pdfpagewidth and pageheight bug in TeXLive 2016."
+    
+    This reverts commit 61cfa1e299de53c12a6ce08305383aac18ad9216.
+
+commit 61cfa1e299de53c12a6ce08305383aac18ad9216
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Tue Aug 2 23:23:01 2016 -0400
+
+    Workaround pdflatex pdfpagewidth and pageheight bug in TeXLive 2016.
+
+commit d76f6754b1552eb02dca5ab53ea4836c287c3e53
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Wed Jul 27 05:35:57 2016 -0600
+
+    Generalize palette(real[][], pen[]) to handle nonsquare arrays.
+
+commit ff41f2060c00278a13512dd66ca7424d697342c5
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Sat Jun 4 20:45:28 2016 -0600
+
+    Increase overlapedges scaling.
+
+commit 689fb9ebecdc859d438808178beb7151a0229698
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Sat Jun 4 20:03:11 2016 -0600
+
+    Revert "Remove obsolete overlapedges flag."
+    
+    This reverts commit 154c47b6962a23404857ada45d3d7b0752f4817e.
+
+commit d0c97bff49e5bc2c89ad0b48552b971d163414a5
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Sat Jun 4 20:00:48 2016 -0600
+
+    Fix typo.
+
+commit 7ecaf8f43931d728eaf4154092cefaa4d0d0c201
+Merge: 692051a 154c47b
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Thu Jun 2 23:11:58 2016 -0600
+
+    Merge branch 'patch'.
+
+commit 154c47b6962a23404857ada45d3d7b0752f4817e
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Thu Jun 2 22:59:14 2016 -0600
+
+    Remove obsolete overlapedges flag.
+
+commit 928af116df130df1e75d308c8722682e36b391b5
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Thu Jun 2 22:57:44 2016 -0600
+
+    Standardize flatness tests.
+
+commit 3f409fa5c904b82266ca576aa6372493b654dedf
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Thu Jun 2 15:13:17 2016 -0600
+
+    Relax flatness test.
+
+commit 5dece5cdcd7bad955f1e0836664fe3f572fd75f7
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Thu Jun 2 13:57:03 2016 -0600
+
+    Fix flatness test.
+
+commit 12238c7d03bd61aaffcfa5ab47b51d56acadb286
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Thu Jun 2 12:42:44 2016 -0600
+
+    Fix remaining normals.
+
+commit 826469f06a43a86fdc56999a88b7fe657797ee1d
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Thu Jun 2 03:16:42 2016 -0600
+
+    Fix color order.
+
+commit def2d72ac3e8472c5997fada88004765bb581a41
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Thu Jun 2 03:04:18 2016 -0600
+
+    Fix straight case.
+
+commit 2323c592d5a2e8fd800ce1e0b9288027dd89c88a
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Thu Jun 2 02:29:19 2016 -0600
+
+    Remove unused code.
+
+commit 0bdfab4a98dd496fb0f3187edb92bc47e551a423
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Thu Jun 2 02:02:47 2016 -0600
+
+    Simplify code.
+
+commit f03dc5c7e6e3007cf9cc8c628daf93f6ff2fe33f
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Wed Jun 1 13:47:31 2016 -0600
+
+    Fix subdivion cracks and zero normals.
+
+commit fdb20f62a69b5e8244f71025f349baf411e49332
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Wed May 18 15:08:42 2016 -0600
+
+    Add vertex shading.
+
+commit 31ba48ca76e1a118fde5812137366ecabca1d3e7
+Author: Andrew Bernakevitch <andrewbernakevitch at gmail.com>
+Date:   Wed May 18 14:35:47 2016 -0600
+
+    Add ASCII diagrams of the Bezier patch, including a diagram of the patch and one of the key points on the patch.
+
+commit 692051a2849fa4ae074ab565319b2af22a5fc828
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Tue May 17 10:16:53 2016 -0600
+
+    Fix formatting.
+
+commit f67594a5df27ec9862c7953c13522f16e8a59387
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Thu May 12 03:23:35 2016 -0600
+
+    Increment version to 2.39.
+
 commit 3f044f05ca7f3d30d3f61edcf1d991bd6ccc69dd
 Author: John Bowman <bowman at ualberta.ca>
 Date:   Thu May 12 02:16:25 2016 -0600
@@ -11,6 +642,12 @@
     Require ncurses library only with --enable-readline.
     Implement --disable-sigsegv configuration option.
 
+commit 4c1ac9da70652934fadfef75181aab7191845327
+Author: John Bowman <bowman at ualberta.ca>
+Date:   Thu May 12 01:14:03 2016 -0600
+
+    Begin implementation of bezier patch renderer.
+
 commit da2c3f8c7af68645c6cff8c04f555676413e47ba
 Author: John Bowman <bowman at ualberta.ca>
 Date:   Thu May 12 01:08:40 2016 -0600

Modified: trunk/Build/source/utils/asymptote/Makefile.in
===================================================================
--- trunk/Build/source/utils/asymptote/Makefile.in	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/Makefile.in	2017-03-07 18:10:02 UTC (rev 43422)
@@ -5,7 +5,7 @@
 
 GCVERSION = @GCVERSION@
 GC = gc-$(GCVERSION)
-LIBATOMIC = libatomic_ops-$(GCVERSION)
+LIBATOMIC = libatomic_ops- at ATOMICVERSION@
 GCOPTIONS = @GCOPTIONS@
 GCLIB = @GCLIB@
 GCPPLIB = @GCPPLIB@
@@ -24,7 +24,7 @@
 
 CAMP = camperror path drawpath drawlabel picture psfile texfile util settings \
        guide flatguide knot drawfill path3 drawpath3 drawsurface \
-       beziertriangle pen pipestream
+       beziercurve bezierpatch pen pipestream
 
 RUNTIME_FILES = runtime runbacktrace runpicture runlabel runhistory runarray \
 	runfile runsystem runpair runtriple runpath runpath3d runstring \
@@ -62,8 +62,8 @@
 ASY = ./asy -dir base -config "" -render=0
 
 DEFS = @DEFS@ @OPTIONS@ @PTHREAD_CFLAGS@ -DFFTWPP_SINGLE_THREAD
-CFLAGS = @CXXFLAGS@ @CFLAGS@ 
-OPTS = $(DEFS) @CPPFLAGS@ $(CFLAGS) 
+CFLAGS = @CFLAGS@
+OPTS = $(DEFS) @CPPFLAGS@ @CXXFLAGS@ $(CFLAGS)
 INCL = -I. @INCL@
 
 # Options for compiling the object files for the shared library.
@@ -70,7 +70,7 @@
 # gc has to be configured with the option --disable-threads in order to make a
 # shared library that doesn't seg fault.  For now, just disable gc in the
 # shared library.
-SHAREDOPTS = $(filter-out -DUSEGC, $(DEFS)) $(CFLAGS) -fPIC -DFOR_SHARED
+SHAREDOPTS = $(filter-out -DUSEGC, $(OPTS)) -fPIC -DFOR_SHARED
 
 CXX = @CXX@ -Wall
 CC = @CC@ -Wall
@@ -97,7 +97,7 @@
 last = $(shell cat revision.cc | sed -e 's/.*\"\(.*\)\";/\1/')
 usinggit = $(shell if test -d ".git"; then echo yes; fi)
 ifeq ($(usinggit),yes)
-	revision = $(shell LC_ALL="C" git describe | sed -e 's/git//' \
+	revision = $(shell LC_ALL="C" git describe --long | sed -e 's/git//' \
                     | sed -e 's/-g.*//')
 else
 	revision = @VERSION@

Modified: trunk/Build/source/utils/asymptote/README
===================================================================
--- trunk/Build/source/utils/asymptote/README	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/README	2017-03-07 18:10:02 UTC (rev 43422)
@@ -1,5 +1,5 @@
 			  ASYMPTOTE
-      Copyright 2004-16 Andy Hammerlindl, John Bowman, and Tom Prince
+      Copyright 2004-17 Andy Hammerlindl, John Bowman, and Tom Prince
 
 Asymptote is a powerful descriptive vector graphics language for technical
 drawing, inspired by MetaPost but with an improved C++-like
@@ -47,13 +47,8 @@
 libraries. This version of Asymptote also ships with the dll libraries
 noted below.
 
-The source code for the 2.0.2 cygwin1.dll is available under the GPL license:
-http://cygwin.com/snapshots/x86/cygwin-src-20150430.tar.xz
+The source code for the 2.7.0 cygwin1.dll is available under the GPL license:
+https://cygwin.com/snapshots/x86/cygwin-20170203-src.tar.xz
 
 The source code for freeglut.dll is available under the X-Consortium license:
-http://prdownloads.sourceforge.net/freeglut/freeglut-2.6.0.tar.gz
-
-The source code for glu32.dll is available from
-ftp://ftp.freedesktop.org/pub/mesa/7.6/MesaLib-7.6.tar.bz2
-and patched as detailed here:
-http://old.nabble.com/Error-building-MesaLib-7.6-onto-Win32-with-Microsoft-Visual-Studio-2005-and-2008-td25990977.html 
+http://prdownloads.sourceforge.net/freeglut/freeglut-2.8.1.tar.gz

Modified: trunk/Build/source/utils/asymptote/ReleaseNotes
===================================================================
--- trunk/Build/source/utils/asymptote/ReleaseNotes	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/ReleaseNotes	2017-03-07 18:10:02 UTC (rev 43422)
@@ -1,3 +1,19 @@
+Release Notes for Version 2.40
+
+A partial workaround for the OpenGL transparency bug was implemented, by
+presorting transparent triangles of the same material. The examples were
+updated and a segmentation fault was fixed. Multisample detection, surface
+rendering, and crack filling algorithms were fixed. The default compilation
+flags now specify -std=c++11.
+
+Release Notes for Version 2.39
+
+A workaround was implemented for the backwards incompatibility in the
+TeXLive 2016 graphicx package. Empty tick labels in graphs are now avoided.
+A paletteticks NoTicks option was added. Support for lualatex was improved.
+Renderers for Bezier patches and curves more efficient than those
+in the deprecated GLU library were implemented.
+
 Release Notes for Version 2.38
 
 An integer division operator # was added. Control points in xasy are now

Modified: trunk/Build/source/utils/asymptote/angle.h
===================================================================
--- trunk/Build/source/utils/asymptote/angle.h	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/angle.h	2017-03-07 18:10:02 UTC (rev 43422)
@@ -39,7 +39,8 @@
 // Return an angle in the interval [0,360).
 inline double principalBranch(double deg)
 {
-  if(deg < 0) deg += 360; 
+  deg=fmod(deg,360.0);
+  if(deg < 0) deg += 360.0; 
   return deg;
 }
 

Modified: trunk/Build/source/utils/asymptote/asy-keywords.el
===================================================================
--- trunk/Build/source/utils/asymptote/asy-keywords.el	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/asy-keywords.el	2017-03-07 18:10:02 UTC (rev 43422)
@@ -2,7 +2,7 @@
 ;; This file is automatically generated by asy-list.pl.
 ;; Changes will be overwritten.
 ;;
-(defvar asy-keywords-version "2.38")
+(defvar asy-keywords-version "2.40")
 
 (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 ))
@@ -11,7 +11,7 @@
 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 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 _findroot _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 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 drawV!
 ertexTriangle drawVertexTriangleO drawVertexX drawarrow drawarrow2 drawbeziertriangle 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 graphicscale 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 lo!
 ngitude lookup make3dgrid makeNode makecircle makedraw makepen maketriangle 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 progress 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 s!
 gn 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 trianglewithnormals 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 _findroot _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 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 drawV!
 ertexTriangle drawVertexTriangleO drawVertexX drawarrow drawarrow2 drawbeziertriangle drawline drawpixel drawstrokepath 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 graphicscale 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 initialized 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 log!
 10 log1p logaxiscoverage longitude lookup make3dgrid makeNode makecircle makedraw makepen maketriangle 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 nosetpagesize 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 progress 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 trianglewithnormals 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 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 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 S!
 ilver 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 heavyma!
 genta 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 nan 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 spinner 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 undefin!
 ed 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 S!
 ilver 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 deepyellow 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 heavyg!
 rey 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 nan 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 spinner 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 trembleRan!
 dom undefined unitcircle unitsquare up urlpen urlskip version vertexpen vertexsize viewportmargin viewportsize vline white wye xformStack yellow ylabelwidth zerotickfuzz zerowinding ))

Modified: trunk/Build/source/utils/asymptote/asy.list
===================================================================
--- trunk/Build/source/utils/asymptote/asy.list	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/asy.list	2017-03-07 18:10:02 UTC (rev 43422)
@@ -1,177 +1,1183 @@
-string stripfile(string s);
-string stripsuffix(string f, string suffix=<default>);
-real cbrt(real x);
-real[] cbrt(real[] a);
+void drawstrokepath(picture pic=<default>, path g, pen strokepen, pen p=<default>);
+void endScript();
+real legendlinelength;
+bool prc(string format=<default>);
+light currentlight;
+pen royalblue;
+real arrowdir;
+filltype filltype(int type=<default>, pen fillpen=<default>, pen drawpen=<default>, void fill2(frame f, path[] g, pen fillpen));
+int Suppress;
+align NoAlign;
+pair relative(picture pic=<default>, pair z);
+filltype RadialShade(pen penc, pen penr);
+real[] arrowbasepoints(path base, path left, path right, real default=<default>);
+real bp;
+pen mean(pen[] p, real opacity(real[])=<default>);
+pen[] mean(pen[][] palette, real opacity(real[])=<default>);
+pen squarecap;
+string[] split(string s, string delimiter=<default>);
+path[] plus;
 cputime cputime();
-string stripdirectory(string s);
-real sqrtEpsilon;
-string stripextension(string s);
-version version;
-void texpreamble(string s);
+real inches;
+pair SW;
+real inch;
+marginT EndMargin(path, pen);
+pen mediumgrey;
+pen darkcyan;
+coord[] maxcoords(coord[] in, bool operator <=(coord, coord));
+coord[] maxcoords(coord[] in, bool operator <=(coord, coord));
+real legendhskip;
+void addSaveFunction(void s()());
+pen olive;
+pen zerowinding;
+pen deepmagenta;
+path[] margin(path[] g, real xmargin, real ymargin);
+string file(string s);
+plain_bounds plain_bounds;
+pen mediumyellow;
+slice lastcut(path p, path knife);
+pen darkgreen;
+string verbatim(string s);
+pen heavygray;
+pen darkred;
+pair E;
+plain_scaling plain_scaling;
+pen darkgray;
+frame orientation(frame);
+void progress(bool3 init=<default>);
+pen salmon;
+pen mediummagenta;
+pair arcdir(path p, real L);
+pen mediumcyan;
+pen Pentype(int n);
+triple gettriple(string name=<default>, triple default=<default>, string prompt=<default>, bool store=<default>);
+pen Yellow;
+real cm;
+pen mediumgreen;
+pen heavygreen;
+string ask(string prompt);
+frame[] fit2(picture[] pictures, picture all);
+pen dashdotted;
+bool diagnostics;
+pen deepblue;
+string graphicscale(real x);
+pen mediumblue;
+pen heavyblue;
+transform invert;
+pair NNW;
+pair SE;
+pen thick(pen p=<default>);
+pen mediumred;
+marginT EndDotMargin(path, pen);
+bool ArcArrows(picture, path, pen, marginT(path, pen))(arrowhead arrowhead=<default>, real size=<default>, real angle=<default>, filltype filltype=<default>);
+bool ArcArrows(picture, path, pen, marginT(path, pen));
+void filloutside(picture pic=<default>, path[] g, pen p=<default>, bool copy=<default>);
+void filloutside(frame f, path[] g, pen p=<default>, bool copy=<default>);
+filltype RadialShadeDraw(real xmargin=<default>, real ymargin=<default>, pen penc, pen penr, pen drawpen=<default>);
+marginT BeginDotMargin(path, pen);
+frame enclose(string prefix=<default>, object F, string format=<default>);
+marker[] Mark;
+marker Mark(int n);
+projection projection(triple camera, triple up=<default>, triple target=<default>, triple normal=<default>, real zoom=<default>, real angle=<default>, pair viewportshift=<default>, bool showtarget=<default>, bool autoadjust=<default>, bool center=<default>, transformation projector(triple camera, triple up, triple target));
+pen darkolive;
+pen Dotted;
+pen Dotted(pen p=<default>);
+string math(real x);
+string math(string s);
+transform fixedscaling(picture pic=<default>, pair min, pair max, pen p=<default>, bool warn=<default>);
+pen Symbol(string series=<default>, string shape=<default>);
+bool needshipout();
+int count;
+path circle(pair c, real r);
+path ellipse(frame dest, frame src=<default>, real xmargin=<default>, real ymargin=<default>, pen p=<default>, filltype filltype=<default>, bool above=<default>);
+path ellipse(frame f, Label L, real xmargin=<default>, real ymargin=<default>, pen p=<default>, filltype filltype=<default>, bool above=<default>);
+path ellipse(pair c, real a, real b);
+void updatefunction();
 pen beveljoin;
+pen orange;
+pen green;
+int getint(string name=<default>, int default=<default>, string prompt=<default>, bool store=<default>);
+bool EndBar(picture, path, pen, marginT(path, pen));
+bool EndBar(picture, path, pen, marginT(path, pen))(real size=<default>);
+file stdin;
+int debuggerlines;
+frame bbox(picture pic=<default>, real xmargin=<default>, real ymargin=<default>, pen p=<default>, filltype filltype=<default>);
+path unitcircle;
+arrowhead DefaultHead;
+pen white;
+scaleT scaleT(real T(real x), real Tinv(real x), bool logarithmic=<default>, bool automin=<default>, bool automax=<default>);
+string baseline(string s, string template=<default>);
+position EndPoint;
+Legend Legend(string label, pen plabel=<default>, pen p=<default>, frame mark=<default>, bool above=<default>);
+void exitfunction();
+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>);
 string cputimeformat;
-real Cos(real deg);
-string insert(string s, int pos, string t);
-marginT EndDotMargin(path, pen);
-pen heavyred;
-pen black;
-pen heavyblue;
-pen heavygreen;
-pen heavycyan;
-marginT PenMargin(path, pen)(real begin, real end);
-marginT PenMargin(path, pen);
-int realDigits;
-pen heavymagenta;
-marginT PenMargins(path, pen);
-void newl(file file);
-void seek(file f, int pos);
-string verbatim(string s);
-pen heavygray;
+pair arcpoint(path p, real L);
+bool interior(int windingnumber, pen fillrule);
+pen fuchsia;
+pair[] pairs(real[] x, real[] y);
+void eval(code s, bool embedded=<default>);
+void eval(string s, bool embedded=<default>);
+bool Arrow(picture, path, pen, marginT(path, pen))(arrowhead arrowhead=<default>, real size=<default>, real angle=<default>, filltype filltype=<default>, position position=<default>);
+bool Arrow(picture, path, pen, marginT(path, pen));
+pen brown;
+void bar(picture pic, pair a, pair d, pen p=<default>);
+picture bar(pair a, pair d, pen p=<default>);
+pen deepcyan;
+pen dotted;
+pair reldir(path p, real l);
+pen pink;
+pen TimesRoman(string series=<default>, string shape=<default>);
+pen palemagenta;
+int mantissaBits;
+pen lightolive;
+path arrowbase(path r, pair y, real t, real size);
+frame pack(pair align=<default> ... object[] inset);
+pen[] monoPen;
+bool CW;
+pen Cyan;
+marginT EndPenMargin(path, pen);
+pair NNE;
+pen roundjoin;
+void addArrow(picture pic, arrowhead arrowhead, path g, pen p, real size, real angle, filltype filltype, real position);
+pen lightgray;
+picture arrow2(arrowhead arrowhead=<default>, path g, pen p=<default>, real size=<default>, real angle=<default>, filltype filltype=<default>, marginT margin(path, pen)=<default>);
+void startScript();
+position MidPoint;
+string Embed(string name, string text=<default>, string options=<default>, real width=<default>, real height=<default>);
+object embed3(string, frame, string, string, string, light, projection);
+pen deepgrey;
+pen lightyellow;
+marginT Margin(path, pen)(real begin, real end);
+marginT Margin(path, pen);
+side NoSide;
+file stdout;
+frame Seascape(frame f);
+pair up;
+pen ZapfChancery(string series=<default>, string shape=<default>);
+pair left;
+bool prconly(string format=<default>);
+pen deepgreen;
+pen lightmagenta;
+real bracedefaultratio;
+transform Scale(transform t);
+string getstring(string name=<default>, string default=<default>, string prompt=<default>, bool store=<default>);
+marginT DotMargins(path, pen);
+path[] MarkPath;
+frame[] fit(string prefix=<default>, picture[] pictures, string format=<default>, bool view=<default>, string options=<default>, string script=<default>, projection P=<default>);
+pen Bookman(string series=<default>, string shape=<default>);
+path box(frame dest, frame src=<default>, real xmargin=<default>, real ymargin=<default>, pen p=<default>, filltype filltype=<default>, bool above=<default>);
+path box(frame f, Label L, real xmargin=<default>, real ymargin=<default>, pen p=<default>, filltype filltype=<default>, bool above=<default>);
+path box(pair a, pair b);
+picture legenditem(Legend legenditem, real linelength);
+pen deepgray;
+string defaultformat(int n, string trailingzero=<default>, bool fixed=<default>, bool signed=<default>);
+string defaultformat;
+pen lightcyan;
+pen paleblue;
+frame align(frame f, pair align);
+object align(object F, pair align);
+path[] align(path[] g, transform t=<default>, pair position, pair align, pen p=<default>);
+transform scaleless(transform t);
+void copyPairOrTriple(pairOrTriple dest, pairOrTriple src);
+pen thin();
+real arcarrowangle;
+void restoredefaults();
+pen longdashdotted;
+void usepackage(string s, string options=<default>);
+pen dashed;
+string TeXify(string s);
+string graphic(string name, string options=<default>);
+frame Portrait(frame f);
+real braceinnerangle;
+guide operator ---(... guide[]);
+int JOIN_IN;
+real barfactor;
+void arrow(picture pic=<default>, Label L=<default>, pair b, pair dir, real length=<default>, align align=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>);
+picture arrow(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 unitsize(picture pic=<default>, real x, real y=<default>, real z=<default>);
+pen lightgreen;
+void endl(file file);
+bool ArcArrow(picture, path, pen, marginT(path, pen))(arrowhead arrowhead=<default>, real size=<default>, real angle=<default>, filltype filltype=<default>, position position=<default>);
+bool ArcArrow(picture, path, pen, marginT(path, pen));
+void usersetting();
+bool prc0(string format=<default>);
+pair rectify(pair dir);
+arrowhead TeXHead;
+void beep();
+real labelmargin;
+real labelmargin(pen p=<default>);
+pen lightblue;
+real bracemidangle;
+path unitsquare;
+void savedefaults()();
+bool MidArrow(picture, path, pen, marginT(path, pen))(arrowhead arrowhead=<default>, real size=<default>, real angle=<default>, filltype filltype=<default>);
+bool MidArrow(picture, path, pen, marginT(path, pen));
+pen cyan;
+pen grey;
+transform rotation(transform t);
+pair W;
+pen magenta;
+pair WSW;
+pen nobasealign;
+frame Landscape(frame f);
+real camerafactor;
+pen lightred;
+path trim(path g, real begin, real end);
+marginT DotMargin(path, pen)(real begin, real end);
+marginT DotMargin(path, pen);
+pen squarepen;
+pen deepyellow;
+real barsize(pen p=<default>);
+bool BeginArcArrow(picture, path, pen, marginT(path, pen));
+bool BeginArcArrow(picture, path, pen, marginT(path, pen))(arrowhead arrowhead=<default>, real size=<default>, real angle=<default>, filltype filltype=<default>, position position=<default>);
+real legendmargin;
+bool None(picture, path, pen, marginT(path, pen));
+pen AvantGarde(string series=<default>, string shape=<default>);
+real circleprecision;
+pen Black;
+void report(string text);
+void report(int i);
+void report(transform t);
+pen Pen(int n);
+pair ENE;
+pen Courier(string series=<default>, string shape=<default>);
+void makedraw(frame f, path g, pen p, int depth=<default>);
+pair down;
+path arc(pair c, real r, real angle1, real angle2);
+path arc(pair c, explicit pair z1, explicit pair z2, bool direction=<default>);
+path arc(pair c, real r, real angle1, real angle2, bool direction);
+pair right;
+string outformat(string format=<default>);
+string outprefix(string prefix=<default>);
+object object(Label L);
+object object(Label L, path e(frame dest, frame src=<default>, real xmargin=<default>, real ymargin=<default>, pen p=<default>, filltype filltype=<default>, bool above=<default>), real xmargin=<default>, real ymargin=<default>, pen p=<default>, filltype filltype=<default>, bool above=<default>);
+object object(frame f);
+filltype Fill;
+filltype Fill(real xmargin=<default>, real ymargin=<default>, pen p=<default>);
+pen Palatino(string series=<default>, string shape=<default>);
+pair[] intersectionpoints(path p, path q, real fuzz=<default>);
+pair[] intersectionpoints(explicit path[] p, explicit path[] q, real fuzz=<default>);
+real arcarrowsize(pen p=<default>);
+real calculateScaling(string dir, coord[] coords, real size, bool warn=<default>);
+real calculateScaling(string dir, coord[] coords, real size, bool warn=<default>);
+real calculateScaling(string dir, coord[] m, coord[] M, real size, bool warn=<default>);
+real calculateScaling(string dir, coord[] m, coord[] M, real size, bool warn=<default>);
+real expansionfactor;
+position BeginPoint;
+real arrowhookfactor;
+indexedTransform indexedTransform(int index, transform t, bool active=<default>);
+bool finite(real x);
+bool finite(pair z);
+bool finite(triple v);
+filltype UnFill(real xmargin=<default>, real ymargin=<default>);
+filltype UnFill;
+bool Bars(picture, path, pen, marginT(path, pen));
+bool Bars(picture, path, pen, marginT(path, pen))(real size=<default>);
+pair I;
+pair SSW;
+transform Slant(transform t);
+pair intersectionpoint(path p, path q, real fuzz=<default>);
+real getreal(string name=<default>, real default=<default>, string prompt=<default>, bool store=<default>);
+pen darkbrown;
+int sourceline(string file, string text);
+void buildRestoreDefaults()();
+path[] operator ^^(path p, path q);
+path[] operator ^^(explicit path[] p, path q);
+path[] operator ^^(path p, explicit path[] q);
+path[] operator ^^(explicit path[] p, explicit path[] q);
+real arrow2sizelimit;
+filltype FillDraw;
+filltype FillDraw(real xmargin=<default>, real ymargin=<default>, pen fillpen=<default>, pen drawpen=<default>);
+void pause(string w=<default>);
+int ocgindex;
+pen springgreen;
 pen heavygrey;
 void markuniform(picture pic=<default>, frame f, path g)(pair z(real t), real a, real b, int n);
 void markuniform(picture pic=<default>, frame f, path g)(bool centered=<default>, int n, bool rotated=<default>);
-real[] mintimes(path p);
-real[] mintimes(path3 p);
-bool straight(path p, int t);
-bool straight(path3 p, int t);
-pen makepen(path p);
+bool BeginArrow(picture, path, pen, marginT(path, pen));
+bool BeginArrow(picture, path, pen, marginT(path, pen))(arrowhead arrowhead=<default>, real size=<default>, real angle=<default>, filltype filltype=<default>, position position=<default>);
+real circlescale;
+bool ignore;
+pen darkblue;
+real reltime(path p, real l);
+void marknodes(picture pic=<default>, frame f, path g);
+int JOIN_OUT;
+projection currentprojection;
+real arrowsizelimit;
+pair endpoint(path p);
+arrowhead HookHead;
+arrowhead HookHead(real dir=<default>, real barb=<default>);
+real[] concat(... real[][]);
+marker[] concat(... marker[][]);
+pair[] concat(... pair[][]);
+pen[] concat(... pen[][]);
+coord[] concat(... coord[][]);
+coord[] concat(... coord[][]);
+path[] concat(... path[][]);
+picture[] concat(... picture[][]);
+int[] concat(... int[][]);
+void()()[] concat(... void()()[][]);
+bool3[] concat(... bool3[][]);
+string[] concat(... string[][]);
+object[] concat(... object[][]);
+Legend[] concat(... Legend[][]);
+triple[] concat(... triple[][]);
+Label[] concat(... Label[][]);
+frame[] concat(... frame[][]);
+guide[] concat(... guide[][]);
+bool[] concat(... bool[][]);
+slice firstcut(path p, path knife);
+frame UpsideDown(frame f);
+pair viewportmargin;
+pen nullpen;
+void save()();
+real dotfactor;
+pen palecyan;
+marginT BeginMargin(path, pen);
+path buildcycle(... path[] p);
+marker markthin(path g, pen p=<default>, real thin(real fraction)=<default>, filltype filltype=<default>);
+void activatequote(picture pic=<default>);
+int undefined;
+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 roundcap;
+void buildRestoreThunk()();
+void overloadedMessage(file file);
+bool EndArrow(picture, path, pen, marginT(path, pen))(arrowhead arrowhead=<default>, real size=<default>, real angle=<default>, filltype filltype=<default>, position position=<default>);
+bool EndArrow(picture, path, pen, marginT(path, pen));
+frame currentpatterns;
+real arrowfactor;
+pen heavyred;
+pen black;
+void Draw(picture pic=<default>, path g, pen p=<default>);
+filltype Draw;
+void Draw(picture pic=<default>, explicit path[] g, pen p=<default>);
+filltype Draw(real xmargin=<default>, real ymargin=<default>, pen p=<default>);
+void tab(file file);
+marker marker(frame f=<default>, void markroutine(picture pic=<default>, frame f, path g)=<default>, bool above=<default>);
+marker marker(path[] g, void markroutine(picture pic=<default>, frame f, path g)=<default>, pen p=<default>, filltype filltype=<default>, bool above=<default>);
+bool CCW;
+void usetypescript(string s, string encoding=<default>);
+path randompath(int n, bool cumulate=<default>, guide join(... guide[])=<default>);
+void()()[] array(int n, void value()(), int depth=<default>);
+bool[] array(int n, bool value, int depth=<default>);
+string[] array(int n, string value, int depth=<default>);
+pair[][] array(int n, pair[] value, int depth=<default>);
+bool3[] array(int n, bool3 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>);
+Label[] array(int n, Label 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>);
+path[] array(int n, path value, int depth=<default>);
+frame[] array(int n, frame value, int depth=<default>);
+pen[][] array(int n, pen[] 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>);
+int[] array(int n, int value, int depth=<default>);
+string[][] array(int n, string[] value, int depth=<default>);
+pair[] array(int n, pair value, int depth=<default>);
+guide[] array(int n, guide value, int depth=<default>);
+pen[] array(int n, pen value, int depth=<default>);
+real[] uniform(real a, real b, int n);
+pair viewportsize;
+picture currentpicture;
+pen palegreen;
+Label Label(Label L, pair position, align align=<default>, pen p=<default>, transform embed(transform)=<default>, filltype filltype=<default>);
+Label Label(string s, string size=<default>, explicit position position, align align=<default>, pen p=<default>, transform embed(transform)=<default>, filltype filltype=<default>);
+Label Label(Label L, explicit position position, align align=<default>, pen p=<default>, transform embed(transform)=<default>, filltype filltype=<default>);
+Label Label(explicit pair position, align align=<default>, pen p=<default>, transform embed(transform)=<default>, filltype filltype=<default>);
+Label Label;
+Label Label(string s=<default>, string size=<default>, align align=<default>, pen p=<default>, transform embed(transform)=<default>, filltype filltype=<default>);
+Label Label(string s, string size=<default>, pair position, align align=<default>, pen p=<default>, transform embed(transform)=<default>, filltype filltype=<default>);
+Label Label(Label L, align align=<default>, pen p=<default>, transform embed(transform)=<default>, filltype filltype=<default>);
+hsv hsv(real h, real s, real v);
+hsv hsv(pen p);
+pair N;
 real dotsize(pen p=<default>);
-real[] curlSpecifier(guide g, int t);
-real straightness(path3 p, int t);
-real straightness(triple z0, triple c0, triple c1, triple z1);
-real log10(real x);
-real[] log10(real[] a);
-pen paleblue;
-bool prc0(string format=<default>);
-int CTZ(int a);
-real barfactor;
-pen Magenta;
-real cos(real x);
-real[] cos(real[] a);
-pair cos(explicit pair z);
-int intMax;
-bool cyclic(guide g);
-bool cyclic(path p);
-bool cyclic(path3 p);
-void printBytecode(<open>);
+real pt;
+settings settings;
+int MoveQuiet;
+pair WNW;
+pen palegray;
+pen miterjoin;
+arrowhead SimpleHead;
+real arrowangle;
 transform Rotate(transform)(pair z);
 transform Rotate(transform t);
 bool inXasyMode;
-path subpath(path p, int a, int b);
-path subpath(path p, real a, real b);
-path3 subpath(path3 p, int a, int b);
-path3 subpath(path3 p, real a, real b);
-bool isnan(real x);
-string jobname(string name);
-void print_random_addresses(int n=<default>);
+frame dotframe(pen p=<default>, filltype filltype=<default>);
+frame dotframe;
+real arcarrowfactor;
+real mm;
+plain plain;
+int CTZ(int a);
+int NOT(int a);
+int XOR(int a, int b);
+int OR(int a, int b);
+real[][] scale3(real s);
+int AND(int a, int b);
+real[] cubicroots(real a, real b, real c, real d);
 void attach(picture dest=<default>, frame src, pair position, pair align, bool group=<default>, filltype filltype=<default>, bool above=<default>);
 void attach(picture dest=<default>, frame src, pair position=<default>, bool group=<default>, filltype filltype=<default>, bool above=<default>);
 real[] quadraticroots(real a, real b, real c);
 pair[] quadraticroots(explicit pair a, explicit pair b, explicit pair c);
-pen darkcyan;
+path[] strokepath(path g, pen p=<default>);
+real erf(real x);
+real Yn(int n, real x);
+real Jn(int n, real x);
+light light(pen diffuse=<default>, pen ambient=<default>, pen specular=<default>, pen background=<default>, real specularfactor=<default>, bool viewport=<default> ... triple[] position);
+light light(explicit light light);
+light light(pen[] diffuse, pen[] ambient=<default>, pen[] specular=<default>, pen background=<default>, real specularfactor=<default>, bool viewport=<default>, triple[] position);
+light light(pen diffuse=<default>, pen ambient=<default>, pen specular=<default>, pen background=<default>, bool viewport=<default>, real x, real y, real z);
+real remainder(real x, real y);
+int choose(int n, int k);
+real hypot(real x, real y);
+int Round(real x);
+int Ceil(real x);
+marginT BeginPenMargin(path, pen);
+int round(real x);
+int floor(real x);
+pen extendcap;
+int ceil(real x);
+int rand();
+int sgn(real x);
+int quotient(int x, int y);
+real insphere(triple a, triple b, triple c, triple d, triple e);
+path3 path3(triple[] pre, triple[] point, triple[] post, bool[] straight, bool cyclic);
+real incircle(pair a, pair b, pair c, pair d);
+real atan2(real y, real x);
+bool inside(explicit path[] g, pair z, pen fillrule=<default>);
+bool inside(path g, pair z, pen fillrule=<default>);
+int inside(path p, path q, pen fillrule=<default>);
+pair inside(path p, pen fillrule=<default>);
+real erfc(real x);
+int windingnumber(path[] p, pair z);
+real relativedistance(real theta, real phi, real t, bool atleast);
 string[] file3;
 real[] maxtimes(path p);
 real[] maxtimes(path3 p);
-filltype FillDraw;
-filltype FillDraw(real xmargin=<default>, real ymargin=<default>, pen fillpen=<default>, pen drawpen=<default>);
-void initdefaults();
-void erase(frame f);
-string erase(string s, int pos, int n);
-void erase(picture pic=<default>);
-pair E;
-int Ceil(real x);
-pair I;
-pair SSW;
-pen magenta;
-pair WSW;
-pair N;
-bool view();
-void usersetting();
+real[] mintimes(path p);
+real[] mintimes(path3 p);
+pair maxAfterTransform(transform t, path[] p);
+pair minAfterTransform(transform t, path[] p);
+pair extension(pair p, pair q, pair p, pair q);
+real[][] intersections(path p, path q, real fuzz=<default>);
+real[] intersections(path p, explicit pair a, explicit pair b, real fuzz=<default>);
+real[][] intersections(path3 p, path3 q, real fuzz=<default>);
+real[][] intersections(path3 p, triple[][] p, real fuzz=<default>);
+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>);
+real dirtime(path p, pair z);
+real arctime(path p, real l);
+real arctime(path3 p, real dval);
+position Relative(real position);
+side Relative(explicit pair align);
+marginT Margins(path, pen);
+pair truepoint(picture pic=<default>, pair dir, bool user=<default>);
+real arclength(path p);
+real arclength(path3 p);
+bool piecewisestraight(path p);
+bool piecewisestraight(path3 p);
+path nurb(pair z0, pair z1, pair z2, pair z3, real w0, real w1, real w2, real w3, int m);
+path subpath(path p, int a, int b);
+path subpath(path p, real a, real b);
+path3 subpath(path3 p, int a, int b);
+path3 subpath(path3 p, real a, real b);
+real radius(path p, real t);
+real radius(path3 p, real t);
+real radius(triple z0, triple c0, triple c1, triple z1, real t);
+pair accel(path p, int t, int sign=<default>);
+pair accel(path p, real t);
+triple accel(path3 p, int t, int sign=<default>);
+triple accel(path3 p, real t);
+pair precontrol(path p, int t);
+pair precontrol(path p, real t);
+triple precontrol(path3 p, int t);
+triple precontrol(path3 p, real t);
+string defaultfilename;
+real longitude(triple v, bool warn=<default>);
+filltype NoFill;
+real colatitude(triple v, bool warn=<default>);
+marker nomarker;
+pair beginpoint(path p);
+real azimuth(triple v, bool warn=<default>);
+real polar(triple v, bool warn=<default>);
+real zpart(triple v);
+pair bezierPPP(pair a, pair b, pair c, pair d);
+triple bezierPPP(triple a, triple b, triple c, triple d);
+pair SSE;
+pair bezierP(pair a, pair b, pair c, pair d, real t);
+triple bezierP(triple a, triple b, triple c, triple d, real t);
+marginT TrueMargin(path, pen)(real begin, real end);
+pair bezier(pair a, pair b, pair c, pair d, real t);
+triple bezier(triple a, triple b, triple c, triple d, real t);
+pair realmult(pair z, pair w);
+triple realmult(triple u, triple v);
+int Floor(real x);
+pair gamma(explicit pair z);
+real gamma(real x);
+pair expi(real angle);
+triple expi(real polar, real azimuth);
+pair dir(real degrees);
+pair dir(explicit pair z);
+triple dir(explicit triple z);
+triple dir(real colatitude, real longitude);
+pair dir(path p, int t, int sign=<default>, bool normalize=<default>);
+pair dir(path p, real t, bool normalize=<default>);
+triple dir(path3 p, int t, int sign=<default>, bool normalize=<default>);
+triple dir(path3 p, real t, bool normalize=<default>);
+pair dir(path p);
+pair dir(path p, path q);
+real aTan(real x);
+real aCos(real x);
+real aSin(real x);
+real arrowsize(pen p=<default>);
+real Tan(real deg);
+real Cos(real deg);
+frame legend(picture pic=<default>, int perline=<default>, real xmargin=<default>, real ymargin=<default>, real linelength=<default>, real hskip=<default>, real vskip=<default>, real maxwidth=<default>, real maxheight=<default>, bool hstretch=<default>, bool vstretch=<default>, pen p=<default>);
+picture legend(Legend[] Legend, int perline=<default>, real linelength, real hskip, real vskip, real maxwidth=<default>, real maxheight=<default>, bool hstretch=<default>, bool vstretch=<default>);
+real Degrees(real radians);
+real radians(real degrees);
+real angle(pair z, bool warn=<default>);
+real angle(transform t);
+side Center;
+real ypart(pair z);
+real ypart(triple v);
+real xpart(pair z);
+real xpart(triple v);
+int seconds(string t=<default>, string format=<default>);
+pen rgba(real[] a);
+real[] rgba(pen p);
+string time(string format=<default>);
+string time(int seconds, string format=<default>);
+string string(int x);
+string string(real x, int digits=<default>);
+int ascii(string s);
+side RightSide;
+string replace(string s, string[][] translate);
+string replace(string s, string before, string after);
+pen lightgrey;
+string upcase(string s);
+pen mediumgray;
+string downcase(string s);
+string substr(string s, int pos, int n=<default>);
+string insert(string s, int pos, string t);
+int rfind(string s, string t, int pos=<default>);
+void purge(int divisor=<default>);
+int animate(string args=<default>, string file=<default>, string format=<default>);
+int convert(string args=<default>, string file=<default>, string format=<default>);
+real sqrtEpsilon;
+string stripextension(string s);
+string stripfile(string s);
+string stripdirectory(string s);
+void warning(string s, string t, bool position=<default>);
 pair S;
 void nowarn(string s);
-transform rotate(real angle, pair z=<default>);
-int quotient(int x, int y);
-transform rotation(transform t);
-pair W;
-int rand();
-pen ZapfChancery(string series=<default>, string shape=<default>);
-int XOR(int a, int b);
+void warn(string s);
+void breakpoints();
+void stop(string file, int line, code s=<default>);
+void stop(string file, string text, code s=<default>);
+string locatefile(string file);
+void breakpoint(code s=<default>);
+void atbreakpoint(string f(string, int, int, code));
+string phantom(string s);
+void atexit(void f());
+void atexit()();
 void atupdate(void f());
 void atupdate()();
+string outname();
+string mktemp(string s);
+int rename(string from, string to);
+real arrowbarb;
+pen yellow;
+int delete(string s);
+void seekeof(file f);
+pen heavymagenta;
+marginT PenMargins(path, pen);
+void newl(file file);
+void seek(file f, int pos);
+bool Arrows(picture, path, pen, marginT(path, pen))(arrowhead arrowhead=<default>, real size=<default>, real angle=<default>, filltype filltype=<default>);
+bool Arrows(picture, path, pen, marginT(path, pen));
+int tell(file f);
+void DOSendl(file file);
+string debugger(string file, int line, int column, code s=<default>);
+string getc(file f);
+void flush(file f);
+pen blue;
+pen evenodd;
+int precision(file f=<default>, int digits=<default>);
+void close(file f);
+void clear(file f);
+void clear(string file, int line);
+void clear();
+void clear(string file, string text);
 void unfill(frame f, path[] g, bool copy=<default>);
 void unfill(picture pic=<default>, path[] g, bool copy=<default>);
 bool Bar(picture, path, pen, marginT(path, pen))(real size=<default>);
 bool Bar(picture, path, pen, marginT(path, pen));
 bool eol(file f);
-pen zerowinding;
-void atbreakpoint(string f(string, int, int, code));
-void savedefaults()();
-bool MidArrow(picture, path, pen, marginT(path, pen))(arrowhead arrowhead=<default>, real size=<default>, real angle=<default>, filltype filltype=<default>);
-bool MidArrow(picture, path, pen, marginT(path, pen));
+bool eof(file f);
+pen paleyellow;
+file output(string name=<default>, bool update=<default>, string comment=<default>, string mode=<default>);
+file input(string name=<default>, bool check=<default>, string comment=<default>, string mode=<default>);
+pair bezierPP(pair a, pair b, pair c, pair d, real t);
+triple bezierPP(triple a, triple b, triple c, triple d, real t);
+real[] _projection();
+triple maxbezier(triple[][] p, triple b);
+triple minbezier(triple[][] p, triple b);
+real legendvskip;
+pen darkmagenta;
+real change2(triple[][] a);
+pair NW;
+real norm(real[] a);
+real norm(real[][] a);
+real norm(triple[][] a);
+int[][] triangulate(pair[] z);
+bool shipped;
+pair[] fft(pair[] a, int sign=<default>);
+real simpson(real f(real), real a, real b, real acc=<default>, real dxmax=<default>);
+pen[] colorPen;
+real _findroot(real f(real), real a, real b, real tolerance, real fa, real fb);
+real newton(int iterations=<default>, real f(real), real fprime(real), real x, bool verbose=<default>);
+real newton(int iterations=<default>, real f(real), real fprime(real), real x1, real x2, bool verbose=<default>);
+real[] tridiagonal(real[] a, real[] b, real[] c, real[] f);
+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);
+pair dot(pair[] a, pair[] b);
+real dot(explicit pair z, explicit pair w);
+real dot(triple u, triple v);
+void dot(picture pic=<default>, Label[] L=<default>, explicit path g, align align=<default>, string format=<default>, pen p=<default>, filltype filltype=<default>);
+marker dot(pen p=<default>, filltype filltype=<default>);
+void dot(picture pic=<default>, pair z, pen p=<default>, filltype filltype=<default>);
+void dot(frame f, pair z, pen p=<default>, filltype filltype=<default>);
+void dot(picture pic=<default>, Label L, pen p=<default>, filltype filltype=<default>);
+void dot(picture pic=<default>, Label[] L=<default>, pair[] z, align align=<default>, string format=<default>, pen p=<default>, filltype filltype=<default>);
+void dot(picture pic=<default>, path[] g, pen p=<default>, filltype filltype=<default>);
+marker dot;
+void dot(picture pic=<default>, Label L, pair z, align align=<default>, string format=<default>, pen p=<default>, filltype filltype=<default>);
+pair ESE;
+pair project(triple v, real[][] t);
+real[][] AtA(real[][] a);
+real[] solve(real[][] a, real[] b, bool warn=<default>);
+real[][] solve(real[][] a, real[][] b, bool warn=<default>);
+bool BeginBar(picture, path, pen, marginT(path, pen));
+bool BeginBar(picture, path, pen, marginT(path, pen))(real size=<default>);
+triple perp(triple v, triple u);
+int find(bool[] a, int n=<default>);
+int find(string s, string t, int pos=<default>);
+real degrees(pair z, bool warn=<default>);
+real degrees(real radians);
+bool[] operator !(bool[] a);
+bool operator !(bool b);
+int[] sequence(int n);
+pen[][] sequence(pen[] 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);
+int[] sequence(int f(int), int n);
+string[][] sequence(string[] f(int), int n);
+pair[] sequence(pair f(int), int n);
+guide[] sequence(guide f(int), int n);
+pen[] sequence(pen f(int), int n);
+void()()[] sequence(void f()()(int), int n);
+bool[] sequence(bool f(int), int n);
+string[] sequence(string f(int), int n);
+pair[][] sequence(pair[] f(int), int n);
+bool3[] sequence(bool3 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);
+Label[] sequence(Label f(int), int n);
+real[][] sequence(real[] f(int), int n);
+real[] sequence(real f(int), int n);
+int[] sequence(int n, int m);
+triple[] sequence(triple f(int), int n);
+path[] sequence(path f(int), int n);
+frame[] sequence(frame f(int), int n);
+int[] complement(int[] a, int n);
+path[] complement(frame f, path[] g);
+void saveline(string name, string value, bool store=<default>);
+string readline(string prompt=<default>, string name=<default>, bool tabcompletion=<default>);
+real unitrand();
+string[] history(string name, int n=<default>);
+string[] history(int n=<default>);
+path[] _strokepath(path g, pen p=<default>);
+path[][] textpath(string[] s, pen[] p);
+marginT NoMargin(path, pen);
+marginT NoMargin(path, pen)();
+path[][] _texpath(string[] s, pen[] p);
+int SuppressQuiet;
+real[] texsize(string s, pen p=<default>);
+bool labels(frame f);
+slice cut(path p, path knife, int n);
+bool is3D(frame f);
+bool is3D(string format=<default>);
+transformation transformation(real[][] modelview);
+transformation transformation(real[][] modelview, real[][] projection);
+pair maxratio(frame f);
+pair maxratio(triple[][] p, pair b);
+pair maxratio(path3 g);
+pair minratio(frame f);
+pair minratio(triple[][] p, pair b);
+pair minratio(path3 g);
+triple size3(frame f);
+void size3(picture pic=<default>, real x, real y=<default>, real z=<default>, bool keepAspect=<default>);
+triple max3(frame f);
+triple max3(pen p);
+pair unit(pair z);
+triple unit(triple v);
+triple min3(frame f);
+triple min3(pen p);
+void drawpixel(frame f, triple v, pen p, real width=<default>);
+void drawPRCtube(frame f, path3 center, path3 g, pen[] p, real opacity, real shininess);
+void begin(picture pic=<default>, string name, string id=<default>, bool visible=<default>);
+void drawPRCdisk(frame f, real[][] t, pen[] p, real opacity, real shininess);
+int CLZ(int a);
+void drawPRCsphere(frame f, real[][] t, bool half=<default>, pen[] p, real opacity, real shininess, int type);
+string[] spinner;
+real[] times(path p, real x);
+real[] times(path p, explicit pair z);
+void drawbeziertriangle(frame f, triple[][] p, triple center, bool straight, pen[] p, real opacity, real shininess, real prcshininess, pen[] colors, int interaction, bool prc=<default>);
+void draw(frame f, triple[][] p, triple center, bool straight, pen[] p, real opacity, real shininess, real prcshininess, pen[] colors, int interaction, bool prc=<default>);
+void draw(frame f, triple[] p, real[] knot, real[] weights=<default>, pen p);
+void draw(frame f, triple[][] p, real[] uknot, real[] vknot, real[][] weights=<default>, pen[] p, real opacity, real shininess, real prcshininess, pen[] colors);
+void draw(frame f, triple[] v, int[][] vi, triple[] n, int[][] ni, pen[] p, real opacity, real shininess, real prcshininess, pen[] c=<default>, int[][] ci=<default>);
+void draw(picture pic=<default>, path[] g, pen fillrule=<default>, pen[] p);
+object draw(picture pic=<default>, Label L, path e(frame dest, frame src=<default>, real xmargin=<default>, real ymargin=<default>, pen p=<default>, filltype filltype=<default>, bool above=<default>), pair position, real xmargin=<default>, real ymargin=<default>, pen p=<default>, filltype filltype=<default>, bool above=<default>);
+void draw(picture pic=<default>, Label L=<default>, path g, align align=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, bool bar(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, Label legend=<default>, marker marker=<default>);
+void draw(pair origin, picture pic=<default>, Label L=<default>, path g, align align=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, bool bar(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, Label legend=<default>, marker marker=<default>);
+void draw(frame f, explicit path[] g, pen p=<default>);
+void draw(picture pic=<default>, guide[] g, pen p=<default>, Label legend=<default>, marker marker=<default>);
+void draw(pair origin, picture pic=<default>, guide[] g, pen p=<default>, Label legend=<default>, marker marker=<default>);
+void draw(picture pic=<default>, explicit path[] g, pen p=<default>, Label legend=<default>, marker marker=<default>);
+void draw(pair origin, picture pic=<default>, explicit path[] g, pen p=<default>, Label legend=<default>, marker marker=<default>);
+object draw(picture pic=<default>, Label L, path e(frame dest, frame src=<default>, real xmargin=<default>, real ymargin=<default>, pen p=<default>, filltype filltype=<default>, bool above=<default>), real xmargin=<default>, real ymargin=<default>, pen p=<default>, filltype filltype=<default>, bool above=<default>);
+void draw(frame f, guide[] g, pen p=<default>);
+void draw(frame f, path g, pen p=<default>);
+void draw(frame f, path g, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen)));
+void deconstruct(frame f, frame preamble=<default>, real magnification=<default>, transform xform());
+void deconstruct(picture pic=<default>, real magnification=<default>);
+void shipout3(string prefix, frame f, string format=<default>, real width, real height, real angle, real zoom, triple m, triple m, pair shift, real[][] t, real[] background, triple[] lights, real[][] diffuse, real[][] ambient, real[][] specular, bool viewportlighting, bool view=<default>);
+void shipout3(string prefix, frame f);
+bool debugging;
+void shipout(string prefix=<default>, frame f, frame preamble=<default>, string format=<default>, bool wait=<default>, bool view=<default>, transform xform());
+void shipout(string prefix=<default>, frame f, string format=<default>, bool wait=<default>, bool view=<default>, string options=<default>, string script=<default>, light light=<default>, projection P=<default>);
+void shipout(string prefix=<default>, picture pic=<default>, frame orientation(frame)=<default>, string format=<default>, bool wait=<default>, bool view=<default>, string options=<default>, string script=<default>, light light=<default>, projection P=<default>);
+void asy(string format, bool overwrite=<default> ... string[] s);
+bool latex();
+string nativeformat();
+path unstraighten(path p);
+path3 unstraighten(path3 p);
+void _image(frame f, real[][] data, pair initial, pair final, pen[] palette=<default>, transform t=<default>, bool copy=<default>, bool antialias=<default>);
+void _image(frame f, pen[][] data, pair initial, pair final, transform t=<default>, bool copy=<default>, bool antialias=<default>);
+void _image(frame f, pen f(int, int), int width, int height, pair initial, pair final, transform t=<default>, bool antialias=<default>);
+void layer(frame f);
+void layer(picture pic=<default>);
+void texreset();
+void _labelpath(frame f, string s, string size, path g, string justify, pair offset, pen p);
+real arrowtexfactor;
+void comma(file file);
+void deletepreamble();
+version version;
+void nosetpagesize();
+void texpreamble(string s);
+real braceouterangle;
+void tex(frame f, string s);
+void tex(frame f, string s, pair min, pair max);
+void tex(picture pic=<default>, string s, pair min, pair max);
+void tex(picture pic=<default>, string s);
+void prepend(frame dest, frame src);
+void add(frame dest, frame src);
+void add(picture dest=<default>, frame src, pair position, pair align, bool group=<default>, filltype filltype=<default>, bool above=<default>);
+void add(frame dest, frame src, pair position, pair align, bool group=<default>, filltype filltype=<default>, bool above=<default>);
+void add(picture src, bool group=<default>, filltype filltype=<default>, bool above=<default>);
+void add(picture pic=<default>, void d(frame f, transform t), bool exact=<default>);
+void add(picture pic=<default>, void d(picture, real[][]), bool exact=<default>);
+void add(picture dest, picture src, bool group=<default>, filltype filltype=<default>, bool above=<default>);
+void add(frame f, transform t=<default>, Label L);
+void add(picture dest, picture src, pair position, bool group=<default>, filltype filltype=<default>, bool above=<default>);
+void add(picture dest=<default>, object F, pair position=<default>, bool group=<default>, filltype filltype=<default>, bool above=<default>);
+void add(frame dest, frame src, filltype filltype, bool above=<default>);
+void add(frame dest, frame src, bool group, filltype filltype=<default>, bool above=<default>);
+void add(picture pic=<default>, void d(frame f, real[][] t, picture pic, projection P), bool exact=<default>);
+void add(frame dest, frame src, pair position, bool group=<default>, filltype filltype=<default>, bool above=<default>);
+void add(picture dest=<default>, frame src, pair position=<default>, bool group=<default>, filltype filltype=<default>, bool above=<default>);
+void add(picture pic=<default>, Label L);
+void add(picture pic=<default>, void d(picture, transform), bool exact=<default>);
+void add(picture src, pair position, bool group=<default>, filltype filltype=<default>, bool above=<default>);
+void endgroup3(frame f);
+void _begingroup3(frame f, string name, real compression, real granularity, bool closed, bool tessellate, bool dobreak, bool nobreak, triple center, int interaction);
+void endgroup(frame f);
+void endgroup(picture pic=<default>);
+void begingroup(frame f);
+void begingroup(picture pic=<default>);
 bool MidArcArrow(picture, path, pen, marginT(path, pen))(arrowhead arrowhead=<default>, real size=<default>, real angle=<default>, filltype filltype=<default>);
 bool MidArcArrow(picture, path, pen, marginT(path, pen));
 void exitXasyMode();
 void grestore(frame f);
-pair extension(pair p, pair q, pair p, pair q);
-pen extendcap;
-int ceil(real x);
-pen thick(pen p=<default>);
-pair left;
-int Suppress;
-file input(string name=<default>, bool check=<default>, string comment=<default>, string mode=<default>);
-int SuppressQuiet;
-real[] texsize(string s, pen p=<default>);
-string nativeformat();
-bool invisible(pen p);
-pen invisible();
-pen invisible;
-bool CCW;
-void usetypescript(string s, string encoding=<default>);
-path randompath(int n, bool cumulate=<default>, guide join(... guide[])=<default>);
+void drawPRCcylinder(frame f, real[][] t, pen[] p, real opacity, real shininess);
+void beginclip(frame f, path[] g, bool stroke=<default>, pen fillrule=<default>, bool copy=<default>);
+void beginclip(picture pic=<default>, path[] g, bool stroke=<default>, pen fillrule=<default>, bool copy=<default>);
+pen palegrey;
+void clip(frame f, path[] g, bool stroke=<default>, pen fillrule=<default>, bool copy=<default>);
+void clip(picture pic=<default>, path[] g, bool stroke=<default>, pen fillrule=<default>, bool copy=<default>);
+int Allow;
+real determinant(real[][] a);
+void functionshade(frame f, path[] g, bool stroke=<default>, pen fillrule=<default>, string shader=<default>, bool copy=<default>);
+void functionshade(picture pic=<default>, path[] g, bool stroke=<default>, pen fillrule=<default>, string shader, bool copy=<default>);
+bool EndArcArrow(picture, path, pen, marginT(path, pen))(arrowhead arrowhead=<default>, real size=<default>, real angle=<default>, filltype filltype=<default>, position position=<default>);
+bool EndArcArrow(picture, path, pen, marginT(path, pen));
+void tensorshade(frame f, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[][] p, path[] b=<default>, pair[][] z=<default>, bool copy=<default>);
+void tensorshade(picture pic=<default>, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[][] p, path[] b=<default>, pair[][] z=<default>, bool copy=<default>);
+void tensorshade(frame f, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[] p, path b=<default>, pair[] z);
+void tensorshade(picture pic=<default>, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[] p, path b=<default>, pair[] z);
+void tensorshade(frame f, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[] p, path b=<default>);
+void tensorshade(picture pic=<default>, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[] p, path b=<default>);
+void gouraudshade(frame f, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[] p, pair[] z, int[] edges, bool copy=<default>);
+void gouraudshade(frame f, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[] p, int[] edges, bool copy=<default>);
+void gouraudshade(picture pic=<default>, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[] p, pair[] z, int[] edges, bool copy=<default>);
+void gouraudshade(picture pic=<default>, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[] p, int[] edges, bool copy=<default>);
+pair getpair(string name=<default>, pair default=<default>, string prompt=<default>, bool store=<default>);
+void axialshade(frame f, path[] g, bool stroke=<default>, pen pena, pair a, bool extenda=<default>, pen penb, pair b, bool extendb=<default>, bool copy=<default>);
+void axialshade(picture pic=<default>, path[] g, bool stroke=<default>, pen pena, pair a, bool extenda=<default>, pen penb, pair b, bool extendb=<default>, bool copy=<default>);
+pen chartreuse;
+void latticeshade(frame f, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[][] p, transform t=<default>, bool copy=<default>);
+void latticeshade(picture pic=<default>, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[][] p, bool copy=<default>);
+void fill(frame f, path[] g, pen p=<default>, bool copy=<default>);
+path fill(frame dest, frame src, filltype filltype=<default>, real xmargin=<default>, real ymargin=<default>);
+void fill(picture pic=<default>, path[] g, pen p=<default>, bool copy=<default>);
+void fill(pair origin, picture pic=<default>, path[] g, pen p=<default>);
+void _draw(frame f, path g, pen p);
+void _draw(frame f, path3 g, triple center=<default>, pen p, int interaction=<default>);
+void _draw(picture pic, path g, pen p, marginT margin(path, pen));
+void initdefaults();
+void erase(frame f);
+string erase(string s, int pos, int n);
+void erase(picture pic=<default>);
+string jobname(string name);
+void print_random_addresses(int n=<default>);
+void generate_random_backtrace();
+guide operator ::(... guide[]);
+pen Helvetica(string series=<default>, string shape=<default>);
+transform reflect(pair a, pair b);
+transform rotate(real angle, pair z=<default>);
+bool IgnoreAspect;
+void postscript(frame f, string s);
+void postscript(frame f, string s, pair min, pair max);
+void postscript(picture pic=<default>, string s, pair min, pair max);
+void postscript(picture pic=<default>, string s);
+transform slant(real s);
+transform yscale(real y);
+transform inverse(transform t);
+real[][] inverse(real[][] a);
+pen darkgrey;
+transform xscale(real x);
+transform shiftless(transform t);
+real[][] shiftless(real[][] t);
+real[] _cputime();
+guide reverse(guide g);
+string reverse(string s);
+path reverse(path p);
+path3 reverse(path3 p);
+triple[] reverse(triple[] a);
+int[] reverse(int[] a);
+real[] reverse(real[] a);
+int[] reverse(int n);
+string[] reverse(string[] a);
+pair[] reverse(pair[] a);
+bool[] reverse(bool[] a);
+real[] curlSpecifier(guide g, int t);
+bool Blank(picture, path, pen, marginT(path, pen));
+tensionSpecifier tensionSpecifier(guide g, int t);
+bool3 default;
+pair[] controlSpecifier(guide g, int t);
+pen red;
+pair[] dirSpecifier(guide g, int t);
+pen longdashed;
+pair point(guide g, int t);
+pair point(path p, int t);
+pair point(path p, real t);
+triple point(path3 p, int t);
+triple point(path3 p, real t);
+pair point(picture pic=<default>, pair dir, bool user=<default>);
+pair point(object F, pair dir, transform t=<default>);
+pair point(frame f, pair dir);
+int length(guide g);
+int length(string s);
+real length(pair z);
+real length(triple v);
+int length(path p);
+int length(path3 p);
+int size(guide g);
+pair size(frame f);
+int size(path p);
+int size(path[] p);
+int size(path3 p);
+pair size(picture pic, bool user=<default>);
+void size(picture dest, picture src);
+void size(picture pic=<default>, real x, real y=<default>, bool keepAspect=<default>);
+void size(picture pic=<default>, real xsize, real ysize, pair min, pair max);
+string texify(string s);
+guide operator controls(pair zout, pair zin);
+guide operator controls(pair z);
+bool empty(frame f);
+tensionSpecifier operator tension(real tout, real tin, bool atleast);
+tensionSpecifier operator tension(real t, bool atLeast);
+void end(picture pic=<default>);
+curlSpecifier operator curl(real gamma, int p);
+guide operator spec(pair z, int p);
+void list(string s, bool imports=<default>);
+string cd(string s=<default>);
+int Move;
+string location();
+bool pdf();
+void _eval(string s, bool embedded, bool interactivewrite=<default>);
+void _eval(code s, bool embedded);
+void usleep(int microseconds);
+void sleep(int seconds);
+real Sin(real deg);
+void assert(bool b, string s=<default>);
+pair Align;
+void exit();
+void abort(string s=<default>);
+string locale(string s=<default>);
+string defaultseparator;
+string asydir();
+bool view();
 int system(string[] s);
 int system(string s);
-void bar(picture pic, pair a, pair d, pen p=<default>);
-picture bar(pair a, pair d, pen p=<default>);
-side NoSide;
-file stdout;
+bool interactive();
+pen colorless(pen p);
+bool straight(path p, int t);
+bool straight(path3 p, int t);
+pen makepen(path p);
+path nib(pen p);
+transform transform(pen p);
+pair relpoint(path p, real l);
+pair[][] transpose(pair[][] a);
+pen[][] transpose(pen[][] a);
+string[][] transpose(string[][] a);
+real[][] transpose(real[][] a);
+pen overwrite(int n);
+int overwrite(pen p=<default>);
+real lineskip(pen p=<default>);
+pen fontsize(real size, real lineskip);
+real fontsize(pen p=<default>);
+pen fontsize(real size);
+string font(pen p=<default>);
+pen font(string name, string options=<default>);
+pen font(string encoding, string family, string series, string shape);
+pen font(string name, real size, string options=<default>);
+void newpage(frame f);
+void newpage(picture pic=<default>);
+pen fontcommand(string s);
+pen linewidth(real x);
+real linewidth(pen p=<default>);
+real arrowlength;
+pen miterlimit(real x);
+real miterlimit(pen p=<default>);
+pen linecap(int n);
+int linecap(pen p=<default>);
+bool adjust(pen p);
+pen adjust(pen p, real arclength, bool cyclic);
+bool scale(pen p);
+transform scale(real x);
+transform scale(real x, real y);
+real[][] scale(real x, real y, real z);
 transform Shift(transform t);
 real fmod(real x, real y);
 real offset(pen p);
-pen rgb(pen p);
-pen rgb(real r, real g, real b);
-pen rgb(string s);
-real inch;
-bool ArcArrow(picture, path, pen, marginT(path, pen));
-bool ArcArrow(picture, path, pen, marginT(path, pen))(arrowhead arrowhead=<default>, real size=<default>, real angle=<default>, filltype filltype=<default>, position position=<default>);
-bool ArcArrows(picture, path, pen, marginT(path, pen))(arrowhead arrowhead=<default>, real size=<default>, real angle=<default>, filltype filltype=<default>);
-bool ArcArrows(picture, path, pen, marginT(path, pen));
-pen currentpen;
-pair precontrol(path p, int t);
-pair precontrol(path p, real t);
-triple precontrol(path3 p, int t);
-triple precontrol(path3 p, real t);
-light currentlight;
-pen royalblue;
-picture currentpicture;
-frame currentpatterns;
-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>);
-real xpart(pair z);
-real xpart(triple v);
-side Center;
-real ypart(pair z);
-real ypart(triple v);
-real zpart(triple v);
-frame orientation(frame);
-pen Courier(string series=<default>, string shape=<default>);
-real simpson(real f(real), real a, real b, real acc=<default>, real dxmax=<default>);
+string blend(pen p);
+void endclip(frame f);
+void endclip(picture pic=<default>);
+pen opacity(real opacity=<default>, string blend=<default>);
+real opacity(pen p);
+pen fillrule(int n);
+int fillrule(pen p);
+real[][] identity4;
+marker[] MarkFill;
+pen pattern(string s);
+string pattern(pen p);
+pen solid;
+string colorspace(pen p);
+int byte(real x);
+bool Aspect;
+string hex(pen p);
+int hex(string s);
+real[] colors(pen p);
+void DOSnewl(file file);
+pen cmyk(pen p);
+pen cmyk(real c, real m, real y, real k);
+pen rgb(pen p);
+pen rgb(real r, real g, real b);
+pen rgb(string s);
+pen gray(pen p);
+pen gray(real gray);
+pen gray;
+bool invisible(pen p);
+pen invisible();
+pen invisible;
+void defaultpen(pen p);
+pen defaultpen();
+pen defaultpen;
+void defaultpen(real w);
+void resetdefaultpen();
+bool isnan(real x);
+bool cyclic(guide g);
+bool cyclic(path p);
+bool cyclic(path3 p);
+void printBytecode(<open>);
+pen currentpen;
+string VERSION;
+bool alias(pair[][] a, pair[][] b);
+bool alias(guide[] a, guide[] b);
+bool alias(marginT a, marginT b);
+bool alias(Legend a, Legend b);
+bool alias(object a, object b);
+bool alias(picture[] a, picture[] b);
+bool alias(cputime a, cputime b);
+bool alias(pair[] a, pair[] b);
+bool alias(coord a, coord b);
+bool alias(coord a, coord b);
+bool alias(coords3 a, coords3 b);
+bool alias(framedTransformStack a, framedTransformStack b);
+bool alias(Label[] a, Label[] b);
+bool alias(int[] a, int[] b);
+bool alias(string[][] a, string[][] b);
+bool alias(slice a, slice b);
+bool alias(freezableBounds a, freezableBounds b);
+bool alias(scaleT a, scaleT b);
+bool alias(autoscaleT a, autoscaleT b);
+bool alias(position a, position b);
+bool alias(arrowhead a, arrowhead b);
+bool alias(real[][] a, real[][] b);
+bool alias(bool3 a, bool3 b);
+bool alias(bool3[] a, bool3[] b);
+bool alias(pairOrTriple a, pairOrTriple b);
+bool alias(string[] a, string[] b);
+bool alias(frame[] a, frame[] b);
+bool alias(scaling a, scaling b);
+bool alias(scaling a, scaling b);
+bool alias(bounds a, bounds b);
+bool alias(light a, light b);
+bool alias(align a, align b);
+bool alias(bool[] a, bool[] b);
+bool alias(void()()[] a, void()()[] b);
+bool alias(pen[][] a, pen[][] b);
+bool alias(filltype a, filltype b);
+bool alias(coord[] a, coord[] b);
+bool alias(coord[] a, coord[] b);
+bool alias(ScaleT a, ScaleT b);
+bool alias(Label a, Label b);
+bool alias(processtime a, processtime b);
+bool alias(path[] a, path[] b);
+bool alias(triple[] a, triple[] b);
+bool alias(projection a, projection b);
+bool alias(picture a, picture b);
+bool alias(object[] a, object[] b);
+bool alias(indexedTransform a, indexedTransform b);
+bool alias(Legend[] a, Legend[] b);
+bool alias(real[] a, real[] b);
+bool alias(pen[] a, pen[] b);
+bool alias(hsv a, hsv b);
+bool alias(coords2 a, coords2 b);
+bool alias(coords2 a, coords2 b);
+bool alias(transformation a, transformation b);
+bool alias(side a, side b);
+bool alias(marker a, marker b);
+bool alias(marker[] a, marker[] b);
+real pi;
+void initXasyMode();
+int randMax;
+pen heavycyan;
+marginT PenMargin(path, pen)(real begin, real end);
+marginT PenMargin(path, pen);
+int realDigits;
+real realEpsilon;
+pair NE;
+real realMin;
+real realMax;
+real nan;
+real infinity;
+real inf;
+int intMin;
+int intMax;
+pen palered;
+real[] map(real f(pair), pair[] a);
+int[] map(int f(real), real[] a);
+bool3[] map(bool3 f(bool3), bool3[] a);
+frame[] map(frame f(frame), frame[] a);
+picture[] map(picture f(picture), picture[] a);
+pen[][] map(pen[] f(pen[]), pen[][] a);
+triple[] map(triple f(triple), triple[] a);
+pen[] map(pen f(pen), pen[] a);
+coord[] map(coord f(coord), coord[] a);
+coord[] map(coord f(coord), coord[] a);
+pair[] map(pair f(pair), pair[] a);
+string[] map(string f(string), string[] a);
+marker[] map(marker f(marker), marker[] a);
+void()()[] map(void f()()(void()()), void()()[] a);
+pair[][] map(pair[] f(pair[]), pair[][] a);
+real[] map(real f(real), real[] a);
+int[] map(int f(int), int[] a);
+string[][] map(string[] f(string[]), string[][] a);
+Label[] map(Label f(Label), Label[] a);
+bool[] map(bool f(bool), bool[] a);
+path[] map(path f(path), path[] a);
+real[][] map(real[] f(real[]), real[][] a);
+object[] map(object f(object), object[] a);
+Legend[] map(Legend f(Legend), Legend[] a);
+guide[] map(guide f(guide), guide[] a);
+real identity(real x);
+real[] identity(real[] a);
+transform identity();
+real[][] identity(int n);
+real pow10(real x);
+real[] pow10(real[] a);
+pen linejoin(int n);
+int linejoin(pen p=<default>);
+real ldexp(real x, int e);
+real log1p(real x);
+real[] log1p(real[] a);
+path brace(pair a, pair b, real amplitude=<default>);
+void deactivatequote(picture pic=<default>);
+string format(string format, int x, string locale=<default>);
+string format(string format, string separator, real x, string locale=<default>);
+string format(string format, real x, string locale=<default>);
+string format(real x, string locale=<default>);
+real expm1(real x);
+real[] expm1(real[] a);
+void label(frame f, string s, string size, transform t, pair position, pair align, pen p);
+void label(picture pic=<default>, Label L, align align=<default>, pen p=<default>, filltype filltype=<default>);
+void label(frame f, Label L, pair position, align align=<default>, pen p=<default>, filltype filltype=<default>);
+void label(picture pic=<default>, Label L, pair position, align align=<default>, pen p=<default>, filltype filltype=<default>);
+void label(frame f, Label L, align align=<default>, pen p=<default>, filltype filltype=<default>);
+void label(picture pic=<default>, Label L, explicit guide g, align align=<default>, pen p=<default>, filltype filltype=<default>);
+void label(picture pic=<default>, Label L, explicit path g, align align=<default>, pen p=<default>, filltype filltype=<default>);
+real fabs(real x);
+real[] fabs(real[] a);
+string stripsuffix(string f, string suffix=<default>);
+real cbrt(real x);
+real[] cbrt(real[] a);
+real sqrt(real x);
+real[] sqrt(real[] a);
+pair sqrt(explicit pair z);
+bool all(bool[] a);
+real atanh(real x);
+real[] atanh(real[] a);
+real acosh(real x);
+real[] acosh(real[] a);
 transform shift(transform t);
 transform shift(pair z);
 transform shift(real x, real y);
@@ -178,24 +1184,21 @@
 transform shift(frame f, pair align);
 real asinh(real x);
 real[] asinh(real[] a);
-pen orange;
-pen darkgray;
-slice lastcut(path p, path knife);
-pen darkgreen;
-pen darkgrey;
-transform xscale(real x);
-transform shiftless(transform t);
-real[][] shiftless(real[][] t);
-transform yscale(real y);
-void usleep(int microseconds);
+pen ZapfDingbats(string series=<default>, string shape=<default>);
+real tanh(real x);
+real[] tanh(real[] a);
 real cosh(real x);
 real[] cosh(real[] a);
-position MidPoint;
-real Sin(real deg);
-void assert(bool b, string s=<default>);
-pen Palatino(string series=<default>, string shape=<default>);
-real incircle(pair a, pair b, pair c, pair d);
-frame Landscape(frame f);
+real sinh(real x);
+real[] sinh(real[] a);
+real straightness(path3 p, int t);
+real straightness(triple z0, triple c0, triple c1, triple z1);
+real log10(real x);
+real[] log10(real[] a);
+pair midpoint(path p);
+real exp(real x);
+real[] exp(real[] a);
+pair exp(explicit pair z);
 pen purple;
 string italic(string s);
 real atan(real x);
@@ -202,116 +1205,100 @@
 real[] atan(real[] a);
 real acos(real x);
 real[] acos(real[] a);
-pair minbound(pair a, pair b);
-triple minbound(triple a, triple b);
-pair minbound(pair[] a);
-pair minbound(pair[][] a);
-pair minbound(pair[][][] a);
-triple minbound(triple[] a);
-triple minbound(triple[][] a);
-triple minbound(triple[][][] a);
-void restore();
-pen basealign(int n);
-int basealign(pen p=<default>);
-pen basealign;
-int min(int a, int b);
-int[] min(int a, int[] b);
-int[] min(int[] a, int b);
-int[] min(int[] a, int[] b);
-int min(int[] a);
-int min(int[][] a);
-int min(int[][][] a);
-real min(real a, real b);
-real[] min(real a, real[] b);
-real[] min(real[] a, real b);
-real[] min(real[] a, real[] b);
-real min(real[] a);
-real min(real[][] a);
-real min(real[][][] a);
-string min(string a, string b);
-string[] min(string a, string[] b);
-string[] min(string[] a, string b);
-string[] min(string[] a, string[] b);
-string min(string[] a);
-string min(string[][] a);
-string min(string[][][] a);
-pair min(pen p);
-pair min(frame f);
-pair min(explicit path p);
-pair min(path[] p);
-triple min(path3 p);
-real min(... real[] a);
-real min(real m, scaling s, coord[] c);
-pair min(picture pic, bool user=<default>);
-real min(real m, scaling s, coord[] c);
-int min(... int[] a);
-filltype RadialShade(pen penc, pen penr);
+path roundbox(frame dest, frame src=<default>, real xmargin=<default>, real ymargin=<default>, pen p=<default>, filltype filltype=<default>, bool above=<default>);
+path roundbox(frame f, Label L, real xmargin=<default>, real ymargin=<default>, pen p=<default>, filltype filltype=<default>, bool above=<default>);
+real asin(real x);
+real[] asin(real[] a);
+real tan(real x);
+real[] tan(real[] a);
+pen Magenta;
+real cos(real x);
+real[] cos(real[] a);
+pair cos(explicit pair z);
+real sin(real x);
+real[] sin(real[] a);
+pair sin(explicit pair z);
+path polygon(int n);
+guide operator --(... guide[]);
+void none(file file);
+int factorial(int n);
+real log(real x);
+real[] log(real[] a);
+pair log(explicit pair z);
+guide operator ..(... guide[]);
+guide operator ..(... guide[])(tensionSpecifier t);
+pair operator tuple(real x, real y);
+triple operator tuple(real x, real y, real z);
+transform operator tuple(real x, real y, real xx, real xy, real yx, real yy);
+int[][] diagonal(... int[]);
+real[][] diagonal(... real[]);
+pair[][] diagonal(... pair[]);
+path[] texpath(string s, pen p, bool tex=<default>, bool bbox=<default>);
+path[] texpath(Label L, bool tex=<default>, bool bbox=<default>);
+bool uptodate();
+int operator #(int a, int b);
+int[] operator #(int a, int[] b);
+int[] operator #(int[] a, int b);
+int[] operator #(int[] a, int[] b);
+int operator %(int a, int b);
+int[] operator %(int a, int[] b);
+int[] operator %(int[] a, int b);
+int[] operator %(int[] a, int[] b);
+real operator %(real a, real b);
+real[] operator %(real a, real[] b);
+real[] operator %(real[] a, real b);
+real[] operator %(real[] a, real[] b);
 int search(int[] a, int key);
 int search(real[] a, real key);
 int search(string[] a, string key);
 int search(void()()[] a, void key()(), bool less(void()(), void()()));
-int search(Legend[] a, Legend key, bool less(Legend, Legend));
+int search(marker[] a, marker key, bool less(marker, marker));
 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(pair[] a, pair key, bool less(pair, pair));
 int search(coord[] a, coord key, bool less(coord, coord));
-int search(object[] a, object key, bool less(object, object));
+int search(coord[] a, coord key, bool less(coord, coord));
 int search(frame[] a, frame key, bool less(frame, frame));
-int search(Label[] a, Label key, bool less(Label, Label));
+int search(picture[] a, picture key, bool less(picture, picture));
 int search(int[] a, int key, bool less(int, int));
 int search(bool3[] a, bool3 key, bool less(bool3, bool3));
-int search(marker[] a, marker key, bool less(marker, marker));
+int search(object[] a, object key, bool less(object, object));
+int search(Legend[] a, Legend key, bool less(Legend, Legend));
 int search(string[] a, string key, bool less(string, string));
 int search(path[] a, path key, bool less(path, path));
 int search(pen[] a, pen key, bool less(pen, pen));
+int search(Label[] a, Label key, bool less(Label, Label));
 int search(bool[] a, bool key, bool less(bool, bool));
 int search(triple[] a, triple key, bool less(triple, triple));
-int search(picture[] a, picture key, bool less(picture, picture));
-filltype RadialShadeDraw(real xmargin=<default>, real ymargin=<default>, pen penc, pen penr, pen drawpen=<default>);
-real sin(real x);
-real[] sin(real[] a);
-pair sin(explicit pair z);
-pen deepcyan;
-void restoredefaults();
-path[] plus;
-pair expi(real angle);
-triple expi(real polar, real azimuth);
-void endclip(frame f);
-void endclip(picture pic=<default>);
-pen opacity(real opacity=<default>, string blend=<default>);
-real opacity(pen p);
-real[] solve(real[][] a, real[] b, bool warn=<default>);
-real[][] solve(real[][] a, real[][] b, bool warn=<default>);
-int rename(string from, string to);
-void DOSendl(file file);
-string debugger(string file, int line, int column, code s=<default>);
-string getc(file f);
-bool debugging;
-void shipout(string prefix=<default>, frame f, frame preamble=<default>, string format=<default>, bool wait=<default>, bool view=<default>, transform xform());
-void shipout(string prefix=<default>, frame f, string format=<default>, bool wait=<default>, bool view=<default>, string options=<default>, string script=<default>, light light=<default>, projection P=<default>);
-void shipout(string prefix=<default>, picture pic=<default>, frame orientation(frame)=<default>, string format=<default>, bool wait=<default>, bool view=<default>, string options=<default>, string script=<default>, light light=<default>, projection P=<default>);
-void shipout3(string prefix, frame f, string format=<default>, real width, real height, real angle, real zoom, triple m, triple m, pair shift, real[][] t, real[] background, triple[] lights, real[][] diffuse, real[][] ambient, real[][] specular, bool viewportlighting, bool view=<default>);
-void shipout3(string prefix, frame f);
-string getstring(string name=<default>, string default=<default>, string prompt=<default>, bool store=<default>);
-int debuggerlines;
-frame bbox(picture pic=<default>, real xmargin=<default>, real ymargin=<default>, pen p=<default>, filltype filltype=<default>);
-real radians(real degrees);
-bool pdf();
-void _eval(string s, bool embedded, bool interactivewrite=<default>);
-void _eval(code s, bool embedded);
-path[][] textpath(string[] s, pen[] p);
-void radialshade(frame f, path[] g, bool stroke=<default>, pen pena, pair a, real ra, bool extenda=<default>, pen penb, pair b, real rb, bool extendb=<default>, bool copy=<default>);
-void radialshade(picture pic=<default>, path[] g, bool stroke=<default>, pen pena, pair a, real ra, bool extenda=<default>, pen penb, pair b, real rb, bool extendb=<default>, bool copy=<default>);
-pair maxbound(pair a, pair b);
-triple maxbound(triple a, triple b);
-pair maxbound(pair[] a);
-pair maxbound(pair[][] a);
-pair maxbound(pair[][][] a);
-triple maxbound(triple[] a);
-triple maxbound(triple[][] a);
-triple maxbound(triple[][][] a);
-string Embed(string name, string text=<default>, string options=<default>, real width=<default>, real height=<default>);
+int[] sort(int[] a);
+int[][] sort(int[][] a);
+real[] sort(real[] a);
+real[][] sort(real[][] a);
+string[] sort(string[] a);
+string[][] sort(string[][] a);
+Label[] sort(Label[] a, bool less(Label, Label));
+path[] sort(path[] a, bool less(path, path));
+pair[] sort(pair[] a, bool less(pair, pair));
+void()()[] sort(void()()[] a, bool less(void()(), void()()));
+real[] sort(real[] a, bool less(real, real));
+bool[] sort(bool[] a, bool less(bool, bool));
+marker[] sort(marker[] a, bool less(marker, marker));
+pen[] sort(pen[] a, bool less(pen, pen));
+pen[][] sort(pen[][] a, bool less(pen[], pen[]));
+coord[] sort(coord[] a, bool less(coord, coord));
+coord[] sort(coord[] a, bool less(coord, coord));
+guide[] sort(guide[] a, bool less(guide, guide));
+real[][] sort(real[][] a, bool less(real[], real[]));
+triple[] sort(triple[] a, bool less(triple, triple));
+picture[] sort(picture[] a, bool less(picture, picture));
+string[] sort(string[] a, bool less(string, string));
+int[] sort(int[] a, bool less(int, int));
+string[][] sort(string[][] a, bool less(string[], string[]));
+bool3[] sort(bool3[] a, bool less(bool3, bool3));
+pair[][] sort(pair[][] a, bool less(pair[], pair[]));
+object[] sort(object[] a, bool less(object, object));
+Legend[] sort(Legend[] a, bool less(Legend, Legend));
+frame[] sort(frame[] a, bool less(frame, frame));
 pair postcontrol(path p, int t);
 pair postcontrol(path p, real t);
 triple postcontrol(path3 p, int t);
@@ -343,175 +1330,102 @@
 pair max(path[] p);
 triple max(path3 p);
 pair max(picture pic, bool user=<default>);
-real max(real M, scaling s, coord[] c);
 int max(... int[] a);
 real max(... real[] a);
 real max(real M, scaling s, coord[] c);
-Label Label(Label L, pair position, align align=<default>, pen p=<default>, transform embed(transform)=<default>, filltype filltype=<default>);
-Label Label(string s, string size=<default>, explicit position position, align align=<default>, pen p=<default>, transform embed(transform)=<default>, filltype filltype=<default>);
-Label Label(Label L, explicit position position, align align=<default>, pen p=<default>, transform embed(transform)=<default>, filltype filltype=<default>);
-Label Label(explicit pair position, align align=<default>, pen p=<default>, transform embed(transform)=<default>, filltype filltype=<default>);
-Label Label;
-Label Label(string s=<default>, string size=<default>, align align=<default>, pen p=<default>, transform embed(transform)=<default>, filltype filltype=<default>);
-Label Label(string s, string size=<default>, pair position, align align=<default>, pen p=<default>, transform embed(transform)=<default>, filltype filltype=<default>);
-Label Label(Label L, align align=<default>, pen p=<default>, transform embed(transform)=<default>, filltype filltype=<default>);
-string font(pen p=<default>);
-pen font(string name, string options=<default>);
-pen font(string encoding, string family, string series, string shape);
-pen font(string name, real size, string options=<default>);
-marker markthin(path g, pen p=<default>, real thin(real fraction)=<default>, filltype filltype=<default>);
-int intMin;
-pen white;
-side RightSide;
-string replace(string s, string[][] translate);
-string replace(string s, string before, string after);
-transform fixedscaling(picture pic=<default>, pair min, pair max, pen p=<default>, bool warn=<default>);
-pen Symbol(string series=<default>, string shape=<default>);
-slice firstcut(path p, path knife);
-pen squarecap;
-pen squarepen;
-bool EndArrow(picture, path, pen, marginT(path, pen));
-bool EndArrow(picture, path, pen, marginT(path, pen))(arrowhead arrowhead=<default>, real size=<default>, real angle=<default>, filltype filltype=<default>, position position=<default>);
-real barsize(pen p=<default>);
-bool EndArcArrow(picture, path, pen, marginT(path, pen));
-bool EndArcArrow(picture, path, pen, marginT(path, pen))(arrowhead arrowhead=<default>, real size=<default>, real angle=<default>, filltype filltype=<default>, position position=<default>);
-void tensorshade(frame f, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[][] p, path[] b=<default>, pair[][] z=<default>, bool copy=<default>);
-void tensorshade(picture pic=<default>, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[][] p, path[] b=<default>, pair[][] z=<default>, bool copy=<default>);
-void tensorshade(frame f, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[] p, path b=<default>, pair[] z);
-void tensorshade(picture pic=<default>, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[] p, path b=<default>, pair[] z);
-void tensorshade(frame f, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[] p, path b=<default>);
-void tensorshade(picture pic=<default>, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[] p, path b=<default>);
-string[] split(string s, string delimiter=<default>);
-void addSaveFunction(void s()());
-object embed3(string, frame, string, string, string, light, projection);
-filltype NoFill;
-real colatitude(triple v, bool warn=<default>);
-void label(frame f, string s, string size, transform t, pair position, pair align, pen p);
-void label(picture pic=<default>, Label L, align align=<default>, pen p=<default>, filltype filltype=<default>);
-void label(frame f, Label L, pair position, align align=<default>, pen p=<default>, filltype filltype=<default>);
-void label(picture pic=<default>, Label L, pair position, align align=<default>, pen p=<default>, filltype filltype=<default>);
-void label(frame f, Label L, align align=<default>, pen p=<default>, filltype filltype=<default>);
-void label(picture pic=<default>, Label L, explicit guide g, align align=<default>, pen p=<default>, filltype filltype=<default>);
-void label(picture pic=<default>, Label L, explicit path g, align align=<default>, pen p=<default>, filltype filltype=<default>);
-real fabs(real x);
-real[] fabs(real[] a);
-bool labels(frame f);
-light light(pen diffuse=<default>, pen ambient=<default>, pen specular=<default>, pen background=<default>, real specularfactor=<default>, bool viewport=<default> ... triple[] position);
-light light(pen[] diffuse, pen[] ambient=<default>, pen[] specular=<default>, pen background=<default>, real specularfactor=<default>, bool viewport=<default>, triple[] position);
-light light(pen diffuse=<default>, pen ambient=<default>, pen specular=<default>, pen background=<default>, bool viewport=<default>, real x, real y, real z);
-light light(explicit light light);
-real remainder(real x, real y);
-int byte(real x);
-real camerafactor;
-pen lightred;
-real labelmargin;
-real labelmargin(pen p=<default>);
-pen lightblue;
-pen lightgreen;
-pair right;
-string outformat(string format=<default>);
-pen lightcyan;
-pen lightmagenta;
-pen lightyellow;
-pen lightgray;
-pen lightolive;
-pen lightgrey;
-string upcase(string s);
-pen darkblue;
-pen darkbrown;
-path[] strokepath(path g, pen p=<default>);
-real erf(real x);
-void saveline(string name, string value, bool store=<default>);
-pen fuchsia;
-bool needshipout();
-filltype filltype(int type=<default>, pen fillpen=<default>, pen drawpen=<default>, void fill2(frame f, path[] g, pen fillpen));
-pen Bookman(string series=<default>, string shape=<default>);
-path box(frame dest, frame src=<default>, real xmargin=<default>, real ymargin=<default>, pen p=<default>, filltype filltype=<default>, bool above=<default>);
-path box(frame f, Label L, real xmargin=<default>, real ymargin=<default>, pen p=<default>, filltype filltype=<default>, bool above=<default>);
-path box(pair a, pair b);
-frame[] fit(string prefix=<default>, picture[] pictures, string format=<default>, bool view=<default>, string options=<default>, string script=<default>, projection P=<default>);
-void seekeof(file f);
-path unitcircle;
+real max(real M, scaling s, coord[] c);
+void restore();
+pen basealign(int n);
+int basealign(pen p=<default>);
+pen basealign;
+int min(int a, int b);
+int[] min(int a, int[] b);
+int[] min(int[] a, int b);
+int[] min(int[] a, int[] b);
+int min(int[] a);
+int min(int[][] a);
+int min(int[][][] a);
+real min(real a, real b);
+real[] min(real a, real[] b);
+real[] min(real[] a, real b);
+real[] min(real[] a, real[] b);
+real min(real[] a);
+real min(real[][] a);
+real min(real[][][] a);
+string min(string a, string b);
+string[] min(string a, string[] b);
+string[] min(string[] a, string b);
+string[] min(string[] a, string[] b);
+string min(string[] a);
+string min(string[][] a);
+string min(string[][][] a);
+pair min(pen p);
+pair min(frame f);
+pair min(explicit path p);
+pair min(path[] p);
+triple min(path3 p);
+real min(... real[] a);
+real min(real m, scaling s, coord[] c);
+real min(real m, scaling s, coord[] c);
+pair min(picture pic, bool user=<default>);
+int min(... int[] a);
+void srand(int seed);
+bool operator >(int a, int b);
+bool[] operator >(int a, int[] b);
+bool[] operator >(int[] a, int b);
+bool[] operator >(int[] a, int[] b);
+bool operator >(real a, real b);
+bool[] operator >(real a, real[] b);
+bool[] operator >(real[] a, real b);
+bool[] operator >(real[] a, real[] b);
+bool operator >(string a, string b);
+bool[] operator >(string a, string[] b);
+bool[] operator >(string[] a, string b);
+bool[] operator >(string[] a, string[] b);
+bool operator >=(int a, int b);
+bool[] operator >=(int a, int[] b);
+bool[] operator >=(int[] a, int b);
+bool[] operator >=(int[] a, int[] b);
+bool operator >=(real a, real b);
+bool[] operator >=(real a, real[] b);
+bool[] operator >=(real[] a, real b);
+bool[] operator >=(real[] a, real[] b);
+bool operator >=(string a, string b);
+bool[] operator >=(string a, string[] b);
+bool[] operator >=(string[] a, string b);
+bool[] operator >=(string[] a, string[] b);
+bool operator >=(coord a, coord b);
+bool operator >=(coord a, coord b);
+bool operator <=(int a, int b);
+bool[] operator <=(int a, int[] b);
+bool[] operator <=(int[] a, int b);
+bool[] operator <=(int[] a, int[] b);
+bool operator <=(real a, real b);
+bool[] operator <=(real a, real[] b);
+bool[] operator <=(real[] a, real b);
+bool[] operator <=(real[] a, real[] b);
+bool operator <=(string a, string b);
+bool[] operator <=(string a, string[] b);
+bool[] operator <=(string[] a, string b);
+bool[] operator <=(string[] a, string[] b);
+bool operator <=(coord a, coord b);
+bool operator <=(coord a, coord b);
+bool operator <(int a, int b);
+bool[] operator <(int a, int[] b);
+bool[] operator <(int[] a, int b);
+bool[] operator <(int[] a, int[] b);
+bool operator <(real a, real b);
+bool[] operator <(real a, real[] b);
+bool[] operator <(real[] a, real b);
+bool[] operator <(real[] a, real[] b);
+bool operator <(string a, string b);
+bool[] operator <(string a, string[] b);
+bool[] operator <(string[] a, string b);
+bool[] operator <(string[] a, string[] b);
 framedTransformStack xformStack;
 pair[] conj(pair[] a);
 pair[][] conj(pair[][] a);
 pair conj(pair z);
-pen deepgray;
-pen deepgreen;
-pen deepgrey;
-marker[] Mark;
-marker Mark(int n);
-real aTan(real x);
-void _begingroup3(frame f, string name, real compression, real granularity, bool closed, bool tessellate, bool dobreak, bool nobreak, triple center, int interaction);
-path[] MarkPath;
-string graphic(string name, string options=<default>);
-real aCos(real x);
-void texreset();
-string graphicscale(real x);
-int[] complement(int[] a, int n);
-path[] complement(frame f, path[] g);
-pen Cyan;
-marginT NoMargin(path, pen);
-marginT NoMargin(path, pen)();
-path[][] _texpath(string[] s, pen[] p);
-real sinh(real x);
-real[] sinh(real[] a);
-real[] _cputime();
-position EndPoint;
-hsv hsv(real h, real s, real v);
-hsv hsv(pen p);
-void deconstruct(frame f, frame preamble=<default>, real magnification=<default>, transform xform());
-void deconstruct(picture pic=<default>, real magnification=<default>);
-int sgn(real x);
-pair minAfterTransform(transform t, path[] p);
-int seconds(string t=<default>, string format=<default>);
-pen cyan;
-pen grey;
-real cm;
-filltype Fill;
-filltype Fill(real xmargin=<default>, real ymargin=<default>, pen p=<default>);
-pen olive;
-pen darkolive;
-int ascii(string s);
-real arcarrowangle;
-real arcarrowfactor;
-real mm;
-real arcarrowsize(pen p=<default>);
-real calculateScaling(string dir, coord[] coords, real size, bool warn=<default>);
-real calculateScaling(string dir, coord[] coords, real size, bool warn=<default>);
-real calculateScaling(string dir, coord[] m, coord[] M, real size, bool warn=<default>);
-real calculateScaling(string dir, coord[] m, coord[] M, real size, bool warn=<default>);
-triple gettriple(string name=<default>, triple default=<default>, string prompt=<default>, bool store=<default>);
-void drawpixel(frame f, triple v, pen p, real width=<default>);
-pen fontsize(real size, real lineskip);
-real fontsize(pen p=<default>);
-pen fontsize(real size);
-void close(file f);
-real lineskip(pen p=<default>);
-pen dashed;
-pair maxAfterTransform(transform t, path[] p);
-int[][] triangulate(pair[] z);
-void fill(frame f, path[] g, pen p=<default>, bool copy=<default>);
-path fill(frame dest, frame src, filltype filltype=<default>, real xmargin=<default>, real ymargin=<default>);
-void fill(picture pic=<default>, path[] g, pen p=<default>, bool copy=<default>);
-void fill(pair origin, picture pic=<default>, path[] g, pen p=<default>);
-pair midpoint(path p);
-real exp(real x);
-real[] exp(real[] a);
-pair exp(explicit pair z);
-pen linejoin(int n);
-int linejoin(pen p=<default>);
-real ldexp(real x, int e);
-pen rgba(real[] a);
-real[] rgba(pen p);
-string time(string format=<default>);
-string time(int seconds, string format=<default>);
-void prepend(frame dest, frame src);
-real pt;
-settings settings;
-int MoveQuiet;
-marginT EndMargin(path, pen);
-pen nullpen;
 side LeftSide;
 path nullpath;
 guide[] copy(guide[] a, int depth=<default>);
@@ -520,10 +1434,9 @@
 bool[] copy(bool[] a, int depth=<default>);
 real[][] copy(real[][] a, int depth=<default>);
 pen[] copy(pen[] a, int depth=<default>);
-coord[] copy(coord[] a, int depth=<default>);
+object[] copy(object[] a, int depth=<default>);
 picture[] copy(picture[] a, int depth=<default>);
-marker[] copy(marker[] a, int depth=<default>);
-Label[] copy(Label[] a, int depth=<default>);
+Legend[] copy(Legend[] a, int depth=<default>);
 pen[][] copy(pen[][] a, int depth=<default>);
 path[] copy(path[] a, int depth=<default>);
 string[] copy(string[] a, int depth=<default>);
@@ -534,8 +1447,9 @@
 pair[] copy(pair[] a, int depth=<default>);
 bool3[] copy(bool3[] a, int depth=<default>);
 coord[] copy(coord[] a, int depth=<default>);
-object[] copy(object[] a, int depth=<default>);
-Legend[] copy(Legend[] a, int depth=<default>);
+coord[] copy(coord[] a, int depth=<default>);
+marker[] copy(marker[] a, int depth=<default>);
+Label[] copy(Label[] a, int depth=<default>);
 pair[][] copy(pair[][] a, int depth=<default>);
 real[] abs(pair[] a);
 real[] abs(triple[] a);
@@ -544,248 +1458,92 @@
 real abs(pair z);
 real abs(triple v);
 int abs(int x);
-pen pink;
-real inches;
-path ellipse(frame dest, frame src=<default>, real xmargin=<default>, real ymargin=<default>, pen p=<default>, filltype filltype=<default>, bool above=<default>);
-path ellipse(frame f, Label L, real xmargin=<default>, real ymargin=<default>, pen p=<default>, filltype filltype=<default>, bool above=<default>);
-path ellipse(pair c, real a, real b);
-pair getpair(string name=<default>, pair default=<default>, string prompt=<default>, bool store=<default>);
-void axialshade(frame f, path[] g, bool stroke=<default>, pen pena, pair a, bool extenda=<default>, pen penb, pair b, bool extendb=<default>, bool copy=<default>);
-void axialshade(picture pic=<default>, path[] g, bool stroke=<default>, pen pena, pair a, bool extenda=<default>, pen penb, pair b, bool extendb=<default>, bool copy=<default>);
-string locale(string s=<default>);
-real dirtime(path p, pair z);
-void copyPairOrTriple(pairOrTriple dest, pairOrTriple src);
-real[] colors(pen p);
-void filloutside(picture pic=<default>, path[] g, pen p=<default>, bool copy=<default>);
-void filloutside(frame f, path[] g, pen p=<default>, bool copy=<default>);
-pen[] colorPen;
-real _findroot(real f(real), real a, real b, real tolerance, real fa, real fb);
-pen colorless(pen p);
-pen solid;
-string colorspace(pen p);
-void warn(string s);
-pen deepblue;
-pen palered;
-real[] map(real f(pair), pair[] a);
-int[] map(int f(real), real[] a);
-bool3[] map(bool3 f(bool3), bool3[] a);
-frame[] map(frame f(frame), frame[] a);
-Label[] map(Label f(Label), Label[] a);
-pen[][] map(pen[] f(pen[]), pen[][] a);
-triple[] map(triple f(triple), triple[] a);
-pen[] map(pen f(pen), pen[] a);
-coord[] map(coord f(coord), coord[] a);
-object[] map(object f(object), object[] a);
-pair[] map(pair f(pair), pair[] a);
-coord[] map(coord f(coord), coord[] a);
-string[] map(string f(string), string[] a);
-Legend[] map(Legend f(Legend), Legend[] a);
-void()()[] map(void f()()(void()()), void()()[] a);
-pair[][] map(pair[] f(pair[]), pair[][] a);
-real[] map(real f(real), real[] a);
-picture[] map(picture f(picture), picture[] a);
-int[] map(int f(int), int[] a);
-string[][] map(string[] f(string[]), string[][] a);
-bool[] map(bool f(bool), bool[] a);
-path[] map(path f(path), path[] a);
-real[][] map(real[] f(real[]), real[][] a);
-marker[] map(marker f(marker), marker[] a);
-guide[] map(guide f(guide), guide[] a);
-path unstraighten(path p);
-path3 unstraighten(path3 p);
-void _image(frame f, real[][] data, pair initial, pair final, pen[] palette=<default>, transform t=<default>, bool copy=<default>, bool antialias=<default>);
-void _image(frame f, pen[][] data, pair initial, pair final, transform t=<default>, bool copy=<default>, bool antialias=<default>);
-void _image(frame f, pen f(int, int), int width, int height, pair initial, pair final, transform t=<default>, bool antialias=<default>);
-pair arcpoint(path p, real L);
-pen Pen(int n);
-int rfind(string s, string t, int pos=<default>);
-pair minratio(frame f);
-pair minratio(triple[][] p, pair b);
-pair minratio(path3 g);
-int[] sequence(int n);
-pen[][] sequence(pen[] f(int), int n);
-coord[] sequence(coord f(int), int n);
-picture[] sequence(picture f(int), int n);
-marker[] sequence(marker 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);
-pair[] sequence(pair f(int), int n);
-guide[] sequence(guide f(int), int n);
-pen[] sequence(pen f(int), int n);
-void()()[] sequence(void f()()(int), int n);
-bool[] sequence(bool f(int), int n);
-string[] sequence(string f(int), int n);
-pair[][] sequence(pair[] f(int), int n);
-bool3[] sequence(bool3 f(int), int n);
-coord[] sequence(coord f(int), int n);
-object[] sequence(object 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);
-triple[] sequence(triple f(int), int n);
-path[] sequence(path f(int), int n);
-frame[] sequence(frame f(int), int n);
-triple minbezier(triple[][] p, triple b);
-path trim(path g, real begin, real end);
-marginT DotMargin(path, pen)(real begin, real end);
-marginT DotMargin(path, pen);
-marginT DotMargins(path, pen);
-string string(int x);
-string string(real x, int digits=<default>);
-string cd(string s=<default>);
-int size(guide g);
-pair size(frame f);
-int size(path p);
-int size(path[] p);
-int size(path3 p);
-void size(picture dest, picture src);
-pair size(picture pic, bool user=<default>);
-void size(picture pic=<default>, real x, real y=<default>, bool keepAspect=<default>);
-void size(picture pic=<default>, real xsize, real ysize, pair min, pair max);
-void clear(file f);
-void clear(string file, int line);
-void clear();
-void clear(string file, string text);
-pen mediumred;
-pen mediumblue;
-pen mediumgreen;
-pen mediumcyan;
-pen mediummagenta;
-pair arcdir(path p, real L);
-pen mediumyellow;
-pen mediumgray;
-string downcase(string s);
-pen mediumgrey;
-transform transform(pen p);
-string readline(string prompt=<default>, string name=<default>, bool tabcompletion=<default>);
-void beep();
-pair relpoint(path p, real l);
-pair[][] transpose(pair[][] a);
-pen[][] transpose(pen[][] a);
-string[][] transpose(string[][] a);
-real[][] transpose(real[][] a);
-pen overwrite(int n);
-int overwrite(pen p=<default>);
-pen linewidth(real x);
-real linewidth(pen p=<default>);
-transformation transformation(real[][] modelview);
-transformation transformation(real[][] modelview, real[][] projection);
-pair maxratio(frame f);
-pair maxratio(triple[][] p, pair b);
-pair maxratio(path3 g);
-triple maxbezier(triple[][] p, triple b);
-void layer(frame f);
-void layer(picture pic=<default>);
-void DOSnewl(file file);
-pen cmyk(pen p);
-pen cmyk(real c, real m, real y, real k);
-pen blue;
-pen evenodd;
-int precision(file f=<default>, int digits=<default>);
-path3 path3(triple[] pre, triple[] point, triple[] post, bool[] straight, bool cyclic);
-bool piecewisestraight(path p);
-bool piecewisestraight(path3 p);
-void stop(string file, int line, code s=<default>);
-void stop(string file, string text, code s=<default>);
-pair reldir(path p, real l);
-pen TimesRoman(string series=<default>, string shape=<default>);
-slice cut(path p, path knife, int n);
-bool is3D(frame f);
-bool is3D(string format=<default>);
-void report(string text);
-void report(int i);
-void report(transform t);
-void add(frame dest, frame src);
-void add(picture dest=<default>, frame src, pair position, pair align, bool group=<default>, filltype filltype=<default>, bool above=<default>);
-void add(frame dest, frame src, pair position, pair align, bool group=<default>, filltype filltype=<default>, bool above=<default>);
-void add(picture src, bool group=<default>, filltype filltype=<default>, bool above=<default>);
-void add(picture pic=<default>, void d(frame f, transform t), bool exact=<default>);
-void add(picture pic=<default>, void d(frame f, real[][] t, picture pic, projection P), bool exact=<default>);
-void add(picture pic=<default>, void d(picture, real[][]), bool exact=<default>);
-void add(picture dest, picture src, bool group=<default>, filltype filltype=<default>, bool above=<default>);
-void add(picture pic=<default>, Label L);
-void add(picture dest, picture src, pair position, bool group=<default>, filltype filltype=<default>, bool above=<default>);
-void add(picture dest=<default>, object F, pair position=<default>, bool group=<default>, filltype filltype=<default>, bool above=<default>);
-void add(frame dest, frame src, filltype filltype, bool above=<default>);
-void add(frame dest, frame src, bool group, filltype filltype=<default>, bool above=<default>);
-void add(frame dest, frame src, pair position, bool group=<default>, filltype filltype=<default>, bool above=<default>);
-void add(picture dest=<default>, frame src, pair position=<default>, bool group=<default>, filltype filltype=<default>, bool above=<default>);
-void add(picture pic=<default>, void d(picture, transform), bool exact=<default>);
-void add(frame f, transform t=<default>, Label L);
-void add(picture src, pair position, bool group=<default>, filltype filltype=<default>, bool above=<default>);
-plain plain;
-void purge(int divisor=<default>);
-int Round(real x);
-real sqrt(real x);
-real[] sqrt(real[] a);
-pair sqrt(explicit pair z);
-string[] spinner;
-real[] times(path p, real x);
-real[] times(path p, explicit pair z);
-void drawbeziertriangle(frame f, triple[][] p, triple center, bool straight, pen[] p, real opacity, real shininess, real prcshininess, pen[] colors, int interaction, bool prc=<default>);
-void Draw(picture pic=<default>, path g, pen p=<default>);
-filltype Draw;
-void Draw(picture pic=<default>, explicit path[] g, pen p=<default>);
-filltype Draw(real xmargin=<default>, real ymargin=<default>, pen p=<default>);
-void tab(file file);
-plain_scaling plain_scaling;
-string file(string s);
-plain_bounds plain_bounds;
-string outprefix(string prefix=<default>);
-object object(Label L, path e(frame dest, frame src=<default>, real xmargin=<default>, real ymargin=<default>, pen p=<default>, filltype filltype=<default>, bool above=<default>), real xmargin=<default>, real ymargin=<default>, pen p=<default>, filltype filltype=<default>, bool above=<default>);
-object object(frame f);
-object object(Label L);
-file stdin;
-void()()[] array(int n, void value()(), int depth=<default>);
-bool[] array(int n, bool value, int depth=<default>);
-string[] array(int n, string value, int depth=<default>);
-pair[][] array(int n, pair[] value, int depth=<default>);
-bool3[] array(int n, bool3 value, int depth=<default>);
-coord[] array(int n, coord value, int depth=<default>);
-object[] array(int n, object 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>);
-path[] array(int n, path value, int depth=<default>);
-frame[] array(int n, frame value, int depth=<default>);
-pen[][] array(int n, pen[] value, int depth=<default>);
-coord[] array(int n, coord value, int depth=<default>);
-picture[] array(int n, picture value, int depth=<default>);
-marker[] array(int n, marker 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>);
-pair[] array(int n, pair value, int depth=<default>);
-guide[] array(int n, guide value, int depth=<default>);
-pen[] array(int n, pen value, int depth=<default>);
-bool BeginBar(picture, path, pen, marginT(path, pen));
-bool BeginBar(picture, path, pen, marginT(path, pen))(real size=<default>);
-triple perp(triple v, triple u);
-int find(bool[] a, int n=<default>);
-int find(string s, string t, int pos=<default>);
-position BeginPoint;
-marginT BeginMargin(path, pen);
-path buildcycle(... path[] p);
-bool BeginArrow(picture, path, pen, marginT(path, pen));
-bool BeginArrow(picture, path, pen, marginT(path, pen))(arrowhead arrowhead=<default>, real size=<default>, real angle=<default>, filltype filltype=<default>, position position=<default>);
-marginT BeginPenMargin(path, pen);
-int round(real x);
-marginT BeginDotMargin(path, pen);
-bool BeginArcArrow(picture, path, pen, marginT(path, pen));
-bool BeginArcArrow(picture, path, pen, marginT(path, pen))(arrowhead arrowhead=<default>, real size=<default>, real angle=<default>, filltype filltype=<default>, position position=<default>);
-pen roundcap;
-void buildRestoreThunk()();
-pen roundjoin;
-int sourceline(string file, string text);
-void buildRestoreDefaults()();
-path roundbox(frame dest, frame src=<default>, real xmargin=<default>, real ymargin=<default>, pen p=<default>, filltype filltype=<default>, bool above=<default>);
-path roundbox(frame f, Label L, real xmargin=<default>, real ymargin=<default>, pen p=<default>, filltype filltype=<default>, bool above=<default>);
-real asin(real x);
-real[] asin(real[] a);
-pair endpoint(path p);
+void radialshade(frame f, path[] g, bool stroke=<default>, pen pena, pair a, real ra, bool extenda=<default>, pen penb, pair b, real rb, bool extendb=<default>, bool copy=<default>);
+void radialshade(picture pic=<default>, path[] g, bool stroke=<default>, pen pena, pair a, real ra, bool extenda=<default>, pen penb, pair b, real rb, bool extendb=<default>, bool copy=<default>);
+pair maxbound(pair a, pair b);
+triple maxbound(triple a, triple b);
+pair maxbound(pair[] a);
+pair maxbound(pair[][] a);
+pair maxbound(pair[][][] a);
+triple maxbound(triple[] a);
+triple maxbound(triple[][] a);
+triple maxbound(triple[][][] a);
+pair minbound(pair a, pair b);
+triple minbound(triple a, triple b);
+pair minbound(pair[] a);
+pair minbound(pair[][] a);
+pair minbound(pair[][][] a);
+triple minbound(triple[] a);
+triple minbound(triple[][] a);
+triple minbound(triple[][][] a);
+real operator /(real a, real b);
+real[] operator /(real a, real[] b);
+real[] operator /(real[] a, real b);
+real[] operator /(real[] a, real[] b);
+real[][] operator /(real[][] a, real b);
+pair operator /(pair a, pair b);
+pair[] operator /(pair a, pair[] b);
+pair[] operator /(pair[] a, pair b);
+pair[] operator /(pair[] a, pair[] b);
+pair[][] operator /(pair[][] a, pair b);
+triple[] operator /(triple[] a, real b);
+real operator /(int a, int b);
+real[] operator /(int[] a, int b);
+real[] operator /(int a, int[] b);
+real[] operator /(int[] a, int[] b);
+triple operator /(triple v, real x);
+real interp(real a, real b, real t);
+pair interp(explicit pair a, explicit pair b, real t);
+triple interp(triple a, triple b, real t);
+pen interp(pen a, pen b, real t);
+int operator *(int a, int b);
+int[] operator *(int a, int[] b);
+int[] operator *(int[] a, int b);
+int[] operator *(int[] a, int[] b);
+int[][] operator *(int a, int[][] b);
+int[][] operator *(int[][] a, int b);
+real operator *(real a, real b);
+real[] operator *(real a, real[] b);
+real[] operator *(real[] a, real b);
+real[] operator *(real[] a, real[] b);
+real[][] operator *(real a, real[][] b);
+real[][] operator *(real[][] a, real b);
+pair operator *(pair a, pair b);
+pair[] operator *(pair a, pair[] b);
+pair[] operator *(pair[] a, pair b);
+pair[] operator *(pair[] a, pair[] b);
+pair[][] operator *(pair a, pair[][] b);
+pair[][] operator *(pair[][] a, pair b);
+triple[] operator *(real a, triple[] b);
+triple[][] operator *(real a, triple[][] b);
+triple[] operator *(triple[] a, real b);
+triple[][] operator *(triple[][] a, real b);
+pen operator *(real a, pen b);
+pen operator *(pen a, real b);
+transform operator *(transform a, transform b);
+pair operator *(transform t, pair z);
+path operator *(transform t, path g);
+pen operator *(transform t, pen p);
+frame operator *(transform t, frame f);
+frame operator *(real[][] t, frame f);
+real[] operator *(real[][] a, real[] b);
+real[] operator *(real[] a, real[][] b);
+int[][] operator *(int[][] a, int[][] b);
+real[][] operator *(real[][] a, real[][] b);
+pair[][] operator *(pair[][] a, pair[][] b);
+triple operator *(real[][] t, triple v);
+triple operator *(real x, triple v);
+triple operator *(triple v, real x);
+path3 operator *(real[][] t, path3 g);
+Label operator *(transform t, Label L);
+picture operator *(real[][] t, picture orig);
+bounds operator *(transform t, bounds b);
+path[] operator *(transform t, explicit path[] p);
+pair[] operator *(transform t, pair[] z);
+side operator *(real x, side s);
+Label operator *(real[][] t, Label L);
+picture operator *(transform t, picture orig);
+object operator *(transform t, explicit object F);
 real latitude(triple v, bool warn=<default>);
 int sum(int[] a);
 real sum(real[] a);
@@ -792,61 +1550,42 @@
 pair sum(pair[] a);
 triple sum(triple[] a);
 int sum(bool[] a);
-real inf;
-real arctime(path p, real l);
-real arctime(path3 p, real dval);
-pen palemagenta;
-void draw(frame f, triple[][] p, triple center, bool straight, pen[] p, real opacity, real shininess, real prcshininess, triple normal, pen[] colors, int interaction, bool prc=<default>);
-void draw(frame f, triple[] p, real[] knot, real[] weights=<default>, pen p);
-void draw(frame f, triple[][] p, real[] uknot, real[] vknot, real[][] weights=<default>, pen[] p, real opacity, real shininess, real prcshininess, pen[] colors);
-void draw(frame f, triple[] v, int[][] vi, triple[] n, int[][] ni, pen[] p, real opacity, real shininess, real prcshininess, pen[] c=<default>, int[][] ci=<default>);
-void draw(picture pic=<default>, path[] g, pen fillrule=<default>, pen[] p);
-object draw(picture pic=<default>, Label L, path e(frame dest, frame src=<default>, real xmargin=<default>, real ymargin=<default>, pen p=<default>, filltype filltype=<default>, bool above=<default>), pair position, real xmargin=<default>, real ymargin=<default>, pen p=<default>, filltype filltype=<default>, bool above=<default>);
-void draw(frame f, explicit path[] g, pen p=<default>);
-void draw(picture pic=<default>, Label L=<default>, path g, align align=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, bool bar(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, Label legend=<default>, marker marker=<default>);
-void draw(pair origin, picture pic=<default>, Label L=<default>, path g, align align=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, bool bar(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, Label legend=<default>, marker marker=<default>);
-void draw(picture pic=<default>, guide[] g, pen p=<default>, Label legend=<default>, marker marker=<default>);
-void draw(pair origin, picture pic=<default>, guide[] g, pen p=<default>, Label legend=<default>, marker marker=<default>);
-object draw(picture pic=<default>, Label L, path e(frame dest, frame src=<default>, real xmargin=<default>, real ymargin=<default>, pen p=<default>, filltype filltype=<default>, bool above=<default>), real xmargin=<default>, real ymargin=<default>, pen p=<default>, filltype filltype=<default>, bool above=<default>);
-void draw(picture pic=<default>, explicit path[] g, pen p=<default>, Label legend=<default>, marker marker=<default>);
-void draw(pair origin, picture pic=<default>, explicit path[] g, pen p=<default>, Label legend=<default>, marker marker=<default>);
-void draw(frame f, guide[] g, pen p=<default>);
-void draw(frame f, path g, pen p=<default>);
-void draw(frame f, path g, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen)));
-int mantissaBits;
-real identity(real x);
-real[] identity(real[] a);
-transform identity();
-real[][] identity(int n);
-real[][] identity4;
-marker[] MarkFill;
-pen pattern(string s);
-string pattern(pen p);
-transform invert;
-transform inverse(transform t);
-real[][] inverse(real[][] a);
-pair unit(pair z);
-triple unit(triple v);
-triple min3(frame f);
-triple min3(pen p);
-void begin(picture pic=<default>, string name, string id=<default>, bool visible=<default>);
-void drawPRCdisk(frame f, real[][] t, pen[] p, real opacity, real shininess);
-void drawPRCtube(frame f, path3 center, path3 g, pen[] p, real opacity, real shininess);
-int CLZ(int a);
-void drawPRCsphere(frame f, real[][] t, bool half=<default>, pen[] p, real opacity, real shininess, int type);
-arrowhead DefaultHead;
-void drawPRCcylinder(frame f, real[][] t, pen[] p, real opacity, real shininess);
-void beginclip(frame f, path[] g, bool stroke=<default>, pen fillrule=<default>, bool copy=<default>);
-void beginclip(picture pic=<default>, path[] g, bool stroke=<default>, pen fillrule=<default>, bool copy=<default>);
-void begingroup(frame f);
-void begingroup(picture pic=<default>);
-marker nomarker;
-pair beginpoint(path p);
-real azimuth(triple v, bool warn=<default>);
-real angle(pair z, bool warn=<default>);
-real angle(transform t);
-pair ENE;
-frame pack(pair align=<default> ... object[] inset);
+bool initialized(int a);
+bool initialized(real a);
+bool initialized(pair a);
+bool initialized(triple a);
+int operator -(int a, int b);
+int[] operator -(int a, int[] b);
+int[] operator -(int[] a, int b);
+int[] operator -(int[] a, int[] b);
+int[][] operator -(int[][] a, int[][] b);
+int operator -(int a);
+int[] operator -(int[] a);
+int[][] operator -(int[][] a);
+real operator -(real a, real b);
+real[] operator -(real a, real[] b);
+real[] operator -(real[] a, real b);
+real[] operator -(real[] a, real[] b);
+real[][] operator -(real[][] a, real[][] b);
+real operator -(real a);
+real[] operator -(real[] a);
+real[][] operator -(real[][] a);
+pair operator -(pair a, pair b);
+pair[] operator -(pair a, pair[] b);
+pair[] operator -(pair[] a, pair b);
+pair[] operator -(pair[] a, pair[] b);
+pair[][] operator -(pair[][] a, pair[][] b);
+pair operator -(pair a);
+pair[] operator -(pair[] a);
+pair[][] operator -(pair[][] a);
+triple operator -(triple a, triple b);
+triple[] operator -(triple a, triple[] b);
+triple[] operator -(triple[] a, triple b);
+triple[] operator -(triple[] a, triple[] b);
+triple[][] operator -(triple[][] a, triple[][] b);
+triple operator -(triple a);
+triple[] operator -(triple[] a);
+triple[][] operator -(triple[][] a);
 void gsave(frame f);
 void write(file file=<default>, string s=<default>, bool x, void suffix(file)=<default> ... bool[]);
 void write(file file=<default>, string s=<default>, explicit bool[] a ... bool[][]);
@@ -883,367 +1622,189 @@
 void write(file file=<default>, string s=<default>, pen[] p);
 void write(void suffix(file)=<default>);
 void write(file file, string s=<default>, explicit path[] x, void suffix(file)=<default>);
-void write(file file=<default>, Label L, void suffix(file)=<default>);
+void write(file file=<default>, align align, void suffix(file)=<default>);
 void write(file file, string s=<default>, cputime c, string format=<default>, void suffix(file)=<default>);
-void write(pairOrTriple a);
 void write(string s=<default>, bool3 b, void suffix(file)=<default>);
 void write(file file, string s=<default>, bool3 b, void suffix(file)=<default>);
+void write(pairOrTriple a);
 void write(string s=<default>, explicit guide[] x, void suffix(file)=<default>);
-void write(file file=<default>, align align, void suffix(file)=<default>);
-void save()();
-marginT EndPenMargin(path, pen);
-pair NNE;
-real[] tridiagonal(real[] a, real[] b, real[] c, real[] f);
-pen Dotted;
-pen Dotted(pen p=<default>);
-pair dir(real degrees);
-pair dir(explicit pair z);
-triple dir(explicit triple z);
-triple dir(real colatitude, real longitude);
-pair dir(path p, int t, int sign=<default>, bool normalize=<default>);
-pair dir(path p, real t, bool normalize=<default>);
-triple dir(path3 p, int t, int sign=<default>, bool normalize=<default>);
-triple dir(path3 p, real t, bool normalize=<default>);
-pair dir(path p);
-pair dir(path p, path q);
-int[][] diagonal(... int[]);
-real[][] diagonal(... real[]);
-pair[][] diagonal(... pair[]);
-real reltime(path p, real l);
-void marknodes(picture pic=<default>, frame f, path g);
-real newton(int iterations=<default>, real f(real), real fprime(real), real x, bool verbose=<default>);
-real newton(int iterations=<default>, real f(real), real fprime(real), real x1, real x2, bool verbose=<default>);
-string TeXify(string s);
-bool3 default;
-pair[] controlSpecifier(guide g, int t);
-void defaultpen(pen p);
-pen defaultpen();
-pen defaultpen;
-void defaultpen(real w);
-transform Slant(transform t);
-triple max3(frame f);
-triple max3(pen p);
-string defaultformat(int n, string trailingzero=<default>, bool fixed=<default>, bool signed=<default>);
-string defaultformat;
-pen dashdotted;
-string defaultseparator;
-string asydir();
-string defaultfilename;
-real longitude(triple v, bool warn=<default>);
-bool Blank(picture, path, pen, marginT(path, pen));
-tensionSpecifier tensionSpecifier(guide g, int t);
-marker marker(frame f=<default>, void markroutine(picture pic=<default>, frame f, path g)=<default>, bool above=<default>);
-marker marker(path[] g, void markroutine(picture pic=<default>, frame f, path g)=<default>, pen p=<default>, filltype filltype=<default>, bool above=<default>);
-int Move;
-string location();
-string locatefile(string file);
-pen dotted;
-string blend(pen p);
-arrowhead HookHead;
-arrowhead HookHead(real dir=<default>, real barb=<default>);
-picture[] concat(... picture[][]);
-real[] concat(... real[][]);
-Legend[] concat(... Legend[][]);
-pair[] concat(... pair[][]);
-coord[] concat(... coord[][]);
-pen[] concat(... pen[][]);
-coord[] concat(... coord[][]);
-object[] concat(... object[][]);
-path[] concat(... path[][]);
-Label[] concat(... Label[][]);
-int[] concat(... int[][]);
-void()()[] concat(... void()()[][]);
-bool3[] concat(... bool3[][]);
-string[] concat(... string[][]);
-marker[] concat(... marker[][]);
-triple[] concat(... triple[][]);
-frame[] concat(... frame[][]);
-guide[] concat(... guide[][]);
-bool[] concat(... bool[][]);
-int OR(int a, int b);
-real log1p(real x);
-real[] log1p(real[] a);
-real infinity;
-bool alias(pair[][] a, pair[][] b);
-bool alias(guide[] a, guide[] b);
-bool alias(marginT a, marginT b);
-bool alias(light a, light b);
-bool alias(side a, side b);
-bool alias(marker a, marker b);
-bool alias(Label[] a, Label[] b);
-bool alias(pair[] a, pair[] b);
-bool alias(coord a, coord b);
-bool alias(bounds a, bounds b);
-bool alias(autoscaleT a, autoscaleT b);
-bool alias(pairOrTriple a, pairOrTriple b);
-bool alias(object a, object b);
-bool alias(cputime a, cputime b);
-bool alias(int[] a, int[] b);
-bool alias(string[][] a, string[][] b);
-bool alias(slice a, slice b);
-bool alias(coord[] a, coord[] b);
-bool alias(coords2 a, coords2 b);
-bool alias(picture a, picture b);
-bool alias(framedTransformStack a, framedTransformStack b);
-bool alias(real[][] a, real[][] b);
-bool alias(bool3 a, bool3 b);
-bool alias(bool3[] a, bool3[] b);
-bool alias(coords3 a, coords3 b);
-bool alias(position a, position b);
-bool alias(arrowhead a, arrowhead b);
-bool alias(string[] a, string[] b);
-bool alias(frame[] a, frame[] b);
-bool alias(scaling a, scaling b);
-bool alias(coord a, coord b);
-bool alias(ScaleT a, ScaleT b);
-bool alias(picture[] a, picture[] b);
-bool alias(bool[] a, bool[] b);
-bool alias(void()()[] a, void()()[] b);
-bool alias(pen[][] a, pen[][] b);
-bool alias(filltype a, filltype b);
-bool alias(coord[] a, coord[] b);
-bool alias(freezableBounds a, freezableBounds b);
-bool alias(projection a, projection b);
-bool alias(align a, align b);
-bool alias(object[] a, object[] b);
-bool alias(path[] a, path[] b);
-bool alias(triple[] a, triple[] b);
-bool alias(transformation a, transformation b);
-bool alias(scaleT a, scaleT b);
-bool alias(Label a, Label b);
-bool alias(marker[] a, marker[] b);
-bool alias(processtime a, processtime b);
-bool alias(real[] a, real[] b);
-bool alias(pen[] a, pen[] b);
-bool alias(hsv a, hsv b);
-bool alias(coords2 a, coords2 b);
-bool alias(scaling a, scaling b);
-bool alias(Legend a, Legend b);
-bool alias(indexedTransform a, indexedTransform b);
-bool alias(Legend[] a, Legend[] b);
-real pi;
-int getint(string name=<default>, int default=<default>, string prompt=<default>, bool store=<default>);
-bool IgnoreAspect;
-void postscript(frame f, string s);
-void postscript(frame f, string s, pair min, pair max);
-void postscript(picture pic=<default>, string s, pair min, pair max);
-void postscript(picture pic=<default>, string s);
-transform slant(real s);
-void breakpoint(code s=<default>);
-void breakpoints();
-void endgroup(frame f);
-void endgroup(picture pic=<default>);
-void endgroup3(frame f);
-int Floor(real x);
-pair gamma(explicit pair z);
-real gamma(real x);
-real pow10(real x);
-real[] pow10(real[] a);
-real[][] AtA(real[][] a);
-real bp;
-int[] sort(int[] a);
-int[][] sort(int[][] a);
-real[] sort(real[] a);
-real[][] sort(real[][] a);
-string[] sort(string[] a);
-string[][] sort(string[][] a);
-path[] sort(path[] a, bool less(path, path));
-picture[] sort(picture[] a, bool less(picture, picture));
-pair[] sort(pair[] a, bool less(pair, pair));
-void()()[] sort(void()()[] a, bool less(void()(), void()()));
-real[] sort(real[] a, bool less(real, real));
-bool[] sort(bool[] a, bool less(bool, bool));
-Legend[] sort(Legend[] a, bool less(Legend, Legend));
-coord[] sort(coord[] a, bool less(coord, coord));
-pen[] sort(pen[] a, bool less(pen, pen));
-pen[][] sort(pen[][] a, bool less(pen[], pen[]));
-coord[] sort(coord[] a, bool less(coord, coord));
-object[] sort(object[] a, bool less(object, object));
-guide[] sort(guide[] a, bool less(guide, guide));
-real[][] sort(real[][] a, bool less(real[], real[]));
-triple[] sort(triple[] a, bool less(triple, triple));
-Label[] sort(Label[] a, bool less(Label, Label));
-string[] sort(string[] a, bool less(string, string));
-int[] sort(int[] a, bool less(int, int));
-string[][] sort(string[][] a, bool less(string[], string[]));
-bool3[] sort(bool3[] a, bool less(bool3, bool3));
-pair[][] sort(pair[][] a, bool less(pair[], pair[]));
-marker[] sort(marker[] a, bool less(marker, marker));
-frame[] sort(frame[] a, bool less(frame, frame));
-pen salmon;
-bool ignore;
-pen Pentype(int n);
-pen chartreuse;
-void latticeshade(frame f, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[][] p, transform t=<default>, bool copy=<default>);
-void latticeshade(picture pic=<default>, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[][] p, bool copy=<default>);
-pair[] pairs(real[] x, real[] y);
-void eval(code s, bool embedded=<default>);
-void eval(string s, bool embedded=<default>);
-bool Arrow(picture, path, pen, marginT(path, pen))(arrowhead arrowhead=<default>, real size=<default>, real angle=<default>, filltype filltype=<default>, position position=<default>);
-bool Arrow(picture, path, pen, marginT(path, pen));
-bool Arrows(picture, path, pen, marginT(path, pen))(arrowhead arrowhead=<default>, real size=<default>, real angle=<default>, filltype filltype=<default>);
-bool Arrows(picture, path, pen, marginT(path, pen));
-int tell(file f);
-pen Yellow;
-pair up;
-guide reverse(guide g);
-string reverse(string s);
-path reverse(path p);
-path3 reverse(path3 p);
-triple[] reverse(triple[] a);
-int[] reverse(int[] a);
-real[] reverse(real[] a);
-int[] reverse(int n);
-string[] reverse(string[] a);
-pair[] reverse(pair[] a);
-bool[] reverse(bool[] a);
-void _labelpath(frame f, string s, string size, path g, string justify, pair offset, pen p);
-int floor(real x);
-void resetdefaultpen();
-real aSin(real x);
-pen darkred;
-transform Scale(transform t);
-pen mean(pen[] p, real opacity(real[])=<default>);
-pen[] mean(pen[][] palette, real opacity(real[])=<default>);
-string mktemp(string s);
-void sleep(int seconds);
-void arrow(picture pic=<default>, Label L=<default>, pair b, pair dir, real length=<default>, align align=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>);
-picture arrow(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 unitsize(picture pic=<default>, real x, real y=<default>, real z=<default>);
-picture arrow2(arrowhead arrowhead=<default>, path g, pen p=<default>, real size=<default>, real angle=<default>, filltype filltype=<default>, marginT margin(path, pen)=<default>);
-path unitsquare;
-real arrowdir;
-real arrowbarb;
-pen yellow;
-int delete(string s);
-pen miterjoin;
-arrowhead SimpleHead;
-real arrowangle;
-real arrowlength;
-pen miterlimit(real x);
-real miterlimit(pen p=<default>);
-real arrowfactor;
-real arrowsize(pen p=<default>);
-real Tan(real deg);
-real arrowsizelimit;
-real arrow2sizelimit;
-real arrowhookfactor;
-real arrowtexfactor;
-void comma(file file);
-void deletepreamble();
-real[] arrowbasepoints(path base, path left, path right, real default=<default>);
-path arrowbase(path r, pair y, real t, real size);
-int choose(int n, int k);
-real hypot(real x, real y);
-path[] _strokepath(path g, pen p=<default>);
-void pause(string w=<default>);
-int ocgindex;
-pen springgreen;
-pen brown;
-bool scale(pen p);
-transform scale(real x);
-transform scale(real x, real y);
-real[][] scale(real x, real y, real z);
-scaleT scaleT(real T(real x), real Tinv(real x), bool logarithmic=<default>, bool automin=<default>, bool automax=<default>);
-string baseline(string s, string template=<default>);
-real[][] scale3(real s);
-int AND(int a, int b);
-real polar(triple v, bool warn=<default>);
-real radius(path p, real t);
-real radius(path3 p, real t);
-real radius(triple z0, triple c0, triple c1, triple z1, real t);
-transform scaleless(transform t);
-void makedraw(frame f, path g, pen p, int depth=<default>);
-real nan;
-pair down;
-path arc(pair c, real r, real angle1, real angle2);
-path arc(pair c, explicit pair z1, explicit pair z2, bool direction=<default>);
-path arc(pair c, real r, real angle1, real angle2, bool direction);
-real[] cubicroots(real a, real b, real c, real d);
-pen green;
-real tan(real x);
-real[] tan(real[] a);
-pen longdashed;
-pair point(guide g, int t);
-pair point(path p, int t);
-pair point(path p, real t);
-triple point(path3 p, int t);
-triple point(path3 p, real t);
-pair point(picture pic=<default>, pair dir, bool user=<default>);
-pair point(object F, pair dir, transform t=<default>);
-pair point(frame f, pair dir);
-void progress(bool3 init=<default>);
-pen longdashdotted;
-void usepackage(string s, string options=<default>);
-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);
-int fillrule(pen p);
-pair ESE;
-pair project(triple v, real[][] t);
-bool prc(string format=<default>);
-projection projection(triple camera, triple up=<default>, triple target=<default>, triple normal=<default>, real zoom=<default>, real angle=<default>, pair viewportshift=<default>, bool showtarget=<default>, bool autoadjust=<default>, bool center=<default>, transformation projector(triple camera, triple up, triple target));
-void endl(file file);
-marginT TrueMargin(path, pen)(real begin, real end);
-pair bezier(pair a, pair b, pair c, pair d, real t);
-triple bezier(triple a, triple b, triple c, triple d, real t);
-pair SSE;
-pair bezierP(pair a, pair b, pair c, pair d, real t);
-triple bezierP(triple a, triple b, triple c, triple d, real t);
-pair bezierPP(pair a, pair b, pair c, pair d, real t);
-triple bezierPP(triple a, triple b, triple c, triple d, real t);
-real[] _projection();
-pair bezierPPP(pair a, pair b, pair c, pair d);
-triple bezierPPP(triple a, triple b, triple c, triple d);
-real Jn(int n, real x);
-void initXasyMode();
-int randMax;
-path nurb(pair z0, pair z1, pair z2, pair z3, real w0, real w1, real w2, real w3, int m);
-align NoAlign;
-bool EndBar(picture, path, pen, marginT(path, pen));
-bool EndBar(picture, path, pen, marginT(path, pen))(real size=<default>);
-Legend Legend(string label, pen plabel=<default>, pen p=<default>, frame mark=<default>, bool above=<default>);
-real Yn(int n, real x);
-int NOT(int a);
-pen[] monoPen;
-bool CW;
-bool all(bool[] a);
-real atanh(real x);
-real[] atanh(real[] a);
-frame UpsideDown(frame f);
-pair realmult(pair z, pair w);
-triple realmult(triple u, triple v);
-real acosh(real x);
-real[] acosh(real[] a);
-real realEpsilon;
-pair NW;
-real norm(real[] a);
-real norm(real[][] a);
-real norm(triple[][] a);
-int length(guide g);
-int length(string s);
-real length(pair z);
-real length(triple v);
-int length(path p);
-int length(path3 p);
-pair SW;
-void flush(file f);
-pen thin();
-pen palecyan;
-void warning(string s, string t, bool position=<default>);
-frame legend(picture pic=<default>, int perline=<default>, real xmargin=<default>, real ymargin=<default>, real linelength=<default>, real hskip=<default>, real vskip=<default>, real maxwidth=<default>, real maxheight=<default>, bool hstretch=<default>, bool vstretch=<default>, pen p=<default>);
-picture legend(Legend[] Legend, int perline=<default>, real linelength, real hskip, real vskip, real maxwidth=<default>, real maxheight=<default>, bool hstretch=<default>, bool vstretch=<default>);
-real Degrees(real radians);
-picture legenditem(Legend legenditem, real linelength);
-real legendhskip;
-real legendvskip;
-pen darkmagenta;
-real change2(triple[][] a);
-real legendmargin;
-bool None(picture, path, pen, marginT(path, pen));
-real dotfactor;
-real legendlinelength;
-bool diagnostics;
+void write(file file=<default>, Label L, void suffix(file)=<default>);
+bool operator !=(bool a, bool b);
+bool[] operator !=(bool a, bool[] b);
+bool[] operator !=(bool[] a, bool b);
+bool[] operator !=(bool[] a, bool[] b);
+bool operator !=(bool[][] a, bool[][] b);
+bool operator !=(int a, int b);
+bool[] operator !=(int a, int[] b);
+bool[] operator !=(int[] a, int b);
+bool[] operator !=(int[] a, int[] b);
+bool operator !=(int[][] a, int[][] b);
+bool operator !=(real a, real b);
+bool[] operator !=(real a, real[] b);
+bool[] operator !=(real[] a, real b);
+bool[] operator !=(real[] a, real[] b);
+bool operator !=(real[][] a, real[][] b);
+bool operator !=(pair a, pair b);
+bool[] operator !=(pair a, pair[] b);
+bool[] operator !=(pair[] a, pair b);
+bool[] operator !=(pair[] a, pair[] b);
+bool operator !=(pair[][] a, pair[][] b);
+bool operator !=(triple a, triple b);
+bool[] operator !=(triple a, triple[] b);
+bool[] operator !=(triple[] a, triple b);
+bool[] operator !=(triple[] a, triple[] b);
+bool operator !=(triple[][] a, triple[][] b);
+bool operator !=(string a, string b);
+bool[] operator !=(string a, string[] b);
+bool[] operator !=(string[] a, string b);
+bool[] operator !=(string[] a, string[] b);
+bool operator !=(string[][] a, string[][] b);
+bool[] operator !=(pen[] a, pen[] b);
+bool operator !=(pen a, pen b);
+bool operator !=(transform a, transform b);
+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 !=(pairOrTriple a, pairOrTriple b);
+bool operator !=(scaling a, scaling b);
+bool operator !=(scaling a, scaling b);
+bool operator !=(bounds a, bounds b);
+bool operator !=(light a, light b);
+bool operator !=(align a, align b);
+bool operator !=(filltype a, filltype b);
+bool operator !=(ScaleT a, ScaleT b);
+bool operator !=(Label a, Label b);
+bool operator !=(processtime a, processtime b);
+bool operator !=(projection a, projection b);
+bool operator !=(picture a, picture b);
+bool operator !=(indexedTransform a, indexedTransform b);
+bool operator !=(hsv a, hsv b);
+bool operator !=(coords2 a, coords2 b);
+bool operator !=(coords2 a, coords2 b);
+bool operator !=(transformation a, transformation b);
+bool operator !=(side a, side b);
+bool operator !=(marker a, marker b);
+bool operator !=(bool3 a, bool b);
+bool operator !=(marginT a, marginT b);
+bool operator !=(Legend a, Legend b);
+bool operator !=(object a, object b);
+bool operator !=(cputime a, cputime b);
+bool operator !=(coord a, coord b);
+bool operator !=(coord a, coord b);
+bool operator !=(coords3 a, coords3 b);
+bool operator !=(framedTransformStack a, framedTransformStack b);
+bool operator !=(bool a, bool3 b);
+bool operator !=(slice a, slice b);
+bool operator !=(freezableBounds a, freezableBounds b);
+bool operator !=(scaleT a, scaleT b);
+bool operator !=(autoscaleT a, autoscaleT b);
+bool operator !=(position a, position b);
+bool operator !=(arrowhead a, arrowhead b);
+bool operator ==(bool a, bool b);
+bool[] operator ==(bool a, bool[] b);
+bool[] operator ==(bool[] a, bool b);
+bool[] operator ==(bool[] a, bool[] b);
+bool operator ==(bool[][] a, bool[][] b);
+bool operator ==(int a, int b);
+bool[] operator ==(int a, int[] b);
+bool[] operator ==(int[] a, int b);
+bool[] operator ==(int[] a, int[] b);
+bool operator ==(int[][] a, int[][] b);
+bool operator ==(real a, real b);
+bool[] operator ==(real a, real[] b);
+bool[] operator ==(real[] a, real b);
+bool[] operator ==(real[] a, real[] b);
+bool operator ==(real[][] a, real[][] b);
+bool operator ==(pair a, pair b);
+bool[] operator ==(pair a, pair[] b);
+bool[] operator ==(pair[] a, pair b);
+bool[] operator ==(pair[] a, pair[] b);
+bool operator ==(pair[][] a, pair[][] b);
+bool operator ==(triple a, triple b);
+bool[] operator ==(triple a, triple[] b);
+bool[] operator ==(triple[] a, triple b);
+bool[] operator ==(triple[] a, triple[] b);
+bool operator ==(triple[][] a, triple[][] b);
+bool operator ==(string a, string b);
+bool[] operator ==(string a, string[] b);
+bool[] operator ==(string[] a, string b);
+bool[] operator ==(string[] a, string[] b);
+bool operator ==(string[][] a, string[][] b);
+bool[] operator ==(pen[] a, pen[] b);
+bool operator ==(pen a, pen b);
+bool operator ==(transform a, transform b);
+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 ==(pairOrTriple a, pairOrTriple b);
+bool operator ==(scaling a, scaling b);
+bool operator ==(scaling a, scaling b);
+bool operator ==(bounds a, bounds b);
+bool operator ==(light a, light b);
+bool operator ==(align a, align b);
+bool operator ==(filltype a, filltype b);
+bool operator ==(ScaleT a, ScaleT b);
+bool operator ==(Label a, Label b);
+bool operator ==(processtime a, processtime b);
+bool operator ==(projection a, projection b);
+bool operator ==(picture a, picture b);
+bool operator ==(indexedTransform a, indexedTransform b);
+bool operator ==(hsv a, hsv b);
+bool operator ==(coords2 a, coords2 b);
+bool operator ==(coords2 a, coords2 b);
+bool operator ==(transformation a, transformation b);
+bool operator ==(side a, side b);
+bool operator ==(marker a, marker b);
+bool operator ==(bool3 a, bool b);
+bool operator ==(marginT a, marginT b);
+bool operator ==(Legend a, Legend b);
+bool operator ==(object a, object b);
+bool operator ==(cputime a, cputime b);
+bool operator ==(coord a, coord b);
+bool operator ==(coord a, coord b);
+bool operator ==(coords3 a, coords3 b);
+bool operator ==(framedTransformStack a, framedTransformStack b);
+bool operator ==(bool a, bool3 b);
+bool operator ==(slice a, slice b);
+bool operator ==(freezableBounds a, freezableBounds b);
+bool operator ==(scaleT a, scaleT b);
+bool operator ==(autoscaleT a, autoscaleT b);
+bool operator ==(position a, position b);
+bool operator ==(arrowhead a, arrowhead b);
+bool operator ^(bool a, bool b);
+bool[] operator ^(bool a, bool[] b);
+bool[] operator ^(bool[] a, bool b);
+bool[] operator ^(bool[] a, bool[] b);
+int operator ^(int a, int b);
+int[] operator ^(int a, int[] b);
+int[] operator ^(int[] a, int b);
+int[] operator ^(int[] a, int[] b);
+real operator ^(real a, real b);
+real[] operator ^(real a, real[] b);
+real[] operator ^(real[] a, real b);
+real[] operator ^(real[] a, real[] b);
+pair operator ^(pair a, pair b);
+pair[] operator ^(pair a, pair[] b);
+pair[] operator ^(pair[] a, pair b);
+pair[] operator ^(pair[] a, pair[] b);
+transform operator ^(transform t, int n);
+real operator ^(real x, int y);
+pair operator ^(pair z, int y);
+bool operator |(bool a, bool b);
+bool[] operator |(bool a, bool[] b);
+bool[] operator |(bool[] a, bool b);
+bool[] operator |(bool[] a, bool[] b);
+pen NewCenturySchoolBook(string series=<default>, string shape=<default>);
+void()()[] saveFunctions;
+bool operator &(bool a, bool b);
+bool[] operator &(bool a, bool[] b);
+bool[] operator &(bool[] a, bool b);
+bool[] operator &(bool[] a, bool[] b);
+path operator &(path p, path q);
+path3 operator &(path3 p, path3 q);
+path operator &(path p, cycleToken tok);
 string minipage(string s, real width=<default>);
 real legendmaxrelativewidth;
 real cross(explicit pair z, explicit pair w);
@@ -1285,132 +1846,6 @@
 pen operator +(real w, pen p);
 marginT operator +(path, pen)(marginT ma(path, pen), marginT mb(path, pen));
 pen[] operator +(pen[] a, pen b);
-int operator -(int a, int b);
-int[] operator -(int a, int[] b);
-int[] operator -(int[] a, int b);
-int[] operator -(int[] a, int[] b);
-int[][] operator -(int[][] a, int[][] b);
-int operator -(int a);
-int[] operator -(int[] a);
-int[][] operator -(int[][] a);
-real operator -(real a, real b);
-real[] operator -(real a, real[] b);
-real[] operator -(real[] a, real b);
-real[] operator -(real[] a, real[] b);
-real[][] operator -(real[][] a, real[][] b);
-real operator -(real a);
-real[] operator -(real[] a);
-real[][] operator -(real[][] a);
-pair operator -(pair a, pair b);
-pair[] operator -(pair a, pair[] b);
-pair[] operator -(pair[] a, pair b);
-pair[] operator -(pair[] a, pair[] b);
-pair[][] operator -(pair[][] a, pair[][] b);
-pair operator -(pair a);
-pair[] operator -(pair[] a);
-pair[][] operator -(pair[][] a);
-triple operator -(triple a, triple b);
-triple[] operator -(triple a, triple[] b);
-triple[] operator -(triple[] a, triple b);
-triple[] operator -(triple[] a, triple[] b);
-triple[][] operator -(triple[][] a, triple[][] b);
-triple operator -(triple a);
-triple[] operator -(triple[] a);
-triple[][] operator -(triple[][] a);
-int operator *(int a, int b);
-int[] operator *(int a, int[] b);
-int[] operator *(int[] a, int b);
-int[] operator *(int[] a, int[] b);
-int[][] operator *(int a, int[][] b);
-int[][] operator *(int[][] a, int b);
-real operator *(real a, real b);
-real[] operator *(real a, real[] b);
-real[] operator *(real[] a, real b);
-real[] operator *(real[] a, real[] b);
-real[][] operator *(real a, real[][] b);
-real[][] operator *(real[][] a, real b);
-pair operator *(pair a, pair b);
-pair[] operator *(pair a, pair[] b);
-pair[] operator *(pair[] a, pair b);
-pair[] operator *(pair[] a, pair[] b);
-pair[][] operator *(pair a, pair[][] b);
-pair[][] operator *(pair[][] a, pair b);
-triple[] operator *(real a, triple[] b);
-triple[][] operator *(real a, triple[][] b);
-triple[] operator *(triple[] a, real b);
-triple[][] operator *(triple[][] a, real b);
-pen operator *(real a, pen b);
-pen operator *(pen a, real b);
-transform operator *(transform a, transform b);
-pair operator *(transform t, pair z);
-path operator *(transform t, path g);
-pen operator *(transform t, pen p);
-frame operator *(transform t, frame f);
-frame operator *(real[][] t, frame f);
-real[] operator *(real[][] a, real[] b);
-real[] operator *(real[] a, real[][] b);
-int[][] operator *(int[][] a, int[][] b);
-real[][] operator *(real[][] a, real[][] b);
-pair[][] operator *(pair[][] a, pair[][] b);
-triple operator *(real[][] t, triple v);
-triple operator *(real x, triple v);
-triple operator *(triple v, real x);
-path3 operator *(real[][] t, path3 g);
-picture operator *(transform t, picture orig);
-side operator *(real x, side s);
-Label operator *(real[][] t, Label L);
-path[] operator *(transform t, explicit path[] p);
-bounds operator *(transform t, bounds b);
-object operator *(transform t, explicit object F);
-pair[] operator *(transform t, pair[] z);
-Label operator *(transform t, Label L);
-picture operator *(real[][] t, picture orig);
-bool operator init();
-int operator init();
-real operator init();
-string operator init();
-pair operator init();
-triple operator init();
-transform operator init();
-guide operator init();
-path operator init();
-path3 operator init();
-pen operator init();
-frame operator init();
-file operator init();
-marginT operator init();
-light operator init();
-side operator init();
-marker operator init();
-filltype operator init();
-projection operator init();
-align operator init();
-slice operator init();
-coords2 operator init();
-picture operator init();
-framedTransformStack operator init();
-hsv operator init();
-coords2 operator init();
-scaling operator init();
-Legend operator init();
-indexedTransform operator init();
-scaling operator init();
-coord operator init();
-ScaleT operator init();
-coord operator init();
-bounds operator init();
-autoscaleT operator init();
-pairOrTriple operator init();
-object operator init();
-cputime operator init();
-transformation operator init();
-scaleT operator init();
-Label operator init();
-processtime operator init();
-bool3 operator init();
-coords3 operator init();
-position operator init();
-arrowhead operator init();
 real operator cast(int);
 pair operator cast(int);
 pair operator cast(real);
@@ -1452,33 +1887,33 @@
 guide operator cast(cycleToken tok);
 guide operator cast(curlSpecifier spec);
 guide operator cast(tensionSpecifier t);
+align operator cast(side side);
 guide[] operator cast(path[] g);
-position operator cast(real x);
 hsv operator cast(pen p);
-Label operator cast(string s);
-pair operator cast(pairOrTriple a);
-triple operator cast(pairOrTriple a);
-frame operator cast(object F);
+align operator cast(triple dir);
 bool3[] operator cast(bool[] b);
-align operator cast(side side);
-position operator cast(pair x);
+object operator cast(Label L);
+Label operator cast(object F);
+position operator cast(int x);
+object operator cast(string s);
 guide[] operator cast(pair[] z);
 path[] operator cast(guide[] g);
 bool operator cast(bool3 b);
-pair operator cast(position P);
-object operator cast(frame f);
+pair operator cast(pairOrTriple a);
+triple operator cast(pairOrTriple a);
+position operator cast(real x);
+Label operator cast(string s);
 path[] operator cast(guide g);
-object operator cast(Label L);
-Label operator cast(object F);
-align operator cast(pair dir);
+frame operator cast(object F);
 path[] operator cast(pair[] z);
 path[] operator cast(path p);
 bool[] operator cast(bool3[] b);
-align operator cast(triple dir);
+position operator cast(pair x);
+pair operator cast(position P);
 bool3 operator cast(bool b);
+object operator cast(frame f);
 pen operator cast(hsv hsv);
-position operator cast(int x);
-object operator cast(string s);
+align operator cast(pair dir);
 pen deepred;
 bool error(file f);
 string operator ecast(int);
@@ -1493,509 +1928,81 @@
 int[] operator ecast(real[]);
 real[] operator ecast(string[] a);
 int[] operator ecast(string[] a);
-pair operator tuple(real x, real y);
-triple operator tuple(real x, real y, real z);
-transform operator tuple(real x, real y, real xx, real xy, real yx, real yy);
-real operator /(real a, real b);
-real[] operator /(real a, real[] b);
-real[] operator /(real[] a, real b);
-real[] operator /(real[] a, real[] b);
-real[][] operator /(real[][] a, real b);
-pair operator /(pair a, pair b);
-pair[] operator /(pair a, pair[] b);
-pair[] operator /(pair[] a, pair b);
-pair[] operator /(pair[] a, pair[] b);
-pair[][] operator /(pair[][] a, pair b);
-triple[] operator /(triple[] a, real b);
-real operator /(int a, int b);
-real[] operator /(int[] a, int b);
-real[] operator /(int a, int[] b);
-real[] operator /(int[] a, int[] b);
-triple operator /(triple v, real x);
-path[] texpath(string s, pen p, bool tex=<default>, bool bbox=<default>);
-path[] texpath(Label L, bool tex=<default>, bool bbox=<default>);
-bool uptodate();
-int operator #(int a, int b);
-int[] operator #(int a, int[] b);
-int[] operator #(int[] a, int b);
-int[] operator #(int[] a, int[] b);
-int operator %(int a, int b);
-int[] operator %(int a, int[] b);
-int[] operator %(int[] a, int b);
-int[] operator %(int[] a, int[] b);
-real operator %(real a, real b);
-real[] operator %(real a, real[] b);
-real[] operator %(real[] a, real b);
-real[] operator %(real[] a, real[] b);
-bool operator ^(bool a, bool b);
-bool[] operator ^(bool a, bool[] b);
-bool[] operator ^(bool[] a, bool b);
-bool[] operator ^(bool[] a, bool[] b);
-int operator ^(int a, int b);
-int[] operator ^(int a, int[] b);
-int[] operator ^(int[] a, int b);
-int[] operator ^(int[] a, int[] b);
-real operator ^(real a, real b);
-real[] operator ^(real a, real[] b);
-real[] operator ^(real[] a, real b);
-real[] operator ^(real[] a, real[] b);
-pair operator ^(pair a, pair b);
-pair[] operator ^(pair a, pair[] b);
-pair[] operator ^(pair[] a, pair b);
-pair[] operator ^(pair[] a, pair[] b);
-transform operator ^(transform t, int n);
-real operator ^(real x, int y);
-pair operator ^(pair z, int y);
-bool operator ==(bool a, bool b);
-bool[] operator ==(bool a, bool[] b);
-bool[] operator ==(bool[] a, bool b);
-bool[] operator ==(bool[] a, bool[] b);
-bool operator ==(bool[][] a, bool[][] b);
-bool operator ==(int a, int b);
-bool[] operator ==(int a, int[] b);
-bool[] operator ==(int[] a, int b);
-bool[] operator ==(int[] a, int[] b);
-bool operator ==(int[][] a, int[][] b);
-bool operator ==(real a, real b);
-bool[] operator ==(real a, real[] b);
-bool[] operator ==(real[] a, real b);
-bool[] operator ==(real[] a, real[] b);
-bool operator ==(real[][] a, real[][] b);
-bool operator ==(pair a, pair b);
-bool[] operator ==(pair a, pair[] b);
-bool[] operator ==(pair[] a, pair b);
-bool[] operator ==(pair[] a, pair[] b);
-bool operator ==(pair[][] a, pair[][] b);
-bool operator ==(triple a, triple b);
-bool[] operator ==(triple a, triple[] b);
-bool[] operator ==(triple[] a, triple b);
-bool[] operator ==(triple[] a, triple[] b);
-bool operator ==(triple[][] a, triple[][] b);
-bool operator ==(string a, string b);
-bool[] operator ==(string a, string[] b);
-bool[] operator ==(string[] a, string b);
-bool[] operator ==(string[] a, string[] b);
-bool operator ==(string[][] a, string[][] b);
-bool[] operator ==(pen[] a, pen[] b);
-bool operator ==(pen a, pen b);
-bool operator ==(transform a, transform b);
-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 ==(coords3 a, coords3 b);
-bool operator ==(position a, position b);
-bool operator ==(arrowhead a, arrowhead b);
-bool operator ==(scaling a, scaling b);
-bool operator ==(coord a, coord b);
-bool operator ==(ScaleT a, ScaleT b);
-bool operator ==(filltype a, filltype b);
-bool operator ==(freezableBounds a, freezableBounds b);
-bool operator ==(projection a, projection b);
-bool operator ==(align a, align b);
-bool operator ==(transformation a, transformation b);
-bool operator ==(scaleT a, scaleT b);
-bool operator ==(Label a, Label b);
-bool operator ==(processtime a, processtime b);
-bool operator ==(hsv a, hsv b);
-bool operator ==(coords2 a, coords2 b);
-bool operator ==(scaling a, scaling b);
-bool operator ==(Legend a, Legend b);
-bool operator ==(indexedTransform a, indexedTransform b);
-bool operator ==(bool3 a, bool b);
-bool operator ==(marginT a, marginT b);
-bool operator ==(light a, light b);
-bool operator ==(side a, side b);
-bool operator ==(marker a, marker b);
-bool operator ==(coord a, coord b);
-bool operator ==(bounds a, bounds b);
-bool operator ==(autoscaleT a, autoscaleT b);
-bool operator ==(pairOrTriple a, pairOrTriple b);
-bool operator ==(object a, object b);
-bool operator ==(cputime a, cputime b);
-bool operator ==(bool a, bool3 b);
-bool operator ==(slice a, slice b);
-bool operator ==(coords2 a, coords2 b);
-bool operator ==(picture a, picture b);
-bool operator ==(framedTransformStack a, framedTransformStack b);
-bool operator !=(bool a, bool b);
-bool[] operator !=(bool a, bool[] b);
-bool[] operator !=(bool[] a, bool b);
-bool[] operator !=(bool[] a, bool[] b);
-bool operator !=(bool[][] a, bool[][] b);
-bool operator !=(int a, int b);
-bool[] operator !=(int a, int[] b);
-bool[] operator !=(int[] a, int b);
-bool[] operator !=(int[] a, int[] b);
-bool operator !=(int[][] a, int[][] b);
-bool operator !=(real a, real b);
-bool[] operator !=(real a, real[] b);
-bool[] operator !=(real[] a, real b);
-bool[] operator !=(real[] a, real[] b);
-bool operator !=(real[][] a, real[][] b);
-bool operator !=(pair a, pair b);
-bool[] operator !=(pair a, pair[] b);
-bool[] operator !=(pair[] a, pair b);
-bool[] operator !=(pair[] a, pair[] b);
-bool operator !=(pair[][] a, pair[][] b);
-bool operator !=(triple a, triple b);
-bool[] operator !=(triple a, triple[] b);
-bool[] operator !=(triple[] a, triple b);
-bool[] operator !=(triple[] a, triple[] b);
-bool operator !=(triple[][] a, triple[][] b);
-bool operator !=(string a, string b);
-bool[] operator !=(string a, string[] b);
-bool[] operator !=(string[] a, string b);
-bool[] operator !=(string[] a, string[] b);
-bool operator !=(string[][] a, string[][] b);
-bool[] operator !=(pen[] a, pen[] b);
-bool operator !=(pen a, pen b);
-bool operator !=(transform a, transform b);
-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 !=(coords3 a, coords3 b);
-bool operator !=(position a, position b);
-bool operator !=(arrowhead a, arrowhead b);
-bool operator !=(scaling a, scaling b);
-bool operator !=(coord a, coord b);
-bool operator !=(ScaleT a, ScaleT b);
-bool operator !=(filltype a, filltype b);
-bool operator !=(freezableBounds a, freezableBounds b);
-bool operator !=(projection a, projection b);
-bool operator !=(align a, align b);
-bool operator !=(transformation a, transformation b);
-bool operator !=(scaleT a, scaleT b);
-bool operator !=(Label a, Label b);
-bool operator !=(processtime a, processtime b);
-bool operator !=(hsv a, hsv b);
-bool operator !=(coords2 a, coords2 b);
-bool operator !=(scaling a, scaling b);
-bool operator !=(Legend a, Legend b);
-bool operator !=(indexedTransform a, indexedTransform b);
-bool operator !=(bool3 a, bool b);
-bool operator !=(marginT a, marginT b);
-bool operator !=(light a, light b);
-bool operator !=(side a, side b);
-bool operator !=(marker a, marker b);
-bool operator !=(coord a, coord b);
-bool operator !=(bounds a, bounds b);
-bool operator !=(autoscaleT a, autoscaleT b);
-bool operator !=(pairOrTriple a, pairOrTriple b);
-bool operator !=(object a, object b);
-bool operator !=(cputime a, cputime b);
-bool operator !=(bool a, bool3 b);
-bool operator !=(slice a, slice b);
-bool operator !=(coords2 a, coords2 b);
-bool operator !=(picture a, picture b);
-bool operator !=(framedTransformStack a, framedTransformStack b);
-bool operator <(int a, int b);
-bool[] operator <(int a, int[] b);
-bool[] operator <(int[] a, int b);
-bool[] operator <(int[] a, int[] b);
-bool operator <(real a, real b);
-bool[] operator <(real a, real[] b);
-bool[] operator <(real[] a, real b);
-bool[] operator <(real[] a, real[] b);
-bool operator <(string a, string b);
-bool[] operator <(string a, string[] b);
-bool[] operator <(string[] a, string b);
-bool[] operator <(string[] a, string[] b);
-bool operator <=(int a, int b);
-bool[] operator <=(int a, int[] b);
-bool[] operator <=(int[] a, int b);
-bool[] operator <=(int[] a, int[] b);
-bool operator <=(real a, real b);
-bool[] operator <=(real a, real[] b);
-bool[] operator <=(real[] a, real b);
-bool[] operator <=(real[] a, real[] b);
-bool operator <=(string a, string b);
-bool[] operator <=(string a, string[] b);
-bool[] operator <=(string[] a, string b);
-bool[] operator <=(string[] a, string[] b);
-bool operator <=(coord a, coord b);
-bool operator <=(coord a, coord b);
-void srand(int seed);
-bool operator >(int a, int b);
-bool[] operator >(int a, int[] b);
-bool[] operator >(int[] a, int b);
-bool[] operator >(int[] a, int[] b);
-bool operator >(real a, real b);
-bool[] operator >(real a, real[] b);
-bool[] operator >(real[] a, real b);
-bool[] operator >(real[] a, real[] b);
-bool operator >(string a, string b);
-bool[] operator >(string a, string[] b);
-bool[] operator >(string[] a, string b);
-bool[] operator >(string[] a, string[] b);
-bool operator >=(int a, int b);
-bool[] operator >=(int a, int[] b);
-bool[] operator >=(int[] a, int b);
-bool[] operator >=(int[] a, int[] b);
-bool operator >=(real a, real b);
-bool[] operator >=(real a, real[] b);
-bool[] operator >=(real[] a, real b);
-bool[] operator >=(real[] a, real[] b);
-bool operator >=(string a, string b);
-bool[] operator >=(string a, string[] b);
-bool[] operator >=(string[] a, string b);
-bool[] operator >=(string[] a, string[] b);
-bool operator >=(coord a, coord b);
-bool operator >=(coord a, coord b);
-filltype UnFill(real xmargin=<default>, real ymargin=<default>);
-filltype UnFill;
-real degrees(pair z, bool warn=<default>);
-real degrees(real radians);
-bool[] operator !(bool[] a);
-bool operator !(bool b);
-path[] operator ^^(path p, path q);
-path[] operator ^^(explicit path[] p, path q);
-path[] operator ^^(path p, explicit path[] q);
-path[] operator ^^(explicit path[] p, explicit path[] q);
-guide operator ::(... guide[]);
-pen Helvetica(string series=<default>, string shape=<default>);
-transform reflect(pair a, pair b);
-bool Bars(picture, path, pen, marginT(path, pen));
-bool Bars(picture, path, pen, marginT(path, pen))(real size=<default>);
-void none(file file);
-int factorial(int n);
-real log(real x);
-real[] log(real[] a);
-pair log(explicit pair z);
-guide operator ..(... guide[]);
-guide operator ..(... guide[])(tensionSpecifier t);
-path polygon(int n);
-guide operator --(... guide[]);
-guide operator ---(... guide[]);
-pen NewCenturySchoolBook(string series=<default>, string shape=<default>);
-void()()[] saveFunctions;
-bool operator &(bool a, bool b);
-bool[] operator &(bool a, bool[] b);
-bool[] operator &(bool[] a, bool b);
-bool[] operator &(bool[] a, bool[] b);
-path operator &(path p, path q);
-path3 operator &(path3 p, path3 q);
-path operator &(path p, cycleToken tok);
-bool operator |(bool a, bool b);
-bool[] operator |(bool a, bool[] b);
-bool[] operator |(bool[] a, bool b);
-bool[] operator |(bool[] a, bool[] b);
-string texify(string s);
-guide operator controls(pair zout, pair zin);
-guide operator controls(pair z);
-bool empty(frame f);
-tensionSpecifier operator tension(real tout, real tin, bool atleast);
-tensionSpecifier operator tension(real t, bool atLeast);
-void end(picture pic=<default>);
-curlSpecifier operator curl(real gamma, int p);
-guide operator spec(pair z, int p);
-string substr(string s, int pos, int n=<default>);
-pen paleyellow;
-file output(string name=<default>, bool update=<default>, string comment=<default>, string mode=<default>);
-pen ZapfDingbats(string series=<default>, string shape=<default>);
-real tanh(real x);
-real[] tanh(real[] a);
-real interp(real a, real b, real t);
-pair interp(explicit pair a, explicit pair b, real t);
-triple interp(triple a, triple b, real t);
-pen interp(pen a, pen b, real t);
-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>);
-real[][] intersections(path3 p, path3 q, real fuzz=<default>);
-real[][] intersections(path3 p, triple[][] p, real fuzz=<default>);
-int animate(string args=<default>, string file=<default>, string format=<default>);
-void generate_random_backtrace();
-pair intersectionpoint(path p, path q, real fuzz=<default>);
-pair[] intersectionpoints(path p, path q, real fuzz=<default>);
-pair[] intersectionpoints(explicit path[] p, explicit path[] q, real fuzz=<default>);
-void asy(string format, bool overwrite=<default> ... string[] s);
-bool latex();
-void startScript();
-bool adjust(pen p);
-pen adjust(pen p, real arclength, bool cyclic);
-pair Align;
-void exit();
-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);
-pair dot(pair[] a, pair[] b);
-real dot(explicit pair z, explicit pair w);
-real dot(triple u, triple v);
-void dot(picture pic=<default>, Label[] L=<default>, explicit path g, align align=<default>, string format=<default>, pen p=<default>, filltype filltype=<default>);
-marker dot(pen p=<default>, filltype filltype=<default>);
-void dot(picture pic=<default>, pair z, pen p=<default>, filltype filltype=<default>);
-void dot(frame f, pair z, pen p=<default>, filltype filltype=<default>);
-void dot(picture pic=<default>, Label L, pen p=<default>, filltype filltype=<default>);
-void dot(picture pic=<default>, Label[] L=<default>, pair[] z, align align=<default>, string format=<default>, pen p=<default>, filltype filltype=<default>);
-void dot(picture pic=<default>, path[] g, pen p=<default>, filltype filltype=<default>);
-marker dot;
-void dot(picture pic=<default>, Label L, pair z, align align=<default>, string format=<default>, pen p=<default>, filltype filltype=<default>);
-void list(string s, bool imports=<default>);
-pair NNW;
-string phantom(string s);
-void atexit(void f());
-void atexit()();
-real getreal(string name=<default>, real default=<default>, string prompt=<default>, bool store=<default>);
-int convert(string args=<default>, string file=<default>, string format=<default>);
-pair WNW;
-pen palegray;
-pen palegreen;
-pen palegrey;
-void clip(frame f, path[] g, bool stroke=<default>, pen fillrule=<default>, bool copy=<default>);
-void clip(picture pic=<default>, path[] g, bool stroke=<default>, pen fillrule=<default>, bool copy=<default>);
-marginT Margin(path, pen)(real begin, real end);
-marginT Margin(path, pen);
-position Relative(real position);
-side Relative(explicit pair align);
-marginT Margins(path, pen);
-pair truepoint(picture pic=<default>, pair dir, bool user=<default>);
-real arclength(path p);
-real arclength(path3 p);
-indexedTransform indexedTransform(int index, transform t, bool active=<default>);
-bool finite(real x);
-bool finite(pair z);
-bool finite(triple v);
-void updatefunction();
-void _draw(frame f, path g, pen p);
-void _draw(frame f, path3 g, triple center=<default>, pen p, int interaction=<default>);
-void _draw(picture pic, path g, pen p, marginT margin(path, pen));
-frame align(frame f, pair align);
-path[] align(path[] g, transform t=<default>, pair position, pair align, pen p=<default>);
-object align(object F, pair align);
-real unitrand();
-string[] history(string name, int n=<default>);
-string[] history(int n=<default>);
-coord[] maxcoords(coord[] in, bool operator <=(coord, coord));
-coord[] maxcoords(coord[] in, bool operator <=(coord, coord));
-pen AvantGarde(string series=<default>, string shape=<default>);
-frame enclose(string prefix=<default>, object F, string format=<default>);
-int count;
-real atan2(real y, real x);
-bool inside(explicit path[] g, pair z, pen fillrule=<default>);
-bool inside(path g, pair z, pen fillrule=<default>);
-int inside(path p, path q, pen fillrule=<default>);
-pair inside(path p, pen fillrule=<default>);
-pair rectify(pair dir);
-arrowhead TeXHead;
-path[] margin(path[] g, real xmargin, real ymargin);
-pair relative(picture pic=<default>, pair z);
-real erfc(real x);
-int windingnumber(path[] p, pair z);
-real expansionfactor;
-void addArrow(picture pic, arrowhead arrowhead, path g, pen p, real size, real angle, filltype filltype, real position);
-void exitfunction();
-pen gray(pen p);
-pen gray(real gray);
-pen gray;
-real relativedistance(real theta, real phi, real t, bool atleast);
-path circle(pair c, real r);
-void overloadedMessage(file file);
-pen deepmagenta;
-real circlescale;
-string math(real x);
-string math(string s);
-real circleprecision;
-int Allow;
-real determinant(real[][] a);
-void functionshade(frame f, path[] g, bool stroke=<default>, pen fillrule=<default>, string shader=<default>, bool copy=<default>);
-void functionshade(picture pic=<default>, path[] g, bool stroke=<default>, pen fillrule=<default>, string shader, bool copy=<default>);
-pen red;
-pair[] dirSpecifier(guide g, int t);
-void abort(string s=<default>);
-bool Aspect;
-string hex(pen p);
-int hex(string s);
-path brace(pair a, pair b, real amplitude=<default>);
-void deactivatequote(picture pic=<default>);
-string format(string format, int x, string locale=<default>);
-string format(string format, string separator, real x, string locale=<default>);
-string format(string format, real x, string locale=<default>);
-string format(real x, string locale=<default>);
-real expm1(real x);
-real[] expm1(real[] a);
-void activatequote(picture pic=<default>);
-int undefined;
-string ask(string prompt);
-frame[] fit2(picture[] pictures, picture all);
-pen linecap(int n);
-int linecap(pen p=<default>);
-string outname();
-void newpage(frame f);
-void newpage(picture pic=<default>);
-pen fontcommand(string s);
-real bracemidangle;
-pair accel(path p, int t, int sign=<default>);
-pair accel(path p, real t);
-triple accel(path3 p, int t, int sign=<default>);
-triple accel(path3 p, real t);
-frame Portrait(frame f);
-real braceinnerangle;
-real braceouterangle;
-void tex(frame f, string s);
-void tex(frame f, string s, pair min, pair max);
-void tex(picture pic=<default>, string s, pair min, pair max);
-void tex(picture pic=<default>, string s);
-real bracedefaultratio;
-bool prconly(string format=<default>);
-pen Black;
-triple size3(frame f);
-void size3(picture pic=<default>, real x, real y=<default>, real z=<default>, bool keepAspect=<default>);
-bool eof(file f);
-frame dotframe(pen p=<default>, filltype filltype=<default>);
-frame dotframe;
-real realMax;
-pair NE;
-real realMin;
-path nib(pen p);
-void gouraudshade(frame f, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[] p, pair[] z, int[] edges, bool copy=<default>);
-void gouraudshade(frame f, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[] p, int[] edges, bool copy=<default>);
-void gouraudshade(picture pic=<default>, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[] p, pair[] z, int[] edges, bool copy=<default>);
-void gouraudshade(picture pic=<default>, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[] p, int[] edges, bool copy=<default>);
-bool shipped;
-pair[] fft(pair[] a, int sign=<default>);
-pair SE;
-pen nobasealign;
+bool operator init();
+int operator init();
+real operator init();
+string operator init();
+pair operator init();
+triple operator init();
+transform operator init();
+guide operator init();
+path operator init();
+path3 operator init();
+pen operator init();
+frame operator init();
+file operator init();
+marginT operator init();
+Legend operator init();
+object operator init();
+cputime operator init();
+filltype operator init();
+ScaleT operator init();
+Label operator init();
+processtime operator init();
+slice operator init();
+scaleT operator init();
+autoscaleT operator init();
+position operator init();
+arrowhead operator init();
+hsv operator init();
+coords2 operator init();
+coords2 operator init();
+transformation operator init();
+side operator init();
+marker operator init();
+scaling operator init();
+scaling operator init();
+bounds operator init();
+light operator init();
+align operator init();
+coord operator init();
+coord operator init();
+coords3 operator init();
+framedTransformStack operator init();
+projection operator init();
+picture operator init();
+indexedTransform operator init();
+bool3 operator init();
+pairOrTriple operator init();
+frame BBox(frame)(real xmargin=<default>, real ymargin=<default>, pen p=<default>, filltype filltype=<default>);
 real animationdelay;
+frame NoBox(frame f);
 animation operator init();
-frame NoBox(frame f);
-frame BBox(frame)(real xmargin=<default>, real ymargin=<default>, pen p=<default>, filltype filltype=<default>);
 void annotate(picture pic=<default>, string title, string text, pair position);
 void babel(string s);
-path removeDuplicates(path p);
-path uncycle(path p, real t);
 path[] bezulate(path[] p);
-real[][] intersections(pair a, pair b, path p);
+path subdivide(path p);
 void connect(path[] paths, path[] result, path[] patch);
+path uncycle(path p, real t);
+bool isDuplicate(pair a, pair b, real relSize);
+path[][] containmentTree(path[] paths);
 int countIntersections(path[] p, pair start, pair end);
+real[][] intersections(pair a, pair b, path p);
+real maxrefinements;
+real fuzz;
+path removeDuplicates(path p);
 real duplicateFuzz;
-path subdivide(path p);
-bool isDuplicate(pair a, pair b, real relSize);
 bool checkSegment(path g, pair p, pair q);
 path section(path p, real t1, real t2, bool loop=<default>);
-real fuzz;
-real maxrefinements;
-path[][] containmentTree(path[] paths);
+key nil;
+binarytreeNode binarytreeNode(int key);
 binarytree searchtree(... int[] keys);
+binarytree binarytree(... key[] keys);
+key key(int n, bool active=<default>);
 object draw(picture pic=<default>, binarytreeNode node, pair pos, int height, real minDist, real levelDist, real nodeDiameter, pen p=<default>, bool condensed=<default>);
 void draw(picture pic=<default>, binarytree tree, real minDist=<default>, real nodeMargin=<default>, pen p=<default>, bool condensed=<default>);
+real minDistDefault;
 real nodeMarginDefault;
-key key(int n, bool active=<default>);
-binarytree binarytree(... key[] keys);
-binarytreeNode binarytreeNode(int key);
-key nil;
-real minDistDefault;
 binarytreeNode operator init();
 key operator init();
 binarytree operator init();
@@ -2003,8 +2010,9 @@
 int operator cast(key k);
 int[] operator cast(key[] k);
 line intersection(face a, face b);
+splitface split(face a, face cut, projection P);
+void add(picture pic=<default>, face[] faces, projection P=<default>);
 real epsilon;
-splitface split(face a, face cut, projection P);
 face operator init();
 line operator init();
 half operator init();
@@ -2012,29 +2020,23 @@
 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);
+real eps;
+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>);
 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>);
-pen[][] interior(picture pic=<default>, guide[][] g, pen[] palette);
+void addseg(pair[][] gds, segment seg);
 pen[] extend(pen[] palette, pen below, pen above);
 guide[][] connect(pair[][][] points, real[] c, guide join(... guide[]));
-segment case2(pair p0, pair p1, pair p2, real v0, real v1, real v2, int edge);
 void collect(pair[][][] points, real[] c);
+segment case1(pair p0, pair p1, int edge);
+real eps;
 segment case3(pair p0, pair p1, pair p2, real v0, real v1, real v2, int edge=<default>);
-segment checktriangle(pair p0, pair p1, pair p2, real v0, real v1, real v2, int edge=<default>);
-segment operator init();
-void addseg(pair[][] gds, segment seg);
 void fill(picture pic=<default>, guide[][] g, pen[][] palette);
 guide[][] contour(pair[][] z, real[][] f, real[][] midpoint=<default>, real[] c, guide join(... guide[])=<default>);
 guide[][] contour(real[][] f, real[][] midpoint=<default>, pair a, pair b, real[] c, guide join(... guide[])=<default>);
@@ -2041,183 +2043,144 @@
 guide[][] contour(real f(real, real), pair a, pair b, real[] c, int nx=<default>, int ny=<default>, guide join(... guide[])=<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;
-void draw(TreeNode root, pair pos);
-real treeNodeStep;
+pen[][] interior(picture pic=<default>, guide[][] g, pen[] palette);
+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>);
+segment operator init();
+segment checktriangle(pair p0, pair p1, pair p2, real v0, real v1, real v2, int edge=<default>);
+segment case2(pair p0, pair p1, pair p2, real v0, real v1, real v2, int edge);
 void drawAll(TreeNode node, frame f);
 real layout(int level, TreeNode node);
-TreeNode operator init();
+real treeMinNodeWidth;
+real treeLevelStep;
+real treeNodeStep;
+void draw(TreeNode root, pair pos);
 void add(TreeNode child, TreeNode parent);
-real treeLevelStep;
-real treeMinNodeWidth;
 TreeNode makeNode(TreeNode parent=<default>, frame f);
 TreeNode makeNode(TreeNode parent=<default>, Label label);
+TreeNode operator init();
+string embed(string name, string text=<default>, string options=<default>, real width=<default>, real height=<default>);
 string link(string label, string text=<default>);
-string embed(string name, string text=<default>, string options=<default>, real width=<default>, real height=<default>);
 string embedplayer(string name, string text=<default>, string options=<default>, real width=<default>, real height=<default>);
+string hyperlink(string url, string text);
 string link(string label, string text=<default>);
 string embed(string name, string text=<default>, string options=<default>, real width=<default>, real height=<default>, string image=<default>);
-string hyperlink(string url, string text);
-real gluonratio;
-real gluonamplitude;
-pen doublelinepen;
-real doublelinespacing;
-void drawGluon(picture pic=<default>, path p, real amp=<default>, real width=<default>, pen fgpen=<default>, bool erasebg=<default>, pen bgpen=<default>, real vertexangle=<default>, real margin=<default>);
-void drawGhost(picture pic=<default>, path p, pen fgpen=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, bool erasebg=<default>, pen bgpen=<default>, real vertexangle=<default>, real margin=<default>);
-void drawVertex(picture pic=<default>, pair xy, real r=<default>, pen fgpen=<default>);
-void drawVertexO(picture pic=<default>, pair xy, real r=<default>, pen fgpen=<default>, bool erasebg=<default>, pen bgpen=<default>);
+void texshipout(string stem, picture pic=<default>, bool xalign=<default>);
+bool XYAlign;
+void fmdefaults();
+void drawMomArrow(picture pic=<default>, path p, align align, position pos=<default>, real offset=<default>, real length=<default>, pen fgpen=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, bool erasebg=<default>, pen bgpen=<default>, real margin=<default>);
 void drawVertexX(picture pic=<default>, pair xy, real r=<default>, pen fgpen=<default>);
 void drawVertexBox(picture pic=<default>, pair xy, real r=<default>, pen fgpen=<default>);
-void drawVertexBoxO(picture pic=<default>, pair xy, real r=<default>, pen fgpen=<default>, bool erasebg=<default>, pen bgpen=<default>);
-void drawVertexOX(picture pic=<default>, pair xy, real r=<default>, pen fgpen=<default>, bool erasebg=<default>, pen bgpen=<default>);
 void drawVertexTriangle(picture pic=<default>, pair xy, real r=<default>, pen fgpen=<default>);
-void drawVertexTriangleO(picture pic=<default>, pair xy, real r=<default>, pen fgpen=<default>, bool erasebg=<default>, pen bgpen=<default>);
-void drawVertexBoxX(picture pic=<default>, pair xy, real r=<default>, pen fgpen=<default>, bool erasebg=<default>, pen bgpen=<default>);
-void do_overpaint(picture pic, path p, pen bgpen, real halfwidth, real vertexangle);
-bool XYAlign;
-void texshipout(string stem, picture pic=<default>, bool xalign=<default>);
-void drawDoubleLine(picture pic=<default>, path p, pen fgpen=<default>, real dlspacing=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, bool erasebg=<default>, pen bgpen=<default>, real vertexangle=<default>, real margin=<default>);
+void drawVertex(picture pic=<default>, pair xy, real r=<default>, pen fgpen=<default>);
+void drawGhost(picture pic=<default>, path p, pen fgpen=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, bool erasebg=<default>, pen bgpen=<default>, real vertexangle=<default>, real margin=<default>);
 void drawScalar(picture pic=<default>, path p, pen fgpen=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, bool erasebg=<default>, pen bgpen=<default>, real vertexangle=<default>, real margin=<default>);
-bool overpaint;
+void drawFermion(picture pic=<default>, path p, pen fgpen=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, bool erasebg=<default>, pen bgpen=<default>, real vertexangle=<default>, real margin=<default>);
+void drawPhoton(picture pic=<default>, path p, real amp=<default>, real width=<default>, pen fgpen=<default>, bool erasebg=<default>, pen bgpen=<default>, real vertexangle=<default>, real margin=<default>);
+path momArrowPath(path p, align align, position pos, real offset=<default>, real length=<default>);
 path photon(path p, real amp=<default>, real width=<default>);
-pen photonpen;
-real photonratio;
-real photonamplitude;
-string includegraphicscommand;
+path gluon(path p, real amp=<default>, real width=<default>);
+void do_overpaint(picture pic, path p, pen bgpen, real halfwidth, real vertexangle);
+bool appendsuffix;
+real momarrowsize(pen p=<default>);
+real momarrowfactor;
+real momarrowmargin;
+real momarrowoffset;
 pen momarrowpen;
-real momarrowsize(pen p=<default>);
 real momarrowlength;
-real momarrowoffset;
-real momarrowmargin;
-real momarrowfactor;
+real bigvertexsize;
+real linemargin;
+bool currentarrow(picture, path, pen, marginT(path, pen));
 pen vertexpen;
-real vertexsize;
-path momArrowPath(path p, align align, position pos, real offset=<default>, real length=<default>);
-void drawPhoton(picture pic=<default>, path p, real amp=<default>, real width=<default>, pen fgpen=<default>, bool erasebg=<default>, pen bgpen=<default>, real vertexangle=<default>, real margin=<default>);
+pen ghostpen;
+pen scalarpen;
+pen fermionpen;
+real photonratio;
+real gluonratio;
 bool YAlign;
+void drawVertexO(picture pic=<default>, pair xy, real r=<default>, pen fgpen=<default>, bool erasebg=<default>, pen bgpen=<default>);
+void drawVertexTriangleO(picture pic=<default>, pair xy, real r=<default>, pen fgpen=<default>, bool erasebg=<default>, pen bgpen=<default>);
+void drawVertexOX(picture pic=<default>, pair xy, real r=<default>, pen fgpen=<default>, bool erasebg=<default>, pen bgpen=<default>);
+void drawDoubleLine(picture pic=<default>, path p, pen fgpen=<default>, real dlspacing=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, bool erasebg=<default>, pen bgpen=<default>, real vertexangle=<default>, real margin=<default>);
 pen backgroundpen;
-pen scalarpen;
-pen ghostpen;
-pen fermionpen;
-pen bigvertexpen;
-real bigvertexsize;
 real minvertexangle;
-void drawMomArrow(picture pic=<default>, path p, align align, position pos=<default>, real offset=<default>, real length=<default>, pen fgpen=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, bool erasebg=<default>, pen bgpen=<default>, real margin=<default>);
-void fmdefaults();
-real linemargin;
-void drawFermion(picture pic=<default>, path p, pen fgpen=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, bool erasebg=<default>, pen bgpen=<default>, real vertexangle=<default>, real margin=<default>);
-bool currentarrow(picture, path, pen, marginT(path, pen));
+pen doublelinepen;
+void drawVertexBoxX(picture pic=<default>, pair xy, real r=<default>, pen fgpen=<default>, bool erasebg=<default>, pen bgpen=<default>);
+real gluonamplitude;
+pen photonpen;
+pen gluonpen;
+real doublelinespacing;
 bool currentmomarrow(picture, path, pen, marginT(path, pen));
-bool appendsuffix;
-path gluon(path p, real amp=<default>, real width=<default>);
-pen gluonpen;
-Dir Left;
+real photonamplitude;
+bool overpaint;
+real vertexsize;
+void drawVertexBoxO(picture pic=<default>, pair xy, real r=<default>, pen fgpen=<default>, bool erasebg=<default>, pen bgpen=<default>);
+pen bigvertexpen;
+string includegraphicscommand;
+void drawGluon(picture pic=<default>, path p, real amp=<default>, real width=<default>, pen fgpen=<default>, bool erasebg=<default>, pen bgpen=<default>, real vertexangle=<default>, real margin=<default>);
+Dir Down;
+Dir Up;
+path path(pair[] point ... flowdir[] dir);
+block bevel(object body, pair center=<default>, pen fillpen=<default>, pen drawpen=<default>, real dh=<default>, real dw=<default>, real minwidth=<default>, real minheight=<default>);
 block roundrectangle(object body, pair center=<default>, pen fillpen=<default>, pen drawpen=<default>, real ds=<default>, real dw=<default>, real minwidth=<default>, real minheight=<default>);
 block diamond(object body, pair center=<default>, pen fillpen=<default>, pen drawpen=<default>, real ds=<default>, real dw=<default>, real height=<default>, real minwidth=<default>, real minheight=<default>);
-void draw(picture pic=<default>, block block, pen p=<default>);
-real minblockwidth;
+block rectangle(object header, object body, pair center=<default>, pen headerpen=<default>, pen bodypen=<default>, pen drawpen=<default>, real dx=<default>, real minheaderwidth=<default>, real minheaderheight=<default>, real minbodywidth=<default>, real minbodyheight=<default>);
+block rectangle(object body, pair center=<default>, pen fillpen=<default>, pen drawpen=<default>, real dx=<default>, real minwidth=<default>, real minheight=<default>);
 real defaultexcursion;
 real minblockheight;
-path path(pair[] point ... flowdir[] dir);
-Dir Up;
+flowdir Vertical;
+Dir Right;
+real minblockwidth;
+flowdir Horizontal;
 real mincirclediameter;
-flowdir Vertical;
-block rectangle(object header, object body, pair center=<default>, pen headerpen=<default>, pen bodypen=<default>, pen drawpen=<default>, real dx=<default>, real minheaderwidth=<default>, real minheaderheight=<default>, real minbodywidth=<default>, real minbodyheight=<default>);
-block rectangle(object body, pair center=<default>, pen fillpen=<default>, pen drawpen=<default>, real dx=<default>, real minwidth=<default>, real minheight=<default>);
-block parallelogram(object body, pair center=<default>, pen fillpen=<default>, pen drawpen=<default>, real dx=<default>, real slope=<default>, real minwidth=<default>, real minheight=<default>);
 block blockconnector(block, block)(picture pic, transform t, pen p=<default>, marginT margin(path, pen)=<default>);
-block circle(object body, pair center=<default>, pen fillpen=<default>, pen drawpen=<default>, real dr=<default>, real mindiameter=<default>);
+Dir Left;
+void draw(picture pic=<default>, block block, pen p=<default>);
+block operator --(block b1, Label label);
+block operator --(block b1, Dir dir);
+block operator --(block b, bool arrowbar(picture, path, pen, marginT(path, pen)));
 flowdir operator init();
 block operator init();
 Dir operator init();
-block operator --(block b1, Label label);
-block operator --(block b1, Dir dir);
-block operator --(block b, bool arrowbar(picture, path, pen, marginT(path, pen)));
-flowdir Horizontal;
-block bevel(object body, pair center=<default>, pen fillpen=<default>, pen drawpen=<default>, real dh=<default>, real dw=<default>, real minwidth=<default>, real minheight=<default>);
-Dir Right;
-Dir Down;
-int[] numarray;
-point midpoint(segment s);
-point midpoint(side side);
+block parallelogram(object body, pair center=<default>, pen fillpen=<default>, pen drawpen=<default>, real dx=<default>, real slope=<default>, real minwidth=<default>, real minheight=<default>);
+block circle(object body, pair center=<default>, pen fillpen=<default>, pen drawpen=<default>, real dr=<default>, real mindiameter=<default>);
+path compassmark(pair O, pair A, real position, real angle=<default>);
+arc arcsubtended(point A, point B, real angle);
+void lineinversion();
+line radicalline(circle c1, circle c2);
+point inverse(real k, point A, point M);
+circle inverse(real k, point A, line l);
+circle inverse(real k, point A, circle c);
+arc inverse(real k, point A, segment s);
+triangle anticomplementary(triangle t);
+triangle incentral(triangle t);
+triangle extouch(triangle t);
+triangle extouch(side side);
 point isotomicconjugate(triangle t, point M);
+point[] fermat(triangle t);
+point gergonne(triangle t);
+triangle cevian(triangle t, point P);
+point cevian(side side, point P);
+line cevian(vertex V, point P);
 line altitude(vertex V);
 line altitude(side side);
-real rd(real x, real y, real z);
-point circumcenter(point A, point B, point C);
-point circumcenter(triangle t);
-circle circumcircle(point A, point B, point C);
-circle circumcircle(triangle t);
-point point(coordsys R, pair p, real m=<default>);
-point point(explicit pair p, real m);
-point point(coordsys R, explicit point M, real m=<default>);
-point point(explicit vector u);
-point point(circle c, abscissa l);
-point point(ellipse el, abscissa l);
-point point(parabola p, abscissa l);
-point point(hyperbola h, abscissa l);
-point point(explicit conic co, abscissa l);
-point point(line l, abscissa x);
-point point(line l, explicit real x);
-point point(line l, explicit int x);
-point point(explicit circle c, explicit real x);
-point point(explicit circle c, explicit int x);
-point point(explicit ellipse el, explicit real x);
-point point(explicit ellipse el, explicit int x);
-point point(explicit parabola p, explicit real x);
-point point(explicit parabola p, explicit int x);
-point point(explicit hyperbola h, explicit real x);
-point point(explicit hyperbola h, explicit int x);
-point point(explicit conic co, explicit real x);
-point point(explicit conic co, explicit int x);
-point point(arc a, abscissa l);
-point point(arc a, real x);
-pair point(explicit arc a, int x);
-point point(explicit mass m);
-point point(explicit vertex V);
-point point(trilinear tri);
-point point(circle c, point M);
-point point(circle c, explicit vector v);
-bool finite(explicit point p);
-void dot(picture pic=<default>, Label L, explicit point Z, align align=<default>, string format=<default>, pen p=<default>);
-real dot(point A, point B);
-real dot(point A, explicit pair B);
-real dot(explicit pair A, point B);
-void dot(picture pic=<default>, Label L, explicit mass M, align align=<default>, string format=<default>, pen p=<default>);
-void dot(picture pic=<default>, triangle t, pen p=<default>);
-real[] realquarticroots(real a, real b, real c, real d, real e);
-point origin;
-point origin(coordsys R=<default>);
-void draw(picture pic=<default>, Label L=<default>, line l, bool dirA=<default>, bool dirB=<default>, align align=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, Label legend=<default>, marker marker=<default>, path pathModifier(path)=<default>);
-void draw(picture pic=<default>, Label[] L=<default>, line[] l, align align=<default>, pen[] p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, Label[] legend=<default>, marker marker=<default>, path pathModifier(path)=<default>);
-void draw(picture pic=<default>, Label[] L=<default>, line[] l, align align=<default>, pen p, bool arrow(picture, path, pen, marginT(path, pen))=<default>, Label[] legend=<default>, marker marker=<default>, path pathModifier(path)=<default>);
-void draw(picture pic=<default>, Label L=<default>, circle c, align align=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, bool bar(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, Label legend=<default>, marker marker=<default>);
-void draw(picture pic=<default>, Label L=<default>, ellipse el, align align=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, bool bar(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, Label legend=<default>, marker marker=<default>);
-void draw(picture pic=<default>, Label L=<default>, parabola parabola, align align=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, bool bar(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, Label legend=<default>, marker marker=<default>);
-void draw(picture pic=<default>, Label L=<default>, hyperbola h, align align=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, bool bar(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, Label legend=<default>, marker marker=<default>);
-void draw(picture pic=<default>, Label L=<default>, explicit conic co, align align=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, bool bar(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, Label legend=<default>, marker marker=<default>);
-void draw(picture pic=<default>, Label L=<default>, arc a, align align=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, bool bar(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, Label legend=<default>, marker marker=<default>);
-void draw(picture pic=<default>, triangle t, pen p=<default>, marker marker=<default>);
-void draw(picture pic=<default>, triangle[] t, pen p=<default>, marker marker=<default>);
-coordsys defaultcoordsys;
-string defaultmassformat;
-line radicalline(circle c1, circle c2);
-point radicalcenter(circle c1, circle c2);
-point radicalcenter(circle c1, circle c2, circle c3);
-ellipse ellipse(point F1, point F2, real a);
-ellipse ellipse(point F1, point F2, point M);
-ellipse ellipse(point C, real a, real b, real angle=<default>);
-ellipse ellipse(bqe bqe);
-ellipse ellipse(point M1, point M2, point M3, point M4, point M5);
-path arctopath(arc a, int n);
-bool inside(ellipse el, point M);
-bool inside(parabola p, point M);
-int ellipsenodesnumber(real a, real b);
-int ellipsenodesnumber(real a, real b, real angle1, real angle2, bool dir);
-int ellipsenodesnumberfactor;
-bool byfoci;
-transform reflect(line l);
-transform reflect(line l1, line l2, bool safe=<default>);
+point foot(vertex V);
+point foot(side side);
+triangle triangleabc(real a, real b, real c, real angle=<default>, point A=<default>);
+side opposite(vertex V);
+vertex opposite(side side);
+circle excircle(point A, point B, point C);
+circle excircle(side side);
+void markarc(picture pic=<default>, Label L=<default>, int n=<default>, real radius=<default>, real space=<default>, arc a, pen sectorpen=<default>, pen markpen=<default>, marginT margin(path, pen)=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marker marker=<default>);
+point ppoint(arc a, real x);
+int arcnodesnumber(explicit arc a);
+path polarconicroutine(conic co, real angle1, real angle2, int n, bool direction)(conic co);
+point curpoint(line l, real x);
+point curpoint(explicit circle c, real x);
+point curpoint(explicit ellipse el, real x);
+point curpoint(explicit parabola p, real x);
+point curpoint(conic co, real x);
+point curpoint(arc a, real x);
 abscissa relabscissa(real x);
 abscissa relabscissa(int x);
 abscissa relabscissa(line l, point M);
@@ -2225,303 +2188,211 @@
 abscissa relabscissa(ellipse el, point M);
 abscissa relabscissa(conic co, point M);
 abscissa relabscissa(arc a, point M);
-circle incircle(point A, point B, point C);
-circle incircle(triangle t);
-mass masscenter(... mass[] M);
-vector unit(point M);
-vector unit(vector u);
-line Ox(coordsys R=<default>);
-line Ox;
+int angularsystem;
+real arclength(circle c);
+real arclength(ellipse el);
+real arclength(ellipse el, real angle1, real angle2, bool direction=<default>, path polarconicroutine(conic co, real angle1, real angle2, int n, bool direction)=<default>);
+real arclength(parabola p, real angle);
+real arclength(parabola p, real angle1, real angle2);
+real arclength(parabola p);
+real arclength(arc a);
+string conictype(bqe bqe);
+real operator ^(point M, explicit circle c);
+point circumcenter(point A, point B, point C);
+point circumcenter(triangle t);
+parabola parabola(point F, line l);
+parabola parabola(point F, point vertex);
+parabola parabola(point F, real a, real angle);
+parabola parabola(bqe bqe);
+parabola parabola(point M1, point M2, point M3, line l);
+parabola parabola(point M1, point M2, point M3, point M4, point M5);
+point angpoint(conic co, real angle);
+point angpoint(explicit circle c, real x);
+point angpoint(explicit ellipse el, real x, path polarconicroutine(conic co, real angle1, real angle2, int n, bool direction)=<default>);
+point angpoint(explicit parabola p, real x);
+point angpoint(explicit hyperbola h, real x, path polarconicroutine(conic co, real angle1, real angle2, int n, bool direction)=<default>);
+point angpoint(arc a, real angle);
+path currentpolarconicroutine(conic co, real angle1, real angle2, int n, bool direction);
+int hyperbolanodesnumber(hyperbola h, real angle1, real angle2);
+int hyperbolanodesnumberfactor;
+int parabolanodesnumber(parabola p, real angle1, real angle2);
+int ellipsenodesnumberfactor;
+int circlenodesnumber(real r);
+int circlenodesnumber(real r, real angle1, real angle2);
 conic conic(point F, line l, real e);
 conic conic(point M1, point M2, point M3, point M4, point M5);
 conic conic(bqe bqe);
-point[] standardizecoordsys(coordsys R=<default>, bool warn=<default> ... point[] M);
-bool defined(point P);
-string conictype(bqe bqe);
-triangle antipedal(triangle t, point M);
-void clipdraw(picture pic=<default>, Label L=<default>, path g, align align=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, bool bar(picture, path, pen, marginT(path, pen))=<default>, real xmargin=<default>, real ymargin=<default>, Label legend=<default>, marker marker=<default>);
-real perpfactor;
-int conicnodesfactor;
-int conicnodesnumber(conic co, real angle1, real angle2, bool dir=<default>);
-line hline(coordsys R=<default>);
-line hline;
-int[] tricoef(side side);
+bool degenerate(conic c);
+bool degenerate(circle c);
+bool degenerate(ellipse el);
+real[] realquarticroots(real a, real b, real c, real d, real e);
 path arcfromfocus(conic co, real angle1, real angle2, int n=<default>, bool direction=<default>);
 line sector(int n=<default>, int p=<default>, line l1, line l2, real angle=<default>, bool sharp=<default>);
-path arcfromcenter(ellipse el, real angle1, real angle2, bool direction=<default>, int n=<default>);
-path arcfromcenter(hyperbola h, real angle1, real angle2, int n=<default>, bool direction=<default>);
-path arcfromcenter(explicit conic co, real angle1, real angle2, int n, bool direction=<default>);
-line vline(coordsys R=<default>);
-line vline;
-vector vector(coordsys R=<default>, pair v);
-vector vector(point M);
-real[] intersect(path g, explicit pair p, real fuzz=<default>);
-real[] intersect(path g, explicit point P, real fuzz=<default>);
+line bisector(line l1, line l2, real angle=<default>, bool sharp=<default>);
+line bisector(point A, point B, point C, point D, real angle=<default>, bool sharp=<default>);
+line bisector(segment s, real angle=<default>);
+line bisector(point A, point B, real angle=<default>);
+line bisector(vertex V, real angle=<default>);
+line bisector(side side);
+line perpendicular(point M, line l);
+line perpendicular(point M, explicit vector normal);
+line perpendicular(point M, explicit pair normal);
+bool perpendicular(line l1, line l2);
+void perpendicular(picture pic=<default>, pair z, pair align, pair dir=<default>, real size=<default>, pen p=<default>, marginT margin(path, pen)=<default>, filltype filltype=<default>);
+void perpendicular(picture pic=<default>, pair z, pair align, path g, real size=<default>, pen p=<default>, marginT margin(path, pen)=<default>, filltype filltype=<default>);
+transform vprojection(line l, bool safe=<default>);
+bool concurrent(... line[] l);
+line parallel(point M, line l);
+line parallel(point M, explicit vector dir);
+line parallel(point M, explicit pair dir);
+bool parallel(line l1, line l2, bool strictly=<default>);
+transform reflect(line l);
+transform reflect(line l1, line l2, bool safe=<default>);
+line Ox(coordsys R=<default>);
+line Ox;
+line extend(line l);
+line line(point A, bool extendA=<default>, point B, bool extendB=<default>);
+line line(segment s);
+line line(real a, point A=<default>);
+line line(point A=<default>, real a);
+line line(int a, point A=<default>);
+line line(coordsys R=<default>, real slope, real origin);
+line line(coordsys R=<default>, real a, real b, real c);
+line line(circle c);
+line line(explicit side side);
+pair attract(pair m, path g, real fuzz=<default>);
+point attract(point M, path g, real fuzz=<default>);
+bool simeq(point A, point B, real fuzz=<default>);
+bool simeq(point a, real b, real fuzz=<default>);
+void clipdraw(picture pic=<default>, Label L=<default>, path g, align align=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, bool bar(picture, path, pen, marginT(path, pen))=<default>, real xmargin=<default>, real ymargin=<default>, Label legend=<default>, marker marker=<default>);
+void Drawline(picture pic=<default>, Label L=<default>, pair P, bool dirP=<default>, pair Q, bool dirQ=<default>, align align=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, Label legend=<default>, marker marker=<default>, path pathModifier(path)=<default>);
+path NoModifier(path);
+bool between(point M, point O, point N);
 int sgnd(real x);
 int sgnd(int x);
-circle excircle(point A, point B, point C);
-circle excircle(side side);
-line extend(line l);
-point intersectionpoint(line l1, line l2);
-pair[] intersectionpoints(pair A, pair B, real a, real b, real c, real d, real f, real g);
-pair[] intersectionpoints(pair A, pair B, real[] equation);
-point[] intersectionpoints(line l, path g);
-point[] intersectionpoints(bqe bqe1, bqe bqe2);
-point[] intersectionpoints(triangle t, line l, bool extended=<default>);
-point[] intersectionpoints(line l, triangle t, bool extended=<default>);
-point[] intersectionpoints(line l, circle c);
-point[] intersectionpoints(circle c, line l);
-point[] intersectionpoints(line l, ellipse el);
-point[] intersectionpoints(ellipse el, line l);
-point[] intersectionpoints(line l, parabola p);
-point[] intersectionpoints(parabola p, line l);
-point[] intersectionpoints(line l, hyperbola h);
-point[] intersectionpoints(hyperbola h, line l);
-point[] intersectionpoints(line l, conic co);
-point[] intersectionpoints(conic co, line l);
-point[] intersectionpoints(conic co1, conic co2);
-point[] intersectionpoints(triangle t, conic co, bool extended=<default>);
-point[] intersectionpoints(conic co, triangle t, bool extended=<default>);
-point[] intersectionpoints(ellipse a, ellipse b);
-point[] intersectionpoints(ellipse a, circle b);
-point[] intersectionpoints(circle a, ellipse b);
-point[] intersectionpoints(ellipse a, parabola b);
-point[] intersectionpoints(parabola a, ellipse b);
-point[] intersectionpoints(ellipse a, hyperbola b);
-point[] intersectionpoints(hyperbola a, ellipse b);
-point[] intersectionpoints(circle a, parabola b);
-point[] intersectionpoints(parabola a, circle b);
-point[] intersectionpoints(circle a, hyperbola b);
-point[] intersectionpoints(hyperbola a, circle b);
-point[] intersectionpoints(parabola a, parabola b);
-point[] intersectionpoints(parabola a, hyperbola b);
-point[] intersectionpoints(hyperbola a, parabola b);
-point[] intersectionpoints(hyperbola a, hyperbola b);
-point[] intersectionpoints(circle c1, circle c2);
-point[] intersectionpoints(conic co, arc a);
-point[] intersectionpoints(arc a, conic co);
-point[] intersectionpoints(arc a1, arc a2);
-point[] intersectionpoints(line l, arc a);
-point[] intersectionpoints(arc a, line l);
-point intouch(side side);
-triangle intouch(triangle t);
-point orthocentercenter(point A, point B, point C);
-point orthocentercenter(triangle t);
-real rf(real x, real y, real z);
-bool concurrent(... line[] l);
-real inradius(point A, point B, point C);
-real inradius(triangle t);
 pen addpenline;
 pen addpenline(pen p);
-pen addpenarc;
-pen addpenarc(pen p);
-void label(picture pic=<default>, Label L, explicit mass M, align align=<default>, string format=<default>, pen p=<default>, filltype filltype=<default>);
-void label(picture pic=<default>, Label L, vertex V, pair align=<default>, real alignFactor=<default>, pen p=<default>, filltype filltype=<default>);
-void label(picture pic=<default>, Label LA=<default>, Label LB=<default>, Label LC=<default>, triangle t, real alignAngle=<default>, real alignFactor=<default>, pen p=<default>, filltype filltype=<default>);
+real linemargin;
+real linemargin();
+point origin;
+point origin(coordsys R=<default>);
+vector unit(point M);
+vector unit(vector u);
+bool collinear(vector u, vector v);
+vector vector(coordsys R=<default>, pair v);
+vector vector(point M);
+transform scaleO(real x);
+transform yscale(real k, point M);
+point conj(explicit point M);
+vector conj(explicit vector u);
+hyperbola conj(hyperbola h);
+real length(explicit point M);
+real length(segment s);
 real abs(coordsys R, pair m);
 real abs(explicit point M);
-point curpoint(line l, real x);
-point curpoint(explicit circle c, real x);
-point curpoint(explicit ellipse el, real x);
-point curpoint(explicit parabola p, real x);
-point curpoint(conic co, real x);
-point curpoint(arc a, real x);
-line bisector(line l1, line l2, real angle=<default>, bool sharp=<default>);
-line bisector(point A, point B, point C, point D, real angle=<default>, bool sharp=<default>);
-line bisector(segment s, real angle=<default>);
-line bisector(point A, point B, real angle=<default>);
-line bisector(vertex V, real angle=<default>);
-line bisector(side side);
-bqe canonical(bqe bqe);
-point bisectorpoint(side side);
-abscissa angabscissa(real x, path polarconicroutine(conic co, real angle1, real angle2, int n, bool direction)=<default>);
-abscissa angabscissa(int x, path polarconicroutine(conic co, real angle1, real angle2, int n, bool direction)=<default>);
-abscissa angabscissa(circle c, point M);
-abscissa angabscissa(ellipse el, point M, path polarconicroutine(conic co, real angle1, real angle2, int n, bool direction)=<default>);
-abscissa angabscissa(hyperbola h, point M, path polarconicroutine(conic co, real angle1, real angle2, int n, bool direction)=<default>);
-abscissa angabscissa(parabola p, point M);
-abscissa angabscissa(explicit conic co, point M);
-abscissa angabscissa(arc a, point M);
 pair locate(point P);
 point locate(pair p);
 pair locate(explicit vector v);
 bool samecoordsys(bool warn=<default> ... point[] M);
 bool samecoordsys(bool warn=<default> ... bqe[] bqes);
-triangle extouch(triangle t);
-triangle extouch(side side);
-coordsys canonicalcartesiansystem(ellipse el);
-coordsys canonicalcartesiansystem(parabola p);
-coordsys canonicalcartesiansystem(hyperbola h);
-coordsys canonicalcartesiansystem(explicit conic co);
-arc arc(ellipse el, real angle1, real angle2, path polarconicroutine(conic co, real angle1, real angle2, int n, bool direction)=<default>, bool direction=<default>);
-arc arc(ellipse el, explicit abscissa x1, explicit abscissa x2, bool direction=<default>);
-arc arc(ellipse el, point M, point N, bool direction=<default>);
-arc arc(explicit arc a, abscissa x1, abscissa x2);
-arc arc(explicit arc a, point M, point N);
-path arc(explicit pair B, explicit pair A, explicit pair C, real r);
-void markrightangle(picture pic=<default>, point A, point O, point B, real size=<default>, pen p=<default>, marginT margin(path, pen)=<default>, filltype filltype=<default>);
+pair coordinates(point M);
+point changecoordsys(coordsys R, point M);
+vector changecoordsys(coordsys R, vector v);
+line changecoordsys(coordsys R, line l);
+bqe changecoordsys(coordsys R, bqe bqe);
+conic changecoordsys(coordsys R, conic co);
+coordsys currentcoordsys;
+pair operator /(pair p, coordsys R);
+point operator /(explicit point P, real x);
+point operator /(real x, explicit point P);
+vector operator /(explicit vector v, real x);
+line operator /(line l, real x);
+line operator /(line l, int x);
+circle operator /(explicit circle c, real x);
+circle operator /(explicit circle c, int x);
+ellipse operator /(ellipse el, real x);
+abscissa operator /(real x, explicit abscissa a);
+abscissa operator /(explicit abscissa a, real x);
+abscissa operator /(int x, explicit abscissa a);
+arc operator /(explicit arc a, real x);
+mass operator /(explicit mass M, real x);
+mass operator /(explicit mass M, int x);
+void show(picture pic=<default>, Label lo=<default>, Label li=<default>, Label lj=<default>, coordsys R, pen dotpen=<default>, pen xpen=<default>, pen ypen=<default>, pen ipen=<default>, pen jpen=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>);
+void show(Label L, vector v, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>);
+void show(picture pic=<default>, line l, pen p=<default>);
+void show(picture pic=<default>, Label LA=<default>, Label LB=<default>, Label LC=<default>, Label La=<default>, Label Lb=<default>, Label Lc=<default>, triangle t, pen p=<default>, filltype filltype=<default>);
+coordsys cartesiansystem(pair O=<default>, pair i, pair j);
+real binomial(real n, real k);
+real approximate(real t);
+real[] approximate(real[] T);
 real epsgeo;
-bool between(point M, point O, point N);
-real sharpangle(line l1, line l2);
+transform rotate(explicit pair dir);
+transform rotate(explicit vector dir);
+transform rotate(explicit point dir);
 bool isparabola(bqe bqe);
 real sharpdegrees(line l1, line l2);
 real exradius(point A, point B, point C);
 real exradius(side side);
-abscissa nodabscissa(real x);
-abscissa nodabscissa(int x);
-abscissa nodabscissa(line l, point M);
-abscissa nodabscissa(circle c, point M);
-abscissa nodabscissa(ellipse el, point M);
-abscissa nodabscissa(parabola p, point M);
-abscissa nodabscissa(conic co, point M);
-abscissa nodabscissa(arc a, point M);
-coordsys coordsys(line l);
-coordsys coordsys(conic co);
-coordsys coordsys(ellipse el);
-pair coordinates(point M);
-real length(explicit point M);
-real length(segment s);
-int arcnodesnumber(explicit arc a);
-int nodesystem;
-bool collinear(vector u, vector v);
-point centroid(point A, point B, point C);
-point centroid(triangle t);
-int angularsystem;
+triangle orthic(triangle t);
+void markangle(picture pic=<default>, Label L=<default>, int n=<default>, real radius=<default>, real space=<default>, explicit line l1, explicit line l2, explicit pair align=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, pen p=<default>, filltype filltype=<default>, marginT margin(path, pen)=<default>, marker marker=<default>);
+void markangle(picture pic=<default>, Label L=<default>, int n=<default>, real radius=<default>, real space=<default>, explicit line l1, explicit line l2, explicit vector align, bool arrow(picture, path, pen, marginT(path, pen))=<default>, pen p=<default>, filltype filltype=<default>, marginT margin(path, pen)=<default>, marker marker=<default>);
 path square(pair z1, pair z2);
-point symmedian(triangle t);
-point symmedian(side side);
-line symmedian(vertex V);
+line Oy(coordsys R=<default>);
+line Oy;
+inversion inversion(real k, point C);
+inversion inversion(point C, real k);
+inversion inversion(circle c1, circle c2, real sgn=<default>);
+inversion inversion(circle c1, circle c2, circle c3);
+inversion inversion(circle c);
+void drawline(picture pic=<default>, triangle t, pen p=<default>);
+path fromCenter(conic co, real angle1, real angle2, int n, bool direction);
+circle circumcircle(point A, point B, point C);
+circle circumcircle(triangle t);
+segment segment(point A, point B);
+segment segment(line l);
+segment segment(explicit side side);
 triangle symmedial(triangle t);
 int curvilinearsystem;
 bqe bqe(coordsys R=<default>, real a, real b, real c, real d, real e, real f);
 bqe bqe(point M1, point M2, point M3, point M4, point M5);
-arc arccircle(point A, point M, point B);
-arc arccircle(point A, point B, real angle, bool direction=<default>);
-point relpoint(line l, real x);
-point relpoint(explicit circle c, real x);
-point relpoint(explicit ellipse el, real x);
-point relpoint(explicit parabola p, real x);
-point relpoint(explicit hyperbola h, real x);
-point relpoint(explicit conic co, explicit real x);
-point relpoint(explicit conic co, explicit int x);
-point relpoint(arc a, real x);
-point changecoordsys(coordsys R, point M);
-vector changecoordsys(coordsys R, vector v);
-line changecoordsys(coordsys R, line l);
-bqe changecoordsys(coordsys R, bqe bqe);
-conic changecoordsys(coordsys R, conic co);
+point radicalcenter(circle c1, circle c2);
+point radicalcenter(circle c1, circle c2, circle c3);
+point symmedian(triangle t);
+point symmedian(side side);
+line symmedian(vertex V);
+string defaultmassformat;
 real angle(explicit point M, coordsys R=<default>, bool warn=<default>);
 real angle(explicit vector v, coordsys R=<default>, bool warn=<default>);
 real angle(line l, coordsys R=<default>);
 real angle(line l1, line l2);
 real angle(arc a);
-point[] fermat(triangle t);
-real arclength(circle c);
-real arclength(ellipse el);
-real arclength(ellipse el, real angle1, real angle2, bool direction=<default>, path polarconicroutine(conic co, real angle1, real angle2, int n, bool direction)=<default>);
-real arclength(parabola p, real angle);
-real arclength(parabola p, real angle1, real angle2);
-real arclength(parabola p);
-real arclength(arc a);
-line reverse(line l);
-arc reverse(arc a);
-point gergonne(triangle t);
-real focusToCenter(ellipse el, real a);
-hyperbola hyperbola(point P1, point P2, real ae, bool byfoci=<default>);
-hyperbola hyperbola(point C, real a, real b, real angle=<default>);
-hyperbola hyperbola(bqe bqe);
-hyperbola hyperbola(point M1, point M2, point M3, point M4, point M5);
-side opposite(vertex V);
-vertex opposite(side side);
-int hyperbolanodesnumber(hyperbola h, real angle1, real angle2);
-path polarconicroutine(conic co, real angle1, real angle2, int n, bool direction)(conic co);
-int hyperbolanodesnumberfactor;
-line parallel(point M, line l);
-line parallel(point M, explicit vector dir);
-line parallel(point M, explicit pair dir);
-bool parallel(line l1, line l2, bool strictly=<default>);
-transform projection(point A, point B);
-transform projection(point A, point B, point C, point D, bool safe=<default>);
-transform projection(line l);
-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>);
-line line(point A=<default>, real a);
-line line(int a, point A=<default>);
-line line(coordsys R=<default>, real slope, real origin);
-line line(coordsys R=<default>, real a, real b, real c);
-line line(circle c);
-line line(explicit side side);
+real degrees(explicit point M, coordsys R=<default>, bool warn=<default>);
+real degrees(vector v, coordsys R=<default>, bool warn=<default>);
+real degrees(line l, coordsys R=<default>);
+real degrees(line l1, line l2);
+real degrees(arc a);
+bqe canonical(bqe bqe);
+point arcsubtendedcenter(point A, point B, real angle);
+transform rotateO(real a);
+point centroid(point A, point B, point C);
+point centroid(triangle t);
+coordsys coordsys(line l);
+coordsys coordsys(conic co);
+coordsys coordsys(ellipse el);
+void markrightangle(picture pic=<default>, point A, point O, point B, real size=<default>, pen p=<default>, marginT margin(path, pen)=<default>, filltype filltype=<default>);
 line complementary(explicit line l);
 line[] complementary(explicit segment s);
 arc complementary(arc a);
-point ppoint(arc a, real x);
-path fromFocus(conic co, real angle1, real angle2, int n, bool direction);
-bool sameside(point M, point N, point O);
-bool sameside(point M, point P, line l);
-point[] sameside(point M, line l1, line l2);
-arc arcsubtended(point A, point B, real angle);
-void distance(picture pic=<default>, Label L=<default>, point A, point B, bool rotated=<default>, real offset=<default>, pen p=<default>, pen joinpen=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>);
-real distance(point M, line l);
-real distance(line l, point M);
-point incenter(point A, point B, point C);
-point incenter(triangle t);
-void write(explicit line l);
-void write(explicit segment s);
-void write(trilinear tri);
-triangle incentral(triangle t);
-point arcsubtendedcenter(point A, point B, real angle);
-circle circle(explicit point C, real r);
-circle circle(point A, point B);
-circle circle(segment s);
-circle circle(point A, point B, point C);
-circle circle(triangle t);
-circle circle(inversion i);
-point angpoint(conic co, real angle);
-point angpoint(explicit circle c, real x);
-point angpoint(explicit ellipse el, real x, path polarconicroutine(conic co, real angle1, real angle2, int n, bool direction)=<default>);
-point angpoint(explicit parabola p, real x);
-point angpoint(explicit hyperbola h, real x, path polarconicroutine(conic co, real angle1, real angle2, int n, bool direction)=<default>);
-point angpoint(arc a, real angle);
-triangle orthic(triangle t);
-int circlenodesnumber(real r);
-int circlenodesnumber(real r, real angle1, real angle2);
-path compassmark(pair O, pair A, real position, real angle=<default>);
+triangle triangle(line l1, line l2, line l3);
+void perpendicularmark(picture pic=<default>, point z, explicit pair align, explicit pair dir=<default>, real size=<default>, pen p=<default>, marginT margin(path, pen)=<default>, filltype filltype=<default>);
+void perpendicularmark(picture pic=<default>, point z, vector align, vector dir=<default>, real size=<default>, pen p=<default>, marginT margin(path, pen)=<default>, filltype filltype=<default>);
+void perpendicularmark(picture pic=<default>, point z, explicit pair align, path g, real size=<default>, pen p=<default>, marginT margin(path, pen)=<default>, filltype filltype=<default>);
+void perpendicularmark(picture pic=<default>, point z, vector align, path g, real size=<default>, pen p=<default>, marginT margin(path, pen)=<default>, filltype filltype=<default>);
+void perpendicularmark(picture pic=<default>, line l1, line l2, real size=<default>, pen p=<default>, int quarter=<default>, marginT margin(path, pen)=<default>, filltype filltype=<default>);
 bool byvertices;
-int circlenodesnumberfactor;
-transform xscale(real k, point M);
-transform yscale(real k, point M);
 transform scale(real k, point M);
 transform scale(real k, point A, point B, point C, point D, bool safe=<default>);
 transform scale(real k, line l1, line l2, bool safe=<default>);
-point operator +(explicit point P1, explicit point P2);
-point operator +(explicit point P1, explicit pair p2);
-point operator +(explicit pair p1, explicit point p2);
-point operator +(point M, explicit vector v);
-point operator +(explicit pair m, explicit vector v);
-vector operator +(explicit vector v1, explicit vector v2);
-line operator +(line l, vector u);
-conic operator +(conic c, explicit point M);
-conic operator +(conic c, explicit pair m);
-conic operator +(conic c, vector v);
-circle operator +(explicit circle c, explicit point M);
-circle operator +(explicit circle c, pair m);
-circle operator +(explicit circle c, vector m);
-abscissa operator +(real x, explicit abscissa a);
-abscissa operator +(explicit abscissa a, real x);
-abscissa operator +(int x, explicit abscissa a);
-arc operator +(explicit arc a, point M);
-arc operator +(explicit arc a, vector v);
-mass operator +(mass M1, mass M2);
-mass operator +(explicit mass M, real x);
-mass operator +(explicit mass M, int x);
 point operator -(explicit point P);
 point operator -(explicit point P1, explicit point P2);
 point operator -(explicit point P1, explicit pair p2);
@@ -2546,6 +2417,49 @@
 mass operator -(mass M1, mass M2);
 mass operator -(explicit mass M, real x);
 mass operator -(explicit mass M, int x);
+real inradius(point A, point B, point C);
+real inradius(triangle t);
+int conicnodesnumber(conic co, real angle1, real angle2, bool dir=<default>);
+int parabolanodesnumberfactor;
+mass masscenter(... mass[] M);
+bool finite(explicit point p);
+bool defined(point P);
+int conicnodesfactor;
+coordsys canonicalcartesiansystem(ellipse el);
+coordsys canonicalcartesiansystem(parabola p);
+coordsys canonicalcartesiansystem(hyperbola h);
+coordsys canonicalcartesiansystem(explicit conic co);
+int ellipsenodesnumber(real a, real b);
+int ellipsenodesnumber(real a, real b, real angle1, real angle2, bool dir);
+bool sameside(point M, point N, point O);
+bool sameside(point M, point P, line l);
+point[] sameside(point M, line l1, line l2);
+void addMargins(picture pic=<default>, real lmargin=<default>, real bmargin=<default>, real rmargin=<default>, real tmargin=<default>, bool rigid=<default>, bool allObject=<default>);
+point intersectionpoint(line l1, line l2);
+line[] operator ^^(line l1, line l2);
+line[] operator ^^(line l1, line[] l2);
+line[] operator ^^(line[] l2, line l1);
+line[] operator ^^(line[] l1, line[] l2);
+triangle[] operator ^^(triangle[] t1, triangle t2);
+triangle[] operator ^^(... triangle[] t);
+point[] standardizecoordsys(coordsys R=<default>, bool warn=<default> ... point[] M);
+real focusToCenter(ellipse el, real a);
+real EPS;
+triangle medial(triangle t);
+abscissa angabscissa(real x, path polarconicroutine(conic co, real angle1, real angle2, int n, bool direction)=<default>);
+abscissa angabscissa(int x, path polarconicroutine(conic co, real angle1, real angle2, int n, bool direction)=<default>);
+abscissa angabscissa(circle c, point M);
+abscissa angabscissa(ellipse el, point M, path polarconicroutine(conic co, real angle1, real angle2, int n, bool direction)=<default>);
+abscissa angabscissa(hyperbola h, point M, path polarconicroutine(conic co, real angle1, real angle2, int n, bool direction)=<default>);
+abscissa angabscissa(parabola p, point M);
+abscissa angabscissa(explicit conic co, point M);
+abscissa angabscissa(arc a, point M);
+real perpfactor;
+void distance(picture pic=<default>, Label L=<default>, point A, point B, bool rotated=<default>, real offset=<default>, pen p=<default>, pen joinpen=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>);
+real distance(point M, line l);
+real distance(line l, point M);
+point midpoint(segment s);
+point midpoint(side side);
 transform xscaleO(real x);
 pair operator *(coordsys R, pair p);
 path operator *(coordsys R, path g);
@@ -2584,6 +2498,151 @@
 circle operator *(inversion i, circle c);
 arc operator *(inversion i, segment s);
 path operator *(inversion i, triangle t);
+point operator +(explicit point P1, explicit point P2);
+point operator +(explicit point P1, explicit pair p2);
+point operator +(explicit pair p1, explicit point p2);
+point operator +(point M, explicit vector v);
+point operator +(explicit pair m, explicit vector v);
+vector operator +(explicit vector v1, explicit vector v2);
+line operator +(line l, vector u);
+conic operator +(conic c, explicit point M);
+conic operator +(conic c, explicit pair m);
+conic operator +(conic c, vector v);
+circle operator +(explicit circle c, explicit point M);
+circle operator +(explicit circle c, pair m);
+circle operator +(explicit circle c, vector m);
+abscissa operator +(real x, explicit abscissa a);
+abscissa operator +(explicit abscissa a, real x);
+abscissa operator +(int x, explicit abscissa a);
+arc operator +(explicit arc a, point M);
+arc operator +(explicit arc a, vector v);
+mass operator +(mass M1, mass M2);
+mass operator +(explicit mass M, real x);
+mass operator +(explicit mass M, int x);
+circle incircle(point A, point B, point C);
+circle incircle(triangle t);
+bool operator @(point m, line l);
+bool operator @(point M, conic co);
+bool operator @(point M, explicit circle c);
+bool operator @(point M, arc a);
+triangle triangleAbc(real alpha, real b, real c, real angle=<default>, point A=<default>);
+line reverse(line l);
+arc reverse(arc a);
+bool operator !=(explicit point M, explicit point N);
+bool operator !=(line l1, line l2);
+abscissa curabscissa(real x);
+abscissa curabscissa(int x);
+abscissa curabscissa(line l, point M);
+abscissa curabscissa(circle c, point M);
+abscissa curabscissa(ellipse el, point M);
+abscissa curabscissa(parabola p, point M);
+abscissa curabscissa(conic co, point M);
+abscissa curabscissa(arc a, point M);
+line median(vertex V);
+line median(side side);
+real elle(real phi, real k);
+void draw(picture pic=<default>, Label L=<default>, line l, bool dirA=<default>, bool dirB=<default>, align align=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, Label legend=<default>, marker marker=<default>, path pathModifier(path)=<default>);
+void draw(picture pic=<default>, Label[] L=<default>, line[] l, align align=<default>, pen[] p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, Label[] legend=<default>, marker marker=<default>, path pathModifier(path)=<default>);
+void draw(picture pic=<default>, Label[] L=<default>, line[] l, align align=<default>, pen p, bool arrow(picture, path, pen, marginT(path, pen))=<default>, Label[] legend=<default>, marker marker=<default>, path pathModifier(path)=<default>);
+void draw(picture pic=<default>, Label L=<default>, circle c, align align=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, bool bar(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, Label legend=<default>, marker marker=<default>);
+void draw(picture pic=<default>, Label L=<default>, ellipse el, align align=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, bool bar(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, Label legend=<default>, marker marker=<default>);
+void draw(picture pic=<default>, Label L=<default>, parabola parabola, align align=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, bool bar(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, Label legend=<default>, marker marker=<default>);
+void draw(picture pic=<default>, Label L=<default>, hyperbola h, align align=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, bool bar(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, Label legend=<default>, marker marker=<default>);
+void draw(picture pic=<default>, Label L=<default>, explicit conic co, align align=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, bool bar(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, Label legend=<default>, marker marker=<default>);
+void draw(picture pic=<default>, Label L=<default>, arc a, align align=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, bool bar(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, Label legend=<default>, marker marker=<default>);
+void draw(picture pic=<default>, triangle t, pen p=<default>, marker marker=<default>);
+void draw(picture pic=<default>, triangle[] t, pen p=<default>, marker marker=<default>);
+pair[] intersectionpoints(pair A, pair B, real a, real b, real c, real d, real f, real g);
+pair[] intersectionpoints(pair A, pair B, real[] equation);
+point[] intersectionpoints(line l, path g);
+point[] intersectionpoints(bqe bqe1, bqe bqe2);
+point[] intersectionpoints(triangle t, line l, bool extended=<default>);
+point[] intersectionpoints(line l, triangle t, bool extended=<default>);
+point[] intersectionpoints(line l, circle c);
+point[] intersectionpoints(circle c, line l);
+point[] intersectionpoints(line l, ellipse el);
+point[] intersectionpoints(ellipse el, line l);
+point[] intersectionpoints(line l, parabola p);
+point[] intersectionpoints(parabola p, line l);
+point[] intersectionpoints(line l, hyperbola h);
+point[] intersectionpoints(hyperbola h, line l);
+point[] intersectionpoints(line l, conic co);
+point[] intersectionpoints(conic co, line l);
+point[] intersectionpoints(conic co1, conic co2);
+point[] intersectionpoints(triangle t, conic co, bool extended=<default>);
+point[] intersectionpoints(conic co, triangle t, bool extended=<default>);
+point[] intersectionpoints(ellipse a, ellipse b);
+point[] intersectionpoints(ellipse a, circle b);
+point[] intersectionpoints(circle a, ellipse b);
+point[] intersectionpoints(ellipse a, parabola b);
+point[] intersectionpoints(parabola a, ellipse b);
+point[] intersectionpoints(ellipse a, hyperbola b);
+point[] intersectionpoints(hyperbola a, ellipse b);
+point[] intersectionpoints(circle a, parabola b);
+point[] intersectionpoints(parabola a, circle b);
+point[] intersectionpoints(circle a, hyperbola b);
+point[] intersectionpoints(hyperbola a, circle b);
+point[] intersectionpoints(parabola a, parabola b);
+point[] intersectionpoints(parabola a, hyperbola b);
+point[] intersectionpoints(hyperbola a, parabola b);
+point[] intersectionpoints(hyperbola a, hyperbola b);
+point[] intersectionpoints(circle c1, circle c2);
+point[] intersectionpoints(conic co, arc a);
+point[] intersectionpoints(arc a, conic co);
+point[] intersectionpoints(arc a1, arc a2);
+point[] intersectionpoints(line l, arc a);
+point[] intersectionpoints(arc a, line l);
+trilinear trilinear(triangle t, real a, real b, real c);
+trilinear trilinear(triangle t, point M);
+trilinear trilinear(triangle t, real f(real, real, real), real a=<default>, real b=<default>, real c=<default>);
+point bisectorpoint(side side);
+real rd(real x, real y, real z);
+point point(coordsys R, pair p, real m=<default>);
+point point(explicit pair p, real m);
+point point(coordsys R, explicit point M, real m=<default>);
+point point(explicit vector u);
+point point(circle c, abscissa l);
+point point(ellipse el, abscissa l);
+point point(parabola p, abscissa l);
+point point(hyperbola h, abscissa l);
+point point(explicit conic co, abscissa l);
+point point(line l, abscissa x);
+point point(line l, explicit real x);
+point point(line l, explicit int x);
+point point(explicit circle c, explicit real x);
+point point(explicit circle c, explicit int x);
+point point(explicit ellipse el, explicit real x);
+point point(explicit ellipse el, explicit int x);
+point point(explicit parabola p, explicit real x);
+point point(explicit parabola p, explicit int x);
+point point(explicit hyperbola h, explicit real x);
+point point(explicit hyperbola h, explicit int x);
+point point(explicit conic co, explicit real x);
+point point(explicit conic co, explicit int x);
+point point(arc a, abscissa l);
+point point(arc a, real x);
+pair point(explicit arc a, int x);
+point point(explicit mass m);
+point point(explicit vertex V);
+point point(trilinear tri);
+point point(circle c, point M);
+point point(circle c, explicit vector v);
+int[] numarray;
+arc arccircle(point A, point M, point B);
+arc arccircle(point A, point B, real angle, bool direction=<default>);
+point relpoint(line l, real x);
+point relpoint(explicit circle c, real x);
+point relpoint(explicit ellipse el, real x);
+point relpoint(explicit parabola p, real x);
+point relpoint(explicit hyperbola h, real x);
+point relpoint(explicit conic co, explicit real x);
+point relpoint(explicit conic co, explicit int x);
+point relpoint(arc a, real x);
+bool operator ==(coordsys c1, coordsys c2);
+bool operator ==(explicit point M, explicit point N);
+bool operator ==(explicit vector u, explicit vector v);
+bool operator ==(line l1, line l2);
+int nodesystem;
 transform yscaleO(real x);
 coordsys operator init();
 point operator init();
@@ -2602,6 +2661,36 @@
 triangle operator init();
 trilinear operator init();
 inversion operator init();
+real sharpangle(line l1, line l2);
+point isogonal(side side, point M);
+line isogonal(vertex V, point M);
+triangle isogonal(triangle t, point M);
+bqe equation(ellipse el);
+bqe equation(parabola p);
+bqe equation(hyperbola h);
+bqe equation(explicit conic co);
+void dot(picture pic=<default>, Label L, explicit point Z, align align=<default>, string format=<default>, pen p=<default>);
+real dot(point A, point B);
+real dot(point A, explicit pair B);
+real dot(explicit pair A, point B);
+void dot(picture pic=<default>, Label L, explicit mass M, align align=<default>, string format=<default>, pen p=<default>);
+void dot(picture pic=<default>, triangle t, pen p=<default>);
+arc arc(ellipse el, real angle1, real angle2, path polarconicroutine(conic co, real angle1, real angle2, int n, bool direction)=<default>, bool direction=<default>);
+arc arc(ellipse el, explicit abscissa x1, explicit abscissa x2, bool direction=<default>);
+arc arc(ellipse el, point M, point N, bool direction=<default>);
+arc arc(explicit arc a, abscissa x1, abscissa x2);
+arc arc(explicit arc a, point M, point N);
+path arc(explicit pair B, explicit pair A, explicit pair C, real r);
+triangle antipedal(triangle t, point M);
+line tangent(circle c, abscissa x);
+line tangent(circle c, point M);
+line tangent(circle c, explicit vector v);
+line tangent(ellipse el, abscissa x);
+line tangent(parabola p, abscissa x);
+line tangent(hyperbola h, abscissa x);
+line tangent(explicit arc a, abscissa x);
+line tangent(explicit arc a, point M);
+bool byfoci;
 pair operator cast(point P);
 pair[] operator cast(point[] P);
 point operator cast(pair p);
@@ -2647,133 +2736,14 @@
 point operator cast(trilinear tri);
 circle operator cast(inversion i);
 inversion operator cast(circle c);
-void lineinversion();
-pair operator /(pair p, coordsys R);
-point operator /(explicit point P, real x);
-point operator /(real x, explicit point P);
-vector operator /(explicit vector v, real x);
-line operator /(line l, real x);
-line operator /(line l, int x);
-circle operator /(explicit circle c, real x);
-circle operator /(explicit circle c, int x);
-ellipse operator /(ellipse el, real x);
-abscissa operator /(real x, explicit abscissa a);
-abscissa operator /(explicit abscissa a, real x);
-abscissa operator /(int x, explicit abscissa a);
-arc operator /(explicit arc a, real x);
-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);
-bool operator ==(coordsys c1, coordsys c2);
-bool operator ==(explicit point M, explicit point N);
-bool operator ==(explicit vector u, explicit vector v);
-bool operator ==(line l1, line l2);
-bool operator !=(explicit point M, explicit point N);
-bool operator !=(line l1, line l2);
-line[] operator ^^(line l1, line l2);
-line[] operator ^^(line l1, line[] l2);
-line[] operator ^^(line[] l2, line l1);
-line[] operator ^^(line[] l1, line[] l2);
-triangle[] operator ^^(triangle[] t1, triangle t2);
-triangle[] operator ^^(... triangle[] t);
-real elle(real phi, real k);
-point excenter(point A, point B, point C);
-point excenter(side side);
-mass mass(point M, real m);
-mass mass(explicit point P);
-mass mass(coordsys R, explicit pair p, real m);
-bool operator @(point m, line l);
-bool operator @(point M, conic co);
-bool operator @(point M, explicit circle c);
-bool operator @(point M, arc a);
-triangle triangle(line l1, line l2, line l3);
-trilinear trilinear(triangle t, real a, real b, real c);
-trilinear trilinear(triangle t, point M);
-trilinear trilinear(triangle t, real f(real, real, real), real a=<default>, real b=<default>, real c=<default>);
-triangle triangleAbc(real alpha, real b, real c, real angle=<default>, point A=<default>);
-triangle triangleabc(real a, real b, real c, real angle=<default>, point A=<default>);
-triangle anticomplementary(triangle t);
-vector dir(vertex V);
-real degrees(explicit point M, coordsys R=<default>, bool warn=<default>);
-real degrees(vector v, coordsys R=<default>, bool warn=<default>);
-real degrees(line l, coordsys R=<default>);
-real degrees(line l1, line l2);
-real degrees(arc a);
-real linemargin;
-real linemargin();
-triangle cevian(triangle t, point P);
-point cevian(side side, point P);
-line cevian(vertex V, point P);
-line Oy(coordsys R=<default>);
-line Oy;
-path fromCenter(conic co, real angle1, real angle2, int n, bool direction);
-void markarc(picture pic=<default>, Label L=<default>, int n=<default>, real radius=<default>, real space=<default>, arc a, pen sectorpen=<default>, pen markpen=<default>, marginT margin(path, pen)=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marker marker=<default>);
-real approximate(real t);
-real[] approximate(real[] T);
-void markangle(picture pic=<default>, Label L=<default>, int n=<default>, real radius=<default>, real space=<default>, explicit line l1, explicit line l2, explicit pair align=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, pen p=<default>, filltype filltype=<default>, marginT margin(path, pen)=<default>, marker marker=<default>);
-void markangle(picture pic=<default>, Label L=<default>, int n=<default>, real radius=<default>, real space=<default>, explicit line l1, explicit line l2, explicit vector align, bool arrow(picture, path, pen, marginT(path, pen))=<default>, pen p=<default>, filltype filltype=<default>, marginT margin(path, pen)=<default>, marker marker=<default>);
-transform hprojection(line l, bool safe=<default>);
-point conj(explicit point M);
-vector conj(explicit vector u);
-hyperbola conj(hyperbola h);
-transform vprojection(line l, bool safe=<default>);
-parabola parabola(point F, line l);
-parabola parabola(point F, point vertex);
-parabola parabola(point F, real a, real angle);
-parabola parabola(bqe bqe);
-parabola parabola(point M1, point M2, point M3, line l);
-parabola parabola(point M1, point M2, point M3, point M4, point M5);
-bool onpath(picture pic=<default>, path g, point M, pen p=<default>);
-int parabolanodesnumber(parabola p, real angle1, real angle2);
-int parabolanodesnumberfactor;
-path NoModifier(path);
-coordsys currentcoordsys;
-point foot(vertex V);
-point foot(side side);
-path currentpolarconicroutine(conic co, real angle1, real angle2, int n, bool direction);
-transform rotate(explicit pair dir);
-transform rotate(explicit vector dir);
-transform rotate(explicit point dir);
-real EPS;
-transform rotateO(real a);
-pair attract(pair m, path g, real fuzz=<default>);
-point attract(point M, path g, real fuzz=<default>);
-real[] bangles(picture pic=<default>, parabola p);
-real[][] bangles(picture pic=<default>, hyperbola h);
-line perpendicular(point M, line l);
-line perpendicular(point M, explicit vector normal);
-line perpendicular(point M, explicit pair normal);
-bool perpendicular(line l1, line l2);
-void perpendicular(picture pic=<default>, pair z, pair align, pair dir=<default>, real size=<default>, pen p=<default>, marginT margin(path, pen)=<default>, filltype filltype=<default>);
-void perpendicular(picture pic=<default>, pair z, pair align, path g, real size=<default>, pen p=<default>, marginT margin(path, pen)=<default>, filltype filltype=<default>);
-real binomial(real n, real k);
-void perpendicularmark(picture pic=<default>, point z, explicit pair align, explicit pair dir=<default>, real size=<default>, pen p=<default>, marginT margin(path, pen)=<default>, filltype filltype=<default>);
-void perpendicularmark(picture pic=<default>, point z, vector align, vector dir=<default>, real size=<default>, pen p=<default>, marginT margin(path, pen)=<default>, filltype filltype=<default>);
-void perpendicularmark(picture pic=<default>, point z, explicit pair align, path g, real size=<default>, pen p=<default>, marginT margin(path, pen)=<default>, filltype filltype=<default>);
-void perpendicularmark(picture pic=<default>, point z, vector align, path g, real size=<default>, pen p=<default>, marginT margin(path, pen)=<default>, filltype filltype=<default>);
-void perpendicularmark(picture pic=<default>, line l1, line l2, real size=<default>, pen p=<default>, int quarter=<default>, marginT margin(path, pen)=<default>, filltype filltype=<default>);
-void Drawline(picture pic=<default>, Label L=<default>, pair P, bool dirP=<default>, pair Q, bool dirQ=<default>, align align=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, Label legend=<default>, marker marker=<default>, path pathModifier(path)=<default>);
-bool simeq(point A, point B, real fuzz=<default>);
-bool simeq(point a, real b, real fuzz=<default>);
-point inverse(real k, point A, point M);
-circle inverse(real k, point A, line l);
-circle inverse(real k, point A, circle c);
-arc inverse(real k, point A, segment s);
-inversion inversion(real k, point C);
-inversion inversion(point C, real k);
-inversion inversion(circle c1, circle c2, real sgn=<default>);
-inversion inversion(circle c1, circle c2, circle c3);
-inversion inversion(circle c);
-coordsys cartesiansystem(pair O=<default>, pair i, pair j);
-line tangent(circle c, abscissa x);
-line tangent(circle c, point M);
-line tangent(circle c, explicit vector v);
-line tangent(ellipse el, abscissa x);
-line tangent(parabola p, abscissa x);
-line tangent(hyperbola h, abscissa x);
-line tangent(explicit arc a, abscissa x);
-line tangent(explicit arc a, point M);
+path arcfromcenter(ellipse el, real angle1, real angle2, bool direction=<default>, int n=<default>);
+path arcfromcenter(hyperbola h, real angle1, real angle2, int n=<default>, bool direction=<default>);
+path arcfromcenter(explicit conic co, real angle1, real angle2, int n, bool direction=<default>);
+line vline(coordsys R=<default>);
+line vline;
+line isotomic(vertex V, point M);
+point isotomic(side side, point M);
+triangle isotomic(triangle t, point M);
 line[] tangents(circle c, point M);
 line[] tangents(ellipse el, point M);
 line[] tangents(parabola p, point M);
@@ -2780,40 +2750,114 @@
 line[] tangents(hyperbola h, point M);
 point isogonalconjugate(triangle t, point M);
 real centerToFocus(ellipse el, real a);
-point isogonal(side side, point M);
-line isogonal(vertex V, point M);
-triangle isogonal(triangle t, point M);
-bqe equation(ellipse el);
-bqe equation(parabola p);
-bqe equation(hyperbola h);
-bqe equation(explicit conic co);
+pen addpenarc;
+pen addpenarc(pen p);
+int[] tricoef(side side);
+real[] intersect(path g, explicit pair p, real fuzz=<default>);
+real[] intersect(path g, explicit point P, real fuzz=<default>);
+point incenter(point A, point B, point C);
+point incenter(triangle t);
+void write(explicit line l);
+void write(explicit segment s);
+void write(trilinear tri);
+path arctopath(arc a, int n);
+bool inside(ellipse el, point M);
+bool inside(parabola p, point M);
+void label(picture pic=<default>, Label L, explicit mass M, align align=<default>, string format=<default>, pen p=<default>, filltype filltype=<default>);
+void label(picture pic=<default>, Label L, vertex V, pair align=<default>, real alignFactor=<default>, pen p=<default>, filltype filltype=<default>);
+void label(picture pic=<default>, Label LA=<default>, Label LB=<default>, Label LC=<default>, triangle t, real alignAngle=<default>, real alignFactor=<default>, pen p=<default>, filltype filltype=<default>);
+path fromFocus(conic co, real angle1, real angle2, int n, bool direction);
+line hline(coordsys R=<default>);
+line hline;
 triangle tangential(triangle t);
 triangle pedal(triangle t, point M);
 line pedal(side side, point M);
 string massformat(string format=<default>, string s, mass M);
+coordsys defaultcoordsys;
+point intouch(side side);
+triangle intouch(triangle t);
+point orthocentercenter(point A, point B, point C);
+point orthocentercenter(triangle t);
+real rf(real x, real y, real z);
+abscissa nodabscissa(real x);
+abscissa nodabscissa(int x);
+abscissa nodabscissa(line l, point M);
+abscissa nodabscissa(circle c, point M);
+abscissa nodabscissa(ellipse el, point M);
+abscissa nodabscissa(parabola p, point M);
+abscissa nodabscissa(conic co, point M);
+abscissa nodabscissa(arc a, point M);
 int relativesystem;
-void drawline(picture pic=<default>, triangle t, pen p=<default>);
-void addMargins(picture pic=<default>, real lmargin=<default>, real bmargin=<default>, real rmargin=<default>, real tmargin=<default>, bool rigid=<default>, bool allObject=<default>);
-triangle medial(triangle t);
-line median(vertex V);
-line median(side side);
-void show(picture pic=<default>, Label lo=<default>, Label li=<default>, Label lj=<default>, coordsys R, pen dotpen=<default>, pen xpen=<default>, pen ypen=<default>, pen ipen=<default>, pen jpen=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>);
-void show(Label L, vector v, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>);
-void show(picture pic=<default>, line l, pen p=<default>);
-void show(picture pic=<default>, Label LA=<default>, Label LB=<default>, Label LC=<default>, Label La=<default>, Label Lb=<default>, Label Lc=<default>, triangle t, pen p=<default>, filltype filltype=<default>);
-line isotomic(vertex V, point M);
-point isotomic(side side, point M);
-triangle isotomic(triangle t, point M);
-abscissa curabscissa(real x);
-abscissa curabscissa(int x);
-abscissa curabscissa(line l, point M);
-abscissa curabscissa(circle c, point M);
-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)[]);
+real[] bangles(picture pic=<default>, parabola p);
+real[][] bangles(picture pic=<default>, hyperbola h);
+bool onpath(picture pic=<default>, path g, point M, pen p=<default>);
+int circlenodesnumberfactor;
+transform xscale(real k, point M);
+point excenter(point A, point B, point C);
+point excenter(side side);
+mass mass(point M, real m);
+mass mass(explicit point P);
+mass mass(coordsys R, explicit pair p, real m);
+circle circle(explicit point C, real r);
+circle circle(point A, point B);
+circle circle(segment s);
+circle circle(point A, point B, point C);
+circle circle(triangle t);
+circle circle(inversion i);
+ellipse ellipse(point F1, point F2, real a);
+ellipse ellipse(point F1, point F2, point M);
+ellipse ellipse(point C, real a, real b, real angle=<default>);
+ellipse ellipse(bqe bqe);
+ellipse ellipse(point M1, point M2, point M3, point M4, point M5);
+transform projection(point A, point B);
+transform projection(point A, point B, point C, point D, bool safe=<default>);
+transform projection(line l);
+transform projection(line l1, line l2, bool safe=<default>);
+transform hprojection(line l, bool safe=<default>);
+vector dir(vertex V);
+hyperbola hyperbola(point P1, point P2, real ae, bool byfoci=<default>);
+hyperbola hyperbola(point C, real a, real b, real angle=<default>);
+hyperbola hyperbola(bqe bqe);
+hyperbola hyperbola(point M1, point M2, point M3, point M4, point M5);
+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>);
+void labelz3(picture pic=<default>, Label L=<default>, real z, 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 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>);
+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 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>);
+real ScaleZ(picture pic=<default>, real z);
+void zlimits(picture pic=<default>, real min=<default>, real max=<default>, bool crop=<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>);
+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 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 autoscale3(picture pic=<default>, void axis(picture, axisT));
+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>);
+triple defaultdir(triple X, triple Y, triple Z, bool opposite=<default>, projection P);
+void YZZero(picture, axisT)(triple align=<default>, bool extend=<default>);
+void YZZero(picture, axisT);
+void XYEquals(picture, axisT)(real x, real y, triple align=<default>, bool extend=<default>);
+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 Bounds(picture, axisT)(int type=<default>, int type2=<default>, triple align=<default>, bool extend=<default>);
+void Bounds(picture, axisT);
+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 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 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>);
+triple Dir(real)(triple dir);
+void labelx3(picture pic=<default>, Label L=<default>, real x, align align=<default>, string format=<default>, pen p=<default>);
+surface bispline(real[][] z, real[][] p, real[][] q, real[][] r, real[] x, real[] y, bool[][] cond=<default>);
+triple tickMax3(picture pic);
+triple tickMin3(picture pic);
+real ztrans(real[][] t, real z);
 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>);
@@ -2828,28 +2872,38 @@
 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 label(picture pic, Label L, triple v, real x, align align, string format, pen p);
+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 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>);
+void Spline(flatguide3)(... void(flatguide3)[]);
+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>);
+triple ticklabelshift(triple align, pen p=<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 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>);
+triple Scale(picture pic=<default>, triple v);
+triple polar(real r, real theta, real phi);
+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>);
+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 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 labely3(picture pic=<default>, Label L=<default>, real y, align align=<default>, string format=<default>, pen p=<default>);
+locateT operator init();
+path3[] segment(triple[] v, bool[] cond, void join(flatguide3)(... void(flatguide3)[])=<default>);
 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);
+void labeltick(picture pic, real[][] T, path3 g, ticklocate locate, real val, int sign, real Size, string ticklabel(real), Label F, real norm=<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>);
+bool vperiodic(triple[][] a);
+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>);
 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>);
@@ -2858,188 +2912,125 @@
 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 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 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);
+void Straight(flatguide3)(... void(flatguide3)[]);
 real xtrans(real[][] t, real x);
+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>);
 real ytrans(real[][] t, real y);
-real ztrans(real[][] t, real z);
+path3 Circle(triple c, real r, triple normal=<default>, int n=<default>);
 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>);
+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);
+bool uperiodic(triple[][] a);
+void polargraph(flatguide3)(real r(real, real), real theta(real), real phi(real), int n=<default>, void join(flatguide3)(... void(flatguide3)[])=<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);
-guide graph(pair f(real), real, real, int)(guide join(... guide[]));
-guide[] graph(pair f(real), real, real, int)(guide join(... guide[]), bool3 cond(real));
-guide graph(picture pic=<default>, real f(real), real a, real b, int n=<default>, real T(real)=<default>, guide join(... guide[])=<default>);
-guide[] graph(picture pic=<default>, real f(real), real a, real b, int n=<default>, real T(real)=<default>, bool3 cond(real), guide join(... guide[])=<default>);
-guide graph(picture pic=<default>, real x(real), real y(real), real a, real b, int n=<default>, real T(real)=<default>, guide join(... guide[])=<default>);
-guide[] graph(picture pic=<default>, real x(real), real y(real), real a, real b, int n=<default>, real T(real)=<default>, bool3 cond(real), guide join(... guide[])=<default>);
-guide graph(picture pic=<default>, pair z(real), real a, real b, int n=<default>, real T(real)=<default>, guide join(... guide[])=<default>);
-guide[] graph(picture pic=<default>, pair z(real), real a, real b, int n=<default>, real T(real)=<default>, bool3 cond(real), guide join(... guide[])=<default>);
-guide graph(picture pic=<default>, pair[] z, guide join(... guide[])=<default>);
-guide[] graph(picture pic=<default>, pair[] z, bool3[] cond, guide join(... guide[])=<default>);
-guide graph(picture pic=<default>, real[] x, real[] y, guide join(... guide[])=<default>);
-guide[] graph(picture pic=<default>, real[] x, real[] y, bool3[] cond, guide join(... guide[])=<default>);
-scientific scientific(real x);
-void Left(picture, axisT)(bool extend=<default>);
-void Left(picture, axisT);
-autoscaleT defaultS;
-void XEquals(picture, axisT)(real x, bool extend=<default>);
-void YEquals(picture, axisT)(real y, bool extend=<default>);
-string LogFormat(real)(int base);
-string LogFormat(real);
-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);
-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>);
-void errorbars(picture pic=<default>, real[] x, real[] y, real[] dpy, bool[] cond=<default>, pen p=<default>, real size=<default>);
-void xlimits(picture pic=<default>, real min=<default>, real max=<default>, bool crop=<default>);
-string conditionlength;
-void ylimits(picture pic=<default>, real min=<default>, real max=<default>, bool crop=<default>);
-tickvalues None(tickvalues v);
-scaleT Logarithmic;
-void limits(picture pic=<default>, pair min, pair max, bool crop=<default>);
-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);
-guide Straight(... guide[]);
-tickvalues OmitTick(tickvalues)(... real[] x);
-int Min;
-string trailingzero;
-void label(picture pic, Label L, pair z, real x, align align, string format, pen p);
-void labelx(picture pic=<default>, Label L=<default>, explicit pair z, align align=<default>, string format=<default>, pen p=<default>);
-void labelx(picture pic=<default>, Label L=<default>, real x, align align=<default>, string format=<default>, pen p=<default>);
-void labelx(picture pic=<default>, Label L, string format=<default>, explicit pen p=<default>);
+path Circle(pair c, real r, int n=<default>);
 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>);
+real maxlength(pair a, pair b, int nx, int ny);
+void errorbar(picture pic, pair z, pair dp, pair dm, pen p=<default>, real size=<default>);
+guide polargraph(picture pic=<default>, real r(real), real a, real b, int n=<default>, guide join(... guide[])=<default>);
+guide polargraph(picture pic=<default>, real[] r, real[] theta, guide join(... guide[])=<default>);
+void checkconditionlength(int x, int y);
+picture secondaryY(picture primary=<default>, void f(picture));
+picture secondaryX(picture primary=<default>, void f(picture));
+string noprimary;
 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>);
-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 labelx(picture pic=<default>, Label L=<default>, explicit pair z, align align=<default>, string format=<default>, pen p=<default>);
+void labelx(picture pic=<default>, Label L=<default>, real x, align align=<default>, string format=<default>, pen p=<default>);
+void labelx(picture pic=<default>, Label L, string format=<default>, explicit pen p=<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>);
-picture secondaryX(picture primary=<default>, void f(picture));
-picture secondaryY(picture primary=<default>, void f(picture));
-Label Break;
-tickvalues Break(tickvalues)(real, real);
-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 tick(picture pic=<default>, pair z, pair dir, real size=<default>, pen p=<default>);
+void tick(picture pic=<default>, Label L, real value, explicit pair z, pair dir, 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>);
-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);
-string Format(real)(string s=<default>);
-guide polargraph(picture pic=<default>, real r(real), real a, real b, int n=<default>, guide join(... guide[])=<default>);
-guide polargraph(picture pic=<default>, real[] r, real[] theta, guide join(... guide[])=<default>);
-void LeftTicks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<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 LeftTicks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<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 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>);
-bool axiscoverage(int N, transform T, path g, ticklocate locate, real Step, pair side, int sign, real Size, Label F, string ticklabel(real), real norm, real limit);
-scaleT Broken(real a, real b, bool automin=<default>, bool automax=<default>);
-scaleT BrokenLog(real a, real b, bool automin=<default>, bool automax=<default>);
+void limits(picture pic=<default>, pair min, pair max, bool crop=<default>);
+void crop(picture pic=<default>);
+string conditionlength;
+void ylimits(picture pic=<default>, real min=<default>, real max=<default>, bool crop=<default>);
+real ytrans(transform t, real y);
+void YEquals(picture, axisT)(real y, bool extend=<default>);
+real xtrans(transform t, real x);
+void Top(picture, axisT)(bool extend=<default>);
+void Top(picture, axisT);
+void Bottom(picture, axisT)(bool extend=<default>);
+void Bottom(picture, axisT);
+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>);
+int Max;
+int Value;
+void RightTicks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<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 RightTicks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<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 RightTicks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>);
+guide Straight(... guide[]);
+tickvalues OmitTick(tickvalues)(... real[] x);
+tickvalues OmitTickInterval(tickvalues)(real a, real b);
+tickvalues OmitTickIntervals(tickvalues)(real[] a, real[] b);
 void Ticks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<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 Ticks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<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>);
 void Ticks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<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 Ticks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<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 Ticks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>);
-string noprimary;
+bool logaxiscoverage(int N, transform T, path g, ticklocate locate, pair side, int sign, real Size, Label F, string ticklabel(real), real limit, int first, int last);
+void labelaxis(frame f, transform T, Label L, path g, ticklocate locate=<default>, int sign=<default>, bool ticklabels=<default>);
+ticklocate ticklocate(real a, real b, autoscaleT S=<default>, real tickmin=<default>, real tickmax=<default>, real time(real)=<default>, pair dir(real)=<default>);
+autoscaleT defaultS;
+string DefaultLogFormat(real)(int base);
+string DefaultLogFormat(real);
+string NoZeroFormat(real);
+string DefaultFormat(real);
+real upscale(real b, real a);
+scaleT Broken(real a, real b, bool automin=<default>, bool automax=<default>);
+bool axiscoverage(int N, transform T, path g, ticklocate locate, real Step, pair side, int sign, real Size, Label F, string ticklabel(real), real norm, real limit);
 void xequals(picture pic=<default>, Label L=<default>, real x, bool extend=<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>);
-void yequals(picture pic=<default>, Label L=<default>, real y, bool extend=<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>);
-pair Scale(picture pic=<default>, pair z);
-real ScaleX(picture pic=<default>, real x);
+void XEquals(picture, axisT)(real x, bool extend=<default>);
+pair zero(real);
+path[] segment(pair[] z, bool[] cond, guide join(... guide[])=<default>);
+pair ticklabelshift(pair align, pen p=<default>);
+void Right(picture, axisT)(bool extend=<default>);
+void Right(picture, axisT);
 real ScaleY(picture pic=<default>, real y);
-tickvalues generateticks(int sign, Label F=<default>, string ticklabel(real)=<default>, int N, int n=<default>, real Step=<default>, real step=<default>, real Size=<default>, real size=<default>, transform T, pair side, path g, real limit, pen p, ticklocate locate, int[] divisor, bool opposite);
-void checkconditionlength(int x, int y);
-real xtrans(transform t, real x);
-void Top(picture, axisT)(bool extend=<default>);
-void Top(picture, axisT);
-real ytrans(transform t, real y);
+guide Hermite(... guide[])(real[] splinetype(real[], real[]));
+guide Hermite(... guide[]);
+scaleT Logarithmic;
+string OmitFormat(real)(string s=<default> ... real[] x);
 void scale(picture pic=<default>, scaleT x, scaleT y=<default>, scaleT z=<default>);
 void scale(picture pic=<default>, bool xautoscale=<default>, bool yautoscale=<default>, bool zautoscale=<default>);
+tickvalues None(tickvalues v);
+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>);
+pair polar(real r, real theta);
+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>);
+void NoTicks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)();
+void NoTicks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>);
+void Left(picture, axisT)(bool extend=<default>);
+void Left(picture, axisT);
+void drawtick(frame f, transform T, path g, path g2, ticklocate locate, real val, real Size, int sign, pen p, bool extend);
+pair tickMax(picture pic);
+real linear(real)(real S(real x)=<default>, real Min, real Max);
+int Both;
+pair tickMin(picture pic);
+void yequals(picture pic=<default>, Label L=<default>, real y, bool extend=<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>);
+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>);
+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>);
+scaleT Linear;
+scaleT Linear(bool automin=<default>, bool automax=<default>, real s=<default>, real intercept=<default>);
+string LogFormat(real)(int base);
+string LogFormat(real);
+Label Break;
+tickvalues Break(tickvalues)(real, real);
+tickvalues NoZero(tickvalues);
 int[] divisors(int a, int b);
 scientific operator init();
 bounds operator init();
@@ -3047,149 +3038,168 @@
 locateT operator init();
 tickvalues operator init();
 axisT operator init();
-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;
-ticklocate ticklocate(real a, real b, autoscaleT S=<default>, real tickmin=<default>, real tickmax=<default>, real time(real)=<default>, pair dir(real)=<default>);
-pair ticklabelshift(pair align, pen p=<default>);
-pair zero(real);
-void Bottom(picture, axisT)(bool extend=<default>);
-void Bottom(picture, axisT);
-void BottomTop(picture, axisT)(bool extend=<default>);
-void BottomTop(picture, axisT);
-real zerotickfuzz;
-real upscale(real b, real a);
-bool logaxiscoverage(int N, transform T, path g, ticklocate locate, pair side, int sign, real Size, Label F, string ticklabel(real), real limit, int first, int last);
-string baselinetemplate;
-void NoTicks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)();
-void NoTicks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>);
-void tick(picture pic=<default>, pair z, pair dir, real size=<default>, pen p=<default>);
-void tick(picture pic=<default>, Label L, real value, explicit pair z, pair dir, string format=<default>, real size=<default>, pen p=<default>);
-int Value;
-scaleT Log;
-scaleT Log(bool automin=<default>, bool automax=<default>);
-void Right(picture, axisT)(bool extend=<default>);
-void Right(picture, axisT);
-void RightTicks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<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 RightTicks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<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 RightTicks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>);
-int Max;
 void XZero(picture, axisT)(bool extend=<default>);
 void XZero(picture, axisT);
+void LeftTicks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<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 LeftTicks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<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 LeftTicks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], 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>);
+string trailingzero;
+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>);
+real ScaleX(picture pic=<default>, real x);
+void xlimits(picture pic=<default>, real min=<default>, real max=<default>, bool crop=<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>);
+tickvalues generateticks(int sign, Label F=<default>, string ticklabel(real)=<default>, int N, int n=<default>, real Step=<default>, real step=<default>, real Size=<default>, real size=<default>, transform T, pair side, path g, real limit, pen p, ticklocate locate, int[] divisor, bool opposite);
+string autoformat(string format=<default>, real norm ... real[] a);
+pair Scale(picture pic=<default>, pair z);
+guide graph(pair f(real), real, real, int)(guide join(... guide[]));
+guide[] graph(pair f(real), real, real, int)(guide join(... guide[]), bool3 cond(real));
+guide graph(picture pic=<default>, real f(real), real a, real b, int n=<default>, real T(real)=<default>, guide join(... guide[])=<default>);
+guide[] graph(picture pic=<default>, real f(real), real a, real b, int n=<default>, real T(real)=<default>, bool3 cond(real), guide join(... guide[])=<default>);
+guide graph(picture pic=<default>, real x(real), real y(real), real a, real b, int n=<default>, real T(real)=<default>, guide join(... guide[])=<default>);
+guide[] graph(picture pic=<default>, real x(real), real y(real), real a, real b, int n=<default>, real T(real)=<default>, bool3 cond(real), guide join(... guide[])=<default>);
+guide graph(picture pic=<default>, pair z(real), real a, real b, int n=<default>, real T(real)=<default>, guide join(... guide[])=<default>);
+guide[] graph(picture pic=<default>, pair z(real), real a, real b, int n=<default>, real T(real)=<default>, bool3 cond(real), guide join(... guide[])=<default>);
+guide graph(picture pic=<default>, pair[] z, guide join(... guide[])=<default>);
+guide[] graph(picture pic=<default>, pair[] z, bool3[] cond, guide join(... guide[])=<default>);
+guide graph(picture pic=<default>, real[] x, real[] y, guide join(... guide[])=<default>);
+guide[] graph(picture pic=<default>, real[] x, real[] y, bool3[] cond, guide join(... guide[])=<default>);
+int Min;
+scaleT BrokenLog(real a, real b, bool automin=<default>, bool automax=<default>);
 void YZero(picture, axisT)(bool extend=<default>);
 void YZero(picture, axisT);
+scientific scientific(real x);
+guide Spline(... guide[]);
+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>);
+void errorbars(picture pic=<default>, real[] x, real[] y, real[] dpy, bool[] cond=<default>, pen p=<default>, real size=<default>);
 bounds autoscale(real Min, real Max, scaleT scale=<default>);
 void autoscale(picture pic=<default>, void axis(picture, axisT));
-guide Spline(... guide[]);
+scaleT Log;
+scaleT Log(bool automin=<default>, bool automax=<default>);
+string Format(real)(string s=<default>);
+string baselinetemplate;
+void label(picture pic, Label L, pair z, real x, align align, string format, pen p);
+void BottomTop(picture, axisT)(bool extend=<default>);
+void BottomTop(picture, axisT);
+real zerotickfuzz;
 void LeftRight(picture, axisT)(bool extend=<default>);
 void LeftRight(picture, axisT);
+real axiscoverage;
+real ylabelwidth;
+real Ticksize;
+int nmesh;
+int ngraph;
 bool Crop;
-int ngraph;
 real epsilon;
-real axiscoverage;
-real Ticksize;
 bool NoCrop;
+int nCircle;
 real ticksize;
-int nCircle;
-int nmesh;
-real ylabelwidth;
 real axislabelfactor;
+real[] monotonic(real[] x, real[] y);
 real[] clamped(real[], real[])(real slopea, real slopeb);
 real[] natural(real[] x, real[] y);
-real[] monotonic(real[] x, real[] y);
+real[] periodic(real[] x, real[] y);
+string differentlengths;
+string morepoints;
+void checklengths(int x, int y, string text=<default>);
 real[] notaknot(real[] x, real[] y);
 real[] linear(real[] x, real[] y);
-string morepoints;
 guide hermite(real[] x, real[] y, real[] splinetype(real[], real[])=<default>);
-void checklengths(int x, int y, string text=<default>);
 void checkincreasing(real[] x);
-real[] periodic(real[] x, real[] y);
-string differentlengths;
 real[] Spline(real[] x, real[] y);
 real[](real[], real[])[] Spline;
-grid3(picture pic)[] YXYgrid(position pos=<default>);
-grid3(picture pic)[] YXYgrid;
-grid3 operator init();
-ticksgridT operator init();
-grid3(picture pic)[] operator cast(grid3 gridroutine(picture pic));
-grid3(picture pic)[][] operator cast(grid3(picture pic)[] gridroutine);
-grid3(picture pic)[][] operator cast(grid3 gridroutine(picture pic));
-triple X(picture pic);
-triple Y(picture pic);
-triple Z(picture pic);
-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;
-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);
 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>);
-triple YZ(picture pic);
-triple ZX(picture pic);
+grid3(picture pic)[] ZX_ZYgrid(position posa=<default>, position posb=<default>);
+grid3(picture pic)[] ZX_ZYgrid;
+grid3(picture pic)[] YX_YZgrid(position posa=<default>, position posb=<default>);
+grid3(picture pic)[] YX_YZgrid;
 grid3(picture pic)[] XZXgrid(position pos=<default>);
 grid3(picture pic)[] XZXgrid;
 grid3(picture pic)[] ZXZgrid(position pos=<default>);
 grid3(picture pic)[] ZXZgrid;
-position top;
-ticksgridT InTicks()(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>);
-ticksgridT InOutTicks()(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>);
-grid3(picture pic)[] YX_YZgrid(position posa=<default>, position posb=<default>);
-grid3(picture pic)[] YX_YZgrid;
-position bottom;
-grid3 YXgrid(picture pic)(position pos=<default>);
-grid3 YXgrid(picture pic);
+grid3(picture pic)[] YXYgrid(position pos=<default>);
+grid3(picture pic)[] YXYgrid;
+grid3(picture pic)[] XYXgrid(position pos=<default>);
+grid3(picture pic)[] XYXgrid;
+grid3 ZYgrid(picture pic)(position pos=<default>);
+grid3 ZYgrid(picture pic);
+grid3 YZgrid(picture pic)(position pos=<default>);
+grid3 YZgrid(picture pic);
 grid3 ZXgrid(picture pic)(position pos=<default>);
 grid3 ZXgrid(picture pic);
-triple XY(picture pic);
 grid3 XZgrid(picture pic)(position pos=<default>);
 grid3 XZgrid(picture pic);
-grid3 YZgrid(picture pic)(position pos=<default>);
-grid3 YZgrid(picture pic);
+grid3 YXgrid(picture pic)(position pos=<default>);
+grid3 YXgrid(picture pic);
+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>);
+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 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>);
+triple YZ(picture pic);
+grid3(picture pic)[] operator cast(grid3 gridroutine(picture pic));
+grid3(picture pic)[][] operator cast(grid3(picture pic)[] gridroutine);
+grid3(picture pic)[][] operator cast(grid3 gridroutine(picture pic));
+grid3(picture pic)[] YZYgrid(position pos=<default>);
+grid3(picture pic)[] YZYgrid;
+triple Y(picture pic);
 grid3(picture pic)[][] XYZgrid(position pos=<default>);
 grid3(picture pic)[][] XYZgrid;
+position top;
+grid3 XYgrid(picture pic)(position pos=<default>);
+grid3 XYgrid(picture pic);
+ticksgridT InTicks()(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>);
+triple X(picture pic);
+triple XY(picture pic);
+grid3(picture pic)[] XY_XZgrid(position posa=<default>, position posb=<default>);
+grid3(picture pic)[] XY_XZgrid;
+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>);
+grid3 operator init();
+ticksgridT operator init();
+ticksgridT InOutTicks()(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>);
+triple ZX(picture pic);
+triple Z(picture pic);
+position bottom;
 grid3(picture pic)[] ZYZgrid(position pos=<default>);
 grid3(picture pic)[] ZYZgrid;
-grid3(picture pic)[] YZYgrid(position pos=<default>);
-grid3(picture pic)[] YZYgrid;
-real fspline(real)(real[] x, real[] y, real[] splinetype(real[], real[])=<default>);
 real pwhermite(real)(real[] x, real[] y, real[] dy);
+horner hdiffdiv(real[] x, real[] y, real[] dy);
 horner diffdiv(real[] x, real[] y);
-horner hdiffdiv(real[] x, real[] y, real[] dy);
+real fhorner(real)(horner sh);
+real fspline(real)(real[] x, real[] y, real[] splinetype(real[], real[])=<default>);
 horner operator init();
-real fhorner(real)(horner sh);
 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>);
+triple nextnormal(triple p, triple q);
 real eps;
-triple nextnormal(triple p, triple q);
+triple[] firstframe(path3 p, triple optional=<default>);
 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);
+string LeftJustified;
+FitControl defaultControl;
+void lm_lmdif(int m, int n, real[] x, real[] fvec, real ftol, real xtol, real gtol, int maxfev, real epsfcn, real[] diag, int mode, real factor, lm_int_type info, lm_int_type nfev, real[] fjac, int[] ipvt, real[] qtf, real[] wa1, real[] wa2, real[] wa3, real[] wa4, void evaluate(real[] par, int m_dat, real[] fvec, lm_data_type data, lm_int_type info), void printout(int n_par, real[] par, int m_dat, real[] fvec, lm_data_type data, int iflag, int iter, int nfev), lm_data_type data);
+void lm_lmpar(int n, real[] r, int ldr, int[] ipvt, real[] diag, real[] qtb, real delta, lm_real_type par, real[] x, real[] sdiag, real[] wa1, real[] wa2);
 void lm_qrsolv(int n, real[] r, int ldr, int[] ipvt, real[] diag, real[] qtb, real[] x, real[] sdiag, real[] wa);
-FitControl defaultControl;
+void lm_print_quiet(int n_par, real[] par, int m_dat, real[] fvec, lm_data_type data, int iflag, int iter, int nfev);
+string pad(string str, int count, string pad=<default>);
+string pad(int num, int digits, string pad=<default>);
+string pad(real num, int digits, string pad=<default>);
+void lm_evaluate_default(real[] par, int m_dat, real[] fvec, lm_data_type data, lm_int_type info);
+real LM_DWARF;
 real LM_MACHEP;
-real LM_SQRT_DWARF;
+void lm_qrfac(int m, int n, real[] a, bool pivot, int[] ipvt, real[] rdiag, real[] acnorm, real[] wa);
+real LM_USERTOL;
 real LM_SQRT_GIANT;
-void lm_lmpar(int n, real[] r, int ldr, int[] ipvt, real[] diag, real[] qtb, real delta, lm_real_type par, real[] x, real[] sdiag, real[] wa1, real[] wa2);
-void lm_lmdif(int m, int n, real[] x, real[] fvec, real ftol, real xtol, real gtol, int maxfev, real epsfcn, real[] diag, int mode, real factor, lm_int_type info, lm_int_type nfev, real[] fjac, int[] ipvt, real[] qtf, real[] wa1, real[] wa2, real[] wa3, real[] wa4, void evaluate(real[] par, int m_dat, real[] fvec, lm_data_type data, lm_int_type info), void printout(int n_par, real[] par, int m_dat, real[] fvec, lm_data_type data, int iflag, int iter, int nfev), lm_data_type data);
-void lm_minimize(int m_dat, int n_par, real[] par, void evaluate(real[] par, int m_dat, real[] fvec, lm_data_type data, lm_int_type info), void printout(int n_par, real[] par, int m_dat, real[] fvec, lm_data_type data, int iflag, int iter, int nfev), lm_data_type data, lm_control_type control);
-FitResult fit(real[] xdata, real[] ydata, real[] errors, real function(real[], real), real[] parameters, FitControl control=<default>);
-FitResult fit(real[] xdata, real[] ydata, real function(real[], real), real[] parameters, FitControl control=<default>);
-real lm_enorm(int n, real[] x, int offset=<default>);
+real SQR(real x);
+string[] lm_shortmsg;
+string[] lm_infmsg;
 lm_data_type operator init();
 lm_int_type operator init();
 lm_real_type operator init();
@@ -3196,137 +3206,150 @@
 lm_control_type operator init();
 FitControl operator init();
 FitResult operator init();
-real SQR(real x);
-string[] lm_shortmsg;
-void lm_evaluate_default(real[] par, int m_dat, real[] fvec, lm_data_type data, lm_int_type info);
-string pad(string str, int count, string pad=<default>);
-string pad(int num, int digits, string pad=<default>);
-string pad(real num, int digits, string pad=<default>);
-real LM_USERTOL;
-real LM_DWARF;
-void lm_print_quiet(int n_par, real[] par, int m_dat, real[] fvec, lm_data_type data, int iflag, int iter, int nfev);
+real LM_SQRT_DWARF;
+FitResult fit(real[] xdata, real[] ydata, real[] errors, real function(real[], real), real[] parameters, FitControl control=<default>);
+FitResult fit(real[] xdata, real[] ydata, real function(real[], real), real[] parameters, FitControl control=<default>);
+void lm_minimize(int m_dat, int n_par, real[] par, void evaluate(real[] par, int m_dat, real[] fvec, lm_data_type data, lm_int_type info), void printout(int n_par, real[] par, int m_dat, real[] fvec, lm_data_type data, int iflag, int iter, int nfev), lm_data_type data, lm_control_type control);
 void lm_print_default(int n_par, real[] par, int m_dat, real[] fvec, lm_data_type data, int iflag, int iter, int nfev);
-real barmarksize(pen p=<default>);
-real barmarksizefactor;
-marker CrossIntervalMarker(int i=<default>, int n=<default>, real size=<default>, real space=<default>, real angle=<default>, pair offset=<default>, bool rotated=<default>, pen p=<default>, frame uniform=<default>, bool above=<default>);
-marker StickIntervalMarker(int i=<default>, int n=<default>, real size=<default>, real space=<default>, real angle=<default>, pair offset=<default>, bool rotated=<default>, pen p=<default>, frame uniform=<default>, bool above=<default>);
-frame crossframe(int n=<default>, real size=<default>, pair space=<default>, real angle=<default>, pair offset=<default>, pen p=<default>);
+real lm_enorm(int n, real[] x, int offset=<default>);
+marker TildeIntervalMarker(int i=<default>, int n=<default>, real size=<default>, real space=<default>, real angle=<default>, pair offset=<default>, bool rotated=<default>, pen p=<default>, frame uniform=<default>, bool above=<default>);
+marker CircleBarIntervalMarker(int i=<default>, int n=<default>, real barsize=<default>, real radius=<default>, real angle=<default>, pair offset=<default>, bool rotated=<default>, pen p=<default>, filltype filltype=<default>, bool circleabove=<default>, frame uniform=<default>, bool above=<default>);
+void markangle(picture pic=<default>, Label L=<default>, int n=<default>, real radius=<default>, real space=<default>, pair A, pair O, pair B, bool arrow(picture, path, pen, marginT(path, pen))=<default>, pen p=<default>, filltype filltype=<default>, marginT margin(path, pen)=<default>, marker marker=<default>);
+real markanglespace(pen p=<default>);
+real markanglespace;
+real markangleradius(pen p=<default>);
+real markangleradius;
+real markangleradiusfactor;
+real markanglespacefactor;
 real crossmarksize(pen p=<default>);
 real crossmarksizefactor;
+frame circlebarframe(int n=<default>, real barsize=<default>, real radius=<default>, real angle=<default>, pair offset=<default>, pen p=<default>, filltype filltype=<default>, bool above=<default>);
+real circlemarkradius(pen p=<default>);
+real circlemarkradiusfactor;
 frame stickframe(int n=<default>, real size=<default>, pair space=<default>, real angle=<default>, pair offset=<default>, pen p=<default>);
 frame stickframe;
+real stickmarkspace(pen p=<default>);
 real stickmarksize(pen p=<default>);
-real stickmarkspace(pen p=<default>);
 real stickmarksizefactor;
 real stickmarkspacefactor;
-frame duplicate(path g, int n=<default>, pair space=<default>, pen p=<default>);
-marker CircleBarIntervalMarker(int i=<default>, int n=<default>, real barsize=<default>, real radius=<default>, real angle=<default>, pair offset=<default>, bool rotated=<default>, pen p=<default>, filltype filltype=<default>, bool circleabove=<default>, frame uniform=<default>, bool above=<default>);
-frame circlebarframe(int n=<default>, real barsize=<default>, real radius=<default>, real angle=<default>, pair offset=<default>, pen p=<default>, filltype filltype=<default>, bool above=<default>);
-real circlemarkradius(pen p=<default>);
-real circlemarkradiusfactor;
-marker operator *(transform T, marker m);
-marker TildeIntervalMarker(int i=<default>, int n=<default>, real size=<default>, real space=<default>, real angle=<default>, pair offset=<default>, bool rotated=<default>, pen p=<default>, frame uniform=<default>, bool above=<default>);
 frame tildeframe(int n=<default>, real size=<default>, pair space=<default>, real angle=<default>, pair offset=<default>, pen p=<default>);
 frame tildeframe;
-real tildemarksize(pen p=<default>);
 real tildemarksizefactor;
-void markangle(picture pic=<default>, Label L=<default>, int n=<default>, real radius=<default>, real space=<default>, pair A, pair O, pair B, bool arrow(picture, path, pen, marginT(path, pen))=<default>, pen p=<default>, filltype filltype=<default>, marginT margin(path, pen)=<default>, marker marker=<default>);
-real markanglespace(pen p=<default>);
-real markanglespace;
-real markangleradius(pen p=<default>);
-real markangleradius;
-real markanglespacefactor;
-real markangleradiusfactor;
 void markinterval(picture pic=<default>, frame f, path g)(int n=<default>, frame f, bool rotated=<default>);
-real[] partialsum(real[] a);
-real[] partialsum(real[] a, real[] dx);
-int[] partialsum(int[] a);
-int[] partialsum(int[] a, int[] dx);
-real cot(real x);
-int unique(real[] a, real x);
-int unique(string[] a, string x);
-int quadrant(real degrees);
-pair exp(explicit pair z);
+frame duplicate(path g, int n=<default>, pair space=<default>, pen p=<default>);
+marker operator *(transform T, marker m);
+marker CrossIntervalMarker(int i=<default>, int n=<default>, real size=<default>, real space=<default>, real angle=<default>, pair offset=<default>, bool rotated=<default>, pen p=<default>, frame uniform=<default>, bool above=<default>);
+marker StickIntervalMarker(int i=<default>, int n=<default>, real size=<default>, real space=<default>, real angle=<default>, pair offset=<default>, bool rotated=<default>, pen p=<default>, frame uniform=<default>, bool above=<default>);
+frame crossframe(int n=<default>, real size=<default>, pair space=<default>, real angle=<default>, pair offset=<default>, pen p=<default>);
+real tildemarksize(pen p=<default>);
+real barmarksize(pen p=<default>);
+real barmarksizefactor;
+real findroot(real f(real), real a, real b, real tolerance=<default>, real fa=<default>, real fb=<default>);
+real value(path g, real x, int n=<default>);
+real value(path g, explicit pair z, int n=<default>);
+real time(path g, real x, int n=<default>);
+real time(path g, explicit pair z, int n=<default>);
 string nopoint;
-real intersect(pair p, pair q, pair z);
-real intersect(triple P, triple Q, triple n, triple Z);
 real interpolate(real[] x, real[] y, real x0, int i);
 real interpolate(real[] x, real[] y, real x0);
-triple intersectionpoint(triple n0, triple P0, triple n1, triple P1);
-pair[] quarticroots(real a, real b, real c, real d, real e);
+void drawline(picture pic=<default>, pair P, pair Q, pen p=<default>);
+bool square(real[][] m);
+real[] zero(int n);
+real[][] zero(int n, int m);
 bool lexorder(pair a, pair b);
 bool lexorder(triple a, triple b);
-bool square(real[][] m);
+int unique(real[] a, real x);
+int unique(string[] a, string x);
+int[][] segmentlimits(bool[] b);
+bool increasing(real[] a, bool strict=<default>);
+real[] partialsum(real[] a);
+real[] partialsum(real[] a, real[] dx);
+int[] partialsum(int[] a);
+int[] partialsum(int[] a, int[] dx);
+real acot(real x);
+real asec(real x);
+real acsc(real x);
 real sec(real x);
-bool rectangular(real[][] m);
-bool rectangular(pair[][] m);
-bool rectangular(triple[][] m);
-bool polygon(path p);
-pair unityroot(int n, int k=<default>);
-int[][] segmentlimits(bool[] b);
+real csc(real x);
 int[][] segment(bool[] b);
-real acot(real x);
+pair exp(explicit pair z);
+int quadrant(real degrees);
+pair[] quarticroots(real a, real b, real c, real d, real e);
 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>);
+real[] leastsquares(real[][] A, real[] b, bool warn=<default>);
+pair log(explicit pair z);
+triple intersectionpoint(triple n0, triple P0, triple n1, triple P1);
 picture grid(int Nx, int Ny, pen p=<default>);
+pair unityroot(int n, int k=<default>);
+real frac(real x);
+bool rectangular(real[][] m);
+bool rectangular(pair[][] m);
+bool rectangular(triple[][] m);
+bool polygon(path p);
 rootfinder_settings operator init();
-real frac(real x);
-real asec(real x);
-real time(path g, real x, int n=<default>);
-real time(path g, explicit pair z, int n=<default>);
-real[] leastsquares(real[][] A, real[] b, bool warn=<default>);
-bool increasing(real[] a, bool strict=<default>);
-real[] zero(int n);
-real[][] zero(int n, int m);
-real findroot(real f(real), real a, real b, real tolerance=<default>, real fa=<default>, real fb=<default>);
-real acsc(real x);
-real value(path g, real x, int n=<default>);
-real value(path g, explicit pair z, int n=<default>);
-real csc(real x);
-pair log(explicit pair z);
-void drawline(picture pic=<default>, pair P, pair Q, pen p=<default>);
+real cot(real x);
+real intersect(pair p, pair q, pair z);
+real intersect(triple P, triple Q, triple n, triple Z);
+path cuttings;
+path cutafter(path p, path q);
 path cutbefore(path p, path q);
-path cutafter(path p, path q);
-path cuttings;
+obj operator *(real[][] T, obj o);
 void draw(picture pic=<default>, obj o, light light=<default>);
-obj operator *(real[][] T, obj o);
 obj operator init();
-real[][] finiteDifferenceJacobian(real[] f(real[]), real[] t, real[] h=<default>);
-RKTableau E_Euler;
-real error(real error, real initial, real lowOrder, real norm, real diff);
-RKTableau RK5;
-real stepfactor;
+real[] solveBVP(real[] f(real, real[]), 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>, real[] initial(real[]), real[] discrepancy(real[]), real[] guess, int iterations=<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>);
+real adjust(real h, real error, real tolmin, real tolmax, RKTableau tableau);
+RKTableau RK5DP;
 RKTableau RK4;
-real[] newton(int iterations=<default>, real[] f(real[]), real[][] jacobian(real[]), real[] t);
+RKTableau E_RK3BS;
+RKTableau E_PC;
+RKTableau E_Euler;
+RKTableau Euler;
+void expfactors(real x, coefficients a);
 real phi1(real x);
-RKTableau RK3;
-void expfactors(real x, coefficients a);
+real[] Coeff;
+real stepfactor;
+real[][] finiteDifferenceJacobian(real[] f(real[]), real[] t, real[] h=<default>);
+RKTableau E_RK2;
+RKTableau RK5F;
+real error(real error, real initial, real lowOrder, real norm, real diff);
+RKTableau PC;
+RKTableau RK2;
+void report(real old, real h, real t);
 real phi2(real x);
-void report(real old, real h, real t);
-real[] solveBVP(real[] f(real, real[]), 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>, real[] initial(real[]), real[] discrepancy(real[]), real[] guess, int iterations=<default>);
-RKTableau Euler;
-RKTableau E_PC;
-RKTableau RK2;
-real phi3(real x);
-void write(solution S);
-void write(Solution S);
+real[] newton(int iterations=<default>, real[] f(real[]), real[][] jacobian(real[]), real[] t);
+RKTableau RK3BS;
 coefficients operator init();
 RKTableau operator init();
 solution operator init();
 Solution operator init();
-RKTableau E_RK2;
-RKTableau RK3BS;
-RKTableau RK5F;
-real adjust(real h, real error, real tolmin, real tolmax, RKTableau tableau);
-RKTableau RK5DP;
-real[] Coeff;
-RKTableau PC;
-RKTableau E_RK3BS;
+RKTableau RK5;
+real phi3(real x);
+void write(solution S);
+void write(Solution S);
+RKTableau RK3;
+pen[] cmyk(pen[] Palette);
+pen[] Gradient(int NColors=<default> ... pen[] p);
+void PaletteTicks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)(int sign=<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>, pen pTick=<default>, pen ptick=<default>);
+void PaletteTicks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)(int sign=<default>);
+pen[] palette(real[] f, pen[] palette);
+pen[][] palette(real[][] f, pen[] palette);
+void palette(picture pic=<default>, Label L=<default>, bounds bounds, pair initial, pair final, void axis(picture, axisT)=<default>, pen[] palette, 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>)(int sign=<default>)=<default>, bool copy=<default>, bool antialias=<default>);
+pen[] adjust(picture pic, real min, real max, real rmin, real rmax, pen[] palette);
+bounds Automatic(picture pic, real min, real max);
+bounds Range(picture pic, real min, real max)(bool automin=<default>, real min=<default>, bool automax=<default>, real max=<default>);
+pen[] BWRainbow(int NColors, bool two);
+pen[] BWRainbow(int NColors=<default>);
+transform swap;
+void NoTicks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)(int sign=<default>);
+real[] sequencereal;
+pen[] BWRainbow2(int NColors=<default>);
+pen[] Wheel(int NColors=<default>);
 pen[] Grayscale(int NColors=<default>);
-pen[] Wheel(int NColors=<default>);
+bounds Full(picture pic, real min, real max);
 void image(frame f, real[][] data, pair initial, pair final, pen[] palette, bool transpose=<default>, transform t=<default>, bool copy=<default>, bool antialias=<default>);
 void image(frame f, pen[][] data, pair initial, pair final, bool transpose=<default>, transform t=<default>, bool copy=<default>, bool antialias=<default>);
 bounds image(picture pic=<default>, real[][] f, bounds range(picture pic, real min, real max)=<default>, pair initial, pair final, pen[] palette, bool transpose=<default>, bool copy=<default>, bool antialias=<default>);
@@ -3335,167 +3358,156 @@
 void image(picture pic=<default>, pen f(int, int), int width, int height, pair initial, pair final, bool transpose=<default>, bool antialias=<default>);
 bounds image(picture pic=<default>, pair[] z, real[] f, bounds range(picture pic, real min, real max)=<default>, pen[] palette);
 bounds image(picture pic=<default>, real[] x, real[] y, real[] f, bounds range(picture pic, real min, real max)=<default>, pen[] palette);
-pen[] cmyk(pen[] Palette);
-pen[] BWRainbow(int NColors, bool two);
-pen[] BWRainbow(int NColors=<default>);
-pen[] BWRainbow2(int NColors=<default>);
-transform swap;
-bounds Automatic(picture pic, real min, real max);
-real[] sequencereal;
+pen[] quantize(pen[] Palette, int n);
 pen[] Rainbow(int NColors=<default>);
-pen[] adjust(picture pic, real min, real max, real rmin, real rmax, pen[] palette);
-pen[] Gradient(int NColors=<default> ... pen[] p);
-pen[] quantize(pen[] Palette, int n);
-bounds Range(picture pic, real min, real max)(bool automin=<default>, real min=<default>, bool automax=<default>, real max=<default>);
-bounds Full(picture pic, real min, real max);
-void PaletteTicks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)(int sign=<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>, pen pTick=<default>, pen ptick=<default>);
-void PaletteTicks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)(int sign=<default>);
-pen[] palette(real[] f, pen[] palette);
-pen[][] palette(real[][] f, pen[] palette);
-void palette(picture pic=<default>, Label L=<default>, bounds bounds, pair initial, pair final, void axis(picture, axisT)=<default>, pen[] palette, 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>)(int sign=<default>)=<default>, bool copy=<default>, bool antialias=<default>);
-picture brick(real Hx=<default>, real Hy=<default>, pen p=<default>);
-picture crosshatch(real H=<default>, pen p=<default>);
 picture hatch(real H=<default>, pair dir=<default>, pen p=<default>);
-real hatchepsilon;
 picture checker(real Hx=<default>, real Hy=<default>, pen p=<default>);
+picture tile(real Hx=<default>, real Hy=<default>, pen p=<default>, filltype filltype=<default>);
+frame tiling(string name, picture pic, pair lb=<default>, pair rt=<default>);
+picture crosshatch(real H=<default>, pen p=<default>);
+picture brick(real Hx=<default>, real Hy=<default>, pen p=<default>);
 void add(string name, picture pic, pair lb=<default>, pair rt=<default>);
-frame tiling(string name, picture pic, pair lb=<default>, pair rt=<default>);
-picture tile(real Hx=<default>, real Hy=<default>, pen p=<default>, filltype filltype=<default>);
+real hatchepsilon;
+void gsave(picture pic=<default>);
+pen textpen;
 void grestore(picture pic=<default>);
-pen textpen;
-void gsave(picture pic=<default>);
 pair align;
 path roundedpath(path A, real R, real S=<default>);
+real infinity;
 problem operator init();
-real infinity;
-bool allowstepping;
-pair currentposition;
-pen authorpen;
-void display(frame[] f, real margin=<default>, pair align=<default>, pen p=<default>, pen figuremattpen=<default>, bool final=<default>);
-void display(frame f, real margin=<default>, pair align=<default>, pen p=<default>, pen figuremattpen=<default>, bool final=<default>);
-void display(string[] s, real margin=<default>, string[] captions=<default>, string caption=<default>, pair align=<default>, pen p=<default>, pen figuremattpen=<default>, bool final=<default>);
-void display(string s, string caption=<default>, pair align=<default>, pen p=<default>, pen figuremattpen=<default>, bool final=<default>);
-void multifigure(string[] slist, string options=<default>, string caption=<default>, pair align=<default>, pen p=<default>, pen figuremattpen=<default>, bool step=<default>);
-void subitem(string s, pen p=<default>);
-pen pagenumberpen;
-pair pagenumberalign;
-pair pagenumberposition;
-void indexedfigure(string prefix, int first, int last, string options=<default>, string caption=<default>, pair align=<default>, pen p=<default>, pen figuremattpen=<default>, bool step=<default>);
-string texcolor(pen p);
-void color(string name, string color);
-pen foregroundcolor;
 void bibliography(string name);
 void bibliographystyle(string name);
-int[] lastnode;
-void asyfigure(string s, string options=<default>, string caption=<default>, pair align=<default>, pen p=<default>, pen figuremattpen=<default>, filltype filltype=<default>, bool newslide=<default>);
-void asyfilecode(bool center=<default>, string s, string options=<default>, string caption=<default>, pair align=<default>, pen p=<default>, pen figuremattpen=<default>, real indent=<default>, real skip=<default>, filltype filltype=<default>, bool newslide=<default>);
-bool itemstep;
-real itemskip;
-void remark(bool center=<default>, string s, pair align=<default>, pen p=<default>, real indent=<default>, bool minipage=<default>, real skip=<default>, filltype filltype=<default>, bool step=<default>);
-void usersetting();
-bool landscape;
-real codeskip;
+void item(string s, pen p=<default>, bool step=<default>);
+void filecode(bool center=<default>, string s, pen p=<default>, real indent=<default>, real skip=<default>, filltype filltype=<default>);
+void indexedfigure(string prefix, int first, int last, string options=<default>, string caption=<default>, pair align=<default>, pen p=<default>, pen figuremattpen=<default>, bool step=<default>);
+void outline(string s=<default>, pair position=<default>, pair align=<default>, pen p=<default>);
+void incrementposition(pair z);
+bool checkposition();
 void newslide(bool stepping=<default>);
-int page;
-pen itempen;
-bool reverse;
+void titlepage(string title, string author, string institution=<default>, string date=<default>, string url=<default>, bool newslide=<default>);
+void nextpage(pen p=<default>);
+void numberpage(pen p=<default>);
 void reversevideo();
-void vbox(string s, pen p=<default>);
-void asycode(bool center=<default>, string s, string options=<default>, string caption=<default>, string preamble=<default>, pair align=<default>, pen p=<default>, pen figuremattpen=<default>, real indent=<default>, real skip=<default>, filltype filltype=<default>, bool newslide=<default>);
-void exitfunction();
+string texcolor(pen p);
+int preamblenodes;
 bool havepagenumber;
-real pageheight;
-real pagewidth;
-picture background;
-void background();
+int page;
+int[] lastnode;
+pair startposition;
+pair titlepageposition;
+void color(string name, string color);
+pen foregroundcolor;
 pen backgroundcolor;
-void normalvideo();
-void title(string s, pair position=<default>, pair align=<default>, pen p=<default>, bool newslide=<default>);
+pen figuremattpen;
+real figureborder;
+pen steppagenumberpen;
+pen pagenumberpen;
+real titleskip;
 pen titlepen;
-real titleskip;
-pair dateskip;
 pair titlealign;
-pen titlepagepen;
-void titlepage(string title, string author, string institution=<default>, string date=<default>, string url=<default>, bool newslide=<default>);
-void nextpage(pen p=<default>);
-pair titlepageposition;
-pen codepen;
-void erasestep(int erasenode);
-bool checkposition();
-void setpens(pen red=<default>, pen blue=<default>, pen steppen=<default>);
-void filecode(bool center=<default>, string s, pen p=<default>, real indent=<default>, real skip=<default>, filltype filltype=<default>);
-void code(bool center=<default>, string s, pen p=<default>, real indent=<default>, real skip=<default>, filltype filltype=<default>);
-transform tinv;
 pair urlskip;
-void numberpage(pen p=<default>);
+pair dateskip;
+real codeskip;
+real itemskip;
 pen urlpen;
-int[] firstnode;
-bool firststep;
-string asywrite(string s, string preamble=<default>);
-pair startposition;
-string oldbulletcolor;
-string newbulletcolor;
 pen datepen;
-void incrementposition(pair z);
-pen institutionpen;
-void skip(real n=<default>);
-bool stepping;
+pen authorpen;
+pen titlepagepen;
+pen itempen;
+string bulletcolor(string color);
+real minipagewidth;
+bool landscape;
+real pageheight;
+real pagewidth;
 real pagemargin;
-pen steppagenumberpen;
-void item(string s, pen p=<default>, bool step=<default>);
+bool allowstepping;
+bool itemstep;
 bool empty();
-void currentexitfunction();
-void step();
 string[] codefile;
-void outline(string s=<default>, pair position=<default>, pair align=<default>, pen p=<default>);
+void subitem(string s, pen p=<default>);
+void setpens(pen red=<default>, pen blue=<default>, pen steppen=<default>);
+bool firststep;
+void remark(bool center=<default>, string s, pair align=<default>, pen p=<default>, real indent=<default>, bool minipage=<default>, real skip=<default>, filltype filltype=<default>, bool step=<default>);
+void asyfigure(string s, string options=<default>, string caption=<default>, pair align=<default>, pen p=<default>, pen figuremattpen=<default>, filltype filltype=<default>, bool newslide=<default>);
+void usersetting();
+pen institutionpen;
+void title(string s, pair position=<default>, pair align=<default>, pen p=<default>, bool newslide=<default>);
+void asyfilecode(bool center=<default>, string s, string options=<default>, string caption=<default>, pair align=<default>, pen p=<default>, pen figuremattpen=<default>, real indent=<default>, real skip=<default>, filltype filltype=<default>, bool newslide=<default>);
 void center(string s, pen p=<default>);
+real minipagemargin;
+void skip(real n=<default>);
+void exitfunction();
+void step();
+pair pagenumberposition;
+void currentexitfunction();
+void asyinclude(string s, real xsize=<default>, real ysize=<default>);
+string bullet;
+void vbox(string s, pen p=<default>);
+bool reverse;
+int[] firstnode;
+string oldbulletcolor;
+void figure(string[] s, string options=<default>, real margin=<default>, string[] captions=<default>, string caption=<default>, pair align=<default>, pen p=<default>, pen figuremattpen=<default>, bool final=<default>);
+void figure(string s, string options=<default>, string caption=<default>, pair align=<default>, pen p=<default>, pen figuremattpen=<default>, bool final=<default>);
+void display(frame[] f, real margin=<default>, pair align=<default>, pen p=<default>, pen figuremattpen=<default>, bool final=<default>);
+void display(frame f, real margin=<default>, pair align=<default>, pen p=<default>, pen figuremattpen=<default>, bool final=<default>);
+void display(string[] s, real margin=<default>, string[] captions=<default>, string caption=<default>, pair align=<default>, pen p=<default>, pen figuremattpen=<default>, bool final=<default>);
+void display(string s, string caption=<default>, pair align=<default>, pen p=<default>, pen figuremattpen=<default>, bool final=<default>);
 void equation(string s, pen p=<default>);
+picture background;
+void background();
+void multifigure(string[] slist, string options=<default>, string caption=<default>, pair align=<default>, pen p=<default>, pen figuremattpen=<default>, bool step=<default>);
+void erasestep(int erasenode);
+void code(bool center=<default>, string s, pen p=<default>, real indent=<default>, real skip=<default>, filltype filltype=<default>);
+transform tinv;
+pair pagenumberalign;
+pen codepen;
 void equations(string s, pen p=<default>);
 string cropcode(string s);
-void asyinclude(string s, real xsize=<default>, real ysize=<default>);
-void figure(string[] s, string options=<default>, real margin=<default>, string[] captions=<default>, string caption=<default>, pair align=<default>, pen p=<default>, pen figuremattpen=<default>, bool final=<default>);
-void figure(string s, string options=<default>, string caption=<default>, pair align=<default>, pen p=<default>, pen figuremattpen=<default>, bool final=<default>);
-real figureborder;
-pen figuremattpen;
-string bullet;
-int preamblenodes;
-string bulletcolor(string color);
-real minipagewidth;
-real minipagemargin;
-real stepfraction;
+string newbulletcolor;
+bool stepping;
+pair currentposition;
+string asywrite(string s, string preamble=<default>);
+void asycode(bool center=<default>, string s, string options=<default>, string caption=<default>, string preamble=<default>, pair align=<default>, pen p=<default>, pen figuremattpen=<default>, real indent=<default>, real skip=<default>, filltype filltype=<default>, bool newslide=<default>);
+void normalvideo();
 path curve(pair c, real f(real, real), pair a, pair b);
 path curve(pair c, real f(real), pair a, pair b);
+real stepfraction;
 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>);
+evaluatedpoint[][][] make3dgrid(triple a, triple b, int nx, int ny, int nz, real f(triple), bool allowzero=<default>);
+triple nGrad(triple)(real f(triple));
+patch[] quadpatches(path3 edgecycle, positionedvector[] corners, real f(triple), triple grad(triple), triple a, triple b, bool usetriangles);
+bool checkpt(triple testpt, real f(triple), triple grad(triple), triple a, triple b);
 patch[] maketriangle(path3 external, real f(triple), triple grad(triple), bool allowsubdivide=<default>);
-real B23(real t);
+patch[] triangletoquads(path3 external, real f(triple), triple grad(triple), triple a, triple b);
+triple normalout(int face);
 path3 pathinface(positionedvector v1, positionedvector v2, triple facenorm, triple edge1normout, triple edge2normout);
 path3 pathinface(positionedvector v1, positionedvector v2, int face, int edge1face, int edge2face);
+real[] projecttospan_findcoeffs(triple toproject, triple v1, triple v2, bool warn=<default>);
+real angledegrees(triple a, triple b);
+int[] makecircle(edge[] edges);
+int YLOW;
+int XLOW;
+patch trianglewithnormals(path3 external, triple n1, triple n2, triple n3);
+real(real)[] bernstein;
+int ZHIGH;
+int NULL_VERTEX;
 path3 bisector(path3 edgecycle, int[] savevertices);
 int XHIGH;
 int YHIGH;
-int ZHIGH;
-real B03(real t);
-real(real)[] bernstein;
+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 B33(real t);
+bool checkptincube(triple pt, triple a, triple b);
+patch patchwithnormals(path3 external, triple[] u0normals, triple[] u1normals, triple[] v0normals, triple[] v1normals);
+patch patchwithnormals(path3 external, triple normalat(triple));
 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);
+bool check_fpt_zero(triple testpoint, real f(triple), triple grad(triple));
 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));
-patch[] quadpatches(path3 edgecycle, positionedvector[] corners, real f(triple), triple grad(triple), triple a, triple b, bool usetriangles);
-triple normalout(int face);
-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;
+bool operator ==(edge a, edge b);
 pathwithnormals_settings operator init();
 intset operator init();
 int_to_intset operator init();
@@ -3503,305 +3515,300 @@
 positionedvector operator init();
 evaluatedpoint operator init();
 gridwithzeros operator init();
+real B13(real t);
 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>, bool keyword usetriangles=<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);
-patch trianglewithnormals(path3 external, triple n1, triple n2, triple n3);
-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);
-revolution operator *(real[][] t, revolution r);
-skeleton operator init();
-revolution operator init();
+real B23(real t);
+int ZLOW;
+real B03(real t);
 revolution sphere(triple c=<default>, real r, int n=<default>);
-path line(path p, path q, real[] t);
-surface surface(revolution r, int n=<default>, pen color(int i, real j)=<default>);
-void draw(picture pic=<default>, revolution r, int m=<default>, int n=<default>, pen frontpen=<default>, pen backpen=<default>, pen longitudinalpen=<default>, pen longitudinalbackpen=<default>, light light=<default>, string name=<default>, render render=<default>, projection P=<default>);
 real[] tangent(path p, path q, bool side);
 pen defaultbackpen;
+revolution cone(triple c=<default>, real r, real h, triple axis=<default>, int n=<default>);
+void draw(picture pic=<default>, revolution r, int m=<default>, int n=<default>, pen frontpen=<default>, pen backpen=<default>, pen longitudinalpen=<default>, pen longitudinalbackpen=<default>, light light=<default>, string name=<default>, render render=<default>, projection P=<default>);
+revolution operator *(real[][] t, revolution r);
 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>);
-real rms(real[] A);
+path line(path p, path q, real[] t);
+skeleton operator init();
+revolution operator init();
+surface surface(revolution r, int n=<default>, pen color(int i, real j)=<default>);
+pair Gaussrandpair();
+path topbox(pair a, pair b);
+path halfbox(pair a, pair b);
 int[] frequency(real[] data, real[] bins);
 int[] frequency(real[] data, real a, real b, int n);
 int[][] frequency(real[] x, real[] y, real[] xbins, real[] ybins);
 int[][] frequency(real[] x, real[] y, pair a, pair b, int nx, int ny=<default>);
 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);
-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 Gaussian(real x, real sigma);
+real Gaussian(real x);
+real kurtosisexcess(real[] A);
+real kurtosis(real[] A);
+real rms(real[] A);
+real variancebiased(real[] A);
 real stdev(real[] A);
 real variance(real[] A);
 real legendmarkersize;
-real variancebiased(real[] A);
-linefit operator init();
+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 mean(real[] A);
 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();
+int bins(real[] data, int max=<default>);
 real Gaussrand();
-Component wye;
-pair[] endpoints(guide[] a);
-real hwratio;
+linefit operator init();
+Relation r4b;
+Relation r4a;
 Relation r3;
-Relation r4a;
 picture tableau(frame[] cards, bool number=<default>);
-pair min(pair[] z);
+Braid apply(Relation r, Braid b, int step, int place);
+real gapfactor;
+real hwratio;
 Component bp;
 Component phi;
-real gapfactor;
-Component bm;
 Relation operator -(Relation r);
+pair max(pair[] z);
+pair[] endpoints(guide[] a);
 Component operator init();
 Braid operator init();
 Relation operator init();
 Syzygy operator init();
-Relation r4b;
-Braid apply(Relation r, Braid b, int step, int place);
-pair max(pair[] z);
-pen Sepia;
-pen Orchid;
-pen Magenta;
+Component wye;
+pair min(pair[] z);
+Component bm;
+pen Tan;
+pen OliveGreen;
+pen LimeGreen;
+pen BlueGreen;
+pen Aquamarine;
+pen TealBlue;
+pen Turquoise;
+pen SkyBlue;
+pen NavyBlue;
+pen CornflowerBlue;
+pen Periwinkle;
+pen RoyalPurple;
+pen Plum;
+pen White;
+pen Purple;
+pen DarkOrchid;
+pen Lavender;
+pen Mulberry;
+pen CarnationPink;
+pen Salmon;
+pen OrangeRed;
+pen Red;
 pen BrickRed;
+pen YellowOrange;
+pen Apricot;
+pen Goldenrod;
+pen GreenYellow;
+pen RedViolet;
 pen VioletRed;
 pen Violet;
-pen CadetBlue;
-pen CarnationPink;
-pen SpringGreen;
-pen MidnightBlue;
-pen OliveGreen;
-pen Apricot;
-pen Thistle;
-pen Cyan;
-pen DarkOrchid;
-pen Red;
-pen RawSienna;
+pen Sepia;
 pen Mahogany;
-pen Gray;
 pen WildStrawberry;
-pen Plum;
-pen BlueGreen;
-pen Cerulean;
+pen Black;
+pen RawSienna;
+pen Thistle;
+pen Bittersweet;
 pen Blue;
+pen Maroon;
+pen Yellow;
+pen Rhodamine;
+pen Fuchsia;
+pen Cyan;
+pen Green;
+pen Orchid;
+pen SeaGreen;
+pen PineGreen;
+pen Dandelion;
+pen RoyalBlue;
+pen Melon;
 pen BlueViolet;
 pen RedOrange;
-pen Goldenrod;
-pen ForestGreen;
-pen BurntOrange;
-pen Tan;
+pen CadetBlue;
+pen RubineRed;
+pen Cerulean;
 pen Brown;
-pen Salmon;
-pen RubineRed;
-pen TealBlue;
-pen White;
-pen Purple;
-pen Bittersweet;
-pen Orange;
-pen OrangeRed;
-pen Fuchsia;
-pen Peach;
-pen PineGreen;
-pen Dandelion;
-pen Black;
-pen NavyBlue;
-pen Rhodamine;
-pen ProcessBlue;
-pen LimeGreen;
-pen Aquamarine;
-pen Green;
-pen GreenYellow;
-pen Lavender;
+pen Magenta;
 pen Emerald;
-pen Mulberry;
-pen RedViolet;
-pen SkyBlue;
-pen SeaGreen;
-pen Periwinkle;
-pen YellowOrange;
-pen Maroon;
 pen YellowGreen;
-pen Yellow;
 pen JungleGreen;
-pen CornflowerBlue;
-pen RoyalBlue;
-pen Melon;
-pen RoyalPurple;
-pen Turquoise;
+pen SpringGreen;
+pen BurntOrange;
+pen MidnightBlue;
+pen ForestGreen;
+pen Orange;
+pen Gray;
+pen ProcessBlue;
+pen Peach;
 int lookup(tree t, int key);
+bool contains(tree t, int key);
 tree newtree();
+tree add(tree t, int key, int value);
+tree operator init();
 void write(file out=<default>, tree t);
-tree operator init();
-tree add(tree t, int key, int value);
-bool contains(tree t, int key);
-real trembleFuzz();
+real trembleRandom;
+real magneticRadius;
 real trembleAngle;
-real trembleRandom;
 real trembleFrequency;
 tremble operator init();
-real magneticRadius;
-real[] sample(path3 g, real r, real relstep=<default>);
+real trembleFuzz();
+int coloredSegments;
 path3 roundedpath(path3 A, real r);
+surface tube(path3 g, coloredpath section, transform T(real)=<default>, real corner=<default>, real relstep=<default>);
 int coloredNodes;
-int coloredSegments;
 surface surface(rmf[] R, real[] t, coloredpath cp, transform T(real), bool cyclic);
-surface tube(path3 g, coloredpath section, transform T(real)=<default>, real corner=<default>, real relstep=<default>);
+real degrees(rmf a, rmf b);
 coloredpath operator init();
+real[] sample(path3 g, real r, real relstep=<default>);
 coloredpath operator cast(path p);
 coloredpath operator cast(guide p);
-real degrees(rmf a, rmf b);
 string VERSION;
-pen Orchid;
-pen Indigo;
-pen Beige;
-pen SlateBlue;
-pen SlateGray;
-pen Magenta;
-pen SandyBrown;
-pen Violet;
-pen CadetBlue;
-pen DeepPink;
-pen SpringGreen;
-pen DeepSkyBlue;
-pen MidnightBlue;
-pen Olive;
-pen OliveDrab;
-pen Thistle;
-pen Chocolate;
-pen Cyan;
-pen Gainsboro;
-pen Cornsilk;
-pen Ivory;
-pen DarkOrchid;
-pen PapayaWhip;
+pen Turquoise;
+pen Teal;
+pen Tan;
+pen SkyBlue;
+pen Silver;
+pen Seashell;
+pen SaddleBrown;
+pen White;
+pen Purple;
+pen PowderBlue;
+pen Plum;
 pen Red;
 pen Pink;
+pen PeachPuff;
+pen PapayaWhip;
+pen PaleTurquoise;
+pen PaleGreen;
+pen OrangeRed;
+pen OliveDrab;
+pen OldLace;
+pen Salmon;
+pen Moccasin;
 pen MintCream;
-pen DarkTurquoise;
-pen Gray;
-pen Seashell;
+pen MediumTurquoise;
+pen MediumSpringGreen;
+pen MediumSlateBlue;
+pen MediumSeaGreen;
+pen MediumPurple;
 pen MediumBlue;
-pen MediumOrchid;
-pen MediumPurple;
-pen MediumSeaGreen;
-pen MediumSlateBlue;
 pen MediumAquamarine;
-pen MediumSpringGreen;
-pen MediumTurquoise;
-pen MediumVioletRed;
-pen Plum;
-pen GhostWhite;
-pen Blue;
+pen LimeGreen;
+pen LightYellow;
+pen LightSkyBlue;
+pen LightSeaGreen;
+pen PaleGoldenrod;
+pen LightSalmon;
+pen LightPink;
+pen LightGrey;
+pen LightGreen;
+pen LightCyan;
+pen LightBlue;
+pen LemonChiffon;
+pen Lavender;
+pen Indigo;
+pen IndianRed;
+pen HotPink;
+pen Honeydew;
+pen GreenYellow;
+pen Goldenrod;
 pen Sienna;
 pen Gold;
-pen BlueViolet;
-pen Goldenrod;
-pen ForestGreen;
-pen Chartreuse;
-pen NavajoWhite;
-pen Tan;
+pen Gainsboro;
+pen FloralWhite;
+pen FireBrick;
+pen DodgerBlue;
+pen DarkViolet;
+pen DarkTurquoise;
+pen DarkSlateGray;
+pen DarkSeaGreen;
+pen DarkOrchid;
+pen DarkOrange;
+pen Navy;
+pen LightSlateGray;
+pen DarkOliveGreen;
 pen DarkMagenta;
-pen AntiqueWhite;
-pen PaleTurquoise;
-pen IndianRed;
+pen Tomato;
+pen DarkKhaki;
+pen DarkGreen;
+pen DarkGray;
+pen DarkCyan;
 pen Crimson;
+pen Cornsilk;
+pen LightSteelBlue;
+pen CornflowerBlue;
+pen Chocolate;
+pen Chartreuse;
+pen BurlyWood;
 pen Azure;
-pen LavenderBlush;
-pen LawnGreen;
-pen Brown;
-pen Wheat;
-pen BurlyWood;
-pen Salmon;
-pen Moccasin;
+pen Aquamarine;
+pen NavajoWhite;
+pen SlateGray;
+pen Violet;
 pen DarkBlue;
-pen Peru;
-pen White;
-pen Purple;
-pen WhiteSmoke;
-pen DimGray;
-pen Orange;
-pen OrangeRed;
-pen Fuchsia;
-pen SteelBlue;
-pen PeachPuff;
-pen Bisque;
-pen Honeydew;
 pen RosyBrown;
+pen Olive;
+pen DeepSkyBlue;
+pen Snow;
+pen BlanchedAlmond;
+pen LavenderBlush;
 pen Black;
+pen Bisque;
+pen DarkGoldenrod;
+pen Thistle;
+pen DarkRed;
 pen Khaki;
-pen FireBrick;
-pen Snow;
-pen LemonChiffon;
-pen LimeGreen;
+pen Blue;
+pen Maroon;
+pen Yellow;
+pen DeepPink;
+pen Fuchsia;
 pen Lime;
-pen Aqua;
-pen OldLace;
-pen Aquamarine;
+pen AntiqueWhite;
+pen DimGray;
+pen MistyRose;
+pen ForestGreen;
 pen Green;
-pen GreenYellow;
-pen Lavender;
-pen DarkCyan;
-pen FloralWhite;
-pen DarkRed;
-pen BlanchedAlmond;
-pen PowderBlue;
-pen DarkGray;
-pen DarkGreen;
-pen DarkGoldenrod;
-pen SkyBlue;
+pen Orchid;
+pen SteelBlue;
+pen DarkSalmon;
 pen SeaGreen;
-pen DarkViolet;
-pen Teal;
+pen Peru;
+pen Cyan;
+pen BlueViolet;
+pen CadetBlue;
 pen AliceBlue;
-pen HotPink;
-pen DodgerBlue;
-pen SaddleBrown;
-pen Tomato;
-pen DarkKhaki;
-pen Maroon;
+pen Magenta;
+pen Aqua;
+pen GhostWhite;
+pen MediumOrchid;
 pen YellowGreen;
-pen LightBlue;
+pen WhiteSmoke;
+pen LawnGreen;
+pen Brown;
+pen SpringGreen;
+pen Beige;
+pen Coral;
 pen LightCoral;
-pen LightCyan;
-pen Yellow;
-pen LightGreen;
-pen PaleGreen;
-pen Linen;
-pen LightGoldenrodYellow;
-pen LightGrey;
-pen LightPink;
-pen PaleGoldenrod;
-pen LightSalmon;
-pen LightSeaGreen;
-pen LightSkyBlue;
-pen Navy;
-pen LightSlateGray;
-pen DarkOliveGreen;
-pen DarkOrange;
 pen PaleVioletRed;
-pen LightSteelBlue;
-pen CornflowerBlue;
-pen LightYellow;
+pen Gray;
+pen MidnightBlue;
 pen rgbint(int r, int g, int b);
-pen Coral;
-pen MistyRose;
-pen DarkSalmon;
-pen Silver;
-pen DarkSeaGreen;
+pen SlateBlue;
+pen Ivory;
+pen Orange;
 pen RoyalBlue;
 pen DarkSlateBlue;
-pen DarkSlateGray;
-pen Turquoise;
+pen MediumVioletRed;
+pen Wheat;
+pen SandyBrown;
+pen Linen;
+pen LightGoldenrodYellow;

Modified: trunk/Build/source/utils/asymptote/asymptote.spec
===================================================================
--- trunk/Build/source/utils/asymptote/asymptote.spec	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/asymptote.spec	2017-03-07 18:10:02 UTC (rev 43422)
@@ -1,7 +1,7 @@
 %{!?_texmf: %global _texmf %(eval "echo `kpsewhich -expand-var '$TEXMFLOCAL'`")}
 
 Name:           asymptote
-Version:        2.38
+Version:        2.40
 Release:        1%{?dist}
 Summary:        Descriptive vector graphics language
 

Modified: trunk/Build/source/utils/asymptote/base/asymptote.py
===================================================================
--- trunk/Build/source/utils/asymptote/base/asymptote.py	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/base/asymptote.py	2017-03-07 18:10:02 UTC (rev 43422)
@@ -3,7 +3,7 @@
 from subprocess import *
 class asy:
 	def __init__(self):
-		self.session = Popen(['asy','-quiet','-interactive'],stdin=PIPE)
+		self.session = Popen(['asy','-quiet','-inpipe=0','-outpipe=2'],stdin=PIPE)
 		self.help()
 	def send(self, cmd):
 		self.session.stdin.write(cmd+'\n')

Modified: trunk/Build/source/utils/asymptote/base/graph.asy
===================================================================
--- trunk/Build/source/utils/asymptote/base/graph.asy	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/base/graph.asy	2017-03-07 18:10:02 UTC (rev 43422)
@@ -657,6 +657,7 @@
     }
 
     if(calcStep) {
+      if(N == 1) N=2;
       if(N == 0) N=(int) (len/Step);
       else Step=len/N;
     }

Modified: trunk/Build/source/utils/asymptote/base/graph3.asy
===================================================================
--- trunk/Build/source/utils/asymptote/base/graph3.asy	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/base/graph3.asy	2017-03-07 18:10:02 UTC (rev 43422)
@@ -4,8 +4,6 @@
 import graph;
 import three;
 
-triple zero3(real) {return O;}
-
 typedef triple direction3(real);
 direction3 Dir(triple dir) {return new triple(real) {return dir;};}
 

Modified: trunk/Build/source/utils/asymptote/base/ode.asy
===================================================================
--- trunk/Build/source/utils/asymptote/base/ode.asy	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/base/ode.asy	2017-03-07 18:10:02 UTC (rev 43422)
@@ -98,8 +98,7 @@
 }
       
 // First-Order Euler
-RKTableau Euler=RKTableau(1,new real[][],
-                          new real[] {1});
+RKTableau Euler=RKTableau(1,new real[][], new real[] {1});
 
 // First-Order Exponential Euler
 RKTableau E_Euler=RKTableau(1,new real[][], new real[] {1},

Modified: trunk/Build/source/utils/asymptote/base/palette.asy
===================================================================
--- trunk/Build/source/utils/asymptote/base/palette.asy	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/base/palette.asy	2017-03-07 18:10:02 UTC (rev 43422)
@@ -245,12 +245,12 @@
   real Min=min(f);
   real Max=max(f);
   int n=f.length;
-  int m=n > 0 ? f[0].length : 0;
-  pen[][] p=new pen[n][m];
+  pen[][] p=new pen[n][];
   real step=(Max == Min) ? 0.0 : (palette.length-1)/(Max-Min);
   for(int i=0; i < n; ++i) {
     real[] fi=f[i];
-    p[i]=sequence(new pen(int j) {return palette[round((fi[j]-Min)*step)];},m);
+    p[i]=sequence(new pen(int j) {return palette[round((fi[j]-Min)*step)];},
+                  f[i].length);
   }
   return p;
 }
@@ -270,6 +270,7 @@
 } 
 
 paletteticks PaletteTicks=PaletteTicks();
+paletteticks NoTicks=new ticks(int sign=-1) {return NoTicks;};
 
 void palette(picture pic=currentpicture, Label L="", bounds bounds, 
              pair initial, pair final, axis axis=Right, pen[] palette, 

Modified: trunk/Build/source/utils/asymptote/base/plain.asy
===================================================================
--- trunk/Build/source/utils/asymptote/base/plain.asy	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/base/plain.asy	2017-03-07 18:10:02 UTC (rev 43422)
@@ -281,6 +281,22 @@
 
 cputime();
 
-texpreamble("\ifx\pdfpagewidth\undefined\let\pdfpagewidth\paperwidth\else\let\paperwidth\pdfpagewidth\fi");
-texpreamble("\ifx\pdfpageheight\undefined\let\pdfpageheight\paperheight\else\let\paperheight\pdfpageheight\fi");
-if(settings.tex == "luatex") texpreamble("\input luatex85.sty");
+void nosetpagesize()
+{
+  static bool initialized=false;
+  if(!initialized && latex()) {
+    // Portably pass nosetpagesize option to graphicx package.
+    texpreamble("\usepackage{ifluatex}\ifluatex
+\ifx\pdfpagewidth\undefined\let\pdfpagewidth\paperwidth\fi
+\ifx\pdfpageheight\undefined\let\pdfpageheight\paperheight\fi\else
+\let\paperwidthsave\paperwidth\let\paperwidth\undefined
+\usepackage{graphicx}
+\let\paperwidth\paperwidthsave\fi");
+    initialized=true;
+  }
+}
+
+nosetpagesize();
+
+if(settings.tex == "luatex")
+  texpreamble("\input luatex85.sty");

Modified: trunk/Build/source/utils/asymptote/base/plain_pens.asy
===================================================================
--- trunk/Build/source/utils/asymptote/base/plain_pens.asy	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/base/plain_pens.asy	2017-03-07 18:10:02 UTC (rev 43422)
@@ -99,7 +99,7 @@
 pen deepblue=rgb(0,0,0.5);
 pen deepcyan=rgb(0,0.5,0.5);
 pen deepmagenta=rgb(0.5,0,0.5);
-pen olive=rgb(0.5,0.5,0);
+pen deepyellow=rgb(0.5,0.5,0);
 pen deepgray=gray(0.1);
 
 pen darkred=rgb(0.25,0,0);
@@ -123,6 +123,7 @@
 
 pen salmon=lightred;
 pen brown=deepred;
+pen olive=deepyellow;
 pen darkbrown=darkred;
 pen pink=palemagenta;
 pen palegrey=palegray;

Modified: trunk/Build/source/utils/asymptote/base/plain_picture.asy
===================================================================
--- trunk/Build/source/utils/asymptote/base/plain_picture.asy	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/base/plain_picture.asy	2017-03-07 18:10:02 UTC (rev 43422)
@@ -1236,6 +1236,15 @@
   pic.addPath(g);
 }
 
+void drawstrokepath(picture pic=currentpicture, path g, pen strokepen,
+                    pen p=currentpen)
+{
+  pic.add(new void(frame f, transform t) {
+      draw(f,strokepath(t*g,strokepen),p);
+    },true);
+  pic.addPath(g,p);
+}
+
 void latticeshade(picture pic=currentpicture, path[] g, bool stroke=false,
                   pen fillrule=currentpen, pen[][] p, bool copy=true)
 {

Modified: trunk/Build/source/utils/asymptote/base/smoothcontour3.asy
===================================================================
--- trunk/Build/source/utils/asymptote/base/smoothcontour3.asy	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/base/smoothcontour3.asy	2017-03-07 18:10:02 UTC (rev 43422)
@@ -1574,7 +1574,8 @@
     for (int i = 0; i < patches.length; ++i) {
       triple center = (patches[i].triangular ?
                        patches[i].point(1/3, 1/3) : patches[i].point(1/2,1/2));
-      patches[i] = shift(center) * scale3(1.01) * shift(-center) * patches[i];
+      transform3 T=shift(center) * scale3(1.03) * shift(-center);
+      patches[i] = T * patches[i];
     }
   }
   return surface(...patches);

Modified: trunk/Build/source/utils/asymptote/base/solids.asy
===================================================================
--- trunk/Build/source/utils/asymptote/base/solids.asy	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/base/solids.asy	2017-03-07 18:10:02 UTC (rev 43422)
@@ -408,5 +408,5 @@
 // Note: unitsphere provides a smoother and more efficient surface.
 revolution sphere(triple c=O, real r, int n=nslice)
 {
-  return revolution(c,Arc(c,r,180,0,0,0,Y,n),Z);
+  return revolution(c,Arc(c,r,180-sqrtEpsilon,0,sqrtEpsilon,0,Y,n),Z);
 }

Modified: trunk/Build/source/utils/asymptote/base/three.asy
===================================================================
--- trunk/Build/source/utils/asymptote/base/three.asy	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/base/three.asy	2017-03-07 18:10:02 UTC (rev 43422)
@@ -79,7 +79,7 @@
 defaultrender.tessellate=false;
 defaultrender.merge=false;
 defaultrender.margin=0.02;
-defaultrender.tubegranularity=0.005;
+defaultrender.tubegranularity=0.001;
 defaultrender.sphere=NURBSsphere;
 defaultrender.labelfill=true;
 defaultrender.partnames=false;
@@ -218,7 +218,7 @@
 }
 
 // Return the transformation corresponding to moving the camera from the target
-// (looking in the negative z direction) to the point 'eye' (looking at target),
+// (looking in the negative z direction) to the point 'eye' (looking at target,
 // orienting the camera so that direction 'up' points upwards.
 // Since, in actuality, we are transforming the points instead of the camera,
 // we calculate the inverse matrix.

Modified: trunk/Build/source/utils/asymptote/base/three_surface.asy
===================================================================
--- trunk/Build/source/utils/asymptote/base/three_surface.asy	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/base/three_surface.asy	2017-03-07 18:10:02 UTC (rev 43422)
@@ -1273,13 +1273,15 @@
   return patch(subpatch(s.P,a,b),s.straight,s.planar);
 }
 
-// return an array containing an intersection times of path p and surface s.
+// return an array containing the times for one intersection of path p and
+// patch 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.
+// return an array containing the times for one intersection of path p and
+// surface s.
 real[] intersect(path3 p, surface s, real fuzz=-1)
 {
   for(int i=0; i < s.s.length; ++i) {
@@ -1402,14 +1404,9 @@
   if(prc())
     PRCshininess=PRCshininess(m.shininess);
   
-  if(s.triangular)
-    drawbeziertriangle(f,s.P,center,s.straight && s.planar,m.p,
-                       m.opacity,m.shininess,PRCshininess,s.colors,
-                       interaction.type);
-  else
-    draw(f,s.P,center,s.straight && s.planar,m.p,m.opacity,m.shininess,
-         PRCshininess,s.planar ? s.normal(0.5,0.5) : O,s.colors,
-         interaction.type,prc);
+  (s.triangular ? drawbeziertriangle : draw)
+    (f,s.P,center,s.straight && s.planar,m.p,m.opacity,m.shininess,
+     PRCshininess,s.colors,interaction.type,prc);
 }
 
 // Draw triangles on a frame.

Added: trunk/Build/source/utils/asymptote/beziercurve.cc
===================================================================
--- trunk/Build/source/utils/asymptote/beziercurve.cc	                        (rev 0)
+++ trunk/Build/source/utils/asymptote/beziercurve.cc	2017-03-07 18:10:02 UTC (rev 43422)
@@ -0,0 +1,88 @@
+/*****
+ * drawbezierpatch.cc
+ * Author: John C. Bowman
+ *
+ * Render a Bezier curve.
+ *****/
+
+#include "beziercurve.h"
+
+namespace camp {
+
+#ifdef HAVE_GL
+
+std::vector<GLfloat> BezierCurve::buffer;
+std::vector<GLuint> BezierCurve::indices;
+
+void BezierCurve::init(double res, const triple& Min, const triple& Max)
+{
+  this->res=res;
+  res2=res*res;
+  this->Min=Min;
+  this->Max=Max;
+
+  const size_t nbuffer=10000;
+  buffer.reserve(nbuffer);
+  indices.reserve(nbuffer);
+}
+
+// Use a uniform partition to draw a Bezier patch.
+// p is an array of 4 triples representing the control points.
+// Ii are the vertices indices.
+void BezierCurve::render(const triple *p, GLuint I0, GLuint I1)
+{
+  triple p0=p[0];
+  triple p1=p[1];
+  triple p2=p[2];
+  triple p3=p[3];
+  if(Distance1(p0,p1,p2,p3) < res2) { // Segment is flat
+    triple P[]={p0,p3};
+    if(!offscreen(2,P)) {
+      indices.push_back(I0);
+      indices.push_back(I1);
+    }
+  } else { // Segment is not flat
+    if(offscreen(4,p)) return;
+    triple m0=0.5*(p0+p1);
+    triple m1=0.5*(p1+p2);
+    triple m2=0.5*(p2+p3);
+    triple m3=0.5*(m0+m1);
+    triple m4=0.5*(m1+m2);
+    triple m5=0.5*(m3+m4);
+      
+    triple s0[]={p0,m0,m3,m5};
+    triple s1[]={m5,m4,m2,p3};
+      
+    GLuint i0=vertex(m5);
+      
+    render(s0,I0,i0);
+    render(s1,i0,I1);
+  }
+}
+
+void BezierCurve::render(const triple *p, bool straight) 
+{
+  GLuint i0=vertex(p[0]);
+  GLuint i3=vertex(p[3]);
+    
+  if(straight) {
+    indices.push_back(i0);
+    indices.push_back(i3);
+  } else
+    render(p,i0,i3);
+}
+  
+void BezierCurve::draw()
+{
+  size_t stride=3*sizeof(GLfloat);
+
+  glEnableClientState(GL_VERTEX_ARRAY);
+  glVertexPointer(3,GL_FLOAT,stride,&buffer[0]);
+  glDrawElements(GL_LINES,indices.size(),GL_UNSIGNED_INT,&indices[0]);
+  glDisableClientState(GL_VERTEX_ARRAY);
+  clear();
+}
+
+#endif
+
+} //namespace camp

Added: trunk/Build/source/utils/asymptote/beziercurve.h
===================================================================
--- trunk/Build/source/utils/asymptote/beziercurve.h	                        (rev 0)
+++ trunk/Build/source/utils/asymptote/beziercurve.h	2017-03-07 18:10:02 UTC (rev 43422)
@@ -0,0 +1,83 @@
+/*****
+ * beziercurve.h
+ * Author: John C. Bowman
+ *
+ * Render a Bezier curve.
+ *****/
+
+#ifndef BEZIERCURVE_H
+#define BEZIERCURVE_H
+
+#include "drawelement.h"
+
+namespace camp {
+
+#ifdef HAVE_GL
+
+extern const double Fuzz;
+extern const double Fuzz2;
+
+struct BezierCurve
+{
+  static std::vector<GLfloat> buffer;
+  static std::vector<GLuint> indices;
+  GLuint nvertices;
+  double res,res2;
+  triple Min,Max;
+  
+  BezierCurve() : nvertices(0) {}
+  
+  void init(double res, const triple& Min, const triple& Max);
+    
+// Store the vertex v in the buffer.
+  GLuint vertex(const triple &v) {
+    buffer.push_back(v.getx());
+    buffer.push_back(v.gety());
+    buffer.push_back(v.getz());
+    return nvertices++;
+  }
+  
+// Approximate bounds by bounding box of control polyhedron.
+  bool offscreen(size_t n, const triple *v) {
+    double x,y,z;
+    double X,Y,Z;
+    
+    boundstriples(x,y,z,X,Y,Z,n,v);
+    return
+      X < Min.getx() || x > Max.getx() ||
+      Y < Min.gety() || y > Max.gety() ||
+      Z < Min.getz() || z > Max.getz();
+  }
+  
+  void clear() {
+    nvertices=0;
+    buffer.clear();
+    indices.clear();
+  }
+  
+  ~BezierCurve() {
+    clear();
+  }
+  
+  void render(const triple *p, GLuint I0, GLuint I1);
+  void render(const triple *p, bool straight);
+  
+  void queue(const triple *g, bool straight, double ratio,
+              const triple& Min, const triple& Max) {
+    init(pixel*ratio,Min,Max);
+    render(g,straight);
+  }
+  
+  void draw();
+  void draw(const triple *g, bool straight, double ratio,
+            const triple& Min, const triple& Max) {
+    queue(g,straight,ratio,Min,Max);
+    draw();
+  }
+};
+
+#endif
+
+} //namespace camp
+
+#endif

Added: trunk/Build/source/utils/asymptote/bezierpatch.cc
===================================================================
--- trunk/Build/source/utils/asymptote/bezierpatch.cc	                        (rev 0)
+++ trunk/Build/source/utils/asymptote/bezierpatch.cc	2017-03-07 18:10:02 UTC (rev 43422)
@@ -0,0 +1,648 @@
+/*****
+ * drawbezierpatch.cc
+ * Authors: John C. Bowman and Jesse Frohlich
+ *
+ * Render Bezier patches and triangles.
+ *****/
+
+#include "bezierpatch.h"
+
+namespace camp {
+
+size_t tstride;
+GLfloat *B;
+
+#ifdef HAVE_GL
+
+std::vector<GLfloat> BezierPatch::buffer;
+std::vector<GLfloat> BezierPatch::Buffer;
+std::vector<GLuint> BezierPatch::indices;
+std::vector<GLuint> BezierPatch::Indices;
+std::vector<GLfloat> BezierPatch::tbuffer;
+std::vector<GLuint> BezierPatch::tindices;
+std::vector<GLfloat> BezierPatch::tBuffer;
+std::vector<GLuint> BezierPatch::tIndices;
+
+GLuint BezierPatch::nvertices=0;
+GLuint BezierPatch::ntvertices=0;
+GLuint BezierPatch::Nvertices=0;
+GLuint BezierPatch::Ntvertices=0;
+
+extern const double Fuzz2;
+
+const double FillFactor=0.1;
+
+// Partially work around OpenGL transparency bug by sorting transparent
+// triangles by their centroid depth.
+int compare(const void *a, const void *b)
+{
+  size_t a0=tstride*((GLuint *) a)[0];
+  size_t a1=tstride*((GLuint *) a)[1];
+  size_t a2=tstride*((GLuint *) a)[2];
+  
+  size_t b0=tstride*((GLuint *) b)[0];
+  size_t b1=tstride*((GLuint *) b)[1];
+  size_t b2=tstride*((GLuint *) b)[2];
+
+  double x=
+    T[0]*(B[a0]+B[a1]+B[a2]-B[b0]-B[b1]-B[b2])+
+    T[1]*(B[a0+1]+B[a1+1]+B[a2+1]-B[b0+1]-B[b1+1]-B[b2+1])+
+    T[2]*(B[a0+2]+B[a1+2]+B[a2+2]-B[b0+2]-B[b1+2]-B[b2+2]);
+  if(x > 0.0) return 1;
+  if(x < 0.0) return -1;
+  return 0;
+}
+
+void BezierPatch::init(double res, const triple& Min, const triple& Max,
+                       bool transparent, GLfloat *colors)
+{
+  empty=false;
+  res2=res*res;
+  res3=res2;
+  Epsilon=FillFactor*res;
+  this->Min=Min;
+  this->Max=Max;
+  
+  const size_t nbuffer=10000;
+  if(transparent) {
+    tbuffer.reserve(nbuffer);
+    tindices.reserve(nbuffer);
+    pindices=&tindices;
+    pvertex=&tvertex;
+    if(colors) {
+      tBuffer.reserve(nbuffer);
+      tIndices.reserve(nbuffer);
+      pindices=&tIndices;
+      pVertex=&tVertex;
+    }
+  } else {
+    buffer.reserve(nbuffer);
+    indices.reserve(nbuffer);
+    pindices=&indices;
+    pvertex=&vertex;
+    if(colors) {
+      Buffer.reserve(nbuffer);
+      Indices.reserve(nbuffer);
+      pindices=&Indices;
+      pVertex=&Vertex;
+    }
+  }
+}
+    
+// Use a uniform partition to draw a Bezier patch.
+// p is an array of 16 triples representing the control points.
+// Pi are the (possibly) adjusted vertices indexed by Ii.
+// The 'flati' are flatness flags for each boundary.
+void BezierPatch::render(const triple *p,
+                         GLuint I0, GLuint I1, GLuint I2, GLuint I3,
+                         triple P0, triple P1, triple P2, triple P3,
+                         bool flat0, bool flat1, bool flat2, bool flat3,
+                         GLfloat *C0, GLfloat *C1, GLfloat *C2, GLfloat *C3)
+{
+  if(Distance(p) < res2) { // Patch is flat
+    triple P[]={P0,P1,P2,P3};
+    if(!offscreen(4,P)) {
+      std::vector<GLuint> &p=*pindices;
+      p.push_back(I0);
+      p.push_back(I1);
+      p.push_back(I2);
+      p.push_back(I0);
+      p.push_back(I2);
+      p.push_back(I3);
+    }
+  } else { // Patch is not flat
+    if(offscreen(16,p)) return;
+    /* Control points are indexed as follows:
+         
+       Coordinate
+       +-----
+        Index
+         
+
+       03    13    23    33
+       +-----+-----+-----+
+       |3    |7    |11   |15
+       |     |     |     |
+       |02   |12   |22   |32
+       +-----+-----+-----+
+       |2    |6    |10   |14
+       |     |     |     |
+       |01   |11   |21   |31
+       +-----+-----+-----+
+       |1    |5    |9    |13
+       |     |     |     |
+       |00   |10   |20   |30
+       +-----+-----+-----+
+       0     4     8     12
+         
+
+       Subdivision:
+       P refers to a corner
+       m refers to a midpoint
+       s refers to a subpatch
+         
+                m2
+       +--------+--------+
+       |P3      |      P2|
+       |        |        |
+       |   s3   |   s2   |
+       |        |        |
+       |        |m4      |
+     m3+--------+--------+m1
+       |        |        |
+       |        |        |
+       |   s0   |   s1   |
+       |        |        |
+       |P0      |      P1|
+       +--------+--------+
+                m0
+    */
+    
+    // Subdivide patch:
+    triple p0=p[0];
+    triple p3=p[3];
+    triple p12=p[12];
+    triple p15=p[15];
+      
+    Split3 c0(p0,p[1],p[2],p3);
+    Split3 c1(p[4],p[5],p[6],p[7]);
+    Split3 c2(p[8],p[9],p[10],p[11]);
+    Split3 c3(p12,p[13],p[14],p15);
+
+    Split3 c4(p0,p[4],p[8],p12);
+    Split3 c5(c0.m0,c1.m0,c2.m0,c3.m0);
+    Split3 c6(c0.m3,c1.m3,c2.m3,c3.m3);
+    Split3 c7(c0.m5,c1.m5,c2.m5,c3.m5);
+    Split3 c8(c0.m4,c1.m4,c2.m4,c3.m4);
+    Split3 c9(c0.m2,c1.m2,c2.m2,c3.m2);
+    Split3 c10(p3,p[7],p[11],p15);
+
+    triple s0[]={p0,c0.m0,c0.m3,c0.m5,c4.m0,c5.m0,c6.m0,c7.m0,
+                 c4.m3,c5.m3,c6.m3,c7.m3,c4.m5,c5.m5,c6.m5,c7.m5};
+    triple s1[]={c4.m5,c5.m5,c6.m5,c7.m5,c4.m4,c5.m4,c6.m4,c7.m4,
+                 c4.m2,c5.m2,c6.m2,c7.m2,p12,c3.m0,c3.m3,c3.m5};
+    triple s2[]={c7.m5,c8.m5,c9.m5,c10.m5,c7.m4,c8.m4,c9.m4,c10.m4,
+                 c7.m2,c8.m2,c9.m2,c10.m2,c3.m5,c3.m4,c3.m2,p15};
+    triple s3[]={c0.m5,c0.m4,c0.m2,p3,c7.m0,c8.m0,c9.m0,c10.m0,
+                 c7.m3,c8.m3,c9.m3,c10.m3,c7.m5,c8.m5,c9.m5,c10.m5};
+      
+    triple m4=s0[15];
+      
+    triple n0=normal(s0[0],s0[4],s0[8],s0[12],s0[13],s0[14],s0[15]);
+    if(n0 == 0.0) {
+      n0=normal(s0[0],s0[4],s0[8],s0[12],s0[11],s0[7],s0[3]);
+      if(n0 == 0.0) n0=normal(s0[3],s0[2],s0[1],s0[0],s0[13],s0[14],s0[15]);
+    }
+      
+    triple n1=normal(s1[12],s1[13],s1[14],s1[15],s1[11],s1[7],s1[3]);
+    if(n1 == 0.0) {
+      n1=normal(s1[12],s1[13],s1[14],s1[15],s1[2],s1[1],s1[0]);
+      if(n1 == 0.0) n1=normal(s1[0],s1[4],s1[8],s1[12],s1[11],s1[7],s1[3]);
+    }
+      
+    triple n2=normal(s2[15],s2[11],s2[7],s2[3],s2[2],s2[1],s2[0]);
+    if(n2 == 0.0) {
+      n2=normal(s2[15],s2[11],s2[7],s2[3],s2[4],s2[8],s2[12]);
+      if(n2 == 0.0) n2=normal(s2[12],s2[13],s2[14],s2[15],s2[2],s2[1],s2[0]);
+    }
+      
+    triple n3=normal(s3[3],s3[2],s3[1],s3[0],s3[4],s3[8],s3[12]);
+    if(n3 == 0.0) {
+      n3=normal(s3[3],s3[2],s3[1],s3[0],s3[13],s3[14],s3[15]);
+      if(n3 == 0.0) n3=normal(s3[15],s3[11],s3[7],s3[3],s3[4],s3[8],s3[12]);
+    }
+      
+    triple n4=normal(s2[3],s2[2],s2[1],m4,s2[4],s2[8],s2[12]);
+      
+    // A kludge to remove subdivision cracks, only applied the first time
+    // an edge is found to be flat before the rest of the subpatch is.
+      
+    triple m0=0.5*(P0+P1);
+    if(!flat0) {
+      if((flat0=Straightness(p0,p[4],p[8],p12) < res3))
+        m0 -= Epsilon*unit(derivative(s1[0],s1[1],s1[2],s1[3]));
+      else m0=s0[12];
+    }
+      
+    triple m1=0.5*(P1+P2);
+    if(!flat1) {
+      if((flat1=Straightness(p12,p[13],p[14],p15) < res3))
+        m1 -= Epsilon*unit(derivative(s2[12],s2[8],s2[4],s2[0]));
+      else m1=s1[15];
+    }
+      
+    triple m2=0.5*(P2+P3);
+    if(!flat2) {
+      if((flat2=Straightness(p15,p[11],p[7],p3) < res3))
+        m2 -= Epsilon*unit(derivative(s3[15],s2[14],s2[13],s1[12]));
+      else m2=s2[3];
+    }
+      
+    triple m3=0.5*(P3+P0);
+    if(!flat3) {
+      if((flat3=Straightness(p0,p[1],p[2],p3) < res3))
+        m3 -= Epsilon*unit(derivative(s0[3],s0[7],s0[11],s0[15]));
+      else m3=s3[0];
+    }
+      
+    if(C0) {
+      GLfloat c0[4],c1[4],c2[4],c3[4],c4[4];
+      for(size_t i=0; i < 4; ++i) {
+        c0[i]=0.5*(C0[i]+C1[i]);
+        c1[i]=0.5*(C1[i]+C2[i]);
+        c2[i]=0.5*(C2[i]+C3[i]);
+        c3[i]=0.5*(C3[i]+C0[i]);
+        c4[i]=0.5*(c0[i]+c2[i]);
+      }
+      
+      GLuint i0=pVertex(m0,n0,c0);
+      GLuint i1=pVertex(m1,n1,c1);
+      GLuint i2=pVertex(m2,n2,c2);
+      GLuint i3=pVertex(m3,n3,c3);
+      GLuint i4=pVertex(m4,n4,c4);
+      render(s0,I0,i0,i4,i3,P0,m0,m4,m3,flat0,false,false,flat3,
+             C0,c0,c4,c3);
+      render(s1,i0,I1,i1,i4,m0,P1,m1,m4,flat0,flat1,false,false,
+             c0,C1,c1,c4);
+      render(s2,i4,i1,I2,i2,m4,m1,P2,m2,false,flat1,flat2,false,
+             c4,c1,C2,c2);
+      render(s3,i3,i4,i2,I3,m3,m4,m2,P3,false,false,flat2,flat3,
+             c3,c4,c2,C3);
+    } else {
+      GLuint i0=pvertex(m0,n0);
+      GLuint i1=pvertex(m1,n1);
+      GLuint i2=pvertex(m2,n2);
+      GLuint i3=pvertex(m3,n3);
+      GLuint i4=pvertex(m4,n4);
+      render(s0,I0,i0,i4,i3,P0,m0,m4,m3,flat0,false,false,flat3);
+      render(s1,i0,I1,i1,i4,m0,P1,m1,m4,flat0,flat1,false,false);
+      render(s2,i4,i1,I2,i2,m4,m1,P2,m2,false,flat1,flat2,false);
+      render(s3,i3,i4,i2,I3,m3,m4,m2,P3,false,false,flat2,flat3);
+    }
+  }
+}
+
+void BezierPatch::render(const triple *p, bool straight, GLfloat *c0)
+{
+  triple p0=p[0];
+  epsilon=0;
+  for(unsigned i=1; i < 16; ++i)
+    epsilon=max(epsilon,abs2(p[i]-p0));
+  
+  epsilon *= Fuzz2;
+    
+  triple p3=p[3];
+  triple p12=p[12];
+  triple p15=p[15];
+
+  triple n0=normal(p3,p[2],p[1],p0,p[4],p[8],p12);
+  if(n0 == 0.0) n0=normal(p3,p[2],p[1],p0,p[13],p[14],p15);
+  if(n0 == 0.0) n0=normal(p15,p[11],p[7],p3,p[4],p[8],p12);
+    
+  triple n1=normal(p0,p[4],p[8],p12,p[13],p[14],p15);
+  if(n1 == 0.0) n1=normal(p0,p[4],p[8],p12,p[11],p[7],p3);
+  if(n1 == 0.0) n1=normal(p3,p[2],p[1],p0,p[13],p[14],p15);
+    
+  triple n2=normal(p12,p[13],p[14],p15,p[11],p[7],p3);
+  if(n2 == 0.0) n2=normal(p12,p[13],p[14],p15,p[2],p[1],p0);
+  if(n2 == 0.0) n2=normal(p0,p[4],p[8],p12,p[11],p[7],p3);
+    
+  triple n3=normal(p15,p[11],p[7],p3,p[2],p[1],p0);
+  if(n3 == 0.0) n3=normal(p15,p[11],p[7],p3,p[4],p[8],p12);
+  if(n3 == 0.0) n3=normal(p12,p[13],p[14],p15,p[2],p[1],p0);
+    
+  GLuint I0,I1,I2,I3;
+    
+  if(c0) {
+    GLfloat *c1=c0+4;
+    GLfloat *c2=c0+8;
+    GLfloat *c3=c0+12;
+    
+    I0=pVertex(p0,n0,c0);
+    I1=pVertex(p12,n1,c1);
+    I2=pVertex(p15,n2,c2);
+    I3=pVertex(p3,n3,c3);
+      
+    if(!straight)
+      render(p,I0,I1,I2,I3,p0,p12,p15,p3,false,false,false,false,
+             c0,c1,c2,c3);
+  } else {
+    I0=pvertex(p0,n0);
+    I1=pvertex(p12,n1);
+    I2=pvertex(p15,n2);
+    I3=pvertex(p3,n3);
+    
+    if(!straight)
+      render(p,I0,I1,I2,I3,p0,p12,p15,p3,false,false,false,false);
+  }
+    
+  if(straight) {
+    pindices->push_back(I0);
+    pindices->push_back(I1);
+    pindices->push_back(I2);
+    pindices->push_back(I0);
+    pindices->push_back(I2);
+    pindices->push_back(I3);
+  }
+}
+
+// Use a uniform partition to draw a Bezier triangle.
+// p is an array of 10 triples representing the control points.
+// Pi are the (possibly) adjusted vertices indexed by Ii.
+// The 'flati' are flatness flags for each boundary.
+void BezierTriangle::render(const triple *p,
+                            GLuint I0, GLuint I1, GLuint I2,
+                            triple P0, triple P1, triple P2,
+                            bool flat0, bool flat1, bool flat2,
+                            GLfloat *C0, GLfloat *C1, GLfloat *C2)
+{
+  if(Distance(p) < res2) { // Triangle is flat
+    triple P[]={P0,P1,P2};
+    if(!offscreen(3,P)) {
+      std::vector<GLuint> &p=*pindices;
+      p.push_back(I0);
+      p.push_back(I1);
+      p.push_back(I2);
+    }
+  } else { // Triangle is not flat
+    if(offscreen(10,p)) return;
+    /* Control points are indexed as follows:
+
+       Coordinate
+        Index
+
+                                  030
+                                   9
+                                   /\
+                                  /  \
+                                 /    \
+                                /      \
+                               /        \
+                          021 +          + 120
+                           5 /            \ 8
+                            /              \
+                           /                \
+                          /                  \
+                         /                    \
+                    012 +          +           + 210
+                     2 /          111           \ 7
+                      /            4             \
+                     /                            \
+                    /                              \
+                   /                                \
+                  /__________________________________\
+                003         102           201        300
+                 0           1             3          6
+
+
+       Subdivision:
+                                   P2
+                                   030
+                                   /\
+                                  /  \
+                                 /    \
+                                /      \
+                               /        \
+                              /    up    \
+                             /            \
+                            /              \
+                        p1 /________________\ p0
+                          /\               / \
+                         /  \             /   \
+                        /    \           /     \
+                       /      \  center /       \
+                      /        \       /         \
+                     /          \     /           \
+                    /    left    \   /    right    \
+                   /              \ /               \
+                  /________________V_________________\
+                003               p2                300
+                P0                                    P1
+    */
+
+    // Subdivide triangle:
+    triple l003=p[0];
+    triple p102=p[1];
+    triple p012=p[2];
+    triple p201=p[3];
+    triple p111=p[4];
+    triple p021=p[5];
+    triple r300=p[6];
+    triple p210=p[7];
+    triple p120=p[8];
+    triple u030=p[9];
+
+    triple u021=0.5*(u030+p021);
+    triple u120=0.5*(u030+p120);
+
+    triple p033=0.5*(p021+p012);
+    triple p231=0.5*(p120+p111);
+    triple p330=0.5*(p120+p210);
+
+    triple p123=0.5*(p012+p111);
+
+    triple l012=0.5*(p012+l003);
+    triple p312=0.5*(p111+p201);
+    triple r210=0.5*(p210+r300);
+
+    triple l102=0.5*(l003+p102);
+    triple p303=0.5*(p102+p201);
+    triple r201=0.5*(p201+r300);
+
+    triple u012=0.5*(u021+p033);
+    triple u210=0.5*(u120+p330);
+    triple l021=0.5*(p033+l012);
+    triple p4xx=0.5*p231+0.25*(p111+p102);
+    triple r120=0.5*(p330+r210);
+    triple px4x=0.5*p123+0.25*(p111+p210);
+    triple pxx4=0.25*(p021+p111)+0.5*p312;
+    triple l201=0.5*(l102+p303);
+    triple r102=0.5*(p303+r201);
+
+    triple l210=0.5*(px4x+l201); // =c120
+    triple r012=0.5*(px4x+r102); // =c021
+    triple l300=0.5*(l201+r102); // =r003=c030
+
+    triple r021=0.5*(pxx4+r120); // =c012
+    triple u201=0.5*(u210+pxx4); // =c102
+    triple r030=0.5*(u210+r120); // =u300=c003
+
+    triple u102=0.5*(u012+p4xx); // =c201
+    triple l120=0.5*(l021+p4xx); // =c210
+    triple l030=0.5*(u012+l021); // =u003=c300
+
+    triple l111=0.5*(p123+l102);
+    triple r111=0.5*(p312+r210);
+    triple u111=0.5*(u021+p231);
+    triple c111=0.25*(p033+p330+p303+p111);
+
+    triple l[]={l003,l102,l012,l201,l111,l021,l300,l210,l120,l030}; // left
+    triple r[]={l300,r102,r012,r201,r111,r021,r300,r210,r120,r030}; // right
+    triple u[]={l030,u102,u012,u201,u111,u021,r030,u210,u120,u030}; // up
+    triple c[]={r030,u201,r021,u102,c111,r012,l030,l120,l210,l300}; // center
+
+    triple n0=normal(l300,r012,r021,r030,u201,u102,l030);
+    triple n1=normal(r030,u201,u102,l030,l120,l210,l300);
+    triple n2=normal(l030,l120,l210,l300,r012,r021,r030);
+          
+    // A kludge to remove subdivision cracks, only applied the first time
+    // an edge is found to be flat before the rest of the subpatch is.
+    
+    triple p0=0.5*(P1+P2);
+    if(!flat0) {
+      if((flat0=Straightness(r300,p210,p120,u030) < res3))
+        p0 -= Epsilon*unit(derivative(c[0],c[2],c[5],c[9])+
+                           derivative(c[0],c[1],c[3],c[6]));
+      else p0=r030;
+    }
+
+    triple p1=0.5*(P2+P0);
+    if(!flat1) {
+      if((flat1=Straightness(l003,p012,p021,u030) < res3))
+        p1 -= Epsilon*unit(derivative(c[6],c[3],c[1],c[0])+
+                           derivative(c[6],c[7],c[8],c[9]));
+      else p1=l030;
+    }
+
+    triple p2=0.5*(P0+P1);
+    if(!flat2) {
+      if((flat2=Straightness(l003,p102,p201,r300) < res3))
+        p2 -= Epsilon*unit(derivative(c[9],c[8],c[7],c[6])+
+                           derivative(c[9],c[5],c[2],c[0]));
+      else p2=l300;
+    }
+
+    if(C0) {
+      GLfloat c0[4],c1[4],c2[4];
+      for(int i=0; i < 4; ++i) {
+        c0[i]=0.5*(C1[i]+C2[i]);
+        c1[i]=0.5*(C0[i]+C2[i]);
+        c2[i]=0.5*(C0[i]+C1[i]);
+      }
+      
+      GLuint i0=pVertex(p0,n0,c0);
+      GLuint i1=pVertex(p1,n1,c1);
+      GLuint i2=pVertex(p2,n2,c2);
+          
+      render(l,I0,i2,i1,P0,p2,p1,false,flat1,flat2,C0,c2,c1);
+      render(r,i2,I1,i0,p2,P1,p0,flat0,false,flat2,c2,C1,c0);
+      render(u,i1,i0,I2,p1,p0,P2,flat0,flat1,false,c1,c0,C2);
+      render(c,i0,i1,i2,p0,p1,p2,false,false,false,c0,c1,c2);
+    } else {
+      GLuint i0=pvertex(p0,n0);
+      GLuint i1=pvertex(p1,n1);
+      GLuint i2=pvertex(p2,n2);
+          
+      render(l,I0,i2,i1,P0,p2,p1,false,flat1,flat2);
+      render(r,i2,I1,i0,p2,P1,p0,flat0,false,flat2);
+      render(u,i1,i0,I2,p1,p0,P2,flat0,flat1,false);
+      render(c,i0,i1,i2,p0,p1,p2,false,false,false);
+    }
+  }
+}
+
+void BezierTriangle::render(const triple *p, bool straight, GLfloat *c0)
+{
+  triple p0=p[0];
+  epsilon=0;
+  for(int i=1; i < 10; ++i)
+    epsilon=max(epsilon,abs2(p[i]-p0));
+  
+  epsilon *= Fuzz2;
+    
+  GLuint I0,I1,I2;
+    
+  triple p6=p[6];
+  triple p9=p[9];
+    
+  triple n0=normal(p9,p[5],p[2],p0,p[1],p[3],p6);
+  triple n1=normal(p0,p[1],p[3],p6,p[7],p[8],p9);    
+  triple n2=normal(p6,p[7],p[8],p9,p[5],p[2],p0);
+    
+  if(c0) {
+    GLfloat *c1=c0+4;
+    GLfloat *c2=c0+8;
+    
+    I0=pVertex(p0,n0,c0);
+    I1=pVertex(p6,n1,c1);
+    I2=pVertex(p9,n2,c2);
+    
+    if(!straight)
+      render(p,I0,I1,I2,p0,p6,p9,false,false,false,c0,c1,c2);
+  } else {
+    I0=pvertex(p0,n0);
+    I1=pvertex(p6,n1);
+    I2=pvertex(p9,n2);
+    
+    if(!straight)
+      render(p,I0,I1,I2,p0,p6,p9,false,false,false);
+  }
+    
+  if(straight) {
+    pindices->push_back(I0);
+    pindices->push_back(I1);
+    pindices->push_back(I2);
+  }
+}
+
+void BezierPatch::draw()
+{
+  if(empty) return;
+  size_t stride=6;
+  size_t Stride=10;
+  size_t size=sizeof(GLfloat);
+  size_t bytestride=stride*size;
+  size_t Bytestride=Stride*size;
+    
+  glEnableClientState(GL_NORMAL_ARRAY);
+  glEnableClientState(GL_VERTEX_ARRAY);
+  
+  if(indices.size()) {
+    glVertexPointer(3,GL_FLOAT,bytestride,&buffer[0]);
+    glNormalPointer(GL_FLOAT,bytestride,&buffer[3]);
+    glDrawElements(GL_TRIANGLES,indices.size(),GL_UNSIGNED_INT,&indices[0]);
+  }
+  
+  if(Indices.size()) {
+    glEnableClientState(GL_COLOR_ARRAY);
+    glEnable(GL_COLOR_MATERIAL);
+    glVertexPointer(3,GL_FLOAT,Bytestride,&Buffer[0]);
+    glNormalPointer(GL_FLOAT,Bytestride,&Buffer[3]);
+    glColorPointer(4,GL_FLOAT,Bytestride,&Buffer[6]);
+    glDrawElements(GL_TRIANGLES,Indices.size(),GL_UNSIGNED_INT,&Indices[0]);
+    glDisable(GL_COLOR_MATERIAL);
+    glDisableClientState(GL_COLOR_ARRAY);
+  }
+  
+  if(tindices.size()) {
+    B=&tbuffer[0]; 
+    tstride=stride;
+    qsort(&tindices[0],tindices.size()/3,3*sizeof(GLuint),compare);
+    glVertexPointer(3,GL_FLOAT,bytestride,&tbuffer[0]);
+    glNormalPointer(GL_FLOAT,bytestride,&tbuffer[3]);
+    glDrawElements(GL_TRIANGLES,tindices.size(),GL_UNSIGNED_INT,&tindices[0]);
+  }
+  
+  if(tIndices.size()) {
+    B=&tBuffer[0];
+    tstride=Stride;
+    qsort(&tIndices[0],tIndices.size()/3,3*sizeof(GLuint),compare);
+    glEnableClientState(GL_COLOR_ARRAY);
+    glEnable(GL_COLOR_MATERIAL);
+    glVertexPointer(3,GL_FLOAT,Bytestride,&tBuffer[0]);
+    glNormalPointer(GL_FLOAT,Bytestride,&tBuffer[3]);
+    glColorPointer(4,GL_FLOAT,Bytestride,&tBuffer[6]);
+    glDrawElements(GL_TRIANGLES,tIndices.size(),GL_UNSIGNED_INT,&tIndices[0]);
+    glDisable(GL_COLOR_MATERIAL);
+    glDisableClientState(GL_COLOR_ARRAY);
+  }
+  
+  glDisableClientState(GL_VERTEX_ARRAY);
+  glDisableClientState(GL_NORMAL_ARRAY);
+  
+  clear();
+}
+
+#endif
+
+} //namespace camp

Added: trunk/Build/source/utils/asymptote/bezierpatch.h
===================================================================
--- trunk/Build/source/utils/asymptote/bezierpatch.h	                        (rev 0)
+++ trunk/Build/source/utils/asymptote/bezierpatch.h	2017-03-07 18:10:02 UTC (rev 43422)
@@ -0,0 +1,266 @@
+/*****
+ * bezierpatch.h
+ * Authors: John C. Bowman and Jesse Frohlich
+ *
+ * Render Bezier patches and triangles.
+ *****/
+
+#ifndef BEZIERPATCH_H
+#define BEZIERPATCH_H
+
+#include "drawelement.h"
+
+namespace camp {
+
+#ifdef HAVE_GL
+
+extern int sign;
+
+extern const double Fuzz;
+extern const double Fuzz2;
+
+struct BezierPatch
+{
+  static std::vector<GLfloat> buffer;
+  static std::vector<GLfloat> Buffer;
+  static std::vector<GLuint> indices;
+  static std::vector<GLuint> Indices;
+  static std::vector<GLfloat> tbuffer;
+  static std::vector<GLuint> tindices;
+  static std::vector<GLfloat> tBuffer;
+  static std::vector<GLuint> tIndices;
+  static GLuint nvertices;
+  static GLuint ntvertices;
+  static GLuint Nvertices;
+  static GLuint Ntvertices;
+  std::vector<GLuint> *pindices;
+  triple u,v,w;
+  double epsilon;
+  double Epsilon;
+  double res2,res3;
+  triple Min,Max;
+  typedef GLuint vertexFunction(const triple &v, const triple& n);
+  typedef GLuint VertexFunction(const triple &v, const triple& n, GLfloat *c);
+  vertexFunction *pvertex;
+  VertexFunction *pVertex;
+  bool empty;
+  
+  BezierPatch() : empty(true) {}
+  
+  void init(double res, const triple& Min, const triple& Max,
+            bool transparent, GLfloat *colors=NULL);
+    
+// Store the vertex v and its normal vector n in the buffer.
+  static GLuint vertex(const triple &v, const triple& n) {
+    buffer.push_back(v.getx());
+    buffer.push_back(v.gety());
+    buffer.push_back(v.getz());
+    
+    buffer.push_back(n.getx());
+    buffer.push_back(n.gety());
+    buffer.push_back(n.getz());
+    return nvertices++;
+  }
+  
+  static GLuint tvertex(const triple &v, const triple& n) {
+    tbuffer.push_back(v.getx());
+    tbuffer.push_back(v.gety());
+    tbuffer.push_back(v.getz());
+    
+    tbuffer.push_back(n.getx());
+    tbuffer.push_back(n.gety());
+    tbuffer.push_back(n.getz());
+    return ntvertices++;
+  }
+  
+// Store the vertex v and its normal vector n and colour c in the buffer.
+  static GLuint Vertex(const triple& v, const triple& n, GLfloat *c) {
+    Buffer.push_back(v.getx());
+    Buffer.push_back(v.gety());
+    Buffer.push_back(v.getz());
+    
+    Buffer.push_back(n.getx());
+    Buffer.push_back(n.gety());
+    Buffer.push_back(n.getz());
+    
+    Buffer.push_back(c[0]);
+    Buffer.push_back(c[1]);
+    Buffer.push_back(c[2]);
+    Buffer.push_back(c[3]);
+    return Nvertices++;
+  }
+  
+  static GLuint tVertex(const triple& v, const triple& n, GLfloat *c) {
+    tBuffer.push_back(v.getx());
+    tBuffer.push_back(v.gety());
+    tBuffer.push_back(v.getz());
+    
+    tBuffer.push_back(n.getx());
+    tBuffer.push_back(n.gety());
+    tBuffer.push_back(n.getz());
+    
+    tBuffer.push_back(c[0]);
+    tBuffer.push_back(c[1]);
+    tBuffer.push_back(c[2]);
+    tBuffer.push_back(c[3]);
+    return Ntvertices++;
+  }
+  
+  triple normal(triple left3, triple left2, triple left1, triple middle,
+                triple right1, triple right2, triple right3) {
+    triple rp=right1-middle;
+    triple lp=left1-middle;
+    triple n=triple(rp.gety()*lp.getz()-rp.getz()*lp.gety(),
+                    rp.getz()*lp.getx()-rp.getx()*lp.getz(),
+                    rp.getx()*lp.gety()-rp.gety()*lp.getx());
+    if(abs2(n) > epsilon)
+      return unit(n);
+    
+    triple lpp=bezierPP(middle,left1,left2);
+    triple rpp=bezierPP(middle,right1,right2);
+    n=cross(rpp,lp)+cross(rp,lpp);
+    if(abs2(n) > epsilon)
+      return unit(n);
+    
+    triple lppp=bezierPPP(middle,left1,left2,left3);
+    triple rppp=bezierPPP(middle,right1,right2,right3);
+    
+    return unit(9.0*cross(rpp,lpp)+
+                3.0*(cross(rp,lppp)+cross(rppp,lp)+
+                     cross(rppp,lpp)+cross(rpp,lppp))+
+                cross(rppp,lppp));
+  }
+
+  triple derivative(triple p0, triple p1, triple p2, triple p3) {
+    triple lp=p1-p0;
+    if(abs2(lp) > epsilon)
+      return lp;
+    
+    triple lpp=bezierPP(p0,p1,p2);
+    if(abs2(lpp) > epsilon)
+      return lpp;
+    
+    return bezierPPP(p0,p1,p2,p3);
+  }
+
+  virtual double Distance(const triple *p) {
+    triple p0=p[0];
+    triple p3=p[3];
+    triple p12=p[12];
+    triple p15=p[15];
+    
+    // Determine how straight the edges are.
+    double d=Straightness(p0,p[1],p[2],p3);
+    d=max(d,Straightness(p0,p[4],p[8],p12));
+    d=max(d,Straightness(p3,p[7],p[11],p15));
+    d=max(d,Straightness(p12,p[13],p[14],p15));
+    
+    triple n0=normal(p3,p[2],p[1],p0,p[4],p[8],p12);
+    d=max(d,Distance2(p15,p0,n0));
+    
+    // Determine how straight the interior control curves are.
+    d=max(d,Straightness(p[4],p[5],p[6],p[7]));
+    d=max(d,Straightness(p[8],p[9],p[10],p[11]));
+    d=max(d,Straightness(p[1],p[5],p[9],p[13]));
+    return max(d,Straightness(p[2],p[6],p[10],p[14]));
+  }
+  
+  struct Split3 {
+    triple m0,m2,m3,m4,m5;
+    Split3() {}
+    Split3(triple z0, triple c0, triple c1, triple z1) {
+      m0=0.5*(z0+c0);
+      triple m1=0.5*(c0+c1);
+      m2=0.5*(c1+z1);
+      m3=0.5*(m0+m1);
+      m4=0.5*(m1+m2);
+      m5=0.5*(m3+m4);
+    }
+  };
+  
+// Approximate bounds by bounding box of control polyhedron.
+  bool offscreen(size_t n, const triple *v) {
+    double x,y,z;
+    double X,Y,Z;
+    
+    boundstriples(x,y,z,X,Y,Z,n,v);
+    return
+      X < Min.getx() || x > Max.getx() ||
+      Y < Min.gety() || y > Max.gety() ||
+      Z < Min.getz() || z > Max.getz();
+  }
+  
+  void clear() {
+    empty=true;
+    nvertices=ntvertices=Nvertices=Ntvertices=0;
+    buffer.clear();
+    indices.clear();
+    Buffer.clear();
+    Indices.clear();
+    tbuffer.clear();
+    tindices.clear();
+    tBuffer.clear();
+    tIndices.clear();
+  }
+  
+  ~BezierPatch() {}
+  
+  void render(const triple *p,
+              GLuint I0, GLuint I1, GLuint I2, GLuint I3,
+              triple P0, triple P1, triple P2, triple P3,
+              bool flat0, bool flat1, bool flat2, bool flat3,
+              GLfloat *C0=NULL, GLfloat *C1=NULL, GLfloat *C2=NULL,
+              GLfloat *C3=NULL);
+  virtual void render(const triple *p, bool straight, GLfloat *c0=NULL);
+  
+  void queue(const triple *g, bool straight, double ratio,
+             const triple& Min, const triple& Max, bool transparent,
+             GLfloat *colors=NULL) {
+    init(pixel*ratio,Min,Max,transparent,colors);
+    render(g,straight,colors);
+  }
+  
+  void draw();
+  void draw(const triple *g, bool straight, double ratio,
+            const triple& Min, const triple& Max, bool transparent,
+            GLfloat *colors=NULL) {
+    queue(g,straight,ratio,Min,Max,transparent,colors);
+    draw();
+  }
+};
+
+struct BezierTriangle : public BezierPatch {
+public:
+  BezierTriangle() : BezierPatch() {}
+  
+  double Distance(const triple *p) {
+    triple p0=p[0];
+    triple p6=p[6];
+    triple p9=p[9];
+
+    // Only the internal point is tested for deviance from the triangle
+    // formed by the vertices. We assume that the Jacobian is nonzero so
+    // that we only need to calculate the perpendicular distance of the
+    // internal point from this triangle.  
+    double d=Distance2(p[4],p0,normal(p9,p[5],p[2],p0,p[1],p[3],p6));
+
+    // Determine how straight the edges are.
+    d=max(d,Straightness(p0,p[1],p[3],p6));
+    d=max(d,Straightness(p0,p[2],p[5],p9));
+    return max(d,Straightness(p6,p[7],p[8],p9));
+  }
+  
+  void render(const triple *p,
+              GLuint I0, GLuint I1, GLuint I2,
+              triple P0, triple P1, triple P2,
+              bool flat0, bool flat1, bool flat2,
+              GLfloat *C0=NULL, GLfloat *C1=NULL, GLfloat *C2=NULL);
+  void render(const triple *p, bool straight, GLfloat *c0=NULL);
+};
+
+
+#endif
+
+} //namespace camp
+
+#endif

Deleted: trunk/Build/source/utils/asymptote/beziertriangle.cc
===================================================================
--- trunk/Build/source/utils/asymptote/beziertriangle.cc	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/beziertriangle.cc	2017-03-07 18:10:02 UTC (rev 43422)
@@ -1,442 +0,0 @@
-
-/*****
- * drawbeziertriangle.cc
- * Authors: Jesse Frohlich and John C. Bowman
- *
- * Render a Bezier triangle.
- *****/
-
-#include "drawsurface.h"
-
-namespace camp {
-
-#ifdef HAVE_GL
-
-static const double pixel=0.25; // Adaptive rendering constant.
-
-extern const double Fuzz;
-extern const double Fuzz2;
-
-inline triple maxabs(triple u, triple v)
-{
-  return triple(max(fabs(u.getx()),fabs(v.getx())),
-                max(fabs(u.gety()),fabs(v.gety())),
-                max(fabs(u.getz()),fabs(v.getz())));
-}
-
-inline triple displacement1(const triple& z0, const triple& c0,
-                            const triple& c1, const triple& z1)
-{
-  triple Z0=c0-z0;
-  triple Q=unit(z1-z0);
-  triple Z1=c1-z0;
-  return maxabs(Z0-dot(Z0,Q)*Q,Z1-dot(Z1,Q)*Q);
-}
-
-// return the perpendicular displacement of a point z from the plane
-// through u with unit normal n.
-inline triple displacement2(const triple& z, const triple& u, const triple& n)
-{
-  triple Z=z-u;
-  return n != triple(0,0,0) ? dot(Z,n)*n : Z;
-}
-  
-inline triple displacement(const triple *controls)
-{
-  triple z0=controls[0];
-  triple z1=controls[6];
-  triple z2=controls[9];
-
-  // The last three lines compute how straight the edges are. This should be a
-  // sufficient test for the boundry points, so only the internal point is
-  // tested for deviance from the triangle formed by the vertices.
-  // We assume that the Jacobian is nonzero so that we only need to calculate
-  // the perpendicular displacement of the internal point from this triangle.
-  
-  triple d=displacement2(controls[4],z0,unit(cross(z1-z0,z2-z0)));
-
-  d=maxabs(d,displacement1(z0,controls[1],controls[3],z1));
-  d=maxabs(d,displacement1(z0,controls[2],controls[5],z2));
-  d=maxabs(d,displacement1(z1,controls[7],controls[8],z2));
-
-  return d;
-}
-
-// Returns one-third of the first derivative of the Bezier curve defined by
-// a,b,c,d at 0.
-inline triple bezierP(triple a, triple b) {
-  return b-a;
-}
-
-// Returns one-sixth of the second derivative of the Bezier curve defined
-// by a,b,c,d at 0. 
-inline triple bezierPP(triple a, triple b, triple c) {
-  return a+c-2.0*b;
-}
-
-// Returns one-third of the third derivative of the Bezier curve defined by
-// a,b,c,d.
-inline triple bezierPPP(triple a, triple b, triple c, triple d) {
-  return d-a+3.0*(b-c);
-}
-
-struct Render
-{
-  std::vector<GLfloat> buffer;
-  std::vector<GLint> indices;
-  triple u,v,w;
-  GLuint nvertices;
-  double cx,cy,cz;
-  double epsilon;
-  double res;
-  bool billboard;
-  
-  void init(bool havebillboard, const triple& center) {
-    const size_t nbuffer=10000;
-    buffer.reserve(nbuffer);
-    indices.reserve(nbuffer);
-    nvertices=0;
-    
-    billboard=havebillboard;
-    if(billboard) {
-      cx=center.getx();
-      cy=center.gety();
-      cz=center.getz();
-
-      gl::projection P=gl::camera(false);
-      w=unit(P.camera-P.target);
-      v=unit(perp(P.up,w));
-      u=cross(v,w);
-    }
-  }
-    
-  void clear() {
-    buffer.clear();
-    indices.clear();
-  }
-  
-// Store the vertex v and its normal vector n in the buffer.
-  GLuint vertex(const triple& V, const triple& n) {
-    if(billboard) {
-      double x=V.getx()-cx;
-      double y=V.gety()-cy;
-      double z=V.getz()-cz;
-      buffer.push_back(cx+u.getx()*x+v.getx()*y+w.getx()*z);
-      buffer.push_back(cy+u.gety()*x+v.gety()*y+w.gety()*z);
-      buffer.push_back(cz+u.getz()*x+v.getz()*y+w.getz()*z);
-    } else {
-      buffer.push_back(V.getx());
-      buffer.push_back(V.gety());
-      buffer.push_back(V.getz());
-    }
-    
-    buffer.push_back(n.getx());
-    buffer.push_back(n.gety());
-    buffer.push_back(n.getz());
-    
-    return nvertices++;
-  }
-  
-// Store the vertex v and its normal vector n and colour in the buffer.
-  GLuint vertex(const triple& V, const triple& n, GLfloat *c) {
-    int rc=vertex(V,n);
-    buffer.push_back(c[0]);
-    buffer.push_back(c[1]);
-    buffer.push_back(c[2]);
-    buffer.push_back(c[3]);
-    return rc;
-  }
-  
-  triple normal0(triple left3, triple left2, triple left1, triple middle,
-                 triple right1, triple right2, triple right3) {
-    //cout << "normal0 called." << endl;
-    // Lots of repetition here.
-    // TODO: Check if lp,rp,lpp,rpp should be manually inlined (i.e., is the
-    // third order normal usually computed when normal0() is called?).
-    triple lp=bezierP(middle,left1);
-    triple rp=bezierP(middle,right1);
-    triple lpp=bezierPP(middle,left1,left2);
-    triple rpp=bezierPP(middle,right1,right2);
-    triple n1=cross(rpp,lp)+cross(rp,lpp);
-    if(abs2(n1) > epsilon) {
-      return unit(n1);
-    } else {
-      triple lppp=bezierPPP(middle,left1,left2,left3);
-      triple rppp=bezierPPP(middle,right1,right2,right3);
-      triple n2= 9.0*cross(rpp,lpp)+
-        3.0*(cross(rp,lppp)+cross(rppp,lp)+
-             cross(rppp,lpp)+cross(rpp,lppp))+
-        cross(rppp,lppp);
-      return unit(n2);
-    }
-  }
-
-  triple normal(triple left3, triple left2, triple left1, triple middle,
-                triple right1, triple right2, triple right3) {
-    triple bu=right1-middle;
-    triple bv=left1-middle;
-    triple n=triple(bu.gety()*bv.getz()-bu.getz()*bv.gety(),
-                    bu.getz()*bv.getx()-bu.getx()*bv.getz(),
-                    bu.getx()*bv.gety()-bu.gety()*bv.getx());
-    return abs2(n) > epsilon ? unit(n) :
-      normal0(left3,left2,left1,middle,right1,right2,right3);
-  }
-
-  void mesh(const triple *p, const GLuint *I)
-  {
-    // Draw the frame of the control points of a cubic Bezier mesh
-    indices.push_back(I[0]);
-    indices.push_back(I[1]);
-    indices.push_back(I[2]);
-  }
-  
-// Pi is the full precision value indexed by Ii.
-// The 'flati' are flatness flags for each boundary.
-  void render(const triple *p, int n,
-              GLuint I0, GLuint I1, GLuint I2,
-              triple P0, triple P1, triple P2,
-              bool flat1, bool flat2, bool flat3,
-              GLfloat *C0=NULL, GLfloat *C1=NULL, GLfloat *C2=NULL)
-  {
-    // Uses a uniform partition
-    // p points to an array of 10 triples.
-    // Draw a Bezier triangle.
-    // p is the set of control points for the Bezier triangle
-    // n is the maximum number of iterations to compute
-    triple d=displacement(p);
-
-    // This involves fewer triangle computations at the end (since if the
-    // surface is sufficiently flat, it just draws the sufficiently flat
-    // triangle, rather than trying to properly utilize the already
-    // computed values. 
-
-    if(n == 0 || length(d) < res) { // If triangle is flat...
-      GLuint I[]={I0,I1,I2};
-      mesh(p,I);
-    } else { // Triangle is not flat
-
-      /*    Naming Convention:
-       *
-       *                           P2
-       *                           030
-       *                           /\
-       *                          /  \
-       *                         /    \
-       *                        /      \
-       *                       /   up   \
-       *                      /          \
-       *                     /            \
-       *                    /              \
-       *                p1 /________________\ p0
-       *                  /\               / \
-       *                 /  \             /   \
-       *                /    \           /     \
-       *               /      \  center /       \
-       *              /        \       /         \
-       *             /          \     /           \
-       *            /    left    \   /    right    \
-       *           /              \ /               \
-       *          /________________V_________________\
-       *        003               p2                300
-       *        P0                                    P1
-       */
-
-      // Subdivide triangle
-      triple l003=p[0];
-      triple p102=p[1];
-      triple p012=p[2];
-      triple p201=p[3];
-      triple p111=p[4];
-      triple p021=p[5];
-      triple r300=p[6];
-      triple p210=p[7];
-      triple p120=p[8];
-      triple u030=p[9];
-
-      triple u021=0.5*(u030+p021);
-      triple u120=0.5*(u030+p120);
-
-      triple p033=0.5*(p021+p012);
-      triple p231=0.5*(p120+p111);
-      triple p330=0.5*(p120+p210);
-
-      triple p123=0.5*(p012+p111);
-
-      triple l012=0.5*(p012+l003);
-      triple p312=0.5*(p111+p201);
-      triple r210=0.5*(p210+r300);
-
-      triple l102=0.5*(l003+p102);
-      triple p303=0.5*(p102+p201);
-      triple r201=0.5*(p201+r300);
-
-      triple u012=0.5*(u021+p033);
-      triple u210=0.5*(u120+p330);
-      triple l021=0.5*(p033+l012);
-      triple p4xx=0.5*p231+0.25*(p111+p102);
-      triple r120=0.5*(p330+r210);
-      triple px4x=0.5*p123+0.25*(p111+p210);
-      triple pxx4=0.25*(p021+p111)+0.5*p312;
-      triple l201=0.5*(l102+p303);
-      triple r102=0.5*(p303+r201);
-
-      triple l210=0.5*(px4x+l201); // =c120
-      triple r012=0.5*(px4x+r102); // =c021
-      triple l300=0.5*(l201+r102); // =r003=c030
-
-      triple r021=0.5*(pxx4+r120); // =c012
-      triple u201=0.5*(u210+pxx4); // =c102
-      triple r030=0.5*(u210+r120); // =u300=c003
-
-      triple u102=0.5*(u012+p4xx); // =c201
-      triple l120=0.5*(l021+p4xx); // =c210
-      triple l030=0.5*(u012+l021); // =u003=c300
-
-      triple l111=0.5*(p123+l102);
-      triple r111=0.5*(p312+r210);
-      triple u111=0.5*(u021+p231);
-      triple c111=0.25*(p033+p330+p303+p111);
-
-      //  For each edge of the triangle
-      //    * Check for flatness
-      //    * Store points in the GLU array accordingly
-
-      // A kludge to remove subdivision cracks, only applied the first time
-      // an edge is found to be flat before the rest of the sub-patch is.
-#ifdef __MSDOS__      
-      const double epsilon=1.0*res;
-#else
-      const double epsilon=0.1*res;
-#endif      
-      triple p2,p1,p0;
-
-      if(flat1)
-        p2=0.5*(P1+P0);
-      else {
-        if((flat1=length(displacement1(l003,p102,p201,r300)) < res))
-          p2=0.5*(P1+P0)+epsilon*unit(l300-u030);
-        else
-          p2=l300;
-      }
-
-      if(flat2)
-        p1=0.5*(P2+P0);
-      else {
-        if((flat2=length(displacement1(l003,p012,p021,u030)) < res))
-          p1=0.5*(P2+P0)+epsilon*unit(l030-r300);
-        else p1=l030;
-      }
-
-      if(flat3)
-        p0=0.5*(P2+P1);
-      else {
-        if((flat3=length(displacement1(r300,p210,p120,u030)) < res))
-          p0=0.5*(P2+P1)+epsilon*unit(r030-l003);
-        else p0=r030;
-      }
-
-      triple l[]={l003,l102,l012,l201,l111,l021,l300,l210,l120,l030}; // left
-      triple r[]={l300,r102,r012,r201,r111,r021,r300,r210,r120,r030}; // right
-      triple u[]={l030,u102,u012,u201,u111,u021,r030,u210,u120,u030}; // up
-      triple c[]={r030,u201,r021,u102,c111,r012,l030,l120,l210,l300}; // center
-
-      --n;
-      
-      if(C0) {
-        GLfloat c0[4],c1[4],c2[4];
-        for(int i=0; i < 4; ++i) {
-          c0[i]=0.5*(C1[i]+C2[i]);
-          c1[i]=0.5*(C0[i]+C2[i]);
-          c2[i]=0.5*(C0[i]+C1[i]);
-        }
-      
-        GLuint i0=vertex(p0,normal(l300,r012,r021,r030,u201,u102,l030),c0);
-        GLuint i1=vertex(p1,normal(r030,u201,u102,l030,l120,l210,l300),c1);
-        GLuint i2=vertex(p2,normal(l030,l120,l210,l300,r012,r021,r030),c2);
-          
-        render(l,n,I0,i2,i1,P0,p2,p1,flat1,flat2,false,C0,c2,c1);
-        render(r,n,i2,I1,i0,p2,P1,p0,flat1,false,flat3,c2,C1,c0);
-        render(u,n,i1,i0,I2,p1,p0,P2,false,flat2,flat3,c1,c0,C2);
-        render(c,n,i0,i1,i2,p0,p1,p2,false,false,false,c0,c1,c2);
-      } else {
-        GLuint i0=vertex(p0,normal(l300,r012,r021,r030,u201,u102,l030));
-        GLuint i1=vertex(p1,normal(r030,u201,u102,l030,l120,l210,l300));
-        GLuint i2=vertex(p2,normal(l030,l120,l210,l300,r012,r021,r030));
-          
-        render(l,n,I0,i2,i1,P0,p2,p1,flat1,flat2,false);
-        render(r,n,i2,I1,i0,p2,P1,p0,flat1,false,flat3);
-        render(u,n,i1,i0,I2,p1,p0,P2,false,flat2,flat3);
-        render(c,n,i0,i1,i2,p0,p1,p2,false,false,false);
-      }
-    }
-  }
-
-// n is the maximum depth
-  void render(const triple *p, double res, GLfloat *c0, int n) {
-    this->res=res;
-
-    triple p0=p[0];
-    epsilon=0;
-    for(int i=1; i < 10; ++i)
-      epsilon=max(epsilon,abs2(p[i]-p0));
-  
-    epsilon *= Fuzz2;
-    
-    GLuint i0,i1,i2;
-    
-    triple p6=p[6];
-    triple p9=p[9];
-    if(c0) {
-      GLfloat *c1=c0+4;
-      GLfloat *c2=c0+8;
-    
-      i0=vertex(p0,normal(p9,p[5],p[2],p0,p[1],p[3],p6),c0);
-      i1=vertex(p6,normal(p0,p[1],p[3],p6,p[7],p[8],p9),c1);
-      i2=vertex(p9,normal(p6,p[7],p[8],p9,p[5],p[2],p0),c2);
-    
-      if(n > 0)
-        render(p,n,i0,i1,i2,p0,p6,p9,false,false,false,c0,c1,c2);
-    } else {
-      i0=vertex(p0,normal(p9,p[5],p[2],p0,p[1],p[3],p6));
-      i1=vertex(p6,normal(p0,p[1],p[3],p6,p[7],p[8],p9));
-      i2=vertex(p9,normal(p6,p[7],p[8],p9,p[5],p[2],p0));
-    
-      if(n > 0)
-        render(p,n,i0,i1,i2,p0,p6,p9,false,false,false);
-    }
-    
-    if(n == 0) {
-      GLuint I[]={i0,i1,i2};
-      mesh(p,I);
-    }
-    
-    size_t stride=(c0 ? 10 : 6)*sizeof(GL_FLOAT);
-
-    glEnableClientState(GL_NORMAL_ARRAY);
-    glEnableClientState(GL_VERTEX_ARRAY);
-    if(c0) glEnableClientState(GL_COLOR_ARRAY);
-    glVertexPointer(3,GL_FLOAT,stride,&buffer[0]);
-    glNormalPointer(GL_FLOAT,stride,&buffer[3]);
-    if(c0) glColorPointer(4,GL_FLOAT,stride,&buffer[6]);
-    glDrawElements(GL_TRIANGLES,indices.size(),GL_UNSIGNED_INT,&indices[0]);
-    if(c0) glDisableClientState(GL_COLOR_ARRAY);
-    glDisableClientState(GL_VERTEX_ARRAY);
-    glDisableClientState(GL_NORMAL_ARRAY);
-  }
-  
-};
-
-Render R;
-
-void bezierTriangle(const triple *g, bool straight, double ratio,
-                    bool havebillboard, triple center, GLfloat *colors)
-{
-  R.init(havebillboard,center);
-  R.render(g,pixel*ratio,colors,straight ? 0 : 8);
-  R.clear();
-}
-
-#endif
-
-} //namespace camp
-

Modified: trunk/Build/source/utils/asymptote/builtin.cc
===================================================================
--- trunk/Build/source/utils/asymptote/builtin.cc	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/builtin.cc	2017-03-07 18:10:02 UTC (rev 43422)
@@ -557,6 +557,7 @@
 {
   addOps<T,plus>(ve,t1,SYM_PLUS,t2);
   addOps<T,minus>(ve,t1,SYM_MINUS,t2);
+  addFunc(ve,initialized,primBoolean(),SYM(initialized),formal(t1,SYM(a)));
   
   addArray2Array2Op<T,plus>(ve,t3,SYM_PLUS);
   addArray2Array2Op<T,minus>(ve,t3,SYM_MINUS);

Modified: trunk/Build/source/utils/asymptote/castop.h
===================================================================
--- trunk/Build/source/utils/asymptote/castop.h	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/castop.h	2017-03-07 18:10:02 UTC (rev 43422)
@@ -55,13 +55,16 @@
     try {
       s->push(lexical::cast<T>(*S));
     } catch (lexical::bad_cast&) {
-      ostringstream buf;
-      buf << "invalid cast from string \"" << *S << "\"";
-      vm::error(buf);
+      s->push(vm::Default);
     }
   }
 }
 
+void initialized(vm::stack *s)
+{
+  s->push(!vm::isdefault(pop(s)));
+}
+
 template<class T, class S>
 void arrayToArray(vm::stack *s)
 {

Modified: trunk/Build/source/utils/asymptote/config.guess
===================================================================
--- trunk/Build/source/utils/asymptote/config.guess	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/config.guess	2017-03-07 18:10:02 UTC (rev 43422)
@@ -1,12 +1,14 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright 1992-2017 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='2017-03-05'
+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,23 +17,27 @@
 # 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").
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner <per at bothner.com>.
+# Please send patches to <config-patches at gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
 #
-# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
+# 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.
 #
-# 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
-#
-# Please send patches to <config-patches at 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,.*/,,'`
 
 usage="\
@@ -50,7 +56,8 @@
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright 1992-2017 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_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,10 +154,8 @@
 	# 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 ;;
@@ -178,23 +162,15 @@
 	    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) and ABI.
+	# to ELF recently, or will in the future.
 	case "${UNAME_MACHINE_ARCH}" in
-	    earm*)
-		os=netbsdelf
-		;;
 	    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?
@@ -204,16 +180,9 @@
 		fi
 		;;
 	    *)
-		os=netbsd
+	        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"`
-		;;
-	esac
 	# The OS release
 	# Debian GNU/NetBSD machines have a different userland, and
 	# thus, need a distinct triplet. However, they do not need
@@ -224,26 +193,18 @@
 		release='-gnu'
 		;;
 	    *)
-		release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
+		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
 		;;
 	esac
 	# 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}"
+	echo "${machine}-${os}${release}"
 	exit ;;
-    *:Bitrig:*:*)
-	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
-	echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
-	exit ;;
     *:OpenBSD:*:*)
 	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
 	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
 	exit ;;
-    *:LibertyBSD:*:*)
-	UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
-	echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
-	exit ;;
     *:ekkoBSD:*:*)
 	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
 	exit ;;
@@ -256,9 +217,6 @@
     *:MirBSD:*:*)
 	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
 	exit ;;
-    *:Sortix:*:*)
-	echo ${UNAME_MACHINE}-unknown-sortix
-	exit ;;
     alpha:OSF1:*:*)
 	case $UNAME_RELEASE in
 	*4.0)
@@ -265,7 +223,7 @@
 		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
@@ -275,35 +233,35 @@
 	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
 	case "$ALPHA_CPU_TYPE" in
 	    "EV4 (21064)")
-		UNAME_MACHINE=alpha ;;
+		UNAME_MACHINE="alpha" ;;
 	    "EV4.5 (21064)")
-		UNAME_MACHINE=alpha ;;
+		UNAME_MACHINE="alpha" ;;
 	    "LCA4 (21066/21068)")
-		UNAME_MACHINE=alpha ;;
+		UNAME_MACHINE="alpha" ;;
 	    "EV5 (21164)")
-		UNAME_MACHINE=alphaev5 ;;
+		UNAME_MACHINE="alphaev5" ;;
 	    "EV5.6 (21164A)")
-		UNAME_MACHINE=alphaev56 ;;
+		UNAME_MACHINE="alphaev56" ;;
 	    "EV5.6 (21164PC)")
-		UNAME_MACHINE=alphapca56 ;;
+		UNAME_MACHINE="alphapca56" ;;
 	    "EV5.7 (21164PC)")
-		UNAME_MACHINE=alphapca57 ;;
+		UNAME_MACHINE="alphapca57" ;;
 	    "EV6 (21264)")
-		UNAME_MACHINE=alphaev6 ;;
+		UNAME_MACHINE="alphaev6" ;;
 	    "EV6.7 (21264A)")
-		UNAME_MACHINE=alphaev67 ;;
+		UNAME_MACHINE="alphaev67" ;;
 	    "EV6.8CB (21264C)")
-		UNAME_MACHINE=alphaev68 ;;
+		UNAME_MACHINE="alphaev68" ;;
 	    "EV6.8AL (21264B)")
-		UNAME_MACHINE=alphaev68 ;;
+		UNAME_MACHINE="alphaev68" ;;
 	    "EV6.8CX (21264D)")
-		UNAME_MACHINE=alphaev68 ;;
+		UNAME_MACHINE="alphaev68" ;;
 	    "EV6.9A (21264/EV69A)")
-		UNAME_MACHINE=alphaev69 ;;
+		UNAME_MACHINE="alphaev69" ;;
 	    "EV7 (21364)")
-		UNAME_MACHINE=alphaev7 ;;
+		UNAME_MACHINE="alphaev7" ;;
 	    "EV7.9 (21364A)")
-		UNAME_MACHINE=alphaev79 ;;
+		UNAME_MACHINE="alphaev79" ;;
 	esac
 	# A Pn.n version is a patched version.
 	# A Vn.n version is a released version.
@@ -310,11 +268,8 @@
 	# A Tn.n version is a released field test version.
 	# 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 ;;
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	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
@@ -340,12 +295,12 @@
 	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:*:*)
@@ -369,9 +324,6 @@
 	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 ;;
@@ -378,24 +330,8 @@
     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
@@ -417,7 +353,7 @@
 	exit ;;
     sun*:*:4.2BSD:*)
 	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
-	test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
+	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
 	case "`/bin/arch`" in
 	    sun3)
 		echo m68k-sun-sunos${UNAME_RELEASE}
@@ -439,23 +375,23 @@
     # 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 ;;
@@ -525,8 +461,8 @@
 	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 ] || \
@@ -539,7 +475,7 @@
 	else
 	    echo i586-dg-dgux${UNAME_RELEASE}
 	fi
-	exit ;;
+ 	exit ;;
     M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
 	echo m88k-dolphin-sysv3
 	exit ;;
@@ -596,7 +532,7 @@
 		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
@@ -603,9 +539,8 @@
 	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
@@ -640,58 +575,58 @@
 	    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 ;;
-			  '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
-			esac ;;
-		    esac
+                    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
 		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`
+		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
 		    test -z "$HP_ARCH" && HP_ARCH=hppa
 		fi ;;
 	esac
-	if [ ${HP_ARCH} = hppa2.0w ]
+	if [ ${HP_ARCH} = "hppa2.0w" ]
 	then
 	    eval $set_cc_for_build
 
@@ -704,12 +639,12 @@
 	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
 	    # => hppa64-hp-hpux11.23
 
-	    if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
-		grep -q __LP64__
+	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+		grep __LP64__ >/dev/null
 	    then
-		HP_ARCH=hppa2.0w
+		HP_ARCH="hppa2.0w"
 	    else
-		HP_ARCH=hppa64
+		HP_ARCH="hppa64"
 	    fi
 	fi
 	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
@@ -776,22 +711,22 @@
 	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 ;;
@@ -814,15 +749,15 @@
 	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 	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_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 ;;
     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}
@@ -834,40 +769,34 @@
 	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)
-		UNAME_PROCESSOR=x86_64 ;;
-	    i386)
-		UNAME_PROCESSOR=i586 ;;
+		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	    *)
+		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
 	esac
-	echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
 	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)
@@ -877,9 +806,6 @@
     [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
@@ -900,169 +826,210 @@
 	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 "[:upper:]" "[:lower:]"``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}
+	echo crisv32-axis-linux-gnu
 	exit ;;
-    e2k:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
-	exit ;;
     frv:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+    	echo frv-unknown-linux-gnu
 	exit ;;
-    hexagon:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
-	exit ;;
-    i*86:Linux:*:*)
-	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
-	exit ;;
     ia64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
-    k1om:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
-	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; }
 	;;
-    mips64el:Linux:*:*)
-	echo ${UNAME_MACHINE}-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 ;;
-    openrisc*:Linux:*:*)
-	echo or1k-unknown-linux-${LIBC}
+    ppc:Linux:*:*)
+	echo powerpc-unknown-linux-gnu
 	exit ;;
-    or32:Linux:*:* | or1k*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+    ppc64:Linux:*:*)
+	echo powerpc64-unknown-linux-gnu
 	exit ;;
-    padre:Linux:*:*)
-	echo sparc-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 ;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-	echo hppa64-unknown-linux-${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}
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	echo hppa64-unknown-linux-gnu
 	exit ;;
-    ppc:Linux:*:*)
-	echo powerpc-unknown-linux-${LIBC}
-	exit ;;
-    ppc64le:Linux:*:*)
-	echo powerpc64le-unknown-linux-${LIBC}
-	exit ;;
-    ppcle:Linux:*:*)
-	echo powerpcle-unknown-linux-${LIBC}
-	exit ;;
-    riscv32:Linux:*:* | riscv64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
-	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}
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
-    tile*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
-	exit ;;
     vax:Linux:*:*)
-	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+	echo ${UNAME_MACHINE}-dec-linux-gnu
 	exit ;;
     x86_64:Linux:*:*)
-	echo ${UNAME_MACHINE}-pc-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
@@ -1070,11 +1037,11 @@
 	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:*:*)
@@ -1091,7 +1058,7 @@
     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:*:*)
@@ -1106,7 +1073,7 @@
 	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 ;;
@@ -1134,13 +1101,10 @@
 	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 configure 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 ;;
@@ -1175,18 +1139,8 @@
 	/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 ;;
@@ -1199,7 +1153,7 @@
     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:*:*)
@@ -1219,10 +1173,10 @@
 		echo ns32k-sni-sysv
 	fi
 	exit ;;
-    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-			# says <Richard.M.Bartel at ccMail.Census.GOV>
-	echo i586-unisys-sysv4
-	exit ;;
+    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                      # says <Richard.M.Bartel at ccMail.Census.GOV>
+        echo i586-unisys-sysv4
+        exit ;;
     *:UNIX_System_V:4*:FTX*)
 	# From Gerald Hewes <hewes at openmarket.com>.
 	# How about differentiating between stratus architectures? -djm
@@ -1248,11 +1202,11 @@
 	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 ;;
@@ -1262,12 +1216,6 @@
     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 ;;
@@ -1286,9 +1234,6 @@
     SX-8R:SUPER-UX:*:*)
 	echo sx8r-nec-superux${UNAME_RELEASE}
 	exit ;;
-    SX-ACE:SUPER-UX:*:*)
-	echo sxace-nec-superux${UNAME_RELEASE}
-	exit ;;
     Power*:Rhapsody:*:*)
 	echo powerpc-apple-rhapsody${UNAME_RELEASE}
 	exit ;;
@@ -1297,36 +1242,14 @@
 	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]*:*)
 	UNAME_PROCESSOR=`uname -p`
-	if test "$UNAME_PROCESSOR" = x86; then
+	if test "$UNAME_PROCESSOR" = "x86"; then
 		UNAME_PROCESSOR=i386
 		UNAME_MACHINE=pc
 	fi
@@ -1335,18 +1258,12 @@
     *: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:*:*)
 	echo nsr-tandem-nsk${UNAME_RELEASE}
 	exit ;;
-    NSX-?:NONSTOP_KERNEL:*:*)
-	echo nsx-tandem-nsk${UNAME_RELEASE}
-	exit ;;
     *:NonStop-UX:*:*)
 	echo mips-compaq-nonstopux
 	exit ;;
@@ -1360,7 +1277,7 @@
 	# "uname -m" is not consistent, so use $cputype instead. 386
 	# is converted to i386 for consistency with other x86
 	# operating systems.
-	if test "$cputype" = 386; then
+	if test "$cputype" = "386"; then
 	    UNAME_MACHINE=i386
 	else
 	    UNAME_MACHINE="$cputype"
@@ -1386,13 +1303,13 @@
 	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 ;;
@@ -1402,36 +1319,179 @@
 	echo i386-pc-xenix
 	exit ;;
     i*86:skyos:*:*)
-	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
+	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
 	exit ;;
     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 ;;
-    x86_64:VMkernel:*:*)
-	echo ${UNAME_MACHINE}-unknown-esx
+    c2*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
 	exit ;;
-    amd64:Isilon\ OneFS:*:*)
-	echo x86_64-unknown-onefs
+    c34*)
+	echo c34-convex-bsd
 	exit ;;
-esac
+    c38*)
+	echo c38-convex-bsd
+	exit ;;
+    c4*)
+	echo c4-convex-bsd
+	exit ;;
+    esac
+fi
 
 cat >&2 <<EOF
 $0: unable to guess system type
 
-This script (version $timestamp), has failed to recognize the
-operating system you are using. If your script is old, overwrite
-config.guess and config.sub with the latest versions from:
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
 
-  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
 and
-  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
 
-If $0 has already been updated, send the following data and any
-information you think might be pertinent to config-patches at gnu.org to
-provide the necessary information to handle your system.
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches at gnu.org> in order to provide the needed
+information to handle your system.
 
 config.guess timestamp = $timestamp
 

Modified: trunk/Build/source/utils/asymptote/config.sub
===================================================================
--- trunk/Build/source/utils/asymptote/config.sub	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/config.sub	2017-03-07 18:10:02 UTC (rev 43422)
@@ -1,18 +1,24 @@
 #! /bin/sh
 # Configuration validation subroutine script.
-#   Copyright 1992-2017 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='2017-02-07'
+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 @@
 # 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 at gnu.org>.
+# Please send patches to <config-patches at 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.
@@ -33,7 +38,7 @@
 # Otherwise, we print the canonical config type on stdout and succeed.
 
 # You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
 
 # This file is supposed to be the same for all GNU packages
 # and recognize all the CPU types, system types and aliases
@@ -53,7 +58,8 @@
 me=`echo "$0" | sed -e 's,.*/,,'`
 
 usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
 
 Canonicalize a configuration name.
 
@@ -67,7 +73,9 @@
 version="\
 GNU config.sub ($timestamp)
 
-Copyright 1992-2017 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."
@@ -115,9 +123,9 @@
 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* | \
-  kopensolaris*-gnu* | cloudabi*-eabi* | \
+  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  knetbsd*-gnu* | netbsd*-gnu* | \
+  kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
@@ -148,7 +156,7 @@
 	-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
 		;;
@@ -251,25 +259,21 @@
 	| 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 \
-	| ba \
-	| 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,13 +287,10 @@
 	| 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 \
@@ -296,17 +297,16 @@
 	| 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 \
-	| pru \
 	| pyramid \
-	| riscv32 | riscv64 \
 	| rl78 | rx \
 	| score \
-	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
 	| sh64 | sh64le \
 	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
 	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
@@ -314,7 +314,6 @@
 	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
 	| ubicom32 \
 	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
-	| visium \
 	| we32k \
 	| x86 | xc16x | xstormy16 | xtensa \
 	| z8k | z80)
@@ -329,10 +328,7 @@
 	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
 		;;
@@ -374,16 +370,15 @@
 	| 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-* \
-	| ba-* \
 	| 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-* \
@@ -390,13 +385,11 @@
 	| 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-* \
@@ -410,34 +403,28 @@
 	| 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-* \
-	| pru-* \
 	| pyramid-* \
-	| riscv32-* | riscv64-* \
 	| rl78-* | romp-* | rs6000-* | rx-* \
 	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
 	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
 	| sparclite-* \
-	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
 	| tahoe-* \
 	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
 	| tile*-* \
@@ -445,7 +432,6 @@
 	| ubicom32-* \
 	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
 	| vax-* \
-	| visium-* \
 	| we32k-* \
 	| x86-* | x86_64-* | xc16x-* | xps100-* \
 	| xstormy16-* | xtensa*-* \
@@ -522,9 +508,6 @@
 		basic_machine=i386-pc
 		os=-aros
 		;;
-	asmjs)
-		basic_machine=asmjs-unknown
-		;;
 	aux)
 		basic_machine=m68k-apple
 		os=-aux
@@ -645,14 +628,6 @@
 		basic_machine=m68k-bull
 		os=-sysv3
 		;;
-	e500v[12])
-		basic_machine=powerpc-unknown
-		os=$os"spe"
-		;;
-	e500v[12]-*)
-		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
-		os=$os"spe"
-		;;
 	ebmon29k)
 		basic_machine=a29k-amd
 		os=-ebmon
@@ -794,9 +769,6 @@
 		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
@@ -816,15 +788,11 @@
 		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)
@@ -852,10 +820,6 @@
 		basic_machine=powerpc-unknown
 		os=-morphos
 		;;
-	moxiebox)
-		basic_machine=moxie-unknown
-		os=-moxiebox
-		;;
 	msdos)
 		basic_machine=i386-pc
 		os=-msdos
@@ -864,7 +828,7 @@
 		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
 		;;
 	msys)
-		basic_machine=i686-pc
+		basic_machine=i386-pc
 		os=-msys
 		;;
 	mvs)
@@ -948,9 +912,6 @@
 	nsr-tandem)
 		basic_machine=nsr-tandem
 		;;
-	nsx-tandem)
-		basic_machine=nsx-tandem
-		;;
 	op50n-* | op60c-*)
 		basic_machine=hppa1.1-oki
 		os=-proelf
@@ -1035,7 +996,7 @@
 	ppc-* | ppcbe-*)
 		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
-	ppcle | powerpclittle)
+	ppcle | powerpclittle | ppc-le | powerpc-little)
 		basic_machine=powerpcle-unknown
 		;;
 	ppcle-* | powerpclittle-*)
@@ -1045,7 +1006,7 @@
 		;;
 	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
-	ppc64le | powerpc64little)
+	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
 		basic_machine=powerpc64le-unknown
 		;;
 	ppc64le-* | powerpc64little-*)
@@ -1058,11 +1019,7 @@
 		basic_machine=i586-unknown
 		os=-pw32
 		;;
-	rdos | rdos64)
-		basic_machine=x86_64-pc
-		os=-rdos
-		;;
-	rdos32)
+	rdos)
 		basic_machine=i386-pc
 		os=-rdos
 		;;
@@ -1389,22 +1346,22 @@
 	-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* | -sortix* \
+	      | -aos* | -aros* \
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
 	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
-	      | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
+	      | -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* | -glidix* \
+	      | -chorusos* | -chorusrdb* | -cegcc* \
 	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-	      | -midipix* | -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* \
@@ -1411,8 +1368,7 @@
 	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
 	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
 	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
-	      | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*)
+	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
 	-qnx*)
@@ -1536,6 +1492,9 @@
 	-aros*)
 		os=-aros
 		;;
+	-kaos*)
+		os=-kaos
+		;;
 	-zvmoe)
 		os=-zvmoe
 		;;
@@ -1544,8 +1503,6 @@
 		;;
 	-nacl*)
 		;;
-	-ios)
-		;;
 	-none)
 		;;
 	*)
@@ -1586,12 +1543,6 @@
 	c4x-* | tic4x-*)
 		os=-coff
 		;;
-	c8051-*)
-		os=-elf
-		;;
-	hexagon-*)
-		os=-elf
-		;;
 	tic54x-*)
 		os=-coff
 		;;
@@ -1641,9 +1592,6 @@
 	sparc-* | *-sun)
 		os=-sunos4.1.1
 		;;
-	pru-*)
-		os=-elf
-		;;
 	*-be)
 		os=-beos
 		;;

Modified: trunk/Build/source/utils/asymptote/configure
===================================================================
--- trunk/Build/source/utils/asymptote/configure	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/configure	2017-03-07 18:10:02 UTC (rev 43422)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for Asymptote 2.38.
+# Generated by GNU Autoconf 2.69 for Asymptote 2.40.
 #
 # Report bugs to <http://sourceforge.net/projects/asymptote>.
 #
@@ -580,8 +580,8 @@
 # Identity of this package.
 PACKAGE_NAME='Asymptote'
 PACKAGE_TARNAME='asymptote'
-PACKAGE_VERSION='2.38'
-PACKAGE_STRING='Asymptote 2.38'
+PACKAGE_VERSION='2.40'
+PACKAGE_STRING='Asymptote 2.40'
 PACKAGE_BUGREPORT='http://sourceforge.net/projects/asymptote'
 PACKAGE_URL=''
 
@@ -641,6 +641,7 @@
 GCPPLIB
 GCLIB
 GCOPTIONS
+ATOMICVERSION
 GCVERSION
 getopt
 CXXCPP
@@ -1282,7 +1283,7 @@
   # 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.38 to adapt to many kinds of systems.
+\`configure' configures Asymptote 2.40 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1347,7 +1348,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of Asymptote 2.38:";;
+     short | recursive ) echo "Configuration of Asymptote 2.40:";;
    esac
   cat <<\_ACEOF
 
@@ -1461,7 +1462,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-Asymptote configure 2.38
+Asymptote configure 2.40
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2047,7 +2048,7 @@
 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.38, which was
+It was created by Asymptote $as_me 2.40, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2504,8 +2505,10 @@
 
 
 
-test "$CFLAGS" || CFLAGS="-g -O3 -ansi"
+test "$CXXFLAGS" || CXXFLAGS="-std=c++11"
 
+test "$CFLAGS" || CFLAGS="-g -O3"
+
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -5763,7 +5766,8 @@
 
 
 
-GCVERSION=7.4.2
+GCVERSION=7.6.0
+ATOMICVERSION=7.4.4
 GCFILE=gc-$GCVERSION
 ac_cv_use_gc="system"
 
@@ -5946,6 +5950,7 @@
 
 
 
+
 # Checks for libraries.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
 $as_echo_n "checking for sqrt in -lm... " >&6; }
@@ -8521,7 +8526,7 @@
 # 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.38, which was
+This file was extended by Asymptote $as_me 2.40, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -8583,7 +8588,7 @@
 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.38
+Asymptote config.status 2.40
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
@@ -9323,7 +9328,7 @@
    echo FOR EXAMPLE, USE THE COMMANDS:
    echo
    echo wget http://hboehm.info/gc/gc_source/$GCFILE.tar.gz
-   echo wget http://www.ivmaisoft.com/_bin/atomic_ops/libatomic_ops-$GCVERSION.tar.gz
+   echo wget http://www.ivmaisoft.com/_bin/atomic_ops/libatomic_ops-$ATOMICVERSION.tar.gz
 
    echo
    exit 1

Modified: trunk/Build/source/utils/asymptote/configure.ac
===================================================================
--- trunk/Build/source/utils/asymptote/configure.ac	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/configure.ac	2017-03-07 18:10:02 UTC (rev 43422)
@@ -3,13 +3,15 @@
 # this file.
 
 AC_PREREQ(2)
-AC_INIT([Asymptote],[2.38],[http://sourceforge.net/projects/asymptote])
+AC_INIT([Asymptote],[2.40],[http://sourceforge.net/projects/asymptote])
 VERSION=$PACKAGE_VERSION
 AC_SUBST(VERSION)
 m4_include([ax_pthread.m4])
 
-test "$CFLAGS" || CFLAGS="-g -O3 -ansi"
+test "$CXXFLAGS" || CXXFLAGS="-std=c++11"
 
+test "$CFLAGS" || CFLAGS="-g -O3"
+
 AC_C_BIGENDIAN
 
 test "$prefix" = NONE && prefix=/usr/local
@@ -121,7 +123,8 @@
 			      [Define to 1 if you have tr1/unordered_map]),
 	[AC_CHECK_HEADER(ext/hash_map,,OPTIONS=$OPTIONS"-DNOHASH ")])])
 
-GCVERSION=7.4.2
+GCVERSION=7.6.0
+ATOMICVERSION=7.4.4
 GCFILE=gc-$GCVERSION
 ac_cv_use_gc="system"
 
@@ -216,6 +219,7 @@
 
 AC_SUBST(getopt)
 AC_SUBST(GCVERSION)
+AC_SUBST(ATOMICVERSION)
 AC_SUBST(GCOPTIONS)
 AC_SUBST(GCLIB)
 AC_SUBST(GCPPLIB)
@@ -382,7 +386,7 @@
    echo FOR EXAMPLE, USE THE COMMANDS:
    echo
    echo wget http://hboehm.info/gc/gc_source/$GCFILE.tar.gz
-   echo wget http://www.ivmaisoft.com/_bin/atomic_ops/libatomic_ops-$GCVERSION.tar.gz
+   echo wget http://www.ivmaisoft.com/_bin/atomic_ops/libatomic_ops-$ATOMICVERSION.tar.gz
 
    echo
    exit 1

Modified: trunk/Build/source/utils/asymptote/doc/CAD.pdf
===================================================================
(Binary files differ)

Modified: trunk/Build/source/utils/asymptote/doc/FAQ/asy-faq.info
===================================================================
(Binary files differ)

Modified: trunk/Build/source/utils/asymptote/doc/TeXShopAndAsymptote.pdf
===================================================================
(Binary files differ)

Modified: trunk/Build/source/utils/asymptote/doc/asy-latex.dtx
===================================================================
--- trunk/Build/source/utils/asymptote/doc/asy-latex.dtx	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/doc/asy-latex.dtx	2017-03-07 18:10:02 UTC (rev 43422)
@@ -38,7 +38,7 @@
 %</driver>
 %<pkg>\ProvidesPackage{asymptote}
 %<*pkg>
-  [2016/11/14 v1.32 Asymptote style file for LaTeX]
+  [2016/11/26 v1.33 Asymptote style file for LaTeX]
 %</pkg>
 %
 %<*driver>
@@ -488,10 +488,8 @@
     if(!settings.multipleView) settings.batchView=false;^^J%
     \ifxetex
       settings.tex="xelatex";^^J%
-      nosetpagesize();^^J%
     \else\ifASYPDF
         settings.tex="pdflatex";^^J%
-        nosetpagesize();^^J%
     \fi\fi
     \ifASYinline
       settings.inlinetex=true;^^J%

Modified: trunk/Build/source/utils/asymptote/doc/asy-latex.pdf
===================================================================
(Binary files differ)

Modified: trunk/Build/source/utils/asymptote/doc/asyRefCard.pdf
===================================================================
(Binary files differ)

Modified: trunk/Build/source/utils/asymptote/doc/asymptote.pdf
===================================================================
(Binary files differ)

Modified: trunk/Build/source/utils/asymptote/doc/asymptote.sty
===================================================================
--- trunk/Build/source/utils/asymptote/doc/asymptote.sty	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/doc/asymptote.sty	2017-03-07 18:10:02 UTC (rev 43422)
@@ -9,7 +9,7 @@
 %% The ASYMPTOTE package
 %% 
 %% (C) 2003 Tom Prince
-%% (C) 2003-2015 John Bowman
+%% (C) 2003-2016 John Bowman
 %% (C) 2010 Will Robertson
 %% 
 %% Adapted from comment.sty
@@ -17,7 +17,7 @@
 %% Licence: GPL2+
 %% 
 \ProvidesPackage{asymptote}
-  [2016/02/09 v1.30 Asymptote style file for LaTeX]
+  [2016/11/26 v1.33 Asymptote style file for LaTeX]
 \def\Asymptote{{\tt Asymptote}}
 \InputIfFileExists{\jobname.pre}{}{}
 \newbox\ASYbox

Modified: trunk/Build/source/utils/asymptote/doc/asymptote.texi
===================================================================
--- trunk/Build/source/utils/asymptote/doc/asymptote.texi	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/doc/asymptote.texi	2017-03-07 18:10:02 UTC (rev 43422)
@@ -5733,7 +5733,17 @@
 int[] b=(int []) a;
 write(stdout,b);     // Outputs 2,-3
 @end verbatim
+In situations where casting from a string to a type @code{T} fails,
+an uninitialized variable is returned; this condition can be detected
+with the function @code{bool initialized(T);}
+ at verbatim
+int i=(int) "2.5";
+assert(initialized(i),"Invalid cast.");
 
+real x=(real) "2.5a";
+assert(initialized(x),"Invalid cast.");
+ at end verbatim
+
 @cindex @code{operator cast}
 Casting to user-defined types is also possible using @code{operator cast}:
 @verbatim
@@ -5760,6 +5770,7 @@
 @verbatim
 real operator cast(int x) {return x*100;}
 @end verbatim
+ at noindent
 is equivalent to an infinite recursion, since the result @code{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:
@@ -6095,7 +6106,7 @@
 @cindex @code{asymptote.sty}
 
 @code{Asymptote} comes with a convenient @code{LaTeX} style file
- at code{asymptote.sty} (v1.30 or later required) that makes @code{LaTeX}
+ at code{asymptote.sty} (v1.33 or later required) that makes @code{LaTeX}
 @code{Asymptote}-aware. Entering @code{Asymptote} code
 directly into the @code{LaTeX} source file, at the point where it is
 needed, keeps figures organized and avoids the need to invent new file

Modified: trunk/Build/source/utils/asymptote/doc/png/asymptote.info
===================================================================
(Binary files differ)

Modified: trunk/Build/source/utils/asymptote/drawelement.h
===================================================================
--- trunk/Build/source/utils/asymptote/drawelement.h	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/drawelement.h	2017-03-07 18:10:02 UTC (rev 43422)
@@ -22,6 +22,22 @@
 
 namespace camp {
 
+extern double T[3]; // z-component of current transform
+  
+static const double pixel=1.0; // Adaptive rendering constant.
+
+// Return one-sixth of the second derivative of the Bezier curve defined
+// by a,b,c,d at 0. 
+inline triple bezierPP(triple a, triple b, triple c) {
+  return a+c-2.0*b;
+}
+
+// Return one-third of the third derivative of the Bezier curve defined by
+// a,b,c,d.
+inline triple bezierPPP(triple a, triple b, triple c, triple d) {
+  return d-a+3.0*(b-c);
+}
+
 enum Interaction {EMBEDDED=0,BILLBOARD};
 
 void copyArray4x4C(double*& dest, const vm::array *a);

Modified: trunk/Build/source/utils/asymptote/drawpath3.cc
===================================================================
--- trunk/Build/source/utils/asymptote/drawpath3.cc	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/drawpath3.cc	2017-03-07 18:10:02 UTC (rev 43422)
@@ -5,6 +5,7 @@
  *****/
 
 #include "drawpath3.h"
+#include "drawsurface.h"
 
 namespace camp {
 
@@ -42,8 +43,9 @@
   return true;
 }
 
-void drawPath3::render(GLUnurbs *nurb, double, const triple&, const triple&,
-                       double, bool lighton, bool transparent)
+void drawPath3::render(GLUnurbs *nurb, double size2,
+                       const triple& b, const triple& B,
+                       double perspective, bool lighton, bool transparent)
 {
 #ifdef HAVE_GL
   Int n=g.length();
@@ -50,57 +52,70 @@
   if(n == 0 || invisible || ((color.A < 1.0) ^ transparent))
     return;
 
-  bool havebillboard=interaction == BILLBOARD;
+  const bool billboard=interaction == BILLBOARD &&
+    !settings::getSetting<bool>("offscreen");
+  triple m,M;
   
+  double f,F,s;
+  if(perspective) {
+    f=Min.getz()*perspective;
+    F=Max.getz()*perspective;
+    m=triple(min(f*b.getx(),F*b.getx()),min(f*b.gety(),F*b.gety()),b.getz());
+    M=triple(max(f*B.getx(),F*B.getx()),max(f*B.gety(),F*B.gety()),B.getz());
+    s=max(f,F);
+  } else {
+    m=b;
+    M=B;
+    s=1.0;
+  }
+  
+  const pair size3(s*(B.getx()-b.getx()),s*(B.gety()-b.gety()));
+  
+  double t[16]; // current transform
+  glGetDoublev(GL_MODELVIEW_MATRIX,t);
+// Like Fortran, OpenGL uses transposed (column-major) format!
+  run::transpose(t,4);
+  run::inverse(t,4);
+  bbox3 box(m,M);
+  box.transform(t);
+  m=box.Min();
+  M=box.Max();
+
+  if(!billboard && (Max.getx() < m.getx() || Min.getx() > M.getx() ||
+                    Max.gety() < m.gety() || Min.gety() > M.gety() ||
+                    Max.getz() < m.getz() || Min.getz() > M.getz()))
+    return;
+  
+  drawBezierPatch::S.draw();
+  
   GLfloat Diffuse[]={0.0,0.0,0.0,(GLfloat) color.A};
   glMaterialfv(GL_FRONT,GL_DIFFUSE,Diffuse);
-  
   static GLfloat Black[]={0.0,0.0,0.0,1.0};
   glMaterialfv(GL_FRONT,GL_AMBIENT,Black);
-    
   GLfloat Emissive[]={(GLfloat) color.R,(GLfloat) color.G,(GLfloat) color.B,
 		      (GLfloat) color.A};
   glMaterialfv(GL_FRONT,GL_EMISSION,Emissive);
-    
   glMaterialfv(GL_FRONT,GL_SPECULAR,Black);
-  
   glMaterialf(GL_FRONT,GL_SHININESS,128.0);
   
-  if(havebillboard) BB.init();
   
-  if(straight) {
-    glBegin(GL_LINE_STRIP);
-    for(Int i=0; i <= n; ++i) {
-      triple v=g.point(i);
-      if(havebillboard) {
-        static GLfloat controlpoints[3];
-        BB.store(controlpoints,v,center);
-        glVertex3fv(controlpoints);
-      } else
-        glVertex3f(v.getx(),v.gety(),v.getz());
+  
+  if(billboard) {
+    for(Int i=0; i < n; ++i) {
+      triple controls[]={BB.transform(g.point(i)),BB.transform(g.postcontrol(i)),
+                         BB.transform(g.precontrol(i+1)),
+                         BB.transform(g.point(i+1))};
+      R.queue(controls,straight,size3.length()/size2,m,M);
     }
-    glEnd();
   } else {
+    BB.init(center);
     for(Int i=0; i < n; ++i) {
-      static GLfloat knots[8]={0.0,0.0,0.0,0.0,1.0,1.0,1.0,1.0};
-      static GLfloat controlpoints[12];
-      if(havebillboard) {
-        BB.store(controlpoints,g.point(i),center);
-        BB.store(controlpoints+3,g.postcontrol(i),center);
-        BB.store(controlpoints+6,g.precontrol(i+1),center);
-        BB.store(controlpoints+9,g.point(i+1),center);
-      } else {
-        store(controlpoints,g.point(i));
-        store(controlpoints+3,g.postcontrol(i));
-        store(controlpoints+6,g.precontrol(i+1));
-        store(controlpoints+9,g.point(i+1));
-      }
-      
-      gluBeginCurve(nurb);
-      gluNurbsCurve(nurb,8,knots,3,controlpoints,4,GL_MAP1_VERTEX_3);
-      gluEndCurve(nurb);
+      triple controls[]={g.point(i),g.postcontrol(i),g.precontrol(i+1),
+                         g.point(i+1)};
+      R.queue(controls,straight,size3.length()/size2,m,M);
     }
   }
+  R.draw();
 #endif
 }
 

Modified: trunk/Build/source/utils/asymptote/drawpath3.h
===================================================================
--- trunk/Build/source/utils/asymptote/drawpath3.h	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/drawpath3.h	2017-03-07 18:10:02 UTC (rev 43422)
@@ -9,11 +9,15 @@
 
 #include "drawelement.h"
 #include "path3.h"
+#include "beziercurve.h"
 
 namespace camp {
 
 class drawPath3 : public drawElement {
 protected:
+#ifdef HAVE_GL
+  BezierCurve R;
+#endif  
   const path3 g;
   triple center;
   bool straight;

Modified: trunk/Build/source/utils/asymptote/drawsurface.cc
===================================================================
--- trunk/Build/source/utils/asymptote/drawsurface.cc	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/drawsurface.cc	2017-03-07 18:10:02 UTC (rev 43422)
@@ -15,15 +15,17 @@
 
 namespace camp {
 
-const double pixel=1.0; // Adaptive rendering constant.
 const triple drawElement::zero;
 
+double T[3]; // z-component of current transform
+
 using vm::array;
 
 #ifdef HAVE_GL
-void bezierTriangle(const triple *g, bool straight, double ratio,
-                    bool havebillboard, triple center, GLfloat *colors);
-  
+BezierCurve drawSurface::C;
+BezierPatch drawBezierPatch::S;
+BezierTriangle drawBezierTriangle::S;
+
 void storecolor(GLfloat *colors, int i, const vm::array &pens, int j)
 {
   pen p=vm::read<camp::pen>(pens,j);
@@ -48,10 +50,32 @@
                const RGBAColour& emissive,
                const RGBAColour& specular, double shininess) 
 {
+  static prc::RGBAColour lastdiffuse;
+  static prc::RGBAColour lastambient;
+  static prc::RGBAColour lastemissive;
+  static prc::RGBAColour lastspecular;
+  static double lastshininess=0.0;
+  static bool lastcolors=false;
+    
+  if(colors != lastcolors) {
+    drawBezierPatch::S.draw();
+    lastcolors=colors;
+  }
+  
+  if(!colors && (diffuse != lastdiffuse || ambient != lastambient || 
+                 emissive != lastemissive || specular != lastspecular ||
+                 shininess != lastshininess)) {
+    drawBezierPatch::S.draw();
+    lastdiffuse=diffuse;
+    lastambient=ambient;
+    lastemissive=emissive;
+    lastspecular=specular;
+    lastshininess=shininess;
+  }
+
   if(colors) {
-    glEnable(GL_COLOR_MATERIAL);
-   if(!lighton) 
-     glColorMaterial(GL_FRONT_AND_BACK,GL_EMISSION);
+    if(!lighton) 
+      glColorMaterial(GL_FRONT_AND_BACK,GL_EMISSION);
 
     GLfloat Black[]={0,0,0,(GLfloat) diffuse.A};
     glMaterialfv(GL_FRONT_AND_BACK,GL_DIFFUSE,Black);
@@ -82,21 +106,25 @@
 
 #endif  
 
-void drawSurface::bounds(const double* t, bbox3& b)
+void drawBezierPatch::bounds(const double* t, bbox3& b)
 {
   double x,y,z;
   double X,Y,Z;
   
   if(straight) {
-    triple *Vertices;
-    if(t == NULL) Vertices=vertices;
-    else {
-      triple buf[4];
-      Vertices=buf;
-      for(int i=0; i < 4; ++i)
-        Vertices[i]=t*vertices[i];
+    triple Vertices[3];
+    if(t == NULL) {
+      Vertices[0]=controls[0];
+      Vertices[1]=controls[3];
+      Vertices[2]=controls[12];
+      Vertices[3]=controls[15];
+    } else {
+      Vertices[0]=t*controls[0];
+      Vertices[1]=t*controls[3];
+      Vertices[2]=t*controls[12];
+      Vertices[3]=t*controls[15];
     }
-  
+    
     boundstriples(x,y,z,X,Y,Z,4,Vertices);
   } else {
     double cx[16];
@@ -144,20 +172,22 @@
   }
 }
 
-void drawSurface::ratio(const double* t, pair &b, double (*m)(double, double),
+void drawBezierPatch::ratio(const double* t, pair &b, double (*m)(double, double),
                         double fuzz, bool &first)
 {
   triple buf[16];
+  triple* Controls;
   if(straight) {
-    triple *Vertices;
-    if(t == NULL) Vertices=vertices;
+    if(t == NULL) Controls=controls;
     else {
-      Vertices=buf;
-      for(int i=0; i < 4; ++i)
-        Vertices[i]=t*vertices[i];
+      Controls=buf;
+      Controls[0]=t*controls[0];
+      Controls[3]=t*controls[3];
+      Controls[12]=t*controls[12];
+      Controls[15]=t*controls[15];
     }
   
-    triple v=Vertices[0];
+    triple v=Controls[0];
     double x=xratio(v);
     double y=yratio(v);
     if(first) {
@@ -167,19 +197,21 @@
       x=m(b.getx(),x);
       y=m(b.gety(),y);
     }
-  
-    for(size_t i=1; i < 4; ++i) {
-      triple v=Vertices[i];
-      x=m(x,xratio(v));
-      y=m(y,yratio(v));
-    }
+    v=Controls[3];
+    x=m(x,xratio(v));
+    y=m(y,yratio(v));
+    v=Controls[12];
+    x=m(x,xratio(v));
+    y=m(y,yratio(v));
+    v=Controls[15];
+    x=m(x,xratio(v));
+    y=m(y,yratio(v));
     b=pair(x,y);
   } else {
-    triple* Controls;
     if(t == NULL) Controls=controls;
     else {
       Controls=buf;
-      for(int i=0; i < 16; ++i)
+      for(unsigned int i=0; i < 16; ++i)
         Controls[i]=t*controls[i];
     }
 
@@ -194,7 +226,7 @@
   }
 }
 
-bool drawSurface::write(prcfile *out, unsigned int *, double, groupsmap&)
+bool drawBezierPatch::write(prcfile *out, unsigned int *, double, groupsmap&)
 {
   if(invisible || !prc)
     return true;
@@ -202,6 +234,7 @@
   PRCmaterial m(ambient,diffuse,emissive,specular,opacity,PRCshininess);
 
   if(straight) {
+    triple vertices[]={controls[0],controls[12],controls[3],controls[15]};
     if(colors)
       out->addQuad(vertices,colors);
     else
@@ -212,192 +245,93 @@
   return true;
 }
 
-// return the perpendicular displacement of a point z from the plane
-// through u with unit normal n.
-inline triple displacement2(const triple& z, const triple& u, const triple& n)
+void drawBezierPatch::render(GLUnurbs *nurb, double size2,
+                             const triple& b, const triple& B,
+                             double perspective, bool lighton,
+                             bool transparent)
 {
-  triple Z=z-u;
-  return n != triple(0,0,0) ? dot(Z,n)*n : Z;
-}
-
-inline triple maxabs(triple u, triple v)
-{
-  return triple(max(fabs(u.getx()),fabs(v.getx())),
-                max(fabs(u.gety()),fabs(v.gety())),
-                max(fabs(u.getz()),fabs(v.getz())));
-}
-
-inline triple displacement1(const triple& z0, const triple& c0,
-                            const triple& c1, const triple& z1)
-{
-  return maxabs(displacement(c0,z0,z1),displacement(c1,z0,z1));
-}
-
-void drawSurface::displacement()
-{
 #ifdef HAVE_GL
-  if(normal != zero) {
-    d=zero;
-    
-    if(!straight) {
-      for(size_t i=1; i < 16; ++i) 
-        d=maxabs(d,displacement2(controls[i],controls[0],normal));
-      
-      dperp=d;
-    
-      for(size_t i=0; i < 4; ++i)
-        d=maxabs(d,displacement1(controls[4*i],controls[4*i+1],
-                                 controls[4*i+2],controls[4*i+3]));
-      for(size_t i=0; i < 4; ++i)
-        d=maxabs(d,displacement1(controls[i],controls[i+4],
-                                 controls[i+8],controls[i+12]));
-    }
-  }
-#endif  
-}
-  
-inline double fraction(double d, double size)
-{
-  return size == 0 ? 1.0 : min(fabs(d)/size,1.0);
-}
-
-// estimate the viewport fraction associated with the displacement d
-inline double fraction(const triple& d, const pair& size)
-{
-  return max(fraction(d.getx(),size.getx()),fraction(d.gety(),size.gety()));
-}
-
-void drawSurface::render(GLUnurbs *nurb, double size2,
-                         const triple& Min, const triple& Max,
-                         double perspective, bool lighton, bool transparent)
-{
-#ifdef HAVE_GL
   if(invisible || 
      ((colors ? colors[0].A+colors[1].A+colors[2].A+colors[3].A < 4.0 :
        diffuse.A < 1.0) ^ transparent)) return;
-  double s;
-  GLfloat Normal[3];
-  GLfloat v[16];
   
-  const bool havebillboard=interaction == BILLBOARD &&
+  const bool billboard=interaction == BILLBOARD &&
     !settings::getSetting<bool>("offscreen");
   triple m,M;
-  if(perspective || !havebillboard) {
-    double t[16];
-    glGetDoublev(GL_MODELVIEW_MATRIX,t);
-// Like Fortran, OpenGL uses transposed (column-major) format!
-    run::transpose(t,4);
-    
-    bbox3 B(this->Min,this->Max);
-    B.transform(t);
   
-    m=B.Min();
-    M=B.Max();
-  }
-
+  double f,F,s;
   if(perspective) {
-    const double f=m.getz()*perspective;
-    const double F=M.getz()*perspective;
-    if(!havebillboard && (M.getx() < min(f*Min.getx(),F*Min.getx()) || 
-                          m.getx() > max(f*Max.getx(),F*Max.getx()) ||
-                          M.gety() < min(f*Min.gety(),F*Min.gety()) ||
-                          m.gety() > max(f*Max.gety(),F*Max.gety()) ||
-                          M.getz() < Min.getz() ||
-                          m.getz() > Max.getz()))
-      return;
+    f=Min.getz()*perspective;
+    F=Max.getz()*perspective;
+    m=triple(min(f*b.getx(),F*b.getx()),min(f*b.gety(),F*b.gety()),b.getz());
+    M=triple(max(f*B.getx(),F*B.getx()),max(f*B.gety(),F*B.gety()),B.getz());
     s=max(f,F);
   } else {
-    if(!havebillboard && (M.getx() < Min.getx() || m.getx() > Max.getx() ||
-                          M.gety() < Min.gety() || m.gety() > Max.gety() ||
-                          M.getz() < Min.getz() || m.getz() > Max.getz()))
-      return;
+    m=b;
+    M=B;
     s=1.0;
   }
-    
+  
+  const pair size3(s*(B.getx()-b.getx()),s*(B.gety()-b.gety()));
+  
+  double t[16]; // current transform
+  glGetDoublev(GL_MODELVIEW_MATRIX,t);
+// Like Fortran, OpenGL uses transposed (column-major) format!
+  run::transpose(t,4);
+  T[0]=t[8];
+  T[1]=t[9];
+  T[2]=t[10];
+  run::inverse(t,4);
+  bbox3 box(m,M);
+  box.transform(t);
+  m=box.Min();
+  M=box.Max();
+  
+  if(!billboard && (Max.getx() < m.getx() || Min.getx() > M.getx() ||
+                    Max.gety() < m.gety() || Min.gety() > M.gety() ||
+                    Max.getz() < m.getz() || Min.getz() > M.getz()))
+    return;
+
   setcolors(colors,lighton,diffuse,ambient,emissive,specular,shininess);
   
-  const pair size3(s*(Max.getx()-Min.getx()),s*(Max.gety()-Min.gety()));
+  if(billboard) BB.init(center);
   
-  bool havenormal=normal != zero;
-  if(havebillboard) BB.init();
-
+  GLfloat v[16];
   if(colors)
     for(size_t i=0; i < 4; ++i)
       storecolor(v,4*i,colors[i]);
+  
+  triple *Controls;
+  triple Controls0[16];
+  if(billboard) {
+    Controls=Controls0;
+    for(size_t i=0; i < 16; i++)
+      Controls[i]=BB.transform(controls[i]);
+  } else
+    Controls=controls;
     
-  if(!straight && (!havenormal || fraction(d,size3)*size2 >= pixel)) {
-    if(lighton) {
-      if(havenormal && fraction(dperp,size3)*size2 <= 0.1) {
-        if(havebillboard)
-          BB.store(Normal,normal,zero);
-        else
-          store(Normal,normal);
-        glNormal3fv(Normal);
-        gluNurbsCallback(nurb,GLU_NURBS_NORMAL,NULL);
-      } else
-        gluNurbsCallback(nurb,GLU_NURBS_NORMAL,(_GLUfuncptr) glNormal3fv);
-    }
-    GLfloat Controls[48];
-    
-    if(havebillboard) {
-      for(size_t i=0; i < 16; ++i)
-        BB.store(Controls+3*i,controls[i],center);
-    } else {
-      for(size_t i=0; i < 16; ++i)
-        store(Controls+3*i,controls[i]);
-    }
-    
-    static GLfloat bezier[]={0.0,0.0,0.0,0.0,1.0,1.0,1.0,1.0};
-    gluBeginSurface(nurb);
-    gluNurbsSurface(nurb,8,bezier,8,bezier,12,3,Controls,4,4,GL_MAP2_VERTEX_3);
-    if(colors) {
-      static GLfloat linear[]={0.0,0.0,1.0,1.0};
-      gluNurbsSurface(nurb,4,linear,4,linear,8,4,v,2,2,GL_MAP2_COLOR_4);
-    }
-    
-    gluEndSurface(nurb);
+  if(gl::outlinemode) {
+    triple edge0[]={Controls[0],Controls[4],Controls[8],Controls[12]};
+    C.queue(edge0,straight,size3.length()/size2,m,M);
+    triple edge1[]={Controls[12],Controls[13],Controls[14],Controls[15]};
+    C.queue(edge1,straight,size3.length()/size2,m,M);
+    triple edge2[]={Controls[15],Controls[11],Controls[7],Controls[3]};
+    C.queue(edge2,straight,size3.length()/size2,m,M);
+    triple edge3[]={Controls[3],Controls[2],Controls[1],Controls[0]};
+    C.queue(edge3,straight,size3.length()/size2,m,M);
+    C.draw();
   } else {
-    GLfloat Vertices[12];
-    
-    if(havebillboard) {
-      for(size_t i=0; i < 4; ++i)
-        BB.store(Vertices+3*i,vertices[i],center);
-    } else {
-      for(size_t i=0; i < 4; ++i)
-        store(Vertices+3*i,vertices[i]);
-    }
-    
-    if(havebillboard)
-      BB.store(Normal,normal,zero);
-    else
-      store(Normal,normal);
-
-    glBegin(GL_QUADS);
-    if(lighton)
-      glNormal3fv(Normal);
-    if(colors) 
-      glColor4fv(v);
-    glVertex3fv(Vertices);
-    if(colors) 
-      glColor4fv(v+8);
-    glVertex3fv(Vertices+6);
-    if(colors) 
-      glColor4fv(v+12);
-    glVertex3fv(Vertices+9);
-    if(colors) 
-      glColor4fv(v+4);
-    glVertex3fv(Vertices+3);
-    glEnd();
+    S.queue(Controls,straight,size3.length()/size2,m,M,transparent,
+            colors ? v : NULL);
+    if(!transparent) 
+      S.draw();
   }
-  
-  if(colors)
-    glDisable(GL_COLOR_MATERIAL);
 #endif
 }
 
-drawElement *drawSurface::transformed(const double* t)
+drawElement *drawBezierPatch::transformed(const double* t)
 {
-  return new drawSurface(t,this);
+  return new drawBezierPatch(t,this);
 }
   
 void drawBezierTriangle::bounds(const double* t, bbox3& b)
@@ -503,7 +437,7 @@
       for(unsigned int i=0; i < 10; ++i)
         Controls[i]=t*controls[i];
     }
-    
+
     if(first) {
       triple v=Controls[0];
       b=pair(xratio(v),yratio(v));
@@ -526,13 +460,13 @@
   static const double third=1.0/3.0;
   static const double third2=2.0/3.0;
   triple Controls[]={controls[0],controls[0],controls[0],controls[0],
-                       controls[1],third2*controls[1]+third*controls[2],
-                       third*controls[1]+third2*controls[2],
-                       controls[2],controls[3],
-                       third*controls[3]+third2*controls[4],
-                       third2*controls[4]+third*controls[5],
-                       controls[5],controls[6],controls[7],
-                       controls[8],controls[9]};
+                     controls[1],third2*controls[1]+third*controls[2],
+                     third*controls[1]+third2*controls[2],
+                     controls[2],controls[3],
+                     third*controls[3]+third2*controls[4],
+                     third2*controls[4]+third*controls[5],
+                     controls[5],controls[6],controls[7],
+                     controls[8],controls[9]};
   out->addPatch(Controls,m);
                     
   return true;
@@ -539,68 +473,84 @@
 }
 
 void drawBezierTriangle::render(GLUnurbs *nurb, double size2,
-                                const triple& Min, const triple& Max,
+                                const triple& b, const triple& B,
                                 double perspective, bool lighton,
                                 bool transparent)
 {
 #ifdef HAVE_GL
-  if(invisible)
-    return;
-
   if(invisible || 
      ((colors ? colors[0].A+colors[1].A+colors[2].A < 3.0 :
        diffuse.A < 1.0) ^ transparent)) return;
-
-  double s;
   
-  const bool havebillboard=interaction == BILLBOARD &&
+  const bool billboard=interaction == BILLBOARD &&
     !settings::getSetting<bool>("offscreen");
   triple m,M;
+  
+  double f,F,s;
+  if(perspective) {
+    f=Min.getz()*perspective;
+    F=Max.getz()*perspective;
+    m=triple(min(f*b.getx(),F*b.getx()),min(f*b.gety(),F*b.gety()),b.getz());
+    M=triple(max(f*B.getx(),F*B.getx()),max(f*B.gety(),F*B.gety()),B.getz());
+    s=max(f,F);
+  } else {
+    m=b;
+    M=B;
+    s=1.0;
+  }
+  
+  const pair size3(s*(B.getx()-b.getx()),s*(B.gety()-b.gety()));
+  
   double t[16]; // current transform
   glGetDoublev(GL_MODELVIEW_MATRIX,t);
 // Like Fortran, OpenGL uses transposed (column-major) format!
   run::transpose(t,4);
+  T[0]=t[8];
+  T[1]=t[9];
+  T[2]=t[10];
+  run::inverse(t,4);
+  bbox3 box(m,M);
+  box.transform(t);
+  m=box.Min();
+  M=box.Max();
 
-  bbox3 B(this->Min,this->Max);
-  B.transform(t);
+  if(!billboard && (Max.getx() < m.getx() || Min.getx() > M.getx() ||
+                    Max.gety() < m.gety() || Min.gety() > M.gety() ||
+                    Max.getz() < m.getz() || Min.getz() > M.getz()))
+    return;
 
-  m=B.Min();
-  M=B.Max();
-
-  if(perspective) {
-    const double f=m.getz()*perspective;
-    const double F=M.getz()*perspective;
-    if((M.getx() < min(f*Min.getx(),F*Min.getx()) ||
-        m.getx() > max(f*Max.getx(),F*Max.getx()) ||
-        M.gety() < min(f*Min.gety(),F*Min.gety()) ||
-        m.gety() > max(f*Max.gety(),F*Max.gety()) ||
-        M.getz() < Min.getz() ||
-        m.getz() > Max.getz()))
-      return;
-    s=max(f,F);
-  } else {
-    if((M.getx() < Min.getx() || m.getx() > Max.getx() ||
-        M.gety() < Min.gety() || m.gety() > Max.gety() ||
-        M.getz() < Min.getz() || m.getz() > Max.getz()))
-      return;
-    s=1.0;
-  }
-
   setcolors(colors,lighton,diffuse,ambient,emissive,specular,shininess);
   
-  const pair size3(s*(Max.getx()-Min.getx()),s*(Max.gety()-Min.gety()));
+  if(billboard) BB.init(center);
   
   GLfloat v[12];
-
   if(colors)
     for(size_t i=0; i < 3; ++i)
       storecolor(v,4*i,colors[i]);
     
-  bezierTriangle(controls,straight,size3.length()/size2,havebillboard,center,
-                 colors ? v : NULL);
-
-  if(colors)
-    glDisable(GL_COLOR_MATERIAL);
+  triple *Controls;
+  triple Controls0[10];
+  if(billboard) {
+    Controls=Controls0;
+    for(size_t i=0; i < 10; i++)
+      Controls[i]=BB.transform(controls[i]);
+  } else 
+    Controls=controls;
+  
+  if(gl::outlinemode) {
+    triple edge0[]={Controls[0],Controls[1],Controls[3],Controls[6]};
+    C.queue(edge0,straight,size3.length()/size2,m,M);
+    triple edge1[]={Controls[6],Controls[7],Controls[8],Controls[9]};
+    C.queue(edge1,straight,size3.length()/size2,m,M);
+    triple edge2[]={Controls[9],Controls[5],Controls[2],Controls[0]};
+    C.queue(edge2,straight,size3.length()/size2,m,M);
+    C.draw();
+  } else {
+    S.queue(Controls,straight,size3.length()/size2,m,M,transparent,
+            colors ? v : NULL);
+    if(!transparent) 
+      S.draw();
+  }
 #endif
 }
 

Modified: trunk/Build/source/utils/asymptote/drawsurface.h
===================================================================
--- trunk/Build/source/utils/asymptote/drawsurface.h	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/drawsurface.h	2017-03-07 18:10:02 UTC (rev 43422)
@@ -8,9 +8,10 @@
 #define DRAWSURFACE_H
 
 #include "drawelement.h"
-#include "triple.h"
 #include "arrayop.h"
 #include "path3.h"
+#include "beziercurve.h"
+#include "bezierpatch.h"
 
 namespace camp {
 
@@ -21,7 +22,7 @@
 class drawSurface : public drawElement {
 protected:
   triple *controls;
-  triple vertices[4];
+  size_t ncontrols;
   triple center;
   bool straight; // True iff Bezier patch is planar and has straight edges.
   prc::RGBAColour diffuse;
@@ -32,7 +33,6 @@
   double opacity;
   double shininess;
   double PRCshininess;
-  triple normal;
   bool invisible;
   Interaction interaction;
   
@@ -39,45 +39,37 @@
   triple Min,Max;
   bool prc;
   
+public:
 #ifdef HAVE_GL
-  triple d; // Maximum deviation of surface from a quadrilateral.
-  triple dperp;
+  static BezierCurve C;
 #endif  
   
-public:
-  drawSurface(const vm::array& g, triple center, bool straight,
-              const vm::array&p, double opacity, double shininess,
-              double PRCshininess, triple normal, const vm::array &pens,
+  string wrongsize() {
+    return (ncontrols == 16 ? "4x4" : "triangular")+
+      string(" array of triples and array of 4 pens required");
+  }
+  
+  drawSurface(const vm::array& g, size_t ncontrols, triple center,
+              bool straight, const vm::array&p, double opacity,
+              double shininess, double PRCshininess, const vm::array &pens,
               Interaction interaction, bool prc) :
-    center(center), straight(straight), opacity(opacity), shininess(shininess),
-    PRCshininess(PRCshininess), normal(unit(normal)),
-    interaction(interaction), prc(prc) {
-    const string wrongsize=
-      "Bezier surface patch requires 4x4 array of triples and array of 4 pens";
+    ncontrols(ncontrols), center(center), straight(straight), opacity(opacity),
+    shininess(shininess), PRCshininess(PRCshininess), interaction(interaction),
+    prc(prc) {
     if(checkArray(&g) != 4 || checkArray(&p) != 4)
-      reportError(wrongsize);
+      reportError(wrongsize());
     
-    vm::array *g0=vm::read<vm::array*>(g,0);
-    vm::array *g3=vm::read<vm::array*>(g,3);
-    if(checkArray(g0) != 4 || checkArray(g3) != 4)
-      reportError(wrongsize);
-    vertices[0]=vm::read<triple>(g0,0);
-    vertices[1]=vm::read<triple>(g0,3);
-    vertices[2]=vm::read<triple>(g3,0);
-    vertices[3]=vm::read<triple>(g3,3);
+    size_t k=0;
+    controls=new(UseGC) triple[ncontrols];
+    for(unsigned int i=0; i < 4; ++i) {
+      vm::array *gi=vm::read<vm::array*>(g,i);
+      size_t n=(ncontrols == 16 ? 4 : i+1);
+      if(checkArray(gi) != n)
+        reportError(wrongsize());
+      for(unsigned int j=0; j < n; ++j)
+        controls[k++]=vm::read<triple>(gi,j);
+    }
     
-    if(!straight) {
-      size_t k=0;
-      controls=new(UseGC) triple[16];
-      for(size_t i=0; i < 4; ++i) {
-        vm::array *gi=vm::read<vm::array*>(g,i);
-        if(checkArray(gi) != 4) 
-          reportError(wrongsize);
-        for(size_t j=0; j < 4; ++j)
-          controls[k++]=vm::read<triple>(gi,j);
-      }
-    } else controls=NULL;
-    
     pen surfacepen=vm::read<camp::pen>(p,0);
     invisible=surfacepen.invisible();
     
@@ -86,158 +78,97 @@
     emissive=rgba(vm::read<camp::pen>(p,2));
     specular=rgba(vm::read<camp::pen>(p,3));
     
-    int size=checkArray(&pens);
+    size_t nodes=(ncontrols == 16 ? 4 : 3);
+    size_t size=checkArray(&pens);
     if(size > 0) {
-      if(size != 4) reportError("4 vertex pens required");
-      colors=new(UseGC) prc::RGBAColour[4];
-      colors[0]=rgba(vm::read<camp::pen>(pens,0));
-      colors[1]=rgba(vm::read<camp::pen>(pens,3));
-      colors[2]=rgba(vm::read<camp::pen>(pens,1));
-      colors[3]=rgba(vm::read<camp::pen>(pens,2));
+      if(size != nodes) reportError("4 vertex pens required");
+      colors=new(UseGC) prc::RGBAColour[nodes];
+      for(size_t i=0; i < nodes; ++i)
+      colors[i]=rgba(vm::read<camp::pen>(pens,i));
     } else colors=NULL;
   }
   
   drawSurface(const double* t, const drawSurface *s) :
-    straight(s->straight), diffuse(s->diffuse), ambient(s->ambient),
-    emissive(s->emissive), specular(s->specular), colors(s->colors),
-    opacity(s->opacity), shininess(s->shininess),
+    ncontrols(s->ncontrols), straight(s->straight), diffuse(s->diffuse),
+    ambient(s->ambient), emissive(s->emissive), specular(s->specular),
+    colors(s->colors), opacity(s->opacity), shininess(s->shininess),
     PRCshininess(s->PRCshininess), invisible(s->invisible),
     interaction(s->interaction), prc(s->prc) { 
     
-    for(unsigned int i=0; i < 4; ++i)
-      vertices[i]=t*s->vertices[i];
-    
     if(s->controls) {
-      controls=new(UseGC) triple[16];
-      for(unsigned int i=0; i < 16; ++i)
+      controls=new(UseGC) triple[ncontrols];
+      for(unsigned int i=0; i < ncontrols; ++i)
         controls[i]=t*s->controls[i];
     } else controls=NULL;
   
 #ifdef HAVE_GL
     center=t*s->center;
-    normal=transformNormal(t,s->normal);
 #endif    
   }
   
+  virtual ~drawSurface() {}
+
   bool is3D() {return true;}
+};
   
+class drawBezierPatch : public drawSurface {
+public:  
+#ifdef HAVE_GL
+  static BezierPatch S;
+#endif  
+  
+  drawBezierPatch(const vm::array& g, triple center, bool straight,
+              const vm::array&p, double opacity, double shininess,
+              double PRCshininess, const vm::array &pens,
+              Interaction interaction, bool prc) : 
+    drawSurface(g,16,center,straight,p,opacity,shininess,PRCshininess,pens,
+                interaction,prc) {}
+
+  drawBezierPatch(const double* t, const drawBezierPatch *s) :
+    drawSurface(t,s) {
+  }
+  
   void bounds(const double* t, bbox3& b);
   
   void ratio(const double* t, pair &b, double (*m)(double, double),
              double fuzz, bool &first);
   
-  virtual ~drawSurface() {}
-
   bool write(prcfile *out, unsigned int *, double, groupsmap&);
   
-  void displacement();
-  
   void render(GLUnurbs *nurb, double, const triple& Min, const triple& Max,
               double perspective, bool lighton, bool transparent);
-  
   drawElement *transformed(const double* t);
 };
   
-class drawBezierTriangle : public drawElement {
-protected:
-  triple *controls;
-  triple center;
-  bool straight; // True iff Bezier triangle is planar and has straight edges.
-  prc::RGBAColour diffuse;
-  prc::RGBAColour ambient;
-  prc::RGBAColour emissive;
-  prc::RGBAColour specular;
-  prc::RGBAColour *colors;
-  double opacity;
-  double shininess;
-  double PRCshininess;
-  bool invisible;
-  Interaction interaction;
-  
-  triple Min,Max;
-  bool prc;
-  
+class drawBezierTriangle : public drawSurface {
+public:
 #ifdef HAVE_GL
-  triple d; // Maximum deviation of surface from a triangle.
-  triple dperp;
+  static BezierTriangle S;
 #endif  
   
-public:
   drawBezierTriangle(const vm::array& g, triple center, bool straight,
-                     const vm::array&p, double opacity, double shininess,
-                     double PRCshininess, const vm::array &pens,
-                     Interaction interaction, bool prc) :
-    center(center), straight(straight), opacity(opacity), shininess(shininess),
-    PRCshininess(PRCshininess), interaction(interaction), prc(prc) {
-    const string wrongsize=
-      "Bezier triangle requires triangular array of 10 triples and array of 4 pens";
-    if(checkArray(&g) != 4 || checkArray(&p) != 4)
-      reportError(wrongsize);
-    
-    size_t k=0;
-    controls=new(UseGC) triple[10];
-    for(unsigned int i=0; i < 4; ++i) {
-      vm::array *gi=vm::read<vm::array*>(g,i);
-      for(unsigned int j=0; j <= i; ++j) {
-        controls[k++]=vm::read<triple>(gi,j);
-      }
-    }
-    
-    pen surfacepen=vm::read<camp::pen>(p,0);
-    invisible=surfacepen.invisible();
-    
-    diffuse=rgba(surfacepen);
-    ambient=rgba(vm::read<camp::pen>(p,1));
-    emissive=rgba(vm::read<camp::pen>(p,2));
-    specular=rgba(vm::read<camp::pen>(p,3));
-    
-    int size=checkArray(&pens);
-    if(size > 0) {
-      if(size != 3) reportError("3 vertex pens required");
-      colors=new(UseGC) prc::RGBAColour[3];
-      colors[0]=rgba(vm::read<camp::pen>(pens,0));
-      colors[1]=rgba(vm::read<camp::pen>(pens,1));
-      colors[2]=rgba(vm::read<camp::pen>(pens,2));
-    } else colors=NULL;
-  }
+              const vm::array&p, double opacity, double shininess,
+              double PRCshininess, const vm::array &pens,
+              Interaction interaction, bool prc) : 
+    drawSurface(g,10,center,straight,p,opacity,shininess,PRCshininess,
+                pens,interaction,prc) {}
   
   drawBezierTriangle(const double* t, const drawBezierTriangle *s) :
-    straight(s->straight), diffuse(s->diffuse), ambient(s->ambient),
-    emissive(s->emissive), specular(s->specular), colors(s->colors),
-    opacity(s->opacity), shininess(s->shininess),
-    PRCshininess(s->PRCshininess), invisible(s->invisible),
-    interaction(s->interaction), prc(s->prc) { 
-    
-    if(s->controls) {
-      controls=new(UseGC) triple[10];
-      for(unsigned int i=0; i < 10; ++i)
-        controls[i]=t*s->controls[i];
-    } else controls=NULL;
-    
-#ifdef HAVE_GL
-    center=t*s->center;
-#endif    
+    drawSurface(t,s) {
   }
   
-  bool is3D() {return true;}
-  
   void bounds(const double* t, bbox3& b);
   
   void ratio(const double* t, pair &b, double (*m)(double, double),
              double fuzz, bool &first);
   
-  virtual ~drawBezierTriangle() {}
-
   bool write(prcfile *out, unsigned int *, double, groupsmap&);
   
-//  void displacement();
-  
   void render(GLUnurbs *nurb, double, const triple& Min, const triple& Max,
               double perspective, bool lighton, bool transparent);
-  
   drawElement *transformed(const double* t);
 };
-
+  
 class drawNurbs : public drawElement {
 protected:
   size_t udegree,vdegree;
@@ -406,7 +337,7 @@
   }
   
   drawPRC(const double* t, const drawPRC *s) :
-    drawElementLC(t, s), diffuse(s->diffuse), ambient(s->ambient),
+    drawElementLC(t,s), diffuse(s->diffuse), ambient(s->ambient),
     emissive(s->emissive), specular(s->specular), opacity(s->opacity),
     shininess(s->shininess), invisible(s->invisible) {
   }

Added: trunk/Build/source/utils/asymptote/examples/BezierSaddle.asy
===================================================================
--- trunk/Build/source/utils/asymptote/examples/BezierSaddle.asy	                        (rev 0)
+++ trunk/Build/source/utils/asymptote/examples/BezierSaddle.asy	2017-03-07 18:10:02 UTC (rev 43422)
@@ -0,0 +1,29 @@
+import three;
+
+size(300);
+
+patch p=patch(unstraighten(unitplane.s[0].external()));
+
+p.P[3][0]+=(0,0,1);
+
+p.P[1][0]+=(0,0,1/3);
+p.P[2][0]+=(0,0,2/3);
+p.P[3][1]+=(0,0,2/3);
+p.P[3][2]+=(0,0,1/3);
+
+p.P[2][1]=interp(p.P[2][0],p.P[2][3],1/3);
+p.P[2][2]=interp(p.P[2][0],p.P[2][3],2/3);
+
+p.P[1][1]=interp(p.P[1][0],p.P[1][3],1/3);
+p.P[1][2]=interp(p.P[1][0],p.P[1][3],2/3);
+
+draw(surface(p),red+opacity(0.75));
+
+void dot(triple[][] P) {
+  for(int i=0; i < 4; ++i)
+    for(int j=0; j < 4; ++j) {
+      draw(string(i)+","+string(j),P[i][j],linewidth(1mm));
+    }
+}
+
+dot(surface(p).s[0].P);

Added: trunk/Build/source/utils/asymptote/examples/colorpatch.asy
===================================================================
--- trunk/Build/source/utils/asymptote/examples/colorpatch.asy	                        (rev 0)
+++ trunk/Build/source/utils/asymptote/examples/colorpatch.asy	2017-03-07 18:10:02 UTC (rev 43422)
@@ -0,0 +1,18 @@
+import three;
+currentlight=Viewport;
+
+size(10cm);
+
+surface s=surface(patch(new triple[][] {
+      {(0,0,0),(1,0,0),(1,0,0),(2,0,0)},
+      {(0,1,0),(1,0,1),(1,0,1),(2,1,0)},
+      {(0,1,0),(1,0,-1),(1,0,-1),(2,1,0)},
+      {(0,2,0),(1,2,0),(1,2,0),(2,2,0)}}));
+
+s.s[0].colors=new pen[] {red,green,blue,black};
+draw(s,nolight);
+
+surface t=shift(Z)*unitplane;
+t.s[0].colors=new pen[] {red,green,blue,black};
+
+draw(t,nolight);

Modified: trunk/Build/source/utils/asymptote/examples/washermethod.asy
===================================================================
--- trunk/Build/source/utils/asymptote/examples/washermethod.asy	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/examples/washermethod.asy	2017-03-07 18:10:02 UTC (rev 43422)
@@ -5,7 +5,7 @@
 
 pen color1=green+opacity(0.25);
 pen color2=red;
-real alpha=250;
+real alpha=240;
 
 real f(real x) {return 2x^2-x^3;}
 pair F(real x) {return (x,f(x));}

Deleted: trunk/Build/source/utils/asymptote/gc-7.4.2.tar.gz
===================================================================
(Binary files differ)

Added: trunk/Build/source/utils/asymptote/gc-7.6.0.tar.gz
===================================================================
(Binary files differ)

Index: trunk/Build/source/utils/asymptote/gc-7.6.0.tar.gz
===================================================================
--- trunk/Build/source/utils/asymptote/gc-7.6.0.tar.gz	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/gc-7.6.0.tar.gz	2017-03-07 18:10:02 UTC (rev 43422)

Property changes on: trunk/Build/source/utils/asymptote/gc-7.6.0.tar.gz
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Modified: trunk/Build/source/utils/asymptote/glrender.cc
===================================================================
--- trunk/Build/source/utils/asymptote/glrender.cc	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/glrender.cc	2017-03-07 18:10:02 UTC (rev 43422)
@@ -45,6 +45,7 @@
 
 namespace gl {
   
+bool outlinemode=false;
 bool glthread=false;
 bool initialize=true;
 
@@ -422,6 +423,22 @@
 {
 }
 
+void destroywindow()
+{
+  glutDestroyWindow(glutGetWindow());
+}
+
+// Return the greatest power of 2 less than or equal to n.
+inline unsigned int floorpow2(unsigned int n)
+{
+  n |= n >> 1;
+  n |= n >> 2;
+  n |= n >> 4;
+  n |= n >> 8;
+  n |= n >> 16;
+  return n-(n >> 1);
+}
+
 void quit() 
 {
 #ifdef HAVE_LIBOSMESA
@@ -460,6 +477,7 @@
     case 0:
       for(size_t i=0; i < Nlights; ++i) 
         glEnable(GL_LIGHT0+i);
+      outlinemode=false;
       glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
       gluNurbsProperty(nurb,GLU_DISPLAY_MODE,GLU_FILL);
       ++Mode;
@@ -467,11 +485,13 @@
     case 1:
       for(size_t i=0; i < Nlights; ++i) 
         glDisable(GL_LIGHT0+i);
+      outlinemode=true;
       glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);
       gluNurbsProperty(nurb,GLU_DISPLAY_MODE,GLU_OUTLINE_PATCH);
       ++Mode;
       break;
     case 2:
+      outlinemode=false;
       gluNurbsProperty(nurb,GLU_DISPLAY_MODE,GLU_OUTLINE_POLYGON);
       Mode=0;
       break;
@@ -544,14 +564,10 @@
   Width=screenWidth;
   Height=screenHeight;
   reshape0(Width,Height);
-#ifdef __MSDOS__
-  glutFullScreen();
-#else
   if(reposition)
     glutPositionWindow(0,0);
   glutReshapeWindow(Width,Height);
   glutPostRedisplay();
-#endif    
 }
 
 void fitscreen(bool reposition=true) 
@@ -1364,10 +1380,8 @@
               bool Viewportlighting, bool view, int oldpid)
 {
   bool offscreen=getSetting<bool>("offscreen");
-
-#ifndef __MSDOS__    
   Iconify=getSetting<bool>("iconify");
-#endif
+  
 #ifdef HAVE_PTHREAD
   static bool initializedView=false;
 #endif  
@@ -1558,9 +1572,12 @@
 #ifdef FREEGLUT
 #ifdef GLUT_INIT_MAJOR_VERSION
         if(samples < multisample) {
-          --multisample;
+          multisample=floorpow2(multisample-1);
           if(multisample > 1) {
-            glutDestroyWindow(window);
+            glutReshapeWindow(1,1);
+            glutDisplayFunc(destroywindow);
+            glutShowWindow();
+            glutMainLoopEvent();
             continue;
           }
         }
@@ -1568,11 +1585,9 @@
       }
 #endif      
 #endif      
-      if(samples > 1) {
-        if(settings::verbose > 1 && samples > 1)
-          cout << "Multisampling enabled with sample width " << samples
-               << endl;
-      }
+      if(settings::verbose > 1 && samples > 1)
+        cout << "Multisampling enabled with sample width " << samples
+             << endl;
       glutDisplayFunc(display);
       glutShowWindow();
     } else if(!havewindow) {

Modified: trunk/Build/source/utils/asymptote/glrender.h
===================================================================
--- trunk/Build/source/utils/asymptote/glrender.h	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/glrender.h	2017-03-07 18:10:02 UTC (rev 43422)
@@ -69,6 +69,8 @@
 
 namespace gl {
 
+extern bool outlinemode;
+
 struct projection 
 {
 public:
@@ -103,9 +105,13 @@
 
 struct billboard 
 {
+  double cx,cy,cz;
   triple u,v,w;
   
-  void init() {
+  void init(const triple& center) {
+    cx=center.getx();
+    cy=center.gety();
+    cz=center.getz();
     gl::projection P=gl::camera(false);
     w=unit(P.camera-P.target);
     v=unit(perp(P.up,w));
@@ -112,13 +118,20 @@
     u=cross(v,w);
   }
     
-  void store(GLfloat* C, const triple& V, const triple &center) {
-    double cx=center.getx();
-    double cy=center.gety();
-    double cz=center.getz();
+  triple transform(const triple& V) {
     double x=V.getx()-cx;
     double y=V.gety()-cy;
     double z=V.getz()-cz;
+    
+    return triple(cx+u.getx()*x+v.getx()*y+w.getx()*z,
+                  cy+u.gety()*x+v.gety()*y+w.gety()*z,
+                  cz+u.getz()*x+v.getz()*y+w.getz()*z);
+  }
+  
+  void store(GLfloat* C, const triple& V) {
+    double x=V.getx()-cx;
+    double y=V.gety()-cy;
+    double z=V.getz()-cz;
     C[0]=cx+u.getx()*x+v.getx()*y+w.getx()*z;
     C[1]=cy+u.gety()*x+v.gety()*y+w.gety()*z;
     C[2]=cz+u.getz()*x+v.getz()*y+w.getz()*z;

Modified: trunk/Build/source/utils/asymptote/install-sh
===================================================================
--- trunk/Build/source/utils/asymptote/install-sh	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/install-sh	2017-03-07 18:10:02 UTC (rev 43422)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2016-01-11.22; # UTC
+scriptversion=2009-04-28.21; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -35,21 +35,25 @@
 # FSF changes to this file are in the public domain.
 #
 # Calling this script install-sh is preferred over install.sh, to prevent
-# 'make' implicit rules from creating a file called install from it
+# `make' implicit rules from creating a file called install from it
 # when there is no Makefile.
 #
 # This script is compatible with the BSD install script, but was written
 # from scratch.
 
-tab='	'
 nl='
 '
-IFS=" $tab$nl"
+IFS=" ""	$nl"
 
-# Set DOITPROG to "echo" to test this script.
+# set DOITPROG to echo to test this script
 
+# Don't use :- since 4.3BSD and earlier shells don't like it.
 doit=${DOITPROG-}
-doit_exec=${doit:-exec}
+if test -z "$doit"; then
+  doit_exec=exec
+else
+  doit_exec=$doit
+fi
 
 # Put in absolute file names if you don't have them in your path;
 # or use environment vars.
@@ -64,6 +68,17 @@
 rmprog=${RMPROG-rm}
 stripprog=${STRIPPROG-strip}
 
+posix_glob='?'
+initialize_posix_glob='
+  test "$posix_glob" != "?" || {
+    if (set -f) 2>/dev/null; then
+      posix_glob=
+    else
+      posix_glob=:
+    fi
+  }
+'
+
 posix_mkdir=
 
 # Desired mode of installed file.
@@ -82,7 +97,7 @@
 dst_arg=
 
 copy_on_change=false
-is_target_a_directory=possibly
+no_target_directory=
 
 usage="\
 Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
@@ -122,41 +137,36 @@
     -d) dir_arg=true;;
 
     -g) chgrpcmd="$chgrpprog $2"
-        shift;;
+	shift;;
 
     --help) echo "$usage"; exit $?;;
 
     -m) mode=$2
-        case $mode in
-          *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
-            echo "$0: invalid mode: $mode" >&2
-            exit 1;;
-        esac
-        shift;;
+	case $mode in
+	  *' '* | *'	'* | *'
+'*	  | *'*'* | *'?'* | *'['*)
+	    echo "$0: invalid mode: $mode" >&2
+	    exit 1;;
+	esac
+	shift;;
 
     -o) chowncmd="$chownprog $2"
-        shift;;
+	shift;;
 
     -s) stripcmd=$stripprog;;
 
-    -t)
-        is_target_a_directory=always
-        dst_arg=$2
-        # Protect names problematic for 'test' and other utilities.
-        case $dst_arg in
-          -* | [=\(\)!]) dst_arg=./$dst_arg;;
-        esac
-        shift;;
+    -t) dst_arg=$2
+	shift;;
 
-    -T) is_target_a_directory=never;;
+    -T) no_target_directory=true;;
 
     --version) echo "$0 $scriptversion"; exit $?;;
 
-    --) shift
-        break;;
+    --)	shift
+	break;;
 
-    -*) echo "$0: invalid option: $1" >&2
-        exit 1;;
+    -*)	echo "$0: invalid option: $1" >&2
+	exit 1;;
 
     *)  break;;
   esac
@@ -163,16 +173,6 @@
   shift
 done
 
-# We allow the use of options -d and -T together, by making -d
-# take the precedence; this is for compatibility with GNU install.
-
-if test -n "$dir_arg"; then
-  if test -n "$dst_arg"; then
-    echo "$0: target directory not allowed when installing a directory." >&2
-    exit 1
-  fi
-fi
-
 if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
   # When -d is used, all remaining arguments are directories to create.
   # When -t is used, the destination is already specified.
@@ -186,10 +186,6 @@
     fi
     shift # arg
     dst_arg=$arg
-    # Protect names problematic for 'test' and other utilities.
-    case $dst_arg in
-      -* | [=\(\)!]) dst_arg=./$dst_arg;;
-    esac
   done
 fi
 
@@ -198,27 +194,14 @@
     echo "$0: no input file specified." >&2
     exit 1
   fi
-  # It's OK to call 'install-sh -d' without argument.
+  # It's OK to call `install-sh -d' without argument.
   # This can happen when creating conditional directories.
   exit 0
 fi
 
 if test -z "$dir_arg"; then
-  if test $# -gt 1 || test "$is_target_a_directory" = always; then
-    if test ! -d "$dst_arg"; then
-      echo "$0: $dst_arg: Is not a directory." >&2
-      exit 1
-    fi
-  fi
-fi
+  trap '(exit $?); exit' 1 2 13 15
 
-if test -z "$dir_arg"; then
-  do_exit='(exit $ret); exit $ret'
-  trap "ret=129; $do_exit" 1
-  trap "ret=130; $do_exit" 2
-  trap "ret=141; $do_exit" 13
-  trap "ret=143; $do_exit" 15
-
   # Set umask so as not to create temps with too-generous modes.
   # However, 'strip' requires both read and write access to temps.
   case $mode in
@@ -228,16 +211,16 @@
 
     *[0-7])
       if test -z "$stripcmd"; then
-        u_plus_rw=
+	u_plus_rw=
       else
-        u_plus_rw='% 200'
+	u_plus_rw='% 200'
       fi
       cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
     *)
       if test -z "$stripcmd"; then
-        u_plus_rw=
+	u_plus_rw=
       else
-        u_plus_rw=,u+rw
+	u_plus_rw=,u+rw
       fi
       cp_umask=$mode$u_plus_rw;;
   esac
@@ -245,9 +228,9 @@
 
 for src
 do
-  # Protect names problematic for 'test' and other utilities.
+  # Protect names starting with `-'.
   case $src in
-    -* | [=\(\)!]) src=./$src;;
+    -*) src=./$src;;
   esac
 
   if test -n "$dir_arg"; then
@@ -269,20 +252,51 @@
       echo "$0: no destination specified." >&2
       exit 1
     fi
+
     dst=$dst_arg
+    # Protect names starting with `-'.
+    case $dst in
+      -*) dst=./$dst;;
+    esac
 
     # If destination is a directory, append the input filename; won't work
     # if double slashes aren't ignored.
     if test -d "$dst"; then
-      if test "$is_target_a_directory" = never; then
-        echo "$0: $dst_arg: Is a directory" >&2
-        exit 1
+      if test -n "$no_target_directory"; then
+	echo "$0: $dst_arg: Is a directory" >&2
+	exit 1
       fi
       dstdir=$dst
       dst=$dstdir/`basename "$src"`
       dstdir_status=0
     else
-      dstdir=`dirname "$dst"`
+      # Prefer dirname, but fall back on a substitute if dirname fails.
+      dstdir=`
+	(dirname "$dst") 2>/dev/null ||
+	expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	     X"$dst" : 'X\(//\)[^/]' \| \
+	     X"$dst" : 'X\(//\)$' \| \
+	     X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+	echo X"$dst" |
+	    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\/\)[^/].*/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\/\)$/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\).*/{
+		   s//\1/
+		   q
+		 }
+		 s/.*/./; q'
+      `
+
       test -d "$dstdir"
       dstdir_status=$?
     fi
@@ -293,74 +307,74 @@
   if test $dstdir_status != 0; then
     case $posix_mkdir in
       '')
-        # Create intermediate dirs using mode 755 as modified by the umask.
-        # This is like FreeBSD 'install' as of 1997-10-28.
-        umask=`umask`
-        case $stripcmd.$umask in
-          # Optimize common cases.
-          *[2367][2367]) mkdir_umask=$umask;;
-          .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+	# Create intermediate dirs using mode 755 as modified by the umask.
+	# This is like FreeBSD 'install' as of 1997-10-28.
+	umask=`umask`
+	case $stripcmd.$umask in
+	  # Optimize common cases.
+	  *[2367][2367]) mkdir_umask=$umask;;
+	  .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
 
-          *[0-7])
-            mkdir_umask=`expr $umask + 22 \
-              - $umask % 100 % 40 + $umask % 20 \
-              - $umask % 10 % 4 + $umask % 2
-            `;;
-          *) mkdir_umask=$umask,go-w;;
-        esac
+	  *[0-7])
+	    mkdir_umask=`expr $umask + 22 \
+	      - $umask % 100 % 40 + $umask % 20 \
+	      - $umask % 10 % 4 + $umask % 2
+	    `;;
+	  *) mkdir_umask=$umask,go-w;;
+	esac
 
-        # With -d, create the new directory with the user-specified mode.
-        # Otherwise, rely on $mkdir_umask.
-        if test -n "$dir_arg"; then
-          mkdir_mode=-m$mode
-        else
-          mkdir_mode=
-        fi
+	# With -d, create the new directory with the user-specified mode.
+	# Otherwise, rely on $mkdir_umask.
+	if test -n "$dir_arg"; then
+	  mkdir_mode=-m$mode
+	else
+	  mkdir_mode=
+	fi
 
-        posix_mkdir=false
-        case $umask in
-          *[123567][0-7][0-7])
-            # POSIX mkdir -p sets u+wx bits regardless of umask, which
-            # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
-            ;;
-          *)
-            tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
-            trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+	posix_mkdir=false
+	case $umask in
+	  *[123567][0-7][0-7])
+	    # POSIX mkdir -p sets u+wx bits regardless of umask, which
+	    # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+	    ;;
+	  *)
+	    tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+	    trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
 
-            if (umask $mkdir_umask &&
-                exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
-            then
-              if test -z "$dir_arg" || {
-                   # Check for POSIX incompatibilities with -m.
-                   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
-                   # other-writable bit of parent directory when it shouldn't.
-                   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
-                   ls_ld_tmpdir=`ls -ld "$tmpdir"`
-                   case $ls_ld_tmpdir in
-                     d????-?r-*) different_mode=700;;
-                     d????-?--*) different_mode=755;;
-                     *) false;;
-                   esac &&
-                   $mkdirprog -m$different_mode -p -- "$tmpdir" && {
-                     ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
-                     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
-                   }
-                 }
-              then posix_mkdir=:
-              fi
-              rmdir "$tmpdir/d" "$tmpdir"
-            else
-              # Remove any dirs left behind by ancient mkdir implementations.
-              rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
-            fi
-            trap '' 0;;
-        esac;;
+	    if (umask $mkdir_umask &&
+		exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+	    then
+	      if test -z "$dir_arg" || {
+		   # Check for POSIX incompatibilities with -m.
+		   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+		   # other-writeable bit of parent directory when it shouldn't.
+		   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+		   ls_ld_tmpdir=`ls -ld "$tmpdir"`
+		   case $ls_ld_tmpdir in
+		     d????-?r-*) different_mode=700;;
+		     d????-?--*) different_mode=755;;
+		     *) false;;
+		   esac &&
+		   $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+		     ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+		     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+		   }
+		 }
+	      then posix_mkdir=:
+	      fi
+	      rmdir "$tmpdir/d" "$tmpdir"
+	    else
+	      # Remove any dirs left behind by ancient mkdir implementations.
+	      rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+	    fi
+	    trap '' 0;;
+	esac;;
     esac
 
     if
       $posix_mkdir && (
-        umask $mkdir_umask &&
-        $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+	umask $mkdir_umask &&
+	$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
       )
     then :
     else
@@ -370,17 +384,19 @@
       # directory the slow way, step by step, checking for races as we go.
 
       case $dstdir in
-        /*) prefix='/';;
-        [-=\(\)!]*) prefix='./';;
-        *)  prefix='';;
+	/*) prefix='/';;
+	-*) prefix='./';;
+	*)  prefix='';;
       esac
 
+      eval "$initialize_posix_glob"
+
       oIFS=$IFS
       IFS=/
-      set -f
+      $posix_glob set -f
       set fnord $dstdir
       shift
-      set +f
+      $posix_glob set +f
       IFS=$oIFS
 
       prefixes=
@@ -387,34 +403,34 @@
 
       for d
       do
-        test X"$d" = X && continue
+	test -z "$d" && continue
 
-        prefix=$prefix$d
-        if test -d "$prefix"; then
-          prefixes=
-        else
-          if $posix_mkdir; then
-            (umask=$mkdir_umask &&
-             $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
-            # Don't fail if two instances are running concurrently.
-            test -d "$prefix" || exit 1
-          else
-            case $prefix in
-              *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
-              *) qprefix=$prefix;;
-            esac
-            prefixes="$prefixes '$qprefix'"
-          fi
-        fi
-        prefix=$prefix/
+	prefix=$prefix$d
+	if test -d "$prefix"; then
+	  prefixes=
+	else
+	  if $posix_mkdir; then
+	    (umask=$mkdir_umask &&
+	     $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+	    # Don't fail if two instances are running concurrently.
+	    test -d "$prefix" || exit 1
+	  else
+	    case $prefix in
+	      *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+	      *) qprefix=$prefix;;
+	    esac
+	    prefixes="$prefixes '$qprefix'"
+	  fi
+	fi
+	prefix=$prefix/
       done
 
       if test -n "$prefixes"; then
-        # Don't fail if two instances are running concurrently.
-        (umask $mkdir_umask &&
-         eval "\$doit_exec \$mkdirprog $prefixes") ||
-          test -d "$dstdir" || exit 1
-        obsolete_mkdir_used=true
+	# Don't fail if two instances are running concurrently.
+	(umask $mkdir_umask &&
+	 eval "\$doit_exec \$mkdirprog $prefixes") ||
+	  test -d "$dstdir" || exit 1
+	obsolete_mkdir_used=true
       fi
     fi
   fi
@@ -449,12 +465,15 @@
 
     # If -C, don't bother to copy if it wouldn't change the file.
     if $copy_on_change &&
-       old=`LC_ALL=C ls -dlL "$dst"     2>/dev/null` &&
-       new=`LC_ALL=C ls -dlL "$dsttmp"  2>/dev/null` &&
-       set -f &&
+       old=`LC_ALL=C ls -dlL "$dst"	2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp"	2>/dev/null` &&
+
+       eval "$initialize_posix_glob" &&
+       $posix_glob set -f &&
        set X $old && old=:$2:$4:$5:$6 &&
        set X $new && new=:$2:$4:$5:$6 &&
-       set +f &&
+       $posix_glob set +f &&
+
        test "$old" = "$new" &&
        $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
     then
@@ -467,24 +486,24 @@
       # to itself, or perhaps because mv is so ancient that it does not
       # support -f.
       {
-        # Now remove or move aside any old file at destination location.
-        # We try this two ways since rm can't unlink itself on some
-        # systems and the destination file might be busy for other
-        # reasons.  In this case, the final cleanup might fail but the new
-        # file should still install successfully.
-        {
-          test ! -f "$dst" ||
-          $doit $rmcmd -f "$dst" 2>/dev/null ||
-          { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
-            { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
-          } ||
-          { echo "$0: cannot unlink or rename $dst" >&2
-            (exit 1); exit 1
-          }
-        } &&
+	# Now remove or move aside any old file at destination location.
+	# We try this two ways since rm can't unlink itself on some
+	# systems and the destination file might be busy for other
+	# reasons.  In this case, the final cleanup might fail but the new
+	# file should still install successfully.
+	{
+	  test ! -f "$dst" ||
+	  $doit $rmcmd -f "$dst" 2>/dev/null ||
+	  { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+	    { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+	  } ||
+	  { echo "$0: cannot unlink or rename $dst" >&2
+	    (exit 1); exit 1
+	  }
+	} &&
 
-        # Now rename the file to the real destination.
-        $doit $mvcmd "$dsttmp" "$dst"
+	# Now rename the file to the real destination.
+	$doit $mvcmd "$dsttmp" "$dst"
       }
     fi || exit 1
 
@@ -496,6 +515,6 @@
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC0"
+# time-stamp-time-zone: "UTC"
 # time-stamp-end: "; # UTC"
 # End:

Modified: trunk/Build/source/utils/asymptote/item.h
===================================================================
--- trunk/Build/source/utils/asymptote/item.h	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/item.h	2017-03-07 18:10:02 UTC (rev 43422)
@@ -1,5 +1,5 @@
 /*****
- * inst.h
+ * item.h
  * Tom Prince and John Bowman 2005/04/12
  *
  * Descibes the items that are used by the virtual machine.

Modified: trunk/Build/source/utils/asymptote/lex.yy.cc
===================================================================
--- trunk/Build/source/utils/asymptote/lex.yy.cc	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/lex.yy.cc	2017-03-07 18:10:02 UTC (rev 43422)
@@ -17,8 +17,8 @@
 
 #define FLEX_SCANNER
 #define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 39
+#define YY_FLEX_MINOR_VERSION 6
+#define YY_FLEX_SUBMINOR_VERSION 0
 #if YY_FLEX_SUBMINOR_VERSION > 0
 #define FLEX_BETA
 #endif
@@ -185,7 +185,15 @@
 
 /* Size of default input buffer. */
 #ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
 #define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
 #endif
 
 /* The state buf must be large enough to hold one state per character in the main buffer.
@@ -224,7 +232,7 @@
 	do \
 		{ \
 		/* Undo effects of setting up yytext. */ \
-        int yyless_macro_arg = (n); \
+        yy_size_t yyless_macro_arg = (n); \
         YY_LESS_LINENO(yyless_macro_arg);\
 		*yy_cp = (yy_hold_char); \
 		YY_RESTORE_YY_MORE_OFFSET \
@@ -420,6 +428,9 @@
 int yylineno = 1;
 
 extern char *yytext;
+#ifdef yytext_ptr
+#undef yytext_ptr
+#endif
 #define yytext_ptr yytext
 
 /* %% [1.5] DFA */
@@ -429,6 +440,9 @@
 static yy_state_type yy_get_previous_state (void );
 static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
 static int yy_get_next_buffer (void );
+#if defined(__GNUC__) && __GNUC__ >= 3
+__attribute__((__noreturn__))
+#endif
 static void yy_fatal_error (yyconst char msg[]  );
 
 /* %endif */
@@ -496,7 +510,7 @@
       111,  112,  119,  119,  102,    0
     } ;
 
-static yyconst flex_int32_t yy_ec[256] =
+static yyconst YY_CHAR 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 +542,7 @@
         1,    1,    1,    1,    1
     } ;
 
-static yyconst flex_int32_t yy_meta[63] =
+static yyconst YY_CHAR yy_meta[63] =
     {   0,
         1,    1,    2,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    3,
@@ -539,7 +553,7 @@
         1,    1
     } ;
 
-static yyconst flex_int16_t yy_base[344] =
+static yyconst flex_uint16_t yy_base[344] =
     {   0,
         0,    0,   60,   62,   64,   69,   74,   79,    0,    0,
       112,    0,  539,  540,  540,  540,  535,  511,  540,  510,
@@ -623,7 +637,7 @@
       336,  336,  336
     } ;
 
-static yyconst flex_int16_t yy_nxt[603] =
+static yyconst flex_uint16_t yy_nxt[603] =
     {   0,
        14,   15,   16,   17,   18,   19,   20,   21,   22,   23,
        24,   25,   26,   27,   28,   29,   30,   31,   32,   33,
@@ -998,7 +1012,7 @@
 
 
 
-#line 1002 "lex.yy.cc"
+#line 1016 "lex.yy.cc"
 
 #define INITIAL 0
 #define lexcomment 1
@@ -1049,11 +1063,11 @@
 
 FILE *yyget_in (void );
 
-void yyset_in  (FILE * in_str  );
+void yyset_in  (FILE * _in_str  );
 
 FILE *yyget_out (void );
 
-void yyset_out  (FILE * out_str  );
+void yyset_out  (FILE * _out_str  );
 
 yy_size_t yyget_leng (void );
 
@@ -1061,7 +1075,7 @@
 
 int yyget_lineno (void );
 
-void yyset_lineno (int line_number  );
+void yyset_lineno (int _line_number  );
 
 /* %if-bison-bridge */
 /* %endif */
@@ -1080,8 +1094,11 @@
 
 /* %not-for-header */
 
+#ifndef YY_NO_UNPUT
+    
     static void yyunput (int c,char *buf_ptr  );
     
+#endif
 /* %ok-for-header */
 
 /* %endif */
@@ -1114,7 +1131,12 @@
 
 /* Amount of stuff to slurp up with each read. */
 #ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
 #define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
 #endif
 
 /* Copy whatever the last rule matched to the standard output. */
@@ -1227,7 +1249,7 @@
 
 /* Code executed at the end of each rule. */
 #ifndef YY_BREAK
-#define YY_BREAK break;
+#define YY_BREAK /*LINTED*/break;
 #endif
 
 /* %% [6.0] YY_RULE_SETUP definition goes here */
@@ -1240,9 +1262,9 @@
  */
 YY_DECL
 {
-	register yy_state_type yy_current_state;
-	register char *yy_cp, *yy_bp;
-	register int yy_act;
+	yy_state_type yy_current_state;
+	char *yy_cp, *yy_bp;
+	int yy_act;
     
 	if ( !(yy_init) )
 		{
@@ -1283,9 +1305,9 @@
 #line 209 "camp.l"
 
 
-#line 1287 "lex.yy.cc"
+#line 1309 "lex.yy.cc"
 
-	while ( 1 )		/* loops until end-of-file is reached */
+	while ( /*CONSTCOND*/1 )		/* loops until end-of-file is reached */
 		{
 /* %% [8.0] yymore()-related code goes here */
 		yy_cp = (yy_c_buf_p);
@@ -1303,7 +1325,7 @@
 yy_match:
 		do
 			{
-			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
+			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;
@@ -2110,7 +2132,7 @@
 #line 445 "camp.l"
 ECHO;
 	YY_BREAK
-#line 2114 "lex.yy.cc"
+#line 2136 "lex.yy.cc"
 
 	case YY_END_OF_BUFFER:
 		{
@@ -2133,7 +2155,11 @@
 			 * back-up) that will match for the new input source.
 			 */
 			(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+/* %if-c-only */
 			YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
+/* %endif */
+/* %if-c++-only */
+/* %endif */
 			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
 			}
 
@@ -2264,9 +2290,9 @@
 /* %if-c++-only */
 /* %endif */
 {
-    	register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
-	register char *source = (yytext_ptr);
-	register int number_to_move, i;
+    	char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+	char *source = (yytext_ptr);
+	yy_size_t number_to_move, i;
 	int ret_val;
 
 	if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
@@ -2295,7 +2321,7 @@
 	/* Try to read more data. */
 
 	/* First move last chars to start of buffer. */
-	number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
+	number_to_move = (yy_size_t) ((yy_c_buf_p) - (yytext_ptr)) - 1;
 
 	for ( i = 0; i < number_to_move; ++i )
 		*(dest++) = *(source++);
@@ -2308,7 +2334,7 @@
 
 	else
 		{
-			yy_size_t num_to_read =
+			int num_to_read =
 			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
 
 		while ( num_to_read <= 0 )
@@ -2404,8 +2430,8 @@
 /* %if-c++-only */
 /* %endif */
 {
-	register yy_state_type yy_current_state;
-	register char *yy_cp;
+	yy_state_type yy_current_state;
+	char *yy_cp;
     
 /* %% [15.0] code to get the start state into yy_current_state goes here */
 	yy_current_state = (yy_start);
@@ -2413,7 +2439,7 @@
 	for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
 		{
 /* %% [16.0] code to find the next state goes here */
-		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+		YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
 		if ( yy_accept[yy_current_state] )
 			{
 			(yy_last_accepting_state) = yy_current_state;
@@ -2442,11 +2468,11 @@
 /* %if-c++-only */
 /* %endif */
 {
-	register int yy_is_jam;
+	int yy_is_jam;
     /* %% [17.0] code to find the next state, and perhaps do backing up, goes here */
-	register char *yy_cp = (yy_c_buf_p);
+	char *yy_cp = (yy_c_buf_p);
 
-	register YY_CHAR yy_c = 1;
+	YY_CHAR yy_c = 1;
 	if ( yy_accept[yy_current_state] )
 		{
 		(yy_last_accepting_state) = yy_current_state;
@@ -2464,14 +2490,15 @@
 		return yy_is_jam ? 0 : yy_current_state;
 }
 
+#ifndef YY_NO_UNPUT
 /* %if-c-only */
 
-    static void yyunput (int c, register char * yy_bp )
+    static void yyunput (int c, char * yy_bp )
 /* %endif */
 /* %if-c++-only */
 /* %endif */
 {
-	register char *yy_cp;
+	char *yy_cp;
     
     yy_cp = (yy_c_buf_p);
 
@@ -2481,10 +2508,10 @@
 	if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
 		{ /* need to shift things up to make room */
 		/* +2 for EOB chars. */
-		register yy_size_t number_to_move = (yy_n_chars) + 2;
-		register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
+		yy_size_t number_to_move = (yy_n_chars) + 2;
+		char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
 					YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
-		register char *source =
+		char *source =
 				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
 
 		while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
@@ -2510,6 +2537,7 @@
 /* %if-c-only */
 
 /* %endif */
+#endif
 
 /* %if-c-only */
 #ifndef YY_NO_INPUT
@@ -2615,6 +2643,9 @@
 	yy_load_buffer_state( );
 }
 
+/* %if-c++-only */
+/* %endif */
+
 /** Switch to a different input buffer.
  * @param new_buffer The new input buffer.
  * 
@@ -2662,7 +2693,11 @@
 {
     	(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
 	(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
+/* %if-c-only */
 	yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+/* %endif */
+/* %if-c++-only */
+/* %endif */
 	(yy_hold_char) = *(yy_c_buf_p);
 }
 
@@ -2684,7 +2719,7 @@
 	if ( ! b )
 		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
 
-	b->yy_buf_size = size;
+	b->yy_buf_size = (yy_size_t)size;
 
 	/* yy_ch_buf has to be 2 characters longer than the size given because
 	 * we need to put in 2 end-of-buffer characters.
@@ -2700,6 +2735,9 @@
 	return b;
 }
 
+/* %if-c++-only */
+/* %endif */
+
 /** Destroy the buffer.
  * @param b a buffer created with yy_create_buffer()
  * 
@@ -2738,7 +2776,11 @@
     
 	yy_flush_buffer(b );
 
+/* %if-c-only */
 	b->yy_input_file = file;
+/* %endif */
+/* %if-c++-only */
+/* %endif */
 	b->yy_fill_buffer = 1;
 
     /* If b is the current buffer, then yy_init_buffer was _probably_
@@ -2873,7 +2915,7 @@
 		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
 		 * immediate realloc on the next call.
          */
-		num_to_alloc = 1;
+      num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
 		(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
 								(num_to_alloc * sizeof(struct yy_buffer_state*)
 								);
@@ -2890,7 +2932,7 @@
 	if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
 
 		/* Increase the buffer to prepare for a possible push. */
-		int grow_size = 8 /* arbitrary grow size */;
+		yy_size_t grow_size = 8 /* arbitrary grow size */;
 
 		num_to_alloc = (yy_buffer_stack_max) + grow_size;
 		(yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
@@ -3006,7 +3048,7 @@
 /* %if-c-only */
 static void yy_fatal_error (yyconst char* msg )
 {
-    	(void) fprintf( stderr, "%s\n", msg );
+			(void) fprintf( stderr, "%s\n", msg );
 	exit( YY_EXIT_FAILURE );
 }
 /* %endif */
@@ -3020,7 +3062,7 @@
 	do \
 		{ \
 		/* Undo effects of setting up yytext. */ \
-        int yyless_macro_arg = (n); \
+        yy_size_t yyless_macro_arg = (n); \
         YY_LESS_LINENO(yyless_macro_arg);\
 		yytext[yyleng] = (yy_hold_char); \
 		(yy_c_buf_p) = yytext + yyless_macro_arg; \
@@ -3082,29 +3124,29 @@
 /* %endif */
 
 /** Set the current line number.
- * @param line_number
+ * @param _line_number line number
  * 
  */
-void yyset_lineno (int  line_number )
+void yyset_lineno (int  _line_number )
 {
     
-    yylineno = line_number;
+    yylineno = _line_number;
 }
 
 /** Set the input stream. This does not discard the current
  * input buffer.
- * @param in_str A readable stream.
+ * @param _in_str A readable stream.
  * 
  * @see yy_switch_to_buffer
  */
-void yyset_in (FILE *  in_str )
+void yyset_in (FILE *  _in_str )
 {
-        yyin = in_str ;
+        yyin = _in_str ;
 }
 
-void yyset_out (FILE *  out_str )
+void yyset_out (FILE *  _out_str )
 {
-        yyout = out_str ;
+        yyout = _out_str ;
 }
 
 int yyget_debug  (void)
@@ -3112,9 +3154,9 @@
         return yy_flex_debug;
 }
 
-void yyset_debug (int  bdebug )
+void yyset_debug (int  _bdebug )
 {
-        yy_flex_debug = bdebug ;
+        yy_flex_debug = _bdebug ;
 }
 
 /* %endif */
@@ -3187,7 +3229,8 @@
 #ifndef yytext_ptr
 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
 {
-	register int i;
+		
+	int i;
 	for ( i = 0; i < n; ++i )
 		s1[i] = s2[i];
 }
@@ -3196,7 +3239,7 @@
 #ifdef YY_NEED_STRLEN
 static int yy_flex_strlen (yyconst char * s )
 {
-	register int n;
+	int n;
 	for ( n = 0; s[n]; ++n )
 		;
 
@@ -3206,11 +3249,12 @@
 
 void *yyalloc (yy_size_t  size )
 {
-	return (void *) malloc( size );
+			return (void *) malloc( size );
 }
 
 void *yyrealloc  (void * ptr, yy_size_t  size )
 {
+		
 	/* The cast to (char *) in the following accommodates both
 	 * implementations that use char* generic pointers, and those
 	 * that use void* generic pointers.  It works with the latter
@@ -3223,7 +3267,7 @@
 
 void yyfree (void * ptr )
 {
-	free( (char *) ptr );	/* see yyrealloc() for (char *) cast */
+			free( (char *) ptr );	/* see yyrealloc() for (char *) cast */
 }
 
 /* %if-tables-serialization definitions */

Deleted: trunk/Build/source/utils/asymptote/libatomic_ops-7.4.2.tar.gz
===================================================================
(Binary files differ)

Added: trunk/Build/source/utils/asymptote/libatomic_ops-7.4.4.tar.gz
===================================================================
(Binary files differ)

Index: trunk/Build/source/utils/asymptote/libatomic_ops-7.4.4.tar.gz
===================================================================
--- trunk/Build/source/utils/asymptote/libatomic_ops-7.4.4.tar.gz	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/libatomic_ops-7.4.4.tar.gz	2017-03-07 18:10:02 UTC (rev 43422)

Property changes on: trunk/Build/source/utils/asymptote/libatomic_ops-7.4.4.tar.gz
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Modified: trunk/Build/source/utils/asymptote/patches/README
===================================================================
--- trunk/Build/source/utils/asymptote/patches/README	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/patches/README	2017-03-07 18:10:02 UTC (rev 43422)
@@ -14,6 +14,8 @@
 The file gc-7.0nomem.patch avoids segmentation faults with gc-7.0 on
 out-of-memory errors.
 
+The file cygwin_glu.patch adds missing GLU 1.3 declarations to w32api/GL/glu.h.
+
 The file fixmem.reg patches the Microsoft Windows registry so that the
 cygwin1.dll library can allocate more than 384MB. It is applied
 automatically by the Asymptote setup.exe file but may also be applied manually:

Modified: trunk/Build/source/utils/asymptote/picture.cc
===================================================================
--- trunk/Build/source/utils/asymptote/picture.cc	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/picture.cc	2017-03-07 18:10:02 UTC (rev 43422)
@@ -14,6 +14,7 @@
 #include "drawverbatim.h"
 #include "drawlabel.h"
 #include "drawlayer.h"
+#include "drawsurface.h"
 
 using std::ifstream;
 using std::ofstream;
@@ -45,6 +46,8 @@
 
 namespace camp {
 
+extern void draw();
+
 bool isIdTransform3(const double* t)
 {
   return (t == NULL || (t[0]==1 && t[1]==0 && t[2]==0 && t[3]==0 &&
@@ -109,30 +112,6 @@
   }
 }
   
-void boundstriples(double& x, double& y, double& z, double& X, double& Y,
-                   double& Z, size_t n, const triple* v)
-{
-  if(n == 0 || v == NULL)
-    return;
-
-  X=x=v[0].getx();
-  Y=y=v[0].gety();
-  Z=z=v[0].getz();
-    
-  for(size_t i=1; i < n; ++i) {
-    const triple vi=v[i];
-    const double vx=vi.getx();
-    x=min(x,vx);
-    X=max(X,vx);
-    const double vy=vi.gety();
-    y=min(y,vy);
-    Y=max(Y,vy);
-    const double vz=vi.getz();
-    z=min(z,vz);
-    Z=max(Z,vz);
-  }
-}
-
 double xratio(const triple& v) {return v.getx()/v.getz();}
 double yratio(const triple& v) {return v.gety()/v.getz();}
   
@@ -789,7 +768,8 @@
   bool pdf=settings::pdf(texengine);
   
   bool standardout=Prefix == "-";
-  string prefix=standardout ? standardprefix : Prefix;
+  string prefix=standardout ? standardprefix : stripExt(Prefix);
+
   string preformat=nativeformat();
   string outputformat=format.empty() ? defaultformat() : format;
   bool epsformat=outputformat == "eps";
@@ -1080,6 +1060,9 @@
     assert(*p);
     (*p)->render(nurb,size2,Min,Max,perspective,lighton,transparent);
   }
+#ifdef HAVE_GL
+  drawBezierPatch::S.draw();
+#endif  
 }
   
 struct Communicate : public gc {

Modified: trunk/Build/source/utils/asymptote/revision.cc
===================================================================
--- trunk/Build/source/utils/asymptote/revision.cc	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/revision.cc	2017-03-07 18:10:02 UTC (rev 43422)
@@ -1 +1 @@
-const char *REVISION="2.38";
+const char *REVISION="2.40";

Modified: trunk/Build/source/utils/asymptote/runarray.cc
===================================================================
--- trunk/Build/source/utils/asymptote/runarray.cc	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/runarray.cc	2017-03-07 18:10:02 UTC (rev 43422)
@@ -2135,6 +2135,7 @@
     utils::deleteAlign(f);
   }
 #else
+  unused(a);
   unused(&sign);
   array *c=new array(0);
   error("Please install fftw3, run ./configure, and recompile");
@@ -2142,12 +2143,12 @@
   {Stack->push<pairarray*>(c); return;}
 }
 
-#line 1800 "runarray.in"
+#line 1801 "runarray.in"
 // Intarray2* triangulate(pairarray *z);
 void gen_runarray67(stack *Stack)
 {
   pairarray * z=vm::pop<pairarray *>(Stack);
-#line 1801 "runarray.in"
+#line 1802 "runarray.in"
   size_t nv=checkArray(z);
 // Call robust version of Gilles Dumoulin's port of Paul Bourke's
 // triangulation code.
@@ -2181,12 +2182,12 @@
   {Stack->push<Intarray2*>(t); return;}
 }
 
-#line 1835 "runarray.in"
+#line 1836 "runarray.in"
 // real norm(realarray *a);
 void gen_runarray68(stack *Stack)
 {
   realarray * a=vm::pop<realarray *>(Stack);
-#line 1836 "runarray.in"
+#line 1837 "runarray.in"
   size_t n=checkArray(a);
   real M=0.0;
   for(size_t i=0; i < n; ++i) {
@@ -2196,12 +2197,12 @@
   {Stack->push<real>(M); return;}
 }
 
-#line 1846 "runarray.in"
+#line 1847 "runarray.in"
 // real norm(realarray2 *a);
 void gen_runarray69(stack *Stack)
 {
   realarray2 * a=vm::pop<realarray2 *>(Stack);
-#line 1847 "runarray.in"
+#line 1848 "runarray.in"
   size_t n=checkArray(a);
   real M=0.0;
   for(size_t i=0; i < n; ++i) {
@@ -2215,12 +2216,12 @@
   {Stack->push<real>(M); return;}
 }
 
-#line 1861 "runarray.in"
+#line 1862 "runarray.in"
 // real norm(triplearray2 *a);
 void gen_runarray70(stack *Stack)
 {
   triplearray2 * a=vm::pop<triplearray2 *>(Stack);
-#line 1862 "runarray.in"
+#line 1863 "runarray.in"
   size_t n=checkArray(a);
   real M=0.0;
   for(size_t i=0; i < n; ++i) {
@@ -2234,12 +2235,12 @@
   {Stack->push<real>(sqrt(M)); return;}
 }
 
-#line 1876 "runarray.in"
+#line 1877 "runarray.in"
 // real change2(triplearray2 *a);
 void gen_runarray71(stack *Stack)
 {
   triplearray2 * a=vm::pop<triplearray2 *>(Stack);
-#line 1877 "runarray.in"
+#line 1878 "runarray.in"
   size_t n=checkArray(a);
   if(n == 0) {Stack->push<real>(0.0); return;}
   
@@ -2260,13 +2261,13 @@
   {Stack->push<real>(M); return;}
 }
 
-#line 1898 "runarray.in"
+#line 1899 "runarray.in"
 // triple minbezier(triplearray2 *P, triple b);
 void gen_runarray72(stack *Stack)
 {
   triple b=vm::pop<triple>(Stack);
   triplearray2 * P=vm::pop<triplearray2 *>(Stack);
-#line 1899 "runarray.in"
+#line 1900 "runarray.in"
   size_t N;
   real *A=copyTripleArray2Components(P,N);
   bound_double *B=bounddouble(N);
@@ -2277,13 +2278,13 @@
   {Stack->push<triple>(b); return;}
 }
 
-#line 1910 "runarray.in"
+#line 1911 "runarray.in"
 // triple maxbezier(triplearray2 *P, triple b);
 void gen_runarray73(stack *Stack)
 {
   triple b=vm::pop<triple>(Stack);
   triplearray2 * P=vm::pop<triplearray2 *>(Stack);
-#line 1911 "runarray.in"
+#line 1912 "runarray.in"
   size_t N;
   real *A=copyTripleArray2Components(P,N);
   bound_double *B=bounddouble(N);
@@ -2294,13 +2295,13 @@
   {Stack->push<triple>(b); return;}
 }
 
-#line 1922 "runarray.in"
+#line 1923 "runarray.in"
 // pair minratio(triplearray2 *P, pair b);
 void gen_runarray74(stack *Stack)
 {
   pair b=vm::pop<pair>(Stack);
   triplearray2 * P=vm::pop<triplearray2 *>(Stack);
-#line 1923 "runarray.in"
+#line 1924 "runarray.in"
   size_t N;
   triple *A=copyTripleArray2C(P,N);
   real fuzz=sqrtFuzz*norm(A,N);
@@ -2311,13 +2312,13 @@
   {Stack->push<pair>(b); return;}
 }
 
-#line 1934 "runarray.in"
+#line 1935 "runarray.in"
 // pair maxratio(triplearray2 *P, pair b);
 void gen_runarray75(stack *Stack)
 {
   pair b=vm::pop<pair>(Stack);
   triplearray2 * P=vm::pop<triplearray2 *>(Stack);
-#line 1935 "runarray.in"
+#line 1936 "runarray.in"
   size_t N;
   triple *A=copyTripleArray2C(P,N);
   bound_triple *B=boundtriple(N);
@@ -2328,11 +2329,11 @@
   {Stack->push<pair>(b); return;}
 }
 
-#line 1946 "runarray.in"
+#line 1947 "runarray.in"
 // realarray* _projection();
 void gen_runarray76(stack *Stack)
 {
-#line 1947 "runarray.in"
+#line 1948 "runarray.in"
 #ifdef HAVE_GL
   array *a=new array(14);
   gl::projection P=gl::camera();
@@ -2503,25 +2504,25 @@
   addFunc(ve, run::gen_runarray65, 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 1770 "runarray.in"
   addFunc(ve, run::gen_runarray66, pairArray(), SYM(fft), formal(pairArray(), SYM(a), false, false), formal(primInt(), SYM(sign), true, false));
-#line 1800 "runarray.in"
+#line 1801 "runarray.in"
   addFunc(ve, run::gen_runarray67, IntArray2(), SYM(triangulate), formal(pairArray(), SYM(z), false, false));
-#line 1835 "runarray.in"
+#line 1836 "runarray.in"
   addFunc(ve, run::gen_runarray68, primReal(), SYM(norm), formal(realArray(), SYM(a), false, false));
-#line 1846 "runarray.in"
+#line 1847 "runarray.in"
   addFunc(ve, run::gen_runarray69, primReal(), SYM(norm), formal(realArray2(), SYM(a), false, false));
-#line 1861 "runarray.in"
+#line 1862 "runarray.in"
   addFunc(ve, run::gen_runarray70, primReal(), SYM(norm), formal(tripleArray2(), SYM(a), false, false));
-#line 1876 "runarray.in"
+#line 1877 "runarray.in"
   addFunc(ve, run::gen_runarray71, primReal(), SYM(change2), formal(tripleArray2(), SYM(a), false, false));
-#line 1898 "runarray.in"
+#line 1899 "runarray.in"
   addFunc(ve, run::gen_runarray72, primTriple(), SYM(minbezier), formal(tripleArray2(), SYM(p), false, false), formal(primTriple(), SYM(b), false, false));
-#line 1910 "runarray.in"
+#line 1911 "runarray.in"
   addFunc(ve, run::gen_runarray73, primTriple(), SYM(maxbezier), formal(tripleArray2(), SYM(p), false, false), formal(primTriple(), SYM(b), false, false));
-#line 1922 "runarray.in"
+#line 1923 "runarray.in"
   addFunc(ve, run::gen_runarray74, primPair(), SYM(minratio), formal(tripleArray2(), SYM(p), false, false), formal(primPair(), SYM(b), false, false));
-#line 1934 "runarray.in"
+#line 1935 "runarray.in"
   addFunc(ve, run::gen_runarray75, primPair(), SYM(maxratio), formal(tripleArray2(), SYM(p), false, false), formal(primPair(), SYM(b), false, false));
-#line 1946 "runarray.in"
+#line 1947 "runarray.in"
   addFunc(ve, run::gen_runarray76, realArray(), SYM(_projection));
 }
 

Modified: trunk/Build/source/utils/asymptote/runarray.in
===================================================================
--- trunk/Build/source/utils/asymptote/runarray.in	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/runarray.in	2017-03-07 18:10:02 UTC (rev 43422)
@@ -1790,6 +1790,7 @@
     utils::deleteAlign(f);
   }
 #else
+  unused(a);
   unused(&sign);
   array *c=new array(0);
   error("Please install fftw3, run ./configure, and recompile");

Modified: trunk/Build/source/utils/asymptote/runlabel.cc
===================================================================
--- trunk/Build/source/utils/asymptote/runlabel.cc	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/runlabel.cc	2017-03-07 18:10:02 UTC (rev 43422)
@@ -335,7 +335,8 @@
   string dviname=auxname(prefix,"dvi");
   bbox b;
   string texengine=getSetting<string>("tex");
-  bool xe=settings::xe(texengine) || settings::context(texengine);
+  bool xe=settings::xe(texengine) || settings::lua(texengine) ||
+          settings::context(texengine);
   texfile tex(texname,b,true);
   tex.miniprologue();
   
@@ -467,13 +468,13 @@
     readpath(psname,keep,false,0.12,-1.0)); return;}
 }
 
-#line 395 "runlabel.in"
+#line 396 "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 396 "runlabel.in"
+#line 397 "runlabel.in"
   size_t n=checkArrays(s,p);
   if(n == 0) {Stack->push<patharray2*>(new array(0)); return;}
   
@@ -546,13 +547,13 @@
   {Stack->push<patharray2*>(readpath(psname,keep,false,0.1)); return;}
 }
 
-#line 469 "runlabel.in"
+#line 470 "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 470 "runlabel.in"
+#line 471 "runlabel.in"
   array *P=new array(0);
   if(g.size() == 0) {Stack->push<patharray*>(P); return;}
   
@@ -590,9 +591,9 @@
   addFunc(ve, run::gen_runlabel2, realArray(), SYM(texsize), formal(primString(), SYM(s), false, false), formal(primPen(), SYM(p), true, false));
 #line 252 "runlabel.in"
   addFunc(ve, run::gen_runlabel3, pathArray2() , SYM(_texpath), formal(stringArray() , SYM(s), false, false), formal(penArray() , SYM(p), false, false));
-#line 395 "runlabel.in"
+#line 396 "runlabel.in"
   addFunc(ve, run::gen_runlabel4, pathArray2() , SYM(textpath), formal(stringArray() , SYM(s), false, false), formal(penArray() , SYM(p), false, false));
-#line 469 "runlabel.in"
+#line 470 "runlabel.in"
   addFunc(ve, run::gen_runlabel5, pathArray() , SYM(_strokepath), formal(primPath(), SYM(g), false, false), formal(primPen(), SYM(p), true, false));
 }
 

Modified: trunk/Build/source/utils/asymptote/runlabel.in
===================================================================
--- trunk/Build/source/utils/asymptote/runlabel.in	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/runlabel.in	2017-03-07 18:10:02 UTC (rev 43422)
@@ -260,7 +260,8 @@
   string dviname=auxname(prefix,"dvi");
   bbox b;
   string texengine=getSetting<string>("tex");
-  bool xe=settings::xe(texengine) || settings::context(texengine);
+  bool xe=settings::xe(texengine) || settings::lua(texengine) ||
+          settings::context(texengine);
   texfile tex(texname,b,true);
   tex.miniprologue();
   

Modified: trunk/Build/source/utils/asymptote/runmath.cc
===================================================================
--- trunk/Build/source/utils/asymptote/runmath.cc	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/runmath.cc	2017-03-07 18:10:02 UTC (rev 43422)
@@ -63,9 +63,15 @@
 

 #line 12 "runmath.in"
 #include <inttypes.h>
+
 #include "mathop.h"
 #include "path.h"
 
+#ifdef __CYGWIN__
+extern "C" double yn(int, double);
+extern "C" double jn(int, double);
+#endif
+
 using namespace camp;
 
 typedef array realarray;
@@ -131,233 +137,233 @@
 
 #endif
 namespace run {
-#line 75 "runmath.in"
+#line 81 "runmath.in"
 // real ^(real x, Int y);
 void gen_runmath0(stack *Stack)
 {
   Int y=vm::pop<Int>(Stack);
   real x=vm::pop<real>(Stack);
-#line 76 "runmath.in"
+#line 82 "runmath.in"
   {Stack->push<real>(pow(x,y)); return;}
 }
 
-#line 80 "runmath.in"
+#line 86 "runmath.in"
 // pair ^(pair z, Int y);
 void gen_runmath1(stack *Stack)
 {
   Int y=vm::pop<Int>(Stack);
   pair z=vm::pop<pair>(Stack);
-#line 81 "runmath.in"
+#line 87 "runmath.in"
   {Stack->push<pair>(pow(z,y)); return;}
 }
 
-#line 85 "runmath.in"
+#line 91 "runmath.in"
 // Int quotient(Int x, Int y);
 void gen_runmath2(stack *Stack)
 {
   Int y=vm::pop<Int>(Stack);
   Int x=vm::pop<Int>(Stack);
-#line 86 "runmath.in" 
+#line 92 "runmath.in" 
   {Stack->push<Int>(quotient<Int>()(x,y)); return;}
 }
 
-#line 90 "runmath.in"
+#line 96 "runmath.in"
 // Int abs(Int x);
 void gen_runmath3(stack *Stack)
 {
   Int x=vm::pop<Int>(Stack);
-#line 91 "runmath.in" 
+#line 97 "runmath.in" 
   {Stack->push<Int>(Abs(x)); return;}
 }
 
-#line 95 "runmath.in"
+#line 101 "runmath.in"
 // Int sgn(real x);
 void gen_runmath4(stack *Stack)
 {
   real x=vm::pop<real>(Stack);
-#line 96 "runmath.in" 
+#line 102 "runmath.in" 
   {Stack->push<Int>(sgn(x)); return;}
 }
 
-#line 100 "runmath.in"
+#line 106 "runmath.in"
 // Int rand();
 void gen_runmath5(stack *Stack)
 {
-#line 101 "runmath.in" 
+#line 107 "runmath.in" 
   if(initializeRandom)
     Srand(1);
   {Stack->push<Int>(random()); return;}
 }
 
-#line 107 "runmath.in"
+#line 113 "runmath.in"
 // void srand(Int seed);
 void gen_runmath6(stack *Stack)
 {
   Int seed=vm::pop<Int>(Stack);
-#line 108 "runmath.in" 
+#line 114 "runmath.in" 
   Srand(seed);
 }
 
 // a random number uniformly distributed in the interval [0,1]
-#line 113 "runmath.in"
+#line 119 "runmath.in"
 // real unitrand();
 void gen_runmath7(stack *Stack)
 {
-#line 114 "runmath.in"                         
+#line 120 "runmath.in"                         
   {Stack->push<real>(((real) random())/RANDOM_MAX); return;}
 }
 
-#line 118 "runmath.in"
+#line 124 "runmath.in"
 // Int ceil(real x);
 void gen_runmath8(stack *Stack)
 {
   real x=vm::pop<real>(Stack);
-#line 119 "runmath.in" 
+#line 125 "runmath.in" 
   {Stack->push<Int>(Intcast(ceil(x))); return;}
 }
 
-#line 123 "runmath.in"
+#line 129 "runmath.in"
 // Int floor(real x);
 void gen_runmath9(stack *Stack)
 {
   real x=vm::pop<real>(Stack);
-#line 124 "runmath.in" 
+#line 130 "runmath.in" 
   {Stack->push<Int>(Intcast(floor(x))); return;}
 }
 
-#line 128 "runmath.in"
+#line 134 "runmath.in"
 // Int round(real x);
 void gen_runmath10(stack *Stack)
 {
   real x=vm::pop<real>(Stack);
-#line 129 "runmath.in" 
+#line 135 "runmath.in" 
   if(validInt(x)) {Stack->push<Int>(Round(x)); return;}
   integeroverflow(0);
 }
 
-#line 134 "runmath.in"
+#line 140 "runmath.in"
 // Int Ceil(real x);
 void gen_runmath11(stack *Stack)
 {
   real x=vm::pop<real>(Stack);
-#line 135 "runmath.in" 
+#line 141 "runmath.in" 
   {Stack->push<Int>(Ceil(x)); return;}
 }
 
-#line 139 "runmath.in"
+#line 145 "runmath.in"
 // Int Floor(real x);
 void gen_runmath12(stack *Stack)
 {
   real x=vm::pop<real>(Stack);
-#line 140 "runmath.in" 
+#line 146 "runmath.in" 
   {Stack->push<Int>(Floor(x)); return;}
 }
 
-#line 144 "runmath.in"
+#line 150 "runmath.in"
 // Int Round(real x);
 void gen_runmath13(stack *Stack)
 {
   real x=vm::pop<real>(Stack);
-#line 145 "runmath.in" 
+#line 151 "runmath.in" 
   {Stack->push<Int>(Round(Intcap(x))); return;}
 }
 
-#line 149 "runmath.in"
+#line 155 "runmath.in"
 // real fmod(real x, real y);
 void gen_runmath14(stack *Stack)
 {
   real y=vm::pop<real>(Stack);
   real x=vm::pop<real>(Stack);
-#line 150 "runmath.in"
+#line 156 "runmath.in"
   if (y == 0.0) dividebyzero();
   {Stack->push<real>(fmod(x,y)); return;}
 }
 
-#line 155 "runmath.in"
+#line 161 "runmath.in"
 // real atan2(real y, real x);
 void gen_runmath15(stack *Stack)
 {
   real x=vm::pop<real>(Stack);
   real y=vm::pop<real>(Stack);
-#line 156 "runmath.in" 
+#line 162 "runmath.in" 
   {Stack->push<real>(atan2(y,x)); return;}
 }
 
-#line 160 "runmath.in"
+#line 166 "runmath.in"
 // real hypot(real x, real y);
 void gen_runmath16(stack *Stack)
 {
   real y=vm::pop<real>(Stack);
   real x=vm::pop<real>(Stack);
-#line 161 "runmath.in" 
+#line 167 "runmath.in" 
   {Stack->push<real>(hypot(x,y)); return;}
 }
 
-#line 165 "runmath.in"
+#line 171 "runmath.in"
 // real remainder(real x, real y);
 void gen_runmath17(stack *Stack)
 {
   real y=vm::pop<real>(Stack);
   real x=vm::pop<real>(Stack);
-#line 166 "runmath.in" 
+#line 172 "runmath.in" 
   {Stack->push<real>(remainder(x,y)); return;}
 }
 
-#line 170 "runmath.in"
+#line 176 "runmath.in"
 // real Jn(Int n, real x);
 void gen_runmath18(stack *Stack)
 {
   real x=vm::pop<real>(Stack);
   Int n=vm::pop<Int>(Stack);
-#line 171 "runmath.in"
+#line 177 "runmath.in"
   {Stack->push<real>(jn(n,x)); return;}
 }
 
-#line 175 "runmath.in"
+#line 181 "runmath.in"
 // real Yn(Int n, real x);
 void gen_runmath19(stack *Stack)
 {
   real x=vm::pop<real>(Stack);
   Int n=vm::pop<Int>(Stack);
-#line 176 "runmath.in"
+#line 182 "runmath.in"
   {Stack->push<real>(yn(n,x)); return;}
 }
 
-#line 180 "runmath.in"
+#line 186 "runmath.in"
 // real erf(real x);
 void gen_runmath20(stack *Stack)
 {
   real x=vm::pop<real>(Stack);
-#line 181 "runmath.in"
+#line 187 "runmath.in"
   {Stack->push<real>(erf(x)); return;}
 }
 
-#line 185 "runmath.in"
+#line 191 "runmath.in"
 // real erfc(real x);
 void gen_runmath21(stack *Stack)
 {
   real x=vm::pop<real>(Stack);
-#line 186 "runmath.in"
+#line 192 "runmath.in"
   {Stack->push<real>(erfc(x)); return;}
 }
 
-#line 190 "runmath.in"
+#line 196 "runmath.in"
 // Int factorial(Int n);
 void gen_runmath22(stack *Stack)
 {
   Int n=vm::pop<Int>(Stack);
-#line 191 "runmath.in"
+#line 197 "runmath.in"
   if(n < 0) error(invalidargument);
   {Stack->push<Int>(factorial(n)); return;}
 }
 
-#line 195 "runmath.in"
+#line 201 "runmath.in"
 // Int choose(Int n, Int k);
 void gen_runmath23(stack *Stack)
 {
   Int k=vm::pop<Int>(Stack);
   Int n=vm::pop<Int>(Stack);
-#line 196 "runmath.in"
+#line 202 "runmath.in"
   if(n < 0 || k < 0 || k > n) error(invalidargument);
   Int f=1;
   Int r=n-k;
@@ -368,12 +374,12 @@
   {Stack->push<Int>(f); return;}
 }
 
-#line 206 "runmath.in"
+#line 212 "runmath.in"
 // real gamma(real x);
 void gen_runmath24(stack *Stack)
 {
   real x=vm::pop<real>(Stack);
-#line 207 "runmath.in"
+#line 213 "runmath.in"
 #ifdef HAVE_TGAMMA
   {Stack->push<real>(tgamma(x)); return;}
 #else
@@ -382,7 +388,7 @@
 #endif
 }
 
-#line 216 "runmath.in"
+#line 222 "runmath.in"
 // realarray* quadraticroots(real a, real b, real c);
 void gen_runmath25(stack *Stack)
 {
@@ -389,7 +395,7 @@
   real c=vm::pop<real>(Stack);
   real b=vm::pop<real>(Stack);
   real a=vm::pop<real>(Stack);
-#line 217 "runmath.in"
+#line 223 "runmath.in"
   quadraticroots q(a,b,c);
   array *roots=new array(q.roots);
   if(q.roots >= 1) (*roots)[0]=q.t1;
@@ -397,7 +403,7 @@
   {Stack->push<realarray*>(roots); return;}
 }
 
-#line 225 "runmath.in"
+#line 231 "runmath.in"
 // pairarray* quadraticroots(explicit pair a, explicit pair b, explicit pair c);
 void gen_runmath26(stack *Stack)
 {
@@ -404,7 +410,7 @@
   pair c=vm::pop<pair>(Stack);
   pair b=vm::pop<pair>(Stack);
   pair a=vm::pop<pair>(Stack);
-#line 226 "runmath.in"
+#line 232 "runmath.in"
   Quadraticroots q(a,b,c);
   array *roots=new array(q.roots);
   if(q.roots >= 1) (*roots)[0]=q.z1;
@@ -412,7 +418,7 @@
   {Stack->push<pairarray*>(roots); return;}
 }
 
-#line 234 "runmath.in"
+#line 240 "runmath.in"
 // realarray* cubicroots(real a, real b, real c, real d);
 void gen_runmath27(stack *Stack)
 {
@@ -420,7 +426,7 @@
   real c=vm::pop<real>(Stack);
   real b=vm::pop<real>(Stack);
   real a=vm::pop<real>(Stack);
-#line 235 "runmath.in"
+#line 241 "runmath.in"
   cubicroots q(a,b,c,d);
   array *roots=new array(q.roots);
   if(q.roots >= 1) (*roots)[0]=q.t1;
@@ -431,108 +437,108 @@
 
 
 // Logical operations
-#line 246 "runmath.in"
+#line 252 "runmath.in"
 // bool !(bool b);
 void gen_runmath28(stack *Stack)
 {
   bool b=vm::pop<bool>(Stack);
-#line 247 "runmath.in"
+#line 253 "runmath.in"
   {Stack->push<bool>(!b); return;}
 }
 
-#line 252 "runmath.in"
+#line 258 "runmath.in"
 void boolMemEq(stack *Stack)
 {
   frame * b=vm::pop<frame *>(Stack);
   frame * a=vm::pop<frame *>(Stack);
-#line 253 "runmath.in"
+#line 259 "runmath.in"
   {Stack->push<bool>(a == b); return;}
 }
 
-#line 257 "runmath.in"
+#line 263 "runmath.in"
 void boolMemNeq(stack *Stack)
 {
   frame * b=vm::pop<frame *>(Stack);
   frame * a=vm::pop<frame *>(Stack);
-#line 258 "runmath.in"
+#line 264 "runmath.in"
   {Stack->push<bool>(a != b); return;}
 }
 
-#line 262 "runmath.in"
+#line 268 "runmath.in"
 void boolFuncEq(stack *Stack)
 {
   callable * b=vm::pop<callable *>(Stack);
   callable * a=vm::pop<callable *>(Stack);
-#line 263 "runmath.in"
+#line 269 "runmath.in"
   {Stack->push<bool>(a->compare(b)); return;}
 }
 
-#line 267 "runmath.in"
+#line 273 "runmath.in"
 void boolFuncNeq(stack *Stack)
 {
   callable * b=vm::pop<callable *>(Stack);
   callable * a=vm::pop<callable *>(Stack);
-#line 268 "runmath.in"
+#line 274 "runmath.in"
   {Stack->push<bool>(!(a->compare(b))); return;}
 }
 
 
 // Bit operations
-#line 274 "runmath.in"
+#line 280 "runmath.in"
 // Int AND(Int a, Int b);
 void gen_runmath33(stack *Stack)
 {
   Int b=vm::pop<Int>(Stack);
   Int a=vm::pop<Int>(Stack);
-#line 275 "runmath.in"
+#line 281 "runmath.in"
   {Stack->push<Int>(a & b); return;}
 }
 
-#line 280 "runmath.in"
+#line 286 "runmath.in"
 // Int OR(Int a, Int b);
 void gen_runmath34(stack *Stack)
 {
   Int b=vm::pop<Int>(Stack);
   Int a=vm::pop<Int>(Stack);
-#line 281 "runmath.in"
+#line 287 "runmath.in"
   {Stack->push<Int>(a | b); return;}
 }
 
-#line 285 "runmath.in"
+#line 291 "runmath.in"
 // Int XOR(Int a, Int b);
 void gen_runmath35(stack *Stack)
 {
   Int b=vm::pop<Int>(Stack);
   Int a=vm::pop<Int>(Stack);
-#line 286 "runmath.in"
+#line 292 "runmath.in"
   {Stack->push<Int>(a ^ b); return;}
 }
 
-#line 290 "runmath.in"
+#line 296 "runmath.in"
 // Int NOT(Int a);
 void gen_runmath36(stack *Stack)
 {
   Int a=vm::pop<Int>(Stack);
-#line 291 "runmath.in"
+#line 297 "runmath.in"
   {Stack->push<Int>(~a); return;}
 }
 
-#line 295 "runmath.in"
+#line 301 "runmath.in"
 // Int CLZ(Int a);
 void gen_runmath37(stack *Stack)
 {
   Int a=vm::pop<Int>(Stack);
-#line 296 "runmath.in"
+#line 302 "runmath.in"
   if((uint32_t) a > 0xFFFFFFFF) {Stack->push<Int>(-1); return;}
   {Stack->push<Int>(CLZ((uint32_t) a)); return;}
 }
 
-#line 301 "runmath.in"
+#line 307 "runmath.in"
 // Int CTZ(Int a);
 void gen_runmath38(stack *Stack)
 {
   Int a=vm::pop<Int>(Stack);
-#line 302 "runmath.in"
+#line 308 "runmath.in"
   if((uint32_t) a > 0xFFFFFFFF) {Stack->push<Int>(-1); return;}
 #if __GNUC__
   {Stack->push<Int>(__builtin_ctz(a)); return;}
@@ -553,83 +559,83 @@
 
 void gen_runmath_venv(venv &ve)
 {
-#line 75 "runmath.in"
+#line 81 "runmath.in"
   addFunc(ve, run::gen_runmath0, primReal(), SYM_CARET, formal(primReal(), SYM(x), false, false), formal(primInt(), SYM(y), false, false));
-#line 80 "runmath.in"
+#line 86 "runmath.in"
   addFunc(ve, run::gen_runmath1, primPair(), SYM_CARET, formal(primPair(), SYM(z), false, false), formal(primInt(), SYM(y), false, false));
-#line 85 "runmath.in"
+#line 91 "runmath.in"
   addFunc(ve, run::gen_runmath2, primInt(), SYM(quotient), formal(primInt(), SYM(x), false, false), formal(primInt(), SYM(y), false, false));
-#line 90 "runmath.in"
+#line 96 "runmath.in"
   addFunc(ve, run::gen_runmath3, primInt(), SYM(abs), formal(primInt(), SYM(x), false, false));
-#line 95 "runmath.in"
+#line 101 "runmath.in"
   addFunc(ve, run::gen_runmath4, primInt(), SYM(sgn), formal(primReal(), SYM(x), false, false));
-#line 100 "runmath.in"
+#line 106 "runmath.in"
   addFunc(ve, run::gen_runmath5, primInt(), SYM(rand));
-#line 107 "runmath.in"
+#line 113 "runmath.in"
   addFunc(ve, run::gen_runmath6, primVoid(), SYM(srand), formal(primInt(), SYM(seed), false, false));
-#line 112 "runmath.in"
+#line 118 "runmath.in"
   addFunc(ve, run::gen_runmath7, primReal(), SYM(unitrand));
-#line 118 "runmath.in"
+#line 124 "runmath.in"
   addFunc(ve, run::gen_runmath8, primInt(), SYM(ceil), formal(primReal(), SYM(x), false, false));
-#line 123 "runmath.in"
+#line 129 "runmath.in"
   addFunc(ve, run::gen_runmath9, primInt(), SYM(floor), formal(primReal(), SYM(x), false, false));
-#line 128 "runmath.in"
+#line 134 "runmath.in"
   addFunc(ve, run::gen_runmath10, primInt(), SYM(round), formal(primReal(), SYM(x), false, false));
-#line 134 "runmath.in"
+#line 140 "runmath.in"
   addFunc(ve, run::gen_runmath11, primInt(), SYM(Ceil), formal(primReal(), SYM(x), false, false));
-#line 139 "runmath.in"
+#line 145 "runmath.in"
   addFunc(ve, run::gen_runmath12, primInt(), SYM(Floor), formal(primReal(), SYM(x), false, false));
-#line 144 "runmath.in"
+#line 150 "runmath.in"
   addFunc(ve, run::gen_runmath13, primInt(), SYM(Round), formal(primReal(), SYM(x), false, false));
-#line 149 "runmath.in"
+#line 155 "runmath.in"
   addFunc(ve, run::gen_runmath14, primReal(), SYM(fmod), formal(primReal(), SYM(x), false, false), formal(primReal(), SYM(y), false, false));
-#line 155 "runmath.in"
+#line 161 "runmath.in"
   addFunc(ve, run::gen_runmath15, primReal(), SYM(atan2), formal(primReal(), SYM(y), false, false), formal(primReal(), SYM(x), false, false));
-#line 160 "runmath.in"
+#line 166 "runmath.in"
   addFunc(ve, run::gen_runmath16, primReal(), SYM(hypot), formal(primReal(), SYM(x), false, false), formal(primReal(), SYM(y), false, false));
-#line 165 "runmath.in"
+#line 171 "runmath.in"
   addFunc(ve, run::gen_runmath17, primReal(), SYM(remainder), formal(primReal(), SYM(x), false, false), formal(primReal(), SYM(y), false, false));
-#line 170 "runmath.in"
+#line 176 "runmath.in"
   addFunc(ve, run::gen_runmath18, primReal(), SYM(Jn), formal(primInt(), SYM(n), false, false), formal(primReal(), SYM(x), false, false));
-#line 175 "runmath.in"
+#line 181 "runmath.in"
   addFunc(ve, run::gen_runmath19, primReal(), SYM(Yn), formal(primInt(), SYM(n), false, false), formal(primReal(), SYM(x), false, false));
-#line 180 "runmath.in"
+#line 186 "runmath.in"
   addFunc(ve, run::gen_runmath20, primReal(), SYM(erf), formal(primReal(), SYM(x), false, false));
-#line 185 "runmath.in"
+#line 191 "runmath.in"
   addFunc(ve, run::gen_runmath21, primReal(), SYM(erfc), formal(primReal(), SYM(x), false, false));
-#line 190 "runmath.in"
+#line 196 "runmath.in"
   addFunc(ve, run::gen_runmath22, primInt(), SYM(factorial), formal(primInt(), SYM(n), false, false));
-#line 195 "runmath.in"
+#line 201 "runmath.in"
   addFunc(ve, run::gen_runmath23, primInt(), SYM(choose), formal(primInt(), SYM(n), false, false), formal(primInt(), SYM(k), false, false));
-#line 206 "runmath.in"
+#line 212 "runmath.in"
   addFunc(ve, run::gen_runmath24, primReal(), SYM(gamma), formal(primReal(), SYM(x), false, false));
-#line 216 "runmath.in"
+#line 222 "runmath.in"
   addFunc(ve, run::gen_runmath25, realArray(), SYM(quadraticroots), formal(primReal(), SYM(a), false, false), formal(primReal(), SYM(b), false, false), formal(primReal(), SYM(c), false, false));
-#line 225 "runmath.in"
+#line 231 "runmath.in"
   addFunc(ve, run::gen_runmath26, pairArray(), SYM(quadraticroots), formal(primPair(), SYM(a), false, true), formal(primPair(), SYM(b), false, true), formal(primPair(), SYM(c), false, true));
-#line 234 "runmath.in"
+#line 240 "runmath.in"
   addFunc(ve, run::gen_runmath27, realArray(), SYM(cubicroots), formal(primReal(), SYM(a), false, false), formal(primReal(), SYM(b), false, false), formal(primReal(), SYM(c), false, false), formal(primReal(), SYM(d), false, false));
-#line 244 "runmath.in"
+#line 250 "runmath.in"
   addFunc(ve, run::gen_runmath28, primBoolean(), SYM_LOGNOT, formal(primBoolean(), SYM(b), false, false));
-#line 252 "runmath.in"
+#line 258 "runmath.in"
   REGISTER_BLTIN(run::boolMemEq,"boolMemEq");
-#line 257 "runmath.in"
+#line 263 "runmath.in"
   REGISTER_BLTIN(run::boolMemNeq,"boolMemNeq");
-#line 262 "runmath.in"
+#line 268 "runmath.in"
   REGISTER_BLTIN(run::boolFuncEq,"boolFuncEq");
-#line 267 "runmath.in"
+#line 273 "runmath.in"
   REGISTER_BLTIN(run::boolFuncNeq,"boolFuncNeq");
-#line 272 "runmath.in"
+#line 278 "runmath.in"
   addFunc(ve, run::gen_runmath33, primInt(), SYM(AND), formal(primInt(), SYM(a), false, false), formal(primInt(), SYM(b), false, false));
-#line 280 "runmath.in"
+#line 286 "runmath.in"
   addFunc(ve, run::gen_runmath34, primInt(), SYM(OR), formal(primInt(), SYM(a), false, false), formal(primInt(), SYM(b), false, false));
-#line 285 "runmath.in"
+#line 291 "runmath.in"
   addFunc(ve, run::gen_runmath35, primInt(), SYM(XOR), formal(primInt(), SYM(a), false, false), formal(primInt(), SYM(b), false, false));
-#line 290 "runmath.in"
+#line 296 "runmath.in"
   addFunc(ve, run::gen_runmath36, primInt(), SYM(NOT), formal(primInt(), SYM(a), false, false));
-#line 295 "runmath.in"
+#line 301 "runmath.in"
   addFunc(ve, run::gen_runmath37, primInt(), SYM(CLZ), formal(primInt(), SYM(a), false, false));
-#line 301 "runmath.in"
+#line 307 "runmath.in"
   addFunc(ve, run::gen_runmath38, primInt(), SYM(CTZ), formal(primInt(), SYM(a), false, false));
 }
 

Modified: trunk/Build/source/utils/asymptote/runmath.in
===================================================================
--- trunk/Build/source/utils/asymptote/runmath.in	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/runmath.in	2017-03-07 18:10:02 UTC (rev 43422)
@@ -10,9 +10,15 @@
 pairarray* => pairArray()
 

 #include <inttypes.h>
+
 #include "mathop.h"
 #include "path.h"
 
+#ifdef __CYGWIN__
+extern "C" double yn(int, double);
+extern "C" double jn(int, double);
+#endif
+
 using namespace camp;
 
 typedef array realarray;

Modified: trunk/Build/source/utils/asymptote/runpicture.cc
===================================================================
--- trunk/Build/source/utils/asymptote/runpicture.cc	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/runpicture.cc	2017-03-07 18:10:02 UTC (rev 43422)
@@ -966,13 +966,12 @@
 
 // Bezier patch
 #line 636 "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 draw(picture *f, triplearray2 *P, triple center, bool straight,          penarray *p, real opacity, real shininess, real PRCshininess,          penarray *colors, Int interaction, bool prc=true);
 void gen_runpicture47(stack *Stack)
 {
   bool prc=vm::pop<bool>(Stack,true);
   Int interaction=vm::pop<Int>(Stack);
   penarray * colors=vm::pop<penarray *>(Stack);
-  triple normal=vm::pop<triple>(Stack);
   real PRCshininess=vm::pop<real>(Stack);
   real shininess=vm::pop<real>(Stack);
   real opacity=vm::pop<real>(Stack);
@@ -982,9 +981,9 @@
   triplearray2 * P=vm::pop<triplearray2 *>(Stack);
   picture * f=vm::pop<picture *>(Stack);
 #line 639 "runpicture.in"
-  f->append(new drawSurface(*P,center,straight,*p,opacity,shininess,
-                            PRCshininess,normal,*colors,
-                            (Interaction) intcast(interaction),prc));
+  f->append(new drawBezierPatch(*P,center,straight,*p,opacity,shininess,
+                                PRCshininess,*colors,
+                                (Interaction) intcast(interaction),prc));
 }
 
 // Bezier triangle
@@ -1292,7 +1291,7 @@
 #line 625 "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 635 "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));
+  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(penArray()  , SYM(colors), false, false), formal(primInt(), SYM(interaction), false, false), formal(primBoolean(), SYM(prc), true, false));
 #line 645 "runpicture.in"
   addFunc(ve, run::gen_runpicture48, primVoid(), SYM(drawbeziertriangle), 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(penArray()  , SYM(colors), false, false), formal(primInt(), SYM(interaction), false, false), formal(primBoolean(), SYM(prc), true, false));
 #line 656 "runpicture.in"

Modified: trunk/Build/source/utils/asymptote/runpicture.in
===================================================================
--- trunk/Build/source/utils/asymptote/runpicture.in	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/runpicture.in	2017-03-07 18:10:02 UTC (rev 43422)
@@ -635,11 +635,11 @@
 // Bezier patch
 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)
+          penarray *colors, Int interaction, bool prc=true)
 {
-  f->append(new drawSurface(*P,center,straight,*p,opacity,shininess,
-                            PRCshininess,normal,*colors,
-                            (Interaction) intcast(interaction),prc));
+  f->append(new drawBezierPatch(*P,center,straight,*p,opacity,shininess,
+                                PRCshininess,*colors,
+                                (Interaction) intcast(interaction),prc));
 }
 

 // Bezier triangle

Modified: trunk/Build/source/utils/asymptote/settings.cc
===================================================================
--- trunk/Build/source/utils/asymptote/settings.cc	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/settings.cc	2017-03-07 18:10:02 UTC (rev 43422)
@@ -1466,6 +1466,11 @@
   return texengine == "xelatex";
 }
 
+bool lua(const string& texengine)
+{
+  return texengine == "luatex" || texengine == "lualatex";
+}
+
 bool context(const string& texengine)
 {
   return texengine == "context";
@@ -1474,7 +1479,7 @@
 bool pdf(const string& texengine)
 {
   return texengine == "pdflatex" || texengine == "pdftex" || xe(texengine) ||
-    texengine == "luatex" || texengine == "lualatex" || context(texengine);
+    lua(texengine) || context(texengine);
 }
 
 bool latex(const string& texengine)

Modified: trunk/Build/source/utils/asymptote/settings.h
===================================================================
--- trunk/Build/source/utils/asymptote/settings.h	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/settings.h	2017-03-07 18:10:02 UTC (rev 43422)
@@ -96,6 +96,7 @@
 extern mode_t mask;
   
 bool xe(const string& texengine);
+bool lua(const string& texengine);
 bool pdf(const string& texengine);
 bool latex(const string& texengine);
 bool context(const string& texengine);

Modified: trunk/Build/source/utils/asymptote/texfile.cc
===================================================================
--- trunk/Build/source/utils/asymptote/texfile.cc	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/texfile.cc	2017-03-07 18:10:02 UTC (rev 43422)
@@ -155,7 +155,7 @@
           size_t pos=name.rfind("-");
           if(pos < string::npos) name="\\ASYprefix\\jobname"+name.substr(pos);
         } else {
-          name=pdf ? stripExt(psname) : psname;
+          if(!pdf) name=psname;
           if(stripDir(name) != name)
             quote="\"";
         }

Modified: trunk/Build/source/utils/asymptote/triple.h
===================================================================
--- trunk/Build/source/utils/asymptote/triple.h	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/triple.h	2017-03-07 18:10:02 UTC (rev 43422)
@@ -306,6 +306,57 @@
 double xratio(const triple& v);
 double yratio(const triple& v);
 
+inline void bounds(double& x, double &X, double v)
+{
+  if(v < x) x=v;
+  else if(v > X) X=v;
+}
+  
+inline void boundstriples(double& x, double& y, double& z,
+                          double& X, double& Y, double& Z,
+                          size_t n, const triple* v)
+{
+  X=x=v[0].getx();
+  Y=y=v[0].gety();
+  Z=z=v[0].getz();
+    
+  for(size_t i=1; i < n; ++i) {
+    triple V=v[i];
+    bounds(x,X,V.getx());
+    bounds(y,Y,V.gety());
+    bounds(z,Z,V.getz());
+  }
+}
+
+// return the maximum distance squared of points c0 and c1 from 
+// the respective internal control points of z0--z1.
+inline double Straightness(const triple& z0, const triple& c0,
+                           const triple& c1, const triple& z1)
+{
+  static const double third=1.0/3.0;
+  triple v=third*(z1-z0);
+  return std::max(abs2(c0-v-z0),abs2(z1-v-c1));
+}
+
+// return the maximum perpendicular distance squared of points c0 and c1
+// from z0--z1.
+inline double Distance1(const triple& z0, const triple& c0,
+                        const triple& c1, const triple& z1)
+{
+  triple Z0=c0-z0;
+  triple Q=unit(z1-z0);
+  triple Z1=c1-z0;
+  return std::max(abs2(Z0-dot(Z0,Q)*Q),abs2(Z1-dot(Z1,Q)*Q));
+}
+
+// return the perpendicular distance squared of a point z from the plane
+// through u with unit normal n.
+inline double Distance2(const triple& z, const triple& u, const triple& n)
+{
+  double d=dot(z-u,n);
+  return d*d;
+}
+  
 } //namespace camp
 
 GC_DECLARE_PTRFREE(camp::triple);

Modified: trunk/Build/source/utils/asymptote/util.h
===================================================================
--- trunk/Build/source/utils/asymptote/util.h	2017-03-07 01:05:43 UTC (rev 43421)
+++ trunk/Build/source/utils/asymptote/util.h	2017-03-07 18:10:02 UTC (rev 43422)
@@ -11,6 +11,13 @@
 #include <sys/types.h>
 #include <iostream>
 #include <cstdlib>
+
+#ifdef __CYGWIN__
+extern "C" int sigaddset(sigset_t *set, int signum);
+extern "C" int sigemptyset(sigset_t *set); 
+extern "C" int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact);
+#endif
+
 #include <csignal>
 
 #include "common.h"



More information about the tex-live-commits mailing list