diff options
45 files changed, 1948 insertions, 1844 deletions
diff --git a/Build/source/utils/README b/Build/source/utils/README index 47ef286d7d0..faaaf357f92 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.81 - checked 15jul09 +asymptote 1.82 - checked 21jul09 update to TL from CTAN, to include prebuilt doc. see http://tug.org/texlive/build.html#asymptote diff --git a/Build/source/utils/asymptote/ChangeLog b/Build/source/utils/asymptote/ChangeLog index 10877e88b7a..099840b402f 100644 --- a/Build/source/utils/asymptote/ChangeLog +++ b/Build/source/utils/asymptote/ChangeLog @@ -1,4 +1,72 @@ ------------------------------------------------------------------------ +r4528 | jcbowman | 2009-07-19 22:57:37 -0600 (Sun, 19 Jul 2009) | 2 lines +Changed paths: + M /trunk/asymptote/base/labelpath3.asy + M /trunk/asymptote/base/three.asy + M /trunk/asymptote/base/three_arrows.asy + M /trunk/asymptote/base/tube.asy + M /trunk/asymptote/doc/asymptote.texi + +Use a consistent approximation for drawing tube centers. + +------------------------------------------------------------------------ +r4527 | jcbowman | 2009-07-19 21:35:45 -0600 (Sun, 19 Jul 2009) | 2 lines +Changed paths: + M /trunk/asymptote/glrender.cc + M /trunk/asymptote/main.cc + M /trunk/asymptote/picture.cc + +Fix threaded exports. + +------------------------------------------------------------------------ +r4526 | jcbowman | 2009-07-18 15:26:12 -0600 (Sat, 18 Jul 2009) | 2 lines +Changed paths: + M /trunk/asymptote/examples/animations/inlinemovie3.tex + M /trunk/asymptote/pen.h + M /trunk/asymptote/prcfile.h + +Respect -gray and -bw in PRC output. + +------------------------------------------------------------------------ +r4525 | jcbowman | 2009-07-17 23:35:20 -0600 (Fri, 17 Jul 2009) | 2 lines +Changed paths: + M /trunk/asymptote/base/three.asy + +Add default argument to transform3(projection). + +------------------------------------------------------------------------ +r4524 | jcbowman | 2009-07-17 22:19:35 -0600 (Fri, 17 Jul 2009) | 2 lines +Changed paths: + M /trunk/asymptote/doc/latexusage.tex + M /trunk/asymptote/examples/lever.asy + M /trunk/asymptote/examples/logo3.asy + M /trunk/asymptote/examples/polarcircle.asy + M /trunk/asymptote/runtime.in + +Fix texpath fontsize with PDF tex engines. + +------------------------------------------------------------------------ +r4523 | jcbowman | 2009-07-17 19:55:57 -0600 (Fri, 17 Jul 2009) | 2 lines +Changed paths: + M /trunk/asymptote/doc/datagraph.asy + M /trunk/asymptote/doc/diatom.asy + M /trunk/asymptote/doc/logo.asy + M /trunk/asymptote/doc/multicontour.asy + M /trunk/asymptote/doc/westnile.asy + M /trunk/asymptote/examples/mosquito.asy + M /trunk/asymptote/examples/polararea.asy + M /trunk/asymptote/examples/poster.asy + M /trunk/asymptote/examples/slidedemo.asy + +Add missing pt units. + +------------------------------------------------------------------------ +r4522 | jcbowman | 2009-07-14 00:22:41 -0600 (Tue, 14 Jul 2009) | 1 line +Changed paths: + M /trunk/asymptote/configure.ac + +Increment version to 1.82svn. +------------------------------------------------------------------------ r4521 | jcbowman | 2009-07-13 22:36:37 -0600 (Mon, 13 Jul 2009) | 2 lines Changed paths: M /trunk/asymptote/base/three.asy diff --git a/Build/source/utils/asymptote/ReleaseNotes b/Build/source/utils/asymptote/ReleaseNotes index d1c06f5ce61..f419b077754 100644 --- a/Build/source/utils/asymptote/ReleaseNotes +++ b/Build/source/utils/asymptote/ReleaseNotes @@ -1,3 +1,11 @@ +Release Notes for Version 1.82 + +Threaded exports were fixed. The texpath fontsize was fixed for PDF tex engines. +A default currentprojection argument was added to transform3(projection). +The -gray and -bw settings are now respected in PRC output. +A consistent approximation is now used for drawing tube centers. +Missing pt units were added to all fontsize examples. + Release Notes for Version 1.81 A boolean targetsize option can now be used to draw 3D labels with the apparent diff --git a/Build/source/utils/asymptote/asymptote.spec b/Build/source/utils/asymptote/asymptote.spec index fc9f449002e..0ecee2e6c08 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.81 +Version: 1.82 Release: 1%{?dist} Summary: Descriptive vector graphics language diff --git a/Build/source/utils/asymptote/base/labelpath3.asy b/Build/source/utils/asymptote/base/labelpath3.asy index b8a946a07ae..bf2e6d4c084 100644 --- a/Build/source/utils/asymptote/base/labelpath3.asy +++ b/Build/source/utils/asymptote/base/labelpath3.asy @@ -21,7 +21,7 @@ triple[] firstframe(path3 p, triple optional=O) } // Modification of the bishop frame construction contained in -// space_tube.asy(from Philippe Ivaldi's modules). +// space_tube.asy (from Philippe Ivaldi's modules). // For noncyclic path3s only triple[] nextframe(path3 p, real reltimestart, triple[] start, real reltimeend, int subdiv=20) diff --git a/Build/source/utils/asymptote/base/three.asy b/Build/source/utils/asymptote/base/three.asy index 2befc77a9c8..39075193073 100644 --- a/Build/source/utils/asymptote/base/three.asy +++ b/Build/source/utils/asymptote/base/three.asy @@ -1745,7 +1745,7 @@ transform3 align(triple u) } // return a rotation that maps X,Y to the projection plane. -transform3 transform3(projection P) +transform3 transform3(projection P=currentprojection) { triple v=unit(P.oblique ? P.camera : P.vector()); triple u=unit(perp(P.up,v)); @@ -2015,7 +2015,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,p.granularity); + tube T=tube(g,width,p.granularity); int L=length(g); if(L >= 0) { if(!cyclic(g)) { @@ -2034,13 +2034,14 @@ draw=new void(frame f, path3 g, material p=currentpen, cap=scale3r*unitcylinder; cap.append(scale3r*shift(Z)*unitdisk); } - s.append(shift(point(g,0))*align(-dir0)*cap); - s.append(shift(point(g,L))*align(dirL)*cap); + T.s.append(shift(point(g,0))*align(-dir0)*cap); + T.s.append(shift(point(g,L))*align(dirL)*cap); } - if(opacity(q) == 1) _draw(f,g,q); + if(opacity(q) == 1) + _draw(f,T.center,q); } - for(int i=0; i < s.s.length; ++i) - draw3D(f,s.s[i],p,light); + for(int i=0; i < T.s.s.length; ++i) + draw3D(f,T.s.s[i],p,light); } else _draw(f,g,q); } else _draw(f,g,q); } diff --git a/Build/source/utils/asymptote/base/three_arrows.asy b/Build/source/utils/asymptote/base/three_arrows.asy index 418065e5e1e..841c4f731f4 100644 --- a/Build/source/utils/asymptote/base/three_arrows.asy +++ b/Build/source/utils/asymptote/base/three_arrows.asy @@ -82,33 +82,41 @@ void render(path3 s, real granularity=tubegranularity, void f(path3, real)) Split(point(s,0),postcontrol(s,0),precontrol(s,1),point(s,1)); } -surface tube(path3 g, real width, real granularity=tubegranularity) +struct tube { - surface tube; - real r=0.5*width; + surface s; + path3 center; - transform3 t=scale3(r); + void operator init(path3 g, real width, real granularity=tubegranularity) { + real r=0.5*width; - int n=length(g); - for(int i=0; i < n; ++i) { - real S=straightness(g,i); - if(S < sqrtEpsilon*r) { - triple v=point(g,i); - 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),granularity,new void(path3 q, real) { - real L=arclength(q); - surface segment=scale(r,r,L)*unitcylinder; - bend(segment,q,L); - tube.s.append(segment.s); - }); - } + transform3 t=scale3(r); - if((cyclic(g) || i > 0) && abs(dir(g,i,1)-dir(g,i,-1)) > sqrtEpsilon) - tube.append(shift(point(g,i))*t*align(dir(g,i,-1))*unithemisphere); + int n=length(g); + for(int i=0; i < n; ++i) { + path3 gi=subpath(g,i,i+1); + real S=straightness(g,i); + if(S < sqrtEpsilon*r) { + triple v=point(g,i); + triple u=point(g,i+1)-v; + s.append(shift(v)*align(unit(u))*scale(r,r,abs(u))*unitcylinder); + center=center&gi; + } else { + render(gi,granularity,new void(path3 q, real) { + real L=arclength(q); + surface segment=scale(r,r,L)*unitcylinder; + bend(segment,q,L); + s.s.append(segment.s); + triple a=L*Z/3; + center=center&bend(O,q,L)..controls bend(a,q,L) and bend(2a,q,L).. + bend(3a,q,L); + }); + } + + if((cyclic(g) || i > 0) && abs(dir(g,i,1)-dir(g,i,-1)) > sqrtEpsilon) + s.append(shift(point(g,i))*t*align(dir(g,i,-1))*unithemisphere); + } } - return tube; } // Refine a noncyclic path3 g so that it approaches its endpoint in @@ -168,7 +176,7 @@ struct arrowhead3 } if(draw) for(path3 g : H) - s.append(tube(g,width)); + s.append(tube(g,width).s); return shift(v)*s; } diff --git a/Build/source/utils/asymptote/base/tube.asy b/Build/source/utils/asymptote/base/tube.asy index f62d3897adf..1f8ef950251 100644 --- a/Build/source/utils/asymptote/base/tube.asy +++ b/Build/source/utils/asymptote/base/tube.asy @@ -15,9 +15,9 @@ path3 roundedpath(path3 A, real r) guide3 rounded; triple before, after, indir, outdir; int len=length(A); - bool guideclosed=cyclic(A); + bool cyclic=cyclic(A); if(len < 2) {return A;}; - if(guideclosed) {rounded=point(point(A,0)--point(A,1),r);} + if(cyclic) {rounded=point(point(A,0)--point(A,1),r);} else {rounded=point(A,0);} for(int i=1; i < len; i=i+1) { before=point(point(A,i)--point(A,i-1),r); @@ -26,7 +26,7 @@ path3 roundedpath(path3 A, real r) outdir=dir(point(A,i)--point(A,i+1),1); rounded=rounded--before{indir}..{outdir}after; } - if(guideclosed) { + if(cyclic) { before=point(point(A,0)--point(A,len-1),r); indir=dir(point(A,len-1)--point(A,0),1); outdir=dir(point(A,0)--point(A,1),1); @@ -205,6 +205,7 @@ surface tube(path3 g, coloredpath section, pair M=max(section.p), m=min(section.p); real[] t=sample(g,max(M.x-m.x,M.y-m.y)/max(realEpsilon,abs(corner)), min(abs(relstep),1)); - t.cyclic(cyclic(g)); - return surface(rmf(g,t),section,T,cyclic(g)); + bool cyclic=cyclic(g); + t.cyclic(cyclic); + return surface(rmf(g,t),section,T,cyclic); } diff --git a/Build/source/utils/asymptote/configure b/Build/source/utils/asymptote/configure index e7946b69355..b2f95697198 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.81. +# Generated by GNU Autoconf 2.63 for Asymptote 1.82. # # 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.81' -PACKAGE_STRING='Asymptote 1.81' +PACKAGE_VERSION='1.82' +PACKAGE_STRING='Asymptote 1.82' 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.81 to adapt to many kinds of systems. +\`configure' configures Asymptote 1.82 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.81:";; + short | recursive ) echo "Configuration of Asymptote 1.82:";; 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.81 +Asymptote configure 1.82 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.81, which was +It was created by Asymptote $as_me 1.82, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ @@ -11496,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.81, which was +This file was extended by Asymptote $as_me 1.82, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -11555,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.81 +Asymptote config.status 1.82 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 c09afa19eb2..fc37dab5cb7 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.81],[http://sourceforge.net/projects/asymptote]) +AC_INIT([Asymptote],[1.82],[http://sourceforge.net/projects/asymptote]) VERSION=$PACKAGE_VERSION AC_SUBST(VERSION) diff --git a/Build/source/utils/asymptote/doc/CAD.pdf b/Build/source/utils/asymptote/doc/CAD.pdf Binary files differindex d8914fb6713..0aa34db1a1f 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 b39627517ff..08d26f6dc61 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 - 13 Jul 2009 + 19 Jul 2009 This is the list of Frequently Asked Questions about Asymptote (asy). diff --git a/Build/source/utils/asymptote/doc/asymptote.pdf b/Build/source/utils/asymptote/doc/asymptote.pdf Binary files differindex 943e5579ca8..845a4f3e2cc 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 0167a7dc2d5..db56898ee9c 100644 --- a/Build/source/utils/asymptote/doc/asymptote.texi +++ b/Build/source/utils/asymptote/doc/asymptote.texi @@ -7482,12 +7482,14 @@ bounded by cyclic paths of length @code{4} or less. @cindex @code{tube} Arbitrary thick three-dimensional curves and line caps (which the @code{OpenGL} standard does not require implementations to provide) are -constructed with the routine +constructed with @verbatim -surface tube(path3 g, real width); +tube tube(path3 g, real width, real granularity=tubegranularity); @end verbatim @noindent -which returns a tube of diameter @code{width} centered on @code{g}. +this returns a tube structure representing a tube of diameter @code{width} +centered approximately on @code{g}. The tube structure consists of a +surface @code{s} and the actual tube center, path3 @code{center}. This can make files slow to render, especially with the @code{Adobe Reader} renderer. The setting @code{thick=false} can be used to disable this feature and force all @@ -8262,9 +8264,9 @@ struct skeleton { @node tube @section @code{tube} @cindex @code{tube} -This package extends the routine @code{tube} defined in @code{three_arrows.asy} -to arbitrary cross sections, colors, and spine transformations. -The routine +This package extends the @code{tube} surfaces constructed in +@code{three_arrows.asy} to arbitrary cross sections, colors, and spine +transformations. The routine @verbatim surface tube(path3 g, coloredpath section, transform T(real)=new transform(real t) {return identity();}, @@ -9281,7 +9283,7 @@ Melenchuk, Martin Wiebusch, and Stefan Knorr. @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: hstretch vstretch roundbox nonconvex miterlimit basealigin cmd @c LocalWords: maxviewport maxtile antialiased sphericalharmonic attachfile @c LocalWords: vertexshading smoothelevation glOptions iconified iconify kate @c LocalWords: psviewerOptions pdfviewerOptions viewportmargin asyattach @@ -9296,5 +9298,5 @@ Melenchuk, Martin Wiebusch, and Stefan Knorr. @c LocalWords: addViews outprefix addAllViews xsplinetype ysplinetype rotateX @c LocalWords: usplinetype vsplinetype leftbutton middlebutton rightbutton @c LocalWords: rotateY rotateZ wheelup zoomin wheeldown zoomout TeXLive -@c LocalWords: viewportshift signedint signedness psview multiplatform -@c LocalWords: singlereal singleint +@c LocalWords: viewportshift signedint signedness psview multiplatform nowarn +@c LocalWords: singlereal singleint writeoverloaded tubegranularity diff --git a/Build/source/utils/asymptote/doc/datagraph.asy b/Build/source/utils/asymptote/doc/datagraph.asy index 299b1594a0f..62cca8ea896 100644 --- a/Build/source/utils/asymptote/doc/datagraph.asy +++ b/Build/source/utils/asymptote/doc/datagraph.asy @@ -9,4 +9,4 @@ draw(graph(x,y),red); xaxis("$x$",BottomTop,LeftTicks); yaxis("$y$",LeftRight, - RightTicks(Label(fontsize(8)),new real[]{0,4,9})); + RightTicks(Label(fontsize(8pt)),new real[]{0,4,9})); diff --git a/Build/source/utils/asymptote/doc/diatom.asy b/Build/source/utils/asymptote/doc/diatom.asy index 905b432c90d..44155c56d89 100644 --- a/Build/source/utils/asymptote/doc/diatom.asy +++ b/Build/source/utils/asymptote/doc/diatom.asy @@ -8,7 +8,7 @@ string data="diatom.csv"; string[] group; int[] begin,end; -defaultpen(fontsize(8)+overwrite(MoveQuiet)); +defaultpen(fontsize(8pt)+overwrite(MoveQuiet)); file in=line(csv(input(data))); diff --git a/Build/source/utils/asymptote/doc/latexusage.tex b/Build/source/utils/asymptote/doc/latexusage.tex index 6cbd1cb2a75..f073f80258f 100644 --- a/Build/source/utils/asymptote/doc/latexusage.tex +++ b/Build/source/utils/asymptote/doc/latexusage.tex @@ -83,7 +83,7 @@ the \verb+{attach=true}+ option: import three; currentprojection=orthographic(5,4,2); draw(unitcube,blue); -label("$V-E+F=2$",(0,1,0.5),3Y,blue+fontsize(17)); +label("$V-E+F=2$",(0,1,0.5),3Y,blue+fontsize(17pt)); \end{asy} \end{center} @@ -100,7 +100,7 @@ dot(z1,red+0.15cm); dot(z2,darkgreen+0.3cm); label("$m$",z1,1.2N,red); label("$M$",z2,1.5N,darkgreen); -label("$\hat{\ }$",zf,0.2*S,fontsize(24)+blue); +label("$\hat{\ }$",zf,0.2*S,fontsize(24pt)+blue); pair s=-0.2*I; draw("$x$",z0+s--z1+s,N,red,Arrows,Bars,PenMargins); diff --git a/Build/source/utils/asymptote/doc/logo.asy b/Build/source/utils/asymptote/doc/logo.asy index 3cd20a573f4..d180558ad34 100644 --- a/Build/source/utils/asymptote/doc/logo.asy +++ b/Build/source/utils/asymptote/doc/logo.asy @@ -3,7 +3,7 @@ size(140,80,IgnoreAspect); picture logo(pair s=0, pen q) { picture pic; - pen p=linewidth(2)+fontsize(24)+q; + pen p=linewidth(2)+fontsize(24pt)+q; real a=-0.4; real b=0.95; real y1=-5; diff --git a/Build/source/utils/asymptote/doc/multicontour.asy b/Build/source/utils/asymptote/doc/multicontour.asy index 5e4ea0c06f6..0e8476de922 100644 --- a/Build/source/utils/asymptote/doc/multicontour.asy +++ b/Build/source/utils/asymptote/doc/multicontour.asy @@ -8,7 +8,7 @@ real[] c=new real[n]; for(int i=0; i < n; ++i) c[i]=(i-n/2)/n; pen[] p=sequence(new pen(int i) { - return (c[i] >= 0 ? solid : dashed)+fontsize(6); + return (c[i] >= 0 ? solid : dashed)+fontsize(6pt); },c.length); Label[] Labels=sequence(new Label(int i) { diff --git a/Build/source/utils/asymptote/doc/png/asymptote.info b/Build/source/utils/asymptote/doc/png/asymptote.info index 7d56fa944e2..91b3a89f369 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 ../asymptote.texi. -This file documents `Asymptote', version 1.81. +This file documents `Asymptote', version 1.82. `http://asymptote.sourceforge.net' @@ -23,7 +23,7 @@ File: asymptote.info, Node: Top, Next: Description, Up: (dir) Asymptote ********* -This file documents `Asymptote', version 1.81. +This file documents `Asymptote', version 1.82. `http://asymptote.sourceforge.net' @@ -4740,7 +4740,7 @@ the \verb+{attach=true}+ option: import three; currentprojection=orthographic(5,4,2); draw(unitcube,blue); -label("$V-E+F=2$",(0,1,0.5),3Y,blue+fontsize(17)); +label("$V-E+F=2$",(0,1,0.5),3Y,blue+fontsize(17pt)); \end{asy} \end{center} @@ -4757,7 +4757,7 @@ dot(z1,red+0.15cm); dot(z2,darkgreen+0.3cm); label("$m$",z1,1.2N,red); label("$M$",z2,1.5N,darkgreen); -label("$\hat{\ }$",zf,0.2*S,fontsize(24)+blue); +label("$\hat{\ }$",zf,0.2*S,fontsize(24pt)+blue); pair s=-0.2*I; draw("$x$",z0+s--z1+s,N,red,Arrows,Bars,PenMargins); @@ -5705,7 +5705,7 @@ following routines: xaxis("$x$",BottomTop,LeftTicks); yaxis("$y$",LeftRight, - RightTicks(Label(fontsize(8)),new real[]{0,4,9})); + RightTicks(Label(fontsize(8pt)),new real[]{0,4,9})); @@ -6555,17 +6555,19 @@ 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. -The setting `thick=false' can be used to disable this feature and force -all lines to be drawn with `linewidth(0)' (one pixel wide, regardless -of the resolution). By default mesh and contour lines in -three-dimensions are always drawn thin, unless an explicit line width -is given in the pen parameter or the setting `thin' is set to `false'. -The pens `thin()' and `thick()' defined in plain_pens.asy can also be -used to override these defaults for specific draw commands. +constructed with +tube tube(path3 g, real width, real granularity=tubegranularity); + this returns a tube structure representing a tube of diameter `width' +centered approximately on `g'. The tube structure consists of a surface +`s' and the actual tube center, path3 `center'. This can make files +slow to render, especially with the `Adobe Reader' renderer. The setting +`thick=false' can be used to disable this feature and force all lines +to be drawn with `linewidth(0)' (one pixel wide, regardless of the +resolution). By default mesh and contour lines in three-dimensions are +always drawn thin, unless an explicit line width is given in the pen +parameter or the setting `thin' is set to `false'. The pens `thin()' +and `thick()' defined in plain_pens.asy can also be used to override +these defaults for specific draw commands. There are four choices for viewing 3D `Asymptote' output: 1. Use the native `Asymptote' adaptive `OpenGL'-based renderer (with @@ -7264,9 +7266,9 @@ File: asymptote.info, Node: tube, Next: flowchart, Prev: solids, Up: Base mo 7.34 `tube' =========== -This package extends the routine `tube' defined in `three_arrows.asy' -to arbitrary cross sections, colors, and spine transformations. The -routine +This package extends the `tube' surfaces constructed in +`three_arrows.asy' to arbitrary cross sections, colors, and spine +transformations. The routine surface tube(path3 g, coloredpath section, transform T(real)=new transform(real t) {return identity();}, real corner=1, real relstep=0); @@ -7490,7 +7492,7 @@ real[] c=new real[n]; for(int i=0; i < n; ++i) c[i]=(i-n/2)/n; pen[] p=sequence(new pen(int i) { - return (c[i] >= 0 ? solid : dashed)+fontsize(6); + return (c[i] >= 0 ? solid : dashed)+fontsize(6pt); },c.length); Label[] Labels=sequence(new Label(int i) { @@ -8261,7 +8263,7 @@ Index * abs <1>: Mathematical functions. (line 35) * abs: Data types. (line 60) -* accel <1>: three. (line 453) +* accel <1>: three. (line 455) * accel: Paths and guides. (line 110) * access: Import. (line 6) * acknowledgments: Credits. (line 6) @@ -8294,21 +8296,21 @@ Index * animation: animation. (line 6) * annotate: annotate. (line 6) * antialias <1>: Options. (line 134) -* antialias: three. (line 196) +* antialias: three. (line 198) * antialiasing: Compiling from UNIX source. (line 16) * append <1>: Arrays. (line 39) * append: Files. (line 36) -* arc: three. (line 262) +* arc: three. (line 264) * Arc: Paths and guides. (line 32) * arc: Paths and guides. (line 22) * ArcArrow: draw. (line 26) -* ArcArrow3: three. (line 496) +* ArcArrow3: three. (line 498) * ArcArrows: draw. (line 26) -* ArcArrows3: three. (line 496) -* arclength <1>: three. (line 453) +* ArcArrows3: three. (line 498) +* arclength <1>: three. (line 455) * arclength: Paths and guides. (line 137) -* arctime <1>: three. (line 453) +* arctime <1>: three. (line 455) * arctime: Paths and guides. (line 141) * arguments: Default arguments. (line 6) * arithmetic operators: Arithmetic & logical. @@ -8320,9 +8322,9 @@ Index * Arrow: draw. (line 26) * arrow: Drawing commands. (line 31) * arrow keys: Tutorial. (line 21) -* Arrow3: three. (line 496) +* Arrow3: three. (line 498) * Arrows: draw. (line 26) -* Arrows3: three. (line 496) +* Arrows3: three. (line 498) * as: Import. (line 70) * aSin: Mathematical functions. (line 20) @@ -8349,7 +8351,7 @@ Index * atleast: Tutorial. (line 165) * attach <1>: graph. (line 405) * attach: LaTeX usage. (line 32) -* autoadjust: three. (line 333) +* autoadjust: three. (line 335) * autoimport: Options. (line 103) * automatic scaling: graph. (line 672) * axialshade: fill. (line 43) @@ -8358,11 +8360,11 @@ Index * azimuth: Data types. (line 124) * babel: babel. (line 6) * background color: Frames and pictures. (line 164) -* BackView: three. (line 360) +* BackView: three. (line 362) * Bar: draw. (line 19) -* Bar3: three. (line 496) +* Bar3: three. (line 498) * Bars: draw. (line 19) -* Bars3: three. (line 496) +* Bars3: three. (line 498) * barsize: draw. (line 19) * base modules: Base modules. (line 6) * basealign: Pens. (line 164) @@ -8370,18 +8372,18 @@ Index * batch mode: Tutorial. (line 30) * beep: Data types. (line 335) * BeginArcArrow: draw. (line 26) -* BeginArcArrow3: three. (line 496) +* BeginArcArrow3: three. (line 498) * BeginArrow: draw. (line 26) -* BeginArrow3: three. (line 496) +* BeginArrow3: three. (line 498) * BeginBar: draw. (line 19) -* BeginBar3: three. (line 496) +* BeginBar3: three. (line 498) * BeginDotMargin: draw. (line 42) -* BeginDotMargin3: three. (line 512) +* BeginDotMargin3: three. (line 514) * BeginMargin: draw. (line 42) -* BeginMargin3: three. (line 512) +* BeginMargin3: three. (line 514) * BeginPenMargin: draw. (line 42) -* BeginPenMargin2: three. (line 512) -* BeginPenMargin3: three. (line 512) +* BeginPenMargin2: three. (line 514) +* BeginPenMargin3: three. (line 514) * BeginPoint: label. (line 57) * Bessel: Mathematical functions. (line 48) @@ -8415,11 +8417,11 @@ Index (line 6) * Bottom: graph. (line 128) * BottomTop: graph. (line 134) -* BottomView: three. (line 360) +* BottomView: three. (line 362) * bounding box: Frames and pictures. (line 164) * Bounds: graph3. (line 20) * boutput: Files. (line 71) -* box <1>: three. (line 284) +* box <1>: three. (line 286) * box: Frames and pictures. (line 22) * bp: Tutorial. (line 17) * break: Programming. (line 29) @@ -8441,7 +8443,7 @@ Index * cd: Files. (line 24) * ceil: Mathematical functions. (line 26) -* center: three. (line 317) +* center: three. (line 319) * Center: label. (line 62) * checker: Pens. (line 247) * Chinese: unicode. (line 12) @@ -8450,7 +8452,7 @@ Index * Ci: Mathematical functions. (line 48) * circle <1>: flowchart. (line 57) -* circle: three. (line 258) +* circle: three. (line 260) * Circle: Paths and guides. (line 17) * circle: Paths and guides. (line 10) * circlebarframe: markers. (line 18) @@ -8520,7 +8522,7 @@ Index * curl: Tutorial. (line 172) * curlSpecifier: Paths and guides. (line 387) * currentpen: Pens. (line 6) -* currentprojection: three. (line 357) +* currentprojection: three. (line 359) * curve: slopefield. (line 20) * custom axis types: graph. (line 138) * custom mark routine: graph. (line 566) @@ -8528,7 +8530,7 @@ Index * cut: Paths and guides. (line 233) * cycle <1>: three. (line 6) * cycle: Tutorial. (line 46) -* cyclic <1>: three. (line 453) +* cyclic <1>: three. (line 455) * cyclic <2>: Arrays. (line 39) * cyclic: Paths and guides. (line 75) * cyclicflag: Arrays. (line 39) @@ -8545,7 +8547,7 @@ Index * default arguments: Default arguments. (line 6) * defaultformat: graph. (line 169) * DefaultHead: draw. (line 26) -* DefaultHead3: three. (line 496) +* DefaultHead3: three. (line 498) * defaultpen: Pens. (line 46) * deferred drawing: simplex. (line 6) * Degrees: Mathematical functions. @@ -8559,7 +8561,7 @@ Index * diagonal: Arrays. (line 305) * diamond: flowchart. (line 50) * dimension: Arrays. (line 368) -* dir <1>: three. (line 453) +* dir <1>: three. (line 455) * dir <2>: Paths and guides. (line 99) * dir <3>: Data types. (line 85) * dir: Search paths. (line 10) @@ -8572,11 +8574,11 @@ Index * dot <1>: Data types. (line 98) * dot: draw. (line 83) * DotMargin: draw. (line 42) -* DotMargin3: three. (line 512) +* DotMargin3: three. (line 514) * DotMargins: draw. (line 42) -* DotMargins3: three. (line 512) +* DotMargins3: three. (line 514) * dotted: Pens. (line 92) -* double deferred drawing: three. (line 239) +* double deferred drawing: three. (line 241) * double precision: Files. (line 71) * Draw: Frames and pictures. (line 147) * draw: draw. (line 110) @@ -8601,19 +8603,19 @@ Index * embed: embed. (line 6) * empty: Frames and pictures. (line 7) * EndArcArrow: draw. (line 26) -* EndArcArrow3: three. (line 496) +* EndArcArrow3: three. (line 498) * EndArrow: draw. (line 26) -* EndArrow3: three. (line 496) +* EndArrow3: three. (line 498) * EndBar: draw. (line 19) -* EndBar3: three. (line 496) +* EndBar3: three. (line 498) * EndDotMargin: draw. (line 42) -* EndDotMargin3: three. (line 512) +* EndDotMargin3: three. (line 514) * endl: Files. (line 59) * EndMargin: draw. (line 42) -* EndMargin3: three. (line 512) +* EndMargin3: three. (line 514) * EndPenMargin: draw. (line 42) -* EndPenMargin2: three. (line 512) -* EndPenMargin3: three. (line 512) +* EndPenMargin2: three. (line 514) +* EndPenMargin3: three. (line 514) * EndPoint: label. (line 57) * envelope: Frames and pictures. (line 22) * environment variables: Configuring. (line 87) @@ -8649,12 +8651,12 @@ Index * extension <1>: MetaPost. (line 10) * extension: Paths and guides. (line 228) * external: embed. (line 28) -* extrude: three. (line 447) +* extrude: three. (line 449) * F: Mathematical functions. (line 48) * fabs: Mathematical functions. (line 6) -* face: three. (line 531) +* face: three. (line 533) * factorial: Mathematical functions. (line 39) * Fedora: UNIX binary distributions. @@ -8698,7 +8700,7 @@ Index * freeglut: Compiling from UNIX source. (line 16) * from: Import. (line 17) -* FrontView: three. (line 360) +* FrontView: three. (line 362) * function declarations: Functions. (line 67) * function shading: fill. (line 95) * Function shading: fill. (line 95) @@ -8717,7 +8719,7 @@ Index * getstring: Files. (line 115) * gettriple: Files. (line 115) * glOptions <1>: Options. (line 122) -* glOptions: three. (line 196) +* glOptions: three. (line 198) * GNU Scientific Library: Mathematical functions. (line 48) * gouraudshade: fill. (line 58) @@ -8754,13 +8756,13 @@ Index * hex: Data types. (line 279) * hexidecimal <1>: Pens. (line 59) * hexidecimal: Data types. (line 279) -* hidden surface removal: three. (line 531) +* hidden surface removal: three. (line 533) * histogram: Mathematical functions. (line 39) * history: Files. (line 140) * historylines: Interactive mode. (line 42) * HookHead: draw. (line 26) -* HookHead3: three. (line 496) +* HookHead3: three. (line 498) * Horizontal: flowchart. (line 74) * hypot: Mathematical functions. (line 6) @@ -8768,7 +8770,7 @@ Index (line 48) * i_scaled: Mathematical functions. (line 48) -* iconic: three. (line 196) +* iconic: three. (line 198) * identity <1>: Arrays. (line 302) * identity <2>: Mathematical functions. (line 6) @@ -8806,22 +8808,22 @@ Index * interp: Arithmetic & logical. (line 76) * interpolate: interpolate. (line 6) -* intersect <1>: three. (line 453) +* intersect <1>: three. (line 455) * intersect <2>: math. (line 13) * intersect: Paths and guides. (line 176) -* intersectionpoint <1>: three. (line 453) +* intersectionpoint <1>: three. (line 455) * intersectionpoint <2>: math. (line 17) * intersectionpoint: Paths and guides. (line 220) -* intersectionpoints <1>: three. (line 453) +* intersectionpoints <1>: three. (line 455) * intersectionpoints: Paths and guides. (line 224) -* intersections <1>: three. (line 453) +* intersections <1>: three. (line 455) * 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 386) +* invert: three. (line 388) * invisible: Pens. (line 39) * J: Mathematical functions. (line 6) @@ -8832,7 +8834,7 @@ Index (line 48) * Kate: Editing modes. (line 49) * KDE editor: Editing modes. (line 49) -* keyboard bindings:: three. (line 161) +* keyboard bindings:: three. (line 163) * keys: Arrays. (line 39) * keywords: Named arguments. (line 6) * Korean: unicode. (line 12) @@ -8859,13 +8861,13 @@ Index * LeftRight: graph. (line 280) * LeftSide: label. (line 62) * LeftTicks: graph. (line 155) -* LeftView: three. (line 360) +* LeftView: three. (line 362) * legend <1>: graph. (line 421) * legend <2>: draw. (line 64) * legend: Drawing commands. (line 31) * Legendre: Mathematical functions. (line 48) -* length <1>: three. (line 453) +* length <1>: three. (line 455) * length <2>: Arrays. (line 39) * length <3>: Paths and guides. (line 66) * length: Data types. (line 60) @@ -8904,10 +8906,10 @@ Index * makepen: Pens. (line 296) * map: Arrays. (line 144) * Margin: draw. (line 42) -* Margin3: three. (line 512) -* margins: three. (line 245) +* Margin3: three. (line 514) +* margins: three. (line 247) * Margins: draw. (line 42) -* Margins3: three. (line 512) +* Margins3: three. (line 514) * mark: graph. (line 474) * markangle: markers. (line 38) * marker: graph. (line 474) @@ -8917,14 +8919,14 @@ Index * math: math. (line 6) * mathematical functions: Mathematical functions. (line 6) -* max <1>: three. (line 453) +* max <1>: three. (line 455) * 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 196) +* maxtile: three. (line 198) * maxtimes: Paths and guides. (line 215) -* maxviewport: three. (line 196) +* maxviewport: three. (line 198) * merge: animation. (line 6) * MetaPost: MetaPost. (line 6) * MetaPost ... : Tutorial. (line 176) @@ -8934,12 +8936,12 @@ Index * MetaPost whatever: MetaPost. (line 10) * Microsoft Windows: Microsoft Windows. (line 6) * MidArcArrow: draw. (line 26) -* MidArcArrow3: three. (line 496) +* MidArcArrow3: three. (line 498) * MidArrow: draw. (line 26) -* MidArrow3: three. (line 496) +* MidArrow3: three. (line 498) * midpoint: Paths and guides. (line 161) * MidPoint: label. (line 57) -* min <1>: three. (line 453) +* min <1>: three. (line 455) * min <2>: Arrays. (line 224) * min <3>: Frames and pictures. (line 7) * min: Paths and guides. (line 256) @@ -8951,10 +8953,10 @@ Index * mm: Tutorial. (line 63) * mode: Files. (line 86) * mouse: GUI. (line 6) -* mouse bindings: three. (line 129) +* mouse bindings: three. (line 131) * Move: Pens. (line 335) * MoveQuiet: Pens. (line 341) -* multisample: three. (line 119) +* multisample: three. (line 121) * multisampling: Compiling from UNIX source. (line 16) * N: Tutorial. (line 94) @@ -8972,10 +8974,10 @@ Index * NoFill <1>: Frames and pictures. (line 141) * NoFill: draw. (line 26) * NoMargin: draw. (line 42) -* NoMargin3: three. (line 512) +* NoMargin3: three. (line 514) * none: Files. (line 59) * None: draw. (line 19) -* normal: three. (line 439) +* normal: three. (line 441) * nosafe: Options. (line 150) * NOT: Arithmetic & logical. (line 80) @@ -8984,18 +8986,18 @@ Index * null: Structures. (line 6) * nullpen <1>: Frames and pictures. (line 127) * nullpen: label. (line 14) -* NURBS: three. (line 337) -* O: three. (line 253) +* NURBS: three. (line 339) +* O: three. (line 255) * obj: obj. (line 9) -* oblique: three. (line 298) -* obliqueX: three. (line 306) -* obliqueY: three. (line 313) -* obliqueZ: three. (line 298) +* oblique: three. (line 300) +* obliqueX: three. (line 308) +* obliqueY: three. (line 315) +* obliqueZ: three. (line 300) * ode: ode. (line 9) * offset: Options. (line 155) * opacity: Pens. (line 218) * open: Files. (line 11) -* OpenGL: three. (line 119) +* OpenGL: three. (line 121) * operator: User-defined operators. (line 6) * operator --: graph. (line 31) @@ -9010,8 +9012,8 @@ Index * OR: Arithmetic & logical. (line 80) * orientation: Frames and pictures. (line 95) -* orthographic: three. (line 317) -* outformat: three. (line 119) +* orthographic: three. (line 319) +* outformat: three. (line 121) * outprefix: Frames and pictures. (line 83) * output <1>: Options. (line 134) * output: Files. (line 36) @@ -9043,13 +9045,13 @@ Index * pdfviewerOptions: Options. (line 122) * pen: Pens. (line 6) * PenMargin: draw. (line 42) -* PenMargin2: three. (line 512) -* PenMargin3: three. (line 512) +* PenMargin2: three. (line 514) +* PenMargin3: three. (line 514) * PenMargins: draw. (line 42) -* PenMargins2: three. (line 512) -* PenMargins3: three. (line 512) +* PenMargins2: three. (line 514) +* PenMargins3: three. (line 514) * perpendicular: geometry. (line 6) -* perspective: three. (line 337) +* perspective: three. (line 339) * picture: Frames and pictures. (line 35) * picture alignment: Frames and pictures. (line 205) * piecewisestraight: Paths and guides. (line 82) @@ -9057,16 +9059,16 @@ Index (line 48) * plain: plain. (line 6) * planar: three. (line 83) -* plane: three. (line 280) -* planeproject: three. (line 436) -* point <1>: three. (line 453) +* plane: three. (line 282) +* planeproject: three. (line 438) +* point <1>: three. (line 455) * 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 453) +* postcontrol <1>: three. (line 455) * postcontrol: Paths and guides. (line 130) * postfix operators: Self & prefix operators. (line 19) @@ -9075,9 +9077,9 @@ Index * PostScript subpath: Tutorial. (line 197) * pow10: Mathematical functions. (line 6) -* prc: three. (line 214) +* prc: three. (line 216) * precision: Files. (line 90) -* precontrol <1>: three. (line 453) +* precontrol <1>: three. (line 455) * precontrol: Paths and guides. (line 123) * prefix operators: Self & prefix operators. (line 6) @@ -9102,7 +9104,7 @@ Index * radialshade: fill. (line 49) * radians: Mathematical functions. (line 17) -* radius <1>: three. (line 453) +* radius <1>: three. (line 455) * radius: Paths and guides. (line 119) * Rainbow: palette. (line 12) * rand: Mathematical functions. @@ -9131,14 +9133,14 @@ Index (line 6) * rename: Files. (line 149) * render <1>: Options. (line 134) -* render: three. (line 119) +* render: three. (line 121) * replace: Data types. (line 252) * resetdefaultpen: Pens. (line 349) * rest arguments: Rest arguments. (line 6) * restore: Frames and pictures. (line 261) * restricted: Structures. (line 6) * return: Debugger. (line 48) -* reverse <1>: three. (line 453) +* reverse <1>: three. (line 455) * reverse <2>: Arrays. (line 149) * reverse <3>: Paths and guides. (line 164) * reverse: Data types. (line 248) @@ -9150,7 +9152,7 @@ Index * Right: graph. (line 277) * RightSide: label. (line 62) * RightTicks: graph. (line 155) -* RightView: three. (line 360) +* RightView: three. (line 362) * Rotate: label. (line 37) * Rotate(pair z): label. (line 40) * round: Mathematical functions. @@ -9167,12 +9169,12 @@ Index * safe: Options. (line 150) * save: Frames and pictures. (line 258) * saveline: Files. (line 132) -* scale: three. (line 415) +* scale: three. (line 417) * Scale: graph. (line 688) * scale <1>: graph. (line 672) * scale: Transforms. (line 39) * Scale: label. (line 46) -* scale3: three. (line 412) +* scale3: three. (line 414) * scaled graph: graph. (line 653) * scientific graph: graph. (line 386) * scroll: Files. (line 106) @@ -9194,12 +9196,12 @@ Index * sgn: Mathematical functions. (line 26) * shading: fill. (line 32) -* shift <1>: three. (line 400) +* shift <1>: three. (line 402) * shift: Transforms. (line 27) * Shift: label. (line 34) * shiftless: Transforms. (line 53) * shipout: Frames and pictures. (line 83) -* showtarget: three. (line 317) +* showtarget: three. (line 319) * Si: Mathematical functions. (line 48) * signed <1>: Arrays. (line 398) @@ -9219,10 +9221,10 @@ Index * sinh: Mathematical functions. (line 6) * size <1>: Options. (line 134) -* size <2>: three. (line 453) +* size <2>: three. (line 455) * size <3>: Frames and pictures. (line 43) * size: Paths and guides. (line 71) -* size3: three. (line 242) +* size3: three. (line 244) * slant: Transforms. (line 45) * Slant: label. (line 43) * sleep: Data types. (line 329) @@ -9251,7 +9253,7 @@ Index * step: Debugger. (line 39) * stickframe: markers. (line 16) * stop: Debugger. (line 10) -* straight: three. (line 453) +* straight: three. (line 455) * Straight: graph. (line 31) * straight: Paths and guides. (line 78) * strftime: Data types. (line 291) @@ -9261,7 +9263,7 @@ Index * strptime: Data types. (line 299) * struct: Structures. (line 6) * structures: Structures. (line 6) -* subpath <1>: three. (line 453) +* subpath <1>: three. (line 455) * subpath: Paths and guides. (line 167) * subpictures: Frames and pictures. (line 103) * substr: Data types. (line 244) @@ -9284,7 +9286,7 @@ Index (line 6) * tanh: Mathematical functions. (line 6) -* target: three. (line 317) +* target: three. (line 319) * tell: Files. (line 90) * tension <1>: three. (line 6) * tension: Tutorial. (line 165) @@ -9297,7 +9299,7 @@ Index * TeX string: Data types. (line 179) * texcommand: Configuring. (line 69) * TeXHead: draw. (line 26) -* TeXHead3: three. (line 496) +* TeXHead3: three. (line 498) * texpath <1>: label. (line 116) * texpath: Configuring. (line 69) * texpreamble: Frames and pictures. (line 282) @@ -9318,12 +9320,12 @@ Index * time: Data types. (line 291) * times: Paths and guides. (line 202) * Top: graph. (line 131) -* TopView: three. (line 360) +* TopView: three. (line 362) * trace: Debugger. (line 51) * trailingzero: graph. (line 169) -* transform <1>: three. (line 427) +* transform <1>: three. (line 429) * transform: Transforms. (line 6) -* transform3: three. (line 396) +* transform3: three. (line 398) * transparency: Pens. (line 218) * transpose: Arrays. (line 211) * tree: tree. (line 9) @@ -9335,7 +9337,7 @@ Index (line 48) * triple: Data types. (line 108) * TrueMargin: draw. (line 42) -* TrueMargin3: three. (line 512) +* TrueMargin3: three. (line 514) * tube <1>: tube. (line 6) * tube: three. (line 104) * tutorial: Tutorial. (line 6) @@ -9349,9 +9351,9 @@ Index * uniform: Arrays. (line 158) * Uninstall: Uninstall. (line 6) * unit: Data types. (line 78) -* unitbox <1>: three. (line 286) +* unitbox <1>: three. (line 288) * unitbox: Tutorial. (line 218) -* unitcircle <1>: three. (line 253) +* unitcircle <1>: three. (line 255) * unitcircle: Tutorial. (line 110) * unitrand: Mathematical functions. (line 39) @@ -9361,7 +9363,7 @@ Index (line 6) * unpacking: Rest arguments. (line 39) * unravel: Import. (line 31) -* up: three. (line 317) +* up: three. (line 319) * update: Files. (line 36) * UpsideDown: Frames and pictures. (line 95) * usepackage: Frames and pictures. (line 287) @@ -9378,10 +9380,10 @@ Index * vertex-dependent colors: three. (line 75) * Vertical: flowchart. (line 74) * viewportheight: LaTeX usage. (line 32) -* viewportmargin: three. (line 245) -* viewportsize: three. (line 245) +* viewportmargin: three. (line 247) +* viewportsize: three. (line 247) * viewportwidth: LaTeX usage. (line 32) -* views: three. (line 214) +* views: three. (line 216) * vim: Editing modes. (line 33) * virtual functions: Structures. (line 189) * void: Data types. (line 10) @@ -9396,7 +9398,7 @@ Index * word: Arrays. (line 353) * write <1>: Arrays. (line 394) * write: Files. (line 51) -* X: three. (line 253) +* X: three. (line 255) * xasy: GUI. (line 6) * xaxis3: graph3. (line 7) * xelatex <1>: Options. (line 134) @@ -9410,14 +9412,14 @@ Index * xoutput: Files. (line 71) * xpart: Data types. (line 89) * xscale: Transforms. (line 33) -* xscale3: three. (line 403) +* xscale3: three. (line 405) * 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 253) +* Y <1>: three. (line 255) * Y: Mathematical functions. (line 6) * yaxis3: graph3. (line 7) @@ -9426,12 +9428,12 @@ Index * ylimits: graph. (line 626) * ypart: Data types. (line 92) * yscale: Transforms. (line 36) -* yscale3: three. (line 406) +* yscale3: three. (line 408) * ytick: graph. (line 332) * YZEquals: graph3. (line 20) * YZero: graph. (line 119) * YZZero: graph3. (line 20) -* Z: three. (line 253) +* Z: three. (line 255) * zaxis3: graph3. (line 7) * zero_Ai: Mathematical functions. (line 48) @@ -9447,7 +9449,7 @@ Index * zeta: Mathematical functions. (line 48) * zpart: Data types. (line 161) -* zscale3: three. (line 409) +* zscale3: three. (line 411) * |: Arithmetic & logical. (line 62) * ||: Arithmetic & logical. @@ -9530,72 +9532,72 @@ Node: Casts173928 Node: Import175894 Node: Static181124 Node: LaTeX usage184020 -Node: Base modules189461 -Node: plain191961 -Node: simplex192613 -Node: math192886 -Node: interpolate193985 -Node: geometry194264 -Node: trembling194868 -Node: stats195229 -Node: patterns195489 -Node: markers195725 -Node: tree197508 -Node: binarytree197696 -Node: drawtree198285 -Node: syzygy198489 -Node: feynman198763 -Node: roundedpath199038 -Node: animation199321 -Ref: animate199740 -Node: embed200879 -Node: slide202668 -Node: MetaPost203008 -Node: unicode203724 -Node: latin1204612 -Node: babel204980 -Node: labelpath205209 -Node: labelpath3206029 -Node: annotate206340 -Node: CAD206811 -Node: graph207121 -Ref: ticks213959 -Ref: pathmarkers227107 -Ref: marker227572 -Ref: markuniform227923 -Ref: errorbars229714 -Ref: automatic scaling233770 -Node: palette244413 -Ref: images244531 -Ref: image248702 -Ref: logimage249180 -Ref: penimage249986 -Node: three250430 -Ref: PostScript3D272593 -Node: obj274285 -Node: graph3274537 -Ref: GaussianSurface279492 -Node: grid3280577 -Node: solids281317 -Node: tube282265 -Node: flowchart284496 -Node: contour288995 -Node: contour3294024 -Node: slopefield294331 -Node: ode295768 -Node: Options296028 -Ref: configuration file301468 -Ref: settings301468 -Ref: convert302539 -Node: Interactive mode305328 -Ref: history306952 -Node: GUI308257 -Node: GUI Installation308760 -Node: GUI Usage309898 -Node: PostScript to Asymptote310801 -Node: Help311944 -Node: Debugger313673 -Node: Credits315458 -Node: Index316371 +Node: Base modules189465 +Node: plain191965 +Node: simplex192617 +Node: math192890 +Node: interpolate193989 +Node: geometry194268 +Node: trembling194872 +Node: stats195233 +Node: patterns195493 +Node: markers195729 +Node: tree197512 +Node: binarytree197700 +Node: drawtree198289 +Node: syzygy198493 +Node: feynman198767 +Node: roundedpath199042 +Node: animation199325 +Ref: animate199744 +Node: embed200883 +Node: slide202672 +Node: MetaPost203012 +Node: unicode203728 +Node: latin1204616 +Node: babel204984 +Node: labelpath205213 +Node: labelpath3206033 +Node: annotate206344 +Node: CAD206815 +Node: graph207125 +Ref: ticks213963 +Ref: pathmarkers227113 +Ref: marker227578 +Ref: markuniform227929 +Ref: errorbars229720 +Ref: automatic scaling233776 +Node: palette244419 +Ref: images244537 +Ref: image248708 +Ref: logimage249186 +Ref: penimage249992 +Node: three250436 +Ref: PostScript3D272750 +Node: obj274442 +Node: graph3274694 +Ref: GaussianSurface279649 +Node: grid3280734 +Node: solids281474 +Node: tube282422 +Node: flowchart284657 +Node: contour289156 +Node: contour3294187 +Node: slopefield294494 +Node: ode295931 +Node: Options296191 +Ref: configuration file301631 +Ref: settings301631 +Ref: convert302702 +Node: Interactive mode305491 +Ref: history307115 +Node: GUI308420 +Node: GUI Installation308923 +Node: GUI Usage310061 +Node: PostScript to Asymptote310964 +Node: Help312107 +Node: Debugger313836 +Node: Credits315621 +Node: Index316534 End Tag Table diff --git a/Build/source/utils/asymptote/doc/westnile.asy b/Build/source/utils/asymptote/doc/westnile.asy index eaef31e1e87..c01ebc5cde2 100644 --- a/Build/source/utils/asymptote/doc/westnile.asy +++ b/Build/source/utils/asymptote/doc/westnile.asy @@ -39,7 +39,7 @@ labelx("$M_2$",M2); draw((a,S2)--(M2,S2)--(M2,0),Dotted); draw((a,S1)--(M1,S1)--(M1,0),dashed); -pen p=fontsize(10); +pen p=fontsize(10pt); real y3=0.043; path reduction=(M1,y3)--(M2,y3); diff --git a/Build/source/utils/asymptote/examples/animations/inlinemovie3.tex b/Build/source/utils/asymptote/examples/animations/inlinemovie3.tex index c46a17d3e59..0dab166ab9d 100644 --- a/Build/source/utils/asymptote/examples/animations/inlinemovie3.tex +++ b/Build/source/utils/asymptote/examples/animations/inlinemovie3.tex @@ -19,7 +19,7 @@ settings.prc=false; import graph3; import animate; currentprojection=orthographic(1,-2,0.5); -currentlight=(1,1,20); +currentlight=Headlamp; animation A=animation("movie3"); int n=20; for(int i=0; i < n; ++i) { diff --git a/Build/source/utils/asymptote/examples/lever.asy b/Build/source/utils/asymptote/examples/lever.asy index e30de87540f..a0c81f5a47a 100644 --- a/Build/source/utils/asymptote/examples/lever.asy +++ b/Build/source/utils/asymptote/examples/lever.asy @@ -10,7 +10,7 @@ dot(z1,red+0.15cm); dot(z2,darkgreen+0.3cm); label("$m$",z1,1.2N,red); label("$M$",z2,1.5N,darkgreen); -label("$\hat{\ }$",zf,0.2*S,fontsize(24)+blue); +label("$\hat{\ }$",zf,0.2*S,fontsize(24pt)+blue); pair s=-0.2*I; draw("$x$",z0+s--z1+s,N,red,Arrows,Bars,PenMargins); diff --git a/Build/source/utils/asymptote/examples/logo3.asy b/Build/source/utils/asymptote/examples/logo3.asy index 538838e02fa..932efaca410 100644 --- a/Build/source/utils/asymptote/examples/logo3.asy +++ b/Build/source/utils/asymptote/examples/logo3.asy @@ -17,7 +17,7 @@ outline.push((0,y1){dir(88.3)}::{dir(20)}(b,0)); real c=0.5*a; pair z=(0,2.5); path[] text = shift(0,2)*scale(0.01,0.15)* - texpath(Label("{\it symptote}",z,0.25*E+0.169S,fontsize(24))); + texpath(Label("{\it symptote}",z,0.25*E+0.169S,fontsize(24pt))); outline.append(text); pair w=(0,1.7); outline.push(intersectionpoint(A,w-1--w)--w); diff --git a/Build/source/utils/asymptote/examples/mosquito.asy b/Build/source/utils/asymptote/examples/mosquito.asy index 288e253bfca..7e299d264d3 100644 --- a/Build/source/utils/asymptote/examples/mosquito.asy +++ b/Build/source/utils/asymptote/examples/mosquito.asy @@ -3,7 +3,7 @@ size(9cm,10cm,IgnoreAspect); pair d=(1,0.25); real s=1.6d.x; real y=0.6; -defaultpen(fontsize(8)); +defaultpen(fontsize(8pt)); picture box(string s, pair z=(0,0)) { picture pic; diff --git a/Build/source/utils/asymptote/examples/polararea.asy b/Build/source/utils/asymptote/examples/polararea.asy index 42d3729914c..15d42ffd00e 100644 --- a/Build/source/utils/asymptote/examples/polararea.asy +++ b/Build/source/utils/asymptote/examples/polararea.asy @@ -28,9 +28,9 @@ pair zmax=polar(f(thetamax),thetamax); draw((0,0)--zmin,dotted+red); draw((0,0)--zmax,dotted+blue); -draw("$\theta_*$",arc((0,0),0.5*rmin,0,degrees(thetamin)),red+fontsize(10), +draw("$\theta_*$",arc((0,0),0.5*rmin,0,degrees(thetamin)),red+fontsize(10pt), PenMargins); -draw("$\theta^*$",arc((0,0),0.5*rmax,0,degrees(thetamax)),blue+fontsize(10), +draw("$\theta^*$",arc((0,0),0.5*rmax,0,degrees(thetamax)),blue+fontsize(10pt), PenMargins); draw(arc((0,0),rmin,degrees(theta1),degrees(theta2)),red,PenMargins); diff --git a/Build/source/utils/asymptote/examples/polarcircle.asy b/Build/source/utils/asymptote/examples/polarcircle.asy index c08160cde69..ce7ed948199 100644 --- a/Build/source/utils/asymptote/examples/polarcircle.asy +++ b/Build/source/utils/asymptote/examples/polarcircle.asy @@ -7,7 +7,7 @@ pair F(real x) {return (x,f(x));} draw(polargraph(f,0,pi,operator ..)); -defaultpen(fontsize(10)); +defaultpen(fontsize(10pt)); xaxis("$x$"); yaxis("$y$"); diff --git a/Build/source/utils/asymptote/examples/poster.asy b/Build/source/utils/asymptote/examples/poster.asy index d476dd079de..cfe4ad855e3 100644 --- a/Build/source/utils/asymptote/examples/poster.asy +++ b/Build/source/utils/asymptote/examples/poster.asy @@ -11,22 +11,22 @@ xaxis(background,grey); yaxis(background,-0.25,0.25,grey); real a=1.2/pi; draw(background,graph(background,f,-a,a,10000),grey); -label(background,"$x\sin\frac{1}{x}$",F(0.92/pi),3SE,grey+fontsize(14)); +label(background,"$x\sin\frac{1}{x}$",F(0.92/pi),3SE,grey+fontsize(14pt)); frame f=background.fit(); box(f,RadialShade(yellow,0.6*yellow+red),above=false); background.erase(); add(background,f); -title("Young Researchers' Conference",align=3S,fontsize(48)); +title("Young Researchers' Conference",align=3S,fontsize(48pt)); center("University of Alberta, Edmonton, April 1--2, 2006"); skip(4); center("A general conference for\\ the mathematical and statistical sciences\\ -for graduate students, by graduate students.",fontsize(32)); +for graduate students, by graduate students.",fontsize(32pt)); label("Registration and abstract submission online.",(0,-0.5)); label("\tt http://www.pims.math.ca/science/2006/06yrc/",point(SW),NE, - black+fontsize(18)); + black+fontsize(18pt)); diff --git a/Build/source/utils/asymptote/examples/slidedemo.asy b/Build/source/utils/asymptote/examples/slidedemo.asy index 63221ec237e..57d7188a5a0 100644 --- a/Build/source/utils/asymptote/examples/slidedemo.asy +++ b/Build/source/utils/asymptote/examples/slidedemo.asy @@ -62,7 +62,7 @@ draw(pic,unitcircle); add(pic.fit(15cm)); step(); fill(pic2,unitcircle,paleblue); -label(pic2,"$\pi$",(0,0),fontsize(500)); +label(pic2,"$\pi$",(0,0),fontsize(500pt)); add(pic2.fit(15cm)); newslide(); diff --git a/Build/source/utils/asymptote/glrender.cc b/Build/source/utils/asymptote/glrender.cc index 279d6b789c7..c08684e2d53 100644 --- a/Build/source/utils/asymptote/glrender.cc +++ b/Build/source/utils/asymptote/glrender.cc @@ -392,8 +392,8 @@ void Export() #ifdef HAVE_LIBPTHREAD if(glthread && readyAfterExport) { - endwait(readySignal,readyLock); readyAfterExport=false; + endwait(readySignal,readyLock); } #endif } @@ -497,7 +497,7 @@ void updateHandler(int) fitscreen(); } -void autoExport() +void exportHandler(int=0) { if(!Iconify) glutShowWindow(); @@ -1400,8 +1400,20 @@ void glrender(const string& prefix, const picture *pic, const string& format, glutMainLoop(); } else { - autoExport(); - if(!glthread) quit(); + if(glthread) { + if(havewindow) { + readyAfterExport=true; + pthread_kill(mainthread,SIGUSR1); + } else { + initialized=true; + readyAfterExport=true; + signal(SIGUSR1,exportHandler); + exportHandler(); + } + } else { + exportHandler(); + quit(); + } } } diff --git a/Build/source/utils/asymptote/main.cc b/Build/source/utils/asymptote/main.cc index 0cd7a281d58..1a42ff47bba 100644 --- a/Build/source/utils/asymptote/main.cc +++ b/Build/source/utils/asymptote/main.cc @@ -154,12 +154,6 @@ void *asymain(void *A) int status; while(wait(&status) > 0); } -#ifdef HAVE_LIBGL -#ifdef HAVE_LIBPTHREAD - if(gl::glthread) - pthread_join(gl::mainthread,NULL); -#endif -#endif exit(em.processStatus() || interact::interactive ? 0 : 1); } @@ -179,8 +173,10 @@ int main(int argc, char *argv[]) #ifdef HAVE_LIBPTHREAD if(gl::glthread) { + pthread_t thread; try { - if(pthread_create(&gl::mainthread,NULL,asymain,&args) == 0) { + if(pthread_create(&thread,NULL,asymain,&args) == 0) { + gl::mainthread=pthread_self(); while(true) { camp::glrenderWrapper(); gl::initialize=true; diff --git a/Build/source/utils/asymptote/pen.h b/Build/source/utils/asymptote/pen.h index cc6cdbb9c66..ea7f49be4fe 100644 --- a/Build/source/utils/asymptote/pen.h +++ b/Build/source/utils/asymptote/pen.h @@ -525,6 +525,7 @@ public: void greytocmyk() { grey=1.0-grey; + r=g=b=0.0; color=CMYK; } @@ -578,7 +579,7 @@ public: if(rgb()) rgbtogrey(); else if(cmyk()) cmyktogrey(); if(settings::bw) {grey=(grey == 1.0) ? 1.0 : 0.0;} - } + } else if(settings::rgb && cmyk()) cmyktorgb(); else if(settings::cmyk && rgb()) rgbtocmyk(); } diff --git a/Build/source/utils/asymptote/picture.cc b/Build/source/utils/asymptote/picture.cc index 5091e673a31..eb7e28e3751 100644 --- a/Build/source/utils/asymptote/picture.cc +++ b/Build/source/utils/asymptote/picture.cc @@ -872,8 +872,8 @@ bool picture::shipout3(const string& prefix, const string& format, return true; } #ifdef HAVE_LIBPTHREAD - if(Wait) - pthread_mutex_lock(&readyLock); + if(Wait) + pthread_mutex_lock(&readyLock); #endif #endif } else { @@ -891,7 +891,7 @@ bool picture::shipout3(const string& prefix, const string& format, background,nlights,lights,diffuse,ambient,specular,viewportlighting, View,oldpid); #ifdef HAVE_LIBPTHREAD - if(glthread && Wait) { + if(glthread && Wait) { pthread_cond_wait(&readySignal,&readyLock); pthread_mutex_unlock(&readyLock); } diff --git a/Build/source/utils/asymptote/prcfile.h b/Build/source/utils/asymptote/prcfile.h index 9c02470f2fa..cd957026631 100644 --- a/Build/source/utils/asymptote/prcfile.h +++ b/Build/source/utils/asymptote/prcfile.h @@ -8,6 +8,7 @@ namespace camp { const double scale3D=1.0/settings::cm; inline RGBAColour rgba(pen p) { + p.convert(); p.torgb(); return RGBAColour(p.red(),p.green(),p.blue(),p.opacity()); } diff --git a/Build/source/utils/asymptote/runtime.cc b/Build/source/utils/asymptote/runtime.cc index fa2fb79069f..3317b59ffe9 100644 --- a/Build/source/utils/asymptote/runtime.cc +++ b/Build/source/utils/asymptote/runtime.cc @@ -903,9 +903,6 @@ void unused(void *) { } -static const double twelvepercent=0.12; -static const double tenpercent=0.1; - pair readpair(stringstream& s, double hscale=1.0, double vscale=1.0) { double x,y; @@ -944,8 +941,9 @@ void showpath(std::ofstream& ps) } array *readpath(const string& psname, bool keep, - double hscale=1.0, double vscale=1.0) + double hscale=1.0, double vsign=1.0) { + double vscale=vsign*hscale; array *P=new array(0); mem::vector<string> cmd; cmd.push_back(getSetting<string>("gs")); @@ -1093,45 +1091,45 @@ void cannotwrite(const string& s) namespace run { // Initializers -#line 1133 "runtime.in" +#line 1131 "runtime.in" void IntZero(stack *Stack) { -#line 1134 "runtime.in" +#line 1132 "runtime.in" {Stack->push<Int>(0); return;} } -#line 1139 "runtime.in" +#line 1137 "runtime.in" void realZero(stack *Stack) { -#line 1140 "runtime.in" +#line 1138 "runtime.in" {Stack->push<real>(0.0); return;} } -#line 1144 "runtime.in" +#line 1142 "runtime.in" void boolFalse(stack *Stack) { -#line 1145 "runtime.in" +#line 1143 "runtime.in" {Stack->push<bool>(false); return;} } -#line 1149 "runtime.in" +#line 1147 "runtime.in" void pushNullArray(stack *Stack) { -#line 1150 "runtime.in" +#line 1148 "runtime.in" {Stack->push<array*>(0); return;} } -#line 1154 "runtime.in" +#line 1152 "runtime.in" void pushNullRecord(stack *Stack) { -#line 1155 "runtime.in" +#line 1153 "runtime.in" {Stack->push<frame*>(0); return;} } -#line 1159 "runtime.in" +#line 1157 "runtime.in" void pushNullFunction(stack *Stack) { -#line 1160 "runtime.in" +#line 1158 "runtime.in" {Stack->push(nullfunc::instance()); return;} } @@ -1140,183 +1138,183 @@ void pushNullFunction(stack *Stack) // Put the default value token on the stack (in place of an argument when // making a function call). -#line 1169 "runtime.in" +#line 1167 "runtime.in" void pushDefault(stack *Stack) { -#line 1170 "runtime.in" +#line 1168 "runtime.in" {Stack->push(def); return;} } // Test if the value on the stack is the default value token. -#line 1176 "runtime.in" +#line 1174 "runtime.in" void isDefault(stack *Stack) { item i=vm::pop(Stack); -#line 1177 "runtime.in" +#line 1175 "runtime.in" {Stack->push<bool>(isdefault(i)); return;} } // Logical operations -#line 1183 "runtime.in" +#line 1181 "runtime.in" // bool !(bool b); void gen8(stack *Stack) { bool b=vm::pop<bool>(Stack); -#line 1184 "runtime.in" +#line 1182 "runtime.in" {Stack->push<bool>(!b); return;} } -#line 1189 "runtime.in" +#line 1187 "runtime.in" void boolMemEq(stack *Stack) { frame * b=vm::pop<frame *>(Stack); frame * a=vm::pop<frame *>(Stack); -#line 1190 "runtime.in" +#line 1188 "runtime.in" {Stack->push<bool>(a == b); return;} } -#line 1194 "runtime.in" +#line 1192 "runtime.in" void boolMemNeq(stack *Stack) { frame * b=vm::pop<frame *>(Stack); frame * a=vm::pop<frame *>(Stack); -#line 1195 "runtime.in" +#line 1193 "runtime.in" {Stack->push<bool>(a != b); return;} } -#line 1199 "runtime.in" +#line 1197 "runtime.in" void boolFuncEq(stack *Stack) { callable * b=vm::pop<callable *>(Stack); callable * a=vm::pop<callable *>(Stack); -#line 1200 "runtime.in" +#line 1198 "runtime.in" {Stack->push<bool>(a->compare(b)); return;} } -#line 1204 "runtime.in" +#line 1202 "runtime.in" void boolFuncNeq(stack *Stack) { callable * b=vm::pop<callable *>(Stack); callable * a=vm::pop<callable *>(Stack); -#line 1205 "runtime.in" +#line 1203 "runtime.in" {Stack->push<bool>(!(a->compare(b))); return;} } // Bit operations -#line 1211 "runtime.in" +#line 1209 "runtime.in" // Int AND(Int a, Int b); void gen13(stack *Stack) { Int b=vm::pop<Int>(Stack); Int a=vm::pop<Int>(Stack); -#line 1212 "runtime.in" +#line 1210 "runtime.in" {Stack->push<Int>(a & b); return;} } -#line 1217 "runtime.in" +#line 1215 "runtime.in" // Int OR(Int a, Int b); void gen14(stack *Stack) { Int b=vm::pop<Int>(Stack); Int a=vm::pop<Int>(Stack); -#line 1218 "runtime.in" +#line 1216 "runtime.in" {Stack->push<Int>(a | b); return;} } -#line 1222 "runtime.in" +#line 1220 "runtime.in" // Int XOR(Int a, Int b); void gen15(stack *Stack) { Int b=vm::pop<Int>(Stack); Int a=vm::pop<Int>(Stack); -#line 1223 "runtime.in" +#line 1221 "runtime.in" {Stack->push<Int>(a ^ b); return;} } -#line 1227 "runtime.in" +#line 1225 "runtime.in" // Int NOT(Int a); void gen16(stack *Stack) { Int a=vm::pop<Int>(Stack); -#line 1228 "runtime.in" +#line 1226 "runtime.in" {Stack->push<Int>(~a); return;} } // Casts -#line 1234 "runtime.in" +#line 1232 "runtime.in" void pairToGuide(stack *Stack) { pair z=vm::pop<pair>(Stack); -#line 1235 "runtime.in" +#line 1233 "runtime.in" {Stack->push<guide*>(new pairguide(z)); return;} } -#line 1240 "runtime.in" +#line 1238 "runtime.in" void pathToGuide(stack *Stack) { path p=vm::pop<path>(Stack); -#line 1241 "runtime.in" +#line 1239 "runtime.in" {Stack->push<guide*>(new pathguide(p)); return;} } -#line 1245 "runtime.in" +#line 1243 "runtime.in" void guideToPath(stack *Stack) { guide * g=vm::pop<guide *>(Stack); -#line 1246 "runtime.in" +#line 1244 "runtime.in" {Stack->push<path>(g->solve()); return;} } // Picture operations -#line 1252 "runtime.in" +#line 1250 "runtime.in" void newPicture(stack *Stack) { -#line 1253 "runtime.in" +#line 1251 "runtime.in" {Stack->push<picture*>(new picture()); return;} } -#line 1258 "runtime.in" +#line 1256 "runtime.in" // bool empty(picture *f); void gen21(stack *Stack) { picture * f=vm::pop<picture *>(Stack); -#line 1259 "runtime.in" +#line 1257 "runtime.in" {Stack->push<bool>(f->null()); return;} } -#line 1263 "runtime.in" +#line 1261 "runtime.in" // void erase(picture *f); void gen22(stack *Stack) { picture * f=vm::pop<picture *>(Stack); -#line 1264 "runtime.in" +#line 1262 "runtime.in" f->nodes.clear(); } -#line 1268 "runtime.in" +#line 1266 "runtime.in" // pair min(picture *f); void gen23(stack *Stack) { picture * f=vm::pop<picture *>(Stack); -#line 1269 "runtime.in" +#line 1267 "runtime.in" {Stack->push<pair>(f->bounds().Min()); return;} } -#line 1273 "runtime.in" +#line 1271 "runtime.in" // pair max(picture *f); void gen24(stack *Stack) { picture * f=vm::pop<picture *>(Stack); -#line 1274 "runtime.in" +#line 1272 "runtime.in" {Stack->push<pair>(f->bounds().Max()); return;} } -#line 1278 "runtime.in" +#line 1276 "runtime.in" // void label(picture *f, string *s, string *size, transform t, pair position, pair align, pen p); void gen25(stack *Stack) { @@ -1327,26 +1325,26 @@ void gen25(stack *Stack) string * size=vm::pop<string *>(Stack); string * s=vm::pop<string *>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 1280 "runtime.in" +#line 1278 "runtime.in" f->append(new drawLabel(*s,*size,t,position,align,p)); } -#line 1284 "runtime.in" +#line 1282 "runtime.in" // bool labels(picture *f); void gen26(stack *Stack) { picture * f=vm::pop<picture *>(Stack); -#line 1285 "runtime.in" +#line 1283 "runtime.in" {Stack->push<bool>(f->havelabels()); return;} } -#line 1289 "runtime.in" +#line 1287 "runtime.in" // realarray* texsize(string *s, pen p=CURRENTPEN); void gen27(stack *Stack) { pen p=vm::pop<pen>(Stack,CURRENTPEN); string * s=vm::pop<string *>(Stack); -#line 1290 "runtime.in" +#line 1288 "runtime.in" texinit(); processDataStruct &pd=processData(); @@ -1365,13 +1363,13 @@ void gen27(stack *Stack) {Stack->push<realarray*>(t); return;} } -#line 1309 "runtime.in" +#line 1307 "runtime.in" // patharray* _texpath(string *s, pen p=CURRENTPEN); void gen28(stack *Stack) { pen p=vm::pop<pen>(Stack,CURRENTPEN); string * s=vm::pop<string *>(Stack); -#line 1310 "runtime.in" +#line 1308 "runtime.in" array *P=new array(0); if(s->empty()) {Stack->push<patharray*>(P); return;} @@ -1465,17 +1463,16 @@ void gen28(stack *Stack) unlink(auxname(prefix,"tui").c_str()); } } - {Stack->push<patharray*>(readpath(psname,keep,twelvepercent, - pdf ? twelvepercent : -twelvepercent)); return;} + {Stack->push<patharray*>(pdf ? readpath(psname,keep,0.1) : readpath(psname,keep,0.12,-1.0)); return;} } -#line 1408 "runtime.in" +#line 1405 "runtime.in" // patharray* textpath(string *s, pen p=CURRENTPEN); void gen29(stack *Stack) { pen p=vm::pop<pen>(Stack,CURRENTPEN); string * s=vm::pop<string *>(Stack); -#line 1409 "runtime.in" +#line 1406 "runtime.in" array *P=new array(0); if(s->empty()) {Stack->push<patharray*>(P); return;} @@ -1542,16 +1539,16 @@ void gen29(stack *Stack) bool keep=getSetting<bool>("keep"); if(!keep) // Delete temporary files. unlink(textname.c_str()); - {Stack->push<patharray*>(readpath(psname,keep,tenpercent,tenpercent)); return;} + {Stack->push<patharray*>(readpath(psname,keep,0.1)); return;} } -#line 1479 "runtime.in" +#line 1476 "runtime.in" // patharray* _strokepath(path g, pen p=CURRENTPEN); void gen30(stack *Stack) { pen p=vm::pop<pen>(Stack,CURRENTPEN); path g=vm::pop<path>(Stack); -#line 1480 "runtime.in" +#line 1477 "runtime.in" array *P=new array(0); if(g.size() == 0) {Stack->push<patharray*>(P); return;} @@ -1575,18 +1572,18 @@ void gen30(stack *Stack) {Stack->push<patharray*>(readpath(psname,getSetting<bool>("keep"))); return;} } -#line 1504 "runtime.in" +#line 1501 "runtime.in" // void _draw(picture *f, path g, pen p); void gen31(stack *Stack) { pen p=vm::pop<pen>(Stack); path g=vm::pop<path>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 1505 "runtime.in" +#line 1502 "runtime.in" f->append(new drawPath(g,p)); } -#line 1509 "runtime.in" +#line 1506 "runtime.in" // void fill(picture *f, patharray *g, pen p=CURRENTPEN, bool copy=true); void gen32(stack *Stack) { @@ -1594,12 +1591,12 @@ void gen32(stack *Stack) pen p=vm::pop<pen>(Stack,CURRENTPEN); patharray * g=vm::pop<patharray *>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 1510 "runtime.in" +#line 1507 "runtime.in" array *(*copyarray)(array *a)=copy ? copyArray: nop; f->append(new drawFill(*copyarray(g),false,p)); } -#line 1515 "runtime.in" +#line 1512 "runtime.in" // void latticeshade(picture *f, patharray *g, bool stroke=false, pen fillrule=CURRENTPEN, penarray2 *p, bool copy=true); void gen33(stack *Stack) { @@ -1609,12 +1606,12 @@ void gen33(stack *Stack) bool stroke=vm::pop<bool>(Stack,false); patharray * g=vm::pop<patharray *>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 1517 "runtime.in" +#line 1514 "runtime.in" array *(*copyarray)(array *a)=copy ? copyArray: nop; f->append(new drawLatticeShade(*copyarray(g),stroke,fillrule,*copyarray(p))); } -#line 1522 "runtime.in" +#line 1519 "runtime.in" // void axialshade(picture *f, patharray *g, bool stroke=false, pen pena, pair a, pen penb, pair b, bool copy=true); void gen34(stack *Stack) { @@ -1626,12 +1623,12 @@ void gen34(stack *Stack) bool stroke=vm::pop<bool>(Stack,false); patharray * g=vm::pop<patharray *>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 1524 "runtime.in" +#line 1521 "runtime.in" array *(*copyarray)(array *a)=copy ? copyArray: nop; f->append(new drawAxialShade(*copyarray(g),stroke,pena,a,penb,b)); } -#line 1529 "runtime.in" +#line 1526 "runtime.in" // void radialshade(picture *f, patharray *g, bool stroke=false, pen pena, pair a, real ra, pen penb, pair b, real rb, bool copy=true); void gen35(stack *Stack) { @@ -1645,12 +1642,12 @@ void gen35(stack *Stack) bool stroke=vm::pop<bool>(Stack,false); patharray * g=vm::pop<patharray *>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 1531 "runtime.in" +#line 1528 "runtime.in" array *(*copyarray)(array *a)=copy ? copyArray: nop; f->append(new drawRadialShade(*copyarray(g),stroke,pena,a,ra,penb,b,rb)); } -#line 1536 "runtime.in" +#line 1533 "runtime.in" // void gouraudshade(picture *f, patharray *g, bool stroke=false, pen fillrule=CURRENTPEN, penarray *p, pairarray *z, Intarray *edges, bool copy=true); void gen36(stack *Stack) { @@ -1662,7 +1659,7 @@ void gen36(stack *Stack) bool stroke=vm::pop<bool>(Stack,false); patharray * g=vm::pop<patharray *>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 1539 "runtime.in" +#line 1536 "runtime.in" array *(*copyarray)(array *a)=copy ? copyArray: nop; checkArrays(p,z); checkArrays(z,edges); @@ -1670,7 +1667,7 @@ void gen36(stack *Stack) *copyarray(z),*copyarray(edges))); } -#line 1547 "runtime.in" +#line 1544 "runtime.in" // void gouraudshade(picture *f, patharray *g, bool stroke=false, pen fillrule=CURRENTPEN, penarray *p, Intarray *edges, bool copy=true); void gen37(stack *Stack) { @@ -1681,7 +1678,7 @@ void gen37(stack *Stack) bool stroke=vm::pop<bool>(Stack,false); patharray * g=vm::pop<patharray *>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 1550 "runtime.in" +#line 1547 "runtime.in" array *(*copyarray)(array *a)=copy ? copyArray: nop; size_t n=checkArrays(p,edges); size_t m=checkArray(g); @@ -1702,7 +1699,7 @@ void gen37(stack *Stack) *z,*copyarray(edges))); } -#line 1571 "runtime.in" +#line 1568 "runtime.in" // void tensorshade(picture *f, patharray *g, bool stroke=false, pen fillrule=CURRENTPEN, penarray2 *p, patharray *b=NULL, pairarray2 *z=emptyarray, bool copy=true); void gen38(stack *Stack) { @@ -1714,7 +1711,7 @@ void gen38(stack *Stack) bool stroke=vm::pop<bool>(Stack,false); patharray * g=vm::pop<patharray *>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 1574 "runtime.in" +#line 1571 "runtime.in" array *(*copyarray)(array *a)=copy ? copyArray: nop; array *(*copyarray2)(array *a)=copy ? copyArray2: nop; if(b == NULL) b=g; @@ -1726,7 +1723,7 @@ void gen38(stack *Stack) *copyarray(b),*copyarray2(z))); } -#line 1586 "runtime.in" +#line 1583 "runtime.in" // void functionshade(picture *f, patharray *g, bool stroke=false, pen fillrule=CURRENTPEN, string shader=emptystring, bool copy=true); void gen39(stack *Stack) { @@ -1736,14 +1733,14 @@ void gen39(stack *Stack) bool stroke=vm::pop<bool>(Stack,false); patharray * g=vm::pop<patharray *>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 1589 "runtime.in" +#line 1586 "runtime.in" array *(*copyarray)(array *a)=copy ? copyArray: nop; f->append(new drawFunctionShade(*copyarray(g),stroke,fillrule,shader)); } // Clip a picture to a superpath using the given fill rule. // Subsequent additions to the picture will not be affected by the clipping. -#line 1596 "runtime.in" +#line 1593 "runtime.in" // void clip(picture *f, patharray *g, bool stroke=false, pen fillrule=CURRENTPEN, bool copy=true); void gen40(stack *Stack) { @@ -1752,13 +1749,13 @@ void gen40(stack *Stack) bool stroke=vm::pop<bool>(Stack,false); patharray * g=vm::pop<patharray *>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 1598 "runtime.in" +#line 1595 "runtime.in" array *(*copyarray)(array *a)=copy ? copyArray: nop; drawClipBegin *begin=new drawClipBegin(*copyarray(g),stroke,fillrule,true); f->enclose(begin,new drawClipEnd(true,begin)); } -#line 1604 "runtime.in" +#line 1601 "runtime.in" // void beginclip(picture *f, patharray *g, bool stroke=false, pen fillrule=CURRENTPEN, bool copy=true); void gen41(stack *Stack) { @@ -1767,97 +1764,97 @@ void gen41(stack *Stack) bool stroke=vm::pop<bool>(Stack,false); patharray * g=vm::pop<patharray *>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 1606 "runtime.in" +#line 1603 "runtime.in" array *(*copyarray)(array *a)=copy ? copyArray: nop; f->append(new drawClipBegin(*copyarray(g),stroke,fillrule,false)); } -#line 1611 "runtime.in" +#line 1608 "runtime.in" // void endclip(picture *f); void gen42(stack *Stack) { picture * f=vm::pop<picture *>(Stack); -#line 1612 "runtime.in" +#line 1609 "runtime.in" f->append(new drawClipEnd(false)); } -#line 1616 "runtime.in" +#line 1613 "runtime.in" // void gsave(picture *f); void gen43(stack *Stack) { picture * f=vm::pop<picture *>(Stack); -#line 1617 "runtime.in" +#line 1614 "runtime.in" f->append(new drawGsave()); } -#line 1621 "runtime.in" +#line 1618 "runtime.in" // void grestore(picture *f); void gen44(stack *Stack) { picture * f=vm::pop<picture *>(Stack); -#line 1622 "runtime.in" +#line 1619 "runtime.in" f->append(new drawGrestore()); } -#line 1626 "runtime.in" +#line 1623 "runtime.in" // void begingroup(picture *f); void gen45(stack *Stack) { picture * f=vm::pop<picture *>(Stack); -#line 1627 "runtime.in" +#line 1624 "runtime.in" f->append(new drawBegin()); } -#line 1631 "runtime.in" +#line 1628 "runtime.in" // void endgroup(picture *f); void gen46(stack *Stack) { picture * f=vm::pop<picture *>(Stack); -#line 1632 "runtime.in" +#line 1629 "runtime.in" f->append(new drawEnd()); } -#line 1636 "runtime.in" +#line 1633 "runtime.in" // void add(picture *dest, picture *src); void gen47(stack *Stack) { picture * src=vm::pop<picture *>(Stack); picture * dest=vm::pop<picture *>(Stack); -#line 1637 "runtime.in" +#line 1634 "runtime.in" dest->add(*src); } -#line 1641 "runtime.in" +#line 1638 "runtime.in" // void prepend(picture *dest, picture *src); void gen48(stack *Stack) { picture * src=vm::pop<picture *>(Stack); picture * dest=vm::pop<picture *>(Stack); -#line 1642 "runtime.in" +#line 1639 "runtime.in" dest->prepend(*src); } -#line 1646 "runtime.in" +#line 1643 "runtime.in" // void postscript(picture *f, string s); void gen49(stack *Stack) { string s=vm::pop<string>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 1647 "runtime.in" +#line 1644 "runtime.in" f->append(new drawVerbatim(PostScript,s)); } -#line 1651 "runtime.in" +#line 1648 "runtime.in" // void tex(picture *f, string s); void gen50(stack *Stack) { string s=vm::pop<string>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 1652 "runtime.in" +#line 1649 "runtime.in" f->append(new drawVerbatim(TeX,s)); } -#line 1656 "runtime.in" +#line 1653 "runtime.in" // void postscript(picture *f, string s, pair min, pair max); void gen51(stack *Stack) { @@ -1865,11 +1862,11 @@ void gen51(stack *Stack) pair min=vm::pop<pair>(Stack); string s=vm::pop<string>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 1657 "runtime.in" +#line 1654 "runtime.in" f->append(new drawVerbatim(PostScript,s,min,max)); } -#line 1661 "runtime.in" +#line 1658 "runtime.in" // void tex(picture *f, string s, pair min, pair max); void gen52(stack *Stack) { @@ -1877,33 +1874,33 @@ void gen52(stack *Stack) pair min=vm::pop<pair>(Stack); string s=vm::pop<string>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 1662 "runtime.in" +#line 1659 "runtime.in" f->append(new drawVerbatim(TeX,s,min,max)); } -#line 1666 "runtime.in" +#line 1663 "runtime.in" // void texpreamble(string s); void gen53(stack *Stack) { string s=vm::pop<string>(Stack); -#line 1667 "runtime.in" +#line 1664 "runtime.in" string t=s+"\n"; processDataStruct &pd=processData(); pd.TeXpipepreamble.push_back(t); pd.TeXpreamble.push_back(t); } -#line 1674 "runtime.in" +#line 1671 "runtime.in" // void deletepreamble(); void gen54(stack *) { -#line 1675 "runtime.in" +#line 1672 "runtime.in" if(getSetting<bool>("inlinetex")) { unlink(auxname(outname(),"pre").c_str()); } } -#line 1681 "runtime.in" +#line 1678 "runtime.in" // void _labelpath(picture *f, string s, string size, path g, string justify, pair offset, pen p); void gen55(stack *Stack) { @@ -1914,40 +1911,40 @@ void gen55(stack *Stack) string size=vm::pop<string>(Stack); string s=vm::pop<string>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 1683 "runtime.in" +#line 1680 "runtime.in" f->append(new drawLabelPath(s,size,g,justify,offset,p)); } -#line 1687 "runtime.in" +#line 1684 "runtime.in" // void texreset(); void gen56(stack *) { -#line 1688 "runtime.in" +#line 1685 "runtime.in" processDataStruct &pd=processData(); pd.TeXpipepreamble.clear(); pd.TeXpreamble.clear(); pd.tex.pipeclose(); } -#line 1695 "runtime.in" +#line 1692 "runtime.in" // void layer(picture *f); void gen57(stack *Stack) { picture * f=vm::pop<picture *>(Stack); -#line 1696 "runtime.in" +#line 1693 "runtime.in" f->append(new drawLayer()); } -#line 1700 "runtime.in" +#line 1697 "runtime.in" // void newpage(picture *f); void gen58(stack *Stack) { picture * f=vm::pop<picture *>(Stack); -#line 1701 "runtime.in" +#line 1698 "runtime.in" f->append(new drawNewPage()); } -#line 1705 "runtime.in" +#line 1702 "runtime.in" // void _image(picture *f, realarray2 *data, pair initial, pair final, penarray *palette=NULL, transform t=identity, bool copy=true, bool antialias=false); void gen59(stack *Stack) { @@ -1959,14 +1956,14 @@ void gen59(stack *Stack) pair initial=vm::pop<pair>(Stack); realarray2 * data=vm::pop<realarray2 *>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 1708 "runtime.in" +#line 1705 "runtime.in" array *(*copyarray)(array *a)=copy ? copyArray: nop; array *(*copyarray2)(array *a)=copy ? copyArray2: nop; f->append(new drawImage(*copyarray2(data),*copyarray(palette), t*matrix(initial,final),antialias)); } -#line 1715 "runtime.in" +#line 1712 "runtime.in" // void _image(picture *f, penarray2 *data, pair initial, pair final, transform t=identity, bool copy=true, bool antialias=false); void gen60(stack *Stack) { @@ -1977,36 +1974,36 @@ void gen60(stack *Stack) pair initial=vm::pop<pair>(Stack); penarray2 * data=vm::pop<penarray2 *>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 1717 "runtime.in" +#line 1714 "runtime.in" array *(*copyarray2)(array *a)=copy ? copyArray2: nop; f->append(new drawImage(*copyarray2(data),t*matrix(initial,final),antialias)); } -#line 1722 "runtime.in" +#line 1719 "runtime.in" // string nativeformat(); void gen61(stack *Stack) { -#line 1723 "runtime.in" +#line 1720 "runtime.in" {Stack->push<string>(nativeformat()); return;} } -#line 1727 "runtime.in" +#line 1724 "runtime.in" // bool latex(); void gen62(stack *Stack) { -#line 1728 "runtime.in" +#line 1725 "runtime.in" {Stack->push<bool>(latex(getSetting<string>("tex"))); return;} } -#line 1732 "runtime.in" +#line 1729 "runtime.in" // bool pdf(); void gen63(stack *Stack) { -#line 1733 "runtime.in" +#line 1730 "runtime.in" {Stack->push<bool>(pdf(getSetting<string>("tex"))); return;} } -#line 1737 "runtime.in" +#line 1734 "runtime.in" // void shipout(string prefix=emptystring, picture *f, picture *preamble=NULL, string format=emptystring, bool wait=false, bool view=true, callableTransform *xform); void gen64(stack *Stack) { @@ -2017,7 +2014,7 @@ void gen64(stack *Stack) picture * preamble=vm::pop<picture *>(Stack,NULL); picture * f=vm::pop<picture *>(Stack); string prefix=vm::pop<string>(Stack,emptystring); -#line 1740 "runtime.in" +#line 1737 "runtime.in" if(prefix.empty()) prefix=outname(); picture *result=new picture; @@ -2060,7 +2057,7 @@ void gen64(stack *Stack) result->shipout(preamble,prefix,format,0.0,wait,view); } -#line 1783 "runtime.in" +#line 1780 "runtime.in" // void shipout3(string prefix, picture *f, string format=emptystring, real width, real height, real angle, real zoom, triple m, triple M, pair shift, realarray2 *t, realarray *background, triplearray *lights, realarray2 *diffuse, realarray2 *ambient, realarray2 *specular, bool viewportlighting, bool view=true); void gen65(stack *Stack) { @@ -2082,7 +2079,7 @@ void gen65(stack *Stack) string format=vm::pop<string>(Stack,emptystring); picture * f=vm::pop<picture *>(Stack); string prefix=vm::pop<string>(Stack); -#line 1789 "runtime.in" +#line 1786 "runtime.in" size_t n=checkArrays(lights,diffuse); checkEqual(n,checkArray(ambient)); checkEqual(n,checkArray(specular)); @@ -2094,17 +2091,17 @@ void gen65(stack *Stack) copyArray2C(specular,false,4),viewportlighting,view); } -#line 1801 "runtime.in" +#line 1798 "runtime.in" // void shipout3(string prefix, picture *f); void gen66(stack *Stack) { picture * f=vm::pop<picture *>(Stack); string prefix=vm::pop<string>(Stack); -#line 1802 "runtime.in" +#line 1799 "runtime.in" f->shipout3(prefix); } -#line 1806 "runtime.in" +#line 1803 "runtime.in" // void deconstruct(picture *f, picture *preamble=NULL, real magnification=1, callableTransform *xform); void gen67(stack *Stack) { @@ -2112,7 +2109,7 @@ void gen67(stack *Stack) real magnification=vm::pop<real>(Stack,1); picture * preamble=vm::pop<picture *>(Stack,NULL); picture * f=vm::pop<picture *>(Stack); -#line 1808 "runtime.in" +#line 1805 "runtime.in" unsigned level=0; unsigned n=0; @@ -2233,188 +2230,188 @@ void gen67(stack *Stack) } } -#line 1929 "runtime.in" +#line 1926 "runtime.in" // void purge(Int divisor=0); void gen68(stack *Stack) { Int divisor=vm::pop<Int>(Stack,0); -#line 1930 "runtime.in" +#line 1927 "runtime.in" purge(divisor); } // Pen operations -#line 1936 "runtime.in" +#line 1933 "runtime.in" void newPen(stack *Stack) { -#line 1937 "runtime.in" +#line 1934 "runtime.in" {Stack->push<pen>(pen()); return;} } -#line 1942 "runtime.in" +#line 1939 "runtime.in" // bool ==(pen a, pen b); void gen70(stack *Stack) { pen b=vm::pop<pen>(Stack); pen a=vm::pop<pen>(Stack); -#line 1943 "runtime.in" +#line 1940 "runtime.in" {Stack->push<bool>(a == b); return;} } -#line 1947 "runtime.in" +#line 1944 "runtime.in" // bool !=(pen a, pen b); void gen71(stack *Stack) { pen b=vm::pop<pen>(Stack); pen a=vm::pop<pen>(Stack); -#line 1948 "runtime.in" +#line 1945 "runtime.in" {Stack->push<bool>(a != b); return;} } -#line 1952 "runtime.in" +#line 1949 "runtime.in" // pen +(pen a, pen b); void gen72(stack *Stack) { pen b=vm::pop<pen>(Stack); pen a=vm::pop<pen>(Stack); -#line 1953 "runtime.in" +#line 1950 "runtime.in" {Stack->push<pen>(a+b); return;} } -#line 1957 "runtime.in" +#line 1954 "runtime.in" // pen *(real a, pen b); void gen73(stack *Stack) { pen b=vm::pop<pen>(Stack); real a=vm::pop<real>(Stack); -#line 1958 "runtime.in" +#line 1955 "runtime.in" {Stack->push<pen>(a*b); return;} } -#line 1962 "runtime.in" +#line 1959 "runtime.in" // pen *(pen a, real b); void gen74(stack *Stack) { real b=vm::pop<real>(Stack); pen a=vm::pop<pen>(Stack); -#line 1963 "runtime.in" +#line 1960 "runtime.in" {Stack->push<pen>(b*a); return;} } -#line 1967 "runtime.in" +#line 1964 "runtime.in" // pair max(pen p); void gen75(stack *Stack) { pen p=vm::pop<pen>(Stack); -#line 1968 "runtime.in" +#line 1965 "runtime.in" {Stack->push<pair>(p.bounds().Max()); return;} } -#line 1972 "runtime.in" +#line 1969 "runtime.in" // pair min(pen p); void gen76(stack *Stack) { pen p=vm::pop<pen>(Stack); -#line 1973 "runtime.in" +#line 1970 "runtime.in" {Stack->push<pair>(p.bounds().Min()); return;} } // Reset the meaning of pen default attributes. -#line 1978 "runtime.in" +#line 1975 "runtime.in" // void resetdefaultpen(); void gen77(stack *) { -#line 1979 "runtime.in" +#line 1976 "runtime.in" processData().defaultpen=camp::pen::initialpen(); } -#line 1983 "runtime.in" +#line 1980 "runtime.in" // void defaultpen(pen p); void gen78(stack *Stack) { pen p=vm::pop<pen>(Stack); -#line 1984 "runtime.in" +#line 1981 "runtime.in" processData().defaultpen=pen(resolvepen,p); } -#line 1988 "runtime.in" +#line 1985 "runtime.in" // pen defaultpen(); void gen79(stack *Stack) { -#line 1989 "runtime.in" +#line 1986 "runtime.in" {Stack->push<pen>(processData().defaultpen); return;} } -#line 1993 "runtime.in" +#line 1990 "runtime.in" // bool invisible(pen p); void gen80(stack *Stack) { pen p=vm::pop<pen>(Stack); -#line 1994 "runtime.in" +#line 1991 "runtime.in" {Stack->push<bool>(p.invisible()); return;} } -#line 1998 "runtime.in" +#line 1995 "runtime.in" // pen invisible(); void gen81(stack *Stack) { -#line 1999 "runtime.in" +#line 1996 "runtime.in" {Stack->push<pen>(pen(invisiblepen)); return;} } -#line 2003 "runtime.in" +#line 2000 "runtime.in" // pen gray(pen p); void gen82(stack *Stack) { pen p=vm::pop<pen>(Stack); -#line 2004 "runtime.in" +#line 2001 "runtime.in" p.togrey(); {Stack->push<pen>(p); return;} } -#line 2009 "runtime.in" +#line 2006 "runtime.in" // pen rgb(pen p); void gen83(stack *Stack) { pen p=vm::pop<pen>(Stack); -#line 2010 "runtime.in" +#line 2007 "runtime.in" p.torgb(); {Stack->push<pen>(p); return;} } -#line 2015 "runtime.in" +#line 2012 "runtime.in" // pen cmyk(pen p); void gen84(stack *Stack) { pen p=vm::pop<pen>(Stack); -#line 2016 "runtime.in" +#line 2013 "runtime.in" p.tocmyk(); {Stack->push<pen>(p); return;} } -#line 2021 "runtime.in" +#line 2018 "runtime.in" // pen interp(pen a, pen b, real t); void gen85(stack *Stack) { real t=vm::pop<real>(Stack); pen b=vm::pop<pen>(Stack); pen a=vm::pop<pen>(Stack); -#line 2022 "runtime.in" +#line 2019 "runtime.in" {Stack->push<pen>(interpolate(a,b,t)); return;} } -#line 2026 "runtime.in" +#line 2023 "runtime.in" // pen rgb(real r, real g, real b); void gen86(stack *Stack) { real b=vm::pop<real>(Stack); real g=vm::pop<real>(Stack); real r=vm::pop<real>(Stack); -#line 2027 "runtime.in" +#line 2024 "runtime.in" {Stack->push<pen>(pen(r,g,b)); return;} } -#line 2031 "runtime.in" +#line 2028 "runtime.in" // pen cmyk(real c, real m, real y, real k); void gen87(stack *Stack) { @@ -2422,25 +2419,25 @@ void gen87(stack *Stack) real y=vm::pop<real>(Stack); real m=vm::pop<real>(Stack); real c=vm::pop<real>(Stack); -#line 2032 "runtime.in" +#line 2029 "runtime.in" {Stack->push<pen>(pen(c,m,y,k)); return;} } -#line 2036 "runtime.in" +#line 2033 "runtime.in" // pen gray(real gray); void gen88(stack *Stack) { real gray=vm::pop<real>(Stack); -#line 2037 "runtime.in" +#line 2034 "runtime.in" {Stack->push<pen>(pen(gray)); return;} } -#line 2041 "runtime.in" +#line 2038 "runtime.in" // realarray* colors(pen p); void gen89(stack *Stack) { pen p=vm::pop<pen>(Stack); -#line 2042 "runtime.in" +#line 2039 "runtime.in" size_t n=ColorComponents[p.colorspace()]; array *a=new array(n); @@ -2467,60 +2464,60 @@ void gen89(stack *Stack) {Stack->push<realarray*>(a); return;} } -#line 2069 "runtime.in" +#line 2066 "runtime.in" // string colorspace(pen p); void gen90(stack *Stack) { pen p=vm::pop<pen>(Stack); -#line 2070 "runtime.in" +#line 2067 "runtime.in" string s=ColorDeviceSuffix[p.colorspace()]; std::transform(s.begin(),s.end(),s.begin(),tolower); {Stack->push<string>(s); return;} } -#line 2076 "runtime.in" +#line 2073 "runtime.in" // pen pattern(string *s); void gen91(stack *Stack) { string * s=vm::pop<string *>(Stack); -#line 2077 "runtime.in" +#line 2074 "runtime.in" {Stack->push<pen>(pen(setpattern,*s)); return;} } -#line 2081 "runtime.in" +#line 2078 "runtime.in" // string pattern(pen p); void gen92(stack *Stack) { pen p=vm::pop<pen>(Stack); -#line 2082 "runtime.in" +#line 2079 "runtime.in" {Stack->push<string>(p.fillpattern()); return;} } -#line 2086 "runtime.in" +#line 2083 "runtime.in" // pen fillrule(Int n); void gen93(stack *Stack) { Int n=vm::pop<Int>(Stack); -#line 2087 "runtime.in" +#line 2084 "runtime.in" {Stack->push<pen>(pen(n >= 0 && n < nFill ? (FillRule) n : DEFFILL)); return;} } -#line 2091 "runtime.in" +#line 2088 "runtime.in" // Int fillrule(pen p); void gen94(stack *Stack) { pen p=vm::pop<pen>(Stack); -#line 2092 "runtime.in" +#line 2089 "runtime.in" {Stack->push<Int>(p.Fillrule()); return;} } -#line 2096 "runtime.in" +#line 2093 "runtime.in" // pen opacity(real opacity=1.0, string blend=defaulttransparency); void gen95(stack *Stack) { string blend=vm::pop<string>(Stack,defaulttransparency); real opacity=vm::pop<real>(Stack,1.0); -#line 2097 "runtime.in" +#line 2094 "runtime.in" for(Int i=0; i < nBlendMode; ++i) if(blend == BlendMode[i]) {Stack->push<pen>(pen(Transparency(blend,opacity))); return;} @@ -2529,25 +2526,25 @@ void gen95(stack *Stack) error(buf); } -#line 2106 "runtime.in" +#line 2103 "runtime.in" // real opacity(pen p); void gen96(stack *Stack) { pen p=vm::pop<pen>(Stack); -#line 2107 "runtime.in" +#line 2104 "runtime.in" {Stack->push<real>(p.opacity()); return;} } -#line 2111 "runtime.in" +#line 2108 "runtime.in" // string blend(pen p); void gen97(stack *Stack) { pen p=vm::pop<pen>(Stack); -#line 2112 "runtime.in" +#line 2109 "runtime.in" {Stack->push<string>(p.blend()); return;} } -#line 2116 "runtime.in" +#line 2113 "runtime.in" // pen linetype(string *s, real offset=0, bool scale=true, bool adjust=true); void gen98(stack *Stack) { @@ -2555,275 +2552,275 @@ void gen98(stack *Stack) bool scale=vm::pop<bool>(Stack,true); real offset=vm::pop<real>(Stack,0); string * s=vm::pop<string *>(Stack); -#line 2117 "runtime.in" +#line 2114 "runtime.in" {Stack->push<pen>(pen(LineType(*s,offset,scale,adjust))); return;} } -#line 2121 "runtime.in" +#line 2118 "runtime.in" // string linetype(pen p=CURRENTPEN); void gen99(stack *Stack) { pen p=vm::pop<pen>(Stack,CURRENTPEN); -#line 2122 "runtime.in" +#line 2119 "runtime.in" {Stack->push<string>(p.stroke()); return;} } -#line 2126 "runtime.in" +#line 2123 "runtime.in" // real offset(pen p); void gen100(stack *Stack) { pen p=vm::pop<pen>(Stack); -#line 2127 "runtime.in" +#line 2124 "runtime.in" {Stack->push<real>(p.linetype().offset); return;} } -#line 2131 "runtime.in" +#line 2128 "runtime.in" // bool scale(pen p); void gen101(stack *Stack) { pen p=vm::pop<pen>(Stack); -#line 2132 "runtime.in" +#line 2129 "runtime.in" {Stack->push<bool>(p.linetype().scale); return;} } -#line 2136 "runtime.in" +#line 2133 "runtime.in" // bool adjust(pen p); void gen102(stack *Stack) { pen p=vm::pop<pen>(Stack); -#line 2137 "runtime.in" +#line 2134 "runtime.in" {Stack->push<bool>(p.linetype().adjust); return;} } -#line 2141 "runtime.in" +#line 2138 "runtime.in" // pen adjust(pen p, real arclength, bool cyclic); void gen103(stack *Stack) { bool cyclic=vm::pop<bool>(Stack); real arclength=vm::pop<real>(Stack); pen p=vm::pop<pen>(Stack); -#line 2142 "runtime.in" +#line 2139 "runtime.in" {Stack->push<pen>(adjustdash(p,arclength,cyclic)); return;} } -#line 2146 "runtime.in" +#line 2143 "runtime.in" // pen linecap(Int n); void gen104(stack *Stack) { Int n=vm::pop<Int>(Stack); -#line 2147 "runtime.in" +#line 2144 "runtime.in" {Stack->push<pen>(pen(setlinecap,n >= 0 && n < nCap ? n : DEFCAP)); return;} } -#line 2151 "runtime.in" +#line 2148 "runtime.in" // Int linecap(pen p=CURRENTPEN); void gen105(stack *Stack) { pen p=vm::pop<pen>(Stack,CURRENTPEN); -#line 2152 "runtime.in" +#line 2149 "runtime.in" {Stack->push<Int>(p.cap()); return;} } -#line 2156 "runtime.in" +#line 2153 "runtime.in" // pen linejoin(Int n); void gen106(stack *Stack) { Int n=vm::pop<Int>(Stack); -#line 2157 "runtime.in" +#line 2154 "runtime.in" {Stack->push<pen>(pen(setlinejoin,n >= 0 && n < nJoin ? n : DEFJOIN)); return;} } -#line 2161 "runtime.in" +#line 2158 "runtime.in" // Int linejoin(pen p=CURRENTPEN); void gen107(stack *Stack) { pen p=vm::pop<pen>(Stack,CURRENTPEN); -#line 2162 "runtime.in" +#line 2159 "runtime.in" {Stack->push<Int>(p.join()); return;} } -#line 2166 "runtime.in" +#line 2163 "runtime.in" // pen miterlimit(real x); void gen108(stack *Stack) { real x=vm::pop<real>(Stack); -#line 2167 "runtime.in" +#line 2164 "runtime.in" {Stack->push<pen>(pen(setmiterlimit,x >= 1.0 ? x : DEFJOIN)); return;} } -#line 2171 "runtime.in" +#line 2168 "runtime.in" // real miterlimit(pen p=CURRENTPEN); void gen109(stack *Stack) { pen p=vm::pop<pen>(Stack,CURRENTPEN); -#line 2172 "runtime.in" +#line 2169 "runtime.in" {Stack->push<real>(p.miter()); return;} } -#line 2176 "runtime.in" +#line 2173 "runtime.in" // pen linewidth(real x); void gen110(stack *Stack) { real x=vm::pop<real>(Stack); -#line 2177 "runtime.in" +#line 2174 "runtime.in" {Stack->push<pen>(pen(setlinewidth,x >= 0.0 ? x : DEFWIDTH)); return;} } -#line 2181 "runtime.in" +#line 2178 "runtime.in" // real linewidth(pen p=CURRENTPEN); void gen111(stack *Stack) { pen p=vm::pop<pen>(Stack,CURRENTPEN); -#line 2182 "runtime.in" +#line 2179 "runtime.in" {Stack->push<real>(p.width()); return;} } -#line 2186 "runtime.in" +#line 2183 "runtime.in" // pen fontcommand(string *s); void gen112(stack *Stack) { string * s=vm::pop<string *>(Stack); -#line 2187 "runtime.in" +#line 2184 "runtime.in" {Stack->push<pen>(pen(setfont,*s)); return;} } -#line 2191 "runtime.in" +#line 2188 "runtime.in" // string font(pen p=CURRENTPEN); void gen113(stack *Stack) { pen p=vm::pop<pen>(Stack,CURRENTPEN); -#line 2192 "runtime.in" +#line 2189 "runtime.in" {Stack->push<string>(p.Font()); return;} } -#line 2196 "runtime.in" +#line 2193 "runtime.in" // pen fontsize(real size, real lineskip); void gen114(stack *Stack) { real lineskip=vm::pop<real>(Stack); real size=vm::pop<real>(Stack); -#line 2197 "runtime.in" +#line 2194 "runtime.in" {Stack->push<pen>(pen(setfontsize,size > 0.0 ? size : 0.0, lineskip > 0.0 ? lineskip : 0.0)); return;} } -#line 2202 "runtime.in" +#line 2199 "runtime.in" // real fontsize(pen p=CURRENTPEN); void gen115(stack *Stack) { pen p=vm::pop<pen>(Stack,CURRENTPEN); -#line 2203 "runtime.in" +#line 2200 "runtime.in" {Stack->push<real>(p.size()); return;} } -#line 2207 "runtime.in" +#line 2204 "runtime.in" // real lineskip(pen p=CURRENTPEN); void gen116(stack *Stack) { pen p=vm::pop<pen>(Stack,CURRENTPEN); -#line 2208 "runtime.in" +#line 2205 "runtime.in" {Stack->push<real>(p.Lineskip()); return;} } -#line 2212 "runtime.in" +#line 2209 "runtime.in" // pen overwrite(Int n); void gen117(stack *Stack) { Int n=vm::pop<Int>(Stack); -#line 2213 "runtime.in" +#line 2210 "runtime.in" {Stack->push<pen>(pen(setoverwrite,n >= 0 && n < nOverwrite ? (overwrite_t) n : DEFWRITE)); return;} } -#line 2218 "runtime.in" +#line 2215 "runtime.in" // Int overwrite(pen p=CURRENTPEN); void gen118(stack *Stack) { pen p=vm::pop<pen>(Stack,CURRENTPEN); -#line 2219 "runtime.in" +#line 2216 "runtime.in" {Stack->push<Int>(p.Overwrite()); return;} } -#line 2223 "runtime.in" +#line 2220 "runtime.in" // pen basealign(Int n); void gen119(stack *Stack) { Int n=vm::pop<Int>(Stack); -#line 2224 "runtime.in" +#line 2221 "runtime.in" {Stack->push<pen>(pen(n >= 0 && n < nBaseLine ? (BaseLine) n : DEFBASE)); return;} } -#line 2228 "runtime.in" +#line 2225 "runtime.in" // Int basealign(pen p=CURRENTPEN); void gen120(stack *Stack) { pen p=vm::pop<pen>(Stack,CURRENTPEN); -#line 2229 "runtime.in" +#line 2226 "runtime.in" {Stack->push<Int>(p.Baseline()); return;} } -#line 2233 "runtime.in" +#line 2230 "runtime.in" // transform transform(pen p); void gen121(stack *Stack) { pen p=vm::pop<pen>(Stack); -#line 2234 "runtime.in" +#line 2231 "runtime.in" {Stack->push<transform>(p.getTransform()); return;} } -#line 2238 "runtime.in" +#line 2235 "runtime.in" // path nib(pen p); void gen122(stack *Stack) { pen p=vm::pop<pen>(Stack); -#line 2239 "runtime.in" +#line 2236 "runtime.in" {Stack->push<path>(p.Path()); return;} } -#line 2243 "runtime.in" +#line 2240 "runtime.in" // pen makepen(path p); void gen123(stack *Stack) { path p=vm::pop<path>(Stack); -#line 2244 "runtime.in" +#line 2241 "runtime.in" {Stack->push<pen>(pen(p)); return;} } -#line 2248 "runtime.in" +#line 2245 "runtime.in" // pen colorless(pen p); void gen124(stack *Stack) { pen p=vm::pop<pen>(Stack); -#line 2249 "runtime.in" +#line 2246 "runtime.in" p.colorless(); {Stack->push<pen>(p); return;} } // Interactive mode -#line 2255 "runtime.in" +#line 2252 "runtime.in" // bool interactive(); void gen125(stack *Stack) { -#line 2256 "runtime.in" +#line 2253 "runtime.in" {Stack->push<bool>(interact::interactive); return;} } -#line 2261 "runtime.in" +#line 2258 "runtime.in" // bool uptodate(); void gen126(stack *Stack) { -#line 2262 "runtime.in" +#line 2259 "runtime.in" {Stack->push<bool>(interact::uptodate); return;} } // System commands -#line 2268 "runtime.in" +#line 2265 "runtime.in" // Int system(stringarray *s); void gen127(stack *Stack) { stringarray * s=vm::pop<stringarray *>(Stack); -#line 2269 "runtime.in" +#line 2266 "runtime.in" if(safe) error("system() call disabled; override with option -nosafe"); size_t size=checkArray(s); if(size == 0) {Stack->push<Int>(0); return;} @@ -2833,57 +2830,57 @@ void gen127(stack *Stack) {Stack->push<Int>(System(cmd)); return;} } -#line 2280 "runtime.in" +#line 2277 "runtime.in" // bool view(); void gen128(stack *Stack) { -#line 2281 "runtime.in" +#line 2278 "runtime.in" {Stack->push<bool>(view()); return;} } -#line 2285 "runtime.in" +#line 2282 "runtime.in" // string asydir(); void gen129(stack *Stack) { -#line 2286 "runtime.in" +#line 2283 "runtime.in" {Stack->push<string>(systemDir); return;} } -#line 2290 "runtime.in" +#line 2287 "runtime.in" // string locale(string s=emptystring); void gen130(stack *Stack) { string s=vm::pop<string>(Stack,emptystring); -#line 2291 "runtime.in" +#line 2288 "runtime.in" char *L=setlocale(LC_ALL,s.empty() ? NULL : s.c_str()); {Stack->push<string>(L != NULL ? string(L) : ""); return;} } -#line 2296 "runtime.in" +#line 2293 "runtime.in" // void abort(string s=emptystring); void gen131(stack *Stack) { string s=vm::pop<string>(Stack,emptystring); -#line 2297 "runtime.in" +#line 2294 "runtime.in" if(s.empty()) throw handled_error(); error(s.c_str()); } -#line 2302 "runtime.in" +#line 2299 "runtime.in" // void exit(); void gen132(stack *) { -#line 2303 "runtime.in" +#line 2300 "runtime.in" throw quit(); } -#line 2307 "runtime.in" +#line 2304 "runtime.in" // void assert(bool b, string s=emptystring); void gen133(stack *Stack) { string s=vm::pop<string>(Stack,emptystring); bool b=vm::pop<bool>(Stack); -#line 2308 "runtime.in" +#line 2305 "runtime.in" flush(cout); if(!b) { ostringstream buf; @@ -2893,34 +2890,34 @@ void gen133(stack *Stack) } } -#line 2318 "runtime.in" +#line 2315 "runtime.in" // void sleep(Int seconds); void gen134(stack *Stack) { Int seconds=vm::pop<Int>(Stack); -#line 2319 "runtime.in" +#line 2316 "runtime.in" if(seconds <= 0) return; sleep(seconds); } -#line 2324 "runtime.in" +#line 2321 "runtime.in" // void usleep(Int microseconds); void gen135(stack *Stack) { Int microseconds=vm::pop<Int>(Stack); -#line 2325 "runtime.in" +#line 2322 "runtime.in" if(microseconds <= 0) return; usleep((unsigned long) microseconds); } -#line 2330 "runtime.in" +#line 2327 "runtime.in" // void _eval(string *s, bool embedded, bool interactiveWrite=false); void gen136(stack *Stack) { bool interactiveWrite=vm::pop<bool>(Stack,false); bool embedded=vm::pop<bool>(Stack); string * s=vm::pop<string *>(Stack); -#line 2331 "runtime.in" +#line 2328 "runtime.in" if (embedded) { trans::coenv *e=Stack->getEnvironment(); vm::interactiveStack *is=dynamic_cast<vm::interactiveStack *>(Stack); @@ -2934,13 +2931,13 @@ void gen136(stack *Stack) } } -#line 2345 "runtime.in" +#line 2342 "runtime.in" // void _eval(runnable *s, bool embedded); void gen137(stack *Stack) { bool embedded=vm::pop<bool>(Stack); runnable * s=vm::pop<runnable *>(Stack); -#line 2346 "runtime.in" +#line 2343 "runtime.in" absyntax::block *ast=new absyntax::block(s->getPos(), false); ast->add(s); @@ -2957,42 +2954,42 @@ void gen137(stack *Stack) } } -#line 2363 "runtime.in" +#line 2360 "runtime.in" // string location(); void gen138(stack *Stack) { -#line 2364 "runtime.in" +#line 2361 "runtime.in" ostringstream buf; buf << getPos(); {Stack->push<string>(buf.str()); return;} } // Wrapper for the stack::load() method. -#line 2370 "runtime.in" +#line 2367 "runtime.in" void loadModule(stack *Stack) { string * index=vm::pop<string *>(Stack); -#line 2371 "runtime.in" +#line 2368 "runtime.in" Stack->load(*index); } -#line 2375 "runtime.in" +#line 2372 "runtime.in" // string cd(string s=emptystring); void gen140(stack *Stack) { string s=vm::pop<string>(Stack,emptystring); -#line 2376 "runtime.in" +#line 2373 "runtime.in" if(!s.empty() && !globalwrite()) writeDisabled(); {Stack->push<string>(setPath(s.c_str())); return;} } -#line 2381 "runtime.in" +#line 2378 "runtime.in" // void list(string *s, bool imports=false); void gen141(stack *Stack) { bool imports=vm::pop<bool>(Stack,false); string * s=vm::pop<string *>(Stack); -#line 2382 "runtime.in" +#line 2379 "runtime.in" if(*s == "-") return; trans::genv ge; symbol *name=symbol::trans(*s); @@ -3002,94 +2999,94 @@ void gen141(stack *Stack) // Path operations -#line 2392 "runtime.in" +#line 2389 "runtime.in" void nullPath(stack *Stack) { -#line 2393 "runtime.in" +#line 2390 "runtime.in" {Stack->push<path>(nullpath); return;} } -#line 2398 "runtime.in" +#line 2395 "runtime.in" // bool ==(path a, path b); void gen143(stack *Stack) { path b=vm::pop<path>(Stack); path a=vm::pop<path>(Stack); -#line 2399 "runtime.in" +#line 2396 "runtime.in" {Stack->push<bool>(a == b); return;} } -#line 2403 "runtime.in" +#line 2400 "runtime.in" // bool !=(path a, path b); void gen144(stack *Stack) { path b=vm::pop<path>(Stack); path a=vm::pop<path>(Stack); -#line 2404 "runtime.in" +#line 2401 "runtime.in" {Stack->push<bool>(!(a == b)); return;} } -#line 2408 "runtime.in" +#line 2405 "runtime.in" // pair point(path p, Int t); void gen145(stack *Stack) { Int t=vm::pop<Int>(Stack); path p=vm::pop<path>(Stack); -#line 2409 "runtime.in" +#line 2406 "runtime.in" {Stack->push<pair>(p.point((Int) t)); return;} } -#line 2413 "runtime.in" +#line 2410 "runtime.in" // pair point(path p, real t); void gen146(stack *Stack) { real t=vm::pop<real>(Stack); path p=vm::pop<path>(Stack); -#line 2414 "runtime.in" +#line 2411 "runtime.in" {Stack->push<pair>(p.point(t)); return;} } -#line 2418 "runtime.in" +#line 2415 "runtime.in" // pair precontrol(path p, Int t); void gen147(stack *Stack) { Int t=vm::pop<Int>(Stack); path p=vm::pop<path>(Stack); -#line 2419 "runtime.in" +#line 2416 "runtime.in" {Stack->push<pair>(p.precontrol((Int) t)); return;} } -#line 2423 "runtime.in" +#line 2420 "runtime.in" // pair precontrol(path p, real t); void gen148(stack *Stack) { real t=vm::pop<real>(Stack); path p=vm::pop<path>(Stack); -#line 2424 "runtime.in" +#line 2421 "runtime.in" {Stack->push<pair>(p.precontrol(t)); return;} } -#line 2428 "runtime.in" +#line 2425 "runtime.in" // pair postcontrol(path p, Int t); void gen149(stack *Stack) { Int t=vm::pop<Int>(Stack); path p=vm::pop<path>(Stack); -#line 2429 "runtime.in" +#line 2426 "runtime.in" {Stack->push<pair>(p.postcontrol((Int) t)); return;} } -#line 2433 "runtime.in" +#line 2430 "runtime.in" // pair postcontrol(path p, real t); void gen150(stack *Stack) { real t=vm::pop<real>(Stack); path p=vm::pop<path>(Stack); -#line 2434 "runtime.in" +#line 2431 "runtime.in" {Stack->push<pair>(p.postcontrol(t)); return;} } -#line 2438 "runtime.in" +#line 2435 "runtime.in" // pair dir(path p, Int t, Int sign=0, bool normalize=true); void gen151(stack *Stack) { @@ -3097,49 +3094,49 @@ void gen151(stack *Stack) Int sign=vm::pop<Int>(Stack,0); Int t=vm::pop<Int>(Stack); path p=vm::pop<path>(Stack); -#line 2439 "runtime.in" +#line 2436 "runtime.in" {Stack->push<pair>(p.dir(t,sign,normalize)); return;} } -#line 2443 "runtime.in" +#line 2440 "runtime.in" // pair dir(path p, real t, bool normalize=true); void gen152(stack *Stack) { bool normalize=vm::pop<bool>(Stack,true); real t=vm::pop<real>(Stack); path p=vm::pop<path>(Stack); -#line 2444 "runtime.in" +#line 2441 "runtime.in" {Stack->push<pair>(p.dir(t,normalize)); return;} } -#line 2448 "runtime.in" +#line 2445 "runtime.in" // pair accel(path p, Int t, Int sign=0); void gen153(stack *Stack) { Int sign=vm::pop<Int>(Stack,0); Int t=vm::pop<Int>(Stack); path p=vm::pop<path>(Stack); -#line 2449 "runtime.in" +#line 2446 "runtime.in" {Stack->push<pair>(p.accel(t,sign)); return;} } -#line 2453 "runtime.in" +#line 2450 "runtime.in" // pair accel(path p, real t); void gen154(stack *Stack) { real t=vm::pop<real>(Stack); path p=vm::pop<path>(Stack); -#line 2454 "runtime.in" +#line 2451 "runtime.in" {Stack->push<pair>(p.accel(t)); return;} } -#line 2458 "runtime.in" +#line 2455 "runtime.in" // real radius(path p, real t); void gen155(stack *Stack) { real t=vm::pop<real>(Stack); path p=vm::pop<path>(Stack); -#line 2459 "runtime.in" +#line 2456 "runtime.in" pair v=p.dir(t,false); pair a=p.accel(t); real d=dot(a,v); @@ -3150,38 +3147,38 @@ void gen155(stack *Stack) {Stack->push<real>(denom > 0 ? r/sqrt(denom) : 0.0); return;} } -#line 2470 "runtime.in" +#line 2467 "runtime.in" // path reverse(path p); void gen156(stack *Stack) { path p=vm::pop<path>(Stack); -#line 2471 "runtime.in" +#line 2468 "runtime.in" {Stack->push<path>(p.reverse()); return;} } -#line 2475 "runtime.in" +#line 2472 "runtime.in" // path subpath(path p, Int a, Int b); void gen157(stack *Stack) { Int b=vm::pop<Int>(Stack); Int a=vm::pop<Int>(Stack); path p=vm::pop<path>(Stack); -#line 2476 "runtime.in" +#line 2473 "runtime.in" {Stack->push<path>(p.subpath((Int) a, (Int) b)); return;} } -#line 2480 "runtime.in" +#line 2477 "runtime.in" // path subpath(path p, real a, real b); void gen158(stack *Stack) { real b=vm::pop<real>(Stack); real a=vm::pop<real>(Stack); path p=vm::pop<path>(Stack); -#line 2481 "runtime.in" +#line 2478 "runtime.in" {Stack->push<path>(p.subpath(a,b)); return;} } -#line 2485 "runtime.in" +#line 2482 "runtime.in" // path nurb(pair z0, pair z1, pair z2, pair z3, real w0, real w1, real w2, real w3, Int m); void gen159(stack *Stack) { @@ -3194,93 +3191,93 @@ void gen159(stack *Stack) pair z2=vm::pop<pair>(Stack); pair z1=vm::pop<pair>(Stack); pair z0=vm::pop<pair>(Stack); -#line 2487 "runtime.in" +#line 2484 "runtime.in" {Stack->push<path>(nurb(z0,z1,z2,z3,w0,w1,w2,w3,m)); return;} } -#line 2491 "runtime.in" +#line 2488 "runtime.in" // Int length(path p); void gen160(stack *Stack) { path p=vm::pop<path>(Stack); -#line 2492 "runtime.in" +#line 2489 "runtime.in" {Stack->push<Int>(p.length()); return;} } -#line 2496 "runtime.in" +#line 2493 "runtime.in" // bool cyclic(path p); void gen161(stack *Stack) { path p=vm::pop<path>(Stack); -#line 2497 "runtime.in" +#line 2494 "runtime.in" {Stack->push<bool>(p.cyclic()); return;} } -#line 2501 "runtime.in" +#line 2498 "runtime.in" // bool straight(path p, Int t); void gen162(stack *Stack) { Int t=vm::pop<Int>(Stack); path p=vm::pop<path>(Stack); -#line 2502 "runtime.in" +#line 2499 "runtime.in" {Stack->push<bool>(p.straight(t)); return;} } -#line 2506 "runtime.in" +#line 2503 "runtime.in" // path unstraighten(path p); void gen163(stack *Stack) { path p=vm::pop<path>(Stack); -#line 2507 "runtime.in" +#line 2504 "runtime.in" {Stack->push<path>(p.unstraighten()); return;} } -#line 2511 "runtime.in" +#line 2508 "runtime.in" // bool piecewisestraight(path p); void gen164(stack *Stack) { path p=vm::pop<path>(Stack); -#line 2512 "runtime.in" +#line 2509 "runtime.in" {Stack->push<bool>(p.piecewisestraight()); return;} } -#line 2516 "runtime.in" +#line 2513 "runtime.in" // real arclength(path p); void gen165(stack *Stack) { path p=vm::pop<path>(Stack); -#line 2517 "runtime.in" +#line 2514 "runtime.in" {Stack->push<real>(p.arclength()); return;} } -#line 2521 "runtime.in" +#line 2518 "runtime.in" // real arctime(path p, real dval); void gen166(stack *Stack) { real dval=vm::pop<real>(Stack); path p=vm::pop<path>(Stack); -#line 2522 "runtime.in" +#line 2519 "runtime.in" {Stack->push<real>(p.arctime(dval)); return;} } -#line 2526 "runtime.in" +#line 2523 "runtime.in" // real dirtime(path p, pair z); void gen167(stack *Stack) { pair z=vm::pop<pair>(Stack); path p=vm::pop<path>(Stack); -#line 2527 "runtime.in" +#line 2524 "runtime.in" {Stack->push<real>(p.directiontime(z)); return;} } -#line 2531 "runtime.in" +#line 2528 "runtime.in" // realarray* intersect(path p, path q, real fuzz=-1); void gen168(stack *Stack) { real fuzz=vm::pop<real>(Stack,-1); path q=vm::pop<path>(Stack); path p=vm::pop<path>(Stack); -#line 2532 "runtime.in" +#line 2529 "runtime.in" bool exact=fuzz <= 0.0; if(fuzz < 0) fuzz=BigFuzz*::max(::max(length(p.max()),length(p.min())), @@ -3296,14 +3293,14 @@ void gen168(stack *Stack) {Stack->push<realarray*>(new array(0)); return;} } -#line 2548 "runtime.in" +#line 2545 "runtime.in" // realarray2* intersections(path p, path q, real fuzz=-1); void gen169(stack *Stack) { real fuzz=vm::pop<real>(Stack,-1); path q=vm::pop<path>(Stack); path p=vm::pop<path>(Stack); -#line 2549 "runtime.in" +#line 2546 "runtime.in" bool exact=fuzz <= 0.0; if(fuzz < 0.0) fuzz=BigFuzz*::max(::max(length(p.max()),length(p.min())), @@ -3333,7 +3330,7 @@ void gen169(stack *Stack) {Stack->push<realarray2*>(V); return;} } -#line 2579 "runtime.in" +#line 2576 "runtime.in" // realarray* intersections(path p, explicit pair a, explicit pair b, real fuzz=-1); void gen170(stack *Stack) { @@ -3341,7 +3338,7 @@ void gen170(stack *Stack) pair b=vm::pop<pair>(Stack); pair a=vm::pop<pair>(Stack); path p=vm::pop<path>(Stack); -#line 2580 "runtime.in" +#line 2577 "runtime.in" if(fuzz < 0) fuzz=BigFuzz*::max(::max(length(p.max()),length(p.min())), ::max(length(a),length(b))); @@ -3357,7 +3354,7 @@ void gen170(stack *Stack) // Return the intersection point of the extensions of the line segments // PQ and pq. -#line 2596 "runtime.in" +#line 2593 "runtime.in" // pair extension(pair P, pair Q, pair p, pair q); void gen171(stack *Stack) { @@ -3365,7 +3362,7 @@ void gen171(stack *Stack) pair p=vm::pop<pair>(Stack); pair Q=vm::pop<pair>(Stack); pair P=vm::pop<pair>(Stack); -#line 2597 "runtime.in" +#line 2594 "runtime.in" pair ac=P-Q; pair bd=q-p; real det=ac.getx()*bd.gety()-ac.gety()*bd.getx(); @@ -3373,49 +3370,49 @@ void gen171(stack *Stack) {Stack->push<pair>(P+((p.getx()-P.getx())*bd.gety()-(p.gety()-P.gety())*bd.getx())*ac/det); return;} } -#line 2605 "runtime.in" +#line 2602 "runtime.in" // Int size(path p); void gen172(stack *Stack) { path p=vm::pop<path>(Stack); -#line 2606 "runtime.in" +#line 2603 "runtime.in" {Stack->push<Int>(p.size()); return;} } -#line 2610 "runtime.in" +#line 2607 "runtime.in" // path &(path p, path q); void gen173(stack *Stack) { path q=vm::pop<path>(Stack); path p=vm::pop<path>(Stack); -#line 2611 "runtime.in" +#line 2608 "runtime.in" {Stack->push<path>(camp::concat(p,q)); return;} } -#line 2615 "runtime.in" +#line 2612 "runtime.in" // pair min(path p); void gen174(stack *Stack) { path p=vm::pop<path>(Stack); -#line 2616 "runtime.in" +#line 2613 "runtime.in" {Stack->push<pair>(p.min()); return;} } -#line 2620 "runtime.in" +#line 2617 "runtime.in" // pair max(path p); void gen175(stack *Stack) { path p=vm::pop<path>(Stack); -#line 2621 "runtime.in" +#line 2618 "runtime.in" {Stack->push<pair>(p.max()); return;} } -#line 2625 "runtime.in" +#line 2622 "runtime.in" // realarray* mintimes(path p); void gen176(stack *Stack) { path p=vm::pop<path>(Stack); -#line 2626 "runtime.in" +#line 2623 "runtime.in" array *V=new array(2); pair z=p.mintimes(); (*V)[0]=z.getx(); @@ -3423,12 +3420,12 @@ void gen176(stack *Stack) {Stack->push<realarray*>(V); return;} } -#line 2634 "runtime.in" +#line 2631 "runtime.in" // realarray* maxtimes(path p); void gen177(stack *Stack) { path p=vm::pop<path>(Stack); -#line 2635 "runtime.in" +#line 2632 "runtime.in" array *V=new array(2); pair z=p.maxtimes(); (*V)[0]=z.getx(); @@ -3436,7 +3433,7 @@ void gen177(stack *Stack) {Stack->push<realarray*>(V); return;} } -#line 2643 "runtime.in" +#line 2640 "runtime.in" // real relativedistance(real theta, real phi, real t, bool atleast); void gen178(stack *Stack) { @@ -3444,58 +3441,58 @@ void gen178(stack *Stack) real t=vm::pop<real>(Stack); real phi=vm::pop<real>(Stack); real theta=vm::pop<real>(Stack); -#line 2644 "runtime.in" +#line 2641 "runtime.in" {Stack->push<real>(camp::velocity(theta,phi,tension(t,atleast))); return;} } -#line 2648 "runtime.in" +#line 2645 "runtime.in" // Int windingnumber(patharray *p, pair z); void gen179(stack *Stack) { pair z=vm::pop<pair>(Stack); patharray * p=vm::pop<patharray *>(Stack); -#line 2649 "runtime.in" +#line 2646 "runtime.in" {Stack->push<Int>(windingnumber(p,z)); return;} } -#line 2653 "runtime.in" +#line 2650 "runtime.in" // bool inside(explicit patharray *g, pair z, pen fillrule=CURRENTPEN); void gen180(stack *Stack) { pen fillrule=vm::pop<pen>(Stack,CURRENTPEN); pair z=vm::pop<pair>(Stack); patharray * g=vm::pop<patharray *>(Stack); -#line 2654 "runtime.in" +#line 2651 "runtime.in" {Stack->push<bool>(fillrule.inside(windingnumber(g,z))); return;} } -#line 2658 "runtime.in" +#line 2655 "runtime.in" // bool inside(path g, pair z, pen fillrule=CURRENTPEN); void gen181(stack *Stack) { pen fillrule=vm::pop<pen>(Stack,CURRENTPEN); pair z=vm::pop<pair>(Stack); path g=vm::pop<path>(Stack); -#line 2659 "runtime.in" +#line 2656 "runtime.in" {Stack->push<bool>(fillrule.inside(g.windingnumber(z))); return;} } // Determine the side of a--b that c lies on // (negative=left, zero=on line, positive=right). -#line 2665 "runtime.in" +#line 2662 "runtime.in" // real side(pair a, pair b, pair c); void gen182(stack *Stack) { pair c=vm::pop<pair>(Stack); pair b=vm::pop<pair>(Stack); pair a=vm::pop<pair>(Stack); -#line 2666 "runtime.in" +#line 2663 "runtime.in" {Stack->push<real>(orient2d(a,b,c)); return;} } // Determine the side of the counterclockwise circle through a,b,c that d // lies on (negative=inside, 0=on circle, positive=right). -#line 2672 "runtime.in" +#line 2669 "runtime.in" // real incircle(pair a, pair b, pair c, pair d); void gen183(stack *Stack) { @@ -3503,14 +3500,14 @@ void gen183(stack *Stack) pair c=vm::pop<pair>(Stack); pair b=vm::pop<pair>(Stack); pair a=vm::pop<pair>(Stack); -#line 2673 "runtime.in" +#line 2670 "runtime.in" {Stack->push<real>(incircle(a.getx(),a.gety(),b.getx(),b.gety(),c.getx(),c.gety(), d.getx(),d.gety())); return;} } // Path3 operations -#line 2680 "runtime.in" +#line 2677 "runtime.in" // path3 path3(triplearray *pre, triplearray *point, triplearray *post, boolarray *straight, bool cyclic); void gen184(stack *Stack) { @@ -3519,7 +3516,7 @@ void gen184(stack *Stack) triplearray * post=vm::pop<triplearray *>(Stack); triplearray * point=vm::pop<triplearray *>(Stack); triplearray * pre=vm::pop<triplearray *>(Stack); -#line 2682 "runtime.in" +#line 2679 "runtime.in" size_t n=checkArrays(pre,point); checkEqual(n,checkArray(post)); checkEqual(n,checkArray(straight)); @@ -3534,94 +3531,94 @@ void gen184(stack *Stack) {Stack->push<path3>(path3(nodes,(Int) n,cyclic)); return;} } -#line 2698 "runtime.in" +#line 2695 "runtime.in" void nullPath3(stack *Stack) { -#line 2699 "runtime.in" +#line 2696 "runtime.in" {Stack->push<path3>(nullpath3); return;} } -#line 2703 "runtime.in" +#line 2700 "runtime.in" // bool ==(path3 a, path3 b); void gen186(stack *Stack) { path3 b=vm::pop<path3>(Stack); path3 a=vm::pop<path3>(Stack); -#line 2704 "runtime.in" +#line 2701 "runtime.in" {Stack->push<bool>(a == b); return;} } -#line 2708 "runtime.in" +#line 2705 "runtime.in" // bool !=(path3 a, path3 b); void gen187(stack *Stack) { path3 b=vm::pop<path3>(Stack); path3 a=vm::pop<path3>(Stack); -#line 2709 "runtime.in" +#line 2706 "runtime.in" {Stack->push<bool>(!(a == b)); return;} } -#line 2713 "runtime.in" +#line 2710 "runtime.in" // triple point(path3 p, Int t); void gen188(stack *Stack) { Int t=vm::pop<Int>(Stack); path3 p=vm::pop<path3>(Stack); -#line 2714 "runtime.in" +#line 2711 "runtime.in" {Stack->push<triple>(p.point((Int) t)); return;} } -#line 2718 "runtime.in" +#line 2715 "runtime.in" // triple point(path3 p, real t); void gen189(stack *Stack) { real t=vm::pop<real>(Stack); path3 p=vm::pop<path3>(Stack); -#line 2719 "runtime.in" +#line 2716 "runtime.in" {Stack->push<triple>(p.point(t)); return;} } -#line 2723 "runtime.in" +#line 2720 "runtime.in" // triple precontrol(path3 p, Int t); void gen190(stack *Stack) { Int t=vm::pop<Int>(Stack); path3 p=vm::pop<path3>(Stack); -#line 2724 "runtime.in" +#line 2721 "runtime.in" {Stack->push<triple>(p.precontrol((Int) t)); return;} } -#line 2728 "runtime.in" +#line 2725 "runtime.in" // triple precontrol(path3 p, real t); void gen191(stack *Stack) { real t=vm::pop<real>(Stack); path3 p=vm::pop<path3>(Stack); -#line 2729 "runtime.in" +#line 2726 "runtime.in" {Stack->push<triple>(p.precontrol(t)); return;} } -#line 2733 "runtime.in" +#line 2730 "runtime.in" // triple postcontrol(path3 p, Int t); void gen192(stack *Stack) { Int t=vm::pop<Int>(Stack); path3 p=vm::pop<path3>(Stack); -#line 2734 "runtime.in" +#line 2731 "runtime.in" {Stack->push<triple>(p.postcontrol((Int) t)); return;} } -#line 2738 "runtime.in" +#line 2735 "runtime.in" // triple postcontrol(path3 p, real t); void gen193(stack *Stack) { real t=vm::pop<real>(Stack); path3 p=vm::pop<path3>(Stack); -#line 2739 "runtime.in" +#line 2736 "runtime.in" {Stack->push<triple>(p.postcontrol(t)); return;} } -#line 2743 "runtime.in" +#line 2740 "runtime.in" // triple dir(path3 p, Int t, Int sign=0, bool normalize=true); void gen194(stack *Stack) { @@ -3629,49 +3626,49 @@ void gen194(stack *Stack) Int sign=vm::pop<Int>(Stack,0); Int t=vm::pop<Int>(Stack); path3 p=vm::pop<path3>(Stack); -#line 2744 "runtime.in" +#line 2741 "runtime.in" {Stack->push<triple>(p.dir(t,sign,normalize)); return;} } -#line 2748 "runtime.in" +#line 2745 "runtime.in" // triple dir(path3 p, real t, bool normalize=true); void gen195(stack *Stack) { bool normalize=vm::pop<bool>(Stack,true); real t=vm::pop<real>(Stack); path3 p=vm::pop<path3>(Stack); -#line 2749 "runtime.in" +#line 2746 "runtime.in" {Stack->push<triple>(p.dir(t,normalize)); return;} } -#line 2753 "runtime.in" +#line 2750 "runtime.in" // triple accel(path3 p, Int t, Int sign=0); void gen196(stack *Stack) { Int sign=vm::pop<Int>(Stack,0); Int t=vm::pop<Int>(Stack); path3 p=vm::pop<path3>(Stack); -#line 2754 "runtime.in" +#line 2751 "runtime.in" {Stack->push<triple>(p.accel(t,sign)); return;} } -#line 2758 "runtime.in" +#line 2755 "runtime.in" // triple accel(path3 p, real t); void gen197(stack *Stack) { real t=vm::pop<real>(Stack); path3 p=vm::pop<path3>(Stack); -#line 2759 "runtime.in" +#line 2756 "runtime.in" {Stack->push<triple>(p.accel(t)); return;} } -#line 2763 "runtime.in" +#line 2760 "runtime.in" // real radius(path3 p, real t); void gen198(stack *Stack) { real t=vm::pop<real>(Stack); path3 p=vm::pop<path3>(Stack); -#line 2764 "runtime.in" +#line 2761 "runtime.in" triple v=p.dir(t,false); triple a=p.accel(t); real d=dot(a,v); @@ -3682,7 +3679,7 @@ void gen198(stack *Stack) {Stack->push<real>(denom > 0 ? r/sqrt(denom) : 0.0); return;} } -#line 2775 "runtime.in" +#line 2772 "runtime.in" // real radius(triple z0, triple c0, triple c1, triple z1, real t); void gen199(stack *Stack) { @@ -3691,7 +3688,7 @@ void gen199(stack *Stack) triple c1=vm::pop<triple>(Stack); triple c0=vm::pop<triple>(Stack); triple z0=vm::pop<triple>(Stack); -#line 2776 "runtime.in" +#line 2773 "runtime.in" triple v=(3.0*(z1-z0)+9.0*(c0-c1))*t*t+(6.0*(z0+c1)-12.0*c0)*t+3.0*(c0-z0); triple a=6.0*(z1-z0+3.0*(c0-c1))*t+6.0*(z0+c1)-12.0*c0; real d=dot(a,v); @@ -3702,85 +3699,85 @@ void gen199(stack *Stack) {Stack->push<real>(denom > 0 ? r/sqrt(denom) : 0.0); return;} } -#line 2787 "runtime.in" +#line 2784 "runtime.in" // path3 reverse(path3 p); void gen200(stack *Stack) { path3 p=vm::pop<path3>(Stack); -#line 2788 "runtime.in" +#line 2785 "runtime.in" {Stack->push<path3>(p.reverse()); return;} } -#line 2792 "runtime.in" +#line 2789 "runtime.in" // path3 subpath(path3 p, Int a, Int b); void gen201(stack *Stack) { Int b=vm::pop<Int>(Stack); Int a=vm::pop<Int>(Stack); path3 p=vm::pop<path3>(Stack); -#line 2793 "runtime.in" +#line 2790 "runtime.in" {Stack->push<path3>(p.subpath((Int) a, (Int) b)); return;} } -#line 2797 "runtime.in" +#line 2794 "runtime.in" // path3 subpath(path3 p, real a, real b); void gen202(stack *Stack) { real b=vm::pop<real>(Stack); real a=vm::pop<real>(Stack); path3 p=vm::pop<path3>(Stack); -#line 2798 "runtime.in" +#line 2795 "runtime.in" {Stack->push<path3>(p.subpath(a,b)); return;} } -#line 2802 "runtime.in" +#line 2799 "runtime.in" // Int length(path3 p); void gen203(stack *Stack) { path3 p=vm::pop<path3>(Stack); -#line 2803 "runtime.in" +#line 2800 "runtime.in" {Stack->push<Int>(p.length()); return;} } -#line 2807 "runtime.in" +#line 2804 "runtime.in" // bool cyclic(path3 p); void gen204(stack *Stack) { path3 p=vm::pop<path3>(Stack); -#line 2808 "runtime.in" +#line 2805 "runtime.in" {Stack->push<bool>(p.cyclic()); return;} } -#line 2812 "runtime.in" +#line 2809 "runtime.in" // bool straight(path3 p, Int t); void gen205(stack *Stack) { Int t=vm::pop<Int>(Stack); path3 p=vm::pop<path3>(Stack); -#line 2813 "runtime.in" +#line 2810 "runtime.in" {Stack->push<bool>(p.straight(t)); return;} } // Return the component of vector v perpendicular to a unit vector u. -#line 2818 "runtime.in" +#line 2815 "runtime.in" // triple perp(triple v, triple u); void gen206(stack *Stack) { triple u=vm::pop<triple>(Stack); triple v=vm::pop<triple>(Stack); -#line 2819 "runtime.in" +#line 2816 "runtime.in" {Stack->push<triple>(v-dot(v,u)*u); return;} } // Return the maximum perpendicular deviation of segment i of path3 g // from a straight line. -#line 2825 "runtime.in" +#line 2822 "runtime.in" // real straightness(path3 p, Int t); void gen207(stack *Stack) { Int t=vm::pop<Int>(Stack); path3 p=vm::pop<path3>(Stack); -#line 2826 "runtime.in" +#line 2823 "runtime.in" if(p.straight(t)) {Stack->push<real>(0); return;} triple z0=p.point(t); triple u=unit(p.point(t+1)-z0); @@ -3790,7 +3787,7 @@ void gen207(stack *Stack) // Return the maximum perpendicular deviation of z0..controls c0 and c1..z1 // from a straight line. -#line 2836 "runtime.in" +#line 2833 "runtime.in" // real straightness(triple z0, triple c0, triple c1, triple z1); void gen208(stack *Stack) { @@ -3798,47 +3795,47 @@ void gen208(stack *Stack) triple c1=vm::pop<triple>(Stack); triple c0=vm::pop<triple>(Stack); triple z0=vm::pop<triple>(Stack); -#line 2837 "runtime.in" +#line 2834 "runtime.in" triple u=unit(z1-z0); {Stack->push<real>(::max(length(perp(c0-z0,u)),length(perp(c1-z0,u)))); return;} } -#line 2842 "runtime.in" +#line 2839 "runtime.in" // bool piecewisestraight(path3 p); void gen209(stack *Stack) { path3 p=vm::pop<path3>(Stack); -#line 2843 "runtime.in" +#line 2840 "runtime.in" {Stack->push<bool>(p.piecewisestraight()); return;} } -#line 2847 "runtime.in" +#line 2844 "runtime.in" // real arclength(path3 p); void gen210(stack *Stack) { path3 p=vm::pop<path3>(Stack); -#line 2848 "runtime.in" +#line 2845 "runtime.in" {Stack->push<real>(p.arclength()); return;} } -#line 2852 "runtime.in" +#line 2849 "runtime.in" // real arctime(path3 p, real dval); void gen211(stack *Stack) { real dval=vm::pop<real>(Stack); path3 p=vm::pop<path3>(Stack); -#line 2853 "runtime.in" +#line 2850 "runtime.in" {Stack->push<real>(p.arctime(dval)); return;} } -#line 2857 "runtime.in" +#line 2854 "runtime.in" // realarray* intersect(path3 p, path3 q, real fuzz=-1); void gen212(stack *Stack) { real fuzz=vm::pop<real>(Stack,-1); path3 q=vm::pop<path3>(Stack); path3 p=vm::pop<path3>(Stack); -#line 2858 "runtime.in" +#line 2855 "runtime.in" bool exact=fuzz <= 0.0; if(fuzz < 0) fuzz=BigFuzz*::max(::max(length(p.max()),length(p.min())), @@ -3855,14 +3852,14 @@ void gen212(stack *Stack) {Stack->push<realarray*>(new array(0)); return;} } -#line 2875 "runtime.in" +#line 2872 "runtime.in" // realarray2* intersections(path3 p, path3 q, real fuzz=-1); void gen213(stack *Stack) { real fuzz=vm::pop<real>(Stack,-1); path3 q=vm::pop<path3>(Stack); path3 p=vm::pop<path3>(Stack); -#line 2876 "runtime.in" +#line 2873 "runtime.in" bool exact=fuzz <= 0.0; if(fuzz < 0) fuzz=BigFuzz*::max(::max(length(p.max()),length(p.min())), @@ -3894,14 +3891,14 @@ void gen213(stack *Stack) {Stack->push<realarray2*>(V); return;} } -#line 2908 "runtime.in" +#line 2905 "runtime.in" // realarray2* intersections(path3 p, triplearray2 *P, real fuzz=-1); void gen214(stack *Stack) { real fuzz=vm::pop<real>(Stack,-1); triplearray2 * P=vm::pop<triplearray2 *>(Stack); path3 p=vm::pop<path3>(Stack); -#line 2909 "runtime.in" +#line 2906 "runtime.in" triple *A=copyTripleArray2C(P,true,4); if(fuzz <= 0) fuzz=BigFuzz*::max(::max(length(p.max()),length(p.min())), norm(A,16)); @@ -3920,49 +3917,49 @@ void gen214(stack *Stack) {Stack->push<realarray2*>(W); return;} // Sorting will done in asy. } -#line 2928 "runtime.in" +#line 2925 "runtime.in" // Int size(path3 p); void gen215(stack *Stack) { path3 p=vm::pop<path3>(Stack); -#line 2929 "runtime.in" +#line 2926 "runtime.in" {Stack->push<Int>(p.size()); return;} } -#line 2933 "runtime.in" +#line 2930 "runtime.in" // path3 &(path3 p, path3 q); void gen216(stack *Stack) { path3 q=vm::pop<path3>(Stack); path3 p=vm::pop<path3>(Stack); -#line 2934 "runtime.in" +#line 2931 "runtime.in" {Stack->push<path3>(camp::concat(p,q)); return;} } -#line 2938 "runtime.in" +#line 2935 "runtime.in" // triple min(path3 p); void gen217(stack *Stack) { path3 p=vm::pop<path3>(Stack); -#line 2939 "runtime.in" +#line 2936 "runtime.in" {Stack->push<triple>(p.min()); return;} } -#line 2943 "runtime.in" +#line 2940 "runtime.in" // triple max(path3 p); void gen218(stack *Stack) { path3 p=vm::pop<path3>(Stack); -#line 2944 "runtime.in" +#line 2941 "runtime.in" {Stack->push<triple>(p.max()); return;} } -#line 2948 "runtime.in" +#line 2945 "runtime.in" // realarray* mintimes(path3 p); void gen219(stack *Stack) { path3 p=vm::pop<path3>(Stack); -#line 2949 "runtime.in" +#line 2946 "runtime.in" array *V=new array(3); triple v=p.mintimes(); (*V)[0]=v.getx(); @@ -3971,12 +3968,12 @@ void gen219(stack *Stack) {Stack->push<realarray*>(V); return;} } -#line 2958 "runtime.in" +#line 2955 "runtime.in" // realarray* maxtimes(path3 p); void gen220(stack *Stack) { path3 p=vm::pop<path3>(Stack); -#line 2959 "runtime.in" +#line 2956 "runtime.in" array *V=new array(3); triple v=p.maxtimes(); (*V)[0]=v.getx(); @@ -3985,30 +3982,30 @@ void gen220(stack *Stack) {Stack->push<realarray*>(V); return;} } -#line 2968 "runtime.in" +#line 2965 "runtime.in" // path3 *(realarray2 *t, path3 g); void gen221(stack *Stack) { path3 g=vm::pop<path3>(Stack); realarray2 * t=vm::pop<realarray2 *>(Stack); -#line 2969 "runtime.in" +#line 2966 "runtime.in" {Stack->push<path3>(transformed(*t,g)); return;} } // Guide operations -#line 2975 "runtime.in" +#line 2972 "runtime.in" void nullGuide(stack *Stack) { -#line 2976 "runtime.in" +#line 2973 "runtime.in" {Stack->push<guide*>(new pathguide(path())); return;} } -#line 2981 "runtime.in" +#line 2978 "runtime.in" void dotsGuide(stack *Stack) { guidearray * a=vm::pop<guidearray *>(Stack); -#line 2982 "runtime.in" +#line 2979 "runtime.in" guidevector v; size_t size=checkArray(a); for (size_t i=0; i < size; ++i) @@ -4017,11 +4014,11 @@ void dotsGuide(stack *Stack) {Stack->push<guide*>(new multiguide(v)); return;} } -#line 2991 "runtime.in" +#line 2988 "runtime.in" void dashesGuide(stack *Stack) { guidearray * a=vm::pop<guidearray *>(Stack); -#line 2992 "runtime.in" +#line 2989 "runtime.in" static camp::curlSpec curly; static specguide curlout(&curly, camp::OUT); static specguide curlin(&curly, camp::IN); @@ -4047,179 +4044,179 @@ void dashesGuide(stack *Stack) {Stack->push<guide*>(new multiguide(v)); return;} } -#line 3018 "runtime.in" +#line 3015 "runtime.in" void newCycleToken(stack *Stack) { -#line 3019 "runtime.in" +#line 3016 "runtime.in" {Stack->push<cycleToken>(cycleToken()); return;} } -#line 3023 "runtime.in" +#line 3020 "runtime.in" // guide* operator cast(cycleToken tok); void gen226(stack *Stack) { cycleToken tok=vm::pop<cycleToken>(Stack); -#line 3024 "runtime.in" +#line 3021 "runtime.in" // Avoid unused variable warning messages. unused(&tok); {Stack->push<guide*>(new cycletokguide()); return;} } -#line 3030 "runtime.in" +#line 3027 "runtime.in" // guide* operator spec(pair z, Int p); void gen227(stack *Stack) { Int p=vm::pop<Int>(Stack); pair z=vm::pop<pair>(Stack); -#line 3031 "runtime.in" +#line 3028 "runtime.in" camp::side d=(camp::side) p; camp::dirSpec *sp=new camp::dirSpec(z); {Stack->push<guide*>(new specguide(sp,d)); return;} } -#line 3038 "runtime.in" +#line 3035 "runtime.in" // curlSpecifier operator curl(real gamma, Int p); void gen228(stack *Stack) { Int p=vm::pop<Int>(Stack); real gamma=vm::pop<real>(Stack); -#line 3039 "runtime.in" +#line 3036 "runtime.in" camp::side s=(camp::side) p; {Stack->push<curlSpecifier>(curlSpecifier(gamma,s)); return;} } -#line 3044 "runtime.in" +#line 3041 "runtime.in" void curlSpecifierValuePart(stack *Stack) { curlSpecifier spec=vm::pop<curlSpecifier>(Stack); -#line 3045 "runtime.in" +#line 3042 "runtime.in" {Stack->push<real>(spec.getValue()); return;} } -#line 3049 "runtime.in" +#line 3046 "runtime.in" void curlSpecifierSidePart(stack *Stack) { curlSpecifier spec=vm::pop<curlSpecifier>(Stack); -#line 3050 "runtime.in" +#line 3047 "runtime.in" {Stack->push<Int>(spec.getSide()); return;} } -#line 3054 "runtime.in" +#line 3051 "runtime.in" // guide* operator cast(curlSpecifier spec); void gen231(stack *Stack) { curlSpecifier spec=vm::pop<curlSpecifier>(Stack); -#line 3055 "runtime.in" +#line 3052 "runtime.in" {Stack->push<guide*>(new specguide(spec)); return;} } -#line 3059 "runtime.in" +#line 3056 "runtime.in" // tensionSpecifier operator tension(real tout, real tin, bool atleast); void gen232(stack *Stack) { bool atleast=vm::pop<bool>(Stack); real tin=vm::pop<real>(Stack); real tout=vm::pop<real>(Stack); -#line 3060 "runtime.in" +#line 3057 "runtime.in" {Stack->push<tensionSpecifier>(tensionSpecifier(tout, tin, atleast)); return;} } -#line 3064 "runtime.in" +#line 3061 "runtime.in" void tensionSpecifierOutPart(stack *Stack) { tensionSpecifier t=vm::pop<tensionSpecifier>(Stack); -#line 3065 "runtime.in" +#line 3062 "runtime.in" {Stack->push<real>(t.getOut()); return;} } -#line 3069 "runtime.in" +#line 3066 "runtime.in" void tensionSpecifierInPart(stack *Stack) { tensionSpecifier t=vm::pop<tensionSpecifier>(Stack); -#line 3070 "runtime.in" +#line 3067 "runtime.in" {Stack->push<real>(t.getIn()); return;} } -#line 3074 "runtime.in" +#line 3071 "runtime.in" void tensionSpecifierAtleastPart(stack *Stack) { tensionSpecifier t=vm::pop<tensionSpecifier>(Stack); -#line 3075 "runtime.in" +#line 3072 "runtime.in" {Stack->push<bool>(t.getAtleast()); return;} } -#line 3079 "runtime.in" +#line 3076 "runtime.in" // guide* operator cast(tensionSpecifier t); void gen236(stack *Stack) { tensionSpecifier t=vm::pop<tensionSpecifier>(Stack); -#line 3080 "runtime.in" +#line 3077 "runtime.in" {Stack->push<guide*>(new tensionguide(t)); return;} } -#line 3084 "runtime.in" +#line 3081 "runtime.in" // guide* operator controls(pair zout, pair zin); void gen237(stack *Stack) { pair zin=vm::pop<pair>(Stack); pair zout=vm::pop<pair>(Stack); -#line 3085 "runtime.in" +#line 3082 "runtime.in" {Stack->push<guide*>(new controlguide(zout, zin)); return;} } -#line 3089 "runtime.in" +#line 3086 "runtime.in" // Int size(guide *g); void gen238(stack *Stack) { guide * g=vm::pop<guide *>(Stack); -#line 3090 "runtime.in" +#line 3087 "runtime.in" flatguide f; g->flatten(f,false); {Stack->push<Int>(f.size()); return;} } -#line 3096 "runtime.in" +#line 3093 "runtime.in" // Int length(guide *g); void gen239(stack *Stack) { guide * g=vm::pop<guide *>(Stack); -#line 3097 "runtime.in" +#line 3094 "runtime.in" flatguide f; g->flatten(f,false); {Stack->push<Int>(g->cyclic() ? f.size() : f.size()-1); return;} } -#line 3103 "runtime.in" +#line 3100 "runtime.in" // bool cyclic(guide *g); void gen240(stack *Stack) { guide * g=vm::pop<guide *>(Stack); -#line 3104 "runtime.in" +#line 3101 "runtime.in" flatguide f; g->flatten(f,false); {Stack->push<bool>(g->cyclic()); return;} } -#line 3110 "runtime.in" +#line 3107 "runtime.in" // pair point(guide *g, Int t); void gen241(stack *Stack) { Int t=vm::pop<Int>(Stack); guide * g=vm::pop<guide *>(Stack); -#line 3111 "runtime.in" +#line 3108 "runtime.in" flatguide f; g->flatten(f,false); {Stack->push<pair>(f.Nodes(adjustedIndex(t,f.size(),g->cyclic())).z); return;} } -#line 3117 "runtime.in" +#line 3114 "runtime.in" // pairarray* dirSpecifier(guide *g, Int t); void gen242(stack *Stack) { Int t=vm::pop<Int>(Stack); guide * g=vm::pop<guide *>(Stack); -#line 3118 "runtime.in" +#line 3115 "runtime.in" flatguide f; g->flatten(f,false); Int n=f.size(); @@ -4230,13 +4227,13 @@ void gen242(stack *Stack) {Stack->push<pairarray*>(c); return;} } -#line 3129 "runtime.in" +#line 3126 "runtime.in" // pairarray* controlSpecifier(guide *g, Int t); void gen243(stack *Stack) { Int t=vm::pop<Int>(Stack); guide * g=vm::pop<guide *>(Stack); -#line 3130 "runtime.in" +#line 3127 "runtime.in" flatguide f; g->flatten(f,false); Int n=f.size(); @@ -4252,13 +4249,13 @@ void gen243(stack *Stack) } else {Stack->push<pairarray*>(new array(0)); return;} } -#line 3146 "runtime.in" +#line 3143 "runtime.in" // tensionSpecifier tensionSpecifier(guide *g, Int t); void gen244(stack *Stack) { Int t=vm::pop<Int>(Stack); guide * g=vm::pop<guide *>(Stack); -#line 3147 "runtime.in" +#line 3144 "runtime.in" flatguide f; g->flatten(f,false); Int n=f.size(); @@ -4267,13 +4264,13 @@ void gen244(stack *Stack) {Stack->push<tensionSpecifier>(tensionSpecifier(curr.tout.val,f.Nodes(t+1).tin.val,curr.tout.atleast)); return;} } -#line 3156 "runtime.in" +#line 3153 "runtime.in" // realarray* curlSpecifier(guide *g, Int t); void gen245(stack *Stack) { Int t=vm::pop<Int>(Stack); guide * g=vm::pop<guide *>(Stack); -#line 3157 "runtime.in" +#line 3154 "runtime.in" flatguide f; g->flatten(f,false); Int n=f.size(); @@ -4286,12 +4283,12 @@ void gen245(stack *Stack) {Stack->push<realarray*>(c); return;} } -#line 3170 "runtime.in" +#line 3167 "runtime.in" // guide* reverse(guide *g); void gen246(stack *Stack) { guide * g=vm::pop<guide *>(Stack); -#line 3171 "runtime.in" +#line 3168 "runtime.in" flatguide f; g->flatten(f,false); if(f.precyclic()) @@ -4346,19 +4343,19 @@ void gen246(stack *Stack) // Three-dimensional picture and surface operations -#line 3226 "runtime.in" +#line 3223 "runtime.in" // void _draw(picture *f, path3 g, pen p); void gen247(stack *Stack) { pen p=vm::pop<pen>(Stack); path3 g=vm::pop<path3>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 3227 "runtime.in" +#line 3224 "runtime.in" if(g.size() > 0) f->append(new drawPath3(g,p)); } -#line 3233 "runtime.in" +#line 3230 "runtime.in" // void draw(picture *f, triplearray2 *g, bool straight, penarray *p, real opacity, real shininess, real granularity, triple normal, bool lighton, penarray *colors); void gen248(stack *Stack) { @@ -4372,80 +4369,80 @@ void gen248(stack *Stack) bool straight=vm::pop<bool>(Stack); triplearray2 * g=vm::pop<triplearray2 *>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 3236 "runtime.in" +#line 3233 "runtime.in" f->append(new drawSurface(*g,straight,*p,opacity,shininess,granularity, normal,lighton,*colors)); } -#line 3241 "runtime.in" +#line 3238 "runtime.in" // triple min3(picture *f); void gen249(stack *Stack) { picture * f=vm::pop<picture *>(Stack); -#line 3242 "runtime.in" +#line 3239 "runtime.in" {Stack->push<triple>(f->bounds3().Min()); return;} } -#line 3246 "runtime.in" +#line 3243 "runtime.in" // triple max3(picture *f); void gen250(stack *Stack) { picture * f=vm::pop<picture *>(Stack); -#line 3247 "runtime.in" +#line 3244 "runtime.in" {Stack->push<triple>(f->bounds3().Max()); return;} } -#line 3251 "runtime.in" +#line 3248 "runtime.in" // pair min(picture *f, realarray2 *t); void gen251(stack *Stack) { realarray2 * t=vm::pop<realarray2 *>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 3252 "runtime.in" +#line 3249 "runtime.in" real *T=copyArray2C(t,4); pair m=f->bounds(::min,xproject,yproject,T); delete[] T; {Stack->push<pair>(m); return;} } -#line 3259 "runtime.in" +#line 3256 "runtime.in" // pair max(picture *f, realarray2 *t); void gen252(stack *Stack) { realarray2 * t=vm::pop<realarray2 *>(Stack); picture * f=vm::pop<picture *>(Stack); -#line 3260 "runtime.in" +#line 3257 "runtime.in" real *T=copyArray2C(t,4); pair M=f->bounds(::max,xproject,yproject,T); delete[] T; {Stack->push<pair>(M); return;} } -#line 3267 "runtime.in" +#line 3264 "runtime.in" // pair minratio(picture *f); void gen253(stack *Stack) { picture * f=vm::pop<picture *>(Stack); -#line 3268 "runtime.in" +#line 3265 "runtime.in" {Stack->push<pair>(f->bounds(::min,xratio,yratio)); return;} } -#line 3272 "runtime.in" +#line 3269 "runtime.in" // pair maxratio(picture *f); void gen254(stack *Stack) { picture * f=vm::pop<picture *>(Stack); -#line 3273 "runtime.in" +#line 3270 "runtime.in" {Stack->push<pair>(f->bounds(::max,xratio,yratio)); return;} } -#line 3277 "runtime.in" +#line 3274 "runtime.in" // triple minbezier(triplearray2 *P, triple b); void gen255(stack *Stack) { triple b=vm::pop<triple>(Stack); triplearray2 * P=vm::pop<triplearray2 *>(Stack); -#line 3278 "runtime.in" +#line 3275 "runtime.in" real *A=copyTripleArray2Components(P,true,4); b=triple(bound(A,::min,b.getx(),sqrtFuzz*norm(A,16)), bound(A+16,::min,b.gety(),sqrtFuzz*norm(A+16,16)), @@ -4454,13 +4451,13 @@ void gen255(stack *Stack) {Stack->push<triple>(b); return;} } -#line 3287 "runtime.in" +#line 3284 "runtime.in" // triple maxbezier(triplearray2 *P, triple b); void gen256(stack *Stack) { triple b=vm::pop<triple>(Stack); triplearray2 * P=vm::pop<triplearray2 *>(Stack); -#line 3288 "runtime.in" +#line 3285 "runtime.in" real *A=copyTripleArray2Components(P,true,4); b=triple(bound(A,::max,b.getx(),sqrtFuzz*norm(A,16)), bound(A+16,::max,b.gety(),sqrtFuzz*norm(A+16,16)), @@ -4469,14 +4466,14 @@ void gen256(stack *Stack) {Stack->push<triple>(b); return;} } -#line 3297 "runtime.in" +#line 3294 "runtime.in" // pair minbezier(triplearray2 *P, realarray2 *t, pair b); void gen257(stack *Stack) { pair b=vm::pop<pair>(Stack); realarray2 * t=vm::pop<realarray2 *>(Stack); triplearray2 * P=vm::pop<triplearray2 *>(Stack); -#line 3298 "runtime.in" +#line 3295 "runtime.in" triple *A=copyTripleArray2C(P,true,4); real *T=copyArray2C(t,4); real fuzz=sqrtFuzz*norm(A,16); @@ -4487,14 +4484,14 @@ void gen257(stack *Stack) {Stack->push<pair>(b); return;} } -#line 3309 "runtime.in" +#line 3306 "runtime.in" // pair maxbezier(triplearray2 *P, realarray2 *t, pair b); void gen258(stack *Stack) { pair b=vm::pop<pair>(Stack); realarray2 * t=vm::pop<realarray2 *>(Stack); triplearray2 * P=vm::pop<triplearray2 *>(Stack); -#line 3310 "runtime.in" +#line 3307 "runtime.in" triple *A=copyTripleArray2C(P,true,4); real *T=copyArray2C(t,4); real fuzz=sqrtFuzz*norm(A,16); @@ -4505,38 +4502,38 @@ void gen258(stack *Stack) {Stack->push<pair>(b); return;} } -#line 3321 "runtime.in" +#line 3318 "runtime.in" // pair max(path3 g, realarray2 *t); void gen259(stack *Stack) { realarray2 * t=vm::pop<realarray2 *>(Stack); path3 g=vm::pop<path3>(Stack); -#line 3322 "runtime.in" +#line 3319 "runtime.in" real *T=copyArray2C(t,4); pair b=g.bounds(::max,xproject,yproject,T); delete[] T; {Stack->push<pair>(b); return;} } -#line 3329 "runtime.in" +#line 3326 "runtime.in" // pair min(path3 g, realarray2 *t); void gen260(stack *Stack) { realarray2 * t=vm::pop<realarray2 *>(Stack); path3 g=vm::pop<path3>(Stack); -#line 3330 "runtime.in" +#line 3327 "runtime.in" real *T=copyArray2C(t,4); pair b=g.bounds(::min,xproject,yproject,T); delete[] T; {Stack->push<pair>(b); return;} } -#line 3337 "runtime.in" +#line 3334 "runtime.in" // real change2(triplearray2 *a); void gen261(stack *Stack) { triplearray2 * a=vm::pop<triplearray2 *>(Stack); -#line 3338 "runtime.in" +#line 3335 "runtime.in" size_t n=checkArray(a); if(n == 0) {Stack->push<real>(0.0); return;} @@ -4557,16 +4554,16 @@ void gen261(stack *Stack) {Stack->push<real>(M); return;} } -#line 3359 "runtime.in" +#line 3356 "runtime.in" // bool is3D(picture *f); void gen262(stack *Stack) { picture * f=vm::pop<picture *>(Stack); -#line 3360 "runtime.in" +#line 3357 "runtime.in" {Stack->push<bool>(f->have3D()); return;} } -#line 3364 "runtime.in" +#line 3361 "runtime.in" // pair bezier(pair a, pair b, pair c, pair d, real t); void gen263(stack *Stack) { @@ -4575,13 +4572,13 @@ void gen263(stack *Stack) pair c=vm::pop<pair>(Stack); pair b=vm::pop<pair>(Stack); pair a=vm::pop<pair>(Stack); -#line 3365 "runtime.in" +#line 3362 "runtime.in" real onemt=1-t; real onemt2=onemt*onemt; {Stack->push<pair>(onemt2*onemt*a+t*(3.0*(onemt2*b+t*onemt*c)+t*t*d)); return;} } -#line 3371 "runtime.in" +#line 3368 "runtime.in" // pair bezierP(pair a, pair b, pair c, pair d, real t); void gen264(stack *Stack) { @@ -4590,11 +4587,11 @@ void gen264(stack *Stack) pair c=vm::pop<pair>(Stack); pair b=vm::pop<pair>(Stack); pair a=vm::pop<pair>(Stack); -#line 3372 "runtime.in" +#line 3369 "runtime.in" {Stack->push<pair>(3.0*(t*t*(d-a+3.0*(b-c))+t*(2.0*(a+c)-4.0*b)+b-a)); return;} } -#line 3376 "runtime.in" +#line 3373 "runtime.in" // pair bezierPP(pair a, pair b, pair c, pair d, real t); void gen265(stack *Stack) { @@ -4603,11 +4600,11 @@ void gen265(stack *Stack) pair c=vm::pop<pair>(Stack); pair b=vm::pop<pair>(Stack); pair a=vm::pop<pair>(Stack); -#line 3377 "runtime.in" +#line 3374 "runtime.in" {Stack->push<pair>(6.0*(t*(d-a+3.0*(b-c))+a+c-2.0*b)); return;} } -#line 3381 "runtime.in" +#line 3378 "runtime.in" // pair bezierPPP(pair a, pair b, pair c, pair d); void gen266(stack *Stack) { @@ -4615,11 +4612,11 @@ void gen266(stack *Stack) pair c=vm::pop<pair>(Stack); pair b=vm::pop<pair>(Stack); pair a=vm::pop<pair>(Stack); -#line 3382 "runtime.in" +#line 3379 "runtime.in" {Stack->push<pair>(6.0*(d-a+3.0*(b-c))); return;} } -#line 3386 "runtime.in" +#line 3383 "runtime.in" // triple bezier(triple a, triple b, triple c, triple d, real t); void gen267(stack *Stack) { @@ -4628,13 +4625,13 @@ void gen267(stack *Stack) triple c=vm::pop<triple>(Stack); triple b=vm::pop<triple>(Stack); triple a=vm::pop<triple>(Stack); -#line 3387 "runtime.in" +#line 3384 "runtime.in" real onemt=1-t; real onemt2=onemt*onemt; {Stack->push<triple>(onemt2*onemt*a+t*(3.0*(onemt2*b+t*onemt*c)+t*t*d)); return;} } -#line 3393 "runtime.in" +#line 3390 "runtime.in" // triple bezierP(triple a, triple b, triple c, triple d, real t); void gen268(stack *Stack) { @@ -4643,11 +4640,11 @@ void gen268(stack *Stack) triple c=vm::pop<triple>(Stack); triple b=vm::pop<triple>(Stack); triple a=vm::pop<triple>(Stack); -#line 3394 "runtime.in" +#line 3391 "runtime.in" {Stack->push<triple>(3.0*(t*t*(d-a+3.0*(b-c))+t*(2.0*(a+c)-4.0*b)+b-a)); return;} } -#line 3398 "runtime.in" +#line 3395 "runtime.in" // triple bezierPP(triple a, triple b, triple c, triple d, real t); void gen269(stack *Stack) { @@ -4656,11 +4653,11 @@ void gen269(stack *Stack) triple c=vm::pop<triple>(Stack); triple b=vm::pop<triple>(Stack); triple a=vm::pop<triple>(Stack); -#line 3399 "runtime.in" +#line 3396 "runtime.in" {Stack->push<triple>(6.0*(t*(d-a+3.0*(b-c))+a+c-2.0*b)); return;} } -#line 3403 "runtime.in" +#line 3400 "runtime.in" // triple bezierPPP(triple a, triple b, triple c, triple d); void gen270(stack *Stack) { @@ -4668,130 +4665,130 @@ void gen270(stack *Stack) triple c=vm::pop<triple>(Stack); triple b=vm::pop<triple>(Stack); triple a=vm::pop<triple>(Stack); -#line 3404 "runtime.in" +#line 3401 "runtime.in" {Stack->push<triple>(6.0*(d-a+3.0*(b-c))); return;} } // String operations -#line 3410 "runtime.in" +#line 3407 "runtime.in" void emptyString(stack *Stack) { -#line 3411 "runtime.in" +#line 3408 "runtime.in" {Stack->push<string>(emptystring); return;} } -#line 3416 "runtime.in" +#line 3413 "runtime.in" // Int length(string *s); void gen272(stack *Stack) { string * s=vm::pop<string *>(Stack); -#line 3417 "runtime.in" +#line 3414 "runtime.in" {Stack->push<Int>((Int) s->length()); return;} } -#line 3421 "runtime.in" +#line 3418 "runtime.in" // Int find(string *s, string t, Int pos=0); void gen273(stack *Stack) { Int pos=vm::pop<Int>(Stack,0); string t=vm::pop<string>(Stack); string * s=vm::pop<string *>(Stack); -#line 3422 "runtime.in" +#line 3419 "runtime.in" size_t n=s->find(t,pos); {Stack->push<Int>(n == string::npos ? (Int) -1 : (Int) n); return;} } -#line 3427 "runtime.in" +#line 3424 "runtime.in" // Int rfind(string *s, string t, Int pos=-1); void gen274(stack *Stack) { Int pos=vm::pop<Int>(Stack,-1); string t=vm::pop<string>(Stack); string * s=vm::pop<string *>(Stack); -#line 3428 "runtime.in" +#line 3425 "runtime.in" size_t n=s->rfind(t,pos); {Stack->push<Int>(n == string::npos ? (Int) -1 : (Int) n); return;} } -#line 3433 "runtime.in" +#line 3430 "runtime.in" // string reverse(string s); void gen275(stack *Stack) { string s=vm::pop<string>(Stack); -#line 3434 "runtime.in" +#line 3431 "runtime.in" reverse(s.begin(),s.end()); {Stack->push<string>(s); return;} } -#line 3439 "runtime.in" +#line 3436 "runtime.in" // string insert(string s, Int pos, string t); void gen276(stack *Stack) { string t=vm::pop<string>(Stack); Int pos=vm::pop<Int>(Stack); string s=vm::pop<string>(Stack); -#line 3440 "runtime.in" +#line 3437 "runtime.in" if ((size_t) pos < s.length()) {Stack->push<string>(s.insert(pos,t)); return;} {Stack->push<string>(s); return;} } -#line 3446 "runtime.in" +#line 3443 "runtime.in" // string substr(string* s, Int pos, Int n=-1); void gen277(stack *Stack) { Int n=vm::pop<Int>(Stack,-1); Int pos=vm::pop<Int>(Stack); string* s=vm::pop<string*>(Stack); -#line 3447 "runtime.in" +#line 3444 "runtime.in" if ((size_t) pos < s->length()) {Stack->push<string>(s->substr(pos,n)); return;} {Stack->push<string>(emptystring); return;} } -#line 3453 "runtime.in" +#line 3450 "runtime.in" // string erase(string s, Int pos, Int n); void gen278(stack *Stack) { Int n=vm::pop<Int>(Stack); Int pos=vm::pop<Int>(Stack); string s=vm::pop<string>(Stack); -#line 3454 "runtime.in" +#line 3451 "runtime.in" if ((size_t) pos < s.length()) {Stack->push<string>(s.erase(pos,n)); return;} {Stack->push<string>(s); return;} } -#line 3460 "runtime.in" +#line 3457 "runtime.in" // string downcase(string s); void gen279(stack *Stack) { string s=vm::pop<string>(Stack); -#line 3461 "runtime.in" +#line 3458 "runtime.in" std::transform(s.begin(),s.end(),s.begin(),tolower); {Stack->push<string>(s); return;} } -#line 3466 "runtime.in" +#line 3463 "runtime.in" // string upcase(string s); void gen280(stack *Stack) { string s=vm::pop<string>(Stack); -#line 3467 "runtime.in" +#line 3464 "runtime.in" std::transform(s.begin(),s.end(),s.begin(),toupper); {Stack->push<string>(s); return;} } // returns a string constructed by translating all occurrences of the string // from in an array of string pairs {from,to} to the string to in string s. -#line 3474 "runtime.in" +#line 3471 "runtime.in" // string replace(string *S, stringarray2 *translate); void gen281(stack *Stack) { stringarray2 * translate=vm::pop<stringarray2 *>(Stack); string * S=vm::pop<string *>(Stack); -#line 3475 "runtime.in" +#line 3472 "runtime.in" size_t size=checkArray(translate); for(size_t i=0; i < size; i++) { array *a=read<array*>(translate,i); @@ -4815,13 +4812,13 @@ void gen281(stack *Stack) {Stack->push<string>(buf.str()); return;} } -#line 3499 "runtime.in" +#line 3496 "runtime.in" // string format(string *format, Int x); void gen282(stack *Stack) { Int x=vm::pop<Int>(Stack); string * format=vm::pop<string *>(Stack); -#line 3500 "runtime.in" +#line 3497 "runtime.in" const char *f=format->c_str(); checkformat(f,true); @@ -4835,14 +4832,14 @@ void gen282(stack *Stack) {Stack->push<string>(s); return;} } -#line 3514 "runtime.in" +#line 3511 "runtime.in" // string format(string *format, real x, string locale=emptystring); void gen283(stack *Stack) { string locale=vm::pop<string>(Stack,emptystring); real x=vm::pop<real>(Stack); string * format=vm::pop<string *>(Stack); -#line 3515 "runtime.in" +#line 3512 "runtime.in" bool tex=getSetting<string>("tex") != "none"; bool texify=false; ostringstream out; @@ -4966,12 +4963,12 @@ void gen283(stack *Stack) {Stack->push<string>(out.str()); return;} } -#line 3639 "runtime.in" +#line 3636 "runtime.in" // Int hex(string s); void gen284(stack *Stack) { string s=vm::pop<string>(Stack); -#line 3640 "runtime.in" +#line 3637 "runtime.in" istringstream is(s); is.setf(std::ios::hex,std::ios::basefield); Int value; @@ -4981,36 +4978,36 @@ void gen284(stack *Stack) error(buf); } -#line 3650 "runtime.in" +#line 3647 "runtime.in" // string string(Int x); void gen285(stack *Stack) { Int x=vm::pop<Int>(Stack); -#line 3651 "runtime.in" +#line 3648 "runtime.in" ostringstream buf; buf << x; {Stack->push<string>(buf.str()); return;} } -#line 3657 "runtime.in" +#line 3654 "runtime.in" // string string(real x, Int digits=DBL_DIG); void gen286(stack *Stack) { Int digits=vm::pop<Int>(Stack,DBL_DIG); real x=vm::pop<real>(Stack); -#line 3658 "runtime.in" +#line 3655 "runtime.in" ostringstream buf; buf.precision(digits); buf << x; {Stack->push<string>(buf.str()); return;} } -#line 3665 "runtime.in" +#line 3662 "runtime.in" // string time(string format=defaulttimeformat); void gen287(stack *Stack) { string format=vm::pop<string>(Stack,defaulttimeformat); -#line 3666 "runtime.in" +#line 3663 "runtime.in" #ifdef HAVE_STRFTIME const time_t bintime=time(NULL); if(!strftime(Time,nTime,format.c_str(),localtime(&bintime))) {Stack->push<string>(""); return;} @@ -5020,13 +5017,13 @@ void gen287(stack *Stack) #endif } -#line 3676 "runtime.in" +#line 3673 "runtime.in" // string time(Int seconds, string format=defaulttimeformat); void gen288(stack *Stack) { string format=vm::pop<string>(Stack,defaulttimeformat); Int seconds=vm::pop<Int>(Stack); -#line 3677 "runtime.in" +#line 3674 "runtime.in" #ifdef HAVE_STRFTIME const time_t bintime=seconds; if(!strftime(Time,nTime,format.c_str(),localtime(&bintime))) {Stack->push<string>(""); return;} @@ -5038,13 +5035,13 @@ void gen288(stack *Stack) #endif } -#line 3689 "runtime.in" +#line 3686 "runtime.in" // Int seconds(string t=emptystring, string format=emptystring); void gen289(stack *Stack) { string format=vm::pop<string>(Stack,emptystring); string t=vm::pop<string>(Stack,emptystring); -#line 3690 "runtime.in" +#line 3687 "runtime.in" #if defined(HAVE_STRPTIME) const time_t bintime=time(NULL); tm tm=*localtime(&bintime); @@ -5055,11 +5052,11 @@ void gen289(stack *Stack) #endif } -#line 3701 "runtime.in" +#line 3698 "runtime.in" // realarray* _cputime(); void gen290(stack *Stack) { -#line 3702 "runtime.in" +#line 3699 "runtime.in" static const real ticktime=1.0/sysconf(_SC_CLK_TCK); struct tms buf; @@ -5074,234 +5071,234 @@ void gen290(stack *Stack) // Math -#line 3717 "runtime.in" +#line 3714 "runtime.in" // real ^(real x, Int y); void gen291(stack *Stack) { Int y=vm::pop<Int>(Stack); real x=vm::pop<real>(Stack); -#line 3718 "runtime.in" +#line 3715 "runtime.in" {Stack->push<real>(pow(x,y)); return;} } -#line 3723 "runtime.in" +#line 3720 "runtime.in" // pair ^(pair z, Int y); void gen292(stack *Stack) { Int y=vm::pop<Int>(Stack); pair z=vm::pop<pair>(Stack); -#line 3724 "runtime.in" +#line 3721 "runtime.in" {Stack->push<pair>(pow(z,y)); return;} } -#line 3728 "runtime.in" +#line 3725 "runtime.in" // Int quotient(Int x, Int y); void gen293(stack *Stack) { Int y=vm::pop<Int>(Stack); Int x=vm::pop<Int>(Stack); -#line 3729 "runtime.in" +#line 3726 "runtime.in" if(y == 0) dividebyzero(); if(y == -1) {Stack->push<Int>(Negate(x)); return;} // Implementation-independent definition of integer division: round down {Stack->push<Int>((x-portableMod(x,y))/y); return;} } -#line 3736 "runtime.in" +#line 3733 "runtime.in" // Int abs(Int x); void gen294(stack *Stack) { Int x=vm::pop<Int>(Stack); -#line 3737 "runtime.in" +#line 3734 "runtime.in" {Stack->push<Int>(Abs(x)); return;} } -#line 3741 "runtime.in" +#line 3738 "runtime.in" // Int sgn(real x); void gen295(stack *Stack) { real x=vm::pop<real>(Stack); -#line 3742 "runtime.in" +#line 3739 "runtime.in" {Stack->push<Int>(sgn(x)); return;} } -#line 3746 "runtime.in" +#line 3743 "runtime.in" // Int rand(); void gen296(stack *Stack) { -#line 3747 "runtime.in" +#line 3744 "runtime.in" {Stack->push<Int>(rand()); return;} } -#line 3751 "runtime.in" +#line 3748 "runtime.in" // void srand(Int seed); void gen297(stack *Stack) { Int seed=vm::pop<Int>(Stack); -#line 3752 "runtime.in" +#line 3749 "runtime.in" srand(intcast(seed)); } // a random number uniformly distributed in the interval [0,1] -#line 3757 "runtime.in" +#line 3754 "runtime.in" // real unitrand(); void gen298(stack *Stack) { -#line 3758 "runtime.in" +#line 3755 "runtime.in" {Stack->push<real>(((real) rand())/RAND_MAX); return;} } -#line 3762 "runtime.in" +#line 3759 "runtime.in" // Int ceil(real x); void gen299(stack *Stack) { real x=vm::pop<real>(Stack); -#line 3763 "runtime.in" +#line 3760 "runtime.in" {Stack->push<Int>(Intcast(ceil(x))); return;} } -#line 3767 "runtime.in" +#line 3764 "runtime.in" // Int floor(real x); void gen300(stack *Stack) { real x=vm::pop<real>(Stack); -#line 3768 "runtime.in" +#line 3765 "runtime.in" {Stack->push<Int>(Intcast(floor(x))); return;} } -#line 3772 "runtime.in" +#line 3769 "runtime.in" // Int round(real x); void gen301(stack *Stack) { real x=vm::pop<real>(Stack); -#line 3773 "runtime.in" +#line 3770 "runtime.in" if(validInt(x)) {Stack->push<Int>(Round(x)); return;} integeroverflow(0); } -#line 3778 "runtime.in" +#line 3775 "runtime.in" // Int Ceil(real x); void gen302(stack *Stack) { real x=vm::pop<real>(Stack); -#line 3779 "runtime.in" +#line 3776 "runtime.in" {Stack->push<Int>(Ceil(x)); return;} } -#line 3783 "runtime.in" +#line 3780 "runtime.in" // Int Floor(real x); void gen303(stack *Stack) { real x=vm::pop<real>(Stack); -#line 3784 "runtime.in" +#line 3781 "runtime.in" {Stack->push<Int>(Floor(x)); return;} } -#line 3788 "runtime.in" +#line 3785 "runtime.in" // Int Round(real x); void gen304(stack *Stack) { real x=vm::pop<real>(Stack); -#line 3789 "runtime.in" +#line 3786 "runtime.in" {Stack->push<Int>(Round(Intcap(x))); return;} } -#line 3793 "runtime.in" +#line 3790 "runtime.in" // real fmod(real x, real y); void gen305(stack *Stack) { real y=vm::pop<real>(Stack); real x=vm::pop<real>(Stack); -#line 3794 "runtime.in" +#line 3791 "runtime.in" if (y == 0.0) dividebyzero(); {Stack->push<real>(fmod(x,y)); return;} } -#line 3799 "runtime.in" +#line 3796 "runtime.in" // real atan2(real y, real x); void gen306(stack *Stack) { real x=vm::pop<real>(Stack); real y=vm::pop<real>(Stack); -#line 3800 "runtime.in" +#line 3797 "runtime.in" {Stack->push<real>(atan2(y,x)); return;} } -#line 3804 "runtime.in" +#line 3801 "runtime.in" // real hypot(real x, real y); void gen307(stack *Stack) { real y=vm::pop<real>(Stack); real x=vm::pop<real>(Stack); -#line 3805 "runtime.in" +#line 3802 "runtime.in" {Stack->push<real>(hypot(x,y)); return;} } -#line 3809 "runtime.in" +#line 3806 "runtime.in" // real remainder(real x, real y); void gen308(stack *Stack) { real y=vm::pop<real>(Stack); real x=vm::pop<real>(Stack); -#line 3810 "runtime.in" +#line 3807 "runtime.in" {Stack->push<real>(remainder(x,y)); return;} } -#line 3814 "runtime.in" +#line 3811 "runtime.in" // real J(Int n, real x); void gen309(stack *Stack) { real x=vm::pop<real>(Stack); Int n=vm::pop<Int>(Stack); -#line 3815 "runtime.in" +#line 3812 "runtime.in" {Stack->push<real>(jn(n,x)); return;} } -#line 3819 "runtime.in" +#line 3816 "runtime.in" // real Y(Int n, real x); void gen310(stack *Stack) { real x=vm::pop<real>(Stack); Int n=vm::pop<Int>(Stack); -#line 3820 "runtime.in" +#line 3817 "runtime.in" {Stack->push<real>(yn(n,x)); return;} } -#line 3824 "runtime.in" +#line 3821 "runtime.in" // real erf(real x); void gen311(stack *Stack) { real x=vm::pop<real>(Stack); -#line 3825 "runtime.in" +#line 3822 "runtime.in" {Stack->push<real>(erf(x)); return;} } -#line 3829 "runtime.in" +#line 3826 "runtime.in" // real erfc(real x); void gen312(stack *Stack) { real x=vm::pop<real>(Stack); -#line 3830 "runtime.in" +#line 3827 "runtime.in" {Stack->push<real>(erfc(x)); return;} } -#line 3834 "runtime.in" +#line 3831 "runtime.in" // Int factorial(Int n); void gen313(stack *Stack) { Int n=vm::pop<Int>(Stack); -#line 3835 "runtime.in" +#line 3832 "runtime.in" if(n < 0) error(invalidargument); {Stack->push<Int>(factorial(n)); return;} } -#line 3839 "runtime.in" +#line 3836 "runtime.in" // Int choose(Int n, Int k); void gen314(stack *Stack) { Int k=vm::pop<Int>(Stack); Int n=vm::pop<Int>(Stack); -#line 3840 "runtime.in" +#line 3837 "runtime.in" if(n < 0 || k < 0 || k > n) error(invalidargument); Int f=1; Int r=n-k; @@ -5312,12 +5309,12 @@ void gen314(stack *Stack) {Stack->push<Int>(f); return;} } -#line 3850 "runtime.in" +#line 3847 "runtime.in" // real gamma(real x); void gen315(stack *Stack) { real x=vm::pop<real>(Stack); -#line 3851 "runtime.in" +#line 3848 "runtime.in" #ifdef HAVE_TGAMMA {Stack->push<real>(tgamma(x)); return;} #else @@ -5327,23 +5324,23 @@ void gen315(stack *Stack) } // Complex Gamma function -#line 3861 "runtime.in" +#line 3858 "runtime.in" // pair gamma(explicit pair z); void gen316(stack *Stack) { pair z=vm::pop<pair>(Stack); -#line 3862 "runtime.in" +#line 3859 "runtime.in" {Stack->push<pair>(gamma(z)); return;} } -#line 3866 "runtime.in" +#line 3863 "runtime.in" // realarray* quadraticroots(real a, real b, real c); void gen317(stack *Stack) { real c=vm::pop<real>(Stack); real b=vm::pop<real>(Stack); real a=vm::pop<real>(Stack); -#line 3867 "runtime.in" +#line 3864 "runtime.in" quadraticroots q(a,b,c); array *roots=new array(q.roots); if(q.roots >= 1) (*roots)[0]=q.t1; @@ -5351,14 +5348,14 @@ void gen317(stack *Stack) {Stack->push<realarray*>(roots); return;} } -#line 3875 "runtime.in" +#line 3872 "runtime.in" // pairarray* quadraticroots(explicit pair a, explicit pair b, explicit pair c); void gen318(stack *Stack) { pair c=vm::pop<pair>(Stack); pair b=vm::pop<pair>(Stack); pair a=vm::pop<pair>(Stack); -#line 3876 "runtime.in" +#line 3873 "runtime.in" Quadraticroots q(a,b,c); array *roots=new array(q.roots); if(q.roots >= 1) (*roots)[0]=q.z1; @@ -5366,7 +5363,7 @@ void gen318(stack *Stack) {Stack->push<pairarray*>(roots); return;} } -#line 3884 "runtime.in" +#line 3881 "runtime.in" // realarray* cubicroots(real a, real b, real c, real d); void gen319(stack *Stack) { @@ -5374,7 +5371,7 @@ void gen319(stack *Stack) real c=vm::pop<real>(Stack); real b=vm::pop<real>(Stack); real a=vm::pop<real>(Stack); -#line 3885 "runtime.in" +#line 3882 "runtime.in" cubicroots q(a,b,c,d); array *roots=new array(q.roots); if(q.roots >= 1) (*roots)[0]=q.t1; @@ -5385,103 +5382,103 @@ void gen319(stack *Stack) // Transforms -#line 3896 "runtime.in" +#line 3893 "runtime.in" // bool ==(transform a, transform b); void gen320(stack *Stack) { transform b=vm::pop<transform>(Stack); transform a=vm::pop<transform>(Stack); -#line 3897 "runtime.in" +#line 3894 "runtime.in" {Stack->push<bool>(a == b); return;} } -#line 3902 "runtime.in" +#line 3899 "runtime.in" // bool !=(transform a, transform b); void gen321(stack *Stack) { transform b=vm::pop<transform>(Stack); transform a=vm::pop<transform>(Stack); -#line 3903 "runtime.in" +#line 3900 "runtime.in" {Stack->push<bool>(a != b); return;} } -#line 3907 "runtime.in" +#line 3904 "runtime.in" // transform +(transform a, transform b); void gen322(stack *Stack) { transform b=vm::pop<transform>(Stack); transform a=vm::pop<transform>(Stack); -#line 3908 "runtime.in" +#line 3905 "runtime.in" {Stack->push<transform>(a+b); return;} } -#line 3912 "runtime.in" +#line 3909 "runtime.in" // transform *(transform a, transform b); void gen323(stack *Stack) { transform b=vm::pop<transform>(Stack); transform a=vm::pop<transform>(Stack); -#line 3913 "runtime.in" +#line 3910 "runtime.in" {Stack->push<transform>(a*b); return;} } -#line 3917 "runtime.in" +#line 3914 "runtime.in" // pair *(transform t, pair z); void gen324(stack *Stack) { pair z=vm::pop<pair>(Stack); transform t=vm::pop<transform>(Stack); -#line 3918 "runtime.in" +#line 3915 "runtime.in" {Stack->push<pair>(t*z); return;} } -#line 3922 "runtime.in" +#line 3919 "runtime.in" // path *(transform t, path g); void gen325(stack *Stack) { path g=vm::pop<path>(Stack); transform t=vm::pop<transform>(Stack); -#line 3923 "runtime.in" +#line 3920 "runtime.in" {Stack->push<path>(transformed(t,g)); return;} } -#line 3927 "runtime.in" +#line 3924 "runtime.in" // pen *(transform t, pen p); void gen326(stack *Stack) { pen p=vm::pop<pen>(Stack); transform t=vm::pop<transform>(Stack); -#line 3928 "runtime.in" +#line 3925 "runtime.in" {Stack->push<pen>(transformed(t,p)); return;} } -#line 3932 "runtime.in" +#line 3929 "runtime.in" // picture* *(transform t, picture *f); void gen327(stack *Stack) { picture * f=vm::pop<picture *>(Stack); transform t=vm::pop<transform>(Stack); -#line 3933 "runtime.in" +#line 3930 "runtime.in" {Stack->push<picture*>(transformed(t,f)); return;} } -#line 3937 "runtime.in" +#line 3934 "runtime.in" // picture* *(realarray2 *t, picture *f); void gen328(stack *Stack) { picture * f=vm::pop<picture *>(Stack); realarray2 * t=vm::pop<realarray2 *>(Stack); -#line 3938 "runtime.in" +#line 3935 "runtime.in" {Stack->push<picture*>(transformed(*t,f)); return;} } -#line 3942 "runtime.in" +#line 3939 "runtime.in" // transform ^(transform t, Int n); void gen329(stack *Stack) { Int n=vm::pop<Int>(Stack); transform t=vm::pop<transform>(Stack); -#line 3943 "runtime.in" +#line 3940 "runtime.in" transform T; if(n < 0) { n=-n; @@ -5491,55 +5488,55 @@ void gen329(stack *Stack) {Stack->push<transform>(T); return;} } -#line 3953 "runtime.in" +#line 3950 "runtime.in" void transformXPart(stack *Stack) { transform t=vm::pop<transform>(Stack); -#line 3954 "runtime.in" +#line 3951 "runtime.in" {Stack->push<real>(t.getx()); return;} } -#line 3958 "runtime.in" +#line 3955 "runtime.in" void transformYPart(stack *Stack) { transform t=vm::pop<transform>(Stack); -#line 3959 "runtime.in" +#line 3956 "runtime.in" {Stack->push<real>(t.gety()); return;} } -#line 3963 "runtime.in" +#line 3960 "runtime.in" void transformXXPart(stack *Stack) { transform t=vm::pop<transform>(Stack); -#line 3964 "runtime.in" +#line 3961 "runtime.in" {Stack->push<real>(t.getxx()); return;} } -#line 3968 "runtime.in" +#line 3965 "runtime.in" void transformXYPart(stack *Stack) { transform t=vm::pop<transform>(Stack); -#line 3969 "runtime.in" +#line 3966 "runtime.in" {Stack->push<real>(t.getxy()); return;} } -#line 3973 "runtime.in" +#line 3970 "runtime.in" void transformYXPart(stack *Stack) { transform t=vm::pop<transform>(Stack); -#line 3974 "runtime.in" +#line 3971 "runtime.in" {Stack->push<real>(t.getyx()); return;} } -#line 3978 "runtime.in" +#line 3975 "runtime.in" void transformYYPart(stack *Stack) { transform t=vm::pop<transform>(Stack); -#line 3979 "runtime.in" +#line 3976 "runtime.in" {Stack->push<real>(t.getyy()); return;} } -#line 3983 "runtime.in" +#line 3980 "runtime.in" void real6ToTransform(stack *Stack) { real yy=vm::pop<real>(Stack); @@ -5548,783 +5545,783 @@ void real6ToTransform(stack *Stack) real xx=vm::pop<real>(Stack); real y=vm::pop<real>(Stack); real x=vm::pop<real>(Stack); -#line 3985 "runtime.in" +#line 3982 "runtime.in" {Stack->push<transform>(transform(x,y,xx,xy,yx,yy)); return;} } -#line 3989 "runtime.in" +#line 3986 "runtime.in" // transform shift(transform t); void gen337(stack *Stack) { transform t=vm::pop<transform>(Stack); -#line 3990 "runtime.in" +#line 3987 "runtime.in" {Stack->push<transform>(transform(t.getx(),t.gety(),0,0,0,0)); return;} } -#line 3994 "runtime.in" +#line 3991 "runtime.in" // transform shiftless(transform t); void gen338(stack *Stack) { transform t=vm::pop<transform>(Stack); -#line 3995 "runtime.in" +#line 3992 "runtime.in" {Stack->push<transform>(transform(0,0,t.getxx(),t.getxy(),t.getyx(),t.getyy())); return;} } -#line 3999 "runtime.in" +#line 3996 "runtime.in" // transform identity(); void transformIdentity(stack *Stack) { -#line 4000 "runtime.in" +#line 3997 "runtime.in" {Stack->push<transform>(identity); return;} } -#line 4004 "runtime.in" +#line 4001 "runtime.in" // transform inverse(transform t); void gen340(stack *Stack) { transform t=vm::pop<transform>(Stack); -#line 4005 "runtime.in" +#line 4002 "runtime.in" {Stack->push<transform>(inverse(t)); return;} } -#line 4009 "runtime.in" +#line 4006 "runtime.in" // transform shift(pair z); void gen341(stack *Stack) { pair z=vm::pop<pair>(Stack); -#line 4010 "runtime.in" +#line 4007 "runtime.in" {Stack->push<transform>(shift(z)); return;} } -#line 4014 "runtime.in" +#line 4011 "runtime.in" // transform shift(real x, real y); void gen342(stack *Stack) { real y=vm::pop<real>(Stack); real x=vm::pop<real>(Stack); -#line 4015 "runtime.in" +#line 4012 "runtime.in" {Stack->push<transform>(shift(pair(x,y))); return;} } -#line 4019 "runtime.in" +#line 4016 "runtime.in" // transform xscale(real x); void gen343(stack *Stack) { real x=vm::pop<real>(Stack); -#line 4020 "runtime.in" +#line 4017 "runtime.in" {Stack->push<transform>(xscale(x)); return;} } -#line 4024 "runtime.in" +#line 4021 "runtime.in" // transform yscale(real y); void gen344(stack *Stack) { real y=vm::pop<real>(Stack); -#line 4025 "runtime.in" +#line 4022 "runtime.in" {Stack->push<transform>(yscale(y)); return;} } -#line 4029 "runtime.in" +#line 4026 "runtime.in" // transform scale(real x); void gen345(stack *Stack) { real x=vm::pop<real>(Stack); -#line 4030 "runtime.in" +#line 4027 "runtime.in" {Stack->push<transform>(scale(x)); return;} } -#line 4034 "runtime.in" +#line 4031 "runtime.in" // transform scale(real x, real y); void gen346(stack *Stack) { real y=vm::pop<real>(Stack); real x=vm::pop<real>(Stack); -#line 4035 "runtime.in" +#line 4032 "runtime.in" {Stack->push<transform>(xscale(x)*yscale(y)); return;} } -#line 4039 "runtime.in" +#line 4036 "runtime.in" // transform slant(real s); void gen347(stack *Stack) { real s=vm::pop<real>(Stack); -#line 4040 "runtime.in" +#line 4037 "runtime.in" {Stack->push<transform>(slant(s)); return;} } -#line 4044 "runtime.in" +#line 4041 "runtime.in" // transform rotate(real angle, pair z=0); void gen348(stack *Stack) { pair z=vm::pop<pair>(Stack,0); real angle=vm::pop<real>(Stack); -#line 4045 "runtime.in" +#line 4042 "runtime.in" {Stack->push<transform>(rotatearound(z,radians(angle))); return;} } -#line 4049 "runtime.in" +#line 4046 "runtime.in" // transform reflect(pair a, pair b); void gen349(stack *Stack) { pair b=vm::pop<pair>(Stack); pair a=vm::pop<pair>(Stack); -#line 4050 "runtime.in" +#line 4047 "runtime.in" {Stack->push<transform>(reflectabout(a,b)); return;} } // Pair operations -#line 4056 "runtime.in" +#line 4053 "runtime.in" void pairZero(stack *Stack) { -#line 4057 "runtime.in" +#line 4054 "runtime.in" {Stack->push<pair>(zero); return;} } -#line 4062 "runtime.in" +#line 4059 "runtime.in" void realRealToPair(stack *Stack) { real y=vm::pop<real>(Stack); real x=vm::pop<real>(Stack); -#line 4063 "runtime.in" +#line 4060 "runtime.in" {Stack->push<pair>(pair(x,y)); return;} } -#line 4067 "runtime.in" +#line 4064 "runtime.in" void pairNegate(stack *Stack) { pair z=vm::pop<pair>(Stack); -#line 4068 "runtime.in" +#line 4065 "runtime.in" {Stack->push<pair>(-z); return;} } -#line 4072 "runtime.in" +#line 4069 "runtime.in" // real xpart(pair z); void pairXPart(stack *Stack) { pair z=vm::pop<pair>(Stack); -#line 4073 "runtime.in" +#line 4070 "runtime.in" {Stack->push<real>(z.getx()); return;} } -#line 4077 "runtime.in" +#line 4074 "runtime.in" // real ypart(pair z); void pairYPart(stack *Stack) { pair z=vm::pop<pair>(Stack); -#line 4078 "runtime.in" +#line 4075 "runtime.in" {Stack->push<real>(z.gety()); return;} } -#line 4082 "runtime.in" +#line 4079 "runtime.in" // real length(pair z); void gen355(stack *Stack) { pair z=vm::pop<pair>(Stack); -#line 4083 "runtime.in" +#line 4080 "runtime.in" {Stack->push<real>(z.length()); return;} } -#line 4087 "runtime.in" +#line 4084 "runtime.in" // real abs(pair z); void gen356(stack *Stack) { pair z=vm::pop<pair>(Stack); -#line 4088 "runtime.in" +#line 4085 "runtime.in" {Stack->push<real>(z.length()); return;} } -#line 4092 "runtime.in" +#line 4089 "runtime.in" // pair sqrt(explicit pair z); void gen357(stack *Stack) { pair z=vm::pop<pair>(Stack); -#line 4093 "runtime.in" +#line 4090 "runtime.in" {Stack->push<pair>(Sqrt(z)); return;} } // Return the angle of z in radians. -#line 4098 "runtime.in" +#line 4095 "runtime.in" // real angle(pair z, bool warn=true); void gen358(stack *Stack) { bool warn=vm::pop<bool>(Stack,true); pair z=vm::pop<pair>(Stack); -#line 4099 "runtime.in" +#line 4096 "runtime.in" if(!warn && z.getx() == 0.0 && z.gety() == 0.0) {Stack->push<real>(0.0); return;} {Stack->push<real>(z.angle()); return;} } // Return the angle of z in degrees in the interval [0,360). -#line 4105 "runtime.in" +#line 4102 "runtime.in" // real degrees(pair z, bool warn=true); void gen359(stack *Stack) { bool warn=vm::pop<bool>(Stack,true); pair z=vm::pop<pair>(Stack); -#line 4106 "runtime.in" +#line 4103 "runtime.in" if(!warn && z.getx() == 0.0 && z.gety() == 0.0) {Stack->push<real>(0.0); return;} {Stack->push<real>(principalBranch(degrees(z.angle()))); return;} } // Convert degrees to radians. -#line 4112 "runtime.in" +#line 4109 "runtime.in" // real radians(real degrees); void gen360(stack *Stack) { real degrees=vm::pop<real>(Stack); -#line 4113 "runtime.in" +#line 4110 "runtime.in" {Stack->push<real>(radians(degrees)); return;} } // Convert radians to degrees. -#line 4118 "runtime.in" +#line 4115 "runtime.in" // real degrees(real radians); void gen361(stack *Stack) { real radians=vm::pop<real>(Stack); -#line 4119 "runtime.in" +#line 4116 "runtime.in" {Stack->push<real>(degrees(radians)); return;} } // Convert radians to degrees in [0,360). -#line 4124 "runtime.in" +#line 4121 "runtime.in" // real Degrees(real radians); void gen362(stack *Stack) { real radians=vm::pop<real>(Stack); -#line 4125 "runtime.in" +#line 4122 "runtime.in" {Stack->push<real>(principalBranch(degrees(radians))); return;} } -#line 4129 "runtime.in" +#line 4126 "runtime.in" // real Sin(real deg); void gen363(stack *Stack) { real deg=vm::pop<real>(Stack); -#line 4130 "runtime.in" +#line 4127 "runtime.in" {Stack->push<real>(sin(radians(deg))); return;} } -#line 4134 "runtime.in" +#line 4131 "runtime.in" // real Cos(real deg); void gen364(stack *Stack) { real deg=vm::pop<real>(Stack); -#line 4135 "runtime.in" +#line 4132 "runtime.in" {Stack->push<real>(cos(radians(deg))); return;} } -#line 4139 "runtime.in" +#line 4136 "runtime.in" // real Tan(real deg); void gen365(stack *Stack) { real deg=vm::pop<real>(Stack); -#line 4140 "runtime.in" +#line 4137 "runtime.in" {Stack->push<real>(tan(radians(deg))); return;} } -#line 4144 "runtime.in" +#line 4141 "runtime.in" // real aSin(real x); void gen366(stack *Stack) { real x=vm::pop<real>(Stack); -#line 4145 "runtime.in" +#line 4142 "runtime.in" {Stack->push<real>(degrees(asin(x))); return;} } -#line 4149 "runtime.in" +#line 4146 "runtime.in" // real aCos(real x); void gen367(stack *Stack) { real x=vm::pop<real>(Stack); -#line 4150 "runtime.in" +#line 4147 "runtime.in" {Stack->push<real>(degrees(acos(x))); return;} } -#line 4154 "runtime.in" +#line 4151 "runtime.in" // real aTan(real x); void gen368(stack *Stack) { real x=vm::pop<real>(Stack); -#line 4155 "runtime.in" +#line 4152 "runtime.in" {Stack->push<real>(degrees(atan(x))); return;} } -#line 4159 "runtime.in" +#line 4156 "runtime.in" // pair unit(pair z); void gen369(stack *Stack) { pair z=vm::pop<pair>(Stack); -#line 4160 "runtime.in" +#line 4157 "runtime.in" {Stack->push<pair>(unit(z)); return;} } -#line 4164 "runtime.in" +#line 4161 "runtime.in" // pair dir(real degrees); void gen370(stack *Stack) { real degrees=vm::pop<real>(Stack); -#line 4165 "runtime.in" +#line 4162 "runtime.in" {Stack->push<pair>(expi(radians(degrees))); return;} } -#line 4169 "runtime.in" +#line 4166 "runtime.in" // pair dir(explicit pair z); void gen371(stack *Stack) { pair z=vm::pop<pair>(Stack); -#line 4170 "runtime.in" +#line 4167 "runtime.in" {Stack->push<pair>(unit(z)); return;} } -#line 4174 "runtime.in" +#line 4171 "runtime.in" // pair expi(real angle); void gen372(stack *Stack) { real angle=vm::pop<real>(Stack); -#line 4175 "runtime.in" +#line 4172 "runtime.in" {Stack->push<pair>(expi(angle)); return;} } -#line 4179 "runtime.in" +#line 4176 "runtime.in" // pair exp(explicit pair z); void gen373(stack *Stack) { pair z=vm::pop<pair>(Stack); -#line 4180 "runtime.in" +#line 4177 "runtime.in" {Stack->push<pair>(exp(z)); return;} } -#line 4184 "runtime.in" +#line 4181 "runtime.in" // pair log(explicit pair z); void gen374(stack *Stack) { pair z=vm::pop<pair>(Stack); -#line 4185 "runtime.in" +#line 4182 "runtime.in" {Stack->push<pair>(pair(log(z.length()),z.angle())); return;} } -#line 4189 "runtime.in" +#line 4186 "runtime.in" // pair sin(explicit pair z); void gen375(stack *Stack) { pair z=vm::pop<pair>(Stack); -#line 4190 "runtime.in" +#line 4187 "runtime.in" {Stack->push<pair>(sin(z)); return;} } -#line 4194 "runtime.in" +#line 4191 "runtime.in" // pair cos(explicit pair z); void gen376(stack *Stack) { pair z=vm::pop<pair>(Stack); -#line 4195 "runtime.in" +#line 4192 "runtime.in" {Stack->push<pair>(pair(cos(z.getx())*cosh(z.gety()),-sin(z.getx())*sinh(z.gety()))); return;} } -#line 4199 "runtime.in" +#line 4196 "runtime.in" // pair conj(pair z); void gen377(stack *Stack) { pair z=vm::pop<pair>(Stack); -#line 4200 "runtime.in" +#line 4197 "runtime.in" {Stack->push<pair>(conj(z)); return;} } -#line 4204 "runtime.in" +#line 4201 "runtime.in" // pair realmult(pair z, pair w); void gen378(stack *Stack) { pair w=vm::pop<pair>(Stack); pair z=vm::pop<pair>(Stack); -#line 4205 "runtime.in" +#line 4202 "runtime.in" {Stack->push<pair>(pair (z.getx()*w.getx(),z.gety()*w.gety())); return;} } -#line 4209 "runtime.in" +#line 4206 "runtime.in" // triple realmult(triple u, triple v); void gen379(stack *Stack) { triple v=vm::pop<triple>(Stack); triple u=vm::pop<triple>(Stack); -#line 4210 "runtime.in" +#line 4207 "runtime.in" {Stack->push<triple>(triple (u.getx()*v.getx(),u.gety()*v.gety(),u.getz()*v.getz())); return;} } // To avoid confusion, a dot product requires explicit pair arguments. -#line 4215 "runtime.in" +#line 4212 "runtime.in" // real dot(explicit pair z, explicit pair w); void gen380(stack *Stack) { pair w=vm::pop<pair>(Stack); pair z=vm::pop<pair>(Stack); -#line 4216 "runtime.in" +#line 4213 "runtime.in" {Stack->push<real>(dot(z,w)); return;} } // Triple operations -#line 4222 "runtime.in" +#line 4219 "runtime.in" void tripleZero(stack *Stack) { -#line 4223 "runtime.in" +#line 4220 "runtime.in" static triple zero; {Stack->push<triple>(zero); return;} } -#line 4229 "runtime.in" +#line 4226 "runtime.in" void realRealRealToTriple(stack *Stack) { real z=vm::pop<real>(Stack); real y=vm::pop<real>(Stack); real x=vm::pop<real>(Stack); -#line 4230 "runtime.in" +#line 4227 "runtime.in" {Stack->push<triple>(triple(x,y,z)); return;} } -#line 4234 "runtime.in" +#line 4231 "runtime.in" // real xpart(triple v); void tripleXPart(stack *Stack) { triple v=vm::pop<triple>(Stack); -#line 4235 "runtime.in" +#line 4232 "runtime.in" {Stack->push<real>(v.getx()); return;} } -#line 4239 "runtime.in" +#line 4236 "runtime.in" // real ypart(triple v); void tripleYPart(stack *Stack) { triple v=vm::pop<triple>(Stack); -#line 4240 "runtime.in" +#line 4237 "runtime.in" {Stack->push<real>(v.gety()); return;} } -#line 4244 "runtime.in" +#line 4241 "runtime.in" // real zpart(triple v); void tripleZPart(stack *Stack) { triple v=vm::pop<triple>(Stack); -#line 4245 "runtime.in" +#line 4242 "runtime.in" {Stack->push<real>(v.getz()); return;} } -#line 4249 "runtime.in" +#line 4246 "runtime.in" // triple *(real x, triple v); void gen386(stack *Stack) { triple v=vm::pop<triple>(Stack); real x=vm::pop<real>(Stack); -#line 4250 "runtime.in" +#line 4247 "runtime.in" {Stack->push<triple>(x*v); return;} } -#line 4254 "runtime.in" +#line 4251 "runtime.in" // triple *(triple v, real x); void gen387(stack *Stack) { real x=vm::pop<real>(Stack); triple v=vm::pop<triple>(Stack); -#line 4255 "runtime.in" +#line 4252 "runtime.in" {Stack->push<triple>(v*x); return;} } -#line 4259 "runtime.in" +#line 4256 "runtime.in" // triple /(triple v, real x); void gen388(stack *Stack) { real x=vm::pop<real>(Stack); triple v=vm::pop<triple>(Stack); -#line 4260 "runtime.in" +#line 4257 "runtime.in" {Stack->push<triple>(v/x); return;} } -#line 4264 "runtime.in" +#line 4261 "runtime.in" // real length(triple v); void gen389(stack *Stack) { triple v=vm::pop<triple>(Stack); -#line 4265 "runtime.in" +#line 4262 "runtime.in" {Stack->push<real>(v.length()); return;} } -#line 4269 "runtime.in" +#line 4266 "runtime.in" // real abs(triple v); void gen390(stack *Stack) { triple v=vm::pop<triple>(Stack); -#line 4270 "runtime.in" +#line 4267 "runtime.in" {Stack->push<real>(v.length()); return;} } -#line 4274 "runtime.in" +#line 4271 "runtime.in" // real polar(triple v, bool warn=true); void gen391(stack *Stack) { bool warn=vm::pop<bool>(Stack,true); triple v=vm::pop<triple>(Stack); -#line 4275 "runtime.in" +#line 4272 "runtime.in" if(!warn && v.getx() == 0.0 && v.gety() == 0.0 && v.getz() == 0.0) {Stack->push<real>(0.0); return;} {Stack->push<real>(v.polar()); return;} } -#line 4280 "runtime.in" +#line 4277 "runtime.in" // real azimuth(triple v, bool warn=true); void gen392(stack *Stack) { bool warn=vm::pop<bool>(Stack,true); triple v=vm::pop<triple>(Stack); -#line 4281 "runtime.in" +#line 4278 "runtime.in" if(!warn && v.getx() == 0.0 && v.gety() == 0.0) {Stack->push<real>(0.0); return;} {Stack->push<real>(v.azimuth()); return;} } -#line 4286 "runtime.in" +#line 4283 "runtime.in" // real colatitude(triple v, bool warn=true); void gen393(stack *Stack) { bool warn=vm::pop<bool>(Stack,true); triple v=vm::pop<triple>(Stack); -#line 4287 "runtime.in" +#line 4284 "runtime.in" if(!warn && v.getx() == 0.0 && v.gety() == 0.0 && v.getz() == 0.0) {Stack->push<real>(0.0); return;} {Stack->push<real>(degrees(v.polar())); return;} } -#line 4292 "runtime.in" +#line 4289 "runtime.in" // real latitude(triple v, bool warn=true); void gen394(stack *Stack) { bool warn=vm::pop<bool>(Stack,true); triple v=vm::pop<triple>(Stack); -#line 4293 "runtime.in" +#line 4290 "runtime.in" if(!warn && v.getx() == 0.0 && v.gety() == 0.0 && v.getz() == 0.0) {Stack->push<real>(0.0); return;} {Stack->push<real>(90.0-degrees(v.polar())); return;} } // Return the longitude of v in [0,360). -#line 4299 "runtime.in" +#line 4296 "runtime.in" // real longitude(triple v, bool warn=true); void gen395(stack *Stack) { bool warn=vm::pop<bool>(Stack,true); triple v=vm::pop<triple>(Stack); -#line 4300 "runtime.in" +#line 4297 "runtime.in" if(!warn && v.getx() == 0.0 && v.gety() == 0.0) {Stack->push<real>(0.0); return;} {Stack->push<real>(principalBranch(degrees(v.azimuth()))); return;} } -#line 4305 "runtime.in" +#line 4302 "runtime.in" // triple unit(triple v); void gen396(stack *Stack) { triple v=vm::pop<triple>(Stack); -#line 4306 "runtime.in" +#line 4303 "runtime.in" {Stack->push<triple>(unit(v)); return;} } -#line 4310 "runtime.in" +#line 4307 "runtime.in" // real dot(triple u, triple v); void gen397(stack *Stack) { triple v=vm::pop<triple>(Stack); triple u=vm::pop<triple>(Stack); -#line 4311 "runtime.in" +#line 4308 "runtime.in" {Stack->push<real>(dot(u,v)); return;} } -#line 4315 "runtime.in" +#line 4312 "runtime.in" // triple cross(triple u, triple v); void gen398(stack *Stack) { triple v=vm::pop<triple>(Stack); triple u=vm::pop<triple>(Stack); -#line 4316 "runtime.in" +#line 4313 "runtime.in" {Stack->push<triple>(cross(u,v)); return;} } -#line 4320 "runtime.in" +#line 4317 "runtime.in" // triple expi(real polar, real azimuth); void gen399(stack *Stack) { real azimuth=vm::pop<real>(Stack); real polar=vm::pop<real>(Stack); -#line 4321 "runtime.in" +#line 4318 "runtime.in" {Stack->push<triple>(expi(polar,azimuth)); return;} } -#line 4325 "runtime.in" +#line 4322 "runtime.in" // triple dir(real colatitude, real longitude); void gen400(stack *Stack) { real longitude=vm::pop<real>(Stack); real colatitude=vm::pop<real>(Stack); -#line 4326 "runtime.in" +#line 4323 "runtime.in" {Stack->push<triple>(expi(radians(colatitude),radians(longitude))); return;} } // System routines -#line 4332 "runtime.in" +#line 4329 "runtime.in" // void atupdate(callable *f); void gen401(stack *Stack) { callable * f=vm::pop<callable *>(Stack); -#line 4333 "runtime.in" +#line 4330 "runtime.in" processData().atUpdateFunction=f; } -#line 4338 "runtime.in" +#line 4335 "runtime.in" // callable* atupdate(); void gen402(stack *Stack) { -#line 4339 "runtime.in" +#line 4336 "runtime.in" {Stack->push<callable*>(processData().atUpdateFunction); return;} } -#line 4343 "runtime.in" +#line 4340 "runtime.in" // void atexit(callable *f); void gen403(stack *Stack) { callable * f=vm::pop<callable *>(Stack); -#line 4344 "runtime.in" +#line 4341 "runtime.in" processData().atExitFunction=f; } -#line 4348 "runtime.in" +#line 4345 "runtime.in" // callable* atexit(); void gen404(stack *Stack) { -#line 4349 "runtime.in" +#line 4346 "runtime.in" {Stack->push<callable*>(processData().atExitFunction); return;} } -#line 4353 "runtime.in" +#line 4350 "runtime.in" // void atbreakpoint(callableBp *f); void gen405(stack *Stack) { callableBp * f=vm::pop<callableBp *>(Stack); -#line 4354 "runtime.in" +#line 4351 "runtime.in" processData().atBreakpointFunction=f; } -#line 4358 "runtime.in" +#line 4355 "runtime.in" // void breakpoint(runnable *s=NULL); void gen406(stack *Stack) { runnable * s=vm::pop<runnable *>(Stack,NULL); -#line 4359 "runtime.in" +#line 4356 "runtime.in" breakpoint(Stack,s); } -#line 4363 "runtime.in" +#line 4360 "runtime.in" // string locatefile(string file); void gen407(stack *Stack) { string file=vm::pop<string>(Stack); -#line 4364 "runtime.in" +#line 4361 "runtime.in" {Stack->push<string>(locateFile(file)); return;} } -#line 4368 "runtime.in" +#line 4365 "runtime.in" // void stop(string file, Int line, runnable *s=NULL); void gen408(stack *Stack) { runnable * s=vm::pop<runnable *>(Stack,NULL); Int line=vm::pop<Int>(Stack); string file=vm::pop<string>(Stack); -#line 4369 "runtime.in" +#line 4366 "runtime.in" file=locateFile(file); clear(file,line); cout << "setting breakpoint at " << file << ": " << line << endl; bplist.push_back(bpinfo(file,line,s)); } -#line 4376 "runtime.in" +#line 4373 "runtime.in" // void breakpoints(); void gen409(stack *) { -#line 4377 "runtime.in" +#line 4374 "runtime.in" for(mem::list<bpinfo>::iterator p=bplist.begin(); p != bplist.end(); ++p) cout << p->f.name() << ": " << p->f.line() << endl; } -#line 4382 "runtime.in" +#line 4379 "runtime.in" // void clear(string file, Int line); void gen410(stack *Stack) { Int line=vm::pop<Int>(Stack); string file=vm::pop<string>(Stack); -#line 4383 "runtime.in" +#line 4380 "runtime.in" file=locateFile(file); clear(file,line,true); } -#line 4388 "runtime.in" +#line 4385 "runtime.in" // void clear(); void gen411(stack *) { -#line 4389 "runtime.in" +#line 4386 "runtime.in" bplist.clear(); } -#line 4393 "runtime.in" +#line 4390 "runtime.in" // void warn(string s); void gen412(stack *Stack) { string s=vm::pop<string>(Stack); -#line 4394 "runtime.in" +#line 4391 "runtime.in" Warn(s); } -#line 4398 "runtime.in" +#line 4395 "runtime.in" // void nowarn(string s); void gen413(stack *Stack) { string s=vm::pop<string>(Stack); -#line 4399 "runtime.in" +#line 4396 "runtime.in" noWarn(s); } // Strip directory from string -#line 4404 "runtime.in" +#line 4401 "runtime.in" // string stripdirectory(string *s); void gen414(stack *Stack) { string * s=vm::pop<string *>(Stack); -#line 4405 "runtime.in" +#line 4402 "runtime.in" {Stack->push<string>(stripDir(*s)); return;} } // Strip directory from string -#line 4410 "runtime.in" +#line 4407 "runtime.in" // string stripfile(string *s); void gen415(stack *Stack) { string * s=vm::pop<string *>(Stack); -#line 4411 "runtime.in" +#line 4408 "runtime.in" {Stack->push<string>(stripFile(*s)); return;} } // Strip file extension from string -#line 4416 "runtime.in" +#line 4413 "runtime.in" // string stripextension(string *s); void gen416(stack *Stack) { string * s=vm::pop<string *>(Stack); -#line 4417 "runtime.in" +#line 4414 "runtime.in" {Stack->push<string>(stripExt(*s)); return;} } // Call ImageMagick convert. -#line 4422 "runtime.in" +#line 4419 "runtime.in" // Int convert(string args=emptystring, string file=emptystring, string format=emptystring); void gen417(stack *Stack) { string format=vm::pop<string>(Stack,emptystring); string file=vm::pop<string>(Stack,emptystring); string args=vm::pop<string>(Stack,emptystring); -#line 4424 "runtime.in" +#line 4421 "runtime.in" string name=convertname(file,format); mem::vector<string> cmd; cmd.push_back(getSetting<string>("convert")); @@ -6341,14 +6338,14 @@ void gen417(stack *Stack) } // Call ImageMagick animate. -#line 4441 "runtime.in" +#line 4438 "runtime.in" // Int animate(string args=emptystring, string file=emptystring, string format=emptystring); void gen418(stack *Stack) { string format=vm::pop<string>(Stack,emptystring); string file=vm::pop<string>(Stack,emptystring); string args=vm::pop<string>(Stack,emptystring); -#line 4443 "runtime.in" +#line 4440 "runtime.in" #ifndef __CYGWIN__ string name=convertname(file,format,false); if(view()) { @@ -6363,12 +6360,12 @@ void gen418(stack *Stack) } // Delete file named s. -#line 4458 "runtime.in" +#line 4455 "runtime.in" // Int delete(string *s); void gen419(stack *Stack) { string * s=vm::pop<string *>(Stack); -#line 4459 "runtime.in" +#line 4456 "runtime.in" checkLocal(*s); Int rc=unlink(s->c_str()); if(rc == 0 && verbose > 0) @@ -6377,13 +6374,13 @@ void gen419(stack *Stack) } // Rename file "from" to file "to". -#line 4468 "runtime.in" +#line 4465 "runtime.in" // Int rename(string *from, string *to); void gen420(stack *Stack) { string * to=vm::pop<string *>(Stack); string * from=vm::pop<string *>(Stack); -#line 4469 "runtime.in" +#line 4466 "runtime.in" checkLocal(*from); checkLocal(*to); Int rc=rename(from->c_str(),to->c_str()); @@ -6396,10 +6393,10 @@ void gen420(stack *Stack) // Array operations // Create an empty array. -#line 4482 "runtime.in" +#line 4479 "runtime.in" void emptyArray(stack *Stack) { -#line 4483 "runtime.in" +#line 4480 "runtime.in" {Stack->push<array*>(new array(0)); return;} } @@ -6408,11 +6405,11 @@ void emptyArray(stack *Stack) // is popped off the stack, followed by each dimension in reverse order. // The array itself is technically a one dimensional array of one // dimension arrays and so on. -#line 4492 "runtime.in" +#line 4489 "runtime.in" void newDeepArray(stack *Stack) { Int depth=vm::pop<Int>(Stack); -#line 4493 "runtime.in" +#line 4490 "runtime.in" assert(depth > 0); Int *dims = new Int[depth]; @@ -6431,11 +6428,11 @@ void newDeepArray(stack *Stack) // Creates an array with elements already specified. First, the number // of elements is popped off the stack, followed by each element in // reverse order. -#line 4512 "runtime.in" +#line 4509 "runtime.in" void newInitializedArray(stack *Stack) { Int n=vm::pop<Int>(Stack); -#line 4513 "runtime.in" +#line 4510 "runtime.in" assert(n >= 0); array *a = new array(n); @@ -6448,12 +6445,12 @@ void newInitializedArray(stack *Stack) // Similar to newInitializedArray, but after the n elements, append another // array to it. -#line 4526 "runtime.in" +#line 4523 "runtime.in" void newAppendedArray(stack *Stack) { Int n=vm::pop<Int>(Stack); array* tail=vm::pop<array*>(Stack); -#line 4527 "runtime.in" +#line 4524 "runtime.in" assert(n >= 0); array *a = new array(n); @@ -6468,13 +6465,13 @@ void newAppendedArray(stack *Stack) // The function T[] array(int n, T value, int depth=0) produces a array of n // copies of x, where each copy is copied up to depth. -#line 4542 "runtime.in" +#line 4539 "runtime.in" void newDuplicateArray(stack *Stack) { Int depth=vm::pop<Int>(Stack,Int_MAX); item value=vm::pop(Stack); Int n=vm::pop<Int>(Stack); -#line 4543 "runtime.in" +#line 4540 "runtime.in" if(n < 0) error("cannot create a negative length array"); if(depth < 0) error("cannot copy to a negative depth"); @@ -6482,12 +6479,12 @@ void newDuplicateArray(stack *Stack) } // Read an element from an array. Checks for initialization & bounds. -#line 4551 "runtime.in" +#line 4548 "runtime.in" void arrayRead(stack *Stack) { Int n=vm::pop<Int>(Stack); array * a=vm::pop<array *>(Stack); -#line 4552 "runtime.in" +#line 4549 "runtime.in" item& i=arrayRead(a,n); if (i.empty()) { ostringstream buf; @@ -6498,50 +6495,50 @@ void arrayRead(stack *Stack) } // Slice a substring from an array. -#line 4563 "runtime.in" +#line 4560 "runtime.in" void arraySliceRead(stack *Stack) { Int right=vm::pop<Int>(Stack); Int left=vm::pop<Int>(Stack); array * a=vm::pop<array *>(Stack); -#line 4564 "runtime.in" +#line 4561 "runtime.in" checkArray(a); {Stack->push(a->slice(left, right)); return;} } // Slice a substring from an array. This implements the cases a[i:] and a[:] // where the endpoint is not given, and assumed to be the length of the array. -#line 4571 "runtime.in" +#line 4568 "runtime.in" void arraySliceReadToEnd(stack *Stack) { Int left=vm::pop<Int>(Stack); array * a=vm::pop<array *>(Stack); -#line 4572 "runtime.in" +#line 4569 "runtime.in" size_t len=checkArray(a); {Stack->push(a->slice(left, (Int)len)); return;} } // Read an element from an array of arrays. Check bounds and initialize // as necessary. -#line 4579 "runtime.in" +#line 4576 "runtime.in" void arrayArrayRead(stack *Stack) { Int n=vm::pop<Int>(Stack); array * a=vm::pop<array *>(Stack); -#line 4580 "runtime.in" +#line 4577 "runtime.in" item& i=arrayRead(a,n); if (i.empty()) i=new array(0); {Stack->push(i); return;} } // Write an element to an array. Increase size if necessary. -#line 4587 "runtime.in" +#line 4584 "runtime.in" void arrayWrite(stack *Stack) { Int n=vm::pop<Int>(Stack); array * a=vm::pop<array *>(Stack); item value=vm::pop(Stack); -#line 4588 "runtime.in" +#line 4585 "runtime.in" size_t len=checkArray(a); bool cyclic=a->cyclic(); if(cyclic && len > 0) n=imod(n,len); @@ -6555,27 +6552,27 @@ void arrayWrite(stack *Stack) {Stack->push(value); return;} } -#line 4602 "runtime.in" +#line 4599 "runtime.in" void arraySliceWrite(stack *Stack) { Int right=vm::pop<Int>(Stack); Int left=vm::pop<Int>(Stack); array * dest=vm::pop<array *>(Stack); array * src=vm::pop<array *>(Stack); -#line 4603 "runtime.in" +#line 4600 "runtime.in" checkArray(src); checkArray(dest); dest->setSlice(left, right, src); {Stack->push<array*>(src); return;} } -#line 4610 "runtime.in" +#line 4607 "runtime.in" void arraySliceWriteToEnd(stack *Stack) { Int left=vm::pop<Int>(Stack); array * dest=vm::pop<array *>(Stack); array * src=vm::pop<array *>(Stack); -#line 4611 "runtime.in" +#line 4608 "runtime.in" checkArray(src); size_t len=checkArray(dest); dest->setSlice(left, (Int) len, src); @@ -6583,20 +6580,20 @@ void arraySliceWriteToEnd(stack *Stack) } // Returns the length of an array. -#line 4619 "runtime.in" +#line 4616 "runtime.in" void arrayLength(stack *Stack) { array * a=vm::pop<array *>(Stack); -#line 4620 "runtime.in" +#line 4617 "runtime.in" {Stack->push<Int>((Int) checkArray(a)); return;} } // Returns an array of integers representing the keys of the array. -#line 4625 "runtime.in" +#line 4622 "runtime.in" void arrayKeys(stack *Stack) { array * a=vm::pop<array *>(Stack); -#line 4626 "runtime.in" +#line 4623 "runtime.in" size_t size=checkArray(a); array *keys=new array(); @@ -6610,22 +6607,22 @@ void arrayKeys(stack *Stack) } // Return the cyclic flag for an array. -#line 4640 "runtime.in" +#line 4637 "runtime.in" void arrayCyclicFlag(stack *Stack) { array * a=vm::pop<array *>(Stack); -#line 4641 "runtime.in" +#line 4638 "runtime.in" checkArray(a); {Stack->push<bool>(a->cyclic()); return;} } // Check to see if an array element is initialized. -#line 4647 "runtime.in" +#line 4644 "runtime.in" void arrayInitializedHelper(stack *Stack) { array * a=vm::pop<array *>(Stack); Int n=vm::pop<Int>(Stack); -#line 4648 "runtime.in" +#line 4645 "runtime.in" size_t len=checkArray(a); bool cyclic=a->cyclic(); if(cyclic && len > 0) n=imod(n,len); @@ -6635,62 +6632,62 @@ void arrayInitializedHelper(stack *Stack) } // Returns the initialize method for an array. -#line 4658 "runtime.in" +#line 4655 "runtime.in" void arrayInitialized(stack *Stack) { array * a=vm::pop<array *>(Stack); -#line 4659 "runtime.in" +#line 4656 "runtime.in" {Stack->push<callable*>(new thunk(new bfunc(arrayInitializedHelper),a)); return;} } // The helper function for the cyclic method that sets the cyclic flag. -#line 4664 "runtime.in" +#line 4661 "runtime.in" void arrayCyclicHelper(stack *Stack) { array * a=vm::pop<array *>(Stack); bool b=vm::pop<bool>(Stack); -#line 4665 "runtime.in" +#line 4662 "runtime.in" checkArray(a); a->cyclic(b); } // Set the cyclic flag for an array. -#line 4671 "runtime.in" +#line 4668 "runtime.in" void arrayCyclic(stack *Stack) { array * a=vm::pop<array *>(Stack); -#line 4672 "runtime.in" +#line 4669 "runtime.in" {Stack->push<callable*>(new thunk(new bfunc(arrayCyclicHelper),a)); return;} } // The helper function for the push method that does the actual operation. -#line 4677 "runtime.in" +#line 4674 "runtime.in" void arrayPushHelper(stack *Stack) { array * a=vm::pop<array *>(Stack); item x=vm::pop(Stack); -#line 4678 "runtime.in" +#line 4675 "runtime.in" checkArray(a); a->push(x); {Stack->push(x); return;} } // Returns the push method for an array. -#line 4685 "runtime.in" +#line 4682 "runtime.in" void arrayPush(stack *Stack) { array * a=vm::pop<array *>(Stack); -#line 4686 "runtime.in" +#line 4683 "runtime.in" {Stack->push<callable*>(new thunk(new bfunc(arrayPushHelper),a)); return;} } // The helper function for the append method that appends b to a. -#line 4691 "runtime.in" +#line 4688 "runtime.in" void arrayAppendHelper(stack *Stack) { array * a=vm::pop<array *>(Stack); array * b=vm::pop<array *>(Stack); -#line 4692 "runtime.in" +#line 4689 "runtime.in" checkArray(a); size_t size=checkArray(b); for(size_t i=0; i < size; i++) @@ -6698,20 +6695,20 @@ void arrayAppendHelper(stack *Stack) } // Returns the append method for an array. -#line 4700 "runtime.in" +#line 4697 "runtime.in" void arrayAppend(stack *Stack) { array * a=vm::pop<array *>(Stack); -#line 4701 "runtime.in" +#line 4698 "runtime.in" {Stack->push<callable*>(new thunk(new bfunc(arrayAppendHelper),a)); return;} } // The helper function for the pop method. -#line 4706 "runtime.in" +#line 4703 "runtime.in" void arrayPopHelper(stack *Stack) { array * a=vm::pop<array *>(Stack); -#line 4707 "runtime.in" +#line 4704 "runtime.in" size_t asize=checkArray(a); if(asize == 0) error("cannot pop element from empty array"); @@ -6719,22 +6716,22 @@ void arrayPopHelper(stack *Stack) } // Returns the pop method for an array. -#line 4715 "runtime.in" +#line 4712 "runtime.in" void arrayPop(stack *Stack) { array * a=vm::pop<array *>(Stack); -#line 4716 "runtime.in" +#line 4713 "runtime.in" {Stack->push<callable*>(new thunk(new bfunc(arrayPopHelper),a)); return;} } // The helper function for the insert method. -#line 4721 "runtime.in" +#line 4718 "runtime.in" void arrayInsertHelper(stack *Stack) { array * a=vm::pop<array *>(Stack); array * x=vm::pop<array *>(Stack); Int i=vm::pop<Int>(Stack); -#line 4722 "runtime.in" +#line 4719 "runtime.in" size_t asize=checkArray(a); checkArray(x); if(a->cyclic() && asize > 0) i=imod(i,asize); @@ -6744,39 +6741,39 @@ void arrayInsertHelper(stack *Stack) } // Returns the insert method for an array. -#line 4732 "runtime.in" +#line 4729 "runtime.in" void arrayInsert(stack *Stack) { array * a=vm::pop<array *>(Stack); -#line 4733 "runtime.in" +#line 4730 "runtime.in" {Stack->push<callable*>(new thunk(new bfunc(arrayInsertHelper),a)); return;} } // Returns the delete method for an array. -#line 4738 "runtime.in" +#line 4735 "runtime.in" void arrayDelete(stack *Stack) { array * a=vm::pop<array *>(Stack); -#line 4739 "runtime.in" +#line 4736 "runtime.in" {Stack->push<callable*>(new thunk(new bfunc(arrayDeleteHelper),a)); return;} } -#line 4743 "runtime.in" +#line 4740 "runtime.in" void arrayAlias(stack *Stack) { array * b=vm::pop<array *>(Stack); array * a=vm::pop<array *>(Stack); -#line 4744 "runtime.in" +#line 4741 "runtime.in" {Stack->push<bool>(a==b); return;} } // Return array formed by indexing array a with elements of integer array b -#line 4749 "runtime.in" +#line 4746 "runtime.in" void arrayIntArray(stack *Stack) { array * b=vm::pop<array *>(Stack); array * a=vm::pop<array *>(Stack); -#line 4750 "runtime.in" +#line 4747 "runtime.in" size_t asize=checkArray(a); size_t bsize=checkArray(b); array *r=new array(bsize); @@ -6794,13 +6791,13 @@ void arrayIntArray(stack *Stack) // returns the complement of the integer array a in {0,2,...,n-1}, // so that b[complement(a,b.length)] yields the complement of b[a]. -#line 4768 "runtime.in" +#line 4765 "runtime.in" // Intarray* complement(Intarray *a, Int n); void gen451(stack *Stack) { Int n=vm::pop<Int>(Stack); Intarray * a=vm::pop<Intarray *>(Stack); -#line 4769 "runtime.in" +#line 4766 "runtime.in" size_t asize=checkArray(a); array *r=new array(0); bool *keep=new bool[n]; @@ -6817,12 +6814,12 @@ void gen451(stack *Stack) } // Generate the sequence {f(i) : i=0,1,...n-1} given a function f and integer n -#line 4786 "runtime.in" +#line 4783 "runtime.in" void arraySequence(stack *Stack) { Int n=vm::pop<Int>(Stack); callable * f=vm::pop<callable *>(Stack); -#line 4787 "runtime.in" +#line 4784 "runtime.in" if(n < 0) n=0; array *a=new array(n); for(Int i=0; i < n; ++i) { @@ -6834,12 +6831,12 @@ void arraySequence(stack *Stack) } // Return the array {0,1,...n-1} -#line 4799 "runtime.in" +#line 4796 "runtime.in" // Intarray* sequence(Int n); void gen453(stack *Stack) { Int n=vm::pop<Int>(Stack); -#line 4800 "runtime.in" +#line 4797 "runtime.in" if(n < 0) n=0; array *a=new array(n); for(Int i=0; i < n; ++i) { @@ -6849,12 +6846,12 @@ void gen453(stack *Stack) } // Apply a function to each element of an array -#line 4810 "runtime.in" +#line 4807 "runtime.in" void arrayFunction(stack *Stack) { array * a=vm::pop<array *>(Stack); callable * f=vm::pop<callable *>(Stack); -#line 4811 "runtime.in" +#line 4808 "runtime.in" size_t size=checkArray(a); array *b=new array(size); for(size_t i=0; i < size; ++i) { @@ -6865,12 +6862,12 @@ void arrayFunction(stack *Stack) {Stack->push<array*>(b); return;} } -#line 4822 "runtime.in" +#line 4819 "runtime.in" void arraySort(stack *Stack) { callable * f=vm::pop<callable *>(Stack); array * a=vm::pop<array *>(Stack); -#line 4823 "runtime.in" +#line 4820 "runtime.in" array *c=copyArray(a); compareFunc=f; FuncStack=Stack; @@ -6878,12 +6875,12 @@ void arraySort(stack *Stack) {Stack->push<array*>(c); return;} } -#line 4831 "runtime.in" +#line 4828 "runtime.in" // bool all(boolarray *a); void gen456(stack *Stack) { boolarray * a=vm::pop<boolarray *>(Stack); -#line 4832 "runtime.in" +#line 4829 "runtime.in" size_t size=checkArray(a); bool c=true; for(size_t i=0; i < size; i++) @@ -6891,12 +6888,12 @@ void gen456(stack *Stack) {Stack->push<bool>(c); return;} } -#line 4840 "runtime.in" +#line 4837 "runtime.in" // boolarray* !(boolarray* a); void gen457(stack *Stack) { boolarray* a=vm::pop<boolarray*>(Stack); -#line 4841 "runtime.in" +#line 4838 "runtime.in" size_t size=checkArray(a); array *c=new array(size); for(size_t i=0; i < size; i++) @@ -6904,12 +6901,12 @@ void gen457(stack *Stack) {Stack->push<boolarray*>(c); return;} } -#line 4849 "runtime.in" +#line 4846 "runtime.in" // Int sum(boolarray *a); void gen458(stack *Stack) { boolarray * a=vm::pop<boolarray *>(Stack); -#line 4850 "runtime.in" +#line 4847 "runtime.in" size_t size=checkArray(a); Int sum=0; for(size_t i=0; i < size; i++) @@ -6917,19 +6914,19 @@ void gen458(stack *Stack) {Stack->push<Int>(sum); return;} } -#line 4858 "runtime.in" +#line 4855 "runtime.in" void arrayCopy(stack *Stack) { array * a=vm::pop<array *>(Stack); -#line 4859 "runtime.in" +#line 4856 "runtime.in" {Stack->push<array*>(copyArray(a)); return;} } -#line 4863 "runtime.in" +#line 4860 "runtime.in" void arrayConcat(stack *Stack) { array * a=vm::pop<array *>(Stack); -#line 4864 "runtime.in" +#line 4861 "runtime.in" // a is an array of arrays to be concatenated together. // The signature is // T[] concat(... T[][] a); @@ -6956,27 +6953,27 @@ void arrayConcat(stack *Stack) {Stack->push<array*>(result); return;} } -#line 4891 "runtime.in" +#line 4888 "runtime.in" void array2Copy(stack *Stack) { array * a=vm::pop<array *>(Stack); -#line 4892 "runtime.in" +#line 4889 "runtime.in" {Stack->push<array*>(copyArray2(a)); return;} } -#line 4896 "runtime.in" +#line 4893 "runtime.in" void array3Copy(stack *Stack) { array * a=vm::pop<array *>(Stack); -#line 4897 "runtime.in" +#line 4894 "runtime.in" {Stack->push<array*>(copyArray3(a)); return;} } -#line 4901 "runtime.in" +#line 4898 "runtime.in" void array2Transpose(stack *Stack) { array * a=vm::pop<array *>(Stack); -#line 4902 "runtime.in" +#line 4899 "runtime.in" size_t asize=checkArray(a); array *c=new array(0); for(size_t i=0; i < asize; i++) { @@ -7003,12 +7000,12 @@ void array2Transpose(stack *Stack) // permutation (021 or 120, etc; original is 012). // Transpose by sending respective members to the permutated locations: // return the array obtained by putting a[i][j][k] into position perm{ijk}. -#line 4929 "runtime.in" +#line 4926 "runtime.in" void array3Transpose(stack *Stack) { array * perm=vm::pop<array *>(Stack); array * a=vm::pop<array *>(Stack); -#line 4930 "runtime.in" +#line 4927 "runtime.in" const size_t DIM=3; if(checkArray(perm) != DIM) { @@ -7092,13 +7089,13 @@ void array3Transpose(stack *Stack) // In a boolean array, find the index of the nth true value or -1 if not found // If n is negative, search backwards. -#line 5014 "runtime.in" +#line 5011 "runtime.in" // Int find(boolarray *a, Int n=1); void gen465(stack *Stack) { Int n=vm::pop<Int>(Stack,1); boolarray * a=vm::pop<boolarray *>(Stack); -#line 5015 "runtime.in" +#line 5012 "runtime.in" size_t size=checkArray(a); Int j=-1; if(n > 0) @@ -7116,13 +7113,13 @@ void gen465(stack *Stack) // construct vector obtained by replacing those elements of b for which the // corresponding elements of a are false by the corresponding element of c. -#line 5033 "runtime.in" +#line 5030 "runtime.in" void arrayConditional(stack *Stack) { array * c=vm::pop<array *>(Stack); array * b=vm::pop<array *>(Stack); array * a=vm::pop<array *>(Stack); -#line 5034 "runtime.in" +#line 5031 "runtime.in" size_t size=checkArray(a); array *r=new array(size); if(b && c) { @@ -7146,21 +7143,21 @@ void arrayConditional(stack *Stack) } // Return an n x n identity matrix. -#line 5058 "runtime.in" +#line 5055 "runtime.in" // realarray2* identity(Int n); void gen467(stack *Stack) { Int n=vm::pop<Int>(Stack); -#line 5059 "runtime.in" +#line 5056 "runtime.in" {Stack->push<realarray2*>(Identity(n)); return;} } // Return the diagonal matrix with diagonal entries given by a. -#line 5064 "runtime.in" +#line 5061 "runtime.in" void diagonal(stack *Stack) { realarray * a=vm::pop<realarray *>(Stack); -#line 5065 "runtime.in" +#line 5062 "runtime.in" size_t n=checkArray(a); array *c=new array(n); for(size_t i=0; i < n; ++i) { @@ -7176,12 +7173,12 @@ void diagonal(stack *Stack) } // Return the inverse of an n x n matrix a using Gauss-Jordan elimination. -#line 5081 "runtime.in" +#line 5078 "runtime.in" // realarray2* inverse(realarray2 *a); void gen469(stack *Stack) { realarray2 * a=vm::pop<realarray2 *>(Stack); -#line 5082 "runtime.in" +#line 5079 "runtime.in" a=copyArray2(a); size_t n=checkArray(a); checkSquare(a); @@ -7274,14 +7271,14 @@ void gen469(stack *Stack) // Solve the linear equation ax=b by LU decomposition, returning the // solution x, where a is an n x n matrix and b is an array of length n. // If no solution exists, return an empty array. -#line 5175 "runtime.in" +#line 5172 "runtime.in" // realarray* solve(realarray2 *a, realarray *b, bool warn=true); void gen470(stack *Stack) { bool warn=vm::pop<bool>(Stack,true); realarray * b=vm::pop<realarray *>(Stack); realarray2 * a=vm::pop<realarray2 *>(Stack); -#line 5176 "runtime.in" +#line 5173 "runtime.in" size_t n=checkArray(a); if(n == 0) {Stack->push<realarray*>(new array(0)); return;} @@ -7331,14 +7328,14 @@ void gen470(stack *Stack) // Solve the linear equation ax=b by LU decomposition, returning the // solution x, where a is an n x n matrix and b is an n x m matrix. // If no solution exists, return an empty array. -#line 5226 "runtime.in" +#line 5223 "runtime.in" // realarray2* solve(realarray2 *a, realarray2 *b, bool warn=true); void gen471(stack *Stack) { bool warn=vm::pop<bool>(Stack,true); realarray2 * b=vm::pop<realarray2 *>(Stack); realarray2 * a=vm::pop<realarray2 *>(Stack); -#line 5227 "runtime.in" +#line 5224 "runtime.in" size_t n=checkArray(a); if(n == 0) {Stack->push<realarray2*>(new array(0)); return;} @@ -7399,12 +7396,12 @@ void gen471(stack *Stack) } // Compute the determinant of an n x n matrix. -#line 5288 "runtime.in" +#line 5285 "runtime.in" // real determinant(realarray2 *a); void gen472(stack *Stack) { realarray2 * a=vm::pop<realarray2 *>(Stack); -#line 5289 "runtime.in" +#line 5286 "runtime.in" real *A=copyArray2C(a); size_t n=checkArray(a); @@ -7418,13 +7415,13 @@ void gen472(stack *Stack) {Stack->push<real>(det); return;} } -#line 5303 "runtime.in" +#line 5300 "runtime.in" // realarray* *(realarray2 *a, realarray *b); void gen473(stack *Stack) { realarray * b=vm::pop<realarray *>(Stack); realarray2 * a=vm::pop<realarray2 *>(Stack); -#line 5304 "runtime.in" +#line 5301 "runtime.in" size_t n=checkArray(a); size_t m=checkArray(b); array *c=new array(n); @@ -7441,13 +7438,13 @@ void gen473(stack *Stack) {Stack->push<realarray*>(c); return;} } -#line 5321 "runtime.in" +#line 5318 "runtime.in" // realarray* *(realarray *a, realarray2 *b); void gen474(stack *Stack) { realarray2 * b=vm::pop<realarray2 *>(Stack); realarray * a=vm::pop<realarray *>(Stack); -#line 5322 "runtime.in" +#line 5319 "runtime.in" size_t n=checkArray(a); if(n != checkArray(b)) error(incommensurate); real *A=copyArrayC(a); @@ -7474,13 +7471,13 @@ void gen474(stack *Stack) {Stack->push<realarray*>(c); return;} } -#line 5349 "runtime.in" +#line 5346 "runtime.in" // realarray2* *(realarray2 *a, realarray2 *b); void gen475(stack *Stack) { realarray2 * b=vm::pop<realarray2 *>(Stack); realarray2 * a=vm::pop<realarray2 *>(Stack); -#line 5350 "runtime.in" +#line 5347 "runtime.in" size_t n=checkArray(a); size_t nb=checkArray(b); @@ -7514,23 +7511,23 @@ void gen475(stack *Stack) {Stack->push<realarray2*>(c); return;} } -#line 5384 "runtime.in" +#line 5381 "runtime.in" // triple *(realarray2 *t, triple v); void gen476(stack *Stack) { triple v=vm::pop<triple>(Stack); realarray2 * t=vm::pop<realarray2 *>(Stack); -#line 5385 "runtime.in" +#line 5382 "runtime.in" {Stack->push<triple>(*t*v); return;} } -#line 5389 "runtime.in" +#line 5386 "runtime.in" // pair project(triple v, realarray2 *t); void gen477(stack *Stack) { realarray2 * t=vm::pop<realarray2 *>(Stack); triple v=vm::pop<triple>(Stack); -#line 5390 "runtime.in" +#line 5387 "runtime.in" size_t n=checkArray(t); if(n != 4) error(incommensurate); array *t0=read<array*>(t,0); @@ -7555,13 +7552,13 @@ void gen477(stack *Stack) } // Compute the dot product of vectors a and b. -#line 5415 "runtime.in" +#line 5412 "runtime.in" // real dot(realarray *a, realarray *b); void gen478(stack *Stack) { realarray * b=vm::pop<realarray *>(Stack); realarray * a=vm::pop<realarray *>(Stack); -#line 5416 "runtime.in" +#line 5413 "runtime.in" size_t n=checkArrays(a,b); real sum=0.0; for(size_t i=0; i < n; ++i) @@ -7576,7 +7573,7 @@ void gen478(stack *Stack) // [ a[2] b[2] c[2] ] // [ ... ] // [ c[n-1] a[n-1] b[n-1] ] -#line 5431 "runtime.in" +#line 5428 "runtime.in" // realarray* tridiagonal(realarray *a, realarray *b, realarray *c, realarray *f); void gen479(stack *Stack) { @@ -7584,7 +7581,7 @@ void gen479(stack *Stack) realarray * c=vm::pop<realarray *>(Stack); realarray * b=vm::pop<realarray *>(Stack); realarray * a=vm::pop<realarray *>(Stack); -#line 5432 "runtime.in" +#line 5429 "runtime.in" size_t n=checkArrays(a,b); checkEqual(n,checkArray(c)); checkEqual(n,checkArray(f)); @@ -7681,7 +7678,7 @@ void gen479(stack *Stack) } // Root solve by Newton-Raphson -#line 5529 "runtime.in" +#line 5526 "runtime.in" // real newton(Int iterations=100, callableReal *f, callableReal *fprime, real x, bool verbose=false); void gen480(stack *Stack) { @@ -7690,7 +7687,7 @@ void gen480(stack *Stack) callableReal * fprime=vm::pop<callableReal *>(Stack); callableReal * f=vm::pop<callableReal *>(Stack); Int iterations=vm::pop<Int>(Stack,100); -#line 5531 "runtime.in" +#line 5528 "runtime.in" static const real fuzz=1000.0*DBL_EPSILON; Int i=0; size_t oldPrec=0; @@ -7736,7 +7733,7 @@ void gen480(stack *Stack) // Root solve by Newton-Raphson bisection // cf. routine rtsafe (Press et al., Numerical Recipes, 1991). -#line 5577 "runtime.in" +#line 5574 "runtime.in" // real newton(Int iterations=100, callableReal *f, callableReal *fprime, real x1, real x2, bool verbose=false); void gen481(stack *Stack) { @@ -7746,7 +7743,7 @@ void gen481(stack *Stack) callableReal * fprime=vm::pop<callableReal *>(Stack); callableReal * f=vm::pop<callableReal *>(Stack); Int iterations=vm::pop<Int>(Stack,100); -#line 5579 "runtime.in" +#line 5576 "runtime.in" static const real fuzz=1000.0*DBL_EPSILON; size_t oldPrec=0; if(verbose) @@ -7824,7 +7821,7 @@ void gen481(stack *Stack) {Stack->push<real>((j == iterations) ? DBL_MAX : x); return;} } -#line 5657 "runtime.in" +#line 5654 "runtime.in" // real simpson(callableReal *f, real a, real b, real acc=DBL_EPSILON, real dxmax=0); void gen482(stack *Stack) { @@ -7833,7 +7830,7 @@ void gen482(stack *Stack) real b=vm::pop<real>(Stack); real a=vm::pop<real>(Stack); callableReal * f=vm::pop<callableReal *>(Stack); -#line 5659 "runtime.in" +#line 5656 "runtime.in" real integral; if(dxmax == 0) dxmax=b-a; Func=f; @@ -7844,12 +7841,12 @@ void gen482(stack *Stack) } // Compute the fast Fourier transform of a pair array -#line 5670 "runtime.in" +#line 5667 "runtime.in" void pairArrayFFT(stack *Stack) { Int sign=vm::pop<Int>(Stack,1); pairarray * a=vm::pop<pairarray *>(Stack); -#line 5671 "runtime.in" +#line 5668 "runtime.in" unsigned n=(unsigned) checkArray(a); #ifdef HAVE_LIBFFTW3 array *c=new array(n); @@ -7877,12 +7874,12 @@ void pairArrayFFT(stack *Stack) {Stack->push<pairarray*>(c); return;} } -#line 5699 "runtime.in" +#line 5696 "runtime.in" // Intarray2* triangulate(pairarray *z); void gen484(stack *Stack) { pairarray * z=vm::pop<pairarray *>(Stack); -#line 5700 "runtime.in" +#line 5697 "runtime.in" size_t nv=checkArray(z); // Call robust version of Gilles Dumoulin's port of Paul Bourke's // triangulation code. @@ -7918,55 +7915,55 @@ void gen484(stack *Stack) // File operations -#line 5736 "runtime.in" +#line 5733 "runtime.in" // bool ==(file *a, file *b); void gen485(stack *Stack) { file * b=vm::pop<file *>(Stack); file * a=vm::pop<file *>(Stack); -#line 5737 "runtime.in" +#line 5734 "runtime.in" {Stack->push<bool>(a == b); return;} } -#line 5742 "runtime.in" +#line 5739 "runtime.in" // bool !=(file *a, file *b); void gen486(stack *Stack) { file * b=vm::pop<file *>(Stack); file * a=vm::pop<file *>(Stack); -#line 5743 "runtime.in" +#line 5740 "runtime.in" {Stack->push<bool>(a != b); return;} } -#line 5747 "runtime.in" +#line 5744 "runtime.in" void nullFile(stack *Stack) { -#line 5748 "runtime.in" +#line 5745 "runtime.in" {Stack->push<file*>(&camp::nullfile); return;} } -#line 5752 "runtime.in" +#line 5749 "runtime.in" // file* input(string name, bool check=true, string comment=commentchar); void gen488(stack *Stack) { string comment=vm::pop<string>(Stack,commentchar); bool check=vm::pop<bool>(Stack,true); string name=vm::pop<string>(Stack); -#line 5753 "runtime.in" +#line 5750 "runtime.in" char c=comment.empty() ? (char) 0 : comment[0]; file *f=new ifile(name,c,check); f->open(); {Stack->push<file*>(f); return;} } -#line 5760 "runtime.in" +#line 5757 "runtime.in" // file* output(string name, bool update=false, string comment=commentchar); void gen489(stack *Stack) { string comment=vm::pop<string>(Stack,commentchar); bool update=vm::pop<bool>(Stack,false); string name=vm::pop<string>(Stack); -#line 5761 "runtime.in" +#line 5758 "runtime.in" file *f; if(update) { char c=comment.empty() ? (char) 0 : comment[0]; @@ -7977,13 +7974,13 @@ void gen489(stack *Stack) {Stack->push<file*>(f); return;} } -#line 5772 "runtime.in" +#line 5769 "runtime.in" // file* xinput(string name, bool check=true); void gen490(stack *Stack) { bool check=vm::pop<bool>(Stack,true); string name=vm::pop<string>(Stack); -#line 5773 "runtime.in" +#line 5770 "runtime.in" #ifdef HAVE_RPC_RPC_H file *f=new ixfile(name,check); f->open(); @@ -7996,13 +7993,13 @@ void gen490(stack *Stack) #endif } -#line 5786 "runtime.in" +#line 5783 "runtime.in" // file* xoutput(string name, bool update=false); void gen491(stack *Stack) { bool update=vm::pop<bool>(Stack,false); string name=vm::pop<string>(Stack); -#line 5787 "runtime.in" +#line 5784 "runtime.in" #ifdef HAVE_RPC_RPC_H file *f; if(update) @@ -8019,25 +8016,25 @@ void gen491(stack *Stack) #endif } -#line 5804 "runtime.in" +#line 5801 "runtime.in" // file* binput(string name, bool check=true); void gen492(stack *Stack) { bool check=vm::pop<bool>(Stack,true); string name=vm::pop<string>(Stack); -#line 5805 "runtime.in" +#line 5802 "runtime.in" file *f=new ibfile(name,check); f->open(); {Stack->push<file*>(f); return;} } -#line 5811 "runtime.in" +#line 5808 "runtime.in" // file* boutput(string name, bool update=false); void gen493(stack *Stack) { bool update=vm::pop<bool>(Stack,false); string name=vm::pop<string>(Stack); -#line 5812 "runtime.in" +#line 5809 "runtime.in" file *f; if(update) f=new iobfile(name); else f=new obfile(name); @@ -8046,77 +8043,77 @@ void gen493(stack *Stack) {Stack->push<file*>(f); return;} } -#line 5821 "runtime.in" +#line 5818 "runtime.in" // bool eof(file *f); void gen494(stack *Stack) { file * f=vm::pop<file *>(Stack); -#line 5822 "runtime.in" +#line 5819 "runtime.in" {Stack->push<bool>(f->eof()); return;} } -#line 5826 "runtime.in" +#line 5823 "runtime.in" // bool eol(file *f); void gen495(stack *Stack) { file * f=vm::pop<file *>(Stack); -#line 5827 "runtime.in" +#line 5824 "runtime.in" {Stack->push<bool>(f->eol()); return;} } -#line 5831 "runtime.in" +#line 5828 "runtime.in" // bool error(file *f); void gen496(stack *Stack) { file * f=vm::pop<file *>(Stack); -#line 5832 "runtime.in" +#line 5829 "runtime.in" {Stack->push<bool>(f->error()); return;} } -#line 5836 "runtime.in" +#line 5833 "runtime.in" // void clear(file *f); void gen497(stack *Stack) { file * f=vm::pop<file *>(Stack); -#line 5837 "runtime.in" +#line 5834 "runtime.in" f->clear(); } -#line 5841 "runtime.in" +#line 5838 "runtime.in" // void close(file *f); void gen498(stack *Stack) { file * f=vm::pop<file *>(Stack); -#line 5842 "runtime.in" +#line 5839 "runtime.in" f->close(); } -#line 5846 "runtime.in" +#line 5843 "runtime.in" // Int precision(file *f=NULL, Int digits=0); void gen499(stack *Stack) { Int digits=vm::pop<Int>(Stack,0); file * f=vm::pop<file *>(Stack,NULL); -#line 5847 "runtime.in" +#line 5844 "runtime.in" if(f == 0) f=&camp::Stdout; {Stack->push<Int>(f->precision(digits)); return;} } -#line 5852 "runtime.in" +#line 5849 "runtime.in" // void flush(file *f); void gen500(stack *Stack) { file * f=vm::pop<file *>(Stack); -#line 5853 "runtime.in" +#line 5850 "runtime.in" f->flush(); } -#line 5857 "runtime.in" +#line 5854 "runtime.in" // string getc(file *f); void gen501(stack *Stack) { file * f=vm::pop<file *>(Stack); -#line 5858 "runtime.in" +#line 5855 "runtime.in" char c=0; if(f->isOpen()) f->read(c); static char str[1]; @@ -8124,59 +8121,59 @@ void gen501(stack *Stack) {Stack->push<string>(string(str)); return;} } -#line 5866 "runtime.in" +#line 5863 "runtime.in" // Int tell(file *f); void gen502(stack *Stack) { file * f=vm::pop<file *>(Stack); -#line 5867 "runtime.in" +#line 5864 "runtime.in" {Stack->push<Int>(f->tell()); return;} } -#line 5871 "runtime.in" +#line 5868 "runtime.in" // void seek(file *f, Int pos); void gen503(stack *Stack) { Int pos=vm::pop<Int>(Stack); file * f=vm::pop<file *>(Stack); -#line 5872 "runtime.in" +#line 5869 "runtime.in" f->seek(pos,pos >= 0); } -#line 5876 "runtime.in" +#line 5873 "runtime.in" // void seekeof(file *f); void gen504(stack *Stack) { file * f=vm::pop<file *>(Stack); -#line 5877 "runtime.in" +#line 5874 "runtime.in" f->seek(0,false); } // Set file dimensions -#line 5882 "runtime.in" +#line 5879 "runtime.in" // file* dimension(file *f, Int nx); void gen505(stack *Stack) { Int nx=vm::pop<Int>(Stack); file * f=vm::pop<file *>(Stack); -#line 5883 "runtime.in" +#line 5880 "runtime.in" f->dimension(nx); {Stack->push<file*>(f); return;} } -#line 5888 "runtime.in" +#line 5885 "runtime.in" // file* dimension(file *f, Int nx, Int ny); void gen506(stack *Stack) { Int ny=vm::pop<Int>(Stack); Int nx=vm::pop<Int>(Stack); file * f=vm::pop<file *>(Stack); -#line 5889 "runtime.in" +#line 5886 "runtime.in" f->dimension(nx,ny); {Stack->push<file*>(f); return;} } -#line 5894 "runtime.in" +#line 5891 "runtime.in" // file* dimension(file *f, Int nx, Int ny, Int nz); void gen507(stack *Stack) { @@ -8184,80 +8181,80 @@ void gen507(stack *Stack) Int ny=vm::pop<Int>(Stack); Int nx=vm::pop<Int>(Stack); file * f=vm::pop<file *>(Stack); -#line 5895 "runtime.in" +#line 5892 "runtime.in" f->dimension(nx,ny,nz); {Stack->push<file*>(f); return;} } // Set file to read comma-separated values -#line 5901 "runtime.in" +#line 5898 "runtime.in" // file* csv(file *f, bool b=true); void gen508(stack *Stack) { bool b=vm::pop<bool>(Stack,true); file * f=vm::pop<file *>(Stack); -#line 5902 "runtime.in" +#line 5899 "runtime.in" f->CSVMode(b); {Stack->push<file*>(f); return;} } // Set file to read whitespace-separated values -#line 5908 "runtime.in" +#line 5905 "runtime.in" // file* word(file *f, bool b=true); void gen509(stack *Stack) { bool b=vm::pop<bool>(Stack,true); file * f=vm::pop<file *>(Stack); -#line 5909 "runtime.in" +#line 5906 "runtime.in" f->WordMode(b); {Stack->push<file*>(f); return;} } // Set file to read arrays in line-at-a-time mode -#line 5915 "runtime.in" +#line 5912 "runtime.in" // file* line(file *f, bool b=true); void gen510(stack *Stack) { bool b=vm::pop<bool>(Stack,true); file * f=vm::pop<file *>(Stack); -#line 5916 "runtime.in" +#line 5913 "runtime.in" f->LineMode(b); {Stack->push<file*>(f); return;} } // Set file to read/write signed int XDR values. -#line 5922 "runtime.in" +#line 5919 "runtime.in" // file* signed(file *f, bool b=true); void gen511(stack *Stack) { bool b=vm::pop<bool>(Stack,true); file * f=vm::pop<file *>(Stack); -#line 5923 "runtime.in" +#line 5920 "runtime.in" f->SignedInt(b); {Stack->push<file*>(f); return;} } -#line 5928 "runtime.in" +#line 5925 "runtime.in" void namePart(stack *Stack) { file f=vm::pop<file>(Stack); -#line 5929 "runtime.in" +#line 5926 "runtime.in" {Stack->push<string>(f.filename()); return;} } -#line 5933 "runtime.in" +#line 5930 "runtime.in" void modePart(stack *Stack) { file f=vm::pop<file>(Stack); -#line 5934 "runtime.in" +#line 5931 "runtime.in" {Stack->push<string>(f.FileMode()); return;} } -#line 5938 "runtime.in" +#line 5935 "runtime.in" void dimensionPart(stack *Stack) { file f=vm::pop<file>(Stack); -#line 5939 "runtime.in" +#line 5936 "runtime.in" array *a=new array(3); (*a)[0]=f.Nx(); (*a)[1]=f.Ny(); @@ -8265,95 +8262,95 @@ void dimensionPart(stack *Stack) {Stack->push<array*>(a); return;} } -#line 5947 "runtime.in" +#line 5944 "runtime.in" void lineModePart(stack *Stack) { file f=vm::pop<file>(Stack); -#line 5948 "runtime.in" +#line 5945 "runtime.in" {Stack->push<bool>(f.LineMode()); return;} } -#line 5952 "runtime.in" +#line 5949 "runtime.in" void csvModePart(stack *Stack) { file f=vm::pop<file>(Stack); -#line 5953 "runtime.in" +#line 5950 "runtime.in" {Stack->push<bool>(f.CSVMode()); return;} } -#line 5957 "runtime.in" +#line 5954 "runtime.in" void wordModePart(stack *Stack) { file f=vm::pop<file>(Stack); -#line 5958 "runtime.in" +#line 5955 "runtime.in" {Stack->push<bool>(f.WordMode()); return;} } -#line 5962 "runtime.in" +#line 5959 "runtime.in" void singleRealModePart(stack *Stack) { file f=vm::pop<file>(Stack); -#line 5963 "runtime.in" +#line 5960 "runtime.in" {Stack->push<bool>(f.SingleReal()); return;} } -#line 5967 "runtime.in" +#line 5964 "runtime.in" void singleIntModePart(stack *Stack) { file f=vm::pop<file>(Stack); -#line 5968 "runtime.in" +#line 5965 "runtime.in" {Stack->push<bool>(f.SingleInt()); return;} } -#line 5972 "runtime.in" +#line 5969 "runtime.in" void signedIntModePart(stack *Stack) { file f=vm::pop<file>(Stack); -#line 5973 "runtime.in" +#line 5970 "runtime.in" {Stack->push<bool>(f.SignedInt()); return;} } // Set file to read an array1 (1 int size followed by a 1d array) -#line 5978 "runtime.in" +#line 5975 "runtime.in" // file* read1(file *f); void gen521(stack *Stack) { file * f=vm::pop<file *>(Stack); -#line 5979 "runtime.in" +#line 5976 "runtime.in" f->dimension(-2); {Stack->push<file*>(f); return;} } // Set file to read an array2 (2 int sizes followed by a 2d array) -#line 5985 "runtime.in" +#line 5982 "runtime.in" // file* read2(file *f); void gen522(stack *Stack) { file * f=vm::pop<file *>(Stack); -#line 5986 "runtime.in" +#line 5983 "runtime.in" f->dimension(-2,-2); {Stack->push<file*>(f); return;} } // Set file to read an array3 (3 int sizes followed by a 3d array) -#line 5992 "runtime.in" +#line 5989 "runtime.in" // file* read3(file *f); void gen523(stack *Stack) { file * f=vm::pop<file *>(Stack); -#line 5993 "runtime.in" +#line 5990 "runtime.in" f->dimension(-2,-2,-2); {Stack->push<file*>(f); return;} } // Return the last n lines of the history named name. -#line 5999 "runtime.in" +#line 5996 "runtime.in" // stringarray* history(string name, Int n=1); void gen524(stack *Stack) { Int n=vm::pop<Int>(Stack,1); string name=vm::pop<string>(Stack); -#line 6000 "runtime.in" +#line 5997 "runtime.in" #if defined(HAVE_LIBREADLINE) && defined(HAVE_LIBCURSES) bool newhistory=historyMap.find(name) == historyMap.end(); @@ -8385,12 +8382,12 @@ void gen524(stack *Stack) } // Return the last n lines of the interactive history. -#line 6032 "runtime.in" +#line 6029 "runtime.in" // stringarray* history(Int n=0); void gen525(stack *Stack) { Int n=vm::pop<Int>(Stack,0); -#line 6033 "runtime.in" +#line 6030 "runtime.in" #if defined(HAVE_LIBREADLINE) && defined(HAVE_LIBCURSES) {Stack->push<stringarray*>(get_history(n)); return;} #else @@ -8401,14 +8398,14 @@ void gen525(stack *Stack) // Prompt for a string using prompt, the GNU readline library, and a // local history named name. -#line 6044 "runtime.in" +#line 6041 "runtime.in" // string readline(string prompt=emptystring, string name=emptystring, bool tabcompletion=false); void gen526(stack *Stack) { bool tabcompletion=vm::pop<bool>(Stack,false); string name=vm::pop<string>(Stack,emptystring); string prompt=vm::pop<string>(Stack,emptystring); -#line 6046 "runtime.in" +#line 6043 "runtime.in" if(!isatty(STDIN_FILENO)) {Stack->push<string>(emptystring); return;} #if defined(HAVE_LIBREADLINE) && defined(HAVE_LIBCURSES) @@ -8450,14 +8447,14 @@ void gen526(stack *Stack) // Save a string in a local history named name. // If store=true, store the local history in the file historyfilename(name). -#line 6088 "runtime.in" +#line 6085 "runtime.in" // void saveline(string name, string value, bool store=true); void gen527(stack *Stack) { bool store=vm::pop<bool>(Stack,true); string value=vm::pop<string>(Stack); string name=vm::pop<string>(Stack); -#line 6089 "runtime.in" +#line 6086 "runtime.in" #if defined(HAVE_LIBREADLINE) && defined(HAVE_LIBCURSES) store_history(&history_save); bool newhistory=historyMap.find(name) == historyMap.end(); @@ -8484,11 +8481,11 @@ void gen527(stack *Stack) #endif } -#line 6116 "runtime.in" +#line 6113 "runtime.in" // void generate_random_backtrace(); void gen528(stack *) { -#line 6117 "runtime.in" +#line 6114 "runtime.in" #if defined(USEGC) && defined(GC_DEBUG) && defined(GC_BACKTRACE) GC_generate_random_backtrace(); #else @@ -8496,12 +8493,12 @@ void gen528(stack *) #endif } -#line 6125 "runtime.in" +#line 6122 "runtime.in" // void print_random_addresses(Int n=1); void gen529(stack *Stack) { Int n=vm::pop<Int>(Stack,1); -#line 6126 "runtime.in" +#line 6123 "runtime.in" #if defined(USEGC) && defined(GC_DEBUG) && defined(GC_BACKTRACE) GC_gcollect(); for (Int i=0; i < n; ++i) @@ -8518,877 +8515,877 @@ namespace trans { void gen_base_venv(venv &ve) { -#line 1181 "runtime.in" +#line 1179 "runtime.in" addFunc(ve, run::gen8, primBoolean(), "!", formal(primBoolean(), "b", false, false)); -#line 1209 "runtime.in" +#line 1207 "runtime.in" addFunc(ve, run::gen13, primInt(), "AND", formal(primInt(), "a", false, false), formal(primInt(), "b", false, false)); -#line 1217 "runtime.in" +#line 1215 "runtime.in" addFunc(ve, run::gen14, primInt(), "OR", formal(primInt(), "a", false, false), formal(primInt(), "b", false, false)); -#line 1222 "runtime.in" +#line 1220 "runtime.in" addFunc(ve, run::gen15, primInt(), "XOR", formal(primInt(), "a", false, false), formal(primInt(), "b", false, false)); -#line 1227 "runtime.in" +#line 1225 "runtime.in" addFunc(ve, run::gen16, primInt(), "NOT", formal(primInt(), "a", false, false)); -#line 1258 "runtime.in" +#line 1256 "runtime.in" addFunc(ve, run::gen21, primBoolean(), "empty", formal(primPicture(), "f", false, false)); -#line 1263 "runtime.in" +#line 1261 "runtime.in" addFunc(ve, run::gen22, primVoid(), "erase", formal(primPicture(), "f", false, false)); -#line 1268 "runtime.in" +#line 1266 "runtime.in" addFunc(ve, run::gen23, primPair(), "min", formal(primPicture(), "f", false, false)); -#line 1273 "runtime.in" +#line 1271 "runtime.in" addFunc(ve, run::gen24, primPair(), "max", formal(primPicture(), "f", false, false)); -#line 1278 "runtime.in" +#line 1276 "runtime.in" addFunc(ve, run::gen25, primVoid(), "label", formal(primPicture(), "f", false, false), formal(primString(), "s", false, false), formal(primString(), "size", false, false), formal(primTransform(), "t", false, false), formal(primPair(), "position", false, false), formal(primPair(), "align", false, false), formal(primPen(), "p", false, false)); -#line 1284 "runtime.in" +#line 1282 "runtime.in" addFunc(ve, run::gen26, primBoolean(), "labels", formal(primPicture(), "f", false, false)); -#line 1289 "runtime.in" +#line 1287 "runtime.in" addFunc(ve, run::gen27, realArray(), "texsize", formal(primString(), "s", false, false), formal(primPen(), "p", true, false)); -#line 1309 "runtime.in" +#line 1307 "runtime.in" addFunc(ve, run::gen28, pathArray() , "_texpath", formal(primString(), "s", false, false), formal(primPen(), "p", true, false)); -#line 1408 "runtime.in" +#line 1405 "runtime.in" addFunc(ve, run::gen29, pathArray() , "textpath", formal(primString(), "s", false, false), formal(primPen(), "p", true, false)); -#line 1479 "runtime.in" +#line 1476 "runtime.in" addFunc(ve, run::gen30, pathArray() , "_strokepath", formal(primPath(), "g", false, false), formal(primPen(), "p", true, false)); -#line 1504 "runtime.in" +#line 1501 "runtime.in" addFunc(ve, run::gen31, primVoid(), "_draw", formal(primPicture(), "f", false, false), formal(primPath(), "g", false, false), formal(primPen(), "p", false, false)); -#line 1509 "runtime.in" +#line 1506 "runtime.in" addFunc(ve, run::gen32, primVoid(), "fill", formal(primPicture(), "f", false, false), formal(pathArray() , "g", false, false), formal(primPen(), "p", true, false), formal(primBoolean(), "copy", true, false)); -#line 1515 "runtime.in" +#line 1512 "runtime.in" addFunc(ve, run::gen33, primVoid(), "latticeshade", formal(primPicture(), "f", false, false), formal(pathArray() , "g", false, false), formal(primBoolean(), "stroke", true, false), formal(primPen(), "fillrule", true, false), formal(penArray2() , "p", false, false), formal(primBoolean(), "copy", true, false)); -#line 1522 "runtime.in" +#line 1519 "runtime.in" addFunc(ve, run::gen34, primVoid(), "axialshade", formal(primPicture(), "f", false, false), formal(pathArray() , "g", false, false), formal(primBoolean(), "stroke", true, false), formal(primPen(), "pena", false, false), formal(primPair(), "a", false, false), formal(primPen(), "penb", false, false), formal(primPair(), "b", false, false), formal(primBoolean(), "copy", true, false)); -#line 1529 "runtime.in" +#line 1526 "runtime.in" addFunc(ve, run::gen35, primVoid(), "radialshade", formal(primPicture(), "f", false, false), formal(pathArray() , "g", false, false), formal(primBoolean(), "stroke", true, false), formal(primPen(), "pena", false, false), formal(primPair(), "a", false, false), formal(primReal(), "ra", false, false), formal(primPen(), "penb", false, false), formal(primPair(), "b", false, false), formal(primReal(), "rb", false, false), formal(primBoolean(), "copy", true, false)); -#line 1536 "runtime.in" +#line 1533 "runtime.in" addFunc(ve, run::gen36, primVoid(), "gouraudshade", formal(primPicture(), "f", false, false), formal(pathArray() , "g", false, false), formal(primBoolean(), "stroke", true, false), formal(primPen(), "fillrule", true, false), formal(penArray() , "p", false, false), formal(pairArray(), "z", false, false), formal(IntArray(), "edges", false, false), formal(primBoolean(), "copy", true, false)); -#line 1547 "runtime.in" +#line 1544 "runtime.in" addFunc(ve, run::gen37, primVoid(), "gouraudshade", formal(primPicture(), "f", false, false), formal(pathArray() , "g", false, false), formal(primBoolean(), "stroke", true, false), formal(primPen(), "fillrule", true, false), formal(penArray() , "p", false, false), formal(IntArray(), "edges", false, false), formal(primBoolean(), "copy", true, false)); -#line 1571 "runtime.in" +#line 1568 "runtime.in" addFunc(ve, run::gen38, primVoid(), "tensorshade", formal(primPicture(), "f", false, false), formal(pathArray() , "g", false, false), formal(primBoolean(), "stroke", true, false), formal(primPen(), "fillrule", true, false), formal(penArray2() , "p", false, false), formal(pathArray() , "b", true, false), formal(pairArray2(), "z", true, false), formal(primBoolean(), "copy", true, false)); -#line 1586 "runtime.in" +#line 1583 "runtime.in" addFunc(ve, run::gen39, primVoid(), "functionshade", formal(primPicture(), "f", false, false), formal(pathArray() , "g", false, false), formal(primBoolean(), "stroke", true, false), formal(primPen(), "fillrule", true, false), formal(primString() , "shader", true, false), formal(primBoolean(), "copy", true, false)); -#line 1594 "runtime.in" +#line 1591 "runtime.in" addFunc(ve, run::gen40, primVoid(), "clip", formal(primPicture(), "f", false, false), formal(pathArray() , "g", false, false), formal(primBoolean(), "stroke", true, false), formal(primPen(), "fillrule", true, false), formal(primBoolean(), "copy", true, false)); -#line 1604 "runtime.in" +#line 1601 "runtime.in" addFunc(ve, run::gen41, primVoid(), "beginclip", formal(primPicture(), "f", false, false), formal(pathArray() , "g", false, false), formal(primBoolean(), "stroke", true, false), formal(primPen(), "fillrule", true, false), formal(primBoolean(), "copy", true, false)); -#line 1611 "runtime.in" +#line 1608 "runtime.in" addFunc(ve, run::gen42, primVoid(), "endclip", formal(primPicture(), "f", false, false)); -#line 1616 "runtime.in" +#line 1613 "runtime.in" addFunc(ve, run::gen43, primVoid(), "gsave", formal(primPicture(), "f", false, false)); -#line 1621 "runtime.in" +#line 1618 "runtime.in" addFunc(ve, run::gen44, primVoid(), "grestore", formal(primPicture(), "f", false, false)); -#line 1626 "runtime.in" +#line 1623 "runtime.in" addFunc(ve, run::gen45, primVoid(), "begingroup", formal(primPicture(), "f", false, false)); -#line 1631 "runtime.in" +#line 1628 "runtime.in" addFunc(ve, run::gen46, primVoid(), "endgroup", formal(primPicture(), "f", false, false)); -#line 1636 "runtime.in" +#line 1633 "runtime.in" addFunc(ve, run::gen47, primVoid(), "add", formal(primPicture(), "dest", false, false), formal(primPicture(), "src", false, false)); -#line 1641 "runtime.in" +#line 1638 "runtime.in" addFunc(ve, run::gen48, primVoid(), "prepend", formal(primPicture(), "dest", false, false), formal(primPicture(), "src", false, false)); -#line 1646 "runtime.in" +#line 1643 "runtime.in" addFunc(ve, run::gen49, primVoid(), "postscript", formal(primPicture(), "f", false, false), formal(primString() , "s", false, false)); -#line 1651 "runtime.in" +#line 1648 "runtime.in" addFunc(ve, run::gen50, primVoid(), "tex", formal(primPicture(), "f", false, false), formal(primString() , "s", false, false)); -#line 1656 "runtime.in" +#line 1653 "runtime.in" addFunc(ve, run::gen51, primVoid(), "postscript", formal(primPicture(), "f", false, false), formal(primString() , "s", false, false), formal(primPair(), "min", false, false), formal(primPair(), "max", false, false)); -#line 1661 "runtime.in" +#line 1658 "runtime.in" addFunc(ve, run::gen52, primVoid(), "tex", formal(primPicture(), "f", false, false), formal(primString() , "s", false, false), formal(primPair(), "min", false, false), formal(primPair(), "max", false, false)); -#line 1666 "runtime.in" +#line 1663 "runtime.in" addFunc(ve, run::gen53, primVoid(), "texpreamble", formal(primString() , "s", false, false)); -#line 1674 "runtime.in" +#line 1671 "runtime.in" addFunc(ve, run::gen54, primVoid(), "deletepreamble"); -#line 1681 "runtime.in" +#line 1678 "runtime.in" addFunc(ve, run::gen55, primVoid(), "_labelpath", formal(primPicture(), "f", false, false), formal(primString() , "s", false, false), formal(primString() , "size", false, false), formal(primPath(), "g", false, false), formal(primString() , "justify", false, false), formal(primPair(), "offset", false, false), formal(primPen(), "p", false, false)); -#line 1687 "runtime.in" +#line 1684 "runtime.in" addFunc(ve, run::gen56, primVoid(), "texreset"); -#line 1695 "runtime.in" +#line 1692 "runtime.in" addFunc(ve, run::gen57, primVoid(), "layer", formal(primPicture(), "f", false, false)); -#line 1700 "runtime.in" +#line 1697 "runtime.in" addFunc(ve, run::gen58, primVoid(), "newpage", formal(primPicture(), "f", false, false)); -#line 1705 "runtime.in" +#line 1702 "runtime.in" addFunc(ve, run::gen59, primVoid(), "_image", formal(primPicture(), "f", false, false), formal(realArray2(), "data", false, false), formal(primPair(), "initial", false, false), formal(primPair(), "final", false, false), formal(penArray() , "palette", true, false), formal(primTransform(), "t", true, false), formal(primBoolean(), "copy", true, false), formal(primBoolean(), "antialias", true, false)); -#line 1715 "runtime.in" +#line 1712 "runtime.in" addFunc(ve, run::gen60, primVoid(), "_image", formal(primPicture(), "f", false, false), formal(penArray2() , "data", false, false), formal(primPair(), "initial", false, false), formal(primPair(), "final", false, false), formal(primTransform(), "t", true, false), formal(primBoolean(), "copy", true, false), formal(primBoolean(), "antialias", true, false)); -#line 1722 "runtime.in" +#line 1719 "runtime.in" addFunc(ve, run::gen61, primString() , "nativeformat"); -#line 1727 "runtime.in" +#line 1724 "runtime.in" addFunc(ve, run::gen62, primBoolean(), "latex"); -#line 1732 "runtime.in" +#line 1729 "runtime.in" addFunc(ve, run::gen63, primBoolean(), "pdf"); -#line 1737 "runtime.in" +#line 1734 "runtime.in" addFunc(ve, run::gen64, primVoid(), "shipout", formal(primString() , "prefix", true, false), formal(primPicture(), "f", false, false), formal(primPicture(), "preamble", true, false), formal(primString() , "format", true, false), formal(primBoolean(), "wait", true, false), formal(primBoolean(), "view", true, false), formal(transformFunction(), "xform", false, false)); -#line 1783 "runtime.in" +#line 1780 "runtime.in" addFunc(ve, run::gen65, primVoid(), "shipout3", formal(primString() , "prefix", false, false), formal(primPicture(), "f", false, false), formal(primString() , "format", true, false), formal(primReal(), "width", false, false), formal(primReal(), "height", false, false), formal(primReal(), "angle", false, false), formal(primReal(), "zoom", false, false), formal(primTriple(), "m", false, false), formal(primTriple(), "m", false, false), formal(primPair(), "shift", false, false), formal(realArray2(), "t", false, false), formal(realArray(), "background", false, false), formal(tripleArray(), "lights", false, false), formal(realArray2(), "diffuse", false, false), formal(realArray2(), "ambient", false, false), formal(realArray2(), "specular", false, false), formal(primBoolean(), "viewportlighting", false, false), formal(primBoolean(), "view", true, false)); -#line 1801 "runtime.in" +#line 1798 "runtime.in" addFunc(ve, run::gen66, primVoid(), "shipout3", formal(primString() , "prefix", false, false), formal(primPicture(), "f", false, false)); -#line 1806 "runtime.in" +#line 1803 "runtime.in" addFunc(ve, run::gen67, primVoid(), "deconstruct", formal(primPicture(), "f", false, false), formal(primPicture(), "preamble", true, false), formal(primReal(), "magnification", true, false), formal(transformFunction(), "xform", false, false)); -#line 1929 "runtime.in" +#line 1926 "runtime.in" addFunc(ve, run::gen68, primVoid(), "purge", formal(primInt(), "divisor", true, false)); -#line 1942 "runtime.in" +#line 1939 "runtime.in" addFunc(ve, run::gen70, primBoolean(), "==", formal(primPen(), "a", false, false), formal(primPen(), "b", false, false)); -#line 1947 "runtime.in" +#line 1944 "runtime.in" addFunc(ve, run::gen71, primBoolean(), "!=", formal(primPen(), "a", false, false), formal(primPen(), "b", false, false)); -#line 1952 "runtime.in" +#line 1949 "runtime.in" addFunc(ve, run::gen72, primPen(), "+", formal(primPen(), "a", false, false), formal(primPen(), "b", false, false)); -#line 1957 "runtime.in" +#line 1954 "runtime.in" addFunc(ve, run::gen73, primPen(), "*", formal(primReal(), "a", false, false), formal(primPen(), "b", false, false)); -#line 1962 "runtime.in" +#line 1959 "runtime.in" addFunc(ve, run::gen74, primPen(), "*", formal(primPen(), "a", false, false), formal(primReal(), "b", false, false)); -#line 1967 "runtime.in" +#line 1964 "runtime.in" addFunc(ve, run::gen75, primPair(), "max", formal(primPen(), "p", false, false)); -#line 1972 "runtime.in" +#line 1969 "runtime.in" addFunc(ve, run::gen76, primPair(), "min", formal(primPen(), "p", false, false)); -#line 1977 "runtime.in" +#line 1974 "runtime.in" addFunc(ve, run::gen77, primVoid(), "resetdefaultpen"); -#line 1983 "runtime.in" +#line 1980 "runtime.in" addFunc(ve, run::gen78, primVoid(), "defaultpen", formal(primPen(), "p", false, false)); -#line 1988 "runtime.in" +#line 1985 "runtime.in" addFunc(ve, run::gen79, primPen(), "defaultpen"); -#line 1993 "runtime.in" +#line 1990 "runtime.in" addFunc(ve, run::gen80, primBoolean(), "invisible", formal(primPen(), "p", false, false)); -#line 1998 "runtime.in" +#line 1995 "runtime.in" addFunc(ve, run::gen81, primPen(), "invisible"); -#line 2003 "runtime.in" +#line 2000 "runtime.in" addFunc(ve, run::gen82, primPen(), "gray", formal(primPen(), "p", false, false)); -#line 2009 "runtime.in" +#line 2006 "runtime.in" addFunc(ve, run::gen83, primPen(), "rgb", formal(primPen(), "p", false, false)); -#line 2015 "runtime.in" +#line 2012 "runtime.in" addFunc(ve, run::gen84, primPen(), "cmyk", formal(primPen(), "p", false, false)); -#line 2021 "runtime.in" +#line 2018 "runtime.in" addFunc(ve, run::gen85, primPen(), "interp", formal(primPen(), "a", false, false), formal(primPen(), "b", false, false), formal(primReal(), "t", false, false)); -#line 2026 "runtime.in" +#line 2023 "runtime.in" addFunc(ve, run::gen86, primPen(), "rgb", formal(primReal(), "r", false, false), formal(primReal(), "g", false, false), formal(primReal(), "b", false, false)); -#line 2031 "runtime.in" +#line 2028 "runtime.in" addFunc(ve, run::gen87, primPen(), "cmyk", formal(primReal(), "c", false, false), formal(primReal(), "m", false, false), formal(primReal(), "y", false, false), formal(primReal(), "k", false, false)); -#line 2036 "runtime.in" +#line 2033 "runtime.in" addFunc(ve, run::gen88, primPen(), "gray", formal(primReal(), "gray", false, false)); -#line 2041 "runtime.in" +#line 2038 "runtime.in" addFunc(ve, run::gen89, realArray(), "colors", formal(primPen(), "p", false, false)); -#line 2069 "runtime.in" +#line 2066 "runtime.in" addFunc(ve, run::gen90, primString() , "colorspace", formal(primPen(), "p", false, false)); -#line 2076 "runtime.in" +#line 2073 "runtime.in" addFunc(ve, run::gen91, primPen(), "pattern", formal(primString(), "s", false, false)); -#line 2081 "runtime.in" +#line 2078 "runtime.in" addFunc(ve, run::gen92, primString() , "pattern", formal(primPen(), "p", false, false)); -#line 2086 "runtime.in" +#line 2083 "runtime.in" addFunc(ve, run::gen93, primPen(), "fillrule", formal(primInt(), "n", false, false)); -#line 2091 "runtime.in" +#line 2088 "runtime.in" addFunc(ve, run::gen94, primInt(), "fillrule", formal(primPen(), "p", false, false)); -#line 2096 "runtime.in" +#line 2093 "runtime.in" addFunc(ve, run::gen95, primPen(), "opacity", formal(primReal(), "opacity", true, false), formal(primString() , "blend", true, false)); -#line 2106 "runtime.in" +#line 2103 "runtime.in" addFunc(ve, run::gen96, primReal(), "opacity", formal(primPen(), "p", false, false)); -#line 2111 "runtime.in" +#line 2108 "runtime.in" addFunc(ve, run::gen97, primString() , "blend", formal(primPen(), "p", false, false)); -#line 2116 "runtime.in" +#line 2113 "runtime.in" addFunc(ve, run::gen98, primPen(), "linetype", formal(primString(), "s", false, false), formal(primReal(), "offset", true, false), formal(primBoolean(), "scale", true, false), formal(primBoolean(), "adjust", true, false)); -#line 2121 "runtime.in" +#line 2118 "runtime.in" addFunc(ve, run::gen99, primString() , "linetype", formal(primPen(), "p", true, false)); -#line 2126 "runtime.in" +#line 2123 "runtime.in" addFunc(ve, run::gen100, primReal(), "offset", formal(primPen(), "p", false, false)); -#line 2131 "runtime.in" +#line 2128 "runtime.in" addFunc(ve, run::gen101, primBoolean(), "scale", formal(primPen(), "p", false, false)); -#line 2136 "runtime.in" +#line 2133 "runtime.in" addFunc(ve, run::gen102, primBoolean(), "adjust", formal(primPen(), "p", false, false)); -#line 2141 "runtime.in" +#line 2138 "runtime.in" addFunc(ve, run::gen103, primPen(), "adjust", formal(primPen(), "p", false, false), formal(primReal(), "arclength", false, false), formal(primBoolean(), "cyclic", false, false)); -#line 2146 "runtime.in" +#line 2143 "runtime.in" addFunc(ve, run::gen104, primPen(), "linecap", formal(primInt(), "n", false, false)); -#line 2151 "runtime.in" +#line 2148 "runtime.in" addFunc(ve, run::gen105, primInt(), "linecap", formal(primPen(), "p", true, false)); -#line 2156 "runtime.in" +#line 2153 "runtime.in" addFunc(ve, run::gen106, primPen(), "linejoin", formal(primInt(), "n", false, false)); -#line 2161 "runtime.in" +#line 2158 "runtime.in" addFunc(ve, run::gen107, primInt(), "linejoin", formal(primPen(), "p", true, false)); -#line 2166 "runtime.in" +#line 2163 "runtime.in" addFunc(ve, run::gen108, primPen(), "miterlimit", formal(primReal(), "x", false, false)); -#line 2171 "runtime.in" +#line 2168 "runtime.in" addFunc(ve, run::gen109, primReal(), "miterlimit", formal(primPen(), "p", true, false)); -#line 2176 "runtime.in" +#line 2173 "runtime.in" addFunc(ve, run::gen110, primPen(), "linewidth", formal(primReal(), "x", false, false)); -#line 2181 "runtime.in" +#line 2178 "runtime.in" addFunc(ve, run::gen111, primReal(), "linewidth", formal(primPen(), "p", true, false)); -#line 2186 "runtime.in" +#line 2183 "runtime.in" addFunc(ve, run::gen112, primPen(), "fontcommand", formal(primString(), "s", false, false)); -#line 2191 "runtime.in" +#line 2188 "runtime.in" addFunc(ve, run::gen113, primString() , "font", formal(primPen(), "p", true, false)); -#line 2196 "runtime.in" +#line 2193 "runtime.in" addFunc(ve, run::gen114, primPen(), "fontsize", formal(primReal(), "size", false, false), formal(primReal(), "lineskip", false, false)); -#line 2202 "runtime.in" +#line 2199 "runtime.in" addFunc(ve, run::gen115, primReal(), "fontsize", formal(primPen(), "p", true, false)); -#line 2207 "runtime.in" +#line 2204 "runtime.in" addFunc(ve, run::gen116, primReal(), "lineskip", formal(primPen(), "p", true, false)); -#line 2212 "runtime.in" +#line 2209 "runtime.in" addFunc(ve, run::gen117, primPen(), "overwrite", formal(primInt(), "n", false, false)); -#line 2218 "runtime.in" +#line 2215 "runtime.in" addFunc(ve, run::gen118, primInt(), "overwrite", formal(primPen(), "p", true, false)); -#line 2223 "runtime.in" +#line 2220 "runtime.in" addFunc(ve, run::gen119, primPen(), "basealign", formal(primInt(), "n", false, false)); -#line 2228 "runtime.in" +#line 2225 "runtime.in" addFunc(ve, run::gen120, primInt(), "basealign", formal(primPen(), "p", true, false)); -#line 2233 "runtime.in" +#line 2230 "runtime.in" addFunc(ve, run::gen121, primTransform(), "transform", formal(primPen(), "p", false, false)); -#line 2238 "runtime.in" +#line 2235 "runtime.in" addFunc(ve, run::gen122, primPath(), "nib", formal(primPen(), "p", false, false)); -#line 2243 "runtime.in" +#line 2240 "runtime.in" addFunc(ve, run::gen123, primPen(), "makepen", formal(primPath(), "p", false, false)); -#line 2248 "runtime.in" +#line 2245 "runtime.in" addFunc(ve, run::gen124, primPen(), "colorless", formal(primPen(), "p", false, false)); -#line 2254 "runtime.in" +#line 2251 "runtime.in" addFunc(ve, run::gen125, primBoolean(), "interactive"); -#line 2261 "runtime.in" +#line 2258 "runtime.in" addFunc(ve, run::gen126, primBoolean(), "uptodate"); -#line 2266 "runtime.in" +#line 2263 "runtime.in" addFunc(ve, run::gen127, primInt(), "system", formal(stringArray(), "s", false, false)); -#line 2280 "runtime.in" +#line 2277 "runtime.in" addFunc(ve, run::gen128, primBoolean(), "view"); -#line 2285 "runtime.in" +#line 2282 "runtime.in" addFunc(ve, run::gen129, primString() , "asydir"); -#line 2290 "runtime.in" +#line 2287 "runtime.in" addFunc(ve, run::gen130, primString() , "locale", formal(primString() , "s", true, false)); -#line 2296 "runtime.in" +#line 2293 "runtime.in" addFunc(ve, run::gen131, primVoid(), "abort", formal(primString() , "s", true, false)); -#line 2302 "runtime.in" +#line 2299 "runtime.in" addFunc(ve, run::gen132, primVoid(), "exit"); -#line 2307 "runtime.in" +#line 2304 "runtime.in" addFunc(ve, run::gen133, primVoid(), "assert", formal(primBoolean(), "b", false, false), formal(primString() , "s", true, false)); -#line 2318 "runtime.in" +#line 2315 "runtime.in" addFunc(ve, run::gen134, primVoid(), "sleep", formal(primInt(), "seconds", false, false)); -#line 2324 "runtime.in" +#line 2321 "runtime.in" addFunc(ve, run::gen135, primVoid(), "usleep", formal(primInt(), "microseconds", false, false)); -#line 2330 "runtime.in" +#line 2327 "runtime.in" addFunc(ve, run::gen136, primVoid(), "_eval", formal(primString(), "s", false, false), formal(primBoolean(), "embedded", false, false), formal(primBoolean(), "interactivewrite", true, false)); -#line 2345 "runtime.in" +#line 2342 "runtime.in" addFunc(ve, run::gen137, primVoid(), "_eval", formal(primCode(), "s", false, false), formal(primBoolean(), "embedded", false, false)); -#line 2363 "runtime.in" +#line 2360 "runtime.in" addFunc(ve, run::gen138, primString() , "location"); -#line 2375 "runtime.in" +#line 2372 "runtime.in" addFunc(ve, run::gen140, primString() , "cd", formal(primString() , "s", true, false)); -#line 2381 "runtime.in" +#line 2378 "runtime.in" addFunc(ve, run::gen141, primVoid(), "list", formal(primString(), "s", false, false), formal(primBoolean(), "imports", true, false)); -#line 2398 "runtime.in" +#line 2395 "runtime.in" addFunc(ve, run::gen143, primBoolean(), "==", formal(primPath(), "a", false, false), formal(primPath(), "b", false, false)); -#line 2403 "runtime.in" +#line 2400 "runtime.in" addFunc(ve, run::gen144, primBoolean(), "!=", formal(primPath(), "a", false, false), formal(primPath(), "b", false, false)); -#line 2408 "runtime.in" +#line 2405 "runtime.in" addFunc(ve, run::gen145, primPair(), "point", formal(primPath(), "p", false, false), formal(primInt(), "t", false, false)); -#line 2413 "runtime.in" +#line 2410 "runtime.in" addFunc(ve, run::gen146, primPair(), "point", formal(primPath(), "p", false, false), formal(primReal(), "t", false, false)); -#line 2418 "runtime.in" +#line 2415 "runtime.in" addFunc(ve, run::gen147, primPair(), "precontrol", formal(primPath(), "p", false, false), formal(primInt(), "t", false, false)); -#line 2423 "runtime.in" +#line 2420 "runtime.in" addFunc(ve, run::gen148, primPair(), "precontrol", formal(primPath(), "p", false, false), formal(primReal(), "t", false, false)); -#line 2428 "runtime.in" +#line 2425 "runtime.in" addFunc(ve, run::gen149, primPair(), "postcontrol", formal(primPath(), "p", false, false), formal(primInt(), "t", false, false)); -#line 2433 "runtime.in" +#line 2430 "runtime.in" addFunc(ve, run::gen150, primPair(), "postcontrol", formal(primPath(), "p", false, false), formal(primReal(), "t", false, false)); -#line 2438 "runtime.in" +#line 2435 "runtime.in" addFunc(ve, run::gen151, primPair(), "dir", formal(primPath(), "p", false, false), formal(primInt(), "t", false, false), formal(primInt(), "sign", true, false), formal(primBoolean(), "normalize", true, false)); -#line 2443 "runtime.in" +#line 2440 "runtime.in" addFunc(ve, run::gen152, primPair(), "dir", formal(primPath(), "p", false, false), formal(primReal(), "t", false, false), formal(primBoolean(), "normalize", true, false)); -#line 2448 "runtime.in" +#line 2445 "runtime.in" addFunc(ve, run::gen153, primPair(), "accel", formal(primPath(), "p", false, false), formal(primInt(), "t", false, false), formal(primInt(), "sign", true, false)); -#line 2453 "runtime.in" +#line 2450 "runtime.in" addFunc(ve, run::gen154, primPair(), "accel", formal(primPath(), "p", false, false), formal(primReal(), "t", false, false)); -#line 2458 "runtime.in" +#line 2455 "runtime.in" addFunc(ve, run::gen155, primReal(), "radius", formal(primPath(), "p", false, false), formal(primReal(), "t", false, false)); -#line 2470 "runtime.in" +#line 2467 "runtime.in" addFunc(ve, run::gen156, primPath(), "reverse", formal(primPath(), "p", false, false)); -#line 2475 "runtime.in" +#line 2472 "runtime.in" addFunc(ve, run::gen157, primPath(), "subpath", formal(primPath(), "p", false, false), formal(primInt(), "a", false, false), formal(primInt(), "b", false, false)); -#line 2480 "runtime.in" +#line 2477 "runtime.in" addFunc(ve, run::gen158, primPath(), "subpath", formal(primPath(), "p", false, false), formal(primReal(), "a", false, false), formal(primReal(), "b", false, false)); -#line 2485 "runtime.in" +#line 2482 "runtime.in" addFunc(ve, run::gen159, primPath(), "nurb", formal(primPair(), "z0", false, false), formal(primPair(), "z1", false, false), formal(primPair(), "z2", false, false), formal(primPair(), "z3", false, false), formal(primReal(), "w0", false, false), formal(primReal(), "w1", false, false), formal(primReal(), "w2", false, false), formal(primReal(), "w3", false, false), formal(primInt(), "m", false, false)); -#line 2491 "runtime.in" +#line 2488 "runtime.in" addFunc(ve, run::gen160, primInt(), "length", formal(primPath(), "p", false, false)); -#line 2496 "runtime.in" +#line 2493 "runtime.in" addFunc(ve, run::gen161, primBoolean(), "cyclic", formal(primPath(), "p", false, false)); -#line 2501 "runtime.in" +#line 2498 "runtime.in" addFunc(ve, run::gen162, primBoolean(), "straight", formal(primPath(), "p", false, false), formal(primInt(), "t", false, false)); -#line 2506 "runtime.in" +#line 2503 "runtime.in" addFunc(ve, run::gen163, primPath(), "unstraighten", formal(primPath(), "p", false, false)); -#line 2511 "runtime.in" +#line 2508 "runtime.in" addFunc(ve, run::gen164, primBoolean(), "piecewisestraight", formal(primPath(), "p", false, false)); -#line 2516 "runtime.in" +#line 2513 "runtime.in" addFunc(ve, run::gen165, primReal(), "arclength", formal(primPath(), "p", false, false)); -#line 2521 "runtime.in" +#line 2518 "runtime.in" addFunc(ve, run::gen166, primReal(), "arctime", formal(primPath(), "p", false, false), formal(primReal(), "dval", false, false)); -#line 2526 "runtime.in" +#line 2523 "runtime.in" addFunc(ve, run::gen167, primReal(), "dirtime", formal(primPath(), "p", false, false), formal(primPair(), "z", false, false)); -#line 2531 "runtime.in" +#line 2528 "runtime.in" addFunc(ve, run::gen168, realArray(), "intersect", formal(primPath(), "p", false, false), formal(primPath(), "q", false, false), formal(primReal(), "fuzz", true, false)); -#line 2548 "runtime.in" +#line 2545 "runtime.in" addFunc(ve, run::gen169, realArray2(), "intersections", formal(primPath(), "p", false, false), formal(primPath(), "q", false, false), formal(primReal(), "fuzz", true, false)); -#line 2579 "runtime.in" +#line 2576 "runtime.in" addFunc(ve, run::gen170, realArray(), "intersections", formal(primPath(), "p", false, false), formal(primPair(), "a", false, true), formal(primPair(), "b", false, true), formal(primReal(), "fuzz", true, false)); -#line 2594 "runtime.in" +#line 2591 "runtime.in" addFunc(ve, run::gen171, primPair(), "extension", formal(primPair(), "p", false, false), formal(primPair(), "q", false, false), formal(primPair(), "p", false, false), formal(primPair(), "q", false, false)); -#line 2605 "runtime.in" +#line 2602 "runtime.in" addFunc(ve, run::gen172, primInt(), "size", formal(primPath(), "p", false, false)); -#line 2610 "runtime.in" +#line 2607 "runtime.in" addFunc(ve, run::gen173, primPath(), "&", formal(primPath(), "p", false, false), formal(primPath(), "q", false, false)); -#line 2615 "runtime.in" +#line 2612 "runtime.in" addFunc(ve, run::gen174, primPair(), "min", formal(primPath(), "p", false, false)); -#line 2620 "runtime.in" +#line 2617 "runtime.in" addFunc(ve, run::gen175, primPair(), "max", formal(primPath(), "p", false, false)); -#line 2625 "runtime.in" +#line 2622 "runtime.in" addFunc(ve, run::gen176, realArray(), "mintimes", formal(primPath(), "p", false, false)); -#line 2634 "runtime.in" +#line 2631 "runtime.in" addFunc(ve, run::gen177, realArray(), "maxtimes", formal(primPath(), "p", false, false)); -#line 2643 "runtime.in" +#line 2640 "runtime.in" addFunc(ve, run::gen178, primReal(), "relativedistance", formal(primReal(), "theta", false, false), formal(primReal(), "phi", false, false), formal(primReal(), "t", false, false), formal(primBoolean(), "atleast", false, false)); -#line 2648 "runtime.in" +#line 2645 "runtime.in" addFunc(ve, run::gen179, primInt(), "windingnumber", formal(pathArray() , "p", false, false), formal(primPair(), "z", false, false)); -#line 2653 "runtime.in" +#line 2650 "runtime.in" addFunc(ve, run::gen180, primBoolean(), "inside", formal(pathArray() , "g", false, true), formal(primPair(), "z", false, false), formal(primPen(), "fillrule", true, false)); -#line 2658 "runtime.in" +#line 2655 "runtime.in" addFunc(ve, run::gen181, primBoolean(), "inside", formal(primPath(), "g", false, false), formal(primPair(), "z", false, false), formal(primPen(), "fillrule", true, false)); -#line 2663 "runtime.in" +#line 2660 "runtime.in" addFunc(ve, run::gen182, primReal(), "side", formal(primPair(), "a", false, false), formal(primPair(), "b", false, false), formal(primPair(), "c", false, false)); -#line 2670 "runtime.in" +#line 2667 "runtime.in" addFunc(ve, run::gen183, primReal(), "incircle", formal(primPair(), "a", false, false), formal(primPair(), "b", false, false), formal(primPair(), "c", false, false), formal(primPair(), "d", false, false)); -#line 2678 "runtime.in" +#line 2675 "runtime.in" addFunc(ve, run::gen184, primPath3(), "path3", formal(tripleArray(), "pre", false, false), formal(tripleArray(), "point", false, false), formal(tripleArray(), "post", false, false), formal(boolArray(), "straight", false, false), formal(primBoolean(), "cyclic", false, false)); -#line 2703 "runtime.in" +#line 2700 "runtime.in" addFunc(ve, run::gen186, primBoolean(), "==", formal(primPath3(), "a", false, false), formal(primPath3(), "b", false, false)); -#line 2708 "runtime.in" +#line 2705 "runtime.in" addFunc(ve, run::gen187, primBoolean(), "!=", formal(primPath3(), "a", false, false), formal(primPath3(), "b", false, false)); -#line 2713 "runtime.in" +#line 2710 "runtime.in" addFunc(ve, run::gen188, primTriple(), "point", formal(primPath3(), "p", false, false), formal(primInt(), "t", false, false)); -#line 2718 "runtime.in" +#line 2715 "runtime.in" addFunc(ve, run::gen189, primTriple(), "point", formal(primPath3(), "p", false, false), formal(primReal(), "t", false, false)); -#line 2723 "runtime.in" +#line 2720 "runtime.in" addFunc(ve, run::gen190, primTriple(), "precontrol", formal(primPath3(), "p", false, false), formal(primInt(), "t", false, false)); -#line 2728 "runtime.in" +#line 2725 "runtime.in" addFunc(ve, run::gen191, primTriple(), "precontrol", formal(primPath3(), "p", false, false), formal(primReal(), "t", false, false)); -#line 2733 "runtime.in" +#line 2730 "runtime.in" addFunc(ve, run::gen192, primTriple(), "postcontrol", formal(primPath3(), "p", false, false), formal(primInt(), "t", false, false)); -#line 2738 "runtime.in" +#line 2735 "runtime.in" addFunc(ve, run::gen193, primTriple(), "postcontrol", formal(primPath3(), "p", false, false), formal(primReal(), "t", false, false)); -#line 2743 "runtime.in" +#line 2740 "runtime.in" addFunc(ve, run::gen194, primTriple(), "dir", formal(primPath3(), "p", false, false), formal(primInt(), "t", false, false), formal(primInt(), "sign", true, false), formal(primBoolean(), "normalize", true, false)); -#line 2748 "runtime.in" +#line 2745 "runtime.in" addFunc(ve, run::gen195, primTriple(), "dir", formal(primPath3(), "p", false, false), formal(primReal(), "t", false, false), formal(primBoolean(), "normalize", true, false)); -#line 2753 "runtime.in" +#line 2750 "runtime.in" addFunc(ve, run::gen196, primTriple(), "accel", formal(primPath3(), "p", false, false), formal(primInt(), "t", false, false), formal(primInt(), "sign", true, false)); -#line 2758 "runtime.in" +#line 2755 "runtime.in" addFunc(ve, run::gen197, primTriple(), "accel", formal(primPath3(), "p", false, false), formal(primReal(), "t", false, false)); -#line 2763 "runtime.in" +#line 2760 "runtime.in" addFunc(ve, run::gen198, primReal(), "radius", formal(primPath3(), "p", false, false), formal(primReal(), "t", false, false)); -#line 2775 "runtime.in" +#line 2772 "runtime.in" addFunc(ve, run::gen199, primReal(), "radius", formal(primTriple(), "z0", false, false), formal(primTriple(), "c0", false, false), formal(primTriple(), "c1", false, false), formal(primTriple(), "z1", false, false), formal(primReal(), "t", false, false)); -#line 2787 "runtime.in" +#line 2784 "runtime.in" addFunc(ve, run::gen200, primPath3(), "reverse", formal(primPath3(), "p", false, false)); -#line 2792 "runtime.in" +#line 2789 "runtime.in" addFunc(ve, run::gen201, primPath3(), "subpath", formal(primPath3(), "p", false, false), formal(primInt(), "a", false, false), formal(primInt(), "b", false, false)); -#line 2797 "runtime.in" +#line 2794 "runtime.in" addFunc(ve, run::gen202, primPath3(), "subpath", formal(primPath3(), "p", false, false), formal(primReal(), "a", false, false), formal(primReal(), "b", false, false)); -#line 2802 "runtime.in" +#line 2799 "runtime.in" addFunc(ve, run::gen203, primInt(), "length", formal(primPath3(), "p", false, false)); -#line 2807 "runtime.in" +#line 2804 "runtime.in" addFunc(ve, run::gen204, primBoolean(), "cyclic", formal(primPath3(), "p", false, false)); -#line 2812 "runtime.in" +#line 2809 "runtime.in" addFunc(ve, run::gen205, primBoolean(), "straight", formal(primPath3(), "p", false, false), formal(primInt(), "t", false, false)); -#line 2817 "runtime.in" +#line 2814 "runtime.in" addFunc(ve, run::gen206, primTriple(), "perp", formal(primTriple(), "v", false, false), formal(primTriple(), "u", false, false)); -#line 2823 "runtime.in" +#line 2820 "runtime.in" addFunc(ve, run::gen207, primReal(), "straightness", formal(primPath3(), "p", false, false), formal(primInt(), "t", false, false)); -#line 2834 "runtime.in" +#line 2831 "runtime.in" addFunc(ve, run::gen208, primReal(), "straightness", formal(primTriple(), "z0", false, false), formal(primTriple(), "c0", false, false), formal(primTriple(), "c1", false, false), formal(primTriple(), "z1", false, false)); -#line 2842 "runtime.in" +#line 2839 "runtime.in" addFunc(ve, run::gen209, primBoolean(), "piecewisestraight", formal(primPath3(), "p", false, false)); -#line 2847 "runtime.in" +#line 2844 "runtime.in" addFunc(ve, run::gen210, primReal(), "arclength", formal(primPath3(), "p", false, false)); -#line 2852 "runtime.in" +#line 2849 "runtime.in" addFunc(ve, run::gen211, primReal(), "arctime", formal(primPath3(), "p", false, false), formal(primReal(), "dval", false, false)); -#line 2857 "runtime.in" +#line 2854 "runtime.in" addFunc(ve, run::gen212, realArray(), "intersect", formal(primPath3(), "p", false, false), formal(primPath3(), "q", false, false), formal(primReal(), "fuzz", true, false)); -#line 2875 "runtime.in" +#line 2872 "runtime.in" addFunc(ve, run::gen213, realArray2(), "intersections", formal(primPath3(), "p", false, false), formal(primPath3(), "q", false, false), formal(primReal(), "fuzz", true, false)); -#line 2908 "runtime.in" +#line 2905 "runtime.in" addFunc(ve, run::gen214, realArray2(), "intersections", formal(primPath3(), "p", false, false), formal(tripleArray2(), "p", false, false), formal(primReal(), "fuzz", true, false)); -#line 2928 "runtime.in" +#line 2925 "runtime.in" addFunc(ve, run::gen215, primInt(), "size", formal(primPath3(), "p", false, false)); -#line 2933 "runtime.in" +#line 2930 "runtime.in" addFunc(ve, run::gen216, primPath3(), "&", formal(primPath3(), "p", false, false), formal(primPath3(), "q", false, false)); -#line 2938 "runtime.in" +#line 2935 "runtime.in" addFunc(ve, run::gen217, primTriple(), "min", formal(primPath3(), "p", false, false)); -#line 2943 "runtime.in" +#line 2940 "runtime.in" addFunc(ve, run::gen218, primTriple(), "max", formal(primPath3(), "p", false, false)); -#line 2948 "runtime.in" +#line 2945 "runtime.in" addFunc(ve, run::gen219, realArray(), "mintimes", formal(primPath3(), "p", false, false)); -#line 2958 "runtime.in" +#line 2955 "runtime.in" addFunc(ve, run::gen220, realArray(), "maxtimes", formal(primPath3(), "p", false, false)); -#line 2968 "runtime.in" +#line 2965 "runtime.in" addFunc(ve, run::gen221, primPath3(), "*", formal(realArray2(), "t", false, false), formal(primPath3(), "g", false, false)); -#line 3023 "runtime.in" +#line 3020 "runtime.in" addFunc(ve, run::gen226, primGuide(), "operator cast", formal(primCycleToken(), "tok", false, false)); -#line 3030 "runtime.in" +#line 3027 "runtime.in" addFunc(ve, run::gen227, primGuide(), "operator spec", formal(primPair(), "z", false, false), formal(primInt(), "p", false, false)); -#line 3038 "runtime.in" +#line 3035 "runtime.in" addFunc(ve, run::gen228, primCurlSpecifier(), "operator curl", formal(primReal(), "gamma", false, false), formal(primInt(), "p", false, false)); -#line 3054 "runtime.in" +#line 3051 "runtime.in" addFunc(ve, run::gen231, primGuide(), "operator cast", formal(primCurlSpecifier(), "spec", false, false)); -#line 3059 "runtime.in" +#line 3056 "runtime.in" addFunc(ve, run::gen232, primTensionSpecifier(), "operator tension", formal(primReal(), "tout", false, false), formal(primReal(), "tin", false, false), formal(primBoolean(), "atleast", false, false)); -#line 3079 "runtime.in" +#line 3076 "runtime.in" addFunc(ve, run::gen236, primGuide(), "operator cast", formal(primTensionSpecifier(), "t", false, false)); -#line 3084 "runtime.in" +#line 3081 "runtime.in" addFunc(ve, run::gen237, primGuide(), "operator controls", formal(primPair(), "zout", false, false), formal(primPair(), "zin", false, false)); -#line 3089 "runtime.in" +#line 3086 "runtime.in" addFunc(ve, run::gen238, primInt(), "size", formal(primGuide(), "g", false, false)); -#line 3096 "runtime.in" +#line 3093 "runtime.in" addFunc(ve, run::gen239, primInt(), "length", formal(primGuide(), "g", false, false)); -#line 3103 "runtime.in" +#line 3100 "runtime.in" addFunc(ve, run::gen240, primBoolean(), "cyclic", formal(primGuide(), "g", false, false)); -#line 3110 "runtime.in" +#line 3107 "runtime.in" addFunc(ve, run::gen241, primPair(), "point", formal(primGuide(), "g", false, false), formal(primInt(), "t", false, false)); -#line 3117 "runtime.in" +#line 3114 "runtime.in" addFunc(ve, run::gen242, pairArray(), "dirSpecifier", formal(primGuide(), "g", false, false), formal(primInt(), "t", false, false)); -#line 3129 "runtime.in" +#line 3126 "runtime.in" addFunc(ve, run::gen243, pairArray(), "controlSpecifier", formal(primGuide(), "g", false, false), formal(primInt(), "t", false, false)); -#line 3146 "runtime.in" +#line 3143 "runtime.in" addFunc(ve, run::gen244, primTensionSpecifier(), "tensionSpecifier", formal(primGuide(), "g", false, false), formal(primInt(), "t", false, false)); -#line 3156 "runtime.in" +#line 3153 "runtime.in" addFunc(ve, run::gen245, realArray(), "curlSpecifier", formal(primGuide(), "g", false, false), formal(primInt(), "t", false, false)); -#line 3170 "runtime.in" +#line 3167 "runtime.in" addFunc(ve, run::gen246, primGuide(), "reverse", formal(primGuide(), "g", false, false)); -#line 3224 "runtime.in" +#line 3221 "runtime.in" addFunc(ve, run::gen247, primVoid(), "_draw", formal(primPicture(), "f", false, false), formal(primPath3(), "g", false, false), formal(primPen(), "p", false, false)); -#line 3233 "runtime.in" +#line 3230 "runtime.in" addFunc(ve, run::gen248, primVoid(), "draw", formal(primPicture(), "f", false, false), formal(tripleArray2(), "g", false, false), formal(primBoolean(), "straight", false, false), formal(penArray() , "p", false, false), formal(primReal(), "opacity", false, false), formal(primReal(), "shininess", false, false), formal(primReal(), "granularity", false, false), formal(primTriple(), "normal", false, false), formal(primBoolean(), "lighton", false, false), formal(penArray() , "colors", false, false)); -#line 3241 "runtime.in" +#line 3238 "runtime.in" addFunc(ve, run::gen249, primTriple(), "min3", formal(primPicture(), "f", false, false)); -#line 3246 "runtime.in" +#line 3243 "runtime.in" addFunc(ve, run::gen250, primTriple(), "max3", formal(primPicture(), "f", false, false)); -#line 3251 "runtime.in" +#line 3248 "runtime.in" addFunc(ve, run::gen251, primPair(), "min", formal(primPicture(), "f", false, false), formal(realArray2(), "t", false, false)); -#line 3259 "runtime.in" +#line 3256 "runtime.in" addFunc(ve, run::gen252, primPair(), "max", formal(primPicture(), "f", false, false), formal(realArray2(), "t", false, false)); -#line 3267 "runtime.in" +#line 3264 "runtime.in" addFunc(ve, run::gen253, primPair(), "minratio", formal(primPicture(), "f", false, false)); -#line 3272 "runtime.in" +#line 3269 "runtime.in" addFunc(ve, run::gen254, primPair(), "maxratio", formal(primPicture(), "f", false, false)); -#line 3277 "runtime.in" +#line 3274 "runtime.in" addFunc(ve, run::gen255, primTriple(), "minbezier", formal(tripleArray2(), "p", false, false), formal(primTriple(), "b", false, false)); -#line 3287 "runtime.in" +#line 3284 "runtime.in" addFunc(ve, run::gen256, primTriple(), "maxbezier", formal(tripleArray2(), "p", false, false), formal(primTriple(), "b", false, false)); -#line 3297 "runtime.in" +#line 3294 "runtime.in" addFunc(ve, run::gen257, primPair(), "minbezier", formal(tripleArray2(), "p", false, false), formal(realArray2(), "t", false, false), formal(primPair(), "b", false, false)); -#line 3309 "runtime.in" +#line 3306 "runtime.in" addFunc(ve, run::gen258, primPair(), "maxbezier", formal(tripleArray2(), "p", false, false), formal(realArray2(), "t", false, false), formal(primPair(), "b", false, false)); -#line 3321 "runtime.in" +#line 3318 "runtime.in" addFunc(ve, run::gen259, primPair(), "max", formal(primPath3(), "g", false, false), formal(realArray2(), "t", false, false)); -#line 3329 "runtime.in" +#line 3326 "runtime.in" addFunc(ve, run::gen260, primPair(), "min", formal(primPath3(), "g", false, false), formal(realArray2(), "t", false, false)); -#line 3337 "runtime.in" +#line 3334 "runtime.in" addFunc(ve, run::gen261, primReal(), "change2", formal(tripleArray2(), "a", false, false)); -#line 3359 "runtime.in" +#line 3356 "runtime.in" addFunc(ve, run::gen262, primBoolean(), "is3D", formal(primPicture(), "f", false, false)); -#line 3364 "runtime.in" +#line 3361 "runtime.in" addFunc(ve, run::gen263, primPair(), "bezier", formal(primPair(), "a", false, false), formal(primPair(), "b", false, false), formal(primPair(), "c", false, false), formal(primPair(), "d", false, false), formal(primReal(), "t", false, false)); -#line 3371 "runtime.in" +#line 3368 "runtime.in" addFunc(ve, run::gen264, primPair(), "bezierP", formal(primPair(), "a", false, false), formal(primPair(), "b", false, false), formal(primPair(), "c", false, false), formal(primPair(), "d", false, false), formal(primReal(), "t", false, false)); -#line 3376 "runtime.in" +#line 3373 "runtime.in" addFunc(ve, run::gen265, primPair(), "bezierPP", formal(primPair(), "a", false, false), formal(primPair(), "b", false, false), formal(primPair(), "c", false, false), formal(primPair(), "d", false, false), formal(primReal(), "t", false, false)); -#line 3381 "runtime.in" +#line 3378 "runtime.in" addFunc(ve, run::gen266, primPair(), "bezierPPP", formal(primPair(), "a", false, false), formal(primPair(), "b", false, false), formal(primPair(), "c", false, false), formal(primPair(), "d", false, false)); -#line 3386 "runtime.in" +#line 3383 "runtime.in" addFunc(ve, run::gen267, primTriple(), "bezier", formal(primTriple(), "a", false, false), formal(primTriple(), "b", false, false), formal(primTriple(), "c", false, false), formal(primTriple(), "d", false, false), formal(primReal(), "t", false, false)); -#line 3393 "runtime.in" +#line 3390 "runtime.in" addFunc(ve, run::gen268, primTriple(), "bezierP", formal(primTriple(), "a", false, false), formal(primTriple(), "b", false, false), formal(primTriple(), "c", false, false), formal(primTriple(), "d", false, false), formal(primReal(), "t", false, false)); -#line 3398 "runtime.in" +#line 3395 "runtime.in" addFunc(ve, run::gen269, primTriple(), "bezierPP", formal(primTriple(), "a", false, false), formal(primTriple(), "b", false, false), formal(primTriple(), "c", false, false), formal(primTriple(), "d", false, false), formal(primReal(), "t", false, false)); -#line 3403 "runtime.in" +#line 3400 "runtime.in" addFunc(ve, run::gen270, primTriple(), "bezierPPP", formal(primTriple(), "a", false, false), formal(primTriple(), "b", false, false), formal(primTriple(), "c", false, false), formal(primTriple(), "d", false, false)); -#line 3416 "runtime.in" +#line 3413 "runtime.in" addFunc(ve, run::gen272, primInt(), "length", formal(primString(), "s", false, false)); -#line 3421 "runtime.in" +#line 3418 "runtime.in" addFunc(ve, run::gen273, primInt(), "find", formal(primString(), "s", false, false), formal(primString() , "t", false, false), formal(primInt(), "pos", true, false)); -#line 3427 "runtime.in" +#line 3424 "runtime.in" addFunc(ve, run::gen274, primInt(), "rfind", formal(primString(), "s", false, false), formal(primString() , "t", false, false), formal(primInt(), "pos", true, false)); -#line 3433 "runtime.in" +#line 3430 "runtime.in" addFunc(ve, run::gen275, primString() , "reverse", formal(primString() , "s", false, false)); -#line 3439 "runtime.in" +#line 3436 "runtime.in" addFunc(ve, run::gen276, primString() , "insert", formal(primString() , "s", false, false), formal(primInt(), "pos", false, false), formal(primString() , "t", false, false)); -#line 3446 "runtime.in" +#line 3443 "runtime.in" addFunc(ve, run::gen277, primString() , "substr", formal(primString(), "s", false, false), formal(primInt(), "pos", false, false), formal(primInt(), "n", true, false)); -#line 3453 "runtime.in" +#line 3450 "runtime.in" addFunc(ve, run::gen278, primString() , "erase", formal(primString() , "s", false, false), formal(primInt(), "pos", false, false), formal(primInt(), "n", false, false)); -#line 3460 "runtime.in" +#line 3457 "runtime.in" addFunc(ve, run::gen279, primString() , "downcase", formal(primString() , "s", false, false)); -#line 3466 "runtime.in" +#line 3463 "runtime.in" addFunc(ve, run::gen280, primString() , "upcase", formal(primString() , "s", false, false)); -#line 3472 "runtime.in" +#line 3469 "runtime.in" addFunc(ve, run::gen281, primString() , "replace", formal(primString(), "s", false, false), formal(stringArray2(), "translate", false, false)); -#line 3499 "runtime.in" +#line 3496 "runtime.in" addFunc(ve, run::gen282, primString() , "format", formal(primString(), "format", false, false), formal(primInt(), "x", false, false)); -#line 3514 "runtime.in" +#line 3511 "runtime.in" addFunc(ve, run::gen283, primString() , "format", formal(primString(), "format", false, false), formal(primReal(), "x", false, false), formal(primString() , "locale", true, false)); -#line 3639 "runtime.in" +#line 3636 "runtime.in" addFunc(ve, run::gen284, primInt(), "hex", formal(primString() , "s", false, false)); -#line 3650 "runtime.in" +#line 3647 "runtime.in" addFunc(ve, run::gen285, primString() , "string", formal(primInt(), "x", false, false)); -#line 3657 "runtime.in" +#line 3654 "runtime.in" addFunc(ve, run::gen286, primString() , "string", formal(primReal(), "x", false, false), formal(primInt(), "digits", true, false)); -#line 3665 "runtime.in" +#line 3662 "runtime.in" addFunc(ve, run::gen287, primString() , "time", formal(primString() , "format", true, false)); -#line 3676 "runtime.in" +#line 3673 "runtime.in" addFunc(ve, run::gen288, primString() , "time", formal(primInt(), "seconds", false, false), formal(primString() , "format", true, false)); -#line 3689 "runtime.in" +#line 3686 "runtime.in" addFunc(ve, run::gen289, primInt(), "seconds", formal(primString() , "t", true, false), formal(primString() , "format", true, false)); -#line 3701 "runtime.in" +#line 3698 "runtime.in" addFunc(ve, run::gen290, realArray(), "_cputime"); -#line 3715 "runtime.in" +#line 3712 "runtime.in" addFunc(ve, run::gen291, primReal(), "^", formal(primReal(), "x", false, false), formal(primInt(), "y", false, false)); -#line 3723 "runtime.in" +#line 3720 "runtime.in" addFunc(ve, run::gen292, primPair(), "^", formal(primPair(), "z", false, false), formal(primInt(), "y", false, false)); -#line 3728 "runtime.in" +#line 3725 "runtime.in" addFunc(ve, run::gen293, primInt(), "quotient", formal(primInt(), "x", false, false), formal(primInt(), "y", false, false)); -#line 3736 "runtime.in" +#line 3733 "runtime.in" addFunc(ve, run::gen294, primInt(), "abs", formal(primInt(), "x", false, false)); -#line 3741 "runtime.in" +#line 3738 "runtime.in" addFunc(ve, run::gen295, primInt(), "sgn", formal(primReal(), "x", false, false)); -#line 3746 "runtime.in" +#line 3743 "runtime.in" addFunc(ve, run::gen296, primInt(), "rand"); -#line 3751 "runtime.in" +#line 3748 "runtime.in" addFunc(ve, run::gen297, primVoid(), "srand", formal(primInt(), "seed", false, false)); -#line 3756 "runtime.in" +#line 3753 "runtime.in" addFunc(ve, run::gen298, primReal(), "unitrand"); -#line 3762 "runtime.in" +#line 3759 "runtime.in" addFunc(ve, run::gen299, primInt(), "ceil", formal(primReal(), "x", false, false)); -#line 3767 "runtime.in" +#line 3764 "runtime.in" addFunc(ve, run::gen300, primInt(), "floor", formal(primReal(), "x", false, false)); -#line 3772 "runtime.in" +#line 3769 "runtime.in" addFunc(ve, run::gen301, primInt(), "round", formal(primReal(), "x", false, false)); -#line 3778 "runtime.in" +#line 3775 "runtime.in" addFunc(ve, run::gen302, primInt(), "Ceil", formal(primReal(), "x", false, false)); -#line 3783 "runtime.in" +#line 3780 "runtime.in" addFunc(ve, run::gen303, primInt(), "Floor", formal(primReal(), "x", false, false)); -#line 3788 "runtime.in" +#line 3785 "runtime.in" addFunc(ve, run::gen304, primInt(), "Round", formal(primReal(), "x", false, false)); -#line 3793 "runtime.in" +#line 3790 "runtime.in" addFunc(ve, run::gen305, primReal(), "fmod", formal(primReal(), "x", false, false), formal(primReal(), "y", false, false)); -#line 3799 "runtime.in" +#line 3796 "runtime.in" addFunc(ve, run::gen306, primReal(), "atan2", formal(primReal(), "y", false, false), formal(primReal(), "x", false, false)); -#line 3804 "runtime.in" +#line 3801 "runtime.in" addFunc(ve, run::gen307, primReal(), "hypot", formal(primReal(), "x", false, false), formal(primReal(), "y", false, false)); -#line 3809 "runtime.in" +#line 3806 "runtime.in" addFunc(ve, run::gen308, primReal(), "remainder", formal(primReal(), "x", false, false), formal(primReal(), "y", false, false)); -#line 3814 "runtime.in" +#line 3811 "runtime.in" addFunc(ve, run::gen309, primReal(), "J", formal(primInt(), "n", false, false), formal(primReal(), "x", false, false)); -#line 3819 "runtime.in" +#line 3816 "runtime.in" addFunc(ve, run::gen310, primReal(), "Y", formal(primInt(), "n", false, false), formal(primReal(), "x", false, false)); -#line 3824 "runtime.in" +#line 3821 "runtime.in" addFunc(ve, run::gen311, primReal(), "erf", formal(primReal(), "x", false, false)); -#line 3829 "runtime.in" +#line 3826 "runtime.in" addFunc(ve, run::gen312, primReal(), "erfc", formal(primReal(), "x", false, false)); -#line 3834 "runtime.in" +#line 3831 "runtime.in" addFunc(ve, run::gen313, primInt(), "factorial", formal(primInt(), "n", false, false)); -#line 3839 "runtime.in" +#line 3836 "runtime.in" addFunc(ve, run::gen314, primInt(), "choose", formal(primInt(), "n", false, false), formal(primInt(), "k", false, false)); -#line 3850 "runtime.in" +#line 3847 "runtime.in" addFunc(ve, run::gen315, primReal(), "gamma", formal(primReal(), "x", false, false)); -#line 3860 "runtime.in" +#line 3857 "runtime.in" addFunc(ve, run::gen316, primPair(), "gamma", formal(primPair(), "z", false, true)); -#line 3866 "runtime.in" +#line 3863 "runtime.in" addFunc(ve, run::gen317, realArray(), "quadraticroots", formal(primReal(), "a", false, false), formal(primReal(), "b", false, false), formal(primReal(), "c", false, false)); -#line 3875 "runtime.in" +#line 3872 "runtime.in" addFunc(ve, run::gen318, pairArray(), "quadraticroots", formal(primPair(), "a", false, true), formal(primPair(), "b", false, true), formal(primPair(), "c", false, true)); -#line 3884 "runtime.in" +#line 3881 "runtime.in" addFunc(ve, run::gen319, realArray(), "cubicroots", formal(primReal(), "a", false, false), formal(primReal(), "b", false, false), formal(primReal(), "c", false, false), formal(primReal(), "d", false, false)); -#line 3894 "runtime.in" +#line 3891 "runtime.in" addFunc(ve, run::gen320, primBoolean(), "==", formal(primTransform(), "a", false, false), formal(primTransform(), "b", false, false)); -#line 3902 "runtime.in" +#line 3899 "runtime.in" addFunc(ve, run::gen321, primBoolean(), "!=", formal(primTransform(), "a", false, false), formal(primTransform(), "b", false, false)); -#line 3907 "runtime.in" +#line 3904 "runtime.in" addFunc(ve, run::gen322, primTransform(), "+", formal(primTransform(), "a", false, false), formal(primTransform(), "b", false, false)); -#line 3912 "runtime.in" +#line 3909 "runtime.in" addFunc(ve, run::gen323, primTransform(), "*", formal(primTransform(), "a", false, false), formal(primTransform(), "b", false, false)); -#line 3917 "runtime.in" +#line 3914 "runtime.in" addFunc(ve, run::gen324, primPair(), "*", formal(primTransform(), "t", false, false), formal(primPair(), "z", false, false)); -#line 3922 "runtime.in" +#line 3919 "runtime.in" addFunc(ve, run::gen325, primPath(), "*", formal(primTransform(), "t", false, false), formal(primPath(), "g", false, false)); -#line 3927 "runtime.in" +#line 3924 "runtime.in" addFunc(ve, run::gen326, primPen(), "*", formal(primTransform(), "t", false, false), formal(primPen(), "p", false, false)); -#line 3932 "runtime.in" +#line 3929 "runtime.in" addFunc(ve, run::gen327, primPicture(), "*", formal(primTransform(), "t", false, false), formal(primPicture(), "f", false, false)); -#line 3937 "runtime.in" +#line 3934 "runtime.in" addFunc(ve, run::gen328, primPicture(), "*", formal(realArray2(), "t", false, false), formal(primPicture(), "f", false, false)); -#line 3942 "runtime.in" +#line 3939 "runtime.in" addFunc(ve, run::gen329, primTransform(), "^", formal(primTransform(), "t", false, false), formal(primInt(), "n", false, false)); -#line 3989 "runtime.in" +#line 3986 "runtime.in" addFunc(ve, run::gen337, primTransform(), "shift", formal(primTransform(), "t", false, false)); -#line 3994 "runtime.in" +#line 3991 "runtime.in" addFunc(ve, run::gen338, primTransform(), "shiftless", formal(primTransform(), "t", false, false)); -#line 3999 "runtime.in" +#line 3996 "runtime.in" addFunc(ve, run::transformIdentity, primTransform(), "identity"); -#line 4004 "runtime.in" +#line 4001 "runtime.in" addFunc(ve, run::gen340, primTransform(), "inverse", formal(primTransform(), "t", false, false)); -#line 4009 "runtime.in" +#line 4006 "runtime.in" addFunc(ve, run::gen341, primTransform(), "shift", formal(primPair(), "z", false, false)); -#line 4014 "runtime.in" +#line 4011 "runtime.in" addFunc(ve, run::gen342, primTransform(), "shift", formal(primReal(), "x", false, false), formal(primReal(), "y", false, false)); -#line 4019 "runtime.in" +#line 4016 "runtime.in" addFunc(ve, run::gen343, primTransform(), "xscale", formal(primReal(), "x", false, false)); -#line 4024 "runtime.in" +#line 4021 "runtime.in" addFunc(ve, run::gen344, primTransform(), "yscale", formal(primReal(), "y", false, false)); -#line 4029 "runtime.in" +#line 4026 "runtime.in" addFunc(ve, run::gen345, primTransform(), "scale", formal(primReal(), "x", false, false)); -#line 4034 "runtime.in" +#line 4031 "runtime.in" addFunc(ve, run::gen346, primTransform(), "scale", formal(primReal(), "x", false, false), formal(primReal(), "y", false, false)); -#line 4039 "runtime.in" +#line 4036 "runtime.in" addFunc(ve, run::gen347, primTransform(), "slant", formal(primReal(), "s", false, false)); -#line 4044 "runtime.in" +#line 4041 "runtime.in" addFunc(ve, run::gen348, primTransform(), "rotate", formal(primReal(), "angle", false, false), formal(primPair(), "z", true, false)); -#line 4049 "runtime.in" +#line 4046 "runtime.in" addFunc(ve, run::gen349, primTransform(), "reflect", formal(primPair(), "a", false, false), formal(primPair(), "b", false, false)); -#line 4072 "runtime.in" +#line 4069 "runtime.in" addFunc(ve, run::pairXPart, primReal(), "xpart", formal(primPair(), "z", false, false)); -#line 4077 "runtime.in" +#line 4074 "runtime.in" addFunc(ve, run::pairYPart, primReal(), "ypart", formal(primPair(), "z", false, false)); -#line 4082 "runtime.in" +#line 4079 "runtime.in" addFunc(ve, run::gen355, primReal(), "length", formal(primPair(), "z", false, false)); -#line 4087 "runtime.in" +#line 4084 "runtime.in" addFunc(ve, run::gen356, primReal(), "abs", formal(primPair(), "z", false, false)); -#line 4092 "runtime.in" +#line 4089 "runtime.in" addFunc(ve, run::gen357, primPair(), "sqrt", formal(primPair(), "z", false, true)); -#line 4097 "runtime.in" +#line 4094 "runtime.in" addFunc(ve, run::gen358, primReal(), "angle", formal(primPair(), "z", false, false), formal(primBoolean(), "warn", true, false)); -#line 4104 "runtime.in" +#line 4101 "runtime.in" addFunc(ve, run::gen359, primReal(), "degrees", formal(primPair(), "z", false, false), formal(primBoolean(), "warn", true, false)); -#line 4111 "runtime.in" +#line 4108 "runtime.in" addFunc(ve, run::gen360, primReal(), "radians", formal(primReal(), "degrees", false, false)); -#line 4117 "runtime.in" +#line 4114 "runtime.in" addFunc(ve, run::gen361, primReal(), "degrees", formal(primReal(), "radians", false, false)); -#line 4123 "runtime.in" +#line 4120 "runtime.in" addFunc(ve, run::gen362, primReal(), "Degrees", formal(primReal(), "radians", false, false)); -#line 4129 "runtime.in" +#line 4126 "runtime.in" addFunc(ve, run::gen363, primReal(), "Sin", formal(primReal(), "deg", false, false)); -#line 4134 "runtime.in" +#line 4131 "runtime.in" addFunc(ve, run::gen364, primReal(), "Cos", formal(primReal(), "deg", false, false)); -#line 4139 "runtime.in" +#line 4136 "runtime.in" addFunc(ve, run::gen365, primReal(), "Tan", formal(primReal(), "deg", false, false)); -#line 4144 "runtime.in" +#line 4141 "runtime.in" addFunc(ve, run::gen366, primReal(), "aSin", formal(primReal(), "x", false, false)); -#line 4149 "runtime.in" +#line 4146 "runtime.in" addFunc(ve, run::gen367, primReal(), "aCos", formal(primReal(), "x", false, false)); -#line 4154 "runtime.in" +#line 4151 "runtime.in" addFunc(ve, run::gen368, primReal(), "aTan", formal(primReal(), "x", false, false)); -#line 4159 "runtime.in" +#line 4156 "runtime.in" addFunc(ve, run::gen369, primPair(), "unit", formal(primPair(), "z", false, false)); -#line 4164 "runtime.in" +#line 4161 "runtime.in" addFunc(ve, run::gen370, primPair(), "dir", formal(primReal(), "degrees", false, false)); -#line 4169 "runtime.in" +#line 4166 "runtime.in" addFunc(ve, run::gen371, primPair(), "dir", formal(primPair(), "z", false, true)); -#line 4174 "runtime.in" +#line 4171 "runtime.in" addFunc(ve, run::gen372, primPair(), "expi", formal(primReal(), "angle", false, false)); -#line 4179 "runtime.in" +#line 4176 "runtime.in" addFunc(ve, run::gen373, primPair(), "exp", formal(primPair(), "z", false, true)); -#line 4184 "runtime.in" +#line 4181 "runtime.in" addFunc(ve, run::gen374, primPair(), "log", formal(primPair(), "z", false, true)); -#line 4189 "runtime.in" +#line 4186 "runtime.in" addFunc(ve, run::gen375, primPair(), "sin", formal(primPair(), "z", false, true)); -#line 4194 "runtime.in" +#line 4191 "runtime.in" addFunc(ve, run::gen376, primPair(), "cos", formal(primPair(), "z", false, true)); -#line 4199 "runtime.in" +#line 4196 "runtime.in" addFunc(ve, run::gen377, primPair(), "conj", formal(primPair(), "z", false, false)); -#line 4204 "runtime.in" +#line 4201 "runtime.in" addFunc(ve, run::gen378, primPair(), "realmult", formal(primPair(), "z", false, false), formal(primPair(), "w", false, false)); -#line 4209 "runtime.in" +#line 4206 "runtime.in" addFunc(ve, run::gen379, primTriple(), "realmult", formal(primTriple(), "u", false, false), formal(primTriple(), "v", false, false)); -#line 4214 "runtime.in" +#line 4211 "runtime.in" addFunc(ve, run::gen380, primReal(), "dot", formal(primPair(), "z", false, true), formal(primPair(), "w", false, true)); -#line 4234 "runtime.in" +#line 4231 "runtime.in" addFunc(ve, run::tripleXPart, primReal(), "xpart", formal(primTriple(), "v", false, false)); -#line 4239 "runtime.in" +#line 4236 "runtime.in" addFunc(ve, run::tripleYPart, primReal(), "ypart", formal(primTriple(), "v", false, false)); -#line 4244 "runtime.in" +#line 4241 "runtime.in" addFunc(ve, run::tripleZPart, primReal(), "zpart", formal(primTriple(), "v", false, false)); -#line 4249 "runtime.in" +#line 4246 "runtime.in" addFunc(ve, run::gen386, primTriple(), "*", formal(primReal(), "x", false, false), formal(primTriple(), "v", false, false)); -#line 4254 "runtime.in" +#line 4251 "runtime.in" addFunc(ve, run::gen387, primTriple(), "*", formal(primTriple(), "v", false, false), formal(primReal(), "x", false, false)); -#line 4259 "runtime.in" +#line 4256 "runtime.in" addFunc(ve, run::gen388, primTriple(), "/", formal(primTriple(), "v", false, false), formal(primReal(), "x", false, false)); -#line 4264 "runtime.in" +#line 4261 "runtime.in" addFunc(ve, run::gen389, primReal(), "length", formal(primTriple(), "v", false, false)); -#line 4269 "runtime.in" +#line 4266 "runtime.in" addFunc(ve, run::gen390, primReal(), "abs", formal(primTriple(), "v", false, false)); -#line 4274 "runtime.in" +#line 4271 "runtime.in" addFunc(ve, run::gen391, primReal(), "polar", formal(primTriple(), "v", false, false), formal(primBoolean(), "warn", true, false)); -#line 4280 "runtime.in" +#line 4277 "runtime.in" addFunc(ve, run::gen392, primReal(), "azimuth", formal(primTriple(), "v", false, false), formal(primBoolean(), "warn", true, false)); -#line 4286 "runtime.in" +#line 4283 "runtime.in" addFunc(ve, run::gen393, primReal(), "colatitude", formal(primTriple(), "v", false, false), formal(primBoolean(), "warn", true, false)); -#line 4292 "runtime.in" +#line 4289 "runtime.in" addFunc(ve, run::gen394, primReal(), "latitude", formal(primTriple(), "v", false, false), formal(primBoolean(), "warn", true, false)); -#line 4298 "runtime.in" +#line 4295 "runtime.in" addFunc(ve, run::gen395, primReal(), "longitude", formal(primTriple(), "v", false, false), formal(primBoolean(), "warn", true, false)); -#line 4305 "runtime.in" +#line 4302 "runtime.in" addFunc(ve, run::gen396, primTriple(), "unit", formal(primTriple(), "v", false, false)); -#line 4310 "runtime.in" +#line 4307 "runtime.in" addFunc(ve, run::gen397, primReal(), "dot", formal(primTriple(), "u", false, false), formal(primTriple(), "v", false, false)); -#line 4315 "runtime.in" +#line 4312 "runtime.in" addFunc(ve, run::gen398, primTriple(), "cross", formal(primTriple(), "u", false, false), formal(primTriple(), "v", false, false)); -#line 4320 "runtime.in" +#line 4317 "runtime.in" addFunc(ve, run::gen399, primTriple(), "expi", formal(primReal(), "polar", false, false), formal(primReal(), "azimuth", false, false)); -#line 4325 "runtime.in" +#line 4322 "runtime.in" addFunc(ve, run::gen400, primTriple(), "dir", formal(primReal(), "colatitude", false, false), formal(primReal(), "longitude", false, false)); -#line 4330 "runtime.in" +#line 4327 "runtime.in" addFunc(ve, run::gen401, primVoid(), "atupdate", formal(voidFunction(), "f", false, false)); -#line 4338 "runtime.in" +#line 4335 "runtime.in" addFunc(ve, run::gen402, voidFunction(), "atupdate"); -#line 4343 "runtime.in" +#line 4340 "runtime.in" addFunc(ve, run::gen403, primVoid(), "atexit", formal(voidFunction(), "f", false, false)); -#line 4348 "runtime.in" +#line 4345 "runtime.in" addFunc(ve, run::gen404, voidFunction(), "atexit"); -#line 4353 "runtime.in" +#line 4350 "runtime.in" addFunc(ve, run::gen405, primVoid(), "atbreakpoint", formal(breakpointFunction(), "f", false, false)); -#line 4358 "runtime.in" +#line 4355 "runtime.in" addFunc(ve, run::gen406, primVoid(), "breakpoint", formal(primCode(), "s", true, false)); -#line 4363 "runtime.in" +#line 4360 "runtime.in" addFunc(ve, run::gen407, primString() , "locatefile", formal(primString() , "file", false, false)); -#line 4368 "runtime.in" +#line 4365 "runtime.in" addFunc(ve, run::gen408, primVoid(), "stop", formal(primString() , "file", false, false), formal(primInt(), "line", false, false), formal(primCode(), "s", true, false)); -#line 4376 "runtime.in" +#line 4373 "runtime.in" addFunc(ve, run::gen409, primVoid(), "breakpoints"); -#line 4382 "runtime.in" +#line 4379 "runtime.in" addFunc(ve, run::gen410, primVoid(), "clear", formal(primString() , "file", false, false), formal(primInt(), "line", false, false)); -#line 4388 "runtime.in" +#line 4385 "runtime.in" addFunc(ve, run::gen411, primVoid(), "clear"); -#line 4393 "runtime.in" +#line 4390 "runtime.in" addFunc(ve, run::gen412, primVoid(), "warn", formal(primString() , "s", false, false)); -#line 4398 "runtime.in" +#line 4395 "runtime.in" addFunc(ve, run::gen413, primVoid(), "nowarn", formal(primString() , "s", false, false)); -#line 4403 "runtime.in" +#line 4400 "runtime.in" addFunc(ve, run::gen414, primString() , "stripdirectory", formal(primString(), "s", false, false)); -#line 4409 "runtime.in" +#line 4406 "runtime.in" addFunc(ve, run::gen415, primString() , "stripfile", formal(primString(), "s", false, false)); -#line 4415 "runtime.in" +#line 4412 "runtime.in" addFunc(ve, run::gen416, primString() , "stripextension", formal(primString(), "s", false, false)); -#line 4421 "runtime.in" +#line 4418 "runtime.in" addFunc(ve, run::gen417, primInt(), "convert", formal(primString() , "args", true, false), formal(primString() , "file", true, false), formal(primString() , "format", true, false)); -#line 4440 "runtime.in" +#line 4437 "runtime.in" addFunc(ve, run::gen418, primInt(), "animate", formal(primString() , "args", true, false), formal(primString() , "file", true, false), formal(primString() , "format", true, false)); -#line 4457 "runtime.in" +#line 4454 "runtime.in" addFunc(ve, run::gen419, primInt(), "delete", formal(primString(), "s", false, false)); -#line 4467 "runtime.in" +#line 4464 "runtime.in" addFunc(ve, run::gen420, primInt(), "rename", formal(primString(), "from", false, false), formal(primString(), "to", false, false)); -#line 4766 "runtime.in" +#line 4763 "runtime.in" addFunc(ve, run::gen451, IntArray(), "complement", formal(IntArray(), "a", false, false), formal(primInt(), "n", false, false)); -#line 4798 "runtime.in" +#line 4795 "runtime.in" addFunc(ve, run::gen453, IntArray(), "sequence", formal(primInt(), "n", false, false)); -#line 4831 "runtime.in" +#line 4828 "runtime.in" addFunc(ve, run::gen456, primBoolean(), "all", formal(boolArray(), "a", false, false)); -#line 4840 "runtime.in" +#line 4837 "runtime.in" addFunc(ve, run::gen457, boolArray(), "!", formal(boolArray(), "a", false, false)); -#line 4849 "runtime.in" +#line 4846 "runtime.in" addFunc(ve, run::gen458, primInt(), "sum", formal(boolArray(), "a", false, false)); -#line 5012 "runtime.in" +#line 5009 "runtime.in" addFunc(ve, run::gen465, primInt(), "find", formal(boolArray(), "a", false, false), formal(primInt(), "n", true, false)); -#line 5057 "runtime.in" +#line 5054 "runtime.in" addFunc(ve, run::gen467, realArray2(), "identity", formal(primInt(), "n", false, false)); -#line 5080 "runtime.in" +#line 5077 "runtime.in" addFunc(ve, run::gen469, realArray2(), "inverse", formal(realArray2(), "a", false, false)); -#line 5172 "runtime.in" +#line 5169 "runtime.in" addFunc(ve, run::gen470, realArray(), "solve", formal(realArray2(), "a", false, false), formal(realArray(), "b", false, false), formal(primBoolean(), "warn", true, false)); -#line 5223 "runtime.in" +#line 5220 "runtime.in" addFunc(ve, run::gen471, realArray2(), "solve", formal(realArray2(), "a", false, false), formal(realArray2(), "b", false, false), formal(primBoolean(), "warn", true, false)); -#line 5287 "runtime.in" +#line 5284 "runtime.in" addFunc(ve, run::gen472, primReal(), "determinant", formal(realArray2(), "a", false, false)); -#line 5303 "runtime.in" +#line 5300 "runtime.in" addFunc(ve, run::gen473, realArray(), "*", formal(realArray2(), "a", false, false), formal(realArray(), "b", false, false)); -#line 5321 "runtime.in" +#line 5318 "runtime.in" addFunc(ve, run::gen474, realArray(), "*", formal(realArray(), "a", false, false), formal(realArray2(), "b", false, false)); -#line 5349 "runtime.in" +#line 5346 "runtime.in" addFunc(ve, run::gen475, realArray2(), "*", formal(realArray2(), "a", false, false), formal(realArray2(), "b", false, false)); -#line 5384 "runtime.in" +#line 5381 "runtime.in" addFunc(ve, run::gen476, primTriple(), "*", formal(realArray2(), "t", false, false), formal(primTriple(), "v", false, false)); -#line 5389 "runtime.in" +#line 5386 "runtime.in" addFunc(ve, run::gen477, primPair(), "project", formal(primTriple(), "v", false, false), formal(realArray2(), "t", false, false)); -#line 5414 "runtime.in" +#line 5411 "runtime.in" addFunc(ve, run::gen478, primReal(), "dot", formal(realArray(), "a", false, false), formal(realArray(), "b", false, false)); -#line 5424 "runtime.in" +#line 5421 "runtime.in" addFunc(ve, run::gen479, realArray(), "tridiagonal", formal(realArray(), "a", false, false), formal(realArray(), "b", false, false), formal(realArray(), "c", false, false), formal(realArray(), "f", false, false)); -#line 5528 "runtime.in" +#line 5525 "runtime.in" addFunc(ve, run::gen480, primReal(), "newton", formal(primInt(), "iterations", true, false), formal(realRealFunction(), "f", false, false), formal(realRealFunction(), "fprime", false, false), formal(primReal(), "x", false, false), formal(primBoolean(), "verbose", true, false)); -#line 5575 "runtime.in" +#line 5572 "runtime.in" addFunc(ve, run::gen481, primReal(), "newton", formal(primInt(), "iterations", true, false), formal(realRealFunction(), "f", false, false), formal(realRealFunction(), "fprime", false, false), formal(primReal(), "x1", false, false), formal(primReal(), "x2", false, false), formal(primBoolean(), "verbose", true, false)); -#line 5657 "runtime.in" +#line 5654 "runtime.in" addFunc(ve, run::gen482, primReal(), "simpson", formal(realRealFunction(), "f", false, false), formal(primReal(), "a", false, false), formal(primReal(), "b", false, false), formal(primReal(), "acc", true, false), formal(primReal(), "dxmax", true, false)); -#line 5699 "runtime.in" +#line 5696 "runtime.in" addFunc(ve, run::gen484, IntArray2(), "triangulate", formal(pairArray(), "z", false, false)); -#line 5734 "runtime.in" +#line 5731 "runtime.in" addFunc(ve, run::gen485, primBoolean(), "==", formal(primFile(), "a", false, false), formal(primFile(), "b", false, false)); -#line 5742 "runtime.in" +#line 5739 "runtime.in" addFunc(ve, run::gen486, primBoolean(), "!=", formal(primFile(), "a", false, false), formal(primFile(), "b", false, false)); -#line 5752 "runtime.in" +#line 5749 "runtime.in" addFunc(ve, run::gen488, primFile(), "input", formal(primString() , "name", false, false), formal(primBoolean(), "check", true, false), formal(primString() , "comment", true, false)); -#line 5760 "runtime.in" +#line 5757 "runtime.in" addFunc(ve, run::gen489, primFile(), "output", formal(primString() , "name", false, false), formal(primBoolean(), "update", true, false), formal(primString() , "comment", true, false)); -#line 5772 "runtime.in" +#line 5769 "runtime.in" addFunc(ve, run::gen490, primFile(), "xinput", formal(primString() , "name", false, false), formal(primBoolean(), "check", true, false)); -#line 5786 "runtime.in" +#line 5783 "runtime.in" addFunc(ve, run::gen491, primFile(), "xoutput", formal(primString() , "name", false, false), formal(primBoolean(), "update", true, false)); -#line 5804 "runtime.in" +#line 5801 "runtime.in" addFunc(ve, run::gen492, primFile(), "binput", formal(primString() , "name", false, false), formal(primBoolean(), "check", true, false)); -#line 5811 "runtime.in" +#line 5808 "runtime.in" addFunc(ve, run::gen493, primFile(), "boutput", formal(primString() , "name", false, false), formal(primBoolean(), "update", true, false)); -#line 5821 "runtime.in" +#line 5818 "runtime.in" addFunc(ve, run::gen494, primBoolean(), "eof", formal(primFile(), "f", false, false)); -#line 5826 "runtime.in" +#line 5823 "runtime.in" addFunc(ve, run::gen495, primBoolean(), "eol", formal(primFile(), "f", false, false)); -#line 5831 "runtime.in" +#line 5828 "runtime.in" addFunc(ve, run::gen496, primBoolean(), "error", formal(primFile(), "f", false, false)); -#line 5836 "runtime.in" +#line 5833 "runtime.in" addFunc(ve, run::gen497, primVoid(), "clear", formal(primFile(), "f", false, false)); -#line 5841 "runtime.in" +#line 5838 "runtime.in" addFunc(ve, run::gen498, primVoid(), "close", formal(primFile(), "f", false, false)); -#line 5846 "runtime.in" +#line 5843 "runtime.in" addFunc(ve, run::gen499, primInt(), "precision", formal(primFile(), "f", true, false), formal(primInt(), "digits", true, false)); -#line 5852 "runtime.in" +#line 5849 "runtime.in" addFunc(ve, run::gen500, primVoid(), "flush", formal(primFile(), "f", false, false)); -#line 5857 "runtime.in" +#line 5854 "runtime.in" addFunc(ve, run::gen501, primString() , "getc", formal(primFile(), "f", false, false)); -#line 5866 "runtime.in" +#line 5863 "runtime.in" addFunc(ve, run::gen502, primInt(), "tell", formal(primFile(), "f", false, false)); -#line 5871 "runtime.in" +#line 5868 "runtime.in" addFunc(ve, run::gen503, primVoid(), "seek", formal(primFile(), "f", false, false), formal(primInt(), "pos", false, false)); -#line 5876 "runtime.in" +#line 5873 "runtime.in" addFunc(ve, run::gen504, primVoid(), "seekeof", formal(primFile(), "f", false, false)); -#line 5881 "runtime.in" +#line 5878 "runtime.in" addFunc(ve, run::gen505, primFile(), "dimension", formal(primFile(), "f", false, false), formal(primInt(), "nx", false, false)); -#line 5888 "runtime.in" +#line 5885 "runtime.in" addFunc(ve, run::gen506, primFile(), "dimension", formal(primFile(), "f", false, false), formal(primInt(), "nx", false, false), formal(primInt(), "ny", false, false)); -#line 5894 "runtime.in" +#line 5891 "runtime.in" addFunc(ve, run::gen507, primFile(), "dimension", formal(primFile(), "f", false, false), formal(primInt(), "nx", false, false), formal(primInt(), "ny", false, false), formal(primInt(), "nz", false, false)); -#line 5900 "runtime.in" +#line 5897 "runtime.in" addFunc(ve, run::gen508, primFile(), "csv", formal(primFile(), "f", false, false), formal(primBoolean(), "b", true, false)); -#line 5907 "runtime.in" +#line 5904 "runtime.in" addFunc(ve, run::gen509, primFile(), "word", formal(primFile(), "f", false, false), formal(primBoolean(), "b", true, false)); -#line 5914 "runtime.in" +#line 5911 "runtime.in" addFunc(ve, run::gen510, primFile(), "line", formal(primFile(), "f", false, false), formal(primBoolean(), "b", true, false)); -#line 5921 "runtime.in" +#line 5918 "runtime.in" addFunc(ve, run::gen511, primFile(), "signed", formal(primFile(), "f", false, false), formal(primBoolean(), "b", true, false)); -#line 5977 "runtime.in" +#line 5974 "runtime.in" addFunc(ve, run::gen521, primFile(), "read1", formal(primFile(), "f", false, false)); -#line 5984 "runtime.in" +#line 5981 "runtime.in" addFunc(ve, run::gen522, primFile(), "read2", formal(primFile(), "f", false, false)); -#line 5991 "runtime.in" +#line 5988 "runtime.in" addFunc(ve, run::gen523, primFile(), "read3", formal(primFile(), "f", false, false)); -#line 5998 "runtime.in" +#line 5995 "runtime.in" addFunc(ve, run::gen524, stringArray(), "history", formal(primString() , "name", false, false), formal(primInt(), "n", true, false)); -#line 6031 "runtime.in" +#line 6028 "runtime.in" addFunc(ve, run::gen525, stringArray(), "history", formal(primInt(), "n", true, false)); -#line 6042 "runtime.in" +#line 6039 "runtime.in" addFunc(ve, run::gen526, primString() , "readline", formal(primString() , "prompt", true, false), formal(primString() , "name", true, false), formal(primBoolean(), "tabcompletion", true, false)); -#line 6086 "runtime.in" +#line 6083 "runtime.in" addFunc(ve, run::gen527, primVoid(), "saveline", formal(primString() , "name", false, false), formal(primString() , "value", false, false), formal(primBoolean(), "store", true, false)); -#line 6116 "runtime.in" +#line 6113 "runtime.in" addFunc(ve, run::gen528, primVoid(), "generate_random_backtrace"); -#line 6125 "runtime.in" +#line 6122 "runtime.in" addFunc(ve, run::gen529, primVoid(), "print_random_addresses", formal(primInt(), "n", true, false)); } diff --git a/Build/source/utils/asymptote/runtime.in b/Build/source/utils/asymptote/runtime.in index c0138a2f57c..31a752b121c 100644 --- a/Build/source/utils/asymptote/runtime.in +++ b/Build/source/utils/asymptote/runtime.in @@ -942,9 +942,6 @@ void unused(void *) { } -static const double twelvepercent=0.12; -static const double tenpercent=0.1; - pair readpair(stringstream& s, double hscale=1.0, double vscale=1.0) { double x,y; @@ -983,8 +980,9 @@ void showpath(std::ofstream& ps) } array *readpath(const string& psname, bool keep, - double hscale=1.0, double vscale=1.0) + double hscale=1.0, double vsign=1.0) { + double vscale=vsign*hscale; array *P=new array(0); mem::vector<string> cmd; cmd.push_back(getSetting<string>("gs")); @@ -1401,8 +1399,7 @@ patharray *_texpath(string *s, pen p=CURRENTPEN) unlink(auxname(prefix,"tui").c_str()); } } - return readpath(psname,keep,twelvepercent, - pdf ? twelvepercent : -twelvepercent); + return pdf ? readpath(psname,keep,0.1) : readpath(psname,keep,0.12,-1.0); } patharray *textpath(string *s, pen p=CURRENTPEN) @@ -1473,7 +1470,7 @@ patharray *textpath(string *s, pen p=CURRENTPEN) bool keep=getSetting<bool>("keep"); if(!keep) // Delete temporary files. unlink(textname.c_str()); - return readpath(psname,keep,tenpercent,tenpercent); + return readpath(psname,keep,0.1); } patharray *_strokepath(path g, pen p=CURRENTPEN) diff --git a/Master/bin/i386-cygwin/asy.exe b/Master/bin/i386-cygwin/asy.exe Binary files differindex 4eea7d4b8bc..d4c45f1dfc0 100755 --- a/Master/bin/i386-cygwin/asy.exe +++ b/Master/bin/i386-cygwin/asy.exe diff --git a/Master/texmf/asymptote/GUI/xasyVersion.py b/Master/texmf/asymptote/GUI/xasyVersion.py index c9fe270f7f7..a1ab6b203c5 100755 --- a/Master/texmf/asymptote/GUI/xasyVersion.py +++ b/Master/texmf/asymptote/GUI/xasyVersion.py @@ -1,2 +1,2 @@ #!/usr/bin/env python -xasyVersion = "1.81" +xasyVersion = "1.82" diff --git a/Master/texmf/asymptote/labelpath3.asy b/Master/texmf/asymptote/labelpath3.asy index b8a946a07ae..bf2e6d4c084 100644 --- a/Master/texmf/asymptote/labelpath3.asy +++ b/Master/texmf/asymptote/labelpath3.asy @@ -21,7 +21,7 @@ triple[] firstframe(path3 p, triple optional=O) } // Modification of the bishop frame construction contained in -// space_tube.asy(from Philippe Ivaldi's modules). +// space_tube.asy (from Philippe Ivaldi's modules). // For noncyclic path3s only triple[] nextframe(path3 p, real reltimestart, triple[] start, real reltimeend, int subdiv=20) diff --git a/Master/texmf/asymptote/three.asy b/Master/texmf/asymptote/three.asy index 2befc77a9c8..39075193073 100644 --- a/Master/texmf/asymptote/three.asy +++ b/Master/texmf/asymptote/three.asy @@ -1745,7 +1745,7 @@ transform3 align(triple u) } // return a rotation that maps X,Y to the projection plane. -transform3 transform3(projection P) +transform3 transform3(projection P=currentprojection) { triple v=unit(P.oblique ? P.camera : P.vector()); triple u=unit(perp(P.up,v)); @@ -2015,7 +2015,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,p.granularity); + tube T=tube(g,width,p.granularity); int L=length(g); if(L >= 0) { if(!cyclic(g)) { @@ -2034,13 +2034,14 @@ draw=new void(frame f, path3 g, material p=currentpen, cap=scale3r*unitcylinder; cap.append(scale3r*shift(Z)*unitdisk); } - s.append(shift(point(g,0))*align(-dir0)*cap); - s.append(shift(point(g,L))*align(dirL)*cap); + T.s.append(shift(point(g,0))*align(-dir0)*cap); + T.s.append(shift(point(g,L))*align(dirL)*cap); } - if(opacity(q) == 1) _draw(f,g,q); + if(opacity(q) == 1) + _draw(f,T.center,q); } - for(int i=0; i < s.s.length; ++i) - draw3D(f,s.s[i],p,light); + for(int i=0; i < T.s.s.length; ++i) + draw3D(f,T.s.s[i],p,light); } else _draw(f,g,q); } else _draw(f,g,q); } diff --git a/Master/texmf/asymptote/three_arrows.asy b/Master/texmf/asymptote/three_arrows.asy index 418065e5e1e..841c4f731f4 100644 --- a/Master/texmf/asymptote/three_arrows.asy +++ b/Master/texmf/asymptote/three_arrows.asy @@ -82,33 +82,41 @@ void render(path3 s, real granularity=tubegranularity, void f(path3, real)) Split(point(s,0),postcontrol(s,0),precontrol(s,1),point(s,1)); } -surface tube(path3 g, real width, real granularity=tubegranularity) +struct tube { - surface tube; - real r=0.5*width; + surface s; + path3 center; - transform3 t=scale3(r); + void operator init(path3 g, real width, real granularity=tubegranularity) { + real r=0.5*width; - int n=length(g); - for(int i=0; i < n; ++i) { - real S=straightness(g,i); - if(S < sqrtEpsilon*r) { - triple v=point(g,i); - 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),granularity,new void(path3 q, real) { - real L=arclength(q); - surface segment=scale(r,r,L)*unitcylinder; - bend(segment,q,L); - tube.s.append(segment.s); - }); - } + transform3 t=scale3(r); - if((cyclic(g) || i > 0) && abs(dir(g,i,1)-dir(g,i,-1)) > sqrtEpsilon) - tube.append(shift(point(g,i))*t*align(dir(g,i,-1))*unithemisphere); + int n=length(g); + for(int i=0; i < n; ++i) { + path3 gi=subpath(g,i,i+1); + real S=straightness(g,i); + if(S < sqrtEpsilon*r) { + triple v=point(g,i); + triple u=point(g,i+1)-v; + s.append(shift(v)*align(unit(u))*scale(r,r,abs(u))*unitcylinder); + center=center&gi; + } else { + render(gi,granularity,new void(path3 q, real) { + real L=arclength(q); + surface segment=scale(r,r,L)*unitcylinder; + bend(segment,q,L); + s.s.append(segment.s); + triple a=L*Z/3; + center=center&bend(O,q,L)..controls bend(a,q,L) and bend(2a,q,L).. + bend(3a,q,L); + }); + } + + if((cyclic(g) || i > 0) && abs(dir(g,i,1)-dir(g,i,-1)) > sqrtEpsilon) + s.append(shift(point(g,i))*t*align(dir(g,i,-1))*unithemisphere); + } } - return tube; } // Refine a noncyclic path3 g so that it approaches its endpoint in @@ -168,7 +176,7 @@ struct arrowhead3 } if(draw) for(path3 g : H) - s.append(tube(g,width)); + s.append(tube(g,width).s); return shift(v)*s; } diff --git a/Master/texmf/asymptote/tube.asy b/Master/texmf/asymptote/tube.asy index f62d3897adf..1f8ef950251 100644 --- a/Master/texmf/asymptote/tube.asy +++ b/Master/texmf/asymptote/tube.asy @@ -15,9 +15,9 @@ path3 roundedpath(path3 A, real r) guide3 rounded; triple before, after, indir, outdir; int len=length(A); - bool guideclosed=cyclic(A); + bool cyclic=cyclic(A); if(len < 2) {return A;}; - if(guideclosed) {rounded=point(point(A,0)--point(A,1),r);} + if(cyclic) {rounded=point(point(A,0)--point(A,1),r);} else {rounded=point(A,0);} for(int i=1; i < len; i=i+1) { before=point(point(A,i)--point(A,i-1),r); @@ -26,7 +26,7 @@ path3 roundedpath(path3 A, real r) outdir=dir(point(A,i)--point(A,i+1),1); rounded=rounded--before{indir}..{outdir}after; } - if(guideclosed) { + if(cyclic) { before=point(point(A,0)--point(A,len-1),r); indir=dir(point(A,len-1)--point(A,0),1); outdir=dir(point(A,0)--point(A,1),1); @@ -205,6 +205,7 @@ surface tube(path3 g, coloredpath section, pair M=max(section.p), m=min(section.p); real[] t=sample(g,max(M.x-m.x,M.y-m.y)/max(realEpsilon,abs(corner)), min(abs(relstep),1)); - t.cyclic(cyclic(g)); - return surface(rmf(g,t),section,T,cyclic(g)); + bool cyclic=cyclic(g); + t.cyclic(cyclic); + return surface(rmf(g,t),section,T,cyclic); } diff --git a/Master/texmf/asymptote/version.asy b/Master/texmf/asymptote/version.asy index 79570c6e65a..713dc924f1c 100644 --- a/Master/texmf/asymptote/version.asy +++ b/Master/texmf/asymptote/version.asy @@ -1 +1 @@ -string VERSION="1.81"; +string VERSION="1.82"; diff --git a/Master/texmf/doc/info/asy-faq.info b/Master/texmf/doc/info/asy-faq.info index b39627517ff..08d26f6dc61 100644 --- a/Master/texmf/doc/info/asy-faq.info +++ b/Master/texmf/doc/info/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 - 13 Jul 2009 + 19 Jul 2009 This is the list of Frequently Asked Questions about Asymptote (asy). diff --git a/Master/tlpkg/asymptote/asy.exe b/Master/tlpkg/asymptote/asy.exe Binary files differindex 4eea7d4b8bc..d4c45f1dfc0 100755 --- a/Master/tlpkg/asymptote/asy.exe +++ b/Master/tlpkg/asymptote/asy.exe |