summaryrefslogtreecommitdiff
path: root/Build/source/utils
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-03-14 22:52:10 +0000
committerKarl Berry <karl@freefriends.org>2016-03-14 22:52:10 +0000
commit355bf72b81c6931539dd365430e78ebc10bcd0a2 (patch)
treeff9e855fb9eeb6cbc286d58e6cfe07bdb9cdf4ba /Build/source/utils
parent1cdee1080e0ad8f88624629e00039d9fe89c1b54 (diff)
asy 2.37 sources
git-svn-id: svn://tug.org/texlive/trunk@40025 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils')
-rw-r--r--Build/source/utils/README2
-rw-r--r--Build/source/utils/asymptote/ChangeLog456
-rwxr-xr-xBuild/source/utils/asymptote/GUI/CubicBezier.py11
-rwxr-xr-xBuild/source/utils/asymptote/GUI/UndoRedoStack.py22
-rwxr-xr-xBuild/source/utils/asymptote/GUI/xasy.py11
-rwxr-xr-xBuild/source/utils/asymptote/GUI/xasy2asy.py79
-rwxr-xr-xBuild/source/utils/asymptote/GUI/xasyActions.py6
-rwxr-xr-xBuild/source/utils/asymptote/GUI/xasyBezierEditor.py7
-rwxr-xr-xBuild/source/utils/asymptote/GUI/xasyCodeEditor.py5
-rwxr-xr-xBuild/source/utils/asymptote/GUI/xasyColorPicker.py40
-rwxr-xr-xBuild/source/utils/asymptote/GUI/xasyFile.py54
-rwxr-xr-xBuild/source/utils/asymptote/GUI/xasyGUIIcons.py30
-rwxr-xr-xBuild/source/utils/asymptote/GUI/xasyMainWin.py137
-rwxr-xr-xBuild/source/utils/asymptote/GUI/xasyOptions.py20
-rwxr-xr-xBuild/source/utils/asymptote/GUI/xasyOptionsDialog.py46
-rw-r--r--Build/source/utils/asymptote/Makefile.in5
-rw-r--r--Build/source/utils/asymptote/ReleaseNotes22
-rw-r--r--Build/source/utils/asymptote/arrayop.h7
-rw-r--r--Build/source/utils/asymptote/asy-keywords.el6
-rw-r--r--Build/source/utils/asymptote/asy.list449
-rw-r--r--Build/source/utils/asymptote/asymptote.spec2
-rw-r--r--Build/source/utils/asymptote/base/bezulate.asy2
-rw-r--r--Build/source/utils/asymptote/base/embed.asy11
-rw-r--r--Build/source/utils/asymptote/base/math.asy12
-rw-r--r--Build/source/utils/asymptote/base/plain_strings.asy21
-rw-r--r--Build/source/utils/asymptote/base/smoothcontour3.asy684
-rw-r--r--Build/source/utils/asymptote/base/three_surface.asy144
-rw-r--r--Build/source/utils/asymptote/beziertriangle.cc37
-rw-r--r--Build/source/utils/asymptote/config.guess825
-rw-r--r--Build/source/utils/asymptote/config.sub150
-rwxr-xr-xBuild/source/utils/asymptote/configure18
-rw-r--r--Build/source/utils/asymptote/configure.ac2
-rw-r--r--Build/source/utils/asymptote/doc/CAD.pdfbin67561 -> 66753 bytes
-rw-r--r--Build/source/utils/asymptote/doc/FAQ/asy-faq.info2
-rw-r--r--Build/source/utils/asymptote/doc/TeXShopAndAsymptote.pdfbin31587 -> 32164 bytes
-rw-r--r--Build/source/utils/asymptote/doc/asy-latex.dtx3
-rw-r--r--Build/source/utils/asymptote/doc/asy-latex.pdfbin194467 -> 194740 bytes
-rw-r--r--Build/source/utils/asymptote/doc/asy.12
-rw-r--r--Build/source/utils/asymptote/doc/asyRefCard.pdfbin53664 -> 54949 bytes
-rw-r--r--Build/source/utils/asymptote/doc/asymptote.pdfbin1275936 -> 1288038 bytes
-rw-r--r--Build/source/utils/asymptote/doc/asymptote.sty3
-rw-r--r--Build/source/utils/asymptote/doc/asymptote.texi535
-rw-r--r--Build/source/utils/asymptote/doc/externalprc.tex3
-rw-r--r--Build/source/utils/asymptote/doc/genustwo.asy36
-rw-r--r--Build/source/utils/asymptote/doc/genustwomissing.asy12
-rw-r--r--Build/source/utils/asymptote/doc/latexusage.tex4
-rw-r--r--Build/source/utils/asymptote/doc/png/asymptote.info1158
-rw-r--r--Build/source/utils/asymptote/drawgroup.h3
-rw-r--r--Build/source/utils/asymptote/drawpath.cc6
-rw-r--r--Build/source/utils/asymptote/drawsurface.cc18
-rw-r--r--Build/source/utils/asymptote/fftw++.cc5
-rw-r--r--Build/source/utils/asymptote/fftw++.h63
-rw-r--r--Build/source/utils/asymptote/fileio.h3
-rw-r--r--Build/source/utils/asymptote/glrender.cc2
-rw-r--r--Build/source/utils/asymptote/path.cc14
-rw-r--r--Build/source/utils/asymptote/picture.cc1
-rw-r--r--Build/source/utils/asymptote/revision.cc2
-rw-r--r--Build/source/utils/asymptote/runarray.cc230
-rw-r--r--Build/source/utils/asymptote/runarray.in102
-rw-r--r--Build/source/utils/asymptote/runlabel.cc80
-rw-r--r--Build/source/utils/asymptote/runlabel.in44
-rw-r--r--Build/source/utils/asymptote/runpicture.cc103
-rw-r--r--Build/source/utils/asymptote/runpicture.in1
-rw-r--r--Build/source/utils/asymptote/runstring.cc163
-rw-r--r--Build/source/utils/asymptote/runstring.in43
-rw-r--r--Build/source/utils/asymptote/runtime.cc2
-rw-r--r--Build/source/utils/asymptote/runtime.in2
-rw-r--r--Build/source/utils/asymptote/settings.cc10
-rw-r--r--Build/source/utils/asymptote/stack.cc3
-rw-r--r--Build/source/utils/asymptote/tests/gs/ghostscript.asy4
-rw-r--r--Build/source/utils/asymptote/texfile.cc2
-rw-r--r--Build/source/utils/asymptote/texfile.h7
-rwxr-xr-xBuild/source/utils/asymptote/wce6
73 files changed, 3534 insertions, 2466 deletions
diff --git a/Build/source/utils/README b/Build/source/utils/README
index ff4ead5ad37..134b21f3fec 100644
--- a/Build/source/utils/README
+++ b/Build/source/utils/README
@@ -5,7 +5,7 @@ Extra utilities we (optionally) compile for TeX Live.
See comments in ../texk/README.
-asymptote 2.36 - checked 7feb16
+asymptote 2.37 - checked 14mar16
(this version for dev build testing only, not to be installed)
update to TL from CTAN, to include prebuilt doc.
see http://tug.org/texlive/build.html#asymptote
diff --git a/Build/source/utils/asymptote/ChangeLog b/Build/source/utils/asymptote/ChangeLog
index e6ac881e675..8bc0ad37562 100644
--- a/Build/source/utils/asymptote/ChangeLog
+++ b/Build/source/utils/asymptote/ChangeLog
@@ -1,3 +1,459 @@
+commit 0240be5ed61de2394cc5cc614a9c4b480f2f51d1
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Mar 13 23:31:54 2016 -0600
+
+ Add missing variable.
+
+commit a33a69444b667675706f42653c3620da583e0130
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Mar 13 21:05:19 2016 -0600
+
+ Update diagnostic.
+
+commit 3a8360af8637891ad54a6d756026780286c44ea8
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Mar 13 20:57:00 2016 -0600
+
+ Merge port of xasy to Python3, courtesy of Mojca and Orest.
+
+commit 48e84c5bc8d62b7f06528682e8fd7275828345e6
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Mar 13 20:45:07 2016 -0600
+
+ Add -P arguments to pngalpha ghostscript driver calls.
+
+commit d789c4df72983f70934f702a9ee3ee80fd82b81f
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sat Mar 12 21:59:02 2016 -0700
+
+ Make quiet suppress output unless verbosity > 1.
+
+commit 740c8c1df8127012ff983fe9979a096d0f71e81e
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sat Mar 12 21:26:01 2016 -0700
+
+ Make settings.quiet suppress noninteractive standard output when verbose=0.
+ Add progress function.
+
+commit bcbf941fdd0fa9db5c3b77d7a3477fa358a291ac
+Merge: 97f3b6c ae0af70
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Mar 6 22:33:57 2016 -0700
+
+ Merge branch 'trianglewithnormals'
+
+commit 97f3b6c3958028f16e130af9a76d404b91289a0c
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Mar 6 21:16:03 2016 -0700
+
+ Don't require kpsewhich in make check for TeXLive version.
+
+commit 121bef8befae717eb00bc550a4e94e05b73a9202
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Mar 6 21:12:26 2016 -0700
+
+ Look for kpsewhich first in the same directory as the asy executable.
+
+commit ae0af708d12981318936697c7c289fe71723dabe
+Merge: 815b738 6fc23e0
+Author: Charles Staats III <charles.staats.iii@gmail.com>
+Date: Sun Mar 6 20:07:38 2016 -0800
+
+ Merge branch 'master' into trianglewithnormals
+
+commit 815b7381ec98e7bd8fff428145c4ff37f4c6ef42
+Author: Charles Staats III <charles.staats.iii@gmail.com>
+Date: Sun Mar 6 20:04:10 2016 -0800
+
+ Revise comments on smoothcontour3 for bezier triangles.
+
+commit 6fc23e01ac254e6e016fa2ce37f190a9b3c027c7
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Mar 6 20:07:15 2016 -0700
+
+ Improve script portability.
+
+commit ab000e7a922e6f21dc6aabad21e6dfed864acf2b
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Mar 6 18:34:57 2016 -0700
+
+ Move compile-time check for epsdriver into environment variable
+ ASYMPTOTE_EPSDRIVER.
+
+commit 3cf0adc19ab1ca13ca70dc6e700c6386ccf73e37
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Mar 6 14:20:31 2016 -0700
+
+ Add EPSWRITE compiler flag to support ghostscript versions older than 9.14.
+
+commit cbb7e37c1a8ed7168bdfb61b5c48ef775b9dd668
+Merge: 9004183 6c1ad05
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Mar 6 10:04:21 2016 -0700
+
+ Merge branch 'trianglewithnormals'
+
+commit 900418390224e6f56ed33a5df55c0b47e418e1f0
+Merge: ce19f61 9a36fe8
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Mar 6 09:45:19 2016 -0700
+
+ Merge branch 'improverootfinder'
+
+commit ce19f613e620c3fd953417301a7d9fd1e4db3a70
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Mar 6 09:40:49 2016 -0700
+
+ Port xasy integer division to Python 3.
+
+commit dc788693ea22f5a6bd990a21b357af605f179e27
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Mar 6 09:36:23 2016 -0700
+
+ Port xasy color handling to Python 3.
+
+commit c16b1d2a6e320e197d41a8df8698e49810737473
+Author: John Bowman <bowman@ualberta.ca>
+Date: Fri Mar 4 23:15:13 2016 -0700
+
+ Change CFLAGS to CXXFLAGS in documentation.
+
+commit 9a36fe85944c15cbb67c5f1cf777b0bf7e5bd581
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Feb 28 23:53:11 2016 -0700
+
+ Remove default values of fa and fb from _findroot; force margin to (b-a)*1e-3.
+
+commit 6c1ad05b445578368eec7d54842f5ae46cac1213
+Author: Charles Staats III <charles.staats.iii@gmail.com>
+Date: Sun Feb 28 22:17:37 2016 -0800
+
+ Correct spacing in smoothcontour3.asy. Replace tabs by spaces for consistent spacing across editors.
+
+commit 4502339c241f74eaf2f02c9315c378f90b44e6a3
+Author: Charles Staats III <charles.staats.iii@gmail.com>
+Date: Sun Feb 28 22:03:59 2016 -0800
+
+ Document usetriangles option for smoothcontour3.
+
+commit 29832acfab74cadeb749926b2db3d3ac5f965515
+Author: Charles Staats III <charles.staats.iii@gmail.com>
+Date: Sun Feb 28 21:55:51 2016 -0800
+
+ Add smoothcontour3 option to use bezier triangles (default) or not.
+
+commit 50b1420e4d9e46982ab124f7319b30bc7e57b358
+Author: Charles Staats III <charles.staats.iii@gmail.com>
+Date: Sun Feb 28 20:09:07 2016 -0800
+
+ Simplify reversing cyclic array.
+
+commit becf736defe152799976999c6ede67e40e5975fd
+Author: Charles Staats III <charles.staats.iii@gmail.com>
+Date: Sun Feb 28 19:27:19 2016 -0800
+
+ Change adaptive rendering constant for bezier triangles.
+
+commit fc81a2ed70019cca10eed52b2caa3bff713d0d7f
+Merge: cd9f875 e78de7f
+Author: Charles Staats III <charles.staats.iii@gmail.com>
+Date: Sun Feb 28 19:23:17 2016 -0800
+
+ Merge remote-tracking branch 'origin' into trianglewithnormals
+
+commit 184bea914c95dd92c32380bce6001916607d2482
+Author: John Bowman <bowman@ualberta.ca>
+Date: Wed Feb 24 20:56:21 2016 -0700
+
+ Move rootfinder interface to math.asy.
+
+commit e92e7571479c2024522a882b3ee95a99120c09a5
+Author: John Bowman <bowman@ualberta.ca>
+Date: Wed Feb 24 20:40:10 2016 -0700
+
+ Reorder tolerance parameter as in original asy code and allow user control of default value.
+
+commit e435513b1a4faa461e3ce4387461653374eecf7a
+Author: John Bowman <bowman@ualberta.ca>
+Date: Tue Feb 23 23:20:56 2016 -0700
+
+ Port findroot to C++ code, but reorder tolerance parameter to end of
+ signature, to agree with argument order in calls from smoothcontour3.
+
+commit e78de7f99a7b94876805b6eea9b15c7a0c164c96
+Author: John Bowman <bowman@ualberta.ca>
+Date: Tue Feb 23 20:40:48 2016 -0700
+
+ Implement minor rendering optimization.
+
+commit 87c6ee109e9a615a51ebc76d4ea92b959ea4c20d
+Author: John Bowman <bowman@ualberta.ca>
+Date: Tue Feb 23 19:00:20 2016 -0700
+
+ Fix bug #219 Asymptote forks in an uncontrolled way.
+
+commit cd9f8755715b8ce7e5b239ecd77fdff4d336411a
+Merge: e6454cb 344698e
+Author: John Bowman <bowman@ualberta.ca>
+Date: Tue Feb 16 17:41:59 2016 -0700
+
+ Merge branch 'master' into trianglewithnormals
+
+commit 344698e2cf2f16379139e8473c4a0970433689e5
+Author: John Bowman <bowman@ualberta.ca>
+Date: Tue Feb 16 17:41:21 2016 -0700
+
+ Fix epsilon.
+
+commit e6454cb2370e412699d467f451519ab89efd3f40
+Merge: e5394af 75ce996
+Author: John Bowman <bowman@ualberta.ca>
+Date: Tue Feb 16 17:29:10 2016 -0700
+
+ Merge branch 'master' into trianglewithnormals
+
+commit c3099c59cc61721fa9d08e1cd7ab22ddb0026bb5
+Author: John Bowman <bowman@ualberta.ca>
+Date: Tue Feb 16 09:32:10 2016 -0700
+
+ Fix epsilon.
+
+commit e5394afc350161459e7b78c28fd025f390a2f60e
+Author: Charles Staats III <charles.staats.iii@gmail.com>
+Date: Sun Feb 14 22:16:08 2016 -0800
+
+ Fix overlapedges for triangular patches.
+
+commit aa8a94e605e42c9742b880c50a62cf6432309d32
+Author: Charles Staats III <charles.staats.iii@gmail.com>
+Date: Sun Feb 14 22:10:49 2016 -0800
+
+ Subdivide triangles with bad normals.
+
+commit f4f03e779e9e0d7143c98ca7a4f82e41ec3c2d6e
+Author: Charles Staats III <charles.staats.iii@gmail.com>
+Date: Sun Feb 14 21:57:12 2016 -0800
+
+ Make array reversal consistent with path reversal
+
+commit 58852de50bba1ee05eef4c7cd1042131006e711d
+Author: Charles Staats III <charles.staats.iii@gmail.com>
+Date: Sun Feb 14 21:09:17 2016 -0800
+
+ Make the orientation of the patches consistent.
+
+commit 652f8bbc027dd78d1d2be0f5cb8af24496fea2e5
+Author: Charles Staats III <charles.staats.iii@gmail.com>
+Date: Sun Feb 14 17:09:01 2016 -0800
+
+ Use quadratic interpolation for rootfinder
+
+commit 75ce99693e881bc87a25ee1a57a90e2c8a88c95c
+Author: John Bowman <bowman@ualberta.ca>
+Date: Fri Feb 12 16:13:26 2016 -0700
+
+ Fix bug #217 Reversion of one point guides.
+
+commit 213d56942fe5b9ef605e0ccf545527833319348d
+Author: John Bowman <bowman@ualberta.ca>
+Date: Fri Feb 12 14:43:37 2016 -0700
+
+ Fix bug #218 Core dump in subpath routine.
+
+commit b7bcfe1c90e491e8fc284ea8e746af85495fb087
+Author: John Bowman <bowman@ualberta.ca>
+Date: Wed Feb 10 01:29:02 2016 -0700
+
+ Fix str().c_str() bugs.
+
+commit 2aed7cc04bb0ab928aa6a7086b977dc90c078a5e
+Author: John Bowman <bowman@ualberta.ca>
+Date: Tue Feb 9 22:27:30 2016 -0700
+
+ Move \ASYdimen to asymptote.sty (version 1.30 now required).
+ Remove support for obsolete media 9 package from 2013.
+
+commit 8d0eef70c60ce380f8919f8aa8d45467f2d9c3bd
+Author: John Bowman <bowman@ualberta.ca>
+Date: Tue Feb 9 18:12:40 2016 -0700
+
+ Increase maxrefinements in bezulate.
+
+commit 25617a38c05e1cf7e5c0322c3cdb0b53c5f3a909
+Author: John Bowman <bowman@ualberta.ca>
+Date: Tue Feb 9 16:50:13 2016 -0700
+
+ Fix bug #215 Line adjustment won't work with scaled pens.
+
+commit 9ee82946a46323ca939a6ae10d666231486127df
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Feb 7 23:19:06 2016 -0700
+
+ Document in the manual that example file names link to the PDF output whereas
+ their .asy extensions link to the corresponding Asymptote code.
+
+commit 760fddca0f402acc49894b8cc81056b4b97759be
+Author: Charles Staats III <charles.staats.iii@gmail.com>
+Date: Sun Feb 7 17:06:50 2016 -0800
+
+ Non compiling: start maketriangle function.
+
+commit 57d9d51c1bc79c2efe55087e291c35f51790b842
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Feb 7 17:00:05 2016 -0700
+
+ Update copyright date.
+
+commit 691e8ef9241001b18dd3e3ad6f667f73da76c41e
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Feb 7 16:57:54 2016 -0700
+
+ Fix links in documentation.
+
+commit 2ad4f66eda6e71aaf24b15e67c5a1eb5c15332ae
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Feb 7 16:46:58 2016 -0700
+
+ Fix links in documentation.
+
+commit 7c33a39dbf1b41e29f251a81778019f722a38497
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Feb 7 16:21:01 2016 -0700
+
+ Add links to documentation examples.
+
+commit d422d99bd9d22bfa57013fdf8de5d33aa637a71e
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Feb 7 11:12:47 2016 -0700
+
+ Fix bug #214 Minor bug in 'format'.
+
+commit 4c3480c2e5ae04e644382ceb9fa871206bcfee51
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sat Feb 6 23:19:05 2016 -0700
+
+ Support --disable-gl again.
+
+commit afbd271363fde72afe17f54d5c5a408d24931437
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sat Feb 6 17:06:42 2016 -0700
+
+ Improve comments in beziertriangle.cc.
+
+commit 5569c8d4fd3d84f121362aa18966eb8114cbe88d
+Author: John Bowman <bowman@ualberta.ca>
+Date: Fri Feb 5 17:47:36 2016 -0700
+
+ Simplify code.
+
+commit b2d975013dfec4c2163b66286eacb8e6b9a71b56
+Merge: a2dc301 ce719eb
+Author: Charles Staats III <charles.staats.iii@gmail.com>
+Date: Fri Feb 5 08:34:14 2016 -0800
+
+ Merge branch 'trianglewithnormals' of github.com:vectorgraphics/asymptote into trianglewithnormals
+
+commit ce719ebe712ae40a4fd31dc5e59b6c1f382cdfca
+Merge: 30d63a3 9b9e8f5
+Author: John Bowman <bowman@ualberta.ca>
+Date: Thu Feb 4 23:18:11 2016 -0700
+
+ Merge branch 'master' into trianglewithnormals
+
+commit 9b9e8f579e58ce016754626275d9c03b1dc1cf11
+Author: John Bowman <bowman@ualberta.ca>
+Date: Thu Feb 4 23:05:28 2016 -0700
+
+ Simplify code.
+
+commit ab2042f994b6dd71c204ddaa59124b7f3644ee58
+Merge: 5d97e7d a873617
+Author: John Bowman <bowman@ualberta.ca>
+Date: Thu Feb 4 23:03:06 2016 -0700
+
+ Merge branch 'master' of github.com:vectorgraphics/asymptote
+
+commit 5d97e7d70965fefa3814f09911be2e1a74cf1979
+Author: John Bowman <bowman@ualberta.ca>
+Date: Thu Feb 4 22:31:31 2016 -0700
+
+ Handle degeneracy in Bezier triangle normal calculation for render=0.
+
+commit a2dc30108b3979adb818333771fed8e278bd697c
+Author: Charles Staats III <charles.staats.iii@gmail.com>
+Date: Thu Feb 4 21:31:58 2016 -0800
+
+ Amend one comment.
+
+commit 8ec9865cc3fd4bc2cbded6e754ad4670e1920730
+Merge: 6ca1083 a873617
+Author: Charles Staats III <charles.staats.iii@gmail.com>
+Date: Thu Feb 4 21:20:20 2016 -0800
+
+ Merge branch 'master' into trianglewithnormals to incorporate bug fix for meshpen with bezier triangles.
+
+commit 6ca10836bade3c2540ebfbe4dc0c27ff782ad2f8
+Author: Charles Staats III <charles.staats.iii@gmail.com>
+Date: Thu Feb 4 21:15:39 2016 -0800
+
+ Add comments documenting the trianglewithnormals function.
+
+commit b2efab65fb612318202964ae6fb80b50c925d315
+Author: Charles Staats III <charles.staats.iii@gmail.com>
+Date: Thu Feb 4 21:11:31 2016 -0800
+
+ Simpler names for normals in trianglewithnormals parameters.
+
+commit a873617b4e481ea90c2ebce361932212b4c70df1
+Author: Orest Shardt <shardtor@gmail.com>
+Date: Thu Feb 4 16:35:35 2016 -0500
+
+ Fix hex representation of colours
+
+commit 26629e8a350204d9fbd9095e5c59ca4bda35f6d9
+Author: John Bowman <bowman@ualberta.ca>
+Date: Thu Feb 4 13:24:27 2016 -0700
+
+ Fix planar Bezier triangles under render=0.
+
+commit 64e1d1ad3777e898febba132ac0aae152882c52d
+Merge: 03a2310 29806bc
+Author: John Bowman <bowman@ualberta.ca>
+Date: Thu Feb 4 01:37:46 2016 -0700
+
+ Merge branch 'master' of github.com:vectorgraphics/asymptote
+
+commit 03a2310b72610252698115ba3d1ec44b0aba16a5
+Author: John Bowman <bowman@ualberta.ca>
+Date: Thu Feb 4 01:34:24 2016 -0700
+
+ Use git suffix for development tags and no suffix for release tags.
+
+commit 29806bc76d22752c59df49fb776f0a2f935d4331
+Author: John Bowman <bowman@ualberta.ca>
+Date: Thu Feb 4 01:34:24 2016 -0700
+
+ Use git suffix for development tags and no suffix for release tags.
+
+commit 30d63a35b8903e0a7fe45828c62bb4c1a0e0524a
+Author: Charles Staats III <charles.staats.iii@gmail.com>
+Date: Thu Feb 4 00:04:31 2016 -0800
+
+ Modify smoothcontour3 to use bezier triangles when convenient.
+
+commit 48b96a7f01add22951ac01806d22de912f9524bc
+Author: John Bowman <bowman@ualberta.ca>
+Date: Wed Feb 3 16:53:47 2016 -0700
+
+ Add "git" suffix to version number for out-of-git builds to avoid confusion
+ with official releases. Simplify Makefile.
+
+commit 12d4161bd25c0eda0d95a37437ba774b04a1eacb
+Author: John Bowman <bowman@ualberta.ca>
+Date: Wed Feb 3 02:44:53 2016 -0700
+
+ Increment version to 2.37.
+
commit e469422d232659d27a70527ddffc7f106be89698
Author: John Bowman <bowman@ualberta.ca>
Date: Wed Feb 3 01:12:14 2016 -0700
diff --git a/Build/source/utils/asymptote/GUI/CubicBezier.py b/Build/source/utils/asymptote/GUI/CubicBezier.py
index 6455b700a79..2eb62577b0a 100755
--- a/Build/source/utils/asymptote/GUI/CubicBezier.py
+++ b/Build/source/utils/asymptote/GUI/CubicBezier.py
@@ -82,16 +82,19 @@ if __name__ == '__main__':
pointList = makeBezier((-80,0),(-150,40),(150,120),(80,0),0.5)
from timeit import Timer
t = Timer('makeBezier((-80,0),(-40,-40),(40,120),(80,0),1)','from __main__ import makeBezier')
- print pointList
- print len(pointList)
+ print (pointList)
+ print (len(pointList))
iterations = 1000
time = t.timeit(iterations)
- print "%d iterations took %f seconds (%f ms for each)."%(iterations,time,1000.0*time/iterations)
+ print ("{:d} iterations took {:f} seconds ({:f} ms for each).".format(iterations,time,1000.0*time/iterations))
points = []
for point in pointList:
points.append(point[0])
points.append(-point[1])
- from Tkinter import *
+ if sys.version_info >= (3, 0):
+ from tkinter import *
+ else:
+ from Tkinter import *
root = Tk()
canv = Canvas(root,scrollregion=(-100,-100,100,100))
canv.pack()
diff --git a/Build/source/utils/asymptote/GUI/UndoRedoStack.py b/Build/source/utils/asymptote/GUI/UndoRedoStack.py
index f4a247a411d..779d0330a81 100755
--- a/Build/source/utils/asymptote/GUI/UndoRedoStack.py
+++ b/Build/source/utils/asymptote/GUI/UndoRedoStack.py
@@ -13,10 +13,10 @@ class action:
self.act = act
self.inv = inv
def undo(self):
- #print "Undo:",self
+ #print ("Undo:",self)
self.inv()
def redo(self):
- #print "Redo:",self
+ #print ("Redo:",self)
self.act()
def __str__(self):
return "A generic action"
@@ -33,7 +33,7 @@ class actionStack:
def add(self,action):
self.undoStack.append(action)
- #print "Added",action
+ #print ("Added",action)
self.redoStack = []
def undo(self):
@@ -54,13 +54,13 @@ class actionStack:
op.undo()
self.redoStack.append(op)
elif op is endActionGroup:
- raise Exception,"endActionGroup without previous beginActionGroup"
+ raise Exception("endActionGroup without previous beginActionGroup")
else:
self.redoStack.append(op)
op.undo()
- #print "undid",op
+ #print ("undid",op)
else:
- pass #print "nothing to undo"
+ pass #print ("nothing to undo")
def redo(self):
if len(self.redoStack) > 0:
@@ -80,13 +80,13 @@ class actionStack:
op.redo()
self.undoStack.append(op)
elif op is endActionGroup:
- raise Exception,"endActionGroup without previous beginActionGroup"
+ raise Exception("endActionGroup without previous beginActionGroup")
else:
self.undoStack.append(op)
op.redo()
- #print "redid",op
+ #print ("redid",op)
else:
- pass #print "nothing to redo"
+ pass #print ("nothing to redo")
def setCommitLevel(self):
self.commitLevel = len(self.undoStack)
@@ -105,9 +105,9 @@ class actionStack:
if __name__=='__main__':
import sys
def opq():
- print "action1"
+ print ("action1")
def unopq():
- print "inverse1"
+ print ("inverse1")
q = action(opq,unopq)
w = action(lambda:sys.stdout.write("action2\n"),lambda:sys.stdout.write("inverse2\n"))
e = action(lambda:sys.stdout.write("action3\n"),lambda:sys.stdout.write("inverse3\n"))
diff --git a/Build/source/utils/asymptote/GUI/xasy.py b/Build/source/utils/asymptote/GUI/xasy.py
index ffca16a1e2d..f160404c19a 100755
--- a/Build/source/utils/asymptote/GUI/xasy.py
+++ b/Build/source/utils/asymptote/GUI/xasy.py
@@ -10,8 +10,11 @@
############################################################################
import getopt,sys,signal
-from Tkinter import *
import xasyMainWin
+if sys.version_info >= (3, 0):
+ from tkinter import *
+else:
+ from Tkinter import *
signal.signal(signal.SIGINT,signal.SIG_IGN)
@@ -22,11 +25,11 @@ try:
if(len(opts)>=1):
mag = float(opts[0][1])
except:
- print "Invalid arguments."
- print "Usage: xasy.py [-x magnification] [filename]"
+ print ("Invalid arguments.")
+ print ("Usage: xasy.py [-x magnification] [filename]")
sys.exit(1)
if(mag <= 0.0):
- print "Magnification must be positive."
+ print ("Magnification must be positive.")
sys.exit(1)
if(len(args)>=1):
app = xasyMainWin.xasyMainWin(root,args[0],mag)
diff --git a/Build/source/utils/asymptote/GUI/xasy2asy.py b/Build/source/utils/asymptote/GUI/xasy2asy.py
index 3a2c1bcbe7b..06c0dbd7f54 100755
--- a/Build/source/utils/asymptote/GUI/xasy2asy.py
+++ b/Build/source/utils/asymptote/GUI/xasy2asy.py
@@ -12,10 +12,15 @@ import sys,os,signal,threading
from subprocess import *
from string import *
import xasyOptions
-import Queue
-from Tkinter import *
from tempfile import mkdtemp
+if sys.version_info >= (3, 0):
+ from tkinter import *
+ import queue
+else:
+ from Tkinter import *
+ import Queue as queue
+
# PIL support is now mandatory due to rotations
try:
from PIL import ImageTk
@@ -50,14 +55,21 @@ def startQuickAsy():
AsyTempDir=mkdtemp(prefix="asy_")+os.sep
if sys.platform[:3] == 'win':
quickAsy=Popen([xasyOptions.options['asyPath'],"-noV","-multiline","-q",
- "-o"+AsyTempDir,"-inpipe=0","-outpipe=2"],stdin=PIPE,stderr=PIPE)
+ "-o"+AsyTempDir,"-inpipe=0","-outpipe=2"],stdin=PIPE,
+ stderr=PIPE,universal_newlines=True)
fout=quickAsy.stdin
fin=quickAsy.stderr
else:
(rx,wx) = os.pipe()
(ra,wa) = os.pipe()
+ if sys.version_info >= (3, 4):
+ os.set_inheritable(rx, True)
+ os.set_inheritable(wx, True)
+ os.set_inheritable(ra, True)
+ os.set_inheritable(wa, True)
quickAsy=Popen([xasyOptions.options['asyPath'],"-noV","-multiline","-q",
- "-o"+AsyTempDir,"-inpipe="+str(rx),"-outpipe="+str(wa)])
+ "-o"+AsyTempDir,"-inpipe="+str(rx),"-outpipe="+str(wa)],
+ close_fds=False)
fout=os.fdopen(wx,'w')
fin=os.fdopen(ra,'r')
if quickAsy.returncode != None:
@@ -111,7 +123,7 @@ class asyTransform:
self.x,self.y,self.xx,self.xy,self.yx,self.yy = initTuple
self.deleted = delete
else:
- raise Exception,"Illegal initializer for asyTransform"
+ raise Exception("Illegal initializer for asyTransform")
def getCode(self):
"""Obtain the asy code that represents this transform"""
@@ -135,7 +147,7 @@ class asyTransform:
elif len(other) == 2:
return ((self.t[0]+self.t[2]*other[0]+self.t[3]*other[1]),(self.t[1]+self.t[4]*other[0]+self.t[5]*other[1]))
else:
- raise Exception, "Illegal multiplier of %s"%str(type(other))
+ raise Exception("Illegal multiplier of {:s}".format(str(type(other))))
elif isinstance(other,asyTransform):
result = asyTransform((0,0,0,0,0,0))
result.x = self.x+self.xx*other.x+self.xy*other.y
@@ -147,7 +159,7 @@ class asyTransform:
result.t = (result.x,result.y,result.xx,result.xy,result.yx,result.yy)
return result
else:
- raise Exception, "Illegal multiplier of %s"%str(type(other))
+ raise Exception("Illegal multiplier of {:s}".format(str(type(other))))
def identity():
return asyTransform((0,0,1,0,0,1))
@@ -181,7 +193,7 @@ class asyPen(asyObj):
def updateCode(self,mag=1.0):
"""Generate the pen's code"""
- self.asyCode = "rgb(%g,%g,%g)"%self.color+"+"+str(self.width)
+ self.asyCode = "rgb({:g},{:g},{:g})+{:s}".format(self.color[0], self.color[1], self.color[2],str(self.width))
if len(self.options) > 0:
self.asyCode += "+"+self.options
@@ -226,23 +238,7 @@ class asyPen(asyObj):
def tkColor(self):
"""Return the tk version of the pen's color"""
self.computeColor()
- r,g,b = self.color
- r,g,b = int(256*r),int(256*g),int(256*b)
- if r == 256:
- r = 255
- if g == 256:
- g = 255
- if b == 256:
- b = 255
- r,g,b = map(hex,(r,g,b))
- r,g,b = r[2:],g[2:],b[2:]
- if len(r) < 2:
- r += '0'
- if len(g) < 2:
- g += '0'
- if len(b) < 2:
- b += '0'
- return'#'+r+g+b
+ return '#{}'.format("".join(["{:02x}".format(min(int(256*a),255)) for a in self.color]))
class asyPath(asyObj):
"""A python wrapper for an asymptote path"""
@@ -353,7 +349,7 @@ class asyPath(asyObj):
line=fin.readline()
line=line.replace("\n","")
pathStrLines.append(line)
- oneLiner = "".join(split(join(pathStrLines)))
+ oneLiner = "".join(pathStrLines).replace(" ", "")
splitList = oneLiner.split("..")
nodes = [a for a in splitList if a.find("controls")==-1]
self.nodeSet = []
@@ -437,7 +433,7 @@ class xasyItem:
def asyfy(self,mag=1.0):
self.removeFromCanvas()
self.imageList = []
- self.imageHandleQueue = Queue.Queue()
+ self.imageHandleQueue = queue.Queue()
worker = threading.Thread(target=self.asyfyThread,args=(mag,))
worker.start()
item = self.imageHandleQueue.get()
@@ -461,23 +457,22 @@ class xasyItem:
fout.write("reset;\n")
fout.write("initXasyMode();\n")
fout.write("atexit(null);\n")
- global console
for line in self.getCode().splitlines():
fout.write(line+"\n");
- fout.write("deconstruct(%f);\n"%mag)
+ fout.write("deconstruct({:f});\n".format(mag))
fout.flush()
- format = "png"
- maxargs = int(split(fin.readline())[0])
+ maxargs = int(fin.readline().split()[0])
boxes=[]
batch=0
n=0
text = fin.readline()
- template=AsyTempDir+"%d_%d.%s"
+ # template=AsyTempDir+"%d_%d.%s"
+ fileformat = "png"
def render():
for i in range(len(boxes)):
- l,b,r,t = [float(a) for a in split(boxes[i])]
- name=template%(batch,i+1,format)
- self.imageHandleQueue.put((name,format,(l,b,r,t),i))
+ l,b,r,t = [float(a) for a in boxes[i].split()]
+ name="{:s}{:d}_{:d}.{:s}".format(AsyTempDir,batch,i+1,fileformat)
+ self.imageHandleQueue.put((name,fileformat,(l,b,r,t),i))
while text != "Done\n" and text != "Error\n":
boxes.append(text)
text = fin.readline()
@@ -595,14 +590,14 @@ class xasyShape(xasyDrawnItem):
def __str__(self):
"""Create a string describing this shape"""
- return "xasyShape code:%s"%("\n\t".join(self.getCode().splitlines()))
+ return "xasyShape code:{:s}".format("\n\t".join(self.getCode().splitlines()))
class xasyFilledShape(xasyShape):
"""A filled shape drawn on the GUI"""
def __init__(self,path,pen=asyPen(),transform=identity()):
"""Initialize this shape with a path, pen, and transform"""
if path.nodeSet[-1] != 'cycle':
- raise Exception,"Filled paths must be cyclic"
+ raise Exception("Filled paths must be cyclic")
xasyShape.__init__(self,path,pen,transform)
def updateCode(self,mag=1.0):
@@ -661,7 +656,7 @@ class xasyFilledShape(xasyShape):
def __str__(self):
"""Return a string describing this shape"""
- return "xasyFilledShape code:%s"%("\n\t".join(self.getCode().splitlines()))
+ return "xasyFilledShape code:{:s}".format("\n\t".join(self.getCode().splitlines()))
class xasyText(xasyItem):
"""Text created by the GUI"""
@@ -690,11 +685,11 @@ class xasyText(xasyItem):
if self.onCanvas == None:
self.onCanvas = canvas
elif self.onCanvas != canvas:
- raise Exception,"Error: item cannot be added to more than one canvas"
+ raise Exception("Error: item cannot be added to more than one canvas")
self.asyfy(mag)
def __str__(self):
- return "xasyText code:%s"%("\n\t".join(self.getCode().splitlines()))
+ return "xasyText code:{:s}".format("\n\t".join(self.getCode().splitlines()))
class xasyScript(xasyItem):
"""A set of images create from asymptote code. It is always deconstructed."""
@@ -718,7 +713,7 @@ class xasyScript(xasyItem):
for xform in self.transform:
if not isFirst:
self.asyCode+=",\n"
- self.asyCode += "indexedTransform(%d,%s)"%(count,str(xform))
+ self.asyCode += "indexedTransform({:d},{:s})".format(count,str(xform))
isFirst = False
count += 1
self.asyCode += ");\n"
@@ -754,7 +749,7 @@ class xasyScript(xasyItem):
if self.onCanvas == None:
self.onCanvas = canvas
elif self.onCanvas != canvas:
- raise Exception,"Error: item cannot be added to more than one canvas"
+ raise Exception("Error: item cannot be added to more than one canvas")
self.asyfy(mag)
def __str__(self):
diff --git a/Build/source/utils/asymptote/GUI/xasyActions.py b/Build/source/utils/asymptote/GUI/xasyActions.py
index 38aae1d5c7e..95411c5d9a4 100755
--- a/Build/source/utils/asymptote/GUI/xasyActions.py
+++ b/Build/source/utils/asymptote/GUI/xasyActions.py
@@ -9,9 +9,13 @@
#
###########################################################################
import math
+import sys
import UndoRedoStack
import xasy2asy
-from Tkinter import *
+if sys.version_info >= (3, 0):
+ from tkinter import *
+else:
+ from Tkinter import *
class translationAction(UndoRedoStack.action):
def __init__(self,owner,itemList,indexList,translation):
diff --git a/Build/source/utils/asymptote/GUI/xasyBezierEditor.py b/Build/source/utils/asymptote/GUI/xasyBezierEditor.py
index 998ee4c7c25..75ddeafa2d2 100755
--- a/Build/source/utils/asymptote/GUI/xasyBezierEditor.py
+++ b/Build/source/utils/asymptote/GUI/xasyBezierEditor.py
@@ -10,11 +10,16 @@
#
###########################################################################
-from Tkinter import *
import math
+import sys
from CubicBezier import *
import xasy2asy
+if sys.version_info >= (3, 0):
+ from tkinter import *
+else:
+ from Tkinter import *
+
class node:
def __init__(self,precontrol,node,postcontrol,uid,isTied = True):
self.node = node
diff --git a/Build/source/utils/asymptote/GUI/xasyCodeEditor.py b/Build/source/utils/asymptote/GUI/xasyCodeEditor.py
index d09196a41be..8f3de4034fe 100755
--- a/Build/source/utils/asymptote/GUI/xasyCodeEditor.py
+++ b/Build/source/utils/asymptote/GUI/xasyCodeEditor.py
@@ -15,7 +15,6 @@ from tempfile import mkstemp
from os import remove
from os import fdopen
from os import path
-from string import split
import xasyOptions
def getText(text=""):
@@ -26,7 +25,7 @@ def getText(text=""):
tempf.close()
try:
cmdpath,cmd = path.split(path.expandvars(xasyOptions.options['externalEditor']))
- split_cmd = split(cmd)
+ split_cmd = cmd.split()
cmdpart = [path.join(cmdpath,split_cmd[0])]
argpart = split_cmd[1:]+[temp[1]]
arglist = cmdpart+argpart
@@ -45,4 +44,4 @@ def getText(text=""):
if __name__ == '__main__':
#run a test
- print getText("Here is some text to edit")
+ print (getText("Here is some text to edit"))
diff --git a/Build/source/utils/asymptote/GUI/xasyColorPicker.py b/Build/source/utils/asymptote/GUI/xasyColorPicker.py
index 7415be205c4..217835bdbb0 100755
--- a/Build/source/utils/asymptote/GUI/xasyColorPicker.py
+++ b/Build/source/utils/asymptote/GUI/xasyColorPicker.py
@@ -10,8 +10,15 @@
#
############################################################################
-from Tkinter import *
-import tkColorChooser
+import sys
+
+if sys.version_info >= (3, 0):
+ from tkinter import *
+ from tkinter import colorchooser
+else:
+ from Tkinter import *
+ import tkColorChooser as colorchooser
+
asyColors = { "black":(0,0,0),
"white":(1,1,1),
"gray":(0.5,0.5,0.5),
@@ -145,28 +152,13 @@ def makeRGBfromTkColor(tkColor):
b /= 255.0
return (r,g,b)
-def RGBreal255((r,g,b)):
+def RGBreal255(rgb):
"""Convert an RGB color from 0-1 to 0-255"""
- a,b,c = (256*r,256*g,256*b)
- if a == 256:
- a = 255
- if b == 256:
- b = 255
- if c == 256:
- c = 255
- return map(int,(a,b,c))
+ return [min(int(256*a),255) for a in rgb]
-def RGB255hex((r,g,b)):
+def RGB255hex(rgb):
"""Make a color in the form #rrggbb in hex from r,g,b in 0-255"""
- rs,gs,bs = map(hex,(r,g,b))
- rs,gs,bs = rs[2:],gs[2:],bs[2:]
- if len(rs) < 2:
- rs += '0'
- if len(gs) < 2:
- gs += '0'
- if len(bs) < 2:
- bs += '0'
- return '#'+rs+gs+bs
+ return "#{}".format("".join(["{:02x}".format(a) for a in rgb]))
class xasyColorDlg(Toplevel):
"""A dialog for choosing an asymptote color. It displays the usual asy presets and allows custom rgb colors"""
@@ -216,8 +208,8 @@ class xasyColorDlg(Toplevel):
"""Close the dialog forcibly"""
self.destroy()
def getCustom(self):
- """Request a custom RGB color using a tkColorChooser"""
- result=tkColorChooser.askcolor(initialcolor=RGB255hex(RGBreal255(self.color)),title="Custom Color",parent=self)
+ """Request a custom RGB color using a colorchooser"""
+ result=colorchooser.askcolor(initialcolor=RGB255hex(RGBreal255(self.color)),title="Custom Color",parent=self)
if result != (None,None):
self.setColor((result[0][0]/255.0,result[0][1]/255.0,result[0][2]/255.0))
def cancel(self):
@@ -235,7 +227,7 @@ class xasyColorDlg(Toplevel):
"""Use this method to prompt for a color. It returns the new color or the old color if the user cancelled the operation.
e.g:
- print xasyColorDlg(Tk()).getColor((1,1,0))
+ print (xasyColorDlg(Tk()).getColor((1,1,0)))
"""
self.setColor(initialColor)
self.oldColor = initialColor
diff --git a/Build/source/utils/asymptote/GUI/xasyFile.py b/Build/source/utils/asymptote/GUI/xasyFile.py
index 890f1ad3eef..e94b411fbbb 100755
--- a/Build/source/utils/asymptote/GUI/xasyFile.py
+++ b/Build/source/utils/asymptote/GUI/xasyFile.py
@@ -28,7 +28,7 @@ def parseFile(inFile):
#lines = [line for line in lines.splitlines() if not line.startswith("//")]
result = []
if lines[0] != "initXasyMode();":
- raise xasyFileError,"Invalid file format: First line must be \"initXasyMode();\""
+ raise xasyFileError("Invalid file format: First line must be \"initXasyMode();\"")
lines.pop(0)
lineCount = 2
lineNum = len(lines)
@@ -37,14 +37,14 @@ def parseFile(inFile):
lines.pop(0)
if not line.isspace() and len(line)>0:
try:
- #print "Line %d: %s"%(lineCount,line),
+ #print ("Line {:d}: {:s}".format(lineCount,line))
lineResult = parseLine(line.strip(),lines)
except:
- raise xasyParseError,"Parsing error: line %d in %s\n%s"%(lineCount,inFile.name,line)
+ raise xasyParseError("Parsing error: line {:d} in {:s}\n{:s}".format(lineCount,inFile.name,line))
if lineResult != None:
result.append(lineResult)
- #print "\tproduced: %s"%str(lineResult)
+ #print ("\tproduced: {:s}".format(str(lineResult)))
lineCount += lineNum-len(lines)
lineNum = len(lines)
return result
@@ -105,7 +105,7 @@ def parseTransformExpression(line):
global pendingTransforms
stackCmd = line[len(transformPrefix)+1:line.find("(")]
if line[-2:] != ");":
- raise xasyParseError,"Invalid syntax"
+ raise xasyParseError("Invalid syntax")
args = line[line.find("(")+1:-2]
if stackCmd == "push":
t = asyTransform(eval(args))
@@ -113,19 +113,19 @@ def parseTransformExpression(line):
elif stackCmd == "add":
parseIndexedTransforms(args)
else:
- raise xasyParseError,"Invalid transform stack command."
+ raise xasyParseError("Invalid transform stack command.")
return None
def parseLabel(line):
"""Parse an asy Label statement, returning an xasyText item"""
if not (line.startswith("Label(") and line.endswith(",align=SE)")):
- raise xasyParseError,"Invalid syntax"
+ raise xasyParseError("Invalid syntax")
args = line[6:-1]
loc2 = args.rfind(",align=SE")
loc1 = args.rfind(",",0,loc2-1)
loc = args.rfind(",(",0,loc1-1)
if loc < 2:
- raise xasyParseError,"Invalid syntax"
+ raise xasyParseError("Invalid syntax")
text = args[1:loc-1]
location = eval(args[loc+1:args.find("),",loc)+1])
pen = args[loc:loc2]
@@ -143,7 +143,7 @@ def parseLabelCommand(line):
e.g.: label(Label("Hello world!",(0,0),rgb(0,0,0)+0.5,align=SE));
"""
if line[-2:] != ");":
- raise xasyParseError,"Invalid syntax"
+ raise xasyParseError("Invalid syntax")
arguments = line[6:-2]
return parseLabel(arguments)
@@ -155,7 +155,7 @@ def parseDrawCommand(line):
e.g.: draw((0,0)..controls(0.33,0.33)and(0.66,0.66)..(1,1),rgb(1,0,1)+1.5);
"""
if line[-2:] != ");":
- raise xasyParseError,"Invalid syntax"
+ raise xasyParseError("Invalid syntax")
args = line[5:-2]
loc = args.rfind(",rgb")
path = args[:loc]
@@ -171,7 +171,7 @@ def parseFillCommand(line):
e.g.: fill((0,0)..controls(0.33,0.33)and(0.66,0.66)..(1,1)..controls(0.66,0)and(0.33,0)..cycle,rgb(1,0,1)+1.5);
"""
if line[-2:] != ");":
- raise xasyParseError,"Invalid syntax"
+ raise xasyParseError("Invalid syntax")
args = line[5:-2]
loc = args.rfind(",rgb")
path = args[:loc]
@@ -197,13 +197,13 @@ def parsePen(pen):
options = ""
return asyPen(color,width,options)
except:
- raise xasyParseError,"Invalid pen"
+ raise xasyParseError("Invalid pen")
def parsePathExpression(expr):
"""Parse an asy path returning an asyPath()"""
result = asyPath()
expr = "".join(expr.split())
- #print expr
+ #print (expr)
if expr.find("controls") != -1:
#parse a path with control points
tokens = expr.split("..")
@@ -211,18 +211,18 @@ def parsePathExpression(expr):
for a in range(len(nodes)):
if nodes[a] != "cycle":
nodes[a] = eval(nodes[a])
- controls = [map(eval,a.replace("controls","").split("and")) for a in tokens if a.startswith("controls")]
+ controls = [eval(a.replace("controls", "").split("and")) for a in tokens if a.startswith("controls")]
result.initFromControls(nodes, controls)
else:
#parse a path without control points
tokens = re.split(r"(::|--|\.\.)",expr)
linkSet = re.findall("::|--|\.\.",expr)
nodeSet = [a for a in tokens if not re.match(r"::|--|\.\.",a)]
- #print nodeSet
+ #print (nodeSet)
for a in range(len(nodeSet)):
if nodeSet[a] != "cycle":
nodeSet[a] = eval(nodeSet[a])
- #print nodeSet
+ #print (nodeSet)
result.initFromNodeList(nodeSet, linkSet)
return result
@@ -250,7 +250,7 @@ def parseLine(line,lines):
return parseFillCommand(takeUntilSemicolon(line,lines))
elif line.startswith("exitXasyMode();"):
return None
- raise Exception,"Could not parse the line"
+ raise Exception("Could not parse the line")
fileHeader = """initXasyMode();
// This file was generated by xasy. It may be edited manually, however, a strict
@@ -280,28 +280,28 @@ if __name__ == '__main__':
name = "../../xasyTest.asy"
f = open(name,"rt")
except:
- print "Could not open file."
+ print ("Could not open file.")
asy.quit()
sys.exit(1)
fileItems = []
try:
fileItems = parseFile(f)
- res = map(str,fileItems)
- print "----------------------------------"
- print "Objects in %s"%f.name
- print "----------------------------------"
+ res = [str(a) for a in fileItems]
+ print ("----------------------------------")
+ print ("Objects in {:s}".format(f.name))
+ print ("----------------------------------")
for a in res:
- print a
- print "----------------------------------"
- print "successful parse"
+ print (a)
+ print ("----------------------------------")
+ print ("successful parse")
f.close()
except:
f.close()
- print "parse failed"
+ print ("parse failed")
raise
- print "making a file"
+ print ("making a file")
f = open("testfile.asy","wt")
saveFile(f,fileItems)
f.close()
diff --git a/Build/source/utils/asymptote/GUI/xasyGUIIcons.py b/Build/source/utils/asymptote/GUI/xasyGUIIcons.py
index 3afecfd349c..7f07d5748d7 100755
--- a/Build/source/utils/asymptote/GUI/xasyGUIIcons.py
+++ b/Build/source/utils/asymptote/GUI/xasyGUIIcons.py
@@ -53,11 +53,11 @@ iconB64 = {
def createGIF(key):
"""Create a gif file from the data in the iconB64 list of icons"""
if key not in iconB64.keys():
- print "Error: %s not found in icon list."%key
- print "Available icons:",iconB64.keys()
+ print ("Error: {:s} not found in icon list.".format(key))
+ print ("Available icons:",iconB64.keys())
else:
- print "Generating %s.gif"%key
- open("%s.gif"%key,"w").write(base64.decodestring(iconB64[key]))
+ print ("Generating {:s}.gif".format(key))
+ open("{:s}.gif".format(key),"w").write(base64.decodestring(iconB64[key]))
def createGIFs():
"""Create the files for all the icons in iconB64"""
@@ -69,24 +69,24 @@ def createStrFromGif(gifFile):
return base64.encodestring(gifFile.read())
if __name__=='__main__':
- print "Testing the xasyGUIIcons module."
- print "Generating all the GIFs:"
+ print ("Testing the xasyGUIIcons module.")
+ print ("Generating all the GIFs:")
createGIFs()
- print "Checking consistency of all icons in iconB64"
+ print ("Checking consistency of all icons in iconB64")
allpassed = True
for icon in iconB64.keys():
- print ("Checking %s"%icon),
- if createStrFromGif(open("%s.gif"%icon,"rb")) == iconB64[icon]:
- print "\tPassed."
+ print ("Checking {:s}".format(icon))
+ if createStrFromGif(open("{:s}.gif".format(icon),"rb")) == iconB64[icon]:
+ print ("\tPassed.")
else:
- print "\tFailed."
+ print ("\tFailed.")
allpassed= False
if allpassed:
- print "All files succeeded."
+ print ("All files succeeded.")
s = raw_input("Delete generated files? (y/n)")
if s == "y":
for name in iconB64.keys():
- print "Deleting %s.gif"%name,
+ print ("Deleting {:s}.gif".format(name))
os.unlink(name+".gif")
- print "\tdone"
- print "Done"
+ print ("\tdone")
+ print ("Done")
diff --git a/Build/source/utils/asymptote/GUI/xasyMainWin.py b/Build/source/utils/asymptote/GUI/xasyMainWin.py
index 657d24ba81b..b0549e72f9c 100755
--- a/Build/source/utils/asymptote/GUI/xasyMainWin.py
+++ b/Build/source/utils/asymptote/GUI/xasyMainWin.py
@@ -11,15 +11,23 @@
###########################################################################
import os
+import sys
from string import *
import subprocess
import math
import copy
-from Tkinter import *
-import tkMessageBox
-import tkFileDialog
-import tkSimpleDialog
+if sys.version_info >= (3, 0):
+ # python3
+ from tkinter import *
+ from tkinter import filedialog, messagebox, simpledialog
+else:
+ # python2
+ # from Tkinter import *
+ import tkFileDialog as filedialog
+ import tkMessageBox as messagebox
+ import tkSimpleDialog as simpledialog
+
import threading
import time
@@ -56,12 +64,9 @@ class xasyMainWin:
self.bindGlobalEvents()
self.createWidgets()
self.resetGUI()
- if sys.platform[:3] == "win":
- site="http://effbot.org/downloads/PIL-1.1.7.win32-py2.7.exe"
- else:
- site="http://effbot.org/downloads/Imaging-1.1.7.tar.gz"
+ site=""
if not PILAvailable:
- tkMessageBox.showerror("Failed Dependencies","An error occurred loading the required PIL library. Please install "+site)
+ messagebox.showerror("Failed Dependencies","An error occurred loading the required PIL library. Please install Pillow from http://pypi.python.org/pypi/Pillow")
self.parent.destroy()
sys.exit(1)
if file != None:
@@ -449,12 +454,12 @@ class xasyMainWin:
#test the asyProcess
startQuickAsy()
if not quickAsyRunning():
- if tkMessageBox.askyesno("Xasy Error","Asymptote could not be executed.\r\nTry to find Asymptote automatically?"):
+ if messagebox.askyesno("Xasy Error","Asymptote could not be executed.\r\nTry to find Asymptote automatically?"):
xasyOptions.setAsyPathFromWindowsRegistry()
xasyOptions.save()
startQuickAsy()
while not quickAsyRunning():
- if tkMessageBox.askyesno("Xasy Error","Asymptote could not be executed.\r\nEdit settings?"):
+ if messagebox.askyesno("Xasy Error","Asymptote could not be executed.\r\nEdit settings?"):
xasyOptionsDialog.xasyOptionsDlg(self.parent)
xasyOptions.save()
startQuickAsy()
@@ -466,7 +471,7 @@ class xasyMainWin:
self.mainCanvas.delete("grid")
if not self.gridVisible:
return
- left,top,right,bottom = map(int,self.mainCanvas.cget("scrollregion").split())
+ left,top,right,bottom = [int(float(a)) for a in self.mainCanvas.cget("scrollregion").split()]
gridyspace = int(self.magnification*self.gridyspace)
gridxspace = int(self.magnification*self.gridxspace)
if gridxspace >= 3 and gridyspace >= 3:
@@ -484,7 +489,7 @@ class xasyMainWin:
self.mainCanvas.delete("axes")
if not self.axesVisible:
return
- left,top,right,bottom = map(int,self.mainCanvas.cget("scrollregion").split())
+ left,top,right,bottom = [int(float(a)) for a in self.mainCanvas.cget("scrollregion").split()]
self.mainCanvas.create_line(0,top,0,bottom,tags=("axes","yaxis"),fill=self.axiscolor)
self.mainCanvas.create_line(left,0,right,0,tags=("axes","xaxis"),fill=self.axiscolor)
axisxspace = int(self.magnification*self.axisxspace)
@@ -513,12 +518,12 @@ class xasyMainWin:
w,h = self.mainCanvas.winfo_width(),self.mainCanvas.winfo_height()
if right-left < w:
extraw = w-(right-left)
- right += extraw/2
- left -= extraw/2
+ right += extraw//2
+ left -= extraw//2
if bottom-top < h:
extrah = h-(bottom-top)
- bottom += extrah/2
- top -= extrah/2
+ bottom += extrah//2
+ top -= extrah//2
self.mainCanvas.config(scrollregion=(left,top,right,bottom))
#self.mainCanvas.xview(MOVETO,float(split(self.mainCanvas["scrollregion"])[0]))
#self.mainCanvas.yview(MOVETO,float(split(self.mainCanvas["scrollregion"])[1]))
@@ -549,7 +554,7 @@ class xasyMainWin:
self.bindEvents(item.IDTag)
def canQuit(self,force=False):
- #print "Quitting"
+ #print ("Quitting")
if not force and not self.testOrAcquireLock():
return
try:
@@ -557,10 +562,10 @@ class xasyMainWin:
except:
pass
if self.undoRedoStack.changesMade():
- result = tkMessageBox._show("xasy","File has been modified.\nSave changes?",icon=tkMessageBox.QUESTION,type=tkMessageBox.YESNOCANCEL)
- if str(result) == tkMessageBox.CANCEL:
+ result = messagebox._show("xasy","File has been modified.\nSave changes?",icon=messagebox.QUESTION,type=messagebox.YESNOCANCEL)
+ if str(result) == messagebox.CANCEL:
return
- elif result == tkMessageBox.YES:
+ elif result == messagebox.YES:
self.fileSaveCmd()
try:
os.rmdir(getAsyTempDir())
@@ -595,19 +600,19 @@ class xasyMainWin:
self.fileItems = xasyFile.parseFile(f)
f.close()
except IOError:
- tkMessageBox.showerror("File Opening Failed.","File could not be opened.")
+ messagebox.showerror("File Opening Failed.","File could not be opened.")
self.fileItems = []
except:
self.fileItems = []
self.autoMakeScript = True
- if self.autoMakeScript or tkMessageBox.askyesno("Error Opening File", "File was not recognized as an xasy file.\nLoad as a script item?"):
+ if self.autoMakeScript or messagebox.askyesno("Error Opening File", "File was not recognized as an xasy file.\nLoad as a script item?"):
try:
item = xasyScript(self.mainCanvas)
f.seek(0)
item.setScript(f.read())
self.addItemToFile(item)
except:
- tkMessageBox.showerror("File Opening Failed.","Could not load as a script item.")
+ messagebox.showerror("File Opening Failed.","Could not load as a script item.")
self.fileItems = []
self.populateCanvasWithItems()
self.populatePropertyList()
@@ -663,12 +668,12 @@ class xasyMainWin:
if(not self.testOrAcquireLock()):
return
self.releaseLock()
- #print "Create New File"
+ #print ("Create New File")
if self.undoRedoStack.changesMade():
- result = tkMessageBox._show("xasy","File has been modified.\nSave changes?",icon=tkMessageBox.QUESTION,type=tkMessageBox.YESNOCANCEL)
- if str(result) == tkMessageBox.CANCEL:
+ result = messagebox._show("xasy","File has been modified.\nSave changes?",icon=messagebox.QUESTION,type=messagebox.YESNOCANCEL)
+ if str(result) == messagebox.CANCEL:
return
- elif result == tkMessageBox.YES:
+ elif result == messagebox.YES:
self.fileSaveCmd()
self.resetGUI()
@@ -676,25 +681,25 @@ class xasyMainWin:
if(not self.testOrAcquireLock()):
return
self.releaseLock()
- #print "Open a file"
+ #print ("Open a file")
if self.undoRedoStack.changesMade():
- result = tkMessageBox._show("xasy","File has been modified.\nSave changes?",icon=tkMessageBox.QUESTION,type=tkMessageBox.YESNOCANCEL)
- if str(result) == tkMessageBox.CANCEL:
+ result = messagebox._show("xasy","File has been modified.\nSave changes?",icon=messagebox.QUESTION,type=messagebox.YESNOCANCEL)
+ if str(result) == messagebox.CANCEL:
return
- elif result == tkMessageBox.YES:
+ elif result == messagebox.YES:
self.fileSaveCmd()
- filename=tkFileDialog.askopenfilename(filetypes=[("asy files","*.asy"),("All files","*")],title="Open File",parent=self.parent)
+ filename=filedialog.askopenfilename(filetypes=[("asy files","*.asy"),("All files","*")],title="Open File",parent=self.parent)
if type(filename) != type((0,)) and filename != None and filename != '':
self.filename = filename
self.openFile(self.filename)
def fileSaveCmd(self):
- #print "Save current file"
+ #print ("Save current file")
if(not self.testOrAcquireLock()):
return
self.releaseLock()
if self.filename == None:
- filename=tkFileDialog.asksaveasfilename(defaultextension=".asy",filetypes=[("asy files","*.asy")],initialfile="newDrawing.asy",parent=self.parent,title="Save File")
+ filename=filedialog.asksaveasfilename(defaultextension=".asy",filetypes=[("asy files","*.asy")],initialfile="newDrawing.asy",parent=self.parent,title="Save File")
if type(filename) != type((0,)) and filename != None and filename != '':
self.filename = filename
if self.filename != None:
@@ -704,8 +709,8 @@ class xasyMainWin:
if(not self.testOrAcquireLock()):
return
self.releaseLock()
- #print "Save current file as"
- filename=tkFileDialog.asksaveasfilename(defaultextension=".asy",filetypes=[("asy files","*.asy")],initialfile="newDrawing.asy",parent=self.parent,title="Save File")
+ #print ("Save current file as")
+ filename=filedialog.asksaveasfilename(defaultextension=".asy",filetypes=[("asy files","*.asy")],initialfile="newDrawing.asy",parent=self.parent,title="Save File")
if type(filename) != type((0,)) and filename != None and filename != '':
self.filename = filename
self.saveFile(self.filename)
@@ -731,20 +736,20 @@ class xasyMainWin:
return
self.releaseLock()
if inFile == None:
- if tkMessageBox.askyesno("xasy","File has not been saved.\nSave?"):
+ if messagebox.askyesno("xasy","File has not been saved.\nSave?"):
self.fileSaveAsCmd()
inFile = self.filename
else:
return
elif self.undoRedoStack.changesMade():
- choice = tkMessageBox._show("xasy","File has been modified.\nOnly saved changes can be exported.\nDo you want to save changes?",icon=tkMessageBox.QUESTION,type=tkMessageBox.YESNOCANCEL)
+ choice = messagebox._show("xasy","File has been modified.\nOnly saved changes can be exported.\nDo you want to save changes?",icon=messagebox.QUESTION,type=messagebox.YESNOCANCEL)
choice = str(choice)
- if choice != tkMessageBox.YES:
+ if choice != messagebox.YES:
return
else:
self.fileSaveCmd()
name = os.path.splitext(os.path.basename(self.filename))[0]+'.'+outFormat
- outfilename = tkFileDialog.asksaveasfilename(defaultextension = '.'+outFormat,filetypes=[(outFormat+" files","*."+outFormat)],initialfile=name,parent=self.parent,title="Choose output file")
+ outfilename = filedialog.asksaveasfilename(defaultextension = '.'+outFormat,filetypes=[(outFormat+" files","*."+outFormat)],initialfile=name,parent=self.parent,title="Choose output file")
if type(outfilename)==type((0,)) or not outfilename or outfilename == '':
return
fullname = os.path.abspath(outfilename)
@@ -753,13 +758,13 @@ class xasyMainWin:
saver = subprocess.Popen(command,stdin=PIPE,stdout=PIPE,stderr=PIPE)
saver.wait()
if saver.returncode != 0:
- tkMessageBox.showerror("Export Error","Export Error:\n"+saver.stdout.read()+saver.stderr.read())
+ messagebox.showerror("Export Error","Export Error:\n"+saver.stdout.read()+saver.stderr.read())
self.status.config(text="Error exporting file")
else:
self.status.config(text="File exported successfully")
def fileExitCmd(self):
- #print "Exit xasy"
+ #print ("Exit xasy")
self.canQuit()
def editUndoCmd(self):
@@ -779,14 +784,14 @@ class xasyMainWin:
self.releaseLock()
def helpHelpCmd(self):
- print "Get help on xasy"
+ print ("Get help on xasy")
def helpAsyDocCmd(self):
- #print "Open documentation about Asymptote"
+ #print ("Open documentation about Asymptote")
asyExecute("help;\n")
def helpAboutCmd(self):
- tkMessageBox.showinfo("About xasy","A graphical interface for Asymptote "+xasyVersion)
+ messagebox.showinfo("About xasy","A graphical interface for Asymptote "+xasyVersion)
def updateSelectedButton(self,newB):
if(not self.testOrAcquireLock()):
@@ -847,8 +852,8 @@ class xasyMainWin:
self.unbindGlobalEvents()
try:
self.getNewText("// enter your code here")
- except Exception, e:
- tkMessageBox.showerror('xasy Error',e.message)
+ except Exception as e:
+ messagebox.showerror('xasy Error',e.message)
else:
self.addItemToFile(xasyScript(self.mainCanvas))
text = self.newText
@@ -963,7 +968,7 @@ class xasyMainWin:
self.setSelection(item.IDTag)
def propSelect(self,event):
- items = map(int, self.propList.curselection())
+ items = [int(a) for a in self.propList.curselection()]
if len(items)>0:
try:
self.selectItem(self.fileItems[len(self.fileItems)-items[0]-1])
@@ -979,7 +984,7 @@ class xasyMainWin:
else:
if item.IDTag == ID:
return item
- raise Exception,"Illegal operation: Item with matching ID could not be found."
+ raise Exception("Illegal operation: Item with matching ID could not be found.")
def findItemImageIndex(self,item,ID):
count = 0
@@ -988,7 +993,7 @@ class xasyMainWin:
return count
else:
count += 1
- raise Exception,"Illegal operation: Image with matching ID could not be found."
+ raise Exception("Illegal operation: Image with matching ID could not be found.")
return None
def raiseSomething(self,item,force=False):
@@ -1057,9 +1062,9 @@ class xasyMainWin:
return asyTransform((shift[0],shift[1],rotMat[0],rotMat[1],rotMat[2],rotMat[3]))
def rotateSomething(self,ID,theta,origin,specificItem=None,specificIndex=None):
- #print "Rotating by",theta*180.0/math.pi,"around",origin
+ #print ("Rotating by {} around {}".format(theta*180.0/math.pi,origin))
rotMat = self.makeRotationMatrix(theta,(origin[0]/self.magnification,origin[1]/self.magnification))
- #print rotMat
+ #print (rotMat)
if ID == -1:
item = specificItem
else:
@@ -1098,9 +1103,9 @@ class xasyMainWin:
p3 = rotMat2*(oldBbox[2],-oldBbox[1])
newTopLeft = (min(p0[0],p1[0],p2[0],p3[0]),-max(p0[1],p1[1],p2[1],p3[1]))#switch back to screen coords
shift = (newTopLeft[0]-oldBbox[0],newTopLeft[1]-oldBbox[3])
- #print theta*180.0/math.pi,origin,oldBbox,newTopLeft,shift
- #print item.imageList[index].originalImage.size
- #print item.imageList[index].image.size
+ #print (theta*180.0/math.pi,origin,oldBbox,newTopLeft,shift)
+ #print (item.imageList[index].originalImage.size)
+ #print (item.imageList[index].image.size)
#print
self.mainCanvas.coords(ID,oldBbox[0]+shift[0],oldBbox[3]+shift[1])
else:
@@ -1179,8 +1184,8 @@ class xasyMainWin:
oldText = item.script
try:
self.getNewText(oldText)
- except Exception,e:
- tkMessageBox.showerror('xasy Error',e.message)
+ except Exception as e:
+ messagebox.showerror('xasy Error',e.message)
else:
if self.newText != oldText:
self.undoRedoStack.add(editScriptAction(self,item,self.newText,oldText))
@@ -1189,7 +1194,7 @@ class xasyMainWin:
self.bindItemEvents(item)
self.bindGlobalEvents()
elif isinstance(item,xasyText):
- theText = tkSimpleDialog.askstring(title="Xasy - Text",prompt="Enter text to display:",initialvalue=item.label.text,parent=self.parent)
+ theText = simpledialog.askstring(title="Xasy - Text",prompt="Enter text to display:",initialvalue=item.label.text,parent=self.parent)
if theText != None and theText != "":
self.undoRedoStack.add(editLabelTextAction(self,item,theText,item.label.text))
item.label.text = theText
@@ -1264,7 +1269,7 @@ class xasyMainWin:
self.setSelection(CURRENT)
def itemToggleSelect(self,event):
- #print "control click"
+ #print ("control click")
x0,y0 = self.mainCanvas.canvasx(event.x),self.mainCanvas.canvasy(event.y)
x = x0/self.magnification
y = y0/self.magnification
@@ -1356,7 +1361,7 @@ class xasyMainWin:
elif self.selectedButton == self.toolFillEllipButton:
pass
elif self.selectedButton == self.toolTextButton:
- theText = tkSimpleDialog.askstring(title="Xasy - Text",prompt="Enter text to display:",initialvalue="",parent=self.parent)
+ theText = simpledialog.askstring(title="Xasy - Text",prompt="Enter text to display:",initialvalue="",parent=self.parent)
if theText != None and theText != "":
theItem = xasyText(theText,(x,-y),asyPen(self.penColor,self.penWidth,self.penOptions))
theItem.drawOnCanvas(self.mainCanvas,self.magnification)
@@ -1431,7 +1436,7 @@ class xasyMainWin:
self.releaseLock()
def canvLeftDown(self,event):
- #print "Left Mouse Down"
+ #print ("Left Mouse Down")
self.selectDragStart = (self.mainCanvas.canvasx(event.x),self.mainCanvas.canvasy(event.y))
theBbox = self.mainCanvas.bbox("selectedItem")
if theBbox != None:
@@ -1449,7 +1454,7 @@ class xasyMainWin:
self.startDraw(event)
def canvLeftUp(self,event):
- #print "Left Mouse Up"
+ #print ("Left Mouse Up")
# if we're busy, ignore it
if not self.testOrAcquireLock():
return
@@ -1543,11 +1548,11 @@ class xasyMainWin:
def canvRightDown(self,event):
pass
- #print "Right Mouse Down"
+ #print ("Right Mouse Down")
def canvRightUp(self,event):
pass
- #print "Right Mouse Up"
+ #print ("Right Mouse Up")
def configEvt(self,event):
self.updateCanvasSize()
@@ -1573,7 +1578,7 @@ class xasyMainWin:
self.itemEdit(self.itemPopupMenu.item)
def popupViewCode(self):
- tkMessageBox.showinfo("Item Code",self.itemPopupMenu.item.getCode())
+ messagebox.showinfo("Item Code",self.itemPopupMenu.item.getCode())
def popupClearTransform(self):
self.undoRedoStack.add(clearItemTransformsAction(self,self.itemPopupMenu.item,copy.deepcopy(self.itemPopupMenu.item.transform)))
diff --git a/Build/source/utils/asymptote/GUI/xasyOptions.py b/Build/source/utils/asymptote/GUI/xasyOptions.py
index 17d58d760e5..927490b77aa 100755
--- a/Build/source/utils/asymptote/GUI/xasyOptions.py
+++ b/Build/source/utils/asymptote/GUI/xasyOptions.py
@@ -81,16 +81,16 @@ def load():
try:
os.makedirs(thedir)
except:
- raise Exception,"Could not create configuration folder"
+ raise Exception("Could not create configuration folder")
if not os.path.isdir(thedir):
- raise Exception,"Configuration folder path does not point to a folder"
+ raise Exception("Configuration folder path does not point to a folder")
setDefaults()
try:
f = open(fileName,"rb")
newOptions = pickle.load(f)
for key in options.keys():
if type(newOptions[key]) != type(options[key]):
- raise Exception,"Bad type for entry in xasy settings"
+ raise Exception("Bad type for entry in xasy settings")
options = newOptions
except:
setDefaults()
@@ -103,24 +103,24 @@ def save():
pickle.dump(options,f)
f.close()
except:
- raise Exception,"Error saving preferences"
+ raise Exception("Error saving preferences")
load()
if __name__=='__main__':
- print settingsFileLocation()
- print "Current content"
+ print (settingsFileLocation())
+ print ("Current content")
load()
- print "Setting defaults"
+ print ("Setting defaults")
setDefaults()
save()
load()
options['showAxes'] = options['showGrid'] = False
save()
- print "Set to False"
+ print ("Set to False")
load()
options['showAxes'] = options['showGrid'] = True
save()
- print "Set to True"
+ print ("Set to True")
load()
- print options
+ print (options)
diff --git a/Build/source/utils/asymptote/GUI/xasyOptionsDialog.py b/Build/source/utils/asymptote/GUI/xasyOptionsDialog.py
index c3162e8673b..271070ea457 100755
--- a/Build/source/utils/asymptote/GUI/xasyOptionsDialog.py
+++ b/Build/source/utils/asymptote/GUI/xasyOptionsDialog.py
@@ -10,20 +10,26 @@
#
###########################################################################
-from Tkinter import *
-import xasyOptions
-import tkSimpleDialog
-import xasyColorPicker
-import tkMessageBox
-import tkFileDialog
-import tkColorChooser
import os
import sys
+import xasyOptions
+import xasyColorPicker
-class xasyOptionsDlg(tkSimpleDialog.Dialog):
+if sys.version_info >= (3, 0):
+ from tkinter import *
+ from tkinter import simpledialog, messagebox, filedialog
+else:
+ # python2
+ from Tkinter import *
+ import tkSimpleDialog as simpledialog
+ import tkMessageBox as messagebox
+ import tkFileDialog as filedialog
+ # import tkColorChooser as colorchooser
+
+class xasyOptionsDlg(simpledialog.Dialog):
"""A dialog to interact with users about their preferred settings"""
def __init__(self,master=None):
- tkSimpleDialog.Dialog.__init__(self,master,"xasy Options")
+ simpledialog.Dialog.__init__(self,master,"xasy Options")
def body(self,master):
optFrame = Frame(master)
@@ -116,9 +122,9 @@ class xasyOptionsDlg(tkSimpleDialog.Dialog):
def findEEPath(self):
if sys.platform[:3] == 'win': #for windows, wince, win32, etc
- file=tkFileDialog.askopenfile(filetypes=[("Programs","*.exe"),("All files","*")],title="Choose External Editor",parent=self)
+ file=filedialog.askopenfile(filetypes=[("Programs","*.exe"),("All files","*")],title="Choose External Editor",parent=self)
else:
- file=tkFileDialog.askopenfile(filetypes=[("All files","*")],title="Choose External Editor",parent=self)
+ file=filedialog.askopenfile(filetypes=[("All files","*")],title="Choose External Editor",parent=self)
if file != None:
name = os.path.abspath(file.name)
file.close()
@@ -128,9 +134,9 @@ class xasyOptionsDlg(tkSimpleDialog.Dialog):
def findAsyPath(self):
if sys.platform[:3] == 'win': #for windows, wince, win32, etc
- file=tkFileDialog.askopenfile(filetypes=[("Programs","*.exe"),("All files","*")],title="Find Asymptote Executable",parent=self)
+ file=filedialog.askopenfile(filetypes=[("Programs","*.exe"),("All files","*")],title="Find Asymptote Executable",parent=self)
else:
- file=tkFileDialog.askopenfile(filetypes=[("All files","*")],title="Find Asymptote Executable",parent=self)
+ file=filedialog.askopenfile(filetypes=[("All files","*")],title="Find Asymptote Executable",parent=self)
if file != None:
name = os.path.abspath(file.name)
file.close()
@@ -183,13 +189,13 @@ class xasyOptionsDlg(tkSimpleDialog.Dialog):
#validate the color
hexdigits = '0123456789abcdef'
if not self.validateAColor(self.pc):
- tkMessageBox.showerror("xasy Options","Invalid pen color.\r\n"+self.pc,parent=self)
+ messagebox.showerror("xasy Options","Invalid pen color.\r\n"+self.pc,parent=self)
return False
#validate the width
try:
test = float(self.pw.get())
except:
- tkMessageBox.showerror("xasy Options","Pen width must be a number.",parent=self)
+ messagebox.showerror("xasy Options","Pen width must be a number.",parent=self)
return False
#validate the options
@@ -200,7 +206,7 @@ class xasyOptionsDlg(tkSimpleDialog.Dialog):
test = int(self.axs.get())
test = int(self.ays.get())
except:
- tkMessageBox.showerror("xasy Options","Axes' x- and y-spacing must be numbers.",parent=self)
+ messagebox.showerror("xasy Options","Axes' x- and y-spacing must be numbers.",parent=self)
return False
#validate the grid spacing
@@ -208,15 +214,15 @@ class xasyOptionsDlg(tkSimpleDialog.Dialog):
test = int(self.gxs.get())
test = int(self.gys.get())
except:
- tkMessageBox.showerror("xasy Options","Grid's x- and y-spacing must be numbers.",parent=self)
+ messagebox.showerror("xasy Options","Grid's x- and y-spacing must be numbers.",parent=self)
return False
if not self.validateAColor(self.ac):
- tkMessageBox.showerror("xasy Options","Invalid axis color.\r\n"+self.ac,parent=self)
+ messagebox.showerror("xasy Options","Invalid axis color.\r\n"+self.ac,parent=self)
return False
if not self.validateAColor(self.gc):
- tkMessageBox.showerror("xasy Options","Invalid grid color.\r\n"+self.gc,parent=self)
+ messagebox.showerror("xasy Options","Invalid grid color.\r\n"+self.gc,parent=self)
return False
return True
@@ -225,4 +231,4 @@ if __name__ == '__main__':
root = Tk()
xasyOptions.load()
d = xasyOptionsDlg(root)
- print d.result
+ print (d.result)
diff --git a/Build/source/utils/asymptote/Makefile.in b/Build/source/utils/asymptote/Makefile.in
index ad71223a110..53bc2d5f9c8 100644
--- a/Build/source/utils/asymptote/Makefile.in
+++ b/Build/source/utils/asymptote/Makefile.in
@@ -97,9 +97,10 @@ REVISION = "const char *REVISION="
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/-g.*//')
+ revision = $(shell LC_ALL="C" git describe | sed -e 's/git//' \
+ | sed -e 's/-g.*//')
else
- revision = $(shell grep AC_INIT configure.ac | cut -s -d[ -f3 | cut -s -d] -f1)
+ revision = @VERSION@
endif
export prefix docdir exampledir mandir infodir INSTALL MAKE DESTDIR TEXI2DVI
diff --git a/Build/source/utils/asymptote/ReleaseNotes b/Build/source/utils/asymptote/ReleaseNotes
index 9d39f322100..69427e64eec 100644
--- a/Build/source/utils/asymptote/ReleaseNotes
+++ b/Build/source/utils/asymptote/ReleaseNotes
@@ -1,3 +1,21 @@
+Release Notes for Version 2.37
+
+The xasy graphical user interface now runs under both Python 2.7 and Python 3.
+Legacy versions (prior to 9.14) of Ghostscript can be supported by
+assigning settings.epsdriver="epswrite" (or by setting the environment
+variable ASYMPTOTE_EPSDRIVER to epswrite). The quiet flag suppresses
+noninteractive standard output when settings.verbosity <= 1. A progress
+function was added to the plain_strings module. The smoothcontour3 module
+was optimized to use Bezier triangles where appropriate, along with a
+built-in least-squares routine and an improved root finder based on
+quadratic interpolation. If settings.sysdir is empty, preference is given
+to a version of kpsewhich in the same directory as the executable for
+determining the correct sysdir. The handling of degenerate normals of
+Bezier triangles was fixed. Bugs in forking, integer formatting, dash
+adjustment, subpaths, and guide reversion were fixed. Version 1.30 of
+asymptote.sty (auto-generated) and version 0.35 (or later) of media9.sty
+are now required.
+
Release Notes for Version 2.36
Bezier triangle patches have been implemented in place of degenerate Bezier
@@ -1980,7 +1998,3 @@ the frame for filling with a background color; they also return the boundary
as a guide. A workaround was added for a bug in gcc version 3.3 to
facilitate compilation under Darwin (MacOS). Many internal coding
improvements were made.
-
-LocalWords: epswrite ghostscript boolean meshlight nolight nonsquare asy
-LocalWords: SimpleHead smoothcontour3 writtten Staats lemniscate xelatex
-LocalWords: asymptote asylatexdir pdflatex aligndir
diff --git a/Build/source/utils/asymptote/arrayop.h b/Build/source/utils/asymptote/arrayop.h
index 98f10e7b248..a4d2abdad83 100644
--- a/Build/source/utils/asymptote/arrayop.h
+++ b/Build/source/utils/asymptote/arrayop.h
@@ -323,10 +323,10 @@ void write(vm::stack *s)
string S=pop<string>(s,emptystring);
vm::item it=pop(s);
bool defaultfile=isdefault(it);
- camp::file *f=defaultfile ? &camp::Stdout : vm::get<camp::file*>(it);
+ camp::ofile *f=defaultfile ? &camp::Stdout : vm::get<camp::ofile*>(it);
+ if(!f->isOpen() || !f->enabled()) return;
size_t size=checkArray(a);
- if(!f->isOpen()) return;
if(S != "") f->write(S);
f->write(first);
for(size_t i=0; i < size; ++i) {
@@ -354,7 +354,8 @@ void writeArray(vm::stack *s)
string S=pop<string>(s,emptystring);
vm::item it=pop(s);
bool defaultfile=isdefault(it);
- camp::file *f=defaultfile ? &camp::Stdout : vm::get<camp::file*>(it);
+ camp::ofile *f=defaultfile ? &camp::Stdout : vm::get<camp::ofile*>(it);
+ if(!f->enabled()) return;
size_t asize=checkArray(a);
size_t Asize=checkArray(A);
diff --git a/Build/source/utils/asymptote/asy-keywords.el b/Build/source/utils/asymptote/asy-keywords.el
index e0bdde531fd..2b6e9e561d4 100644
--- a/Build/source/utils/asymptote/asy-keywords.el
+++ b/Build/source/utils/asymptote/asy-keywords.el
@@ -2,7 +2,7 @@
;; This file is automatically generated by asy-list.pl.
;; Changes will be overwritten.
;;
-(defvar asy-keywords-version "2.36")
+(defvar asy-keywords-version "2.37")
(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 @@ and controls tension atleast curl if else while for do return break continue str
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 _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 drawVertexTriangle 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 longitude lookup make3dgrid makeNode makecircle makedraw makepen map margin markangle markangleradius markanglespace markarc marker markinterval marknodes markrightangle markthin markuniform mass masscenter massformat math max max3 maxAfterTransform maxbezier maxbound maxcoords maxlength maxratio maxtimes mean medial median midpoint min min3 minAfterTransform minbezier minbound minipage minratio mintimes miterlimit mktemp momArrowPath momarrowsize monotonic multifigure nGrad nativeformat natural needshipout newl newpage newslide newton newtree nextframe nextnormal nextpage nib nodabscissa none norm normalout normalvideo notaknot nowarn numberpage nurb object offset onpath opacity opposite orient orientation origin orthic orthocentercenter outformat outline outname outprefix output overloadedMessage overwrite pack pad pairs palette parabola parabolanodesnumber parallel parallelogram partialsum patchwithnormals path path3 pathbetween pathinface pattern pause pdf pedal periodic perp perpendicular perpendicularmark phantom phi1 phi2 phi3 photon piecewisestraight point polar polarconicroutine polargraph polygon postcontrol postscript pow10 ppoint prc prc0 prconly precision precontrol prepend printBytecode print_random_addresses project projection projecttospan projecttospan_findcoeffs purge pwhermite quadpatches quadrant quadraticroots quantize quarticroots quotient radialshade radians radicalcenter radicalline radius rand randompath rd readline realmult realquarticroots rectangle rectangular rectify reflect relabscissa relative relativedistance reldir relpoint reltime remainder remark removeDuplicates rename replace report resetdefaultpen restore restoredefaults reverse reversevideo rf rfind rgb rgba rgbint rms rotate rotateO rotation round roundbox roundedpath roundrectangle samecoordsys sameside sample save savedefaults saveline scale scale3 scaleO scaleT scaleless scientific search searchtree sec secondaryX secondaryY seconds section sector seek seekeof segment segmentlimits sequence setpens sgn sgnd sharpangle sharpdegrees shift shiftless shipout shipout3 show simeq simpson sin sinh size size3 skewness skip slant sleep slice slope slopefield solve solveBVP sort sourceline sphere split sqrt square srand standardizecoordsys startScript stdev step stickframe stickmarksize stickmarkspace stop straight straightness string stripdirectory stripextension stripfile stripsuffix strokepath subdivide subitem subpath substr sum surface symmedial symmedian system tab tableau tan tangent tangential tangents tanh tell tensionSpecifier tensorshade tex texcolor texify texpath texpreamble texreset texshipout texsize textpath thick thin tick tickMax tickMax3 tickMin tickMin3 ticklabelshift ticklocate tildeframe tildemarksize tile tiling time times title titlepage topbox transform transformation transpose trembleFuzz triangle triangleAbc triangleabc triangletoquads triangulate tricoef tridiagonal trilinear trim truepoint tube uncycle unfill uniform unique unit unitrand unitsize unityroot unstraighten upcase updatefunction uperiodic upscale uptodate usepackage usersetting usetypescript usleep value variance variancebiased vbox vector vectorfield verbatim view vline vperiodic vprojection warn warning windingnumber write xaxis xaxis3 xaxis3At xaxisAt xequals xlimits xpart xscale xscaleO xtick xtick3 xtrans yaxis yaxis3 yaxis3At yaxisAt yequals ylimits ypart yscale yscaleO ytick ytick3 ytrans zaxis3 zaxis3At zero zero3 zlimits zpart ztick ztick3 ztrans ))
+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 drawVertexTriangle 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 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 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 zero3 zlimits zpart ztick ztick3 ztrans ))
(defvar asy-variable-name '(
-AliceBlue Align Allow AntiqueWhite Apricot Aqua Aquamarine Aspect Azure BeginPoint Beige Bisque Bittersweet Black BlanchedAlmond Blue BlueGreen BlueViolet Both Break BrickRed Brown BurlyWood BurntOrange CCW CW CadetBlue CarnationPink Center Centered Cerulean Chartreuse Chocolate Coeff Coral CornflowerBlue Cornsilk Crimson Crop Cyan Dandelion DarkBlue DarkCyan DarkGoldenrod DarkGray DarkGreen DarkKhaki DarkMagenta DarkOliveGreen DarkOrange DarkOrchid DarkRed DarkSalmon DarkSeaGreen DarkSlateBlue DarkSlateGray DarkTurquoise DarkViolet DeepPink DeepSkyBlue DefaultHead DimGray DodgerBlue Dotted Down Draw E ENE EPS ESE E_Euler E_PC E_RK2 E_RK3BS Emerald EndPoint Euler Fill FillDraw FireBrick FloralWhite ForestGreen Fuchsia Gainsboro GhostWhite Gold Goldenrod Gray Green GreenYellow Honeydew HookHead Horizontal HotPink I IgnoreAspect IndianRed Indigo Ivory JOIN_IN JOIN_OUT JungleGreen Khaki LM_DWARF LM_MACHEP LM_SQRT_DWARF LM_SQRT_GIANT LM_USERTOL Label Lavender LavenderBlush LawnGreen Left LeftJustified LeftSide LemonChiffon LightBlue LightCoral LightCyan LightGoldenrodYellow LightGreen LightGrey LightPink LightSalmon LightSeaGreen LightSkyBlue LightSlateGray LightSteelBlue LightYellow Lime LimeGreen Linear Linen Log Logarithmic Magenta Mahogany Mark MarkFill MarkPath Maroon Max MediumAquamarine MediumBlue MediumOrchid MediumPurple MediumSeaGreen MediumSlateBlue MediumSpringGreen MediumTurquoise MediumVioletRed Melon MidPoint MidnightBlue Min MintCream MistyRose Moccasin Move MoveQuiet Mulberry N NE NNE NNW NULL_VERTEX NW NavajoWhite Navy NavyBlue NoAlign NoCrop NoFill NoSide OldLace Olive OliveDrab OliveGreen Orange OrangeRed Orchid Ox Oy PC PaleGoldenrod PaleGreen PaleTurquoise PaleVioletRed PapayaWhip Peach PeachPuff Periwinkle Peru PineGreen Pink Plum PowderBlue ProcessBlue Purple RK2 RK3 RK3BS RK4 RK5 RK5DP RK5F RawSienna Red RedOrange RedViolet Rhodamine Right RightJustified RightSide RosyBrown RoyalBlue RoyalPurple RubineRed S SE SSE SSW SW SaddleBrown Salmon SandyBrown SeaGreen Seashell Sepia Sienna Silver SimpleHead SkyBlue SlateBlue SlateGray Snow SpringGreen SteelBlue Suppress SuppressQuiet Tan TeXHead Teal TealBlue Thistle Ticksize Tomato Turquoise UnFill Up VERSION Value Vertical Violet VioletRed W WNW WSW Wheat White WhiteSmoke WildStrawberry XHIGH XLOW XYAlign YAlign YHIGH YLOW Yellow YellowGreen YellowOrange ZHIGH ZLOW addpenarc addpenline align allowstepping angularsystem animationdelay appendsuffix arcarrowangle arcarrowfactor arrow2sizelimit arrowangle arrowbarb arrowdir arrowfactor arrowhookfactor arrowlength arrowsizelimit arrowtexfactor authorpen axis axiscoverage axislabelfactor background backgroundcolor backgroundpen barfactor barmarksizefactor basealign baselinetemplate bernstein beveljoin bigvertexpen bigvertexsize black blue bm bottom bp bracedefaultratio braceinnerangle bracemidangle braceouterangle brown bullet byfoci byvertices camerafactor chartreuse circlemarkradiusfactor circlenodesnumberfactor circleprecision circlescale cm codefile codepen codeskip colorPen coloredNodes coloredSegments conditionlength conicnodesfactor count cputimeformat crossmarksizefactor currentcoordsys currentlight currentpatterns currentpen currentpicture currentposition currentprojection curvilinearsystem cuttings cyan darkblue darkbrown darkcyan darkgray darkgreen darkgrey darkmagenta darkolive darkred dashdotted dashed datepen dateskip debuggerlines debugging deepblue deepcyan deepgray deepgreen deepgrey deepmagenta deepred default defaultControl defaultS defaultbackpen defaultcoordsys defaultexcursion defaultfilename defaultformat defaultmassformat defaultpen defaultseparator diagnostics differentlengths dot dotfactor dotframe dotted doublelinepen doublelinespacing down duplicateFuzz ellipsenodesnumberfactor eps epsgeo epsilon evenodd expansionfactor extendcap fermionpen figureborder figuremattpen file3 firstnode firststep foregroundcolor fuchsia fuzz gapfactor ghostpen gluonamplitude gluonpen gluonratio gray green grey hatchepsilon havepagenumber heavyblue heavycyan heavygray heavygreen heavygrey heavymagenta heavyred hline hwratio hyperbolanodesnumberfactor identity4 ignore inXasyMode inch inches includegraphicscommand inf infinity institutionpen intMax intMin invert invisible itempen itemskip itemstep labelmargin landscape lastnode left legendhskip legendlinelength legendmargin legendmarkersize legendmaxrelativewidth legendvskip lightblue lightcyan lightgray lightgreen lightgrey lightmagenta lightolive lightred lightyellow linemargin lm_infmsg lm_shortmsg longdashdotted longdashed magenta magneticRadius mantissaBits markangleradius markangleradiusfactor markanglespace markanglespacefactor maxrefinements mediumblue mediumcyan mediumgray mediumgreen mediumgrey mediummagenta mediumred mediumyellow middle minDistDefault minblockheight minblockwidth mincirclediameter minipagemargin minipagewidth minvertexangle miterjoin mm momarrowfactor momarrowlength momarrowmargin momarrowoffset momarrowpen monoPen morepoints nCircle 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 springgreen sqrtEpsilon squarecap squarepen startposition stdin stdout stepfactor stepfraction steppagenumberpen stepping stickframe stickmarksizefactor stickmarkspacefactor swap textpen ticksize tildeframe tildemarksizefactor tinv titlealign titlepagepen titlepageposition titlepen titleskip top trailingzero treeLevelStep treeMinNodeWidth treeNodeStep trembleAngle trembleFrequency trembleRandom undefined unitcircle unitsquare up urlpen urlskip version vertexpen vertexsize viewportmargin viewportsize vline white wye xformStack yellow ylabelwidth zerotickfuzz zerowinding ))
+AliceBlue Align Allow AntiqueWhite Apricot Aqua Aquamarine Aspect Azure BeginPoint Beige Bisque Bittersweet Black BlanchedAlmond Blue BlueGreen BlueViolet Both Break BrickRed Brown BurlyWood BurntOrange CCW CW CadetBlue CarnationPink Center Centered Cerulean Chartreuse Chocolate Coeff Coral CornflowerBlue Cornsilk Crimson Crop Cyan Dandelion DarkBlue DarkCyan DarkGoldenrod DarkGray DarkGreen DarkKhaki DarkMagenta DarkOliveGreen DarkOrange DarkOrchid DarkRed DarkSalmon DarkSeaGreen DarkSlateBlue DarkSlateGray DarkTurquoise DarkViolet DeepPink DeepSkyBlue DefaultHead DimGray DodgerBlue Dotted Down Draw E ENE EPS ESE E_Euler E_PC E_RK2 E_RK3BS Emerald EndPoint Euler Fill FillDraw FireBrick FloralWhite ForestGreen Fuchsia Gainsboro GhostWhite Gold Goldenrod Gray Green GreenYellow Honeydew HookHead Horizontal HotPink I IgnoreAspect IndianRed Indigo Ivory JOIN_IN JOIN_OUT JungleGreen Khaki LM_DWARF LM_MACHEP LM_SQRT_DWARF LM_SQRT_GIANT LM_USERTOL Label Lavender LavenderBlush LawnGreen Left LeftJustified LeftSide LemonChiffon LightBlue LightCoral LightCyan LightGoldenrodYellow LightGreen LightGrey LightPink LightSalmon LightSeaGreen LightSkyBlue LightSlateGray LightSteelBlue LightYellow Lime LimeGreen Linear Linen Log Logarithmic Magenta Mahogany Mark MarkFill MarkPath Maroon Max MediumAquamarine MediumBlue MediumOrchid MediumPurple MediumSeaGreen MediumSlateBlue MediumSpringGreen MediumTurquoise MediumVioletRed Melon MidPoint MidnightBlue Min MintCream MistyRose Moccasin Move MoveQuiet Mulberry N NE NNE NNW NULL_VERTEX NW NavajoWhite Navy NavyBlue NoAlign NoCrop NoFill NoSide OldLace Olive OliveDrab OliveGreen Orange OrangeRed Orchid Ox Oy PC PaleGoldenrod PaleGreen PaleTurquoise PaleVioletRed PapayaWhip Peach PeachPuff Periwinkle Peru PineGreen Pink Plum PowderBlue ProcessBlue Purple RK2 RK3 RK3BS RK4 RK5 RK5DP RK5F RawSienna Red RedOrange RedViolet Rhodamine Right RightJustified RightSide RosyBrown RoyalBlue RoyalPurple RubineRed S SE SSE SSW SW SaddleBrown Salmon SandyBrown SeaGreen Seashell Sepia Sienna Silver SimpleHead SkyBlue SlateBlue SlateGray Snow SpringGreen SteelBlue Suppress SuppressQuiet Tan TeXHead Teal TealBlue Thistle Ticksize Tomato Turquoise UnFill Up VERSION Value Vertical Violet VioletRed W WNW WSW Wheat White WhiteSmoke WildStrawberry XHIGH XLOW XYAlign YAlign YHIGH YLOW Yellow YellowGreen YellowOrange ZHIGH ZLOW addpenarc addpenline align allowstepping angularsystem animationdelay appendsuffix arcarrowangle arcarrowfactor arrow2sizelimit arrowangle arrowbarb arrowdir arrowfactor arrowhookfactor arrowlength arrowsizelimit arrowtexfactor authorpen axis axiscoverage axislabelfactor background backgroundcolor backgroundpen barfactor barmarksizefactor basealign baselinetemplate bernstein beveljoin bigvertexpen bigvertexsize black blue bm bottom bp bracedefaultratio braceinnerangle bracemidangle braceouterangle brown bullet byfoci byvertices camerafactor chartreuse circlemarkradiusfactor circlenodesnumberfactor circleprecision circlescale cm codefile codepen codeskip colorPen coloredNodes coloredSegments conditionlength conicnodesfactor count cputimeformat crossmarksizefactor currentcoordsys currentlight currentpatterns currentpen currentpicture currentposition currentprojection curvilinearsystem cuttings cyan darkblue darkbrown darkcyan darkgray darkgreen darkgrey darkmagenta darkolive darkred dashdotted dashed datepen dateskip debuggerlines debugging deepblue deepcyan deepgray deepgreen deepgrey deepmagenta deepred default defaultControl defaultS defaultbackpen defaultcoordsys defaultexcursion defaultfilename defaultformat defaultmassformat defaultpen defaultseparator diagnostics differentlengths dot dotfactor dotframe dotted doublelinepen doublelinespacing down duplicateFuzz ellipsenodesnumberfactor eps epsgeo epsilon evenodd expansionfactor extendcap fermionpen figureborder figuremattpen file3 firstnode firststep foregroundcolor fuchsia fuzz gapfactor ghostpen gluonamplitude gluonpen gluonratio gray green grey hatchepsilon havepagenumber heavyblue heavycyan heavygray heavygreen heavygrey heavymagenta heavyred hline hwratio hyperbolanodesnumberfactor identity4 ignore inXasyMode inch inches includegraphicscommand inf infinity institutionpen intMax intMin invert invisible itempen itemskip itemstep labelmargin landscape lastnode left legendhskip legendlinelength legendmargin legendmarkersize legendmaxrelativewidth legendvskip lightblue lightcyan lightgray lightgreen lightgrey lightmagenta lightolive lightred lightyellow linemargin lm_infmsg lm_shortmsg longdashdotted longdashed magenta magneticRadius mantissaBits markangleradius markangleradiusfactor markanglespace markanglespacefactor maxrefinements mediumblue mediumcyan mediumgray mediumgreen mediumgrey mediummagenta mediumred mediumyellow middle minDistDefault minblockheight minblockwidth mincirclediameter minipagemargin minipagewidth minvertexangle miterjoin mm momarrowfactor momarrowlength momarrowmargin momarrowoffset momarrowpen monoPen morepoints nCircle 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 undefined unitcircle unitsquare up urlpen urlskip version vertexpen vertexsize viewportmargin viewportsize vline white wye xformStack yellow ylabelwidth zerotickfuzz zerowinding ))
diff --git a/Build/source/utils/asymptote/asy.list b/Build/source/utils/asymptote/asy.list
index 760416ee9a5..6df7c4735e3 100644
--- a/Build/source/utils/asymptote/asy.list
+++ b/Build/source/utils/asymptote/asy.list
@@ -250,12 +250,12 @@ 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(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(object[] a, object key, bool less(object, object));
-int search(Legend[] a, Legend key, bool less(Legend, Legend));
int search(frame[] a, frame key, bool less(frame, frame));
int search(coord[] a, coord key, bool less(coord, coord));
int search(Label[] a, Label key, bool less(Label, Label));
@@ -398,8 +398,8 @@ 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(explicit light light);
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;
@@ -425,11 +425,11 @@ 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));
-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);
+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;
framedTransformStack xformStack;
@@ -559,6 +559,7 @@ 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);
@@ -576,10 +577,10 @@ pen[][] map(pen[] f(pen[]), pen[][] a);
triple[] map(triple f(triple), triple[] a);
pen[] map(pen f(pen), pen[] a);
object[] map(object f(object), object[] a);
-Legend[] map(Legend f(Legend), Legend[] a);
pair[] map(pair f(pair), pair[] a);
coord[] map(coord f(coord), coord[] a);
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);
@@ -701,13 +702,13 @@ void add(picture dest=<default>, frame src, pair position, pair align, bool grou
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 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>, void d(picture, transform), bool exact=<default>);
@@ -720,6 +721,7 @@ 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>);
@@ -876,7 +878,6 @@ void write(file file=<default>, string s=<default>, guide x, void suffix(file)=<
void write(file file=<default>, string s=<default>, pen x, void suffix(file)=<default> ... pen[]);
void write(file file, string s=<default>, explicit guide[] x, void suffix(file)=<default>);
void write(string s=<default>, cputime c, string format=<default>, void suffix(file)=<default>);
-void write(pairOrTriple a);
void write(string s=<default>, explicit path[] x, void suffix(file)=<default>);
void write(file file, void suffix(file)=<default>);
void write(file file=<default>, string s=<default>, pen[] p);
@@ -884,6 +885,7 @@ 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, 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(string s=<default>, explicit guide[] x, void suffix(file)=<default>);
@@ -940,11 +942,11 @@ string blend(pen p);
arrowhead HookHead;
arrowhead HookHead(real dir=<default>, real barb=<default>);
real[] concat(... real[][]);
+Legend[] concat(... Legend[][]);
pair[] concat(... pair[][]);
coord[] concat(... coord[][]);
pen[] concat(... pen[][]);
object[] concat(... object[][]);
-Legend[] concat(... Legend[][]);
path[] concat(... path[][]);
coord[] concat(... coord[][]);
Label[] concat(... Label[][]);
@@ -966,15 +968,15 @@ bool alias(pair[][] a, pair[][] b);
bool alias(guide[] a, guide[] b);
bool alias(marginT a, marginT b);
bool alias(coord[] a, coord[] b);
-bool alias(projection a, projection 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(scaling a, scaling b);
bool alias(bounds a, bounds b);
-bool alias(scaleT a, scaleT b);
-bool alias(Legend a, Legend 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);
@@ -982,12 +984,12 @@ 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(pairOrTriple a, pairOrTriple b);
+bool alias(transformation a, transformation 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(light a, light b);
+bool alias(coords3 a, coords3 b);
bool alias(picture a, picture b);
bool alias(position a, position b);
bool alias(picture[] a, picture[] b);
@@ -996,20 +998,19 @@ bool alias(string[] a, string[] b);
bool alias(frame[] a, frame[] b);
bool alias(coords2 a, coords2 b);
bool alias(coord a, coord b);
-bool alias(autoscaleT a, autoscaleT b);
+bool alias(ScaleT a, ScaleT b);
bool alias(bool[] a, bool[] b);
bool alias(void()()[] a, void()()[] b);
bool alias(pen[][] a, pen[][] b);
bool alias(filltype a, filltype b);
bool alias(freezableBounds a, freezableBounds b);
-bool alias(transformation a, transformation b);
+bool alias(projection a, projection b);
bool alias(align a, align b);
bool alias(object[] a, object[] b);
-bool alias(Legend[] a, Legend[] b);
bool alias(path[] a, path[] b);
bool alias(triple[] a, triple[] b);
bool alias(coord a, coord b);
-bool alias(coords3 a, coords3 b);
+bool alias(scaleT a, scaleT b);
bool alias(Label a, Label b);
bool alias(marker[] a, marker[] b);
bool alias(processtime a, processtime b);
@@ -1017,8 +1018,9 @@ bool alias(real[] a, real[] b);
bool alias(pen[] a, pen[] b);
bool alias(hsv a, hsv b);
bool alias(scaling a, scaling b);
-bool alias(ScaleT a, ScaleT b);
+bool alias(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;
@@ -1050,11 +1052,11 @@ 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[]));
object[] sort(object[] a, bool less(object, object));
-Legend[] sort(Legend[] a, bool less(Legend, Legend));
guide[] sort(guide[] a, bool less(guide, guide));
real[][] sort(real[][] a, bool less(real[], real[]));
triple[] sort(triple[] a, bool less(triple, triple));
@@ -1170,6 +1172,7 @@ 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>);
@@ -1376,35 +1379,35 @@ pen operator init();
frame operator init();
file operator init();
marginT operator init();
-projection operator init();
+light operator init();
side operator init();
marker operator init();
filltype operator init();
-transformation operator init();
+projection operator init();
align operator init();
slice operator init();
coords2 operator init();
-pairOrTriple operator init();
+transformation operator init();
framedTransformStack operator init();
hsv operator init();
scaling operator init();
-ScaleT operator init();
+Legend operator init();
indexedTransform operator init();
coords2 operator init();
coord operator init();
-autoscaleT operator init();
+ScaleT operator init();
scaling operator init();
bounds operator init();
-scaleT operator init();
-Legend operator init();
+autoscaleT operator init();
+pairOrTriple operator init();
object operator init();
cputime operator init();
coord operator init();
-coords3 operator init();
+scaleT operator init();
Label operator init();
processtime operator init();
bool3 operator init();
-light operator init();
+coords3 operator init();
picture operator init();
position operator init();
arrowhead operator init();
@@ -1453,6 +1456,8 @@ 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);
bool3[] operator cast(bool[] b);
align operator cast(side side);
@@ -1470,8 +1475,6 @@ path[] operator cast(pair[] z);
path[] operator cast(path p);
bool[] operator cast(bool3[] b);
align operator cast(triple dir);
-pair operator cast(pairOrTriple a);
-triple operator cast(pairOrTriple a);
bool3 operator cast(bool b);
pen operator cast(hsv hsv);
position operator cast(int x);
@@ -1576,40 +1579,40 @@ bool operator ==(file a, file b);
bool operator ==(path a, path b);
bool operator ==(path3 a, path3 b);
bool operator ==(bool3 a, bool3 b);
-bool operator ==(light a, light b);
+bool operator ==(coords3 a, coords3 b);
bool operator ==(picture a, picture b);
bool operator ==(position a, position b);
bool operator ==(arrowhead a, arrowhead b);
bool operator ==(coords2 a, coords2 b);
bool operator ==(coord a, coord b);
-bool operator ==(autoscaleT a, autoscaleT b);
+bool operator ==(ScaleT a, ScaleT b);
bool operator ==(filltype a, filltype b);
bool operator ==(freezableBounds a, freezableBounds b);
-bool operator ==(transformation a, transformation b);
+bool operator ==(projection a, projection b);
bool operator ==(align a, align b);
bool operator ==(coord a, coord b);
-bool operator ==(coords3 a, coords3 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 ==(scaling a, scaling b);
-bool operator ==(ScaleT a, ScaleT 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 ==(projection a, projection b);
+bool operator ==(light a, light b);
bool operator ==(side a, side b);
bool operator ==(marker a, marker b);
bool operator ==(scaling a, scaling b);
bool operator ==(bounds a, bounds b);
-bool operator ==(scaleT a, scaleT b);
-bool operator ==(Legend a, Legend b);
+bool operator ==(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 ==(pairOrTriple a, pairOrTriple b);
+bool operator ==(transformation a, transformation b);
bool operator ==(framedTransformStack a, framedTransformStack b);
bool operator !=(bool a, bool b);
bool[] operator !=(bool a, bool[] b);
@@ -1648,40 +1651,40 @@ bool operator !=(file a, file b);
bool operator !=(path a, path b);
bool operator !=(path3 a, path3 b);
bool operator !=(bool3 a, bool3 b);
-bool operator !=(light a, light b);
+bool operator !=(coords3 a, coords3 b);
bool operator !=(picture a, picture b);
bool operator !=(position a, position b);
bool operator !=(arrowhead a, arrowhead b);
bool operator !=(coords2 a, coords2 b);
bool operator !=(coord a, coord b);
-bool operator !=(autoscaleT a, autoscaleT b);
+bool operator !=(ScaleT a, ScaleT b);
bool operator !=(filltype a, filltype b);
bool operator !=(freezableBounds a, freezableBounds b);
-bool operator !=(transformation a, transformation b);
+bool operator !=(projection a, projection b);
bool operator !=(align a, align b);
bool operator !=(coord a, coord b);
-bool operator !=(coords3 a, coords3 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 !=(scaling a, scaling b);
-bool operator !=(ScaleT a, ScaleT 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 !=(projection a, projection b);
+bool operator !=(light a, light b);
bool operator !=(side a, side b);
bool operator !=(marker a, marker b);
bool operator !=(scaling a, scaling b);
bool operator !=(bounds a, bounds b);
-bool operator !=(scaleT a, scaleT b);
-bool operator !=(Legend a, Legend b);
+bool operator !=(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 !=(pairOrTriple a, pairOrTriple b);
+bool operator !=(transformation a, transformation b);
bool operator !=(framedTransformStack a, framedTransformStack b);
bool operator <(int a, int b);
bool[] operator <(int a, int[] b);
@@ -1960,6 +1963,7 @@ bool shipped;
pair[] fft(pair[] a, int sign=<default>);
pair SE;
pen nobasealign;
+sCAD operator init();
real animationdelay;
animation operator init();
frame NoBox(frame f);
@@ -2006,16 +2010,6 @@ bsp operator init();
picture operator cast(face f);
face operator cast(path3 p);
void add(picture pic=<default>, face[] faces, projection P=<default>);
-sCAD operator init();
-surface surface(vertex[][] g);
-weighted operator init();
-bucket operator init();
-vertex operator init();
-object operator init();
-vertex[][] contour3(triple[][][] v, real[][][] f, real[][][] midpoint=<default>, projection P=<default>);
-vertex[][] contour3(real[][][] f, real[][][] midpoint=<default>, triple a, triple b, projection P=<default>);
-vertex[][] contour3(real f(real, real, real), triple a, triple b, int nx=<default>, int ny=<default>, int nz=<default>, projection P=<default>);
-real eps;
segment case1(pair p0, pair p1, int edge);
void draw(picture pic=<default>, Label[] L=<default>, guide[][] g, pen[] p);
void draw(picture pic=<default>, Label[] L=<default>, guide[][] g, pen p=<default>);
@@ -2035,6 +2029,15 @@ guide[][] contour(real f(real, real), pair a, pair b, real[] c, int nx=<default>
guide[][] contour(real f(pair), pair a, pair b, real[] c, int nx=<default>, int ny=<default>, guide join(... guide[])=<default>);
guide[][] contour(pair[] z, real[] f, real[] c, guide join(... guide[])=<default>);
real eps;
+surface surface(vertex[][] g);
+weighted operator init();
+bucket operator init();
+vertex operator init();
+object operator init();
+vertex[][] contour3(triple[][][] v, real[][][] f, real[][][] midpoint=<default>, projection P=<default>);
+vertex[][] contour3(real[][][] f, real[][][] midpoint=<default>, triple a, triple b, projection P=<default>);
+vertex[][] contour3(real f(real, real, real), triple a, triple b, int nx=<default>, int ny=<default>, int nz=<default>, projection P=<default>);
+real eps;
void draw(TreeNode root, pair pos);
real treeNodeStep;
void drawAll(TreeNode node, frame f);
@@ -2353,8 +2356,8 @@ 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>);
-bool between(point M, point O, point N);
real epsgeo;
+bool between(point M, point O, point N);
real sharpangle(line l1, line l2);
bool isparabola(bqe bqe);
real sharpdegrees(line l1, line l2);
@@ -2440,9 +2443,6 @@ 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>);
@@ -2658,6 +2658,9 @@ mass operator /(explicit mass M, real x);
mass operator /(explicit mass M, int x);
transform scaleO(real x);
real operator ^(point M, explicit circle c);
+segment segment(point A, point B);
+segment segment(line l);
+segment segment(explicit side side);
bool operator ==(coordsys c1, coordsys c2);
bool operator ==(explicit point M, explicit point N);
bool operator ==(explicit vector u, explicit vector v);
@@ -2730,10 +2733,10 @@ transform rotate(explicit vector dir);
transform rotate(explicit point dir);
real EPS;
transform rotateO(real a);
-real[] bangles(picture pic=<default>, parabola p);
-real[][] bangles(picture pic=<default>, hyperbola h);
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);
@@ -2759,7 +2762,6 @@ 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);
-point isogonalconjugate(triangle t, point M);
line tangent(circle c, abscissa x);
line tangent(circle c, point M);
line tangent(circle c, explicit vector v);
@@ -2768,14 +2770,15 @@ 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);
-point isogonal(side side, point M);
-line isogonal(vertex V, point M);
-triangle isogonal(triangle t, point M);
line[] tangents(circle c, point M);
line[] tangents(ellipse el, point M);
line[] tangents(parabola p, point M);
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);
@@ -2805,118 +2808,6 @@ abscissa curabscissa(ellipse el, point M);
abscissa curabscissa(parabola p, point M);
abscissa curabscissa(conic co, point M);
abscissa curabscissa(arc a, point M);
-locateT operator init();
-void Straight(flatguide3)(... void(flatguide3)[]);
-void graph(flatguide3)(triple F(real), real, real, int)(void join(flatguide3)(... void(flatguide3)[]));
-void(flatguide3)[] graph(triple F(real), real, real, int)(void join(flatguide3)(... void(flatguide3)[]), bool3 cond(real));
-void graph(flatguide3)(picture pic=<default>, real x(real), real y(real), real z(real), real a, real b, int n=<default>, void join(flatguide3)(... void(flatguide3)[])=<default>);
-void(flatguide3)[] graph(picture pic=<default>, real x(real), real y(real), real z(real), real a, real b, int n=<default>, bool3 cond(real), void join(flatguide3)(... void(flatguide3)[])=<default>);
-void graph(flatguide3)(picture pic=<default>, triple v(real), real a, real b, int n=<default>, void join(flatguide3)(... void(flatguide3)[])=<default>);
-void(flatguide3)[] graph(picture pic=<default>, triple v(real), real a, real b, int n=<default>, bool3 cond(real), void join(flatguide3)(... void(flatguide3)[])=<default>);
-void graph(flatguide3)(picture pic=<default>, triple[] v, void join(flatguide3)(... void(flatguide3)[])=<default>);
-void(flatguide3)[] graph(picture pic=<default>, triple[] v, bool3[] cond, void join(flatguide3)(... void(flatguide3)[])=<default>);
-void graph(flatguide3)(picture pic=<default>, real[] x, real[] y, real[] z, void join(flatguide3)(... void(flatguide3)[])=<default>);
-void(flatguide3)[] graph(picture pic=<default>, real[] x, real[] y, real[] z, bool3[] cond, void join(flatguide3)(... void(flatguide3)[])=<default>);
-void graph(flatguide3)(triple F(path, real), path p, int n=<default>, void join(flatguide3)(... void(flatguide3)[])=<default>);
-void graph(flatguide3)(triple F(pair), path p, int n=<default>, void join(flatguide3)(... void(flatguide3)[])=<default>);
-void graph(flatguide3)(picture pic=<default>, real f(pair), path p, int n=<default>, void join(flatguide3)(... void(flatguide3)[])=<default>);
-void graph(flatguide3)(real f(pair), path p, int n=<default>, real T(pair), void join(flatguide3)(... void(flatguide3)[])=<default>);
-void(flatguide3)[][] lift(real f(real x, real y), guide[][] g, void join(flatguide3)(... void(flatguide3)[])=<default>);
-void(flatguide3)[][] lift(real f(pair z), guide[][] g, void join(flatguide3)(... void(flatguide3)[])=<default>);
-triple polar(real r, real theta, real phi);
-void polargraph(flatguide3)(real r(real, real), real theta(real), real phi(real), int n=<default>, void join(flatguide3)(... void(flatguide3)[])=<default>);
-void xaxis3At(picture pic=<default>, Label L=<default>, void axis(picture, axisT), real xmin=<default>, real xmax=<default>, pen p=<default>, void ticks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)=<default>, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>, bool above=<default>, bool opposite=<default>, bool opposite2=<default>, bool primary=<default>);
-void yaxis3At(picture pic=<default>, Label L=<default>, void axis(picture, axisT), real ymin=<default>, real ymax=<default>, pen p=<default>, void ticks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)=<default>, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>, bool above=<default>, bool opposite=<default>, bool opposite2=<default>, bool primary=<default>);
-void zaxis3At(picture pic=<default>, Label L=<default>, void axis(picture, axisT), real zmin=<default>, real zmax=<default>, pen p=<default>, void ticks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)=<default>, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>, bool above=<default>, bool opposite=<default>, bool opposite2=<default>, bool primary=<default>);
-void xaxis3(picture pic=<default>, Label L=<default>, void axis(picture, axisT)=<default>, real xmin=<default>, real xmax=<default>, pen p=<default>, void ticks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)=<default>, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>, bool above=<default>);
-void yaxis3(picture pic=<default>, Label L=<default>, void axis(picture, axisT)=<default>, real ymin=<default>, real ymax=<default>, pen p=<default>, void ticks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)=<default>, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>, bool above=<default>);
-void zaxis3(picture pic=<default>, Label L=<default>, void axis(picture, axisT)=<default>, real zmin=<default>, real zmax=<default>, pen p=<default>, void ticks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)=<default>, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>, bool above=<default>);
-bool uperiodic(triple[][] a);
-bool vperiodic(triple[][] a);
-void OutTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)(Label format=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, int N=<default>, int n=<default>, real Step=<default>, real step=<default>, bool begin=<default>, bool end=<default>, tickvalues modify(tickvalues)=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
-void OutTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)(Label format=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, real[] Ticks, real[] ticks=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
-void OutTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>);
-void axis(picture pic=<default>, Label L=<default>, path3 g, path3 g2=<default>, pen p=<default>, void ticks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>), ticklocate locate, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>, int[] divisor=<default>, bool above=<default>, bool opposite=<default>);
-void Bounds(picture, axisT)(int type=<default>, int type2=<default>, triple align=<default>, bool extend=<default>);
-void Bounds(picture, axisT);
-void XZZero(picture, axisT)(triple align=<default>, bool extend=<default>);
-void XZZero(picture, axisT);
-void YZZero(picture, axisT)(triple align=<default>, bool extend=<default>);
-void YZZero(picture, axisT);
-surface surface(triple[][] f, bool[][] cond=<default>);
-surface surface(real[][] f, real[] x, real[] y, real[] xsplinetype(real[], real[])=<default>, real[] ysplinetype(real[], real[])=<default>, bool[][] cond=<default>);
-surface surface(real[][] f, pair a, pair b, real[] xsplinetype(real[], real[]), real[] ysplinetype(real[], real[])=<default>, bool[][] cond=<default>);
-surface surface(real[][] f, pair a, pair b, bool[][] cond=<default>);
-surface surface(triple f(pair z), pair a, pair b, int nu=<default>, int nv=<default>, bool cond(pair z)=<default>);
-surface surface(triple f(pair z), pair a, pair b, int nu=<default>, int nv=<default>, real[](real[], real[])[] usplinetype, real[](real[], real[])[] vsplinetype=<default>, bool cond(pair z)=<default>);
-surface surface(real f(pair z), pair a, pair b, int nx=<default>, int ny=<default>, bool cond(pair z)=<default>);
-surface surface(real f(pair z), pair a, pair b, int nx=<default>, int ny=<default>, real[] xsplinetype(real[], real[]), real[] ysplinetype(real[], real[])=<default>, bool cond(pair z)=<default>);
-void XYEquals(picture, axisT)(real x, real y, triple align=<default>, bool extend=<default>);
-triple Dir(real)(triple dir);
-void draw(picture pic=<default>, Label[] L=<default>, void(flatguide3)[][] g, pen[] p, light light=<default>, string name=<default>, render render=<default>, interaction interaction=<default>);
-void draw(picture pic=<default>, Label[] L=<default>, void(flatguide3)[][] g, pen p=<default>, light light=<default>, string name=<default>, render render=<default>, interaction interaction=<default>);
-void Ticks3(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)(int sign, Label F=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, real[] Ticks=<default>, real[] ticks=<default>, int N=<default>, bool begin=<default>, bool end=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
-void Ticks3(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)(int sign, Label F=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, int N, int n=<default>, real Step=<default>, real step=<default>, bool begin=<default>, bool end=<default>, tickvalues modify(tickvalues)=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
-real maxlength(triple f(pair z), pair a, pair b, int nu, int nv);
-void drawtick(picture pic, real[][] T, path3 g, path3 g2, ticklocate locate, real val, real Size, int sign, pen p, bool extend);
-triple tickMin3(picture pic);
-triple tickMax3(picture pic);
-triple Scale(picture pic=<default>, triple v);
-real ScaleZ(picture pic=<default>, real z);
-picture vectorfield(path3 vector(pair v), triple f(pair z), pair a, pair b, int nu=<default>, int nv=<default>, bool truesize=<default>, real maxlength=<default>, bool cond(pair z)=<default>, pen p=<default>, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>, string name=<default>, render render=<default>);
-path3 Circle(triple c, real r, triple normal=<default>, int n=<default>);
-void InTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)(Label format=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, int N=<default>, int n=<default>, real Step=<default>, real step=<default>, bool begin=<default>, bool end=<default>, tickvalues modify(tickvalues)=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
-void InTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)(Label format=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, real[] Ticks, real[] ticks=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
-void InTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>);
-void Spline(flatguide3)(... void(flatguide3)[]);
-void InOutTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)(Label format=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, int N=<default>, int n=<default>, real Step=<default>, real step=<default>, bool begin=<default>, bool end=<default>, tickvalues modify(tickvalues)=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
-void InOutTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)(Label format=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, real[] Ticks, real[] ticks=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
-void InOutTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>);
-void axes3(picture pic=<default>, Label xlabel=<default>, Label ylabel=<default>, Label zlabel=<default>, bool extend=<default>, triple min=<default>, triple max=<default>, pen p=<default>, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>);
-void label(picture pic, Label L, triple v, real x, align align, string format, pen p);
-void labelx(picture pic=<default>, Label L=<default>, triple v, align align=<default>, string format=<default>, pen p=<default>);
-void labelx3(picture pic=<default>, Label L=<default>, real x, align align=<default>, string format=<default>, pen p=<default>);
-void labeltick(picture pic, real[][] T, path3 g, ticklocate locate, real val, int sign, real Size, string ticklabel(real), Label F, real norm=<default>);
-void labelaxis(picture pic, real[][] T, Label L, path3 g, ticklocate locate=<default>, int sign=<default>, bool ticklabels=<default>);
-void labely(picture pic=<default>, Label L=<default>, triple v, align align=<default>, string format=<default>, pen p=<default>);
-void labely3(picture pic=<default>, Label L=<default>, real y, align align=<default>, string format=<default>, pen p=<default>);
-void labelz(picture pic=<default>, Label L=<default>, triple v, align align=<default>, string format=<default>, pen p=<default>);
-void labelz3(picture pic=<default>, Label L=<default>, real z, align align=<default>, string format=<default>, pen p=<default>);
-void autoscale3(picture pic=<default>, void axis(picture, axisT));
-void xtick(picture pic=<default>, triple v, triple dir=<default>, real size=<default>, pen p=<default>);
-void xtick(picture pic=<default>, Label L, triple v, triple dir=<default>, string format=<default>, real size=<default>, pen p=<default>);
-void xtick3(picture pic=<default>, real x, triple dir=<default>, real size=<default>, pen p=<default>);
-void xtick3(picture pic=<default>, Label L, real x, triple dir=<default>, string format=<default>, real size=<default>, pen p=<default>);
-void ytick(picture pic=<default>, triple v, triple dir=<default>, real size=<default>, pen p=<default>);
-void ytick(picture pic=<default>, Label L, triple v, triple dir=<default>, string format=<default>, real size=<default>, pen p=<default>);
-void ytick3(picture pic=<default>, real y, triple dir=<default>, real size=<default>, pen p=<default>);
-void ytick3(picture pic=<default>, Label L, real y, triple dir=<default>, string format=<default>, real size=<default>, pen p=<default>);
-void ztick(picture pic=<default>, triple v, triple dir=<default>, real size=<default>, pen p=<default>);
-void ztick(picture pic=<default>, Label L, triple v, triple dir=<default>, string format=<default>, real size=<default>, pen p=<default>);
-void ztick3(picture pic=<default>, real z, triple dir=<default>, real size=<default>, pen p=<default>);
-void ztick3(picture pic=<default>, Label L, real z, triple dir=<default>, string format=<default>, real size=<default>, pen p=<default>);
-triple zero3(real);
-triple defaultdir(triple X, triple Y, triple Z, bool opposite=<default>, projection P);
-real xtrans(real[][] t, real x);
-real ytrans(real[][] t, real y);
-real ztrans(real[][] t, real z);
-ticklocate ticklocate(real a, real b, autoscaleT S=<default>, real tickmin=<default>, real tickmax=<default>, real time(real)=<default>, triple dir(real));
-triple ticklabelshift(triple align, pen p=<default>);
-path3 Arc(triple c, triple v1, triple v2, triple normal=<default>, bool direction=<default>, int n=<default>);
-path3 Arc(triple c, real r, real theta1, real phi1, real theta2, real phi2, triple normal=<default>, bool direction, int n=<default>);
-path3 Arc(triple c, real r, real theta1, real phi1, real theta2, real phi2, triple normal=<default>, int n=<default>);
-void limits(picture pic=<default>, triple min, triple max);
-void XZEquals(picture, axisT)(real x, real z, triple align=<default>, bool extend=<default>);
-void YZEquals(picture, axisT)(real y, real z, triple align=<default>, bool extend=<default>);
-void XYZero(picture, axisT)(triple align=<default>, bool extend=<default>);
-void XYZero(picture, axisT);
-void zlimits(picture pic=<default>, real min=<default>, real max=<default>, bool crop=<default>);
-void tick(picture pic=<default>, triple v, triple dir, real size=<default>, pen p=<default>);
-void tick(picture pic=<default>, Label L, real value, triple v, triple dir, string format=<default>, real size=<default>, pen p=<default>);
-surface bispline(real[][] z, real[][] p, real[][] q, real[][] r, real[] x, real[] y, bool[][] cond=<default>);
-path3[] segment(triple[] v, bool[] cond, void join(flatguide3)(... void(flatguide3)[])=<default>);
-void NoTicks3(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)();
-void NoTicks3(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>);
string DefaultFormat(real);
string DefaultLogFormat(real)(int base);
string DefaultLogFormat(real);
@@ -2944,6 +2835,9 @@ axisT axis;
void axis(picture pic=<default>, Label L=<default>, path g, path g2=<default>, pen p=<default>, void ticks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>), ticklocate locate, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, int[] divisor=<default>, bool above=<default>, bool opposite=<default>);
void drawtick(frame f, transform T, path g, path g2, ticklocate locate, real val, real Size, int sign, pen p, bool extend);
real maxlength(pair a, pair b, int nx, int ny);
+tickvalues OmitTickIntervals(tickvalues)(real[] a, real[] b);
+tickvalues OmitTickInterval(tickvalues)(real a, real b);
+tickvalues OmitTick(tickvalues)(... real[] x);
void errorbar(picture pic, pair z, pair dp, pair dm, pen p=<default>, real size=<default>);
void errorbars(picture pic=<default>, pair[] z, pair[] dp, pair[] dm=<default>, bool[] cond=<default>, pen p=<default>, real size=<default>);
void errorbars(picture pic=<default>, real[] x, real[] y, real[] dpx, real[] dpy, real[] dmx=<default>, real[] dmy=<default>, bool[] cond=<default>, pen p=<default>, real size=<default>);
@@ -2958,9 +2852,6 @@ void crop(picture pic=<default>);
picture vectorfield(path vector(real), path g, int n, bool truesize=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>);
picture vectorfield(path vector(pair), pair a, pair b, int nx=<default>, int ny=<default>, bool truesize=<default>, real maxlength=<default>, bool cond(pair z)=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>);
string OmitFormat(real)(string s=<default> ... real[] x);
-tickvalues OmitTickIntervals(tickvalues)(real[] a, real[] b);
-tickvalues OmitTickInterval(tickvalues)(real a, real b);
-tickvalues OmitTick(tickvalues)(... real[] x);
guide Straight(... guide[]);
int Min;
string trailingzero;
@@ -2971,11 +2862,11 @@ void labelx(picture pic=<default>, Label L, string format=<default>, explicit pe
path Arc(pair c, real r, real angle1, real angle2, bool direction, int n=<default>);
path Arc(pair c, real r, real angle1, real angle2, int n=<default>);
path Arc(pair c, explicit pair z1, explicit pair z2, bool direction=<default>, int n=<default>);
-pair labeltick(frame d, transform T, path g, ticklocate locate, real val, pair side, int sign, real Size, string ticklabel(real), Label F, real norm=<default>);
-void labelaxis(frame f, transform T, Label L, path g, ticklocate locate=<default>, int sign=<default>, bool ticklabels=<default>);
void labely(picture pic=<default>, Label L=<default>, explicit pair z, align align=<default>, string format=<default>, pen p=<default>);
void labely(picture pic=<default>, Label L=<default>, real y, align align=<default>, string format=<default>, pen p=<default>);
void labely(picture pic=<default>, Label L, string format=<default>, explicit pen p=<default>);
+pair labeltick(frame d, transform T, path g, ticklocate locate, real val, pair side, int sign, real Size, string ticklabel(real), Label F, real norm=<default>);
+void labelaxis(frame f, transform T, Label L, path g, ticklocate locate=<default>, int sign=<default>, bool ticklabels=<default>);
void 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>);
@@ -2984,7 +2875,11 @@ void ytick(picture pic=<default>, explicit pair z, pair dir=<default>, real size
void ytick(picture pic=<default>, real y, pair dir=<default>, real size=<default>, pen p=<default>);
void ytick(picture pic=<default>, Label L, explicit pair z, pair dir=<default>, string format=<default>, real size=<default>, pen p=<default>);
void ytick(picture pic=<default>, Label L, real y, pair dir=<default>, string format=<default>, real size=<default>, pen p=<default>);
+void xaxisAt(picture pic=<default>, Label L=<default>, void axis(picture, axisT), real xmin=<default>, real xmax=<default>, pen p=<default>, void ticks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, bool above=<default>, bool opposite=<default>);
+void yaxisAt(picture pic=<default>, Label L=<default>, void axis(picture, axisT), real ymin=<default>, real ymax=<default>, pen p=<default>, void ticks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, bool above=<default>, bool opposite=<default>);
+void xaxis(picture pic=<default>, Label L=<default>, void axis(picture, axisT)=<default>, real xmin=<default>, real xmax=<default>, pen p=<default>, void ticks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, bool above=<default>);
picture secondaryX(picture primary=<default>, void f(picture));
+void yaxis(picture pic=<default>, Label L=<default>, void axis(picture, axisT)=<default>, real ymin=<default>, real ymax=<default>, pen p=<default>, void ticks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, bool above=<default>, bool autorotate=<default>);
picture secondaryY(picture primary=<default>, void f(picture));
Label Break;
tickvalues Break(tickvalues)(real, real);
@@ -2992,10 +2887,6 @@ scaleT Linear;
scaleT Linear(bool automin=<default>, bool automax=<default>, real s=<default>, real intercept=<default>);
pair tickMin(picture pic);
pair tickMax(picture pic);
-void xaxisAt(picture pic=<default>, Label L=<default>, void axis(picture, axisT), real xmin=<default>, real xmax=<default>, pen p=<default>, void ticks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, bool above=<default>, bool opposite=<default>);
-void yaxisAt(picture pic=<default>, Label L=<default>, void axis(picture, axisT), real ymin=<default>, real ymax=<default>, pen p=<default>, void ticks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, bool above=<default>, bool opposite=<default>);
-void xaxis(picture pic=<default>, Label L=<default>, void axis(picture, axisT)=<default>, real xmin=<default>, real xmax=<default>, pen p=<default>, void ticks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, bool above=<default>);
-void yaxis(picture pic=<default>, Label L=<default>, void axis(picture, axisT)=<default>, real ymin=<default>, real ymax=<default>, pen p=<default>, void ticks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, bool above=<default>, bool autorotate=<default>);
string autoformat(string format=<default>, real norm ... real[] a);
real linear(real)(real S(real x)=<default>, real Min, real Max);
pair polar(real r, real theta);
@@ -3007,7 +2898,6 @@ void LeftTicks(frame, transform, Label, pair, path, path, pen, bool(picture, pat
void LeftTicks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>);
tickvalues NoZero(tickvalues);
string NoZeroFormat(real);
-path[] segment(pair[] z, bool[] cond, guide join(... guide[])=<default>);
guide Hermite(... guide[])(real[] splinetype(real[], real[]));
guide Hermite(... guide[]);
path Circle(pair c, real r, int n=<default>);
@@ -3040,6 +2930,7 @@ ticklocate operator init();
locateT operator init();
tickvalues operator init();
axisT operator init();
+path[] segment(pair[] z, bool[] cond, guide join(... guide[])=<default>);
int Both;
void axes(picture pic=<default>, Label xlabel=<default>, Label ylabel=<default>, bool extend=<default>, pair min=<default>, pair max=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, bool above=<default>);
string signedtrailingzero;
@@ -3076,6 +2967,118 @@ void autoscale(picture pic=<default>, void axis(picture, axisT));
guide Spline(... guide[]);
void LeftRight(picture, axisT)(bool extend=<default>);
void LeftRight(picture, axisT);
+locateT operator init();
+void Straight(flatguide3)(... void(flatguide3)[]);
+void graph(flatguide3)(triple F(real), real, real, int)(void join(flatguide3)(... void(flatguide3)[]));
+void(flatguide3)[] graph(triple F(real), real, real, int)(void join(flatguide3)(... void(flatguide3)[]), bool3 cond(real));
+void graph(flatguide3)(picture pic=<default>, real x(real), real y(real), real z(real), real a, real b, int n=<default>, void join(flatguide3)(... void(flatguide3)[])=<default>);
+void(flatguide3)[] graph(picture pic=<default>, real x(real), real y(real), real z(real), real a, real b, int n=<default>, bool3 cond(real), void join(flatguide3)(... void(flatguide3)[])=<default>);
+void graph(flatguide3)(picture pic=<default>, triple v(real), real a, real b, int n=<default>, void join(flatguide3)(... void(flatguide3)[])=<default>);
+void(flatguide3)[] graph(picture pic=<default>, triple v(real), real a, real b, int n=<default>, bool3 cond(real), void join(flatguide3)(... void(flatguide3)[])=<default>);
+void graph(flatguide3)(picture pic=<default>, triple[] v, void join(flatguide3)(... void(flatguide3)[])=<default>);
+void(flatguide3)[] graph(picture pic=<default>, triple[] v, bool3[] cond, void join(flatguide3)(... void(flatguide3)[])=<default>);
+void graph(flatguide3)(picture pic=<default>, real[] x, real[] y, real[] z, void join(flatguide3)(... void(flatguide3)[])=<default>);
+void(flatguide3)[] graph(picture pic=<default>, real[] x, real[] y, real[] z, bool3[] cond, void join(flatguide3)(... void(flatguide3)[])=<default>);
+void graph(flatguide3)(triple F(path, real), path p, int n=<default>, void join(flatguide3)(... void(flatguide3)[])=<default>);
+void graph(flatguide3)(triple F(pair), path p, int n=<default>, void join(flatguide3)(... void(flatguide3)[])=<default>);
+void graph(flatguide3)(picture pic=<default>, real f(pair), path p, int n=<default>, void join(flatguide3)(... void(flatguide3)[])=<default>);
+void graph(flatguide3)(real f(pair), path p, int n=<default>, real T(pair), void join(flatguide3)(... void(flatguide3)[])=<default>);
+void(flatguide3)[][] lift(real f(real x, real y), guide[][] g, void join(flatguide3)(... void(flatguide3)[])=<default>);
+void(flatguide3)[][] lift(real f(pair z), guide[][] g, void join(flatguide3)(... void(flatguide3)[])=<default>);
+triple polar(real r, real theta, real phi);
+void polargraph(flatguide3)(real r(real, real), real theta(real), real phi(real), int n=<default>, void join(flatguide3)(... void(flatguide3)[])=<default>);
+void xaxis3At(picture pic=<default>, Label L=<default>, void axis(picture, axisT), real xmin=<default>, real xmax=<default>, pen p=<default>, void ticks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)=<default>, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>, bool above=<default>, bool opposite=<default>, bool opposite2=<default>, bool primary=<default>);
+void yaxis3At(picture pic=<default>, Label L=<default>, void axis(picture, axisT), real ymin=<default>, real ymax=<default>, pen p=<default>, void ticks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)=<default>, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>, bool above=<default>, bool opposite=<default>, bool opposite2=<default>, bool primary=<default>);
+bool uperiodic(triple[][] a);
+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>);
+bool vperiodic(triple[][] a);
+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>);
+void OutTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)(Label format=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, int N=<default>, int n=<default>, real Step=<default>, real step=<default>, bool begin=<default>, bool end=<default>, tickvalues modify(tickvalues)=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
+void OutTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)(Label format=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, real[] Ticks, real[] ticks=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
+void OutTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>);
+void axis(picture pic=<default>, Label L=<default>, path3 g, path3 g2=<default>, pen p=<default>, void ticks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>), ticklocate locate, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>, int[] divisor=<default>, bool above=<default>, bool opposite=<default>);
+void Bounds(picture, axisT)(int type=<default>, int type2=<default>, triple align=<default>, bool extend=<default>);
+void Bounds(picture, axisT);
+void XZZero(picture, axisT)(triple align=<default>, bool extend=<default>);
+void XZZero(picture, axisT);
+void YZZero(picture, axisT)(triple align=<default>, bool extend=<default>);
+void YZZero(picture, axisT);
+surface surface(triple[][] f, bool[][] cond=<default>);
+surface surface(real[][] f, real[] x, real[] y, real[] xsplinetype(real[], real[])=<default>, real[] ysplinetype(real[], real[])=<default>, bool[][] cond=<default>);
+surface surface(real[][] f, pair a, pair b, real[] xsplinetype(real[], real[]), real[] ysplinetype(real[], real[])=<default>, bool[][] cond=<default>);
+surface surface(real[][] f, pair a, pair b, bool[][] cond=<default>);
+surface surface(triple f(pair z), pair a, pair b, int nu=<default>, int nv=<default>, bool cond(pair z)=<default>);
+surface surface(triple f(pair z), pair a, pair b, int nu=<default>, int nv=<default>, real[](real[], real[])[] usplinetype, real[](real[], real[])[] vsplinetype=<default>, bool cond(pair z)=<default>);
+surface surface(real f(pair z), pair a, pair b, int nx=<default>, int ny=<default>, bool cond(pair z)=<default>);
+surface surface(real f(pair z), pair a, pair b, int nx=<default>, int ny=<default>, real[] xsplinetype(real[], real[]), real[] ysplinetype(real[], real[])=<default>, bool cond(pair z)=<default>);
+void XYEquals(picture, axisT)(real x, real y, triple align=<default>, bool extend=<default>);
+triple Dir(real)(triple dir);
+void draw(picture pic=<default>, Label[] L=<default>, void(flatguide3)[][] g, pen[] p, light light=<default>, string name=<default>, render render=<default>, interaction interaction=<default>);
+void draw(picture pic=<default>, Label[] L=<default>, void(flatguide3)[][] g, pen p=<default>, light light=<default>, string name=<default>, render render=<default>, interaction interaction=<default>);
+void Ticks3(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)(int sign, Label F=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, real[] Ticks=<default>, real[] ticks=<default>, int N=<default>, bool begin=<default>, bool end=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
+void Ticks3(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)(int sign, Label F=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, int N, int n=<default>, real Step=<default>, real step=<default>, bool begin=<default>, bool end=<default>, tickvalues modify(tickvalues)=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
+real maxlength(triple f(pair z), pair a, pair b, int nu, int nv);
+void drawtick(picture pic, real[][] T, path3 g, path3 g2, ticklocate locate, real val, real Size, int sign, pen p, bool extend);
+triple tickMin3(picture pic);
+triple tickMax3(picture pic);
+triple Scale(picture pic=<default>, triple v);
+real ScaleZ(picture pic=<default>, real z);
+picture vectorfield(path3 vector(pair v), triple f(pair z), pair a, pair b, int nu=<default>, int nv=<default>, bool truesize=<default>, real maxlength=<default>, bool cond(pair z)=<default>, pen p=<default>, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>, string name=<default>, render render=<default>);
+path3 Circle(triple c, real r, triple normal=<default>, int n=<default>);
+void InTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)(Label format=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, int N=<default>, int n=<default>, real Step=<default>, real step=<default>, bool begin=<default>, bool end=<default>, tickvalues modify(tickvalues)=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
+void InTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)(Label format=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, real[] Ticks, real[] ticks=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
+void InTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>);
+void Spline(flatguide3)(... void(flatguide3)[]);
+void InOutTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)(Label format=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, int N=<default>, int n=<default>, real Step=<default>, real step=<default>, bool begin=<default>, bool end=<default>, tickvalues modify(tickvalues)=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
+void InOutTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)(Label format=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, real[] Ticks, real[] ticks=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
+void InOutTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>);
+void axes3(picture pic=<default>, Label xlabel=<default>, Label ylabel=<default>, Label zlabel=<default>, bool extend=<default>, triple min=<default>, triple max=<default>, pen p=<default>, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>);
+void label(picture pic, Label L, triple v, real x, align align, string format, pen p);
+void labelx(picture pic=<default>, Label L=<default>, triple v, align align=<default>, string format=<default>, pen p=<default>);
+void labely(picture pic=<default>, Label L=<default>, triple v, align align=<default>, string format=<default>, pen p=<default>);
+void labeltick(picture pic, real[][] T, path3 g, ticklocate locate, real val, int sign, real Size, string ticklabel(real), Label F, real norm=<default>);
+void labelaxis(picture pic, real[][] T, Label L, path3 g, ticklocate locate=<default>, int sign=<default>, bool ticklabels=<default>);
+void labelx3(picture pic=<default>, Label L=<default>, real x, align align=<default>, string format=<default>, pen p=<default>);
+void labely3(picture pic=<default>, Label L=<default>, real y, align align=<default>, string format=<default>, pen p=<default>);
+void labelz(picture pic=<default>, Label L=<default>, triple v, align align=<default>, string format=<default>, pen p=<default>);
+void labelz3(picture pic=<default>, Label L=<default>, real z, align align=<default>, string format=<default>, pen p=<default>);
+void autoscale3(picture pic=<default>, void axis(picture, axisT));
+void xtick(picture pic=<default>, triple v, triple dir=<default>, real size=<default>, pen p=<default>);
+void xtick(picture pic=<default>, Label L, triple v, triple dir=<default>, string format=<default>, real size=<default>, pen p=<default>);
+void ytick(picture pic=<default>, triple v, triple dir=<default>, real size=<default>, pen p=<default>);
+void ytick(picture pic=<default>, Label L, triple v, triple dir=<default>, string format=<default>, real size=<default>, pen p=<default>);
+void xtick3(picture pic=<default>, real x, triple dir=<default>, real size=<default>, pen p=<default>);
+void xtick3(picture pic=<default>, Label L, real x, triple dir=<default>, string format=<default>, real size=<default>, pen p=<default>);
+void ytick3(picture pic=<default>, real y, triple dir=<default>, real size=<default>, pen p=<default>);
+void ytick3(picture pic=<default>, Label L, real y, triple dir=<default>, string format=<default>, real size=<default>, pen p=<default>);
+void ztick(picture pic=<default>, triple v, triple dir=<default>, real size=<default>, pen p=<default>);
+void ztick(picture pic=<default>, Label L, triple v, triple dir=<default>, string format=<default>, real size=<default>, pen p=<default>);
+void ztick3(picture pic=<default>, real z, triple dir=<default>, real size=<default>, pen p=<default>);
+void ztick3(picture pic=<default>, Label L, real z, triple dir=<default>, string format=<default>, real size=<default>, pen p=<default>);
+triple zero3(real);
+triple defaultdir(triple X, triple Y, triple Z, bool opposite=<default>, projection P);
+real xtrans(real[][] t, real x);
+real ytrans(real[][] t, real y);
+real ztrans(real[][] t, real z);
+ticklocate ticklocate(real a, real b, autoscaleT S=<default>, real tickmin=<default>, real tickmax=<default>, real time(real)=<default>, triple dir(real));
+triple ticklabelshift(triple align, pen p=<default>);
+path3 Arc(triple c, triple v1, triple v2, triple normal=<default>, bool direction=<default>, int n=<default>);
+path3 Arc(triple c, real r, real theta1, real phi1, real theta2, real phi2, triple normal=<default>, bool direction, int n=<default>);
+path3 Arc(triple c, real r, real theta1, real phi1, real theta2, real phi2, triple normal=<default>, int n=<default>);
+void limits(picture pic=<default>, triple min, triple max);
+void XZEquals(picture, axisT)(real x, real z, triple align=<default>, bool extend=<default>);
+void YZEquals(picture, axisT)(real y, real z, triple align=<default>, bool extend=<default>);
+void XYZero(picture, axisT)(triple align=<default>, bool extend=<default>);
+void XYZero(picture, axisT);
+void zlimits(picture pic=<default>, real min=<default>, real max=<default>, bool crop=<default>);
+void tick(picture pic=<default>, triple v, triple dir, real size=<default>, pen p=<default>);
+void tick(picture pic=<default>, Label L, real value, triple v, triple dir, string format=<default>, real size=<default>, pen p=<default>);
+surface bispline(real[][] z, real[][] p, real[][] q, real[][] r, real[] x, real[] y, bool[][] cond=<default>);
+path3[] segment(triple[] v, bool[] cond, void join(flatguide3)(... void(flatguide3)[])=<default>);
+void NoTicks3(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)();
+void NoTicks3(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>);
bool Crop;
int ngraph;
real epsilon;
@@ -3114,16 +3117,16 @@ grid3(picture pic)[] XYXgrid(position pos=<default>);
grid3(picture pic)[] XYXgrid;
grid3(picture pic)[] XY_XZgrid(position posa=<default>, position posb=<default>);
grid3(picture pic)[] XY_XZgrid;
+position middle;
grid3(picture pic)[] ZX_ZYgrid(position posa=<default>, position posb=<default>);
grid3(picture pic)[] ZX_ZYgrid;
-void xaxis3(picture pic=<default>, Label L=<default>, void axis(picture, axisT)=<default>, pen p=<default>, ticksgridT ticks(), bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, bool above=<default>);
-void yaxis3(picture pic=<default>, Label L=<default>, void axis(picture, axisT)=<default>, pen p=<default>, ticksgridT ticks(), bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, bool above=<default>);
-void zaxis3(picture pic=<default>, Label L=<default>, void axis(picture, axisT)=<default>, pen p=<default>, ticksgridT ticks(), bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, bool above=<default>);
grid3 XYgrid(picture pic)(position pos=<default>);
grid3 XYgrid(picture pic);
grid3 ZYgrid(picture pic)(position pos=<default>);
grid3 ZYgrid(picture pic);
-position middle;
+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>);
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>);
@@ -3160,16 +3163,16 @@ horner diffdiv(real[] x, real[] y);
horner hdiffdiv(real[] x, real[] y, real[] dy);
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>);
-real eps;
-triple nextnormal(triple p, triple q);
void labelpath(frame f, Label L, path g, string justify=<default>, pen p=<default>);
void labelpath(picture pic=<default>, Label L, path g, string justify=<default>, pen p=<default>);
string LeftJustified;
string Centered;
string RightJustified;
+surface labelpath(string s, path3 p, real angle=<default>, triple optional=<default>);
+triple[] firstframe(path3 p, triple optional=<default>);
+triple[] nextframe(path3 p, real reltimestart, triple[] start, real reltimeend, int subdiv=<default>);
+real eps;
+triple nextnormal(triple p, triple q);
string[] lm_infmsg;
void lm_qrfac(int m, int n, real[] a, bool pivot, int[] ipvt, real[] rdiag, real[] acnorm, real[] wa);
void lm_qrsolv(int n, real[] r, int ldr, int[] ipvt, real[] diag, real[] qtb, real[] x, real[] sdiag, real[] wa);
@@ -3256,13 +3259,14 @@ bool rectangular(pair[][] m);
bool rectangular(triple[][] m);
bool polygon(path p);
pair unityroot(int n, int k=<default>);
-int[][] segmentlimits(bool[] b);
-int[][] segment(bool[] b);
real acot(real x);
pair[][] fft(pair[][] a, int sign=<default>);
real slope(path g, real x, int n=<default>);
real slope(path g, explicit pair z, int n=<default>);
picture grid(int Nx, int Ny, pen p=<default>);
+rootfinder_settings operator init();
+int[][] segmentlimits(bool[] b);
+int[][] segment(bool[] b);
real frac(real x);
real asec(real x);
real time(path g, real x, int n=<default>);
@@ -3271,6 +3275,7 @@ 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>);
@@ -3406,15 +3411,15 @@ pen titlepen;
real titleskip;
pair dateskip;
pair titlealign;
-void nextpage(pen p=<default>);
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 filecode(bool center=<default>, string s, pen p=<default>, real indent=<default>, real skip=<default>, filltype filltype=<default>);
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;
@@ -3432,17 +3437,17 @@ pen institutionpen;
void skip(real n=<default>);
bool stepping;
real pagemargin;
-void item(string s, pen p=<default>, bool step=<default>);
pen steppagenumberpen;
+void item(string s, pen p=<default>, bool step=<default>);
bool empty();
void currentexitfunction();
void step();
string[] codefile;
void outline(string s=<default>, pair position=<default>, pair align=<default>, pen p=<default>);
void center(string s, pen p=<default>);
-string cropcode(string s);
void equation(string s, pen p=<default>);
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>);
@@ -3458,6 +3463,7 @@ path curve(pair c, real f(real, real), pair a, pair b);
path curve(pair c, real f(real), pair a, pair b);
picture slopefield(real f(real, real), pair a, pair b, int nx=<default>, int ny=<default>, real tickfactor=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>);
picture slopefield(real f(real), pair a, pair b, int nx=<default>, int ny=<default>, pen p=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>);
+patch[] maketriangle(path3 external, real f(triple), triple grad(triple), bool allowsubdivide=<default>);
real B23(real t);
path3 pathinface(positionedvector v1, positionedvector v2, triple facenorm, triple edge1normout, triple edge2normout);
path3 pathinface(positionedvector v1, positionedvector v2, int face, int edge1face, int edge2face);
@@ -3475,8 +3481,8 @@ real angledegrees(triple a, triple b);
triple projecttospan(triple toproject, triple v1, triple v2, real mincoeff=<default>);
real[] projecttospan_findcoeffs(triple toproject, triple v1, triple v2, bool warn=<default>);
triple nGrad(triple)(real f(triple));
+patch[] quadpatches(path3 edgecycle, positionedvector[] corners, real f(triple), triple grad(triple), triple a, triple b, bool usetriangles);
triple normalout(int face);
-patch[] quadpatches(path3 edgecycle, positionedvector[] corners, real f(triple), triple grad(triple), triple a, triple b);
int NULL_VERTEX;
int[] makecircle(edge[] edges);
real B13(real t);
@@ -3487,27 +3493,26 @@ int XLOW;
int YLOW;
int ZLOW;
pathwithnormals_settings operator init();
-rootfinder_settings operator init();
intset operator init();
int_to_intset operator init();
edge operator init();
positionedvector operator init();
evaluatedpoint operator init();
gridwithzeros operator init();
-surface implicitsurface(real f(triple)=<default>, real ff(real, real, real)=<default>, triple a, triple b, int n=<default>, bool keyword overlapedges=<default>, int keyword nx=<default>, int keyword ny=<default>, int keyword nz=<default>, int keyword maxdepth=<default>);
+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);
-real findroot(real f(real), real a, real b, real tolerance=<default>, real fa=<default>, real fb=<default>);
revolution operator *(real[][] t, revolution r);
skeleton operator init();
revolution operator init();
@@ -3567,16 +3572,16 @@ pair max(pair[] z);
pen Sepia;
pen Orchid;
pen Magenta;
-pen VioletRed;
pen BrickRed;
+pen VioletRed;
pen Violet;
pen CadetBlue;
pen CarnationPink;
pen SpringGreen;
pen MidnightBlue;
pen OliveGreen;
-pen Thistle;
pen Apricot;
+pen Thistle;
pen Cyan;
pen DarkOrchid;
pen Red;
@@ -3594,8 +3599,8 @@ pen Goldenrod;
pen ForestGreen;
pen BurntOrange;
pen Tan;
-pen Salmon;
pen Brown;
+pen Salmon;
pen RubineRed;
pen TealBlue;
pen White;
@@ -3660,8 +3665,8 @@ pen Indigo;
pen Beige;
pen SlateBlue;
pen SlateGray;
-pen SandyBrown;
pen Magenta;
+pen SandyBrown;
pen Violet;
pen CadetBlue;
pen DeepPink;
@@ -3675,15 +3680,15 @@ pen Chocolate;
pen Cyan;
pen Gainsboro;
pen Cornsilk;
-pen DarkOrchid;
pen Ivory;
+pen DarkOrchid;
pen PapayaWhip;
pen Red;
pen Pink;
pen MintCream;
pen DarkTurquoise;
-pen Seashell;
pen Gray;
+pen Seashell;
pen MediumBlue;
pen MediumOrchid;
pen MediumPurple;
@@ -3709,13 +3714,13 @@ pen AntiqueWhite;
pen PaleTurquoise;
pen IndianRed;
pen Crimson;
-pen LavenderBlush;
pen Azure;
-pen Wheat;
-pen Salmon;
+pen LavenderBlush;
pen LawnGreen;
pen Brown;
+pen Wheat;
pen BurlyWood;
+pen Salmon;
pen Moccasin;
pen DarkBlue;
pen Peru;
@@ -3737,10 +3742,10 @@ pen FireBrick;
pen Snow;
pen LemonChiffon;
pen LimeGreen;
-pen Aqua;
pen Lime;
-pen Aquamarine;
+pen Aqua;
pen OldLace;
+pen Aquamarine;
pen Green;
pen GreenYellow;
pen Lavender;
@@ -3772,16 +3777,16 @@ pen LightGreen;
pen PaleGreen;
pen Linen;
pen LightGoldenrodYellow;
-pen DarkOliveGreen;
pen LightGrey;
pen LightPink;
-pen DarkOrange;
pen PaleGoldenrod;
pen LightSalmon;
pen LightSeaGreen;
pen LightSkyBlue;
pen Navy;
pen LightSlateGray;
+pen DarkOliveGreen;
+pen DarkOrange;
pen PaleVioletRed;
pen LightSteelBlue;
pen CornflowerBlue;
@@ -3789,8 +3794,8 @@ pen LightYellow;
pen rgbint(int r, int g, int b);
pen Coral;
pen MistyRose;
-pen Silver;
pen DarkSalmon;
+pen Silver;
pen DarkSeaGreen;
pen RoyalBlue;
pen DarkSlateBlue;
diff --git a/Build/source/utils/asymptote/asymptote.spec b/Build/source/utils/asymptote/asymptote.spec
index ba5005f8691..d823975c187 100644
--- a/Build/source/utils/asymptote/asymptote.spec
+++ b/Build/source/utils/asymptote/asymptote.spec
@@ -1,7 +1,7 @@
%{!?_texmf: %global _texmf %(eval "echo `kpsewhich -expand-var '$TEXMFLOCAL'`")}
Name: asymptote
-Version: 2.36
+Version: 2.37
Release: 1%{?dist}
Summary: Descriptive vector graphics language
diff --git a/Build/source/utils/asymptote/base/bezulate.asy b/Build/source/utils/asymptote/base/bezulate.asy
index d0b8958a4da..38d35718d4a 100644
--- a/Build/source/utils/asymptote/base/bezulate.asy
+++ b/Build/source/utils/asymptote/base/bezulate.asy
@@ -2,7 +2,7 @@
private real fuzz=sqrtEpsilon;
real duplicateFuzz=1e-3; // Work around font errors.
-real maxrefinements=7;
+real maxrefinements=10;
private real[][] intersections(pair a, pair b, path p)
{
diff --git a/Build/source/utils/asymptote/base/embed.asy b/Build/source/utils/asymptote/base/embed.asy
index 588ad79c283..88495f12128 100644
--- a/Build/source/utils/asymptote/base/embed.asy
+++ b/Build/source/utils/asymptote/base/embed.asy
@@ -2,11 +2,6 @@ if(latex()) {
usepackage("hyperref");
texpreamble("\hypersetup{"+settings.hyperrefOptions+"}");
usepackage("media9","bigfiles");
- texpreamble("\newif\ifplaybutton");
- texpreamble("\count255=\the\catcode`\@\makeatletter%
-\@ifpackagelater{media9}{2013/11/15}{}{\playbuttontrue}%
-\catcode`\@=\the\count255
-%");
}
// For documentation of the options see
@@ -19,11 +14,7 @@ string embedplayer(string name, string text="", string options="",
if(width != 0) options += ",width="+(string) (width/pt)+"pt";
if(height != 0) options += ",height="+(string) (height/pt)+"pt";
return "%
-\ifplaybutton%
-\includemedia["+options+"]{"+text+"}{"+name+"}%
-\else%
-\includemedia[noplaybutton,"+options+"]{"+text+"}{"+name+"}%
-\fi";
+\includemedia[noplaybutton,"+options+"]{"+text+"}{"+name+"}";
}
// Embed media in pdf file
diff --git a/Build/source/utils/asymptote/base/math.asy b/Build/source/utils/asymptote/base/math.asy
index 8cfd61f4344..9d10e2b7794 100644
--- a/Build/source/utils/asymptote/base/math.asy
+++ b/Build/source/utils/asymptote/base/math.asy
@@ -437,3 +437,15 @@ real[] leastsquares(real[][] A, real[] b, bool warn=true)
"a matrix with linearly dependent columns.");
return solution;
}
+
+// Namespace
+struct rootfinder_settings {
+ static real roottolerance = 1e-4;
+}
+
+real findroot(real f(real), real a, real b,
+ real tolerance=rootfinder_settings.roottolerance,
+ real fa=f(a), real fb=f(b))
+{
+ return _findroot(f,a,b,tolerance,fa,fb);
+}
diff --git a/Build/source/utils/asymptote/base/plain_strings.asy b/Build/source/utils/asymptote/base/plain_strings.asy
index a5c72b2035d..a88e3863416 100644
--- a/Build/source/utils/asymptote/base/plain_strings.asy
+++ b/Build/source/utils/asymptote/base/plain_strings.asy
@@ -228,4 +228,25 @@ string phantom(string s)
return settings.tex != "none" ? "\phantom{"+s+"}" : "";
}
+string[] spinner=new string[] {'|','/','-','\\'};
+spinner.cyclic=true;
+
+void progress(bool3 init=default)
+{
+ static int count=-1;
+ static int lastseconds=-1;
+ if(init == true) {
+ lastseconds=0;
+ write(stdout,' ',flush);
+ } else
+ if(init == default) {
+ int seconds=seconds();
+ if(seconds > lastseconds) {
+ lastseconds=seconds;
+ write(stdout,'\b'+spinner[++count],flush);
+ }
+ } else
+ write(stdout,'\b',flush);
+}
+
restricted int ocgindex=0;
diff --git a/Build/source/utils/asymptote/base/smoothcontour3.asy b/Build/source/utils/asymptote/base/smoothcontour3.asy
index 9b34fc7c098..4fe26654283 100644
--- a/Build/source/utils/asymptote/base/smoothcontour3.asy
+++ b/Build/source/utils/asymptote/base/smoothcontour3.asy
@@ -64,7 +64,7 @@ function[] bernstein = new function[] {B03, B13, B23, B33};
// the specified boundary path. However, the entries in the array
// remain intact.
patch patchwithnormals(path3 external, triple[] u0normals, triple[] u1normals,
- triple[] v0normals, triple[] v1normals)
+ triple[] v0normals, triple[] v1normals)
{
assert(cyclic(external));
assert(length(external) == 4);
@@ -213,8 +213,8 @@ patch patchwithnormals(path3 external, triple[] u0normals, triple[] u1normals,
real[] solution = leastsquares(matrix, rightvector, warn=false);
if (solution.length == 0) { // if the matrix was singular
- write("Warning: unable to solve matrix for specifying normals "
- + "on bezier patch. Using standard method.");
+ write("Warning: unable to solve matrix for specifying edge normals "
+ + "on bezier patch. Using coons patch.");
return patch(external);
}
@@ -222,22 +222,95 @@ patch patchwithnormals(path3 external, triple[] u0normals, triple[] u1normals,
for (int j = 1; j <= 2; ++j) {
int position = 3 * (2 * (i-1) + (j-1));
controlpoints[i][j] = (solution[position],
- solution[position+1],
- solution[position+2]);
+ solution[position+1],
+ solution[position+2]);
}
}
return patch(controlpoints);
}
-// A wrapper for the previous function when the normal direction
+// This function attempts to produce a Bezier triangle
+// with the specified boundary path and normal directions at the
+// edge midpoints. The bezier triangle should be normal to
+// n1 at point(external, 0.5),
+// normal to n2 at point(external, 1.5), and
+// normal to n3 at point(external, 2.5).
+// The actual normal (as computed by the patch.normal() function)
+// may be parallel to the specified normal, antiparallel, or
+// even zero.
+//
+// A small amount of deviation is allowed in order to stabilize
+// the algorithm (by keeping the mixed partials at the corners from
+// growing too large).
+patch trianglewithnormals(path3 external, triple n1,
+ triple n2, triple n3) {
+ assert(cyclic(external));
+ assert(length(external) == 3);
+ // Use the formal symbols a3, a2b, abc, etc. to denote the control points,
+ // following the Wikipedia article on Bezier triangles.
+ triple a3 = point(external, 0), a2b = postcontrol(external, 0),
+ ab2 = precontrol(external, 1), b3 = point(external, 1),
+ b2c = postcontrol(external, 1), bc2 = precontrol(external, 2),
+ c3 = point(external, 2), ac2 = postcontrol(external, 2),
+ a2c = precontrol(external, 0);
+
+ // Use orthogonal projection to ensure that the normal vectors are
+ // actually normal to the boundary path.
+ triple tangent = dir(external, 0.5);
+ n1 -= dot(n1,tangent)*tangent;
+ n1 = unit(n1);
+
+ tangent = dir(external, 1.5);
+ n2 -= dot(n2,tangent)*tangent;
+ n2 = unit(n2);
+
+ tangent = dir(external, 2.5);
+ n3 -= dot(n3,tangent)*tangent;
+ n3 = unit(n3);
+
+ real wild = 2 * wildnessweight;
+ real[][] matrix = { {n1.x, n1.y, n1.z},
+ {n2.x, n2.y, n2.z},
+ {n3.x, n3.y, n3.z},
+ { wild, 0, 0},
+ { 0, wild, 0},
+ { 0, 0, wild} };
+ real[] rightvector =
+ { dot(n1, (a3 + 3a2b + 3ab2 + b3 - 2a2c - 2b2c)) / 4,
+ dot(n2, (b3 + 3b2c + 3bc2 + c3 - 2ab2 - 2ac2)) / 4,
+ dot(n3, (c3 + 3ac2 + 3a2c + a3 - 2bc2 - 2a2b)) / 4 };
+
+ // The inner control point that minimizes the sum of squares of
+ // the mixed partials on the corners.
+ triple tameinnercontrol =
+ ((a2b + a2c - a3) + (ab2 + b2c - b3) + (ac2 + bc2 - c3)) / 3;
+ rightvector.append(wild * new real[]
+ {tameinnercontrol.x, tameinnercontrol.y, tameinnercontrol.z});
+ real[] solution = leastsquares(matrix, rightvector, warn=false);
+ if (solution.length == 0) { // if the matrix was singular
+ write("Warning: unable to solve matrix for specifying edge normals "
+ + "on bezier triangle. Using coons triangle.");
+ return patch(external);
+ }
+ triple innercontrol = (solution[0], solution[1], solution[2]);
+ return patch(external, innercontrol);
+}
+
+// A wrapper for the previous functions when the normal direction
// is given as a function of direction. The wrapper can also
// accommodate cyclic boundary paths of between one and four
// segments, although the results are best by far when there
-// are four segments.
+// are three or four segments.
patch patchwithnormals(path3 external, triple normalat(triple)) {
assert(cyclic(external));
assert(1 <= length(external) && length(external) <= 4);
+ if (length(external) == 3) {
+ triple n1 = normalat(point(external, 0.5));
+ triple n2 = normalat(point(external, 1.5));
+ triple n3 = normalat(point(external, 2.5));
+ return trianglewithnormals(external, n1, n2, n3);
+ }
while (length(external) < 4) external = external -- cycle;
triple[] u0normals = new triple[3];
triple[] u1normals = new triple[3];
@@ -253,82 +326,6 @@ patch patchwithnormals(path3 external, triple normalat(triple)) {
}
/***********************************************/
-/*********** ROOT-FINDER UTILITY ***************/
-/***********************************************/
-
-// Namespace
-struct rootfinder_settings {
- static real roottolerance = 1e-4;
-}
-
-// Find a root for the specified continuous (but not
-// necessarily differentiable) function. Whatever
-// value t is returned, it is guaranteed that either
-// t is within tolerance of a sign change, or
-// abs(f(t)) <= 0.1 tolerance.
-// An error is thrown if fa and fb are both positive
-// or both negative.
-//
-// In the current implementation, binary search is interleaved
-// with a modified version of linear interpolation.
-real findroot(real f(real), real a, real b,
- real tolerance = rootfinder_settings.roottolerance,
- real fa = f(a), real fb = f(b))
-{
- if (fa == 0) return a;
- if (fb == 0) return b;
- real g(real);
- if (fa < 0) {
- assert(fb > 0);
- g = f;
- } else {
- assert(fb < 0);
- fa = -fa;
- fb = -fb;
- g = new real(real t) { return -f(t); };
- }
-
- real t = a;
- real ft = fa;
-
- while (b - a > tolerance && abs(ft) > 0.1*tolerance) {
- t = a + (b - a) / 2;
- ft = g(t);
- if (ft == 0) return t;
- else if (ft > 0) {
- b = t;
- fb = ft;
- } else if (ft < 0) {
- a = t;
- fa = ft;
- }
-
- // linear interpolation
- t = a - (b - a) / (fb - fa) * fa;
-
- // If the interpolated value is close to one edge of
- // the interval, move it farther away from the edge in
- // an effort to catch the root in the middle.
- if (t - a < (b-a)/8) t = a + 2*(t-a);
- else if (b - t < (b-a)/8) t = b - 2*(b-t);
-
- assert(t >= a && t <= b);
-
- ft = g(t);
- if (ft == 0) return t;
- else if (ft > 0) {
- b = t;
- fb = ft;
- } else if (ft < 0) {
- a = t;
- fa = ft;
- }
-
- }
- return a - (b - a) / (fb - fa) * fa;
-}
-
-/***********************************************/
/********* DUAL CUBE GRAPH UTILITY *************/
/***********************************************/
@@ -404,8 +401,8 @@ struct int_to_intset {
void add(int key, int value) {
for (int i = 0; i < keys.length; ++i) {
if (keys[i] == key) {
- values[i].add(value);
- return;
+ values[i].add(value);
+ return;
}
}
keys.push(key);
@@ -499,9 +496,9 @@ int[] makecircle(edge[] edges) {
if (adjacentvertices.length != 2) return null;
for (int v : adjacentvertices) {
if (v != lastvertex) {
- lastvertex = currentvertex;
- currentvertex = v;
- break;
+ lastvertex = currentvertex;
+ currentvertex = v;
+ break;
}
}
} while (currentvertex != startvertex);
@@ -535,9 +532,10 @@ string operator cast(positionedvector vv) {
// The angle, in degrees, between two vectors.
real angledegrees(triple a, triple b) {
- real lengthprod = max(abs(a) * abs(b), abs(dot(a,b)));
+ real dotprod = dot(a,b);
+ real lengthprod = max(abs(a) * abs(b), abs(dotprod));
if (lengthprod == 0) return 0;
- return aCos(dot(a,b) / lengthprod);
+ return aCos(dotprod / lengthprod);
}
// A path (single curved segment) between two points. At each point
@@ -560,10 +558,10 @@ path3 pathbetween(positionedvector v1, positionedvector v2) {
// the span of v1 and v2. If v1 and v2 are dependent, returns an empty array
// (if warn==false) or throws an error (if warn==true).
real[] projecttospan_findcoeffs(triple toproject, triple v1, triple v2,
- bool warn=false) {
+ bool warn=false) {
real[][] matrix = {{v1.x, v2.x},
- {v1.y, v2.y},
- {v1.z, v2.z}};
+ {v1.y, v2.y},
+ {v1.z, v2.z}};
real[] desiredanswer = {toproject.x, toproject.y, toproject.z};
return leastsquares(matrix, desiredanswer, warn=warn);
}
@@ -573,7 +571,7 @@ real[] projecttospan_findcoeffs(triple toproject, triple v1, triple v2,
// a >= mincoeff and b >= mincoeff. If v1 and v2 are linearly dependent,
// return a random (positive) linear combination.
triple projecttospan(triple toproject, triple v1, triple v2,
- real mincoeff = 0.05) {
+ real mincoeff = 0.05) {
real[] coeffs = projecttospan_findcoeffs(toproject, v1, v2, warn=false);
real a, b;
if (coeffs.length == 0) {
@@ -639,25 +637,25 @@ path3 bisector(path3 edgecycle, int[] savevertices) {
int opposite = i + 3;
triple vec = unit(point(edgecycle, opposite) - point(edgecycle, i));
real[] coeffsbegin = projecttospan_findcoeffs(vec, forwarddirections[i],
- backwarddirections[i]);
+ backwarddirections[i]);
if (coeffsbegin.length == 0) continue;
coeffsbegin[0] = max(coeffsbegin[0], mincoeff);
coeffsbegin[1] = max(coeffsbegin[1], mincoeff);
real[] coeffsend = projecttospan_findcoeffs(-vec, forwarddirections[opposite],
- backwarddirections[opposite]);
+ backwarddirections[opposite]);
if (coeffsend.length == 0) continue;
coeffsend[0] = max(coeffsend[0], mincoeff);
coeffsend[1] = max(coeffsend[1], mincoeff);
real goodness = angles[i] * angles[opposite] * coeffsbegin[0] * coeffsend[0]
- * coeffsbegin[1] * coeffsend[1];
+ * coeffsbegin[1] * coeffsend[1];
if (goodness > maxgoodness) {
maxgoodness = goodness;
directionout = coeffsbegin[0] * forwarddirections[i] +
- coeffsbegin[1] * backwarddirections[i];
+ coeffsbegin[1] * backwarddirections[i];
directionin = -(coeffsend[0] * forwarddirections[opposite] +
- coeffsend[1] * backwarddirections[opposite]);
+ coeffsend[1] * backwarddirections[opposite]);
chosenindex = i;
}
}
@@ -676,7 +674,7 @@ path3 bisector(path3 edgecycle, int[] savevertices) {
// A path between two specified points (with specified normals) that lies
// within a specified face of a rectangular solid.
path3 pathinface(positionedvector v1, positionedvector v2,
- triple facenorm, triple edge1normout, triple edge2normout)
+ triple facenorm, triple edge1normout, triple edge2normout)
{
triple dir1 = cross(v1.direction, facenorm);
real dotprod = dot(dir1, edge1normout);
@@ -707,15 +705,16 @@ triple normalout(int face) {
// A path between two specified points (with specified normals) that lies
// within a specified face of a rectangular solid.
path3 pathinface(positionedvector v1, positionedvector v2,
- int face, int edge1face, int edge2face) {
+ int face, int edge1face, int edge2face) {
return pathinface(v1, v2, normalout(face), normalout(edge1face),
- normalout(edge2face));
+ normalout(edge2face));
}
/***********************************************/
/******** DRAWING IMPLICIT SURFACES ************/
/***********************************************/
+// DEPRECATED
// Quadrilateralization:
// Produce a surface (array of *nondegenerate* Bezier patches) with a
// specified three-segment boundary. The surface should approximate the
@@ -725,11 +724,12 @@ path3 pathinface(positionedvector v1, positionedvector v2,
// specified rectangular region, returns a length-zero array.
//
// Dividing a triangle into smaller quadrilaterals this way is opposite
-// the usual trend in mathematics. However, the pathwithnormals algorithm
-// does a poor job of choosing a good surface when the boundary path does
+// the usual trend in mathematics. However, *before the introduction of bezier
+// triangles,* the pathwithnormals algorithm
+// did a poor job of choosing a good surface when the boundary path did
// not consist of four positive-length segments.
patch[] triangletoquads(path3 external, real f(triple), triple grad(triple),
- triple a, triple b) {
+ triple a, triple b) {
static real epsilon = 1e-3;
assert(length(external) == 3);
assert(cyclic(external));
@@ -805,6 +805,65 @@ patch[] triangletoquads(path3 external, real f(triple), triple grad(triple),
patchwithnormals(quad2, grad)};
}
+// Attempts to fill the path external (which should by a cyclic path consisting of
+// three segments) with bezier triangle(s). Returns an empty array if it fails.
+//
+// In more detail: A single bezier triangle is computed using trianglewithnormals. The normals of
+// the resulting triangle at the midpoint of each edge are computed. If any of these normals
+// is in the negative f direction, the external triangle is subdivided into four external triangles
+// and the same procedure is applied to each. If one or more of them has an incorrectly oriented
+// edge normal, the function gives up and returns an empty array.
+//
+// Thus, the returned array consists of 0, 1, or 4 bezier triangles; no other array lengths
+// are possible.
+//
+// This function assumes that the path orientation is consistent with f (and its gradient)
+// -- i.e., that
+// at a corner, (tangent in) x (tangent out) is in the positive f direction.
+patch[] maketriangle(path3 external, real f(triple),
+ triple grad(triple), bool allowsubdivide = true) {
+ assert(cyclic(external));
+ assert(length(external) == 3);
+ triple m1 = point(external, 0.5);
+ triple n1 = unit(grad(m1));
+ triple m2 = point(external, 1.5);
+ triple n2 = unit(grad(m2));
+ triple m3 = point(external, 2.5);
+ triple n3 = unit(grad(m3));
+ patch beziertriangle = trianglewithnormals(external, n1, n2, n3);
+ if (dot(n1, beziertriangle.normal(0.5, 0)) >= 0 &&
+ dot(n2, beziertriangle.normal(0.5, 0.5)) >= 0 &&
+ dot(n3, beziertriangle.normal(0, 0.5)) >= 0)
+ return new patch[] {beziertriangle};
+
+ if (!allowsubdivide) return new patch[0];
+
+ positionedvector m1 = positionedvector(m1, n1);
+ positionedvector m2 = positionedvector(m2, n2);
+ positionedvector m3 = positionedvector(m3, n3);
+ path3 p12 = pathbetween(m1, m2);
+ path3 p23 = pathbetween(m2, m3);
+ path3 p31 = pathbetween(m3, m1);
+ patch[] triangles = maketriangle(p12 & p23 & p31 & cycle, f, grad=grad,
+ allowsubdivide=false);
+ if (triangles.length < 1) return new patch[0];
+
+ triangles.append(maketriangle(subpath(external, -0.5, 0.5) & reverse(p31) & cycle,
+ f, grad=grad, allowsubdivide=false));
+ if (triangles.length < 2) return new patch[0];
+
+ triangles.append(maketriangle(subpath(external, 0.5, 1.5) & reverse(p12) & cycle,
+ f, grad=grad, allowsubdivide=false));
+ if (triangles.length < 3) return new patch[0];
+
+ triangles.append(maketriangle(subpath(external, 1.5, 2.5) & reverse(p23) & cycle,
+ f, grad=grad, allowsubdivide=false));
+ if (triangles.length < 4) return new patch[0];
+
+ return triangles;
+}
+
+
// Returns true if the point is "nonsingular" (in the sense that the magnitude
// of the gradient is not too small) AND very close to the zero locus of f
// (assuming f is locally linear).
@@ -829,14 +888,14 @@ bool checkptincube(triple pt, triple a, triple b) {
if (zmin > zmax) { real t = zmax; zmax=zmin; zmin=t; }
return ((xmin <= pt.x) && (pt.x <= xmax) &&
- (ymin <= pt.y) && (pt.y <= ymax) &&
- (zmin <= pt.z) && (pt.z <= zmax));
+ (ymin <= pt.y) && (pt.y <= ymax) &&
+ (zmin <= pt.z) && (pt.z <= zmax));
}
// A convenience function for combining the previous two tests.
bool checkpt(triple testpt, real f(triple), triple grad(triple),
- triple a, triple b) {
+ triple a, triple b) {
return checkptincube(testpt, a, b) &&
check_fpt_zero(testpt, f, grad);
}
@@ -848,8 +907,8 @@ bool checkpt(triple testpt, real f(triple), triple grad(triple),
// array, which merely indicates that the boundary cycle is too small
// to be worth filling in.
patch[] quadpatches(path3 edgecycle, positionedvector[] corners,
- real f(triple), triple grad(triple),
- triple a, triple b) {
+ real f(triple), triple grad(triple),
+ triple a, triple b, bool usetriangles) {
assert(corners.cyclic);
// The tolerance for considering two points "essentially identical."
@@ -862,8 +921,8 @@ patch[] quadpatches(path3 edgecycle, positionedvector[] corners,
if (corners.length == 2) return new patch[0];
corners.delete(i);
edgecycle = subpath(edgecycle, 0, i)
- & subpath(edgecycle, i+1, length(edgecycle))
- & cycle;
+ & subpath(edgecycle, i+1, length(edgecycle))
+ & cycle;
--i;
assert(length(edgecycle) == corners.length);
}
@@ -875,9 +934,9 @@ patch[] quadpatches(path3 edgecycle, positionedvector[] corners,
if (corners.length == 2) {
// If the area is too small, just ignore it; otherwise, subdivide.
real area0 = abs(cross(-dir(edgecycle, 0, sign=-1, normalize=false),
- dir(edgecycle, 0, sign=1, normalize=false)));
+ dir(edgecycle, 0, sign=1, normalize=false)));
real area1 = abs(cross(-dir(edgecycle, 1, sign=-1, normalize=false),
- dir(edgecycle, 1, sign=1, normalize=false)));
+ dir(edgecycle, 1, sign=1, normalize=false)));
if (area0 < areatolerance && area1 < areatolerance) return new patch[0];
else return null;
}
@@ -885,13 +944,14 @@ patch[] quadpatches(path3 edgecycle, positionedvector[] corners,
for (int i = 0; i < length(edgecycle); ++i) {
if (angledegrees(dir(edgecycle,i,sign=1),
- dir(edgecycle,i+1,sign=-1)) > 80) {
+ dir(edgecycle,i+1,sign=-1)) > 80) {
return null;
}
}
if (length(edgecycle) == 3) {
- patch[] toreturn = triangletoquads(edgecycle, f, grad, a, b);
+ patch[] toreturn = usetriangles ? maketriangle(edgecycle, f, grad)
+ : triangletoquads(edgecycle, f, grad, a, b);
if (toreturn.length == 0) return null;
else return toreturn;
}
@@ -912,8 +972,9 @@ patch[] quadpatches(path3 edgecycle, positionedvector[] corners,
& reverse(middleguide) & cycle;
if (length(edgecycle) == 5) {
path3 secondpatch = middleguide
- & subpath(edgecycle, bisectorindices[1], 5+bisectorindices[0]) & cycle;
- toreturn = triangletoquads(secondpatch, f, grad, a, b);
+ & subpath(edgecycle, bisectorindices[1], 5+bisectorindices[0]) & cycle;
+ toreturn = usetriangles ? maketriangle(secondpatch, f, grad)
+ : triangletoquads(secondpatch, f, grad, a, b);
if (toreturn.length == 0) return null;
toreturn.push(patchwithnormals(firstpatch, grad));
} else {
@@ -922,7 +983,7 @@ patch[] quadpatches(path3 edgecycle, positionedvector[] corners,
& subpath(edgecycle, bisectorindices[1], 6+bisectorindices[0])
& cycle;
toreturn = new patch[] {patchwithnormals(firstpatch, grad),
- patchwithnormals(secondpatch, grad)};
+ patchwithnormals(secondpatch, grad)};
}
return toreturn;
}
@@ -933,8 +994,8 @@ vectorfunction nGrad(real f(triple)) {
static real epsilon = 1e-3;
return new triple(triple v) {
return ( (f(v + epsilon*X) - f(v - epsilon*X)) / (2 epsilon),
- (f(v + epsilon*Y) - f(v - epsilon*Y)) / (2 epsilon),
- (f(v + epsilon*Z) - f(v - epsilon*Z)) / (2 epsilon) );
+ (f(v + epsilon*Y) - f(v - epsilon*Y)) / (2 epsilon),
+ (f(v + epsilon*Z) - f(v - epsilon*Z)) / (2 epsilon) );
};
}
@@ -953,18 +1014,18 @@ triple operator cast(evaluatedpoint p) { return p.pt; }
// Compute the values of a function at every vertex of an nx by ny by nz
// array of rectangular solids.
evaluatedpoint[][][] make3dgrid(triple a, triple b, int nx, int ny, int nz,
- real f(triple), bool allowzero = false)
+ real f(triple), bool allowzero = false)
{
evaluatedpoint[][][] toreturn = new evaluatedpoint[nx+1][ny+1][nz+1];
for (int i = 0; i <= nx; ++i) {
for (int j = 0; j <= ny; ++j) {
for (int k = 0; k <= nz; ++k) {
- triple pt = (interp(a.x, b.x, i/nx),
- interp(a.y, b.y, j/ny),
- interp(a.z, b.z, k/nz));
- real value = f(pt);
- if (value == 0 && !allowzero) value = 1e-5;
- toreturn[i][j][k] = evaluatedpoint(pt, value);
+ triple pt = (interp(a.x, b.x, i/nx),
+ interp(a.y, b.y, j/ny),
+ interp(a.z, b.z, k/nz));
+ real value = f(pt);
+ if (value == 0 && !allowzero) value = 1e-5;
+ toreturn[i][j][k] = evaluatedpoint(pt, value);
}
}
}
@@ -983,8 +1044,8 @@ T[][] slice(T[][] a, int start1, int end1, int start2, int end2) {
return toreturn;
}
T[][][] slice(T[][][] a, int start1, int end1,
- int start2, int end2,
- int start3, int end3) {
+ int start2, int end2,
+ int start3, int end3) {
T[][][] toreturn = new T[end1-start1][][];
for (int i = start1; i < end1; ++i) {
toreturn[i-start1] = slice(a[i], start2, end2, start3, end3);
@@ -1000,8 +1061,8 @@ T[][] slice(T[][] a, int start1, int end1, int start2, int end2) {
return toreturn;
}
T[][][] slice(T[][][] a, int start1, int end1,
- int start2, int end2,
- int start3, int end3) {
+ int start2, int end2,
+ int start3, int end3) {
T[][][] toreturn = new T[end1-start1][][];
for (int i = start1; i < end1; ++i) {
toreturn[i-start1] = slice(a[i], start2, end2, start3, end3);
@@ -1021,73 +1082,74 @@ struct gridwithzeros {
triple grad(triple);
real f(triple);
int maxdepth;
+ bool usetriangles;
// Populate the edges with zeros that have a sign change and are not already
// populated.
void fillzeros() {
for (int j = 0; j < ny+1; ++j) {
for (int k = 0; k < nz+1; ++k) {
- real y = corners[0][j][k].pt.y;
- real z = corners[0][j][k].pt.z;
- real f_along_x(real t) { return f((t, y, z)); }
- for (int i = 0; i < nx; ++i) {
- if (xdirzeros[i][j][k] != null) continue;
- evaluatedpoint start = corners[i][j][k];
- evaluatedpoint end = corners[i+1][j][k];
- if ((start.value > 0 && end.value > 0) || (start.value < 0 && end.value < 0))
- xdirzeros[i][j][k] = null;
- else {
- triple root = (0,y,z);
- root += X * findroot(f_along_x, start.pt.x, end.pt.x,
- fa=start.value, fb=end.value);
- triple normal = grad(root);
- xdirzeros[i][j][k] = positionedvector(root, normal);
- }
- }
+ real y = corners[0][j][k].pt.y;
+ real z = corners[0][j][k].pt.z;
+ real f_along_x(real t) { return f((t, y, z)); }
+ for (int i = 0; i < nx; ++i) {
+ if (xdirzeros[i][j][k] != null) continue;
+ evaluatedpoint start = corners[i][j][k];
+ evaluatedpoint end = corners[i+1][j][k];
+ if ((start.value > 0 && end.value > 0) || (start.value < 0 && end.value < 0))
+ xdirzeros[i][j][k] = null;
+ else {
+ triple root = (0,y,z);
+ root += X * findroot(f_along_x, start.pt.x, end.pt.x,
+ fa=start.value, fb=end.value);
+ triple normal = grad(root);
+ xdirzeros[i][j][k] = positionedvector(root, normal);
+ }
+ }
}
}
for (int i = 0; i < nx+1; ++i) {
for (int k = 0; k < nz+1; ++k) {
- real x = corners[i][0][k].pt.x;
- real z = corners[i][0][k].pt.z;
- real f_along_y(real t) { return f((x, t, z)); }
- for (int j = 0; j < ny; ++j) {
- if (ydirzeros[i][j][k] != null) continue;
- evaluatedpoint start = corners[i][j][k];
- evaluatedpoint end = corners[i][j+1][k];
- if ((start.value > 0 && end.value > 0) || (start.value < 0 && end.value < 0))
- ydirzeros[i][j][k] = null;
- else {
- triple root = (x,0,z);
- root += Y * findroot(f_along_y, start.pt.y, end.pt.y,
- fa=start.value, fb=end.value);
- triple normal = grad(root);
- ydirzeros[i][j][k] = positionedvector(root, normal);
- }
- }
+ real x = corners[i][0][k].pt.x;
+ real z = corners[i][0][k].pt.z;
+ real f_along_y(real t) { return f((x, t, z)); }
+ for (int j = 0; j < ny; ++j) {
+ if (ydirzeros[i][j][k] != null) continue;
+ evaluatedpoint start = corners[i][j][k];
+ evaluatedpoint end = corners[i][j+1][k];
+ if ((start.value > 0 && end.value > 0) || (start.value < 0 && end.value < 0))
+ ydirzeros[i][j][k] = null;
+ else {
+ triple root = (x,0,z);
+ root += Y * findroot(f_along_y, start.pt.y, end.pt.y,
+ fa=start.value, fb=end.value);
+ triple normal = grad(root);
+ ydirzeros[i][j][k] = positionedvector(root, normal);
+ }
+ }
}
}
for (int i = 0; i < nx+1; ++i) {
for (int j = 0; j < ny+1; ++j) {
- real x = corners[i][j][0].pt.x;
- real y = corners[i][j][0].pt.y;
- real f_along_z(real t) { return f((x, y, t)); }
- for (int k = 0; k < nz; ++k) {
- if (zdirzeros[i][j][k] != null) continue;
- evaluatedpoint start = corners[i][j][k];
- evaluatedpoint end = corners[i][j][k+1];
- if ((start.value > 0 && end.value > 0) || (start.value < 0 && end.value < 0))
- zdirzeros[i][j][k] = null;
- else {
- triple root = (x,y,0);
- root += Z * findroot(f_along_z, start.pt.z, end.pt.z,
- fa=start.value, fb=end.value);
- triple normal = grad(root);
- zdirzeros[i][j][k] = positionedvector(root, normal);
- }
- }
+ real x = corners[i][j][0].pt.x;
+ real y = corners[i][j][0].pt.y;
+ real f_along_z(real t) { return f((x, y, t)); }
+ for (int k = 0; k < nz; ++k) {
+ if (zdirzeros[i][j][k] != null) continue;
+ evaluatedpoint start = corners[i][j][k];
+ evaluatedpoint end = corners[i][j][k+1];
+ if ((start.value > 0 && end.value > 0) || (start.value < 0 && end.value < 0))
+ zdirzeros[i][j][k] = null;
+ else {
+ triple root = (x,y,0);
+ root += Z * findroot(f_along_z, start.pt.z, end.pt.z,
+ fa=start.value, fb=end.value);
+ triple normal = grad(root);
+ zdirzeros[i][j][k] = positionedvector(root, normal);
+ }
+ }
}
}
}
@@ -1097,14 +1159,15 @@ struct gridwithzeros {
// maximum subdivision depth. When a cube at maxdepth cannot be resolved to
// patches, it is left empty.
void operator init(int nx, int ny, int nz,
- real f(triple), triple a, triple b,
- int maxdepth = 6) {
+ real f(triple), triple a, triple b,
+ int maxdepth = 6, bool usetriangles) {
this.nx = nx;
this.ny = ny;
this.nz = nz;
grad = nGrad(f);
this.f = f;
this.maxdepth = maxdepth;
+ this.usetriangles = usetriangles;
corners = make3dgrid(a, b, nx, ny, nz, f);
xdirzeros = new positionedvector[nx][ny+1][nz+1];
ydirzeros = new positionedvector[nx+1][ny][nz+1];
@@ -1112,11 +1175,11 @@ struct gridwithzeros {
for (int i = 0; i <= nx; ++i) {
for (int j = 0; j <= ny; ++j) {
- for (int k = 0; k <= nz; ++k) {
- if (i < nx) xdirzeros[i][j][k] = null;
- if (j < ny) ydirzeros[i][j][k] = null;
- if (k < nz) zdirzeros[i][j][k] = null;
- }
+ for (int k = 0; k <= nz; ++k) {
+ if (i < nx) xdirzeros[i][j][k] = null;
+ if (j < ny) ydirzeros[i][j][k] = null;
+ if (k < nz) zdirzeros[i][j][k] = null;
+ }
}
}
@@ -1144,18 +1207,18 @@ struct gridwithzeros {
corners = new evaluatedpoint[nx+1][ny+1][nz+1];
for (int i = 0; i <= nx; ++i) {
for (int j = 0; j <= ny; ++j) {
- for (int k = 0; k <= nz; ++k) {
- if (i % 2 == 0 && j % 2 == 0 && k % 2 == 0) {
- corners[i][j][k] = oldcorners[quotient(i,2)][quotient(j,2)][quotient(k,2)];
- } else {
- triple pt = (interp(a.x, b.x, i/nx),
- interp(a.y, b.y, j/ny),
- interp(a.z, b.z, k/nz));
- real value = f(pt);
- if (value == 0) value = 1e-5;
- corners[i][j][k] = evaluatedpoint(pt, value);
- }
- }
+ for (int k = 0; k <= nz; ++k) {
+ if (i % 2 == 0 && j % 2 == 0 && k % 2 == 0) {
+ corners[i][j][k] = oldcorners[quotient(i,2)][quotient(j,2)][quotient(k,2)];
+ } else {
+ triple pt = (interp(a.x, b.x, i/nx),
+ interp(a.y, b.y, j/ny),
+ interp(a.z, b.z, k/nz));
+ real value = f(pt);
+ if (value == 0) value = 1e-5;
+ corners[i][j][k] = evaluatedpoint(pt, value);
+ }
+ }
}
}
@@ -1163,23 +1226,23 @@ struct gridwithzeros {
xdirzeros = new positionedvector[nx][ny+1][nz+1];
for (int i = 0; i < nx; ++i) {
for (int j = 0; j < ny + 1; ++j) {
- for (int k = 0; k < nz + 1; ++k) {
- if (j % 2 != 0 || k % 2 != 0) {
- xdirzeros[i][j][k] = null;
- } else {
- positionedvector zero = oldxdir[quotient(i,2)][quotient(j,2)][quotient(k,2)];
- if (zero == null) {
- xdirzeros[i][j][k] = null;
- continue;
- }
- real x = zero.position.x;
- if (x > interp(a.x, b.x, i/nx) && x < interp(a.x, b.x, (i+1)/nx)) {
- xdirzeros[i][j][k] = zero;
- } else {
- xdirzeros[i][j][k] = null;
- }
- }
- }
+ for (int k = 0; k < nz + 1; ++k) {
+ if (j % 2 != 0 || k % 2 != 0) {
+ xdirzeros[i][j][k] = null;
+ } else {
+ positionedvector zero = oldxdir[quotient(i,2)][quotient(j,2)][quotient(k,2)];
+ if (zero == null) {
+ xdirzeros[i][j][k] = null;
+ continue;
+ }
+ real x = zero.position.x;
+ if (x > interp(a.x, b.x, i/nx) && x < interp(a.x, b.x, (i+1)/nx)) {
+ xdirzeros[i][j][k] = zero;
+ } else {
+ xdirzeros[i][j][k] = null;
+ }
+ }
+ }
}
}
@@ -1187,23 +1250,23 @@ struct gridwithzeros {
ydirzeros = new positionedvector[nx+1][ny][nz+1];
for (int i = 0; i < nx+1; ++i) {
for (int j = 0; j < ny; ++j) {
- for (int k = 0; k < nz + 1; ++k) {
- if (i % 2 != 0 || k % 2 != 0) {
- ydirzeros[i][j][k] = null;
- } else {
- positionedvector zero = oldydir[quotient(i,2)][quotient(j,2)][quotient(k,2)];
- if (zero == null) {
- ydirzeros[i][j][k] = null;
- continue;
- }
- real y = zero.position.y;
- if (y > interp(a.y, b.y, j/ny) && y < interp(a.y, b.y, (j+1)/ny)) {
- ydirzeros[i][j][k] = zero;
- } else {
- ydirzeros[i][j][k] = null;
- }
- }
- }
+ for (int k = 0; k < nz + 1; ++k) {
+ if (i % 2 != 0 || k % 2 != 0) {
+ ydirzeros[i][j][k] = null;
+ } else {
+ positionedvector zero = oldydir[quotient(i,2)][quotient(j,2)][quotient(k,2)];
+ if (zero == null) {
+ ydirzeros[i][j][k] = null;
+ continue;
+ }
+ real y = zero.position.y;
+ if (y > interp(a.y, b.y, j/ny) && y < interp(a.y, b.y, (j+1)/ny)) {
+ ydirzeros[i][j][k] = zero;
+ } else {
+ ydirzeros[i][j][k] = null;
+ }
+ }
+ }
}
}
@@ -1211,23 +1274,23 @@ struct gridwithzeros {
zdirzeros = new positionedvector[nx+1][ny+1][nz];
for (int i = 0; i < nx + 1; ++i) {
for (int j = 0; j < ny + 1; ++j) {
- for (int k = 0; k < nz; ++k) {
- if (i % 2 != 0 || j % 2 != 0) {
- zdirzeros[i][j][k] = null;
- } else {
- positionedvector zero = oldzdir[quotient(i,2)][quotient(j,2)][quotient(k,2)];
- if (zero == null) {
- zdirzeros[i][j][k] = null;
- continue;
- }
- real z = zero.position.z;
- if (z > interp(a.z, b.z, k/nz) && z < interp(a.z, b.z, (k+1)/nz)) {
- zdirzeros[i][j][k] = zero;
- } else {
- zdirzeros[i][j][k] = null;
- }
- }
- }
+ for (int k = 0; k < nz; ++k) {
+ if (i % 2 != 0 || j % 2 != 0) {
+ zdirzeros[i][j][k] = null;
+ } else {
+ positionedvector zero = oldzdir[quotient(i,2)][quotient(j,2)][quotient(k,2)];
+ if (zero == null) {
+ zdirzeros[i][j][k] = null;
+ continue;
+ }
+ real z = zero.position.z;
+ if (z > interp(a.z, b.z, k/nz) && z < interp(a.z, b.z, (k+1)/nz)) {
+ zdirzeros[i][j][k] = zero;
+ } else {
+ zdirzeros[i][j][k] = null;
+ }
+ }
+ }
}
}
@@ -1254,14 +1317,14 @@ struct gridwithzeros {
void pushifnonnull(positionedvector v) {
if (v != null) {
- zeroedges.push(edge(currentface, nextface));
- zeros.push(v);
+ zeroedges.push(edge(currentface, nextface));
+ zeros.push(v);
}
}
positionedvector findzero(int face1, int face2) {
edge e = edge(face1, face2);
for (int i = 0; i < zeroedges.length; ++i) {
- if (zeroedges[i] == e) return zeros[i];
+ if (zeroedges[i] == e) return zeros[i];
}
return null;
}
@@ -1303,7 +1366,7 @@ struct gridwithzeros {
patch[] subdividecube() {
if (!subdivide()) {
- return new patch[0];
+ return new patch[0];
}
return draw(reportactive);
}
@@ -1324,19 +1387,31 @@ struct gridwithzeros {
path3 edgecycle;
for (int i = 0; i < faceorder.length; ++i) {
path3 currentpath = pathinface(patchcorners[i], patchcorners[i+1],
- faceorder[i+1], faceorder[i],
- faceorder[i+2]);
+ faceorder[i+1], faceorder[i],
+ faceorder[i+2]);
triple testpoint = point(currentpath, 0.5);
if (!checkpt(testpoint, f, grad, corners[0][0][0], corners[1][1][1])) {
- return subdividecube();
+ return subdividecube();
}
edgecycle = edgecycle & currentpath;
}
edgecycle = edgecycle & cycle;
+
+ { // Ensure the outward normals are pointing in the same direction as the gradient.
+ triple tangentin = patchcorners[0].position - precontrol(edgecycle, 0);
+ triple tangentout = postcontrol(edgecycle, 0) - patchcorners[0].position;
+ triple normal = cross(tangentin, tangentout);
+ if (dot(normal, patchcorners[0].direction) < 0) {
+ edgecycle = reverse(edgecycle);
+ patchcorners = patchcorners[-sequence(patchcorners.length)];
+ patchcorners.cyclic = true;
+ }
+ }
+
patch[] toreturn = quadpatches(edgecycle, patchcorners, f, grad,
- corners[0][0][0], corners[1][1][1]);
+ corners[0][0][0], corners[1][1][1], usetriangles);
if (alias(toreturn, null)) return subdividecube();
return toreturn;
}
@@ -1351,6 +1426,7 @@ struct gridwithzeros {
cube.ny = 1;
cube.nz = 1;
cube.maxdepth = maxdepth;
+ cube.usetriangles = usetriangles;
cube.corners = slice(corners,i,i+2,j,j+2,k,k+2);
cube.xdirzeros = slice(xdirzeros,i,i+1,j,j+2,k,k+2);
cube.ydirzeros = slice(ydirzeros,i,i+2,j,j+1,k,k+2);
@@ -1372,6 +1448,7 @@ struct gridwithzeros {
// grid will subdivide all the way to maxdepth if necessary to find points
// on the surface.
draw = new patch[](bool[] reportactive = null) {
+ if (alias(reportactive, null)) progress(true);
// A list of all the patches not already drawn but known
// to contain part of the surface. This "queue" is
// actually implemented as stack for simplicity, since
@@ -1382,49 +1459,49 @@ struct gridwithzeros {
bool[][][] enqueued = new bool[nx][ny][nz];
for (int i = 0; i < enqueued.length; ++i) {
for (int j = 0; j < enqueued[i].length; ++j) {
- for (int k = 0; k < enqueued[i][j].length; ++k) {
- enqueued[i][j][k] = false;
- }
+ for (int k = 0; k < enqueued[i][j].length; ++k) {
+ enqueued[i][j][k] = false;
+ }
}
}
void enqueue(int i, int j, int k) {
if (i >= 0 && i < nx
- && j >= 0 && j < ny
- && k >= 0 && k < nz
- && !enqueued[i][j][k]) {
- queue.push((i,j,k));
- enqueued[i][j][k] = true;
+ && j >= 0 && j < ny
+ && k >= 0 && k < nz
+ && !enqueued[i][j][k]) {
+ queue.push((i,j,k));
+ enqueued[i][j][k] = true;
}
if (!alias(reportactive, null)) {
- if (i < 0) reportactive[XLOW] = true;
- if (i >= nx) reportactive[XHIGH] = true;
- if (j < 0) reportactive[YLOW] = true;
- if (j >= ny) reportactive[YHIGH] = true;
- if (k < 0) reportactive[ZLOW] = true;
- if (k >= nz) reportactive[ZHIGH] = true;
+ if (i < 0) reportactive[XLOW] = true;
+ if (i >= nx) reportactive[XHIGH] = true;
+ if (j < 0) reportactive[YLOW] = true;
+ if (j >= ny) reportactive[YHIGH] = true;
+ if (k < 0) reportactive[ZLOW] = true;
+ if (k >= nz) reportactive[ZHIGH] = true;
}
}
for (int i = 0; i < nx+1; ++i) {
for (int j = 0; j < ny+1; ++j) {
- for (int k = 0; k < nz+1; ++k) {
- if (i < nx && xdirzeros[i][j][k] != null) {
- for (int jj = j-1; jj <= j; ++jj)
- for (int kk = k-1; kk <= k; ++kk)
- enqueue(i, jj, kk);
- }
- if (j < ny && ydirzeros[i][j][k] != null) {
- for (int ii = i-1; ii <= i; ++ii)
- for (int kk = k-1; kk <= k; ++kk)
- enqueue(ii, j, kk);
- }
- if (k < nz && zdirzeros[i][j][k] != null) {
- for (int ii = i-1; ii <= i; ++ii)
- for (int jj = j-1; jj <= j; ++jj)
- enqueue(ii, jj, k);
- }
- }
+ for (int k = 0; k < nz+1; ++k) {
+ if (i < nx && xdirzeros[i][j][k] != null) {
+ for (int jj = j-1; jj <= j; ++jj)
+ for (int kk = k-1; kk <= k; ++kk)
+ enqueue(i, jj, kk);
+ }
+ if (j < ny && ydirzeros[i][j][k] != null) {
+ for (int ii = i-1; ii <= i; ++ii)
+ for (int kk = k-1; kk <= k; ++kk)
+ enqueue(ii, j, kk);
+ }
+ if (k < nz && zdirzeros[i][j][k] != null) {
+ for (int ii = i-1; ii <= i; ++ii)
+ for (int jj = j-1; jj <= j; ++jj)
+ enqueue(ii, jj, k);
+ }
+ }
}
}
@@ -1448,9 +1525,9 @@ struct gridwithzeros {
if (reportface[ZLOW]) enqueue(i,j,k-1);
if (reportface[ZHIGH]) enqueue(i,j,k+1);
surface.append(toappend);
- if (settings.verbose > 1 && alias(reportactive, null)) write(stdout, '.');
+ if (alias(reportactive, null)) progress();
}
- if (settings.verbose > 1 && alias(reportactive, null)) write(stdout, '\n');
+ if (alias(reportactive, null)) progress(false);
return surface;
};
}
@@ -1478,22 +1555,25 @@ struct gridwithzeros {
// maxdepth - the maximum depth to which the algorithm will subdivide in
// an effort to find patches that closely approximate the true surface.
surface implicitsurface(real f(triple) = null, real ff(real,real,real) = null,
- triple a, triple b,
- int n = nmesh,
- bool keyword overlapedges = false,
- int keyword nx=n, int keyword ny=n,
- int keyword nz=n,
- int keyword maxdepth = 8) {
+ triple a, triple b,
+ int n = nmesh,
+ bool keyword overlapedges = false,
+ int keyword nx=n, int keyword ny=n,
+ int keyword nz=n,
+ int keyword maxdepth = 8,
+ bool keyword usetriangles=true) {
if (f == null && ff == null)
abort("implicitsurface called without specifying a function.");
if (f != null && ff != null)
abort("Only specify one function when calling implicitsurface.");
if (f == null) f = new real(triple w) { return ff(w.x, w.y, w.z); };
- gridwithzeros grid = gridwithzeros(nx, ny, nz, f, a, b, maxdepth=maxdepth);
+ gridwithzeros grid = gridwithzeros(nx, ny, nz, f, a, b, maxdepth=maxdepth,
+ usetriangles=usetriangles);
patch[] patches = grid.draw();
if (overlapedges) {
for (int i = 0; i < patches.length; ++i) {
- triple center = patches[i].point(1/2,1/2);
+ 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];
}
}
diff --git a/Build/source/utils/asymptote/base/three_surface.asy b/Build/source/utils/asymptote/base/three_surface.asy
index 175ef562d80..c6d439e9fb0 100644
--- a/Build/source/utils/asymptote/base/three_surface.asy
+++ b/Build/source/utils/asymptote/base/three_surface.asy
@@ -68,7 +68,9 @@ struct patch {
}
triple Bu(int j, real u) {return bezier(P[0][j],P[1][j],P[2][j],P[3][j],u);}
- triple BuP(int j, real u) {return bezierP(P[0][j],P[1][j],P[2][j],P[3][j],u);}
+ triple BuP(int j, real u) {
+ return bezierP(P[0][j],P[1][j],P[2][j],P[3][j],u);
+ }
triple BuPP(int j, real u) {
return bezierPP(P[0][j],P[1][j],P[2][j],P[3][j],u);
}
@@ -82,7 +84,9 @@ struct patch {
}
triple Bv(int i, real v) {return bezier(P[i][0],P[i][1],P[i][2],P[i][3],v);}
- triple BvP(int i, real v) {return bezierP(P[i][0],P[i][1],P[i][2],P[i][3],v);}
+ triple BvP(int i, real v) {
+ return bezierP(P[i][0],P[i][1],P[i][2],P[i][3],v);
+ }
triple BvPP(int i, real v) {
return bezierPP(P[i][0],P[i][1],P[i][2],P[i][3],v);
}
@@ -99,13 +103,6 @@ struct patch {
return bezier(Bu(0,u),Bu(1,u),Bu(2,u),Bu(3,u),v);
}
- triple pointtriangular(real u, real v) {
- real w=1-u-v;
- return w^2*(w*P[0][0]+3*(u*P[1][0]+v*P[1][1]))+
- u^2*(u*P[3][0]+3*(w*P[2][0]+v*P[3][1]))+
- 6*u*v*w*P[2][1]+v^2*(v*P[3][3]+3*(w*P[2][2]+u*P[3][2]));
- }
-
// compute normal vectors for degenerate cases
private triple normal0(real u, real v, real epsilon) {
triple n=0.5*(cross(bezier(BuPP(0,u),BuPP(1,u),BuPP(2,u),BuPP(3,u),v),
@@ -167,46 +164,92 @@ struct patch {
return abs(n) > epsilon ? n : normal0(0,1,epsilon);
}
- triple normal00triangular() {
- triple n=9*cross(P[1][0]-P[0][0],P[1][1]-P[0][0]);
- real epsilon=fuzz*change2(P);
- return abs(n) > epsilon ? n : normal0(0,0,epsilon);
+ triple pointtriangular(real u, real v) {
+ real w=1-u-v;
+ return w^2*(w*P[0][0]+3*(u*P[1][0]+v*P[1][1]))+
+ u^2*(3*(w*P[2][0]+v*P[3][1])+u*P[3][0])+
+ 6*u*v*w*P[2][1]+v^2*(3*(w*P[2][2]+u*P[3][2])+v*P[3][3]);
}
- triple normal10triangular() {
- triple n=9*cross(P[3][0]-P[2][0],P[3][1]-P[2][0]);
- real epsilon=fuzz*change2(P);
- return abs(n) > epsilon ? n : normal0(1,0,epsilon);
+ triple bu(real u, real v) {
+ // Compute one-third of the directional derivative of a Bezier triangle
+ // in the u direction at (u,v).
+ real w=1-u-v;
+ return -w^2*P[0][0]+w*(w-2*u)*P[1][0]-2*w*v*P[1][1]+u*(2*w-u)*P[2][0]+
+ 2*v*(w-u)*P[2][1]-v^2*P[2][2]+u^2*P[3][0]+2*u*v*P[3][1]+v^2*P[3][2];
}
- triple normal01triangular() {
- triple n=9*cross(P[3][2]-P[2][2],P[3][3]-P[2][2]);
- real epsilon=fuzz*change2(P);
- return abs(n) > epsilon ? n : normal0(0,1,epsilon);
+ triple buu(real u, real v) {
+ // Compute one-sixth of the second directional derivative of a Bezier
+ // triangle in the u direction at (u,v).
+ real w=1-u-v;
+ return w*P[0][0]+(u-2*w)*P[1][0]+v*P[1][1]+(w-2*u)*P[2][0]-2*v*P[2][1]+
+ u*P[3][0]+v*P[3][1];
}
- // Compute one-third of the directional derivative of a Bezier triangle in the u
- // direction at point (u,v).
- private triple bu(real u, real v) {
+ triple buuu() {
+ // Compute one-sixth of the third directional derivative of a Bezier
+ // triangle in the u direction at (u,v).
+ return -P[0][0]+3*P[1][0]-3*P[2][0]+P[3][0];
+ }
+
+ triple bv(real u, real v) {
+ // Compute one-third of the directional derivative of a Bezier triangle
+ // in the v direction at (u,v).
real w=1-u-v;
- return u*(w*2-u)*P[2][0]+2*v*(w-u)*P[2][1]+w*(w-2*u)*P[1][0]+
- u*(u*P[3][0]+2*v*P[3][1])+v*v*P[3][2]-w*(2*v*P[1][1]+w*P[0][0])-
- v*v*P[2][2];
+ return -w^2*P[0][0]-2*u*w*P[1][0]+w*(w-2*v)*P[1][1]-u^2*P[2][0]+
+ 2*u*(w-v)*P[2][1]+v*(2*w-v)*P[2][2]+u*u*P[3][1]+2*u*v*P[3][2]+
+ v^2*P[3][3];
}
- // Compute one-third of the directional derivative of a Bezier triangle in the v
- // direction at point (u,v).
- private triple bv(real u, real v) {
+ triple bvv(real u, real v) {
+ // Compute one-sixth of the second directional derivative of a Bezier
+ // triangle in the v direction at (u,v).
real w=1-u-v;
- return u*2*(w-v)*P[2][1]+v*(2*w-v)*P[2][2]+w*(w-2*v)*P[1][1]+
- u*(u*P[3][1]+2*v*P[3][2])+v*v*P[3][3]-w*(2*u*P[1][0]+w*P[0][0])-
- u*u*P[2][0];
+ return w*P[0][0]+u*P[1][0]+(v-2*w)*P[1][1]-2*u*P[2][1]+(w-2*v)*P[2][2]+
+ u*P[3][2]+v*P[3][3];
+ }
+
+ triple bvvv() {
+ // Compute one-sixth of the third directional derivative of a Bezier
+ // triangle in the v direction at (u,v).
+ return -P[0][0]+3*P[1][1]-3*P[2][2]+P[3][3];
+ }
+
+ // compute normal vectors for a degenerate Bezier triangle
+ private triple normaltriangular0(real u, real v, real epsilon) {
+ triple n=9*(cross(buu(u,v),bv(u,v))+
+ cross(bu(u,v),bvv(u,v)));
+ return abs(n) > epsilon ? n :
+ 9*cross(buu(u,v),bvv(u,v))+
+ 3*(cross(buuu(),bv(u,v))+cross(bu(u,v),bvvv())+
+ cross(buuu(),bvv(u,v))+cross(buu(u,v),bvvv()))+
+ cross(buuu(),bvvv());
}
// Compute the normal of a Bezier triangle at (u,v)
triple normaltriangular(real u, real v) {
- // TODO: handle degeneracy
- return 9*cross(bu(u,v),bv(u,v));
+ triple n=9*cross(bu(u,v),bv(u,v));
+ real epsilon=fuzz*change2(P);
+ return (abs(n) > epsilon) ? n : normal0(u,v,epsilon);
+ }
+
+ triple normal00triangular() {
+ triple n=9*cross(P[1][0]-P[0][0],P[1][1]-P[0][0]);
+ real epsilon=fuzz*change2(P);
+ return abs(n) > epsilon ? n : normaltriangular0(0,0,epsilon);
+ }
+
+ triple normal10triangular() {
+ triple n=9*cross(P[3][0]-P[2][0],P[3][1]-P[2][0]);
+ real epsilon=fuzz*change2(P);
+ return abs(n) > epsilon ? n : normaltriangular0(1,0,epsilon);
+ }
+
+ triple normal01triangular() {
+ triple n=9*cross(P[3][2]-P[2][2],P[3][3]-P[2][2]);
+ real epsilon=fuzz*change2(P);
+ return abs(n) > epsilon ? n : normaltriangular0(0,1,epsilon);
}
pen[] colors(material m, light light=currentlight) {
@@ -255,6 +298,8 @@ struct patch {
normal10=normal10triangular;
normal01=normal01triangular;
colors=colorstriangular;
+ uequals=new path3(real u) {return nullpath3;};
+ vequals=new path3(real u) {return nullpath3;};
}
}
@@ -448,7 +493,7 @@ patch reverse(patch s)
assert(!s.triangular);
patch S;
S.P=transpose(s.P);
- if(s.colors.length > 0)
+ if(s.colors.length > 0)
S.colors=new pen[] {s.colors[0],s.colors[3],s.colors[2],s.colors[1]};
S.straight=s.straight;
S.planar=s.planar;
@@ -817,15 +862,15 @@ struct surface {
return ucyclic() ? g&cycle : g;
}
- // A constructor for a possibly nonconvex simple cyclic path in a given plane.
+ // A constructor for a possibly nonconvex simple cyclic path in a given
+ // plane.
void operator init(path p, triple plane(pair)=XYplane) {
- bool straight=piecewisestraight(p);
for(path g : regularize(p)) {
if(length(g) == 3) {
path3 G=path3(g,plane);
- s.push(patch(G,coons3(G)));
+ s.push(patch(G,coons3(G),planar=true));
} else
- s.push(patch(coons(g),plane,straight));
+ s.push(patch(coons(g),plane,piecewisestraight(g)));
}
}
@@ -1490,9 +1535,14 @@ void tensorshade(transform t=identity(), frame f, patch s,
material m, light light=currentlight, projection P)
{
- if(s.triangular) s=tensor(s);
+ pen[] p;
+ if(s.triangular) {
+ p=s.colorstriangular(m,light);
+ p.push(p[0]);
+ s=tensor(s);
+ } else p=s.colors(m,light);
tensorshade(f,box(t*s.min(P),t*s.max(P)),m.diffuse(),
- s.colors(m,light),t*project(s.external(),P,1),t*project(s.internal(),P));
+ p,t*project(s.external(),P,1),t*project(s.internal(),P));
}
restricted pen[] nullpens={nullpen};
@@ -1536,18 +1586,19 @@ void draw(transform t=identity(), frame f, surface s, int nu=1, int nv=1,
for(int p=depth.length-1; p >= 0; --p) {
real[] a=depth[p];
int k=round(a[1]);
+ patch S=s.s[k];
pen meshpen=meshpen[k];
- if(!invisible(meshpen)) {
+ if(!invisible(meshpen) && !S.triangular) {
if(group)
begingroup3(f,meshname(name),render);
meshpen=modifiers+meshpen;
real step=nu == 0 ? 0 : 1/nu;
for(int i=0; i <= nu; ++i)
- draw(f,s.s[k].uequals(i*step),meshpen,meshlight,partname(i,render),
+ draw(f,S.uequals(i*step),meshpen,meshlight,partname(i,render),
render);
step=nv == 0 ? 0 : 1/nv;
for(int j=0; j <= nv; ++j)
- draw(f,s.s[k].vequals(j*step),meshpen,meshlight,partname(j,render),
+ draw(f,S.vequals(j*step),meshpen,meshlight,partname(j,render),
render);
if(group)
endgroup3(f);
@@ -1629,8 +1680,9 @@ void draw(picture pic=currentpicture, surface s, int nu=1, int nv=1,
pen modifiers;
if(is3D()) modifiers=thin()+squarecap;
for(int k=0; k < s.s.length; ++k) {
+ patch S=s.s[k];
pen meshpen=meshpen[k];
- if(!invisible(meshpen)) {
+ if(!invisible(meshpen) && !S.triangular) {
meshpen=modifiers+meshpen;
real step=nu == 0 ? 0 : 1/nu;
for(int i=0; i <= nu; ++i)
diff --git a/Build/source/utils/asymptote/beziertriangle.cc b/Build/source/utils/asymptote/beziertriangle.cc
index b6497f38dcc..d68bed31382 100644
--- a/Build/source/utils/asymptote/beziertriangle.cc
+++ b/Build/source/utils/asymptote/beziertriangle.cc
@@ -9,7 +9,9 @@
namespace camp {
-static const double pixel=0.5; // Adaptive rendering constant.
+#ifdef HAVE_GL
+
+static const double pixel=0.25; // Adaptive rendering constant.
extern const double Fuzz;
extern const double Fuzz2;
@@ -24,9 +26,10 @@ inline triple maxabs(triple u, triple v)
inline triple displacement1(const triple& z0, const triple& c0,
const triple& c1, const triple& z1)
{
- // z0-z1 is computed twice. This is unnecessary, although perhaps not a big
- // deal and way easier to understand in this case.
- return maxabs(displacement(c0,z0,z1),displacement(c1,z0,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
@@ -39,27 +42,22 @@ inline triple displacement2(const triple& z, const triple& u, const triple& n)
triple displacement(const triple *controls)
{
- triple d=drawElement::zero;
-
triple z0=controls[0];
triple z1=controls[6];
triple z2=controls[9];
- // Optimize straight & planar cases.
-
- //for(size_t i=1; i < 10; ++i)
// The last three lines compute how straight the edges are. This should be a
- // sufficient test for the boundry points, so only the central point is
- // tested for deviance from the main triangle.
- d=maxabs(d,displacement2(controls[4],z0,unit(cross(z1-z0,z2-z0))));
+ // 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));
- // TODO: calculate displacement d from interior
- // Or simply assume a nondegenerate Jacobian.
-
return d;
}
@@ -381,7 +379,7 @@ struct Render
this->res=res;
triple po=p[0];
- double epsilon=0;
+ epsilon=0;
for(int i=1; i < 10; ++i)
epsilon=max(epsilon,abs2(p[i]-po));
@@ -431,12 +429,15 @@ struct Render
Render R;
-void bezierTriangle(const triple *g, bool straight, double Size2, triple Size3,
+void bezierTriangle(const triple *g, bool straight, double ratio,
bool havebillboard, triple center, GLfloat *colors)
{
R.init(havebillboard,center);
- R.render(g,pixel*length(Size3)/fabs(Size2),colors,straight ? 0 : 8);
+ R.render(g,pixel*ratio,colors,straight ? 0 : 8);
R.clear();
}
+#endif
+
} //namespace camp
+
diff --git a/Build/source/utils/asymptote/config.guess b/Build/source/utils/asymptote/config.guess
index 373a659a067..f32079abda6 100644
--- a/Build/source/utils/asymptote/config.guess
+++ b/Build/source/utils/asymptote/config.guess
@@ -1,12 +1,14 @@
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright 1992-2016 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='2016-02-11'
+timestamp='2008-01-23'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
+# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
@@ -15,22 +17,26 @@ timestamp='2016-02-11'
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that
-# program. This Exception is an additional permission under section 7
-# of the GNU General Public License, version 3 ("GPLv3").
-#
-# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner <per@bothner.com>.
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted ChangeLog entry.
#
-# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+# This script attempts to guess a canonical system name similar to
+# config.sub. If it succeeds, it prints the system name on stdout, and
+# exits with 0. Otherwise, it exits with 1.
#
-# Please send patches to <config-patches@gnu.org>.
-
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
me=`echo "$0" | sed -e 's,.*/,,'`
@@ -50,7 +56,8 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright 1992-2016 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -132,33 +139,12 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-case "${UNAME_SYSTEM}" in
-Linux|GNU|GNU/*)
- # If the system lacks a compiler, then just pick glibc.
- # We could probably try harder.
- LIBC=gnu
-
- eval $set_cc_for_build
- cat <<-EOF > $dummy.c
- #include <features.h>
- #if defined(__UCLIBC__)
- LIBC=uclibc
- #elif defined(__dietlibc__)
- LIBC=dietlibc
- #else
- LIBC=gnu
- #endif
- EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
- ;;
-esac
-
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:NetBSD:*:*)
# NetBSD (nbsd) targets should (where applicable) match one or
- # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
# switched to ELF, *-*-netbsd* would select the old
# object file format. This provides both forward
@@ -168,30 +154,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# Note: NetBSD doesn't particularly care about the vendor
# portion of the name. We always set it to "unknown".
sysctl="sysctl -n hw.machine_arch"
- UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
- /sbin/$sysctl 2>/dev/null || \
- /usr/sbin/$sysctl 2>/dev/null || \
- echo unknown)`
+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
case "${UNAME_MACHINE_ARCH}" in
armeb) machine=armeb-unknown ;;
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
sh5el) machine=sh5le-unknown ;;
- earmv*)
- arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
- endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
- machine=${arch}${endian}-unknown
- ;;
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac
# The Operating System including object format, if it has switched
# to ELF recently, or will in the future.
case "${UNAME_MACHINE_ARCH}" in
- arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ELF__
+ | grep __ELF__ >/dev/null
then
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
# Return netbsd for either. FIX?
@@ -201,14 +180,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
fi
;;
*)
- os=netbsd
- ;;
- esac
- # Determine ABI tags.
- case "${UNAME_MACHINE_ARCH}" in
- earm*)
- expr='s/^earmv[0-9]/-eabi/;s/eb$//'
- abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
+ os=netbsd
;;
esac
# The OS release
@@ -221,26 +193,18 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
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}"
- exit ;;
- *:Bitrig:*:*)
- UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
- echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+ echo "${machine}-${os}${release}"
exit ;;
*:OpenBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
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 ;;
@@ -253,16 +217,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
exit ;;
- *:Sortix:*:*)
- echo ${UNAME_MACHINE}-unknown-sortix
- exit ;;
alpha:OSF1:*:*)
case $UNAME_RELEASE in
*4.0)
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
@@ -272,46 +233,43 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
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.
# 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
@@ -337,12 +295,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
echo s390-ibm-zvmoe
exit ;;
*:OS400:*:*)
- echo powerpc-ibm-os400
+ echo powerpc-ibm-os400
exit ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit ;;
- arm*:riscos:*:*|arm*:RISCOS:*:*)
+ arm:riscos:*:*|arm:RISCOS:*:*)
echo arm-unknown-riscos
exit ;;
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
@@ -366,33 +324,14 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
case `/usr/bin/uname -p` in
sparc) echo sparc-icl-nx7; exit ;;
esac ;;
- s390x:SunOS:*:*)
- echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
sun4H:SunOS:5.*:*)
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
- i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
- echo i386-pc-auroraux${UNAME_RELEASE}
- exit ;;
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
- eval $set_cc_for_build
- SUN_ARCH=i386
- # If there is a compiler, see if it is configured for 64-bit objects.
- # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
- # This test works for both compilers.
- if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
- if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- SUN_ARCH=x86_64
- fi
- fi
- echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
@@ -414,7 +353,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
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}
@@ -436,23 +375,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# MiNT. But MiNT is downward compatible to TOS, so this should
# be no problem.
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
+ echo m68k-atari-mint${UNAME_RELEASE}
exit ;;
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
+ exit ;;
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
+ echo m68k-atari-mint${UNAME_RELEASE}
exit ;;
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
- echo m68k-milan-mint${UNAME_RELEASE}
- exit ;;
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
- echo m68k-hades-mint${UNAME_RELEASE}
- exit ;;
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
- echo m68k-unknown-mint${UNAME_RELEASE}
- exit ;;
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
m68k:machten:*:*)
echo m68k-apple-machten${UNAME_RELEASE}
exit ;;
@@ -522,8 +461,8 @@ EOF
echo m88k-motorola-sysv3
exit ;;
AViiON:dgux:*:*)
- # DG/UX returns AViiON for all architectures
- UNAME_PROCESSOR=`/usr/bin/uname -p`
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
then
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
@@ -536,7 +475,7 @@ EOF
else
echo i586-dg-dgux${UNAME_RELEASE}
fi
- exit ;;
+ exit ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
echo m88k-dolphin-sysv3
exit ;;
@@ -593,16 +532,15 @@ EOF
echo rs6000-ibm-aix3.2
fi
exit ;;
- *:AIX:*:[4567])
+ *:AIX:*:[456])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
else
IBM_ARCH=powerpc
fi
- if [ -x /usr/bin/lslpp ] ; then
- IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
- awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
else
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
fi
@@ -637,58 +575,58 @@ EOF
9000/[678][0-9][0-9])
if [ -x /usr/bin/getconf ]; then
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
- case "${sc_cpu_version}" in
- 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
- 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
- 532) # CPU_PA_RISC2_0
- case "${sc_kernel_bits}" in
- 32) HP_ARCH=hppa2.0n ;;
- 64) HP_ARCH=hppa2.0w ;;
- '') 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`
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
@@ -702,11 +640,11 @@ EOF
# => hppa64-hp-hpux11.23
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
- grep -q __LP64__
+ grep __LP64__ >/dev/null
then
- HP_ARCH=hppa2.0w
+ HP_ARCH="hppa2.0w"
else
- HP_ARCH=hppa64
+ HP_ARCH="hppa64"
fi
fi
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
@@ -773,22 +711,22 @@ EOF
exit ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
- exit ;;
+ exit ;;
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
- exit ;;
+ exit ;;
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
echo c34-convex-bsd
- exit ;;
+ exit ;;
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
echo c38-convex-bsd
- exit ;;
+ exit ;;
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd
- exit ;;
+ exit ;;
CRAY*Y-MP:*:*:*)
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
@@ -811,15 +749,15 @@ EOF
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}
@@ -831,39 +769,34 @@ EOF
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:FreeBSD:*:*)
- UNAME_PROCESSOR=`/usr/bin/uname -p`
- case ${UNAME_PROCESSOR} in
+ case ${UNAME_MACHINE} in
+ pc98)
+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
amd64)
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
*)
- echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
esac
exit ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
- *:MINGW64*:*)
- echo ${UNAME_MACHINE}-pc-mingw64
- exit ;;
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
- *:MSYS*:*)
- echo ${UNAME_MACHINE}-pc-msys
- exit ;;
i*:windows32*:*)
- # uname -m includes "-pc" on this system.
- echo ${UNAME_MACHINE}-mingw32
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
exit ;;
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
- *:Interix*:*)
- case ${UNAME_MACHINE} in
+ *:Interix*:[3456]*)
+ case ${UNAME_MACHINE} in
x86)
echo i586-pc-interix${UNAME_RELEASE}
exit ;;
- authenticamd | genuineintel | EM64T)
+ EM64T | authenticamd)
echo x86_64-unknown-interix${UNAME_RELEASE}
exit ;;
IA64)
@@ -873,9 +806,6 @@ EOF
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
exit ;;
- 8664:Windows_NT:*)
- echo x86_64-pc-mks
- exit ;;
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
@@ -896,163 +826,210 @@ EOF
exit ;;
*:GNU:*:*)
# the GNU system
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
exit ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
- aarch64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- aarch64_be:Linux:*:*)
- UNAME_MACHINE=aarch64_be
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- alpha:Linux:*:*)
- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
- EV5) UNAME_MACHINE=alphaev5 ;;
- EV56) UNAME_MACHINE=alphaev56 ;;
- PCA56) UNAME_MACHINE=alphapca56 ;;
- PCA57) UNAME_MACHINE=alphapca56 ;;
- EV6) UNAME_MACHINE=alphaev6 ;;
- EV67) UNAME_MACHINE=alphaev67 ;;
- EV68*) UNAME_MACHINE=alphaev68 ;;
- esac
- objdump --private-headers /bin/sh | grep -q ld.so.1
- if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- arc:Linux:*:* | arceb:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
arm*:Linux:*:*)
eval $set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
else
- if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ARM_PCS_VFP
- then
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
- else
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
- fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi
fi
exit ;;
avr32*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
cris:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ echo cris-axis-linux-gnu
exit ;;
crisv32:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-${LIBC}
- exit ;;
- e2k:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo crisv32-axis-linux-gnu
exit ;;
frv:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- hexagon:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- i*86:Linux:*:*)
- echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+ echo frv-unknown-linux-gnu
exit ;;
ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- k1om:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
m32r*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
- mips:Linux:*:* | mips64:Linux:*:*)
+ mips:Linux:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#undef CPU
- #undef ${UNAME_MACHINE}
- #undef ${UNAME_MACHINE}el
+ #undef mips
+ #undef mipsel
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=${UNAME_MACHINE}el
+ CPU=mipsel
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=${UNAME_MACHINE}
+ CPU=mips
#else
CPU=
#endif
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
- openrisc*:Linux:*:*)
- echo or1k-unknown-linux-${LIBC}
+ mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips64
+ #undef mips64el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mips64el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips64
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+ or32:Linux:*:*)
+ echo or32-unknown-linux-gnu
exit ;;
- or32:Linux:*:* | or1k*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu
exit ;;
- padre:Linux:*:*)
- echo sparc-unknown-linux-${LIBC}
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
exit ;;
- parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-${LIBC}
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
- PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
- *) echo hppa-unknown-linux-${LIBC} ;;
+ PA7*) echo hppa1.1-unknown-linux-gnu ;;
+ PA8*) echo hppa2.0-unknown-linux-gnu ;;
+ *) echo hppa-unknown-linux-gnu ;;
esac
exit ;;
- ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-${LIBC}
- exit ;;
- ppc:Linux:*:*)
- echo powerpc-unknown-linux-${LIBC}
- exit ;;
- ppc64le:Linux:*:*)
- echo powerpc64le-unknown-linux-${LIBC}
- exit ;;
- ppcle:Linux:*:*)
- echo powerpcle-unknown-linux-${LIBC}
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
+ echo ${UNAME_MACHINE}-ibm-linux
exit ;;
sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
- exit ;;
- tile*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
vax:Linux:*:*)
- echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+ echo ${UNAME_MACHINE}-dec-linux-gnu
exit ;;
x86_64:Linux:*:*)
- echo ${UNAME_MACHINE}-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
@@ -1060,11 +1037,11 @@ EOF
echo i386-sequent-sysv4
exit ;;
i*86:UNIX_SV:4.2MP:2.*)
- # Unixware is an offshoot of SVR4, but it has its own version
- # number series starting with 2...
- # I am not positive that other SVR4 systems won't match this,
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
# I just have to hope. -- rms.
- # Use sysv4.2uw... so that sysv4* matches it.
+ # Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
exit ;;
i*86:OS/2:*:*)
@@ -1081,7 +1058,7 @@ EOF
i*86:syllable:*:*)
echo ${UNAME_MACHINE}-pc-syllable
exit ;;
- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit ;;
i*86:*DOS:*:*)
@@ -1096,7 +1073,7 @@ EOF
fi
exit ;;
i*86:*:5:[678]*)
- # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
case `/bin/uname -X | grep "^Machine"` in
*486*) UNAME_MACHINE=i486 ;;
*Pentium) UNAME_MACHINE=i586 ;;
@@ -1124,13 +1101,10 @@ EOF
exit ;;
pc:*:*:*)
# Left here for compatibility:
- # uname -m prints for DJGPP always 'pc', but it prints nothing about
- # the processor, so we play safe by assuming i586.
- # Note: whatever this is, it MUST be the same as what config.sub
- # prints for the "djgpp" host, or else GDB 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 ;;
@@ -1165,18 +1139,8 @@ EOF
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4; exit; } ;;
- NCR*:*:4.2:* | MPRAS*:*:4.2:*)
- OS_REL='.3'
- test -r /etc/.relid \
- && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
echo m68k-unknown-lynxos${UNAME_RELEASE}
exit ;;
@@ -1189,7 +1153,7 @@ EOF
rs6000:LynxOS:2.*:*)
echo rs6000-unknown-lynxos${UNAME_RELEASE}
exit ;;
- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
echo powerpc-unknown-lynxos${UNAME_RELEASE}
exit ;;
SM[BE]S:UNIX_SV:*:*)
@@ -1209,10 +1173,10 @@ EOF
echo ns32k-sni-sysv
fi
exit ;;
- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
- # says <Richard.M.Bartel@ccMail.Census.GOV>
- echo i586-unisys-sysv4
- exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit ;;
*:UNIX_System_V:4*:FTX*)
# From Gerald Hewes <hewes@openmarket.com>.
# How about differentiating between stratus architectures? -djm
@@ -1238,11 +1202,11 @@ EOF
exit ;;
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then
- echo mips-nec-sysv${UNAME_RELEASE}
+ echo mips-nec-sysv${UNAME_RELEASE}
else
- echo mips-unknown-sysv${UNAME_RELEASE}
+ echo mips-unknown-sysv${UNAME_RELEASE}
fi
- exit ;;
+ exit ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
echo powerpc-be-beos
exit ;;
@@ -1252,12 +1216,6 @@ EOF
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
echo i586-pc-beos
exit ;;
- BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
- echo i586-pc-haiku
- exit ;;
- x86_64:Haiku:*:*)
- echo x86_64-unknown-haiku
- exit ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
exit ;;
@@ -1284,36 +1242,14 @@ EOF
exit ;;
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
- eval $set_cc_for_build
- if test "$UNAME_PROCESSOR" = unknown ; then
- UNAME_PROCESSOR=powerpc
- fi
- if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
- if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- case $UNAME_PROCESSOR in
- i386) UNAME_PROCESSOR=x86_64 ;;
- powerpc) UNAME_PROCESSOR=powerpc64 ;;
- esac
- fi
- fi
- elif test "$UNAME_PROCESSOR" = i386 ; then
- # Avoid executing cc on OS X 10.9, as it ships with a stub
- # that puts up a graphical alert prompting to install
- # developer tools. Any system running Mac OS X 10.7 or
- # later (Darwin 11 and later) is required to have a 64-bit
- # processor. This is not true of the ARM version of Darwin
- # that Apple uses in portable devices.
- UNAME_PROCESSOR=x86_64
- fi
+ case $UNAME_PROCESSOR in
+ unknown) UNAME_PROCESSOR=powerpc ;;
+ esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
UNAME_PROCESSOR=`uname -p`
- if test "$UNAME_PROCESSOR" = x86; then
+ if test "$UNAME_PROCESSOR" = "x86"; then
UNAME_PROCESSOR=i386
UNAME_MACHINE=pc
fi
@@ -1322,10 +1258,7 @@ EOF
*:QNX:*:4*)
echo i386-pc-qnx
exit ;;
- NEO-?:NONSTOP_KERNEL:*:*)
- echo neo-tandem-nsk${UNAME_RELEASE}
- exit ;;
- NSE-*:NONSTOP_KERNEL:*:*)
+ NSE-?:NONSTOP_KERNEL:*:*)
echo nse-tandem-nsk${UNAME_RELEASE}
exit ;;
NSR-?:NONSTOP_KERNEL:*:*)
@@ -1344,7 +1277,7 @@ EOF
# "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"
@@ -1370,13 +1303,13 @@ EOF
echo pdp10-unknown-its
exit ;;
SEI:*:*:SEIUX)
- echo mips-sei-seiux${UNAME_RELEASE}
+ echo mips-sei-seiux${UNAME_RELEASE}
exit ;;
*:DragonFly:*:*)
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit ;;
*:*VMS:*:*)
- UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
case "${UNAME_MACHINE}" in
A*) echo alpha-dec-vms ; exit ;;
I*) echo ia64-dec-vms ; exit ;;
@@ -1391,16 +1324,158 @@ EOF
i*86:rdos:*:*)
echo ${UNAME_MACHINE}-pc-rdos
exit ;;
- i*86:AROS:*:*)
- echo ${UNAME_MACHINE}-pc-aros
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+# include <sys/param.h>
+# if defined (BSD)
+# if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+# else
+# if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# endif
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# else
+ printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
exit ;;
- x86_64:VMkernel:*:*)
- echo ${UNAME_MACHINE}-unknown-esx
+ c34*)
+ echo c34-convex-bsd
exit ;;
- amd64:Isilon\ OneFS:*:*)
- echo x86_64-unknown-onefs
+ c38*)
+ echo c38-convex-bsd
exit ;;
-esac
+ c4*)
+ echo c4-convex-bsd
+ exit ;;
+ esac
+fi
cat >&2 <<EOF
$0: unable to guess system type
@@ -1409,9 +1484,9 @@ 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 the version you run ($0) is already up to date, please
send the following data and any information you think might be
diff --git a/Build/source/utils/asymptote/config.sub b/Build/source/utils/asymptote/config.sub
index 6223dde9319..59bb593f109 100644
--- a/Build/source/utils/asymptote/config.sub
+++ b/Build/source/utils/asymptote/config.sub
@@ -1,18 +1,24 @@
#! /bin/sh
# Configuration validation subroutine script.
-# Copyright 1992-2016 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='2016-01-01'
+timestamp='2012-04-18'
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine. It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
@@ -20,12 +26,11 @@ timestamp='2016-01-01'
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that
-# program. This Exception is an additional permission under section 7
-# of the GNU General Public License, version 3 ("GPLv3").
+# the same distribution terms that you use for the rest of that program.
-# Please send patches to <config-patches@gnu.org>.
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted GNU ChangeLog entry.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
@@ -33,7 +38,7 @@ timestamp='2016-01-01'
# 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 @@ timestamp='2016-01-01'
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 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
-Copyright 1992-2016 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,8 +123,8 @@ esac
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
- linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
- knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
+ linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+ knetbsd*-gnu* | netbsd*-gnu* | \
kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
@@ -148,7 +156,7 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple | -axis | -knuth | -cray | -microblaze*)
+ -apple | -axis | -knuth | -cray | -microblaze)
os=
basic_machine=$1
;;
@@ -251,25 +259,21 @@ case $basic_machine in
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
- | arc | arceb \
- | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
- | avr | avr32 \
- | 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,29 +287,26 @@ case $basic_machine in
| mips64vr5900 | mips64vr5900el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
- | mipsisa32r6 | mipsisa32r6el \
| mipsisa64 | mipsisa64el \
| mipsisa64r2 | mipsisa64r2el \
- | mipsisa64r6 | mipsisa64r6el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
- | mipsr5900 | mipsr5900el \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| moxie \
| mt \
| msp430 \
| nds32 | nds32le | nds32be \
- | nios | nios2 | nios2eb | nios2el \
+ | nios | nios2 \
| ns16k | ns32k \
- | open8 | or1k | or1knd | or32 \
+ | open8 \
+ | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
| pyramid \
- | riscv32 | riscv64 \
| rl78 | rx \
| score \
- | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[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 \
@@ -313,7 +314,6 @@ case $basic_machine in
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| ubicom32 \
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
- | visium \
| we32k \
| x86 | xc16x | xstormy16 | xtensa \
| z8k | z80)
@@ -328,10 +328,7 @@ case $basic_machine in
c6x)
basic_machine=tic6x-unknown
;;
- leon|leon[3-9])
- basic_machine=sparc-$basic_machine
- ;;
- m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
basic_machine=$basic_machine-unknown
os=-none
;;
@@ -373,29 +370,26 @@ case $basic_machine in
| aarch64-* | aarch64_be-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
- | 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-* \
| 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-* \
@@ -409,33 +403,28 @@ case $basic_machine in
| mips64vr5900-* | mips64vr5900el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
- | mipsisa32r6-* | mipsisa32r6el-* \
| mipsisa64-* | mipsisa64el-* \
| mipsisa64r2-* | mipsisa64r2el-* \
- | mipsisa64r6-* | mipsisa64r6el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
- | mipsr5900-* | mipsr5900el-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
| mt-* \
| msp430-* \
| nds32-* | nds32le-* | nds32be-* \
- | nios-* | nios2-* | nios2eb-* | nios2el-* \
+ | nios-* | nios2-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| open8-* \
- | or1k*-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
| 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*-* \
@@ -443,7 +432,6 @@ case $basic_machine in
| ubicom32-* \
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
| vax-* \
- | visium-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \
@@ -520,9 +508,6 @@ case $basic_machine in
basic_machine=i386-pc
os=-aros
;;
- asmjs)
- basic_machine=asmjs-unknown
- ;;
aux)
basic_machine=m68k-apple
os=-aux
@@ -784,9 +769,6 @@ case $basic_machine in
basic_machine=m68k-isi
os=-sysv
;;
- leon-*|leon[3-9]-*)
- basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
- ;;
m68knommu)
basic_machine=m68k-unknown
os=-linux
@@ -806,15 +788,11 @@ case $basic_machine in
basic_machine=ns32k-utek
os=-sysv
;;
- microblaze*)
+ microblaze)
basic_machine=microblaze-xilinx
;;
- mingw64)
- basic_machine=x86_64-pc
- os=-mingw64
- ;;
mingw32)
- basic_machine=i686-pc
+ basic_machine=i386-pc
os=-mingw32
;;
mingw32ce)
@@ -842,10 +820,6 @@ case $basic_machine in
basic_machine=powerpc-unknown
os=-morphos
;;
- moxiebox)
- basic_machine=moxie-unknown
- os=-moxiebox
- ;;
msdos)
basic_machine=i386-pc
os=-msdos
@@ -854,7 +828,7 @@ case $basic_machine in
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
msys)
- basic_machine=i686-pc
+ basic_machine=i386-pc
os=-msys
;;
mvs)
@@ -1045,11 +1019,7 @@ case $basic_machine in
basic_machine=i586-unknown
os=-pw32
;;
- rdos | rdos64)
- basic_machine=x86_64-pc
- os=-rdos
- ;;
- rdos32)
+ rdos)
basic_machine=i386-pc
os=-rdos
;;
@@ -1376,30 +1346,29 @@ case $os in
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* | -plan9* \
+ | -sym* | -kopensolaris* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* | -cloudabi* | -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* \
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
- | -linux-newlib* | -linux-musl* | -linux-uclibc* \
- | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
+ | -mingw32* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
- | -onefs* | -tirtos*)
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1523,6 +1492,9 @@ case $os in
-aros*)
os=-aros
;;
+ -kaos*)
+ os=-kaos
+ ;;
-zvmoe)
os=-zvmoe
;;
@@ -1571,12 +1543,6 @@ case $basic_machine in
c4x-* | tic4x-*)
os=-coff
;;
- c8051-*)
- os=-elf
- ;;
- hexagon-*)
- os=-elf
- ;;
tic54x-*)
os=-coff
;;
diff --git a/Build/source/utils/asymptote/configure b/Build/source/utils/asymptote/configure
index e739637ad2f..5f19635ce27 100755
--- a/Build/source/utils/asymptote/configure
+++ b/Build/source/utils/asymptote/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for Asymptote 2.36.
+# Generated by GNU Autoconf 2.69 for Asymptote 2.37.
#
# Report bugs to <http://sourceforge.net/projects/asymptote>.
#
@@ -580,8 +580,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='Asymptote'
PACKAGE_TARNAME='asymptote'
-PACKAGE_VERSION='2.36'
-PACKAGE_STRING='Asymptote 2.36'
+PACKAGE_VERSION='2.37'
+PACKAGE_STRING='Asymptote 2.37'
PACKAGE_BUGREPORT='http://sourceforge.net/projects/asymptote'
PACKAGE_URL=''
@@ -1281,7 +1281,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures Asymptote 2.36 to adapt to many kinds of systems.
+\`configure' configures Asymptote 2.37 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1346,7 +1346,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of Asymptote 2.36:";;
+ short | recursive ) echo "Configuration of Asymptote 2.37:";;
esac
cat <<\_ACEOF
@@ -1459,7 +1459,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-Asymptote configure 2.36
+Asymptote configure 2.37
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2045,7 +2045,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by Asymptote $as_me 2.36, which was
+It was created by Asymptote $as_me 2.37, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -8509,7 +8509,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by Asymptote $as_me 2.36, which was
+This file was extended by Asymptote $as_me 2.37, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -8571,7 +8571,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-Asymptote config.status 2.36
+Asymptote config.status 2.37
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/Build/source/utils/asymptote/configure.ac b/Build/source/utils/asymptote/configure.ac
index 12c4345085c..227d8a3677b 100644
--- a/Build/source/utils/asymptote/configure.ac
+++ b/Build/source/utils/asymptote/configure.ac
@@ -3,7 +3,7 @@
# this file.
AC_PREREQ(2)
-AC_INIT([Asymptote],[2.36],[http://sourceforge.net/projects/asymptote])
+AC_INIT([Asymptote],[2.37],[http://sourceforge.net/projects/asymptote])
VERSION=$PACKAGE_VERSION
AC_SUBST(VERSION)
m4_include([ax_pthread.m4])
diff --git a/Build/source/utils/asymptote/doc/CAD.pdf b/Build/source/utils/asymptote/doc/CAD.pdf
index 9b70c5fed23..41fbbc97347 100644
--- a/Build/source/utils/asymptote/doc/CAD.pdf
+++ b/Build/source/utils/asymptote/doc/CAD.pdf
Binary files differ
diff --git a/Build/source/utils/asymptote/doc/FAQ/asy-faq.info b/Build/source/utils/asymptote/doc/FAQ/asy-faq.info
index f3460ce0210..035dbfdb1c1 100644
--- a/Build/source/utils/asymptote/doc/FAQ/asy-faq.info
+++ b/Build/source/utils/asymptote/doc/FAQ/asy-faq.info
@@ -10,7 +10,7 @@ END-INFO-DIR-ENTRY
File: asy-faq.info, Node: Top, Next: Question 1.1, Up: (dir)
ASYMPTOTE FREQUENTLY ASKED QUESTIONS
- 03 Feb 2016
+ 13 Mar 2016
This is the list of Frequently Asked Questions about Asymptote (asy).
diff --git a/Build/source/utils/asymptote/doc/TeXShopAndAsymptote.pdf b/Build/source/utils/asymptote/doc/TeXShopAndAsymptote.pdf
index 4f2d03bd93f..fe6030b1ff3 100644
--- a/Build/source/utils/asymptote/doc/TeXShopAndAsymptote.pdf
+++ b/Build/source/utils/asymptote/doc/TeXShopAndAsymptote.pdf
Binary files differ
diff --git a/Build/source/utils/asymptote/doc/asy-latex.dtx b/Build/source/utils/asymptote/doc/asy-latex.dtx
index 7ce3c409ab4..4030bb955fb 100644
--- a/Build/source/utils/asymptote/doc/asy-latex.dtx
+++ b/Build/source/utils/asymptote/doc/asy-latex.dtx
@@ -38,7 +38,7 @@ Licence: GPL2+
%</driver>
%<pkg>\ProvidesPackage{asymptote}
%<*pkg>
- [2015/05/10 v1.29 Asymptote style file for LaTeX]
+ [2016/02/09 v1.30 Asymptote style file for LaTeX]
%</pkg>
%
%<*driver>
@@ -174,6 +174,7 @@ Licence: GPL2+
%
% \begin{macrocode}
\newbox\ASYbox
+\newdimen\ASYdimen
\newcounter{asy}
% \end{macrocode}
%
diff --git a/Build/source/utils/asymptote/doc/asy-latex.pdf b/Build/source/utils/asymptote/doc/asy-latex.pdf
index 7903b856bc3..707a3682690 100644
--- a/Build/source/utils/asymptote/doc/asy-latex.pdf
+++ b/Build/source/utils/asymptote/doc/asy-latex.pdf
Binary files differ
diff --git a/Build/source/utils/asymptote/doc/asy.1 b/Build/source/utils/asymptote/doc/asy.1
index 8fd79e1fdec..e8fbc42290d 100644
--- a/Build/source/utils/asymptote/doc/asy.1
+++ b/Build/source/utils/asymptote/doc/asy.1
@@ -212,7 +212,7 @@ Prompt [> ].
Continuation prompt for multiline input [..].
.TP
.B \-q,\-quiet
-Suppress welcome message [false].
+Suppress welcome text and noninteractive stdout [false].
.TP
.B \-render n
Render 3D graphics using n pixels per bp (-1=auto) [-1].
diff --git a/Build/source/utils/asymptote/doc/asyRefCard.pdf b/Build/source/utils/asymptote/doc/asyRefCard.pdf
index a520a0c3c96..4dd99ef2fc3 100644
--- a/Build/source/utils/asymptote/doc/asyRefCard.pdf
+++ b/Build/source/utils/asymptote/doc/asyRefCard.pdf
Binary files differ
diff --git a/Build/source/utils/asymptote/doc/asymptote.pdf b/Build/source/utils/asymptote/doc/asymptote.pdf
index 5694e791f3a..36bc50b8c33 100644
--- a/Build/source/utils/asymptote/doc/asymptote.pdf
+++ b/Build/source/utils/asymptote/doc/asymptote.pdf
Binary files differ
diff --git a/Build/source/utils/asymptote/doc/asymptote.sty b/Build/source/utils/asymptote/doc/asymptote.sty
index 2915f1238d1..94fdd4fe7a0 100644
--- a/Build/source/utils/asymptote/doc/asymptote.sty
+++ b/Build/source/utils/asymptote/doc/asymptote.sty
@@ -17,10 +17,11 @@
%% Licence: GPL2+
%%
\ProvidesPackage{asymptote}
- [2015/05/10 v1.29 Asymptote style file for LaTeX]
+ [2016/02/09 v1.30 Asymptote style file for LaTeX]
\def\Asymptote{{\tt Asymptote}}
\InputIfFileExists{\jobname.pre}{}{}
\newbox\ASYbox
+\newdimen\ASYdimen
\newcounter{asy}
\newwrite\AsyStream
\newwrite\AsyPreStream
diff --git a/Build/source/utils/asymptote/doc/asymptote.texi b/Build/source/utils/asymptote/doc/asymptote.texi
index f11cb022ecf..abbc5c8799a 100644
--- a/Build/source/utils/asymptote/doc/asymptote.texi
+++ b/Build/source/utils/asymptote/doc/asymptote.texi
@@ -9,7 +9,7 @@ This file documents @code{Asymptote}, version @value{VERSION}.
@url{http://asymptote.sourceforge.net}
-Copyright @copyright{} 2004-14 Andy Hammerlindl, John Bowman, and Tom Prince.
+Copyright @copyright{} 2004-16 Andy Hammerlindl, John Bowman, and Tom Prince.
@quotation
Permission is granted to copy, distribute and/or modify this document
@@ -40,7 +40,7 @@ file LICENSE in the top-level source directory).
@contents
@ifnottex
-@node Top
+@node Top, Description, (dir), (dir)
@top Asymptote
@insertcopying
@@ -79,6 +79,14 @@ Installation
* Git:: Getting the latest development source
* Uninstall:: Goodbye, @code{Asymptote}!
+Tutorial
+
+* Drawing in batch mode:: Run @code{Asymptote} on a text file
+* Drawing in interactive mode:: Running @code{Asymptote} interactively
+* Figure size:: Specifying the figure size
+* Labels:: Adding @code{LaTeX} labels
+* Paths:: Drawing lines and curves
+
Drawing commands
* draw:: Draw a path on a picture or frame
@@ -117,7 +125,6 @@ Functions
* Rest arguments:: Functions with a variable number of arguments
* Mathematical functions:: Standard libm functions
-
Arrays
* Slices:: Python-style array slices
@@ -168,12 +175,12 @@ Base modules
Graphical User Interface
* GUI installation:: Installing @code{xasy}
-* GUI usage::
+* GUI usage:: Using @code{xasy} to edit objects
@end detailmenu
@end menu
-@node Description
+@node Description, Installation, Top, Top
@chapter Description
@cindex description
@@ -249,22 +256,27 @@ applications. A scientific graphing module has already been written
(@pxref{graph}). Examples of @code{Asymptote} code and output,
including animations, are available at
@quotation
-@url{http://asymptote.sourceforge.net/gallery/}.
+@url{http://asymptote.sourceforge.net/gallery/}
@end quotation
@noindent
+Clicking on an example file name in this manual, like
+@code{@uref{http://asymptote.sourceforge.net/gallery/Pythagoras.pdf,,Pythagoras}}, will display the @acronym{PDF} output, whereas clicking on its
+@code{@uref{http://asymptote.sourceforge.net/gallery/Pythagoras.asy,,.asy}}
+extension will show the corresponding @code{Asymptote} code in a separate window.
+
Links to many external resources, including an excellent user-written
@code{Asymptote} tutorial can be found at
@quotation
-@url{http://asymptote.sourceforge.net/links.html}.
+@url{http://asymptote.sourceforge.net/links.html}
@end quotation
@cindex reference
@cindex quick reference
A quick reference card for @code{Asymptote} is available at
@quotation
-@url{http://asymptote.sourceforge.net/asyRefCard.pdf}.
+@url{http://asymptote.sourceforge.net/asyRefCard.pdf}
@end quotation
-@node Installation
+@node Installation, Tutorial, Description, Top
@chapter Installation
@cindex installation
@@ -286,7 +298,7 @@ please see also @ref{Configuring}.
@noindent
We recommend subscribing to new release announcements at
@quotation
-@url{http://freecode.com/projects/asy}
+@url{http://sourceforge.net/projects/asymptote}
@end quotation
@noindent
Users may also wish to monitor the @code{Asymptote} forum:
@@ -295,7 +307,7 @@ Users may also wish to monitor the @code{Asymptote} forum:
@end quotation
@noindent
-@node UNIX binary distributions
+@node UNIX binary distributions, MacOS X binary distributions, Installation, Installation
@section UNIX binary distributions
@cindex UNIX binary distributions
@@ -318,7 +330,7 @@ will be installed by default in @code{@value{Datadir}/doc/asymptote/examples}.
Fedora users can easily install the most recent version of @code{Asymptote}
with the command
@verbatim
-yum --enablerepo=rawhide install asymptote
+dnf --enablerepo=rawhide install asymptote
@end verbatim
@cindex Debian
@@ -332,7 +344,7 @@ prebuilt @code{Asymptote} binaries from
@url{http://ftp.debian.org/debian/pool/main/a/asymptote}
@end quotation
-@node MacOS X binary distributions
+@node MacOS X binary distributions, Microsoft Windows, UNIX binary distributions, Installation
@section MacOS X binary distributions
@cindex @code{MacOS X} binary distributions
@code{MacOS X} users can either compile the @code{UNIX} source code
@@ -347,7 +359,7 @@ Note that many @code{MacOS X} (and FreeBSD) systems lack the
functionality, @acronym{GNU} @code{readline} version 4.3 or later must
be installed.
-@node Microsoft Windows
+@node Microsoft Windows, Configuring, MacOS X binary distributions, Installation
@section Microsoft Windows
@cindex Microsoft Windows
Users of the @code{Microsoft Windows} operating system can install the
@@ -392,7 +404,7 @@ Example code will be installed by default in the @code{examples}
subdirectory of the installation directory (by default,
@code{C:\Program Files\Asymptote}).
-@node Configuring
+@node Configuring, Search paths, Microsoft Windows, Installation
@section Configuring
@cindex configuring
@cindex @code{-V}
@@ -541,7 +553,7 @@ under @code{Microsoft Windows XP}:
@item Click the @code{Environment Variables} button.
@end enumerate
-@node Search paths
+@node Search paths, Compiling from UNIX source, Configuring, Installation
@section Search paths
@cindex search paths
@@ -568,7 +580,7 @@ The @code{Asymptote} system directory (by default,
@code{C:\Program Files\Asymptote} under @code{MSDOS}).
@end enumerate
-@node Compiling from UNIX source
+@node Compiling from UNIX source, Editing modes, Search paths, Installation
@section Compiling from UNIX source
@cindex Compiling from UNIX source
@@ -640,7 +652,7 @@ with @code{./configure --disable-gc}. For a list of other configuration
options, say @code{./configure --help}. For example, one can tell
configure to look for header files and libraries in nonstandard locations:
@verbatim
-./configure CFLAGS=-I/opt/usr/include LDFLAGS=-L/opt/usr/lib
+./configure CXXFLAGS=-I/opt/usr/include LDFLAGS=-L/opt/usr/lib
@end verbatim
If you are compiling @code{Asymptote} with @code{gcc}, you will need a
@@ -664,7 +676,7 @@ your path and set the configuration variable @code{dir} to point
to the directory @code{base} (in the top level directory of the
@code{Asymptote} source code).
-@node Editing modes
+@node Editing modes, Git, Compiling from UNIX source, Installation
@section Editing modes
@cindex Editing modes
@cindex @code{emacs}
@@ -736,7 +748,7 @@ can be enabled by running @code{asy-kate.sh} in the
@code{@value{Datadir}/asymptote} directory and putting the generated
@code{asymptote.xml} file in @code{~/.kde/share/apps/katepart/syntax/}.
-@node Git
+@node Git, Uninstall, Editing modes, Installation
@section Git
@cindex git
@@ -755,11 +767,11 @@ make install
@noindent
To compile without optimization, use the command @code{make CFLAGS=-g}.
-@node Uninstall
+@node Uninstall, , Git, Installation
@section Uninstall
-@cindex Uninstall
+@cindex uninstall
-To uninstall an @code{Linux i386} binary distribution, use the commands
+To uninstall a @code{Linux i386} binary distribution, use the commands
@verbatim
tar -zxvf asymptote-x.xx.i386.tgz | xargs --replace=% rm /%
texhash
@@ -772,11 +784,32 @@ distribution, use the command
make uninstall
@end verbatim
-@node Tutorial
+@node Tutorial, Drawing commands, Installation, Top
@chapter Tutorial
@cindex tutorial
-@cindex batch mode
+
+@menu
+* Drawing in batch mode:: Run @code{Asymptote} on a text file
+* Drawing in interactive mode:: Running @code{Asymptote} interactively
+* Figure size:: Specifying the figure size
+* Labels:: Adding @code{LaTeX} labels
+* Paths:: Drawing lines and curves
+@end menu
+
+A concise introduction to @code{Asymptote} is given here.
+For a more thorough introduction, see the excellent @code{Asymptote}
+tutorial written by Charles Staats:
+
+@url{http://math.uchicago.edu/~cstaats/Charles_Staats_III/Notes_and_papers_files/asymptote_tutorial.pdf}
+
+Another @code{Asymptote} tutorial is available as a wiki,
+with images rendered by an online Asymptote engine:
+
+@url{http://www.artofproblemsolving.com/wiki/?title=Asymptote_(Vector_Graphics_Language)}
+
+@node Drawing in batch mode, Drawing in interactive mode, Tutorial, Tutorial
@section Drawing in batch mode
+@cindex batch mode
To draw a line from coordinate (0,0) to coordinate (100,100),
create a text file @code{test.asy} containing
@verbatiminclude diagonal.asy
@@ -808,7 +841,9 @@ can immediately view the result:
Here, the @code{--} connector joins the two points @code{(0,0)} and
@code{(100,100)} with a line segment.
+@node Drawing in interactive mode, Figure size, Drawing in batch mode, Tutorial
@section Drawing in interactive mode
+@cindex interactive mode
Another method is @emph{interactive mode}, where @code{Asymptote} reads
individual commands as they are entered by the user. To try this out, enter
@code{Asymptote}'s interactive mode by clicking on the
@@ -837,7 +872,9 @@ The tab key will automatically complete unambiguous words;
otherwise, hitting tab again will show the possible choices. Further
commands specific to interactive mode are described in @ref{Interactive mode}.
+@node Figure size, Labels, Drawing in interactive mode, Tutorial
@section Figure size
+@cindex @code{size}
@cindex @code{pair}
In @code{Asymptote}, coordinates like @code{(0,0)} and @code{(100,100)},
called @emph{pairs},
@@ -890,7 +927,9 @@ draw(unitsquare);
@end verbatim
@noindent
+@node Labels, Paths, Figure size, Tutorial
@section Labels
+@cindex @code{label}
Adding labels is easy in @code{Asymptote}; one specifies the
label as a double-quoted @code{LaTeX} string, a
coordinate, and an optional alignment direction:
@@ -911,7 +950,9 @@ module @code{plain} (a user who has a local variable named @code{E}
may access the compass direction @code{E} by prefixing it with the name
of the module where it is defined: @code{plain.E}).
+@node Paths, , Labels, Tutorial
@section Paths
+@cindex @code{path}
This example draws a path that approximates a quarter circle,
terminated with an arrowhead:
@verbatiminclude quartercircle.asy
@@ -974,17 +1015,14 @@ cube @code{unitbox} without retracing steps (@pxref{three}):
@sp 1
@center @image{cube}
-See section @ref{graph} (or the online @code{Asymptote} gallery and
+See section @ref{graph} (or the online
+@code{Asymptote} @uref{http://asymptote.sourceforge.net/gallery,,gallery} and
external links posted at @url{http://asymptote.sourceforge.net}) for
further examples, including two-dimensional and interactive
three-dimensional scientific graphs. Additional examples have been
posted by Philippe Ivaldi at @url{http://www.piprime.fr/asymptote}.
-Excellent user-written @code{Asymptote} tutorials are also available:
-@url{http://www.artofproblemsolving.com/Wiki/index.php/Asymptote:_Basics}
-
-@url{http://math.uchicago.edu/~cstaats/Charles_Staats_III/Notes_and_papers_files/asymptote_tutorial.pdf}
-@node Drawing commands
+@node Drawing commands, Bezier curves, Tutorial, Top
@chapter Drawing commands
@cindex drawing commands
@@ -1021,6 +1059,7 @@ currentpicture).
@cindex legend
@cindex @code{draw}
@cindex @code{arrow}
+
@menu
* draw:: Draw a path on a picture or frame
* fill:: Fill a cyclic path on a picture or frame
@@ -1028,8 +1067,9 @@ currentpicture).
* label:: Label a point on a picture
@end menu
-@node draw
+@node draw, fill, Drawing commands, Drawing commands
@section draw
+@cindex @code{draw}
@verbatim
void draw(picture pic=currentpicture, Label L="", path g,
align align=NoAlign, pen p=currentpen,
@@ -1141,7 +1181,8 @@ specify a margin directly in @code{PostScript} units, independent of
the pen line width.
The use of arrows, bars, and margins is illustrated by the examples
-@code{Pythagoras.asy}, @code{sqrtx01.asy}, and @code{triads.asy}.
+@code{@uref{http://asymptote.sourceforge.net/gallery/Pythagoras.pdf,,Pythagoras}@uref{http://asymptote.sourceforge.net/gallery/Pythagoras.asy,,.asy}},
+@code{@uref{http://asymptote.sourceforge.net/gallery/sqrtx01.pdf,,sqrtx01}@uref{http://asymptote.sourceforge.net/gallery/sqrtx01.asy,,.asy}}, and @code{@uref{http://asymptote.sourceforge.net/gallery/triads.pdf,,triads}@uref{http://asymptote.sourceforge.net/gallery/triads.asy,,.asy}}.
The legend for a picture @code{pic} can be fit and aligned to a frame
with the routine:
@@ -1212,8 +1253,9 @@ void draw(pair origin, picture pic=currentpicture, Label L="", path g,
@end verbatim
@cindex @code{fill}
-@node fill
+@node fill, clip, draw, Drawing commands
@section fill
+@cindex @code{fill}
@verbatim
void fill(picture pic=currentpicture, path g, pen p=currentpen);
@end verbatim
@@ -1273,7 +1315,7 @@ would be drawn by @code{draw(pic,g,fillrule+zerowinding)}; in this case the path
The pens in @code{p} must belong to the same color space. One can use the
functions @code{rgb(pen)} or @code{cmyk(pen)} to promote pens to a
higher color space, as illustrated in the example file
-@code{latticeshading.asy}.
+@code{@uref{http://asymptote.sourceforge.net/gallery/latticeshading.pdf,,latticeshading}@uref{http://asymptote.sourceforge.net/gallery/latticeshading.asy,,.asy}}.
@cindex @code{axialshade}
Axial gradient shading varying smoothly from @code{pena} to @code{penb} in the
@@ -1302,7 +1344,7 @@ void radialshade(picture pic=currentpicture, path g, bool stroke=false,
The boolean parameters @code{extenda} and @code{extendb} indicate
whether the shading should extend beyond the radii @code{a} and @code{b}.
Illustrations of radial shading are provided in the example files
-@code{shade.asy}, @code{ring.asy}, and @code{shadestroke.asy}.
+@code{@uref{http://asymptote.sourceforge.net/gallery/shade.pdf,,shade}@uref{http://asymptote.sourceforge.net/gallery/shade.asy,,.asy}}, @code{@uref{http://asymptote.sourceforge.net/gallery/ring.pdf,,ring}@uref{http://asymptote.sourceforge.net/gallery/ring.asy,,.asy}}, and @code{@uref{http://asymptote.sourceforge.net/gallery/shadestroke.pdf,,shadestroke}@uref{http://asymptote.sourceforge.net/gallery/shadestroke.asy,,.asy}}.
@cindex @code{gouraudshade}
Gouraud shading using fill rule @code{fillrule} and the vertex colors in the
@@ -1319,7 +1361,7 @@ void gouraudshade(picture pic=currentpicture, path g, bool stroke=false,
In the second form, the elements of @code{z} are taken to be successive
nodes of path @code{g}. The pens in @code{p} must belong to the same
color space. Illustrations of Gouraud shading are provided in the example file
-@code{Gouraud.asy} and in the solid geometry module @code{solids.asy}.
+@code{@uref{http://asymptote.sourceforge.net/gallery/Gouraud.pdf,,Gouraud}@uref{http://asymptote.sourceforge.net/gallery/Gouraud.asy,,.asy}}.
The edge flags used in Gouraud shading are documented here:
@quotation
@url{http://partners.adobe.com/public/developer/en/ps/sdk/TN5600.SmoothShading.pdf}.
@@ -1357,8 +1399,8 @@ void draw(picture pic=currentpicture, pen fillrule=currentpen, path[] g,
@end verbatim
@noindent
Illustrations of tensor product and Coons shading are provided in the
-example files @code{tensor.asy}, @code{Coons.asy}, @code{BezierSurface.asy},
-and @code{rainbow.asy}.
+example files @code{@uref{http://asymptote.sourceforge.net/gallery/tensor.pdf,,tensor}@uref{http://asymptote.sourceforge.net/gallery/tensor.asy,,.asy}}, @code{@uref{http://asymptote.sourceforge.net/gallery/Coons.pdf,,Coons}@uref{http://asymptote.sourceforge.net/gallery/Coons.asy,,.asy}}, @code{@uref{http://asymptote.sourceforge.net/gallery/BezierSurface.pdf,,BezierSurface}@uref{http://asymptote.sourceforge.net/gallery/BezierSurface.asy,,.asy}},
+and @code{@uref{http://asymptote.sourceforge.net/gallery/rainbow.pdf,,rainbow}@uref{http://asymptote.sourceforge.net/gallery/rainbow.asy,,.asy}}.
@cindex Function shading
@cindex function shading
@@ -1374,7 +1416,7 @@ shades on picture @code{pic} the interior of path @code{g} according
to fill rule @code{fillrule} using the @code{PostScript} calculator routine
specified by the string @code{shader}; this routine takes 2 arguments,
each in [0,1], and returns @code{colors(fillrule).length} color components.
-Function shading is illustrated in the example @code{functionshading.asy}.
+Function shading is illustrated in the example @code{@uref{http://asymptote.sourceforge.net/gallery/functionshading.pdf,,functionshading}@uref{http://asymptote.sourceforge.net/gallery/functionshading.asy,,.asy}}.
@cindex unfill
The following routine uses @code{evenodd} clipping together with the
@@ -1384,10 +1426,10 @@ The following routine uses @code{evenodd} clipping together with the
void unfill(picture pic=currentpicture, path g);
@end verbatim
+@node clip, label, fill, Drawing commands
+@section clip
@cindex @code{clip}
@cindex @code{stroke}
-@node clip
-@section clip
@verbatim
void clip(picture pic=currentpicture, path g, stroke=false,
pen fillrule=currentpen);
@@ -1400,9 +1442,9 @@ that would be drawn with @code{draw(pic,g,fillrule+zerowinding)}; in
this case the path @code{g} need not be cyclic. For an illustration of
picture clipping, see the first example in @ref{LaTeX usage}.
-@cindex @code{label}
-@node label
+@node label, , clip, Drawing commands
@section label
+@cindex @code{label}
@verbatim
void label(picture pic=currentpicture, Label L, pair position,
align align=NoAlign, pen p=currentpen, filltype filltype=NoFill)
@@ -1532,13 +1574,13 @@ layer();
The @code{string baseline(string s, string template="\strut")}
function can be used to enlarge the bounding box of labels to match a
given template, so that their baselines will be typeset on a
-horizontal line. See @code{Pythagoras.asy} for an example.
+horizontal line. See @code{@uref{http://asymptote.sourceforge.net/gallery/Pythagoras.pdf,,Pythagoras}@uref{http://asymptote.sourceforge.net/gallery/Pythagoras.asy,,.asy}} for an example.
One can prevent labels from overwriting one another with the
@code{overwrite} pen attribute (@pxref{overwrite}).
-The structure @code{object} defined in @code{plain_Label.asy} allows Labels
-and frames to be treated in a uniform manner.
+The structure @code{object} defined in @code{plain_Label.asy}
+allows Labels and frames to be treated in a uniform manner.
A group of objects may be packed together into single frame with the routine
@cindex @code{pack}
@verbatim
@@ -1573,7 +1615,7 @@ produce a CD label:
@center @image{CDlabel}
@verbatiminclude CDlabel.asy
-@node Bezier curves
+@node Bezier curves, Programming, Drawing commands, Top
@chapter Bezier curves
@cindex Bezier curves
@cindex direction specifier
@@ -1683,10 +1725,28 @@ infinity..} and the @code{&} connector concatenates two paths, after
first stripping off the last node of the first path (which normally
should coincide with the first node of the second path).
-@node Programming
+@node Programming, LaTeX usage, Bezier curves, Top
@chapter Programming
@cindex programming
+@menu
+* Data types:: void, bool, int, real, pair, triple, string
+* Paths and guides:: Bezier curves
+* Pens:: Colors, line types, line widths, font sizes
+* Transforms:: Affine transforms
+* Frames and pictures:: Canvases for immediate and deferred drawing
+* Files:: Reading and writing your data
+* Variable initializers:: Initialize your variables
+* Structures:: Organize your data
+* Operators:: Arithmetic and logical operators
+* Implicit scaling:: Avoiding those ugly *s
+* Functions:: Traditional and high-order functions
+* Arrays:: Dynamic vectors
+* Casts:: Implicit and explicit casts
+* Import:: Importing external @code{Asymptote} modules
+* Static:: Where to allocate your variable?
+@end menu
+
Here is a short introductory example to the @code{Asymptote} programming
language that highlights the similarity of its control structures
with those of C, C++, and Java:
@@ -1738,27 +1798,10 @@ for(int k : array) {
}
@end verbatim
@noindent
-In addition, it supports many features beyond the ones found in those languages.
+In addition, it supports many features beyond the ones found in those
+languages.
-@menu
-* Data types:: void, bool, int, real, pair, triple, string
-* Paths and guides:: Bezier curves
-* Pens:: Colors, line types, line widths, font sizes
-* Transforms:: Affine transforms
-* Frames and pictures:: Canvases for immediate and deferred drawing
-* Files:: Reading and writing your data
-* Variable initializers:: Initialize your variables
-* Structures:: Organize your data
-* Operators:: Arithmetic and logical operators
-* Implicit scaling:: Avoiding those ugly *s
-* Functions:: Traditional and high-order functions
-* Arrays:: Dynamic vectors
-* Casts:: Implicit and explicit casts
-* Import:: Importing external @code{Asymptote} modules
-* Static:: Where to allocate your variable?
-@end menu
-
-@node Data types
+@node Data types, Paths and guides, Programming, Programming
@section Data types
@cindex data types
@code{Asymptote} supports the following data types (in addition to
@@ -2126,9 +2169,10 @@ but with duplicate delimiters discarded);
@anchor{format}
@item string format(string s, int n, string locale="")
@cindex @code{format}
-returns a string containing @code{n} formatted according to the C-style
-format string @code{s} using locale @code{locale} (or the current locale if an
-empty string is specified);
+returns a string containing @code{n} formatted according to the C-style format
+string @code{s} using locale @code{locale} (or the current locale if an
+empty string is specified), following the behaviour of the C function
+@code{fprintf}), except that only one data field is allowed.
@item string format(string s=defaultformat, string s=defaultseparator, real x, string locale="")
returns a string containing @code{x} formatted according to the C-style format
@@ -2251,7 +2295,7 @@ produces a beep on the console;
As in C/C++, complicated types may be abbreviated with @code{typedef}
(see the example in @ref{Functions}).
-@node Paths and guides
+@node Paths and guides, Pens, Data types, Programming
@section Paths and guides
@table @code
@@ -2273,7 +2317,7 @@ path circle(pair c, real r)
}
@end verbatim
If high accuracy is needed, a true circle may be produced with the
-routine @code{Circle} defined in the module @code{graph.asy}:
+routine @code{Circle} defined in the module @code{@uref{http://asymptote.sourceforge.net/gallery/graph.pdf,,graph}@uref{http://asymptote.sourceforge.net/gallery/graph.asy,,.asy}}:
@cindex @code{Circle}
@verbatim
import graph;
@@ -2302,7 +2346,7 @@ path arc(pair c, explicit pair z1, explicit pair z2,
@end verbatim
If high accuracy is needed, true arcs may be produced with routines
-in the module @code{graph.asy} that produce Bezier curves with @code{n}
+in the module @code{@uref{http://asymptote.sourceforge.net/gallery/graph.pdf,,graph}@uref{http://asymptote.sourceforge.net/gallery/graph.asy,,.asy}} that produce Bezier curves with @code{n}
control points:
@cindex @code{Arc}
@verbatim
@@ -2730,7 +2774,7 @@ e{down}..nullpath..{up}f;
@end table
-@node Pens
+@node Pens, Transforms, Paths and guides, Programming
@section Pens
@cindex @code{pen}
@@ -3092,7 +3136,7 @@ formats can be produced from the resulting @acronym{PDF} file with the
@code{ImageMagick} @code{convert} program.
Labels are always drawn with an @code{opacity} of 1.
A simple example of transparent filling is provided in the example file
-@code{transparency.asy}.
+@code{@uref{http://asymptote.sourceforge.net/gallery/transparency.pdf,,transparency}@uref{http://asymptote.sourceforge.net/gallery/transparency.asy,,.asy}}.
@cindex patterns
@cindex tilings
@@ -3113,7 +3157,7 @@ can be constructed using the routines
filltype filltype=NoFill)},
@code{picture checker(real Hx=5mm, real Hy=0, pen p=currentpen)}, and
@code{picture brick(real Hx=5mm, real Hy=0, pen p=currentpen)} defined in
-@code{patterns.asy}:
+@code{@uref{http://asymptote.sourceforge.net/gallery/patterns.pdf,,patterns}@uref{http://asymptote.sourceforge.net/gallery/patterns.asy,,.asy}}:
@cindex grid
@cindex tile
@cindex checker
@@ -3133,7 +3177,7 @@ Hatch patterns can be generated with the routines
You may need to turn off aliasing in your @code{PostScript} viewer for
patterns to appear correctly. Custom patterns can easily be constructed,
-following the examples in @code{patterns.asy}. The tiled pattern can
+following the examples in @code{@uref{http://asymptote.sourceforge.net/gallery/patterns.pdf,,patterns}@uref{http://asymptote.sourceforge.net/gallery/patterns.asy,,.asy}}. The tiled pattern can
even incorporate shading (@pxref{gradient shading}), as illustrated
in this example (not included in the manual because not all printers support
@code{PostScript} 3):
@@ -3197,7 +3241,7 @@ The routine @code{defaultpen()} returns the current default pen attributes.
Calling the routine @code{resetdefaultpen()} resets all pen default
attributes to their initial values.
-@node Transforms
+@node Transforms, Frames and pictures, Pens, Programming
@section Transforms
@cindex @code{transform}
@@ -3263,7 +3307,7 @@ return the transforms @code{(t.x,t.y,0,0,0,0)} and
@code{(0,0,t.xx,t.xy,t.yx,t.yy)} respectively.
-@node Frames and pictures
+@node Frames and pictures, Files, Transforms, Programming
@section Frames and pictures
@table @code
@@ -3577,7 +3621,7 @@ void add(picture dest, picture src, bool group=true,
The first example adds @code{src} to @code{currentpicture}; the second
one adds @code{src} to @code{dest}.
The @code{group} option specifies whether or not the graphical user
-interface @code{xasy} should treat all of the elements of @code{src}
+interface @code{@uref{http://asymptote.sourceforge.net/gallery/.pdf,,}@uref{http://asymptote.sourceforge.net/gallery/.asy,,.asy}} should treat all of the elements of @code{src}
as a single entity (@pxref{GUI}), @code{filltype} requests optional
background filling or clipping, and @code{above} specifies
whether to add @code{src} above or below existing objects.
@@ -3696,7 +3740,7 @@ that can be used for importing @code{LaTeX} packages.
@end table
-@node Files
+@node Files, Variable initializers, Frames and pictures, Programming
@section Files
@cindex @code{file}
@@ -3931,7 +3975,7 @@ For example,
write(output("transcript.asy"),history());
@end verbatim
@noindent
-outputs the interactive history to the file @code{transcript.asy}.
+outputs the interactive history to the file @code{@uref{http://asymptote.sourceforge.net/gallery/transcript.pdf,,transcript}@uref{http://asymptote.sourceforge.net/gallery/transcript.asy,,.asy}}.
@cindex @code{delete}
The function @code{int delete(string s)} deletes the file named by the
@@ -3954,7 +3998,7 @@ call the @code{ImageMagick} commands @code{convert} and @code{animate},
respectively, with the arguments @code{args} and the file name constructed
from the strings @code{file} and @code{format}.
-@node Variable initializers
+@node Variable initializers, Structures, Files, Programming
@section Variable initializers
@cindex variable initializers
@cindex @code{operator init}
@@ -4042,7 +4086,7 @@ for (var x : a)
write(x);
@end verbatim
-@node Structures
+@node Structures, Operators, Variable initializers, Programming
@section Structures
@cindex @code{struct}
@cindex structures
@@ -4300,7 +4344,7 @@ write(c.y); // Outputs 3;
For further examples of structures, see @code{Legend} and @code{picture} in
the @code{Asymptote} base module @code{plain}.
-@node Operators
+@node Operators, Implicit scaling, Structures, Programming
@section Operators
@cindex operators
@@ -4310,7 +4354,7 @@ the @code{Asymptote} base module @code{plain}.
* User-defined operators:: Overloading operators
@end menu
-@node Arithmetic & logical
+@node Arithmetic & logical, Self & prefix operators, Operators, Operators
@subsection Arithmetic & logical operators
@cindex arithmetic operators
@cindex binary operators
@@ -4417,7 +4461,7 @@ for nonintegral built-in arithmetic types @code{T}. If @code{a} and
@code{int CLZ(int)} (count leading zeros), and @code{int CTZ(int)}
(count trailing zeros).
-@node Self & prefix operators
+@node Self & prefix operators, User-defined operators, Arithmetic & logical, Operators
@subsection Self & prefix operators
@cindex self operators
@cindex prefix operators
@@ -4456,7 +4500,7 @@ path-joining operator). In the rare instances where @code{i++}
and @code{i--} are really needed, one can substitute the expressions
@code{(++i-1)} and @code{(--i+1)}, respectively.
-@node User-defined operators
+@node User-defined operators, , Self & prefix operators, Operators
@subsection User-defined operators
@cindex user-defined operators
@cindex @code{operator}
@@ -4493,7 +4537,7 @@ guide g=(0,0){up}..{SW}(100,100){NE}..{curl 3}(50,50)..(10,10);
write("g=",g);
@end verbatim
-@node Implicit scaling
+@node Implicit scaling, Functions, Operators, Programming
@section Implicit scaling
@cindex implicit scaling
@@ -4532,10 +4576,17 @@ This produces the output
283.464008929116
@end verbatim
-@node Functions
+@node Functions, Arrays, Implicit scaling, Programming
@section Functions
@cindex functions
+@menu
+* Default arguments:: Default values can appear anywhere
+* Named arguments:: Assigning function arguments by keyword
+* Rest arguments:: Functions with a variable number of arguments
+* Mathematical functions:: Standard libm functions
+@end menu
+
@code{Asymptote} functions are treated as variables with a signature
(non-function variables have null signatures). Variables with the
same name are allowed, so long as they have distinct signatures.
@@ -4653,15 +4704,7 @@ segmentation fault, unless a fully working version of the @acronym{GNU}
library @code{libsigsegv} (e.g.@ 2.4 or later) is installed at
configuration time).
-@menu
-* Default arguments:: Default values can appear anywhere
-* Named arguments:: Assigning function arguments by keyword
-* Rest arguments:: Functions with a variable number of arguments
-* Mathematical functions:: Standard libm functions
-
-@end menu
-
-@node Default arguments
+@node Default arguments, Named arguments, Functions, Functions
@subsection Default arguments
@cindex default arguments
@cindex arguments
@@ -4682,7 +4725,7 @@ The value of a default argument is determined by evaluating the
given @code{Asymptote} expression in the scope where the called
function is defined.
-@node Named arguments
+@node Named arguments, Rest arguments, Default arguments, Functions
@subsection Named arguments
@cindex keywords
@cindex named arguments
@@ -4763,7 +4806,7 @@ int f(int x=3, int x()) {
then @code{f(x=seven)} would be illegal, even though @code{f(seven)}
obviously would be allowed.
-@node Rest arguments
+@node Rest arguments, Mathematical functions, Named arguments, Functions
@subsection Rest arguments
@cindex rest arguments
@@ -4866,7 +4909,7 @@ i(3,4); // ambiguous; the first candidate is better for the first argument,
// but the second candidate is better for the second one
@end verbatim
-@node Mathematical functions
+@node Mathematical functions, , Rest arguments, Functions
@subsection Mathematical functions
@cindex mathematical functions
@cindex functions
@@ -4969,7 +5012,7 @@ and the integer @code{randMax}. The @code{unitrand()} function returns
a random number uniformly distributed in the interval [0,1].
A Gaussian random number generator
@code{Gaussrand} and a collection of statistics routines, including
-@code{histogram}, are provided in the base file @code{stats.asy}.
+@code{histogram}, are provided in the base file @code{@uref{http://asymptote.sourceforge.net/gallery/stats.pdf,,stats}@uref{http://asymptote.sourceforge.net/gallery/stats.asy,,.asy}}.
The functions @code{factorial(int n)}, which returns @math{n!}, and
@code{choose(int n, int k)}, which returns @math{n!/(k!(n-k)!)}, are
also defined.
@@ -5058,7 +5101,7 @@ returns the integral of @code{f} from @code{a} to @code{b} using adaptive Simpso
@end table
-@node Arrays
+@node Arrays, Casts, Functions, Programming
@section Arrays
@cindex arrays
@@ -5559,7 +5602,7 @@ One, two, and three-dimensional arrays of the basic data types can be
output with the functions @code{write(file,T[])},
@code{write(file,T[][])}, @code{write(file,T[][][])}, respectively.
-@node Slices
+@node Slices, , Arrays, Arrays
@subsection Slices
@cindex slices
@@ -5647,7 +5690,7 @@ so assigning to this slice will insert values at the start of the array.
It is illegal to assign to a slice of a cyclic array that repeats any of the
cells.
-@node Casts
+@node Casts, Import, Arrays, Programming
@section Casts
@cindex casts
@cindex implicit casts
@@ -5659,7 +5702,7 @@ cells.
to @code{path}, @code{real} to @code{pen},
@code{pair[]} to @code{guide[]}, @code{pair[]} to @code{path[]},
@code{path} to @code{path[]}, and @code{guide} to @code{path[]},
-along with various three-dimensional casts defined in @code{three.asy}.
+along with various three-dimensional casts defined in @code{@uref{http://asymptote.sourceforge.net/gallery/three.pdf,,three}@uref{http://asymptote.sourceforge.net/gallery/three.asy,,.asy}}.
Implicit casts are automatically attempted on assignment and when
trying to match function calls with possible function
signatures. Implicit casting can be inhibited by declaring individual
@@ -5721,7 +5764,7 @@ real operator cast(int x)=convert;
@cindex @code{operator ecast}
Explicit casts are implemented similarly, with @code{operator ecast}.
-@node Import
+@node Import, Static, Casts, Programming
@section Import
@cindex @code{access}
While @code{Asymptote} provides many features by default,
@@ -5912,7 +5955,7 @@ void list(string s, bool imports=false);
Imported global functions and variables are also listed if
@code{imports} is @code{true}.
-@node Static
+@node Static, , Import, Programming
@section Static
@cindex @code{static}
@@ -6039,13 +6082,13 @@ It is the convention in Asymptote that, if there is a non-function variable with
the same name as the qualifier, the qualifier refers to that variable, and not
to the type. This is regardless of what fields the variable actually possesses.
-@node LaTeX usage
+@node LaTeX usage, Base modules, Programming, Top
@chapter @code{LaTeX} usage
@cindex @code{LaTeX} usage
@cindex @code{asymptote.sty}
@code{Asymptote} comes with a convenient @code{LaTeX} style file
-@code{asymptote.sty} that makes @code{LaTeX}
+@code{asymptote.sty} (v1.30 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
@@ -6103,7 +6146,7 @@ in @code{latexusage.tex} and put the contents of
@url{http://sourceforge.net/p/asymptote/code/HEAD/tree/trunk/asymptote/doc/latexmkrc_asydir}
in a file @code{latexmkrc} in the same directory.
@noindent
-External @code{Asymptote} code in @code{filename.asy} should be included with
+External @code{Asymptote} code in @code{@uref{http://asymptote.sourceforge.net/gallery/filename.pdf,,filename}@uref{http://asymptote.sourceforge.net/gallery/filename.asy,,.asy}} should be included with
@cindex @code{asyinclude}
@verbatim
\asyinclude[<options>]{<filename.asy>}
@@ -6149,7 +6192,7 @@ Here now is @code{latexusage.tex}:
@page
@image{latexusage,,25cm}
-@node Base modules
+@node Base modules, Options, LaTeX usage, Top
@chapter Base modules
@cindex base modules
@@ -6198,7 +6241,7 @@ Here now is @code{latexusage.tex}:
* ode:: Ordinary differential equations
@end menu
-@node plain
+@node plain, simplex, Base modules, Base modules
@section @code{plain}
@cindex @code{plain}
@@ -6213,7 +6256,7 @@ the types and functions defined in @code{plain} are accessible in
almost all @code{Asymptote} code. Use the @code{-noautoplain} command-line
option to disable this feature.
-@node simplex
+@node simplex, math, plain, Base modules
@section @code{simplex}
@cindex @code{simplex}
@cindex @code{deferred drawing}
@@ -6221,7 +6264,7 @@ This package solves the two-variable linear programming problem using the
simplex method. It is used by the module @code{plain} for automatic
sizing of pictures.
-@node math
+@node math, interpolate, simplex, Base modules
@section @code{math}
@cindex @code{math}
This package extends @code{Asymptote}'s mathematical capabilities with
@@ -6315,14 +6358,14 @@ returns the strict lexicographical partial order of @code{a} and @code{b}.
returns the strict lexicographical partial order of @code{a} and @code{b}.
@end table
-@node interpolate
+@node interpolate, geometry, math, Base modules
@section @code{interpolate}
@cindex @code{interpolate}
This module implements Lagrange, Hermite, and standard cubic spline
interpolation in @code{Asymptote}, as illustrated in the example
-@code{interpolate1.asy}.
+@code{@uref{http://asymptote.sourceforge.net/gallery/interpolate1.pdf,,interpolate1}@uref{http://asymptote.sourceforge.net/gallery/interpolate1.asy,,.asy}}.
-@node geometry
+@node geometry, trembling, interpolate, Base modules
@section @code{geometry}
@cindex @code{geometry}
@cindex @code{triangle}
@@ -6338,14 +6381,14 @@ including an extensive set of examples,
@url{http://www.piprime.fr/files/asymptote/geometry/modules/geometry.asy.index.type.html}
@end quotation
-@node trembling
+@node trembling, stats, geometry, Base modules
@section @code{trembling}
@cindex @code{trembling}
This module, written by Philippe Ivaldi and illustrated in the example
-@code{floatingdisk.asy}, allows one to draw wavy lines, as if drawn by
+@code{@uref{http://asymptote.sourceforge.net/gallery/floatingdisk.pdf,,floatingdisk}@uref{http://asymptote.sourceforge.net/gallery/floatingdisk.asy,,.asy}}, allows one to draw wavy lines, as if drawn by
hand.
-@node stats
+@node stats, patterns, trembling, Base modules
@section @code{stats}
@cindex @code{stats}
@cindex @code{leastsquares}
@@ -6353,13 +6396,13 @@ This package implements a Gaussian random number generator
and a collection of statistics routines, including @code{histogram}
and @code{leastsquares}.
-@node patterns
+@node patterns, markers, stats, Base modules
@section @code{patterns}
@cindex @code{patterns}
This package implements @code{Postscript} tiling patterns and includes
several convenient pattern generation routines.
-@node markers
+@node markers, tree, patterns, Base modules
@section @code{markers}
@cindex @code{markers}
This package implements specialized routines for marking paths and angles.
@@ -6401,7 +6444,7 @@ frame tildeframe(int n=1, real size=0, pair space=0,
For convenience, this module also constructs the markers
@code{StickIntervalMarker}, @code{CrossIntervalMarker},
@code{CircleBarIntervalMarker}, and @code{TildeIntervalMarker}
-from the above frames. The example @code{markers1.asy} illustrates the
+from the above frames. The example @code{@uref{http://asymptote.sourceforge.net/gallery/markers1.pdf,,markers1}@uref{http://asymptote.sourceforge.net/gallery/markers1.asy,,.asy}} illustrates the
use of these markers:
@sp 1
@@ -6417,59 +6460,59 @@ void markangle(picture pic=currentpicture, Label L="",
marker marker=nomarker);
@end verbatim
@noindent
-as illustrated in the example @code{markers2.asy}.
+as illustrated in the example @code{@uref{http://asymptote.sourceforge.net/gallery/markers2.pdf,,markers2}@uref{http://asymptote.sourceforge.net/gallery/markers2.asy,,.asy}}.
@sp 1
@center @image{markers2}
-@node tree
+@node tree, binarytree, markers, Base modules
@section @code{tree}
@cindex @code{tree}
This package implements an example of a dynamic binary search tree.
-@node binarytree
+@node binarytree, drawtree, tree, Base modules
@section @code{binarytree}
@cindex @code{binarytree}
This module can be used to draw an arbitrary binary tree and includes an
input routine for the special case of a binary search tree, as
-illustrated in the example @code{binarytreetest.asy}:
+illustrated in the example @code{@uref{http://asymptote.sourceforge.net/gallery/binarytreetest.pdf,,binarytreetest}@uref{http://asymptote.sourceforge.net/gallery/binarytreetest.asy,,.asy}}:
@verbatiminclude binarytreetest.asy
@sp 1
@center @image{binarytreetest}
-@node drawtree
+@node drawtree, syzygy, binarytree, Base modules
@section @code{drawtree}
@cindex @code{drawtree}
-This is a simple tree drawing module used by the example @code{treetest.asy}.
+This is a simple tree drawing module used by the example @code{@uref{http://asymptote.sourceforge.net/gallery/treetest.pdf,,treetest}@uref{http://asymptote.sourceforge.net/gallery/treetest.asy,,.asy}}.
-@node syzygy
+@node syzygy, feynman, drawtree, Base modules
@section @code{syzygy}
@cindex @code{syzygy}
This module automates the drawing of braids, relations, and syzygies,
along with the corresponding equations, as illustrated in the example
-@code{knots.asy}.
+@code{@uref{http://asymptote.sourceforge.net/gallery/knots.pdf,,knots}@uref{http://asymptote.sourceforge.net/gallery/knots.asy,,.asy}}.
-@node feynman
+@node feynman, roundedpath, syzygy, Base modules
@section @code{feynman}
@cindex @code{feynman}
This package, contributed by Martin Wiebusch, is useful for drawing
-Feynman diagrams, as illustrated by the examples @code{eetomumu.asy}
-and @code{fermi.asy}.
+Feynman diagrams, as illustrated by the examples @code{@uref{http://asymptote.sourceforge.net/gallery/eetomumu.pdf,,eetomumu}@uref{http://asymptote.sourceforge.net/gallery/eetomumu.asy,,.asy}}
+and @code{@uref{http://asymptote.sourceforge.net/gallery/fermi.pdf,,fermi}@uref{http://asymptote.sourceforge.net/gallery/fermi.asy,,.asy}}.
-@node roundedpath
+@node roundedpath, animation, feynman, Base modules
@section @code{roundedpath}
@cindex @code{roundedpath}
This package, contributed by Stefan Knorr, is useful for rounding the
-sharp corners of paths, as illustrated in the example file @code{roundpath.asy}.
+sharp corners of paths, as illustrated in the example file @code{@uref{http://asymptote.sourceforge.net/gallery/roundpath.pdf,,roundpath}@uref{http://asymptote.sourceforge.net/gallery/roundpath.asy,,.asy}}.
-@node animation
+@node animation, embed, roundedpath, Base modules
@section @code{animation}
@cindex @code{animation}
@cindex @code{convert}
@cindex animation
@cindex @code{ImageMagick}
This module allows one to generate animations, as illustrated by the
-files @code{wheel.asy}, @code{wavepacket.asy}, and @code{cube.asy} in
+files @code{@uref{http://asymptote.sourceforge.net/gallery/animations/wheel.pdf,,wheel}@uref{http://asymptote.sourceforge.net/gallery/animations/wheel.asy,,.asy}}, @code{@uref{http://asymptote.sourceforge.net/gallery/animations/wavepacket.pdf,,wavepacket}@uref{http://asymptote.sourceforge.net/gallery/animations/wavepacket.asy,,.asy}}, and @code{@uref{http://asymptote.sourceforge.net/gallery/animations/cube.pdf,,cube}@uref{http://asymptote.sourceforge.net/gallery/animations/cube.asy,,.asy}} in
the @code{animations} subdirectory of the examples directory. These
animations use the @code{ImageMagick} @code{convert} program to
merge multiple images into a @acronym{GIF} or @acronym{MPEG}
@@ -6490,9 +6533,9 @@ local @code{LaTeX} directory (for example, in
@code{/usr/local/share/texmf/tex/latex/animate}). On @code{UNIX} systems,
one must then execute the command @code{texhash}.
-The example @code{pdfmovie.asy} in the @code{animations}
-directory, along with the slide presentations @code{slidemovies.asy}
-and @code{intro.asy}, illustrate the use of embedded @acronym{PDF} movies.
+The example @code{@uref{http://asymptote.sourceforge.net/gallery/animations/pdfmovie.pdf,,pdfmovie}@uref{http://asymptote.sourceforge.net/gallery/animations/pdfmovie.asy,,.asy}} in the @code{animations}
+directory, along with the slide presentations @code{@uref{http://asymptote.sourceforge.net/gallery/animations/slidemovies.pdf,,slidemovies}@uref{http://asymptote.sourceforge.net/gallery/animations/slidemovies.asy,,.asy}}
+and @code{@uref{http://asymptote.sourceforge.net/gallery/intro.pdf,,intro}@uref{http://asymptote.sourceforge.net/gallery/intro.asy,,.asy}}, illustrate the use of embedded @acronym{PDF} movies.
The examples @code{inlinemovie.tex} and @code{inlinemovie3.tex}
show how to generate and embed @acronym{PDF} movies directly within a
@code{LaTeX} file (@pxref{LaTeX usage}).
@@ -6508,7 +6551,7 @@ as described here:
@url{http://mirror.ctan.org/macros/latex/contrib/animate/doc/animate.pdf}
@end quotation
-@node embed
+@node embed, slide, animation, Base modules
@section @code{embed}
@cindex @code{embed}
This module provides an interface to the @code{LaTeX} package
@@ -6525,7 +6568,7 @@ platform and does not require the @code{media9} package, is provided
by using the @code{external} module instead of @code{embed}.
Examples of the above two interfaces is provided in the file
-@code{embeddedmovie.asy} and @code{externalmovie.asy} in the
+@code{@uref{http://asymptote.sourceforge.net/gallery/animations/embeddedmovie.pdf,,embeddedmovie}@uref{http://asymptote.sourceforge.net/gallery/animations/embeddedmovie.asy,,.asy}} and @code{@uref{http://asymptote.sourceforge.net/gallery/animations/externalmovie.pdf,,externalmovie}@uref{http://asymptote.sourceforge.net/gallery/animations/externalmovie.asy,,.asy}} in the
@code{animations} subdirectory of the examples directory. For a higher
quality embedded movie generated directly by @code{Asymptote}, use the
@code{animate} module along with the @code{animate.sty} package to
@@ -6533,17 +6576,17 @@ embed a portable @acronym{PDF} animation (@pxref{animate}).
@cindex @code{U3D}
An example of embedding @code{U3D} code is provided in the file
-@code{embeddedu3d.asy}.
+@code{@uref{http://asymptote.sourceforge.net/gallery/animations/embeddedu3d.pdf,,embeddedu3d}@uref{http://asymptote.sourceforge.net/gallery/animations/embeddedu3d.asy,,.asy}}.
-@node slide
+@node slide, MetaPost, embed, Base modules
@section @code{slide}
@cindex @code{slide}
This package provides a simple yet high-quality facility for making
presentation slides, including portable embedded @acronym{PDF} animations (see
-the file @code{slidemovies.asy}). A simple example is provided in the file
-@code{slidedemo.asy}.
+the file @code{@uref{http://asymptote.sourceforge.net/gallery/animations/slidemovies.pdf,,slidemovies}@uref{http://asymptote.sourceforge.net/gallery/animations/slidemovies.asy,,.asy}}). A simple example is provided in the file
+@code{@uref{http://asymptote.sourceforge.net/gallery/animations/slidedemo.pdf,,slidedemo}@uref{http://asymptote.sourceforge.net/gallery/animations/slidedemo.asy,,.asy}}.
-@node MetaPost
+@node MetaPost, unicode, slide, Base modules
@section @code{MetaPost}
@cindex @code{MetaPost}
This package provides some useful routines to help @code{MetaPost} users
@@ -6561,7 +6604,7 @@ intersection point of the lines through @code{P}, @code{Q} and
@code{p}, @code{q}. For less common occurrences of @code{whatever}, one
can use the built-in explicit linear equation solver @code{solve} instead.
-@node unicode
+@node unicode, latin1, MetaPost, Base modules
@section @code{unicode}
@cindex @code{unicode}
@cindex international characters
@@ -6597,7 +6640,7 @@ texpreamble("\usepackage{CJK}
\AtEndDocument{\clearpage\end{CJK*}}");
@end verbatim
-@node latin1
+@node latin1, babel, unicode, Base modules
@section @code{latin1}
@cindex @code{latin1}
If you don't have @code{LaTeX} support for @code{unicode} installed,
@@ -6605,7 +6648,7 @@ you can enable support for Western European languages (ISO 8859-1) by
importing the module @code{latin1}. This module can be used as a
template for providing support for other ISO 8859 alphabets.
-@node babel
+@node babel, labelpath, latin1, Base modules
@section @code{babel}
@cindex @code{babel}
This module implements the @code{LaTeX} @code{babel} package in
@@ -6615,12 +6658,12 @@ import babel;
babel("german");
@end verbatim
-@node labelpath
+@node labelpath, labelpath3, babel, Base modules
@section @code{labelpath}
@cindex @code{labelpath}
This module uses the @code{PSTricks} @code{pstextpath} macro to fit labels
along a path (properly kerned, as illustrated in the example file
-@code{curvedlabel.asy}), using the command
+@code{@uref{http://asymptote.sourceforge.net/gallery/curvedlabel.pdf,,curvedlabel}@uref{http://asymptote.sourceforge.net/gallery/curvedlabel.asy,,.asy}}), using the command
@verbatim
void labelpath(picture pic=currentpicture, Label L, path g,
string justify=Centered, pen p=currentpen);
@@ -6634,14 +6677,14 @@ All other Label transforms are ignored. This package requires the
@code{latex} tex engine and inherits the limitations of the
@code{PSTricks} @code{\pstextpath} macro.
-@node labelpath3
+@node labelpath3, annotate, labelpath, Base modules
@section @code{labelpath3}
@cindex @code{labelpath3}
This module, contributed by Jens Schwaiger, implements a 3D version of
@code{labelpath} that does not require the @code{PSTricks} package.
-An example is provided in @code{curvedlabel3.asy}.
+An example is provided in @code{@uref{http://asymptote.sourceforge.net/gallery/curvedlabel3.pdf,,curvedlabel3}@uref{http://asymptote.sourceforge.net/gallery/curvedlabel3.asy,,.asy}}.
-@node annotate
+@node annotate, CAD, labelpath3, Base modules
@section @code{annotate}
@cindex @code{annotate}
This module supports @acronym{PDF} annotations for viewing with
@@ -6651,11 +6694,11 @@ void annotate(picture pic=currentpicture, string title, string text,
pair position);
@end verbatim
@noindent
-Annotations are illustrated in the example file @code{annotation.asy}.
+Annotations are illustrated in the example file @code{@uref{http://asymptote.sourceforge.net/gallery/annotation.pdf,,annotation}@uref{http://asymptote.sourceforge.net/gallery/annotation.asy,,.asy}}.
Currently, annotations are only implemented for the @code{latex}
(default) and @code{tex} @TeX{} engines.
-@node CAD
+@node CAD, graph, annotate, Base modules
@section @code{CAD}
@cindex @code{CAD}
This package, contributed by Mark Henning, provides basic pen
@@ -6663,7 +6706,7 @@ definitions and measurement functions for simple 2D CAD drawings
according to DIN 15. It is documented separately, in the file
@code{CAD.pdf}.
-@node graph
+@node graph, palette, CAD, Base modules
@section @code{graph}
@cindex @code{graph}
@cindex 2D graphs
@@ -6863,7 +6906,8 @@ Request a bottom and top axis.
@end table
@cindex custom axis types
-Custom axis types can be created by following the examples in @code{graph.asy}.
+Custom axis types can be created by following the examples in the
+module @code{graph.asy}.
One can easily override the default values for the standard axis types:
@verbatim
import graph;
@@ -7151,7 +7195,7 @@ Here are some simple examples of two-dimensional graphs:
@item The next example draws a scientific-style graph with a legend.
The position of the legend can be adjusted either explicitly or by using the
-graphical user interface @code{xasy} (@pxref{GUI}). If an
+graphical user interface @code{@uref{http://asymptote.sourceforge.net/gallery/.pdf,,}@uref{http://asymptote.sourceforge.net/gallery/.asy,,.asy}} (@pxref{GUI}). If an
@code{UnFill(real xmargin=0, real ymargin=xmargin)} or
@code{Fill(pen)} option is specified to @code{add}, the legend will obscure
any underlying objects. Here we illustrate how to clip the portion of
@@ -7458,8 +7502,8 @@ as illustrated in this example:
@item The following scientific graphs, which illustrate many features of
@code{Asymptote}'s graphics routines, were generated from the examples
-@code{diatom.asy} and @code{westnile.asy}, using the comma-separated
-data in @code{diatom.csv} and @code{westnile.csv}.
+@code{@uref{http://asymptote.sourceforge.net/gallery/2D graphs/diatom.pdf,,diatom}@uref{http://asymptote.sourceforge.net/gallery/2D graphs/diatom.asy,,.asy}} and @code{@uref{http://asymptote.sourceforge.net/gallery/2D graphs/westnile.pdf,,westnile}@uref{http://asymptote.sourceforge.net/gallery/2D graphs/westnile.asy,,.asy}}, using the comma-separated
+data in @code{@uref{http://asymptote.sourceforge.net/gallery/2D graphs/diatom.csv,,diatom.csv}} and @code{@uref{http://asymptote.sourceforge.net/gallery/2D graphs/westnile.csv,,westnile.csv}}.
@page
@sp 1
@@ -7469,13 +7513,13 @@ data in @code{diatom.csv} and @code{westnile.csv}.
@end enumerate
@page
-@node palette
+@node palette, three, graph, Base modules
@section @code{palette}
@anchor{images}
@cindex images
@code{Asymptote} can also generate color density images
and palettes. The following palettes are predefined in
-@code{palette.asy}:
+@code{palette.asy}:
@table @code
@@ -7540,7 +7584,7 @@ or an explicit range @code{Range(real min, real max)}.
Here @code{Full} specifies a range varying from the
minimum to maximum values of the function over the sampling interval,
while @code{Automatic} selects "nice" limits.
-The example @code{imagecontour.asy} illustrates how level sets
+The example @code{@uref{http://asymptote.sourceforge.net/gallery/2D graphs/imagecontour.pdf,,imagecontour}@uref{http://asymptote.sourceforge.net/gallery/2D graphs/imagecontour.asy,,.asy}} illustrates how level sets
(contour lines) can be drawn on a color density plot (@pxref{contour}).
A color density plot can also be generated from an explicit real[][]
@@ -7636,7 +7680,7 @@ pen[] palette(real[] f, pen[] palette);
pen[][] palette(real[][] f, pen[] palette);
@end verbatim
-@node three
+@node three, obj, palette, Base modules
@section @code{three}
@cindex @code{three}
@cindex @code{guide3}
@@ -7715,17 +7759,17 @@ struct material {
@noindent
These material properties are used to implement @code{OpenGL}-style lighting,
based on the Phong-Blinn specular model. Sample Bezier surfaces are
-contained in the example files @code{BezierSurface.asy}, @code{teapot.asy},
-and @code{parametricsurface.asy}. The structure @code{render} contains
+contained in the example files @code{@uref{http://asymptote.sourceforge.net/gallery/BezierSurface.pdf,,BezierSurface}@uref{http://asymptote.sourceforge.net/gallery/BezierSurface.asy,,.asy}}, @code{@uref{http://asymptote.sourceforge.net/gallery/teapot.pdf,,teapot}@uref{http://asymptote.sourceforge.net/gallery/teapot.asy,,.asy}},
+and @code{@uref{http://asymptote.sourceforge.net/gallery/parametricsurface.pdf,,parametricsurface}@uref{http://asymptote.sourceforge.net/gallery/parametricsurface.asy,,.asy}}. The structure @code{render} contains
specialized rendering options documented at the beginning of module
-@code{three.asy}.
+@code{@uref{http://asymptote.sourceforge.net/gallery/three.pdf,,three}@uref{http://asymptote.sourceforge.net/gallery/three.asy,,.asy}}.
@cindex patch-dependent colors
@cindex vertex-dependent colors
The examples
-@code{elevation.asy} and @code{sphericalharmonic.asy}
+@code{@uref{http://asymptote.sourceforge.net/gallery/3D graphs/elevation.pdf,,elevation}@uref{http://asymptote.sourceforge.net/gallery/3D graphs/elevation.asy,,.asy}} and @code{@uref{http://asymptote.sourceforge.net/gallery/sphericalharmonic.pdf,,sphericalharmonic}@uref{http://asymptote.sourceforge.net/gallery/sphericalharmonic.asy,,.asy}}
illustrate how to draw a surface with patch-dependent colors.
-The examples @code{vertexshading} and @code{smoothelevation} illustrate
+The examples @code{@uref{http://asymptote.sourceforge.net/gallery/vertexshading.pdf,,vertexshading}@uref{http://asymptote.sourceforge.net/gallery/vertexshading.asy,,.asy}} and @code{@uref{http://asymptote.sourceforge.net/gallery/3D graphs/smoothelevation.pdf,,smoothelevation}@uref{http://asymptote.sourceforge.net/gallery/3D graphs/smoothelevation.asy,,.asy}} illustrate
vertex-dependent colors, which is supported for both
@code{Asymptote}'s native @code{OpenGL} renderer and two-dimensional
projections. Since the @acronym{PRC} output format does not currently support
@@ -7789,7 +7833,7 @@ the array @code{vi} lists integer arrays of length 3 containing
the indices of @code{v} corresponding to the vertices of each
triangle. Similarly, the arguments @code{n} and @code{ni} contain
optional normal data and @code{p} and @code{pi} contain optional pen vertex data.
-An example of this tessellation facility is given in @code{triangles.asy}.
+An example of this tessellation facility is given in @code{@uref{http://asymptote.sourceforge.net/gallery/triangles.pdf,,triangles}@uref{http://asymptote.sourceforge.net/gallery/triangles.asy,,.asy}}.
@cindex @code{thin}
@cindex @code{thick}
@@ -7811,8 +7855,8 @@ lines to be drawn with @code{linewidth(0)} (one pixel wide, regardless
of the resolution). By default, mesh and contour lines in three-dimensions
are always drawn thin, unless an explicit line width is given in the pen
parameter or the setting @code{thin} is set to @code{false}. The pens
-@code{thin()} and @code{thick()} defined in plain_pens.asy can also be used
-to override these defaults for specific draw commands.
+@code{thin()} and @code{thick()} defined in @code{plain_pens.asy} can
+also be used to override these defaults for specific draw commands.
@noindent
There are four choices for viewing 3D @code{Asymptote} output:
@@ -7917,9 +7961,9 @@ In addition to the default @code{settings.prc=true}, this requires
@code{settings.outformat="pdf"}, which can be specified by the command
line option @code{-f pdf}, put in the @code{Asymptote} configuration
file (@pxref{configuration file}), or specified in the script before
-@code{three.asy} (or @code{graph3.asy}) is imported.
+@code{@uref{http://asymptote.sourceforge.net/gallery/three.pdf,,three}@uref{http://asymptote.sourceforge.net/gallery/three.asy,,.asy}} (or @code{@uref{http://asymptote.sourceforge.net/gallery/graph3.pdf,,graph3}@uref{http://asymptote.sourceforge.net/gallery/graph3.asy,,.asy}}) is imported.
The @code{media9} LaTeX package is also required (@pxref{embed}).
-The example @code{pdb.asy} illustrates
+The example @code{@uref{http://asymptote.sourceforge.net/gallery/pdb.pdf,,pdb}@uref{http://asymptote.sourceforge.net/gallery/pdb.asy,,.asy}} illustrates
how one can generate a list of predefined views (see @code{100d.views}).
A stationary preview image with a resolution of @code{n} pixels per
@code{bp} can be embedded with the setting @code{render=n}; this allows
@@ -8264,7 +8308,7 @@ patches in the @acronym{PRC} model tree.
The default interaction is @code{Billboard}, which means that labels
are rotated interactively so that they always face the camera.
The interaction @code{Embedded} means that the label interacts as a
-normal @code{3D} surface, as illustrated in the example @code{billboard.asy}.
+normal @code{3D} surface, as illustrated in the example @code{@uref{http://asymptote.sourceforge.net/gallery/billboard.pdf,,billboard}@uref{http://asymptote.sourceforge.net/gallery/billboard.asy,,.asy}}.
@cindex @code{transform}
@cindex @code{XY}
@cindex @code{YZ}
@@ -8294,7 +8338,7 @@ triple normal(path3 p);
@end verbatim
@noindent
to find the unit normal vector to a planar three-dimensional path @code{p}.
-As illustrated in the example @code{planeproject.asy}, a transform3
+As illustrated in the example @code{@uref{http://asymptote.sourceforge.net/gallery/planeproject.pdf,,planeproject}@uref{http://asymptote.sourceforge.net/gallery/planeproject.asy,,.asy}}, a transform3
that projects in the direction @code{dir} onto the plane defined by a
planar path @code{p} is returned by
@verbatim
@@ -8436,7 +8480,7 @@ space and aligned according to the initial viewpoint (or an optionally
specified @code{normal} vector) are also defined:
@code{DefaultHead2(triple normal=O)}, @code{HookHead2(triple normal=O)},
@code{TeXHead2(triple normal=O)}. These are illustrated in the example
-@code{arrows3.asy}.
+@code{@uref{http://asymptote.sourceforge.net/gallery/arrows3.pdf,,arrows3}@uref{http://asymptote.sourceforge.net/gallery/arrows3.asy,,.asy}}.
@cindex @code{NoMargin3}
@cindex @code{BeginMargin3}
@@ -8478,8 +8522,8 @@ can be used to draw on picture @code{pic} a pixel of width @code{width} at
position @code{v} using pen @code{p}.
Further three-dimensional examples are provided in the files
-@code{near_earth.asy}, @code{conicurv.asy}, and (in the @code{animations}
-subdirectory) @code{cube.asy}.
+@code{@uref{http://asymptote.sourceforge.net/gallery/near_earth.pdf,,near_earth}@uref{http://asymptote.sourceforge.net/gallery/near_earth.asy,,.asy}}, @code{@uref{http://asymptote.sourceforge.net/gallery/conicurv.pdf,,conicurv}@uref{http://asymptote.sourceforge.net/gallery/conicurv.asy,,.asy}}, and (in the @code{animations}
+subdirectory) @code{@uref{http://asymptote.sourceforge.net/gallery/cube.pdf,,cube}@uref{http://asymptote.sourceforge.net/gallery/cube.asy,,.asy}}.
@anchor{PostScript3D}
@cindex 3D @code{PostScript}
@@ -8518,14 +8562,14 @@ intersecting planes:
@sp 1
@center @image{planes}
-@node obj
+@node obj, graph3, three, Base modules
@section @code{obj}
@cindex @code{obj}
This module allows one to construct surfaces from simple obj files,
-as illustrated in the example files @code{galleon.asy} and
-@code{triceratops.asy}.
+as illustrated in the example files @code{@uref{http://asymptote.sourceforge.net/gallery/galleon.pdf,,galleon}@uref{http://asymptote.sourceforge.net/gallery/galleon.asy,,.asy}} and
+@code{@uref{http://asymptote.sourceforge.net/gallery/triceratops.pdf,,triceratops}@uref{http://asymptote.sourceforge.net/gallery/triceratops.asy,,.asy}}.
-@node graph3
+@node graph3, grid3, obj, Base modules
@section @code{graph3}
@cindex @code{graph3}
@cindex 3D graphs
@@ -8637,13 +8681,13 @@ surface surface(triple f(pair z), pair a, pair b, int nu=nmesh, int nv=nu,
@noindent
The final two versions draw parametric surfaces for a function
@math{f(u,v)} over the parameter space @code{box(a,b)},
-as illustrated in the example @code{parametricsurface.asy}.
+as illustrated in the example @code{@uref{http://asymptote.sourceforge.net/gallery/parametricsurface.pdf,,parametricsurface}@uref{http://asymptote.sourceforge.net/gallery/parametricsurface.asy,,.asy}}.
An optional splinetype @code{Spline} may be specified.
The boolean array or function @code{cond} can be used to control which
surface mesh cells are actually drawn (by default all mesh cells over
@code{box(a,b)} are drawn).
Surface lighting is illustrated in the example files
-@code{parametricsurface.asy} and @code{sinc.asy}.
+@code{@uref{http://asymptote.sourceforge.net/gallery/parametricsurface.pdf,,parametricsurface}@uref{http://asymptote.sourceforge.net/gallery/parametricsurface.asy,,.asy}} and @code{@uref{http://asymptote.sourceforge.net/gallery/3D graphs/sinc.pdf,,sinc}@uref{http://asymptote.sourceforge.net/gallery/3D graphs/sinc.asy,,.asy}}.
Lighting can be disabled by setting @code{light=nolight}, as in this example
of a Gaussian surface:
@anchor{GaussianSurface}
@@ -8664,10 +8708,10 @@ picture vectorfield(path3 vector(pair v), triple f(pair z), pair a, pair b,
bool cond(pair z)=null, pen p=currentpen,
arrowbar3 arrow=Arrow3, margin3 margin=PenMargin3)
@end verbatim
-as illustrated in the examples @code{vectorfield3.asy} and
-@code{vectorfieldsphere.asy}.
+as illustrated in the examples @code{@uref{http://asymptote.sourceforge.net/gallery/3D graphs/vectorfield3.pdf,,vectorfield3}@uref{http://asymptote.sourceforge.net/gallery/3D graphs/vectorfield3.asy,,.asy}} and
+@code{@uref{http://asymptote.sourceforge.net/gallery/vectorfieldsphere.pdf,,vectorfieldsphere}@uref{http://asymptote.sourceforge.net/gallery/vectorfieldsphere.asy,,.asy}}.
-@node grid3
+@node grid3, solids, graph3, Base modules
@section @code{grid3}
@cindex @code{grid3}
@cindex 3D grids
@@ -8679,7 +8723,7 @@ This module, contributed by Philippe Ivaldi, can be used for drawing
@sp 1
@center @image{grid3xyz}
-@node solids
+@node solids, tube, grid3, Base modules
@section @code{solids}
@cindex @code{solids}
This solid geometry package defines a structure @code{revolution} that
@@ -8690,8 +8734,8 @@ with axis @code{O--1.5unit(Y+Z)} with perspective projection:
@sp 1
@center @image{cylinderskeleton}
-Further illustrations are provided in the example files @code{cylinder.asy},
-@code{cones.asy}, @code{hyperboloid.asy}, and @code{torus.asy}.
+Further illustrations are provided in the example files @code{@uref{http://asymptote.sourceforge.net/gallery/cylinder.pdf,,cylinder}@uref{http://asymptote.sourceforge.net/gallery/cylinder.asy,,.asy}},
+@code{@uref{http://asymptote.sourceforge.net/gallery/cones.pdf,,cones}@uref{http://asymptote.sourceforge.net/gallery/cones.asy,,.asy}}, @code{@uref{http://asymptote.sourceforge.net/gallery/hyperboloid.pdf,,hyperboloid}@uref{http://asymptote.sourceforge.net/gallery/hyperboloid.asy,,.asy}}, and @code{@uref{http://asymptote.sourceforge.net/gallery/torus.pdf,,torus}@uref{http://asymptote.sourceforge.net/gallery/torus.asy,,.asy}}.
The structure @code{skeleton} contains the three-dimensional wireframe
used to visualize a volume of revolution:
@@ -8708,11 +8752,11 @@ struct skeleton {
}
@end verbatim
-@node tube
+@node tube, flowchart, solids, Base modules
@section @code{tube}
@cindex @code{tube}
This package extends the @code{tube} surfaces constructed in
-@code{three_arrows.asy} to arbitrary cross sections, colors, and spine
+@code{@uref{http://asymptote.sourceforge.net/gallery/three_arrows.pdf,,three_arrows}@uref{http://asymptote.sourceforge.net/gallery/three_arrows.asy,,.asy}} to arbitrary cross sections, colors, and spine
transformations. The routine
@verbatim
surface tube(path3 g, coloredpath section,
@@ -8766,10 +8810,10 @@ use of a @code{path} instead of a @code{coloredpath}; in this case the
shading behaviour is the default shading behavior for a surface.
An example of @code{tube} is provided in the file
-@code{trefoilknot.asy}. Further examples can be found at
+@code{@uref{http://asymptote.sourceforge.net/gallery/trefoilknot.pdf,,trefoilknot}@uref{http://asymptote.sourceforge.net/gallery/trefoilknot.asy,,.asy}}. Further examples can be found at
@url{http://www.piprime.fr/files/asymptote/tube/}.
-@node flowchart
+@node flowchart, contour, tube, Base modules
@section @code{flowchart}
@cindex @code{flowchart}
This package provides routines for drawing flowcharts. The primary
@@ -8898,13 +8942,13 @@ segments between the pairs specified by @code{point} should be drawn
in the @code{Horizontal} or @code{Vertical} direction.
Here is a simple flowchart example (see also the example
-@code{controlsystem.asy}):
+@code{@uref{http://asymptote.sourceforge.net/gallery/controlsystem.pdf,,controlsystem}@uref{http://asymptote.sourceforge.net/gallery/controlsystem.asy,,.asy}}):
@verbatiminclude flowchartdemo.asy
@sp 1
@center @image{flowchartdemo}
-@node contour
+@node contour, contour3, flowchart, Base modules
@section @code{contour}
@cindex @code{contour}
This package draws contour lines.
@@ -8993,20 +9037,21 @@ int[][] triangulate(pair[] z);
@sp 1
@center @image{triangulate}
-The example @code{Gouraudcontour.asy} illustrates how to produce color
+The example @code{@uref{http://asymptote.sourceforge.net/gallery/2D
+graphs/Gouraudcontour.pdf,,Gouraudcontour}@uref{http://asymptote.sourceforge.net/gallery/2D graphs/Gouraudcontour.asy,,.asy}} illustrates how to produce color
density images over such irregular triangular meshes.
@code{Asymptote} uses a robust version of Paul Bourke's Delaunay triangulation
algorithm based on the public-domain exact arithmetic predicates written by
Jonathan Shewchuk.
-@node contour3
+@node contour3, smoothcontour3, contour, Base modules
@section @code{contour3}
@cindex @code{contour3}
This package draws surfaces described as the null space of real-valued
functions of @math{(x,y,z)} or @code{real[][][]} matrices.
-Its usage is illustrated in the example file @code{magnetic.asy}.
+Its usage is illustrated in the example file @code{@uref{http://asymptote.sourceforge.net/gallery/3D graphs/magnetic.pdf,,magnetic}@uref{http://asymptote.sourceforge.net/gallery/3D graphs/magnetic.asy,,.asy}}.
-@node smoothcontour3
+@node smoothcontour3, slopefield, contour3, Base modules
@section @code{smoothcontour3}
@cindex @code{smoothcontour3}
This module, written by Charles Staats, draws implicitly defined surfaces
@@ -9031,19 +9076,20 @@ surface implicitsurface(real f(triple)=null,
int keyword nx=n,
int keyword ny=n,
int keyword nz=n,
- int keyword maxdepth=8);
+ int keyword maxdepth=8,
+ bool usetriangles=true);
@end verbatim
@noindent
The optional parameter @code{overlapedges} attempts to compensate for
an artifact that can cause the renderer to ``see through'' the
boundary between patches. Although
it defaults to @code{false}, it should usually be set to @code{true}.
-The example @code{genustwo.asy} illustrates the use of this function:
+The example @code{@uref{http://asymptote.sourceforge.net/gallery/genustwo.pdf,,genustwo}@uref{http://asymptote.sourceforge.net/gallery/genustwo.asy,,.asy}} illustrates the use of this function.
Additional examples, together with a more in-depth explanation of
the module's usage and pitfalls, are available at
@url{https://github.com/charlesstaats/smoothcontour3}.
-@node slopefield
+@node slopefield, ode, smoothcontour3, Base modules
@section @code{slopefield}
@cindex @code{slopefield}
To draw a slope field for the differential equation @math{dy/dx=f(x,y)} (or
@@ -9082,14 +9128,14 @@ Both @code{slopefield} and @code{curve} alternatively accept a function
@sp 1
@center @image{slopefield1}
-@node ode
+@node ode, , slopefield, Base modules
@section @code{ode}
@cindex @code{ode}
-The @code{ode} module, illustrated in the example @code{odetest.asy},
+The @code{ode} module, illustrated in the example @code{@uref{https://raw.githubusercontent.com/vectorgraphics/asymptote/HEAD/examples/odetest.asy,,odetest.asy}},
implements a number of explicit numerical integration schemes for
ordinary differential equations.
-@node Options
+@node Options, Interactive mode, Base modules, Top
@chapter Command-line options
@cindex options
@cindex command-line options
@@ -9286,7 +9332,7 @@ Also output knot guide solver diagnostics.
Also output @code{Asymptote} traceback diagnostics.
@end table
-@node Interactive mode
+@node Interactive mode, GUI, Options, Top
@chapter Interactive mode
@cindex interactive mode
Interactive mode is entered by executing the command @code{asy} with
@@ -9391,7 +9437,7 @@ g.clip("unitcircle")
g.label("\"$O$\", (0,0), SW")
@end verbatim
-@node GUI
+@node GUI, PostScript to Asymptote, Interactive mode, Top
@chapter Graphical User Interface
@cindex graphical user interface
@cindex @acronym{GUI}
@@ -9401,30 +9447,30 @@ g.label("\"$O$\", (0,0), SW")
@cindex @code{Button-2}
@cindex @code{xasy}
+@menu
+* GUI installation:: Installing @code{xasy}
+* GUI usage:: Using @code{xasy} to edit objects
+@end menu
+
In the event that adjustments to the final figure are required, the
preliminary Graphical User Interface (@acronym{GUI}) @code{xasy} included with
@code{Asymptote} allows you to move graphical objects and draw new ones.
The modified figure can then be saved as a normal @code{Asymptote} file.
-@menu
-* GUI installation:: Installing @code{xasy}
-* GUI usage::
-@end menu
-
-@node GUI installation
+@node GUI installation, GUI usage, GUI, GUI
@section GUI installation
@cindex GUI installation
As @code{xasy} is written in the interactive scripting language
-@code{Python/TK}, it requires @code{Python}
-(@url{http://www.python.org}), the @code{Python Imaging Library}
-(@url{http://www.pythonware.com/products/pil/}), and the @code{tkinter}
-package (included with @code{Python} under @code{Microsoft Windows}) be
-installed. @code{Fedora Linux} users can either install
-@code{tkinter} with the commands
+@code{Python/TK}, it requires @code{Python} (@url{http://www.python.org}),
+the @code{Pillow} fork of the @code{Python Imaging Library},and the
+@code{tkinter} package (included with @code{Python} under
+@code{Microsoft Windows}). @code{Fedora Linux} users can
+either install @code{tkinter} and @code{Pillow} with the commands
@verbatim
-yum install tkinter
-yum install tk-devel
+dnf install tkinter
+dnf install tk-devel
+dnf install python-pillow-tk
@end verbatim
@noindent
or manually install the @code{tkinter}, @code{tix}, @code{tk},
@@ -9435,10 +9481,10 @@ supports full alpha channel transparency. Under @code{Microsoft Windows},
this requires @code{Python 2.7.4} or later and version @code{3.1.0} of the
@code{Pillow} fork of the @code{Python Imaging Library}, available from
@quotation
-@url{https://pypi.python.org/pypi/Pillow/3.1.0}
+@url{http://pypi.python.org/pypi/Pillow}
@end quotation
-@node GUI usage
+@node GUI usage, , GUI installation, GUI
@section GUI usage
@cindex GUI usage
@cindex @code{deconstruct}
@@ -9461,7 +9507,7 @@ together on adding them to a picture. However, the elements of a frame
added to another frame are not grouped together by default: their
elements will be individually deconstructed (@pxref{add}).
-@node PostScript to Asymptote
+@node PostScript to Asymptote, Help, GUI, Top
@chapter @code{PostScript} to @code{Asymptote}
@cindex @code{pstoedit}
The excellent @code{PostScript} editor @code{pstoedit} (version 3.50 or later;
@@ -9483,7 +9529,7 @@ If the line widths aren't quite correct, try giving @code{pstoedit} the
If the fonts aren't typeset correctly, try giving @code{pstoedit} the
@code{-dt} option.
-@node Help
+@node Help, Debugger, PostScript to Asymptote, Top
@chapter Help
@cindex help
@cindex forum
@@ -9543,7 +9589,7 @@ from true segmentation faults (due to internal C++ programming errors;
please submit the @code{Asymptote} code that generates such segmentation
faults along with your bug report).
-@node Debugger
+@node Debugger, Credits, Help, Top
@chapter Debugger
@cindex debugger
Asymptote now includes a line-based (as opposed to code-based)
@@ -9640,7 +9686,7 @@ The debugging prompt may be entered manually with the call
void breakpoint(code s=quote{});
@end verbatim
-@node Credits
+@node Credits, Index, Debugger, Top
@chapter Acknowledgments
@cindex acknowledgments
@@ -9656,11 +9702,12 @@ author of the program @code{MetaPost} that inspired the development of
The authors of @code{Asymptote} are Andy Hammerlindl, John Bowman, and
Tom Prince. Sean Healy designed the @code{Asymptote} logo. Other
-contributors include Michail Vidiassov, Radoslav Marinov, Orest Shardt,
-Chris Savage, Philippe Ivaldi, Olivier Guib@'e, Jacques Pienaar,
-Mark Henning, Steve Melenchuk, Martin Wiebusch, and Stefan Knorr.
+contributors include Orest Shardt, Jesse Frohlich, Michail Vidiassov,
+Charles Staats, Philippe Ivaldi, Olivier Guib@'e, Radoslav Marinov,
+Jeff Samuelson, Chris Savage, Jacques Pienaar, Mark Henning, Steve Melenchuk,
+Martin Wiebusch, and Stefan Knorr.
-@node Index
+@node Index, , Credits, Top
@unnumbered Index
@printindex cp
@@ -9860,10 +9907,14 @@ Mark Henning, Steve Melenchuk, Martin Wiebusch, and Stefan Knorr.
@c LocalWords: insphere cospherical 5unit luatex lualatex 'asy 1cm
@c LocalWords: 'lasy 'auto 4g 2S 100pt 3t 12pt 5mm 25cm 3x 5x 3y 2x
@c LocalWords: 602e 2y 3sin 10cm 204e 10x Ai Ai Ai Ai Ai Ai Ai Ai '
-@c LocalWords: unnormalized 5E 5cm 2N 2E 2n 100d 5z 5y 0pt 1filll
+@c LocalWords: unnormalized 5E 5cm 2N 2E 2n 100d 5z 5y 0pt 1filll '
@c LocalWords: 5unit 144x144 aligndir smoothcontour3 's 3D 2D cmake
@c LocalWords: 'load 'asy 'lasy 'auto 5bp 1cm 4g 2S 100pt 3t nan 3x
@c LocalWords: 12pt 5mm 25cm 5x 3y 602e 2x 2y 3sin 10cm 204e 10x Ai
@c LocalWords: Ai Ai Ai Ai Ai Ai Ai 5E 5cm 2N 2E 2n 100d 5z 5y nz
@c LocalWords: 5unit Staats implicitsurface overlapedges maxdepth
-@c LocalWords: through'' genustwo 144x144
+@c LocalWords: through'' genustwo 144x144 0pt 1filll 's 3D 2D 'load
+@c LocalWords: 'asy 'lasy 'auto 5bp 1cm 4g 2S 100pt 3t 12pt 5mm 3x
+@c LocalWords: 25cm 5x 3y 602e 2x 2y 3sin 10cm 204e 10x Ai Ai Ai Ai
+@c LocalWords: Ai Ai Ai Ai 5E 5cm 2N 2E 2n 100d 5z 5y 5unit 144x144
+@c LocalWords: Frohlich
diff --git a/Build/source/utils/asymptote/doc/externalprc.tex b/Build/source/utils/asymptote/doc/externalprc.tex
index 7c488e78f9c..04718b86a11 100644
--- a/Build/source/utils/asymptote/doc/externalprc.tex
+++ b/Build/source/utils/asymptote/doc/externalprc.tex
@@ -7,8 +7,7 @@
\documentclass[12pt]{article}
\input cube.pre
\usepackage[bigfiles]{media9}
-\playbuttonfalse
-\RequirePackage{color,graphicx}
+\RequirePackage{asymptote,color,graphicx}
\begin{document}
\input cube.tex
\end{document}
diff --git a/Build/source/utils/asymptote/doc/genustwo.asy b/Build/source/utils/asymptote/doc/genustwo.asy
deleted file mode 100644
index 0d346481d04..00000000000
--- a/Build/source/utils/asymptote/doc/genustwo.asy
+++ /dev/null
@@ -1,36 +0,0 @@
-size(10cm,0);
-import smoothcontour3;
-currentprojection=perspective((18,20,10));
-if(settings.render < 0) settings.render=8;
-
-real tuberadius = 0.69;
-
-// Convert to cylindrical coordinates to draw
-// a circle revolved about the z axis.
-real toruscontour(real x, real y, real z) {
- real r = sqrt(x^2 + y^2);
- return (r-2)^2 + z^2 - tuberadius^2;
-}
-
-// Take the union of the two tangent tori (by taking
-// the product of the functions defining them). Then
-// add (or subtract) a bit of noise to smooth things
-// out.
-real f(real x, real y, real z) {
- real f1 = toruscontour(x - 2 - tuberadius, y, z);
- real f2 = toruscontour(x + 2 + tuberadius, y, z);
- return f1 * f2 - 0.1;
-}
-
-// The noisy function extends a bit farther than the union of
-// the two tori, so include a bit of extra space in the box.
-triple max = (2*(2+tuberadius), 2+tuberadius, tuberadius)
- + (0.1, 0.1, 0.1);
-triple min = -max;
-
-// Draw the implicit surface.
-draw(implicitsurface(f, min, max, overlapedges=true,
- nx=20, nz=5),
- surfacepen=material(diffusepen=gray(0.6),
- emissivepen=gray(0.3),
- specularpen=gray(0.1)));
diff --git a/Build/source/utils/asymptote/doc/genustwomissing.asy b/Build/source/utils/asymptote/doc/genustwomissing.asy
deleted file mode 100644
index 73d356deb77..00000000000
--- a/Build/source/utils/asymptote/doc/genustwomissing.asy
+++ /dev/null
@@ -1,12 +0,0 @@
-// This file generates a dummy genustwo.pdf file if the rasterized
-// image in genustwo.asy failed to render.
-file fin = input("genustwo.pdf", check=false);
-if (error(fin)) {
- defaultpen(fontsize(20bp));
- label("Rasterized image failed to render.");
- shipout(prefix="genustwo");
-} else {
- label("Rasterized image rendered successfully. Please ignore this message.");
-}
-close(fin);
-
diff --git a/Build/source/utils/asymptote/doc/latexusage.tex b/Build/source/utils/asymptote/doc/latexusage.tex
index b70df067963..07b0e56a356 100644
--- a/Build/source/utils/asymptote/doc/latexusage.tex
+++ b/Build/source/utils/asymptote/doc/latexusage.tex
@@ -1,10 +1,10 @@
\documentclass[12pt]{article}
% Use this form to include EPS (latex) or PDF (pdflatex) files:
-\usepackage{asymptote}
+%\usepackage{asymptote}
% Use this form with latex or pdflatex to include inline LaTeX code by default:
-%\usepackage[inline]{asymptote}
+\usepackage[inline]{asymptote}
% Use this form with latex or pdflatex to create PDF attachments by default:
%\usepackage[attach]{asymptote}
diff --git a/Build/source/utils/asymptote/doc/png/asymptote.info b/Build/source/utils/asymptote/doc/png/asymptote.info
index daa09856b92..980fe6df2fe 100644
--- a/Build/source/utils/asymptote/doc/png/asymptote.info
+++ b/Build/source/utils/asymptote/doc/png/asymptote.info
@@ -1,11 +1,11 @@
This is asymptote.info, produced by makeinfo version 6.0 from
asymptote.texi.
-This file documents 'Asymptote', version 2.36.
+This file documents 'Asymptote', version 2.37.
<http://asymptote.sourceforge.net>
- Copyright (C) 2004-14 Andy Hammerlindl, John Bowman, and Tom Prince.
+ Copyright (C) 2004-16 Andy Hammerlindl, John Bowman, and Tom Prince.
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Lesser General Public License
@@ -17,16 +17,16 @@ START-INFO-DIR-ENTRY
END-INFO-DIR-ENTRY

-File: asymptote.info, Node: Top, Next: Description, Up: (dir)
+File: asymptote.info, Node: Top, Next: Description, Prev: (dir), Up: (dir)
Asymptote
*********
-This file documents 'Asymptote', version 2.36.
+This file documents 'Asymptote', version 2.37.
<http://asymptote.sourceforge.net>
- Copyright (C) 2004-14 Andy Hammerlindl, John Bowman, and Tom Prince.
+ Copyright (C) 2004-16 Andy Hammerlindl, John Bowman, and Tom Prince.
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Lesser General Public License
@@ -65,6 +65,14 @@ Installation
* Git:: Getting the latest development source
* Uninstall:: Goodbye, 'Asymptote'!
+Tutorial
+
+* Drawing in batch mode:: Run 'Asymptote' on a text file
+* Drawing in interactive mode:: Running 'Asymptote' interactively
+* Figure size:: Specifying the figure size
+* Labels:: Adding 'LaTeX' labels
+* Paths:: Drawing lines and curves
+
Drawing commands
* draw:: Draw a path on a picture or frame
@@ -103,7 +111,6 @@ Functions
* Rest arguments:: Functions with a variable number of arguments
* Mathematical functions:: Standard libm functions
-
Arrays
* Slices:: Python-style array slices
@@ -154,7 +161,7 @@ Base modules
Graphical User Interface
* GUI installation:: Installing 'xasy'
-* GUI usage::
+* GUI usage:: Using 'xasy' to edit objects

@@ -230,12 +237,16 @@ mathematics typesetting needs, one can write 'Asymptote' modules that
tailor it to specific applications. A scientific graphing module has
already been written (*note graph::). Examples of 'Asymptote' code and
output, including animations, are available at
- <http://asymptote.sourceforge.net/gallery/>.
-Links to many external resources, including an excellent user-written
+ <http://asymptote.sourceforge.net/gallery/>
+Clicking on an example file name in this manual, like 'Pythagoras', will
+display the PDF output, whereas clicking on its '.asy' extension will
+show the corresponding 'Asymptote' code in a separate window.
+
+ Links to many external resources, including an excellent user-written
'Asymptote' tutorial can be found at
- <http://asymptote.sourceforge.net/links.html>.
+ <http://asymptote.sourceforge.net/links.html>
A quick reference card for 'Asymptote' is available at
- <http://asymptote.sourceforge.net/asyRefCard.pdf>.
+ <http://asymptote.sourceforge.net/asyRefCard.pdf>

File: asymptote.info, Node: Installation, Next: Tutorial, Prev: Description, Up: Top
@@ -259,12 +270,12 @@ After following the instructions for your specific distribution, please
see also *note Configuring::.
We recommend subscribing to new release announcements at
- <http://freecode.com/projects/asy>
+ <http://sourceforge.net/projects/asymptote>
Users may also wish to monitor the 'Asymptote' forum:
<http://sourceforge.net/p/asymptote/discussion/409349>

-File: asymptote.info, Node: UNIX binary distributions, Next: MacOS X binary distributions, Up: Installation
+File: asymptote.info, Node: UNIX binary distributions, Next: MacOS X binary distributions, Prev: Installation, Up: Installation
2.1 UNIX binary distributions
=============================
@@ -280,7 +291,7 @@ be installed by default in '/usr/local/share/doc/asymptote/examples'.
Fedora users can easily install the most recent version of 'Asymptote'
with the command
-yum --enablerepo=rawhide install asymptote
+dnf --enablerepo=rawhide install asymptote
To install the latest version of 'Asymptote' on a Debian-based
distribution (e.g. Ubuntu, Mepis, Linspire) follow the instructions for
@@ -520,7 +531,7 @@ done as the root user. To install without root privileges, change the
with './configure --disable-gc'. For a list of other configuration
options, say './configure --help'. For example, one can tell configure
to look for header files and libraries in nonstandard locations:
-./configure CFLAGS=-I/opt/usr/include LDFLAGS=-L/opt/usr/lib
+./configure CXXFLAGS=-I/opt/usr/include LDFLAGS=-L/opt/usr/lib
If you are compiling 'Asymptote' with 'gcc', you will need a
relatively recent version (e.g. 3.4.4 or later). For full interactive
@@ -616,7 +627,7 @@ File: asymptote.info, Node: Uninstall, Prev: Git, Up: Installation
2.9 Uninstall
=============
-To uninstall an 'Linux i386' binary distribution, use the commands
+To uninstall a 'Linux i386' binary distribution, use the commands
tar -zxvf asymptote-x.xx.i386.tgz | xargs --replace=% rm /%
texhash
@@ -630,6 +641,28 @@ File: asymptote.info, Node: Tutorial, Next: Drawing commands, Prev: Installat
3 Tutorial
**********
+* Menu:
+
+* Drawing in batch mode:: Run 'Asymptote' on a text file
+* Drawing in interactive mode:: Running 'Asymptote' interactively
+* Figure size:: Specifying the figure size
+* Labels:: Adding 'LaTeX' labels
+* Paths:: Drawing lines and curves
+
+A concise introduction to 'Asymptote' is given here. For a more
+thorough introduction, see the excellent 'Asymptote' tutorial written by
+Charles Staats:
+
+ <http://math.uchicago.edu/~cstaats/Charles_Staats_III/Notes_and_papers_files/asymptote_tutorial.pdf>
+
+ Another 'Asymptote' tutorial is available as a wiki, with images
+rendered by an online Asymptote engine:
+
+ <http://www.artofproblemsolving.com/wiki/?title=Asymptote_(Vector_Graphics_Language)>
+
+
+File: asymptote.info, Node: Drawing in batch mode, Next: Drawing in interactive mode, Prev: Tutorial, Up: Tutorial
+
3.1 Drawing in batch mode
=========================
@@ -653,6 +686,9 @@ immediately view the result:
Here, the '--' connector joins the two points '(0,0)' and '(100,100)'
with a line segment.
+
+File: asymptote.info, Node: Drawing in interactive mode, Next: Figure size, Prev: Drawing in batch mode, Up: Tutorial
+
3.2 Drawing in interactive mode
===============================
@@ -672,6 +708,9 @@ complete unambiguous words; otherwise, hitting tab again will show the
possible choices. Further commands specific to interactive mode are
described in *note Interactive mode::.
+
+File: asymptote.info, Node: Figure size, Next: Labels, Prev: Drawing in interactive mode, Up: Tutorial
+
3.3 Figure size
===============
@@ -712,6 +751,9 @@ replaced with the predefined variable 'unitsquare', or equivalently,
unitsize(1cm);
draw(unitsquare);
+
+File: asymptote.info, Node: Labels, Next: Paths, Prev: Figure size, Up: Tutorial
+
3.4 Labels
==========
@@ -734,6 +776,9 @@ the 'Asymptote' base module 'plain' (a user who has a local variable
named 'E' may access the compass direction 'E' by prefixing it with the
name of the module where it is defined: 'plain.E').
+
+File: asymptote.info, Node: Paths, Prev: Labels, Up: Tutorial
+
3.5 Paths
=========
@@ -800,12 +845,7 @@ label("(0,0,1)",(0,0,1),Z);
external links posted at <http://asymptote.sourceforge.net>) for further
examples, including two-dimensional and interactive three-dimensional
scientific graphs. Additional examples have been posted by Philippe
-Ivaldi at <http://www.piprime.fr/asymptote>. Excellent user-written
-'Asymptote' tutorials are also available:
-
- <http://www.artofproblemsolving.com/Wiki/index.php/Asymptote:_Basics>
-
- <http://math.uchicago.edu/~cstaats/Charles_Staats_III/Notes_and_papers_files/asymptote_tutorial.pdf>
+Ivaldi at <http://www.piprime.fr/asymptote>.

File: asymptote.info, Node: Drawing commands, Next: Bezier curves, Prev: Tutorial, Up: Top
@@ -846,7 +886,7 @@ currentpicture).
* label:: Label a point on a picture

-File: asymptote.info, Node: draw, Next: fill, Up: Drawing commands
+File: asymptote.info, Node: draw, Next: fill, Prev: Drawing commands, Up: Drawing commands
4.1 draw
========
@@ -1033,8 +1073,8 @@ void gouraudshade(picture pic=currentpicture, path g, bool stroke=false,
In the second form, the elements of 'z' are taken to be successive nodes
of path 'g'. The pens in 'p' must belong to the same color space.
Illustrations of Gouraud shading are provided in the example file
-'Gouraud.asy' and in the solid geometry module 'solids.asy'. The edge
-flags used in Gouraud shading are documented here:
+'Gouraud.asy'. The edge flags used in Gouraud shading are documented
+here:
<http://partners.adobe.com/public/developer/en/ps/sdk/TN5600.SmoothShading.pdf>.
Tensor product shading using fill rule 'fillrule' on patches bounded
@@ -1321,6 +1361,24 @@ File: asymptote.info, Node: Programming, Next: LaTeX usage, Prev: Bezier curv
6 Programming
*************
+* Menu:
+
+* Data types:: void, bool, int, real, pair, triple, string
+* Paths and guides:: Bezier curves
+* Pens:: Colors, line types, line widths, font sizes
+* Transforms:: Affine transforms
+* Frames and pictures:: Canvases for immediate and deferred drawing
+* Files:: Reading and writing your data
+* Variable initializers:: Initialize your variables
+* Structures:: Organize your data
+* Operators:: Arithmetic and logical operators
+* Implicit scaling:: Avoiding those ugly *s
+* Functions:: Traditional and high-order functions
+* Arrays:: Dynamic vectors
+* Casts:: Implicit and explicit casts
+* Import:: Importing external 'Asymptote' modules
+* Static:: Where to allocate your variable?
+
Here is a short introductory example to the 'Asymptote' programming
language that highlights the similarity of its control structures with
those of C, C++, and Java:
@@ -1357,26 +1415,8 @@ for(int k : array) {
In addition, it supports many features beyond the ones found in those
languages.
-* Menu:
-
-* Data types:: void, bool, int, real, pair, triple, string
-* Paths and guides:: Bezier curves
-* Pens:: Colors, line types, line widths, font sizes
-* Transforms:: Affine transforms
-* Frames and pictures:: Canvases for immediate and deferred drawing
-* Files:: Reading and writing your data
-* Variable initializers:: Initialize your variables
-* Structures:: Organize your data
-* Operators:: Arithmetic and logical operators
-* Implicit scaling:: Avoiding those ugly *s
-* Functions:: Traditional and high-order functions
-* Arrays:: Dynamic vectors
-* Casts:: Implicit and explicit casts
-* Import:: Importing external 'Asymptote' modules
-* Static:: Where to allocate your variable?
-

-File: asymptote.info, Node: Data types, Next: Paths and guides, Up: Programming
+File: asymptote.info, Node: Data types, Next: Paths and guides, Prev: Programming, Up: Programming
6.1 Data types
==============
@@ -1661,7 +1701,9 @@ user-defined types):
'string format(string s, int n, string locale="")'
returns a string containing 'n' formatted according to the
C-style format string 's' using locale 'locale' (or the
- current locale if an empty string is specified);
+ current locale if an empty string is specified), following the
+ behaviour of the C function 'fprintf'), except that only one
+ data field is allowed.
'string format(string s=defaultformat, string s=defaultseparator, real x, string locale="")'
returns a string containing 'x' formatted according to the
@@ -2817,10 +2859,12 @@ File: asymptote.info, Node: Frames and pictures, Next: Files, Prev: Transform
filltype filltype=NoFill, bool above=true);
The first example adds 'src' to 'currentpicture'; the second one
adds 'src' to 'dest'. The 'group' option specifies whether or not
- the graphical user interface 'xasy' should treat all of the
- elements of 'src' as a single entity (*note GUI::), 'filltype'
- requests optional background filling or clipping, and 'above'
- specifies whether to add 'src' above or below existing objects.
+ the graphical user interface
+ '<http://asymptote.sourceforge.net/gallery/.pdf>.asy' should treat
+ all of the elements of 'src' as a single entity (*note GUI::),
+ 'filltype' requests optional background filling or clipping, and
+ 'above' specifies whether to add 'src' above or below existing
+ objects.
There are also routines to add a picture or frame 'src' specified
in postscript coordinates to another picture 'dest' (or
@@ -3384,7 +3428,7 @@ File: asymptote.info, Node: Operators, Next: Implicit scaling, Prev: Structur
* User-defined operators:: Overloading operators

-File: asymptote.info, Node: Arithmetic & logical, Next: Self & prefix operators, Up: Operators
+File: asymptote.info, Node: Arithmetic & logical, Next: Self & prefix operators, Prev: Operators, Up: Operators
6.9.1 Arithmetic & logical operators
------------------------------------
@@ -3552,6 +3596,13 @@ File: asymptote.info, Node: Functions, Next: Arrays, Prev: Implicit scaling,
6.11 Functions
==============
+* Menu:
+
+* Default arguments:: Default values can appear anywhere
+* Named arguments:: Assigning function arguments by keyword
+* Rest arguments:: Functions with a variable number of arguments
+* Mathematical functions:: Standard libm functions
+
'Asymptote' functions are treated as variables with a signature
(non-function variables have null signatures). Variables with the same
name are allowed, so long as they have distinct signatures.
@@ -3644,15 +3695,8 @@ infinite nested recursion will generate a stack overflow (reported as a
segmentation fault, unless a fully working version of the GNU library
'libsigsegv' (e.g. 2.4 or later) is installed at configuration time).
-* Menu:
-
-* Default arguments:: Default values can appear anywhere
-* Named arguments:: Assigning function arguments by keyword
-* Rest arguments:: Functions with a variable number of arguments
-* Mathematical functions:: Standard libm functions
-

-File: asymptote.info, Node: Default arguments, Next: Named arguments, Up: Functions
+File: asymptote.info, Node: Default arguments, Next: Named arguments, Prev: Functions, Up: Functions
6.11.1 Default arguments
------------------------
@@ -4293,7 +4337,7 @@ output with the functions 'write(file,T[])', 'write(file,T[][])',
'write(file,T[][][])', respectively.

-File: asymptote.info, Node: Slices, Up: Arrays
+File: asymptote.info, Node: Slices, Prev: Arrays, Up: Arrays
6.12.1 Slices
-------------
@@ -4692,15 +4736,15 @@ File: asymptote.info, Node: LaTeX usage, Next: Base modules, Prev: Programmin
***************
'Asymptote' comes with a convenient 'LaTeX' style file 'asymptote.sty'
-that makes 'LaTeX' 'Asymptote'-aware. Entering 'Asymptote' code
-directly into the 'LaTeX' source file, at the point where it is needed,
-keeps figures organized and avoids the need to invent new file names for
-each figure. Simply add the line '\usepackage{asymptote}' at the
-beginning of your file and enclose your 'Asymptote' code within a
-'\begin{asy}...\end{asy}' environment. As with the 'LaTeX' 'comment'
-environment, the '\end{asy}' command must appear on a line by itself,
-with no trailing commands/comments. A blank line is not allowed after
-'\begin{asy}'.
+(v1.30 or later required) that makes 'LaTeX' 'Asymptote'-aware.
+Entering 'Asymptote' code directly into the 'LaTeX' source file, at the
+point where it is needed, keeps figures organized and avoids the need to
+invent new file names for each figure. Simply add the line
+'\usepackage{asymptote}' at the beginning of your file and enclose your
+'Asymptote' code within a '\begin{asy}...\end{asy}' environment. As
+with the 'LaTeX' 'comment' environment, the '\end{asy}' command must
+appear on a line by itself, with no trailing commands/comments. A blank
+line is not allowed after '\begin{asy}'.
The sample 'LaTeX' file below, named 'latexusage.tex', can be run as
follows:
@@ -4759,10 +4803,10 @@ labels might not show up in DVI viewers that cannot handle raw
\documentclass[12pt]{article}
% Use this form to include EPS (latex) or PDF (pdflatex) files:
-\usepackage{asymptote}
+%\usepackage{asymptote}
% Use this form with latex or pdflatex to include inline LaTeX code by default:
-%\usepackage[inline]{asymptote}
+\usepackage[inline]{asymptote}
% Use this form with latex or pdflatex to create PDF attachments by default:
%\usepackage[attach]{asymptote}
@@ -4928,7 +4972,7 @@ File: asymptote.info, Node: Base modules, Next: Options, Prev: LaTeX usage,
* ode:: Ordinary differential equations

-File: asymptote.info, Node: plain, Next: simplex, Up: Base modules
+File: asymptote.info, Node: plain, Next: simplex, Prev: Base modules, Up: Base modules
8.1 'plain'
===========
@@ -5520,9 +5564,9 @@ following routines:
'BottomTop(bool extend=false)'
Request a bottom and top axis.
- Custom axis types can be created by following the examples in
- 'graph.asy'. One can easily override the default values for the
- standard axis types:
+ Custom axis types can be created by following the examples in the
+ module 'graph.asy'. One can easily override the default values for
+ the standard axis types:
import graph;
YZero=new axis(bool extend=true) {
@@ -5760,11 +5804,12 @@ following routines:
2. The next example draws a scientific-style graph with a legend. The
position of the legend can be adjusted either explicitly or by
- using the graphical user interface 'xasy' (*note GUI::). If an
- 'UnFill(real xmargin=0, real ymargin=xmargin)' or 'Fill(pen)'
- option is specified to 'add', the legend will obscure any
- underlying objects. Here we illustrate how to clip the portion of
- the picture covered by a label:
+ using the graphical user interface
+ '<http://asymptote.sourceforge.net/gallery/.pdf>.asy' (*note
+ GUI::). If an 'UnFill(real xmargin=0, real ymargin=xmargin)' or
+ 'Fill(pen)' option is specified to 'add', the legend will obscure
+ any underlying objects. Here we illustrate how to clip the portion
+ of the picture covered by a label:
import graph;
@@ -6742,11 +6787,12 @@ rendering options documented at the beginning of module 'three.asy'.
The examples 'elevation.asy' and 'sphericalharmonic.asy' illustrate
how to draw a surface with patch-dependent colors. The examples
-'vertexshading' and 'smoothelevation' illustrate vertex-dependent
-colors, which is supported for both 'Asymptote''s native 'OpenGL'
-renderer and two-dimensional projections. Since the PRC output format
-does not currently support vertex shading of Bezier surfaces, PRC
-patches are shaded with the mean of the four vertex colors.
+'vertexshading.asy' and 'smoothelevation.asy' illustrate
+vertex-dependent colors, which is supported for both 'Asymptote''s
+native 'OpenGL' renderer and two-dimensional projections. Since the PRC
+output format does not currently support vertex shading of Bezier
+surfaces, PRC patches are shaded with the mean of the four vertex
+colors.
A surface can be constructed from a cyclic 'path3' with the
constructor
@@ -6798,7 +6844,7 @@ and force all lines to be drawn with 'linewidth(0)' (one pixel wide,
regardless of the resolution). By default, mesh and contour lines in
three-dimensions are always drawn thin, unless an explicit line width is
given in the pen parameter or the setting 'thin' is set to 'false'. The
-pens 'thin()' and 'thick()' defined in plain_pens.asy can also be used
+pens 'thin()' and 'thick()' defined in 'plain_pens.asy' can also be used
to override these defaults for specific draw commands.
There are four choices for viewing 3D 'Asymptote' output:
@@ -7908,13 +7954,14 @@ surface implicitsurface(real f(triple)=null,
int keyword nx=n,
int keyword ny=n,
int keyword nz=n,
- int keyword maxdepth=8);
+ int keyword maxdepth=8,
+ bool usetriangles=true);
The optional parameter 'overlapedges' attempts to compensate for an
artifact that can cause the renderer to "see through" the boundary
between patches. Although it defaults to 'false', it should usually be
set to 'true'. The example 'genustwo.asy' illustrates the use of this
-function: Additional examples, together with a more in-depth explanation
-of the module's usage and pitfalls, are available at
+function. Additional examples, together with a more in-depth
+explanation of the module's usage and pitfalls, are available at
<https://github.com/charlesstaats/smoothcontour3>.

@@ -8041,7 +8088,7 @@ Options (negate by replacing - with -no):
-prc Embed 3D PRC graphics in PDF output [true]
-prompt string Prompt [> ]
-prompt2 string Continuation prompt for multiline input [..]
--q,-quiet Suppress welcome message [false]
+-q,-quiet Suppress welcome text and noninteractive stdout [false]
-render n Render 3D graphics using n pixels per bp (-1=auto) [-1]
-resizestep step Resize step [1.2]
-reverse reverse 3D animations [false]
@@ -8280,36 +8327,37 @@ File: asymptote.info, Node: GUI, Next: PostScript to Asymptote, Prev: Interac
11 Graphical User Interface
***************************
+* Menu:
+
+* GUI installation:: Installing 'xasy'
+* GUI usage:: Using 'xasy' to edit objects
+
In the event that adjustments to the final figure are required, the
preliminary Graphical User Interface (GUI) 'xasy' included with
'Asymptote' allows you to move graphical objects and draw new ones. The
modified figure can then be saved as a normal 'Asymptote' file.
-* Menu:
-
-* GUI installation:: Installing 'xasy'
-* GUI usage::
-

-File: asymptote.info, Node: GUI installation, Next: GUI usage, Up: GUI
+File: asymptote.info, Node: GUI installation, Next: GUI usage, Prev: GUI, Up: GUI
11.1 GUI installation
=====================
As 'xasy' is written in the interactive scripting language 'Python/TK',
-it requires 'Python' (<http://www.python.org>), the 'Python Imaging
-Library' (<http://www.pythonware.com/products/pil/>), and the 'tkinter'
-package (included with 'Python' under 'Microsoft Windows') be installed.
-'Fedora Linux' users can either install 'tkinter' with the commands
-yum install tkinter
-yum install tk-devel
+it requires 'Python' (<http://www.python.org>), the 'Pillow' fork of the
+'Python Imaging Library',and the 'tkinter' package (included with
+'Python' under 'Microsoft Windows'). 'Fedora Linux' users can either
+install 'tkinter' and 'Pillow' with the commands
+dnf install tkinter
+dnf install tk-devel
+dnf install python-pillow-tk
or manually install the 'tkinter', 'tix', 'tk', and 'tk-devel' packages.
Pictures are deconstructed into the PNG image format, which supports
full alpha channel transparency. Under 'Microsoft Windows', this
requires 'Python 2.7.4' or later and version '3.1.0' of the 'Pillow'
fork of the 'Python Imaging Library', available from
- <https://pypi.python.org/pypi/Pillow/3.1.0>
+ <http://pypi.python.org/pypi/Pillow>

File: asymptote.info, Node: GUI usage, Prev: GUI installation, Up: GUI
@@ -8470,9 +8518,10 @@ author of the program 'MetaPost' that inspired the development of
The authors of 'Asymptote' are Andy Hammerlindl, John Bowman, and Tom
Prince. Sean Healy designed the 'Asymptote' logo. Other contributors
-include Michail Vidiassov, Radoslav Marinov, Orest Shardt, Chris Savage,
-Philippe Ivaldi, Olivier Guibe', Jacques Pienaar, Mark Henning, Steve
-Melenchuk, Martin Wiebusch, and Stefan Knorr.
+include Orest Shardt, Jesse Frohlich, Michail Vidiassov, Charles Staats,
+Philippe Ivaldi, Olivier Guibe', Radoslav Marinov, Jeff Samuelson, Chris
+Savage, Jacques Pienaar, Mark Henning, Steve Melenchuk, Martin Wiebusch,
+and Stefan Knorr.

File: asymptote.info, Node: Index, Prev: Credits, Up: Top
@@ -8514,7 +8563,7 @@ Index
(line 6)
* '-': Arithmetic & logical.
(line 14)
-* '--': Tutorial. (line 123)
+* '--': Paths. (line 16)
* '--' <1>: Self & prefix operators.
(line 6)
* '---': Bezier curves. (line 84)
@@ -8524,8 +8573,9 @@ Index
* '-l': Options. (line 202)
* '-u': Options. (line 193)
* '-V': Configuring. (line 6)
-* '-V' <1>: Tutorial. (line 19)
-* '..': Tutorial. (line 123)
+* '-V' <1>: Drawing in batch mode.
+ (line 16)
+* '..': Paths. (line 16)
* '.asy': Search paths. (line 12)
* '/': Arithmetic & logical.
(line 18)
@@ -8534,7 +8584,7 @@ Index
* 2D graphs: graph. (line 6)
* 3D graphs: graph3. (line 6)
* 3D grids: grid3. (line 6)
-* 3D 'PostScript': three. (line 579)
+* 3D 'PostScript': three. (line 580)
* ':': Arithmetic & logical.
(line 56)
* '::': Bezier curves. (line 70)
@@ -8557,19 +8607,19 @@ Index
(line 50)
* '^=': Self & prefix operators.
(line 6)
-* '^^': Tutorial. (line 130)
+* '^^': Paths. (line 23)
* '|': Arithmetic & logical.
(line 48)
* '||': Arithmetic & logical.
(line 46)
* 'a4': Configuring. (line 59)
-* 'abort': Data types. (line 356)
+* 'abort': Data types. (line 358)
* 'abs': Data types. (line 65)
* 'abs' <1>: Mathematical functions.
(line 35)
* 'accel': Paths and guides. (line 126)
* 'accel' <1>: Paths and guides. (line 132)
-* 'accel' <2>: three. (line 483)
+* 'accel' <2>: three. (line 484)
* 'access': Import. (line 6)
* acknowledgments: Credits. (line 6)
* 'acos': Mathematical functions.
@@ -8581,9 +8631,9 @@ Index
* 'add': Frames and pictures.
(line 212)
* 'add' <1>: Frames and pictures.
- (line 226)
-* 'add' <2>: three. (line 255)
-* 'addViews': three. (line 376)
+ (line 228)
+* 'add' <2>: three. (line 256)
+* 'addViews': three. (line 377)
* 'adjust': Pens. (line 119)
* 'Ai': Mathematical functions.
(line 48)
@@ -8607,39 +8657,40 @@ Index
* 'animation': animation. (line 6)
* animation: animation. (line 6)
* 'annotate': annotate. (line 6)
-* 'antialias': three. (line 194)
+* 'antialias': three. (line 195)
* 'antialias' <1>: Options. (line 146)
* append: Files. (line 36)
* 'append': Arrays. (line 39)
* 'arc': Paths and guides. (line 24)
* 'Arc': Paths and guides. (line 37)
-* 'arc' <1>: three. (line 266)
+* 'arc' <1>: three. (line 267)
* 'ArcArrow': draw. (line 26)
-* 'ArcArrow3': three. (line 546)
+* 'ArcArrow3': three. (line 547)
* 'ArcArrows': draw. (line 26)
-* 'ArcArrows3': three. (line 546)
+* 'ArcArrows3': three. (line 547)
* 'arclength': Paths and guides. (line 153)
-* 'arclength' <1>: three. (line 483)
+* 'arclength' <1>: three. (line 484)
* 'arcpoint': Paths and guides. (line 163)
* 'arctime': Paths and guides. (line 157)
-* 'arctime' <1>: three. (line 483)
+* 'arctime' <1>: three. (line 484)
* arguments: Default arguments. (line 6)
* arithmetic operators: Arithmetic & logical.
(line 6)
* 'array': Arrays. (line 112)
-* array iteration: Programming. (line 34)
+* array iteration: Programming. (line 52)
* arrays: Arrays. (line 6)
* 'arrow': Drawing commands. (line 31)
* 'Arrow': draw. (line 26)
* 'arrow' <1>: label. (line 70)
-* arrow keys: Tutorial. (line 37)
-* 'Arrow3': three. (line 546)
+* arrow keys: Drawing in interactive mode.
+ (line 11)
+* 'Arrow3': three. (line 547)
* arrows: draw. (line 26)
* 'Arrows': draw. (line 26)
-* 'Arrows3': three. (line 546)
+* 'Arrows3': three. (line 547)
* 'as': Import. (line 67)
-* 'ascii': Data types. (line 301)
-* 'ascii' <1>: Data types. (line 301)
+* 'ascii': Data types. (line 303)
+* 'ascii' <1>: Data types. (line 303)
* 'asin': Mathematical functions.
(line 6)
* 'aSin': Mathematical functions.
@@ -8648,9 +8699,9 @@ Index
(line 6)
* 'Aspect': Frames and pictures.
(line 59)
-* 'assert': Data types. (line 361)
-* assignment: Programming. (line 8)
-* 'asy': Data types. (line 351)
+* 'assert': Data types. (line 363)
+* assignment: Programming. (line 26)
+* 'asy': Data types. (line 353)
* 'asy' <1>: Import. (line 101)
* 'asy-mode': Editing modes. (line 6)
* 'asy.vim': Editing modes. (line 32)
@@ -8668,58 +8719,59 @@ Index
(line 6)
* 'atleast': Bezier curves. (line 56)
* 'attach': Frames and pictures.
- (line 271)
+ (line 273)
* 'attach' <1>: LaTeX usage. (line 50)
-* 'attach' <2>: graph. (line 406)
-* 'autoadjust': three. (line 341)
+* 'attach' <2>: graph. (line 407)
+* 'autoadjust': three. (line 342)
* 'autoimport': Options. (line 113)
-* automatic scaling: graph. (line 690)
-* automatic scaling <1>: graph. (line 690)
+* automatic scaling: graph. (line 691)
+* automatic scaling <1>: graph. (line 691)
* 'axialshade': fill. (line 43)
-* 'axis': graph. (line 905)
-* 'axis' <1>: graph. (line 988)
+* 'axis': graph. (line 906)
+* 'axis' <1>: graph. (line 989)
* 'axis' <2>: graph3. (line 66)
* 'axis' <3>: graph3. (line 82)
* 'azimuth': Data types. (line 153)
* 'babel': babel. (line 6)
* background color: Frames and pictures.
(line 180)
-* 'BackView': three. (line 369)
+* 'BackView': three. (line 370)
* 'Bar': draw. (line 19)
-* 'Bar3': three. (line 546)
+* 'Bar3': three. (line 547)
* 'Bars': draw. (line 19)
-* 'Bars3': three. (line 546)
+* 'Bars3': three. (line 547)
* 'barsize': draw. (line 19)
* base modules: Base modules. (line 6)
* 'basealign': Pens. (line 177)
* 'baseline': label. (line 90)
-* batch mode: Tutorial. (line 5)
-* 'beep': Data types. (line 374)
+* batch mode: Drawing in batch mode.
+ (line 6)
+* 'beep': Data types. (line 376)
* 'BeginArcArrow': draw. (line 26)
-* 'BeginArcArrow3': three. (line 546)
+* 'BeginArcArrow3': three. (line 547)
* 'BeginArrow': draw. (line 26)
-* 'BeginArrow3': three. (line 546)
+* 'BeginArrow3': three. (line 547)
* 'BeginBar': draw. (line 19)
-* 'BeginBar3': three. (line 546)
+* 'BeginBar3': three. (line 547)
* 'BeginDotMargin': draw. (line 42)
-* 'BeginDotMargin3': three. (line 562)
+* 'BeginDotMargin3': three. (line 563)
* 'BeginMargin': draw. (line 42)
-* 'BeginMargin3': three. (line 562)
+* 'BeginMargin3': three. (line 563)
* 'BeginPenMargin': draw. (line 42)
-* 'BeginPenMargin2': three. (line 562)
-* 'BeginPenMargin3': three. (line 562)
+* 'BeginPenMargin2': three. (line 563)
+* 'BeginPenMargin3': three. (line 563)
* 'BeginPoint': label. (line 55)
* Bessel: Mathematical functions.
(line 48)
* 'bevel': flowchart. (line 72)
* 'beveljoin': Pens. (line 145)
* Bezier curves: Bezier curves. (line 6)
-* 'Bezier patch': three. (line 87)
-* 'Bezier triangle': three. (line 87)
-* 'bezulate': three. (line 105)
+* 'Bezier patch': three. (line 88)
+* 'Bezier triangle': three. (line 88)
+* 'bezulate': three. (line 106)
* 'Bi': Mathematical functions.
(line 48)
-* 'Billboard': three. (line 453)
+* 'Billboard': three. (line 454)
* 'binary': Files. (line 76)
* binary format: Files. (line 76)
* binary operators: Arithmetic & logical.
@@ -8727,7 +8779,7 @@ Index
* 'binarytree': binarytree. (line 6)
* 'Bi_deriv': Mathematical functions.
(line 48)
-* 'black stripes': three. (line 194)
+* 'black stripes': three. (line 195)
* 'Blank': draw. (line 26)
* 'block.bottom': flowchart. (line 19)
* 'block.bottomleft': flowchart. (line 19)
@@ -8746,7 +8798,7 @@ Index
(line 6)
* 'Bottom': graph. (line 132)
* 'BottomTop': graph. (line 138)
-* 'BottomView': three. (line 369)
+* 'BottomView': three. (line 370)
* bounding box: Frames and pictures.
(line 180)
* 'Bounds': graph3. (line 21)
@@ -8754,14 +8806,15 @@ Index
(line 25)
* 'box' <1>: Frames and pictures.
(line 130)
-* 'box' <2>: three. (line 288)
-* 'box' <3>: three. (line 290)
-* 'bp': Tutorial. (line 26)
+* 'box' <2>: three. (line 289)
+* 'box' <3>: three. (line 291)
+* 'bp': Drawing in batch mode.
+ (line 23)
* 'brace': Paths and guides. (line 51)
-* 'break': Programming. (line 30)
+* 'break': Programming. (line 48)
* 'breakpoints': Debugger. (line 21)
* brick: Pens. (line 265)
-* broken axis: graph. (line 801)
+* broken axis: graph. (line 802)
* bug reports: Help. (line 19)
* 'buildcycle': Paths and guides. (line 270)
* 'Button-1': GUI. (line 6)
@@ -8772,7 +8825,7 @@ Index
* 'CAD': CAD. (line 6)
* 'calculateTransform': Frames and pictures.
(line 118)
-* 'camera': three. (line 335)
+* 'camera': three. (line 336)
* casts: Casts. (line 6)
* 'cbrt': Mathematical functions.
(line 6)
@@ -8780,7 +8833,7 @@ Index
* 'ceil': Mathematical functions.
(line 26)
* 'Center': label. (line 60)
-* 'center': three. (line 318)
+* 'center': three. (line 319)
* checker: Pens. (line 265)
* Chinese: unicode. (line 12)
* 'choose': Mathematical functions.
@@ -8789,17 +8842,17 @@ Index
(line 48)
* 'circle': Paths and guides. (line 10)
* 'Circle': Paths and guides. (line 18)
-* 'circle' <1>: three. (line 262)
+* 'circle' <1>: three. (line 263)
* 'circle' <2>: flowchart. (line 61)
* 'circlebarframe': markers. (line 18)
* CJK: unicode. (line 12)
* 'clamped': graph. (line 36)
* 'clear': Files. (line 93)
* 'clear' <1>: Debugger. (line 23)
-* 'clip': fill. (line 114)
+* 'clip': clip. (line 6)
* 'CLZ': Arithmetic & logical.
(line 63)
-* 'cm': Tutorial. (line 63)
+* 'cm': Figure size. (line 18)
* 'cmd': Configuring. (line 32)
* 'cmyk': Pens. (line 34)
* 'colatitude': Data types. (line 158)
@@ -8814,12 +8867,12 @@ Index
* command-line options: Configuring. (line 84)
* command-line options <1>: Options. (line 6)
* comment character: Files. (line 16)
-* compass directions: Tutorial. (line 103)
+* compass directions: Labels. (line 18)
* Compiling from UNIX source: Compiling from UNIX source.
(line 6)
* 'complement': Arrays. (line 140)
* 'concat': Arrays. (line 167)
-* conditional: Programming. (line 8)
+* conditional: Programming. (line 26)
* conditional <1>: Arithmetic & logical.
(line 56)
* 'config': Configuring. (line 65)
@@ -8830,7 +8883,7 @@ Index
* 'conj': Data types. (line 62)
* constructors: Structures. (line 91)
* 'context': Options. (line 146)
-* 'continue': Programming. (line 30)
+* 'continue': Programming. (line 48)
* 'continue' <1>: Debugger. (line 31)
* 'contour': contour. (line 6)
* 'contour3': contour3. (line 6)
@@ -8851,11 +8904,11 @@ Index
* 'cosh': Mathematical functions.
(line 6)
* 'cputime': Structures. (line 169)
-* 'crop': graph. (line 639)
-* cropping graphs: graph. (line 639)
+* 'crop': graph. (line 640)
+* cropping graphs: graph. (line 640)
* 'cross': Data types. (line 106)
* 'cross' <1>: Data types. (line 196)
-* 'cross' <2>: graph. (line 480)
+* 'cross' <2>: graph. (line 481)
* 'crossframe': markers. (line 22)
* crosshatch: Pens. (line 282)
* 'csv': Arrays. (line 351)
@@ -8866,33 +8919,33 @@ Index
* 'curl' <1>: three. (line 6)
* 'curlSpecifier': Paths and guides. (line 408)
* 'currentpen': Pens. (line 6)
-* 'currentprojection': three. (line 366)
+* 'currentprojection': three. (line 367)
* 'curve': slopefield. (line 20)
* custom axis types: graph. (line 141)
-* custom mark routine: graph. (line 577)
+* custom mark routine: graph. (line 578)
* custom tick locations: graph. (line 233)
* 'cut': Paths and guides. (line 251)
-* 'cycle': Tutorial. (line 74)
-* 'cycle' <1>: Tutorial. (line 123)
+* 'cycle': Figure size. (line 29)
+* 'cycle' <1>: Paths. (line 16)
* 'cycle' <2>: three. (line 6)
* 'cyclic': Paths and guides. (line 85)
* 'cyclic' <1>: Paths and guides. (line 376)
* 'cyclic' <2>: Arrays. (line 39)
-* 'cyclic' <3>: three. (line 483)
+* 'cyclic' <3>: three. (line 484)
* Cyrillic: unicode. (line 7)
* 'dashdotted': Pens. (line 98)
* 'dashed': Pens. (line 98)
* data types: Data types. (line 6)
-* 'date': Data types. (line 313)
+* 'date': Data types. (line 315)
* Debian: UNIX binary distributions.
(line 19)
* debugger: Debugger. (line 6)
-* declaration: Programming. (line 8)
+* declaration: Programming. (line 26)
* 'deconstruct': GUI usage. (line 6)
* default arguments: Default arguments. (line 6)
* 'defaultformat': graph. (line 175)
* 'DefaultHead': draw. (line 26)
-* 'DefaultHead3': three. (line 546)
+* 'DefaultHead3': three. (line 547)
* 'defaultpen': Pens. (line 45)
* 'defaultpen' <1>: Pens. (line 118)
* 'defaultpen' <2>: Pens. (line 123)
@@ -8917,13 +8970,13 @@ Index
* 'dir' <1>: Data types. (line 90)
* 'dir' <2>: Data types. (line 180)
* 'dir' <3>: Paths and guides. (line 109)
-* 'dir' <4>: three. (line 483)
+* 'dir' <4>: three. (line 484)
* direction specifier: Bezier curves. (line 6)
* directory: Files. (line 25)
* 'dirSpecifier': Paths and guides. (line 390)
* 'dirtime': Paths and guides. (line 166)
* 'display': Configuring. (line 65)
-* 'do': Programming. (line 30)
+* 'do': Programming. (line 48)
* 'DOSendl': Files. (line 61)
* 'DOSnewl': Files. (line 61)
* 'dot': draw. (line 82)
@@ -8932,18 +8985,19 @@ Index
* 'dot' <3>: Arrays. (line 248)
* 'dot' <4>: Arrays. (line 251)
* 'DotMargin': draw. (line 42)
-* 'DotMargin3': three. (line 562)
+* 'DotMargin3': three. (line 563)
* 'DotMargins': draw. (line 42)
-* 'DotMargins3': three. (line 562)
+* 'DotMargins3': three. (line 563)
* 'dotted': Pens. (line 98)
-* 'double deferred drawing': three. (line 240)
+* 'double deferred drawing': three. (line 241)
* double precision: Files. (line 76)
* 'draw': Drawing commands. (line 31)
+* 'draw' <1>: draw. (line 6)
* 'Draw': draw. (line 26)
-* 'draw' <1>: draw. (line 109)
+* 'draw' <2>: draw. (line 109)
* 'Draw' <1>: Frames and pictures.
(line 160)
-* 'draw' <2>: three. (line 113)
+* 'draw' <3>: three. (line 114)
* drawing commands: Drawing commands. (line 6)
* 'drawline': math. (line 9)
* 'drawtree': drawtree. (line 6)
@@ -8952,7 +9006,7 @@ Index
* 'dvisvgm': Configuring. (line 65)
* 'dvisvgm' <1>: Options. (line 151)
* 'dvisvgmOptions': Options. (line 132)
-* 'E': Tutorial. (line 103)
+* 'E': Labels. (line 18)
* 'E' <1>: Mathematical functions.
(line 48)
* Editing modes: Editing modes. (line 6)
@@ -8963,26 +9017,26 @@ Index
(line 25)
* elliptic functions: Mathematical functions.
(line 48)
-* 'else': Programming. (line 8)
+* 'else': Programming. (line 26)
* 'emacs': Editing modes. (line 6)
* 'embed': embed. (line 6)
-* 'Embedded': three. (line 453)
+* 'Embedded': three. (line 454)
* 'empty': Frames and pictures.
(line 7)
* 'EndArcArrow': draw. (line 26)
-* 'EndArcArrow3': three. (line 546)
+* 'EndArcArrow3': three. (line 547)
* 'EndArrow': draw. (line 26)
-* 'EndArrow3': three. (line 546)
+* 'EndArrow3': three. (line 547)
* 'EndBar': draw. (line 19)
-* 'EndBar3': three. (line 546)
+* 'EndBar3': three. (line 547)
* 'EndDotMargin': draw. (line 42)
-* 'EndDotMargin3': three. (line 562)
+* 'EndDotMargin3': three. (line 563)
* 'endl': Files. (line 61)
* 'EndMargin': draw. (line 42)
-* 'EndMargin3': three. (line 562)
+* 'EndMargin3': three. (line 563)
* 'EndPenMargin': draw. (line 42)
-* 'EndPenMargin2': three. (line 562)
-* 'EndPenMargin3': three. (line 562)
+* 'EndPenMargin2': three. (line 563)
+* 'EndPenMargin3': three. (line 563)
* 'EndPoint': label. (line 55)
* 'envelope': Frames and pictures.
(line 25)
@@ -8993,25 +9047,26 @@ Index
* 'eol' <1>: Arrays. (line 333)
* EPS: label. (line 78)
* 'EPS': Options. (line 146)
-* erase: Tutorial. (line 37)
+* erase: Drawing in interactive mode.
+ (line 11)
* 'erase': Data types. (line 256)
* 'erase' <1>: Frames and pictures.
(line 7)
* 'erase' <2>: Frames and pictures.
- (line 279)
+ (line 281)
* 'erf': Mathematical functions.
(line 6)
* 'erfc': Mathematical functions.
(line 6)
* 'error': Files. (line 16)
* 'error' <1>: Files. (line 93)
-* error bars: graph. (line 531)
-* 'errorbars': graph. (line 480)
+* error bars: graph. (line 532)
+* 'errorbars': graph. (line 481)
* 'eval': Import. (line 97)
* 'eval' <1>: Import. (line 107)
-* evenodd: Tutorial. (line 144)
+* evenodd: Paths. (line 37)
* 'evenodd': Pens. (line 160)
-* 'exit': Data types. (line 365)
+* 'exit': Data types. (line 367)
* 'exit' <1>: Interactive mode. (line 54)
* 'exit' <2>: Debugger. (line 56)
* 'exp': Mathematical functions.
@@ -9028,12 +9083,12 @@ Index
* 'extension': Paths and guides. (line 246)
* 'extension' <1>: MetaPost. (line 10)
* 'external': embed. (line 11)
-* 'extrude': three. (line 477)
+* 'extrude': three. (line 478)
* 'F': Mathematical functions.
(line 48)
* 'fabs': Mathematical functions.
(line 6)
-* 'face': three. (line 587)
+* 'face': three. (line 588)
* 'factorial': Mathematical functions.
(line 39)
* Fedora: UNIX binary distributions.
@@ -9047,7 +9102,8 @@ Index
* 'file' <1>: Debugger. (line 44)
* 'Fill': draw. (line 26)
* 'fill': draw. (line 114)
-* 'fill' <1>: fill. (line 17)
+* 'fill' <1>: fill. (line 6)
+* 'fill' <2>: fill. (line 17)
* 'Fill' <1>: Frames and pictures.
(line 146)
* 'FillDraw': draw. (line 26)
@@ -9061,7 +9117,7 @@ Index
* 'firstcut': Paths and guides. (line 262)
* 'fit': Frames and pictures.
(line 113)
-* 'fit3': three. (line 253)
+* 'fit3': three. (line 254)
* 'fixedscaling': Frames and pictures.
(line 81)
* 'floor': Mathematical functions.
@@ -9075,15 +9131,15 @@ Index
* 'font command': Pens. (line 202)
* 'fontcommand': Pens. (line 217)
* 'fontsize': Pens. (line 188)
-* 'for': Programming. (line 8)
+* 'for': Programming. (line 26)
* 'format': Data types. (line 284)
* 'format' <1>: Options. (line 146)
* forum: Help. (line 6)
* 'frame': Frames and pictures.
(line 7)
* 'from': Import. (line 16)
-* 'FrontView': three. (line 369)
-* function declarations: Functions. (line 72)
+* 'FrontView': three. (line 370)
+* function declarations: Functions. (line 79)
* Function shading: fill. (line 99)
* function shading: fill. (line 99)
* functions: Functions. (line 6)
@@ -9101,7 +9157,7 @@ Index
* 'getstring': Files. (line 118)
* 'gettriple': Files. (line 118)
* git: Git. (line 6)
-* 'glOptions': three. (line 194)
+* 'glOptions': three. (line 195)
* 'glOptions' <1>: Options. (line 132)
* GNU Scientific Library: Mathematical functions.
(line 48)
@@ -9116,7 +9172,7 @@ Index
* grayscale: Pens. (line 25)
* 'Grayscale': palette. (line 9)
* grid: Pens. (line 265)
-* grid <1>: graph. (line 746)
+* grid <1>: graph. (line 747)
* 'grid3': grid3. (line 6)
* 'gs': Configuring. (line 6)
* 'GSL': Compiling from UNIX source.
@@ -9136,31 +9192,31 @@ Index
* 'help' <1>: Debugger. (line 30)
* 'Hermite': graph. (line 36)
* 'Hermite(splinetype splinetype': graph. (line 36)
-* 'hex': Data types. (line 298)
+* 'hex': Data types. (line 300)
* 'hex' <1>: Pens. (line 60)
-* 'hexidecimal': Data types. (line 298)
+* 'hexidecimal': Data types. (line 300)
* 'hexidecimal' <1>: Pens. (line 58)
-* hidden surface removal: three. (line 587)
+* hidden surface removal: three. (line 588)
* 'histogram': Mathematical functions.
(line 39)
* 'history': Files. (line 143)
* 'history' <1>: Interactive mode. (line 54)
* 'historylines': Interactive mode. (line 57)
* 'HookHead': draw. (line 26)
-* 'HookHead3': three. (line 546)
+* 'HookHead3': three. (line 547)
* 'Horizontal': flowchart. (line 77)
* 'hyperrefOptions': Options. (line 132)
* 'hypot': Mathematical functions.
(line 6)
* 'I': Mathematical functions.
(line 48)
-* 'iconic': three. (line 194)
+* 'iconic': three. (line 195)
* 'identity': Transforms. (line 24)
* 'identity' <1>: Mathematical functions.
(line 6)
* 'identity' <2>: Arrays. (line 290)
-* 'identity4': three. (line 421)
-* 'if': Programming. (line 8)
+* 'identity4': three. (line 422)
+* 'if': Programming. (line 26)
* 'IgnoreAspect': Frames and pictures.
(line 63)
* 'image': palette. (line 33)
@@ -9174,7 +9230,7 @@ Index
* implicit scaling: Implicit scaling. (line 6)
* 'implicitsurface': smoothcontour3. (line 16)
* 'import': Import. (line 45)
-* 'inches': Tutorial. (line 63)
+* 'inches': Figure size. (line 18)
* 'incircle': Data types. (line 120)
* 'include': Import. (line 126)
* including images: label. (line 78)
@@ -9195,13 +9251,15 @@ Index
* 'inside': Paths and guides. (line 294)
* 'inside' <1>: Paths and guides. (line 299)
* 'inside' <2>: Paths and guides. (line 305)
-* 'insphere': three. (line 509)
+* 'insphere': three. (line 510)
* 'inst': Debugger. (line 35)
* installation: Installation. (line 6)
* 'int': Data types. (line 30)
* integer division: Arithmetic & logical.
(line 6)
-* interactive mode: Interactive mode. (line 6)
+* interactive mode: Drawing in interactive mode.
+ (line 6)
+* interactive mode <1>: Interactive mode. (line 6)
* 'interior': Paths and guides. (line 290)
* international characters: unicode. (line 6)
* 'interp': Arithmetic & logical.
@@ -9209,23 +9267,23 @@ Index
* 'interpolate': interpolate. (line 6)
* 'intersect': Paths and guides. (line 195)
* 'intersect' <1>: math. (line 13)
-* 'intersect' <2>: three. (line 483)
+* 'intersect' <2>: three. (line 484)
* 'intersectionpoint': Paths and guides. (line 238)
* 'intersectionpoint' <1>: math. (line 17)
-* 'intersectionpoint' <2>: three. (line 483)
+* 'intersectionpoint' <2>: three. (line 484)
* 'intersectionpoints': Paths and guides. (line 242)
-* 'intersectionpoints' <1>: three. (line 483)
-* 'intersectionpoints' <2>: three. (line 496)
+* 'intersectionpoints' <1>: three. (line 484)
+* 'intersectionpoints' <2>: three. (line 497)
* 'intersections': Paths and guides. (line 206)
* 'intersections' <1>: Paths and guides. (line 213)
-* 'intersections' <2>: three. (line 483)
-* 'intersections' <3>: three. (line 489)
+* 'intersections' <2>: three. (line 484)
+* 'intersections' <3>: three. (line 490)
* 'InTicks': graph3. (line 35)
* 'intMax': Data types. (line 30)
* 'intMin': Data types. (line 30)
* 'inverse': Transforms. (line 16)
* 'inverse' <1>: Arrays. (line 296)
-* 'invert': three. (line 411)
+* 'invert': three. (line 412)
* 'invisible': Pens. (line 39)
* 'isnan': Data types. (line 35)
* 'i_scaled': Mathematical functions.
@@ -9244,7 +9302,7 @@ Index
* 'keepAspect' <1>: Frames and pictures.
(line 63)
* 'keepAspect' <2>: LaTeX usage. (line 50)
-* keyboard bindings:: three. (line 172)
+* keyboard bindings:: three. (line 173)
* 'keys': Arrays. (line 39)
* 'keyword': Named arguments. (line 37)
* keyword-only: Named arguments. (line 37)
@@ -9252,11 +9310,12 @@ Index
* Korean: unicode. (line 12)
* 'k_scaled': Mathematical functions.
(line 48)
+* 'label': Labels. (line 6)
* 'Label': draw. (line 97)
-* 'label': clip. (line 15)
+* 'label' <1>: label. (line 6)
* 'Label' <1>: label. (line 14)
* Label: graph. (line 330)
-* 'label' <1>: three. (line 447)
+* 'label' <2>: three. (line 448)
* 'labelpath': labelpath. (line 6)
* 'labelpath3': labelpath3. (line 6)
* labelx: graph. (line 330)
@@ -9274,16 +9333,16 @@ Index
* 'latticeshade': fill. (line 32)
* 'layer': Drawing commands. (line 16)
* 'leastsquares': stats. (line 6)
-* 'leastsquares' <1>: graph. (line 929)
+* 'leastsquares' <1>: graph. (line 930)
* 'Left': graph. (line 269)
* 'LeftRight': graph. (line 275)
* 'LeftSide': label. (line 60)
* 'LeftTicks': graph. (line 160)
* 'LeftTicks' <1>: graph. (line 233)
-* 'LeftView': three. (line 369)
+* 'LeftView': three. (line 370)
* legend: Drawing commands. (line 31)
* 'legend': draw. (line 64)
-* 'legend' <1>: graph. (line 424)
+* 'legend' <1>: graph. (line 425)
* Legendre: Mathematical functions.
(line 48)
* 'length': Data types. (line 65)
@@ -9292,7 +9351,7 @@ Index
* 'length' <3>: Paths and guides. (line 76)
* 'length' <4>: Paths and guides. (line 373)
* 'length' <5>: Arrays. (line 39)
-* 'length' <6>: three. (line 483)
+* 'length' <6>: three. (line 484)
* 'letter': Configuring. (line 59)
* 'lexorder': math. (line 67)
* 'lexorder' <1>: math. (line 70)
@@ -9300,35 +9359,35 @@ Index
* 'libgs' <1>: Options. (line 151)
* 'libm' routines: Mathematical functions.
(line 6)
-* 'libsigsegv': Functions. (line 93)
+* 'libsigsegv': Functions. (line 100)
* 'libsigsegv' <1>: Help. (line 28)
-* 'limits': graph. (line 639)
+* 'limits': graph. (line 640)
* 'line': Arrays. (line 333)
* 'line' <1>: Arrays. (line 337)
* line mode: Arrays. (line 333)
-* 'Linear': graph. (line 690)
+* 'Linear': graph. (line 691)
* 'linecap': Pens. (line 135)
* 'linejoin': Pens. (line 145)
* 'lineskip': Pens. (line 188)
* 'linetype': Pens. (line 119)
* 'linewidth': Pens. (line 123)
-* 'locale': Data types. (line 308)
+* 'locale': Data types. (line 310)
* 'log': Mathematical functions.
(line 6)
-* 'Log': graph. (line 690)
-* log-log graph: graph. (line 724)
+* 'Log': graph. (line 691)
+* log-log graph: graph. (line 725)
* 'log10': Mathematical functions.
(line 6)
* 'log1p': Mathematical functions.
(line 6)
-* 'log2' graph: graph. (line 780)
-* logarithmic graph: graph. (line 724)
+* 'log2' graph: graph. (line 781)
+* logarithmic graph: graph. (line 725)
* logical operators: Arithmetic & logical.
(line 6)
* 'longdashdotted': Pens. (line 98)
* 'longdashed': Pens. (line 98)
* 'longitude': Data types. (line 168)
-* loop: Programming. (line 8)
+* loop: Programming. (line 26)
* 'lualatex': Options. (line 146)
* 'luatex': Options. (line 146)
* 'MacOS X' binary distributions: MacOS X binary distributions.
@@ -9337,17 +9396,17 @@ Index
* 'map': Arrays. (line 131)
* 'Margin': draw. (line 42)
* 'Margin' <1>: draw. (line 42)
-* 'Margin3': three. (line 562)
-* 'Margin3' <1>: three. (line 562)
+* 'Margin3': three. (line 563)
+* 'Margin3' <1>: three. (line 563)
* 'Margins': draw. (line 42)
-* margins: three. (line 246)
-* 'Margins3': three. (line 562)
-* 'mark': graph. (line 480)
+* margins: three. (line 247)
+* 'Margins3': three. (line 563)
+* 'mark': graph. (line 481)
* 'markangle': markers. (line 35)
-* 'marker': graph. (line 480)
+* 'marker': graph. (line 481)
* 'markers': markers. (line 6)
-* 'marknodes': graph. (line 480)
-* 'markuniform': graph. (line 480)
+* 'marknodes': graph. (line 481)
+* 'markuniform': graph. (line 481)
* 'mask': Data types. (line 35)
* 'math': math. (line 6)
* mathematical functions: Mathematical functions.
@@ -9357,12 +9416,12 @@ Index
(line 7)
* 'max' <2>: Arrays. (line 215)
* 'max' <3>: Arrays. (line 225)
-* 'max' <4>: three. (line 483)
+* 'max' <4>: three. (line 484)
* 'maxbound': Data types. (line 134)
* 'maxbound' <1>: Data types. (line 204)
-* 'maxtile': three. (line 194)
+* 'maxtile': three. (line 195)
* 'maxtimes': Paths and guides. (line 233)
-* 'maxviewport': three. (line 194)
+* 'maxviewport': three. (line 195)
* 'MetaPost': MetaPost. (line 6)
* 'MetaPost ... ': Bezier curves. (line 70)
* 'MetaPost cutafter': Paths and guides. (line 267)
@@ -9371,9 +9430,9 @@ Index
* 'MetaPost whatever': MetaPost. (line 10)
* Microsoft Windows: Microsoft Windows. (line 6)
* 'MidArcArrow': draw. (line 26)
-* 'MidArcArrow3': three. (line 546)
+* 'MidArcArrow3': three. (line 547)
* 'MidArrow': draw. (line 26)
-* 'MidArrow3': three. (line 546)
+* 'MidArrow3': three. (line 547)
* 'MidPoint': label. (line 55)
* 'midpoint': Paths and guides. (line 180)
* 'min': Paths and guides. (line 275)
@@ -9381,7 +9440,7 @@ Index
(line 7)
* 'min' <2>: Arrays. (line 210)
* 'min' <3>: Arrays. (line 220)
-* 'min' <4>: three. (line 483)
+* 'min' <4>: three. (line 484)
* 'minbound': Data types. (line 131)
* 'minbound' <1>: Data types. (line 201)
* 'minipage': label. (line 116)
@@ -9389,16 +9448,16 @@ Index
* 'miterjoin': Pens. (line 145)
* 'miterlimit': Pens. (line 155)
* 'mktemp': Files. (line 44)
-* 'mm': Tutorial. (line 63)
+* 'mm': Figure size. (line 18)
* 'mode': Files. (line 76)
* 'mode' <1>: Files. (line 89)
* 'monotonic': graph. (line 36)
* mouse: GUI. (line 6)
-* mouse bindings: three. (line 150)
+* mouse bindings: three. (line 151)
* 'Move': Pens. (line 355)
* 'MoveQuiet': Pens. (line 361)
-* 'multisample': three. (line 141)
-* 'N': Tutorial. (line 103)
+* 'multisample': three. (line 142)
+* 'N': Labels. (line 18)
* 'name': Files. (line 89)
* named arguments: Named arguments. (line 6)
* 'nan': Data types. (line 35)
@@ -9420,11 +9479,11 @@ Index
* 'NoFill' <1>: Frames and pictures.
(line 154)
* 'NoMargin': draw. (line 42)
-* 'NoMargin3': three. (line 562)
+* 'NoMargin3': three. (line 563)
* 'None': draw. (line 19)
* 'None' <1>: draw. (line 26)
* 'none': Files. (line 61)
-* 'normal': three. (line 469)
+* 'normal': three. (line 470)
* 'nosafe': Options. (line 170)
* 'NOT': Arithmetic & logical.
(line 63)
@@ -9437,13 +9496,13 @@ Index
(line 140)
* 'nullpen' <2>: Frames and pictures.
(line 149)
-* 'NURBS': three. (line 345)
-* 'O': three. (line 258)
+* 'NURBS': three. (line 346)
+* 'O': three. (line 259)
* 'obj': obj. (line 6)
-* 'oblique': three. (line 301)
-* 'obliqueX': three. (line 308)
-* 'obliqueY': three. (line 314)
-* 'obliqueZ': three. (line 301)
+* 'oblique': three. (line 302)
+* 'obliqueX': three. (line 309)
+* 'obliqueY': three. (line 315)
+* 'obliqueZ': three. (line 302)
* 'ode': ode. (line 6)
* 'offset': Pens. (line 119)
* offset: Options. (line 175)
@@ -9452,7 +9511,7 @@ Index
* 'OmitTickIntervals': graph. (line 223)
* 'opacity': Pens. (line 233)
* open: Files. (line 12)
-* 'OpenGL': three. (line 141)
+* 'OpenGL': three. (line 142)
* 'operator': User-defined operators.
(line 6)
* 'operator --': graph. (line 30)
@@ -9468,23 +9527,23 @@ Index
* 'OR': Arithmetic & logical.
(line 63)
* 'orient': Data types. (line 108)
-* 'orient' <1>: three. (line 500)
+* 'orient' <1>: three. (line 501)
* 'orientation': Frames and pictures.
(line 104)
-* 'orthographic': three. (line 318)
-* 'outformat': three. (line 141)
+* 'orthographic': three. (line 319)
+* 'outformat': three. (line 142)
* 'outprefix': Frames and pictures.
(line 91)
* 'output': Files. (line 36)
* 'output' <1>: Options. (line 146)
* 'OutTicks': graph3. (line 35)
-* overloading functions: Functions. (line 48)
+* overloading functions: Functions. (line 55)
* 'overwrite': Pens. (line 340)
* 'P': Mathematical functions.
(line 48)
* 'pack': label. (line 100)
* packing: Rest arguments. (line 30)
-* 'pair': Tutorial. (line 51)
+* 'pair': Figure size. (line 6)
* 'pair' <1>: Data types. (line 46)
* 'pairs': Arrays. (line 230)
* 'paperheight': Configuring. (line 59)
@@ -9492,17 +9551,18 @@ Index
* 'paperwidth': Configuring. (line 59)
* 'parallelogram': flowchart. (line 47)
* parametric surface: graph3. (line 99)
-* parametrized curve: graph. (line 639)
+* parametrized curve: graph. (line 640)
* 'partialsum': math. (line 53)
* 'partialsum' <1>: math. (line 56)
* patch-dependent colors: three. (line 79)
-* 'path': Paths and guides. (line 7)
-* 'path' <1>: three. (line 42)
-* 'path' <2>: flowchart. (line 77)
-* path markers: graph. (line 480)
+* 'path': Paths. (line 6)
+* 'path' <1>: Paths and guides. (line 7)
+* 'path' <2>: three. (line 42)
+* 'path' <3>: flowchart. (line 77)
+* path markers: graph. (line 481)
* 'path3': three. (line 6)
* 'path3' <1>: three. (line 42)
-* 'path[]': Tutorial. (line 130)
+* 'path[]': Paths. (line 23)
* patterns: Pens. (line 251)
* 'patterns': patterns. (line 6)
* 'PDF': Options. (line 146)
@@ -9512,50 +9572,50 @@ Index
* 'pdfviewerOptions': Options. (line 132)
* 'pen': Pens. (line 6)
* 'PenMargin': draw. (line 42)
-* 'PenMargin2': three. (line 562)
-* 'PenMargin3': three. (line 562)
+* 'PenMargin2': three. (line 563)
+* 'PenMargin3': three. (line 563)
* 'PenMargins': draw. (line 42)
-* 'PenMargins2': three. (line 562)
-* 'PenMargins3': three. (line 562)
+* 'PenMargins2': three. (line 563)
+* 'PenMargins3': three. (line 563)
* 'periodic': graph. (line 36)
* 'perl': LaTeX usage. (line 30)
* 'perpendicular': geometry. (line 6)
-* 'perspective': three. (line 345)
+* 'perspective': three. (line 346)
* 'picture': Frames and pictures.
(line 39)
* picture alignment: Frames and pictures.
- (line 226)
+ (line 228)
* 'piecewisestraight': Paths and guides. (line 92)
-* 'pixel': three. (line 569)
+* 'pixel': three. (line 570)
* 'Pl': Mathematical functions.
(line 48)
* 'plain': plain. (line 6)
-* 'planar': three. (line 87)
-* 'plane': three. (line 284)
-* 'planeproject': three. (line 466)
+* 'planar': three. (line 88)
+* 'plane': three. (line 285)
+* 'planeproject': three. (line 467)
* 'point': Paths and guides. (line 95)
* 'point' <1>: Paths and guides. (line 379)
-* 'point' <2>: three. (line 483)
+* 'point' <2>: three. (line 484)
* 'polar': Data types. (line 148)
* 'polargraph': graph. (line 88)
-* 'polygon': graph. (line 480)
+* 'polygon': graph. (line 481)
* 'pop': Arrays. (line 39)
* 'Portrait': Frames and pictures.
(line 104)
* 'postcontrol': Paths and guides. (line 146)
-* 'postcontrol' <1>: three. (line 483)
+* 'postcontrol' <1>: three. (line 484)
* postfix operators: Self & prefix operators.
(line 19)
* 'postscript': Frames and pictures.
- (line 292)
+ (line 294)
* 'PostScript fonts': Pens. (line 220)
-* 'PostScript' subpath: Tutorial. (line 130)
+* 'PostScript' subpath: Paths. (line 23)
* 'pow10': Mathematical functions.
(line 6)
-* 'prc': three. (line 215)
+* 'prc': three. (line 216)
* 'precision': Files. (line 93)
* 'precontrol': Paths and guides. (line 139)
-* 'precontrol' <1>: three. (line 483)
+* 'precontrol' <1>: three. (line 484)
* prefix operators: Self & prefix operators.
(line 6)
* 'private': Structures. (line 6)
@@ -9565,15 +9625,16 @@ Index
* 'psview': Microsoft Windows. (line 16)
* 'psviewer': Configuring. (line 6)
* 'psviewerOptions': Options. (line 132)
-* 'pt': Tutorial. (line 63)
+* 'pt': Figure size. (line 18)
* 'public': Structures. (line 6)
* 'push': Arrays. (line 39)
* 'Python' usage: Interactive mode. (line 72)
* 'quadraticroots': Arrays. (line 299)
* 'quadraticroots' <1>: Arrays. (line 304)
* 'quarticroots': math. (line 22)
-* quick reference: Description. (line 77)
-* quit: Tutorial. (line 37)
+* quick reference: Description. (line 81)
+* quit: Drawing in interactive mode.
+ (line 11)
* 'quit': Interactive mode. (line 54)
* 'quit' <1>: Debugger. (line 53)
* 'quote': Import. (line 115)
@@ -9587,7 +9648,7 @@ Index
* 'radians': Mathematical functions.
(line 17)
* 'radius': Paths and guides. (line 135)
-* 'radius' <1>: three. (line 483)
+* 'radius' <1>: three. (line 484)
* 'Rainbow': palette. (line 12)
* 'rand': Mathematical functions.
(line 39)
@@ -9604,8 +9665,8 @@ Index
* 'realMin': Data types. (line 35)
* 'realmult': Data types. (line 100)
* 'rectangle': flowchart. (line 34)
-* recursion: Functions. (line 93)
-* reference: Description. (line 77)
+* recursion: Functions. (line 100)
+* reference: Description. (line 81)
* 'reflect': Transforms. (line 42)
* 'Relative': label. (line 50)
* 'Relative' <1>: label. (line 60)
@@ -9615,20 +9676,20 @@ Index
(line 6)
* 'rename': Files. (line 152)
* 'render': three. (line 46)
-* 'render' <1>: three. (line 141)
+* 'render' <1>: three. (line 142)
* 'render' <2>: Options. (line 146)
* 'replace': Data types. (line 269)
* 'resetdefaultpen': Pens. (line 367)
* rest arguments: Rest arguments. (line 6)
* 'restore': Frames and pictures.
- (line 286)
+ (line 288)
* 'restricted': Structures. (line 6)
* 'return': Debugger. (line 47)
* 'reverse': Data types. (line 265)
* 'reverse' <1>: Paths and guides. (line 183)
* 'reverse' <2>: Paths and guides. (line 382)
* 'reverse' <3>: Arrays. (line 136)
-* 'reverse' <4>: three. (line 483)
+* 'reverse' <4>: three. (line 484)
* rewind: Files. (line 93)
* 'rfind': Data types. (line 246)
* 'rgb': Pens. (line 30)
@@ -9639,9 +9700,9 @@ Index
* 'RightSide': label. (line 60)
* 'RightTicks': graph. (line 160)
* 'RightTicks' <1>: graph. (line 233)
-* 'RightView': three. (line 369)
+* 'RightView': three. (line 370)
* 'Rotate': label. (line 36)
-* 'rotate': three. (line 437)
+* 'rotate': three. (line 438)
* 'Rotate(pair z)': label. (line 39)
* 'round': Mathematical functions.
(line 26)
@@ -9653,31 +9714,31 @@ Index
(line 6)
* runtime imports: Import. (line 97)
* Russian: unicode. (line 7)
-* 'S': Tutorial. (line 103)
+* 'S': Labels. (line 18)
* 'safe': Options. (line 170)
* 'save': Frames and pictures.
- (line 283)
+ (line 285)
* 'saveline': Files. (line 135)
* 'Scale': label. (line 45)
* 'scale': Pens. (line 119)
* 'scale' <1>: Transforms. (line 34)
* 'scale' <2>: Transforms. (line 36)
-* 'scale' <3>: graph. (line 690)
-* 'Scale' <1>: graph. (line 707)
-* 'scale' <4>: three. (line 436)
-* 'scale3': three. (line 434)
-* scaled graph: graph. (line 670)
-* scientific graph: graph. (line 387)
+* 'scale' <3>: graph. (line 691)
+* 'Scale' <1>: graph. (line 708)
+* 'scale' <4>: three. (line 437)
+* 'scale3': three. (line 435)
+* scaled graph: graph. (line 671)
+* scientific graph: graph. (line 388)
* 'scroll': Files. (line 109)
* 'search': Arrays. (line 154)
* 'search' <1>: Arrays. (line 160)
* search paths: Search paths. (line 6)
* 'Seascape': Frames and pictures.
(line 110)
-* secondary axis: graph. (line 833)
-* 'secondaryX': graph. (line 833)
-* 'secondaryY': graph. (line 833)
-* 'seconds': Data types. (line 322)
+* secondary axis: graph. (line 834)
+* 'secondaryX': graph. (line 834)
+* 'secondaryY': graph. (line 834)
+* 'seconds': Data types. (line 324)
* 'seek': Files. (line 93)
* 'seekeof': Files. (line 93)
* 'segment': math. (line 50)
@@ -9694,11 +9755,11 @@ Index
* 'shift': Transforms. (line 26)
* 'shift' <1>: Transforms. (line 28)
* 'shift' <2>: Transforms. (line 44)
-* 'shift' <3>: three. (line 426)
+* 'shift' <3>: three. (line 427)
* 'shiftless': Transforms. (line 44)
* 'shipout': Frames and pictures.
(line 91)
-* 'showtarget': three. (line 318)
+* 'showtarget': three. (line 319)
* 'Si': Mathematical functions.
(line 48)
* 'signedint': Files. (line 76)
@@ -9718,21 +9779,22 @@ Index
* 'singlereal' <1>: Files. (line 89)
* 'sinh': Mathematical functions.
(line 6)
-* 'SixViews': three. (line 384)
-* 'SixViewsFR': three. (line 384)
-* 'SixViewsUS': three. (line 384)
-* 'size': Paths and guides. (line 81)
-* 'size' <1>: Paths and guides. (line 370)
-* 'size' <2>: Frames and pictures.
- (line 48)
+* 'SixViews': three. (line 385)
+* 'SixViewsFR': three. (line 385)
+* 'SixViewsUS': three. (line 385)
+* 'size': Figure size. (line 6)
+* 'size' <1>: Paths and guides. (line 81)
+* 'size' <2>: Paths and guides. (line 370)
* 'size' <3>: Frames and pictures.
+ (line 48)
+* 'size' <4>: Frames and pictures.
(line 74)
-* 'size' <4>: three. (line 483)
-* 'size' <5>: Options. (line 146)
-* 'size3': three. (line 243)
+* 'size' <5>: three. (line 484)
+* 'size' <6>: Options. (line 146)
+* 'size3': three. (line 244)
* 'Slant': label. (line 42)
* 'slant': Transforms. (line 38)
-* 'sleep': Data types. (line 368)
+* 'sleep': Data types. (line 370)
* 'slice': Paths and guides. (line 251)
* 'slice' <1>: Paths and guides. (line 262)
* slices: Slices. (line 6)
@@ -9758,8 +9820,8 @@ Index
* 'squarecap': Pens. (line 135)
* 'srand': Mathematical functions.
(line 39)
-* stack overflow: Functions. (line 93)
-* stack overflow <1>: Functions. (line 93)
+* stack overflow: Functions. (line 100)
+* stack overflow <1>: Functions. (line 100)
* stack overflow <2>: Help. (line 28)
* 'static': Static. (line 6)
* 'stats': stats. (line 6)
@@ -9770,74 +9832,75 @@ Index
* 'stop': Debugger. (line 10)
* 'straight': Paths and guides. (line 88)
* 'Straight': graph. (line 30)
-* 'straight' <1>: three. (line 483)
-* 'strftime': Data types. (line 313)
-* 'strftime' <1>: Data types. (line 338)
+* 'straight' <1>: three. (line 484)
+* 'strftime': Data types. (line 315)
+* 'strftime' <1>: Data types. (line 340)
* 'string': Data types. (line 207)
-* 'string' <1>: Data types. (line 304)
+* 'string' <1>: Data types. (line 306)
* 'stroke': fill. (line 36)
-* 'stroke' <1>: fill. (line 113)
+* 'stroke' <1>: clip. (line 6)
* 'strokepath': Paths and guides. (line 309)
-* 'strptime': Data types. (line 322)
+* 'strptime': Data types. (line 324)
* 'struct': Structures. (line 6)
* structures: Structures. (line 6)
* 'subpath': Paths and guides. (line 186)
-* 'subpath' <1>: three. (line 483)
+* 'subpath' <1>: three. (line 484)
* subpictures: Frames and pictures.
(line 113)
* 'substr': Data types. (line 261)
* 'sum': Arrays. (line 205)
-* superpath: Tutorial. (line 130)
+* superpath: Paths. (line 23)
* 'Suppress': Pens. (line 347)
* 'SuppressQuiet': Pens. (line 351)
* 'surface': three. (line 46)
-* 'surface' <1>: three. (line 87)
-* 'surface' <2>: three. (line 101)
+* 'surface' <1>: three. (line 88)
+* 'surface' <2>: three. (line 102)
* 'surface' <3>: graph3. (line 99)
* 'SVG': Options. (line 151)
-* 'system': Data types. (line 346)
+* 'system': Data types. (line 348)
* 'system' <1>: Options. (line 170)
* 'syzygy': syzygy. (line 6)
* 'tab': Files. (line 61)
-* tab completion: Tutorial. (line 37)
+* tab completion: Drawing in interactive mode.
+ (line 11)
* 'tan': Mathematical functions.
(line 6)
* 'Tan': Mathematical functions.
(line 20)
* 'tanh': Mathematical functions.
(line 6)
-* 'target': three. (line 318)
+* 'target': three. (line 319)
* 'tell': Files. (line 93)
* 'tension': Bezier curves. (line 56)
* 'tension' <1>: three. (line 6)
* 'tensionSpecifier': Paths and guides. (line 402)
* tensor product shading: fill. (line 77)
* 'tensorshade': fill. (line 77)
-* 'tessellation': three. (line 113)
+* 'tessellation': three. (line 114)
* 'tex': Frames and pictures.
- (line 300)
+ (line 302)
* 'tex' <1>: Options. (line 146)
* 'TeX fonts': Pens. (line 211)
* TeX string: Data types. (line 207)
* 'texcommand': Configuring. (line 65)
* 'TeXHead': draw. (line 26)
-* 'TeXHead3': three. (line 546)
+* 'TeXHead3': three. (line 547)
* 'texpath': Configuring. (line 65)
* 'texpath' <1>: label. (line 113)
* 'texpreamble': Frames and pictures.
- (line 309)
+ (line 311)
* 'texreset': Frames and pictures.
- (line 313)
+ (line 315)
* textbook graph: graph. (line 360)
* 'tgz': UNIX binary distributions.
(line 6)
-* 'thick': three. (line 124)
-* 'thin': three. (line 124)
+* 'thick': three. (line 125)
+* 'thin': three. (line 125)
* 'this': Structures. (line 6)
* 'three': three. (line 6)
-* 'ThreeViews': three. (line 384)
-* 'ThreeViewsFR': three. (line 384)
-* 'ThreeViewsUS': three. (line 384)
+* 'ThreeViews': three. (line 385)
+* 'ThreeViewsFR': three. (line 385)
+* 'ThreeViewsUS': three. (line 385)
* tick: graph. (line 330)
* 'ticks': graph. (line 160)
* 'Ticks': graph. (line 160)
@@ -9845,39 +9908,39 @@ Index
* 'tildeframe': markers. (line 24)
* tile: Pens. (line 265)
* tilings: Pens. (line 251)
-* 'time': Data types. (line 313)
-* 'time' <1>: Data types. (line 338)
+* 'time': Data types. (line 315)
+* 'time' <1>: Data types. (line 340)
* 'time' <2>: math. (line 30)
* 'time' <3>: math. (line 34)
* 'times': Paths and guides. (line 220)
* 'times' <1>: Paths and guides. (line 224)
* 'Top': graph. (line 135)
-* 'TopView': three. (line 369)
+* 'TopView': three. (line 370)
* 'trace': Debugger. (line 50)
* 'trailingzero': graph. (line 175)
* 'transform': Transforms. (line 6)
-* 'transform' <1>: three. (line 458)
-* 'transform3': three. (line 421)
+* 'transform' <1>: three. (line 459)
+* 'transform3': three. (line 422)
* transparency: Pens. (line 233)
* 'transpose': Arrays. (line 197)
* 'transpose' <1>: Arrays. (line 200)
* 'tree': tree. (line 6)
* 'trembling': trembling. (line 6)
* 'triangle': geometry. (line 6)
-* 'triangles': three. (line 113)
+* 'triangles': three. (line 114)
* 'triangulate': contour. (line 149)
* 'tridiagonal': Arrays. (line 255)
* trigonometric integrals: Mathematical functions.
(line 48)
* 'triple': Data types. (line 137)
* 'TrueMargin': draw. (line 42)
-* 'TrueMargin3': three. (line 562)
-* 'tube': three. (line 124)
+* 'TrueMargin3': three. (line 563)
+* 'tube': three. (line 125)
* 'tube' <1>: tube. (line 6)
* tutorial: Tutorial. (line 6)
* 'type1cm': Pens. (line 188)
-* 'typedef': Data types. (line 377)
-* 'typedef' <1>: Functions. (line 39)
+* 'typedef': Data types. (line 379)
+* 'typedef' <1>: Functions. (line 46)
* 'U3D': embed. (line 22)
* 'undefined': Paths and guides. (line 283)
* 'UnFill': draw. (line 26)
@@ -9888,86 +9951,86 @@ Index
(line 168)
* 'unicode': unicode. (line 6)
* 'uniform': Arrays. (line 145)
-* Uninstall: Uninstall. (line 6)
+* uninstall: Uninstall. (line 6)
* 'unique': math. (line 63)
* 'unit': Data types. (line 83)
* 'unit' <1>: Data types. (line 173)
-* 'unitbox': Tutorial. (line 151)
-* 'unitbox' <1>: three. (line 290)
-* 'unitcircle': Tutorial. (line 124)
-* 'unitcircle' <1>: Tutorial. (line 124)
-* 'unitcircle' <2>: three. (line 258)
+* 'unitbox': Paths. (line 44)
+* 'unitbox' <1>: three. (line 291)
+* 'unitcircle': Paths. (line 17)
+* 'unitcircle' <1>: Paths. (line 17)
+* 'unitcircle' <2>: three. (line 259)
* 'unitrand': Mathematical functions.
(line 39)
-* 'unitsize': Tutorial. (line 84)
+* 'unitsize': Figure size. (line 39)
* 'unitsize' <1>: Frames and pictures.
(line 69)
* UNIX binary distributions: UNIX binary distributions.
(line 6)
* unpacking: Rest arguments. (line 39)
* 'unravel': Import. (line 29)
-* 'up': three. (line 318)
+* 'up': three. (line 319)
* 'update': Files. (line 36)
* 'UpsideDown': Frames and pictures.
(line 104)
* 'UpsideDown' <1>: Frames and pictures.
(line 110)
* 'usepackage': Frames and pictures.
- (line 316)
-* user coordinates: Tutorial. (line 84)
+ (line 318)
+* user coordinates: Figure size. (line 39)
* user-defined operators: User-defined operators.
(line 6)
-* 'usleep': Data types. (line 371)
+* 'usleep': Data types. (line 373)
* 'value': math. (line 38)
* 'value' <1>: math. (line 41)
* 'var': Variable initializers.
(line 55)
* variable initializers: Variable initializers.
(line 6)
-* 'vectorfield': graph. (line 1004)
-* 'vectorfield' <1>: graph. (line 1043)
+* 'vectorfield': graph. (line 1005)
+* 'vectorfield' <1>: graph. (line 1044)
* 'vectorfield3': graph3. (line 157)
* vectorization: Arrays. (line 312)
* verbatim: Frames and pictures.
- (line 292)
+ (line 294)
* vertex-dependent colors: three. (line 79)
* 'Vertical': flowchart. (line 77)
* 'viewportheight': LaTeX usage. (line 50)
-* 'viewportmargin': three. (line 246)
-* 'viewportsize': three. (line 246)
+* 'viewportmargin': three. (line 247)
+* 'viewportsize': three. (line 247)
* 'viewportwidth': LaTeX usage. (line 50)
-* 'views': three. (line 215)
+* 'views': three. (line 216)
* 'vim': Editing modes. (line 32)
* virtual functions: Structures. (line 181)
* 'void': Data types. (line 10)
-* 'W': Tutorial. (line 103)
+* 'W': Labels. (line 18)
* 'whatever': Paths and guides. (line 246)
* 'Wheel': palette. (line 22)
* wheel mouse: GUI. (line 6)
-* 'while': Programming. (line 30)
+* 'while': Programming. (line 48)
* white-space string delimiter mode: Arrays. (line 343)
* 'width': LaTeX usage. (line 50)
* 'windingnumber': Paths and guides. (line 283)
* 'word': Arrays. (line 343)
* 'write': Files. (line 53)
* 'write' <1>: Arrays. (line 382)
-* 'X': three. (line 258)
+* 'X': three. (line 259)
* 'xasy': GUI. (line 6)
* 'xaxis3': graph3. (line 7)
* 'xdr': Files. (line 76)
* 'xelatex': Options. (line 146)
* 'XEquals': graph. (line 265)
* 'xequals': graph. (line 278)
-* 'xlimits': graph. (line 639)
+* 'xlimits': graph. (line 640)
* 'XOR': Arithmetic & logical.
(line 63)
* 'xpart': Data types. (line 94)
* 'xpart' <1>: Data types. (line 184)
* 'xscale': Transforms. (line 30)
-* 'xscale3': three. (line 428)
+* 'xscale3': three. (line 429)
* xtick: graph. (line 330)
-* 'XY': three. (line 443)
-* 'XY' <1>: three. (line 458)
+* 'XY': three. (line 444)
+* 'XY' <1>: three. (line 459)
* 'XYEquals': graph3. (line 21)
* 'XYZero': graph3. (line 21)
* 'XZEquals': graph3. (line 21)
@@ -9977,22 +10040,22 @@ Index
(line 6)
* 'Y' <1>: Mathematical functions.
(line 48)
-* 'Y' <2>: three. (line 258)
+* 'Y' <2>: three. (line 259)
* 'yaxis3': graph3. (line 7)
* 'YEquals': graph. (line 128)
* 'yequals': graph. (line 278)
-* 'ylimits': graph. (line 639)
+* 'ylimits': graph. (line 640)
* 'ypart': Data types. (line 97)
* 'ypart' <1>: Data types. (line 187)
* 'yscale': Transforms. (line 32)
-* 'yscale3': three. (line 430)
+* 'yscale3': three. (line 431)
* ytick: graph. (line 330)
-* 'YX': three. (line 458)
-* 'YZ': three. (line 458)
+* 'YX': three. (line 459)
+* 'YZ': three. (line 459)
* 'YZEquals': graph3. (line 21)
* 'YZero': graph. (line 123)
* 'YZZero': graph3. (line 21)
-* 'Z': three. (line 258)
+* 'Z': three. (line 259)
* 'zaxis3': graph3. (line 7)
* 'zerowinding': Pens. (line 160)
* 'zero_Ai': Mathematical functions.
@@ -10008,155 +10071,160 @@ Index
* 'zeta': Mathematical functions.
(line 48)
* 'zpart': Data types. (line 190)
-* 'zscale3': three. (line 432)
-* 'ZX': three. (line 458)
-* 'ZX' <1>: three. (line 458)
-* 'ZY': three. (line 458)
+* 'zscale3': three. (line 433)
+* 'ZX': three. (line 459)
+* 'ZX' <1>: three. (line 459)
+* 'ZY': three. (line 459)

Tag Table:
Node: Top570
-Node: Description6909
-Node: Installation10524
-Node: UNIX binary distributions11559
-Node: MacOS X binary distributions12664
-Node: Microsoft Windows13218
-Ref: psview13943
-Node: Configuring14879
-Node: Search paths19114
-Node: Compiling from UNIX source19953
-Node: Editing modes22981
-Node: Git25402
-Node: Uninstall25801
-Node: Tutorial26144
-Ref: unitcircle30692
-Node: Drawing commands32837
-Node: draw34552
-Ref: arrows35709
-Node: fill40957
-Ref: gradient shading42003
-Node: clip46565
-Node: label47161
-Ref: Label47761
-Node: Bezier curves53605
-Node: Programming57502
-Ref: array iteration58317
-Node: Data types59422
-Ref: format69852
-Node: Paths and guides74153
-Ref: circle74407
-Ref: extension84089
-Node: Pens90868
-Ref: fillrule98375
-Ref: basealign99279
-Ref: transparency102113
-Ref: makepen105658
-Ref: overwrite106536
-Node: Transforms107750
-Node: Frames and pictures109532
-Ref: envelope110690
-Ref: size111783
-Ref: unitsize112770
-Ref: shipout113843
-Ref: filltype116194
-Ref: add119366
-Ref: add about120315
-Ref: tex123319
-Node: Files124214
-Ref: cd125201
-Ref: scroll129886
-Node: Variable initializers132804
-Node: Structures135521
-Node: Operators143018
-Node: Arithmetic & logical143332
-Node: Self & prefix operators145273
-Node: User-defined operators146062
-Node: Implicit scaling146972
-Node: Functions147535
-Ref: stack overflow150320
-Node: Default arguments150885
-Node: Named arguments151623
-Node: Rest arguments154193
-Node: Mathematical functions157314
-Node: Arrays161977
-Ref: sort168959
-Ref: tridiagonal171388
-Ref: solve172619
-Node: Slices176758
-Node: Casts180651
-Node: Import182622
-Node: Static187869
-Node: LaTeX usage190762
-Node: Base modules197242
-Node: plain199799
-Node: simplex200452
-Node: math200726
-Node: interpolate203435
-Node: geometry203714
-Node: trembling204308
-Node: stats204577
-Node: patterns204837
-Node: markers205073
-Node: tree206933
-Node: binarytree207118
-Node: drawtree207784
-Node: syzygy207985
-Node: feynman208259
-Node: roundedpath208534
-Node: animation208817
-Ref: animate209238
-Node: embed210355
-Node: slide211310
-Node: MetaPost211651
-Node: unicode212370
-Node: latin1213244
-Node: babel213613
-Node: labelpath213843
-Node: labelpath3214664
-Node: annotate214975
-Node: CAD215445
-Node: graph215756
-Ref: ticks222895
-Ref: pathmarkers236475
-Ref: marker236945
-Ref: markuniform237299
-Ref: errorbars239097
-Ref: automatic scaling243381
-Node: palette254657
-Ref: images254775
-Ref: image258949
-Ref: logimage259469
-Ref: penimage260574
-Ref: penfunctionimage260836
-Node: three261607
-Ref: PostScript3D288606
-Node: obj290345
-Node: graph3290594
-Ref: GaussianSurface295873
-Node: grid3297022
-Node: solids297806
-Node: tube298798
-Node: flowchart301032
-Node: contour305640
-Node: contour3310951
-Node: smoothcontour3311264
-Node: slopefield312934
-Node: ode314422
-Node: Options314679
-Ref: configuration file320819
-Ref: settings320819
-Ref: texengines322062
-Ref: convert322062
-Node: Interactive mode325385
-Ref: history327534
-Node: GUI328838
-Node: GUI installation329342
-Node: GUI usage330242
-Node: PostScript to Asymptote331150
-Node: Help331908
-Node: Debugger333584
-Node: Credits335340
-Node: Index336274
+Node: Description7279
+Node: Installation11100
+Node: UNIX binary distributions12144
+Node: MacOS X binary distributions13270
+Node: Microsoft Windows13824
+Ref: psview14549
+Node: Configuring15485
+Node: Search paths19720
+Node: Compiling from UNIX source20559
+Node: Editing modes23589
+Node: Git26010
+Node: Uninstall26409
+Node: Tutorial26751
+Node: Drawing in batch mode27639
+Node: Drawing in interactive mode28514
+Node: Figure size29546
+Node: Labels31138
+Node: Paths31965
+Ref: unitcircle32580
+Node: Drawing commands34480
+Node: draw36195
+Ref: arrows37377
+Node: fill42625
+Ref: gradient shading43671
+Node: clip48187
+Node: label48783
+Ref: Label49383
+Node: Bezier curves55227
+Node: Programming59124
+Ref: array iteration60877
+Node: Data types61044
+Ref: format71494
+Node: Paths and guides75913
+Ref: circle76167
+Ref: extension85849
+Node: Pens92628
+Ref: fillrule100135
+Ref: basealign101039
+Ref: transparency103873
+Ref: makepen107418
+Ref: overwrite108296
+Node: Transforms109510
+Node: Frames and pictures111292
+Ref: envelope112450
+Ref: size113543
+Ref: unitsize114530
+Ref: shipout115603
+Ref: filltype117954
+Ref: add121126
+Ref: add about122132
+Ref: tex125136
+Node: Files126031
+Ref: cd127018
+Ref: scroll131703
+Node: Variable initializers134621
+Node: Structures137338
+Node: Operators144835
+Node: Arithmetic & logical145149
+Node: Self & prefix operators147108
+Node: User-defined operators147897
+Node: Implicit scaling148807
+Node: Functions149370
+Ref: stack overflow152438
+Node: Default arguments152720
+Node: Named arguments153476
+Node: Rest arguments156046
+Node: Mathematical functions159167
+Node: Arrays163830
+Ref: sort170812
+Ref: tridiagonal173241
+Ref: solve174472
+Node: Slices178611
+Node: Casts182519
+Node: Import184490
+Node: Static189737
+Node: LaTeX usage192630
+Node: Base modules199135
+Node: plain201692
+Node: simplex202366
+Node: math202640
+Node: interpolate205349
+Node: geometry205628
+Node: trembling206222
+Node: stats206491
+Node: patterns206751
+Node: markers206987
+Node: tree208847
+Node: binarytree209032
+Node: drawtree209698
+Node: syzygy209899
+Node: feynman210173
+Node: roundedpath210448
+Node: animation210731
+Ref: animate211152
+Node: embed212269
+Node: slide213224
+Node: MetaPost213565
+Node: unicode214284
+Node: latin1215158
+Node: babel215527
+Node: labelpath215757
+Node: labelpath3216578
+Node: annotate216889
+Node: CAD217359
+Node: graph217670
+Ref: ticks224820
+Ref: pathmarkers238452
+Ref: marker238922
+Ref: markuniform239276
+Ref: errorbars241074
+Ref: automatic scaling245358
+Node: palette256634
+Ref: images256752
+Ref: image260926
+Ref: logimage261446
+Ref: penimage262551
+Ref: penfunctionimage262813
+Node: three263584
+Ref: PostScript3D290593
+Node: obj292332
+Node: graph3292581
+Ref: GaussianSurface297860
+Node: grid3299009
+Node: solids299793
+Node: tube300785
+Node: flowchart303019
+Node: contour307627
+Node: contour3312938
+Node: smoothcontour3313251
+Node: slopefield314970
+Node: ode316458
+Node: Options316715
+Ref: configuration file322878
+Ref: settings322878
+Ref: texengines324121
+Ref: convert324121
+Node: Interactive mode327444
+Ref: history329593
+Node: GUI330897
+Node: GUI installation331448
+Node: GUI usage332359
+Node: PostScript to Asymptote333267
+Node: Help334025
+Node: Debugger335701
+Node: Credits337457
+Node: Index338439

End Tag Table
diff --git a/Build/source/utils/asymptote/drawgroup.h b/Build/source/utils/asymptote/drawgroup.h
index 26058ba3c5f..e8149f118bb 100644
--- a/Build/source/utils/asymptote/drawgroup.h
+++ b/Build/source/utils/asymptote/drawgroup.h
@@ -75,7 +75,8 @@ public:
granularity,closed,tessellate,dobreak,nobreak);
groups.push_back(groupmap());
- out->begingroup(buf.str().c_str(),&options,T);
+ const string& s=buf.str();
+ out->begingroup(s.c_str(),&options,T);
return true;
}
diff --git a/Build/source/utils/asymptote/drawpath.cc b/Build/source/utils/asymptote/drawpath.cc
index 14dd7692812..9e2bce31bde 100644
--- a/Build/source/utils/asymptote/drawpath.cc
+++ b/Build/source/utils/asymptote/drawpath.cc
@@ -133,8 +133,10 @@ bool drawPath::draw(psfile *out)
if (n == 0 || pentype.invisible())
return true;
- pen q = isdashed(pentype) ? adjustdash(pentype,p.arclength(),p.cyclic()) :
- pentype;
+ pen q=isdashed(pentype) ?
+ adjustdash(pentype,
+ p.transformed(inverse(pentype.getTransform())).arclength(),
+ p.cyclic()) : pentype;
penSave(out);
penTranslate(out);
diff --git a/Build/source/utils/asymptote/drawsurface.cc b/Build/source/utils/asymptote/drawsurface.cc
index 1629771873e..1e2bb3ec27d 100644
--- a/Build/source/utils/asymptote/drawsurface.cc
+++ b/Build/source/utils/asymptote/drawsurface.cc
@@ -15,15 +15,15 @@ using namespace prc;
namespace camp {
-void bezierTriangle(const triple *g, bool straight, double Size2, triple Size3,
- bool havebillboard, triple center, GLfloat *colors);
-
const double pixel=1.0; // Adaptive rendering constant.
const triple drawElement::zero;
using vm::array;
#ifdef HAVE_GL
+void bezierTriangle(const triple *g, bool straight, double ratio,
+ bool havebillboard, triple center, GLfloat *colors);
+
void storecolor(GLfloat *colors, int i, const vm::array &pens, int j)
{
pen p=vm::read<camp::pen>(pens,j);
@@ -262,11 +262,9 @@ inline double fraction(double d, double size)
}
// estimate the viewport fraction associated with the displacement d
-inline double fraction(const triple& d, const triple& size)
+inline double fraction(const triple& d, const pair& size)
{
- return max(max(fraction(d.getx(),size.getx()),
- fraction(d.gety(),size.gety())),
- fraction(d.getz(),size.getz()));
+ return max(fraction(d.getx(),size.getx()),fraction(d.gety(),size.gety()));
}
void drawSurface::render(GLUnurbs *nurb, double size2,
@@ -318,7 +316,7 @@ void drawSurface::render(GLUnurbs *nurb, double size2,
setcolors(colors,lighton,diffuse,ambient,emissive,specular,shininess);
- const triple size3(s*(Max.getx()-Min.getx()),s*(Max.gety()-Min.gety()),0.0);
+ const pair size3(s*(Max.getx()-Min.getx()),s*(Max.gety()-Min.gety()));
bool havenormal=normal != zero;
if(havebillboard) BB.init();
@@ -590,7 +588,7 @@ void drawBezierTriangle::render(GLUnurbs *nurb, double size2,
setcolors(colors,lighton,diffuse,ambient,emissive,specular,shininess);
- const triple size3(s*(Max.getx()-Min.getx()),s*(Max.gety()-Min.gety()),0);
+ const pair size3(s*(Max.getx()-Min.getx()),s*(Max.gety()-Min.gety()));
GLfloat v[12];
@@ -598,7 +596,7 @@ void drawBezierTriangle::render(GLUnurbs *nurb, double size2,
for(size_t i=0; i < 3; ++i)
storecolor(v,4*i,colors[i]);
- bezierTriangle(controls,straight,size2,size3,havebillboard,center,
+ bezierTriangle(controls,straight,size3.length()/size2,havebillboard,center,
colors ? v : NULL);
if(colors)
diff --git a/Build/source/utils/asymptote/fftw++.cc b/Build/source/utils/asymptote/fftw++.cc
index 25db1ce3d0f..7c1095f9309 100644
--- a/Build/source/utils/asymptote/fftw++.cc
+++ b/Build/source/utils/asymptote/fftw++.cc
@@ -37,7 +37,8 @@ void LoadWisdom()
ostringstream wisdom;
wisdom << ifWisdom.rdbuf();
ifWisdom.close();
- fftw_import_wisdom_from_string(wisdom.str().c_str());
+ const string& s=wisdom.str();
+ fftw_import_wisdom_from_string(s.c_str());
Wise=true;
}
}
@@ -70,5 +71,5 @@ ThreadBase::ThreadBase() {threads=fftw::maxthreads;}
}
namespace utils {
- unsigned int defaultmpithreads=1;
+unsigned int defaultmpithreads=1;
}
diff --git a/Build/source/utils/asymptote/fftw++.h b/Build/source/utils/asymptote/fftw++.h
index 9ce6d4430e8..650868c2578 100644
--- a/Build/source/utils/asymptote/fftw++.h
+++ b/Build/source/utils/asymptote/fftw++.h
@@ -1,6 +1,7 @@
/* Fast Fourier transform C++ header class for the FFTW3 Library
- Copyright (C) 2004-15 John C. Bowman, University of Alberta
- Malcolm Roberts, University of Strasbourg
+ Copyright (C) 2004-16
+ John C. Bowman, University of Alberta
+ Malcolm Roberts, University of Strasbourg
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -19,7 +20,7 @@
#ifndef __fftwpp_h__
#define __fftwpp_h__ 1
-#define __FFTWPP_H_VERSION__ 2.00
+#define __FFTWPP_H_VERSION__ 2.02
#include <cstdlib>
#include <fstream>
@@ -585,38 +586,38 @@ public:
exit(1);
}
#ifndef FFTWPP_SINGLE_THREAD
- if(a > 1) {
- if(b > 1) {
- int A=a, B=b;
+ if(a > 1) {
+ if(b > 1) {
+ int A=a, B=b;
#pragma omp parallel for num_threads(A)
- for(unsigned int i=0; i < a; ++i) {
- unsigned int I=i*nlength;
+ for(unsigned int i=0; i < a; ++i) {
+ unsigned int I=i*nlength;
#pragma omp parallel for num_threads(B)
- for(unsigned int j=0; j < b; ++j) {
- unsigned int J=j*mlength;
- fftw_execute_r2r((i < ilast && j < jlast) ? plan : plan2,
- (double *) in+cols*I+J,
- (double *) out+rows*J+I);
- }
+ for(unsigned int j=0; j < b; ++j) {
+ unsigned int J=j*mlength;
+ fftw_execute_r2r((i < ilast && j < jlast) ? plan : plan2,
+ (double *) in+cols*I+J,
+ (double *) out+rows*J+I);
}
- } else {
- int A=a;
+ }
+ } else {
+ int A=a;
#pragma omp parallel for num_threads(A)
- for(unsigned int i=0; i < a; ++i) {
- unsigned int I=i*nlength;
- fftw_execute_r2r(i < ilast ? plan : plan2,
- (double *) in+cols*I,(double *) out+I);
- }
+ for(unsigned int i=0; i < a; ++i) {
+ unsigned int I=i*nlength;
+ fftw_execute_r2r(i < ilast ? plan : plan2,
+ (double *) in+cols*I,(double *) out+I);
}
- } else if(b > 1) {
- int B=b;
+ }
+ } else if(b > 1) {
+ int B=b;
#pragma omp parallel for num_threads(B)
- for(unsigned int j=0; j < b; ++j) {
- unsigned int J=j*mlength;
- fftw_execute_r2r(j < jlast ? plan : plan2,
- (double *) in+J,(double *) out+rows*J);
- }
- } else
+ for(unsigned int j=0; j < b; ++j) {
+ unsigned int J=j*mlength;
+ fftw_execute_r2r(j < jlast ? plan : plan2,
+ (double *) in+J,(double *) out+rows*J);
+ }
+ } else
#endif
fftw_execute_r2r(plan,(double *) in,(double*) out);
}
@@ -761,7 +762,7 @@ public:
Complex *in, Complex *out, unsigned int Threads)
: fftw(), nx(nx), M(M), istride(istride), ostride(ostride),
idist(Dist(nx,istride,idist)), odist(Dist(nx,ostride,odist)),
- plan1(NULL), plan2(NULL) {
+ plan1(NULL), plan2(NULL) {
T=1;
Q=M;
R=0;
@@ -1385,7 +1386,7 @@ class rcfft3d : public fftw {
unsigned int nz;
public:
rcfft3d(unsigned int nx, unsigned int ny, unsigned int nz, Complex *out=NULL,
- unsigned int threads=maxthreads)
+ unsigned int threads=maxthreads)
: fftw(2*nx*ny*(nz/2+1),-1,threads,nx*ny*nz), nx(nx), ny(ny), nz(nz) {
Setup(out);
}
diff --git a/Build/source/utils/asymptote/fileio.h b/Build/source/utils/asymptote/fileio.h
index 5638047a0c2..fd1dbd0e803 100644
--- a/Build/source/utils/asymptote/fileio.h
+++ b/Build/source/utils/asymptote/fileio.h
@@ -503,6 +503,9 @@ public:
return 0;
}
+ bool enabled() {return !standard || settings::verbose > 1 ||
+ interact::interactive || !settings::getSetting<bool>("quiet");}
+
void write(bool val) {*stream << (val ? "true " : "false ");}
void write(Int val) {*stream << val;}
void write(double val) {*stream << val;}
diff --git a/Build/source/utils/asymptote/glrender.cc b/Build/source/utils/asymptote/glrender.cc
index aec630a4a37..f2b54a67e9c 100644
--- a/Build/source/utils/asymptote/glrender.cc
+++ b/Build/source/utils/asymptote/glrender.cc
@@ -1591,7 +1591,7 @@ void glrender(const string& prefix, const picture *pic, const string& format,
#ifdef HAVE_LIBGLUT
if(!offscreen) {
- Animate=getSetting<bool>("autoplay");
+ Animate=getSetting<bool>("autoplay") && glthread;
if(View) {
if(!getSetting<bool>("fitscreen"))
diff --git a/Build/source/utils/asymptote/path.cc b/Build/source/utils/asymptote/path.cc
index 6fa9c1f5634..dce0cef63c5 100644
--- a/Build/source/utils/asymptote/path.cc
+++ b/Build/source/utils/asymptote/path.cc
@@ -346,10 +346,16 @@ path path::subpath(Int a, Int b) const
}
if (!cycles) {
- if (a < 0)
+ if (a < 0) {
a = 0;
- if (b > n-1)
+ if(b < 0)
+ b = 0;
+ }
+ if (b > n-1) {
b = n-1;
+ if(a > b)
+ a = b;
+ }
}
Int sn = b-a+1;
@@ -411,8 +417,8 @@ path path::subpath(double a, double b) const
}
if (b > n-1) {
b = n-1;
- if (a > n-1)
- a = n-1;
+ if (a > b)
+ a = b;
}
aL = nodes[(Int)floor(a)];
aR = nodes[(Int)ceil(a)];
diff --git a/Build/source/utils/asymptote/picture.cc b/Build/source/utils/asymptote/picture.cc
index 4298caa362e..c3c6d4b3232 100644
--- a/Build/source/utils/asymptote/picture.cc
+++ b/Build/source/utils/asymptote/picture.cc
@@ -679,6 +679,7 @@ bool picture::postprocess(const string& prename, const string& outname,
cmd.push_back("-q");
cmd.push_back("-dNOPAUSE");
cmd.push_back("-dBATCH");
+ cmd.push_back("-P");
cmd.push_back("-sDEVICE=pngalpha");
cmd.push_back("-dEPSCrop");
if(safe)
diff --git a/Build/source/utils/asymptote/revision.cc b/Build/source/utils/asymptote/revision.cc
index bf28fda4339..7d63228e7d5 100644
--- a/Build/source/utils/asymptote/revision.cc
+++ b/Build/source/utils/asymptote/revision.cc
@@ -1 +1 @@
-const char *REVISION="2.36";
+const char *REVISION="2.37";
diff --git a/Build/source/utils/asymptote/runarray.cc b/Build/source/utils/asymptote/runarray.cc
index da1130cc974..779047c9b6f 100644
--- a/Build/source/utils/asymptote/runarray.cc
+++ b/Build/source/utils/asymptote/runarray.cc
@@ -1976,16 +1976,126 @@ void gen_runarray63(stack *Stack)
{Stack->push<real>((j == iterations) ? DBL_MAX : x); return;}
}
-#line 1654 "runarray.in"
-// real simpson(callableReal *f, real a, real b, real acc=DBL_EPSILON, real dxmax=0);
+// Find a root for the specified continuous (but not necessarily
+// differentiable) function. Whatever value t is returned, it is guaranteed
+// that t is within [a, b] and within tolerance of a sign change.
+// An error is thrown if fa and fb are both positive or both negative.
+//
+// In this implementation, the binary search is interleaved
+// with a modified version of quadratic interpolation.
+// This is a C++ port of the Asymptote routine written by Charles Staats III.
+#line 1662 "runarray.in"
+// real _findroot(callableReal *f, real a, real b, real tolerance, real fa, real fb);
void gen_runarray64(stack *Stack)
{
+ real fb=vm::pop<real>(Stack);
+ real fa=vm::pop<real>(Stack);
+ real tolerance=vm::pop<real>(Stack);
+ real b=vm::pop<real>(Stack);
+ real a=vm::pop<real>(Stack);
+ callableReal * f=vm::pop<callableReal *>(Stack);
+#line 1664 "runarray.in"
+ if(fa == 0.0) {Stack->push<real>(a); return;}
+ if(fb == 0.0) {Stack->push<real>(b); return;}
+
+ const char* oppsign="fa and fb must have opposite signs";
+ int sign;
+
+ if(fa < 0.0) {
+ if(fb < 0.0) error(oppsign);
+ sign=1;
+ } else {
+ if(fb > 0.0) error(oppsign);
+ fa=-fa;
+ fb=-fb;
+ sign=-1;
+ }
+
+ real t=a;
+ real ft=fa;
+ real twicetolerance=2.0*tolerance;
+
+ while(b-a > tolerance) {
+ t=(a+b)*0.5;
+
+ Stack->push(t);
+ f->call(Stack);
+ ft=sign*pop<double>(Stack);
+ if(ft == 0.0) {Stack->push<real>(t); return;}
+
+ // If halving the interval already puts us within tolerance,
+ // don't bother with the interpolation step.
+ if(b-a >= twicetolerance) {
+
+ real factor=1.0/(b-a);
+ real q_A=2.0*(fa-2.0*ft+fb)*factor*factor;
+ real q_B=(fb-fa)*factor;
+ quadraticroots Q=quadraticroots(q_A,q_B,ft);
+
+ // If the interpolation somehow failed, continue on to the next binary
+ // search step. This may or may not be possible, depending on what
+ // theoretical guarantees are provided by the quadraticroots function.
+
+ real root;
+ bool found=Q.roots > 0;
+ if(found) {
+ root=t+Q.t1;
+ if(root <= a || root >= b) {
+ if(Q.roots == 1) found=false;
+ else {
+ root=t+Q.t2;
+ if(root <= a || root >= b) found=false;
+ }
+ }
+ }
+
+ if(found) {
+ if(ft > 0.0) {
+ b=t;
+ fb=ft;
+ } else {
+ a=t;
+ fa=ft;
+ }
+
+ t=root;
+
+ // If the interpolated value is close to one edge of
+ // the interval, move it farther away from the edge in
+ // an effort to catch the root in the middle.
+ real margin=(b-a)*1.0e-3;
+ if(t-a < margin) t=a+2.0*(t-a);
+ else if(b-t < margin) t=b-2.0*(b-t);
+
+ Stack->push(t);
+ f->call(Stack);
+ ft=sign*pop<double>(Stack);
+
+ if(ft == 0.0) {Stack->push<real>(t); return;}
+ }
+ }
+
+ if(ft > 0.0) {
+ b=t;
+ fb=ft;
+ } else if(ft < 0.0) {
+ a=t;
+ fa=ft;
+ }
+ }
+ {Stack->push<real>(a-(b-a)/(fb-fa)*fa); return;}
+}
+
+#line 1756 "runarray.in"
+// real simpson(callableReal *f, real a, real b, real acc=DBL_EPSILON, real dxmax=0);
+void gen_runarray65(stack *Stack)
+{
real dxmax=vm::pop<real>(Stack,0);
real acc=vm::pop<real>(Stack,DBL_EPSILON);
real b=vm::pop<real>(Stack);
real a=vm::pop<real>(Stack);
callableReal * f=vm::pop<callableReal *>(Stack);
-#line 1656 "runarray.in"
+#line 1758 "runarray.in"
real integral;
if(dxmax <= 0) dxmax=fabs(b-a);
callable *oldFunc=Func;
@@ -1998,13 +2108,13 @@ void gen_runarray64(stack *Stack)
}
// Compute the fast Fourier transform of a pair array
-#line 1669 "runarray.in"
+#line 1771 "runarray.in"
// pairarray* fft(pairarray *a, Int sign=1);
-void gen_runarray65(stack *Stack)
+void gen_runarray66(stack *Stack)
{
Int sign=vm::pop<Int>(Stack,1);
pairarray * a=vm::pop<pairarray *>(Stack);
-#line 1670 "runarray.in"
+#line 1772 "runarray.in"
#ifdef HAVE_LIBFFTW3
unsigned n=(unsigned) checkArray(a);
array *c=new array(n);
@@ -2032,12 +2142,12 @@ void gen_runarray65(stack *Stack)
{Stack->push<pairarray*>(c); return;}
}
-#line 1698 "runarray.in"
+#line 1800 "runarray.in"
// Intarray2* triangulate(pairarray *z);
-void gen_runarray66(stack *Stack)
+void gen_runarray67(stack *Stack)
{
pairarray * z=vm::pop<pairarray *>(Stack);
-#line 1699 "runarray.in"
+#line 1801 "runarray.in"
size_t nv=checkArray(z);
// Call robust version of Gilles Dumoulin's port of Paul Bourke's
// triangulation code.
@@ -2071,12 +2181,12 @@ void gen_runarray66(stack *Stack)
{Stack->push<Intarray2*>(t); return;}
}
-#line 1733 "runarray.in"
+#line 1835 "runarray.in"
// real norm(realarray *a);
-void gen_runarray67(stack *Stack)
+void gen_runarray68(stack *Stack)
{
realarray * a=vm::pop<realarray *>(Stack);
-#line 1734 "runarray.in"
+#line 1836 "runarray.in"
size_t n=checkArray(a);
real M=0.0;
for(size_t i=0; i < n; ++i) {
@@ -2086,12 +2196,12 @@ void gen_runarray67(stack *Stack)
{Stack->push<real>(M); return;}
}
-#line 1744 "runarray.in"
+#line 1846 "runarray.in"
// real norm(realarray2 *a);
-void gen_runarray68(stack *Stack)
+void gen_runarray69(stack *Stack)
{
realarray2 * a=vm::pop<realarray2 *>(Stack);
-#line 1745 "runarray.in"
+#line 1847 "runarray.in"
size_t n=checkArray(a);
real M=0.0;
for(size_t i=0; i < n; ++i) {
@@ -2105,12 +2215,12 @@ void gen_runarray68(stack *Stack)
{Stack->push<real>(M); return;}
}
-#line 1759 "runarray.in"
+#line 1861 "runarray.in"
// real norm(triplearray2 *a);
-void gen_runarray69(stack *Stack)
+void gen_runarray70(stack *Stack)
{
triplearray2 * a=vm::pop<triplearray2 *>(Stack);
-#line 1760 "runarray.in"
+#line 1862 "runarray.in"
size_t n=checkArray(a);
real M=0.0;
for(size_t i=0; i < n; ++i) {
@@ -2124,12 +2234,12 @@ void gen_runarray69(stack *Stack)
{Stack->push<real>(sqrt(M)); return;}
}
-#line 1774 "runarray.in"
+#line 1876 "runarray.in"
// real change2(triplearray2 *a);
-void gen_runarray70(stack *Stack)
+void gen_runarray71(stack *Stack)
{
triplearray2 * a=vm::pop<triplearray2 *>(Stack);
-#line 1775 "runarray.in"
+#line 1877 "runarray.in"
size_t n=checkArray(a);
if(n == 0) {Stack->push<real>(0.0); return;}
@@ -2150,13 +2260,13 @@ void gen_runarray70(stack *Stack)
{Stack->push<real>(M); return;}
}
-#line 1796 "runarray.in"
+#line 1898 "runarray.in"
// triple minbezier(triplearray2 *P, triple b);
-void gen_runarray71(stack *Stack)
+void gen_runarray72(stack *Stack)
{
triple b=vm::pop<triple>(Stack);
triplearray2 * P=vm::pop<triplearray2 *>(Stack);
-#line 1797 "runarray.in"
+#line 1899 "runarray.in"
size_t N;
real *A=copyTripleArray2Components(P,N);
bound_double *B=bounddouble(N);
@@ -2167,13 +2277,13 @@ void gen_runarray71(stack *Stack)
{Stack->push<triple>(b); return;}
}
-#line 1808 "runarray.in"
+#line 1910 "runarray.in"
// triple maxbezier(triplearray2 *P, triple b);
-void gen_runarray72(stack *Stack)
+void gen_runarray73(stack *Stack)
{
triple b=vm::pop<triple>(Stack);
triplearray2 * P=vm::pop<triplearray2 *>(Stack);
-#line 1809 "runarray.in"
+#line 1911 "runarray.in"
size_t N;
real *A=copyTripleArray2Components(P,N);
bound_double *B=bounddouble(N);
@@ -2184,13 +2294,13 @@ void gen_runarray72(stack *Stack)
{Stack->push<triple>(b); return;}
}
-#line 1820 "runarray.in"
+#line 1922 "runarray.in"
// pair minratio(triplearray2 *P, pair b);
-void gen_runarray73(stack *Stack)
+void gen_runarray74(stack *Stack)
{
pair b=vm::pop<pair>(Stack);
triplearray2 * P=vm::pop<triplearray2 *>(Stack);
-#line 1821 "runarray.in"
+#line 1923 "runarray.in"
size_t N;
triple *A=copyTripleArray2C(P,N);
real fuzz=sqrtFuzz*norm(A,N);
@@ -2201,13 +2311,13 @@ void gen_runarray73(stack *Stack)
{Stack->push<pair>(b); return;}
}
-#line 1832 "runarray.in"
+#line 1934 "runarray.in"
// pair maxratio(triplearray2 *P, pair b);
-void gen_runarray74(stack *Stack)
+void gen_runarray75(stack *Stack)
{
pair b=vm::pop<pair>(Stack);
triplearray2 * P=vm::pop<triplearray2 *>(Stack);
-#line 1833 "runarray.in"
+#line 1935 "runarray.in"
size_t N;
triple *A=copyTripleArray2C(P,N);
bound_triple *B=boundtriple(N);
@@ -2218,11 +2328,11 @@ void gen_runarray74(stack *Stack)
{Stack->push<pair>(b); return;}
}
-#line 1844 "runarray.in"
+#line 1946 "runarray.in"
// realarray* _projection();
-void gen_runarray75(stack *Stack)
+void gen_runarray76(stack *Stack)
{
-#line 1845 "runarray.in"
+#line 1947 "runarray.in"
#ifdef HAVE_GL
array *a=new array(14);
gl::projection P=gl::camera();
@@ -2388,29 +2498,31 @@ void gen_runarray_venv(venv &ve)
#line 1572 "runarray.in"
addFunc(ve, run::gen_runarray63, primReal(), SYM(newton), formal(primInt(), SYM(iterations), true, false), formal(realRealFunction(), SYM(f), false, false), formal(realRealFunction(), SYM(fprime), false, false), formal(primReal(), SYM(x1), false, false), formal(primReal(), SYM(x2), false, false), formal(primBoolean(), SYM(verbose), true, false));
#line 1654 "runarray.in"
- addFunc(ve, run::gen_runarray64, 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 1668 "runarray.in"
- addFunc(ve, run::gen_runarray65, pairArray(), SYM(fft), formal(pairArray(), SYM(a), false, false), formal(primInt(), SYM(sign), true, false));
-#line 1698 "runarray.in"
- addFunc(ve, run::gen_runarray66, IntArray2(), SYM(triangulate), formal(pairArray(), SYM(z), false, false));
-#line 1733 "runarray.in"
- addFunc(ve, run::gen_runarray67, primReal(), SYM(norm), formal(realArray(), SYM(a), false, false));
-#line 1744 "runarray.in"
- addFunc(ve, run::gen_runarray68, primReal(), SYM(norm), formal(realArray2(), SYM(a), false, false));
-#line 1759 "runarray.in"
- addFunc(ve, run::gen_runarray69, primReal(), SYM(norm), formal(tripleArray2(), SYM(a), false, false));
-#line 1774 "runarray.in"
- addFunc(ve, run::gen_runarray70, primReal(), SYM(change2), formal(tripleArray2(), SYM(a), false, false));
-#line 1796 "runarray.in"
- addFunc(ve, run::gen_runarray71, primTriple(), SYM(minbezier), formal(tripleArray2(), SYM(p), false, false), formal(primTriple(), SYM(b), false, false));
-#line 1808 "runarray.in"
- addFunc(ve, run::gen_runarray72, primTriple(), SYM(maxbezier), formal(tripleArray2(), SYM(p), false, false), formal(primTriple(), SYM(b), false, false));
-#line 1820 "runarray.in"
- addFunc(ve, run::gen_runarray73, primPair(), SYM(minratio), formal(tripleArray2(), SYM(p), false, false), formal(primPair(), SYM(b), false, false));
-#line 1832 "runarray.in"
- addFunc(ve, run::gen_runarray74, primPair(), SYM(maxratio), formal(tripleArray2(), SYM(p), false, false), formal(primPair(), SYM(b), false, false));
-#line 1844 "runarray.in"
- addFunc(ve, run::gen_runarray75, realArray(), SYM(_projection));
+ addFunc(ve, run::gen_runarray64, primReal(), SYM(_findroot), formal(realRealFunction(), SYM(f), false, false), formal(primReal(), SYM(a), false, false), formal(primReal(), SYM(b), false, false), formal(primReal(), SYM(tolerance), false, false), formal(primReal(), SYM(fa), false, false), formal(primReal(), SYM(fb), false, false));
+#line 1756 "runarray.in"
+ 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"
+ addFunc(ve, run::gen_runarray67, IntArray2(), SYM(triangulate), formal(pairArray(), SYM(z), false, false));
+#line 1835 "runarray.in"
+ addFunc(ve, run::gen_runarray68, primReal(), SYM(norm), formal(realArray(), SYM(a), false, false));
+#line 1846 "runarray.in"
+ addFunc(ve, run::gen_runarray69, primReal(), SYM(norm), formal(realArray2(), SYM(a), false, false));
+#line 1861 "runarray.in"
+ addFunc(ve, run::gen_runarray70, primReal(), SYM(norm), formal(tripleArray2(), SYM(a), false, false));
+#line 1876 "runarray.in"
+ addFunc(ve, run::gen_runarray71, primReal(), SYM(change2), formal(tripleArray2(), SYM(a), false, false));
+#line 1898 "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"
+ addFunc(ve, run::gen_runarray73, primTriple(), SYM(maxbezier), formal(tripleArray2(), SYM(p), false, false), formal(primTriple(), SYM(b), false, false));
+#line 1922 "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"
+ addFunc(ve, run::gen_runarray75, primPair(), SYM(maxratio), formal(tripleArray2(), SYM(p), false, false), formal(primPair(), SYM(b), false, false));
+#line 1946 "runarray.in"
+ addFunc(ve, run::gen_runarray76, realArray(), SYM(_projection));
}
} // namespace trans
diff --git a/Build/source/utils/asymptote/runarray.in b/Build/source/utils/asymptote/runarray.in
index 24859127bfa..4aef742a421 100644
--- a/Build/source/utils/asymptote/runarray.in
+++ b/Build/source/utils/asymptote/runarray.in
@@ -1651,6 +1651,108 @@ real newton(Int iterations=100, callableReal *f, callableReal *fprime, real x1,
return (j == iterations) ? DBL_MAX : x;
}
+// Find a root for the specified continuous (but not necessarily
+// differentiable) function. Whatever value t is returned, it is guaranteed
+// that t is within [a, b] and within tolerance of a sign change.
+// An error is thrown if fa and fb are both positive or both negative.
+//
+// In this implementation, the binary search is interleaved
+// with a modified version of quadratic interpolation.
+// This is a C++ port of the Asymptote routine written by Charles Staats III.
+real _findroot(callableReal *f, real a, real b, real tolerance,
+ real fa, real fb)
+{
+ if(fa == 0.0) return a;
+ if(fb == 0.0) return b;
+
+ const char* oppsign="fa and fb must have opposite signs";
+ int sign;
+
+ if(fa < 0.0) {
+ if(fb < 0.0) error(oppsign);
+ sign=1;
+ } else {
+ if(fb > 0.0) error(oppsign);
+ fa=-fa;
+ fb=-fb;
+ sign=-1;
+ }
+
+ real t=a;
+ real ft=fa;
+ real twicetolerance=2.0*tolerance;
+
+ while(b-a > tolerance) {
+ t=(a+b)*0.5;
+
+ Stack->push(t);
+ f->call(Stack);
+ ft=sign*pop<double>(Stack);
+ if(ft == 0.0) return t;
+
+ // If halving the interval already puts us within tolerance,
+ // don't bother with the interpolation step.
+ if(b-a >= twicetolerance) {
+
+ real factor=1.0/(b-a);
+ real q_A=2.0*(fa-2.0*ft+fb)*factor*factor;
+ real q_B=(fb-fa)*factor;
+ quadraticroots Q=quadraticroots(q_A,q_B,ft);
+
+ // If the interpolation somehow failed, continue on to the next binary
+ // search step. This may or may not be possible, depending on what
+ // theoretical guarantees are provided by the quadraticroots function.
+
+ real root;
+ bool found=Q.roots > 0;
+ if(found) {
+ root=t+Q.t1;
+ if(root <= a || root >= b) {
+ if(Q.roots == 1) found=false;
+ else {
+ root=t+Q.t2;
+ if(root <= a || root >= b) found=false;
+ }
+ }
+ }
+
+ if(found) {
+ if(ft > 0.0) {
+ b=t;
+ fb=ft;
+ } else {
+ a=t;
+ fa=ft;
+ }
+
+ t=root;
+
+ // If the interpolated value is close to one edge of
+ // the interval, move it farther away from the edge in
+ // an effort to catch the root in the middle.
+ real margin=(b-a)*1.0e-3;
+ if(t-a < margin) t=a+2.0*(t-a);
+ else if(b-t < margin) t=b-2.0*(b-t);
+
+ Stack->push(t);
+ f->call(Stack);
+ ft=sign*pop<double>(Stack);
+
+ if(ft == 0.0) return t;
+ }
+ }
+
+ if(ft > 0.0) {
+ b=t;
+ fb=ft;
+ } else if(ft < 0.0) {
+ a=t;
+ fa=ft;
+ }
+ }
+ return a-(b-a)/(fb-fa)*fa;
+}
+
real simpson(callableReal *f, real a, real b, real acc=DBL_EPSILON,
real dxmax=0)
{
diff --git a/Build/source/utils/asymptote/runlabel.cc b/Build/source/utils/asymptote/runlabel.cc
index 74287cd5329..764c9ea5da2 100644
--- a/Build/source/utils/asymptote/runlabel.cc
+++ b/Build/source/utils/asymptote/runlabel.cc
@@ -157,7 +157,8 @@ array *readpath(const string& psname, bool keep, bool pdf=false,
#else
const string null="/dev/null";
#endif
- cmd.push_back("-sDEVICE=eps2write");
+ string epsdriver=getSetting<string>("epsdriver");
+ cmd.push_back("-sDEVICE="+epsdriver);
cmd.push_back("-sOutputFile="+null);
cmd.push_back(stripDir(psname));
iopipestream gs(cmd,"gs","Ghostscript");
@@ -271,7 +272,7 @@ array *readpath(const string& psname, bool keep, bool pdf=false,
#endif
namespace run {
-#line 222 "runlabel.in"
+#line 223 "runlabel.in"
// void label(picture *f, string *s, string *size, transform t, pair position, pair align, pen p);
void gen_runlabel0(stack *Stack)
{
@@ -282,26 +283,26 @@ void gen_runlabel0(stack *Stack)
string * size=vm::pop<string *>(Stack);
string * s=vm::pop<string *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 224 "runlabel.in"
+#line 225 "runlabel.in"
f->append(new drawLabel(*s,*size,t,position,align,p));
}
-#line 228 "runlabel.in"
+#line 229 "runlabel.in"
// bool labels(picture *f);
void gen_runlabel1(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 229 "runlabel.in"
+#line 230 "runlabel.in"
{Stack->push<bool>(f->havelabels()); return;}
}
-#line 233 "runlabel.in"
+#line 234 "runlabel.in"
// realarray* texsize(string *s, pen p=CURRENTPEN);
void gen_runlabel2(stack *Stack)
{
pen p=vm::pop<pen>(Stack,CURRENTPEN);
string * s=vm::pop<string *>(Stack);
-#line 234 "runlabel.in"
+#line 235 "runlabel.in"
texinit();
processDataStruct &pd=processData();
@@ -318,13 +319,13 @@ void gen_runlabel2(stack *Stack)
{Stack->push<realarray*>(t); return;}
}
-#line 251 "runlabel.in"
+#line 252 "runlabel.in"
// patharray2* _texpath(stringarray *s, penarray *p);
void gen_runlabel3(stack *Stack)
{
penarray * p=vm::pop<penarray *>(Stack);
stringarray * s=vm::pop<stringarray *>(Stack);
-#line 252 "runlabel.in"
+#line 253 "runlabel.in"
size_t n=checkArrays(s,p);
if(n == 0) {Stack->push<patharray2*>(new array(0)); return;}
@@ -370,8 +371,13 @@ void gen_runlabel3(stack *Stack)
string pdfname,pdfname2,psname2;
bool keep=getSetting<bool>("keep");
+ bool legacygs=false;
if(!status) {
if(xe) {
+// Use legacy ghostscript driver for gs-9.13 and earlier.
+ string epsdriver=getSetting<string>("epsdriver");
+ legacygs=epsdriver == "epswrite";
+
pdfname=auxname(prefix,"pdf");
pdfname2=auxname(prefix+"_","pdf");
psname2=auxname(prefix+"_","ps");
@@ -400,21 +406,27 @@ void gen_runlabel3(stack *Stack)
cmd.push_back("-dNOPAUSE");
cmd.push_back("-dBATCH");
if(safe) cmd.push_back("-dSAFER");
- cmd.push_back("-sDEVICE=eps2write");
+ cmd.push_back("-sDEVICE="+epsdriver);
// Work around eps2write bug that forces all postscript to first page.
- cmd.push_back("-sOutputFile="+psname2+"%d");
+ cmd.push_back("-sOutputFile="+psname2+(legacygs ? "" : "%d"));
cmd.push_back(pdfname2);
status=System(cmd,0,true,"gs");
-
- for(unsigned int i=1; i <= n ; ++i) {
- ostringstream buf;
- buf << psname2.c_str() << i;
- const char *name=buf.str().c_str();
- std::ifstream in(name,std::ios::binary);
+
+ if(legacygs) {
+ std::ifstream in(psname2.c_str());
ps << in.rdbuf();
- ps << "(>\n) print flush\n";
- in.close();
- if(!keep) unlink(name);
+ } else {
+ for(unsigned int i=1; i <= n ; ++i) {
+ ostringstream buf;
+ buf << psname2 << i;
+ const string& s=buf.str();
+ const char *name=s.c_str();
+ std::ifstream in(name,std::ios::binary);
+ ps << in.rdbuf();
+ ps << "(>\n) print flush\n";
+ in.close();
+ if(!keep) unlink(name);
+ }
}
ps.close();
}
@@ -431,9 +443,7 @@ void gen_runlabel3(stack *Stack)
dcmd.push_back(dviname);
status=System(dcmd,0,true,"dvips");
}
- }
-
- if(status != 0)
+ } else
error("texpath failed");
if(!keep) { // Delete temporary files.
@@ -453,17 +463,17 @@ void gen_runlabel3(stack *Stack)
unlink(auxname(prefix,"tui").c_str());
}
}
- {Stack->push<patharray2*>(xe ? readpath(psname,keep,true,0.1) :
+ {Stack->push<patharray2*>(xe ? readpath(psname,keep,!legacygs,0.1) :
readpath(psname,keep,false,0.12,-1.0)); return;}
}
-#line 385 "runlabel.in"
+#line 395 "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 386 "runlabel.in"
+#line 396 "runlabel.in"
size_t n=checkArrays(s,p);
if(n == 0) {Stack->push<patharray2*>(new array(0)); return;}
@@ -504,7 +514,7 @@ void gen_runlabel4(stack *Stack)
cmd2.push_back("-dBATCH");
cmd2.push_back("-P");
if(safe) cmd2.push_back("-dSAFER");
- cmd2.push_back("-sDEVICE=eps2write");
+ cmd2.push_back("-sDEVICE="+getSetting<string>("epsdriver"));
cmd2.push_back("-sOutputFile=-");
cmd2.push_back("-");
iopipestream gs(cmd2,"gs","Ghostscript");
@@ -536,13 +546,13 @@ void gen_runlabel4(stack *Stack)
{Stack->push<patharray2*>(readpath(psname,keep,false,0.1)); return;}
}
-#line 459 "runlabel.in"
+#line 469 "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 460 "runlabel.in"
+#line 470 "runlabel.in"
array *P=new array(0);
if(g.size() == 0) {Stack->push<patharray*>(P); return;}
@@ -572,17 +582,17 @@ namespace trans {
void gen_runlabel_venv(venv &ve)
{
-#line 222 "runlabel.in"
+#line 223 "runlabel.in"
addFunc(ve, run::gen_runlabel0, primVoid(), SYM(label), formal(primPicture(), SYM(f), false, false), formal(primString(), SYM(s), false, false), formal(primString(), SYM(size), false, false), formal(primTransform(), SYM(t), false, false), formal(primPair(), SYM(position), false, false), formal(primPair(), SYM(align), false, false), formal(primPen(), SYM(p), false, false));
-#line 228 "runlabel.in"
+#line 229 "runlabel.in"
addFunc(ve, run::gen_runlabel1, primBoolean(), SYM(labels), formal(primPicture(), SYM(f), false, false));
-#line 233 "runlabel.in"
+#line 234 "runlabel.in"
addFunc(ve, run::gen_runlabel2, realArray(), SYM(texsize), formal(primString(), SYM(s), false, false), formal(primPen(), SYM(p), true, false));
-#line 251 "runlabel.in"
+#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 385 "runlabel.in"
+#line 395 "runlabel.in"
addFunc(ve, run::gen_runlabel4, pathArray2() , SYM(textpath), formal(stringArray() , SYM(s), false, false), formal(penArray() , SYM(p), false, false));
-#line 459 "runlabel.in"
+#line 469 "runlabel.in"
addFunc(ve, run::gen_runlabel5, pathArray() , SYM(_strokepath), formal(primPath(), SYM(g), false, false), formal(primPen(), SYM(p), true, false));
}
diff --git a/Build/source/utils/asymptote/runlabel.in b/Build/source/utils/asymptote/runlabel.in
index ba1b57dbcb0..2fcd2403b11 100644
--- a/Build/source/utils/asymptote/runlabel.in
+++ b/Build/source/utils/asymptote/runlabel.in
@@ -111,7 +111,8 @@ array *readpath(const string& psname, bool keep, bool pdf=false,
#else
const string null="/dev/null";
#endif
- cmd.push_back("-sDEVICE=eps2write");
+ string epsdriver=getSetting<string>("epsdriver");
+ cmd.push_back("-sDEVICE="+epsdriver);
cmd.push_back("-sOutputFile="+null);
cmd.push_back(stripDir(psname));
iopipestream gs(cmd,"gs","Ghostscript");
@@ -295,8 +296,13 @@ patharray2 *_texpath(stringarray *s, penarray *p)
string pdfname,pdfname2,psname2;
bool keep=getSetting<bool>("keep");
+ bool legacygs=false;
if(!status) {
if(xe) {
+// Use legacy ghostscript driver for gs-9.13 and earlier.
+ string epsdriver=getSetting<string>("epsdriver");
+ legacygs=epsdriver == "epswrite";
+
pdfname=auxname(prefix,"pdf");
pdfname2=auxname(prefix+"_","pdf");
psname2=auxname(prefix+"_","ps");
@@ -325,21 +331,27 @@ patharray2 *_texpath(stringarray *s, penarray *p)
cmd.push_back("-dNOPAUSE");
cmd.push_back("-dBATCH");
if(safe) cmd.push_back("-dSAFER");
- cmd.push_back("-sDEVICE=eps2write");
+ cmd.push_back("-sDEVICE="+epsdriver);
// Work around eps2write bug that forces all postscript to first page.
- cmd.push_back("-sOutputFile="+psname2+"%d");
+ cmd.push_back("-sOutputFile="+psname2+(legacygs ? "" : "%d"));
cmd.push_back(pdfname2);
status=System(cmd,0,true,"gs");
-
- for(unsigned int i=1; i <= n ; ++i) {
- ostringstream buf;
- buf << psname2.c_str() << i;
- const char *name=buf.str().c_str();
- std::ifstream in(name,std::ios::binary);
+
+ if(legacygs) {
+ std::ifstream in(psname2.c_str());
ps << in.rdbuf();
- ps << "(>\n) print flush\n";
- in.close();
- if(!keep) unlink(name);
+ } else {
+ for(unsigned int i=1; i <= n ; ++i) {
+ ostringstream buf;
+ buf << psname2 << i;
+ const string& s=buf.str();
+ const char *name=s.c_str();
+ std::ifstream in(name,std::ios::binary);
+ ps << in.rdbuf();
+ ps << "(>\n) print flush\n";
+ in.close();
+ if(!keep) unlink(name);
+ }
}
ps.close();
}
@@ -356,9 +368,7 @@ patharray2 *_texpath(stringarray *s, penarray *p)
dcmd.push_back(dviname);
status=System(dcmd,0,true,"dvips");
}
- }
-
- if(status != 0)
+ } else
error("texpath failed");
if(!keep) { // Delete temporary files.
@@ -378,7 +388,7 @@ patharray2 *_texpath(stringarray *s, penarray *p)
unlink(auxname(prefix,"tui").c_str());
}
}
- return xe ? readpath(psname,keep,true,0.1) :
+ return xe ? readpath(psname,keep,!legacygs,0.1) :
readpath(psname,keep,false,0.12,-1.0);
}
@@ -424,7 +434,7 @@ patharray2 *textpath(stringarray *s, penarray *p)
cmd2.push_back("-dBATCH");
cmd2.push_back("-P");
if(safe) cmd2.push_back("-dSAFER");
- cmd2.push_back("-sDEVICE=eps2write");
+ cmd2.push_back("-sDEVICE="+getSetting<string>("epsdriver"));
cmd2.push_back("-sOutputFile=-");
cmd2.push_back("-");
iopipestream gs(cmd2,"gs","Ghostscript");
diff --git a/Build/source/utils/asymptote/runpicture.cc b/Build/source/utils/asymptote/runpicture.cc
index 77371b0432e..08fd42bff1a 100644
--- a/Build/source/utils/asymptote/runpicture.cc
+++ b/Build/source/utils/asymptote/runpicture.cc
@@ -849,6 +849,7 @@ void gen_runpicture45(stack *Stack)
cmd.push_back("-q");
cmd.push_back("-dNOPAUSE");
cmd.push_back("-dBATCH");
+ cmd.push_back("-P");
cmd.push_back("-sDEVICE=pngalpha");
cmd.push_back("-dEPSCrop");
if(safe)
@@ -949,7 +950,7 @@ void gen_runpicture45(stack *Stack)
// Three-dimensional picture and surface operations
// Bezier curve
-#line 628 "runpicture.in"
+#line 629 "runpicture.in"
// void _draw(picture *f, path3 g, triple center=Zero, pen p, Int interaction=0);
void gen_runpicture46(stack *Stack)
{
@@ -958,13 +959,13 @@ void gen_runpicture46(stack *Stack)
triple center=vm::pop<triple>(Stack,Zero);
path3 g=vm::pop<path3>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 629 "runpicture.in"
+#line 630 "runpicture.in"
if(g.size() > 0)
f->append(new drawPath3(g,center,p,(Interaction) intcast(interaction)));
}
// Bezier patch
-#line 635 "runpicture.in"
+#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 gen_runpicture47(stack *Stack)
{
@@ -980,14 +981,14 @@ void gen_runpicture47(stack *Stack)
triple center=vm::pop<triple>(Stack);
triplearray2 * P=vm::pop<triplearray2 *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 638 "runpicture.in"
+#line 639 "runpicture.in"
f->append(new drawSurface(*P,center,straight,*p,opacity,shininess,
PRCshininess,normal,*colors,
(Interaction) intcast(interaction),prc));
}
// Bezier triangle
-#line 645 "runpicture.in"
+#line 646 "runpicture.in"
// void drawbeziertriangle(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_runpicture48(stack *Stack)
{
@@ -1002,14 +1003,14 @@ void gen_runpicture48(stack *Stack)
triple center=vm::pop<triple>(Stack);
triplearray2 * P=vm::pop<triplearray2 *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 649 "runpicture.in"
+#line 650 "runpicture.in"
f->append(new drawBezierTriangle(*P,center,straight,*p,opacity,shininess,
PRCshininess,*colors,
(Interaction) intcast(interaction),prc));
}
// General NURBS curve
-#line 656 "runpicture.in"
+#line 657 "runpicture.in"
// void draw(picture *f, triplearray *P, realarray *knot, realarray *weights=emptyarray, pen p);
void gen_runpicture49(stack *Stack)
{
@@ -1018,12 +1019,12 @@ void gen_runpicture49(stack *Stack)
realarray * knot=vm::pop<realarray *>(Stack);
triplearray * P=vm::pop<triplearray *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 658 "runpicture.in"
+#line 659 "runpicture.in"
f->append(new drawNurbsPath3(*P,knot,weights,p));
}
// General NURBS surface
-#line 663 "runpicture.in"
+#line 664 "runpicture.in"
// void draw(picture *f, triplearray2 *P, realarray *uknot, realarray *vknot, realarray2 *weights=emptyarray, penarray *p, real opacity, real shininess, real PRCshininess, penarray *colors);
void gen_runpicture50(stack *Stack)
{
@@ -1037,13 +1038,13 @@ void gen_runpicture50(stack *Stack)
realarray * uknot=vm::pop<realarray *>(Stack);
triplearray2 * P=vm::pop<triplearray2 *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 666 "runpicture.in"
+#line 667 "runpicture.in"
f->append(new drawNurbs(*P,uknot,vknot,weights,*p,opacity,shininess,
PRCshininess,*colors));
}
// PRC unit sphere
-#line 672 "runpicture.in"
+#line 673 "runpicture.in"
// void drawPRCsphere(picture *f, realarray2 *t, bool half=false, penarray *p, real opacity, real shininess, Int type);
void gen_runpicture51(stack *Stack)
{
@@ -1054,12 +1055,12 @@ void gen_runpicture51(stack *Stack)
bool half=vm::pop<bool>(Stack,false);
realarray2 * t=vm::pop<realarray2 *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 674 "runpicture.in"
+#line 675 "runpicture.in"
f->append(new drawSphere(*t,half,*p,opacity,shininess,intcast(type)));
}
// PRC unit cylinder
-#line 679 "runpicture.in"
+#line 680 "runpicture.in"
// void drawPRCcylinder(picture *f, realarray2 *t, penarray *p, real opacity, real shininess);
void gen_runpicture52(stack *Stack)
{
@@ -1068,12 +1069,12 @@ void gen_runpicture52(stack *Stack)
penarray * p=vm::pop<penarray *>(Stack);
realarray2 * t=vm::pop<realarray2 *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 681 "runpicture.in"
+#line 682 "runpicture.in"
f->append(new drawCylinder(*t,*p,opacity,shininess));
}
// PRC unit disk
-#line 686 "runpicture.in"
+#line 687 "runpicture.in"
// void drawPRCdisk(picture *f, realarray2 *t, penarray *p, real opacity, real shininess);
void gen_runpicture53(stack *Stack)
{
@@ -1082,12 +1083,12 @@ void gen_runpicture53(stack *Stack)
penarray * p=vm::pop<penarray *>(Stack);
realarray2 * t=vm::pop<realarray2 *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 688 "runpicture.in"
+#line 689 "runpicture.in"
f->append(new drawDisk(*t,*p,opacity,shininess));
}
// General PRC tube
-#line 693 "runpicture.in"
+#line 694 "runpicture.in"
// void drawPRCtube(picture *f, path3 center, path3 g, penarray *p, real opacity, real shininess);
void gen_runpicture54(stack *Stack)
{
@@ -1097,12 +1098,12 @@ void gen_runpicture54(stack *Stack)
path3 g=vm::pop<path3>(Stack);
path3 center=vm::pop<path3>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 695 "runpicture.in"
+#line 696 "runpicture.in"
f->append(new drawTube(center,g,*p,opacity,shininess));
}
// Draw pixel
-#line 700 "runpicture.in"
+#line 701 "runpicture.in"
// void drawpixel(picture *f, triple v, pen p, real width=1.0);
void gen_runpicture55(stack *Stack)
{
@@ -1110,12 +1111,12 @@ void gen_runpicture55(stack *Stack)
pen p=vm::pop<pen>(Stack);
triple v=vm::pop<triple>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 701 "runpicture.in"
+#line 702 "runpicture.in"
f->append(new drawPixel(v,p,width));
}
// Draw triangles
-#line 706 "runpicture.in"
+#line 707 "runpicture.in"
// void draw(picture *f, triplearray *v, Intarray2 *vi, triplearray *n, Intarray2 *ni, penarray *p, real opacity, real shininess, real PRCshininess, penarray *c=emptyarray, Intarray2 *ci=emptyarray);
void gen_runpicture56(stack *Stack)
{
@@ -1130,63 +1131,63 @@ void gen_runpicture56(stack *Stack)
Intarray2 * vi=vm::pop<Intarray2 *>(Stack);
triplearray * v=vm::pop<triplearray *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 710 "runpicture.in"
+#line 711 "runpicture.in"
f->append(new drawTriangles(*v,*vi,*n,*ni,*p,opacity,shininess,PRCshininess,
*c,*ci));
}
-#line 715 "runpicture.in"
+#line 716 "runpicture.in"
// triple min3(picture *f);
void gen_runpicture57(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 716 "runpicture.in"
+#line 717 "runpicture.in"
{Stack->push<triple>(f->bounds3().Min()); return;}
}
-#line 720 "runpicture.in"
+#line 721 "runpicture.in"
// triple max3(picture *f);
void gen_runpicture58(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 721 "runpicture.in"
+#line 722 "runpicture.in"
{Stack->push<triple>(f->bounds3().Max()); return;}
}
-#line 725 "runpicture.in"
+#line 726 "runpicture.in"
// triple size3(picture *f);
void gen_runpicture59(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 726 "runpicture.in"
+#line 727 "runpicture.in"
bbox3 b=f->bounds3();
{Stack->push<triple>(b.Max()-b.Min()); return;}
}
-#line 731 "runpicture.in"
+#line 732 "runpicture.in"
// pair minratio(picture *f);
void gen_runpicture60(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 732 "runpicture.in"
+#line 733 "runpicture.in"
{Stack->push<pair>(f->ratio(::min)); return;}
}
-#line 736 "runpicture.in"
+#line 737 "runpicture.in"
// pair maxratio(picture *f);
void gen_runpicture61(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 737 "runpicture.in"
+#line 738 "runpicture.in"
{Stack->push<pair>(f->ratio(::max)); return;}
}
-#line 741 "runpicture.in"
+#line 742 "runpicture.in"
// bool is3D(picture *f);
void gen_runpicture62(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 742 "runpicture.in"
+#line 743 "runpicture.in"
{Stack->push<bool>(f->have3D()); return;}
}
@@ -1288,39 +1289,39 @@ void gen_runpicture_venv(venv &ve)
addFunc(ve, run::gen_runpicture44, primVoid(), SYM(shipout3), formal(primString() , SYM(prefix), false, false), formal(primPicture(), SYM(f), false, false));
#line 481 "runpicture.in"
addFunc(ve, run::gen_runpicture45, primVoid(), SYM(deconstruct), formal(primPicture(), SYM(f), false, false), formal(primPicture(), SYM(preamble), true, false), formal(primReal(), SYM(magnification), true, false), formal(transformFunction(), SYM(xform), false, false));
-#line 624 "runpicture.in"
+#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 634 "runpicture.in"
+#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));
-#line 644 "runpicture.in"
+#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 655 "runpicture.in"
+#line 656 "runpicture.in"
addFunc(ve, run::gen_runpicture49, primVoid(), SYM(draw), formal(primPicture(), SYM(f), false, false), formal(tripleArray(), SYM(p), false, false), formal(realArray(), SYM(knot), false, false), formal(realArray(), SYM(weights), true, false), formal(primPen(), SYM(p), false, false));
-#line 662 "runpicture.in"
+#line 663 "runpicture.in"
addFunc(ve, run::gen_runpicture50, primVoid(), SYM(draw), formal(primPicture(), SYM(f), false, false), formal(tripleArray2(), SYM(p), false, false), formal(realArray(), SYM(uknot), false, false), formal(realArray(), SYM(vknot), false, false), formal(realArray2(), SYM(weights), true, false), formal(penArray() , SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false), formal(primReal(), SYM(prcshininess), false, false), formal(penArray() , SYM(colors), false, false));
-#line 671 "runpicture.in"
+#line 672 "runpicture.in"
addFunc(ve, run::gen_runpicture51, primVoid(), SYM(drawPRCsphere), formal(primPicture(), SYM(f), false, false), formal(realArray2(), SYM(t), false, false), formal(primBoolean(), SYM(half), true, false), formal(penArray() , SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false), formal(primInt(), SYM(type), false, false));
-#line 678 "runpicture.in"
+#line 679 "runpicture.in"
addFunc(ve, run::gen_runpicture52, primVoid(), SYM(drawPRCcylinder), formal(primPicture(), SYM(f), false, false), formal(realArray2(), SYM(t), false, false), formal(penArray() , SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false));
-#line 685 "runpicture.in"
+#line 686 "runpicture.in"
addFunc(ve, run::gen_runpicture53, primVoid(), SYM(drawPRCdisk), formal(primPicture(), SYM(f), false, false), formal(realArray2(), SYM(t), false, false), formal(penArray() , SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false));
-#line 692 "runpicture.in"
+#line 693 "runpicture.in"
addFunc(ve, run::gen_runpicture54, primVoid(), SYM(drawPRCtube), formal(primPicture(), SYM(f), false, false), formal(primPath3(), SYM(center), false, false), formal(primPath3(), SYM(g), false, false), formal(penArray() , SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false));
-#line 699 "runpicture.in"
+#line 700 "runpicture.in"
addFunc(ve, run::gen_runpicture55, primVoid(), SYM(drawpixel), formal(primPicture(), SYM(f), false, false), formal(primTriple(), SYM(v), false, false), formal(primPen(), SYM(p), false, false), formal(primReal(), SYM(width), true, false));
-#line 705 "runpicture.in"
+#line 706 "runpicture.in"
addFunc(ve, run::gen_runpicture56, primVoid(), SYM(draw), formal(primPicture(), SYM(f), false, false), formal(tripleArray(), SYM(v), false, false), formal(IntArray2(), SYM(vi), false, false), formal(tripleArray(), SYM(n), false, false), formal(IntArray2(), SYM(ni), false, false), formal(penArray() , SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false), formal(primReal(), SYM(prcshininess), false, false), formal(penArray() , SYM(c), true, false), formal(IntArray2(), SYM(ci), true, false));
-#line 715 "runpicture.in"
+#line 716 "runpicture.in"
addFunc(ve, run::gen_runpicture57, primTriple(), SYM(min3), formal(primPicture(), SYM(f), false, false));
-#line 720 "runpicture.in"
+#line 721 "runpicture.in"
addFunc(ve, run::gen_runpicture58, primTriple(), SYM(max3), formal(primPicture(), SYM(f), false, false));
-#line 725 "runpicture.in"
+#line 726 "runpicture.in"
addFunc(ve, run::gen_runpicture59, primTriple(), SYM(size3), formal(primPicture(), SYM(f), false, false));
-#line 731 "runpicture.in"
+#line 732 "runpicture.in"
addFunc(ve, run::gen_runpicture60, primPair(), SYM(minratio), formal(primPicture(), SYM(f), false, false));
-#line 736 "runpicture.in"
+#line 737 "runpicture.in"
addFunc(ve, run::gen_runpicture61, primPair(), SYM(maxratio), formal(primPicture(), SYM(f), false, false));
-#line 741 "runpicture.in"
+#line 742 "runpicture.in"
addFunc(ve, run::gen_runpicture62, primBoolean(), SYM(is3D), formal(primPicture(), SYM(f), false, false));
}
diff --git a/Build/source/utils/asymptote/runpicture.in b/Build/source/utils/asymptote/runpicture.in
index dc89096a3ef..e1f03bbb49b 100644
--- a/Build/source/utils/asymptote/runpicture.in
+++ b/Build/source/utils/asymptote/runpicture.in
@@ -525,6 +525,7 @@ void deconstruct(picture *f, picture *preamble=NULL, real magnification=1,
cmd.push_back("-q");
cmd.push_back("-dNOPAUSE");
cmd.push_back("-dBATCH");
+ cmd.push_back("-P");
cmd.push_back("-sDEVICE=pngalpha");
cmd.push_back("-dEPSCrop");
if(safe)
diff --git a/Build/source/utils/asymptote/runstring.cc b/Build/source/utils/asymptote/runstring.cc
index a22ca58b7b4..d1d3008ac2f 100644
--- a/Build/source/utils/asymptote/runstring.cc
+++ b/Build/source/utils/asymptote/runstring.cc
@@ -119,7 +119,7 @@ void checkformat(const char *ptr, bool intformat)
while(*ptr && strchr ("hlL", *ptr))
ptr++;
- if(*ptr == '%') ++ptr;
+ if(*ptr == '%') {++ptr; continue;}
else if(*ptr != '\0') {
if(intformat) {
switch(*ptr) {
@@ -156,6 +156,7 @@ void checkformat(const char *ptr, bool intformat)
}
}
}
+ break; // Only one argument is allowed.
} /* End of else statement */
}
}
@@ -170,124 +171,124 @@ void checkformat(const char *ptr, bool intformat)
#endif
namespace run {
// String operations
-#line 112 "runstring.in"
+#line 113 "runstring.in"
void emptyString(stack *Stack)
{
-#line 113 "runstring.in"
+#line 114 "runstring.in"
{Stack->push<string>(emptystring); return;}
}
-#line 118 "runstring.in"
+#line 119 "runstring.in"
// Int length(string *s);
void gen_runstring1(stack *Stack)
{
string * s=vm::pop<string *>(Stack);
-#line 119 "runstring.in"
+#line 120 "runstring.in"
{Stack->push<Int>((Int) s->length()); return;}
}
-#line 123 "runstring.in"
+#line 124 "runstring.in"
// Int find(string *s, string t, Int pos=0);
void gen_runstring2(stack *Stack)
{
Int pos=vm::pop<Int>(Stack,0);
string t=vm::pop<string>(Stack);
string * s=vm::pop<string *>(Stack);
-#line 124 "runstring.in"
+#line 125 "runstring.in"
size_t n=s->find(t,pos);
{Stack->push<Int>(n == string::npos ? (Int) -1 : (Int) n); return;}
}
-#line 129 "runstring.in"
+#line 130 "runstring.in"
// Int rfind(string *s, string t, Int pos=-1);
void gen_runstring3(stack *Stack)
{
Int pos=vm::pop<Int>(Stack,-1);
string t=vm::pop<string>(Stack);
string * s=vm::pop<string *>(Stack);
-#line 130 "runstring.in"
+#line 131 "runstring.in"
size_t n=s->rfind(t,pos);
{Stack->push<Int>(n == string::npos ? (Int) -1 : (Int) n); return;}
}
-#line 135 "runstring.in"
+#line 136 "runstring.in"
// string reverse(string s);
void gen_runstring4(stack *Stack)
{
string s=vm::pop<string>(Stack);
-#line 136 "runstring.in"
+#line 137 "runstring.in"
reverse(s.begin(),s.end());
{Stack->push<string>(s); return;}
}
-#line 141 "runstring.in"
+#line 142 "runstring.in"
// string insert(string s, Int pos, string t);
void gen_runstring5(stack *Stack)
{
string t=vm::pop<string>(Stack);
Int pos=vm::pop<Int>(Stack);
string s=vm::pop<string>(Stack);
-#line 142 "runstring.in"
+#line 143 "runstring.in"
if ((size_t) pos < s.length())
{Stack->push<string>(s.insert(pos,t)); return;}
{Stack->push<string>(s); return;}
}
-#line 148 "runstring.in"
+#line 149 "runstring.in"
// string substr(string* s, Int pos, Int n=-1);
void gen_runstring6(stack *Stack)
{
Int n=vm::pop<Int>(Stack,-1);
Int pos=vm::pop<Int>(Stack);
string* s=vm::pop<string*>(Stack);
-#line 149 "runstring.in"
+#line 150 "runstring.in"
if ((size_t) pos < s->length())
{Stack->push<string>(s->substr(pos,n)); return;}
{Stack->push<string>(emptystring); return;}
}
-#line 155 "runstring.in"
+#line 156 "runstring.in"
// string erase(string s, Int pos, Int n);
void gen_runstring7(stack *Stack)
{
Int n=vm::pop<Int>(Stack);
Int pos=vm::pop<Int>(Stack);
string s=vm::pop<string>(Stack);
-#line 156 "runstring.in"
+#line 157 "runstring.in"
if ((size_t) pos < s.length())
{Stack->push<string>(s.erase(pos,n)); return;}
{Stack->push<string>(s); return;}
}
-#line 162 "runstring.in"
+#line 163 "runstring.in"
// string downcase(string s);
void gen_runstring8(stack *Stack)
{
string s=vm::pop<string>(Stack);
-#line 163 "runstring.in"
+#line 164 "runstring.in"
std::transform(s.begin(),s.end(),s.begin(),tolower);
{Stack->push<string>(s); return;}
}
-#line 168 "runstring.in"
+#line 169 "runstring.in"
// string upcase(string s);
void gen_runstring9(stack *Stack)
{
string s=vm::pop<string>(Stack);
-#line 169 "runstring.in"
+#line 170 "runstring.in"
std::transform(s.begin(),s.end(),s.begin(),toupper);
{Stack->push<string>(s); return;}
}
// returns a string constructed by translating all occurrences of the string
// from in an array of string pairs {from,to} to the string to in string s.
-#line 176 "runstring.in"
+#line 177 "runstring.in"
// string replace(string *S, stringarray2 *translate);
void gen_runstring10(stack *Stack)
{
stringarray2 * translate=vm::pop<stringarray2 *>(Stack);
string * S=vm::pop<string *>(Stack);
-#line 177 "runstring.in"
+#line 178 "runstring.in"
size_t size=checkArray(translate);
for(size_t i=0; i < size; i++) {
array *a=read<array*>(translate,i);
@@ -314,18 +315,40 @@ void gen_runstring10(stack *Stack)
{Stack->push<string>(buf.str()); return;}
}
-#line 204 "runstring.in"
+#line 205 "runstring.in"
// string format(string *format, Int x, string locale=emptystring);
void gen_runstring11(stack *Stack)
{
string locale=vm::pop<string>(Stack,emptystring);
Int x=vm::pop<Int>(Stack);
string * format=vm::pop<string *>(Stack);
-#line 205 "runstring.in"
- const char *f=format->c_str();
+#line 206 "runstring.in"
+ ostringstream out;
+ const char *p0=format->c_str();
+ checkformat(p0,true);
- checkformat(f,true);
+ const char *p=p0;
+ const char *start=NULL;
+ while(*p != 0) {
+ char curr=*p;
+ if(curr == '%') {
+ p++;
+ if(*p != '%') {start=p-1; break;}
+ }
+ out << *(p++);
+ }
+
+ if(!start) {Stack->push<string>(out.str()); return;}
+
+ // Allow at most 1 argument
+ while(*p != 0) {
+ if(*p == '*' || *p == '$') {Stack->push<string>(out.str()); return;}
+ if(isupper(*p) || islower(*p)) {p++; break;}
+ p++;
+ }
+ string f=format->substr(start-p0,p-start);
+
const char *oldlocale=NULL;
if(!locale.empty()) {
@@ -334,12 +357,14 @@ void gen_runstring11(stack *Stack)
setlocale(LC_ALL,locale.c_str());
}
- Int size=snprintf(NULL,0,f,x)+1;
+ Int size=snprintf(NULL,0,f.c_str(),x)+1;
if(size < 1) size=255; // Workaround for non-C99 compliant systems.
char *buf=new char[size];
- snprintf(buf,size,f,x);
+ snprintf(buf,size,f.c_str(),x);
+
+ out << string(buf);
+ out << p;
- string s=string(buf);
delete[] buf;
if(oldlocale) {
@@ -347,10 +372,10 @@ void gen_runstring11(stack *Stack)
delete[] oldlocale;
}
- {Stack->push<string>(s); return;}
+ {Stack->push<string>(out.str()); return;}
}
-#line 234 "runstring.in"
+#line 259 "runstring.in"
// string format(string *format, string separator, real x, string locale=emptystring);
void gen_runstring12(stack *Stack)
{
@@ -358,15 +383,15 @@ void gen_runstring12(stack *Stack)
real x=vm::pop<real>(Stack);
string separator=vm::pop<string>(Stack);
string * format=vm::pop<string *>(Stack);
-#line 236 "runstring.in"
+#line 261 "runstring.in"
bool tex=getSetting<string>("tex") != "none";
bool texify=false;
ostringstream out;
- checkformat(format->c_str(),false);
+ const char *p0=format->c_str();
+ checkformat(p0,false);
const char *phantom="\\phantom{+}";
- const char *p0=format->c_str();
const char *p=p0;
const char *start=NULL;
@@ -483,12 +508,12 @@ void gen_runstring12(stack *Stack)
{Stack->push<string>(out.str()); return;}
}
-#line 361 "runstring.in"
+#line 386 "runstring.in"
// Int hex(string s);
void gen_runstring13(stack *Stack)
{
string s=vm::pop<string>(Stack);
-#line 362 "runstring.in"
+#line 387 "runstring.in"
istringstream is(s);
is.setf(std::ios::hex,std::ios::basefield);
Int value;
@@ -498,45 +523,45 @@ void gen_runstring13(stack *Stack)
error(buf);
}
-#line 372 "runstring.in"
+#line 397 "runstring.in"
// Int ascii(string s);
void gen_runstring14(stack *Stack)
{
string s=vm::pop<string>(Stack);
-#line 373 "runstring.in"
+#line 398 "runstring.in"
{Stack->push<Int>(s.empty() ? -1 : (unsigned char) s[0]); return;}
}
-#line 377 "runstring.in"
+#line 402 "runstring.in"
// string string(Int x);
void gen_runstring15(stack *Stack)
{
Int x=vm::pop<Int>(Stack);
-#line 378 "runstring.in"
+#line 403 "runstring.in"
ostringstream buf;
buf << x;
{Stack->push<string>(buf.str()); return;}
}
-#line 384 "runstring.in"
+#line 409 "runstring.in"
// string string(real x, Int digits=DBL_DIG);
void gen_runstring16(stack *Stack)
{
Int digits=vm::pop<Int>(Stack,DBL_DIG);
real x=vm::pop<real>(Stack);
-#line 385 "runstring.in"
+#line 410 "runstring.in"
ostringstream buf;
buf.precision(digits);
buf << x;
{Stack->push<string>(buf.str()); return;}
}
-#line 392 "runstring.in"
+#line 417 "runstring.in"
// string time(string format=defaulttimeformat);
void gen_runstring17(stack *Stack)
{
string format=vm::pop<string>(Stack,defaulttimeformat);
-#line 393 "runstring.in"
+#line 418 "runstring.in"
#ifdef HAVE_STRFTIME
const time_t bintime=time(NULL);
if(!strftime(Time,nTime,format.c_str(),localtime(&bintime))) {Stack->push<string>(""); return;}
@@ -546,13 +571,13 @@ void gen_runstring17(stack *Stack)
#endif
}
-#line 403 "runstring.in"
+#line 428 "runstring.in"
// string time(Int seconds, string format=defaulttimeformat);
void gen_runstring18(stack *Stack)
{
string format=vm::pop<string>(Stack,defaulttimeformat);
Int seconds=vm::pop<Int>(Stack);
-#line 404 "runstring.in"
+#line 429 "runstring.in"
#ifdef HAVE_STRFTIME
const time_t bintime=seconds;
if(!strftime(Time,nTime,format.c_str(),localtime(&bintime))) {Stack->push<string>(""); return;}
@@ -564,13 +589,13 @@ void gen_runstring18(stack *Stack)
#endif
}
-#line 416 "runstring.in"
+#line 441 "runstring.in"
// Int seconds(string t=emptystring, string format=emptystring);
void gen_runstring19(stack *Stack)
{
string format=vm::pop<string>(Stack,emptystring);
string t=vm::pop<string>(Stack,emptystring);
-#line 417 "runstring.in"
+#line 442 "runstring.in"
#if defined(HAVE_STRPTIME)
const time_t bintime=time(NULL);
tm tm=*localtime(&bintime);
@@ -587,45 +612,45 @@ namespace trans {
void gen_runstring_venv(venv &ve)
{
-#line 111 "runstring.in"
+#line 112 "runstring.in"
REGISTER_BLTIN(run::emptyString,"emptyString");
-#line 118 "runstring.in"
+#line 119 "runstring.in"
addFunc(ve, run::gen_runstring1, primInt(), SYM(length), formal(primString(), SYM(s), false, false));
-#line 123 "runstring.in"
+#line 124 "runstring.in"
addFunc(ve, run::gen_runstring2, primInt(), SYM(find), formal(primString(), SYM(s), false, false), formal(primString() , SYM(t), false, false), formal(primInt(), SYM(pos), true, false));
-#line 129 "runstring.in"
+#line 130 "runstring.in"
addFunc(ve, run::gen_runstring3, primInt(), SYM(rfind), formal(primString(), SYM(s), false, false), formal(primString() , SYM(t), false, false), formal(primInt(), SYM(pos), true, false));
-#line 135 "runstring.in"
+#line 136 "runstring.in"
addFunc(ve, run::gen_runstring4, primString() , SYM(reverse), formal(primString() , SYM(s), false, false));
-#line 141 "runstring.in"
+#line 142 "runstring.in"
addFunc(ve, run::gen_runstring5, primString() , SYM(insert), formal(primString() , SYM(s), false, false), formal(primInt(), SYM(pos), false, false), formal(primString() , SYM(t), false, false));
-#line 148 "runstring.in"
+#line 149 "runstring.in"
addFunc(ve, run::gen_runstring6, primString() , SYM(substr), formal(primString(), SYM(s), false, false), formal(primInt(), SYM(pos), false, false), formal(primInt(), SYM(n), true, false));
-#line 155 "runstring.in"
+#line 156 "runstring.in"
addFunc(ve, run::gen_runstring7, primString() , SYM(erase), formal(primString() , SYM(s), false, false), formal(primInt(), SYM(pos), false, false), formal(primInt(), SYM(n), false, false));
-#line 162 "runstring.in"
+#line 163 "runstring.in"
addFunc(ve, run::gen_runstring8, primString() , SYM(downcase), formal(primString() , SYM(s), false, false));
-#line 168 "runstring.in"
+#line 169 "runstring.in"
addFunc(ve, run::gen_runstring9, primString() , SYM(upcase), formal(primString() , SYM(s), false, false));
-#line 174 "runstring.in"
+#line 175 "runstring.in"
addFunc(ve, run::gen_runstring10, primString() , SYM(replace), formal(primString(), SYM(s), false, false), formal(stringArray2(), SYM(translate), false, false));
-#line 204 "runstring.in"
+#line 205 "runstring.in"
addFunc(ve, run::gen_runstring11, primString() , SYM(format), formal(primString(), SYM(format), false, false), formal(primInt(), SYM(x), false, false), formal(primString() , SYM(locale), true, false));
-#line 234 "runstring.in"
+#line 259 "runstring.in"
addFunc(ve, run::gen_runstring12, primString() , SYM(format), formal(primString(), SYM(format), false, false), formal(primString() , SYM(separator), false, false), formal(primReal(), SYM(x), false, false), formal(primString() , SYM(locale), true, false));
-#line 361 "runstring.in"
+#line 386 "runstring.in"
addFunc(ve, run::gen_runstring13, primInt(), SYM(hex), formal(primString() , SYM(s), false, false));
-#line 372 "runstring.in"
+#line 397 "runstring.in"
addFunc(ve, run::gen_runstring14, primInt(), SYM(ascii), formal(primString() , SYM(s), false, false));
-#line 377 "runstring.in"
+#line 402 "runstring.in"
addFunc(ve, run::gen_runstring15, primString() , SYM(string), formal(primInt(), SYM(x), false, false));
-#line 384 "runstring.in"
+#line 409 "runstring.in"
addFunc(ve, run::gen_runstring16, primString() , SYM(string), formal(primReal(), SYM(x), false, false), formal(primInt(), SYM(digits), true, false));
-#line 392 "runstring.in"
+#line 417 "runstring.in"
addFunc(ve, run::gen_runstring17, primString() , SYM(time), formal(primString() , SYM(format), true, false));
-#line 403 "runstring.in"
+#line 428 "runstring.in"
addFunc(ve, run::gen_runstring18, primString() , SYM(time), formal(primInt(), SYM(seconds), false, false), formal(primString() , SYM(format), true, false));
-#line 416 "runstring.in"
+#line 441 "runstring.in"
addFunc(ve, run::gen_runstring19, primInt(), SYM(seconds), formal(primString() , SYM(t), true, false), formal(primString() , SYM(format), true, false));
}
diff --git a/Build/source/utils/asymptote/runstring.in b/Build/source/utils/asymptote/runstring.in
index dc51972fe72..3da636d325a 100644
--- a/Build/source/utils/asymptote/runstring.in
+++ b/Build/source/utils/asymptote/runstring.in
@@ -64,7 +64,7 @@ void checkformat(const char *ptr, bool intformat)
while(*ptr && strchr ("hlL", *ptr))
ptr++;
- if(*ptr == '%') ++ptr;
+ if(*ptr == '%') {++ptr; continue;}
else if(*ptr != '\0') {
if(intformat) {
switch(*ptr) {
@@ -101,6 +101,7 @@ void checkformat(const char *ptr, bool intformat)
}
}
}
+ break; // Only one argument is allowed.
} /* End of else statement */
}
}
@@ -203,10 +204,32 @@ string replace(string *S, stringarray2 *translate)
string format(string *format, Int x, string locale=emptystring)
{
- const char *f=format->c_str();
+ ostringstream out;
+ const char *p0=format->c_str();
+ checkformat(p0,true);
- checkformat(f,true);
+ const char *p=p0;
+ const char *start=NULL;
+ while(*p != 0) {
+ char curr=*p;
+ if(curr == '%') {
+ p++;
+ if(*p != '%') {start=p-1; break;}
+ }
+ out << *(p++);
+ }
+ if(!start) return out.str();
+
+ // Allow at most 1 argument
+ while(*p != 0) {
+ if(*p == '*' || *p == '$') return out.str();
+ if(isupper(*p) || islower(*p)) {p++; break;}
+ p++;
+ }
+
+ string f=format->substr(start-p0,p-start);
+
const char *oldlocale=NULL;
if(!locale.empty()) {
@@ -215,12 +238,14 @@ string format(string *format, Int x, string locale=emptystring)
setlocale(LC_ALL,locale.c_str());
}
- Int size=snprintf(NULL,0,f,x)+1;
+ Int size=snprintf(NULL,0,f.c_str(),x)+1;
if(size < 1) size=255; // Workaround for non-C99 compliant systems.
char *buf=new char[size];
- snprintf(buf,size,f,x);
+ snprintf(buf,size,f.c_str(),x);
+
+ out << string(buf);
+ out << p;
- string s=string(buf);
delete[] buf;
if(oldlocale) {
@@ -228,7 +253,7 @@ string format(string *format, Int x, string locale=emptystring)
delete[] oldlocale;
}
- return s;
+ return out.str();
}
string format(string *format, string separator, real x,
@@ -238,10 +263,10 @@ string format(string *format, string separator, real x,
bool texify=false;
ostringstream out;
- checkformat(format->c_str(),false);
+ const char *p0=format->c_str();
+ checkformat(p0,false);
const char *phantom="\\phantom{+}";
- const char *p0=format->c_str();
const char *p=p0;
const char *start=NULL;
diff --git a/Build/source/utils/asymptote/runtime.cc b/Build/source/utils/asymptote/runtime.cc
index d560bafad00..b9f5e1f03e2 100644
--- a/Build/source/utils/asymptote/runtime.cc
+++ b/Build/source/utils/asymptote/runtime.cc
@@ -1440,7 +1440,7 @@ void gen_runtime111(stack *Stack)
guidevector v;
size_t start=cyclic ? n : n-1;
knot curr=f.Nodes(start);
- knot next;
+ knot next=curr;
for(size_t i=start; i > 0; --i) {
next=f.Nodes(i-1);
v.push_back(new pairguide(curr.z));
diff --git a/Build/source/utils/asymptote/runtime.in b/Build/source/utils/asymptote/runtime.in
index 9b508abed2e..da26c9f88cd 100644
--- a/Build/source/utils/asymptote/runtime.in
+++ b/Build/source/utils/asymptote/runtime.in
@@ -977,7 +977,7 @@ guide *reverse(guide *g)
guidevector v;
size_t start=cyclic ? n : n-1;
knot curr=f.Nodes(start);
- knot next;
+ knot next=curr;
for(size_t i=start; i > 0; --i) {
next=f.Nodes(i-1);
v.push_back(new pairguide(curr.z));
diff --git a/Build/source/utils/asymptote/settings.cc b/Build/source/utils/asymptote/settings.cc
index 67fd7a9d61b..a97226c24c5 100644
--- a/Build/source/utils/asymptote/settings.cc
+++ b/Build/source/utils/asymptote/settings.cc
@@ -83,6 +83,7 @@ const bool havegl=false;
mode_t mask;
string systemDir=ASYMPTOTE_SYSDIR;
+string defaultEPSdriver="eps2write";
#ifndef __MSDOS__
@@ -1239,7 +1240,7 @@ void initSettings() {
true));
addOption(new boolSetting("quiet", 'q',
- "Suppress welcome message"));
+ "Suppress welcome text and noninteractive stdout"));
addOption(new boolSetting("localhistory", 0,
"Use a local interactive history file"));
addOption(new IntSetting("historylines", 0, "n",
@@ -1301,6 +1302,7 @@ void initSettings() {
addOption(new envSetting("psviewer", defaultPSViewer));
addOption(new envSetting("gs", defaultGhostscript));
addOption(new envSetting("libgs", defaultGhostscriptLibrary));
+ addOption(new envSetting("epsdriver", defaultEPSdriver));
addOption(new envSetting("texpath", ""));
addOption(new envSetting("texcommand", ""));
addOption(new envSetting("dvips", "dvips"));
@@ -1371,7 +1373,11 @@ string lookup(const string& symbol)
{
string s;
mem::vector<string> cmd;
- cmd.push_back("kpsewhich");
+ string kpsewhich="kpsewhich";
+ string fullname=stripFile(argv0)+kpsewhich;
+ std::ifstream exists(fullname.c_str());
+ if(!exists) fullname=kpsewhich;
+ cmd.push_back(fullname);
cmd.push_back("--var-value="+symbol);
iopipestream pipe(cmd);
pipe >> s;
diff --git a/Build/source/utils/asymptote/stack.cc b/Build/source/utils/asymptote/stack.cc
index acfd05c1493..3a4711becb3 100644
--- a/Build/source/utils/asymptote/stack.cc
+++ b/Build/source/utils/asymptote/stack.cc
@@ -648,7 +648,8 @@ void error(const char* message)
void error(const ostringstream& message)
{
- error(message.str().c_str());
+ const string& s=message.str();
+ error(s.c_str());
}
const size_t STARTING_GLOBALS_SIZE = 1;
diff --git a/Build/source/utils/asymptote/tests/gs/ghostscript.asy b/Build/source/utils/asymptote/tests/gs/ghostscript.asy
index 6d341b1cd4c..0a76eb9a3c0 100644
--- a/Build/source/utils/asymptote/tests/gs/ghostscript.asy
+++ b/Build/source/utils/asymptote/tests/gs/ghostscript.asy
@@ -5,7 +5,9 @@ bool uptodate=texpath("A").length != 0;
if(!uptodate) {
write();
write();
- write("Please install Ghostscript version 9.14 or later.");
+ write("Incompatible Ghostscript version!");
+ write("Please set environment variable ASYMPTOTE_EPSDRIVER to");
+ write("\"epswrite\" for Ghostscript < 9.14 and to \"eps2write\" for Ghostscript >= 9.14");
write();
}
assert(uptodate);
diff --git a/Build/source/utils/asymptote/texfile.cc b/Build/source/utils/asymptote/texfile.cc
index a7873bb2729..bae910f7881 100644
--- a/Build/source/utils/asymptote/texfile.cc
+++ b/Build/source/utils/asymptote/texfile.cc
@@ -63,7 +63,7 @@ void texfile::prologue()
if(inlinetex) {
string prename=buildname(settings::outname(),"pre");
std::ofstream *outpreamble=new std::ofstream(prename.c_str());
- texpreamble(*outpreamble,processData().TeXpreamble);
+ texpreamble(*outpreamble,processData().TeXpreamble,true,false);
outpreamble->close();
}
diff --git a/Build/source/utils/asymptote/texfile.h b/Build/source/utils/asymptote/texfile.h
index 0a99b4aafd7..4a51459ee71 100644
--- a/Build/source/utils/asymptote/texfile.h
+++ b/Build/source/utils/asymptote/texfile.h
@@ -56,15 +56,16 @@ void latexfontencoding(T& out)
template<class T>
void texpreamble(T& out, mem::list<string>& preamble=processData().TeXpreamble,
- bool ASYalign=true)
+ bool ASYalign=true, bool ASYbox=true)
{
texuserpreamble(out,preamble);
string texengine=settings::getSetting<string>("tex");
if(settings::context(texengine))
out << "\\disabledirectives[system.errorcontext]%" << newl;
+ if(ASYbox)
+ out << "\\newbox\\ASYbox" << newl
+ << "\\newdimen\\ASYdimen" << newl;
out << "\\def\\ASYprefix{" << stripFile(settings::outname()) << "}" << newl
- << "\\newbox\\ASYbox" << newl
- << "\\newdimen\\ASYdimen" << newl
<< "\\long\\def\\ASYbase#1#2{\\leavevmode\\setbox\\ASYbox=\\hbox{#1}%"
<< "\\ASYdimen=\\ht\\ASYbox%" << newl
<< "\\setbox\\ASYbox=\\hbox{#2}\\lower\\ASYdimen\\box\\ASYbox}" << newl;
diff --git a/Build/source/utils/asymptote/wce b/Build/source/utils/asymptote/wce
index 39aea5724f2..4ace1b35633 100755
--- a/Build/source/utils/asymptote/wce
+++ b/Build/source/utils/asymptote/wce
@@ -1,8 +1,8 @@
#!/bin/sh
-echo -n "Testing errors..."
-./asy -noautoplain -debug errortest 2> errors.temp
+printf "Testing errors..."
+./asy -sysdir base -noautoplain -debug errortest 2> errors.temp
result=`diff errors.temp errors`
-if [ "$result" = "" ]; then
+if test "$result" = ""; then
echo PASSED.
else
echo FAILED.