diff options
author | Karl Berry <karl@freefriends.org> | 2009-06-29 00:06:37 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-06-29 00:06:37 +0000 |
commit | d9b69c486ff463e30179a9e8bdacf6710f0ebc91 (patch) | |
tree | 1ff82edb1147b80fc710394e364298779bc5b4d1 /Build/source/utils | |
parent | 8a2548cb37acbacd1a379a9771b3076788a210f0 (diff) |
asy 1.78
git-svn-id: svn://tug.org/texlive/trunk@13994 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils')
38 files changed, 3063 insertions, 2152 deletions
diff --git a/Build/source/utils/README b/Build/source/utils/README index c7e4928a072..71305f75bbb 100644 --- a/Build/source/utils/README +++ b/Build/source/utils/README @@ -5,7 +5,7 @@ You may freely use, modify and/or distribute this file. Extra utilities we (optionally) compile for TeX Live. See comments in ../texk/README. -asymptote 1.77 - checked 22jun09 +asymptote 1.78 - checked 29jun09 get 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 d7ca5719f70..2b7a6db0a67 100644 --- a/Build/source/utils/asymptote/ChangeLog +++ b/Build/source/utils/asymptote/ChangeLog @@ -1,4 +1,203 @@ ------------------------------------------------------------------------ +r4452 | jcbowman | 2009-06-24 13:16:28 -0600 (Wed, 24 Jun 2009) | 2 lines +Changed paths: + M /trunk/asymptote/asymptote.spec + M /trunk/asymptote/glrender.cc + +Fix title message (assuming zoom/menu button is unmodified). + +------------------------------------------------------------------------ +r4451 | jcbowman | 2009-06-24 12:26:15 -0600 (Wed, 24 Jun 2009) | 2 lines +Changed paths: + M /trunk/asymptote/doc/asymptote.texi + M /trunk/asymptote/picture.cc + M /trunk/asymptote/settings.cc + M /trunk/asymptote/settings.h + +Fix align. + +------------------------------------------------------------------------ +r4450 | jcbowman | 2009-06-24 12:11:02 -0600 (Wed, 24 Jun 2009) | 2 lines +Changed paths: + M /trunk/asymptote/doc/asymptote.texi + M /trunk/asymptote/doc/loggraph.asy + +Update documentation. + +------------------------------------------------------------------------ +r4449 | jcbowman | 2009-06-24 11:24:54 -0600 (Wed, 24 Jun 2009) | 2 lines +Changed paths: + M /trunk/asymptote/Makefile.in + A /trunk/asymptote/base/asy-kate.sh + M /trunk/asymptote/doc/asymptote.texi + +Add support for generating syntax highlighting for the KDE editor Kate. + +------------------------------------------------------------------------ +r4448 | jcbowman | 2009-06-24 11:17:55 -0600 (Wed, 24 Jun 2009) | 2 lines +Changed paths: + M /trunk/asymptote/doc/png/Makefile.in + +Remove redundant redundancy. + +------------------------------------------------------------------------ +r4447 | jcbowman | 2009-06-24 11:04:49 -0600 (Wed, 24 Jun 2009) | 2 lines +Changed paths: + M /trunk/asymptote/asymptote.nsi + +Change exit to exit /b (end currently executing batch file). + +------------------------------------------------------------------------ +r4446 | jcbowman | 2009-06-24 01:54:43 -0600 (Wed, 24 Jun 2009) | 2 lines +Changed paths: + M /trunk/asymptote/doc/asymptote.texi + M /trunk/asymptote/glrender.cc + M /trunk/asymptote/glrender.h + M /trunk/asymptote/settings.cc + +Implement customizable mouse bindings. + +------------------------------------------------------------------------ +r4445 | jcbowman | 2009-06-23 10:15:33 -0600 (Tue, 23 Jun 2009) | 2 lines +Changed paths: + M /trunk/asymptote/doc/png/Makefile.in + +Use --no-warn option for portability. + +------------------------------------------------------------------------ +r4444 | jcbowman | 2009-06-23 03:12:03 -0600 (Tue, 23 Jun 2009) | 2 lines +Changed paths: + M /trunk/asymptote/glrender.cc + +Fix interactive exports. + +------------------------------------------------------------------------ +r4443 | jcbowman | 2009-06-22 21:23:59 -0600 (Mon, 22 Jun 2009) | 2 lines +Changed paths: + M /trunk/asymptote/examples/label3.asy + M /trunk/asymptote/examples/label3ribbon.asy + M /trunk/asymptote/examples/label3solid.asy + M /trunk/asymptote/texfile.cc + +Increase textwidth and textheight. + +------------------------------------------------------------------------ +r4442 | jcbowman | 2009-06-22 13:31:48 -0600 (Mon, 22 Jun 2009) | 2 lines +Changed paths: + M /trunk/asymptote/configure.ac + +Fix configure --disable-gc. + +------------------------------------------------------------------------ +r4441 | jcbowman | 2009-06-22 11:48:21 -0600 (Mon, 22 Jun 2009) | 2 lines +Changed paths: + M /trunk/asymptote/glrender.cc + M /trunk/asymptote/main.cc + M /trunk/asymptote/picture.cc + M /trunk/asymptote/settings.h + +Fix thread locking. + +------------------------------------------------------------------------ +r4440 | jcbowman | 2009-06-22 07:59:23 -0600 (Mon, 22 Jun 2009) | 2 lines +Changed paths: + M /trunk/asymptote/Makefile.in + +Make the install-prebuilt target omit texhash. + +------------------------------------------------------------------------ +r4439 | jcbowman | 2009-06-22 01:27:24 -0600 (Mon, 22 Jun 2009) | 2 lines +Changed paths: + M /trunk/asymptote/patches/freeglut-cygwin.patch + +Clean up patch. + +------------------------------------------------------------------------ +r4438 | jcbowman | 2009-06-22 01:21:28 -0600 (Mon, 22 Jun 2009) | 2 lines +Changed paths: + M /trunk/asymptote/patches/README + A /trunk/asymptote/patches/freeglut-cygwin.patch + +Add patch to allow version 2.6.0-rc1 of freeglut.dll to be built under CYGWIN. + +------------------------------------------------------------------------ +r4437 | jcbowman | 2009-06-22 00:08:19 -0600 (Mon, 22 Jun 2009) | 7 lines +Changed paths: + M /trunk/asymptote/GUI/xasyMainWin.py + M /trunk/asymptote/asymptote.nsi + M /trunk/asymptote/doc/asymptote.texi + M /trunk/asymptote/patches/README + D /trunk/asymptote/patches/TkAlpha-Imaging-1.1.6.patch + D /trunk/asymptote/patches/TkAlpha-Imaging-1.1.6msdos.patch + D /trunk/asymptote/patches/movie15_20090323.patch + +Update xasy for Python 2.6.2 and Imaging-1.1.7b1 (which requires no +alpha support patches). + +Remove obsolete patches. + +Delete obsolete _imagingtk.pyd file. + +------------------------------------------------------------------------ +r4436 | jcbowman | 2009-06-21 21:24:26 -0600 (Sun, 21 Jun 2009) | 2 lines +Changed paths: + M /trunk/asymptote/doc/Makefile.in + +Prebuilt png files are not included in the CTAN distribution. + +------------------------------------------------------------------------ +r4435 | jcbowman | 2009-06-21 12:26:28 -0600 (Sun, 21 Jun 2009) | 2 lines +Changed paths: + M /trunk/asymptote/pen.h + +Add missing miterlimit defaults. + +------------------------------------------------------------------------ +r4434 | jcbowman | 2009-06-19 17:00:10 -0600 (Fri, 19 Jun 2009) | 2 lines +Changed paths: + M /trunk/asymptote/glrender.cc + +Fix mesh mode. + +------------------------------------------------------------------------ +r4433 | jcbowman | 2009-06-19 14:39:49 -0600 (Fri, 19 Jun 2009) | 2 lines +Changed paths: + M /trunk/asymptote/doc/asymptote.texi + +Add constructors to derived class example. + +------------------------------------------------------------------------ +r4432 | jcbowman | 2009-06-19 14:38:37 -0600 (Fri, 19 Jun 2009) | 4 lines +Changed paths: + M /trunk/asymptote/base/ode.asy + +Turn off fsal when dynamic=false. + +Implement E_Euler. + +------------------------------------------------------------------------ +r4431 | jcbowman | 2009-06-19 09:42:23 -0600 (Fri, 19 Jun 2009) | 2 lines +Changed paths: + M /trunk/asymptote/base/three.asy + M /trunk/asymptote/base/three_arrows.asy + M /trunk/asymptote/examples/soccerball.asy + +Respect linegranularity. + +------------------------------------------------------------------------ +r4430 | jcbowman | 2009-06-19 09:41:23 -0600 (Fri, 19 Jun 2009) | 2 lines +Changed paths: + M /trunk/asymptote/glrender.cc + +Swap patch and wireframe modes. + +------------------------------------------------------------------------ +r4429 | jcbowman | 2009-06-19 02:37:44 -0600 (Fri, 19 Jun 2009) | 1 line +Changed paths: + M /trunk/asymptote/configure.ac + +Increment version to 1.78svn. +------------------------------------------------------------------------ r4428 | jcbowman | 2009-06-19 00:53:54 -0600 (Fri, 19 Jun 2009) | 2 lines Changed paths: M /trunk/asymptote/doc/asymptote.texi diff --git a/Build/source/utils/asymptote/GUI/xasyMainWin.py b/Build/source/utils/asymptote/GUI/xasyMainWin.py index 865e057accb..0a1ddc63e36 100755 --- a/Build/source/utils/asymptote/GUI/xasyMainWin.py +++ b/Build/source/utils/asymptote/GUI/xasyMainWin.py @@ -57,13 +57,9 @@ class xasyMainWin: self.createWidgets() self.resetGUI() if sys.platform[:3] == "win": - site="http://effbot.org/downloads/PIL-1.1.6.win32-py2.5.exe" - if sys.version_info[0] != 2 or sys.version_info[1] != 5: - tkMessageBox.showerror("Failed Dependencies","Xasy requires Python 2.5 or 2.5.1. Please install http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi") - self.parent.destroy() - sys.exit(1) + site="http://effbot.org/downloads/PIL-1.1.7b1.win32-py2.6.exe" else: - site="http://effbot.org/downloads/Imaging-1.1.6.tar.gz after applying the patch http://asymptote.svn.sourceforge.net/viewvc/asymptote/trunk/asymptote/patches/TkAlpha-Imaging-1.1.6.patch" + site="http://effbot.org/downloads/Imaging-1.1.7b1.tar.gz" if not PILAvailable: tkMessageBox.showerror("Failed Dependencies","An error occurred loading the required PIL library. Please install "+site) self.parent.destroy() diff --git a/Build/source/utils/asymptote/Makefile.in b/Build/source/utils/asymptote/Makefile.in index 0892a1b5c10..2fb4e47b8c9 100644 --- a/Build/source/utils/asymptote/Makefile.in +++ b/Build/source/utils/asymptote/Makefile.in @@ -28,7 +28,7 @@ DIST = camp.tab.h camp.tab.cc lex.yy.cc runtime.h runtime.cc keywords.cc \ NAME = asy XNAME = x$(NAME) CLEAN = camp.output asy.list svnrevision.cc doc/version.texi GUI/xasyVersion.py $(XNAME) -EXTRA = asy-mode.el asy-init.el asy.vim asymptote.py reload.js nopapersize.ps +EXTRA = asy-mode.el asy-init.el asy.vim asy-kate.sh asymptote.py reload.js nopapersize.ps EXEXTRA = piicon.eps *.views *.dat DOCEXTRA = *.asy *.csv *.dat latexusage.tex externalprc.tex pixel.pdf KEYWORDS = base $(ASYMPTOTE_SITEDIR) @@ -150,9 +150,14 @@ asy-keywords.el: asy grep -v three_\* | grep -v featpost3D | xargs $(ASY) -l >> asy.list ./asy-list.pl asy.list @VERSION@ -install: asy-keywords.el install-asy install-man +install: asy-keywords.el install-texhash install-man -install-all: asy-keywords.el install-asy install-html +install-all: asy-keywords.el install-texhash install-html + +install-texhash: install-asy + -if test -z "$(DESTDIR)"; then \ + texhash; \ + fi install-asy: asy ${INSTALL} -d $(bindir) $(asydir) $(GUIdir) $(exampledir) \ @@ -170,9 +175,6 @@ install-asy: asy examples/animations/inlinemovie3.tex $(animationsdir) -${INSTALL} -p -m 644 $(addprefix doc/,$(LATEXFILES)) $(latexdir) -${INSTALL} -p -m 644 $(addprefix doc/,$(CONTEXTFILES)) $(contextdir) - -if test -z "$(DESTDIR)"; then \ - texhash; \ - fi install-html: html cd doc; $(MAKE) install-all diff --git a/Build/source/utils/asymptote/ReleaseNotes b/Build/source/utils/asymptote/ReleaseNotes index dea09f42cd9..55dd25f32f1 100644 --- a/Build/source/utils/asymptote/ReleaseNotes +++ b/Build/source/utils/asymptote/ReleaseNotes @@ -1,3 +1,16 @@ +Release Notes for Version 1.78 + +Thread locking issues were fixed. The linegranularity is now respected when +drawing thick curved lines. A bug in FSAL ODE integrators when using a +fixed time step was fixed. Missing miterlimit defaults were added. +Xasy was updated to use Python 2.6.2 and Imaging-1.1.7b1 (which requires no +alpha support patches). Obsolete patches were removed. More TeXLive build +issues were addressed: the install-prebuilt target omits texhash and does +not attempt to install PNG files for asymptote.info. A configuration +problem with --disable-gc was fixed. The 3D mouse bindings are now +customizable. Support was added for generating syntax highlighting for the KDE +editor Kate. + Release Notes for Version 1.77 Splined parametric surfaces were implemented; a bug in the Cartesian diff --git a/Build/source/utils/asymptote/asymptote.nsi b/Build/source/utils/asymptote/asymptote.nsi index 173e8b1d6c4..3bf67326163 100644 --- a/Build/source/utils/asymptote/asymptote.nsi +++ b/Build/source/utils/asymptote/asymptote.nsi @@ -70,6 +70,7 @@ ShowUnInstDetails show Section "Asymptote" SEC01 SetOutPath "$INSTDIR" + Delete "$INSTDIR\_imagingtk.pyd" SetOverwrite try File /r build-${PRODUCT_VERSION}\* @@ -91,7 +92,7 @@ Section "Asymptote" SEC01 FileWriteByte $0 "13" FileWriteByte $0 "10" - FileWrite $0 "if %errorlevel% == 0 exit" + FileWrite $0 "if %errorlevel% == 0 exit /b" FileWriteByte $0 "13" FileWriteByte $0 "10" diff --git a/Build/source/utils/asymptote/asymptote.spec b/Build/source/utils/asymptote/asymptote.spec index 4ef57e6e173..e15281fe91d 100644 --- a/Build/source/utils/asymptote/asymptote.spec +++ b/Build/source/utils/asymptote/asymptote.spec @@ -1,7 +1,7 @@ %{!?_texmf: %define _texmf %(eval "echo `kpsewhich -expand-var '$TEXMFLOCAL'`")} Name: asymptote -Version: 1.77 +Version: 1.78 Release: 1%{?dist} Summary: Descriptive vector graphics language diff --git a/Build/source/utils/asymptote/base/asy-kate.sh b/Build/source/utils/asymptote/base/asy-kate.sh new file mode 100644 index 00000000000..5f482b376d9 --- /dev/null +++ b/Build/source/utils/asymptote/base/asy-kate.sh @@ -0,0 +1,146 @@ +#!/bin/sh +echo '<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE language SYSTEM "language.dtd"> +<!-- based on asy-keywords.el and Highlighting file asymptote.xml by Christoph Hormann--> +<language version="1.0" kateversion="3.2.2" name="asymptote" section="Sources" extensions="*.asy" mimetype="text/x-asymptote" licence="LGPL" author="Carsten Brenner"> + +<highlighting> +' > asymptote.xml + +# 1. Change Name of lists in <\list> <list name="..."> +# 2. tail to get rid of the first lines +# 3. building the right line ending +# 4-5. kill linebreaks +# 6. change spaces into <\item><item> +# 7. Undo change (7.) in 'list name' +# 8. do some formatting + +cat asy-keywords.el | sed 's/^(.*\-\([^\-]*\)\-.*/\n<list name="\1"><item>/' | tail -14 | sed 's/ ))/<\/item><\/list>/' | tr '\n' '@' | sed 's/@//g' | sed 's/ /<\/item><item>/g' | sed 's/list<\/item><item>name/list name/g' | sed 's/></>\n</g' >> asymptote.xml + +echo ' +<contexts> + <context attribute="Normal Text" lineEndContext="#stay" name="Normal"> + <DetectSpaces /> + <RegExpr attribute="Preprocessor" context="Outscoped" String="#\s*if\s+0" beginRegion="Outscoped" firstNonSpace="true" /> + <DetectChar attribute="Preprocessor" context="Preprocessor" char="#" firstNonSpace="true" /> + <StringDetect attribute="Region Marker" context="Region Marker" String="//BEGIN" beginRegion="Region1" firstNonSpace="true" /> + <StringDetect attribute="Region Marker" context="Region Marker" String="//END" endRegion="Region1" firstNonSpace="true" /> + <keyword attribute="Keyword" context="#stay" String="keyword" /> + <keyword attribute="Extensions" context="#stay" String="extensions" /> + <keyword attribute="Function" context="#stay" String="function" /> + <keyword attribute="Data Type" context="#stay" String="type" /> + <keyword attribute="Constants" context="#stay" String="constants" /> + <keyword attribute="Variable" context="#stay" String="variable" /> + <HlCChar attribute="Char" context="#stay"/> + <DetectChar attribute="String" context="String" char="""/> + <DetectIdentifier /> + <Float attribute="Float" context="#stay"> + <AnyChar String="fF" attribute="Float" context="#stay"/> + </Float> + <HlCOct attribute="Octal" context="#stay"/> + <HlCHex attribute="Hex" context="#stay"/> + <Int attribute="Decimal" context="#stay"> + <StringDetect attribute="Decimal" context="#stay" String="ULL" insensitive="TRUE"/> + <StringDetect attribute="Decimal" context="#stay" String="LUL" insensitive="TRUE"/> + <StringDetect attribute="Decimal" context="#stay" String="LLU" insensitive="TRUE"/> + <StringDetect attribute="Decimal" context="#stay" String="UL" insensitive="TRUE"/> + <StringDetect attribute="Decimal" context="#stay" String="LU" insensitive="TRUE"/> + <StringDetect attribute="Decimal" context="#stay" String="LL" insensitive="TRUE"/> + <StringDetect attribute="Decimal" context="#stay" String="U" insensitive="TRUE"/> + <StringDetect attribute="Decimal" context="#stay" String="L" insensitive="TRUE"/> + </Int> + <IncludeRules context="##Doxygen" /> + <Detect2Chars attribute="Comment" context="Commentar 1" char="/" char1="/"/> + <Detect2Chars attribute="Comment" context="Commentar 2" char="/" char1="*" beginRegion="Comment"/> + <DetectChar attribute="Symbol" context="#stay" char="{" beginRegion="Brace1" /> + <DetectChar attribute="Symbol" context="#stay" char="}" endRegion="Brace1" /> + <AnyChar attribute="Symbol" context="#stay" String=":!%&()+,-/.*<=>?[]{|}~^;"/> + </context> + <context attribute="String" lineEndContext="#pop" name="String"> + <LineContinue attribute="String" context="#stay"/> + <HlCStringChar attribute="String Char" context="#stay"/> + <DetectChar attribute="String" context="#pop" char="""/> + </context> + <context attribute="Region Marker" lineEndContext="#pop" name="Region Marker"> + </context> + <context attribute="Comment" lineEndContext="#pop" name="Commentar 1"> + <DetectSpaces /> + <IncludeRules context="##Alerts" /> + <DetectIdentifier /> + </context> + <context attribute="Comment" lineEndContext="#stay" name="Commentar 2"> + <DetectSpaces /> + <Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="Comment"/> + <IncludeRules context="##Alerts" /> + <DetectIdentifier /> + </context> + <context attribute="Preprocessor" lineEndContext="#pop" name="Preprocessor"> + <LineContinue attribute="Preprocessor" context="#stay"/> + <RegExpr attribute="Preprocessor" context="Define" String="define.*((?=\\))"/> + <RegExpr attribute="Preprocessor" context="#stay" String="define.*"/> + <RangeDetect attribute="Prep. Lib" context="#stay" char=""" char1="""/> + <RangeDetect attribute="Prep. Lib" context="#stay" char="<" char1=">"/> + <IncludeRules context="##Doxygen" /> + <Detect2Chars attribute="Comment" context="Commentar 1" char="/" char1="/"/> + <Detect2Chars attribute="Comment" context="Commentar/Preprocessor" char="/" char1="*"/> + </context> + <context attribute="Preprocessor" lineEndContext="#pop" name="Define"> + <LineContinue attribute="Preprocessor" context="#stay"/> + </context> + <context attribute="Comment" lineEndContext="#stay" name="Commentar/Preprocessor"> + <DetectSpaces /> + <Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" /> + <DetectIdentifier /> + </context> + <context attribute="Comment" lineEndContext="#stay" name="Outscoped" > + <DetectSpaces /> + <IncludeRules context="##Alerts" /> + <DetectIdentifier /> + <DetectChar attribute="String" context="String" char="""/> + <IncludeRules context="##Doxygen" /> + <Detect2Chars attribute="Comment" context="Commentar 1" char="/" char1="/"/> + <Detect2Chars attribute="Comment" context="Commentar 2" char="/" char1="*" beginRegion="Comment"/> + <RegExpr attribute="Comment" context="Outscoped intern" String="#\s*if" beginRegion="Outscoped" firstNonSpace="true" /> + <RegExpr attribute="Preprocessor" context="#pop" String="#\s*(endif|else|elif)" endRegion="Outscoped" firstNonSpace="true" /> + </context> + <context attribute="Comment" lineEndContext="#stay" name="Outscoped intern"> + <DetectSpaces /> + <IncludeRules context="##Alerts" /> + <DetectIdentifier /> + <DetectChar attribute="String" context="String" char="""/> + <IncludeRules context="##Doxygen" /> + <Detect2Chars attribute="Comment" context="Commentar 1" char="/" char1="/"/> + <Detect2Chars attribute="Comment" context="Commentar 2" char="/" char1="*" beginRegion="Comment"/> + <RegExpr attribute="Comment" context="Outscoped intern" String="#\s*if" beginRegion="Outscoped" firstNonSpace="true"/> + <RegExpr attribute="Comment" context="#pop" String="#\s*endif" endRegion="Outscoped" firstNonSpace="true"/> + </context> + </contexts> + <itemDatas> + <itemData name="Char" defStyleNum="dsChar"/> + <itemData name="Comment" defStyleNum="dsComment"/> + <itemData name="Data Type" defStyleNum="dsDataType"/> + <itemData name="Decimal" defStyleNum="dsDecVal"/> + <itemData name="Extensions" defStyleNum="dsKeyword" color="#0095ff" selColor="#ffffff" bold="1" italic="0"/> + <itemData name="Float" defStyleNum="dsFloat"/> + <itemData name="Function" defStyleNum="dsFunction" /> + <itemData name="Hex" defStyleNum="dsBaseN"/> + <itemData name="Keyword" defStyleNum="dsKeyword"/> + <itemData name="Normal Text" defStyleNum="dsNormal"/> + <itemData name="Octal" defStyleNum="dsBaseN"/> + <itemData name="Prep. Lib" defStyleNum="dsOthers"/> + <itemData name="Preprocessor" defStyleNum="dsOthers"/> + <itemData name="Region Marker" defStyleNum="dsRegionMarker" /> + <itemData name="String Char" defStyleNum="dsChar"/> + <itemData name="String" defStyleNum="dsString"/> + <itemData name="Symbol" defStyleNum="dsNormal"/> + <itemData name="Variable" defStyleNum="dsOthers" /> + </itemDatas> + </highlighting> + <general> + <comments> + <comment name="singleLine" start="//" /> + <comment name="multiLine" start="/*" end="*/" region="Comment"/> + </comments> + <keywords casesensitive="1" /> + </general> + </language>' >> asymptote.xml diff --git a/Build/source/utils/asymptote/base/ode.asy b/Build/source/utils/asymptote/base/ode.asy index 643c56feec7..fe65f2f1c8e 100644 --- a/Build/source/utils/asymptote/base/ode.asy +++ b/Build/source/utils/asymptote/base/ode.asy @@ -1,24 +1,39 @@ real stepfactor=2.0; // Maximum dynamic step size adjustment factor. -struct RKTableau +struct coefficients { - int order; - real[] steps; + real[] factors; real[][] weights; real[] highOrderWeights; real[] lowOrderWeights; +} + +struct RKTableau +{ + int order; + real[] steps; + coefficients a; + void stepDependence(real h, real c, coefficients a) {} + real pgrow; real pshrink; + bool exponential; void operator init(int order, real[][] weights, real[] highOrderWeights, real[] lowOrderWeights=new real[], real[] steps=sequence(new real(int i) { - return sum(weights[i]);},weights.length)) { + return sum(weights[i]);},weights.length), + void stepDependence(real, real, coefficients)=null) { this.order=order; this.steps=steps; - this.weights=weights; - this.highOrderWeights=highOrderWeights; - this.lowOrderWeights=lowOrderWeights; + a.factors=array(steps.length+1,1); + a.weights=weights; + a.highOrderWeights=highOrderWeights; + a.lowOrderWeights=lowOrderWeights; + if(stepDependence != null) { + this.stepDependence=stepDependence; + exponential=true; + } pgrow=(order > 0) ? 1/order : 0; pshrink=(order > 1) ? 1/(order-1) : pgrow; } @@ -28,6 +43,13 @@ struct RKTableau RKTableau Euler=RKTableau(1,new real[][], new real[] {1}); +RKTableau E_Euler=RKTableau(1,new real[][], new real[] {1}, + new void (real h, real c, coefficients a) { + real x=-c*h; + a.factors[0]=exp(x); + a.highOrderWeights[0]=x != 0 ? expm1(x)/x : 1; + }); + // Second-Order Runge-Kutta RKTableau RK2=RKTableau(2,new real[][] {{1/2}}, new real[] {0,1}); @@ -50,12 +72,12 @@ RKTableau RK4=RKTableau(4,new real[][] {{1/2},{0,1/2},{0,0,1}}, new real[] {1/6,1/3,1/3,1/6}); // Fifth-Order Cash-Karp Runge-Kutta -RKTableau RK5CK=RKTableau(5,new real[][] {{1/5}, - {3/40,9/40}, - {3/10,-9/10,6/5}, - {-11/54,5/2,-70/27,35/27}, - {1631/55296,175/512,575/13824, - 44275/110592,253/4096}}, +RKTableau RK5=RKTableau(5,new real[][] {{1/5}, + {3/40,9/40}, + {3/10,-9/10,6/5}, + {-11/54,5/2,-70/27,35/27}, + {1631/55296,175/512,575/13824, + 44275/110592,253/4096}}, new real[] {37/378,0,250/621,125/594, 0,512/1771}, // 5th order new real[] {2825/27648,0,18575/48384,13525/55296, @@ -84,7 +106,7 @@ RKTableau RK5DP=RKTableau(5,new real[][] {{1/5}, new real[] {5179/57600,0,7571/16695,393/640, -92097/339200,187/2100,1/40}); // 4th order -real error(real error, real initial, real norm, real lowOrder, real diff) +real error(real error, real initial, real lowOrder, real norm, real diff) { if(initial != 0.0 && lowOrder != initial) { static real epsilon=realMin/realEpsilon; @@ -94,73 +116,89 @@ real error(real error, real initial, real norm, real lowOrder, real diff) return error; } -real adjust(real h, real error, real t, real tolmin, real tolmax, +real adjust(real h, real error, real t, real c, real tolmin, real tolmax, real dtmin, real dtmax, RKTableau tableau, bool verbose=true) { real dt=h; void report(real t) { - if(h != dt) - write("Time step changed from "+(string) dt+" to "+(string) h+" at t="+ - (string) t+"."); + if(h != dt) { + tableau.stepDependence(h,c,tableau.a); + if(verbose) + write("Time step changed from "+(string) dt+" to "+(string) h+" at t="+ + (string) t+"."); + } } if(error > tolmax) { h=max(h*max((tolmin/error)^tableau.pshrink,1/stepfactor),dtmin); - if(verbose) report(t); + report(t); return h; } if(error > 0 && error < tolmin) { h=min(h*min((tolmin/error)^tableau.pgrow,stepfactor),dtmax); - if(verbose) report(t+dt); + report(t+dt); } return h; } -// Integrate dy/dt=f(t,y) from a to b using initial conditions y, +// Integrate dy/dt+cy=f(t,y) from a to b using initial conditions y, // specifying either the step size h or the number of steps n. -real integrate(real y, real f(real t, real y), real a, real b=a, real h=0, - int n=0, bool dynamic=false, real tolmin=0, real tolmax=0, - real dtmin=0, real dtmax=realMax, RKTableau tableau, - bool verbose=false) +real integrate(real y, real c=0, real g(real t, real y), real a, real b=a, + real h=0, int n=0, bool dynamic=false, real tolmin=0, + real tolmax=0, real dtmin=0, real dtmax=realMax, + RKTableau tableau, bool verbose=false) { + real f(real t, real y)=(c == 0 || tableau.exponential) ? g : + new real(real t, real y) {return g(t,y)-c*y;}; + if(h == 0) { if(b == a) return y; if(n == 0) abort("Either n or h must be specified"); else h=(b-a)/n; } + + tableau.stepDependence(h,c,tableau.a); + real t=a; real f0; - bool fsal=tableau.lowOrderWeights.length > tableau.highOrderWeights.length; + if(tableau.a.lowOrderWeights.length == 0) dynamic=false; + bool fsal=dynamic && + (tableau.a.lowOrderWeights.length > tableau.a.highOrderWeights.length); if(fsal) f0=f(t,y); - if(tableau.lowOrderWeights.length == 0) dynamic=false; while(t < b) { real[] predictions={fsal ? f0 : f(t,y)}; for(int i=0; i < tableau.steps.length; ++i) predictions.push(f(t+h*tableau.steps[i], - y+h*dot(tableau.weights[i],predictions))); + tableau.a.factors[i]*y+h*dot(tableau.a.weights[i], + predictions))); - real highOrder=h*dot(tableau.highOrderWeights,predictions); + real highOrder=h*dot(tableau.a.highOrderWeights,predictions); + real Y=tableau.a.factors[tableau.steps.length]*y; if(dynamic) { real f1; if(fsal) { - f1=f(t+h,y+highOrder); + f1=f(t+h,Y+highOrder); predictions.push(f1); } - real lowOrder=h*dot(tableau.lowOrderWeights,predictions); + real lowOrder=h*dot(tableau.a.lowOrderWeights,predictions); real error; - error=error(error,y,y+highOrder,y+lowOrder,highOrder-lowOrder); + error=error(error,y,Y+lowOrder,Y+highOrder,highOrder-lowOrder); real dt=h; - h=adjust(h,error,t,tolmin,tolmax,dtmin,min(dtmax,b-t-h),tableau,verbose); + h=adjust(h,error,t,c,tolmin,tolmax,dtmin,min(dtmax,b-t-h),tableau,verbose); if(h >= dt) { t += dt; - y += highOrder; + y=Y+highOrder; f0=f1; } } else { t += h; - y += highOrder; + y=Y+highOrder; + } + real remain=b-t; + if(h > remain) { + h=remain; + tableau.stepDependence(h,c,tableau.a); } - h=min(h,b-t); if(t >= b || t+h == t) break; } return y; @@ -181,30 +219,31 @@ real[] integrate(real[] y, real[] f(real t, real[] y), real a, real b=a, real[] y=copy(y); real t=a; real[] f0; - bool fsal=tableau.lowOrderWeights.length > tableau.highOrderWeights.length; + if(tableau.a.lowOrderWeights.length == 0) dynamic=false; + bool fsal=dynamic && + (tableau.a.lowOrderWeights.length > tableau.a.highOrderWeights.length); if(fsal) f0=f(t,y); - if(tableau.lowOrderWeights.length == 0) dynamic=false; while(t < b) { real[][] predictions={fsal ? f0 : f(t,y)}; for(int i=0; i < tableau.steps.length; ++i) predictions.push(f(t+h*tableau.steps[i], - y+h*tableau.weights[i]*predictions)); + y+h*tableau.a.weights[i]*predictions)); - real[] highOrder=h*tableau.highOrderWeights*predictions; + real[] highOrder=h*tableau.a.highOrderWeights*predictions; if(dynamic) { real[] f1; if(fsal) { f1=f(t+h,y+highOrder); predictions.push(f1); } - real[] lowOrder=h*tableau.lowOrderWeights*predictions; + real[] lowOrder=h*tableau.a.lowOrderWeights*predictions; real error; for(int i=0; i < y.length; ++i) - error=error(error,y[i],y[i]+highOrder[i],y[i]+lowOrder[i], + error=error(error,y[i],y[i]+lowOrder[i],y[i]+highOrder[i], highOrder[i]-lowOrder[i]); real dt=h; - h=adjust(h,error,t,tolmin,tolmax,dtmin,min(dtmax,b-t-h),tableau,verbose); + h=adjust(h,error,t,0,tolmin,tolmax,dtmin,min(dtmax,b-t-h),tableau,verbose); if(h >= dt) { t += dt; y += highOrder; diff --git a/Build/source/utils/asymptote/base/three.asy b/Build/source/utils/asymptote/base/three.asy index d454d032b23..d42ea928b16 100644 --- a/Build/source/utils/asymptote/base/three.asy +++ b/Build/source/utils/asymptote/base/three.asy @@ -1956,7 +1956,7 @@ draw=new void(frame f, path3 g, material p=currentpen, if(settings.thick) { real width=linewidth(q); if(width > 0) { - surface s=tube(g,width); + surface s=tube(g,width,p.granularity); int L=length(g); if(L >= 0) { if(!cyclic(g)) { diff --git a/Build/source/utils/asymptote/base/three_arrows.asy b/Build/source/utils/asymptote/base/three_arrows.asy index 78ee56d9f04..418065e5e1e 100644 --- a/Build/source/utils/asymptote/base/three_arrows.asy +++ b/Build/source/utils/asymptote/base/three_arrows.asy @@ -48,7 +48,7 @@ void bend(surface s, path3 g, real L) } } -void render(path3 s, void f(path3, real)) +void render(path3 s, real granularity=tubegranularity, void f(path3, real)) { static int maxdepth=ceil(-log(realEpsilon)/log(2))+1; void Split(triple z0, triple c0, triple c1, triple z1, real t0=0, real t1=1, @@ -62,7 +62,7 @@ void render(path3 s, void f(path3, real)) --depth; for(int i=0; i <= nintervals; ++i) { R=min(R,radius(z0,c0,c1,z1,i/nintervals)); - if(S > max(tubegranularity*R,fuzz)) { + if(S > max(granularity*R,fuzz)) { triple m0=0.5*(z0+c0); triple m1=0.5*(c0+c1); triple m2=0.5*(c1+z1); @@ -82,7 +82,7 @@ void render(path3 s, void f(path3, real)) Split(point(s,0),postcontrol(s,0),precontrol(s,1),point(s,1)); } -surface tube(path3 g, real width) +surface tube(path3 g, real width, real granularity=tubegranularity) { surface tube; real r=0.5*width; @@ -97,7 +97,7 @@ surface tube(path3 g, real width) triple u=point(g,i+1)-v; tube.append(shift(v)*align(unit(u))*scale(r,r,abs(u))*unitcylinder); } else { - render(subpath(g,i,i+1),new void(path3 q, real) { + render(subpath(g,i,i+1),granularity,new void(path3 q, real) { real L=arclength(q); surface segment=scale(r,r,L)*unitcylinder; bend(segment,q,L); diff --git a/Build/source/utils/asymptote/configure b/Build/source/utils/asymptote/configure index 351ccac314a..1572c23aa59 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.63 for Asymptote 1.77. +# Generated by GNU Autoconf 2.63 for Asymptote 1.78. # # Report bugs to <http://sourceforge.net/projects/asymptote>. # @@ -596,8 +596,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='Asymptote' PACKAGE_TARNAME='asymptote' -PACKAGE_VERSION='1.77' -PACKAGE_STRING='Asymptote 1.77' +PACKAGE_VERSION='1.78' +PACKAGE_STRING='Asymptote 1.78' PACKAGE_BUGREPORT='http://sourceforge.net/projects/asymptote' # Factoring default headers for most tests. @@ -1294,7 +1294,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 1.77 to adapt to many kinds of systems. +\`configure' configures Asymptote 1.78 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1355,7 +1355,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Asymptote 1.77:";; + short | recursive ) echo "Configuration of Asymptote 1.78:";; esac cat <<\_ACEOF @@ -1465,7 +1465,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Asymptote configure 1.77 +Asymptote configure 1.78 generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1479,7 +1479,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 1.77, which was +It was created by Asymptote $as_me 1.78, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ @@ -5934,67 +5934,7 @@ if test "$GXX" = yes ; then fi fi -GCVERSION=gc-7.1 - -as_ac_File=`$as_echo "ac_cv_file_$GCVERSION.tar.gz" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $GCVERSION.tar.gz" >&5 -$as_echo_n "checking for $GCVERSION.tar.gz... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } -if test -r "$GCVERSION.tar.gz"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - ac_cv_use_gc=$GCVERSION -else - GC_SYSTEM="$GCVERSION.tar.gz not found: using system Boehm garbage collector" -ac_cv_use_gc="system" -fi - -# Check whether --enable-gc was given. -if test "${enable_gc+set}" = set; then - enableval=$enable_gc; - if test "x$enableval" != "xyes"; then - ac_cv_use_gc=$enableval - GC_SYSTEM="" - fi - -fi - - -OPTIONS="-D_FILE_OFFSET_BITS=64 " -GCLIB= -GCPPLIB= -GCNAME="Boehm Garbage Collector" -GCOPTIONS="" -if test "x$ac_cv_use_gc" != "xno" ; then - OPTIONS=$OPTIONS"-DUSEGC " - case $ac_cv_use_gc in - system|*[\\/]*) - if test "x$ac_cv_use_gc" = "xsystem" ; then - INCL="-I$prefix/include/gc -I/usr/include/gc" - LIBS=$LIBS"-L$prefix/lib " - else - INCL="-I$ac_cv_use_gc/include/gc" - LIBS=$LIBS"-L$ac_cv_use_gc/lib " - fi - CPPFLAGS_SAVE=$CPPFLAGS - CPPFLAGS=$CPPFLAGS" $INCL" - ac_ext=cpp +ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -6227,7 +6167,345 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test "${ac_cv_header_gc_h+set}" = set; then +if test "${ac_cv_header_tr1_unordered_map+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for tr1/unordered_map" >&5 +$as_echo_n "checking for tr1/unordered_map... " >&6; } +if test "${ac_cv_header_tr1_unordered_map+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_tr1_unordered_map" >&5 +$as_echo "$ac_cv_header_tr1_unordered_map" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking tr1/unordered_map usability" >&5 +$as_echo_n "checking tr1/unordered_map usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <tr1/unordered_map> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking tr1/unordered_map presence" >&5 +$as_echo_n "checking tr1/unordered_map presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <tr1/unordered_map> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: tr1/unordered_map: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: tr1/unordered_map: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: tr1/unordered_map: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: tr1/unordered_map: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: tr1/unordered_map: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: tr1/unordered_map: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: tr1/unordered_map: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: tr1/unordered_map: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: tr1/unordered_map: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: tr1/unordered_map: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: tr1/unordered_map: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: tr1/unordered_map: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: tr1/unordered_map: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: tr1/unordered_map: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: tr1/unordered_map: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: tr1/unordered_map: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## -------------------------------------------------------- ## +## Report this to http://sourceforge.net/projects/asymptote ## +## -------------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for tr1/unordered_map" >&5 +$as_echo_n "checking for tr1/unordered_map... " >&6; } +if test "${ac_cv_header_tr1_unordered_map+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_header_tr1_unordered_map=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_tr1_unordered_map" >&5 +$as_echo "$ac_cv_header_tr1_unordered_map" >&6; } + +fi +if test "x$ac_cv_header_tr1_unordered_map" = x""yes; then + : +else + if test "${ac_cv_header_ext_hash_map+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for ext/hash_map" >&5 +$as_echo_n "checking for ext/hash_map... " >&6; } +if test "${ac_cv_header_ext_hash_map+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_ext_hash_map" >&5 +$as_echo "$ac_cv_header_ext_hash_map" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking ext/hash_map usability" >&5 +$as_echo_n "checking ext/hash_map usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <ext/hash_map> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking ext/hash_map presence" >&5 +$as_echo_n "checking ext/hash_map presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <ext/hash_map> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: ext/hash_map: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: ext/hash_map: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: ext/hash_map: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: ext/hash_map: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: ext/hash_map: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: ext/hash_map: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: ext/hash_map: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: ext/hash_map: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: ext/hash_map: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: ext/hash_map: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: ext/hash_map: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: ext/hash_map: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: ext/hash_map: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: ext/hash_map: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: ext/hash_map: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: ext/hash_map: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## -------------------------------------------------------- ## +## Report this to http://sourceforge.net/projects/asymptote ## +## -------------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for ext/hash_map" >&5 +$as_echo_n "checking for ext/hash_map... " >&6; } +if test "${ac_cv_header_ext_hash_map+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_header_ext_hash_map=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_ext_hash_map" >&5 +$as_echo "$ac_cv_header_ext_hash_map" >&6; } + +fi +if test "x$ac_cv_header_ext_hash_map" = x""yes; then + : +else + OPTIONS=$OPTIONS"-DNOHASH " +fi + + +fi + + + +GCVERSION=gc-7.1 + +as_ac_File=`$as_echo "ac_cv_file_$GCVERSION.tar.gz" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $GCVERSION.tar.gz" >&5 +$as_echo_n "checking for $GCVERSION.tar.gz... " >&6; } +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + test "$cross_compiling" = yes && + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { (exit 1); exit 1; }; } +if test -r "$GCVERSION.tar.gz"; then + eval "$as_ac_File=yes" +else + eval "$as_ac_File=no" +fi +fi +ac_res=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + ac_cv_use_gc=$GCVERSION +else + GC_SYSTEM="$GCVERSION.tar.gz not found: using system Boehm garbage collector" +ac_cv_use_gc="system" +fi + +# Check whether --enable-gc was given. +if test "${enable_gc+set}" = set; then + enableval=$enable_gc; + if test "x$enableval" != "xyes"; then + ac_cv_use_gc=$enableval + GC_SYSTEM="" + fi + +fi + + +OPTIONS="-D_FILE_OFFSET_BITS=64 " +GCLIB= +GCPPLIB= +GCNAME="Boehm Garbage Collector" +GCOPTIONS="" +if test "x$ac_cv_use_gc" != "xno" ; then + OPTIONS=$OPTIONS"-DUSEGC " + case $ac_cv_use_gc in + system|*[\\/]*) + if test "x$ac_cv_use_gc" = "xsystem" ; then + INCL="-I$prefix/include/gc -I/usr/include/gc" + LIBS=$LIBS"-L$prefix/lib " + else + INCL="-I$ac_cv_use_gc/include/gc" + LIBS=$LIBS"-L$ac_cv_use_gc/lib " + fi + CPPFLAGS_SAVE=$CPPFLAGS + CPPFLAGS=$CPPFLAGS" $INCL" + if test "${ac_cv_header_gc_h+set}" = set; then { $as_echo "$as_me:$LINENO: checking for gc.h" >&5 $as_echo_n "checking for gc.h... " >&6; } if test "${ac_cv_header_gc_h+set}" = set; then @@ -6586,283 +6864,6 @@ else getopt="getopt getopt1" fi -if test "${ac_cv_header_tr1_unordered_map+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for tr1/unordered_map" >&5 -$as_echo_n "checking for tr1/unordered_map... " >&6; } -if test "${ac_cv_header_tr1_unordered_map+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_tr1_unordered_map" >&5 -$as_echo "$ac_cv_header_tr1_unordered_map" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking tr1/unordered_map usability" >&5 -$as_echo_n "checking tr1/unordered_map usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <tr1/unordered_map> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking tr1/unordered_map presence" >&5 -$as_echo_n "checking tr1/unordered_map presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <tr1/unordered_map> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: tr1/unordered_map: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: tr1/unordered_map: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: tr1/unordered_map: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: tr1/unordered_map: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: tr1/unordered_map: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: tr1/unordered_map: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: tr1/unordered_map: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: tr1/unordered_map: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: tr1/unordered_map: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: tr1/unordered_map: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: tr1/unordered_map: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: tr1/unordered_map: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: tr1/unordered_map: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: tr1/unordered_map: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: tr1/unordered_map: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: tr1/unordered_map: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to http://sourceforge.net/projects/asymptote ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for tr1/unordered_map" >&5 -$as_echo_n "checking for tr1/unordered_map... " >&6; } -if test "${ac_cv_header_tr1_unordered_map+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_tr1_unordered_map=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_tr1_unordered_map" >&5 -$as_echo "$ac_cv_header_tr1_unordered_map" >&6; } - -fi -if test "x$ac_cv_header_tr1_unordered_map" = x""yes; then - : -else - if test "${ac_cv_header_ext_hash_map+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for ext/hash_map" >&5 -$as_echo_n "checking for ext/hash_map... " >&6; } -if test "${ac_cv_header_ext_hash_map+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_ext_hash_map" >&5 -$as_echo "$ac_cv_header_ext_hash_map" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking ext/hash_map usability" >&5 -$as_echo_n "checking ext/hash_map usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <ext/hash_map> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking ext/hash_map presence" >&5 -$as_echo_n "checking ext/hash_map presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <ext/hash_map> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: ext/hash_map: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: ext/hash_map: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: ext/hash_map: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: ext/hash_map: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: ext/hash_map: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: ext/hash_map: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: ext/hash_map: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: ext/hash_map: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: ext/hash_map: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: ext/hash_map: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: ext/hash_map: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: ext/hash_map: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: ext/hash_map: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: ext/hash_map: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: ext/hash_map: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: ext/hash_map: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## -------------------------------------------------------- ## -## Report this to http://sourceforge.net/projects/asymptote ## -## -------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for ext/hash_map" >&5 -$as_echo_n "checking for ext/hash_map... " >&6; } -if test "${ac_cv_header_ext_hash_map+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_ext_hash_map=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_ext_hash_map" >&5 -$as_echo "$ac_cv_header_ext_hash_map" >&6; } - -fi -if test "x$ac_cv_header_ext_hash_map" = x""yes; then - : -else - OPTIONS=$OPTIONS"-DNOHASH " -fi - - -fi - - @@ -11495,7 +11496,7 @@ exec 6>&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 1.77, which was +This file was extended by Asymptote $as_me 1.78, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -11554,7 +11555,7 @@ Report bugs to <bug-autoconf@gnu.org>." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -Asymptote config.status 1.77 +Asymptote config.status 1.78 configured by $0, generated by GNU Autoconf 2.63, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff --git a/Build/source/utils/asymptote/configure.ac b/Build/source/utils/asymptote/configure.ac index 7013f0eac33..7f62e565a89 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],[1.77],[http://sourceforge.net/projects/asymptote]) +AC_INIT([Asymptote],[1.78],[http://sourceforge.net/projects/asymptote]) VERSION=$PACKAGE_VERSION AC_SUBST(VERSION) @@ -109,6 +109,9 @@ if test "$GXX" = yes ; then fi fi +AC_CHECK_HEADER(tr1/unordered_map,, + [AC_CHECK_HEADER(ext/hash_map,,OPTIONS=$OPTIONS"-DNOHASH ")]) + GCVERSION=gc-7.1 AC_CHECK_FILE($GCVERSION.tar.gz, @@ -194,8 +197,6 @@ AC_ARG_ENABLE(gc-full-debug, AC_CHECK_FUNC(getopt_long_only, AC_DEFINE(HAVE_GNU_GETOPT_H, 1, [Define if getopt.h is the GNU version]), getopt="getopt getopt1",) -AC_CHECK_HEADER(tr1/unordered_map,, - [AC_CHECK_HEADER(ext/hash_map,,OPTIONS=$OPTIONS"-DNOHASH ")]) AC_SUBST(getopt) AC_SUBST(GCDIR) diff --git a/Build/source/utils/asymptote/doc/CAD.pdf b/Build/source/utils/asymptote/doc/CAD.pdf Binary files differindex 64efd1de27d..08ad610ec8b 100644 --- a/Build/source/utils/asymptote/doc/CAD.pdf +++ b/Build/source/utils/asymptote/doc/CAD.pdf diff --git a/Build/source/utils/asymptote/doc/FAQ/asy-faq.info b/Build/source/utils/asymptote/doc/FAQ/asy-faq.info index 32cecefe8af..459f0f82ebd 100644 --- a/Build/source/utils/asymptote/doc/FAQ/asy-faq.info +++ b/Build/source/utils/asymptote/doc/FAQ/asy-faq.info @@ -9,7 +9,7 @@ END-INFO-DIR-ENTRY File: $prefix.info, Node: Top, Next: Question 1.1, Up: (dir) ASYMPTOTE FREQUENTLY ASKED QUESTIONS - 19 Jun 2009 + 24 Jun 2009 This is the list of Frequently Asked Questions about Asymptote (asy). diff --git a/Build/source/utils/asymptote/doc/Makefile.in b/Build/source/utils/asymptote/doc/Makefile.in index dba3799ffeb..8199088ac9d 100644 --- a/Build/source/utils/asymptote/doc/Makefile.in +++ b/Build/source/utils/asymptote/doc/Makefile.in @@ -83,7 +83,7 @@ install: man faq install-man cd FAQ; $(MAKE) install install-prebuilt: install-man - cd png; $(MAKE) install-all + cd png; $(MAKE) install cd FAQ; $(MAKE) install-prebuilt install-all: $(DOCFILES) asy.1 faq latexusage.eps install-man diff --git a/Build/source/utils/asymptote/doc/asy.1 b/Build/source/utils/asymptote/doc/asy.1 index d0699897509..3ec3130e9aa 100644 --- a/Build/source/utils/asymptote/doc/asy.1 +++ b/Build/source/utils/asymptote/doc/asy.1 @@ -35,7 +35,7 @@ description, see the Info files. View output; command-line only. .TP .B \-a,\-align C|B|T|Z -Center, Bottom, Top, or Zero page alignment [Center]. +Center, Bottom, Top, or Zero page alignment [C]. .TP .B \-antialias n Antialiasing width for rasterized output [2]. diff --git a/Build/source/utils/asymptote/doc/asymptote.pdf b/Build/source/utils/asymptote/doc/asymptote.pdf Binary files differindex 0a1d2dd30b0..f78b011b65c 100644 --- a/Build/source/utils/asymptote/doc/asymptote.pdf +++ b/Build/source/utils/asymptote/doc/asymptote.pdf diff --git a/Build/source/utils/asymptote/doc/asymptote.texi b/Build/source/utils/asymptote/doc/asymptote.texi index bd67b18ac44..8fb751251b6 100644 --- a/Build/source/utils/asymptote/doc/asymptote.texi +++ b/Build/source/utils/asymptote/doc/asymptote.texi @@ -210,6 +210,8 @@ as @TeX{}/@code{LaTeX} is the de-facto standard for typesetting equations. @item @code{LaTeX} typesetting of labels, for overall document consistency; +@item the ability to generate and embed 3D vector @acronym{PRC} graphics into @acronym{PDF} files; + @item a natural coordinate-based framework for technical drawings, inspired by @code{MetaPost}, with a much cleaner, powerful C++-like programming syntax; @@ -562,20 +564,19 @@ in the @code{Asymptote} source directory. @cindex multisampling @anchor{multisampling} @noindent -If your graphics card supports multisampling, we recommend using SVN -revision 761 (or later) of @code{freeglut} to support antialiasing in +If your graphics card supports multisampling, we recommend using version +@code{2.6.0-rc1} (or later) of @code{freeglut} to support antialiasing in @code{Asymptote}'s adaptive @code{OpenGL} 3D renderer (@code{MacOS X} users can skip this step since @code{Asymptote} is configured to use the native glut library on that platform). Download @quotation -@url{http://freeglut.svn.sourceforge.net/viewvc/freeglut/trunk/freeglut/freeglut.tar.gz} +@url{http://prdownloads.sourceforge.net/freeglut/freeglut-2.6.0-rc1.tar.gz} @end quotation @noindent and type (as the root user): @verbatim -tar -zxf freeglut.tar.gz -cd freeglut -sh autogen.sh +tar -zxf freeglut-2.6.0-rc1.tar.gz +cd freeglut-2.6.0 ./configure --prefix=/usr make install cd .. @@ -697,16 +698,23 @@ just add to @code{~/.vim/ftplugin/asy.vim}: @verbatim setlocal makeprg=asy\ % setlocal errorformat=%f:\ %l.%c:\ %m - @end verbatim +@cindex @code{KDE editor} +@cindex @code{Kate} +@cindex @code{asymptote.xml} +Syntax highlighting support for the @acronym{KDE} editor @code{Kate} +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 Subversion @section Subversion (SVN) @cindex Subversion @cindex SVN The following commands are needed to install the latest development version of -@code{Asymptote} using @acronym{Subversion}: +@code{Asymptote} using @code{Subversion}: @verbatim svn co http://asymptote.svn.sourceforge.net/svnroot/asymptote/trunk/asymptote cd asymptote @@ -4057,8 +4065,9 @@ Much like in C++, casting (@pxref{Casts}) provides for an elegant implementation of structure inheritance, including virtual functions: @verbatim struct parent { - real x=1; - void virtual(int) {write (0);} + real x; + void operator init(int x) {this.x=x;} + void virtual(int) {write(0);} void f() {virtual(1);} } @@ -4066,24 +4075,25 @@ void write(parent p) {write(p.x);} struct child { parent parent; - real y=2; - void virtual(int x) {write (x);} + real y=3; + void operator init(int x) {parent.operator init(x);} + void virtual(int x) {write(x);} parent.virtual=virtual; void f()=parent.f; } parent operator cast(child child) {return child.parent;} -parent p; -child c; +parent p=parent(1); +child c=child(2); -write(c); // Outputs 1; +write(c); // Outputs 2; p.f(); // Outputs 0; c.f(); // Outputs 1; -write(c.parent.x); // Outputs 1; -write(c.y); // Outputs 2; +write(c.parent.x); // Outputs 2; +write(c.y); // Outputs 3; @end verbatim For further examples of structures, see @code{Legend} and @code{picture} in @@ -7465,20 +7475,31 @@ version of the @code{freeglut} library controlled with the setting @code{multisample}. An initial screen position can be specified with the pair setting @code{position}, where negative values are interpreted as relative to the corresponding -maximum screen dimension. The mouse bindings are: +maximum screen dimension. The default settings @cindex mouse bindings +@verbatim +import settings; +leftbutton=new string[] {"rotate","zoom","shift",""}; +middlebutton=new string[] {"menu"}; +rightbutton=new string[] {"zoom/menu","rotateX","rotateY","rotateZ"}; +wheelup=new string[] {"zoomin"}; +wheeldown=new string[] {"zoomout"}; +@end verbatim +bind the mouse buttons as follows: @itemize @item Left: rotate -@item shift Left: zoom -@item ctrl Left: shift +@item Shift Left: zoom +@item Ctrl Left: shift @item Middle: menu -@item Wheel: zoom +@item Wheel Up: zoom in +@item Wheel Down: zoom out @item Right: zoom @item Right double click: menu -@item shift Right: rotate about the X axis -@item ctrl Right: rotate about the Y axis -@item alt Right: rotate about the Z axis +@item Shift Right: rotate about the X axis +@item Ctrl Right: rotate about the Y axis +@item Alt Right: rotate about the Z axis @end itemize + The keyboard shortcuts are: @cindex keyboard bindings: @itemize @@ -8810,23 +8831,21 @@ or manually install the @code{tkinter}, @code{tix}, @code{tk}, and @code{tk-devel} packages. Pictures are deconstructed into the @acronym{PNG} image format, which -supports full alpha channel transparency. Under @code{Microsoft -Windows}, this requires @code{Python 2.5 (or 2.5.1)} and the -@code{Python Imaging Library}: +supports full alpha channel transparency. Under @code{Microsoft Windows}, +this requires @code{Python 2.6.2} and the @code{Python Imaging Library}: @quotation -@url{http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi} +@url{http://www.python.org/ftp/python/2.6.2/python-2.6.2.msi} @end quotation @quotation -@url{http://effbot.org/downloads/PIL-1.1.6.win32-py2.5.exe}. +@url{http://effbot.org/downloads/PIL-1.1.7b1.win32-py2.6.exe}. @end quotation @noindent On @code{UNIX} systems, place -@url{http://effbot.org/downloads/Imaging-1.1.6.tar.gz} in the +@url{http://effbot.org/downloads/Imaging-1.1.7b1.tar.gz} in the @code{Asymptote} source directory, and type (as the root user): @verbatim -tar -zxf Imaging-1.1.6.tar.gz -cd Imaging-1.1.6 -patch -p1 < ../patches/TkAlpha-Imaging-1.1.6.patch +tar -zxf Imaging-1.1.7b1.tar.gz +cd Imaging-1.1.7b1 python setup.py install @end verbatim @@ -8943,7 +8962,7 @@ To receive announcements of upcoming releases, please subscribe to @cindex bug reports @noindent If you find a bug in @code{Asymptote}, please check (if possible) -whether the bug is still present in the latest @acronym{Subversion} +whether the bug is still present in the latest @code{Subversion} developmental code (@pxref{Subversion}) before submitting a bug report. New bugs can be submitted using the Bug Tracking System at @quotation @@ -9218,14 +9237,14 @@ Melenchuk, Martin Wiebusch, and Stefan Knorr. @c LocalWords: pdfreloadOptions deferred OpenGL Phong Blinn renderer unitbox @c LocalWords: bezulate Shardt's rasterized viewport unitdisk unitplane devel @c LocalWords: unitcylinder unitcone solidcone unitfrustum unitsphere nslices -@c LocalWords: DPostScript YZZero freeglut externalprc nonrendered nosafe -@c LocalWords: unithemisphere versa XYplane xypart unitsolidcone YZEquals +@c LocalWords: DPostScript YZZero freeglut externalprc nonrendered nosafe KDE +@c LocalWords: unithemisphere versa XYplane xypart unitsolidcone YZEquals xml @c LocalWords: XZEquals XYEquals XZZero XYZero InTicks OutTicks InOutTicks @c LocalWords: fitscreen planeproject strokepath meshlight nullpens arrowdir @c LocalWords: diffusepen ambientpen emissivepen specularpen arrowbarb keyval @c LocalWords: hstretch vstretch roundbox nonconvex miterlimit basealigin @c LocalWords: maxviewport maxtile antialiased sphericalharmonic attachfile -@c LocalWords: vertexshading smoothelevation glOptions iconified iconify +@c LocalWords: vertexshading smoothelevation glOptions iconified iconify kate @c LocalWords: psviewerOptions pdfviewerOptions viewportmargin asyattach @c LocalWords: multisampling autogen multisample coloredpath relstep flowdir @c LocalWords: colortype coloredSegments coloredNodes trefoilknot scaledgraph @@ -9235,5 +9254,6 @@ Melenchuk, Martin Wiebusch, and Stefan Knorr. @c LocalWords: subregions nonsimply functionshade shader floatingdisk TopView @c LocalWords: functionshading nonselfintersecting maxlength LeftView odetest @c LocalWords: vectorfieldsphere RightView FrontView BackView BottomView -@c LocalWords: addViews outprefix addAllViews xsplinetype ysplinetype -@c LocalWords: usplinetype vsplinetype +@c LocalWords: addViews outprefix addAllViews xsplinetype ysplinetype rotateX +@c LocalWords: usplinetype vsplinetype leftbutton middlebutton rightbutton +@c LocalWords: rotateY rotateZ wheelup zoomin wheeldown zoomout diff --git a/Build/source/utils/asymptote/doc/loggraph.asy b/Build/source/utils/asymptote/doc/loggraph.asy index 9dee2ffbbff..edd9d3e0a67 100644 --- a/Build/source/utils/asymptote/doc/loggraph.asy +++ b/Build/source/utils/asymptote/doc/loggraph.asy @@ -8,8 +8,8 @@ scale(Log,Log); draw(graph(f,0.1,10)); -//xlimits(1,10); -//ylimits(0.1,1); +//xlimits(1,10,Crop); +//ylimits(0.1,1,Crop); dot(Label("(3,5)",align=S),Scale((3,5))); diff --git a/Build/source/utils/asymptote/doc/options b/Build/source/utils/asymptote/doc/options index dffc98eb199..e81df8a83a9 100644 --- a/Build/source/utils/asymptote/doc/options +++ b/Build/source/utils/asymptote/doc/options @@ -3,7 +3,7 @@ Usage: ../asy [options] [file ...] Options (negate by replacing - with -no): -V,-View View output; command-line only --a,-align C|B|T|Z Center, Bottom, Top, or Zero page alignment [Center] +-a,-align C|B|T|Z Center, Bottom, Top, or Zero page alignment [C] -antialias n Antialiasing width for rasterized output [2] -auto3D Automatically activate 3D scene [true] -autoimport string Module to automatically import diff --git a/Build/source/utils/asymptote/doc/png/Makefile.in b/Build/source/utils/asymptote/doc/png/Makefile.in index 2af460f8252..864db45c736 100644 --- a/Build/source/utils/asymptote/doc/png/Makefile.in +++ b/Build/source/utils/asymptote/doc/png/Makefile.in @@ -20,9 +20,9 @@ index.html: $(SOURCE) $(ASYFILES:.asy=.png) makeinfo --html ../asymptote -o . asymptote.info: $(SOURCE) - makeinfo --no-split ../asymptote >& /dev/null + makeinfo --no-warn --no-split ../asymptote -info: asymptote.info $(SOURCE) +info: $(SOURCE) makeinfo --no-split ../asymptote html: index.html diff --git a/Build/source/utils/asymptote/doc/png/asymptote.info b/Build/source/utils/asymptote/doc/png/asymptote.info index 729aca905aa..79354b1366e 100644 --- a/Build/source/utils/asymptote/doc/png/asymptote.info +++ b/Build/source/utils/asymptote/doc/png/asymptote.info @@ -1,7 +1,7 @@ -This is asymptote.info, produced by makeinfo version 4.13 from +This is asymptote.info, produced by makeinfo version 4.7 from ../asymptote.texi. -This file documents `Asymptote', version 1.76. + This file documents `Asymptote', version 1.78. `http://asymptote.sourceforge.net' @@ -14,7 +14,7 @@ This file documents `Asymptote', version 1.76. INFO-DIR-SECTION Languages START-INFO-DIR-ENTRY -* asymptote: (asymptote). Vector graphics language. +* asymptote: (asymptote/asymptote). Vector graphics language. END-INFO-DIR-ENTRY @@ -23,7 +23,7 @@ File: asymptote.info, Node: Top, Next: Description, Up: (dir) Asymptote ********* -This file documents `Asymptote', version 1.76. +This file documents `Asymptote', version 1.78. `http://asymptote.sourceforge.net' @@ -149,7 +149,7 @@ Base modules * contour:: Contour lines * contour3:: Contour surfaces * slopefield:: Slope fields - +* ode:: Ordinary differential equations Graphical User Interface @@ -195,6 +195,9 @@ weaker syntax and capabilities) called `MetaPost'. * `LaTeX' typesetting of labels, for overall document consistency; + * the ability to generate and embed 3D vector PRC graphics into PDF + files; + * a natural coordinate-based framework for technical drawings, inspired by `MetaPost', with a much cleaner, powerful C++-like programming syntax; @@ -253,7 +256,7 @@ File: asymptote.info, Node: Installation, Next: Tutorial, Prev: Description, * Uninstall:: Goodbye, `Asymptote'! After following the instructions for your specific distribution, -please see also *note Configuring::. +please see also *Note Configuring::. We recommend subscribing to new release announcements at @@ -271,14 +274,16 @@ File: asymptote.info, Node: UNIX binary distributions, Next: MacOS X binary di We release both `tgz' and RPM binary distributions of `Asymptote'. The root user can install the `Linux i386' `tgz' distribution of version `x.xx' of `Asymptote' with the commands: + tar -C / -zxf asymptote-x.xx.i386.tgz texhash The `texhash' command, which installs LaTeX style files, is optional. The executable file will be `/usr/local/bin/asy') and example code will -be installed by default in `/usr/local/share/doc/asymptote/examples'. +be installed by default in `/tmp/ainst/share/doc/asymptote/examples'. Fedora users can easily install the most recent version of `Asymptote' with the command + yum --enablerepo=rawhide install asymptote To install the latest version of `Asymptote' on a Debian-based @@ -365,10 +370,11 @@ interactive mode to work properly. Users of `ggv' will need to enable `UNIX' one must manually redisplay by pressing the `r' key). Configuration variables are most easily set as `Asymptote' variables -in the configuration file (by default, `.asy/config.asy' in the user's -home directory or `%USERPROFILE%\.asy\config.asy' under `MSDOS'); *note -configuration file::. Here are the default values of several important -configuration variables under `UNIX': +in an optional configuration file (by default, `.asy/config.asy' in the +user's home directory or `%USERPROFILE%\.asy\config.asy' under +`MSDOS'); *note configuration file::. Here are the default values of +several important configuration variables under `UNIX': + import settings; @@ -388,10 +394,11 @@ the `PostScript'-to-PDF processor `Ghostscript', available from The setting `pdfviewer' specifies the location of the PDF viewer. On `UNIX' systems, to support automatic document reloading in `Adobe Reader', we recommend copying the file `reload.js' from the `Asymptote' -system directory (by default, `/usr/local/share/asymptote' under `UNIX' +system directory (by default, `/tmp/ainst/share/asymptote' under `UNIX' to `~/.adobe/Acrobat/x.x/JavaScripts/', where `x.x' represents the appropriate `Adobe Reader' version number. The automatic document reload feature must then be explicitly enabled by putting + import settings; pdfreload=true; pdfreloadOptions="-tempFile"; @@ -413,6 +420,7 @@ variables `paperwidth' and `paperheight'. The following configuration variables normally do not require adjustment: + texpath texcommand texdvicommand @@ -427,6 +435,7 @@ xasy Configuration variables may also be set or overwritten with a command-line option: + asy -psviewer=gsview -V venn Alternatively, system environment versions of the above configuration @@ -434,6 +443,7 @@ variables may be set in the conventional way. The corresponding environment variable name is obtained by converting the configuration variable name to upper case and prepending `ASYMPTOTE_': for example, to set the environment variable + ASYMPTOTE_PSVIEWER="C:\Program Files\Ghostgum\gsview\gsview32.exe"; under `Microsoft Windows XP': 1. Click on the `Start' button; @@ -463,7 +473,7 @@ following paths, in the order listed: (`%USERPROFILE%\.asy' under `MSDOS'); 4. The `Asymptote' system directory (by default, - `/usr/local/share/asymptote' under `UNIX' and `C:\Program + `/tmp/ainst/share/asymptote' under `UNIX' and `C:\Program Files\Asymptote' under `MSDOS'). @@ -474,6 +484,7 @@ File: asymptote.info, Node: Compiling from UNIX source, Next: Editing modes, To compile and install a `UNIX' executable from a source release `x.xx', first execute the commands: + gunzip asymptote-x.xx.src.tgz tar -xf asymptote-x.xx.src.tar cd asymptote-x.xx @@ -482,21 +493,22 @@ used; if it is old we recommend first putting `http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-7.1.tar.gz' in the `Asymptote' source directory. -If your graphics card supports multisampling, we recommend using SVN -revision 761 (or later) of `freeglut' to support antialiasing in +If your graphics card supports multisampling, we recommend using version +`2.6.0-rc1' (or later) of `freeglut' to support antialiasing in `Asymptote''s adaptive `OpenGL' 3D renderer (`MacOS X' users can skip this step since `Asymptote' is configured to use the native glut library on that platform). Download - `http://freeglut.svn.sourceforge.net/viewvc/freeglut/trunk/freeglut/freeglut.tar.gz' + `http://prdownloads.sourceforge.net/freeglut/freeglut-2.6.0-rc1.tar.gz' and type (as the root user): -tar -zxf freeglut.tar.gz -cd freeglut -sh autogen.sh + +tar -zxf freeglut-2.6.0-rc1.tar.gz +cd freeglut-2.6.0 ./configure --prefix=/usr make install cd .. Then compile `Asymptote' with the commands + ./configure make all make install @@ -511,11 +523,13 @@ the `texinfo-tex' package. If you get errors from a broken `texinfo' or For a (default) system-wide installation, the last command should be done as the root user. To install without root privileges, change the `./configure' command to + ./configure --prefix=$HOME/asymptote One can disable use of the Boehm garbage collector by configuring with `./configure --disable-gc'. For a list of other configuration options, say `./configure --help'. For example, one can tell configure to look for header files and libraries in nonstandard locations: + ./configure CFLAGS=-I/opt/usr/include LDFLAGS=-L/opt/usr/lib If you are compiling `Asymptote' with `gcc', you will need a @@ -544,8 +558,9 @@ File: asymptote.info, Node: Editing modes, Next: Subversion, Prev: Compiling Users of `emacs' can edit `Asymptote' code with the mode `asy-mode', after enabling it by putting the following lines in their `.emacs' initialization file, replacing `ASYDIR' with the location of the -`Asymptote' system directory (by default, `/usr/local/share/asymptote' +`Asymptote' system directory (by default, `/tmp/ainst/share/asymptote' or `C:\Program Files\Asymptote' under `MSDOS'): + (add-to-list 'load-path "ASYDIR") (autoload 'asy-mode "asy-mode.el" "Asymptote major mode." t) (autoload 'lasy-mode "asy-mode.el" "hybrid Asymptote/Latex major mode." t) @@ -570,9 +585,10 @@ pressing the sequence keys `C-h f asy-mode <RET>'. Fans of `vim' can customize `vim' for `Asymptote' with -`cp /usr/local/share/asymptote/asy.vim ~/.vim/syntax/asy.vim' +`cp /tmp/ainst/share/asymptote/asy.vim ~/.vim/syntax/asy.vim' and add the following to their `~/.vimrc' file: + augroup filetypedetect au BufNewFile,BufRead *.asy setf asy augroup END @@ -581,9 +597,15 @@ filetype plugin on If any of these directories or files don't exist, just create them. To set `vim' up to run the current asymptote script using `:make' just add to `~/.vim/ftplugin/asy.vim': + setlocal makeprg=asy\ % setlocal errorformat=%f:\ %l.%c:\ %m + Syntax highlighting support for the KDE editor `Kate' can be enabled +by running `asy-kate.sh' in the `/tmp/ainst/share/asymptote' directory +and putting the generated `asymptote.xml' file in +`~/.kde/share/apps/katepart/syntax/'. + File: asymptote.info, Node: Subversion, Next: Uninstall, Prev: Editing modes, Up: Installation @@ -591,7 +613,8 @@ File: asymptote.info, Node: Subversion, Next: Uninstall, Prev: Editing modes, ==================== The following commands are needed to install the latest development -version of `Asymptote' using Subversion: +version of `Asymptote' using `Subversion': + svn co http://asymptote.svn.sourceforge.net/svnroot/asymptote/trunk/asymptote cd asymptote ./autogen.sh @@ -608,11 +631,13 @@ File: asymptote.info, Node: Uninstall, Prev: Subversion, Up: Installation ============= To uninstall an `Linux i386' binary distribution, use the commands + tar -zxvf asymptote-x.xx.i386.tgz | xargs --replace=% rm /% texhash To uninstall all `Asymptote' files installed from a source distribution, use the command + make uninstall @@ -627,10 +652,11 @@ _An excellent user-written `Asymptote' tutorial is also available from_ To draw a line from coordinate (0,0) to coordinate (100,100) using `Asymptote''s interactive mode, type at the command prompt: + asy draw((0,0)--(100,100)); - + The units here are `PostScript' "big points" (1 `bp' = 1/72 `inch'); `--' means join with a linear segment. In `Asymptote' coordinates like @@ -642,7 +668,7 @@ You can use the arrow keys in interactive mode to edit previous lines (assuming that you have support for the GNU `readline' library enabled). The tab key will automatically complete unambiguous words; otherwise, hitting tab again will show the possible choices. Further -commands specific to interactive mode are described in *note +commands specific to interactive mode are described in *Note Interactive mode::. In batch mode, `Asymptote' reads commands directly from a file. To @@ -651,6 +677,7 @@ try this out, type draw((0,0)--(100,100)); into a file, say test.asy. Then execute this file with the `MSDOS' or `UNIX' command + asy -V test `MSDOS' users can drag and drop the file onto the Desktop `asy' icon or make `Asymptote' the default application for files with the @@ -666,11 +693,12 @@ path like this square: draw((0,0)--(100,0)--(100,100)--(0,100)--cycle); - + It is often inconvenient to work directly with `PostScript' coordinates. The next example draws a unit square scaled to width 101 bp and height 101 bp. The output is identical to that of the previous example. + size(101,101); draw((0,0)--(1,0)--(1,1)--(0,1)--cycle); @@ -686,13 +714,15 @@ determined by the other direction (*note size::): size(0,3cm); draw(unitsquare); - + To make the user coordinates represent multiples of exactly `1cm': + unitsize(1cm); draw(unitsquare); One can also specify different x and y unit sizes: + unitsize(1cm,2cm); draw(unitsquare); @@ -707,7 +737,7 @@ label("$B$",(1,0),SE); label("$C$",(1,1),NE); label("$D$",(0,1),NW); - + `Asymptote' uses the standard compass directions `E=(1,0)', `N=(0,1)', `NE=unit(N+E)', and `ENE=unit(E+NE)', etc., which along with the @@ -721,13 +751,16 @@ name of the module where it is defined: `plain.E'. size(100,0); draw((1,0){up}..{left}(0,1)); - + In general, a path is specified as a list of pairs (or other paths) interconnected with `--', which denotes a straight line segment, or -`..', which denotes a cubic spline. Specifying a final node `cycle' -creates a cyclic path that connects smoothly back to the initial node, -as in this approximation (accurate to within 0.06%) of a unit circle: +`..', which denotes a cubic spline. + + Specifying a final node `cycle' creates a cyclic path that connects +smoothly back to the initial node, as in this approximation (accurate +to within 0.06%) of a unit circle: + path unitcircle=E..N..W..S..cycle; Each interior node of a cubic spline may be given a direction prefix @@ -739,7 +772,7 @@ only on their interior side. A cubic spline between the node z_0, with postcontrol point c_0, and the node z_1, with precontrol point c_1, is computed as the Bezier curve - + As illustrated in the diagram below, the third-order midpoint (m_5) constructed from two endpoints z_0 and z_1 and two control points c_0 @@ -749,7 +782,7 @@ construct the desired curve, by using the newly extracted third-order midpoint as an endpoint and the respective second- and first-order midpoints as control points: - + Here m_0, m_1 and m_2 are the first-order midpoints, m_3 and m_4 are the second-order midpoints, and m_5 is the third-order midpoint. The @@ -771,6 +804,7 @@ properties: The user can specify explicit control points between two nodes like this: + draw((0,0)..controls (0,100) and (100,100)..(100,0)); However, it is usually more convenient to just use the `..' @@ -783,12 +817,14 @@ path) by specifying direction, tension, and curl values. approximates a straight line. One can change the spline tension from its default value of 1 to any real value greater than or equal to 0.75 (cf. John D. Hobby, Discrete and Computational Geometry 1, 1986): + draw((100,0)..tension 2 ..(100,100)..(0,100)); draw((100,0)..tension 2 and 1 ..(100,100)..(0,100)); draw((100,0)..tension atleast 1 ..(100,100)..(0,100)); The curl parameter specifies the curvature at the endpoints of a path (0 means straight; the default value of 1 means approximately circular): + draw((100,0){curl 0}..(100,100)..{curl 0}(0,100)); The `MetaPost ...' path connector, which requests, when possible, an @@ -800,12 +836,12 @@ Rest arguments::). For example, compare draw((0,0){up}..(100,25){right}..(200,0){down}); - + with draw((0,0){up}::(100,25){right}::(200,0){down}); - + The `---' connector is an abbreviation for `..tension atleast infinity..' and the `&' connector concatenates two paths, after first @@ -824,13 +860,14 @@ path unitcircle=E..N..W..S..cycle; path g=scale(2)*unitcircle; filldraw(unitcircle^^g,evenodd+yellow,black); - + The `PostScript' even-odd fill rule here specifies that only the region bounded between the two unit circles is filled (*note fillrule::). In this example, the same effect can be achieved by using the default zero winding number fill rule, if one is careful to alternate the orientation of the paths: + filldraw(unitcircle^^reverse(g),yellow,black); The `^^' operator is used by the `box(triple, triple)' function in @@ -854,9 +891,9 @@ label("(1,0,0)",(1,0,0),S); label("(0,1,0)",(0,1,0),E); label("(0,0,1)",(0,0,1),Z); - -See section *note graph:: (or the online `Asymptote' gallery and + +See section *Note graph:: (or the online `Asymptote' gallery and external links posted at `http://asymptote.sourceforge.net') for further examples, including two and three-dimensional scientific graphs. Additional examples have been posted by Philippe Ivaldi at @@ -881,6 +918,7 @@ picture can be output with the `shipout' function (*note shipout::). If you wish to draw `PostScript' objects on top of labels (or verbatim `tex' commands; *note tex::), the `layer' command may be used to start a new `PostScript/LaTeX' layer: + void layer(picture pic=currentpicture); The `layer' function gives one full control over the order in which @@ -906,6 +944,7 @@ File: asymptote.info, Node: draw, Next: fill, Up: Drawing commands 4.1 draw ======== + void draw(picture pic=currentpicture, Label L="", path g, align align=NoAlign, pen p=currentpen, arrowbar arrow=None, arrowbar bar=None, margin margin=NoMargin, @@ -965,6 +1004,7 @@ directly in `PostScript' units, independent of the pen line width. The legend for a picture `pic' can be fit and aligned to a frame with the routine: + frame legend(picture pic=currentpicture, int perline=1, real xmargin=legendmargin, real ymargin=xmargin, real linelength=legendlinelength, @@ -988,6 +1028,7 @@ about::). diameter equal to an explicit pen line width or the default line width magnified by `dotfactor' (6 by default), using the specified filltype (*note filltype::): + void dot(picture pic=currentpicture, pair z, pen p=currentpen, filltype filltype=Fill); void dot(picture pic=currentpicture, Label L, pair z, align align=NoAlign, @@ -1003,14 +1044,16 @@ second routine, the `format' argument will be used to format a string based on the dot location (here `defaultformat' is `"$%.4g$"'). The third routine draws a dot at every point of a pair array `z'. One can also draw a dot at every node of a path: + void dot(picture pic=currentpicture, Label[] L=new Label[], path g, align align=RightSide, string format=defaultformat, pen p=currentpen, filltype filltype=Fill); - See *note pathmarkers:: and *note markers:: for more general methods + See *Note pathmarkers:: and *Note markers:: for more general methods for marking path nodes. To draw a fixed-sized object (in `PostScript' coordinates) about the user coordinate `origin', use the routine + void draw(pair origin, picture pic=currentpicture, Label L="", path g, align align=NoAlign, pen p=currentpen, arrowbar arrow=None, arrowbar bar=None, margin margin=NoMargin, Label legend="", @@ -1022,6 +1065,7 @@ File: asymptote.info, Node: fill, Next: clip, Prev: draw, Up: Drawing comman 4.2 fill ======== + void fill(picture pic=currentpicture, path g, pen p=currentpen); Fill the interior region bounded by the cyclic path `g' on the picture @@ -1030,26 +1074,31 @@ Fill the interior region bounded by the cyclic path `g' on the picture There is also a convenient `filldraw' command, which fills the path and then draws in the boundary. One can specify separate pens for each operation: + void filldraw(picture pic=currentpicture, path g, pen fillpen=currentpen, pen drawpen=currentpen); This fixed-size version of `fill' allows one to fill an object described in `PostScript' coordinates about the user coordinate `origin': + void fill(pair origin, picture pic=currentpicture, path g, pen p=currentpen); This is just a convenient abbreviation for the commands: + picture opic; fill(opic,g,p); add(pic,opic,origin); The routine + void filloutside(picture pic=currentpicture, path g, pen p=currentpen); fills the region exterior to the path `g', out to the current boundary of picture `pic'. Lattice gradient shading varying smoothly over a two-dimensional array of pens `p', using fill rule `fillrule', can be produced with + void latticeshade(picture pic=currentpicture, path g, bool stroke=false, pen fillrule=currentpen, pen[][] p) If `stroke=true', the region filled is the same as the region that @@ -1061,6 +1110,7 @@ promote pens to a higher color space, as illustrated in the example file Axial gradient shading varying smoothly from `pena' to `penb' in the direction of the line segment `a--b' can be achieved with + void axialshade(picture pic=currentpicture, path g, bool stroke=false, pen pena, pair a, pen penb, pair b); @@ -1068,6 +1118,7 @@ void axialshade(picture pic=currentpicture, path g, bool stroke=false, Radial gradient shading varying smoothly from `pena' on the circle with center `a' and radius `ra' to `penb' on the circle with center `b' and radius `rb' is similar: + void radialshade(picture pic=currentpicture, path g, bool stroke=false, pen pena, pair a, real ra, pen penb, pair b, real rb); @@ -1077,6 +1128,7 @@ void radialshade(picture pic=currentpicture, path g, bool stroke=false, Gouraud shading using fill rule `fillrule' and the vertex colors in the pen array `p' on a triangular lattice defined by the vertices `z' and edge flags `edges' is implemented with + void gouraudshade(picture pic=currentpicture, path g, bool stroke=false, pen fillrule=currentpen, pen[] p, pair[] z, int[] edges); @@ -1094,6 +1146,7 @@ flags used in Gouraud shading are documented here: by the n cyclic paths of length 4 in path array `b', using the vertex colors specified in the n \times 4 pen array `p' and internal control points in the n \times 4 array `z', is implemented with + void tensorshade(picture pic=currentpicture, path g, bool stroke=false, pen fillrule=currentpen, pen[][] p, path[] b=g, pair[][] z=new pair[][]); @@ -1101,11 +1154,13 @@ void tensorshade(picture pic=currentpicture, path g, bool stroke=false, points are calculated automatically, is used. The pens in `p' must belong to the same color space. A simpler interface for the case of a single patch (n=1) is also available: + void tensorshade(picture pic=currentpicture, path g, bool stroke=false, pen fillrule=currentpen, pen[] p, path b=g, pair[] z=new pair[]); One can also smoothly shade the regions between consecutive paths of a sequence using a given array of pens: + void draw(picture pic=currentpicture, path[] g, pen[] p); Illustrations of tensor product and Coons shading are provided in the example files `tensor.asy', `Coons.asy', `BezierSurface.asy', and @@ -1113,6 +1168,7 @@ example files `tensor.asy', `Coons.asy', `BezierSurface.asy', and More general shading possibilities are available with the `pdflatex', `context', and `pdftex' TeX engines: the routine + void functionshade(picture pic=currentpicture, path[] g, bool stroke=false, pen fillrule=currentpen, string shader); shades on picture `pic' the interior of path `g' according to fill @@ -1124,6 +1180,7 @@ is illustrated in the example `functionshading.asy'. The following routine uses `evenodd' clipping together with the `^^' operator to unfill a region: + void unfill(picture pic=currentpicture, path g); @@ -1132,6 +1189,7 @@ File: asymptote.info, Node: clip, Next: label, Prev: fill, Up: Drawing comma 4.3 clip ======== + void clip(picture pic=currentpicture, path g, stroke=false, pen fillrule=currentpen); @@ -1140,7 +1198,7 @@ path `g', using fill rule `fillrule' (*note fillrule::). If `stroke=true', the clipped portion is the same as the region that would be drawn with `draw(pic,g,fillrule+zerowinding)'; in this case the path `g' need not be cyclic. For an illustration of picture clipping, see -the first example in *note LaTeX usage::. +the first example in *Note LaTeX usage::. File: asymptote.info, Node: label, Prev: clip, Up: Drawing commands @@ -1148,6 +1206,7 @@ File: asymptote.info, Node: label, Prev: clip, Up: Drawing commands 4.4 label ========= + void label(picture pic=currentpicture, Label L, pair position, align align=NoAlign, pen p=nullpen, filltype filltype=NoFill) @@ -1157,9 +1216,11 @@ will be aligned in the direction of `align' and displaced from `position' by the `PostScript' offset `align*labelmargin(p)'. The constant `Align' can be used to align the bottom-left corner of the label at `position'. If `p' is `nullpen', the pen specified within the -Label, which defaults to `currentpen', will be used. The Label `L' can -either be a string or the structure obtained by calling one of the -functions +Label, which defaults to `currentpen', will be used. + + The Label `L' can either be a string or the structure obtained by +calling one of the functions + Label Label(string s="", pair position, align align=NoAlign, pen p=nullpen, embed embed=Rotate, filltype filltype=NoFill); Label Label(string s="", align align=NoAlign, @@ -1192,6 +1253,7 @@ Label should transform with the embedding picture: To add a label to a path, use + void label(picture pic=currentpicture, Label L, path g, align align=NoAlign, pen p=nullpen, filltype filltype=NoFill); By default the label will be positioned at the midpoint of the path. @@ -1200,6 +1262,7 @@ An alternative label location (an `arctime' value between 0 and `position' in constructing the Label. The position `Relative(real)' specifies a location relative to the total arclength of the path. These convenient abbreviations are predefined: + position BeginPoint=Relative(0); position MidPoint=Relative(0.5); position EndPoint=Relative(1); @@ -1215,6 +1278,7 @@ further away from or closer to the path. A label with a fixed-size arrow of length `arrowlength' pointing to `b' from direction `dir' can be produced with the routine + void arrow(picture pic=currentpicture, Label L="", pair b, pair dir, real length=arrowlength, align align=NoAlign, pen p=currentpen, arrowbar arrow=Arrow, margin margin=EndMargin); @@ -1231,6 +1295,7 @@ height (`height=value'), rotation (`angle=value'), scaling (`scale=factor'), clipping (`clip=bool'), and draft mode (`draft=bool') parameters. The `layer()' function can be used to force future objects to be drawn on top of the included image: + label(graphic("file.eps","width=1cm"),(0,0),NE); layer(); @@ -1245,9 +1310,11 @@ See `Pythagoras.asy' for an example. The structure `object' defined in `plain_Label.asy' allows Labels and frames to be treated in a uniform manner. A group of objects may be packed together into single frame with the routine + frame pack(pair align=2S ... object inset[]); To draw or fill a box (or ellipse or other path) around a Label and return the bounding object, use one of the routines + object draw(picture pic=currentpicture, Label L, envelope e, real xmargin=0, real ymargin=xmargin, pen p=currentpen, filltype filltype=NoFill, bool above=true); @@ -1265,7 +1332,7 @@ TeX would fill to draw the Label `L'. format string `s' into a paragraph of width `width'. This example uses `minipage', `clip', and `graphic' to produce a CD label: - + size(11.7cm,11.7cm); asy(nativeformat(),"logo"); fill(unitcircle^^(scale(2/11.7)*unitcircle), @@ -1290,6 +1357,7 @@ File: asymptote.info, Node: Programming, Next: LaTeX usage, Prev: Drawing com 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: + // This is a comment. // Declaration: Declare x to be a real variable; @@ -1314,6 +1382,7 @@ for(int i=0; i < 10; ++i) { statements just as in C/C++. It also supports the Java-style shorthand for iterating over all elements of an array: + // Iterate over an array int[] array={1,1,2,3,5}; for(int k : array) { @@ -1355,10 +1424,12 @@ user-defined types): `bool' a boolean type that can only take on the values `true' or `false'. - For example: bool b=true; + For example: + bool b=true; defines a boolean variable `b' and initializes it to the value - `true'. If no initializer is given: bool b; + `true'. If no initializer is given: + bool b; the value `false' is assumed. @@ -1609,14 +1680,15 @@ user-defined types): returns a string containing `n' formatted according to the C-style format string `s' using the current locale; - `string format(string s, real x, string locale="")' + `string format(string s=defaultformat, real x, string locale="")' returns a string containing `x' formatted according to the C-style format string `s' using locale `locale' (or the current locale if an empty string is specified), following the behaviour of the C function `fprintf'), except that only one data field is allowed, trailing zeros are removed by - default (unless `#' is specified), and TeX is used to typeset - scientific notation; + default (unless `#' is specified), and (if the format string + specifies math mode) TeX is used to typeset scientific + notation; `int hex(string s);' casts a hexidecimal string `s' to an integer. @@ -1632,7 +1704,8 @@ user-defined types): `string time(string format="%a %b %d %T %Z %Y")' returns the current time formatted by the ANSI C routine `strftime' according to the string `format' using the current - locale. Thus time(); + locale. Thus + time(); time("%a %b %d %H:%M:%S %Z %Y"); are equivalent ways of returning the current time in the @@ -1646,7 +1719,8 @@ user-defined types): that the `"%Z"' extension to the POSIX `strptime' specification is ignored by the current GNU C Library. If an error occurs, the value -1 is returned. Here are some - examples: seconds("Mar 02 11:12:36 AM PST 2007","%b %d %r PST %Y"); + examples: + seconds("Mar 02 11:12:36 AM PST 2007","%b %d %r PST %Y"); seconds(time("%b %d %r %z %Y"),"%b %d %r %z %Y"); seconds(time("%b %d %r %Z %Y"),"%b %d %r "+time("%Z")+" %Y"); 1+(seconds()-seconds("Jan 1","%b %d"))/(24*60*60); @@ -1658,7 +1732,8 @@ user-defined types): Epoch (Thu Jan 01 00:00:00 UTC 1970) formatted by the ANSI C routine `strftime' according to the string `format' using the current locale. For example, to return the date corresponding - to 24 hours ago: time(seconds()-24*60*60); + to 24 hours ago: + time(seconds()-24*60*60); `void abort(string s)' aborts execution (with a non-zero return code in batch mode); @@ -1680,7 +1755,7 @@ user-defined types): As in C/C++, complicated types may be abbreviated with `typedef' -(see the example in *note Functions::). +(see the example in *Note Functions::). File: asymptote.info, Node: Paths and guides, Next: Pens, Prev: Data types, Up: Programming @@ -1694,41 +1769,48 @@ File: asymptote.info, Node: Paths and guides, Next: Pens, Prev: Data types, For example, the routine `circle(pair c, real r)', which returns a Bezier curve approximating a circle of radius `r' centered on `c', - is based on `unitcircle' (*note unitcircle::): path circle(pair c, real r) + is based on `unitcircle' (*note unitcircle::): + path circle(pair c, real r) { return shift(c)*scale(r)*unitcircle; } If high accuracy is needed, a true circle may be produced with the - routine `Circle' defined in the module `graph.asy': import graph; + routine `Circle' defined in the module `graph.asy': + import graph; path Circle(pair c, real r, int n=nCircle); A circular arc consistent with `circle' centered on `c' with radius `r' from `angle1' to `angle2' degrees, drawing - counterclockwise if `angle2 >= angle1', can be constructed with path arc(pair c, real r, real angle1, real angle2); - One may also specify the direction explicitly: path arc(pair c, real r, real angle1, real angle2, bool direction); + counterclockwise if `angle2 >= angle1', can be constructed with + path arc(pair c, real r, real angle1, real angle2); + One may also specify the direction explicitly: + path arc(pair c, real r, real angle1, real angle2, bool direction); Here the direction can be specified as CCW (counter-clockwise) or CW (clockwise). For convenience, an arc centered at `c' from pair `z1' to `z2' (assuming `|z2-c|=|z1-c|') in the may also be - constructed with path arc(pair c, explicit pair z1, explicit pair z2, + constructed with + path arc(pair c, explicit pair z1, explicit pair z2, bool direction=CCW) If high accuracy is needed, true arcs may be produced with routines in the module `graph.asy' that produce Bezier curves with `n' - control points: import graph; + control points: + import graph; path Arc(pair c, real r, real angle1, real angle2, bool direction, int n=nCircle); path Arc(pair c, real r, real angle1, real angle2, int n=nCircle); path Arc(pair c, explicit pair z1, explicit pair z2, bool direction=CCW, int n=nCircle); - An ellipse can be drawn with the routine @cindex @code{ellipse} + An ellipse can be drawn with the routine + @cindex @code{ellipse} path ellipse(pair c, real a, real b) { return shift(c)*scale(a,b)*unitcircle; } This example illustrates the use of all five guide connectors - discussed in *note Tutorial::: size(300,0); + discussed in *Note Tutorial::: size(300,0); pair[] z=new pair[10]; z[0]=(0,100); z[1]=(50,0); z[2]=(180,0); @@ -1744,7 +1826,7 @@ File: asymptote.info, Node: Paths and guides, Next: Pens, Prev: Data types, dot(z); - + Here are some useful functions for paths: @@ -1919,7 +2001,8 @@ File: asymptote.info, Node: Paths and guides, Next: Pens, Prev: Data types, returns the portions of path `p' before and after the `n'th intersection of `p' with path `knife' as a structure `slice' (if no intersection exist is found, the entire path is - considered to be `before' the intersection): struct slice { + considered to be `before' the intersection): + struct slice { path before,after; } The argument `n' is treated as modulo the number of @@ -2012,15 +2095,17 @@ File: asymptote.info, Node: Paths and guides, Next: Pens, Prev: Data types, dot(hat,red); draw(solved,dashed); - + We point out an efficiency distinction in the use of guides and - paths: guide g; + paths: + guide g; for(int i=0; i < 10; ++i) g=g--(i,i); path p=g; - runs in linear time, whereas path p; + runs in linear time, whereas + path p; for(int i=0; i < 10; ++i) p=p--(i,i); @@ -2076,10 +2161,12 @@ File: asymptote.info, Node: Paths and guides, Next: Pens, Prev: Data types, As a technical detail we note that a direction specifier given to - `nullpath' modifies the node on the other side: the guides a..{up}nullpath..b; + `nullpath' modifies the node on the other side: the guides + a..{up}nullpath..b; c..nullpath{up}..d; e..{up}nullpath{down}..f; - are respectively equivalent to a..nullpath..{up}b; + are respectively equivalent to + a..nullpath..{up}b; c{up}..nullpath..d; e{down}..nullpath..{up}f; @@ -2143,7 +2230,8 @@ number, until it saturates with one or more color components equal to 1. the color attributes stripped (to avoid color mixing). A 6-character RGB hexidecimal string can be converted to a pen with - the routine pen rgb(string s); + the routine + pen rgb(string s); Various shades and mixtures of the grayscale primary colors `black' and `white', RGB primary colors `red', `green', and @@ -2151,11 +2239,13 @@ number, until it saturates with one or more color components equal to 1. are defined as named colors, along with the CMYK primary colors `Cyan', `Magenta', `Yellow', and `Black', in the module `plain': - - The standard 140 RGB `X11' colors can be imported with the command import x11colors; + + The standard 140 RGB `X11' colors can be imported with the command + import x11colors; and the standard 68 CMYK TeX colors can be imported with the - command import texcolors; + command + import texcolors; Note that there is some overlap between these two standards and the definitions of some colors (e.g. `Green') actually disagree. @@ -2166,11 +2256,13 @@ number, until it saturates with one or more color components equal to 1. however, to change the color of only a portion of a string, say for a slide presentation, (*note slide::) it may be desirable to specify the color directly to `LaTeX'. This file can be passed to - `LaTeX' with the `Asymptote' command usepackage("asycolors"); + `LaTeX' with the `Asymptote' command + usepackage("asycolors"); The structure `hsv' defined in `plain_pens.asy' may be used to convert between HSV and RGB spaces, where the hue `h' is an angle - in [0,360) and the saturation `s' and value `v' lie in `[0,1]': pen p=hsv(180,0.5,0.75); + in [0,360) and the saturation `s' and value `v' lie in `[0,1]': + pen p=hsv(180,0.5,0.75); write(p); // ([default], red=0.375, green=0.75, blue=0.75) hsv q=p; write(q.h,q.s,q.v); // 180 0.5 0.75 @@ -2184,7 +2276,8 @@ number, until it saturates with one or more color components equal to 1. to draw with the pen on, the second number specifies how far to draw with the pen off, and so on. If `adjust' is `true', these spacings are automatically adjusted by `Asymptote' to fit the - arclength of the path. Here are the predefined line types: pen solid=linetype(""); + arclength of the path. Here are the predefined line types: + pen solid=linetype(""); pen dotted=linetype("0 4"); pen dashed=linetype("8 8"); pen longdashed=linetype("24 8"); @@ -2193,7 +2286,7 @@ number, until it saturates with one or more color components equal to 1. pen Dotted=dotted+1.0; pen Dotted(pen p=currentpen) {return dotted+2*linewidth(p);} - + The default line type is `solid'; this may be changed with `defaultpen(pen)'. The line type of a pen is returned by `int @@ -2203,14 +2296,17 @@ number, until it saturates with one or more color components equal to 1. linewidth(real)'. The default line width is 0.5 bp; this value may be changed with `defaultpen(pen)'. The line width of a pen is returned by `real linewidth(pen p=currentpen)'. For convenience, - in the module `plain' we define static void defaultpen(real w) {defaultpen(linewidth(w));} + in the module `plain' we define + static void defaultpen(real w) {defaultpen(linewidth(w));} static pen operator +(pen p, real w) {return p+linewidth(w);} static pen operator +(real w, pen p) {return linewidth(w)+p;} - so that one may set the line width like this: defaultpen(2); + so that one may set the line width like this: + defaultpen(2); pen p=red+0.5; * A pen with a specific `PostScript' line cap is returned on calling - `linecap' with an integer argument: pen squarecap=linecap(0); + `linecap' with an integer argument: + pen squarecap=linecap(0); pen roundcap=linecap(1); pen extendcap=linecap(2); @@ -2219,7 +2315,8 @@ number, until it saturates with one or more color components equal to 1. linecap(pen p=currentpen)'. * A pen with a specific `PostScript' join style is returned on - calling `linejoin' with an integer argument: pen miterjoin=linejoin(0); + calling `linejoin' with an integer argument: + pen miterjoin=linejoin(0); pen roundjoin=linejoin(1); pen beveljoin=linejoin(2); @@ -2233,7 +2330,8 @@ number, until it saturates with one or more color components equal to 1. returned by `real miterlimit(pen p=currentpen)'. * A pen with a specific `PostScript' fill rule is returned on - calling `fillrule' with an integer argument: pen zerowinding=fillrule(0); + calling `fillrule' with an integer argument: + pen zerowinding=fillrule(0); pen evenodd=fillrule(1); The fill rule, which identifies the algorithm used to determine the @@ -2249,7 +2347,8 @@ number, until it saturates with one or more color components equal to 1. fillrule(pen p=currentpen)'. * A pen with a specific text alignment setting is returned on - calling `basealign' with an integer argument: pen nobasealign=basealign(0); + calling `basealign' with an integer argument: + pen nobasealign=basealign(0); pen basealign=basealign(1); The default setting, `nobasealign',which may be changed with @@ -2262,7 +2361,8 @@ number, until it saturates with one or more color components equal to 1. with the function `pen fontsize(real size, real lineskip=1.2*size)'. The default font size, 12pt, may be changed with `defaultpen(pen)'. Nonstandard font sizes may require - inserting import fontsize; + inserting + import fontsize; at the beginning of the file (this requires the `fix-cm' package available from @@ -2291,7 +2391,8 @@ number, until it saturates with one or more color components equal to 1. fontcommand(string)'. A convenient interface to the following standard `PostScript' - fonts is also provided: pen AvantGarde(string series="m", string shape="n"); + fonts is also provided: + pen AvantGarde(string series="m", string shape="n"); pen Bookman(string series="m", string shape="n"); pen Courier(string series="m", string shape="n"); pen Helvetica(string series="m", string shape="n"); @@ -2302,10 +2403,12 @@ number, until it saturates with one or more color components equal to 1. pen Symbol(string series="m", string shape="n"); pen ZapfDingbats(string series="m", string shape="n"); - * The transparency of a pen can be changed with the command: pen opacity(real opacity=1, string blend="Compatible"); + * The transparency of a pen can be changed with the command: + pen opacity(real opacity=1, string blend="Compatible"); The opacity can be varied from `0' (fully transparent) to the default value of `1' (opaque), and `blend' specifies one of the - following foreground-background blending operations: "Compatible","Normal","Multiply","Screen","Overlay","SoftLight", + following foreground-background blending operations: + "Compatible","Normal","Multiply","Screen","Overlay","SoftLight", "HardLight","ColorDodge","ColorBurn","Darken","Lighten","Difference", "Exclusion","Hue","Saturation","Color","Luminosity", as described in @@ -2322,7 +2425,8 @@ number, until it saturates with one or more color components equal to 1. tiling pattern, identified by the string `name', for `fill' and `draw' operations by adding it to the global `PostScript' frame `currentpatterns', with optional left-bottom margin `lb' and - right-top margin `rt'. import patterns; + right-top margin `rt'. + import patterns; void add(string name, picture pic, pair lb=0, pair rt=0); To `fill' or `draw' using pattern `name', use the pen @@ -2345,7 +2449,7 @@ number, until it saturates with one or more color components equal to 1. filldraw(shift(2s,0)*unitcircle,pattern("checker")); filldraw(shift(3s,0)*unitcircle,pattern("brick")); - + Hatch patterns can be generated with the routines `picture hatch(real H=5mm, pair dir=NE, pen p=currentpen)', `picture @@ -2361,7 +2465,7 @@ number, until it saturates with one or more color components equal to 1. filldraw(shift(s,0)*unitsquare,pattern("hatchback")); filldraw(shift(2s,0)*unitsquare,pattern("crosshatch")); - + You may need to turn off aliasing in your `PostScript' viewer for patterns to appear correctly. Custom patterns can easily be @@ -2380,8 +2484,6 @@ number, until it saturates with one or more color components equal to 1. filldraw(unitcircle,pattern("shadedtiling")); - - * One can specify a custom pen nib as an arbitrary polygonal path with `pen makepen(path)'; this path represents the mark to be drawn for paths containing a single point. This pen nib path can be @@ -2398,7 +2500,7 @@ number, until it saturates with one or more color components equal to 1. draw((0.5,-1.5),nonconvex); draw((0,-1.5)..(1,-0.5)..(2,-1.5),nonconvex); - + The value `nullpath' represents a circular pen nib (the default); an elliptical pen can be achieved simply by multiplying the pen by @@ -2446,6 +2548,7 @@ File: asymptote.info, Node: Transforms, Next: Frames and pictures, Prev: Pens `Asymptote' makes extensive use of affine transforms. A pair `(x,y)' is transformed by the transform `t=(t.x,t.y,t.xx,t.xy,t.yx,t.yy)' to `(x',y')', where + x' = t.x + t.xx * x + t.xy * y y' = t.y + t.yx * x + t.yy * y This is equivalent to the `PostScript' transformation `[t.xx t.yx t.xy @@ -2511,15 +2614,19 @@ File: asymptote.info, Node: Frames and pictures, Next: Files, Prev: Transform `erase(frame)' routine. The functions `pair min(frame)' and `pair max(frame)' return the (left,bottom) and (right,top) coordinates of the frame bounding box, respectively. The contents of frame - `src' may be appended to frame `dest' with the command void add(frame dest, frame src); - or prepended with void prepend(frame dest, frame src); + `src' may be appended to frame `dest' with the command + void add(frame dest, frame src); + or prepended with + void prepend(frame dest, frame src); A frame obtained by aligning frame `f' in the direction `align', in a manner analogous to the `align' argument of `label' (*note - label::), is returned by frame align(frame f, pair align); + label::), is returned by + frame align(frame f, pair align); To draw or fill a box or ellipse around a label or frame and return the boundary as a path, use one of the predefined - `envelope' routines path box(frame f, Label L="", real xmargin=0, + `envelope' routines + path box(frame f, Label L="", real xmargin=0, real ymargin=xmargin, pen p=currentpen, filltype filltype=NoFill, bool above=true); path roundbox(frame f, Label L="", real xmargin=0, @@ -2533,11 +2640,13 @@ File: asymptote.info, Node: Frames and pictures, Next: Files, Prev: Transform Pictures are high-level structures (*note Structures::) defined in the module `plain' that provide canvases for drawing in user coordinates. The default picture is called `currentpicture'. A - new picture can be created like this: picture pic; + new picture can be created like this: + picture pic; Anonymous pictures can be made by the expression `new picture'. The `size' routine specifies the dimensions of the desired picture: + void size(picture pic=currentpicture, real x, real y=x, bool keepAspect=Aspect); @@ -2559,17 +2668,22 @@ File: asymptote.info, Node: Frames and pictures, Next: Files, Prev: Transform To make the user coordinates of picture `pic' represent multiples of `x' units in the x direction and `y' units in the y direction, - use void unitsize(picture pic=currentpicture, real x, real y=x); + use + + + void unitsize(picture pic=currentpicture, real x, real y=x); When nonzero, these `x' and `y' values override the corresponding size parameters of picture `pic'. - The routine void size(picture pic=currentpicture, real xsize, real ysize, + The routine + void size(picture pic=currentpicture, real xsize, real ysize, pair min, pair max); forces the final picture scaling to map the user coordinates `box(min,max)' to a region of width `xsize' and height `ysize' (when these parameters are nonzero). - Alternatively, calling the routine transform fixedscaling(picture pic=currentpicture, pair min, + Alternatively, calling the routine + transform fixedscaling(picture pic=currentpicture, pair min, pair max, pen p=nullpen, bool warn=false); will cause picture `pic' to use a fixed scaling to map user coordinates in `box(min,max)' to the (already specified) picture @@ -2578,25 +2692,32 @@ File: asymptote.info, Node: Frames and pictures, Next: Files, Prev: Transform A picture `pic' can be fit to a frame and output to a file `prefix'.`format' using image format `format' by calling the - `shipout' function: void shipout(string prefix=defaultfilename, picture pic=currentpicture, + `shipout' function: + + + void shipout(string prefix=defaultfilename, picture pic=currentpicture, orientation orientation=orientation, string format="", bool wait=false, bool view=true, string options="", string script="", projection P=currentprojection); The default output format, `PostScript', may be changed with the `-f' or `-tex' command-line options. The `options', `script', and - `projection' parameters are only relevant for 3D pictures. + `projection' parameters are only relevant for 3D pictures. If + `defaultfilename' is an empty string, the prefix `outprefix()' + will be used. A `shipout()' command is added implicitly at file exit if no previous `shipout' commands have been executed. The default page orientation is `Portrait'; this may be modified by changing the variable `orientation'. To output in landscape mode, simply set - the variable `orientation=Landscape' or issue the command shipout(Landscape); + the variable `orientation=Landscape' or issue the command + shipout(Landscape); To rotate the page by -90 degrees, use the orientation `Seascape'. The orientation `UpsideDown' rotates the page by 180 degrees. - A picture `pic' can be explicitly fit to a frame by calling frame pic.fit(real xsize=pic.xsize, real ysize=pic.ysize, + A picture `pic' can be explicitly fit to a frame by calling + frame pic.fit(real xsize=pic.xsize, real ysize=pic.ysize, bool keepAspect=pic.keepAspect); The default size and aspect ratio settings are those given to the `size' command (which default to `0', `0', and `true', @@ -2605,17 +2726,20 @@ File: asymptote.info, Node: Frames and pictures, Next: Files, Prev: Transform `pic.calculateTransform()'. In certain cases (e.g. 2D graphs) where only an approximate size - estimate for `pic' is available, the picture fitting routine frame pic.scale(real xsize=this.xsize, real ysize=this.ysize, + estimate for `pic' is available, the picture fitting routine + frame pic.scale(real xsize=this.xsize, real ysize=this.ysize, bool keepAspect=this.keepAspect); (which scales the resulting frame, including labels and fixed-size objects) will enforce perfect compliance with the requested size specification, but should not normally be required. To draw a bounding box with margins around a picture, fit the - picture to a frame using the function frame bbox(picture pic=currentpicture, real xmargin=0, + picture to a frame using the function + frame bbox(picture pic=currentpicture, real xmargin=0, real ymargin=xmargin, pen p=currentpen, filltype filltype=NoFill); - Here `filltype' specifies one of the following fill types: + + Here `filltype' specifies one of the following fill types: `FillDraw' Fill the interior and draw the boundary. @@ -2658,11 +2782,13 @@ File: asymptote.info, Node: Frames and pictures, Next: Files, Prev: Transform For example, to draw a bounding box around a picture with a 0.25 cm - margin and output the resulting frame, use the command: shipout(bbox(0.25cm)); + margin and output the resulting frame, use the command: + shipout(bbox(0.25cm)); A `picture' may be fit to a frame with the background color of pen `p' with the function `bbox(p,Fill)'. - The functions pair min(picture pic, user=false); + The functions + pair min(picture pic, user=false); pair max(picture pic, user=false); pair size(picture pic, user=false); calculate the `PostScript' bounds that picture `pic' would have @@ -2670,14 +2796,16 @@ File: asymptote.info, Node: Frames and pictures, Next: Files, Prev: Transform specification. If `user' is `false' the returned value is in `PostScript' coordinates, otherwise it is in user coordinates. - The function pair point(picture pic=currentpicture, pair dir, bool user=true); + The function + pair point(picture pic=currentpicture, pair dir, bool user=true); is a convenient way of determining the point on the bounding box of `pic' in the direction `dir' relative to its center, ignoring the contributions from fixed-size objects (such as labels and arrowheads). If `user' is `true' the returned value is in user coordinates, otherwise it is in `PostScript' coordinates. - The function pair truepoint(picture pic=currentpicture, pair dir, bool user=true); + The function + pair truepoint(picture pic=currentpicture, pair dir, bool user=true); is identical to `point', except that it also accounts for fixed-size objects, using the scaling transform that picture `pic' would have if currently fit to a frame using its default size @@ -2685,7 +2813,8 @@ File: asymptote.info, Node: Frames and pictures, Next: Files, Prev: Transform coordinates, otherwise it is in `PostScript' coordinates. Sometimes it is useful to draw objects on separate pictures and - add one picture to another using the `add' function: void add(picture src, bool group=true, + add one picture to another using the `add' function: + void add(picture src, bool group=true, filltype filltype=NoFill, bool above=true); void add(picture dest, picture src, bool group=true, filltype filltype=NoFill, bool above=true); @@ -2698,7 +2827,10 @@ File: asymptote.info, Node: Frames and pictures, Next: Files, Prev: Transform There are also routines to add a picture or frame `src' specified in postscript coordinates to another picture `dest' (or - `currentpicture') about the user coordinate `position': void add(picture src, pair position, bool group=true, + `currentpicture') about the user coordinate `position': + + + void add(picture src, pair position, bool group=true, filltype filltype=NoFill, bool above=true); void add(picture dest, picture src, pair position, bool group=true, filltype filltype=NoFill, bool above=true); @@ -2714,7 +2846,7 @@ File: asymptote.info, Node: Frames and pictures, Next: Files, Prev: Transform difference is that when `align' is not specified, labels are centered, whereas frames and pictures are aligned so that their origin is at `position'. Illustrations of frame alignment can be - found in the examples *note errorbars:: and *note image::. If you + found in the examples *Note errorbars:: and *Note image::. If you want to align three or more subpictures, group them two at a time: picture pic1; @@ -2737,11 +2869,12 @@ File: asymptote.info, Node: Frames and pictures, Next: Files, Prev: Transform add(pic.fit(),(0,0),N); add(pic3.fit(),(0,0),10S); - + Alternatively, one can use `attach' to automatically increase the size of picture `dest' to accommodate adding a frame `src' about - the user coordinate `position': void attach(picture dest=currentpicture, frame src, + the user coordinate `position': + void attach(picture dest=currentpicture, frame src, pair position=0, bool group=true, filltype filltype=NoFill, bool above=true); void attach(picture dest=currentpicture, frame src, @@ -2749,7 +2882,8 @@ File: asymptote.info, Node: Frames and pictures, Next: Files, Prev: Transform filltype filltype=NoFill, bool above=true); To erase the contents of a picture (but not the size - specification), use the function void erase(picture pic=currentpicture); + specification), use the function + void erase(picture pic=currentpicture); To save a snapshot of `currentpicture', `currentpen', and `currentprojection', use the function `save()'. @@ -2761,27 +2895,33 @@ File: asymptote.info, Node: Frames and pictures, Next: Files, Prev: Transform in the base module `plain'. It is possible to insert verbatim `PostScript' commands in a - picture with one of the routines void postscript(picture pic=currentpicture, string s); + picture with one of the routines + void postscript(picture pic=currentpicture, string s); void postscript(picture pic=currentpicture, string s, pair min, pair max) Here `min' and `max' can be used to specify explicit bounds associated with the resulting `PostScript' code. Verbatim TeX commands can be inserted in the intermediate `LaTeX' - output file with one of the functions void tex(picture pic=currentpicture, string s); + output file with one of the functions + void tex(picture pic=currentpicture, string s); void tex(picture pic=currentpicture, string s, pair min, pair max) Here `min' and `max' can be used to specify explicit bounds associated with the resulting TeX code. To issue a global TeX command (such as a TeX macro definition) in the TeX preamble (valid for the remainder of the top-level module) - use: void texpreamble(string s); + use: + void texpreamble(string s); The TeX environment can be reset to its initial state, clearing all - macro definitions, with the function void texreset(); + macro definitions, with the function + void texreset(); - The routine void usepackage(string s, string options=""); - provides a convenient abbreviation for texpreamble("\usepackage["+options+"]{"+s+"}"); + The routine + void usepackage(string s, string options=""); + provides a convenient abbreviation for + texpreamble("\usepackage["+options+"]{"+s+"}"); that can be used for importing `LaTeX' packages. @@ -2797,6 +2937,7 @@ files. An input file must first be opened with `input(string name, bool check=true, string comment="#")'; reading is then done by assignment: + file fin=input("test.txt"); real a=fin; @@ -2822,6 +2963,7 @@ including a newline. In addition, `Asymptote' provides the function character as an ordinary character) and return it as a string. A file named `name' can be open for output with + file output(string name, bool update=false); If `update=false', any existing data in the file will be erased and only write operations can be used on the file. If `update=true', any @@ -2837,6 +2979,7 @@ for files is `null'. Data of a built-in type `T' can be written to an output file by calling one of the functions + write(string s="", T x, suffix suffix=endl ... T[]); write(file file, string s="", T x, suffix suffix=none ... T[]); write(file file=stdout, string s="", explicit T[] x ... T[][]); @@ -2852,6 +2995,7 @@ be one of the following: `none' (do nothing), `flush' (output buffered data), `endl' (terminate with a newline and flush), `newl' (terminate with a newline), `tab' (terminate with a tab), or `comma' (terminate with a comma). Here are some simple examples of data output: + file fout=output("test.txt"); write(fout,1); // Writes "1" write(fout); // Writes a new line @@ -2897,6 +3041,7 @@ number of display lines). The default value, `settings.scroll=0', specifies continuous scrolling. The routines + string getstring(string name="", string default="", string prompt="", bool store=true); int getint(string name="", int default=0, string prompt="", @@ -2914,6 +3059,7 @@ of values for `name' is stored in the file `".asy_history_"+name' provide a default value for subsequent runs. The default value (initially `default') is displayed after `prompt'. These functions are based on the internal routines + string readline(string prompt="", string name="", bool tabcompletion=false); void saveline(string name, string value, bool store=true); Here, `readline' prompts the user with the default value formatted @@ -2925,6 +3071,7 @@ history in a file `".asy_history_"+name'. the `n' most recent values (or all values up to `historylines' if `n=0') entered for string `name'. The routine `history(int n=0)' returns the interactive history. For example, + write(output("transcript.asy"),history()); outputs the interactive history to the file `transcript.asy'. @@ -2934,6 +3081,7 @@ the file must reside in the current directory. The function `int rename(string from, string to)' may be used to rename file `from' to file `to'. Unless the `-globalwrite' (or `-nosafe') option is enabled, this operation is restricted to the current directory. The functions + int convert(string args="", string file="", string format=""); int animate(string args="", string file="", string format=""); call the `ImageMagick' commands `convert' and `animate', respectively, @@ -2956,6 +3104,7 @@ initializers, as in `real x=2*sin(pi/2);'. A variable is not added to the namespace until after the initializer is evaluated, so for example, in + int x=2; int x=5*x; the `x' in the initializer on the second line refers to the variable @@ -2997,6 +3146,7 @@ giving it a value. defining the function `T operator init()'. For instance, `int' variables are usually initialized to zero, but in + int operator init() { return 3; } @@ -3025,6 +3175,7 @@ executed on initialization. Variables hold references to structures. That is, in the example: + struct T { int x; } @@ -3044,6 +3195,7 @@ and returns a reference to that instance. In creating the new instance, any code in the body of the record definition is executed. For example: + int Tcount=0; struct T { int x; @@ -3076,6 +3228,7 @@ definition of the structure, however, variables of type `T' are initialized to `null' by default. This special behaviour is to avoid infinite recursion of creating new instances in code such as + struct tree { int value; tree left; @@ -3084,6 +3237,7 @@ struct tree { Here is a simple example that illustrates the use of structures: + struct S { real a=1; real f(real a) {return a+this.a;} @@ -3105,6 +3259,7 @@ write((s+s).f(0)); // Outputs 2 It is often convenient to have functions that construct new instances of a structure. Say we have a `Person' structure: + struct Person { string firstname; string lastname; @@ -3120,6 +3275,7 @@ effort than creating a new person in real life, though). We can reduce the work by defining a constructor function `Person(string,string)': + struct Person { string firstname; string lastname; @@ -3138,6 +3294,7 @@ Person joe=Person.Person("Joe", "Jones"); have to refer to the constructor by the qualified name `Person.Person'. If we add the line + from Person unravel Person; immediately after the structure definition, then the constructor can be used without qualification: `Person joe=Person("Joe", "Jones");'. @@ -3166,6 +3323,7 @@ after the end of the structure definition, so that it can used subsequently without qualifying it by the structure name. Our `Person' example can thus be implemented as: + struct Person { string firstname; string lastname; @@ -3190,6 +3348,7 @@ cumulative CPU times broken down into the fields `parent.user', incremental fields `change.user' and `change.system' indicate the change in the corresponding total parent and child CPU times since the last call to `cputime()'. The function + void write(file file=stdout, string s="", cputime c, string format=cputimeformat, suffix suffix=none); displays the incremental user cputime followed by "u", the incremental @@ -3198,9 +3357,11 @@ and the total system cputime followed by "S". Much like in C++, casting (*note Casts::) provides for an elegant implementation of structure inheritance, including virtual functions: + struct parent { - real x=1; - void virtual(int) {write (0);} + real x; + void operator init(int x) {this.x=x;} + void virtual(int) {write(0);} void f() {virtual(1);} } @@ -3208,24 +3369,25 @@ void write(parent p) {write(p.x);} struct child { parent parent; - real y=2; - void virtual(int x) {write (x);} + real y=3; + void operator init(int x) {parent.operator init(x);} + void virtual(int x) {write(x);} parent.virtual=virtual; void f()=parent.f; } parent operator cast(child child) {return child.parent;} -parent p; -child c; +parent p=parent(1); +child c=child(2); -write(c); // Outputs 1; +write(c); // Outputs 2; p.f(); // Outputs 0; c.f(); // Outputs 1; -write(c.parent.x); // Outputs 1; -write(c.y); // Outputs 2; +write(c.parent.x); // Outputs 2; +write(c.y); // Outputs 3; For further examples of structures, see `Legend' and `picture' in the `Asymptote' base module `plain'. @@ -3316,6 +3478,7 @@ the type of the result: not `Asymptote' also supports the C-like conditional syntax: + bool positive=(pi >= 0) ? true : false; The function `T interp(T a, T b, real t)' returns `(1-t)*a+t*b' for @@ -3335,11 +3498,13 @@ As in C, each of the arithmetic operators `+', `-', `*', `/', `%', and `^' can be used as a self operator. The prefix operators `++' (increment by one) and `--' (decrement by one) are also defined. For example, + int i=1; i += 2; int j=++i; is equivalent to the code + int i=1; i=i+2; int j=i=i+1; @@ -3358,6 +3523,7 @@ File: asymptote.info, Node: User-defined operators, Prev: Self & prefix operat The following symbols may be used with `operator' to define or redefine operators on structures and built-in types: + - + * / % ^ ! < > == != <= >= & | ^^ .. :: -- --- ++ << >> $ $$ @ @@ The operators on the second line have precedence one higher than the @@ -3365,6 +3531,7 @@ boolean operators `<', `>', `<=', and `>='. Guide operators like `..' may be overloaded, say, to write a user function that produces a new guide from a given guide: + guide dots(... guide[] g)=operator ..; guide operator ..(... guide[] g) { @@ -3392,6 +3559,7 @@ File: asymptote.info, Node: Implicit scaling, Next: Functions, Prev: Operator If a numeric literal is in front of certain types of expressions, then the two are multiplied: + int x=2; real y=2.0; real cm=72/2.540005; @@ -3409,6 +3577,7 @@ write(3(sin(x))^2); write(10cm); This produces the output + 6 5 6 @@ -3437,18 +3606,21 @@ reference, simply enclose it in a structure (*note Structures::). Here are some significant features of `Asymptote' functions: 1. Variables with signatures (functions) and without signatures - (nonfunction variables) are distinct: int x, x(); + (nonfunction variables) are distinct: + int x, x(); x=5; x=new int() {return 17;}; x=x(); // calls x() and puts the result, 17, in the scalar x - 2. Traditional function definitions are allowed: int sqr(int x) + 2. Traditional function definitions are allowed: + int sqr(int x) { return x*x; } sqr=null; // but the function is still just a variable. - 3. Casting can be used to resolve ambiguities: int a, a(), b, b(); // Valid: creates four variables. + 3. Casting can be used to resolve ambiguities: + int a, a(), b, b(); // Valid: creates four variables. a=b; // Invalid: assignment is ambiguous. a=(int) b; // Valid: resolves ambiguity. (int) (a=b); // Valid: resolves ambiguity. @@ -3457,7 +3629,8 @@ reference, simply enclose it in a structure (*note Structures::). int c(); c=a; // Valid: only one possible assignment. - 4. Anonymous (so-called "high-order") functions are also allowed: typedef int intop(int); + 4. Anonymous (so-called "high-order") functions are also allowed: + typedef int intop(int); intop adder(int m) { return new int(int n) {return m+n;}; @@ -3469,7 +3642,8 @@ reference, simply enclose it in a structure (*note Structures::). previously declared functions, by assigning another (anonymous or named) function to it. However, if `f' is overloaded by a new function definition, previous calls will still access the original - version of `f', as illustrated in this example: void f() { + version of `f', as illustrated in this example: + void f() { write("hi"); } @@ -3490,7 +3664,8 @@ reference, simply enclose it in a structure (*note Structures::). 6. Anonymous functions can be used to redefine a function variable that has been declared (and implicitly initialized to the null - function) but not yet explicitly defined: void f(bool b); + function) but not yet explicitly defined: + void f(bool b); void g(bool b) { if(b) f(b); @@ -3533,6 +3708,7 @@ Because certain data types are implicitly cast to more sophisticated types (*note Casts::) one can often avoid ambiguities by ordering function arguments from the simplest to the most complicated. For example, given + real f(int a=1, real b=0) {return a+b;} then `f(1)' returns 1.0, but `f(1.0)' returns 2.0. @@ -3558,6 +3734,7 @@ mistaken for a local assignment. When matching arguments to signatures, first all of the keywords are matched, then the arguments without names are matched against the unmatched formals as usual. For example, + int f(int x, int y) { return 10x+y; } @@ -3569,9 +3746,11 @@ argument `4', so it gets matched to the next item, `y'. local variable within a function argument (generally _not_ a good programming practice), simply enclose the assignment in parentheses. For example, given the definition of `f' in the previous example, + int x; write(f(4,(x=3))); is equivalent to the statements + int x; x=3; write(f(4,3)); @@ -3579,6 +3758,7 @@ write(f(4,3)); As a technical detail, we point out that, since variables of the same name but different signatures are allowed in the same scope, the code + int f(int x, int x()) { return x+x(); } @@ -3589,6 +3769,7 @@ argument matches the first unmatched formal of the same name, so the first argument is matched to the first formal, and `int ()' cannot be implicitly cast to `int'. Default arguments do not affect which formal a named argument is matched to, so if `f' were defined as + int f(int x=3, int x()) { return x+x(); } @@ -3603,6 +3784,7 @@ File: asymptote.info, Node: Rest arguments, Next: Mathematical functions, Pre Rest arguments allow one to write functions that take a variable number of arguments: + // This function sums its arguments. int sum(... int[] nums) { int total=0; @@ -3628,14 +3810,17 @@ subtract(); // illegal Putting an argument into a rest array is called _packing_. One can give an explicit list of arguments for the rest argument, so `subtract' could alternatively be implemented as + int subtract(int start ... int[] subs) { return start - sum(... subs); } One can even combine normal arguments with rest arguments: + sum(1,2,3 ... new int[] {4,5,6}); // returns 21 This builds a new six-element array that is passed to `sum' as `nums'. The opposite operation, _unpacking_, is not allowed: + subtract(... new int[] {10, 1, 2}); is illegal, as the start formal is not matched. @@ -3653,6 +3838,7 @@ score as well in it as with any other candidate. If there is one unique maximal candidate, it is chosen; otherwise, there is an ambiguity error. + int f(path g); int f(guide g); f((0,0)--(100,100)); // matches the second; the argument is a guide @@ -3735,6 +3921,7 @@ elliptic functions `F(real, real)', `E(real, real)', and `P(real, real)', the exponential/trigonometric integrals `Ei', `Si', and `Ci', the Legendre polynomials `Pl(int, real)', and the Riemann zeta function `zeta(real)'. For example, to compute the sine integral `Si' of 1.0: + import gsl; write(Si(1.0)); @@ -3781,19 +3968,22 @@ array to be resized to accommodate the new element. One can also index an array `A' with an integer array `B': the array `A[B]' is formed by indexing array `A' with successive elements of array `B'. A convenient Java-style shorthand exists for iterating over all elements of an -array; see *note array iteration::. +array; see *Note array iteration::. The declaration + real[] A; initializes `A' to be an empty (zero-length) array. Empty arrays should be distinguished from null arrays. If we say + real[] A=null; then `A' cannot be dereferenced at all (null arrays have no length and cannot be read from or assigned to). Arrays can be explicitly initialized like this: + real[] A={0,1,2}; Array assignment in `Asymptote' does a shallow copy: only the @@ -3847,6 +4037,7 @@ be used to examine whether the element at index `n' is initialized. Like all `Asymptote' functions, `cyclic', `push', `append', `pop', `insert', `delete', and `initialized' can be "pulled off" of the array and used on their own. For example, + int[] A={1}; A.push(2); // A now contains {1,2}. A.append(A); // A now contains {1,2,1,2}. @@ -3863,6 +4054,7 @@ A.insert(2,4,5); // A now contains {2,2,4,5,3,3}. The `[]' suffix can also appear after the variable name; this is sometimes convenient for declaring a list of variables and arrays of the same type: + real a,A[]; This declares `a' to be `real' and implicitly declares `A' to be of type `real[]'. @@ -3958,12 +4150,14 @@ of type `T[]'. `T[][] sort(T[][] a)' For built-in ordered types `T', returns a copy of `a' with the rows sorted by the first column, breaking ties with successively higher - columns. For example: string[][] a={{"bob","9"},{"alice","5"},{"pete","7"}, + columns. For example: + string[][] a={{"bob","9"},{"alice","5"},{"pete","7"}, {"alice","4"}}; // Row sort (by column 0, using column 1 to break ties): write(sort(a)); - produces alice 4 + produces + alice 4 alice 5 bob 9 pete 7 @@ -4016,7 +4210,8 @@ of type `T[]'. `pair[] fft(pair[] a, int sign=1)' returns the Fast Fourier Transform of `a' (if the optional `FFTW' package is installed), using the given `sign'. Here is a simple - example: int n=4; + example: + int n=4; pair[] f=sequence(n); write(f); pair[] g=fft(f,-1); @@ -4032,7 +4227,8 @@ of type `T[]'. `real[] tridiagonal(real[] a, real[] b, real[] c, real[] f);' Solve the periodic tridiagonal problem L`x'=`f' and return the solution `x', where `f' is an n vector and L is the n \times n - matrix [ b[0] c[0] a[0] ] + matrix + [ b[0] c[0] a[0] ] [ a[1] b[1] c[1] ] [ a[2] b[2] c[2] ] [ ... ] @@ -4044,7 +4240,8 @@ of type `T[]'. `real[] solve(real[][] a, real[] b, bool warn=true)' Solve the linear equation `a'x=`b' by LU decomposition and return the solution x, where `a' is an n \times n matrix and `b' is an - array of length n. For example: import math; + array of length n. For example: + import math; real[][] a={{1,-2,3,0},{4,-5,6,2},{-7,-8,10,5},{1,50,1,-2}}; real[] b={7,19,33,3}; real[] x=solve(a,b); @@ -4090,6 +4287,7 @@ of type `T[]'. arithmetic (including self) and logical operations. These element-by-element instructions are implemented in C++ code for speed. Given + real[] a={1,2}; real[] b={3,2}; then `a == b' and `a >= 2' both evaluate to the vector `{false, true}'. To @@ -4104,6 +4302,7 @@ implicit call to `map'. As with other built-in types, arrays of the basic data types can be read in by assignment. In this example, the code + file fin=input("test.txt"); real[] A=fin; @@ -4111,6 +4310,7 @@ reads real values into `A' until the end-of-file is reached (or an I/O error occurs). If line mode is set with `line(file)', then reading will stop once the end of the line is reached instead (line mode may be cleared with `line(file,false)'): + file fin=input("test.txt"); real[] A=line(fin); @@ -4120,17 +4320,20 @@ is a white-space delimiter mode for reading strings, set with `word(file)' and cleared with `word(file,false)', which causes string reads to respect white-space delimiters, instead of the default end-of-line delimiter: + file fin=word(line(input("test.txt"))); real[] A=fin; Another useful mode is comma-separated-value mode, set with `csv(file)' and cleared with `csv(file,false)', which causes reads to respect comma delimiters: + file fin=csv(input("test.txt")); real[] A=fin; To restrict the number of values read, use the `dimension(file,int)' function: + file fin=input("test.txt"); real[] A=dimension(fin,10); @@ -4142,6 +4345,7 @@ end-of-file (or end-of-line in line mode) is encountered. Two- and three-dimensional arrays of the basic data types can be read in like this: + file fin=input("test.txt"); real[][] A=dimension(fin,2,3); real[][][] B=dimension(fin,2,3,4); @@ -4150,6 +4354,7 @@ real[][][] B=dimension(fin,2,3,4); Sometimes the array dimensions are stored with the data as integer fields at the beginning of an array. Such arrays can be read in with the functions `read1', `read2', and `read3', respectively: + file fin=input("test.txt"); real[] A=read1(fin); real[][] B=read2(fin); @@ -4170,6 +4375,7 @@ a Python-like syntax. If `A' is an array, the expression `A[m:n]' returns a new array consisting of the elements of `A' with indices from `m' up to but not including `n'. For example, + int[] x={0,1,2,3,4,5,6,7,8,9}; int[] y=x[2:6]; // y={2,3,4,5}; int[] z=x[5:10]; // z={5,6,7,8,9}; @@ -4179,6 +4385,7 @@ index is omitted it is taken to be the length of the array. If both are omitted, the slice then goes from the start of the array to the end, producing a non-cyclic deep copy of the array. For example: + int[] x={0,1,2,3,4,5,6,7,8,9}; int[] y=x[:4]; // y={0,1,2,3} int[] z=x[5:]; // z={5,6,7,8,9} @@ -4193,6 +4400,7 @@ with indices in the set [`m',`n'), but now negative values and values beyond the length of the array are allowed. The indices simply wrap around. For example: + int[] x={0,1,2,3,4,5,6,7,8,9}; x.cyclic(true); int[] y=x[8:15]; // y={8,9,0,1,2,3,4}. @@ -4214,6 +4422,7 @@ array. If the array being assigned to the slice has a different length than the slice itself, elements will be inserted or removed from the array to accommodate it. For instance: + string[] toppings={"mayo", "salt", "ham", "lettuce"}; toppings[0:2]=new string[] {"mustard", "pepper"}; // Now toppings={"mustard", "pepper", "ham", "lettuce"} @@ -4264,6 +4473,7 @@ be inhibited by declaring individual arguments `explicit' in the function signature, say to avoid an ambiguous function call in the following example, which outputs 0: + int f(pair a) {return 0;} int f(explicit real x) {return 1;} @@ -4271,6 +4481,7 @@ write(f(0)); Other conversions, say `real' to `int' or `real' to `string', require an explicit cast: + int i=(int) 2.5; string s=(string) 2.5; @@ -4279,6 +4490,7 @@ int[] b=(int []) a; write(stdout,b); // Outputs 2,-3 Casting to user-defined types is also possible using `operator cast': + struct rpair { real radius; real angle; @@ -4298,10 +4510,12 @@ write(x); // Outputs (0.866025403784439,0.5) some code one wants all integers to represent multiples of 100. To convert them to reals, one would first want to multiply them by 100. However, the straightforward implementation + real operator cast(int x) {return x*100;} is equivalent to an infinite recursion, since the result `x*100' needs itself to be cast from an integer to a real. Instead, we want to use the standard conversion of int to real: + real convert(int x) {return x*100;} real operator cast(int x)=convert; @@ -4316,6 +4530,7 @@ File: asymptote.info, Node: Import, Next: Static, Prev: Casts, Up: Programmi While `Asymptote' provides many features by default, some applications require specialized features contained in external `Asymptote' modules. For instance, the lines + access graph; graph.axes(); draw x and y axes on a two-dimensional graph. Here, the command looks @@ -4326,21 +4541,25 @@ structure. Often, one wants to use module functions without having to specify the module name. The code + from graph access axes; adds the `axes' field of `graph' into the local name space, so that subsequently, one can just write `axes()'. If the given name is overloaded, all types and variables of that name are added. To add more than one name, just use a comma-separated list: + from graph access axes, xaxis, yaxis; Wild card notation can be used to add all non-private fields and types of a module to the local name space: + from graph access *; Similarly, one can add the non-private fields and types of a structure to the local environment with the `unravel' keyword: + struct matrix { real a,b,c,d; } @@ -4350,14 +4569,17 @@ real det(matrix m) { return a*d-b*c; } Alternatively, one can unravel selective fields: + real det(matrix m) { from m unravel a,b,c as C,d; return a*d-b*C; } The command + import graph; is a convenient abbreviation for the commands + access graph; unravel graph; That is, `import graph' first loads a module into a structure called @@ -4380,12 +4602,15 @@ same name as local functions defined later. To rename modules or fields when adding them to the local environment, use `as': + access graph as graph2d; from graph access xaxis as xline, yaxis as yline; The command + import graph as graph2d; is a convenient abbreviation for the commands + access graph as graph2d; unravel graph2d; @@ -4399,26 +4624,29 @@ of a structure defining the module. If the file name contains nonalphanumeric characters, enclose it with quotation marks: -`access "/usr/local/share/asymptote/graph.asy" as graph;' +`access "/tmp/ainst/share/asymptote/graph.asy" as graph;' -`from "/usr/local/share/asymptote/graph.asy" access axes;' +`from "/tmp/ainst/share/asymptote/graph.asy" access axes;' -`import "/usr/local/share/asymptote/graph.asy" as graph;' +`import "/tmp/ainst/share/asymptote/graph.asy" as graph;' It is an error if modules import themselves (or each other in a cycle). The module name to be imported must be known at compile time. However, you can import an `Asymptote' module determined by the string `s' at runtime like this: + eval("import "+s,true); To conditionally execute an array of asy files, use + void asy(string format, bool overwrite ... string[] s); The file will only be processed, using output format `format', if overwrite is `true' or the output file is missing. One can evaluate an `Asymptote' expression (without any return value, however) contained in the string `s' with: + void eval(string s, bool embedded=false); It is not necessary to terminate the string `s' with a semicolon. If `embedded' is `true', the string will be evaluated at the top level of @@ -4428,9 +4656,11 @@ string will be evaluated in an independent environment, sharing the same One can evaluate arbitrary `Asymptote' code (which may contain unescaped quotation marks) with the command + void eval(code s, bool embedded=false); Here `code' is a special type used with `quote {}' to enclose `Asymptote code' like this: + real a=1; code s=quote { write(a); @@ -4439,12 +4669,14 @@ eval(s,true); // Outputs 1 To include the contents of a file `graph' verbatim (as if the contents of the file were inserted at that point), use one of the forms: + include graph; -`include "/usr/local/share/asymptote/graph.asy";' +`include "/tmp/ainst/share/asymptote/graph.asy";' To list all global functions and variables defined in a module named by the contents of the string `s', use the function + void list(string s, bool imports=false); Imported global functions and variables are also listed if `imports' is `true'. @@ -4460,6 +4692,7 @@ enclosing level. For a function body, the variable is allocated in the block where the function is defined; so in the code + struct s { int count() { static int c=0; @@ -4472,6 +4705,7 @@ there is one instance of the variable `c' for each object `s' (as opposed to each call of `count'). Similarly, in + int factorial(int n) { int helper(int k) { static int x=1; @@ -4487,6 +4721,7 @@ of factorial. Similarly, a static variable declared within a structure is allocated in the block where the structure is defined. Thus, + struct A { struct B { static pair z; @@ -4496,6 +4731,7 @@ struct A { creates one object `z' for each object of type `A' created. In this example, + int pow(int n, int k) { struct A { static int x=1; @@ -4517,6 +4753,7 @@ implementation of exponentiation. that higher-order functions can refer to variables of a specific iteration of a loop: + void f(); for(int i=0; i < 10; ++i) { int x=i; @@ -4531,6 +4768,7 @@ will write `5'. If a variable in a loop is declared static, it will be allocated where the enclosing function or structure was defined (just as if it were declared static outside of the loop). For instance, in: + void f() { static int x; for(int i=0; i < 10; ++i) { @@ -4550,6 +4788,7 @@ meaningless. A warning is given in such a case. a qualified name whether the qualifier is a variable or a type. For instance, in: + struct A { static int x; } @@ -4580,12 +4819,14 @@ with no leading spaces or trailing commands/comments. The sample `LaTeX' file below, named `latexusage.tex', can be run as follows: + latex latexusage asy latexusage latex latexusage or + pdflatex latexusage asy latexusage pdflatex latexusage @@ -4606,8 +4847,8 @@ value of `viewportwidth' is `\the\linewidth' for inline 3D figures and If the `inline' option is given to the `asymptote.sty' package, inline `LaTeX' code is generated instead of EPS or PDF files. This -makes LaTeX symbols visible to the `\begin{asy}...\end{asy}' -environment. In this mode, Asymptote correctly aligns LaTeX symbols +makes 2D LaTeX symbols visible to the `\begin{asy}...\end{asy}' +environment. In this mode, Asymptote correctly aligns 2D LaTeX symbols defined outside of `\begin{asy}...\end{asy}', but treats their size as zero; an optional second string can be given to `Label' to provide an estimate of the unknown label size. @@ -4736,7 +4977,6 @@ draw("$X$",z0+s--z2+s,darkgreen,Arrows,Bars,PenMargins); \end{asy} \end{center} \end{document} - File: asymptote.info, Node: Base modules, Next: Options, Prev: LaTeX usage, Up: Top @@ -4786,6 +5026,7 @@ File: asymptote.info, Node: Base modules, Next: Options, Prev: LaTeX usage, * contour:: Contour lines * contour3:: Contour surfaces * slopefield:: Slope fields +* ode:: Ordinary differential equations File: asymptote.info, Node: plain, Next: simplex, Up: Base modules @@ -4859,9 +5100,9 @@ File: asymptote.info, Node: geometry, Next: trembling, Prev: interpolate, Up This module, written by Philippe Ivaldi, provides an extensive set of geometry routines, including `perpendicular' symbols and a `triangle' -structure. It is documented here: -`http://asymptote.sourceforge.net/geometry_en.pdf', including an -extensive set of examples, +structure. Link to the documentation for the `geometry' module are +posted here: `http://asymptote.sourceforge.net/links.html', including +an extensive set of examples, `http://piprim.tuxfamily.org/asymptote/geometry/index.html', and an index: @@ -4905,6 +5146,7 @@ File: asymptote.info, Node: markers, Next: tree, Prev: patterns, Up: Base mo This package implements specialized routines for marking paths and angles. The principal mark routine provided by this package is + markroutine markinterval(int n=1, frame f, bool rotated=false); which centers `n' copies of frame `f' within uniformly space intervals in arclength along the path, optionally rotated by the angle of the @@ -4913,17 +5155,21 @@ local tangent. The `marker' (*note marker::) routine can be used to construct new markers from these predefined frames: + frame stickframe(int n=1, real size=0, pair space=0, real angle=0, pair offset=0, pen p=currentpen); + frame circlebarframe(int n=1, real barsize=0, real radius=0,real angle=0, pair offset=0, pen p=currentpen, filltype filltype=NoFill, bool above=false); + frame crossframe(int n=3, real size=0, pair space=0, real angle=0, pair offset=0, pen p=currentpen); + frame tildeframe(int n=1, real size=0, pair space=0, real angle=0, pair offset=0, pen p=currentpen); @@ -4933,9 +5179,10 @@ frame tildeframe(int n=1, real size=0, pair space=0, frames. The example `markers1.asy' illustrates the use of these markers: - + This package also provides a routine for marking an angle AOB: + void markangle(picture pic=currentpicture, Label L="", int n=1, real radius=0, real space=0, pair A, pair O, pair B, arrowbar arrow=None, @@ -4944,7 +5191,7 @@ void markangle(picture pic=currentpicture, Label L="", as illustrated in the example `markers2.asy'. - + File: asymptote.info, Node: tree, Next: binarytree, Prev: markers, Up: Base modules @@ -4977,7 +5224,7 @@ draw(pic2,st,blue); add(pic.fit(),(0,0),10N); add(pic2.fit(),(0,0),10S); - + File: asymptote.info, Node: drawtree, Next: syzygy, Prev: binarytree, Up: Base modules @@ -5044,6 +5291,7 @@ the slide presentations `slidemovies.asy' and `intro.asy', illustrate the use of embedded PDF movies. The examples `inlinemovie.tex' and `inlinemovie3.tex' show how to generate and embed PDF movies directly within a `LaTeX' file (*note LaTeX usage::). The member function + string pdf(fit fit=NoBox, real delay=animationdelay, string options="", bool keep=settings.keep, bool multipage=true); of the `animate' structure accepts any of the `animate.sty' options, @@ -5068,14 +5316,15 @@ This module provides an interface to the `LaTeX' package (included with `http://asymptote.svn.sourceforge.net/viewvc/asymptote/trunk/asymptote/patches/' to `movie15.sty' and place it in their `LaTeX' path. - The latest version (2008/10/08) of the `movie15' package requires -both `pdflatex' version 1.20 or later and the file + The latest version of the `movie15' package requires both `pdflatex' +version 1.20 or later and the file `http://www.ctan.org/tex-archive/macros/latex/contrib/oberdiek/ifdraft.dtx' which can be installed by placing it in a directory `ifdraft' in the local `LaTeX' directory (e.g. `/usr/local/share/texmf/tex/latex/ifdraft') and executing in that directory the commands: + tex ifdraft.dtx texhash @@ -5132,6 +5381,7 @@ File: asymptote.info, Node: unicode, Next: latin1, Prev: MetaPost, Up: Base Import this package at the beginning of the file to instruct `LaTeX' to accept `unicode' (UTF-8) standardized international characters. To use Cyrillic fonts, you will need to change the font encoding: + import unicode; texpreamble("\usepackage{mathtext}\usepackage[russian]{babel}"); defaultpen(font("T2A","cmr","m","n")); @@ -5142,6 +5392,7 @@ package: The following commands enable the CJK song family (within a label, you can also temporarily switch to another family, say kai, by prepending `"\CJKfamily{kai}"' to the label string): + texpreamble("\usepackage{CJK} \AtBeginDocument{\begin{CJK*}{GBK}{song}} \AtEndDocument{\clearpage\end{CJK*}}"); @@ -5165,6 +5416,7 @@ File: asymptote.info, Node: babel, Next: labelpath, Prev: latin1, Up: Base m This module implements the `LaTeX' `babel' package in `Asymptote'. For example: + import babel; babel("german"); @@ -5177,6 +5429,7 @@ File: asymptote.info, Node: labelpath, Next: labelpath3, Prev: babel, Up: Ba This module uses the `PSTricks' `pstextpath' macro to fit labels along a path (properly kerned, as illustrated in the example file `curvedlabel.asy'), using the command + void labelpath(picture pic=currentpicture, Label L, path g, string justify=Centered, pen p=currentpen); Here `justify' is one of `LeftJustified', `Centered', or @@ -5205,6 +5458,7 @@ File: asymptote.info, Node: annotate, Next: CAD, Prev: labelpath3, Up: Base This module supports PDF annotations for viewing with `Adobe Reader', via the function + void annotate(picture pic=currentpicture, string title, string text, pair position); Annotations are illustrated in the example file `annotation.asy'. @@ -5233,7 +5487,8 @@ override manually). A graph is a `guide' (that can be drawn with the draw command, with an optional legend) constructed with one of the following routines: - * guide graph(picture pic=currentpicture, real f(real), real a, real b, + * + guide graph(picture pic=currentpicture, real f(real), real a, real b, int n=ngraph, real T(real)=identity, interpolate join=operator --); guide[] graph(picture pic=currentpicture, real f(real), real a, real b, @@ -5265,7 +5520,8 @@ following routines: nonperiodic data and `Hermite(periodic)' for periodic data). - * guide graph(picture pic=currentpicture, real x(real), real y(real), + * + guide graph(picture pic=currentpicture, real x(real), real y(real), real a, real b, int n=ngraph, real T(real)=identity, interpolate join=operator --); guide[] graph(picture pic=currentpicture, real x(real), real y(real), @@ -5278,7 +5534,8 @@ following routines: [`a',`b'], optionally restricted by the bool3 function `cond' on [`a',`b'], using the given interpolation type. - * guide graph(picture pic=currentpicture, pair z(real), real a, real b, + * + guide graph(picture pic=currentpicture, pair z(real), real a, real b, int n=ngraph, real T(real)=identity, interpolate join=operator --); guide[] graph(picture pic=currentpicture, pair z(real), real a, real b, @@ -5291,7 +5548,8 @@ following routines: [`a',`b'], optionally restricted by the bool3 function `cond' on [`a',`b'], using the given interpolation type. - * guide graph(picture pic=currentpicture, pair[] z, + * + guide graph(picture pic=currentpicture, pair[] z, interpolate join=operator --); guide[] graph(picture pic=currentpicture, pair[] z, bool3[] cond, interpolate join=operator --); @@ -5301,7 +5559,8 @@ following routines: indices for which the elements of the boolean array `cond' are `true', using the given interpolation type. - * guide graph(picture pic=currentpicture, real[] x, real[] y, + * + guide graph(picture pic=currentpicture, real[] x, real[] y, interpolate join=operator --); guide[] graph(picture pic=currentpicture, real[] x, real[] y, bool3[] cond, interpolate join=operator --); @@ -5311,7 +5570,8 @@ following routines: those indices for which the elements of the boolean array `cond' are `true', using the given interpolation type. - * guide polargraph(picture pic=currentpicture, real f(real), real a, + * + guide polargraph(picture pic=currentpicture, real f(real), real a, real b, int n=ngraph, interpolate join=operator --); Returns a polar-coordinate graph using the scaling information for @@ -5322,9 +5582,11 @@ following routines: + An axis can be drawn on a picture with one of the following commands: - * void xaxis(picture pic=currentpicture, Label L="", axis axis=YZero, + * + void xaxis(picture pic=currentpicture, Label L="", axis axis=YZero, real xmin=-infinity, real xmax=infinity, pen p=currentpen, ticks ticks=NoTicks, arrowbar arrow=None, bool above=false); @@ -5361,7 +5623,8 @@ following routines: Custom axis types can be created by following the examples in `graph.asy'. One can easily override the default values for the - standard axis types: import graph; + standard axis types: + import graph; YZero=new axis(bool extend=true) { return new void(picture pic, axisT axis) { @@ -5380,7 +5643,8 @@ following routines: `RightTicks', or `Ticks' can be used to draw ticks on the left, right, or both sides of the path, relative to the direction in which the path is drawn. These tick routines accept a number of - optional arguments: ticks LeftTicks(Label format="", ticklabel ticklabel=null, + optional arguments: + ticks LeftTicks(Label format="", ticklabel ticklabel=null, bool beginlabel=true, bool endlabel=true, int N=0, int n=0, real Step=0, real step=0, bool begin=true, bool end=true, tickmodifier modify=None, @@ -5465,13 +5729,15 @@ following routines: It is also possible to specify custom tick locations with `LeftTicks', `RightTicks', and `Ticks' by passing explicit real arrays `Ticks' and (optionally) `ticks' containing the locations - of the major and minor ticks, respectively: ticks LeftTicks(Label format="", ticklabel ticklabel=null, + of the major and minor ticks, respectively: + ticks LeftTicks(Label format="", ticklabel ticklabel=null, bool beginlabel=true, bool endlabel=true, real[] Ticks, real[] ticks=new real[], real Size=0, real size=0, bool extend=false, pen pTick=nullpen, pen ptick=nullpen) - * void yaxis(picture pic=currentpicture, Label L="", axis axis=XZero, + * + void yaxis(picture pic=currentpicture, Label L="", axis axis=XZero, real ymin=-infinity, real ymax=infinity, pen p=currentpen, ticks ticks=NoTicks, arrowbar arrow=None, bool above=false); @@ -5505,11 +5771,13 @@ following routines: Request a left and right axis. - * For convenience, the functions void xequals(picture pic=currentpicture, Label L="", real x, + * For convenience, the functions + void xequals(picture pic=currentpicture, Label L="", real x, bool extend=false, real ymin=-infinity, real ymax=infinity, pen p=currentpen, ticks ticks=NoTicks, bool above=true, arrowbar arrow=None); - and void yequals(picture pic=currentpicture, Label L="", real y, + and + void yequals(picture pic=currentpicture, Label L="", real y, bool extend=false, real xmin=-infinity, real xmax=infinity, pen p=currentpen, ticks ticks=NoTicks, bool above=true, arrowbar arrow=None); @@ -5518,7 +5786,8 @@ following routines: `YEquals(y,extend)'. This is the recommended way of drawing vertical or horizontal lines and axes at arbitrary locations. - * void axes(picture pic=currentpicture, Label xlabel="", Label ylabel="", + * + void axes(picture pic=currentpicture, Label xlabel="", Label ylabel="", pair min=(-infinity,-infinity), pair max=(infinity,infinity), pen p=currentpen, arrowbar arrow=None, bool above=false); This convenience routine draws both x and y axes on picture `pic' @@ -5526,7 +5795,8 @@ following routines: and any arrows specified by `arrow'. The axes are drawn on top of existing objects in the current picture only if `above=true'. - * void axis(picture pic=currentpicture, Label L="", path g, + * + void axis(picture pic=currentpicture, Label L="", path g, pen p=currentpen, ticks ticks, ticklocate locate, arrowbar arrow=None, int[] divisor=new int[], bool above=false, bool opposite=false); @@ -5540,7 +5810,8 @@ following routines: identifies an unlabelled secondary axis (typically drawn opposite a primary axis). The axis is drawn before any existing objects in the current picture unless `above=true'. The tick locator - `ticklocate' is constructed by the routine ticklocate ticklocate(real a, real b, autoscaleT S=defaultS, + `ticklocate' is constructed by the routine + ticklocate ticklocate(real a, real b, autoscaleT S=defaultS, real tickmin=-infinity, real tickmax=infinity, real time(real)=null, pair dir(real)=zero); where `a' and `b' specify the respective tick values at @@ -5553,7 +5824,8 @@ following routines: * These routines are useful for manually putting ticks and labels on axes (if the variable `Label' is given as the `Label' argument, the `format' argument will be used to format a string based on the - tick location): void xtick(picture pic=currentpicture, Label L="", explicit pair z, + tick location): + void xtick(picture pic=currentpicture, Label L="", explicit pair z, pair dir=N, string format="", real size=Ticksize, pen p=currentpen); void xtick(picture pic=currentpicture, Label L="", real x, @@ -5597,7 +5869,7 @@ following routines: labely(1,E); label("$e^x$",F(1),SE); - + 2. The next example draws a scientific-style graph with a legend. The position of the legend can be adjusted either explicitly or by @@ -5624,7 +5896,7 @@ following routines: add(legend(),point(E),20E,UnFill); - + To specify a fixed size for the graph proper, use `attach': import graph; @@ -5658,7 +5930,7 @@ following routines: attach(legend(2),(point(S).x,truepoint(S).y),10S,UnFill); - + 3. This example draws a graph of one array versus another (both of the same size) using custom tick locations and a smaller font size @@ -5675,7 +5947,7 @@ following routines: yaxis("$y$",LeftRight, RightTicks(Label(fontsize(8)),new real[]{0,4,9})); - + 4. This example shows how to graph columns of data read from a file. import graph; @@ -5693,31 +5965,38 @@ following routines: xaxis("$x$",BottomTop,LeftTicks); yaxis("$y$",LeftRight,RightTicks); - + 5. The next example draws two graphs of an array of coordinate pairs, using frame alignment and data markers. In the left-hand graph, the - markers, constructed with marker marker(path g, markroutine markroutine=marknodes, + markers, constructed with + marker marker(path g, markroutine markroutine=marknodes, pen p=currentpen, filltype filltype=NoFill, bool above=true); using the path `unitcircle' (*note filltype::), are drawn below - each node. Any frame can be converted to a marker, using marker marker(frame f, markroutine markroutine=marknodes, + each node. Any frame can be converted to a marker, using + + + marker marker(frame f, markroutine markroutine=marknodes, bool above=true); In the right-hand graph, the unit n-sided regular polygon `polygon(int n)' and the unit n-point cyclic cross `cross(int n, bool round=true, real r=0)' (where `r' is an optional "inner" - radius) are used to build a custom marker frame. Here - `markuniform(bool centered=false, int n, bool rotated=false)' adds - this frame at `n' uniformly spaced points along the arclength of - the path, optionally rotated by the angle of the local tangent to - the path (if centered is true, the frames will be centered within - `n' evenly spaced arclength intervals). Alternatively, one can use - markroutine `marknodes' to request that the marks be placed at each - Bezier node of the path, or markroutine `markuniform(pair z(real - t), real a, real b, int n)' to place marks at points `z(t)' for n - evenly spaced values of `t' in `[a,b]'. - - These markers are predefined: marker[] Mark={ + radius) are used to build a custom marker frame. + + Here `markuniform(bool centered=false, int n, bool rotated=false)' + adds this frame at `n' uniformly spaced points along the arclength + of the path, optionally rotated by the angle of the local tangent + to the path (if centered is true, the frames will be centered + within `n' evenly spaced arclength intervals). Alternatively, one + can use markroutine `marknodes' to request that the marks be + placed at each Bezier node of the path, or markroutine + `markuniform(pair z(real t), real a, real b, int n)' to place + marks at points `z(t)' for n evenly spaced values of `t' in + `[a,b]'. + + These markers are predefined: + marker[] Mark={ marker(scale(circlescale)*unitcircle), marker(polygon(3)),marker(polygon(4)), marker(polygon(5)),marker(invert*polygon(3)), @@ -5732,6 +6011,7 @@ following routines: The example also illustrates the `errorbar' routines: + void errorbars(picture pic=currentpicture, pair[] z, pair[] dp, pair[] dm={}, bool[] cond={}, pen p=currentpen, real size=0); @@ -5743,7 +6023,9 @@ following routines: Here, the positive and negative extents of the error are given by the absolute values of the elements of the pair array `dp' and the optional pair array `dm'. If `dm' is not specified, the positive - and negative extents of the error are assumed to be equal. import graph; + and negative extents of the error are assumed to be equal. + + import graph; picture pic; real xsize=200, ysize=140; @@ -5785,7 +6067,7 @@ following routines: // Fit pic2 to E of (5mm,0): add(pic2.fit(),(5mm,0),E); - + 6. A custom mark routine can be also be specified: import graph; @@ -5825,7 +6107,7 @@ following routines: xaxis("$x$",BottomTop,LeftTicks); yaxis("$y$",LeftRight,RightTicks); - + 7. This example shows how to label an axis with arbitrary strings. import graph; @@ -5845,14 +6127,16 @@ following routines: return month[round(x % 12)];})); yaxis("$y$",LeftRight,RightTicks(4)); - + 8. The next example draws a graph of a parametrized curve. The calls - to xlimits(picture pic=currentpicture, real min=-infinity, + to + xlimits(picture pic=currentpicture, real min=-infinity, real max=infinity, bool crop=NoCrop); and the analogous function `ylimits' can be uncommented to set the respective axes limits for picture `pic' to the specified - `min' and `max' values. Alternatively, the function void limits(picture pic=currentpicture, pair min, pair max, bool crop=NoCrop); + `min' and `max' values. Alternatively, the function + void limits(picture pic=currentpicture, pair min, pair max, bool crop=NoCrop); can be used to limit the axes to the box having opposite vertices at the given pairs). Existing objects in picture `pic' will be cropped to lie within the given limits if `crop'=`Crop'. The @@ -5872,7 +6156,7 @@ following routines: xaxis("$x$",BottomTop,LeftTicks); yaxis("$y$",LeftRight,RightTicks(trailingzero)); - + The next example illustrates how one can extract a common axis scaling factor. import graph; @@ -5891,10 +6175,11 @@ following routines: xaxis("$x/10^{"+(string) xscale+"}$",BottomTop,LeftTicks); yaxis("$y/10^{"+(string) yscale+"}$",LeftRight,RightTicks(trailingzero)); - + Axis scaling can be requested and/or automatic selection of the - axis limits can be inhibited with one of these `scale' routines: void scale(picture pic=currentpicture, scaleT x, scaleT y); + axis limits can be inhibited with one of these `scale' routines: + void scale(picture pic=currentpicture, scaleT x, scaleT y); void scale(picture pic=currentpicture, bool xautoscale=true, bool yautoscale=xautoscale, bool zautoscale=yautoscale); @@ -5909,11 +6194,13 @@ following routines: All picture coordinates (including those in paths and those given to the `label' and `limits' functions) are always treated as linear - (post-scaled) coordinates. Use pair Scale(picture pic=currentpicture, pair z); + (post-scaled) coordinates. Use + pair Scale(picture pic=currentpicture, pair z); to convert a graph coordinate into a scaled picture coordinate. The x and y components can be individually scaled using the - analogous routines real ScaleX(picture pic=currentpicture, real x); + analogous routines + real ScaleX(picture pic=currentpicture, real x); real ScaleY(picture pic=currentpicture, real y); The predefined scaling routines can be given two optional boolean @@ -5935,15 +6222,15 @@ following routines: draw(graph(f,0.1,10)); - //xlimits(1,10); - //ylimits(0.1,1); + //xlimits(1,10,Crop); + //ylimits(0.1,1,Crop); dot(Label("(3,5)",align=S),Scale((3,5))); xaxis("$x$",BottomTop,LeftTicks); yaxis("$y$",LeftRight,RightTicks); - + By extending the ticks, one can easily produce a logarithmic grid: import graph; size(200,200,IgnoreAspect); @@ -5958,7 +6245,7 @@ following routines: yaxis("$y$",LeftRight,RightTicks(begin=false,end=false,extend=true, ptick=thin)); - + One can also specify custom tick locations and formats for logarithmic axes: import graph; @@ -5972,7 +6259,7 @@ following routines: new real[] {6,10,12,14,16,18})); yaxis("$\nu_{\rm upp}$ [Hz]",LeftRight,RightTicks(DefaultFormat)); - + It is easy to draw logarithmic graphs with respect to other bases: import graph; size(200,IgnoreAspect); @@ -5992,7 +6279,7 @@ following routines: yaxis("$y$",ymin=1,ymax=f(5),RightTicks(Label(Fill(white))),EndArrow); xaxis("$x$",xmin=-5,xmax=5,LeftTicks,EndArrow); - + Here is an example of "broken" linear x and logarithmic y axes that omit the segments [3,8] and [100,1000], respectively. In the @@ -6022,9 +6309,10 @@ following routines: label(Break,(point(W).x,ScaleY(c))); label(Break,(point(E).x,ScaleY(c))); - - 9. `Asymptote' can draw secondary axes with the routines picture secondaryX(picture primary=currentpicture, void f(picture)); + + 9. `Asymptote' can draw secondary axes with the routines + picture secondaryX(picture primary=currentpicture, void f(picture)); picture secondaryY(picture primary=currentpicture, void f(picture)); In this example, `secondaryY' is used to draw a secondary linear y @@ -6055,7 +6343,7 @@ following routines: label(q,"(1,0)",Scale(q,(1,0)),red); add(q); - + A secondary logarithmic y axis can be drawn like this: import graph; @@ -6089,7 +6377,7 @@ following routines: add(secondary); label(shift(5mm*N)*"Proportion of crows",point(NW),E); - + 10. Here is a histogram example, which uses the `stats' module. import graph; import stats; @@ -6110,7 +6398,7 @@ following routines: xaxis("$x$",BottomTop,LeftTicks); yaxis("$dP/dx$",LeftRight,RightTicks(trailingzero)); - + 11. Here is an example of reading column data in from a file and a least-squares fit, using the `stats' module. size(400,200,IgnoreAspect); @@ -6169,7 +6457,7 @@ following routines: xaxis("$T$",BottomTop,LeftTicks); yaxis("$\xi$",LeftRight,RightTicks); - + 12. Here is an example that illustrates the general `axis' routine. import graph; size(0,100); @@ -6183,10 +6471,11 @@ following routines: path h=(0,0)--max(abs(max(g)),abs(min(g)))*dir(v); return intersect(g,h)[0];})); - + 13. To draw a vector field of `n' arrows evenly spaced along the - arclength of a path, use the routine picture vectorfield(path vector(real), path g, int n, bool truesize=false, + arclength of a path, use the routine + picture vectorfield(path vector(real), path g, int n, bool truesize=false, pen p=currentpen, arrowbar arrow=Arrow); as illustrated in this simple example of a flow field: import graph; defaultpen(1.0); @@ -6219,10 +6508,11 @@ following routines: add(vectorfield(vector(NE,NW),(0,0)--(point(E).x,0),n,true)); add(vectorfield(vector(NE,NE),(0,0)--(0,point(N).y),n,true)); - + 14. To draw a vector field of `nx'\times`ny' arrows in `box(a,b)', use - the routine picture vectorfield(path vector(pair), pair a, pair b, + the routine + picture vectorfield(path vector(pair), pair a, pair b, int nx=nmesh, int ny=nx, bool truesize=false, real maxlength=truesize ? 0 : maxlength(a,b,nx,ny), bool cond(pair z)=null, pen p=currentpen, @@ -6237,7 +6527,7 @@ following routines: add(vectorfield(vector,a,b)); - + 15. The following scientific graphs, which illustrate many features of `Asymptote''s graphics routines, were generated from the examples @@ -6245,10 +6535,6 @@ following routines: `diatom.csv' and `westnile.csv'. - - - - File: asymptote.info, Node: palette, Next: three, Prev: graph, Up: Base modules @@ -6284,6 +6570,7 @@ these palettes to the CMYK colorspace. A color density plot using palette `palette' can be generated from a function `f'(x,y) and added to a picture `pic': + bounds image(picture pic=currentpicture, real f(real,real), range range=Full, pair initial, pair final, int nx=ngraph, int ny=nx, pen[] palette, bool antialias=false) @@ -6292,6 +6579,7 @@ over a rectangle defined by the points `initial' and `final', respecting the current graphical scaling of `pic'. The color space is scaled according to the z axis scaling (*note automatic scaling::). A bounds structure for the function values is returned: + struct bounds { real min; real max; @@ -6309,6 +6597,7 @@ can be drawn on a color density plot (*note contour::). A color density plot can also be generated from an explicit real[][] array `data': + bounds image(picture pic=currentpicture, real[][] f, range range=Full, pair initial, pair final, pen[] palette, bool transpose=(initial.x < final.x && initial.y < final.y), @@ -6320,12 +6609,14 @@ matrix convention (first index: -y, second index: x). To construct an image from an array of irregularly spaced points and an array of values `f' at these points, use one of the routines + bounds image(picture pic=currentpicture, pair[] z, real[] f, range range=Full, pen[] palette) bounds image(picture pic=currentpicture, real[] x, real[] y, real[] f, range range=Full, pen[] palette) An optionally labelled palette bar may be generated with the routine + void palette(picture pic=currentpicture, Label L="", bounds bounds, pair initial, pair final, axis axis=Right, pen[] palette, pen p=currentpen, paletteticks ticks=PaletteTicks, @@ -6336,6 +6627,7 @@ specified by `axis', which may be one of `Right', `Left', `Top', or `Bottom'. The bar is drawn over the rectangle from `initial' to `final'. The argument `paletteticks' is a special tick type (*note ticks::) that takes the following arguments: + paletteticks PaletteTicks(Label format="", ticklabel ticklabel=null, bool beginlabel=true, bool endlabel=true, int N=0, int n=0, real Step=0, real step=0, @@ -6366,7 +6658,7 @@ palette(bar,"$A$",range,(0,0),(0.5cm,8cm),Right,Palette, PaletteTicks("$%+#.1f$")); add(bar.fit(),point(E),30E); - + Here is an example that uses logarithmic scaling of the function values: @@ -6391,9 +6683,10 @@ yaxis("$y$",LeftRight,RightTicks,above=true); palette("$f(x,y)$",range,(0,200),(100,250),Top,Palette, PaletteTicks(ptick=linewidth(0.5*linewidth()))); - + One can also draw an image directly from a two-dimensional pen array: + void image(picture pic=currentpicture, pen[][] data, pair initial, pair final, bool transpose=(initial.x < final.x && initial.y < final.y), @@ -6414,10 +6707,11 @@ for(int i=0; i < n; ++i) image(v,(0,0),(1,1)); - + For convenience, the module `palette' also defines functions that may be used to construct a pen array from a given function and palette: + pen[] palette(real[] f, pen[] palette); pen[][] palette(real[][] f, pen[] palette); @@ -6451,7 +6745,7 @@ draw(O--Z,red+dashed,Arrow3); draw(((-1,-1,0)--(1,-1,0)--(1,1,0)--(-1,1,0)--cycle)); dot(g,red); - + and then distorted into a saddle: import three; @@ -6462,9 +6756,10 @@ draw(g); draw(((-1,-1,0)--(1,-1,0)--(1,1,0)--(-1,1,0)--cycle)); dot(g,red); - + Module `three' provides constructors for converting two-dimensional paths to three-dimensional ones, and vice-versa: + path3 path3(path p, triple plane(pair)=XYplane); path path(path3 p, pair P(triple)=xypart); @@ -6472,6 +6767,7 @@ path path(path3 p, pair P(triple)=xypart); Bezier curves, is defined in `three_surface.asy' as a structure containing an array of Bezier patches. Surfaces may drawn with one of the routines + void draw(picture pic=currentpicture, surface s, int nu=1, int nv=1, material surfacepen=currentpen, pen meshpen=nullpen, light light=currentlight, light meshlight=light); @@ -6484,6 +6780,7 @@ void draw(picture pic=currentpicture, surface s, int nu=1, int nv=1, The parameters `nu' and `nv' specify the number of subdivisions for drawing optional mesh lines for each Bezier patch. Here material is a structure defined in `three_light.asy': + struct material { pen[] p; // diffusepen,ambientpen,emissivepen,specularpen real opacity; @@ -6506,18 +6803,22 @@ patches are shaded with the mean of the four vertex colors. A surface can be constructed from a cyclic `path3' with the constructor + surface surface(path3 external, triple[] internal=new triple[], triple[] normals=new triple[], pen[] colors=new pen[], bool3 planar=default); and then filled: + draw(surface(path3(polygon(5))),red,nolight); draw(surface(unitcircle3),red,nolight); draw(surface(unitcircle3,new pen[] {red,green,blue,black}),nolight); The last example constructs a patch with vertex-specific colors. A three-dimensional planar surface in the plane `plane' can be constructed from a two-dimensional cyclic path `g' with the constructor + surface surface(path p, triple plane(pair)=XYplane); and then filled: + draw(surface((0,0)--E+2N--2E--E+N..0.2E..cycle),red); Planar Bezier surfaces patches are constructed using Orest Shardt's `bezulate' routine, which decomposes (possibly nonsimply connected) @@ -6528,6 +6829,7 @@ length `4' or less. Arbitrary thick three-dimensional curves and line caps (which the `OpenGL' standard does not require implementations to provide) are constructed with the routine + surface tube(path3 g, real width); which returns a tube of diameter `width' centered on `g'. This can make files slow to render, especially with the `Adobe Reader' renderer. @@ -6550,26 +6852,36 @@ There are four choices for viewing 3D `Asymptote' output: sample width can be controlled with the setting `multisample'. An initial screen position can be specified with the pair setting `position', where negative values are interpreted as relative to - the corresponding maximum screen dimension. The mouse bindings are: + the corresponding maximum screen dimension. The default settings + import settings; + leftbutton=new string[] {"rotate","zoom","shift",""}; + middlebutton=new string[] {"menu"}; + rightbutton=new string[] {"zoom/menu","rotateX","rotateY","rotateZ"}; + wheelup=new string[] {"zoomin"}; + wheeldown=new string[] {"zoomout"}; + bind the mouse buttons as follows: * Left: rotate - * shift Left: zoom + * Shift Left: zoom - * ctrl Left: shift + * Ctrl Left: shift * Middle: menu - * Wheel: zoom + * Wheel Up: zoom in + + * Wheel Down: zoom out * Right: zoom * Right double click: menu - * shift Right: rotate about the X axis + * Shift Right: rotate about the X axis + + * Ctrl Right: rotate about the Y axis - * ctrl Right: rotate about the Y axis + * Alt Right: rotate about the Z axis - * alt Right: rotate about the Z axis The keyboard shortcuts are: * h: home @@ -6633,7 +6945,7 @@ There are four choices for viewing 3D `Asymptote' output: `PDF' viewers. Alternatively, the file `externalprc.tex' illustrates how the resulting PRC and rendered image files can be extracted and processed in a separate `LaTeX' file. However, see - *note LaTeX usage:: for an easier way to embed three-dimensional + *Note LaTeX usage:: for an easier way to embed three-dimensional `Asymptote' pictures within `LaTeX'. The open-source PRC specification is available from `http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/API_References/PRCReference/PRC_Format_Specification/'. @@ -6647,6 +6959,7 @@ There are four choices for viewing 3D `Asymptote' output: double deferred drawing. The maximal desired dimensions of the scene in each of the three dimensions can optionally be specified with the routine + void size3(picture pic=currentpicture, real x, real y=x, real z=y, bool keepAspect=pic.keepAspect); The resulting simplex linear programming problem is then solved to @@ -6660,10 +6973,12 @@ Alternatively, a minimum `viewportsize' may be specified. For convenience, the `three' module defines `O=(0,0,0)', `X=(1,0,0)', `Y=(0,1,0)', and `Z=(0,0,1)', along with a unitcircle in the XY plane: + path3 unitcircle3=X..Y..-X..-Y..cycle; A general (approximate) circle can be drawn perpendicular to the direction `normal' with the routine + path3 circle(triple c, real r, triple normal=Z); A circular arc centered at `c' with radius `r' from @@ -6671,6 +6986,7 @@ path3 circle(triple c, real r, triple normal=Z); counterclockwise relative to the normal vector `cross(dir(theta1,phi1),dir(theta2,phi2))' if `theta2 > theta1' or if `theta2 == theta1' and `phi2 >= phi1', can be constructed with + path3 arc(triple c, real r, real theta1, real phi1, real theta2, real phi2, triple normal=O); The normal must be explicitly specified if `c' and the endpoints are @@ -6678,19 +6994,23 @@ colinear. If `r' < 0, the complementary arc of radius `|r|' is constructed. For convenience, an arc centered at `c' from triple `v1' to `v2' (assuming `|v2-c|=|v1-c|') in the direction CCW (counter-clockwise) or CW (clockwise) may also be constructed with + path3 arc(triple c, triple v1, triple v2, triple normal=O, bool direction=CCW); When high accuracy is needed, the routines `Circle' and `Arc' defined -in `graph3' may be used instead. See *note GaussianSurface:: for an +in `graph3' may be used instead. See *Note GaussianSurface:: for an example of a three-dimensional circular arc. The representation `O--O+u--O+u+v--O+v--cycle' of the plane passing through point `O' with normal `cross(u,v)' is returned by + path3 plane(triple u, triple v, triple O=O); A three-dimensional box with opposite vertices at triples `v1' and `v2' may be drawn with the function + path3[] box(triple v1, triple v2); For example, a unit box is predefined as + path3[] unitbox=box(O,(1,1,1)); `Asymptote' also provides optimized definitions for the three-dimensional paths `unitsquare3' and `unitcircle3', along with the @@ -6762,6 +7082,7 @@ The default projection, `currentprojection', is initially set to `perspective(5,4,2)'. We also define standard orthographic views used in technical drawing: + projection LeftView=orthographic(-X,showtarget=true); projection RightView=orthographic(X,showtarget=true); projection FrontView=orthographic(-Y,showtarget=true); @@ -6769,11 +7090,13 @@ projection BackView=orthographic(Y,showtarget=true); projection BottomView=orthographic(-Z,showtarget=true); projection TopView=orthographic(Z,showtarget=true); The function + void addViews(picture dest=currentpicture, picture src, bool group=true, filltype filltype=NoFill); adds picture `pic' as seen with `FrontView' aligned above the projection `TopView' and to the right of the projection `RightView'. Alternatively, the function + void addAllViews(picture dest=currentpicture, picture src, real xmargin=0, real ymargin=xmargin, bool group=true, filltype filltype=NoFill); @@ -6788,13 +7111,16 @@ projection P=currentprojection)'. It is occasionally useful to be able to invert a projection, sending a pair `z' onto the plane perpendicular to `normal' and passing through `point': + triple invert(pair z, triple normal, triple point, projection P=currentprojection); A pair `z' on the projection plane can be inverted to a triple with the routine + triple invert(pair z, projection P=currentprojection); A pair direction `dir' on the projection plane can be inverted to a triple direction relative to a point `v' with the routine + triple invert(pair dir, triple v, projection P=currentprojection). Three-dimensional objects may be transformed with one of the @@ -6839,16 +7165,20 @@ viewpoint. A transform3 that projects in the direction `dir' onto the plane with normal `n' through point `O' is returned by + transform3 planeproject(triple n, triple O=O, triple dir=n); One can use + triple normal(path3 p); to find the unit normal vector to a planar three-dimensional path `p'. As illustrated in the example `planeproject.asy', a transform3 that projects in the direction `dir' onto the plane defined by a planar path `p' is returned by + transform3 planeproject(path3 p, triple dir=normal(p)); The functions + surface extrude(path p, triple axis=Z); surface extrude(Label L, triple axis=Z); return the surface obtained by extruding path `p' or Label `L' along @@ -6861,9 +7191,11 @@ surface extrude(Label L, triple axis=Z); `max', `cyclic', and `straight' are also defined. The routine + real[][] intersections(path3 p, surface s, real fuzz=-1); returns the intersection times of a path `p' with a surface `s' as a sorted array of real arrays of length 2, and + triple[] intersectionpoints(path3 p, surface s, real fuzz=-1); returns the corresponding intersection points. Here, the computations are performed to the absolute error specified by `fuzz', or if `fuzz < @@ -6895,7 +7227,7 @@ yaxis3(Label(XY()*"$y$",align=-3X),red,above=true); dot(z); - + Three-dimensional versions of bars or arrows can be drawn with one of the specifiers `None', `Blank', `BeginBar3', `EndBar3' (or equivalently @@ -6938,11 +7270,13 @@ planar path is first converted to a structure `face' derived from `picture'. A `face' may be given to a two-dimensional drawing routine in place of any `picture' argument. An array of such faces may then be drawn, removing hidden surfaces: + void add(picture pic=currentpicture, face[] faces, projection P=currentprojection); Labels may be projected to two dimensions, using projection `P', onto the plane passing through point `O' with normal `cross(u,v)' by multiplying it on the left by the transform + transform transform(triple u, triple v, triple O=O, projection P=currentprojection); @@ -6969,7 +7303,7 @@ filldraw(faces.push(g),project(g),green); add(faces); - + File: asymptote.info, Node: obj, Next: graph3, Prev: three, Up: Base modules @@ -6988,12 +7322,14 @@ File: asymptote.info, Node: graph3, Next: grid3, Prev: obj, Up: Base modules This module implements three-dimensional versions of the functions in `graph.asy'. To draw an x axis in three dimensions, use the routine + void xaxis3(picture pic=currentpicture, Label L="", axis axis=YZZero, real xmin=-infinity, real xmax=infinity, pen p=currentpen, ticks3 ticks=NoTicks3, arrowbar3 arrow=None, bool above=false); Analogous routines `yaxis' and `zaxis' can be used to draw y and z axes in three dimensions. There is also a routine for drawing all three axis: + void axes3(picture pic=currentpicture, Label xlabel="", Label ylabel="", Label zlabel="", triple min=(-infinity,-infinity,-infinity), @@ -7001,6 +7337,7 @@ void axes3(picture pic=currentpicture, pen p=currentpen, arrowbar3 arrow=None); The predefined three-dimensional axis types are + axis YZEquals(real y, real z, triple align=O, bool extend=false); axis XZEquals(real x, real z, triple align=O, bool extend=false); axis XYEquals(real x, real y, triple align=O, bool extend=false); @@ -7043,7 +7380,7 @@ xaxis3(XZ()*"$x$",Bounds(),red,InTicks(Label,2,2)); yaxis3(YZ()*"$y$",Bounds(),red,InTicks(beginlabel=false,Label,2,2)); zaxis3(XZ()*"$z$",Bounds(),red,InTicks); - + The next example illustrates three-dimensional x, y, and z axes, without autoscaling of the axis limits: @@ -7061,7 +7398,7 @@ xaxis3("$x$",0,1,red,OutTicks(2,2)); yaxis3("$y$",0,1,red,OutTicks(2,2)); zaxis3("$z$",1,30,red,OutTicks(beginlabel=false)); - + One can also place ticks along a general three-dimensional axis: @@ -7078,30 +7415,37 @@ axis(Label("C",position=0,align=15X),g,InTicks(endlabel=false,8,end=false), return intersect(g,h)[0];}, new triple(real t) {return cross(dir(g,t),Z);})); - + Surface plots of matrices and functions over the region `box(a,b)' in the XY plane are also implemented: + surface surface(real[][] f, pair a, pair b, bool[][] cond={}); -surface surface(real[][] f, pair a, pair b, splinetype splinetype, - bool[][] cond={}); +surface surface(real[][] f, pair a, pair b, splinetype xsplinetype, + splinetype ysplinetype=xsplinetype, bool[][] cond={}); surface surface(real[][] f, real[] x, real[] y, - splinetype splinetype=null, bool[][] cond={}) + splinetype xsplinetype=null, splinetype ysplinetype=xsplinetype, + bool[][] cond={}) surface surface(triple[][] f, bool[][] cond={}); surface surface(real f(pair z), pair a, pair b, int nx=nmesh, int ny=nx, bool cond(pair z)=null); surface surface(real f(pair z), pair a, pair b, int nx=nmesh, int ny=nx, - splinetype splinetype, bool cond(pair z)=null); + splinetype xsplinetype, splinetype ysplinetype=xsplinetype, + bool cond(pair z)=null); surface surface(triple f(pair z), pair a, pair b, int nu=nmesh, int nv=nu, bool cond(pair z)=null); - The final version draws a parametric surface for a function f(u,v) +surface surface(triple f(pair z), pair a, pair b, int nu=nmesh, int nv=nu, + splinetype[] usplinetype, splinetype[] vsplinetype=Spline, + bool cond(pair z)=null); + The final two versions draw parametric surfaces for a function f(u,v) over the parameter space `box(a,b)', as illustrated in the example -`parametricsurface.asy'. The boolean array or function `cond' can be -used to control which surface mesh cells are actually drawn (by default -all mesh cells over `box(a,b)' are drawn). Surface lighting is -illustrated in the example files `parametricsurface.asy' and `sinc.asy'. -Lighting can be disabled by setting `light=nolight', as in this example -of a Gaussian surface: +`parametricsurface.asy'. An optional splinetype `Spline' may be +specified. The boolean array or function `cond' can be used to control +which surface mesh cells are actually drawn (by default all mesh cells +over `box(a,b)' are drawn). Surface lighting is illustrated in the +example files `parametricsurface.asy' and `sinc.asy'. Lighting can be +disabled by setting `light=nolight', as in this example of a Gaussian +surface: import graph3; @@ -7125,12 +7469,13 @@ draw(s,lightgray,meshpen=black+thick(),nolight); label("$O$",O,-Z+Y,red); - + A mesh can be drawn without surface filling by specifying `nullpen' for the surfacepen. A vector field of `nu'\times`nv' arrows on a parametric surface `f' over `box(a,b)' can be drawn with the routine + picture vectorfield(path3 vector(pair v), triple f(pair z), pair a, pair b, int nu=nmesh, int nv=nu, bool truesize=false, real maxlength=truesize ? 0 : maxlength(f,a,b,nu,nv), @@ -7166,7 +7511,7 @@ yaxis3(Label("$y$",position=EndPoint,align=S),Bounds(Min,Min),OutTicks()); zaxis3(Label("$z$",position=EndPoint,align=(-1,0.5)),Bounds(Min,Min), OutTicks(beginlabel=false)); - + File: asymptote.info, Node: solids, Next: tube, Prev: grid3, Up: Base modules @@ -7186,13 +7531,14 @@ size(0,100); revolution r=cylinder(O,1,1.5,Y+Z); draw(r,heavygreen); - + Further illustrations are provided in the example files `cylinder.asy', `cones.asy', `hyperboloid.asy', and `torus.asy'. The structure `skeleton' contains the three-dimensional wireframe used to visualize a volume of revolution: + struct skeleton { struct curve { path3[] front; @@ -7213,6 +7559,7 @@ File: asymptote.info, Node: tube, Next: flowchart, Prev: solids, Up: Base mo This package extends the routine `tube' defined in `three_arrows.asy' to arbitrary cross sections, colors, and spine transformations. The routine + surface tube(path3 g, coloredpath section, transform T(real)=new transform(real t) {return identity();}, real corner=1, real relstep=0); @@ -7223,6 +7570,7 @@ nonzero value of `relstep' specifies a fixed relative time step (in the sense of `relpoint(g,t)') to use in constructing elementary tubes along `g'. The type `coloredpath' is a generalization of `path' to which a `path' can be cast: + struct coloredpath { path p; @@ -7238,6 +7586,7 @@ whereas if `colortype=coloredNodes', the tube components are vertex shaded as if the nodes of the section were colored. A `coloredpath' can be constructed with one of the routines: + coloredpath coloredpath(path p, pen[] pens(real), int colortype=coloredSegments); coloredpath coloredpath(path p, pen[] pens=new pen[] {currentpen}, @@ -7266,6 +7615,7 @@ structure is a `block', which represents a single block on the flowchart. The following eight functions return a position on the appropriate edge of the block, given picture transform `t': + pair block.top(transform t=identity()); pair block.left(transform t=identity()); pair block.right(transform t=identity()); @@ -7278,6 +7628,7 @@ pair block.bottomright(transform t=identity()); To obtain an arbitrary position along the boundary of the block in user coordinates, use: + pair block.position(real x, transform t=identity()); @@ -7285,6 +7636,7 @@ The center of the block in user coordinates is stored in `block.center' and the block size in `PostScript' coordinates is given by `block.size'. A frame containing the block is returned by + frame block.draw(pen p=currentpen); @@ -7292,6 +7644,7 @@ frame block.draw(pen p=currentpen); frame for their object argument: "rectangular block with an optional header (and padding `dx' around header and body):" + block rectangle(object header, object body, pair center=(0,0), pen headerpen=mediumgray, pen bodypen=invisible, pen drawpen=currentpen, @@ -7305,6 +7658,7 @@ frame for their object argument: real minheight=minblockheight); "diamond-shaped flowchart block:" + block diamond(object body, pair center=(0,0), pen fillpen=invisible, pen drawpen=currentpen, real ds=5, real dw=1, @@ -7312,17 +7666,20 @@ frame for their object argument: real minheight=minblockheight); "circular flowchart block:" + block circle(object body, pair center=(0,0), pen fillpen=invisible, pen drawpen=currentpen, real dr=3, real mindiameter=mincirclediameter); "rectangular flowchart block with rounded corners:" + block roundrectangle(object body, pair center=(0,0), pen fillpen=invisible, pen drawpen=currentpen, real ds=5, real dw=0, real minwidth=minblockwidth, real minheight=minblockheight); "rectangular flowchart block with beveled edges:" + block bevel(object body, pair center=(0,0), pen fillpen=invisible, pen drawpen=currentpen, real dh=5, real dw=5, real minwidth=minblockwidth, real minheight=minblockheight); @@ -7330,6 +7687,7 @@ frame for their object argument: To draw paths joining the pairs in `point' with right-angled lines, use the routine: + path path(pair point[] ... flowdir dir[]); The entries in `dir' identify whether successive segments between the pairs specified by `point' should be drawn in the `Horizontal' or @@ -7368,7 +7726,7 @@ add(new void(picture pic, transform t) { Arrow,PenMargin); }); - + File: asymptote.info, Node: contour, Next: contour3, Prev: flowchart, Up: Base modules @@ -7378,6 +7736,7 @@ File: asymptote.info, Node: contour, Next: contour3, Prev: flowchart, Up: Ba This package draws contour lines. To construct contours corresponding to the values in an array `c' for a function `f' on `box(a,b)', use + guide[][] contour(real f(real, real), pair a, pair b, real[] c, int nx=ngraph, int ny=nx, interpolate join=operator --); @@ -7389,6 +7748,7 @@ produce smoother contours but it can also lead to overshooting. To construct contours for an array of data values on a uniform two-dimensional lattice on `box(a,b)', use + guide[][] contour(real[][] f, real[][] midpoint=new real[][], pair a, pair b, real[] c, interpolate join=operator --); @@ -7396,15 +7756,18 @@ guide[][] contour(real[][] f, real[][] midpoint=new real[][], To construct contours for an array of data values on a nonoverlapping regular mesh specified by the two-dimensional array `z', optionally specifying the values of `f' at the mesh midpoints, use + guide[][] contour(pair[][] z, real[][] f, real[][] midpoint=new real[][], real[] c, interpolate join=operator --); To construct contours for an array of values `f' specified at irregularly positioned points `z', use the routine + guide[][] contour(pair[] z, real[] f, real[] c, interpolate join=operator --); The contours themselves can be drawn with one of the routines + void draw(picture pic=currentpicture, Label[] L=new Label[], guide[][] g, pen p=currentpen) @@ -7420,7 +7783,7 @@ size(75); real f(real a, real b) {return a^2+b^2;} draw(contour(f,(-1,-1),(1,1),new real[] {1})); - + The next example draws and labels multiple contours for the function z=x^2-y^2 with the resolution `100 x 100', using a dashed pen for @@ -7446,7 +7809,7 @@ Label[] Labels=sequence(new Label(int i) { draw(Labels,contour(f,(-1,-1),(1,1),c),p); - + The next example illustrates how contour lines can be drawn on color density images: @@ -7492,7 +7855,7 @@ yaxis("$y$",LeftRight,RightTicks,above=true); palette("$f(x,y)$",range,point(NW)+(0,0.5),point(NE)+(0,1),Top,Palette, PaletteTicks(N=Divs,n=divs,Tickpen,tickpen)); - + Finally, here is an example that illustrates the construction of contours from irregularly spaced data: @@ -7517,12 +7880,13 @@ for(int i=0; i < n; ++i) { draw(contour(points,values,new real[]{0.25,0.5,1},operator ..),blue); - + In the above example, the contours of irregularly spaced data are constructed by first creating a triangular mesh from an array `z' of pairs: + int[][] triangulate(pair[] z); size(200); @@ -7545,7 +7909,7 @@ for(int i=0; i < trn.length; ++i) { for(int i=0; i < np; ++i) dot(points[i],red); - + The example `Gouraudcontour' illustrates how to produce color density images over such irregular triangular meshes. `Asymptote' uses a @@ -7564,13 +7928,14 @@ functions of (x,y,z) or real[][][] matrices. Its usage is illustrated in the example file `magnetic.asy'. -File: asymptote.info, Node: slopefield, Prev: contour3, Up: Base modules +File: asymptote.info, Node: slopefield, Next: ode, Prev: contour3, Up: Base modules 7.38 `slopefield' ================= To draw a slope field for the differential equation dy/dx=f(x,y) (or dy/dx=f(x)), use: + picture slopefield(real f(real,real), pair a, pair b, int nx=nmesh, int ny=nx, real tickfactor=0.5, pen p=currentpen, @@ -7584,6 +7949,7 @@ The return value is a picture that can be added to `currentpicture' via the `add(picture)' command. The function + path curve(pair c, real f(real,real), pair a, pair b); takes a point (`c') and a slope field-defining function `f' and returns, as a path, the curve passing through that point. The points @@ -7601,7 +7967,17 @@ real func(real x) {return 2x;} add(slopefield(func,(-3,-3),(3,3),20,Arrow)); draw(curve((0,0),func,(-3,-3),(3,3)),red); - + + + +File: asymptote.info, Node: ode, Prev: slopefield, Up: Base modules + +7.39 `ode' +========== + +The `ode' module, illustrated in the example `odetest.asy', implements +a number of explicit numerical integration schemes for ordinary +differential equations. File: asymptote.info, Node: Options, Next: Interactive mode, Prev: Base modules, Up: Top @@ -7617,7 +7993,7 @@ Usage: ../asy [options] [file ...] Options (negate by replacing - with -no): -V,-View View output; command-line only --a,-align C|B|T|Z Center, Bottom, Top, or Zero page alignment [Center] +-a,-align C|B|T|Z Center, Bottom, Top, or Zero page alignment [C] -antialias n Antialiasing width for rasterized output [2] -auto3D Automatically activate 3D scene [true] -autoimport string Module to automatically import @@ -7712,6 +8088,7 @@ Typically the configuration file is placed in the `.asy' directory in the user's home directory (`%USERPROFILE%\.asy' under `MSDOS'). Configuration variables are accessed using the long form of the option names: + import settings; outformat="pdf"; batchView=false; @@ -7726,6 +8103,7 @@ specialized options to be passed as a string to the respective applications or libraries. If you insert + import plain; settings.autoplain=true; at the beginning of the configuration file, it can contain arbitrary @@ -7745,6 +8123,7 @@ comes with `ImageMagick'). To give specific options to `convert', use the `convertOptions' setting or call convert manually. This example emulates how `Asymptote' produces antialiased `tiff' output at one pixel per `bp': + asy -o - venn | convert -alpha Off -density 144x144 -geometry 50%x eps:- venn.tiff If the option `-nosafe' is given, `Asymptote' runs in unsafe mode. @@ -7753,6 +8132,7 @@ arbitrary shell commands. The default mode, `-safe', disables this call. A `PostScript' offset may be specified as a pair (in `bp' units) with the `-O' option: + asy -O 0,0 file The default offset is zero. The default value of the page alignment setting `align' is `Center'. @@ -7761,8 +8141,10 @@ setting `align' is `Center'. `Asymptote' code on the command line as a string. It is not necessary to terminate the string with a semicolon. Multiple `-c' options are executed in the order they are given. For example + asy -c 2+2 -c "sin(1)" -c "size(100); draw(unitsquare)" produces the output + 4 0.841470984807897 and draws a unitsquare of size `100'. @@ -7772,6 +8154,7 @@ asy -c 2+2 -c "sin(1)" -c "size(100); draw(unitsquare)" necessary to terminate the string with a semicolon. Multiple `-u' options are executed in the order they are given. Command-line code like `-u x=sqrt(2)' can be executed within a module like this: + real x; usersetting(); write(x); @@ -7860,6 +8243,7 @@ bindings, see: an alternative way of entering `Asymptote' commands interactively, coupled with the full power of `Python'. Copy this file to your `Python path' and then execute from within `Python' the commands + from asymptote import * g=asy() g.size(200) @@ -7892,11 +8276,12 @@ File: asymptote.info, Node: GUI Installation, Next: GUI Usage, Up: GUI ===================== 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 s`Python' under `Microsoft Windows') be +it requires `Python' (`http://www.python.org'), the `Python Imaging +Library' (`http://www.pythonware.com/products/pil/'), and the `tkinter' +package (included with `Python' under `Microsoft Windows') be installed. `Fedora Linux' users can either install `tkinter' with the commands + yum install tkinter yum install tk-devel or manually install the `tkinter', `tix', `tk', and `tk-devel' @@ -7904,22 +8289,23 @@ packages. Pictures are deconstructed into the PNG image format, which supports full alpha channel transparency. Under `Microsoft Windows', this -requires `Python 2.5 (or 2.5.1)' and the `Python Imaging Library': +requires `Python 2.6.2' and the `Python Imaging Library': - `http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi' + `http://www.python.org/ftp/python/2.6.2/python-2.6.2.msi' - `http://effbot.org/downloads/PIL-1.1.6.win32-py2.5.exe'. + `http://effbot.org/downloads/PIL-1.1.7b1.win32-py2.6.exe'. On `UNIX' systems, place -`http://effbot.org/downloads/Imaging-1.1.6.tar.gz' in the `Asymptote' +`http://effbot.org/downloads/Imaging-1.1.7b1.tar.gz' in the `Asymptote' source directory, and type (as the root user): -tar -zxf Imaging-1.1.6.tar.gz -cd Imaging-1.1.6 -patch -p1 < ../patches/TkAlpha-Imaging-1.1.6.patch + +tar -zxf Imaging-1.1.7b1.tar.gz +cd Imaging-1.1.7b1 python setup.py install Alternatively, `xasy' can deconstruct pictures into the GIF image format (not recommended as this is very slow), using white as the transparent color. This requires the lines + import settings; xformat="gif"; in the `Asymptote' configuration file (*note configuration file::), @@ -7939,6 +8325,7 @@ option `-x n', which sets the initial magnification to `n'. Deconstruction of compound objects (such as arrows) can be prevented by enclosing them within the commands + void begingroup(picture pic=currentpicture); void endgroup(picture pic=currentpicture); By default, the elements of a picture or frame will be grouped @@ -7965,6 +8352,7 @@ user, place `http://prdownloads.sourceforge.net/pstoedit/pstoedit-3.45.tar.gz' in the `Asymptote' source directory, and type: + tar -zxf pstoedit-3.45.tar.gz cd pstoedit-3.45 patch -p1 < ../patches/pstoedit-3.45asy.patch @@ -7974,7 +8362,8 @@ make install Then try: -`asy -V /usr/local/share/doc/asymptote/examples/venn.asy' +`asy -V /tmp/ainst/share/doc/asymptote/examples/venn.asy' + pstoedit -f asy venn.eps test.asy asy -V test @@ -8006,7 +8395,7 @@ form of patches or `Asymptote' modules can be posted here: `http://freshmeat.net/projects/asy' If you find a bug in `Asymptote', please check (if possible) whether -the bug is still present in the latest Subversion developmental code +the bug is still present in the latest `Subversion' developmental code (*note Subversion::) before submitting a bug report. New bugs can be submitted using the Bug Tracking System at @@ -8032,22 +8421,28 @@ Asymptote now includes a line-based (as opposed to code-based) debugger that can assist the user in following flow control. To set a break point in file `file' at line `line', use the command + void stop(string file, int line, code s=quote{}); The optional argument `s' may be used to conditionally set the variable `ignore' in `plain_debugger.asy' to `true'. For example, the first 10 instances of this breakpoint will be ignored (the variable `int count=0' is defined in `plain_debugger.asy'): + stop("test",2,quote{ignore=(++count <= 10);}); To set a break point in file `file' at the first line containing the string `text', use + void stop(string file, string text, code s=quote{}); To list all breakpoints, use: + void breakpoints(); To clear a breakpoint, use: + void clear(string file, int line); To clear all breakpoints, use: + void clear(); The following commands may be entered at the debugging prompt: @@ -8088,6 +8483,7 @@ currently only top-level (global) variables can be displayed or modified. The debugging prompt may be entered manually with the call + void breakpoint(code s=quote{}); @@ -8125,14 +8521,14 @@ Index (line 68) * != <1>: Arithmetic & logical. (line 38) -* !=: Structures. (line 54) +* !=: Structures. (line 56) * %: Arithmetic & logical. (line 23) * %=: Self & prefix operators. (line 6) * & <1>: Arithmetic & logical. (line 56) -* &: Tutorial. (line 192) +* &: Tutorial. (line 203) * &&: Arithmetic & logical. (line 53) * * <1>: Arithmetic & logical. @@ -8153,16 +8549,16 @@ Index (line 14) * -- <1>: Self & prefix operators. (line 6) -* --: Tutorial. (line 109) -* ---: Tutorial. (line 192) +* --: Tutorial. (line 114) +* ---: Tutorial. (line 203) * -=: Self & prefix operators. (line 6) -* -c: Options. (line 155) -* -l: Options. (line 174) -* -u: Options. (line 165) -* -V <1>: Tutorial. (line 41) +* -c: Options. (line 158) +* -l: Options. (line 180) +* -u: Options. (line 170) +* -V <1>: Tutorial. (line 43) * -V: Configuring. (line 6) -* ..: Tutorial. (line 109) +* ..: Tutorial. (line 114) * .asy: Search paths. (line 13) * /: Arithmetic & logical. (line 20) @@ -8172,17 +8568,17 @@ Index * 3D graphs: graph3. (line 6) * 3D grids: grid3. (line 6) * 3D rendering: Compiling from UNIX source. - (line 16) + (line 17) * :: Arithmetic & logical. (line 73) -* ::: Tutorial. (line 176) +* ::: Tutorial. (line 187) * <: Arithmetic & logical. (line 41) * <=: Arithmetic & logical. (line 44) * == <1>: Arithmetic & logical. (line 37) -* ==: Structures. (line 54) +* ==: Structures. (line 56) * >: Arithmetic & logical. (line 50) * >=: Arithmetic & logical. @@ -8193,14 +8589,14 @@ Index (line 28) * ^=: Self & prefix operators. (line 6) -* ^^: Tutorial. (line 197) -* a4: Configuring. (line 62) -* abort: Data types. (line 320) +* ^^: Tutorial. (line 208) +* a4: Configuring. (line 64) +* abort: Data types. (line 326) * abs <1>: Mathematical functions. (line 35) -* abs: Data types. (line 60) -* accel <1>: three. (line 433) -* accel: Paths and guides. (line 110) +* abs: Data types. (line 62) +* accel <1>: three. (line 469) +* accel: Paths and guides. (line 117) * access: Import. (line 6) * acknowledgments: Credits. (line 6) * aCos: Mathematical functions. @@ -8209,72 +8605,73 @@ Index (line 6) * acosh: Mathematical functions. (line 6) -* add: Frames and pictures. (line 190) +* add: Frames and pictures. (line 215) * Ai: Mathematical functions. (line 48) * Ai_deriv: Mathematical functions. (line 48) * Airy: Mathematical functions. (line 48) -* alias <1>: Arrays. (line 187) -* alias: Structures. (line 54) -* align: Options. (line 149) -* Align: label. (line 12) -* all: Arrays. (line 331) -* Allow: Pens. (line 323) +* alias <1>: Arrays. (line 192) +* alias: Structures. (line 56) +* align: Options. (line 151) +* Align: label. (line 13) +* all: Arrays. (line 342) +* Allow: Pens. (line 338) * AND: Arithmetic & logical. - (line 80) -* and: Tutorial. (line 165) -* angle: Data types. (line 68) + (line 81) +* and: Tutorial. (line 174) +* angle: Data types. (line 70) * animate <1>: animation. (line 12) -* animate <2>: Files. (line 148) -* animate: Configuring. (line 68) +* animate <2>: Files. (line 155) +* animate: Configuring. (line 70) * animation: animation. (line 6) * annotate: annotate. (line 6) -* antialias <1>: Options. (line 129) -* antialias: three. (line 180) +* antialias <1>: Options. (line 130) +* antialias: three. (line 198) * antialiasing: Compiling from UNIX source. - (line 16) -* append <1>: Arrays. (line 39) -* append: Files. (line 36) -* arc: three. (line 245) -* Arc: Paths and guides. (line 32) -* arc: Paths and guides. (line 22) -* ArcArrow: draw. (line 26) -* ArcArrow3: three. (line 476) -* ArcArrows: draw. (line 26) -* ArcArrows3: three. (line 476) -* arclength <1>: three. (line 433) -* arclength: Paths and guides. (line 137) -* arctime <1>: three. (line 433) -* arctime: Paths and guides. (line 141) + (line 17) +* append <1>: Arrays. (line 42) +* append: Files. (line 37) +* arc: three. (line 266) +* Arc: Paths and guides. (line 37) +* arc: Paths and guides. (line 24) +* ArcArrow: draw. (line 27) +* ArcArrow3: three. (line 514) +* ArcArrows: draw. (line 27) +* ArcArrows3: three. (line 514) +* arclength <1>: three. (line 469) +* arclength: Paths and guides. (line 144) +* arctime <1>: three. (line 469) +* arctime: Paths and guides. (line 148) * arguments: Default arguments. (line 6) * arithmetic operators: Arithmetic & logical. (line 6) -* array: Arrays. (line 125) -* array iteration: Programming. (line 33) +* array: Arrays. (line 130) +* array iteration: Programming. (line 34) * arrays: Arrays. (line 6) -* arrow: label. (line 72) -* Arrow: draw. (line 26) -* arrow: Drawing commands. (line 31) -* arrow keys: Tutorial. (line 21) -* Arrow3: three. (line 476) -* Arrows: draw. (line 26) -* Arrows3: three. (line 476) -* as: Import. (line 70) +* arrow: label. (line 77) +* Arrow: draw. (line 27) +* arrow: Drawing commands. (line 32) +* arrow keys: Tutorial. (line 22) +* Arrow3: three. (line 514) +* Arrows: draw. (line 27) +* Arrows3: three. (line 514) +* as: Import. (line 78) * aSin: Mathematical functions. (line 20) * asin: Mathematical functions. (line 6) * asinh: Mathematical functions. (line 6) -* Aspect: Frames and pictures. (line 54) +* Aspect: Frames and pictures. (line 60) * assignment: Programming. (line 8) -* asy: Import. (line 105) +* asy: Import. (line 117) * asy-mode: Editing modes. (line 6) -* asy.vim: Editing modes. (line 33) +* asy.vim: Editing modes. (line 34) * asymptote.sty: LaTeX usage. (line 6) -* ASYMPTOTE_CONFIG: Options. (line 102) +* asymptote.xml: Editing modes. (line 52) +* ASYMPTOTE_CONFIG: Options. (line 101) * aTan: Mathematical functions. (line 20) * atan: Mathematical functions. @@ -8283,731 +8680,736 @@ Index (line 6) * atanh: Mathematical functions. (line 6) -* atleast: Tutorial. (line 165) -* attach <1>: graph. (line 405) -* attach: LaTeX usage. (line 32) -* autoadjust: three. (line 315) -* autoimport: Options. (line 98) -* automatic scaling: graph. (line 672) -* axialshade: fill. (line 43) -* axis <1>: graph3. (line 66) -* axis: graph. (line 870) -* azimuth: Data types. (line 124) +* atleast: Tutorial. (line 174) +* attach <1>: graph. (line 423) +* attach: LaTeX usage. (line 34) +* autoadjust: three. (line 341) +* autoimport: Options. (line 97) +* automatic scaling: graph. (line 702) +* axialshade: fill. (line 49) +* axis <1>: graph3. (line 69) +* axis: graph. (line 904) +* azimuth: Data types. (line 126) * babel: babel. (line 6) -* background color: Frames and pictures. (line 162) -* BackView: three. (line 340) -* Bar: draw. (line 19) -* Bar3: three. (line 476) -* Bars: draw. (line 19) -* Bars3: three. (line 476) -* barsize: draw. (line 19) +* background color: Frames and pictures. (line 183) +* BackView: three. (line 366) +* Bar: draw. (line 20) +* Bar3: three. (line 514) +* Bars: draw. (line 20) +* Bars3: three. (line 514) +* barsize: draw. (line 20) * base modules: Base modules. (line 6) -* basealign: Pens. (line 164) -* baseline: label. (line 92) -* batch mode: Tutorial. (line 30) -* beep: Data types. (line 334) -* BeginArcArrow: draw. (line 26) -* BeginArcArrow3: three. (line 476) -* BeginArrow: draw. (line 26) -* BeginArrow3: three. (line 476) -* BeginBar: draw. (line 19) -* BeginBar3: three. (line 476) -* BeginDotMargin: draw. (line 42) -* BeginDotMargin3: three. (line 492) -* BeginMargin: draw. (line 42) -* BeginMargin3: three. (line 492) -* BeginPenMargin: draw. (line 42) -* BeginPenMargin2: three. (line 492) -* BeginPenMargin3: three. (line 492) -* BeginPoint: label. (line 57) +* basealign: Pens. (line 175) +* baseline: label. (line 99) +* batch mode: Tutorial. (line 31) +* beep: Data types. (line 340) +* BeginArcArrow: draw. (line 27) +* BeginArcArrow3: three. (line 514) +* BeginArrow: draw. (line 27) +* BeginArrow3: three. (line 514) +* BeginBar: draw. (line 20) +* BeginBar3: three. (line 514) +* BeginDotMargin: draw. (line 43) +* BeginDotMargin3: three. (line 530) +* BeginMargin: draw. (line 43) +* BeginMargin3: three. (line 530) +* BeginPenMargin: draw. (line 43) +* BeginPenMargin2: three. (line 530) +* BeginPenMargin3: three. (line 530) +* BeginPoint: label. (line 61) * Bessel: Mathematical functions. (line 48) -* bevel: flowchart. (line 68) -* beveljoin: Pens. (line 134) -* bezulate: three. (line 98) +* bevel: flowchart. (line 75) +* beveljoin: Pens. (line 143) +* bezulate: three. (line 105) * Bi: Mathematical functions. (line 48) * Bi_deriv: Mathematical functions. (line 48) -* binary format: Files. (line 71) +* binary format: Files. (line 75) * binary operators: Arithmetic & logical. (line 6) * binarytree: binarytree. (line 6) -* binput: Files. (line 71) -* Blank: draw. (line 26) -* block.bottom: flowchart. (line 19) -* block.bottomleft: flowchart. (line 19) -* block.bottomright: flowchart. (line 19) -* block.center: flowchart. (line 26) -* block.draw: flowchart. (line 31) -* block.left: flowchart. (line 19) -* block.position: flowchart. (line 24) -* block.right: flowchart. (line 19) -* block.top: flowchart. (line 19) -* block.topleft: flowchart. (line 19) -* block.topright: flowchart. (line 19) +* binput: Files. (line 75) +* Blank: draw. (line 27) +* block.bottom: flowchart. (line 20) +* block.bottomleft: flowchart. (line 20) +* block.bottomright: flowchart. (line 20) +* block.center: flowchart. (line 28) +* block.draw: flowchart. (line 34) +* block.left: flowchart. (line 20) +* block.position: flowchart. (line 26) +* block.right: flowchart. (line 20) +* block.top: flowchart. (line 20) +* block.topleft: flowchart. (line 20) +* block.topright: flowchart. (line 20) * bool: Data types. (line 14) -* bool3: Data types. (line 23) +* bool3: Data types. (line 25) * boolean operators: Arithmetic & logical. (line 6) -* Bottom: graph. (line 128) -* BottomTop: graph. (line 134) -* BottomView: three. (line 340) -* bounding box: Frames and pictures. (line 162) -* Bounds: graph3. (line 20) -* boutput: Files. (line 71) -* box <1>: three. (line 267) -* box: Frames and pictures. (line 22) -* bp: Tutorial. (line 17) -* break: Programming. (line 29) -* breakpoints: Debugger. (line 21) -* brick: Pens. (line 247) -* broken axis: graph. (line 773) +* Bottom: graph. (line 136) +* BottomTop: graph. (line 142) +* BottomView: three. (line 366) +* bounding box: Frames and pictures. (line 183) +* Bounds: graph3. (line 22) +* boutput: Files. (line 75) +* box <1>: three. (line 291) +* box: Frames and pictures. (line 25) +* bp: Tutorial. (line 18) +* break: Programming. (line 30) +* breakpoints: Debugger. (line 24) +* brick: Pens. (line 264) +* broken axis: graph. (line 806) * bug reports: Help. (line 23) -* buildcycle: Paths and guides. (line 251) +* buildcycle: Paths and guides. (line 259) * Button-1: GUI. (line 6) * Button-2: GUI. (line 6) * BWRainbow: palette. (line 15) * BWRainbow2: palette. (line 18) -* C string: Data types. (line 189) +* C string: Data types. (line 191) * CAD: CAD. (line 6) -* calculateTransform: Frames and pictures. (line 105) +* calculateTransform: Frames and pictures. (line 123) * casts: Casts. (line 6) * cbrt: Mathematical functions. (line 6) -* cd: Files. (line 24) +* cd: Files. (line 25) * ceil: Mathematical functions. (line 26) -* center: three. (line 300) -* Center: label. (line 62) -* checker: Pens. (line 247) -* Chinese: unicode. (line 12) +* center: three. (line 326) +* Center: label. (line 67) +* checker: Pens. (line 264) +* Chinese: unicode. (line 13) * choose: Mathematical functions. (line 39) * Ci: Mathematical functions. (line 48) -* circle <1>: flowchart. (line 57) -* circle: three. (line 241) -* Circle: Paths and guides. (line 17) +* circle <1>: flowchart. (line 62) +* circle: three. (line 261) +* Circle: Paths and guides. (line 18) * circle: Paths and guides. (line 10) -* circlebarframe: markers. (line 18) -* CJK: unicode. (line 12) -* clear <1>: Debugger. (line 23) -* clear: Files. (line 86) -* clip: fill. (line 110) -* cm: Tutorial. (line 63) +* circlebarframe: markers. (line 20) +* CJK: unicode. (line 13) +* clear <1>: Debugger. (line 27) +* clear: Files. (line 90) +* clip: fill. (line 124) +* cm: Tutorial. (line 66) * cmyk: Pens. (line 34) -* colatitude: Data types. (line 129) +* colatitude: Data types. (line 131) * color: Pens. (line 23) -* coloredNodes: tube. (line 25) -* coloredpath: tube. (line 18) -* coloredSegments: tube. (line 25) +* coloredNodes: tube. (line 27) +* coloredpath: tube. (line 19) +* coloredSegments: tube. (line 27) * colorless: Pens. (line 54) * colors: Pens. (line 51) -* comma: Files. (line 59) -* comma-separated-value mode: Arrays. (line 362) -* command-line options <1>: Options. (line 7) -* command-line options: Configuring. (line 82) -* comment character: Files. (line 15) -* compass directions: Tutorial. (line 94) +* comma: Files. (line 62) +* comma-separated-value mode: Arrays. (line 376) +* command-line options <1>: Options. (line 6) +* command-line options: Configuring. (line 85) +* comment character: Files. (line 16) +* compass directions: Tutorial. (line 99) * Compiling from UNIX source: Compiling from UNIX source. (line 6) -* complement: Arrays. (line 153) -* concat: Arrays. (line 183) +* complement: Arrays. (line 158) +* concat: Arrays. (line 188) * conditional <1>: Arithmetic & logical. (line 73) * conditional: Programming. (line 8) -* config: Options. (line 102) +* config: Options. (line 101) * configuration file: Configuring. (line 21) * configuring: Configuring. (line 6) -* conj: Data types. (line 57) -* constructors: Structures. (line 95) -* context: Options. (line 129) -* continue <1>: Debugger. (line 31) -* continue: Programming. (line 29) -* contour: contour. (line 7) +* conj: Data types. (line 59) +* constructors: Structures. (line 99) +* context: Options. (line 130) +* continue <1>: Debugger. (line 37) +* continue: Programming. (line 30) +* contour: contour. (line 9) * contour3: contour3. (line 6) * controls <1>: three. (line 6) -* controls: Tutorial. (line 154) -* controlSpecifier: Paths and guides. (line 375) -* convert <1>: Options. (line 129) +* controls: Tutorial. (line 162) +* controlSpecifier: Paths and guides. (line 385) +* convert <1>: Options. (line 130) * convert <2>: animation. (line 6) -* convert <3>: Files. (line 148) -* convert: Configuring. (line 68) +* convert <3>: Files. (line 155) +* convert: Configuring. (line 70) * convertOptions: Options. (line 117) -* Coons shading: fill. (line 74) -* copy: Arrays. (line 174) +* Coons shading: fill. (line 83) +* copy: Arrays. (line 179) * Cos: Mathematical functions. (line 20) * cos: Mathematical functions. (line 6) * cosh: Mathematical functions. (line 6) -* cputime: Structures. (line 177) -* crop: graph. (line 626) -* cropping graphs: graph. (line 626) -* cross <1>: graph. (line 474) -* cross: Data types. (line 167) -* crossframe: markers. (line 23) -* crosshatch: Pens. (line 263) -* csv: Arrays. (line 362) -* cubicroots: Arrays. (line 320) +* cputime: Structures. (line 185) +* crop: graph. (line 654) +* cropping graphs: graph. (line 654) +* cross <1>: graph. (line 492) +* cross: Data types. (line 169) +* crossframe: markers. (line 26) +* crosshatch: Pens. (line 280) +* csv: Arrays. (line 376) +* cubicroots: Arrays. (line 330) * curl <1>: three. (line 6) -* curl: Tutorial. (line 172) -* curlSpecifier: Paths and guides. (line 387) +* curl: Tutorial. (line 182) +* curlSpecifier: Paths and guides. (line 397) * currentpen: Pens. (line 6) -* currentprojection: three. (line 337) -* curve: slopefield. (line 20) -* custom axis types: graph. (line 138) -* custom mark routine: graph. (line 566) -* custom tick locations: graph. (line 241) -* cut: Paths and guides. (line 233) +* currentprojection: three. (line 363) +* curve: slopefield. (line 21) +* custom axis types: graph. (line 146) +* custom mark routine: graph. (line 594) +* custom tick locations: graph. (line 251) +* cut: Paths and guides. (line 240) * cycle <1>: three. (line 6) -* cycle: Tutorial. (line 46) -* cyclic <1>: three. (line 433) -* cyclic <2>: Arrays. (line 39) -* cyclic: Paths and guides. (line 75) -* cyclicflag: Arrays. (line 39) +* cycle: Tutorial. (line 48) +* cyclic <1>: three. (line 469) +* cyclic <2>: Arrays. (line 42) +* cyclic: Paths and guides. (line 82) +* cyclicflag: Arrays. (line 42) * Cyrillic: unicode. (line 7) -* dashdotted: Pens. (line 92) -* dashed: Pens. (line 92) +* dashdotted: Pens. (line 97) +* dashed: Pens. (line 97) * data types: Data types. (line 6) -* date: Data types. (line 290) +* date: Data types. (line 293) * Debian: UNIX binary distributions. - (line 19) + (line 21) * debugger: Debugger. (line 6) * declaration: Programming. (line 8) * deconstruct: GUI Usage. (line 6) * default arguments: Default arguments. (line 6) -* defaultformat: graph. (line 169) -* DefaultHead: draw. (line 26) -* DefaultHead3: three. (line 476) +* defaultformat: graph. (line 179) +* DefaultHead: draw. (line 27) +* DefaultHead3: three. (line 514) * defaultpen: Pens. (line 46) * deferred drawing: simplex. (line 6) * Degrees: Mathematical functions. (line 17) * degrees <1>: Mathematical functions. (line 17) -* degrees: Data types. (line 73) -* delete <1>: Arrays. (line 39) -* delete: Files. (line 143) +* degrees: Data types. (line 75) +* delete <1>: Arrays. (line 42) +* delete: Files. (line 150) * description: Description. (line 6) -* diagonal: Arrays. (line 305) -* diamond: flowchart. (line 50) -* dimension: Arrays. (line 368) -* dir <1>: three. (line 433) -* dir <2>: Paths and guides. (line 99) -* dir <3>: Data types. (line 85) +* diagonal: Arrays. (line 315) +* diamond: flowchart. (line 54) +* dimension: Arrays. (line 383) +* dir <1>: three. (line 469) +* dir <2>: Paths and guides. (line 106) +* dir <3>: Data types. (line 87) * dir: Search paths. (line 10) -* direction specifier: Tutorial. (line 115) -* directory: Files. (line 24) -* dirSpecifier: Paths and guides. (line 369) -* dirtime: Paths and guides. (line 147) -* display: Configuring. (line 68) -* do: Programming. (line 29) -* dot <1>: Data types. (line 98) -* dot: draw. (line 83) -* DotMargin: draw. (line 42) -* DotMargin3: three. (line 492) -* DotMargins: draw. (line 42) -* DotMargins3: three. (line 492) -* dotted: Pens. (line 92) -* double: Files. (line 71) -* double deferred drawing: three. (line 222) -* Draw: Frames and pictures. (line 145) -* draw: draw. (line 110) -* Draw: draw. (line 26) -* draw: Drawing commands. (line 31) +* direction specifier: Tutorial. (line 123) +* directory: Files. (line 25) +* dirSpecifier: Paths and guides. (line 379) +* dirtime: Paths and guides. (line 154) +* display: Configuring. (line 70) +* do: Programming. (line 30) +* dot <1>: Data types. (line 100) +* dot: draw. (line 85) +* DotMargin: draw. (line 43) +* DotMargin3: three. (line 530) +* DotMargins: draw. (line 43) +* DotMargins3: three. (line 530) +* dotted: Pens. (line 97) +* double: Files. (line 75) +* double deferred drawing: three. (line 240) +* Draw: Frames and pictures. (line 166) +* draw: draw. (line 114) +* Draw: draw. (line 27) +* draw: Drawing commands. (line 32) * drawing commands: Drawing commands. (line 6) * drawline: math. (line 9) -* drawtree: drawtree. (line 7) -* dvips: Configuring. (line 68) +* drawtree: drawtree. (line 9) +* dvips: Configuring. (line 70) * dvipsOptions: Options. (line 117) * E <1>: Mathematical functions. (line 48) -* E: Tutorial. (line 94) +* E: Tutorial. (line 99) * Editing modes: Editing modes. (line 6) * Ei: Mathematical functions. (line 48) -* ellipse: Frames and pictures. (line 22) +* ellipse: Frames and pictures. (line 25) * elliptic functions: Mathematical functions. (line 48) * else: Programming. (line 8) * emacs: Editing modes. (line 6) * embed: embed. (line 6) * empty: Frames and pictures. (line 7) -* EndArcArrow: draw. (line 26) -* EndArcArrow3: three. (line 476) -* EndArrow: draw. (line 26) -* EndArrow3: three. (line 476) -* EndBar: draw. (line 19) -* EndBar3: three. (line 476) -* EndDotMargin: draw. (line 42) -* EndDotMargin3: three. (line 492) -* endl: Files. (line 59) -* EndMargin: draw. (line 42) -* EndMargin3: three. (line 492) -* EndPenMargin: draw. (line 42) -* EndPenMargin2: three. (line 492) -* EndPenMargin3: three. (line 492) -* EndPoint: label. (line 57) -* envelope: Frames and pictures. (line 22) -* environment variables: Configuring. (line 86) -* eof <1>: Arrays. (line 346) -* eof: Files. (line 86) -* eol <1>: Arrays. (line 346) -* eol: Files. (line 86) -* EPS: label. (line 80) +* EndArcArrow: draw. (line 27) +* EndArcArrow3: three. (line 514) +* EndArrow: draw. (line 27) +* EndArrow3: three. (line 514) +* EndBar: draw. (line 20) +* EndBar3: three. (line 514) +* EndDotMargin: draw. (line 43) +* EndDotMargin3: three. (line 530) +* endl: Files. (line 62) +* EndMargin: draw. (line 43) +* EndMargin3: three. (line 530) +* EndPenMargin: draw. (line 43) +* EndPenMargin2: three. (line 530) +* EndPenMargin3: three. (line 530) +* EndPoint: label. (line 61) +* envelope: Frames and pictures. (line 25) +* environment variables: Configuring. (line 90) +* eof <1>: Arrays. (line 358) +* eof: Files. (line 90) +* eol <1>: Arrays. (line 358) +* eol: Files. (line 90) +* EPS: label. (line 86) * erase <1>: Frames and pictures. (line 7) -* erase: Data types. (line 239) +* erase: Data types. (line 241) * erf: Mathematical functions. (line 6) * erfc: Mathematical functions. (line 6) -* error: Files. (line 15) -* errorbars: graph. (line 474) -* eval: Import. (line 101) -* evenodd <1>: Pens. (line 148) -* evenodd: Tutorial. (line 211) -* exit <1>: Debugger. (line 57) +* error: Files. (line 16) +* errorbars: graph. (line 492) +* eval: Import. (line 112) +* evenodd <1>: Pens. (line 158) +* evenodd: Tutorial. (line 222) +* exit <1>: Debugger. (line 63) * exit <2>: Interactive mode. (line 37) -* exit: Data types. (line 325) +* exit: Data types. (line 331) * exp: Mathematical functions. (line 6) -* expi: Data types. (line 81) +* expi: Data types. (line 83) * explicit: Casts. (line 6) -* explicit casts: Casts. (line 22) +* explicit casts: Casts. (line 23) * expm1: Mathematical functions. (line 6) * exponential integral: Mathematical functions. (line 48) -* extendcap: Pens. (line 125) +* extendcap: Pens. (line 133) * extension <1>: MetaPost. (line 10) -* extension: Paths and guides. (line 228) -* external: embed. (line 28) -* extrude: three. (line 427) +* extension: Paths and guides. (line 235) +* external: embed. (line 29) +* extrude: three. (line 462) * F: Mathematical functions. (line 48) * fabs: Mathematical functions. (line 6) -* face: three. (line 511) +* face: three. (line 549) * factorial: Mathematical functions. (line 39) * Fedora: UNIX binary distributions. - (line 15) + (line 16) * feynman: feynman. (line 6) -* fft: Arrays. (line 252) +* fft: Arrays. (line 259) * FFTW: Compiling from UNIX source. - (line 59) -* file <1>: Debugger. (line 45) + (line 63) +* file <1>: Debugger. (line 51) * file: Files. (line 6) -* Fill: Frames and pictures. (line 131) -* fill <1>: fill. (line 17) -* fill: draw. (line 116) -* Fill: draw. (line 26) -* FillDraw: Frames and pictures. (line 121) -* filldraw: fill. (line 11) -* FillDraw: draw. (line 26) -* filloutside: fill. (line 27) -* fillrule: Pens. (line 148) -* find <1>: Arrays. (line 162) -* find: Data types. (line 224) -* firstcut: Paths and guides. (line 243) -* fit: Frames and pictures. (line 101) -* fix-cm: Pens. (line 174) -* fixedscaling: Frames and pictures. (line 74) +* Fill: Frames and pictures. (line 152) +* fill <1>: fill. (line 19) +* fill: draw. (line 121) +* Fill: draw. (line 27) +* FillDraw: Frames and pictures. (line 142) +* filldraw: fill. (line 12) +* FillDraw: draw. (line 27) +* filloutside: fill. (line 31) +* fillrule: Pens. (line 158) +* find <1>: Arrays. (line 167) +* find: Data types. (line 226) +* firstcut: Paths and guides. (line 251) +* fit: Frames and pictures. (line 118) +* fix-cm: Pens. (line 186) +* fixedscaling: Frames and pictures. (line 84) * floor: Mathematical functions. (line 26) * flowchart: flowchart. (line 6) -* flush: Files. (line 59) +* flush: Files. (line 62) * fmod: Mathematical functions. (line 6) -* font: Pens. (line 188) -* font command: Pens. (line 188) -* fontcommand: Pens. (line 203) -* fontsize: Pens. (line 174) +* font: Pens. (line 201) +* font command: Pens. (line 201) +* fontcommand: Pens. (line 216) +* fontsize: Pens. (line 186) * for: Programming. (line 8) -* format <1>: Options. (line 129) -* format: Data types. (line 266) +* format <1>: Options. (line 130) +* format: Data types. (line 268) * forum: Help. (line 6) * frame: Frames and pictures. (line 7) * freeglut: Compiling from UNIX source. - (line 16) -* from: Import. (line 17) -* FrontView: three. (line 340) -* function declarations: Functions. (line 67) -* function shading: fill. (line 95) -* Function shading: fill. (line 95) + (line 17) +* from: Import. (line 18) +* FrontView: three. (line 366) +* function declarations: Functions. (line 72) +* function shading: fill. (line 107) +* Function shading: fill. (line 107) * functions <1>: Mathematical functions. (line 6) * functions: Functions. (line 6) -* functionshade: fill. (line 95) +* functionshade: fill. (line 107) * gamma: Mathematical functions. (line 6) * Gaussrand: Mathematical functions. (line 39) * geometry: geometry. (line 6) -* getc: Files. (line 30) -* getpair: Files. (line 111) -* getreal: Files. (line 111) -* getstring: Files. (line 111) -* gettriple: Files. (line 111) +* getc: Files. (line 31) +* getpair: Files. (line 115) +* getreal: Files. (line 115) +* getstring: Files. (line 115) +* gettriple: Files. (line 115) * glOptions <1>: Options. (line 117) -* glOptions: three. (line 180) +* glOptions: three. (line 198) * GNU Scientific Library: Mathematical functions. (line 48) -* gouraudshade: fill. (line 58) +* gouraudshade: fill. (line 66) * Gradient: palette. (line 25) -* gradient shading: fill. (line 32) +* gradient shading: fill. (line 37) * graph: graph. (line 6) * graph3: graph3. (line 6) -* graphic: label. (line 80) +* graphic: label. (line 86) * graphical user interface: GUI. (line 6) * gray: Pens. (line 25) * Grayscale: palette. (line 9) * grayscale: Pens. (line 25) -* grid <1>: graph. (line 724) -* grid: Pens. (line 247) +* grid <1>: graph. (line 757) +* grid: Pens. (line 264) * grid3: grid3. (line 6) * gs: Configuring. (line 6) * gsl: Mathematical functions. (line 48) * GSL: Compiling from UNIX source. - (line 59) + (line 63) * gsOptions: Options. (line 117) * GUI: GUI. (line 6) * GUI installation: GUI Installation. (line 6) * GUI usage: GUI Usage. (line 6) -* guide: Paths and guides. (line 296) +* guide: Paths and guides. (line 304) * guide3: three. (line 6) -* hatch: Pens. (line 263) -* height: LaTeX usage. (line 32) -* help <1>: Debugger. (line 30) +* hatch: Pens. (line 280) +* height: LaTeX usage. (line 34) +* help <1>: Debugger. (line 36) * help <2>: Help. (line 6) * help: Interactive mode. (line 25) -* Hermite: graph. (line 37) -* Hermite(splinetype splinetype: graph. (line 37) -* hex: Data types. (line 278) +* Hermite: graph. (line 38) +* Hermite(splinetype splinetype: graph. (line 38) +* hex: Data types. (line 281) * hexidecimal <1>: Pens. (line 59) -* hexidecimal: Data types. (line 278) -* hidden surface removal: three. (line 511) +* hexidecimal: Data types. (line 281) +* hidden surface removal: three. (line 549) * histogram: Mathematical functions. (line 39) -* history: Files. (line 136) +* history: Files. (line 142) * historylines: Interactive mode. (line 42) -* HookHead: draw. (line 26) -* HookHead3: three. (line 476) -* Horizontal: flowchart. (line 74) +* HookHead: draw. (line 27) +* HookHead3: three. (line 514) +* Horizontal: flowchart. (line 82) * hypot: Mathematical functions. (line 6) * I: Mathematical functions. (line 48) * i_scaled: Mathematical functions. (line 48) -* iconic: three. (line 180) -* identity <1>: Arrays. (line 302) +* iconic: three. (line 198) +* identity <1>: Arrays. (line 312) * identity <2>: Mathematical functions. (line 6) -* identity: Transforms. (line 24) +* identity: Transforms. (line 25) * if: Programming. (line 8) -* IgnoreAspect: Frames and pictures. (line 58) +* IgnoreAspect: Frames and pictures. (line 64) * image: palette. (line 34) -* ImageMagick <1>: Options. (line 129) +* ImageMagick <1>: Options. (line 130) * ImageMagick <2>: animation. (line 6) -* ImageMagick: Configuring. (line 68) +* ImageMagick: Configuring. (line 70) * implicit casts: Casts. (line 6) * implicit linear solver: MetaPost. (line 10) * implicit scaling: Implicit scaling. (line 6) -* import: Import. (line 48) -* inches: Tutorial. (line 63) -* including images: label. (line 80) -* inheritance: Structures. (line 189) -* initialized: Arrays. (line 39) +* import: Import. (line 54) +* inches: Tutorial. (line 66) +* including images: label. (line 86) +* inheritance: Structures. (line 198) +* initialized: Arrays. (line 42) * initializers: Variable initializers. (line 6) -* InOutTicks: graph3. (line 34) +* InOutTicks: graph3. (line 37) * input <1>: Interactive mode. (line 31) * input: Files. (line 11) -* insert <1>: Arrays. (line 39) -* insert: Data types. (line 235) -* inside: Paths and guides. (line 275) -* inst: Debugger. (line 36) +* insert <1>: Arrays. (line 42) +* insert: Data types. (line 237) +* inside: Paths and guides. (line 283) +* inst: Debugger. (line 42) * installation: Installation. (line 6) -* int: Data types. (line 28) +* int: Data types. (line 30) * integer division: Arithmetic & logical. (line 6) * interactive mode: Interactive mode. (line 6) -* interior: Paths and guides. (line 271) +* interior: Paths and guides. (line 279) * international characters: unicode. (line 6) * interp: Arithmetic & logical. - (line 76) + (line 77) * interpolate: interpolate. (line 6) -* intersect <1>: three. (line 433) +* intersect <1>: three. (line 469) * intersect <2>: math. (line 13) -* intersect: Paths and guides. (line 176) -* intersectionpoint <1>: three. (line 433) +* intersect: Paths and guides. (line 183) +* intersectionpoint <1>: three. (line 469) * intersectionpoint <2>: math. (line 17) -* intersectionpoint: Paths and guides. (line 220) -* intersectionpoints <1>: three. (line 433) -* intersectionpoints: Paths and guides. (line 224) -* intersections <1>: three. (line 433) -* intersections: Paths and guides. (line 187) -* InTicks: graph3. (line 34) -* intMax: Data types. (line 28) -* intMin: Data types. (line 28) -* inverse <1>: Arrays. (line 308) -* inverse: Transforms. (line 16) -* invert: three. (line 366) +* intersectionpoint: Paths and guides. (line 227) +* intersectionpoints <1>: three. (line 469) +* intersectionpoints: Paths and guides. (line 231) +* intersections <1>: three. (line 469) +* intersections: Paths and guides. (line 194) +* InTicks: graph3. (line 37) +* intMax: Data types. (line 30) +* intMin: Data types. (line 30) +* inverse <1>: Arrays. (line 318) +* inverse: Transforms. (line 17) +* invert: three. (line 395) * invisible: Pens. (line 39) * J: Mathematical functions. (line 6) -* Japanese: unicode. (line 12) +* Japanese: unicode. (line 13) * K: Mathematical functions. (line 48) * k_scaled: Mathematical functions. (line 48) -* keyboard bindings:: three. (line 149) -* keys: Arrays. (line 39) +* Kate: Editing modes. (line 52) +* KDE editor: Editing modes. (line 52) +* keyboard bindings:: three. (line 167) +* keys: Arrays. (line 42) * keywords: Named arguments. (line 6) -* Korean: unicode. (line 12) -* Label: graph. (line 332) -* label: clip. (line 16) -* Label: draw. (line 98) +* Korean: unicode. (line 13) +* Label: graph. (line 349) +* label: clip. (line 17) +* Label: draw. (line 101) * labelpath: labelpath. (line 6) * labelpath3: labelpath3. (line 6) -* labelx: graph. (line 332) -* labely: graph. (line 332) -* Landscape: Frames and pictures. (line 93) -* lastcut: Paths and guides. (line 247) +* labelx: graph. (line 349) +* labely: graph. (line 349) +* Landscape: Frames and pictures. (line 109) +* lastcut: Paths and guides. (line 255) * lasy-mode: Editing modes. (line 6) -* latex: Options. (line 129) -* LaTeX fonts: Pens. (line 188) +* latex: Options. (line 130) +* LaTeX fonts: Pens. (line 201) * LaTeX usage: LaTeX usage. (line 6) * latin1: latin1. (line 6) -* latitude: Data types. (line 134) -* latticeshade: fill. (line 32) +* latitude: Data types. (line 136) +* latticeshade: fill. (line 37) * layer: Drawing commands. (line 16) -* leastsquares <1>: graph. (line 892) +* leastsquares <1>: graph. (line 926) * leastsquares: stats. (line 6) -* Left: graph. (line 274) -* LeftRight: graph. (line 280) -* LeftSide: label. (line 62) -* LeftTicks: graph. (line 155) -* LeftView: three. (line 340) -* legend <1>: graph. (line 421) -* legend <2>: draw. (line 64) -* legend: Drawing commands. (line 31) +* Left: graph. (line 286) +* LeftRight: graph. (line 292) +* LeftSide: label. (line 67) +* LeftTicks: graph. (line 164) +* LeftView: three. (line 366) +* legend <1>: graph. (line 439) +* legend <2>: draw. (line 65) +* legend: Drawing commands. (line 32) * Legendre: Mathematical functions. (line 48) -* length <1>: three. (line 433) -* length <2>: Arrays. (line 39) -* length <3>: Paths and guides. (line 66) -* length: Data types. (line 60) -* letter: Configuring. (line 62) +* length <1>: three. (line 469) +* length <2>: Arrays. (line 42) +* length <3>: Paths and guides. (line 73) +* length: Data types. (line 62) +* letter: Configuring. (line 64) * libm routines: Mathematical functions. (line 6) * libsigsegv <1>: Help. (line 33) -* libsigsegv: Functions. (line 88) -* limits: graph. (line 626) -* line: Arrays. (line 346) -* line mode: Arrays. (line 346) -* Linear: graph. (line 672) -* linecap: Pens. (line 125) -* linejoin: Pens. (line 134) -* lineskip: Pens. (line 174) -* linewidth: Pens. (line 115) -* locale: Data types. (line 285) -* Log: graph. (line 672) +* libsigsegv: Functions. (line 94) +* limits: graph. (line 654) +* line: Arrays. (line 358) +* line mode: Arrays. (line 358) +* Linear: graph. (line 702) +* linecap: Pens. (line 133) +* linejoin: Pens. (line 143) +* lineskip: Pens. (line 186) +* linewidth: Pens. (line 121) +* locale: Data types. (line 288) +* Log: graph. (line 702) * log: Mathematical functions. (line 6) -* log-log graph: graph. (line 703) +* log-log graph: graph. (line 736) * log10: Mathematical functions. (line 6) * log1p: Mathematical functions. (line 6) -* log2 graph: graph. (line 753) -* logarithmic graph: graph. (line 703) +* log2 graph: graph. (line 786) +* logarithmic graph: graph. (line 736) * logical operators: Arithmetic & logical. (line 6) -* longdashdotted: Pens. (line 92) -* longdashed: Pens. (line 92) -* longitude: Data types. (line 139) +* longdashdotted: Pens. (line 97) +* longdashed: Pens. (line 97) +* longitude: Data types. (line 141) * loop: Programming. (line 8) * MacOS X binary distributions: MacOS X binary distributions. (line 6) -* makepen: Pens. (line 296) -* map: Arrays. (line 144) -* Margin: draw. (line 42) -* Margin3: three. (line 492) -* margins: three. (line 228) -* Margins: draw. (line 42) -* Margins3: three. (line 492) -* mark: graph. (line 474) -* markangle: markers. (line 38) -* marker: graph. (line 474) +* makepen: Pens. (line 313) +* map: Arrays. (line 149) +* Margin: draw. (line 43) +* Margin3: three. (line 530) +* margins: three. (line 247) +* Margins: draw. (line 43) +* Margins3: three. (line 530) +* mark: graph. (line 492) +* markangle: markers. (line 43) +* marker: graph. (line 492) * markers: markers. (line 6) -* marknodes: graph. (line 474) -* markuniform: graph. (line 474) +* marknodes: graph. (line 492) +* markuniform: graph. (line 492) * math: math. (line 6) * mathematical functions: Mathematical functions. (line 6) -* max <1>: three. (line 433) -* max <2>: Arrays. (line 231) +* max <1>: three. (line 469) +* max <2>: Arrays. (line 238) * max <3>: Frames and pictures. (line 7) -* max: Paths and guides. (line 260) -* maxbound: Data types. (line 104) -* maxtile: three. (line 180) -* maxtimes: Paths and guides. (line 215) -* maxviewport: three. (line 180) +* max: Paths and guides. (line 268) +* maxbound: Data types. (line 106) +* maxtile: three. (line 198) +* maxtimes: Paths and guides. (line 222) +* maxviewport: three. (line 198) * merge: animation. (line 6) * MetaPost: MetaPost. (line 6) -* MetaPost ... : Tutorial. (line 176) -* MetaPost cutafter: Paths and guides. (line 248) -* MetaPost cutbefore: Paths and guides. (line 244) +* MetaPost ... : Tutorial. (line 187) +* MetaPost cutafter: Paths and guides. (line 256) +* MetaPost cutbefore: Paths and guides. (line 252) * MetaPost pickup: Pens. (line 6) * MetaPost whatever: MetaPost. (line 10) * Microsoft Windows: Microsoft Windows. (line 6) -* MidArcArrow: draw. (line 26) -* MidArcArrow3: three. (line 476) -* MidArrow: draw. (line 26) -* MidArrow3: three. (line 476) -* midpoint: Paths and guides. (line 161) -* MidPoint: label. (line 57) -* min <1>: three. (line 433) -* min <2>: Arrays. (line 224) +* MidArcArrow: draw. (line 27) +* MidArcArrow3: three. (line 514) +* MidArrow: draw. (line 27) +* MidArrow3: three. (line 514) +* midpoint: Paths and guides. (line 168) +* MidPoint: label. (line 61) +* min <1>: three. (line 469) +* min <2>: Arrays. (line 231) * min <3>: Frames and pictures. (line 7) -* min: Paths and guides. (line 256) -* minbound: Data types. (line 101) -* minipage: label. (line 119) -* mintimes: Paths and guides. (line 210) -* miterjoin: Pens. (line 134) -* miterlimit: Pens. (line 143) -* mm: Tutorial. (line 63) +* min: Paths and guides. (line 264) +* minbound: Data types. (line 103) +* minipage: label. (line 128) +* mintimes: Paths and guides. (line 217) +* miterjoin: Pens. (line 143) +* miterlimit: Pens. (line 153) +* mm: Tutorial. (line 66) * mouse: GUI. (line 6) -* mouse bindings: three. (line 129) -* Move: Pens. (line 335) -* MoveQuiet: Pens. (line 341) -* multisample: three. (line 119) +* mouse bindings: three. (line 137) +* Move: Pens. (line 350) +* MoveQuiet: Pens. (line 356) +* multisample: three. (line 127) * multisampling: Compiling from UNIX source. - (line 16) -* N: Tutorial. (line 94) + (line 17) +* N: Tutorial. (line 99) * named arguments: Named arguments. (line 6) -* new <1>: Arrays. (line 112) +* new <1>: Arrays. (line 117) * new: Structures. (line 6) * newframe: Frames and pictures. (line 7) -* newl: Files. (line 59) +* newl: Files. (line 62) * newton: Mathematical functions. - (line 65) -* next: Debugger. (line 42) -* NFSS: Pens. (line 188) -* nobasealign: Pens. (line 164) -* NoFill <1>: Frames and pictures. (line 139) -* NoFill: draw. (line 26) -* NoMargin: draw. (line 42) -* NoMargin3: three. (line 492) -* none: Files. (line 59) -* None: draw. (line 19) -* normal: three. (line 419) -* nosafe: Options. (line 145) + (line 66) +* next: Debugger. (line 48) +* NFSS: Pens. (line 201) +* nobasealign: Pens. (line 175) +* NoFill <1>: Frames and pictures. (line 160) +* NoFill: draw. (line 27) +* NoMargin: draw. (line 43) +* NoMargin3: three. (line 530) +* none: Files. (line 62) +* None: draw. (line 20) +* normal: three. (line 452) +* nosafe: Options. (line 147) * NOT: Arithmetic & logical. - (line 80) -* NoTicks: graph. (line 155) -* NoTicks3: graph3. (line 34) + (line 81) +* NoTicks: graph. (line 164) +* NoTicks3: graph3. (line 37) * null: Structures. (line 6) -* nullpen <1>: Frames and pictures. (line 125) -* nullpen: label. (line 14) -* NURBS: three. (line 318) -* O: three. (line 236) -* obj: obj. (line 7) -* oblique: three. (line 281) -* obliqueX: three. (line 289) -* obliqueY: three. (line 296) -* obliqueZ: three. (line 281) -* offset: Options. (line 149) -* opacity: Pens. (line 218) +* nullpen <1>: Frames and pictures. (line 146) +* nullpen: label. (line 15) +* NURBS: three. (line 344) +* O: three. (line 255) +* obj: obj. (line 9) +* oblique: three. (line 307) +* obliqueX: three. (line 315) +* obliqueY: three. (line 322) +* obliqueZ: three. (line 307) +* ode: ode. (line 9) +* offset: Options. (line 151) +* opacity: Pens. (line 232) * open: Files. (line 11) -* OpenGL: three. (line 119) +* OpenGL: three. (line 127) * operator: User-defined operators. (line 6) -* operator --: graph. (line 31) -* operator ..: graph. (line 34) -* operator cast: Casts. (line 31) -* operator ecast: Casts. (line 58) -* operator init <1>: Structures. (line 141) +* operator --: graph. (line 32) +* operator ..: graph. (line 35) +* operator cast: Casts. (line 33) +* operator ecast: Casts. (line 63) +* operator init <1>: Structures. (line 148) * operator init: Variable initializers. (line 6) * operators: Operators. (line 6) -* options: Options. (line 7) +* options: Options. (line 6) * OR: Arithmetic & logical. - (line 80) -* orientation: Frames and pictures. (line 93) -* orthographic: three. (line 300) -* outformat: three. (line 119) -* output <1>: Options. (line 129) -* output: Files. (line 36) -* OutTicks: graph3. (line 34) -* overloading functions: Functions. (line 44) -* overwrite: Pens. (line 320) + (line 81) +* orientation: Frames and pictures. (line 109) +* orthographic: three. (line 326) +* outformat: three. (line 127) +* outprefix: Frames and pictures. (line 96) +* output <1>: Options. (line 130) +* output: Files. (line 37) +* OutTicks: graph3. (line 37) +* overloading functions: Functions. (line 48) +* overwrite: Pens. (line 335) * P: Mathematical functions. (line 48) -* pack: label. (line 102) -* packing: Rest arguments. (line 30) -* pair <1>: Data types. (line 41) -* pair: Tutorial. (line 17) -* pairs: Arrays. (line 248) -* paperheight: Configuring. (line 62) -* papertype: Configuring. (line 62) -* paperwidth: Configuring. (line 62) -* parametrized curve: graph. (line 626) -* patch-dependent colors: three. (line 75) -* path <1>: flowchart. (line 74) +* pack: label. (line 109) +* packing: Rest arguments. (line 31) +* pair <1>: Data types. (line 43) +* pair: Tutorial. (line 18) +* pairs: Arrays. (line 255) +* paperheight: Configuring. (line 64) +* papertype: Configuring. (line 64) +* paperwidth: Configuring. (line 64) +* parametric surface: graph3. (line 103) +* parametrized curve: graph. (line 654) +* patch-dependent colors: three. (line 78) +* path <1>: flowchart. (line 82) * path <2>: three. (line 43) * path: Paths and guides. (line 7) * path3: three. (line 6) -* path[]: Tutorial. (line 197) +* path[]: Tutorial. (line 208) * patterns <1>: patterns. (line 6) -* patterns: Pens. (line 234) -* pdflatex: Options. (line 129) +* patterns: Pens. (line 250) +* pdflatex: Options. (line 130) * pdfviewer: Configuring. (line 6) * pdfviewerOptions: Options. (line 117) * pen: Pens. (line 6) -* PenMargin: draw. (line 42) -* PenMargin2: three. (line 492) -* PenMargin3: three. (line 492) -* PenMargins: draw. (line 42) -* PenMargins2: three. (line 492) -* PenMargins3: three. (line 492) +* PenMargin: draw. (line 43) +* PenMargin2: three. (line 530) +* PenMargin3: three. (line 530) +* PenMargins: draw. (line 43) +* PenMargins2: three. (line 530) +* PenMargins3: three. (line 530) * perpendicular: geometry. (line 6) -* perspective: three. (line 318) -* picture: Frames and pictures. (line 35) -* picture alignment: Frames and pictures. (line 203) -* piecewisestraight: Paths and guides. (line 82) +* perspective: three. (line 344) +* picture: Frames and pictures. (line 39) +* picture alignment: Frames and pictures. (line 231) +* piecewisestraight: Paths and guides. (line 89) * Pl: Mathematical functions. (line 48) * plain: plain. (line 6) -* planar: three. (line 83) -* plane: three. (line 263) -* planeproject: three. (line 416) -* point <1>: three. (line 433) -* point: Paths and guides. (line 85) -* polar: Data types. (line 119) -* polargraph: graph. (line 90) -* polygon: graph. (line 474) -* pop: Arrays. (line 39) -* Portrait: Frames and pictures. (line 93) -* postcontrol <1>: three. (line 433) -* postcontrol: Paths and guides. (line 130) +* planar: three. (line 86) +* plane: three. (line 286) +* planeproject: three. (line 448) +* point <1>: three. (line 469) +* point: Paths and guides. (line 92) +* polar: Data types. (line 121) +* polargraph: graph. (line 95) +* polygon: graph. (line 492) +* pop: Arrays. (line 42) +* Portrait: Frames and pictures. (line 109) +* postcontrol <1>: three. (line 469) +* postcontrol: Paths and guides. (line 137) * postfix operators: Self & prefix operators. - (line 19) -* postscript: Frames and pictures. (line 265) -* PostScript fonts: Pens. (line 206) -* PostScript subpath: Tutorial. (line 197) + (line 21) +* postscript: Frames and pictures. (line 296) +* PostScript fonts: Pens. (line 219) +* PostScript subpath: Tutorial. (line 208) * pow10: Mathematical functions. (line 6) -* prc: three. (line 197) -* precision: Files. (line 86) -* precontrol <1>: three. (line 433) -* precontrol: Paths and guides. (line 123) +* prc: three. (line 215) +* precision: Files. (line 90) +* precontrol <1>: three. (line 469) +* precontrol: Paths and guides. (line 130) * prefix operators: Self & prefix operators. (line 6) * private: Structures. (line 6) @@ -9016,348 +9418,350 @@ Index (line 6) * psviewer: Configuring. (line 6) * psviewerOptions: Options. (line 117) -* pt: Tutorial. (line 63) +* pt: Tutorial. (line 66) * public: Structures. (line 6) -* push: Arrays. (line 39) +* push: Arrays. (line 42) * python: Configuring. (line 27) * Python usage: Interactive mode. (line 58) -* quadraticroots: Arrays. (line 311) +* quadraticroots: Arrays. (line 321) * quarticroots: math. (line 22) -* quit <1>: Debugger. (line 54) +* quit <1>: Debugger. (line 60) * quit: Interactive mode. (line 37) -* quote: Import. (line 119) +* quote: Import. (line 133) * quotient: Arithmetic & logical. (line 6) -* RadialShade: Frames and pictures. (line 157) -* radialshade: fill. (line 49) +* RadialShade: Frames and pictures. (line 178) +* radialshade: fill. (line 56) * radians: Mathematical functions. (line 17) -* radius <1>: three. (line 433) -* radius: Paths and guides. (line 119) +* radius <1>: three. (line 469) +* radius: Paths and guides. (line 126) * Rainbow: palette. (line 12) * rand: Mathematical functions. (line 39) * randMax: Mathematical functions. (line 39) -* read1: Arrays. (line 386) -* read2: Arrays. (line 386) -* read3: Arrays. (line 386) +* read1: Arrays. (line 403) +* read2: Arrays. (line 403) +* read3: Arrays. (line 403) * reading: Files. (line 11) -* reading string arrays: Arrays. (line 353) -* readline: Files. (line 128) -* real: Data types. (line 33) -* realDigits: Data types. (line 33) -* realEpsilon: Data types. (line 33) -* realMax: Data types. (line 33) -* realMin: Data types. (line 33) -* realmult: Data types. (line 95) -* rectangle: flowchart. (line 37) -* recursion: Functions. (line 88) -* reflect: Transforms. (line 51) -* Relative: label. (line 52) -* relpoint: Paths and guides. (line 157) -* reltime: Paths and guides. (line 153) +* reading string arrays: Arrays. (line 366) +* readline: Files. (line 133) +* real: Data types. (line 35) +* realDigits: Data types. (line 35) +* realEpsilon: Data types. (line 35) +* realMax: Data types. (line 35) +* realMin: Data types. (line 35) +* realmult: Data types. (line 97) +* rectangle: flowchart. (line 40) +* recursion: Functions. (line 94) +* reflect: Transforms. (line 52) +* Relative: label. (line 56) +* relpoint: Paths and guides. (line 164) +* reltime: Paths and guides. (line 160) * remainder: Mathematical functions. (line 6) -* rename: Files. (line 145) -* render <1>: Options. (line 129) -* render: three. (line 119) -* replace: Data types. (line 252) -* resetdefaultpen: Pens. (line 349) +* rename: Files. (line 152) +* render <1>: Options. (line 130) +* render: three. (line 127) +* replace: Data types. (line 254) +* resetdefaultpen: Pens. (line 364) * rest arguments: Rest arguments. (line 6) -* restore: Frames and pictures. (line 259) +* restore: Frames and pictures. (line 290) * restricted: Structures. (line 6) -* return: Debugger. (line 48) -* reverse <1>: three. (line 433) -* reverse <2>: Arrays. (line 149) -* reverse <3>: Paths and guides. (line 164) -* reverse: Data types. (line 248) -* rewind: Files. (line 86) -* rfind: Data types. (line 229) +* return: Debugger. (line 54) +* reverse <1>: three. (line 469) +* reverse <2>: Arrays. (line 154) +* reverse <3>: Paths and guides. (line 171) +* reverse: Data types. (line 250) +* rewind: Files. (line 90) +* rfind: Data types. (line 231) * rgb: Pens. (line 30) * Riemann zeta function: Mathematical functions. (line 48) -* Right: graph. (line 277) -* RightSide: label. (line 62) -* RightTicks: graph. (line 155) -* RightView: three. (line 340) -* Rotate: label. (line 37) -* Rotate(pair z): label. (line 40) +* Right: graph. (line 289) +* RightSide: label. (line 67) +* RightTicks: graph. (line 164) +* RightView: three. (line 366) +* Rotate: label. (line 40) +* Rotate(pair z): label. (line 43) * round: Mathematical functions. (line 26) -* roundcap: Pens. (line 125) +* roundcap: Pens. (line 133) * roundedpath: roundedpath. (line 6) -* roundjoin: Pens. (line 134) -* roundrectangle: flowchart. (line 62) +* roundjoin: Pens. (line 143) +* roundrectangle: flowchart. (line 68) * RPM: UNIX binary distributions. (line 6) -* runtime imports: Import. (line 101) +* runtime imports: Import. (line 112) * Russian: unicode. (line 7) -* S: Tutorial. (line 94) -* safe: Options. (line 145) -* save: Frames and pictures. (line 256) -* saveline: Files. (line 128) -* scale: three. (line 395) -* Scale: graph. (line 688) -* scale <1>: graph. (line 672) -* scale: Transforms. (line 39) -* Scale: label. (line 46) -* scale3: three. (line 392) -* scaled graph: graph. (line 653) -* scientific graph: graph. (line 386) -* scroll: Files. (line 102) -* search: Arrays. (line 167) +* S: Tutorial. (line 99) +* safe: Options. (line 147) +* save: Frames and pictures. (line 287) +* saveline: Files. (line 133) +* scale: three. (line 427) +* Scale: graph. (line 719) +* scale <1>: graph. (line 702) +* scale: Transforms. (line 40) +* Scale: label. (line 49) +* scale3: three. (line 424) +* scaled graph: graph. (line 683) +* scientific graph: graph. (line 404) +* scroll: Files. (line 106) +* search: Arrays. (line 172) * search paths: Search paths. (line 6) -* Seascape: Frames and pictures. (line 98) -* secondary axis: graph. (line 803) -* secondaryX: graph. (line 803) -* secondaryY: graph. (line 803) -* seconds: Data types. (line 298) -* seek: Files. (line 86) -* seekeof: Files. (line 86) +* Seascape: Frames and pictures. (line 115) +* secondary axis: graph. (line 836) +* secondaryX: graph. (line 836) +* secondaryY: graph. (line 836) +* seconds: Data types. (line 302) +* seek: Files. (line 90) +* seekeof: Files. (line 90) * segmentation fault: Help. (line 33) * self operators: Self & prefix operators. (line 6) -* sequence: Arrays. (line 131) -* settings <1>: Options. (line 102) +* sequence: Arrays. (line 136) +* settings <1>: Options. (line 101) * settings: Configuring. (line 21) * sgn: Mathematical functions. (line 26) -* shading: fill. (line 32) -* shift <1>: three. (line 380) -* shift: Transforms. (line 27) -* Shift: label. (line 34) -* shiftless: Transforms. (line 53) -* shipout: Frames and pictures. (line 83) -* showtarget: three. (line 300) +* shading: fill. (line 37) +* shift <1>: three. (line 412) +* shift: Transforms. (line 28) +* Shift: label. (line 37) +* shiftless: Transforms. (line 54) +* shipout: Frames and pictures. (line 96) +* showtarget: three. (line 326) * Si: Mathematical functions. (line 48) -* SimpleHead: draw. (line 26) +* SimpleHead: draw. (line 27) * simplex: simplex. (line 6) * simpson: Mathematical functions. - (line 81) + (line 82) * Sin: Mathematical functions. (line 20) * sin: Mathematical functions. (line 6) -* single: Files. (line 71) +* single: Files. (line 75) * sinh: Mathematical functions. (line 6) -* size <1>: Options. (line 129) -* size <2>: three. (line 433) -* size <3>: Frames and pictures. (line 43) -* size: Paths and guides. (line 71) -* size3: three. (line 225) -* slant: Transforms. (line 45) -* Slant: label. (line 43) -* sleep: Data types. (line 328) -* slice: Paths and guides. (line 233) +* size <1>: Options. (line 130) +* size <2>: three. (line 469) +* size <3>: Frames and pictures. (line 48) +* size: Paths and guides. (line 78) +* size3: three. (line 243) +* slant: Transforms. (line 46) +* Slant: label. (line 46) +* sleep: Data types. (line 334) +* slice: Paths and guides. (line 240) * slices: Slices. (line 6) * slide: slide. (line 6) * slopefield: slopefield. (line 6) -* solid: Pens. (line 92) -* solids: solids. (line 7) -* solve: Arrays. (line 265) -* sort: Arrays. (line 190) -* Spline: graph. (line 34) -* split: Data types. (line 261) +* solid: Pens. (line 97) +* solids: solids. (line 9) +* solve: Arrays. (line 273) +* sort: Arrays. (line 195) +* Spline <1>: graph3. (line 103) +* Spline: graph. (line 35) +* split: Data types. (line 263) * sqrt: Mathematical functions. (line 6) -* squarecap: Pens. (line 125) +* squarecap: Pens. (line 133) * srand: Mathematical functions. (line 39) * stack overflow <1>: Help. (line 33) -* stack overflow: Functions. (line 88) +* stack overflow: Functions. (line 94) * static: Static. (line 6) * stats: stats. (line 6) -* stdin: Files. (line 46) -* stdout: Files. (line 46) -* step: Debugger. (line 39) -* stickframe: markers. (line 16) +* stdin: Files. (line 48) +* stdout: Files. (line 48) +* step: Debugger. (line 45) +* stickframe: markers. (line 17) * stop: Debugger. (line 10) -* straight: three. (line 433) -* Straight: graph. (line 31) -* straight: Paths and guides. (line 78) -* strftime: Data types. (line 290) -* string: Data types. (line 179) -* stroke: fill. (line 36) -* strokepath: Paths and guides. (line 290) -* strptime: Data types. (line 298) +* straight: three. (line 469) +* Straight: graph. (line 32) +* straight: Paths and guides. (line 85) +* strftime: Data types. (line 293) +* string: Data types. (line 181) +* stroke: fill. (line 42) +* strokepath: Paths and guides. (line 298) +* strptime: Data types. (line 302) * struct: Structures. (line 6) * structures: Structures. (line 6) -* subpath <1>: three. (line 433) -* subpath: Paths and guides. (line 167) -* subpictures: Frames and pictures. (line 101) -* substr: Data types. (line 244) +* subpath <1>: three. (line 469) +* subpath: Paths and guides. (line 174) +* subpictures: Frames and pictures. (line 118) +* substr: Data types. (line 246) * Subversion: Subversion. (line 6) -* sum: Arrays. (line 219) -* superpath: Tutorial. (line 197) -* Suppress: Pens. (line 327) -* SuppressQuiet: Pens. (line 331) -* surface: three. (line 47) +* sum: Arrays. (line 226) +* superpath: Tutorial. (line 208) +* Suppress: Pens. (line 342) +* SuppressQuiet: Pens. (line 346) +* surface <1>: graph3. (line 103) +* surface: three. (line 48) * SVN: Subversion. (line 6) -* system <1>: Options. (line 145) -* system: Files. (line 153) +* system <1>: Options. (line 147) +* system: Files. (line 161) * syzygy: syzygy. (line 6) -* tab: Files. (line 59) -* tab completion: Tutorial. (line 21) +* tab: Files. (line 62) +* tab completion: Tutorial. (line 22) * Tan: Mathematical functions. (line 20) * tan: Mathematical functions. (line 6) * tanh: Mathematical functions. (line 6) -* target: three. (line 300) -* tell: Files. (line 86) +* target: three. (line 326) +* tell: Files. (line 90) * tension <1>: three. (line 6) -* tension: Tutorial. (line 165) -* tensionSpecifier: Paths and guides. (line 381) -* tensor product shading: fill. (line 74) -* tensorshade: fill. (line 74) -* tex <1>: Options. (line 129) -* tex: Frames and pictures. (line 272) -* TeX fonts: Pens. (line 197) -* TeX string: Data types. (line 179) -* texcommand: Configuring. (line 68) -* texdvicommand: Configuring. (line 68) -* TeXHead: draw. (line 26) -* TeXHead3: three. (line 476) -* texpath <1>: label. (line 116) -* texpath: Configuring. (line 68) -* texpreamble: Frames and pictures. (line 280) -* texreset: Frames and pictures. (line 283) -* textbook graph: graph. (line 361) +* tension: Tutorial. (line 174) +* tensionSpecifier: Paths and guides. (line 391) +* tensor product shading: fill. (line 83) +* tensorshade: fill. (line 83) +* tex <1>: Options. (line 130) +* tex: Frames and pictures. (line 304) +* TeX fonts: Pens. (line 210) +* TeX string: Data types. (line 181) +* texcommand: Configuring. (line 70) +* texdvicommand: Configuring. (line 70) +* TeXHead: draw. (line 27) +* TeXHead3: three. (line 514) +* texpath <1>: label. (line 125) +* texpath: Configuring. (line 70) +* texpreamble: Frames and pictures. (line 313) +* texreset: Frames and pictures. (line 317) +* textbook graph: graph. (line 379) * tgz: UNIX binary distributions. (line 6) -* thick: three. (line 104) -* thin: three. (line 104) +* thick: three. (line 111) +* thin: three. (line 111) * this: Structures. (line 6) * three: three. (line 6) -* tick: graph. (line 332) -* Ticks: graph. (line 155) -* ticks: graph. (line 155) -* tildeframe: markers. (line 26) -* tile: Pens. (line 247) -* tilings: Pens. (line 234) -* time: Data types. (line 290) -* times: Paths and guides. (line 202) -* Top: graph. (line 131) -* TopView: three. (line 340) -* trace: Debugger. (line 51) -* trailingzero: graph. (line 169) -* transform <1>: three. (line 407) +* tick: graph. (line 349) +* Ticks: graph. (line 164) +* ticks: graph. (line 164) +* tildeframe: markers. (line 30) +* tile: Pens. (line 264) +* tilings: Pens. (line 250) +* time: Data types. (line 293) +* times: Paths and guides. (line 209) +* Top: graph. (line 139) +* TopView: three. (line 366) +* trace: Debugger. (line 57) +* trailingzero: graph. (line 179) +* transform <1>: three. (line 439) * transform: Transforms. (line 6) -* transform3: three. (line 376) -* transparency: Pens. (line 218) -* transpose: Arrays. (line 211) -* tree: tree. (line 7) +* transform3: three. (line 408) +* transparency: Pens. (line 232) +* transpose: Arrays. (line 218) +* tree: tree. (line 9) * trembling: trembling. (line 6) * triangle: geometry. (line 6) -* triangulate: contour. (line 154) -* tridiagonal: Arrays. (line 268) +* triangulate: contour. (line 161) +* tridiagonal: Arrays. (line 276) * trigonometric integrals: Mathematical functions. (line 48) -* triple: Data types. (line 108) -* TrueMargin: draw. (line 42) -* TrueMargin3: three. (line 492) +* triple: Data types. (line 110) +* TrueMargin: draw. (line 43) +* TrueMargin3: three. (line 530) * tube <1>: tube. (line 6) -* tube: three. (line 104) +* tube: three. (line 111) * tutorial: Tutorial. (line 6) -* typedef <1>: Functions. (line 36) -* typedef: Data types. (line 338) -* undefined: Paths and guides. (line 264) -* UnFill: Frames and pictures. (line 150) -* unfill: fill. (line 105) -* UnFill: draw. (line 26) +* typedef <1>: Functions. (line 39) +* typedef: Data types. (line 344) +* undefined: Paths and guides. (line 272) +* UnFill: Frames and pictures. (line 171) +* unfill: fill. (line 118) +* UnFill: draw. (line 27) * unicode: unicode. (line 6) -* uniform: Arrays. (line 158) +* uniform: Arrays. (line 163) * Uninstall: Uninstall. (line 6) -* unit: Data types. (line 78) -* unitbox <1>: three. (line 269) -* unitbox: Tutorial. (line 218) -* unitcircle <1>: three. (line 236) -* unitcircle: Tutorial. (line 110) +* unit: Data types. (line 80) +* unitbox <1>: three. (line 294) +* unitbox: Tutorial. (line 230) +* unitcircle <1>: three. (line 255) +* unitcircle: Tutorial. (line 117) * unitrand: Mathematical functions. (line 39) -* unitsize <1>: Frames and pictures. (line 64) -* unitsize: Tutorial. (line 73) +* unitsize <1>: Frames and pictures. (line 72) +* unitsize: Tutorial. (line 76) * UNIX binary distributions: UNIX binary distributions. (line 6) -* unpacking: Rest arguments. (line 39) -* unravel: Import. (line 31) -* up: three. (line 300) -* update: Files. (line 36) -* UpsideDown: Frames and pictures. (line 93) -* usepackage: Frames and pictures. (line 285) -* user coordinates: Tutorial. (line 73) +* unpacking: Rest arguments. (line 42) +* unravel: Import. (line 35) +* up: three. (line 326) +* update: Files. (line 37) +* UpsideDown: Frames and pictures. (line 109) +* usepackage: Frames and pictures. (line 320) +* user coordinates: Tutorial. (line 76) * user-defined operators: User-defined operators. (line 6) -* usleep: Data types. (line 331) +* usleep: Data types. (line 337) * variable initializers: Variable initializers. (line 6) -* vectorfield: graph. (line 965) -* vectorfield3: graph3. (line 150) -* vectorization: Arrays. (line 325) -* verbatim: Frames and pictures. (line 265) -* vertex-dependent colors: three. (line 75) -* Vertical: flowchart. (line 74) -* viewportheight: LaTeX usage. (line 32) -* viewportmargin: three. (line 228) -* viewportsize: three. (line 228) -* viewportwidth: LaTeX usage. (line 32) -* views: three. (line 197) -* vim: Editing modes. (line 33) -* virtual functions: Structures. (line 189) +* vectorfield: graph. (line 999) +* vectorfield3: graph3. (line 160) +* vectorization: Arrays. (line 335) +* verbatim: Frames and pictures. (line 296) +* vertex-dependent colors: three. (line 78) +* Vertical: flowchart. (line 82) +* viewportheight: LaTeX usage. (line 34) +* viewportmargin: three. (line 247) +* viewportsize: three. (line 247) +* viewportwidth: LaTeX usage. (line 34) +* views: three. (line 215) +* vim: Editing modes. (line 34) +* virtual functions: Structures. (line 198) * void: Data types. (line 10) -* W: Tutorial. (line 94) -* whatever: Paths and guides. (line 228) +* W: Tutorial. (line 99) +* whatever: Paths and guides. (line 235) * Wheel: palette. (line 22) * wheel mouse: GUI. (line 6) -* while: Programming. (line 29) -* white-space string delimiter mode: Arrays. (line 353) -* width: LaTeX usage. (line 32) -* windingnumber: Paths and guides. (line 264) -* word: Arrays. (line 353) -* write <1>: Arrays. (line 394) -* write: Files. (line 51) -* X: three. (line 236) +* while: Programming. (line 30) +* white-space string delimiter mode: Arrays. (line 366) +* width: LaTeX usage. (line 34) +* windingnumber: Paths and guides. (line 272) +* word: Arrays. (line 366) +* write <1>: Arrays. (line 412) +* write: Files. (line 53) +* X: three. (line 255) * xasy <1>: GUI. (line 6) -* xasy: Configuring. (line 68) -* xaxis: graph3. (line 7) -* xelatex <1>: Options. (line 129) +* xasy: Configuring. (line 70) +* xaxis3: graph3. (line 7) +* xelatex <1>: Options. (line 130) * xelatex: embed. (line 10) -* xequals: graph. (line 284) -* XEquals: graph. (line 270) -* xinput: Files. (line 71) -* xlimits: graph. (line 626) +* xequals: graph. (line 296) +* XEquals: graph. (line 282) +* xinput: Files. (line 75) +* xlimits: graph. (line 654) * XOR: Arithmetic & logical. - (line 80) -* xoutput: Files. (line 71) -* xpart: Data types. (line 89) -* xscale: Transforms. (line 33) -* xscale3: three. (line 383) -* xtick: graph. (line 332) -* XYEquals: graph3. (line 20) -* XYZero: graph3. (line 20) -* XZEquals: graph3. (line 20) -* XZero: graph. (line 265) -* XZZero: graph3. (line 20) -* Y <1>: three. (line 236) + (line 81) +* xoutput: Files. (line 75) +* xpart: Data types. (line 91) +* xscale: Transforms. (line 34) +* xscale3: three. (line 415) +* xtick: graph. (line 349) +* XYEquals: graph3. (line 22) +* XYZero: graph3. (line 22) +* XZEquals: graph3. (line 22) +* XZero: graph. (line 277) +* XZZero: graph3. (line 22) +* Y <1>: three. (line 255) * Y: Mathematical functions. (line 6) -* yaxis: graph3. (line 7) -* yequals: graph. (line 284) -* YEquals: graph. (line 124) -* ylimits: graph. (line 626) -* ypart: Data types. (line 92) -* yscale: Transforms. (line 36) -* yscale3: three. (line 386) -* ytick: graph. (line 332) -* YZEquals: graph3. (line 20) -* YZero: graph. (line 119) -* YZZero: graph3. (line 20) -* Z: three. (line 236) -* zaxis: graph3. (line 7) +* yaxis3: graph3. (line 7) +* yequals: graph. (line 296) +* YEquals: graph. (line 132) +* ylimits: graph. (line 654) +* ypart: Data types. (line 94) +* yscale: Transforms. (line 37) +* yscale3: three. (line 418) +* ytick: graph. (line 349) +* YZEquals: graph3. (line 22) +* YZero: graph. (line 127) +* YZZero: graph3. (line 22) +* Z: three. (line 255) +* zaxis3: graph3. (line 7) * zero_Ai: Mathematical functions. (line 48) * zero_Ai_deriv: Mathematical functions. @@ -9368,11 +9772,11 @@ Index (line 48) * zero_J: Mathematical functions. (line 48) -* zerowinding: Pens. (line 148) +* zerowinding: Pens. (line 158) * zeta: Mathematical functions. (line 48) -* zpart: Data types. (line 161) -* zscale3: three. (line 389) +* zpart: Data types. (line 163) +* zscale3: three. (line 421) * |: Arithmetic & logical. (line 62) * ||: Arithmetic & logical. @@ -9381,144 +9785,145 @@ Index Tag Table: -Node: Top578 -Node: Description6701 -Node: Installation10116 -Node: UNIX binary distributions11164 -Node: MacOS X binary distributions12270 -Node: Microsoft Windows13218 -Node: Configuring14388 -Node: Search paths18573 -Node: Compiling from UNIX source19253 -Ref: multisampling19842 -Node: Editing modes22268 -Node: Subversion24468 -Node: Uninstall24929 -Node: Tutorial25279 -Ref: unitcircle29287 -Ref: Bezier29496 -Node: Drawing commands34909 -Node: draw36618 -Ref: arrows37766 -Node: fill42991 -Ref: gradient shading44035 -Node: clip48228 -Node: label48820 -Ref: Label49519 -Node: Programming55315 -Ref: array iteration56132 -Node: Data types57214 -Ref: format66111 -Node: Paths and guides69508 -Ref: circle69762 -Ref: arctime75160 -Ref: extension79025 -Node: Pens85764 -Ref: fillrule93018 -Ref: basealign93915 -Ref: transparency96740 -Ref: makepen100289 -Ref: overwrite101181 -Node: Transforms102391 -Node: Frames and pictures104182 -Ref: envelope105323 -Ref: size106406 -Ref: unitsize107393 -Ref: shipout108453 -Ref: filltype110671 -Ref: add113654 -Ref: add about114600 -Ref: tex117601 -Node: Files118475 -Ref: cd119440 -Ref: scroll123821 -Node: Variable initializers126864 -Node: Structures129159 -Node: Operators136501 -Node: Arithmetic & logical136815 -Node: Self & prefix operators138712 -Node: User-defined operators139500 -Node: Implicit scaling140411 -Node: Functions140974 -Ref: stack overflow143727 -Node: Default arguments144291 -Node: Named arguments145030 -Node: Rest arguments147192 -Node: Mathematical functions150002 -Node: Arrays154607 -Ref: sort161788 -Ref: tridiagonal164079 -Ref: solve165307 -Node: Slices169434 -Node: Casts173328 -Node: Import175294 -Node: Static180524 -Node: LaTeX usage183420 -Node: Base modules188889 -Node: plain191325 -Node: simplex191977 -Node: math192250 -Node: interpolate193349 -Node: geometry193628 -Node: trembling194191 -Node: stats194552 -Node: patterns194812 -Node: markers195048 -Node: tree196937 -Node: binarytree197123 -Node: drawtree197769 -Node: syzygy197971 -Node: feynman198245 -Node: roundedpath198520 -Node: animation198803 -Ref: animate199222 -Node: embed200361 -Node: slide202163 -Node: MetaPost202503 -Node: unicode203219 -Node: latin1204107 -Node: babel204475 -Node: labelpath204704 +Node: Top576 +Node: Description6762 +Node: Installation10261 +Node: UNIX binary distributions11309 +Node: MacOS X binary distributions12417 +Node: Microsoft Windows13365 +Node: Configuring14535 +Node: Search paths18733 +Node: Compiling from UNIX source19413 +Ref: multisampling20003 +Node: Editing modes22425 +Node: Subversion24860 +Node: Uninstall25324 +Node: Tutorial25676 +Ref: unitcircle29424 +Ref: Bezier29637 +Node: Drawing commands34700 +Node: draw36410 +Ref: arrows37559 +Node: fill42788 +Ref: gradient shading43837 +Node: clip48039 +Node: label48632 +Ref: Label49332 +Node: Programming55086 +Ref: array iteration55904 +Node: Data types56987 +Ref: format65894 +Node: Paths and guides69388 +Ref: circle69642 +Ref: arctime75025 +Ref: extension78890 +Node: Pens85603 +Ref: fillrule92799 +Ref: basealign93701 +Ref: transparency96541 +Ref: makepen99998 +Ref: overwrite100828 +Node: Transforms102038 +Node: Frames and pictures103830 +Ref: envelope104986 +Ref: size106079 +Ref: unitsize107067 +Ref: shipout108146 +Ref: filltype110481 +Ref: add113484 +Ref: add about114436 +Ref: tex117403 +Node: Files118304 +Ref: cd119270 +Ref: scroll123654 +Node: Variable initializers126701 +Node: Structures128998 +Node: Operators136460 +Node: Arithmetic & logical136774 +Node: Self & prefix operators138672 +Node: User-defined operators139462 +Node: Implicit scaling140375 +Node: Functions140940 +Ref: stack overflow143724 +Node: Default arguments144288 +Node: Named arguments145028 +Node: Rest arguments147195 +Node: Mathematical functions150010 +Node: Arrays154616 +Ref: sort161802 +Ref: tridiagonal164108 +Ref: solve165346 +Node: Slices169481 +Node: Casts173379 +Node: Import175350 +Node: Static180598 +Node: LaTeX usage183501 +Node: Base modules188944 +Node: plain191444 +Node: simplex192096 +Node: math192369 +Node: interpolate193468 +Node: geometry193747 +Node: trembling194351 +Node: stats194712 +Node: patterns194972 +Node: markers195208 +Node: tree196997 +Node: binarytree197185 +Node: drawtree197774 +Node: syzygy197978 +Node: feynman198252 +Node: roundedpath198527 +Node: animation198810 +Ref: animate199229 +Node: embed200369 +Node: slide202159 +Node: MetaPost202499 +Node: unicode203215 +Node: latin1204105 +Node: babel204473 +Node: labelpath204703 Node: labelpath3205524 Node: annotate205835 -Node: CAD206306 -Node: graph206616 -Ref: ticks213454 -Ref: pathmarkers226875 -Ref: marker227340 -Ref: markuniform227691 -Ref: errorbars229482 -Ref: automatic scaling233819 -Node: palette245227 -Ref: images245345 -Ref: image249516 -Ref: logimage250045 -Ref: penimage250903 -Node: three251399 -Ref: PostScript3D272916 -Node: obj274661 -Node: graph3274911 -Ref: GaussianSurface279639 -Node: grid3280780 -Node: solids281574 -Node: tube282576 -Node: flowchart284807 -Node: contour289363 -Node: contour3294661 -Node: slopefield294968 -Node: Options296449 -Ref: configuration file301617 -Ref: settings301617 -Ref: convert302688 -Node: Interactive mode305447 -Ref: history307071 -Node: GUI308376 -Node: GUI Installation308879 -Node: GUI Usage310404 -Node: PostScript to Asymptote311307 -Node: Help312450 -Node: Debugger314177 -Node: Credits315962 -Node: Index316875 +Node: CAD206307 +Node: graph206617 +Ref: ticks213497 +Ref: pathmarkers226691 +Ref: marker227161 +Ref: markuniform227519 +Ref: errorbars229321 +Ref: automatic scaling233392 +Node: palette244068 +Ref: images244186 +Ref: image248363 +Ref: logimage248841 +Ref: penimage249648 +Node: three250093 +Ref: PostScript3D271835 +Node: obj273529 +Node: graph3273781 +Ref: GaussianSurface278746 +Node: grid3279832 +Node: solids280572 +Node: tube281521 +Node: flowchart283755 +Node: contour288263 +Node: contour3293298 +Node: slopefield293605 +Node: ode295044 +Node: Options295304 +Ref: configuration file300466 +Ref: settings300466 +Ref: convert301539 +Node: Interactive mode304303 +Ref: history305927 +Node: GUI307233 +Node: GUI Installation307736 +Node: GUI Usage309213 +Node: PostScript to Asymptote310117 +Node: Help311262 +Node: Debugger312991 +Node: Credits314783 +Node: Index315696 End Tag Table diff --git a/Build/source/utils/asymptote/doc/png/asymptote/asymptote.info b/Build/source/utils/asymptote/doc/png/asymptote/asymptote.info index 0df4062ecf3..ce277160bfd 100644 --- a/Build/source/utils/asymptote/doc/png/asymptote/asymptote.info +++ b/Build/source/utils/asymptote/doc/png/asymptote/asymptote.info @@ -1,7 +1,7 @@ This is asymptote.info, produced by makeinfo version 4.13 from ../asymptote.texi. -This file documents `Asymptote', version 1.77. +This file documents `Asymptote', version 1.78. `http://asymptote.sourceforge.net' @@ -23,7 +23,7 @@ File: asymptote.info, Node: Top, Next: Description, Up: (dir) Asymptote ********* -This file documents `Asymptote', version 1.77. +This file documents `Asymptote', version 1.78. `http://asymptote.sourceforge.net' @@ -195,6 +195,9 @@ weaker syntax and capabilities) called `MetaPost'. * `LaTeX' typesetting of labels, for overall document consistency; + * the ability to generate and embed 3D vector PRC graphics into PDF + files; + * a natural coordinate-based framework for technical drawings, inspired by `MetaPost', with a much cleaner, powerful C++-like programming syntax; @@ -482,17 +485,16 @@ used; if it is old we recommend first putting `http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-7.1.tar.gz' in the `Asymptote' source directory. -If your graphics card supports multisampling, we recommend using SVN -revision 761 (or later) of `freeglut' to support antialiasing in +If your graphics card supports multisampling, we recommend using version +`2.6.0-rc1' (or later) of `freeglut' to support antialiasing in `Asymptote''s adaptive `OpenGL' 3D renderer (`MacOS X' users can skip this step since `Asymptote' is configured to use the native glut library on that platform). Download - `http://freeglut.svn.sourceforge.net/viewvc/freeglut/trunk/freeglut/freeglut.tar.gz' + `http://prdownloads.sourceforge.net/freeglut/freeglut-2.6.0-rc1.tar.gz' and type (as the root user): -tar -zxf freeglut.tar.gz -cd freeglut -sh autogen.sh +tar -zxf freeglut-2.6.0-rc1.tar.gz +cd freeglut-2.6.0 ./configure --prefix=/usr make install cd .. @@ -584,6 +586,11 @@ add to `~/.vim/ftplugin/asy.vim': setlocal makeprg=asy\ % setlocal errorformat=%f:\ %l.%c:\ %m + Syntax highlighting support for the KDE editor `Kate' can be enabled +by running `asy-kate.sh' in the `/usr/local/share/asymptote' directory +and putting the generated `asymptote.xml' file in +`~/.kde/share/apps/katepart/syntax/'. + File: asymptote.info, Node: Subversion, Next: Uninstall, Prev: Editing modes, Up: Installation @@ -591,7 +598,7 @@ File: asymptote.info, Node: Subversion, Next: Uninstall, Prev: Editing modes, ==================== The following commands are needed to install the latest development -version of `Asymptote' using Subversion: +version of `Asymptote' using `Subversion': svn co http://asymptote.svn.sourceforge.net/svnroot/asymptote/trunk/asymptote cd asymptote ./autogen.sh @@ -3202,8 +3209,9 @@ and the total system cputime followed by "S". Much like in C++, casting (*note Casts::) provides for an elegant implementation of structure inheritance, including virtual functions: struct parent { - real x=1; - void virtual(int) {write (0);} + real x; + void operator init(int x) {this.x=x;} + void virtual(int) {write(0);} void f() {virtual(1);} } @@ -3211,24 +3219,25 @@ void write(parent p) {write(p.x);} struct child { parent parent; - real y=2; - void virtual(int x) {write (x);} + real y=3; + void operator init(int x) {parent.operator init(x);} + void virtual(int x) {write(x);} parent.virtual=virtual; void f()=parent.f; } parent operator cast(child child) {return child.parent;} -parent p; -child c; +parent p=parent(1); +child c=child(2); -write(c); // Outputs 1; +write(c); // Outputs 2; p.f(); // Outputs 0; c.f(); // Outputs 1; -write(c.parent.x); // Outputs 1; -write(c.y); // Outputs 2; +write(c.parent.x); // Outputs 2; +write(c.y); // Outputs 3; For further examples of structures, see `Legend' and `picture' in the `Asymptote' base module `plain'. @@ -5938,8 +5947,8 @@ following routines: draw(graph(f,0.1,10)); - //xlimits(1,10); - //ylimits(0.1,1); + //xlimits(1,10,Crop); + //ylimits(0.1,1,Crop); dot(Label("(3,5)",align=S),Scale((3,5))); @@ -6549,26 +6558,35 @@ There are four choices for viewing 3D `Asymptote' output: sample width can be controlled with the setting `multisample'. An initial screen position can be specified with the pair setting `position', where negative values are interpreted as relative to - the corresponding maximum screen dimension. The mouse bindings are: + the corresponding maximum screen dimension. The default settings import settings; + leftbutton=new string[] {"rotate","zoom","shift",""}; + middlebutton=new string[] {"menu"}; + rightbutton=new string[] {"zoom/menu","rotateX","rotateY","rotateZ"}; + wheelup=new string[] {"zoomin"}; + wheeldown=new string[] {"zoomout"}; + bind the mouse buttons as follows: * Left: rotate - * shift Left: zoom + * Shift Left: zoom - * ctrl Left: shift + * Ctrl Left: shift * Middle: menu - * Wheel: zoom + * Wheel Up: zoom in + + * Wheel Down: zoom out * Right: zoom * Right double click: menu - * shift Right: rotate about the X axis + * Shift Right: rotate about the X axis - * ctrl Right: rotate about the Y axis + * Ctrl Right: rotate about the Y axis + + * Alt Right: rotate about the Z axis - * alt Right: rotate about the Z axis The keyboard shortcuts are: * h: home @@ -7632,7 +7650,7 @@ Usage: ../asy [options] [file ...] Options (negate by replacing - with -no): -V,-View View output; command-line only --a,-align C|B|T|Z Center, Bottom, Top, or Zero page alignment [Center] +-a,-align C|B|T|Z Center, Bottom, Top, or Zero page alignment [C] -antialias n Antialiasing width for rasterized output [2] -auto3D Automatically activate 3D scene [true] -autoimport string Module to automatically import @@ -7919,17 +7937,16 @@ packages. Pictures are deconstructed into the PNG image format, which supports full alpha channel transparency. Under `Microsoft Windows', this -requires `Python 2.5 (or 2.5.1)' and the `Python Imaging Library': +requires `Python 2.6.2' and the `Python Imaging Library': - `http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi' + `http://www.python.org/ftp/python/2.6.2/python-2.6.2.msi' - `http://effbot.org/downloads/PIL-1.1.6.win32-py2.5.exe'. + `http://effbot.org/downloads/PIL-1.1.7b1.win32-py2.6.exe'. On `UNIX' systems, place -`http://effbot.org/downloads/Imaging-1.1.6.tar.gz' in the `Asymptote' +`http://effbot.org/downloads/Imaging-1.1.7b1.tar.gz' in the `Asymptote' source directory, and type (as the root user): -tar -zxf Imaging-1.1.6.tar.gz -cd Imaging-1.1.6 -patch -p1 < ../patches/TkAlpha-Imaging-1.1.6.patch +tar -zxf Imaging-1.1.7b1.tar.gz +cd Imaging-1.1.7b1 python setup.py install Alternatively, `xasy' can deconstruct pictures into the GIF image @@ -8021,7 +8038,7 @@ form of patches or `Asymptote' modules can be posted here: `http://freshmeat.net/projects/asy' If you find a bug in `Asymptote', please check (if possible) whether -the bug is still present in the latest Subversion developmental code +the bug is still present in the latest `Subversion' developmental code (*note Subversion::) before submitting a bug report. New bugs can be submitted using the Bug Tracking System at @@ -8214,7 +8231,7 @@ Index * abs <1>: Mathematical functions. (line 35) * abs: Data types. (line 60) -* accel <1>: three. (line 433) +* accel <1>: three. (line 442) * accel: Paths and guides. (line 110) * access: Import. (line 6) * acknowledgments: Credits. (line 6) @@ -8247,21 +8264,21 @@ Index * animation: animation. (line 6) * annotate: annotate. (line 6) * antialias <1>: Options. (line 128) -* antialias: three. (line 180) +* antialias: three. (line 189) * antialiasing: Compiling from UNIX source. (line 16) * append <1>: Arrays. (line 39) * append: Files. (line 36) -* arc: three. (line 245) +* arc: three. (line 254) * Arc: Paths and guides. (line 32) * arc: Paths and guides. (line 22) * ArcArrow: draw. (line 26) -* ArcArrow3: three. (line 476) +* ArcArrow3: three. (line 485) * ArcArrows: draw. (line 26) -* ArcArrows3: three. (line 476) -* arclength <1>: three. (line 433) +* ArcArrows3: three. (line 485) +* arclength <1>: three. (line 442) * arclength: Paths and guides. (line 137) -* arctime <1>: three. (line 433) +* arctime <1>: three. (line 442) * arctime: Paths and guides. (line 141) * arguments: Default arguments. (line 6) * arithmetic operators: Arithmetic & logical. @@ -8273,9 +8290,9 @@ Index * Arrow: draw. (line 26) * arrow: Drawing commands. (line 31) * arrow keys: Tutorial. (line 21) -* Arrow3: three. (line 476) +* Arrow3: three. (line 485) * Arrows: draw. (line 26) -* Arrows3: three. (line 476) +* Arrows3: three. (line 485) * as: Import. (line 70) * aSin: Mathematical functions. (line 20) @@ -8289,6 +8306,7 @@ Index * asy-mode: Editing modes. (line 6) * asy.vim: Editing modes. (line 33) * asymptote.sty: LaTeX usage. (line 6) +* asymptote.xml: Editing modes. (line 49) * ASYMPTOTE_CONFIG: Options. (line 101) * aTan: Mathematical functions. (line 20) @@ -8301,7 +8319,7 @@ Index * atleast: Tutorial. (line 165) * attach <1>: graph. (line 405) * attach: LaTeX usage. (line 32) -* autoadjust: three. (line 315) +* autoadjust: three. (line 324) * autoimport: Options. (line 97) * automatic scaling: graph. (line 672) * axialshade: fill. (line 43) @@ -8310,11 +8328,11 @@ Index * azimuth: Data types. (line 124) * babel: babel. (line 6) * background color: Frames and pictures. (line 164) -* BackView: three. (line 340) +* BackView: three. (line 349) * Bar: draw. (line 19) -* Bar3: three. (line 476) +* Bar3: three. (line 485) * Bars: draw. (line 19) -* Bars3: three. (line 476) +* Bars3: three. (line 485) * barsize: draw. (line 19) * base modules: Base modules. (line 6) * basealign: Pens. (line 164) @@ -8322,18 +8340,18 @@ Index * batch mode: Tutorial. (line 30) * beep: Data types. (line 335) * BeginArcArrow: draw. (line 26) -* BeginArcArrow3: three. (line 476) +* BeginArcArrow3: three. (line 485) * BeginArrow: draw. (line 26) -* BeginArrow3: three. (line 476) +* BeginArrow3: three. (line 485) * BeginBar: draw. (line 19) -* BeginBar3: three. (line 476) +* BeginBar3: three. (line 485) * BeginDotMargin: draw. (line 42) -* BeginDotMargin3: three. (line 492) +* BeginDotMargin3: three. (line 501) * BeginMargin: draw. (line 42) -* BeginMargin3: three. (line 492) +* BeginMargin3: three. (line 501) * BeginPenMargin: draw. (line 42) -* BeginPenMargin2: three. (line 492) -* BeginPenMargin3: three. (line 492) +* BeginPenMargin2: three. (line 501) +* BeginPenMargin3: three. (line 501) * BeginPoint: label. (line 57) * Bessel: Mathematical functions. (line 48) @@ -8367,11 +8385,11 @@ Index (line 6) * Bottom: graph. (line 128) * BottomTop: graph. (line 134) -* BottomView: three. (line 340) +* BottomView: three. (line 349) * bounding box: Frames and pictures. (line 164) * Bounds: graph3. (line 20) * boutput: Files. (line 71) -* box <1>: three. (line 267) +* box <1>: three. (line 276) * box: Frames and pictures. (line 22) * bp: Tutorial. (line 17) * break: Programming. (line 29) @@ -8393,7 +8411,7 @@ Index * cd: Files. (line 24) * ceil: Mathematical functions. (line 26) -* center: three. (line 300) +* center: three. (line 309) * Center: label. (line 62) * checker: Pens. (line 247) * Chinese: unicode. (line 12) @@ -8402,7 +8420,7 @@ Index * Ci: Mathematical functions. (line 48) * circle <1>: flowchart. (line 57) -* circle: three. (line 241) +* circle: three. (line 250) * Circle: Paths and guides. (line 17) * circle: Paths and guides. (line 10) * circlebarframe: markers. (line 18) @@ -8471,7 +8489,7 @@ Index * curl: Tutorial. (line 172) * curlSpecifier: Paths and guides. (line 387) * currentpen: Pens. (line 6) -* currentprojection: three. (line 337) +* currentprojection: three. (line 346) * curve: slopefield. (line 20) * custom axis types: graph. (line 138) * custom mark routine: graph. (line 566) @@ -8479,7 +8497,7 @@ Index * cut: Paths and guides. (line 233) * cycle <1>: three. (line 6) * cycle: Tutorial. (line 46) -* cyclic <1>: three. (line 433) +* cyclic <1>: three. (line 442) * cyclic <2>: Arrays. (line 39) * cyclic: Paths and guides. (line 75) * cyclicflag: Arrays. (line 39) @@ -8496,7 +8514,7 @@ Index * default arguments: Default arguments. (line 6) * defaultformat: graph. (line 169) * DefaultHead: draw. (line 26) -* DefaultHead3: three. (line 476) +* DefaultHead3: three. (line 485) * defaultpen: Pens. (line 46) * deferred drawing: simplex. (line 6) * Degrees: Mathematical functions. @@ -8510,7 +8528,7 @@ Index * diagonal: Arrays. (line 305) * diamond: flowchart. (line 50) * dimension: Arrays. (line 368) -* dir <1>: three. (line 433) +* dir <1>: three. (line 442) * dir <2>: Paths and guides. (line 99) * dir <3>: Data types. (line 85) * dir: Search paths. (line 10) @@ -8523,12 +8541,12 @@ Index * dot <1>: Data types. (line 98) * dot: draw. (line 83) * DotMargin: draw. (line 42) -* DotMargin3: three. (line 492) +* DotMargin3: three. (line 501) * DotMargins: draw. (line 42) -* DotMargins3: three. (line 492) +* DotMargins3: three. (line 501) * dotted: Pens. (line 92) * double: Files. (line 71) -* double deferred drawing: three. (line 222) +* double deferred drawing: three. (line 231) * Draw: Frames and pictures. (line 147) * draw: draw. (line 110) * Draw: draw. (line 26) @@ -8552,19 +8570,19 @@ Index * embed: embed. (line 6) * empty: Frames and pictures. (line 7) * EndArcArrow: draw. (line 26) -* EndArcArrow3: three. (line 476) +* EndArcArrow3: three. (line 485) * EndArrow: draw. (line 26) -* EndArrow3: three. (line 476) +* EndArrow3: three. (line 485) * EndBar: draw. (line 19) -* EndBar3: three. (line 476) +* EndBar3: three. (line 485) * EndDotMargin: draw. (line 42) -* EndDotMargin3: three. (line 492) +* EndDotMargin3: three. (line 501) * endl: Files. (line 59) * EndMargin: draw. (line 42) -* EndMargin3: three. (line 492) +* EndMargin3: three. (line 501) * EndPenMargin: draw. (line 42) -* EndPenMargin2: three. (line 492) -* EndPenMargin3: three. (line 492) +* EndPenMargin2: three. (line 501) +* EndPenMargin3: three. (line 501) * EndPoint: label. (line 57) * envelope: Frames and pictures. (line 22) * environment variables: Configuring. (line 86) @@ -8600,12 +8618,12 @@ Index * extension <1>: MetaPost. (line 10) * extension: Paths and guides. (line 228) * external: embed. (line 28) -* extrude: three. (line 427) +* extrude: three. (line 436) * F: Mathematical functions. (line 48) * fabs: Mathematical functions. (line 6) -* face: three. (line 511) +* face: three. (line 520) * factorial: Mathematical functions. (line 39) * Fedora: UNIX binary distributions. @@ -8613,7 +8631,7 @@ Index * feynman: feynman. (line 6) * fft: Arrays. (line 252) * FFTW: Compiling from UNIX source. - (line 59) + (line 58) * file <1>: Debugger. (line 45) * file: Files. (line 6) * Fill: Frames and pictures. (line 133) @@ -8649,7 +8667,7 @@ Index * freeglut: Compiling from UNIX source. (line 16) * from: Import. (line 17) -* FrontView: three. (line 340) +* FrontView: three. (line 349) * function declarations: Functions. (line 67) * function shading: fill. (line 95) * Function shading: fill. (line 95) @@ -8668,7 +8686,7 @@ Index * getstring: Files. (line 111) * gettriple: Files. (line 111) * glOptions <1>: Options. (line 116) -* glOptions: three. (line 180) +* glOptions: three. (line 189) * GNU Scientific Library: Mathematical functions. (line 48) * gouraudshade: fill. (line 58) @@ -8688,7 +8706,7 @@ Index * gsl: Mathematical functions. (line 48) * GSL: Compiling from UNIX source. - (line 59) + (line 58) * gsOptions: Options. (line 116) * GUI: GUI. (line 6) * GUI installation: GUI Installation. (line 6) @@ -8705,13 +8723,13 @@ Index * hex: Data types. (line 279) * hexidecimal <1>: Pens. (line 59) * hexidecimal: Data types. (line 279) -* hidden surface removal: three. (line 511) +* hidden surface removal: three. (line 520) * histogram: Mathematical functions. (line 39) * history: Files. (line 136) * historylines: Interactive mode. (line 42) * HookHead: draw. (line 26) -* HookHead3: three. (line 476) +* HookHead3: three. (line 485) * Horizontal: flowchart. (line 74) * hypot: Mathematical functions. (line 6) @@ -8719,7 +8737,7 @@ Index (line 48) * i_scaled: Mathematical functions. (line 48) -* iconic: three. (line 180) +* iconic: three. (line 189) * identity <1>: Arrays. (line 302) * identity <2>: Mathematical functions. (line 6) @@ -8757,22 +8775,22 @@ Index * interp: Arithmetic & logical. (line 76) * interpolate: interpolate. (line 6) -* intersect <1>: three. (line 433) +* intersect <1>: three. (line 442) * intersect <2>: math. (line 13) * intersect: Paths and guides. (line 176) -* intersectionpoint <1>: three. (line 433) +* intersectionpoint <1>: three. (line 442) * intersectionpoint <2>: math. (line 17) * intersectionpoint: Paths and guides. (line 220) -* intersectionpoints <1>: three. (line 433) +* intersectionpoints <1>: three. (line 442) * intersectionpoints: Paths and guides. (line 224) -* intersections <1>: three. (line 433) +* intersections <1>: three. (line 442) * intersections: Paths and guides. (line 187) * InTicks: graph3. (line 34) * intMax: Data types. (line 28) * intMin: Data types. (line 28) * inverse <1>: Arrays. (line 308) * inverse: Transforms. (line 16) -* invert: three. (line 366) +* invert: three. (line 375) * invisible: Pens. (line 39) * J: Mathematical functions. (line 6) @@ -8781,7 +8799,9 @@ Index (line 48) * k_scaled: Mathematical functions. (line 48) -* keyboard bindings:: three. (line 149) +* Kate: Editing modes. (line 49) +* KDE editor: Editing modes. (line 49) +* keyboard bindings:: three. (line 158) * keys: Arrays. (line 39) * keywords: Named arguments. (line 6) * Korean: unicode. (line 12) @@ -8808,13 +8828,13 @@ Index * LeftRight: graph. (line 280) * LeftSide: label. (line 62) * LeftTicks: graph. (line 155) -* LeftView: three. (line 340) +* LeftView: three. (line 349) * legend <1>: graph. (line 421) * legend <2>: draw. (line 64) * legend: Drawing commands. (line 31) * Legendre: Mathematical functions. (line 48) -* length <1>: three. (line 433) +* length <1>: three. (line 442) * length <2>: Arrays. (line 39) * length <3>: Paths and guides. (line 66) * length: Data types. (line 60) @@ -8853,10 +8873,10 @@ Index * makepen: Pens. (line 296) * map: Arrays. (line 144) * Margin: draw. (line 42) -* Margin3: three. (line 492) -* margins: three. (line 228) +* Margin3: three. (line 501) +* margins: three. (line 237) * Margins: draw. (line 42) -* Margins3: three. (line 492) +* Margins3: three. (line 501) * mark: graph. (line 474) * markangle: markers. (line 38) * marker: graph. (line 474) @@ -8866,14 +8886,14 @@ Index * math: math. (line 6) * mathematical functions: Mathematical functions. (line 6) -* max <1>: three. (line 433) +* max <1>: three. (line 442) * max <2>: Arrays. (line 231) * max <3>: Frames and pictures. (line 7) * max: Paths and guides. (line 260) * maxbound: Data types. (line 104) -* maxtile: three. (line 180) +* maxtile: three. (line 189) * maxtimes: Paths and guides. (line 215) -* maxviewport: three. (line 180) +* maxviewport: three. (line 189) * merge: animation. (line 6) * MetaPost: MetaPost. (line 6) * MetaPost ... : Tutorial. (line 176) @@ -8883,12 +8903,12 @@ Index * MetaPost whatever: MetaPost. (line 10) * Microsoft Windows: Microsoft Windows. (line 6) * MidArcArrow: draw. (line 26) -* MidArcArrow3: three. (line 476) +* MidArcArrow3: three. (line 485) * MidArrow: draw. (line 26) -* MidArrow3: three. (line 476) +* MidArrow3: three. (line 485) * midpoint: Paths and guides. (line 161) * MidPoint: label. (line 57) -* min <1>: three. (line 433) +* min <1>: three. (line 442) * min <2>: Arrays. (line 224) * min <3>: Frames and pictures. (line 7) * min: Paths and guides. (line 256) @@ -8919,10 +8939,10 @@ Index * NoFill <1>: Frames and pictures. (line 141) * NoFill: draw. (line 26) * NoMargin: draw. (line 42) -* NoMargin3: three. (line 492) +* NoMargin3: three. (line 501) * none: Files. (line 59) * None: draw. (line 19) -* normal: three. (line 419) +* normal: three. (line 428) * nosafe: Options. (line 144) * NOT: Arithmetic & logical. (line 80) @@ -8931,13 +8951,13 @@ Index * null: Structures. (line 6) * nullpen <1>: Frames and pictures. (line 127) * nullpen: label. (line 14) -* NURBS: three. (line 318) -* O: three. (line 236) +* NURBS: three. (line 327) +* O: three. (line 245) * obj: obj. (line 9) -* oblique: three. (line 281) -* obliqueX: three. (line 289) -* obliqueY: three. (line 296) -* obliqueZ: three. (line 281) +* oblique: three. (line 290) +* obliqueX: three. (line 298) +* obliqueY: three. (line 305) +* obliqueZ: three. (line 290) * ode: ode. (line 9) * offset: Options. (line 148) * opacity: Pens. (line 218) @@ -8957,7 +8977,7 @@ Index * OR: Arithmetic & logical. (line 80) * orientation: Frames and pictures. (line 95) -* orthographic: three. (line 300) +* orthographic: three. (line 309) * outformat: three. (line 119) * outprefix: Frames and pictures. (line 83) * output <1>: Options. (line 128) @@ -8990,13 +9010,13 @@ Index * pdfviewerOptions: Options. (line 116) * pen: Pens. (line 6) * PenMargin: draw. (line 42) -* PenMargin2: three. (line 492) -* PenMargin3: three. (line 492) +* PenMargin2: three. (line 501) +* PenMargin3: three. (line 501) * PenMargins: draw. (line 42) -* PenMargins2: three. (line 492) -* PenMargins3: three. (line 492) +* PenMargins2: three. (line 501) +* PenMargins3: three. (line 501) * perpendicular: geometry. (line 6) -* perspective: three. (line 318) +* perspective: three. (line 327) * picture: Frames and pictures. (line 35) * picture alignment: Frames and pictures. (line 205) * piecewisestraight: Paths and guides. (line 82) @@ -9004,16 +9024,16 @@ Index (line 48) * plain: plain. (line 6) * planar: three. (line 83) -* plane: three. (line 263) -* planeproject: three. (line 416) -* point <1>: three. (line 433) +* plane: three. (line 272) +* planeproject: three. (line 425) +* point <1>: three. (line 442) * point: Paths and guides. (line 85) * polar: Data types. (line 119) * polargraph: graph. (line 90) * polygon: graph. (line 474) * pop: Arrays. (line 39) * Portrait: Frames and pictures. (line 95) -* postcontrol <1>: three. (line 433) +* postcontrol <1>: three. (line 442) * postcontrol: Paths and guides. (line 130) * postfix operators: Self & prefix operators. (line 19) @@ -9022,9 +9042,9 @@ Index * PostScript subpath: Tutorial. (line 197) * pow10: Mathematical functions. (line 6) -* prc: three. (line 197) +* prc: three. (line 206) * precision: Files. (line 86) -* precontrol <1>: three. (line 433) +* precontrol <1>: three. (line 442) * precontrol: Paths and guides. (line 123) * prefix operators: Self & prefix operators. (line 6) @@ -9050,7 +9070,7 @@ Index * radialshade: fill. (line 49) * radians: Mathematical functions. (line 17) -* radius <1>: three. (line 433) +* radius <1>: three. (line 442) * radius: Paths and guides. (line 119) * Rainbow: palette. (line 12) * rand: Mathematical functions. @@ -9086,7 +9106,7 @@ Index * restore: Frames and pictures. (line 261) * restricted: Structures. (line 6) * return: Debugger. (line 48) -* reverse <1>: three. (line 433) +* reverse <1>: three. (line 442) * reverse <2>: Arrays. (line 149) * reverse <3>: Paths and guides. (line 164) * reverse: Data types. (line 248) @@ -9098,7 +9118,7 @@ Index * Right: graph. (line 277) * RightSide: label. (line 62) * RightTicks: graph. (line 155) -* RightView: three. (line 340) +* RightView: three. (line 349) * Rotate: label. (line 37) * Rotate(pair z): label. (line 40) * round: Mathematical functions. @@ -9115,12 +9135,12 @@ Index * safe: Options. (line 144) * save: Frames and pictures. (line 258) * saveline: Files. (line 128) -* scale: three. (line 395) +* scale: three. (line 404) * Scale: graph. (line 688) * scale <1>: graph. (line 672) * scale: Transforms. (line 39) * Scale: label. (line 46) -* scale3: three. (line 392) +* scale3: three. (line 401) * scaled graph: graph. (line 653) * scientific graph: graph. (line 386) * scroll: Files. (line 102) @@ -9142,12 +9162,12 @@ Index * sgn: Mathematical functions. (line 26) * shading: fill. (line 32) -* shift <1>: three. (line 380) +* shift <1>: three. (line 389) * shift: Transforms. (line 27) * Shift: label. (line 34) * shiftless: Transforms. (line 53) * shipout: Frames and pictures. (line 83) -* showtarget: three. (line 300) +* showtarget: three. (line 309) * Si: Mathematical functions. (line 48) * SimpleHead: draw. (line 26) @@ -9162,10 +9182,10 @@ Index * sinh: Mathematical functions. (line 6) * size <1>: Options. (line 128) -* size <2>: three. (line 433) +* size <2>: three. (line 442) * size <3>: Frames and pictures. (line 43) * size: Paths and guides. (line 71) -* size3: three. (line 225) +* size3: three. (line 234) * slant: Transforms. (line 45) * Slant: label. (line 43) * sleep: Data types. (line 329) @@ -9194,7 +9214,7 @@ Index * step: Debugger. (line 39) * stickframe: markers. (line 16) * stop: Debugger. (line 10) -* straight: three. (line 433) +* straight: three. (line 442) * Straight: graph. (line 31) * straight: Paths and guides. (line 78) * strftime: Data types. (line 291) @@ -9204,7 +9224,7 @@ Index * strptime: Data types. (line 299) * struct: Structures. (line 6) * structures: Structures. (line 6) -* subpath <1>: three. (line 433) +* subpath <1>: three. (line 442) * subpath: Paths and guides. (line 167) * subpictures: Frames and pictures. (line 103) * substr: Data types. (line 244) @@ -9227,7 +9247,7 @@ Index (line 6) * tanh: Mathematical functions. (line 6) -* target: three. (line 300) +* target: three. (line 309) * tell: Files. (line 86) * tension <1>: three. (line 6) * tension: Tutorial. (line 165) @@ -9241,7 +9261,7 @@ Index * texcommand: Configuring. (line 68) * texdvicommand: Configuring. (line 68) * TeXHead: draw. (line 26) -* TeXHead3: three. (line 476) +* TeXHead3: three. (line 485) * texpath <1>: label. (line 116) * texpath: Configuring. (line 68) * texpreamble: Frames and pictures. (line 282) @@ -9262,12 +9282,12 @@ Index * time: Data types. (line 291) * times: Paths and guides. (line 202) * Top: graph. (line 131) -* TopView: three. (line 340) +* TopView: three. (line 349) * trace: Debugger. (line 51) * trailingzero: graph. (line 169) -* transform <1>: three. (line 407) +* transform <1>: three. (line 416) * transform: Transforms. (line 6) -* transform3: three. (line 376) +* transform3: three. (line 385) * transparency: Pens. (line 218) * transpose: Arrays. (line 211) * tree: tree. (line 9) @@ -9279,7 +9299,7 @@ Index (line 48) * triple: Data types. (line 108) * TrueMargin: draw. (line 42) -* TrueMargin3: three. (line 492) +* TrueMargin3: three. (line 501) * tube <1>: tube. (line 6) * tube: three. (line 104) * tutorial: Tutorial. (line 6) @@ -9293,9 +9313,9 @@ Index * uniform: Arrays. (line 158) * Uninstall: Uninstall. (line 6) * unit: Data types. (line 78) -* unitbox <1>: three. (line 269) +* unitbox <1>: three. (line 278) * unitbox: Tutorial. (line 218) -* unitcircle <1>: three. (line 236) +* unitcircle <1>: three. (line 245) * unitcircle: Tutorial. (line 110) * unitrand: Mathematical functions. (line 39) @@ -9305,7 +9325,7 @@ Index (line 6) * unpacking: Rest arguments. (line 39) * unravel: Import. (line 31) -* up: three. (line 300) +* up: three. (line 309) * update: Files. (line 36) * UpsideDown: Frames and pictures. (line 95) * usepackage: Frames and pictures. (line 287) @@ -9322,10 +9342,10 @@ Index * vertex-dependent colors: three. (line 75) * Vertical: flowchart. (line 74) * viewportheight: LaTeX usage. (line 32) -* viewportmargin: three. (line 228) -* viewportsize: three. (line 228) +* viewportmargin: three. (line 237) +* viewportsize: three. (line 237) * viewportwidth: LaTeX usage. (line 32) -* views: three. (line 197) +* views: three. (line 206) * vim: Editing modes. (line 33) * virtual functions: Structures. (line 189) * void: Data types. (line 10) @@ -9340,7 +9360,7 @@ Index * word: Arrays. (line 353) * write <1>: Arrays. (line 394) * write: Files. (line 51) -* X: three. (line 236) +* X: three. (line 245) * xasy <1>: GUI. (line 6) * xasy: Configuring. (line 68) * xaxis3: graph3. (line 7) @@ -9355,14 +9375,14 @@ Index * xoutput: Files. (line 71) * xpart: Data types. (line 89) * xscale: Transforms. (line 33) -* xscale3: three. (line 383) +* xscale3: three. (line 392) * xtick: graph. (line 332) * XYEquals: graph3. (line 20) * XYZero: graph3. (line 20) * XZEquals: graph3. (line 20) * XZero: graph. (line 265) * XZZero: graph3. (line 20) -* Y <1>: three. (line 236) +* Y <1>: three. (line 245) * Y: Mathematical functions. (line 6) * yaxis3: graph3. (line 7) @@ -9371,12 +9391,12 @@ Index * ylimits: graph. (line 626) * ypart: Data types. (line 92) * yscale: Transforms. (line 36) -* yscale3: three. (line 386) +* yscale3: three. (line 395) * ytick: graph. (line 332) * YZEquals: graph3. (line 20) * YZero: graph. (line 119) * YZZero: graph3. (line 20) -* Z: three. (line 236) +* Z: three. (line 245) * zaxis3: graph3. (line 7) * zero_Ai: Mathematical functions. (line 48) @@ -9392,7 +9412,7 @@ Index * zeta: Mathematical functions. (line 48) * zpart: Data types. (line 161) -* zscale3: three. (line 389) +* zscale3: three. (line 398) * |: Arithmetic & logical. (line 62) * ||: Arithmetic & logical. @@ -9403,143 +9423,143 @@ Index Tag Table: Node: Top574 Node: Description6760 -Node: Installation10175 -Node: UNIX binary distributions11223 -Node: MacOS X binary distributions12329 -Node: Microsoft Windows13277 -Node: Configuring14447 -Node: Search paths18640 -Node: Compiling from UNIX source19320 -Ref: multisampling19909 -Node: Editing modes22335 -Node: Subversion24535 -Node: Uninstall24996 -Node: Tutorial25346 -Ref: unitcircle29089 -Ref: Bezier29298 -Node: Drawing commands34357 -Node: draw36066 -Ref: arrows37214 -Node: fill42439 -Ref: gradient shading43483 -Node: clip47676 -Node: label48268 -Ref: Label48967 -Node: Programming54711 -Ref: array iteration55528 -Node: Data types56610 -Ref: format65507 -Node: Paths and guides68971 -Ref: circle69225 -Ref: arctime74570 -Ref: extension78435 -Node: Pens85118 -Ref: fillrule92263 -Ref: basealign93160 -Ref: transparency95985 -Ref: makepen99428 -Ref: overwrite100266 -Node: Transforms101476 -Node: Frames and pictures103267 -Ref: envelope104408 -Ref: size105491 -Ref: unitsize106478 -Ref: shipout107538 -Ref: filltype109846 -Ref: add112829 -Ref: add about113775 -Ref: tex116720 -Node: Files117594 -Ref: cd118559 -Ref: scroll122940 -Node: Variable initializers125983 -Node: Structures128278 -Node: Operators135620 -Node: Arithmetic & logical135934 -Node: Self & prefix operators137831 -Node: User-defined operators138619 -Node: Implicit scaling139530 -Node: Functions140093 -Ref: stack overflow142846 -Node: Default arguments143410 -Node: Named arguments144149 -Node: Rest arguments146311 -Node: Mathematical functions149121 -Node: Arrays153726 -Ref: sort160907 -Ref: tridiagonal163198 -Ref: solve164426 -Node: Slices168553 -Node: Casts172447 -Node: Import174413 -Node: Static179643 -Node: LaTeX usage182539 -Node: Base modules187980 -Node: plain190480 -Node: simplex191132 -Node: math191405 -Node: interpolate192504 -Node: geometry192783 -Node: trembling193387 -Node: stats193748 -Node: patterns194008 -Node: markers194244 -Node: tree196027 -Node: binarytree196215 -Node: drawtree196804 -Node: syzygy197008 -Node: feynman197282 -Node: roundedpath197557 -Node: animation197840 -Ref: animate198259 -Node: embed199398 -Node: slide201187 -Node: MetaPost201527 -Node: unicode202243 -Node: latin1203131 -Node: babel203499 -Node: labelpath203728 -Node: labelpath3204548 -Node: annotate204859 -Node: CAD205330 -Node: graph205640 -Ref: ticks212478 -Ref: pathmarkers225626 -Ref: marker226091 -Ref: markuniform226442 -Ref: errorbars228233 -Ref: automatic scaling232289 -Node: palette242922 -Ref: images243040 -Ref: image247211 -Ref: logimage247689 -Ref: penimage248495 -Node: three248939 -Ref: PostScript3D270300 -Node: obj271992 -Node: graph3272244 -Ref: GaussianSurface277205 -Node: grid3278290 -Node: solids279030 -Node: tube279978 -Node: flowchart282209 -Node: contour286708 -Node: contour3291737 -Node: slopefield292044 -Node: ode293481 -Node: Options293741 -Ref: configuration file298908 -Ref: settings298908 -Ref: convert299979 -Node: Interactive mode302738 -Ref: history304362 -Node: GUI305667 -Node: GUI Installation306170 -Node: GUI Usage307696 -Node: PostScript to Asymptote308599 -Node: Help309742 -Node: Debugger311469 -Node: Credits313254 -Node: Index314167 +Node: Installation10259 +Node: UNIX binary distributions11307 +Node: MacOS X binary distributions12413 +Node: Microsoft Windows13361 +Node: Configuring14531 +Node: Search paths18724 +Node: Compiling from UNIX source19404 +Ref: multisampling19993 +Node: Editing modes22411 +Node: Subversion24843 +Node: Uninstall25306 +Node: Tutorial25656 +Ref: unitcircle29399 +Ref: Bezier29608 +Node: Drawing commands34667 +Node: draw36376 +Ref: arrows37524 +Node: fill42749 +Ref: gradient shading43793 +Node: clip47986 +Node: label48578 +Ref: Label49277 +Node: Programming55021 +Ref: array iteration55838 +Node: Data types56920 +Ref: format65817 +Node: Paths and guides69281 +Ref: circle69535 +Ref: arctime74880 +Ref: extension78745 +Node: Pens85428 +Ref: fillrule92573 +Ref: basealign93470 +Ref: transparency96295 +Ref: makepen99738 +Ref: overwrite100576 +Node: Transforms101786 +Node: Frames and pictures103577 +Ref: envelope104718 +Ref: size105801 +Ref: unitsize106788 +Ref: shipout107848 +Ref: filltype110156 +Ref: add113139 +Ref: add about114085 +Ref: tex117030 +Node: Files117904 +Ref: cd118869 +Ref: scroll123250 +Node: Variable initializers126293 +Node: Structures128588 +Node: Operators136040 +Node: Arithmetic & logical136354 +Node: Self & prefix operators138251 +Node: User-defined operators139039 +Node: Implicit scaling139950 +Node: Functions140513 +Ref: stack overflow143266 +Node: Default arguments143830 +Node: Named arguments144569 +Node: Rest arguments146731 +Node: Mathematical functions149541 +Node: Arrays154146 +Ref: sort161327 +Ref: tridiagonal163618 +Ref: solve164846 +Node: Slices168973 +Node: Casts172867 +Node: Import174833 +Node: Static180063 +Node: LaTeX usage182959 +Node: Base modules188400 +Node: plain190900 +Node: simplex191552 +Node: math191825 +Node: interpolate192924 +Node: geometry193203 +Node: trembling193807 +Node: stats194168 +Node: patterns194428 +Node: markers194664 +Node: tree196447 +Node: binarytree196635 +Node: drawtree197224 +Node: syzygy197428 +Node: feynman197702 +Node: roundedpath197977 +Node: animation198260 +Ref: animate198679 +Node: embed199818 +Node: slide201607 +Node: MetaPost201947 +Node: unicode202663 +Node: latin1203551 +Node: babel203919 +Node: labelpath204148 +Node: labelpath3204968 +Node: annotate205279 +Node: CAD205750 +Node: graph206060 +Ref: ticks212898 +Ref: pathmarkers226046 +Ref: marker226511 +Ref: markuniform226862 +Ref: errorbars228653 +Ref: automatic scaling232709 +Node: palette243352 +Ref: images243470 +Ref: image247641 +Ref: logimage248119 +Ref: penimage248925 +Node: three249369 +Ref: PostScript3D271077 +Node: obj272769 +Node: graph3273021 +Ref: GaussianSurface277982 +Node: grid3279067 +Node: solids279807 +Node: tube280755 +Node: flowchart282986 +Node: contour287485 +Node: contour3292514 +Node: slopefield292821 +Node: ode294258 +Node: Options294518 +Ref: configuration file299680 +Ref: settings299680 +Ref: convert300751 +Node: Interactive mode303510 +Ref: history305134 +Node: GUI306439 +Node: GUI Installation306942 +Node: GUI Usage308416 +Node: PostScript to Asymptote309319 +Node: Help310462 +Node: Debugger312191 +Node: Credits313976 +Node: Index314889 End Tag Table diff --git a/Build/source/utils/asymptote/examples/label3.asy b/Build/source/utils/asymptote/examples/label3.asy index 5c966b0d9a5..e3abafc56b0 100644 --- a/Build/source/utils/asymptote/examples/label3.asy +++ b/Build/source/utils/asymptote/examples/label3.asy @@ -1,7 +1,8 @@ import three; currentprojection=perspective(1,1,1,up=Y); +currentlight=Headlamp; -label("$\displaystyle\int_{-\infty}^{+\infty} e^{-\alpha x^2}\,dx= +label(scale(4)*"$\displaystyle\int_{-\infty}^{+\infty} e^{-\alpha x^2}\,dx= \sqrt{\frac{\pi}{\alpha}}$",O,blue); diff --git a/Build/source/utils/asymptote/examples/label3ribbon.asy b/Build/source/utils/asymptote/examples/label3ribbon.asy index d974b2fb748..6ad52804ce8 100644 --- a/Build/source/utils/asymptote/examples/label3ribbon.asy +++ b/Build/source/utils/asymptote/examples/label3ribbon.asy @@ -1,6 +1,7 @@ import three; currentprojection=perspective(100,100,200,up=Y); +currentlight=Headlamp; -draw(extrude(texpath("$\displaystyle\int_{-\infty}^{+\infty}e^{-\alpha x^2}\,dx= -\sqrt{\frac{\pi}{\alpha}}$"),2Z),blue); +draw(scale3(4)*extrude(texpath("$\displaystyle\int_{-\infty}^{+\infty} +e^{-\alpha x^2}\,dx=\sqrt{\frac{\pi}{\alpha}}$"),2Z),blue); diff --git a/Build/source/utils/asymptote/examples/label3solid.asy b/Build/source/utils/asymptote/examples/label3solid.asy index 5eb955ff482..13c91917f5a 100644 --- a/Build/source/utils/asymptote/examples/label3solid.asy +++ b/Build/source/utils/asymptote/examples/label3solid.asy @@ -1,6 +1,7 @@ import three; currentprojection=perspective(100,100,200,up=Y); +currentlight=Headlamp; -draw(extrude("$\displaystyle\int_{-\infty}^{+\infty}e^{-\alpha x^2}\,dx= -\sqrt{\frac{\pi}{\alpha}}$",2Z),blue); +draw(scale3(4)*extrude("$\displaystyle\int_{-\infty}^{+\infty} +e^{-\alpha x^2}\,dx=\sqrt{\frac{\pi}{\alpha}}$",2Z),blue); diff --git a/Build/source/utils/asymptote/examples/soccerball.asy b/Build/source/utils/asymptote/examples/soccerball.asy index 46f626bc6b9..4b93a492947 100644 --- a/Build/source/utils/asymptote/examples/soccerball.asy +++ b/Build/source/utils/asymptote/examples/soccerball.asy @@ -1,9 +1,7 @@ import graph3; size(400); -currentlight.background=palegreen+opacity(0.2); +currentlight.background=palegreen; -linegranularity=1; - real c=(1+sqrt(5))/2; triple[] z={(c,1,0),(-c,1,0),(-c,-1,0),(c,-1,0)}; diff --git a/Build/source/utils/asymptote/glrender.cc b/Build/source/utils/asymptote/glrender.cc index 5979aa708ba..8dec9d0405c 100644 --- a/Build/source/utils/asymptote/glrender.cc +++ b/Build/source/utils/asymptote/glrender.cc @@ -48,6 +48,7 @@ using camp::transform; using camp::pair; using camp::triple; using vm::array; +using vm::read; using camp::bbox3; using settings::getSetting; using settings::Setting; @@ -111,7 +112,8 @@ bool queueExport=false; bool antialias; int x0,y0; -int mod; +string Action; +int MenuButton=0; double lastangle; @@ -133,29 +135,23 @@ pthread_t mainthread; pthread_cond_t initSignal=PTHREAD_COND_INITIALIZER; pthread_mutex_t initLock=PTHREAD_MUTEX_INITIALIZER; -pthread_cond_t quitSignal=PTHREAD_COND_INITIALIZER; -pthread_mutex_t quitLock=PTHREAD_MUTEX_INITIALIZER; - pthread_cond_t readySignal=PTHREAD_COND_INITIALIZER; pthread_mutex_t readyLock=PTHREAD_MUTEX_INITIALIZER; -#endif -inline void lock() +void endwait(pthread_cond_t& signal, pthread_mutex_t& lock) { -#ifdef HAVE_LIBPTHREAD - if(glthread) - pthread_mutex_lock(&readyLock); -#endif + pthread_mutex_lock(&lock); + pthread_cond_signal(&signal); + pthread_mutex_unlock(&lock); } - -inline void unlock() +void wait(pthread_cond_t& signal, pthread_mutex_t& lock) { -#ifdef HAVE_LIBPTHREAD - if(glthread) - pthread_mutex_unlock(&readyLock); -#endif - + pthread_mutex_lock(&lock); + pthread_cond_signal(&signal); + pthread_cond_wait(&signal,&lock); + pthread_mutex_unlock(&lock); } +#endif template<class T> inline T min(T a, T b) @@ -296,6 +292,14 @@ void update() void drawscene(double Width, double Height) { +#ifdef HAVE_LIBPTHREAD + static bool first=true; + if(glthread && first) { + wait(initSignal,initLock); + endwait(initSignal,initLock); + first=false; + } +#endif glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); if(!ViewportLighting) @@ -362,7 +366,7 @@ void Export() ++count; } while (trEndTile(tr)); if(settings::verbose > 1) - cout << count << " tile" << (count > 1 ? "s" : "") << " drawn" << endl; + cout << count << " tile" << (count != 1 ? "s" : "") << " drawn" << endl; trDelete(tr); picture pic; @@ -384,17 +388,13 @@ void Export() outOfMemory(); } setProjection(); -} -void LockedExport() -{ - if(interact::interactive) - lock(); - Export(); - if(interact::interactive) - unlock(); +#ifdef HAVE_LIBPTHREAD + if(glthread) + endwait(readySignal,readyLock); +#endif } - + void windowposition(int& x, int& y, int width=Width, int height=Height) { pair z=getSetting<pair>("position"); @@ -486,13 +486,13 @@ void updateHandler(int) { initlighting(); update(); - if(interact::interactive) { - glutShowWindow(); - glutShowWindow(); // Call twice to work around apparent freeglut bug. - } else if(glthread) fitscreen(); + glutShowWindow(); + glutShowWindow(); // Call twice to work around apparent freeglut bug. + if(glthread && !interact::interactive) + fitscreen(); } -void autoExport() +void exportHandler(int) { if(!Iconify) glutShowWindow(); @@ -501,16 +501,6 @@ void autoExport() glutHideWindow(); } -void exportHandler(int) -{ -#ifdef HAVE_LIBPTHREAD - if(glthread) - wait(readySignal,readyLock); -#endif - initlighting(); - autoExport(); -} - void reshape(int width, int height) { if(glthread) { @@ -519,7 +509,6 @@ void reshape(int width, int height) initialize=false; signal(SIGUSR1,updateHandler); signal(SIGUSR2,exportHandler); - unlock(); } } @@ -529,38 +518,14 @@ void reshape(int width, int height) reshape0(width,height); } -#ifdef HAVE_LIBPTHREAD -void endwait(pthread_cond_t& signal, pthread_mutex_t& lock) -{ - pthread_cond_signal(&signal); -} -void wait(pthread_cond_t& signal, pthread_mutex_t& lock) -{ - pthread_mutex_lock(&lock); - pthread_cond_signal(&signal); - pthread_cond_wait(&signal,&lock); - endwait(signal,lock); - pthread_mutex_unlock(&lock); -} - -#endif - void quit() { if(glthread) { - if(interact::interactive) { - glutHideWindow(); - } else { - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - glutSwapBuffers(); - } + glutHideWindow(); #ifdef HAVE_LIBPTHREAD - if(!interact::interactive) { - pthread_mutex_lock(&quitLock); - pthread_cond_signal(&quitSignal); - pthread_mutex_unlock(&quitLock); - } -#endif + if(!interact::interactive) + endwait(readySignal,readyLock); +#endif } else { glutDestroyWindow(window); exit(0); @@ -569,16 +534,12 @@ void quit() void display() { - if(interact::interactive) - lock(); drawscene(Width,Height); glutSwapBuffers(); if(queueExport) { Export(); queueExport=false; } - if(interact::interactive) - unlock(); if(!glthread) { if(Oldpid != 0 && waitpid(Oldpid,NULL,WNOHANG) != Oldpid) { kill(Oldpid,SIGHUP); @@ -608,7 +569,8 @@ void capzoom() void disableMenu() { - glutDetachMenu(GLUT_RIGHT_BUTTON); + if(MenuButton) + glutDetachMenu(MenuButton); Menu=false; } @@ -658,8 +620,8 @@ void rotate(int x, int y) } Motion=true; arcball.mouse_motion(x,Height-y,0, - mod == GLUT_ACTIVE_SHIFT, // X rotation only - mod == GLUT_ACTIVE_CTRL); // Y rotation only + Action == "rotateX", // X rotation only + Action == "rotateY"); // Y rotation only for(int i=0; i < 4; ++i) { const vec4& roti=arcball.rot[i]; @@ -738,31 +700,81 @@ void rotateZ(int x, int y) #define GLUT_WHEEL_DOWN 4 #endif -// Mouse bindings. -// LEFT: rotate -// SHIFT LEFT: zoom -// CTRL LEFT: shift -// MIDDLE: menu -// RIGHT: zoom -// SHIFT RIGHT: rotateX -// CTRL RIGHT: rotateY -// ALT RIGHT: rotateZ +string action(int button, int mod) +{ + size_t Button; + size_t nButtons=5; + switch(button) { + case GLUT_LEFT_BUTTON: + Button=0; + break; + case GLUT_MIDDLE_BUTTON: + Button=1; + break; + case GLUT_RIGHT_BUTTON: + Button=2; + break; + case GLUT_WHEEL_UP: + Button=3; + break; + case GLUT_WHEEL_DOWN: + Button=4; + break; + default: + Button=nButtons; + } + + size_t Mod; + size_t nMods=4; + switch(mod) { + case 0: + Mod=0; + break; + case GLUT_ACTIVE_SHIFT: + Mod=1; + break; + case GLUT_ACTIVE_CTRL: + Mod=2; + break; + case GLUT_ACTIVE_ALT: + Mod=3; + break; + default: + Mod=nMods; + } + + if(Button >= 0 && Button < nButtons) { + array *left=getSetting<array *>("leftbutton"); + array *middle=getSetting<array *>("middlebutton"); + array *right=getSetting<array *>("rightbutton"); + array *wheelup=getSetting<array *>("wheelup"); + array *wheeldown=getSetting<array *>("wheeldown"); + array *Buttons[]={left,middle,right,wheelup,wheeldown}; + array *a=Buttons[button]; + size_t size=checkArray(a); + if(Mod >= 0 && Mod < (Int) size) + return read<string>(a,Mod); + } + return ""; +} + void mouse(int button, int state, int x, int y) { - if(button == GLUT_WHEEL_UP) { + string Action=action(button,glutGetModifiers()); + + if(Action == "zoomin") { mousewheel(0,1,x,y); return; } - if(button == GLUT_WHEEL_DOWN) { + if(Action == "zoomout") { mousewheel(0,-1,x,y); return; } - mod=glutGetModifiers(); - - if(button == GLUT_RIGHT_BUTTON) { + if(Action == "zoom/menu") { if(state == GLUT_UP && !Motion) { - glutAttachMenu(GLUT_RIGHT_BUTTON); + MenuButton=button; + glutAttachMenu(button); Menu=true; return; } @@ -772,24 +784,19 @@ void mouse(int button, int state, int x, int y) else Motion=false; if(state == GLUT_DOWN) { - if(button == GLUT_LEFT_BUTTON && mod == GLUT_ACTIVE_CTRL) { + if(Action == "rotate" || Action == "rotateX" || Action == "rotateY") { + arcball.mouse_down(x,Height-y); + glutMotionFunc(rotate); + } else if(Action == "shift") { x0=x; y0=y; glutMotionFunc(move); - return; - } - if((button == GLUT_LEFT_BUTTON && mod == GLUT_ACTIVE_SHIFT) || - (button == GLUT_RIGHT_BUTTON && mod == 0)) { + } else if(Action == "zoom" || Action == "zoom/menu") { y0=y; glutMotionFunc(zoom); - return; - } - if(button == GLUT_RIGHT_BUTTON && mod == GLUT_ACTIVE_ALT) { + } else if(Action == "rotateZ") { lastangle=Degrees(x,y); glutMotionFunc(rotateZ); - return; } - arcball.mouse_down(x,Height-y); - glutMotionFunc(rotate); } else arcball.mouse_up(); } @@ -856,12 +863,12 @@ void mode() case 1: for(size_t i=0; i < Nlights; ++i) glDisable(GL_LIGHT0+i); - gluNurbsProperty(nurb,GLU_DISPLAY_MODE,GLU_OUTLINE_POLYGON); glPolygonMode(GL_FRONT_AND_BACK,GL_LINE); + gluNurbsProperty(nurb,GLU_DISPLAY_MODE,GLU_OUTLINE_PATCH); ++Mode; break; case 2: - gluNurbsProperty(nurb,GLU_DISPLAY_MODE,GLU_OUTLINE_PATCH); + gluNurbsProperty(nurb,GLU_DISPLAY_MODE,GLU_OUTLINE_POLYGON); Mode=0; break; } @@ -974,7 +981,7 @@ void keyboard(unsigned char key, int x, int y) mode(); break; case 'e': - LockedExport(); + Export(); break; case 'c': camera(); @@ -989,7 +996,7 @@ void keyboard(unsigned char key, int x, int y) break; case 17: // Ctrl-q case 'q': - if(!Format.empty()) LockedExport(); + if(!Format.empty()) Export(); quit(); break; } @@ -1077,8 +1084,6 @@ void glrender(const string& prefix, const picture *pic, const string& format, static bool initializedView=false; - if(view || initializedView) lock(); - Prefix=prefix; Picture=pic; Format=format; @@ -1093,13 +1098,6 @@ void glrender(const string& prefix, const picture *pic, const string& format, View=view; Oldpid=oldpid; - static bool initialized=false; - - if(!initialized) { - init(); - Fitscreen=1; - } - Xmin=m.getx(); Xmax=M.getx(); Ymin=m.gety(); @@ -1113,6 +1111,15 @@ void glrender(const string& prefix, const picture *pic, const string& format, ignorezoom=false; Mode=0; + static bool initialize=true; + + if(initialize) { + initialize=false; + init(); + Fitscreen=1; + } + + static bool initialized=false; if(!initialized || !interact::interactive) { antialias=getSetting<Int>("antialias") > 1; double expand=getSetting<double>("render"); @@ -1163,12 +1170,9 @@ void glrender(const string& prefix, const picture *pic, const string& format, } #ifdef HAVE_LIBPTHREAD - if(initializedView && glthread) { - if(View) - pthread_kill(mainthread,SIGUSR1); - else - pthread_kill(mainthread,SIGUSR2); - unlock(); + if(glthread && initializedView) { + if(!View) queueExport=true; + pthread_kill(mainthread,SIGUSR1); return; } #endif @@ -1177,6 +1181,10 @@ void glrender(const string& prefix, const picture *pic, const string& format, bool havewindow=initialized && glthread; + int buttons[]={GLUT_LEFT_BUTTON,GLUT_MIDDLE_BUTTON,GLUT_RIGHT_BUTTON}; + string buttonnames[]={"left","middle","right"}; + size_t nbuttons=sizeof(buttons)/sizeof(int); + if(View) { int x,y; if(havewindow) @@ -1200,8 +1208,13 @@ void glrender(const string& prefix, const picture *pic, const string& format, glutSetOption(GLUT_MULTISAMPLE,multisample); #endif #endif - string title=string(settings::PROGRAM)+": "+prefix+ - " [Double click right button for menu]"; + string title=string(settings::PROGRAM)+": "+prefix; + for(size_t i=0; i < nbuttons; ++i) { + int button=buttons[i]; + if(action(button,0) == "zoom/menu") + title += " [Double click "+buttonnames[i]+" button for menu]"; + } + window=glutCreateWindow(title.c_str()); GLint samplebuf[1]; glGetIntegerv(GL_SAMPLES,samplebuf); @@ -1269,7 +1282,6 @@ void glrender(const string& prefix, const picture *pic, const string& format, mode(); initlighting(); - if(View) { initializedView=true; glutReshapeFunc(reshape); @@ -1289,16 +1301,16 @@ void glrender(const string& prefix, const picture *pic, const string& format, glutAddMenuEntry("(c) Camera",CAMERA); glutAddMenuEntry("(q) Quit" ,QUIT); - glutAttachMenu(GLUT_MIDDLE_BUTTON); - + for(size_t i=0; i < nbuttons; ++i) { + int button=buttons[i]; + if(action(button,0) == "menu") + glutAttachMenu(button); + } + glutMainLoop(); } else { - if(glthread) { - exportHandler(0); - } else { - autoExport(); - quit(); - } + exportHandler(0); + if(!glthread) quit(); } } diff --git a/Build/source/utils/asymptote/glrender.h b/Build/source/utils/asymptote/glrender.h index e1e6541bc0b..4bb58c847a6 100644 --- a/Build/source/utils/asymptote/glrender.h +++ b/Build/source/utils/asymptote/glrender.h @@ -7,6 +7,7 @@ #define GLRENDER_H #include "common.h" +#include "triple.h" #ifdef HAVE_LIBGL diff --git a/Build/source/utils/asymptote/main.cc b/Build/source/utils/asymptote/main.cc index f5ea21128e5..ad8e6292e0c 100644 --- a/Build/source/utils/asymptote/main.cc +++ b/Build/source/utils/asymptote/main.cc @@ -178,9 +178,6 @@ int main(int argc, char *argv[]) if(pthread_create(&thread,NULL,asymain,&args) == 0) { gl::mainthread=pthread_self(); while(true) { - gl::endwait(gl::readySignal,gl::readyLock); - gl::endwait(gl::quitSignal,gl::quitLock); - gl::wait(gl::initSignal,gl::initLock); camp::glrenderWrapper(); gl::initialize=true; } diff --git a/Build/source/utils/asymptote/patches/README b/Build/source/utils/asymptote/patches/README index 6197ca84f0a..706209146fb 100644 --- a/Build/source/utils/asymptote/patches/README +++ b/Build/source/utils/asymptote/patches/README @@ -17,18 +17,13 @@ out-of-memory errors. A patch to provide full functionality in the Asymptote backend to pstoedit (http://pstoedit.net) is provided in the file pstoedit-3.45asy.patch. -The file TkAlpha-Imaging-1.1.6.patch is a revised patch that fixes -transparency support in PIL for xasy (this supercedes an obsolete patch -of the same name included in Asymptote 1.36, which resulted in very slow -rendering). Application of this patch is strongly recommended. +The file freeglut-cygwin.patch allows version 2.6.0-rc1 of freeglut.dll +to be built under CYGWIN. The file movie15_dvipdfmx.patch brings the xelatex/dvipdfmx-enhanced version of movie15.sty available at http://cvs.ktug.or.kr/viewcvs/dvipdfmx/contrib/latex/movie15.sty.sample?revision=1.1 -up-to-date with the latest official 2008/10/08 version. For convenience the +up-to-date with the official 2008/10/08 version. For convenience the patched version is also included as movie15_dvipdfmx.sty; it should be renamed to movie15.sty and installed in the local latex directory. -The file movie15_20090323.patch works around a problem with 3Dgetview that -shows up under Windows XP in the 2009/03/23 version of movie15.sty. - diff --git a/Build/source/utils/asymptote/patches/freeglut-cygwin.patch b/Build/source/utils/asymptote/patches/freeglut-cygwin.patch new file mode 100644 index 00000000000..d6f5629fdd9 --- /dev/null +++ b/Build/source/utils/asymptote/patches/freeglut-cygwin.patch @@ -0,0 +1,12 @@ +diff -ru freeglut-2.6.0/configure freeglut-2.6.0J/configure +--- freeglut-2.6.0/configure 2009-04-20 20:53:07.000000000 -0700 ++++ freeglut-2.6.0J/configure 2009-06-22 06:49:17.640625000 -0700 +@@ -21289,7 +21289,7 @@ + LIBXXF86VM= + LIBXI= + VERSION_INFO= +- EXPORT_FLAGS="-DFREEGLUT_EXPORTS" ++ EXPORT_FLAGS="-DFREEGLUT_EXPORTS -D_WIN32" + else + GL_LIBS="-lGL -lXext -lX11" + { echo "$as_me:$LINENO: checking for XF86VidModeSwitchToMode in -lXxf86vm" >&5 diff --git a/Build/source/utils/asymptote/pen.h b/Build/source/utils/asymptote/pen.h index 164698b8b68..019349ab2b6 100644 --- a/Build/source/utils/asymptote/pen.h +++ b/Build/source/utils/asymptote/pen.h @@ -200,7 +200,7 @@ public: r(0), g(0), b(0), grey(0), pattern(DEFPAT), fillrule(DEFFILL), baseline(DEFBASE), transparency(DEFTRANSP), - linecap(DEFCAP), linejoin(DEFJOIN), + linecap(DEFCAP), linejoin(DEFJOIN), miterlimit(DEFMITER), overwrite(DEFWRITE), t(nullTransform) {} pen(setlinewidth_t, double linewidth) : @@ -299,8 +299,8 @@ public: r(0), g(0), b(0), grey(0), pattern(DEFPAT), fillrule(DEFFILL), baseline(DEFBASE), transparency(DEFTRANSP), - linecap(DEFCAP), linejoin(linejoin), overwrite(DEFWRITE), - t(nullTransform) {} + linecap(DEFCAP), linejoin(linejoin), miterlimit(DEFMITER), + overwrite(DEFWRITE), t(nullTransform) {} pen(setmiterlimit_t, double miterlimit) : line(DEFLINE), linewidth(DEFWIDTH), P(nullpath), diff --git a/Build/source/utils/asymptote/picture.cc b/Build/source/utils/asymptote/picture.cc index eeaf6760a71..03dda82bdac 100644 --- a/Build/source/utils/asymptote/picture.cc +++ b/Build/source/utils/asymptote/picture.cc @@ -573,15 +573,15 @@ bool picture::shipout(picture *preamble, const string& Prefix, paperWidth=getSetting<double>("paperwidth"); paperHeight=getSetting<double>("paperheight"); - Int origin=getSetting<Int>("align"); + string origin=getSetting<string>("align"); - pair bboxshift=(origin == ZERO && !pdfformat) ? + pair bboxshift=(origin == "Z" && !pdfformat) ? pair(0.0,0.0) : pair(-b.left,-b.bottom); if(!pdfformat) { bboxshift += getSetting<pair>("offset"); - if(origin != ZERO && origin != BOTTOM) { + if(origin != "Z" && origin != "B") { double yexcess=max(paperHeight-(b.top-b.bottom+1.0),0.0); - if(origin == TOP) bboxshift += pair(0.0,yexcess); + if(origin == "T") bboxshift += pair(0.0,yexcess); else { double xexcess=max(paperWidth-(b.right-b.left+1.0),0.0); bboxshift += pair(0.5*xexcess,0.5*yexcess); @@ -754,14 +754,16 @@ Communicate com; void glrenderWrapper() { #ifdef HAVE_LIBGL +#ifdef HAVE_LIBPTHREAD + wait(initSignal,initLock); + endwait(initSignal,initLock); +#endif glrender(com.prefix,com.pic,com.format,com.width,com.height,com.angle, com.m,com.M,com.t,com.background,com.nlights,com.lights,com.diffuse, com.ambient,com.specular,com.viewportlighting,com.view); #endif } -extern bool glinitialize; - bool picture::shipout3(const string& prefix, const string& format, double width, double height, double angle, const triple& m, const triple& M, @@ -781,6 +783,7 @@ bool picture::shipout3(const string& prefix, const string& format, getSetting<string>("outformat") : format; bool View=settings::view() && view; static int oldpid=0; + bool Wait=!interact::interactive || !View; if(glthread) { #ifdef HAVE_LIBPTHREAD @@ -803,16 +806,28 @@ bool picture::shipout3(const string& prefix, const string& format, com.specular=specular; com.viewportlighting=viewportlighting; com.view=View; - wait(initSignal,initLock); #ifdef HAVE_LIBPTHREAD - if(!View) - wait(readySignal,readyLock); - - if(!interact::interactive || !View) - wait(quitSignal,quitLock); + if(Wait) + pthread_mutex_lock(&readyLock); + wait(initSignal,initLock); + endwait(initSignal,initLock); + static bool initialize=true; + if(initialize) { + wait(initSignal,initLock); + endwait(initSignal,initLock); + initialize=false; + } + if(Wait) { + pthread_cond_wait(&readySignal,&readyLock); + pthread_mutex_unlock(&readyLock); + } #endif return true; } +#ifdef HAVE_LIBPTHREAD + if(Wait) + pthread_mutex_lock(&readyLock); +#endif #endif } else { int pid=fork(); @@ -825,22 +840,13 @@ bool picture::shipout3(const string& prefix, const string& format, } } -#ifdef HAVE_LIBPTHREAD - if(glthread && !interact::interactive) - pthread_mutex_lock(&quitLock); -#endif - glrender(prefix,this,outputformat,width,height,angle,m,M,t,background, + glrender(prefix,this,outputformat,width,height,angle,m,M,t,background, nlights,lights,diffuse,ambient,specular,viewportlighting,View, oldpid); #ifdef HAVE_LIBPTHREAD - if(glthread) { - if(!View) - wait(readySignal,readyLock); - - if(!interact::interactive) { - pthread_cond_wait(&quitSignal,&quitLock); - pthread_mutex_unlock(&quitLock); - } + if(glthread && Wait) { + pthread_cond_wait(&readySignal,&readyLock); + pthread_mutex_unlock(&readyLock); } return true; #endif diff --git a/Build/source/utils/asymptote/settings.cc b/Build/source/utils/asymptote/settings.cc index 06d73d829c6..9f478da8f25 100644 --- a/Build/source/utils/asymptote/settings.cc +++ b/Build/source/utils/asymptote/settings.cc @@ -33,6 +33,7 @@ #include "item.h" #include "refaccess.h" #include "pipestream.h" +#include "array.h" #ifdef HAVE_LIBCURSES extern "C" { @@ -60,6 +61,7 @@ using vm::item; using trans::itemRefAccess; using trans::refAccess; using trans::varEntry; +using vm::array; void doConfig(string filename); @@ -585,29 +587,29 @@ struct pairSetting : public dataSetting<pair> { struct alignSetting : public argumentSetting { alignSetting(string name, char code, string argname, string desc, - Int defaultValue=(Int) CENTER) - : argumentSetting(name, code, argname, desc, - types::primInt(), (item)defaultValue) {} + string defaultValue) + : argumentSetting(name, code, argname, description(desc,defaultValue), + types::primString(), (item)defaultValue) {} bool getOption() { string str=optarg; - if (str == "C") - value=(Int) CENTER; - else if (str == "T") - value=(Int) TOP; - else if (str == "B") - value=(Int) BOTTOM; - else if (str == "Z") { - value=(Int) ZERO; - } else { - error("invalid argument for option"); - return false; + if(str == "C" || str == "T" || str == "B" || str == "Z") { + value=str; + return true; } - return true; + error("invalid argument for option"); + return false; } }; -// For setting the alignment of a figure on the page. +struct ButtonSetting : public itemSetting { + ButtonSetting(string name, array *defaultValue) + : itemSetting(name, 0, "", "", + types::stringArray(), (item) defaultValue) {} + + bool getOption() {return true;} +}; + struct engineSetting : public argumentSetting { engineSetting(string name, char code, string argname, string desc, @@ -943,6 +945,49 @@ void initSettings() { settingsModule=new types::dummyRecord(symbol::trans("settings")); +// Default mouse bindings + +// LEFT: rotate +// SHIFT LEFT: zoom +// CTRL LEFT: shift + + array *leftbutton=new array(3); + (*leftbutton)[0]=string("rotate"); + (*leftbutton)[1]=string("zoom"); + (*leftbutton)[2]=string("shift"); + +// MIDDLE: menu + + array *middlebutton=new array(1); + (*middlebutton)[0]=string("menu"); + +// RIGHT: zoom +// SHIFT RIGHT: rotateX +// CTRL RIGHT: rotateY +// ALT RIGHT: rotateZ + + array *rightbutton=new array(4); + (*rightbutton)[0]=string("zoom/menu"); + (*rightbutton)[1]=string("rotateX"); + (*rightbutton)[2]=string("rotateY"); + (*rightbutton)[3]=string("rotateZ"); + +// WHEEL_UP: zoomin + + array *wheelup=new array(1); + (*wheelup)[0]=string("zoomin"); + +// WHEEL_DOWN: zoomout + + array *wheeldown=new array(1); + (*wheeldown)[0]=string("zoomout"); + + addOption(new ButtonSetting("leftbutton", leftbutton)); + addOption(new ButtonSetting("middlebutton", middlebutton)); + addOption(new ButtonSetting("rightbutton", rightbutton)); + addOption(new ButtonSetting("wheelup", wheelup)); + addOption(new ButtonSetting("wheeldown", wheeldown)); + multiOption *view=new multiOption("View", 'V', "View output"); view->add(new boolSetting("batchView", 0, "View output in batch mode", msdos)); @@ -995,7 +1040,8 @@ void initSettings() { addOption(new pairSetting("offset", 'O', "pair", "PostScript offset")); addOption(new alignSetting("align", 'a', "C|B|T|Z", - "Center, Bottom, Top, or Zero page alignment [Center]")); + "Center, Bottom, Top, or Zero page alignment", + "C")); addOption(new boolSetting("debug", 'd', "Enable debugging messages")); addOption(new incrementSetting("verbose", 'v', diff --git a/Build/source/utils/asymptote/settings.h b/Build/source/utils/asymptote/settings.h index e7b3a6301ce..d4a045ffa12 100644 --- a/Build/source/utils/asymptote/settings.h +++ b/Build/source/utils/asymptote/settings.h @@ -27,13 +27,11 @@ extern bool glthread; extern bool initialize; #ifdef HAVE_LIBPTHREAD +extern pthread_t mainthread; extern pthread_cond_t initSignal; extern pthread_mutex_t initLock; extern pthread_cond_t readySignal; extern pthread_mutex_t readyLock; -extern pthread_cond_t quitSignal; -extern pthread_mutex_t quitLock; -extern pthread_t mainthread; void wait(pthread_cond_t& signal, pthread_mutex_t& lock); void endwait(pthread_cond_t& signal, pthread_mutex_t& lock); #endif @@ -54,8 +52,6 @@ extern bool safe; bool globalwrite(); -enum origin {CENTER,BOTTOM,TOP,ZERO}; - extern const string suffix; extern const string guisuffix; diff --git a/Build/source/utils/asymptote/texfile.cc b/Build/source/utils/asymptote/texfile.cc index eb6a2c33c57..b1cf4bfcd77 100644 --- a/Build/source/utils/asymptote/texfile.cc +++ b/Build/source/utils/asymptote/texfile.cc @@ -44,6 +44,8 @@ void texfile::miniprologue() texpreamble(*out,processData().TeXpreamble,false,true); if(settings::latex(texengine)) { *out << "\\pagestyle{empty}" << newl + << "\\textheight=2048pt" << newl + << "\\textwidth=2048pt" << newl << "\\begin{document}" << newl; } else if(settings::context(texengine)) { *out << "\\setuppagenumbering[location=]" << newl |