summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-05-16 18:38:18 +0000
committerKarl Berry <karl@freefriends.org>2010-05-16 18:38:18 +0000
commit9b042a93e8f489c694af2e2e121e5aedd7671d8a (patch)
tree4b4e6b79f46eb1faf6b5ca4b5318ae907daf38bc
parent165b3785f8aa3ff267097b479870e9a39ba5c14b (diff)
asymptote 1.94
git-svn-id: svn://tug.org/texlive/trunk@18288 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/utils/README8
-rwxr-xr-xMaster/bin/i386-cygwin/asy.exebin5684224 -> 5896718 bytes
-rw-r--r--Master/texmf/asymptote/CAD.asy10
-rwxr-xr-xMaster/texmf/asymptote/GUI/xasy2asy.py4
-rwxr-xr-xMaster/texmf/asymptote/GUI/xasyMainWin.py9
-rwxr-xr-xMaster/texmf/asymptote/GUI/xasyVersion.py2
-rw-r--r--Master/texmf/asymptote/animation.asy3
-rw-r--r--Master/texmf/asymptote/asy-keywords.el8
-rw-r--r--Master/texmf/asymptote/contour.asy1705
-rw-r--r--Master/texmf/asymptote/contour3.asy2
-rw-r--r--Master/texmf/asymptote/embed.asy3
-rw-r--r--Master/texmf/asymptote/external.asy7
-rw-r--r--Master/texmf/asymptote/flowchart.asy202
-rw-r--r--Master/texmf/asymptote/geometry.asy13
-rw-r--r--Master/texmf/asymptote/graph.asy73
-rw-r--r--Master/texmf/asymptote/graph3.asy30
-rw-r--r--Master/texmf/asymptote/graph_splinetype.asy13
-rw-r--r--Master/texmf/asymptote/math.asy107
-rw-r--r--Master/texmf/asymptote/ode.asy73
-rw-r--r--Master/texmf/asymptote/palette.asy8
-rw-r--r--Master/texmf/asymptote/plain.asy3
-rw-r--r--Master/texmf/asymptote/plain_Label.asy17
-rw-r--r--Master/texmf/asymptote/plain_arcs.asy5
-rw-r--r--Master/texmf/asymptote/plain_arrows.asy2
-rw-r--r--Master/texmf/asymptote/plain_boxes.asy7
-rw-r--r--Master/texmf/asymptote/plain_constants.asy4
-rw-r--r--Master/texmf/asymptote/plain_filldraw.asy14
-rw-r--r--Master/texmf/asymptote/plain_paths.asy50
-rw-r--r--Master/texmf/asymptote/plain_pens.asy17
-rw-r--r--Master/texmf/asymptote/plain_picture.asy112
-rw-r--r--Master/texmf/asymptote/plain_shipout.asy5
-rw-r--r--Master/texmf/asymptote/plain_strings.asy43
-rw-r--r--Master/texmf/asymptote/slide.asy8
-rw-r--r--Master/texmf/asymptote/solids.asy2
-rw-r--r--Master/texmf/asymptote/three.asy119
-rw-r--r--Master/texmf/asymptote/three_arrows.asy21
-rw-r--r--Master/texmf/asymptote/three_surface.asy110
-rw-r--r--Master/texmf/asymptote/version.asy2
-rw-r--r--Master/texmf/doc/asymptote/CAD.pdfbin67399 -> 67565 bytes
-rw-r--r--Master/texmf/doc/asymptote/asymptote.pdfbin1572915 -> 1690023 bytes
-rw-r--r--Master/texmf/doc/asymptote/examples/1overx.asy17
-rw-r--r--Master/texmf/doc/asymptote/examples/Klein.asy2
-rw-r--r--Master/texmf/doc/asymptote/examples/NURBScurve.asy33
-rw-r--r--Master/texmf/doc/asymptote/examples/NURBSsphere.asy32
-rw-r--r--Master/texmf/doc/asymptote/examples/NURBSsurface.asy4
-rw-r--r--Master/texmf/doc/asymptote/examples/SierpinskiGasket.asy31
-rw-r--r--Master/texmf/doc/asymptote/examples/SierpinskiSponge.asy42
-rw-r--r--Master/texmf/doc/asymptote/examples/alignbox.asy2
-rw-r--r--Master/texmf/doc/asymptote/examples/animations/inlinemovie.tex4
-rw-r--r--Master/texmf/doc/asymptote/examples/animations/inlinemovie3.tex6
-rw-r--r--Master/texmf/doc/asymptote/examples/clockarray.asy39
-rw-r--r--Master/texmf/doc/asymptote/examples/controlsystem.asy26
-rw-r--r--Master/texmf/doc/asymptote/examples/cos3.asy25
-rw-r--r--Master/texmf/doc/asymptote/examples/cyclohexane.asy117
-rw-r--r--Master/texmf/doc/asymptote/examples/exp3.asy25
-rw-r--r--Master/texmf/doc/asymptote/examples/fequlogo.asy2
-rw-r--r--Master/texmf/doc/asymptote/examples/filesurface.asy15
-rw-r--r--Master/texmf/doc/asymptote/examples/fillcontour.asy2
-rw-r--r--Master/texmf/doc/asymptote/examples/flowchartdemo.asy17
-rw-r--r--Master/texmf/doc/asymptote/examples/gamma3.asy4
-rw-r--r--Master/texmf/doc/asymptote/examples/image.asy1
-rw-r--r--Master/texmf/doc/asymptote/examples/imagecontour.asy2
-rw-r--r--Master/texmf/doc/asymptote/examples/intro.asy7
-rw-r--r--Master/texmf/doc/asymptote/examples/irregularcontour.asy8
-rw-r--r--Master/texmf/doc/asymptote/examples/label3.asy4
-rw-r--r--Master/texmf/doc/asymptote/examples/labelbox.asy6
-rw-r--r--Master/texmf/doc/asymptote/examples/logo3.asy36
-rw-r--r--Master/texmf/doc/asymptote/examples/odetest.asy19
-rw-r--r--Master/texmf/doc/asymptote/examples/orthocenter.asy4
-rw-r--r--Master/texmf/doc/asymptote/examples/polardatagraph.asy17
-rw-r--r--Master/texmf/doc/asymptote/examples/poster.asy3
-rw-r--r--Master/texmf/doc/asymptote/examples/ring.asy2
-rw-r--r--Master/texmf/doc/asymptote/examples/sin3.asy25
-rw-r--r--Master/texmf/doc/asymptote/examples/slidedemo.asy2
-rw-r--r--Master/texmf/doc/asymptote/examples/strokepath.asy2
-rw-r--r--Master/texmf/doc/asymptote/examples/tensor.asy1
-rw-r--r--Master/texmf/doc/asymptote/examples/transparency.asy3
-rw-r--r--Master/texmf/doc/asymptote/examples/triceratops.asy2
-rw-r--r--Master/texmf/doc/asymptote/examples/venn3.asy50
-rw-r--r--Master/texmf/doc/asymptote/examples/washer.asy13
-rw-r--r--Master/texmf/doc/asymptote/examples/worksheet.asy5
-rw-r--r--Master/texmf/doc/asymptote/examples/xsin1x.asy8
-rw-r--r--Master/texmf/doc/info/asy-faq.info2
-rw-r--r--Master/texmf/doc/info/asymptote.info1574
-rw-r--r--Master/texmf/doc/man/man1/asy.16
-rw-r--r--Master/texmf/doc/man/man1/asy.man1.pdfbin11362 -> 11358 bytes
-rw-r--r--Master/texmf/tex/latex/asymptote/asymptote.sty30
-rwxr-xr-xMaster/tlpkg/asymptote/asy.exebin5684224 -> 5896718 bytes
88 files changed, 3430 insertions, 1668 deletions
diff --git a/Build/source/utils/README b/Build/source/utils/README
index 9e59a837ee1..1d3c0a38314 100644
--- a/Build/source/utils/README
+++ b/Build/source/utils/README
@@ -42,6 +42,14 @@ xpdfopen 0.80 - checked 5may10
http://mirror.ctan.org/support/xpdfopen.zip
+xindy 2.4 - checked 13may10
+ (with adaptations for TL)
+ http://www.ctan.org/indexing/xindy/
+
+After building clisp as described below, run the TL
+ Build --enable-xindy CLISP=$clisp_builddir/clisp
+to include xindy in the build. It is disabled by default.
+
Do NOT use nohup when building clisp; this may cause weird build
problems. Regular redirections of stdout/stderr seem ok.
diff --git a/Master/bin/i386-cygwin/asy.exe b/Master/bin/i386-cygwin/asy.exe
index a8b10612361..d68dd6695fc 100755
--- a/Master/bin/i386-cygwin/asy.exe
+++ b/Master/bin/i386-cygwin/asy.exe
Binary files differ
diff --git a/Master/texmf/asymptote/CAD.asy b/Master/texmf/asymptote/CAD.asy
index 7c333318f5c..b65e6478838 100644
--- a/Master/texmf/asymptote/CAD.asy
+++ b/Master/texmf/asymptote/CAD.asy
@@ -106,12 +106,12 @@ struct sCAD
// E
cad.pE =
cad.pSurfaceTreatmentAllowed =
- pFullWidth + linetype("10 2.5");
+ pFullWidth + linetype(new real[] {10,2.5});
// F
cad.pF =
cad.pInvisibleEdge =
cad.pInvisibleContour =
- pHalfWidth + linetype("20 5");
+ pHalfWidth + linetype(new real[] {20,5});
// G
cad.pG =
cad.pMiddleLine =
@@ -120,7 +120,7 @@ struct sCAD
cad.pCircularHole =
cad.pDivisionPlane =
cad.pTransferLine =
- pHalfWidth + linetype("40 5 5 5");
+ pHalfWidth + linetype(new real[] {40,5,5,5});
// H
// see J
// I
@@ -129,7 +129,7 @@ struct sCAD
cad.pJ =
cad.pCuttingPlane =
cad.pSurfaceTreatmentRequested =
- pFullWidth + linetype("20 2.5 2.5 2.5");
+ pFullWidth + linetype(new real[] {20,2.5,2.5,2.5});
// K
cad.pK =
cad.pContourBeforeDeformation =
@@ -137,7 +137,7 @@ struct sCAD
cad.pEndShapeRawMaterial =
cad.pContourEligibleType =
cad.pPartInFrontOfCuttingPlane =
- pHalfWidth + linetype("40 5 5 5 5 5");
+ pHalfWidth + linetype(new real[] {40,5,5,5,5,5});
return cad;
} // end of Create
diff --git a/Master/texmf/asymptote/GUI/xasy2asy.py b/Master/texmf/asymptote/GUI/xasy2asy.py
index 99a747cccda..a86a1e732d1 100755
--- a/Master/texmf/asymptote/GUI/xasy2asy.py
+++ b/Master/texmf/asymptote/GUI/xasy2asy.py
@@ -54,8 +54,8 @@ def startQuickAsy():
AsyTempDir=mkdtemp(prefix="asy_", dir="./")
else:
AsyTempDir=mkdtemp(prefix="asy_")+os.sep
- quickAsy = Popen([xasyOptions.options['asyPath']]+
- split("-noV -multiline -interactive -o"+AsyTempDir),
+ quickAsy = Popen([xasyOptions.options['asyPath'],"-noV","-multiline",
+ "-interactive","-o"+AsyTempDir],
stdin=PIPE,stdout=PIPE,stderr=STDOUT)
if quickAsy.returncode != None:
quickAsyFailed = True
diff --git a/Master/texmf/asymptote/GUI/xasyMainWin.py b/Master/texmf/asymptote/GUI/xasyMainWin.py
index 0a1ddc63e36..95dd4fb7cbc 100755
--- a/Master/texmf/asymptote/GUI/xasyMainWin.py
+++ b/Master/texmf/asymptote/GUI/xasyMainWin.py
@@ -144,6 +144,7 @@ class xasyMainWin:
self.exportMenu.add_command(label="PDF...",command=self.exportPDF,underline=0)
self.exportMenu.add_command(label="GIF...",command=self.exportGIF,underline=0)
self.exportMenu.add_command(label="PNG...",command=self.exportPNG,underline=1)
+ self.exportMenu.add_command(label="SVG...",command=self.exportSVG,underline=0)
self.fileMenu.add_cascade(label="Export",menu=self.exportMenu,underline=1)
self.fileMenu.add_separator()
@@ -720,6 +721,9 @@ class xasyMainWin:
def exportPNG(self):
self.exportFile(self.filename,"png")
+ def exportSVG(self):
+ self.exportFile(self.filename,"svg")
+
def exportFile(self,inFile, outFormat):
if(not self.testOrAcquireLock()):
return
@@ -743,9 +747,8 @@ class xasyMainWin:
return
fullname = os.path.abspath(outfilename)
outName = os.path.basename(outfilename)
- dirname = os.path.dirname(fullname)
- command = xasyOptions.options['asyPath']+" -f %s -o %s %s"%(outFormat,fullname,inFile)
- saver = subprocess.Popen(split(command),stdin=PIPE,stdout=PIPE,stderr=PIPE)
+ command=[xasyOptions.options['asyPath'],"-f"+outFormat,"-o"+fullname,inFile]
+ saver = subprocess.Popen(command,stdin=PIPE,stdout=PIPE,stderr=PIPE)
saver.wait()
if saver.returncode != 0:
tkMessageBox.showerror("Export Error","Export Error:\n"+saver.stdout.read()+saver.stderr.read())
diff --git a/Master/texmf/asymptote/GUI/xasyVersion.py b/Master/texmf/asymptote/GUI/xasyVersion.py
index c1a6f3f54eb..17f9f0aadf1 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.88"
+xasyVersion = "1.94"
diff --git a/Master/texmf/asymptote/animation.asy b/Master/texmf/asymptote/animation.asy
index 27f7171a639..582b32bced4 100644
--- a/Master/texmf/asymptote/animation.asy
+++ b/Master/texmf/asymptote/animation.asy
@@ -33,8 +33,7 @@ struct animation {
// been generated.
void operator init(string prefix="", bool global=true) {
- prefix=replace((prefix == "") ? outprefix() : stripdirectory(prefix),
- " ","_");
+ prefix=replace(stripdirectory(outprefix(prefix))," ","_");
this.prefix=prefix;
this.global=global;
}
diff --git a/Master/texmf/asymptote/asy-keywords.el b/Master/texmf/asymptote/asy-keywords.el
index d3704119f9b..d0e2246eaad 100644
--- a/Master/texmf/asymptote/asy-keywords.el
+++ b/Master/texmf/asymptote/asy-keywords.el
@@ -2,16 +2,16 @@
;; This file is automatically generated by asy-list.pl.
;; Changes will be overwritten.
;;
-(defvar asy-keywords-version "1.88")
+(defvar asy-keywords-version "1.94")
(defvar asy-keyword-name '(
and controls tension atleast curl if else while for do return break continue struct typedef new access import unravel from include quote static public private restricted this explicit true false null cycle newframe operator ))
(defvar asy-type-name '(
-Braid FitResult Label Legend TreeNode abscissa arc arrowhead binarytree binarytreeNode block bool bool3 bounds bqe circle conic coord coordsys cputime ellipse file filltype frame grid3 guide horner hsv hyperbola indexedTransform int inversion key light line linefit marginT marker mass object pair parabola path path3 pen picture point position projection real revolution scaleT scientific segment side slice splitface string surface tensionSpecifier ticklocate ticksgridT tickvalues transform transformation tree triangle trilinear triple vector vertex void ))
+Braid FitResult Label Legend Segment Solution TreeNode abscissa arc arrowhead binarytree binarytreeNode block bool bool3 bounds bqe circle conic coord coordsys cputime ellipse file filltype frame grid3 guide horner hsv hyperbola indexedTransform int inversion key light line linefit marginT marker mass object pair parabola path path3 pen picture point position projection real revolution scaleT scientific segment side slice solution splitface string surface tensionSpecifier ticklocate ticksgridT tickvalues transform transformation tree triangle trilinear triple vector vertex void ))
(defvar asy-function-name '(
-AND Arc ArcArrow ArcArrows Arrow Arrows Automatic AvantGarde BBox BWRainbow BWRainbow2 Bar Bars BeginArcArrow BeginArrow BeginBar BeginDotMargin BeginMargin BeginPenMargin Blank Bookman Bottom BottomTop Bounds Break Broken BrokenLog Ceil Circle CircleBarIntervalMarker Cos Courier CrossIntervalMarker DefaultFormat DefaultLogFormat Degrees Dir DotMargin DotMargins Dotted Draw Drawline Embed EndArcArrow EndArrow EndBar EndDotMargin EndMargin EndPenMargin Fill FillDraw Floor Format Full Gaussian Gaussrand Gaussrandpair Gradient Grayscale Helvetica Hermite HookHead InOutTicks InTicks J Label Landscape Left LeftRight LeftTicks Legend Linear Link Log LogFormat Margin Margins Mark MidArcArrow MidArrow NOT NewCenturySchoolBook NoBox NoMargin NoModifier NoTicks NoTicks3 NoZero NoZeroFormat None OR OmitFormat OmitTick OutTicks Ox Oy Palatino PaletteTicks Pen PenMargin PenMargins Pentype Portrait RadialShade Rainbow Range Relative Right RightTicks Rotate Round SQR Scale ScaleX ScaleY ScaleZ Seascape Shift Sin Slant Spline StickIntervalMarker Straight Symbol Tan TeXify Ticks Ticks3 TildeIntervalMarker TimesRoman Top TrueMargin UnFill UpsideDown Wheel X XEquals XOR XY XYEquals XYZero XYgrid XZEquals XZZero XZero XZgrid Y YEquals YXgrid YZ YZEquals YZZero YZero YZgrid Z ZX ZXgrid ZYgrid ZapfChancery ZapfDingbats _cputime _draw _eval _image _labelpath _projection _strokepath _texpath aCos aSin aTan abort abs accel acos acosh acot acsc add addArrow addMargins addSaveFunction addnode addnodes addpenarc addpenline addseg adjust alias align all altitude angabscissa angle angpoint animate annotate anticomplementary antipedal apply approximate arc arcarrowsize arccircle arcdir arcfromcenter arcfromfocus arclength arcnodesnumber arcpoint arcsubtended arcsubtendedcenter arctime arctopath array arrow arrow2 arrowbase arrowbasepoints arrowsize asec asin asinh ask assert asy asycode asydir asyfigure asyfilecode asyinclude asywrite atan atan2 atanh atbreakpoint atexit atime attach attract atupdate autoformat autoscale autoscale3 axes axes3 axialshade axis axiscoverage azimuth babel background bangles bar barmarksize barsize basealign baseline bbox beep begin beginclip begingroup beginpoint between bevel bezier bezierP bezierPP bezierPPP bezulate bibliography bibliographystyle binarytree binarytreeNode binomial binput bins bisector bisectorpoint blend boutput box bqe breakpoint breakpoints brick buildRestoreDefaults buildRestoreThunk buildcycle bulletcolor canonical canonicalcartesiansystem cartesiansystem case1 case2 case3 cbrt cd ceil center centerToFocus centroid cevian change2 changecoordsys checkSegment checkconditionlength checker checklengths checkposition checktriangle choose circle circlebarframe circlemarkradius circlenodesnumber circumcenter circumcircle clamped clear clip clipdraw close cmyk code colatitude collect collinear color colorless colors colorspace comma compassmark complement complementary concat concurrent cone conic conicnodesnumber conictype conj connect containmentTree contains contour contour3 controlSpecifier convert coordinates coordsys copy cos cosh cot countIntersections cputime crop cropcode cross crossframe crosshatch crossmarksize csc cubicroots curabscissa curlSpecifier curpoint currentarrow currentexitfunction currentmomarrow currentpolarconicroutine curve cut cutafter cutbefore cyclic cylinder debugger deconstruct defaultdir defaultformat defaultpen defined degenerate degrees delete deletepreamble determinant diagonal diamond diffdiv dir dirSpecifier dirtime display distance divisors do_overpaint dot dotframe dotsize downcase draw drawAll drawDoubleLine drawFermion drawGhost drawGluon drawMomArrow drawPhoton drawScalar drawVertex drawVertexBox drawVertexBoxO drawVertexBoxX drawVertexO drawVertexOX drawVertexTriangle drawVertexTriangleO drawVertexX drawarrow drawarrow2 drawline drawtick duplicate elle ellipse ellipsenodesnumber embed embed3 empty enclose end endScript endclip endgroup endl endpoint endpoints eof eol equation equations erase erasestep erf erfc error errorbar errorbars eval excenter excircle exit exitXasyMode exitfunction exp expfactors expi expm1 exradius extend extension extouch fabs factorial fermat fft fhorner figure file filecode fill filldraw filloutside fillrule filltype find finite finiteDifferenceJacobian firstcut firstframe fit fit2 fixedscaling floor flush fmdefaults fmod focusToCenter font fontcommand fontsize foot format frac frequency fromCenter fromFocus fspline functionshade gamma generate_random_backtrace generateticks gergonne getc getint getpair getreal getstring gettriple gluon gouraudshade graph graphic gray grestore grid grid3 gsave halfbox hatch hdiffdiv hermite hex histogram history hline hprojection hsv hyperbola hyperbolanodesnumber hyperlink hypot identity image incenter incentral incircle increasing incrementposition indexedTransform indexedfigure initXasyMode initdefaults input inradius insert inside integrate interactive interior interp interpolate intersect intersection intersectionpoint intersectionpoints intersections intouch inverse inversion invisible is3D isDuplicate isogonal isogonalconjugate isotomic isotomicconjugate isparabola italic item key kurtosis kurtosisexcess label labelaxis labelmargin labelpath labels labeltick labelx labelx3 labely labely3 labelz labelz3 lastcut latex latitude latticeshade layer layout ldexp leastsquares legend legenditem length lift light limits line linear linecap lineinversion linejoin linemargin lineskip linetype linewidth link list lm_enorm lm_evaluate_default lm_lmdif lm_lmpar lm_minimize lm_print_default lm_print_quiet lm_qrfac lm_qrsolv locale locate locatefile location log log10 log1p logaxiscoverage longitude lookup magnetize makeNode makedraw makepen map margin markangle markangleradius markanglespace markarc marker markinterval marknodes markrightangle markuniform mass masscenter massformat math max max3 maxbezier maxbound maxcoords maxlength maxratio maxtimes mean medial median midpoint min min3 minbezier minbound minipage minratio mintimes miterlimit momArrowPath momarrowsize monotonic multifigure nativeformat natural needshipout newl newpage newslide newton newtree nextframe nextnormal nextpage nib nodabscissa none norm normalvideo notaknot nowarn numberpage nurb object offset onpath opacity opposite orientation orig_circlenodesnumber orig_circlenodesnumber1 orig_draw orig_ellipsenodesnumber orig_ellipsenodesnumber1 orig_hyperbolanodesnumber orig_parabolanodesnumber origin orthic orthocentercenter outformat outline outprefix output overloadedMessage overwrite pack pad pairs palette parabola parabolanodesnumber parallel partialsum path path3 pattern pause pdf pedal periodic perp perpendicular perpendicularmark phantom phi1 phi2 phi3 photon piecewisestraight point polar polarconicroutine polargraph polygon postcontrol postscript pow10 ppoint prc prc0 precision precontrol prepend print_random_addresses project projection purge pwhermite quadrant quadraticroots quantize quarticroots quotient radialshade radians radicalcenter radicalline radius rand randompath rd readline realmult realquarticroots rectangle rectangular rectify reflect relabscissa relative relativedistance reldir relpoint reltime remainder remark removeDuplicates rename replace report resetdefaultpen restore restoredefaults reverse reversevideo rf rfind rgb rgba rgbint rms rotate rotateO rotation round roundbox roundedpath roundrectangle samecoordsys sameside sample save savedefaults saveline scale scale3 scaleO scaleT scaleless scientific search searchtree sec secondaryX secondaryY seconds section sector seek seekeof segment sequence setpens sgn sgnd sharpangle sharpdegrees shift shiftless shipout shipout3 show side simeq simpson sin single sinh size size3 skewness skip slant sleep slope slopefield solve solveBVP sort sourceline sphere split sqrt square srand standardizecoordsys startScript startTrembling stdev step stickframe stickmarksize stickmarkspace stop straight straightness string stripdirectory stripextension stripfile strokepath subdivide subitem subpath substr sum surface symmedial symmedian system tab tableau tan tangent tangential tangents tanh tell tensionSpecifier tensorshade tex texcolor texify texpath texpreamble texreset texshipout texsize textpath thick thin tick tickMax tickMax3 tickMin tickMin3 ticklabelshift ticklocate tildeframe tildemarksize tile tiling time times title titlepage topbox transform transformation transpose tremble trembleFuzz tremble_circlenodesnumber tremble_circlenodesnumber1 tremble_draw tremble_ellipsenodesnumber tremble_ellipsenodesnumber1 tremble_hyperbolanodesnumber tremble_marknodes tremble_markuniform tremble_parabolanodesnumber triangle triangleAbc triangleabc triangulate tricoef tridiagonal trilinear trim trueMagnetize truepoint tube uncycle unfill uniform unit unitrand unitsize unityroot unstraighten upcase updatefunction uperiodic upscale uptodate usepackage usersetting usetypescript usleep value variance variancebiased vbox vector vectorfield verbatim view vline vperiodic vprojection warn warning windingnumber write xaxis xaxis3 xaxis3At xaxisAt xequals xinput xlimits xoutput xpart xscale xscaleO xtick xtick3 xtrans yaxis yaxis3 yaxis3At yaxisAt yequals ylimits ypart yscale yscaleO ytick ytick3 ytrans zaxis3 zaxis3At zero zero3 zlimits zpart ztick ztick3 ztrans ))
+AND Arc ArcArrow ArcArrows Arrow Arrows Automatic AvantGarde BBox BWRainbow BWRainbow2 Bar Bars BeginArcArrow BeginArrow BeginBar BeginDotMargin BeginMargin BeginPenMargin Blank Bookman Bottom BottomTop Bounds Break Broken BrokenLog CLZ CTZ Ceil Circle CircleBarIntervalMarker Cos Courier CrossIntervalMarker DefaultFormat DefaultLogFormat Degrees Dir DotMargin DotMargins Dotted Draw Drawline Embed EndArcArrow EndArrow EndBar EndDotMargin EndMargin EndPenMargin Fill FillDraw Floor Format Full Gaussian Gaussrand Gaussrandpair Gradient Grayscale Helvetica Hermite HookHead InOutTicks InTicks Jn Label Landscape Left LeftRight LeftTicks Legend Linear Link Log LogFormat Margin Margins Mark MidArcArrow MidArrow NOT NewCenturySchoolBook NoBox NoMargin NoModifier NoTicks NoTicks3 NoZero NoZeroFormat None OR OmitFormat OmitTick OmitTickInterval OmitTickIntervals OutTicks Ox Oy Palatino PaletteTicks Pen PenMargin PenMargins Pentype Portrait RadialShade RadialShadeDraw Rainbow Range Relative Right RightTicks Rotate Round SQR Scale ScaleX ScaleY ScaleZ Seascape Segment Shift Sin Slant Spline StickIntervalMarker Straight Symbol Tan TeXify Ticks Ticks3 TildeIntervalMarker TimesRoman Top TrueMargin UnFill UpsideDown Wheel X XEquals XOR XY XYEquals XYZero XYgrid XZEquals XZZero XZero XZgrid Y YEquals YXgrid YZ YZEquals YZZero YZero YZgrid Yn Z ZX ZXgrid ZYgrid ZapfChancery ZapfDingbats _cputime _draw _eval _image _labelpath _projection _strokepath _texpath aCos aSin aTan abort abs accel acos acosh acot acsc activatequote add addArrow addMargins addSaveFunction addnode addnodes addpenarc addpenline adjust alias align all altitude angabscissa angle angpoint animate annotate anticomplementary antipedal apply approximate arc arcarrowsize arccircle arcdir arcfromcenter arcfromfocus arclength arcnodesnumber arcpoint arcsubtended arcsubtendedcenter arctime arctopath array arrow arrow2 arrowbase arrowbasepoints arrowsize asec asin asinh ask assert asy asycode asydir asyfigure asyfilecode asyinclude asywrite atan atan2 atanh atbreakpoint atexit atime attach attract atupdate autoformat autoscale autoscale3 axes axes3 axialshade axis axiscoverage azimuth babel background bangles bar barmarksize barsize basealign baseline bbox beep begin beginclip begingroup beginpoint between bevel bezier bezierP bezierPP bezierPPP bezulate bibliography bibliographystyle binarytree binarytreeNode binomial binput bins bisector bisectorpoint blend blockconnector boutput box bqe breakpoint breakpoints brick buildRestoreDefaults buildRestoreThunk buildcycle bulletcolor byte canonical canonicalcartesiansystem cartesiansystem case1 case2 case3 case4 cbrt cd ceil center centerToFocus centroid cevian change2 changecoordsys checkSegment checkconditionlength checker checkincreasing checklengths checkposition checktriangle choose circle circlebarframe circlemarkradius circlenodesnumber circumcenter circumcircle clamped clear clip clipdraw close cmyk code colatitude collect collinear color colorless colors colorspace comma compassmark complement complementary concat concurrent cone conic conicnodesnumber conictype conj connect connected connectedindex containmentTree contains contour contour3 contouredges controlSpecifier convert coordinates coordsys copy cos cosh cot countIntersections cputime crop cropcode cross crossframe crosshatch crossmarksize csc cubicroots curabscissa curlSpecifier curpoint currentarrow currentexitfunction currentmomarrow currentpolarconicroutine curve cut cutafter cutbefore cyclic cylinder deactivatequote debugger deconstruct defaultdir defaultformat defaultpen defined degenerate degrees delete deletepreamble determinant diagonal diamond diffdiv dir dirSpecifier dirtime display distance divisors do_overpaint dot dotframe dotsize downcase draw drawAll drawDoubleLine drawFermion drawGhost drawGluon drawMomArrow drawPhoton drawScalar drawVertex drawVertexBox drawVertexBoxO drawVertexBoxX drawVertexO drawVertexOX drawVertexTriangle drawVertexTriangleO drawVertexX drawarrow drawarrow2 drawline drawtick duplicate elle ellipse ellipsenodesnumber embed embed3 empty enclose end endScript endclip endgroup endl endpoint endpoints eof eol equation equations erase erasestep erf erfc error errorbar errorbars eval excenter excircle exit exitXasyMode exitfunction exp expfactors expi expm1 exradius extend extension extouch fabs factorial fermat fft fhorner figure file filecode fill filldraw filloutside fillrule filltype find finite finiteDifferenceJacobian firstcut firstframe fit fit2 fixedscaling floor flush fmdefaults fmod focusToCenter font fontcommand fontsize foot format frac frequency fromCenter fromFocus fspline functionshade gamma generate_random_backtrace generateticks gergonne getc getint getpair getreal getstring gettriple gluon gouraudshade graph graphic gray grestore grid grid3 gsave halfbox hatch hdiffdiv hermite hex histogram history hline hprojection hsv hyperbola hyperbolanodesnumber hyperlink hypot identity image incenter incentral incircle increasing incrementposition indexedTransform indexedfigure initXasyMode initdefaults input inradius insert inside integrate interactive interior interp interpolate intersect intersection intersectionpoint intersectionpoints intersections intouch inverse inversion invisible is3D isCCW isDuplicate isogonal isogonalconjugate isotomic isotomicconjugate isparabola italic item key kurtosis kurtosisexcess label labelaxis labelmargin labelpath labels labeltick labelx labelx3 labely labely3 labelz labelz3 lastcut latex latitude latticeshade layer layout ldexp leastsquares legend legenditem length lift light limits line linear linecap lineinversion linejoin linemargin lineskip linetype linewidth link list lm_enorm lm_evaluate_default lm_lmdif lm_lmpar lm_minimize lm_print_default lm_print_quiet lm_qrfac lm_qrsolv locale locate locatefile location log log10 log1p logaxiscoverage longitude lookup magnetize makeNode makedraw makepen map margin markangle markangleradius markanglespace markarc marker markinterval marknodes markrightangle markuniform mass masscenter massformat math max max3 maxbezier maxbound maxcoords maxlength maxratio maxtimes mean medial median midpoint min min3 minbezier minbound minipage minratio mintimes miterlimit momArrowPath momarrowsize monotonic multifigure nativeformat natural needshipout newl newpage newslide newton newtree nextframe nextnormal nextpage nib nodabscissa none norm normalvideo notaknot nowarn numberpage nurb object offset onpath opacity opposite orientation orig_circlenodesnumber orig_circlenodesnumber1 orig_draw orig_ellipsenodesnumber orig_ellipsenodesnumber1 orig_hyperbolanodesnumber orig_parabolanodesnumber origin orthic orthocentercenter outformat outline outname outprefix output overloadedMessage overwrite pack pad pairs palette parabola parabolanodesnumber parallel parallelogram partialsum path path3 pattern pause pdf pedal periodic perp perpendicular perpendicularmark phantom phi1 phi2 phi3 photon piecewisestraight point polar polarconicroutine polargraph polygon postcontrol postscript pow10 ppoint prc prc0 precision precontrol prepend print_random_addresses project projection purge pwhermite quadrant quadraticroots quantize quarticroots quotient radialshade radians radicalcenter radicalline radius rand randompath rd readline realmult realquarticroots rectangle rectangular rectify reflect relabscissa relative relativedistance reldir relpoint reltime remainder remark removeDuplicates rename replace report resetdefaultpen restore restoredefaults reverse reversevideo rf rfind rgb rgba rgbint rms rotate rotateO rotation round roundbox roundedpath roundrectangle same samecoordsys sameside sample save savedefaults saveline scale scale3 scaleO scaleT scaleless scientific search searchindex searchtree sec secondaryX secondaryY seconds section sector seek seekeof segment sequence setcontour setpens sgn sgnd sharpangle sharpdegrees shift shiftless shipout shipout3 show side simeq simpson sin single sinh size size3 skewness skip slant sleep slope slopefield solve solveBVP sort sourceline sphere split sqrt square srand standardizecoordsys startScript startTrembling stdev step stickframe stickmarksize stickmarkspace stop straight straightness string stripdirectory stripextension stripfile strokepath subdivide subitem subpath substr sum surface symmedial symmedian system tab tableau tan tangent tangential tangents tanh tell tensionSpecifier tensorshade tex texcolor texify texpath texpreamble texreset texshipout texsize textpath thick thin tick tickMax tickMax3 tickMin tickMin3 ticklabelshift ticklocate tildeframe tildemarksize tile tiling time times title titlepage topbox transform transformation transpose tremble trembleFuzz tremble_circlenodesnumber tremble_circlenodesnumber1 tremble_draw tremble_ellipsenodesnumber tremble_ellipsenodesnumber1 tremble_hyperbolanodesnumber tremble_marknodes tremble_markuniform tremble_parabolanodesnumber triangle triangleAbc triangleabc triangulate tricoef tridiagonal trilinear trim trueMagnetize truepoint tube uncycle unfill uniform unit unitrand unitsize unityroot unstraighten upcase updatefunction uperiodic upscale uptodate usepackage usersetting usetypescript usleep value variance variancebiased vbox vector vectorfield verbatim view vline vperiodic vprojection warn warning windingnumber write xaxis xaxis3 xaxis3At xaxisAt xequals xinput xlimits xoutput xpart xscale xscaleO xtick xtick3 xtrans yaxis yaxis3 yaxis3At yaxisAt yequals ylimits ypart yscale yscaleO ytick ytick3 ytrans zaxis3 zaxis3At zero zero3 zlimits zpart ztick ztick3 ztrans ))
(defvar asy-variable-name '(
-AliceBlue Align Allow AntiqueWhite Apricot Aqua Aquamarine Aspect Azure BeginPoint Beige Bisque Bittersweet Black BlanchedAlmond Blue BlueGreen BlueViolet Both Break BrickRed Brown BurlyWood BurntOrange CCW CW CadetBlue CarnationPink Center Centered Cerulean Chartreuse Chocolate Coeff Coral CornflowerBlue Cornsilk Crimson Crop Cyan Dandelion DarkBlue DarkCyan DarkGoldenrod DarkGray DarkGreen DarkKhaki DarkMagenta DarkOliveGreen DarkOrange DarkOrchid DarkRed DarkSalmon DarkSeaGreen DarkSlateBlue DarkSlateGray DarkTurquoise DarkViolet DeepPink DeepSkyBlue DefaultHead DimGray DodgerBlue Dotted Draw E ENE EPS ESE E_Euler E_PC E_RK2 E_RK3BS Emerald EndPoint Euler Fill FillDraw FireBrick FloralWhite ForestGreen Fuchsia Gainsboro GhostWhite Gold Goldenrod Gray Green GreenYellow Honeydew HookHead Horizontal HotPink I IgnoreAspect IndianRed Indigo Ivory JOIN_IN JOIN_OUT JungleGreen Khaki LM_DWARF LM_MACHEP LM_SQRT_DWARF LM_SQRT_GIANT LM_USERTOL Label Lavender LavenderBlush LawnGreen LeftJustified LeftSide LemonChiffon LightBlue LightCoral LightCyan LightGoldenrodYellow LightGreen LightGrey LightPink LightSalmon LightSeaGreen LightSkyBlue LightSlateGray LightSteelBlue LightYellow Lime LimeGreen Linear Linen Log Logarithmic Magenta Mahogany Mark MarkFill Maroon Max MediumAquamarine MediumBlue MediumOrchid MediumPurple MediumSeaGreen MediumSlateBlue MediumSpringGreen MediumTurquoise MediumVioletRed Melon MidPoint MidnightBlue Min MintCream MistyRose Moccasin Move MoveQuiet Mulberry N NE NNE NNW NW NavajoWhite Navy NavyBlue NoAlign NoCrop NoFill NoSide OldLace Olive OliveDrab OliveGreen Orange OrangeRed Orchid Ox Oy PC PaleGoldenrod PaleGreen PaleTurquoise PaleVioletRed PapayaWhip Peach PeachPuff Periwinkle Peru PineGreen Pink Plum PowderBlue ProcessBlue Purple RK2 RK3 RK3BS RK4 RK5 RK5DP RK5F RawSienna Red RedOrange RedViolet Rhodamine RightJustified RightSide RosyBrown RoyalBlue RoyalPurple RubineRed S SE SSE SSW SW SaddleBrown Salmon SandyBrown SeaGreen Seashell Sepia Sienna Silver SimpleHead SkyBlue SlateBlue SlateGray Snow SpringGreen SteelBlue Suppress SuppressQuiet Tan TeXHead Teal TealBlue Thistle Ticksize Tomato Turquoise UnFill VERSION Value Vertical Violet VioletRed W WNW WSW Wheat White WhiteSmoke WildStrawberry XYAlign YAlign Yellow YellowGreen YellowOrange addpenarc addpenline align allowstepping angularsystem animationdelay appendsuffix arcarrowangle arcarrowfactor arrow2sizelimit arrowangle arrowbarb arrowdir arrowfactor arrowhookfactor arrowlength arrowsizelimit arrowtexfactor authorpen axis axiscoverage axislabelfactor background backgroundcolor backgroundpen barfactor barmarksizefactor basealign baselinetemplate beveljoin bigvertexpen bigvertexsize black blue bm bottom bp brown bullet byfoci byvertices camerafactor chartreuse circlemarkradiusfactor circlenodesnumberfactor circleprecision circlescale cm codefile codepen codeskip colorPen coloredNodes coloredSegments conditionlength conicnodesfactor count cputimeformat crossmarksizefactor currentcoordsys currentlight currentpatterns currentpen currentpicture currentposition currentprojection curvilinearsystem cuttings cyan darkblue darkbrown darkcyan darkgray darkgreen darkgrey darkmagenta darkolive darkred dashdotted dashed datepen dateskip debuggerlines debugging deepblue deepcyan deepgray deepgreen deepgrey deepmagenta deepred default defaultControl defaultS defaultbackpen defaultcoordsys defaultfilename defaultformat defaultmassformat defaultpen diagnostics differentlengths dot dotfactor dotframe dotted doublelinepen doublelinespacing down duplicateFuzz ellipsenodesnumberfactor eps epsgeo epsilon evenodd extendcap fermionpen figureborder figuremattpen firstnode firststep foregroundcolor fuchsia fuzz gapfactor ghostpen gluonamplitude gluonpen gluonratio gray green grey hatchepsilon havepagenumber heavyblue heavycyan heavygray heavygreen heavygrey heavymagenta heavyred hline hwratio hyperbolanodesnumberfactor identity4 ignore inXasyMode inch inches includegraphicscommand inf infinity institutionpen intMax intMin invert invisible itempen itemskip itemstep labelmargin landscape lastnode left legendhskip legendlinelength legendmargin legendmarkersize legendmaxrelativewidth legendvskip lightblue lightcyan lightgray lightgreen lightgrey lightmagenta lightolive lightred lightyellow linemargin lm_infmsg lm_shortmsg longdashdotted longdashed magenta magneticPoints magneticRadius mantissaBits markangleradius markangleradiusfactor markanglespace markanglespacefactor mediumblue mediumcyan mediumgray mediumgreen mediumgrey mediummagenta mediumred mediumyellow middle minDistDefault minblockheight minblockwidth mincirclediameter minipagemargin minipagewidth minvertexangle miterjoin mm momarrowfactor momarrowlength momarrowmargin momarrowoffset momarrowpen monoPen morepoints nCircle newbulletcolor ngraph nil nmesh nobasealign nodeMarginDefault nodesystem nomarker nopoint noprimary nullpath nullpen numarray ocgindex oldbulletcolor olive orange origin overpaint page pageheight pagemargin pagenumberalign pagenumberpen pagenumberposition pagewidth paleblue palecyan palegray palegreen palegrey palemagenta palered paleyellow parabolanodesnumberfactor perpfactor phi photonamplitude photonpen photonratio pi pink plain plus preamblenodes pt purple r3 r4a r4b randMax realDigits realEpsilon realMax realMin red relativesystem reverse right roundcap roundjoin royalblue salmon saveFunctions scalarpen sequencereal settings shipped signedtrailingzero solid springgreen sqrtEpsilon squarecap squarepen startposition stdin stdout stepfactor stepfraction steppagenumberpen stepping stickframe stickmarksizefactor stickmarkspacefactor textpen ticksize tildeframe tildemarksizefactor tinv titlealign titlepagepen titlepageposition titlepen titleskip top trailingzero treeLevelStep treeMinNodeWidth treeNodeStep trembleAngle trembleFrequency trembleRandom tremblingMode undefined unitcircle unitsquare up urlpen urlskip version vertexpen vertexsize viewportmargin viewportsize vline white wye xformStack yellow ylabelwidth zerotickfuzz zerowinding ))
+AliceBlue Align Allow AntiqueWhite Apricot Aqua Aquamarine Aspect Azure BeginPoint Beige Bisque Bittersweet Black BlanchedAlmond Blue BlueGreen BlueViolet Both Break BrickRed Brown BurlyWood BurntOrange CCW CW CadetBlue CarnationPink Center Centered Cerulean Chartreuse Chocolate Coeff Coral CornflowerBlue Cornsilk Crimson Crop Cyan Dandelion DarkBlue DarkCyan DarkGoldenrod DarkGray DarkGreen DarkKhaki DarkMagenta DarkOliveGreen DarkOrange DarkOrchid DarkRed DarkSalmon DarkSeaGreen DarkSlateBlue DarkSlateGray DarkTurquoise DarkViolet DeepPink DeepSkyBlue DefaultHead DimGray DodgerBlue Dotted Down Draw E ENE EPS ESE E_Euler E_PC E_RK2 E_RK3BS Emerald EndPoint Euler Fill FillDraw FireBrick FloralWhite ForestGreen Fuchsia Gainsboro GhostWhite Gold Goldenrod Gray Green GreenYellow Honeydew HookHead Horizontal HotPink I IgnoreAspect IndianRed Indigo Ivory JOIN_IN JOIN_OUT JungleGreen Khaki LM_DWARF LM_MACHEP LM_SQRT_DWARF LM_SQRT_GIANT LM_USERTOL Label Lavender LavenderBlush LawnGreen Left LeftJustified LeftSide LemonChiffon LightBlue LightCoral LightCyan LightGoldenrodYellow LightGreen LightGrey LightPink LightSalmon LightSeaGreen LightSkyBlue LightSlateGray LightSteelBlue LightYellow Lime LimeGreen Linear Linen Log Logarithmic Magenta Mahogany Mark MarkFill Maroon Max MediumAquamarine MediumBlue MediumOrchid MediumPurple MediumSeaGreen MediumSlateBlue MediumSpringGreen MediumTurquoise MediumVioletRed Melon MidPoint MidnightBlue Min MintCream MistyRose Moccasin Move MoveQuiet Mulberry N NE NNE NNW NW NavajoWhite Navy NavyBlue NoAlign NoCrop NoFill NoSide OldLace Olive OliveDrab OliveGreen Orange OrangeRed Orchid Ox Oy PC PaleGoldenrod PaleGreen PaleTurquoise PaleVioletRed PapayaWhip Peach PeachPuff Periwinkle Peru PineGreen Pink Plum PowderBlue ProcessBlue Purple RK2 RK3 RK3BS RK4 RK5 RK5DP RK5F RawSienna Red RedOrange RedViolet Rhodamine Right RightJustified RightSide RosyBrown RoyalBlue RoyalPurple RubineRed S SE SSE SSW SW SaddleBrown Salmon SandyBrown SeaGreen Seashell Sepia Sienna Silver SimpleHead SkyBlue SlateBlue SlateGray Snow SpringGreen SteelBlue Suppress SuppressQuiet Tan TeXHead Teal TealBlue Thistle Ticksize Tomato Turquoise UnFill Up VERSION Value Vertical Violet VioletRed W WNW WSW Wheat White WhiteSmoke WildStrawberry XYAlign YAlign Yellow YellowGreen YellowOrange addpenarc addpenline align allowstepping angularsystem animationdelay appendsuffix arcarrowangle arcarrowfactor arrow2sizelimit arrowangle arrowbarb arrowdir arrowfactor arrowhookfactor arrowlength arrowsizelimit arrowtexfactor authorpen axis axiscoverage axislabelfactor background backgroundcolor backgroundpen barfactor barmarksizefactor basealign baselinetemplate beveljoin bigvertexpen bigvertexsize black blue bm bottom bp brown bullet byfoci byvertices camerafactor chartreuse circlemarkradiusfactor circlenodesnumberfactor circleprecision circlescale cm codefile codepen codeskip colorPen coloredNodes coloredSegments conditionlength conicnodesfactor count cputimeformat crossmarksizefactor currentcoordsys currentlight currentpatterns currentpen currentpicture currentposition currentprojection curvilinearsystem cuttings cyan darkblue darkbrown darkcyan darkgray darkgreen darkgrey darkmagenta darkolive darkred dashdotted dashed datepen dateskip debuggerlines debugging deepblue deepcyan deepgray deepgreen deepgrey deepmagenta deepred default defaultControl defaultS defaultbackpen defaultcoordsys defaultexcursion defaultfilename defaultformat defaultmassformat defaultpen diagnostics differentlengths dot dotfactor dotframe dotted doublelinepen doublelinespacing down duplicateFuzz edge ellipsenodesnumberfactor eps epsgeo epsilon evenodd extendcap exterior fermionpen figureborder figuremattpen firstnode firststep foregroundcolor fuchsia fuzz gapfactor ghostpen gluonamplitude gluonpen gluonratio gray green grey hatchepsilon havepagenumber heavyblue heavycyan heavygray heavygreen heavygrey heavymagenta heavyred hline hwratio hyperbola hyperbolanodesnumberfactor identity4 ignore inXasyMode inch inches includegraphicscommand inf infinity institutionpen intMax intMin interior invert invisible itempen itemskip itemstep labelmargin landscape lastnode left legendhskip legendlinelength legendmargin legendmarkersize legendmaxrelativewidth legendvskip lightblue lightcyan lightgray lightgreen lightgrey lightmagenta lightolive lightred lightyellow line linemargin lm_infmsg lm_shortmsg longdashdotted longdashed magenta magneticPoints magneticRadius mantissaBits markangleradius markangleradiusfactor markanglespace markanglespacefactor mediumblue mediumcyan mediumgray mediumgreen mediumgrey mediummagenta mediumred mediumyellow middle minDistDefault minblockheight minblockwidth mincirclediameter minipagemargin minipagewidth minvertexangle miterjoin mm momarrowfactor momarrowlength momarrowmargin momarrowoffset momarrowpen monoPen morepoints nCircle newbulletcolor ngraph nil nmesh nobasealign nodeMarginDefault nodesystem nomarker nopoint noprimary nullpath nullpen numarray ocgindex oldbulletcolor olive orange origin overpaint page pageheight pagemargin pagenumberalign pagenumberpen pagenumberposition pagewidth paleblue palecyan palegray palegreen palegrey palemagenta palered paleyellow parabolanodesnumberfactor perpfactor phi photonamplitude photonpen photonratio pi pink plain plus preamblenodes pt purple r3 r4a r4b randMax realDigits realEpsilon realMax realMin red relativesystem reverse right roundcap roundjoin royalblue salmon saveFunctions scalarpen sequencereal settings shipped signedtrailingzero solid springgreen sqrtEpsilon squarecap squarepen startposition stdin stdout stepfactor stepfraction steppagenumberpen stepping stickframe stickmarksizefactor stickmarkspacefactor textpen ticksize tildeframe tildemarksizefactor tinv titlealign titlepagepen titlepageposition titlepen titleskip top trailingzero treeLevelStep treeMinNodeWidth treeNodeStep trembleAngle trembleFrequency trembleRandom tremblingMode undefined unitcircle unitsquare up urlpen urlskip version vertexpen vertexsize viewportmargin viewportsize vline white wye xformStack yellow ylabelwidth zerotickfuzz zerowinding ))
diff --git a/Master/texmf/asymptote/contour.asy b/Master/texmf/asymptote/contour.asy
index fbb4cd1c71a..27a79439e2d 100644
--- a/Master/texmf/asymptote/contour.asy
+++ b/Master/texmf/asymptote/contour.asy
@@ -1,307 +1,922 @@
-// Contour routines written by Radoslav Marinov and John Bowman.
-
+/*
+ Contour routines written by Radoslav Marinov, John Bowman, and Chris Savage.
+
+ [2009/10/15: C Savage] generate oriented contours
+ [2009/10/19: C Savage] use boxes instead of triangles
+*/
+
+/*
+ Contours lines/guides are oriented throughout. By convention,
+ for a single contour, higher values are to the left and/or lower
+ values are to the right along the direction of the lines/guide.
+*/
+
import graph_settings;
-real eps=10000*realEpsilon;
-
-// 1
-// 6 +-------------------+ 5
-// | \ / |
-// | \ / |
-// | \ / |
-// | \ / |
-// 2 | X | 0
-// | / \ |
-// | / \ |
-// | / \ |
-// | / \ |
-// 7 +-------------------+ 4 or 8
-// 3
+private real eps=sqrtEpsilon;
-private struct segment
-{
- bool active;
- pair a,b; // Endpoints; a is always an edge point if one exists.
- int c; // Contour value.
- int edge; // -1: interior, 0 to 3: edge,
- // 4-8: single-vertex edge, 9: double-vertex edge.
+/*
+ GRID CONTOURS
+
+ Contours on a grid of points are determined as follows:
+ for each grid square, the function is approximated as the unique
+ paraboloid passing through the function values at the four
+ corners. The intersection of a paraboloid with the f(x,y)=c
+ plane is a line or hyperbola.
+
+ Grid data structures:
+
+ boxcontour:
+ Describes a particular contour segment in a grid square.
+
+ boxdata:
+ Describes contours in a grid square (holds boxcontours).
+
+ segment:
+ Describes a contour line. Usually a closed (interior) contour,
+ a line that terminates on the border, or a border segment used
+ to enclose a region.
+
+ Segment:
+ Describes a contour line.
+
+ Main grid routines:
+
+ setcontour:
+ Determines the contours in a grid square.
+
+ contouredges:
+ Determines the contour segments over a grid of function values.
+
+ connect:
+ Converts contours into guides
+
+*/
+
+private typedef int boxtype;
+private boxtype exterior=-1;
+private boxtype edge = 0;
+private boxtype interior=+1;
+
+private typedef int contourshape;
+private contourshape line =1;
+private contourshape hyperbola=2;
+
+// Describe position by grid square and position in square
+private struct gridpoint {
+ int i,j;
+ pair z;
+ void operator init(int i, int j, pair z) {
+ this.i=i;
+ this.j=j;
+ this.z=z;
+ }
+ void operator init(gridpoint gp) {
+ this.i=gp.i;
+ this.j=gp.j;
+ this.z=gp.z;
+ }
}
-// Case 1: line passes through two vertices of a triangle
-private segment case1(pair p0, pair p1, int edge)
+private bool same(gridpoint gp1, gridpoint gp2)
{
- // Will cause a duplicate guide; luckily case1 is rare
- segment rtrn;
- rtrn.active=true;
- rtrn.a=p0;
- rtrn.b=p1;
- rtrn.edge=edge;
- return rtrn;
+ return abs(gp2.z-gp1.z+(gp2.i-gp1.i,gp2.j-gp1.j)) < eps;
}
-// Case 2: line passes through a vertex and a side of a triangle
-// (the first vertex passed and the side between the other two)
-private segment case2(pair p0, pair p1, pair p2,
- real v0, real v1, real v2, int edge)
-{
- segment rtrn;
- pair val=interp(p1,p2,abs(v1/(v2-v1)));
- rtrn.active=true;
- if(edge < 4) {
- rtrn.a=val;
- rtrn.b=p0;
- } else {
- rtrn.a=p0;
- rtrn.b=val;
+
+// Describe contour in unit square(scaling to be done later).
+private struct boxcontour {
+ bool active;
+ contourshape type; // Shape of contour segment(line or hyperbola)
+ pair a,b; // Start/end point of contour segment.
+ // Higher values to left along a--b.
+ real x0,y0,m; // For hyperbola: (x-x0)*(y-y0)=m
+ int signx,signy; // Sign of x-x0&y-y0 for hyperbola piece;
+ // identifies which direction it opens
+ int i,j; // Indices of lower left corner in position or
+ // data array.
+ int index; // Contour index
+
+ void operator init(contourshape type, pair a, pair b,
+ real x0, real y0, real m, int signx, int signy,
+ int i, int j, int index) {
+ this.active=true;
+ this.type=type;
+ this.a=a;
+ this.b=b;
+
+ this.x0=x0;
+ this.y0=y0;
+ this.m=m;
+ this.signx=signx;
+ this.signy=signy;
+
+ this.i=i;
+ this.j=j;
+ this.index=index;
+ }
+ // Generate list of points along the line/hyperbola segment
+ // representing the contour in the box
+ gridpoint[] points(int subsample=1, bool first=true, bool last=true) {
+ gridpoint[] gp;
+ if(first)
+ gp.push(gridpoint(i,j,a));
+ if(subsample > 0) {
+ // Linear case
+ if(type == line) {
+ for(int k=1; k <= subsample; ++k) {
+ pair z=interp(a,b,k/(subsample+1));
+ gp.push(gridpoint(i,j,z));
+ }
+ } else if(type == hyperbola) {
+ // Special hyperbolic case of m=0
+ // The contours here are infinite lines at x=x0 and y=y0,
+ // but handedness always connects a semi-infinite
+ // horizontal segment with a semi-infinite vertical segment
+ // connected at (x0,y0).
+ // If (x0,y0) is outside the unit box, there is only one
+ // line segment to include; otherwise, there are both
+ // a horizontal and a vertical line segment to include.
+ if(m == 0) {
+ // Single line
+ if(a.x == b.x || a.y == b.y) {
+ for(int k=1; k <= subsample; ++k) {
+ pair z=interp(a,b,k/(subsample+1));
+ gp.push(gridpoint(i,j,z));
+ }
+ // Two lines(may get one extra point here)
+ } else {
+ int nsub=quotient(subsample,2);
+ pair mid=(x0,y0);
+ for(int k=1; k <= nsub; ++k) {
+ pair z=interp(a,mid,k/(nsub+1));
+ gp.push(gridpoint(i,j,z));
+ }
+ gp.push(gridpoint(i,j,mid));
+ for(int k=1; k <= nsub; ++k) {
+ pair z=interp(mid,b,k/(nsub+1));
+ gp.push(gridpoint(i,j,z));
+ }
+ }
+ // General hyperbolic case (m != 0).
+ // Parametric equations(m > 0):
+ // x(t)=x0 +/- sqrt(m)*exp(t)
+ // y(t)=y0 +/- sqrt(m)*exp(-t)
+ // Parametric equations (m < 0):
+ // x(t)=x0 +/- sqrt(-m)*exp(t)
+ // y(t)=y0 -/+ sqrt(-m)*exp(-t)
+ // Points will be taken equally spaced in parameter t.
+ } else {
+ real sqrtm=sqrt(abs(m));
+ real ta=log(signx*(a.x-x0)/sqrtm);
+ real tb=log(signx*(b.x-x0)/sqrtm);
+ real[] t=uniform(ta,tb,subsample+1);
+ for(int k=1; k <= subsample; ++k) {
+ pair z=(x0+signx*sqrtm*exp(t[k]),
+ y0+signy*sqrtm*exp(-t[k]));
+ gp.push(gridpoint(i,j,z));
+ }
+ }
+ }
+ }
+ if(last)
+ gp.push(gridpoint(i,j,b));
+
+ return gp;
}
- rtrn.edge=edge;
- return rtrn;
}
-// Case 3: line passes through two sides of a triangle
-// (through the sides formed by the first & second, and second & third
-// vertices)
-private segment case3(pair p0, pair p1, pair p2,
- real v0, real v1, real v2, int edge=-1)
-{
- segment rtrn;
- rtrn.active=true;
- rtrn.a=interp(p1,p0,abs(v1/(v0-v1)));
- rtrn.b=interp(p1,p2,abs(v1/(v2-v1)));
- rtrn.edge=edge;
- return rtrn;
+// Hold data for a single grid square
+private struct boxdata {
+ boxtype type; // Does box contain a contour segment (edge of
+ // contour region) or is it entirely interior/
+ // exterior to contour region ?
+ real min,max; // Smallest/largest corner value
+ real max2; // Second-largest corner value
+ boxcontour[] data; // Stores actual contour segment data
+
+ int count() {return data.length;}
+ void operator init(real f00, real f10, real f01, real f11) {
+ real[] X={f00,f10,f01,f11};
+ min=min(X);
+ max=max(X);
+ X.delete(find(X == max));
+ max2=max(X);
+ }
+ void settype(real c) {
+ // Interior case(f >= c)
+ if(min > c-eps) {
+ type=interior;
+ // Exterior case(f < c)
+ } else if(max < c-eps) {
+ type=exterior;
+ // Special case: only one corner at f=c, f < c elsewhere
+ //(no segment in this case)
+ } else if((max < c+eps) && (max2 < c-eps)) {
+ type=exterior;
+ // Edge of contour passes through box
+ } else {
+ type=edge;
+ }
+ }
}
-// Check if a line passes through a triangle, and draw the required line.
-private segment checktriangle(pair p0, pair p1, pair p2,
- real v0, real v1, real v2, int edge=-1)
-{
- // default null return
- static segment dflt;
- real eps=eps*max(abs(v0),abs(v1),abs(v2));
+/*
+ Determine contours within a unit square box.
- if(v0 < -eps) {
- if(v1 < -eps) {
- if(v2 < -eps) return dflt; // nothing to do
- else if(v2 <= eps) return dflt; // nothing to do
- else return case3(p0,p2,p1,v0,v2,v1);
- } else if(v1 <= eps) {
- if(v2 < -eps) return dflt; // nothing to do
- else if(v2 <= eps) return case1(p1,p2,5+edge);
- else return case2(p1,p0,p2,v1,v0,v2,5+edge);
- } else {
- if(v2 < -eps) return case3(p0,p1,p2,v0,v1,v2,edge);
- else if(v2 <= eps)
- return case2(p2,p0,p1,v2,v0,v1,edge);
- else return case3(p1,p0,p2,v1,v0,v2,edge);
- }
- } else if(v0 <= eps) {
- if(v1 < -eps) {
- if(v2 < -eps) return dflt; // nothing to do
- else if(v2 <= eps) return case1(p0,p2,4+edge);
- else return case2(p0,p1,p2,v0,v1,v2,4+edge);
- } else if(v1 <= eps) {
- if(v2 < -eps) return case1(p0,p1,9);
- else if(v2 <= eps) return dflt; // use finer partitioning.
- else return case1(p0,p1,9);
+ Here, we approximate the function on the unit square to be a quadric
+ surface passing through the specified values at the four corners:
+ f(x,y)=(1-x)(1-y) f00+x(1-y) f10+(1-x)y f01+xy f11
+ =a0+ax x+ay y+axy xy
+ where f00, f10, f01 and f11 are the function values at the four
+ corners of the unit square 0 < x < 1&0 < y < 1 and:
+ a0 =f00
+ ax =f10-f00
+ ay =f01-f00
+ axy=f00+f11-f10-f01
+ This can also be expressed in paraboloid form as:
+ f(x,y)=alpha [(x+y-cp)^2-(x-y-cn)^2]+d
+ where:
+ alpha=axy/4
+ cp =-(ax+ay)/a11
+ cn =-(ax-ay)/a11
+ d =(a0 axy-ax ay)/axy
+ In the procedure below, we take f00 - > f00-c etc. for a contour
+ level c and we search for f=0.
+
+ For this surface, there are two possible contour shapes:
+ linear: (y-y0)/(x-x0)=m
+ hyperbolic: (x-x0)*(y-y0)=m
+ The linear case has a single line. The hyperbolic case may have
+ zero, one or two segments within the box (there are two sides of
+ a hyperbola, each of which may or may not pass through the unit
+ square). A hyperbola with m=0 is a special case that is handled
+ separately below.
+
+ If c0 is the desired contour level, we effectively find the
+ contours at c0-epsilon for arbitrarily small epsilon. Flat
+ regions equal to c0 are considered to be interior to the
+ contour curves. Regions that lie at the contour level are
+ considered to be interior to the contour curves. As a result,
+ contours are only constructed if they are immediately adjacent
+ to some region interior to the square that falls below the
+ contour value; in other words, if an edge falls on the contour
+ value, but a point within the square arbitrarily close to the
+ edge falls above the contour value, that edge (or applicable
+ portion) is not included. This requirement gives the following:
+ *) ensures contours on an edge are unique (do not appear in
+ an adjacent square with the same orientation)
+ *) no three line vertices (four line vertices are possible, but
+ are not usually an issue)
+ *) all segments can be joined into closed curves or curves that
+ terminate on the boundary (no unclosed curves terminate in
+ the interior region of the grid)
+
+ Note the logic below skips cases that have been filtered out
+ by the boxdata.settype() routine.
+*/
+private void setcontour(real f00, real f10, real f01, real f11, real epsf,
+ boxdata bd, int i, int j, int index) {
+ // SPECIAL CASE: two diagonal corners at the contour level with
+ // the other two below does not yield any contours within the
+ // unit box, but may have been previously misidentified as an
+ // edge containing region.
+ if(((f00*f11 == 0) && (f10*f01 > 0)) || ((f01*f10 == 0) && (f00*f11 > 0))) {
+ bd.type=exterior;
+ return;
+ }
+
+ // NOTE: From this point on, we can assume at least one contour
+ // segment exists in the square. This allows several cases to
+ // be ignored or simplified below, particularly edge cases.
+
+ // Form used to approximate function on unit square
+ real F(real x, real y) {
+ return interp(interp(f00,f10,x),interp(f01,f11,x),y);
+ }
+
+ // Write contour as a0+ax*x+ay*y +axy*x*y=0
+ real a0 =f00;
+ real ax =f10-f00;
+ if(abs(ax) < epsf) ax=0;
+ real ay =f01-f00;
+ if(abs(ay) < epsf) ay=0;
+ real axy=f00+f11-f01 -f10;
+ if(abs(axy) < epsf) axy=0;
+
+ // Linear contour(s)
+ if(axy == 0) {
+ pair a,b;
+ // Horizontal
+ if(ax == 0) {
+ if(ay == 0) return; // Contour is at most an isolated point; ignore.
+ real y0=-a0/ay;
+ if(abs(y0-1) < eps) y0=1;
+ if((f00 > 0) || (f01 < 0)) {
+ a=(1,y0);
+ b=(0,y0);
+ } else {
+ a=(0,y0);
+ b=(1,y0);
+ }
+ // Vertical
+ } else if(ay == 0) {
+ real x0=-a0/ax;
+ if(abs(x0-1) < eps) x0=1;
+ if((f00 > 0) || (f10 < 0)) {
+ a=(x0,0);
+ b=(x0,1);
+ } else {
+ a=(x0,1);
+ b=(x0,0);
+ }
+ // Angled line
} else {
- if(v2 < -eps) return case2(p0,p1,p2,v0,v1,v2,4+edge);
- else if(v2 <= eps) return case1(p0,p2,4+edge);
- else return dflt; // nothing to do
- }
- } else {
- if(v1 < -eps) {
- if(v2 < -eps) return case3(p1,p0,p2,v1,v0,v2,edge);
- else if(v2 <= eps)
- return case2(p2,p0,p1,v2,v0,v1,edge);
- else return case3(p0,p1,p2,v0,v1,v2,edge);
- } else if(v1 <= eps) {
- if(v2 < -eps) return case2(p1,p0,p2,v1,v0,v2,5+edge);
- else if(v2 <= eps) return case1(p1,p2,5+edge);
- else return dflt; // nothing to do
+ real x0=-a0/ax;
+ if(abs(x0-1) < eps) x0=1;
+ real y0=-a0/ay;
+ if(abs(y0-1) < eps) y0=1;
+ int count=0;
+ real[] farr={f00,f10,f11,f01};
+ farr.cyclic=true;
+ pair[] corners={(0,0),(1,0),(1,1),(0,1)};
+ pair[] sidedir={(1,0),(0,1),(-1,0),(0,-1)};
+
+ int count=0;
+ for(int i=0; i < farr.length; ++i) {
+ // Corner
+ if(farr[i] == 0) {
+ ++count;
+ if(farr[i-1] > 0) {
+ a=corners[i];
+ } else {
+ b=corners[i];
+ }
+ // Side
+ } else if(farr[i]*farr[i+1] < 0) {
+ ++count;
+ if(farr[i] > 0) {
+ a=corners[i]-(farr[i]/(farr[i+1]-farr[i]))*sidedir[i];
+ } else {
+ b=corners[i]-(farr[i]/(farr[i+1]-farr[i]))*sidedir[i];
+ }
+ }
+ }
+ // Check(if logic is correct above, this will not happen)
+ if(count != 2) {
+ abort("Unexpected error in setcontour routine: odd number of"
+ +" crossings (linear case)");
+ }
+ }
+ boxcontour bc=boxcontour(line,a,b,0,0,0,1,1,i,j,index);
+ bd.data.push(bc);
+ return;
+ }
+
+ // Hyperbolic contour(s)
+ // Described in form: (x-x0)*(y-y0)=m
+ real x0=-ay/axy;
+ if(abs(x0-1) < eps) x0=1;
+ real y0=-ax/axy;
+ if(abs(y0-1) < eps) y0=1;
+ real m =ay*ax-a0*axy;
+ m=(abs(m) < eps) ? 0 : m/axy^2;
+
+ // Special case here: straight segments (possibly crossing)
+ if(m == 0) {
+ pair a,b;
+ int signx,signy;
+ // Assuming at least one corner is below contour level here
+ if(x0 == 0) {
+ signx=+1;
+ if(y0 == 0) {
+ a=(1,0);
+ b=(0,1);
+ signy=+1;
+ } else if(y0 == 1) {
+ a=(0,0);
+ b=(1,1);
+ signy=-1;
+ } else if(y0 < 0 || y0 > 1) {
+ a=(0,0);
+ b=(0,1);
+ signy=y0 > 0 ? -1 : +1;
+ } else {
+ if(f10 > 0) {
+ a=(1,y0);
+ b=(0,1);
+ signy=+1;
+ } else {
+ a=(0,0);
+ b=(1,y0);
+ signy=-1;
+ }
+ }
+ boxcontour bc=boxcontour(hyperbola,a,b,x0,y0,m,signx,signy,i,j,index);
+ bd.data.push(bc);
+ return;
+ } else if(x0 == 1) {
+ signx=-1;
+ if(y0 == 0) {
+ a=(1,1);
+ b=(0,0);
+ signy=+1;
+ } else if(y0 == 1) {
+ a=(0,1);
+ b=(1,0);
+ signy=-1;
+ } else if(y0 < 0 || y0 > 1) {
+ a=(1,1);
+ b=(1,0);
+ signy=y0 > 0 ? -1 : +1;
+ } else {
+ if(f01 > 0) {
+ a=(0,y0);
+ b=(1,0);
+ signy=-1;
+ } else {
+ a=(1,1);
+ b=(0,y0);
+ signy=+1;
+ }
+ }
+ boxcontour bc=boxcontour(hyperbola,a,b,x0,y0,m,signx,signy,i,j,index);
+ bd.data.push(bc);
+ return;
+ } else if(y0 == 0) {
+ signy=+1;
+ if(x0 < 0 || x0 > 1) {
+ a=(1,0);
+ b=(0,0);
+ signx=x0 > 0 ? -1 : +1;
+ } else {
+ if(f11 > 0) {
+ a=(x0,1);
+ b=(0,0);
+ signx=-1;
+ } else {
+ a=(1,0);
+ b=(x0,1);
+ signx=+1;
+ }
+ }
+ boxcontour bc=boxcontour(hyperbola,a,b,x0,y0,m,signx,signy,i,j,index);
+ bd.data.push(bc);
+ return;
+ } else if(y0 == 1) {
+ signy=-1;
+ if(x0 < 0 || x0 > 1) {
+ a=(0,1);
+ b=(1,1);
+ signx=x0 > 0 ? -1 : +1;
+ } else {
+ if(f00 > 0) {
+ a=(x0,0);
+ b=(1,1);
+ signx=+1;
+ } else {
+ a=(0,1);
+ b=(x0,0);
+ signx=-1;
+ }
+ }
+ boxcontour bc=boxcontour(hyperbola,a,b,x0,y0,m,signx,signy,i,j,index);
+ bd.data.push(bc);
+ return;
+ } else if(x0 < 0 || x0 > 1) {
+ signx=x0 > 0 ? -1 : +1;
+ if(f00 > 0) {
+ a=(1,y0);
+ b=(0,y0);
+ signy=+1;
+ } else {
+ a=(0,y0);
+ b=(1,y0);
+ signy=-1;
+ }
+ boxcontour bc=boxcontour(hyperbola,a,b,x0,y0,m,signx,signy,i,j,index);
+ bd.data.push(bc);
+ return;
+ } else if(y0 < 0 || y0 > 1) {
+ signy=y0 > 0 ? -1 : +1;
+ if(f00 > 0) {
+ a=(x0,0);
+ b=(x0,1);
+ signx=+1;
+ } else {
+ a=(x0,1);
+ b=(x0,0);
+ signx=-1;
+ }
+ boxcontour bc=boxcontour(hyperbola,a,b,x0,y0,m,signx,signy,i,j,index);
+ bd.data.push(bc);
+ return;
} else {
- if(v2 < -eps) return case3(p0,p2,p1,v0,v2,v1);
- else if(v2 <= eps) return dflt; // nothing to do
- else return dflt; // nothing to do
- }
- }
-}
+ if(f10 > 0) {
+ a=(0,y0);
+ b=(x0,0);
+ boxcontour bc=boxcontour(hyperbola,a,b,x0,y0,m,-1,-1,i,j,index);
+ bd.data.push(bc);
+ a=(1,y0);
+ b=(x0,1);
+ bc=boxcontour(hyperbola,a,b,x0,y0,m,+1,+1,i,j,index);
+ bd.data.push(bc);
+ return;
+ } else {
+ a=(x0,0);
+ b=(1,y0);
+ boxcontour bc=boxcontour(hyperbola,a,b,x0,y0,m,+1,-1,i,j,index);
+ bd.data.push(bc);
+ a=(x0,1);
+ b=(0,y0);
+ bc=boxcontour(hyperbola,a,b,x0,y0,m,-1,+1,i,j,index);
+ bd.data.push(bc);
+ return;
+ }
+ }
+ }
+
+ // General hyperbola case
+ int signc=(F(x0,y0) > 0) ? +1 : -1;
+
+ pair[] points;
+
+ real xB=(y0 == 0) ? infinity : x0-m/y0;
+ if(abs(xB) < eps) xB=0;
+ if(xB >= 0 && xB <= 1-eps) points.push((xB,0));
-// Collect connecting path segments.
-private void collect(pair[][][] points, real[] c)
-{
- // use to reverse an array, omitting the first point
- int[] reverseF(int n) {return sequence(new int(int x){return n-1-x;},n-1);}
- // use to reverse an array, omitting the last point
- int[] reverseL(int n) {return sequence(new int(int x){return n-2-x;},n-1);}
+ real xT=(y0 == 1) ? infinity : x0+m/(1-y0);
+ if(abs(xT-1) < eps) xT=1;
+ if(xT >= eps && xT <= 1) points.push((xT,1));
+
+ real yL=(x0 == 0) ? infinity : y0-m/x0;
+ if(abs(yL-1) < eps) yL=1;
- for(int cnt=0; cnt < c.length; ++cnt) {
- pair[][] gdscnt=points[cnt];
- for(int i=0; i < gdscnt.length; ++i) {
- pair[] gig=gdscnt[i];
- int Li=gig.length;
- for(int j=i+1; j < gdscnt.length; ++j) {
- pair[] gjg=gdscnt[j];
- int Lj=gjg.length;
- if(abs(gig[0]-gjg[0]) < eps) {
- gdscnt[j]=gjg[reverseF(Lj)];
- gdscnt[j].append(gig);
- gdscnt.delete(i);
- --i;
- break;
- } else if(abs(gig[0]-gjg[Lj-1]) < eps) {
- gig.delete(0);
- gdscnt[j].append(gig);
- gdscnt.delete(i);
- --i;
- break;
- } else if(abs(gig[Li-1]-gjg[0]) < eps) {
- gjg.delete(0);
- gig.append(gjg);
- gdscnt[j]=gig;
- gdscnt.delete(i);
- --i;
- break;
- } else if(abs(gig[Li-1]-gjg[Lj-1]) < eps) {
- gig.append(gjg[reverseL(Lj)]);
- gdscnt[j]=gig;
- gdscnt.delete(i);
- --i;
- break;
- }
+ if(yL > eps && yL <= 1) points.push((0,yL));
+
+ real yR=(x0 == 1) ? infinity : y0+m/(1-x0);
+ if(abs(yR) < eps) yR=0;
+ if(yR >= 0 && yR <= 1-eps) points.push((1,yR));
+
+ // Check (if logic is correct above, this will not happen)
+ if(!(points.length == 2 || points.length == 4)) {
+ abort("Unexpected error in setcontour routine: odd number of"
+ +" crossings (hyperbolic case)");
+ }
+
+ // Lower left side
+ if((x0 > 0) && (y0 > 0) && (f00*signc < 0)) {
+ pair[] pts0;
+ for(int i=0; i < points.length; ++i) {
+ if((points[i].x < x0) && (points[i].y < y0)) {
+ pts0.push(points[i]);
+ }
+ }
+ if(pts0.length == 2) {
+ pair a0,b0;
+ if((f00 > 0) ^(pts0[0].x < pts0[1].x)) {
+ a0=pts0[0];
+ b0=pts0[1];
+ } else {
+ a0=pts0[1];
+ b0=pts0[0];
+ }
+ boxcontour bc=boxcontour(hyperbola,a0,b0,x0,y0,m,-1,-1,i,j,index);
+ bd.data.push(bc);
+ }
+ }
+
+ // Lower right side
+ if((x0 < 1) && (y0 > 0) && (f10*signc < 0)) {
+ pair[] pts0;
+ for(int i=0; i < points.length; ++i) {
+ if((points[i].x > x0) && (points[i].y < y0)) {
+ pts0.push(points[i]);
+ }
+ }
+ if(pts0.length == 2) {
+ pair a0,b0;
+ if((f10 > 0) ^(pts0[0].x < pts0[1].x)) {
+ a0=pts0[0];
+ b0=pts0[1];
+ } else {
+ a0=pts0[1];
+ b0=pts0[0];
+ }
+ boxcontour bc=boxcontour(hyperbola,a0,b0,x0,y0,m,+1,-1,i,j,index);
+ bd.data.push(bc);
+ }
+ }
+
+ // Upper right side
+ if((x0 < 1) && (y0 < 1) && (f11*signc < 0)) {
+ pair[] pts0;
+ for(int i=0; i < points.length; ++i) {
+ if((points[i].x > x0) && (points[i].y > y0)) {
+ pts0.push(points[i]);
+ }
+ }
+ if(pts0.length == 2) {
+ pair a0,b0;
+ if((f11 > 0) ^(pts0[0].x > pts0[1].x)) {
+ a0=pts0[0];
+ b0=pts0[1];
+ } else {
+ a0=pts0[1];
+ b0=pts0[0];
}
+ boxcontour bc=boxcontour(hyperbola,a0,b0,x0,y0,m,+1,+1,i,j,index);
+ bd.data.push(bc);
}
}
+
+ // Upper left side
+ if((x0 > 0) && (y0 < 1) && (f01*signc < 0)) {
+ pair[] pts0;
+ for(int i=0; i < points.length; ++i) {
+ if((points[i].x < x0) && (points[i].y > y0)) {
+ pts0.push(points[i]);
+ }
+ }
+ if(pts0.length == 2) {
+ pair a0,b0;
+ if((f01 > 0) ^(pts0[0].x > pts0[1].x)) {
+ a0=pts0[0];
+ b0=pts0[1];
+ } else {
+ a0=pts0[1];
+ b0=pts0[0];
+ }
+ boxcontour bc=boxcontour(hyperbola,a0,b0,x0,y0,m,-1,+1,i,j,index);
+ bd.data.push(bc);
+ }
+ }
+ return;
}
-// Join path segments.
-private guide[][] connect(pair[][][] points, real[] c, interpolate join)
-{
- // set up return value
- guide[][] result=new guide[c.length][];
- for(int cnt=0; cnt < c.length; ++cnt) {
- pair[][] pointscnt=points[cnt];
- guide[] resultcnt=result[cnt]=new guide[pointscnt.length];
- for(int i=0; i < pointscnt.length; ++i) {
- pair[] pts=pointscnt[i];
- guide gd;
- if(pts.length > 0) {
- if(pts.length > 1 && abs(pts[0]-pts[pts.length-1]) < eps) {
- guide[] g=sequence(new guide(int i) {
- return pts[i];
- },pts.length-1);
- g.push(cycle);
- gd=join(...g);
- } else
- gd=join(...sequence(new guide(int i) {
- return pts[i];
- },pts.length));
+
+// Checks if end of first contour segment matches the beginning of
+// the second.
+private bool connected(boxcontour bc1, boxcontour bc2) {
+ return abs(bc2.a-bc1.b+(bc2.i-bc1.i,bc2.j-bc1.j)) < eps;
+}
+
+// Returns index of first active element in bca that with beginning
+// that connects to the end of bc, or -1 if no such element.
+private int connectedindex(boxcontour bc, boxcontour[] bca,
+ bool activeonly=true) {
+ for(int i=0; i < bca.length; ++i) {
+ if(!bca[i].active) continue;
+ if(connected(bc,bca[i])) {
+ return i;
+ }
+ }
+ return -1;
+}
+
+// Returns index of first active element in bca with end that connects
+// to the start of bc, or -1 if no such element.
+private int connectedindex(boxcontour[] bca, boxcontour bc,
+ bool activeonly=true) {
+ for(int i=0; i < bca.length; ++i) {
+ if(!bca[i].active) continue;
+ if(connected(bca[i],bc)) {
+ return i;
+ }
+ }
+ return -1;
+}
+
+
+// Processes indices for grid regions touching the
+// end/start (forward=true/false) of the contour segment
+private void searchindex(boxcontour bc, bool forward, void f(int i, int j)) {
+ pair z=forward ? bc.b : bc.a;
+
+ int i=bc.i;
+ int j=bc.j;
+
+ if(z == (0,0)) f(i-1,j-1);
+ if(z.y == 0) f(i,j-1);
+ if(z == (1,0)) f(i+1,j-1);
+ if(z.x == 1) f(i+1,j);
+ if(z == (1,1)) f(i+1,j+1);
+ if(z.y == 1) f(i,j+1);
+ if(z == (0,1)) f(i-1,j+1);
+ if(z.x == 0) f(i-1,j);
+}
+
+// Contour segment
+private struct segment {
+ gridpoint[] data;
+ void operator init() {
+ }
+ void operator init(boxcontour bc, int subsample=1) {
+ bc.active=false;
+ this.data.append(bc.points(subsample,first=true,last=true));
+ }
+ void operator init(int i, int j, pair z) {
+ gridpoint gp=gridpoint(i,j,z);
+ data.push(gp);
+ }
+ void operator init(gridpoint[] gp) {
+ this.data.append(gp);
+ }
+ gridpoint start() {
+ if(data.length == 0) {
+ return gridpoint(-1,-1,(-infinity,-infinity));
+ }
+ gridpoint gp=data[0];
+ return gridpoint(gp.i,gp.j,gp.z);
+ }
+ gridpoint end() {
+ if(data.length == 0) {
+ return gridpoint(-1,-1,(-infinity,-infinity));
+ }
+ gridpoint gp=data[data.length-1];
+ return gridpoint(gp.i,gp.j,gp.z);
+ }
+ bool closed() {
+ return same(this.start(),this.end());
+ }
+ void append(boxcontour bc, int subsample=1) {
+ bc.active=false;
+ data.append(bc.points(subsample,first=false,last=true));
+ }
+ void prepend(boxcontour bc, int subsample=1) {
+ bc.active=false;
+ data.insert(0 ... bc.points(subsample,first=true,last=false));
+ }
+ void append(int i, int j, pair z) {
+ gridpoint gp=gridpoint(i,j,z);
+ data.push(gp);
+ }
+ void prepend(int i, int j, pair z) {
+ gridpoint gp=gridpoint(i,j,z);
+ data.insert(0,gp);
+ }
+ segment copy() {
+ segment seg=new segment;
+ seg.data=new gridpoint[data.length];
+ for(int i=0; i < data.length; ++i) {
+ seg.data[i]=gridpoint(data[i].i,data[i].j,data[i].z);
+ }
+ return seg;
+ }
+ segment reversecopy() {
+ segment seg=new segment;
+ seg.data=new gridpoint[data.length];
+ for(int i=0; i < data.length; ++i) {
+ seg.data[data.length-i-1]=gridpoint(data[i].i,data[i].j,data[i].z);
+ }
+ return seg;
+ }
+}
+
+// Container to hold edge and border segments that form one continuous line
+private struct Segment {
+ segment[] edges;
+ segment[] borders;
+ void operator init() {
+ }
+ void operator init(segment seg) {
+ edges.push(seg);
+ }
+ void operator init(gridpoint[] gp) {
+ segment seg=segment(gp);
+ edges.push(seg);
+ }
+ gridpoint start() {
+ if(edges.length == 0) {
+ if(borders.length > 0) {
+ return borders[0].start();
}
- resultcnt[i]=gd;
+ return gridpoint(-1,-1,(-infinity,-infinity));
}
+ return edges[0].start();
+ }
+ gridpoint end() {
+ if(edges.length == 0 && borders.length == 0) {
+ return gridpoint(-1,-1,(-infinity,-infinity));
+ }
+ if(edges.length > borders.length) {
+ return edges[edges.length-1].end();
+ } else {
+ return borders[borders.length-1].end();
+ }
+ }
+ bool closed() {
+ return same(this.start(),this.end());
+ }
+ void addedge(segment seg) {
+ edges.push(seg);
+ }
+ void addedge(gridpoint[] gp) {
+ segment seg=segment(gp);
+ edges.push(seg);
+ }
+ void addborder(segment seg) {
+ borders.push(seg);
+ }
+ void addborder(gridpoint[] gp) {
+ segment seg=segment(gp);
+ borders.push(seg);
+ }
+ void append(Segment S) {
+ edges.append(S.edges);
+ borders.append(S.borders);
}
- return result;
}
+private Segment[] Segment(segment[] s)
+{
+ return sequence(new Segment(int i) {return Segment(s[i]);},s.length);
+}
-// Return contour guides for a 2D data array.
-// z: two-dimensional array of nonoverlapping mesh points
+private Segment[][] Segment(segment[][] s)
+{
+ Segment[][] S=new Segment[s.length][];
+ for(int i=0; i < s.length; ++i)
+ S[i]=Segment(s[i]);
+ return S;
+}
+
+// Return contour points for a 2D data array.
// f: two-dimensional array of corresponding f(z) data values
-// midpoint: optional array containing values of f at cell midpoints
// c: array of contour values
-// join: interpolation operator (e.g. operator -- or operator ..)
-guide[][] contour(pair[][] z, real[][] f,
- real[][] midpoint=new real[][], real[] c,
- interpolate join=operator --)
+// subsample: number of points to use in each box in addition to endpoints
+segment[][] contouredges(real[][] f, real[] c, int subsample=1)
{
- int nx=z.length-1;
- if(nx == 0)
- abort("array z must have length >= 2");
- int ny=z[0].length-1;
- if(ny == 0)
- abort("array z[0] must have length >= 2");
+ int nx=f.length-1;
+ if(nx <= 0)
+ abort("array f must have length >= 2");
+ int ny=f[0].length-1;
+ if(ny <= 0)
+ abort("array f[0] must have length >= 2");
c=sort(c);
- bool midpoints=midpoint.length > 0;
+ boxdata[][] bd=new boxdata[nx][ny];
+
+ segment[][] result=new segment[c.length][];
- segment segments[][][]=new segment[nx][ny][];
-
- // go over region a rectangle at a time
for(int i=0; i < nx; ++i) {
- pair[] zi=z[i];
- pair[] zp=z[i+1];
+ boxdata[] bdi=bd[i];
real[] fi=f[i];
real[] fp=f[i+1];
- real[] midpointi;
- if(midpoints) midpointi=midpoint[i];
- segment[][] segmentsi=segments[i];
+
for(int j=0; j < ny; ++j) {
- segment[] segmentsij=segmentsi[j];
-
- // define points
- pair bleft=zi[j];
- pair bright=zp[j];
- pair tleft=zi[j+1];
- pair tright=zp[j+1];
- pair middle=0.25*(bleft+bright+tleft+tright);
-
- real f00=fi[j];
- real f01=fi[j+1];
- real f10=fp[j];
- real f11=fp[j+1];
- real fmm=midpoints ? midpoint[i][j] : 0.25*(f00+f01+f10+f11);
-
- // optimization: we make sure we don't work with empty rectangles
+ boxdata bdij=bdi[j]=boxdata(fi[j],fp[j],fi[j+1],fp[j+1]);
+
int checkcell(int cnt) {
real C=c[cnt];
- real vertdat0=f00-C; // bottom-left vertex
- real vertdat1=f10-C; // bottom-right vertex
- real vertdat2=f01-C; // top-left vertex
- real vertdat3=f11-C; // top-right vertex
+
+ real f00=fi[j];
+ real f10=fp[j];
+ real f01=fi[j+1];
+ real f11=fp[j+1];
+
+ real epsf=eps*max(abs(f00),abs(f10),abs(f01),abs(f11),abs(C));
+
+ f00=f00-C;
+ f10=f10-C;
+ f01=f01-C;
+ f11=f11-C;
+
+ if(abs(f00) < epsf) f00=0;
+ if(abs(f10) < epsf) f10=0;
+ if(abs(f01) < epsf) f01=0;
+ if(abs(f11) < epsf) f11=0;
+
- // optimization: we make sure we don't work with empty rectangles
int countm=0;
int countz=0;
int countp=0;
-
+
void check(real vertdat) {
- if(vertdat < -eps) ++countm;
+ if(vertdat < -eps)++countm;
else {
- if(vertdat <= eps) ++countz;
- else ++countp;
+ if(vertdat <= eps)++countz;
+ else++countp;
}
}
- check(vertdat0);
- check(vertdat1);
- check(vertdat2);
- check(vertdat3);
+ check(f00);
+ check(f10);
+ check(f01);
+ check(f11);
if(countm == 4) return 1; // nothing to do
if(countp == 4) return -1; // nothing to do
if((countm == 3 || countp == 3) && countz == 1) return 0;
- // go through the triangles
-
- void addseg(segment seg) {
- if(seg.active) {
- seg.c=cnt;
- segmentsij.push(seg);
- }
- }
- real vertdat4=fmm-C;
- addseg(checktriangle(bright,tright,middle,
- vertdat1,vertdat3,vertdat4,0));
- addseg(checktriangle(tright,tleft,middle,
- vertdat3,vertdat2,vertdat4,1));
- addseg(checktriangle(tleft,bleft,middle,
- vertdat2,vertdat0,vertdat4,2));
- addseg(checktriangle(bleft,bright,middle,
- vertdat0,vertdat1,vertdat4,3));
+ // Calculate individual box contours
+ bdij.settype(C);
+ if(bdij.type == edge)
+ setcontour(f00,f10,f01,f11,epsf,bdij,i,j,cnt);
return 0;
}
-
+
void process(int l, int u) {
if(l >= u) return;
int i=quotient(l+u,2);
@@ -313,150 +928,171 @@ guide[][] contour(pair[][] z, real[][] f,
process(i+1,u);
}
}
-
+
process(0,c.length);
}
}
-
- // set up return value
- pair[][][] points=new pair[c.length][][];
-
+
+ // Find contours and follow them
for(int i=0; i < nx; ++i) {
- segment[][] segmentsi=segments[i];
+ boxdata[] bdi=bd[i];
for(int j=0; j < ny; ++j) {
- segment[] segmentsij=segmentsi[j];
- for(int k=0; k < segmentsij.length; ++k) {
- segment C=segmentsij[k];
-
- if(!C.active) continue;
-
- pair[] g=new pair[] {C.a,C.b};
- segmentsij[k].active=false;
-
- int forward(int I, int J, bool first=true) {
- if(I >= 0 && I < nx && J >= 0 && J < ny) {
- segment[] segmentsIJ=segments[I][J];
- for(int l=0; l < segmentsIJ.length; ++l) {
- segment D=segmentsIJ[l];
- if(!D.active) continue;
- if(abs(D.a-g[g.length-1]) < eps) {
- g.push(D.b);
- segmentsIJ[l].active=false;
- if(D.edge >= 0 && !first) return D.edge;
- first=false;
- l=-1;
- } else if(abs(D.b-g[g.length-1]) < eps) {
- g.push(D.a);
- segmentsIJ[l].active=false;
- if(D.edge >= 0 && !first) return D.edge;
- first=false;
- l=-1;
- }
- }
- }
- return -1;
- }
-
- int backward(int I, int J, bool first=true) {
- if(I >= 0 && I < nx && J >= 0 && J < ny) {
- segment[] segmentsIJ=segments[I][J];
- for(int l=0; l < segmentsIJ.length; ++l) {
- segment D=segmentsIJ[l];
- if(!D.active) continue;
- if(abs(D.a-g[0]) < eps) {
- g.insert(0,D.b);
- segmentsIJ[l].active=false;
- if(D.edge >= 0 && !first) return D.edge;
- first=false;
- l=-1;
- } else if(abs(D.b-g[0]) < eps) {
- g.insert(0,D.a);
- segmentsIJ[l].active=false;
- if(D.edge >= 0 && !first) return D.edge;
- first=false;
- l=-1;
+ boxdata bd0=bdi[j];
+ if(bd0.count() == 0) continue;
+ for(int k=0; k < bd0.count(); ++k) {
+ boxcontour bc0=bd0.data[k];
+
+ if(!bc0.active) continue;
+
+ // Note: boxcontour set inactive when added to segment
+ segment seg=segment(bc0,subsample);
+
+ // Forward direction
+ bool foundnext=true;
+ while(foundnext) {
+ foundnext=false;
+ searchindex(bc0,true,new void(int i, int j) {
+ if((i >= 0) && (i < nx) && (j >= 0) && (j < ny)) {
+ boxcontour[] data=bd[i][j].data;
+ int k0=connectedindex(bc0,data);
+ if(k0 >= 0) {
+ bc0=data[k0];
+ seg.append(bc0,subsample);
+ foundnext=true;
+ }
}
- }
- }
- return -1;
+ });
}
-
- void follow(int f(int, int, bool first=true), int edge) {
- int I=i;
- int J=j;
- while(true) {
- static int ix[]={1,0,-1,0};
- static int iy[]={0,1,0,-1};
- if(edge >= 0 && edge < 4) {
- I += ix[edge];
- J += iy[edge];
- edge=f(I,J);
- } else {
- if(edge == -1) break;
- if(edge < 9) {
- int edge0=(edge-5) % 4;
- int edge1=(edge-4) % 4;
- int ix0=ix[edge0];
- int iy0=iy[edge0];
- I += ix0;
- J += iy0;
- // Search all 3 corner cells
- if((edge=f(I,J)) == -1) {
- I += ix[edge1];
- J += iy[edge1];
- if((edge=f(I,J)) == -1) {
- I -= ix0;
- J -= iy0;
- edge=f(I,J);
- }
- }
- } else {
- // Double-vertex edge: search all 8 surrounding cells
- void search() {
- for(int i=-1; i <= 1; ++i) {
- for(int j=-1; j <= 1; ++j) {
- if((edge=f(I+i,J+j,false)) >= 0) {
- I += i;
- J += j;
- return;
- }
- }
- }
+
+ // Backward direction
+ bc0=bd0.data[k];
+ bool foundprev=true;
+ while(foundprev) {
+ foundprev=false;
+ searchindex(bc0,false,new void(int i, int j) {
+ if((i >= 0) && (i < nx) && (j >= 0) && (j < ny)) {
+ boxcontour[] data=bd[i][j].data;
+ int k0=connectedindex(data,bc0);
+ if(k0 >= 0) {
+ bc0=data[k0];
+ seg.prepend(bc0,subsample);
+ foundprev=true;
}
- search();
}
- }
- }
+ });
}
- // Follow contour in cell
- int edge=forward(i,j,first=false);
-
- // Follow contour forward outside of cell
- follow(forward,edge);
-
- // Follow contour backward outside of cell
- follow(backward,C.edge);
-
- points[C.c].push(g);
+ result[bc0.index].push(seg);
}
}
}
+
+ // Note: every segment here _should_ be cyclic or terminate on the
+ // boundary
+ return result;
+}
+
+// Connect contours into guides.
+// Same initial/final points indicates a closed path.
+// Borders are always joined using--.
+private guide connect(Segment S, pair[][] z, interpolate join)
+{
+ pair loc(gridpoint gp) {
+ pair offset=z[gp.i][gp.j];
+ pair size=z[gp.i+1][gp.j+1]-z[gp.i][gp.j];
+ return offset+(size.x*gp.z.x,size.y*gp.z.y);
+ }
+ pair[] loc(gridpoint[] gp) {
+ pair[] result=new pair[gp.length];
+ for(int i; i < gp.length; ++i) {
+ result[i]=loc(gp[i]);
+ }
+ return result;
+ }
+
+ bool closed=S.closed();
+
+ pair[][] edges=new pair[S.edges.length][];
+ for(int i; i < S.edges.length; ++i) {
+ edges[i]=loc(S.edges[i].data);
+ }
+ pair[][] borders=new pair[S.borders.length][];
+ for(int i; i < S.borders.length; ++i) {
+ borders[i]=loc(S.borders[i].data);
+ }
+
+ if(edges.length == 0 && borders.length == 1) {
+ guide g=operator--(...borders[0]);
+ if(closed) g=g--cycle;
+ return g;
+ }
+
+ if(edges.length == 1 && borders.length == 0) {
+ pair[] pts=edges[0];
+ if(closed) pts.delete(pts.length-1);
+ guide g=join(...pts);
+ if(closed) g=join(g,cycle);
+ return g;
+ }
+
+ guide[] ge=new guide[edges.length];
+ for(int i=0; i < ge.length; ++i)
+ ge[i]=join(...edges[i]);
+
+ guide[] gb=new guide[borders.length];
+ for(int i=0; i < gb.length; ++i)
+ gb[i]=operator--(...borders[i]);
+
+ guide g=ge[0];
+ if(0 < gb.length) g=g&gb[0];
+ for(int i=1; i < ge.length; ++i) {
+ g=g&ge[i];
+ if(i < gb.length) g=g&gb[i];
+ }
+ if(closed) g=g&cycle;
+ return g;
+}
- collect(points,c); // Required to join remaining case1 cycles.
+// Connect contours into guides.
+private guide[] connect(Segment[] S, pair[][] z, interpolate join)
+{
+ return sequence(new guide(int i) {return connect(S[i],z,join);},S.length);
+}
- return connect(points,c,join);
+// Connect contours into guides.
+private guide[][] connect(Segment[][] S, pair[][] z, interpolate join)
+{
+ guide[][] result=new guide[S.length][];
+ for(int i=0; i < S.length; ++i) {
+ result[i]=connect(S[i],z,join);
+ }
+ return result;
+}
+
+// Return contour guides for a 2D data array.
+// z: two-dimensional array of nonoverlapping mesh points
+// f: two-dimensional array of corresponding f(z) data values
+// c: array of contour values
+// join: interpolation operator (e.g. operator--or operator ..)
+// subsample: number of interior points to include in each grid square
+// (in addition to points on edge)
+guide[][] contour(pair[][] z, real[][] f, real[] c,
+ interpolate join=operator--, int subsample=1)
+{
+ segment[][] seg=contouredges(f,c,subsample);
+ Segment[][] Seg=Segment(seg);
+ return connect(Seg,z,join);
}
// Return contour guides for a 2D data array on a uniform lattice
// f: two-dimensional array of real data values
-// midpoint: optional array containing data values at cell midpoints
// a,b: diagonally opposite vertices of rectangular domain
// c: array of contour values
-// join: interpolation operator (e.g. operator -- or operator ..)
-guide[][] contour(real[][] f, real[][] midpoint=new real[][],
- pair a, pair b, real[] c,
- interpolate join=operator --)
+// join: interpolation operator (e.g. operator--or operator ..)
+// subsample: number of interior points to include in each grid square
+// (in addition to points on edge)
+guide[][] contour(real[][] f, pair a, pair b, real[] c,
+ interpolate join=operator--, int subsample=1)
{
int nx=f.length-1;
if(nx == 0)
@@ -473,37 +1109,43 @@ guide[][] contour(real[][] f, real[][] midpoint=new real[][],
zi[j]=(xi,interp(a.y,b.y,j/ny));
}
}
- return contour(z,f,midpoint,c,join);
+ return contour(z,f,c,join,subsample);
}
// return contour guides for a real-valued function
-// f: real-valued function of two real variables
-// a,b: diagonally opposite vertices of rectangular domain
-// c: array of contour values
-// nx,ny: number of subdivisions in x and y directions (determines accuracy)
-// join: interpolation operator (e.g. operator -- or operator ..)
+// f: real-valued function of two real variables
+// a,b: diagonally opposite vertices of rectangular domain
+// c: array of contour values
+// nx,ny: number of subdivisions in x and y directions(determines accuracy)
+// join: interpolation operator (e.g. operator--or operator ..)
+// subsample: number of interior points to include in each grid square
+// (in addition to points on edge)
guide[][] contour(real f(real, real), pair a, pair b,
real[] c, int nx=ngraph, int ny=nx,
- interpolate join=operator --)
+ interpolate join=operator--, int subsample=1)
{
- // evaluate function at points and midpoints
+ // evaluate function at points and subsample
real[][] dat=new real[nx+1][ny+1];
- real[][] midpoint=new real[nx+1][ny+1];
for(int i=0; i <= nx; ++i) {
real x=interp(a.x,b.x,i/nx);
- real x2=interp(a.x,b.x,(i+0.5)/nx);
real[] dati=dat[i];
- real[] midpointi=midpoint[i];
for(int j=0; j <= ny; ++j) {
dati[j]=f(x,interp(a.y,b.y,j/ny));
- midpointi[j]=f(x2,interp(a.y,b.y,(j+0.5)/ny));
}
}
- return contour(dat,midpoint,a,b,c,join);
+ return contour(dat,a,b,c,join,subsample);
}
-
+
+guide[][] contour(real f(pair), pair a, pair b,
+ real[] c, int nx=ngraph, int ny=nx,
+ interpolate join=operator--, int subsample=1)
+{
+ return contour(new real(real x, real y) {return f((x,y));},
+ a,b,c,nx,ny,join,subsample);
+}
+
void draw(picture pic=currentpicture, Label[] L=new Label[],
guide[][] g, pen[] p)
{
@@ -530,6 +1172,239 @@ void draw(picture pic=currentpicture, Label[] L=new Label[],
draw(pic,L,g,sequence(new pen(int) {return p;},g.length));
}
+// Draw the contour
+void draw(picture pic=currentpicture, Label L,
+ guide[] g, pen p=currentpen)
+{
+ draw(pic,g,p);
+ for(int i=0; i < g.length; ++i) {
+ if(L.s != "" && size(g[i]) > 1) {
+ label(pic,L,g[i],p);
+ }
+ }
+}
+
+/* CONTOURS FOR IRREGULARLY SPACED POINTS */
+//
+// +---------+
+// |\ /|
+// | \ / |
+// | \ / |
+// | \ / |
+// | X |
+// | / \ |
+// | / \ |
+// | / \ |
+// |/ \|
+// +---------+
+//
+
+// Is triangle p0--p1--p2--cycle counterclockwise ?
+private bool isCCW(pair p0, pair p1, pair p2) {return side(p0,p1,p2) < 0;}
+
+private struct segment
+{
+ bool active;
+ bool reversed; // True if lower values are to the left along line a--b.
+ pair a,b; // Endpoints; a is always an edge point if one exists.
+ int c; // Contour value.
+}
+
+// Case 1: line passes through two vertices of a triangle
+private segment case1(pair p0, pair p1, pair p2,
+ real v0, real v1, real v2)
+{
+ // Will cause a duplicate guide; luckily case1 is rare
+ segment rtrn;
+ rtrn.active=true;
+ rtrn.a=p0;
+ rtrn.b=p1;
+ rtrn.reversed=(isCCW(p0,p1,p2) ^(v2 > 0));
+ return rtrn;
+}
+
+// Cases 2 and 3: line passes through a vertex and a side of a triangle
+//(the first vertex passed and the side between the other two)
+private segment case2(pair p0, pair p1, pair p2,
+ real v0, real v1, real v2)
+{
+ segment rtrn;
+ rtrn.active=true;
+ pair val=interp(p1,p2,abs(v1/(v2-v1)));
+ rtrn.a=val;
+ rtrn.b=p0;
+ rtrn.reversed=!(isCCW(p0,p1,p2) ^(v2 > 0));
+ return rtrn;
+}
+
+private segment case3(pair p0, pair p1, pair p2,
+ real v0, real v1, real v2)
+{
+ segment rtrn;
+ rtrn.active=true;
+ pair val=interp(p1,p2,abs(v1/(v2-v1)));
+ rtrn.a=p0;
+ rtrn.b=val;
+ rtrn.reversed=(isCCW(p0,p1,p2) ^(v2 > 0));
+ return rtrn;
+}
+
+// Case 4: line passes through two sides of a triangle
+//(through the sides formed by the first&second, and second&third vertices)
+private segment case4(pair p0, pair p1, pair p2,
+ real v0, real v1, real v2)
+{
+ segment rtrn;
+ rtrn.active=true;
+ rtrn.a=interp(p1,p0,abs(v1/(v0-v1)));
+ rtrn.b=interp(p1,p2,abs(v1/(v2-v1)));
+ rtrn.reversed=(isCCW(p0,p1,p2) ^(v2 > 0));
+ return rtrn;
+}
+
+// Check if a line passes through a triangle, and draw the required line.
+private segment checktriangle(pair p0, pair p1, pair p2,
+ real v0, real v1, real v2)
+{
+ // default null return
+ static segment dflt;
+
+ real eps=eps*max(abs(v0),abs(v1),abs(v2),1);
+
+ if(v0 < -eps) {
+ if(v1 < -eps) {
+ if(v2 < -eps) return dflt; // nothing to do
+ else if(v2 <= eps) return dflt; // nothing to do
+ else return case4(p0,p2,p1,v0,v2,v1);
+ } else if(v1 <= eps) {
+ if(v2 < -eps) return dflt; // nothing to do
+ else if(v2 <= eps) return case1(p1,p2,p0,v1,v2,v0);
+ else return case3(p1,p0,p2,v1,v0,v2);
+ } else {
+ if(v2 < -eps) return case4(p0,p1,p2,v0,v1,v2);
+ else if(v2 <= eps)
+ return case2(p2,p0,p1,v2,v0,v1);
+ else return case4(p1,p0,p2,v1,v0,v2);
+ }
+ } else if(v0 <= eps) {
+ if(v1 < -eps) {
+ if(v2 < -eps) return dflt; // nothing to do
+ else if(v2 <= eps) return case1(p0,p2,p1,v0,v2,v1);
+ else return case2(p0,p1,p2,v0,v1,v2);
+ } else if(v1 <= eps) {
+ if(v2 < -eps) return case1(p0,p1,p2,v0,v1,v2);
+ else if(v2 <= eps) return dflt; // use finer partitioning.
+ else return case1(p0,p1,p2,v0,v1,v2);
+ } else {
+ if(v2 < -eps) return case2(p0,p1,p2,v0,v1,v2);
+ else if(v2 <= eps) return case1(p0,p2,p1,v0,v2,v1);
+ else return dflt; // nothing to do
+ }
+ } else {
+ if(v1 < -eps) {
+ if(v2 < -eps) return case4(p1,p0,p2,v1,v0,v2);
+ else if(v2 <= eps)
+ return case2(p2,p0,p1,v2,v0,v1);
+ else return case4(p0,p1,p2,v0,v1,v2);
+ } else if(v1 <= eps) {
+ if(v2 < -eps) return case3(p1,p0,p2,v1,v0,v2);
+ else if(v2 <= eps) return case1(p1,p2,p0,v1,v2,v0);
+ else return dflt; // nothing to do
+ } else {
+ if(v2 < -eps) return case4(p0,p2,p1,v0,v2,v1);
+ else if(v2 <= eps) return dflt; // nothing to do
+ else return dflt; // nothing to do
+ }
+ }
+}
+
+// Collect connecting path segments.
+private void collect(pair[][][] points, real[] c)
+{
+ for(int cnt=0; cnt < c.length; ++cnt) {
+ pair[][] gdscnt=points[cnt];
+ for(int i=0; i < gdscnt.length; ++i) {
+ pair[] gig=gdscnt[i];
+ int Li=gig.length;
+ for(int j=i+1; j < gdscnt.length; ++j) {
+ pair[] gjg=gdscnt[j];
+ int Lj=gjg.length;
+ if(abs(gig[0]-gjg[Lj-1]) < eps) {
+ gig.delete(0);
+ gdscnt[j].append(gig);
+ gdscnt.delete(i);
+ --i;
+ break;
+ } else if(abs(gig[Li-1]-gjg[0]) < eps) {
+ gjg.delete(0);
+ gig.append(gjg);
+ gdscnt[j]=gig;
+ gdscnt.delete(i);
+ --i;
+ break;
+ }
+ }
+ }
+ }
+}
+
+// Join path segments.
+private guide[][] connect(pair[][][] points, real[] c, interpolate join)
+{
+ // set up return value
+ guide[][] result=new guide[c.length][];
+ for(int cnt=0; cnt < c.length; ++cnt) {
+ pair[][] pointscnt=points[cnt];
+ guide[] resultcnt=result[cnt]=new guide[pointscnt.length];
+ for(int i=0; i < pointscnt.length; ++i) {
+ pair[] pts=pointscnt[i];
+ guide gd;
+ if(pts.length > 0) {
+ if(pts.length > 1 && abs(pts[0]-pts[pts.length-1]) < eps) {
+ guide[] g=sequence(new guide(int i) {
+ return pts[i];
+ },pts.length-1);
+ g.push(cycle);
+ gd=join(...g);
+ } else
+ gd=join(...sequence(new guide(int i) {
+ return pts[i];
+ },pts.length));
+ }
+ resultcnt[i]=gd;
+ }
+ }
+ return result;
+}
+
+guide[][] contour(pair[] z, real[] f, real[] c, interpolate join=operator--)
+{
+ if(z.length != f.length)
+ abort("z and f arrays have different lengths");
+
+ int[][] trn=triangulate(z);
+
+ // array to store guides found so far
+ pair[][][] points=new pair[c.length][][];
+
+ for(int cnt=0; cnt < c.length; ++cnt) {
+ pair[][] pointscnt=points[cnt];
+ real C=c[cnt];
+ for(int i=0; i < trn.length; ++i) {
+ int[] trni=trn[i];
+ int i0=trni[0], i1=trni[1], i2=trni[2];
+ segment seg=checktriangle(z[i0],z[i1],z[i2],f[i0]-C,f[i1]-C,f[i2]-C);
+ if(seg.active)
+ pointscnt.push(seg.reversed ? new pair[] {seg.b,seg.a} :
+ new pair[] {seg.a,seg.b});
+ }
+ }
+
+ collect(points,c);
+
+ return connect(points,c,join);
+}
+
// Extend palette by the colors below and above at each end.
pen[] extend(pen[] palette, pen below, pen above) {
pen[] p=copy(palette);
@@ -614,69 +1489,3 @@ void fill(picture pic=currentpicture, guide[][] g, pen[][] palette)
}
}
}
-
-// routines for irregularly spaced points:
-
-// check existing guides and adds new segment to them if possible,
-// or otherwise store segment as a new guide
-private void addseg(pair[][] gds, segment seg)
-{
- if(!seg.active) return;
- // search for a path to extend
- for(int i=0; i < gds.length; ++i) {
- pair[] gd=gds[i];
- if(abs(gd[0]-seg.b) < eps) {
- gd.insert(0,seg.a);
- return;
- } else if(abs(gd[gd.length-1]-seg.b) < eps) {
- gd.push(seg.a);
- return;
- } else if(abs(gd[0]-seg.a) < eps) {
- gd.insert(0,seg.b);
- return;
- } else if(abs(gd[gd.length-1]-seg.a) < eps) {
- gd.push(seg.b);
- return;
- }
- }
-
- // in case nothing is found
- pair[] segm;
- segm=new pair[] {seg.a,seg.b};
- gds.push(segm);
-
- return;
-}
-
-guide[][] contour(real f(pair), pair a, pair b,
- real[] c, int nx=ngraph, int ny=nx,
- interpolate join=operator --)
-{
- return contour(new real(real x, real y) {return f((x,y));},a,b,c,nx,ny,join);
-}
-
-guide[][] contour(pair[] z, real[] f, real[] c, interpolate join=operator --)
-{
- if(z.length != f.length)
- abort("z and f arrays have different lengths");
-
- int[][] trn=triangulate(z);
-
- // array to store guides found so far
- pair[][][] points=new pair[c.length][][];
-
- for(int cnt=0; cnt < c.length; ++cnt) {
- pair[][] pointscnt=points[cnt];
- real C=c[cnt];
- for(int i=0; i < trn.length; ++i) {
- int[] trni=trn[i];
- int i0=trni[0], i1=trni[1], i2=trni[2];
- addseg(pointscnt,checktriangle(z[i0],z[i1],z[i2],
- f[i0]-C,f[i1]-C,f[i2]-C));
- }
- }
-
- collect(points,c);
-
- return connect(points,c,join);
-}
diff --git a/Master/texmf/asymptote/contour3.asy b/Master/texmf/asymptote/contour3.asy
index e9d8d928991..3d925be684e 100644
--- a/Master/texmf/asymptote/contour3.asy
+++ b/Master/texmf/asymptote/contour3.asy
@@ -181,7 +181,7 @@ vertex[][] contour3(triple[][][] v, real[][][] f,
addval(w.kpb0,w.kpb1,w.kpb2,val2,w.v);
}
- triple dir=P.vector();
+ triple dir=P.normal;
void addnormals(weighted[] pts) {
triple vec2=pts[1].v-pts[0].v;
diff --git a/Master/texmf/asymptote/embed.asy b/Master/texmf/asymptote/embed.asy
index ac8a09acb83..504b3af66b0 100644
--- a/Master/texmf/asymptote/embed.asy
+++ b/Master/texmf/asymptote/embed.asy
@@ -1,11 +1,12 @@
if(latex()) {
+usepackage("hyperref");
+texpreamble("\hypersetup{"+settings.hyperrefOptions+"}");
texpreamble("
\ifx\pdfhorigin\undefined%
\usepackage[3D,dvipdfmx]{movie15}
\else%
\usepackage[3D]{movie15}
\fi%");
-usepackage("hyperref",settings.hyperrefOptions);
}
// See http://www.ctan.org/tex-archive/macros/latex/contrib/movie15/README
diff --git a/Master/texmf/asymptote/external.asy b/Master/texmf/asymptote/external.asy
index 9560e319299..053f1eff4c1 100644
--- a/Master/texmf/asymptote/external.asy
+++ b/Master/texmf/asymptote/external.asy
@@ -1,4 +1,5 @@
-usepackage("hyperref",settings.hyperrefOptions);
+usepackage("hyperref");
+texpreamble("\hypersetup{"+settings.hyperrefOptions+"}");
// Embed object to be run in an external window. An image file name can be
// specified; if not given one will be automatically generated.
@@ -19,8 +20,8 @@ string embed(string name, string options="", real width=0, real height=0,
atexit(exitfunction);
}
}
- if(width != 0) options += ", width="+(string) (width*pt)+"pt";
- if(height != 0) options +=", height="+(string) (height*pt)+"pt";
+ if(width != 0) options += ", width="+(string) (width/pt)+"pt";
+ if(height != 0) options +=", height="+(string) (height/pt)+"pt";
return "\href{run:"+name+"}{"+graphic(image,options)+"}";
}
diff --git a/Master/texmf/asymptote/flowchart.asy b/Master/texmf/asymptote/flowchart.asy
index 5fe96ae8508..bb8fe21a4d6 100644
--- a/Master/texmf/asymptote/flowchart.asy
+++ b/Master/texmf/asymptote/flowchart.asy
@@ -10,28 +10,17 @@ restricted flowdir Vertical;
real minblockwidth=0;
real minblockheight=0;
real mincirclediameter=0;
+real defaultexcursion=0.1;
struct block {
// The absolute center of the block in user coordinates.
pair center;
- // The relative center of the block.
- pair f_center;
-
// The size of the block
pair size;
- // Returns the relative position along the boundary of the block.
- pair f_position(real x);
-
- pair shift(transform t=identity()) {
- return t*center-f_center;
- }
-
- // Returns the absolute position along the boundary of the block.
- pair position(real x, transform t=identity()) {
- return shift(t)+f_position(x);
- }
+ // The relative center of the block.
+ pair f_center;
// These eight variables return the appropriate location on the block
// in relative coordinates, where the lower left corner of the block is (0,0).
@@ -44,6 +33,26 @@ struct block {
pair f_bottomleft;
pair f_bottomright;
+ void operator init(pair z) {
+ center=z;
+ }
+
+ void operator init(real x, real y) {
+ center=(x,y);
+ }
+
+ pair shift(transform t=identity()) {
+ return t*center-f_center;
+ }
+
+ // Returns the relative position along the boundary of the block.
+ pair f_position(real x);
+
+ // Returns the absolute position along the boundary of the block.
+ pair position(real x, transform t=identity()) {
+ return shift(t)+f_position(x);
+ }
+
// These eight functions return the appropriate location on the block
// in absolute coordinates.
pair top(transform t=identity()) {
@@ -73,6 +82,15 @@ struct block {
// Return a frame representing the block.
frame draw(pen p=currentpen);
+
+ // Store optional label on outgoing edge.
+ Label label;
+
+ // Store rectilinear path directions.
+ pair[] dirs;
+
+ // Store optional arrow.
+ arrowbar arrow=None;
};
// Construct a rectangular block with header and body objects.
@@ -160,6 +178,47 @@ block rectangle(object body, pair center=(0,0),
return block;
}
+block parallelogram(object body, pair center=(0,0),
+ pen fillpen=invisible, pen drawpen=currentpen,
+ real dx=3, real slope=2,
+ real minwidth=minblockwidth,
+ real minheight=minblockheight)
+{
+ frame f=body.f;
+ pair m=min(f);
+ pair M=max(f);
+ pair bound=maxbound(M-m+dx*(0,2),(minwidth,minheight));
+
+ real skew=bound.y/slope;
+ real a=bound.x+skew;
+ real b=bound.y;
+
+ path shape=(0,0)--(a,0)--(a+skew,b)--(skew,b)--cycle;
+
+ block block;
+ block.draw=new frame(pen p) {
+ frame block;
+ filldraw(block,shape,fillpen,drawpen);
+ add(block,shift(-0.5*(M+m))*f,((a+skew)/2,b/2));
+ return block;
+ };
+ block.f_position=new pair(real x) {
+ return point(shape,x);
+ };
+ block.f_center=((a+skew)/2,b/2);
+ block.center=center;
+ block.size=(a+skew,b);
+ block.f_bottomleft=(0,0);
+ block.f_bottom=((a+skew)/2,0);
+ block.f_bottomright=(a,0);
+ block.f_right=(a+skew/2,b/2);
+ block.f_topright=(a+skew,b);
+ block.f_top=((a+skew)/2,b);
+ block.f_topleft=(skew,b);
+ block.f_left=(skew/2,b/2);
+ return block;
+}
+
block diamond(object body, pair center=(0,0),
pen fillpen=invisible, pen drawpen=currentpen,
real ds=5, real dw=1,
@@ -327,7 +386,7 @@ path path(pair point[] ... flowdir dir[])
path line=point[0];
pair current, prev=point[0];
for(int i=1; i < point.length; ++i) {
- if(dir[i-1] == Horizontal)
+ if(i-1 >= dir.length || dir[i-1] == Horizontal)
current=(point[i].x,point[i-1].y);
else
current=(point[i-1].x,point[i].y);
@@ -348,9 +407,120 @@ path path(pair point[] ... flowdir dir[])
void draw(picture pic=currentpicture, block block, pen p=currentpen)
{
- pic.add(new void (frame f, transform t) {
+ pic.add(new void(frame f, transform t) {
add(f,shift(block.shift(t))*block.draw(p));
},true);
pic.addBox(block.center,block.center,
-0.5*block.size+min(p),0.5*block.size+max(p));
}
+
+typedef block blockconnector(block, block);
+
+blockconnector blockconnector(picture pic, transform t, pen p=currentpen,
+ margin margin=PenMargin)
+{
+ return new block(block b1, block b2) {
+ if(b1.dirs.length == 0) {
+ if(abs(b1.center.y-b2.center.y) < sqrtEpsilon) {
+ // horizontally aligned
+ b1.dirs[0]=b1.center.x < b2.center.x ? right : left;
+ blockconnector(pic,t)(b1,b2);
+ } else if(abs(b1.center.x-b2.center.x) < sqrtEpsilon) {
+ // vertically aligned
+ b1.dirs[0]=b1.center.y < b2.center.y ? up : down;
+ blockconnector(pic,t)(b1,b2);
+ } else {
+ if(abs(b1.center.y-b2.center.y) < abs(b1.center.x-b2.center.x)) {
+ b1.dirs[0]=b1.center.x < b2.center.x ? right : left;
+ b1.dirs[1]=b1.center.y < b2.center.y ? up : down;
+ blockconnector(pic,t)(b1,b2);
+ } else {
+ b1.dirs[0]=b1.center.y < b2.center.y ? up : down;
+ b1.dirs[1]=b1.center.x < b2.center.x ? right : left;
+ blockconnector(pic,t)(b1,b2);
+ }
+ }
+ return b2;
+ }
+
+ // compute the link for given directions (and label if any)
+ pair[] dirs=copy(b1.dirs); // deep copy
+ pair current,prev;
+ pair dir=dirs[0];
+ if(dir == up) prev=b1.top(t);
+ if(dir == down) prev=b1.bottom(t);
+ if(dir == left) prev=b1.left(t);
+ if(dir == right) prev=b1.right(t);
+ path line=prev;
+ arrowbar arrow=b1.arrow;
+
+ int i;
+ for(i=1; i < dirs.length-1; ++i) {
+ if(abs(length(dirs[i-1])-1) < sqrtEpsilon)
+ current=prev+t*dirs[i-1]*defaultexcursion;
+ else
+ current=prev+t*dirs[i-1];
+
+ if(current != prev) {
+ line=line--current;
+ prev=current;
+ }
+ }
+ dir=dirs[dirs.length-1];
+ current=0;
+ if(dir == up) current=b2.bottom(t);
+ if(dir == down) current=b2.top(t);
+ if(dir == left) current=b2.right(t);
+ if(dir == right) current=b2.left(t);
+ if(abs(dirs[i-1].y) < sqrtEpsilon &&
+ abs(prev.x-current.x) > sqrtEpsilon) {
+ prev=(current.x,prev.y);
+ line=line--prev; // horizontal
+ } else if(abs(dirs[i-1].x) < sqrtEpsilon &&
+ abs(prev.y-current.y) > sqrtEpsilon) {
+ prev=(prev.x,current.y);
+ line=line--prev;
+ }
+ if(current != prev)
+ line=line--current;
+
+ draw(pic,b1.label,line,p,arrow,margin);
+
+ b1.label="";
+ b1.dirs.delete();
+ b1.arrow=None;
+ return b2;
+ };
+}
+
+struct Dir
+{
+ pair z;
+ void operator init(pair z) {this.z=z;}
+}
+
+Dir Right=Dir(right);
+Dir Left=Dir(left);
+Dir Up=Dir(up);
+Dir Down=Dir(down);
+
+// Add a label to the current link
+block operator --(block b1, Label label)
+{
+ b1.label=label;
+ return b1;
+}
+
+// Add a direction to the current link
+block operator --(block b1, Dir dir)
+{
+ b1.dirs.push(dir.z);
+ return b1;
+}
+
+// Add an arrowbar to the current link
+block operator --(block b, arrowbar arrowbar)
+{
+ b.arrow=arrowbar;
+ return b;
+}
diff --git a/Master/texmf/asymptote/geometry.asy b/Master/texmf/asymptote/geometry.asy
index 3d9d84563b7..8679ada4c75 100644
--- a/Master/texmf/asymptote/geometry.asy
+++ b/Master/texmf/asymptote/geometry.asy
@@ -1163,7 +1163,7 @@ private void Drawline(picture pic=currentpicture, Label L="",pair P, bool dirP=t
// Calculate the points and direction vector in the transformed space.
pair z=t*P;
pair q=t*Q;
- pair v=t*Q-z;
+ pair v=q-z;
// path g;
pair ptp,ptq;
real cp = dirP ? 1:0;
@@ -1171,7 +1171,7 @@ private void Drawline(picture pic=currentpicture, Label L="",pair P, bool dirP=t
// Handle horizontal and vertical lines.
if(v.x == 0) {
if(m.x <= z.x && z.x <= M.x)
- if (dot(v,(z.x,m.y)) < 0) {
+ if (dot(v,m-z) < 0) {
ptp=(z.x,z.y+cp*(m.y-z.y));
ptq=(z.x,q.y+cq*(M.y-q.y));
} else {
@@ -1179,7 +1179,7 @@ private void Drawline(picture pic=currentpicture, Label L="",pair P, bool dirP=t
ptq=(z.x,z.y+cp*(M.y-z.y));
}
} else if(v.y == 0) {
- if (dot(v,(m.x,z.y)) < 0) {
+ if (dot(v,m-z) < 0) {
ptp=(z.x+cp*(m.x-z.x),z.y);
ptq=(q.x+cq*(M.x-q.x),z.y);
} else {
@@ -1210,7 +1210,7 @@ private void Drawline(picture pic=currentpicture, Label L="",pair P, bool dirP=t
lL.out(opic,g);
}
g=pathModifier(g);
- if(linetype(p) == ""){
+ if(linetype(p).length == 0){
pair m=midpoint(g);
pen tp;
tp=dirP ? p : addpenline(p);
@@ -7016,7 +7016,7 @@ arc arc(ellipse el, explicit abscissa x1, explicit abscissa x2, bool direction=C
{/*<asyxml></code><documentation>Return the arc from 'point(c,x1)' to 'point(c,x2)' in the direction 'direction'.</documentation></function></asyxml>*/
real a=degrees(point(el,x1)-el.C);
real b=degrees(point(el,x2)-el.C);
- arc oa=arc(el,a,b,fromCenter,direction);
+ arc oa=arc(el,a-el.angle,b-el.angle,fromCenter,direction);
return oa;
}
@@ -7135,8 +7135,7 @@ void perpendicular(picture pic=currentpicture, pair z, pair align, path g,
// Return an interior arc BAC of triangle ABC, given a radius r > 0.
// If r < 0, return the corresponding exterior arc of radius |r|.
-path arc(explicit pair B, explicit pair A, explicit pair C,
- real r=arrowfactor)
+path arc(explicit pair B, explicit pair A, explicit pair C, real r)
{
return arc(A,r,degrees(B-A),degrees(C-A));
}
diff --git a/Master/texmf/asymptote/graph.asy b/Master/texmf/asymptote/graph.asy
index e9f01880d67..9ac9983ddef 100644
--- a/Master/texmf/asymptote/graph.asy
+++ b/Master/texmf/asymptote/graph.asy
@@ -1,5 +1,4 @@
private import math;
-
import graph_splinetype;
import graph_settings;
@@ -826,14 +825,19 @@ ticks Ticks(int sign, Label F="", ticklabel ticklabel=null,
typedef tickvalues tickmodifier(tickvalues);
tickvalues None(tickvalues v) {return v;}
-tickmodifier OmitTick(... real[] x) {
+// Tickmodifier that removes all ticks in the intervals [a[i],b[i]].
+tickmodifier OmitTickIntervals(real[] a, real[] b) {
return new tickvalues(tickvalues v) {
- void omit(real[] a) {
- if(a.length != 0) {
- real norm=max(abs(a));
- for(int i=0; i < x.length; ++i) {
- int j=find(abs(a-x[i]) < zerotickfuzz*norm);
- if(j >= 0) a.delete(j);
+ if(a.length != b.length) abort(differentlengths);
+ void omit(real[] A) {
+ if(A.length != 0) {
+ real norm=max(abs(A));
+ for(int i=0; i < a.length; ++i) {
+ int j;
+ while((j=find(A > a[i]-zerotickfuzz*norm
+ & A < b[i]+zerotickfuzz*norm)) >= 0) {
+ A.delete(j);
+ }
}
}
}
@@ -843,20 +847,20 @@ tickmodifier OmitTick(... real[] x) {
};
}
-tickmodifier NoZero=OmitTick(0);
+// Tickmodifier that removes all ticks in the interval [a,b].
+tickmodifier OmitTickInterval(real a, real b) {
+ return OmitTickIntervals(new real[] {a}, new real[] {b});
+}
-// Tickmodifier that removes all major ticks in the interval [a,b].
-tickmodifier Break(real a, real b) {
- return new tickvalues(tickvalues v) {
- real[] V=v.major;
- real[] major;
- for(int i=0; i < V.length; ++i)
- if(V[i] < a-epsilon || V[i] > b+epsilon) major.push(V[i]);
- v.major=major;
- return v;
- };
+// Tickmodifier that removes the specified ticks.
+tickmodifier OmitTick(... real[] x) {
+ return OmitTickIntervals(x,x);
}
+tickmodifier NoZero=OmitTick(0);
+
+tickmodifier Break(real, real)=OmitTickInterval;
+
// Automatic tick construction routine.
ticks Ticks(int sign, Label F="", ticklabel ticklabel=null,
bool beginlabel=true, bool endlabel=true,
@@ -1536,7 +1540,7 @@ void xaxis(picture pic=currentpicture, Label L="", axis axis=YZero,
void yaxis(picture pic=currentpicture, Label L="", axis axis=XZero,
real ymin=-infinity, real ymax=infinity, pen p=currentpen,
ticks ticks=NoTicks, arrowbar arrow=None, margin margin=NoMargin,
- bool above=false)
+ bool above=false, bool autorotate=true)
{
if(ymin > ymax) return;
@@ -1590,7 +1594,7 @@ void yaxis(picture pic=currentpicture, Label L="", axis axis=XZero,
if(L.defaultposition) L.position(axis.position);
L.align(L.align,axis.align);
- if(L.defaulttransform) {
+ if(autorotate && L.defaulttransform) {
frame f;
add(f,Label(L.s,(0,0),L.p));
if(length(max(f)-min(f)) > ylabelwidth*fontsize(L.p))
@@ -1977,15 +1981,8 @@ guide[] graph(picture pic=currentpicture, pair z(real), real a, real b,
},a,b,n);
}
-string differentlengths="attempt to graph arrays of different lengths";
string conditionlength="condition array has different length than data";
-void checklengths(int x, int y, string text=differentlengths)
-{
- if(x != y)
- abort(text+": "+string(x)+" != "+string(y));
-}
-
void checkconditionlength(int x, int y)
{
checklengths(x,y,conditionlength);
@@ -2070,6 +2067,19 @@ guide polargraph(picture pic=currentpicture, real r(real), real a, real b,
},a,b,n);
}
+guide polargraph(picture pic=currentpicture, real[] r, real[] theta,
+ interpolate join=operator--)
+{
+ int n=r.length;
+ checklengths(n,theta.length);
+ int i=0;
+ return graph(join)(new pair(real) {
+ pair w=Scale(pic,polar(r[i],theta[i]));
+ ++i;
+ return w;
+ },0,0,n-1);
+}
+
void errorbar(picture pic, pair z, pair dp, pair dm, pen p=currentpen,
real size=0)
{
@@ -2166,7 +2176,7 @@ picture vectorfield(path vector(pair), pair a, pair b,
path g=vector(z);
return abs(point(g,size(g)-1)-point(g,0));
}
- real max=size((0,0));
+ real max=size(a);
for(int i=0; i <= nx; ++i) {
real x=interp(a.x,b.x,i*dx);
for(int j=0; j <= ny; ++j)
@@ -2198,8 +2208,9 @@ path Arc(pair c, real r, real angle1, real angle2, bool direction,
{
angle1=radians(angle1);
angle2=radians(angle2);
- if(angle1 >= angle2 && direction) angle1 -= 2pi;
- if(angle2 >= angle1 && !direction) angle2 -= 2pi;
+ if(direction) {
+ if(angle1 >= angle2) angle1 -= 2pi;
+ } else if(angle2 >= angle1) angle2 -= 2pi;
return shift(c)*polargraph(new real(real t){return r;},angle1,angle2,n,
operator ..);
}
diff --git a/Master/texmf/asymptote/graph3.asy b/Master/texmf/asymptote/graph3.asy
index 1357f3e7c87..32f66851e75 100644
--- a/Master/texmf/asymptote/graph3.asy
+++ b/Master/texmf/asymptote/graph3.asy
@@ -126,7 +126,7 @@ void labelaxis(picture pic, transform3 T, Label L, path3 g,
locate1.dir(T,g,locate,t);
triple pathdir=locate1.pathdir;
- triple perp=cross(pathdir,P.vector());
+ triple perp=cross(pathdir,P.normal);
if(align == O)
align=unit(sgn(dot(sign*locate1.dir,perp))*perp);
path[] g=project(box(T*m,T*M),P);
@@ -149,9 +149,11 @@ void labelaxis(picture pic, transform3 T, Label L, path3 g,
},exact=false);
path3[] G=path3(texpath(L));
- G=L.align.is3D ? align(G,O,align,L.p) : L.T3*G;
- triple v=point(g,relative(L,g));
- pic.addBox(v,v,min(G),max(G));
+ if(G.length > 0) {
+ G=L.align.is3D ? align(G,O,align,L.p) : L.T3*G;
+ triple v=point(g,relative(L,g));
+ pic.addBox(v,v,min(G),max(G));
+ }
}
// Tick construction routine for a user-specified array of tick values.
@@ -509,7 +511,7 @@ real ztrans(transform3 t, real z)
private triple defaultdir(triple X, triple Y, triple Z, bool opposite=false,
projection P) {
- triple u=cross(P.vector(),Z);
+ triple u=cross(P.normal,Z);
return abs(dot(u,X)) > abs(dot(u,Y)) ? -X : (opposite ? Y : -Y);
}
@@ -964,7 +966,7 @@ void xaxis3(picture pic=currentpicture, Label L="", axis axis=YZZero,
bool back=false;
if(axis.type == Both) {
- triple v=currentprojection.vector();
+ triple v=currentprojection.normal;
back=dot((0,pic.userMax.y-pic.userMin.y,0),v)*sgn(v.z) > 0;
}
@@ -1039,7 +1041,7 @@ void yaxis3(picture pic=currentpicture, Label L="", axis axis=XZZero,
bool back=false;
if(axis.type == Both) {
- triple v=currentprojection.vector();
+ triple v=currentprojection.normal;
back=dot((pic.userMax.x-pic.userMin.x,0,0),v)*sgn(v.z) > 0;
}
@@ -1842,10 +1844,11 @@ path3 Arc(triple c, triple v1, triple v2, triple normal=O, bool direction=CCW,
real phi1=radians(longitude(v1,warn=false));
real phi2=radians(longitude(v2,warn=false));
- if(phi1 >= phi2 && direction) phi1 -= 2pi;
- if(phi2 >= phi1 && !direction) phi2 -= 2pi;
+ if(direction) {
+ if(phi1 >= phi2) phi1 -= 2pi;
+ } else if(phi2 >= phi1) phi2 -= 2pi;
- real piby2=pi/2;
+ static real piby2=pi/2;
return shift(c)*T*polargraph(new real(real theta, real phi) {return r;},
new real(real t) {return piby2;},
new real(real t) {return interp(phi1,phi2,t);},
@@ -1869,5 +1872,10 @@ path3 Arc(triple c, real r, real theta1, real phi1, real theta2, real phi2,
// True circle
path3 Circle(triple c, real r, triple normal=Z, int n=nCircle)
{
- return Arc(c,r,90,0,90,360,normal,n)&cycle;
+ static real piby2=pi/2;
+ return shift(c)*align(unit(normal))*
+ polargraph(new real(real theta, real phi) {return r;},
+ new real(real t) {return piby2;},
+ new real(real t) {return interp(0,2pi,t);},n,operator ..);
+
}
diff --git a/Master/texmf/asymptote/graph_splinetype.asy b/Master/texmf/asymptote/graph_splinetype.asy
index fbcb1b00c75..02f780ca02e 100644
--- a/Master/texmf/asymptote/graph_splinetype.asy
+++ b/Master/texmf/asymptote/graph_splinetype.asy
@@ -1,3 +1,5 @@
+private import math;
+
typedef real[] splinetype(real[], real[]);
restricted real[] Spline(real[] x, real[] y);
@@ -11,6 +13,12 @@ void checklengths(int x, int y, string text=differentlengths)
abort(text+": "+string(x)+" != "+string(y));
}
+void checkincreasing(real[] x)
+{
+ if(!increasing(x,true))
+ abort("strictly increasing array expected");
+}
+
// Linear interpolation
real[] linear(real[] x, real[] y)
{
@@ -32,6 +40,7 @@ real[] notaknot(real[] x, real[] y)
{
int n=x.length;
checklengths(n,y.length);
+ checkincreasing(x);
real[] d;
if(n > 3) {
real[] a=new real[n];
@@ -75,6 +84,7 @@ real[] periodic(real[] x, real[] y)
{
int n=x.length;
checklengths(n,y.length);
+ checkincreasing(x);
if(abs(y[n-1]-y[0]) > sqrtEpsilon*norm(y))
abort("function values are not periodic");
real[] d;
@@ -110,6 +120,7 @@ real[] natural(real[] x, real[] y)
{
int n=x.length;
checklengths(n,y.length);
+ checkincreasing(x);
real[] d;
if(n > 2) {
real[] a=new real[n];
@@ -144,6 +155,7 @@ splinetype clamped(real slopea, real slopeb)
return new real[] (real[] x, real[] y) {
int n=x.length;
checklengths(n,y.length);
+ checkincreasing(x);
real[] d;
if(n > 2) {
real[] a=new real[n];
@@ -183,6 +195,7 @@ real[] monotonic(real[] x, real[] y)
{
int n=x.length;
checklengths(n,y.length);
+ checkincreasing(x);
real[] d=new real[n];
if(n > 2) {
real[] h=new real[n-1];
diff --git a/Master/texmf/asymptote/math.asy b/Master/texmf/asymptote/math.asy
index 85d41d86d07..ff267b955d7 100644
--- a/Master/texmf/asymptote/math.asy
+++ b/Master/texmf/asymptote/math.asy
@@ -38,6 +38,15 @@ bool polygon(path p)
return cyclic(p) && piecewisestraight(p);
}
+// Return the intersection time of the point on the line through p and q
+// that is closest to z.
+real intersect(pair p, pair q, pair z)
+{
+ pair u=q-p;
+ real denom=dot(u,u);
+ return denom == 0 ? infinity : dot(z-p,u)/denom;
+}
+
// Return the intersection time of the extension of the line segment PQ
// with the plane perpendicular to n and passing through Z.
real intersect(triple P, triple Q, triple n, triple Z)
@@ -80,39 +89,39 @@ triple intersectionpoint(triple n0, triple P0, triple n1, triple P1)
}
}
-// Given a real array A, return its partial sums.
-real[] partialsum(real[] A)
+// Given a real array a, return its partial sums.
+real[] partialsum(real[] a)
{
- real[] B=new real[A.length];
+ real[] b=new real[a.length];
real sum=0;
- for(int i=0; i < A.length; ++i) {
- sum += A[i];
- B[i]=sum;
+ for(int i=0; i < a.length; ++i) {
+ sum += a[i];
+ b[i]=sum;
}
- return B;
+ return b;
}
-// Given a real array A, return its partial dx-weighted sums.
-real[] partialsum(real[] A, real[] dx)
+// Given a real array a, return its partial dx-weighted sums.
+real[] partialsum(real[] a, real[] dx)
{
- real[] B=new real[A.length];
+ real[] b=new real[a.length];
real sum=0;
- for(int i=0; i < A.length; ++i) {
- sum += A[i]*dx[i];
- B[i]=sum;
+ for(int i=0; i < a.length; ++i) {
+ sum += a[i]*dx[i];
+ b[i]=sum;
}
- return B;
+ return b;
}
-// If strict=false, return whether i > j implies x[i] >= x[j]
-// If strict=true, return whether i > j implies x[i] > x[j]
-bool increasing(real[] x, bool strict=false)
+// If strict=false, return whether i > j implies a[i] >= a[j]
+// If strict=true, return whether i > j implies a[i] > a[j]
+bool increasing(real[] a, bool strict=false)
{
- real[] xp=copy(x);
- xp.delete(0);
- xp.push(0);
- bool[] b=strict ? (xp > x) : (xp >= x);
- b[x.length-1]=true;
+ real[] ap=copy(a);
+ ap.delete(0);
+ ap.push(0);
+ bool[] b=strict ? (ap > a) : (ap >= a);
+ b[a.length-1]=true;
return all(b);
}
@@ -148,43 +157,6 @@ real[][] zero(int n, int m)
return M;
}
-real[][] operator +(real[][] a, real[][] b)
-{
- int n=a.length;
- real[][] m=new real[n][];
- for(int i=0; i < n; ++i)
- m[i]=a[i]+b[i];
- return m;
-}
-
-real[][] operator -(real[][] a, real[][] b)
-{
- int n=a.length;
- real[][] m=new real[n][];
- for(int i=0; i < n; ++i)
- m[i]=a[i]-b[i];
- return m;
-}
-
-real[][] operator *(real[][] a, real b)
-{
- int n=a.length;
- real[][] m=new real[n][];
- for(int i=0; i < n; ++i)
- m[i]=a[i]*b;
- return m;
-}
-
-real[][] operator *(real b, real[][] a)
-{
- return a*b;
-}
-
-real[][] operator /(real[][] a, real b)
-{
- return a*(1/b);
-}
-
bool square(real[][] m)
{
int n=m.length;
@@ -371,3 +343,20 @@ pair[] quarticroots(real a, real b, real c, real d, real e)
return roots;
}
+
+pair[][] fft(pair[][] a, int sign=1)
+{
+ pair[][] A=new pair[a.length][];
+ int k=0;
+ for(pair[] v : a) {
+ A[k]=fft(v,sign);
+ ++k;
+ }
+ a=transpose(A);
+ k=0;
+ for(pair[] v : a) {
+ A[k]=fft(v,sign);
+ ++k;
+ }
+ return transpose(A);
+}
diff --git a/Master/texmf/asymptote/ode.asy b/Master/texmf/asymptote/ode.asy
index 77ab8d6e589..0b88060e081 100644
--- a/Master/texmf/asymptote/ode.asy
+++ b/Master/texmf/asymptote/ode.asy
@@ -244,17 +244,31 @@ real adjust(real h, real error, real tolmin, real tolmax, RKTableau tableau)
return h;
}
+struct solution
+{
+ real[] t;
+ real[] y;
+}
+
+void write(solution S)
+{
+ for(int i=0; i < S.t.length; ++i)
+ write(S.t[i],S.y[i]);
+}
+
// Integrate dy/dt+cy=f(t,y) from a to b using initial conditions y,
// specifying either the step size h or the number of steps n.
-real[] integrate(real y, real c=0, real g(real t, real y), real a, real b=a,
- real h=0, int n=0, bool dynamic=false, real tolmin=0,
- real tolmax=0, real dtmin=0, real dtmax=realMax,
- RKTableau tableau, bool verbose=false)
+solution integrate(real y, real c=0, real g(real t, real y), real a, real b=a,
+ real h=0, int n=0, bool dynamic=false, real tolmin=0,
+ real tolmax=0, real dtmin=0, real dtmax=realMax,
+ RKTableau tableau, bool verbose=false)
{
- real[] Y={y};
+ solution S;
+ S.t=new real[] {a};
+ S.y=new real[]{y};
if(h == 0) {
- if(b == a) return Y;
+ if(b == a) return S;
if(n == 0) abort("Either n or h must be specified");
else h=(b-a)/n;
}
@@ -302,30 +316,49 @@ real[] integrate(real y, real c=0, real g(real t, real y), real a, real b=a,
if(h >= dt) {
t += dt;
y=y0+highOrder;
- Y.push(y);
+ S.t.push(t);
+ S.y.push(y);
f0=f1;
}
h=min(max(h,dtmin),dtmax);
} else {
t += h;
y=y0+highOrder;
- Y.push(y);
+ S.y.push(y);
}
}
- return Y;
+ return S;
+}
+
+struct Solution
+{
+ real[] t;
+ real[][] y;
+}
+
+void write(Solution S)
+{
+ for(int i=0; i < S.t.length; ++i) {
+ write(S.t[i],tab);
+ for(real y : S.y[i])
+ write(y,tab);
+ write();
+ }
}
// Integrate a set of equations, dy/dt=f(t,y), from a to b using initial
// conditions y, specifying either the step size h or the number of steps n.
-real[][] integrate(real[] y, real[] f(real t, real[] y), real a, real b=a,
+Solution integrate(real[] y, real[] f(real t, real[] y), real a, real b=a,
real h=0, int n=0, bool dynamic=false,
real tolmin=0, real tolmax=0, real dtmin=0,
real dtmax=realMax, RKTableau tableau, bool verbose=false)
{
- real[][] Y={copy(y)};
+ Solution S;
+ S.t=new real[] {a};
+ S.y=new real[][] {copy(y)};
if(h == 0) {
- if(b == a) return Y;
+ if(b == a) return S;
if(n == 0) abort("Either n or h must be specified");
else h=(b-a)/n;
}
@@ -366,17 +399,19 @@ real[][] integrate(real[] y, real[] f(real t, real[] y), real a, real b=a,
if(h >= dt) {
t += dt;
y += highOrder;
- Y.push(y);
+ S.t.push(t);
+ S.y.push(y);
f0=f1;
}
h=min(max(h,dtmin),dtmax);
} else {
t += h;
y += highOrder;
- Y.push(y);
+ S.t.push(t);
+ S.y.push(y);
}
}
- return Y;
+ return S;
}
real[][] finiteDifferenceJacobian(real[] f(real[]), real[] t,
@@ -408,12 +443,14 @@ real[] newton(int iterations=100, real[] f(real[]), real[][] jacobian(real[]),
}
real[] solveBVP(real[] f(real, real[]), real a, real b=a, real h=0, int n=0,
+ bool dynamic=false, real tolmin=0, real tolmax=0, real dtmin=0,
+ real dtmax=realMax, RKTableau tableau, bool verbose=false,
real[] initial(real[]), real[] discrepancy(real[]),
- real[] guess, RKTableau tableau, int iterations=100)
+ real[] guess, int iterations=100)
{
real[] g(real[] t) {
- real[][] y=integrate(initial(t),f,a,b,h,n,tableau);
- return discrepancy(y[y.length-1]);
+ real[][] y=integrate(initial(t),f,a,b,h,n,dynamic,tolmin,tolmax,dtmin,dtmax,
+ tableau,verbose).y;return discrepancy(y[y.length-1]);
}
real[][] jacobian(real[] t) {return finiteDifferenceJacobian(g,t);}
return initial(newton(iterations,g,jacobian,guess));
diff --git a/Master/texmf/asymptote/palette.asy b/Master/texmf/asymptote/palette.asy
index fabbdc2cd5b..41a40a04a85 100644
--- a/Master/texmf/asymptote/palette.asy
+++ b/Master/texmf/asymptote/palette.asy
@@ -305,7 +305,7 @@ pen[] Wheel(int NColors=32766)
if(settings.gray) return Grayscale(NColors);
int nintervals=6;
- int n=quotient(NColors,nintervals);
+ int n=-quotient(NColors,-nintervals);
pen[] Palette;
if(n == 0) return Palette;
@@ -333,7 +333,7 @@ pen[] Rainbow(int NColors=32766)
int offset=1;
int nintervals=5;
- int n=quotient(NColors-1,nintervals);
+ int n=-quotient(NColors-1,-nintervals);
pen[] Palette;
if(n == 0) return Palette;
@@ -366,7 +366,7 @@ private pen[] BWRainbow(int NColors, bool two)
if(two) nintervals += 6;
int num=NColors-offset;
- int n=quotient(num,nintervals*divisor)*divisor;
+ int n=-quotient(num,-nintervals*divisor)*divisor;
NColors=n*nintervals+offset;
pen[] Palette;
@@ -395,7 +395,7 @@ private pen[] BWRainbow(int NColors, bool two)
for(int i=0; i < n; ++i)
Palette[k+i]=rgb(1.0-i*ninv,0.0,1.0);
else {
- int n3=quotient(n,3);
+ int n3=-quotient(n,-3);
int n23=2*n3;
real third=n3*ninv;
real twothirds=n23*ninv;
diff --git a/Master/texmf/asymptote/plain.asy b/Master/texmf/asymptote/plain.asy
index f9e18b883ea..4d0b4e566fb 100644
--- a/Master/texmf/asymptote/plain.asy
+++ b/Master/texmf/asymptote/plain.asy
@@ -22,8 +22,10 @@ access version;
if(version.VERSION != VERSION) {
warning("version","using possibly incompatible version "+
version.VERSION+" of plain.asy"+'\n');
+ nowarn("version");
}
+include plain_strings;
include plain_pens;
include plain_paths;
include plain_filldraw;
@@ -33,7 +35,6 @@ include plain_Label;
include plain_shipout;
include plain_arcs;
include plain_boxes;
-include plain_strings;
include plain_markers;
include plain_arrows;
include plain_debugger;
diff --git a/Master/texmf/asymptote/plain_Label.asy b/Master/texmf/asymptote/plain_Label.asy
index b75d0de3967..6e6f231375a 100644
--- a/Master/texmf/asymptote/plain_Label.asy
+++ b/Master/texmf/asymptote/plain_Label.asy
@@ -75,11 +75,19 @@ transform scaleless(transform t)
A=conj(U)*A*U;
real D=abs(A[0][0]);
- if(D != 0) A[0][0] /= D;
+ if(D != 0) {
+ A[0][0] /= D;
+ A[0][1] /= D;
+ }
+
D=abs(A[1][1]);
- if(D != 0) A[1][1] /= D;
+ if(D != 0) {
+ A[1][0] /= D;
+ A[1][1] /= D;
+ }
A=U*A*conj(U);
+
return (0,0,A[0][0].x,A[0][1].x,A[1][0].x,A[1][1].x);
}
@@ -209,7 +217,8 @@ transform Slant(transform t) {return scaleless(t);}
transform Scale(transform t) {return t;}
embed Rotate(pair z) {
- return new transform(transform t) {return rotate(degrees(shiftless(t)*z));};
+ return new transform(transform t) {return rotate(degrees(shiftless(t)*z,
+ warn=false));};
}
struct Label {
@@ -288,7 +297,7 @@ struct Label {
void label(frame f, transform t=identity(), pair position, pair align) {
pen p0=p == nullpen ? currentpen : p;
- align=length(align)*unit(scaleless(shiftless(t))*align);
+ align=length(align)*unit(shiftless(t)*align);
label(f,s,size,embed(t)*shiftless(T),
t*position+align*labelmargin(p0)+shift(T)*0,align,p0);
}
diff --git a/Master/texmf/asymptote/plain_arcs.asy b/Master/texmf/asymptote/plain_arcs.asy
index 01e750f42cd..140bc3cff19 100644
--- a/Master/texmf/asymptote/plain_arcs.asy
+++ b/Master/texmf/asymptote/plain_arcs.asy
@@ -23,8 +23,9 @@ path arc(pair c, explicit pair z1, explicit pair z2, bool direction=CCW)
real t1=intersect(unitcircle,(0,0)--2*z1)[0];
real t2=intersect(unitcircle,(0,0)--2*z2)[0];
static int n=length(unitcircle);
- if(t1 >= t2 && direction) t1 -= n;
- if(t2 >= t1 && !direction) t2 -= n;
+ if(direction) {
+ if (t1 >= t2) t1 -= n;
+ } else if(t2 >= t1) t2 -= n;
return shift(c)*scale(r)*subpath(unitcircle,t1,t2);
}
diff --git a/Master/texmf/asymptote/plain_arrows.asy b/Master/texmf/asymptote/plain_arrows.asy
index 18618c2b5b8..5284ee9650d 100644
--- a/Master/texmf/asymptote/plain_arrows.asy
+++ b/Master/texmf/asymptote/plain_arrows.asy
@@ -93,7 +93,7 @@ SimpleHead.head=new path(path g, position position=EndPoint, pen p=currentpen,
path left=rotate(-angle,x)*r;
path right=rotate(angle*factor,x)*r;
real[] T=arrowbasepoints(base,left,right);
- return subpath(left,T[0],0)--subpath(right,T[1],0);
+ return subpath(left,T[0],0)--subpath(right,0,T[1]);
};
arrowhead HookHead(real dir=arrowdir, real barb=arrowbarb)
diff --git a/Master/texmf/asymptote/plain_boxes.asy b/Master/texmf/asymptote/plain_boxes.asy
index ff82a0b0b32..0c6401311d8 100644
--- a/Master/texmf/asymptote/plain_boxes.asy
+++ b/Master/texmf/asymptote/plain_boxes.asy
@@ -4,7 +4,8 @@ path box(frame dest, frame src=dest, real xmargin=0, real ymargin=xmargin,
{
pair z=(xmargin,ymargin);
int sign=filltype == NoFill ? 1 : -1;
- path g=box(min(src)+0.5*sign*min(p)-z,max(src)+0.5*sign*max(p)+z);
+ pair h=0.5*sign*(max(p)-min(p));
+ path g=box(min(src)-h-z,max(src)+h+z);
frame F;
if(above == false) {
filltype.fill(F,g,p);
@@ -45,8 +46,8 @@ path ellipse(frame dest, frame src=dest, real xmargin=0, real ymargin=xmargin,
pair D=M-m;
static real factor=0.5*sqrt(2);
int sign=filltype == NoFill ? 1 : -1;
- path g=ellipse(0.5*(M+m),factor*D.x+0.5*sign*max(p).x+xmargin,
- factor*D.y+0.5*sign*max(p).y+ymargin);
+ pair h=0.5*sign*(max(p)-min(p));
+ path g=ellipse(0.5*(M+m),factor*D.x+h.x+xmargin,factor*D.y+h.y+ymargin);
frame F;
if(above == false) {
filltype.fill(F,g,p);
diff --git a/Master/texmf/asymptote/plain_constants.asy b/Master/texmf/asymptote/plain_constants.asy
index 32138756891..ba8947c91c2 100644
--- a/Master/texmf/asymptote/plain_constants.asy
+++ b/Master/texmf/asymptote/plain_constants.asy
@@ -8,10 +8,10 @@ restricted real bp=1; // A PostScript point.
restricted real pt=72.0/72.27; // A TeX pt; smaller than a PostScript bp.
restricted pair I=(0,1);
-restricted pair up=(0,1);
-restricted pair down=(0,-1);
restricted pair right=(1,0);
restricted pair left=(-1,0);
+restricted pair up=(0,1);
+restricted pair down=(0,-1);
restricted pair E=(1,0);
restricted pair N=(0,1);
diff --git a/Master/texmf/asymptote/plain_filldraw.asy b/Master/texmf/asymptote/plain_filldraw.asy
index b9cd191e075..a5eea35ef25 100644
--- a/Master/texmf/asymptote/plain_filldraw.asy
+++ b/Master/texmf/asymptote/plain_filldraw.asy
@@ -186,6 +186,20 @@ filltype RadialShade(pen penc, pen penr)
});
}
+filltype RadialShadeDraw(real xmargin=0, real ymargin=xmargin,
+ pen penc, pen penr, pen drawpen=nullpen)
+{
+ return filltype(new void(frame f, path[] g, pen Drawpen) {
+ if(drawpen != nullpen) Drawpen=drawpen;
+ if(Drawpen == nullpen) Drawpen=penc;
+ pair c=(min(g)+max(g))/2;
+ if(cyclic(g[0]))
+ radialshade(f,margin(g,xmargin,ymargin),penc,c,0,penr,c,
+ abs(max(g)-min(g))/2);
+ draw(f,margin(g,xmargin,ymargin),Drawpen);
+ });
+}
+
// Fill the region in frame dest underneath frame src and return the
// boundary of src.
path fill(frame dest, frame src, filltype filltype=NoFill,
diff --git a/Master/texmf/asymptote/plain_paths.asy b/Master/texmf/asymptote/plain_paths.asy
index bf3f2790c1d..b073e8090ec 100644
--- a/Master/texmf/asymptote/plain_paths.asy
+++ b/Master/texmf/asymptote/plain_paths.asy
@@ -15,6 +15,7 @@ tensionSpecifier operator tension(real t, bool atLeast)
{
return operator tension(t,t,atLeast);
}
+
guide operator controls(pair z)
{
return operator controls(z,z);
@@ -92,19 +93,26 @@ void write(file file, string s="", explicit path[] x, suffix suffix=none)
write(file,suffix);
}
-void write(file file, string s="", explicit guide[] x, suffix suffix=none)
+void write(string s="", explicit path[] x, suffix suffix=endl)
{
- write(file,s,(path[]) x,suffix);
+ write(stdout,s,x,suffix);
}
-void write(string s="", explicit path[] x, suffix suffix=endl)
+void write(file file, string s="", explicit guide[] x, suffix suffix=none)
{
- write(stdout,s,x,suffix);
+ write(file,s);
+ if(x.length > 0) write(file,x[0]);
+ for(int i=1; i < x.length; ++i) {
+ write(file,endl);
+ write(file," ^^");
+ write(file,x[i]);
+ }
+ write(file,suffix);
}
void write(string s="", explicit guide[] x, suffix suffix=endl)
{
- write(stdout,s,(path[]) x,suffix);
+ write(stdout,s,x,suffix);
}
private string nopoints="nullpath has no points";
@@ -127,23 +135,19 @@ pair max(explicit path[] p)
return maxp;
}
-guide operator ::(... guide[] a)
+interpolate operator ..(tensionSpecifier t)
{
- if(a.length == 0) return nullpath;
- guide g=a[0];
- for(int i=1; i < a.length; ++i)
- g=g..operator tension(1,true)..a[i];
- return g;
+ return new guide(... guide[] a) {
+ if(a.length == 0) return nullpath;
+ guide g=a[0];
+ for(int i=1; i < a.length; ++i)
+ g=g..t..a[i];
+ return g;
+ };
}
-guide operator ---(... guide[] a)
-{
- if(a.length == 0) return nullpath;
- guide g=a[0];
- for(int i=1; i < a.length; ++i)
- g=g..operator tension(infinity,true)..a[i];
- return g;
-}
+interpolate operator ::=operator ..(operator tension(1,true));
+interpolate operator ---=operator ..(operator tension(infinity,true));
// return an arbitrary intersection point of paths p and q
pair intersectionpoint(path p, path q, real fuzz=-1)
@@ -200,9 +204,9 @@ pair dir(path p)
return dir(p,length(p));
}
-pair dir(path p, path h)
+pair dir(path p, path g)
{
- return 0.5*(dir(p)+dir(h));
+ return unit(dir(p)+dir(g));
}
// return the point on path p at arclength L
@@ -283,7 +287,7 @@ path buildcycle(... path[] p)
for(int i=0; i < n; ++i) {
real[][] t=intersections(p[i],p[j]);
if(t.length == 0)
- return nullpath;
+ return nullpath;
ta[i]=t[0][0]; tb[j]=t[0][1];
j=i;
}
@@ -302,7 +306,7 @@ path buildcycle(... path[] p)
int L=length(p[i]);
real t=Tb-L;
if(abs(c-point(p[i],0.5(Ta+t))) <
- abs(c-point(p[i],0.5(Ta+Tb)))) Tb=t;
+ abs(c-point(p[i],0.5(Ta+Tb)))) Tb=t;
while(Tb < Ta) Tb += L;
}
G=G&subpath(p[i],Ta,Tb);
diff --git a/Master/texmf/asymptote/plain_pens.asy b/Master/texmf/asymptote/plain_pens.asy
index a8a0d0c7461..5b0bdbd5879 100644
--- a/Master/texmf/asymptote/plain_pens.asy
+++ b/Master/texmf/asymptote/plain_pens.asy
@@ -1,12 +1,17 @@
real labelmargin=0.3;
real dotfactor=6;
-pen solid=linetype("");
-pen dotted=linetype("0 4");
-pen dashed=linetype("8 8");
-pen longdashed=linetype("24 8");
-pen dashdotted=linetype("8 8 0 8");
-pen longdashdotted=linetype("24 8 0 8");
+pen solid=linetype(new real[]);
+pen dotted=linetype(new real[] {0,4});
+pen dashed=linetype(new real[] {8,8});
+pen longdashed=linetype(new real[] {24,8});
+pen dashdotted=linetype(new real[] {8,8,0,8});
+pen longdashdotted=linetype(new real[] {24,8,0,8});
+
+pen linetype(string pattern, real offset=0, bool scale=true, bool adjust=true)
+{
+ return linetype((real[]) split(pattern),offset,scale,adjust);
+}
void defaultpen(real w) {defaultpen(linewidth(w));}
pen operator +(pen p, real w) {return p+linewidth(w);}
diff --git a/Master/texmf/asymptote/plain_picture.asy b/Master/texmf/asymptote/plain_picture.asy
index e13120a198c..044ba90e7a7 100644
--- a/Master/texmf/asymptote/plain_picture.asy
+++ b/Master/texmf/asymptote/plain_picture.asy
@@ -4,11 +4,6 @@ pair viewportsize=0; // Horizontal and vertical viewport limits.
restricted bool Aspect=true;
restricted bool IgnoreAspect=false;
-pair size(frame f)
-{
- return max(f)-min(f);
-}
-
typedef real[][] transform3;
restricted transform3 identity4=identity(4);
@@ -360,6 +355,7 @@ pair point(frame f, pair dir)
path[] align(path[] g, transform t=identity(), pair position,
pair align, pen p=currentpen)
{
+ if(g.length == 0) return g;
pair m=min(g);
pair M=max(g);
pair dir=rectify(inverse(t)*-align);
@@ -385,18 +381,15 @@ struct transformation {
transform3 modelview; // For orientation and positioning
transform3 projection; // For 3D to 2D projection
bool infinity;
- bool oblique;
- void operator init(transform3 modelview, bool oblique=false) {
+ void operator init(transform3 modelview) {
this.modelview=modelview;
this.projection=identity4;
infinity=true;
- this.oblique=oblique;
}
void operator init(transform3 modelview, transform3 projection) {
this.modelview=modelview;
this.projection=projection;
infinity=false;
- oblique=false;
}
transform3 compute() {
return infinity ? modelview : projection*modelview;
@@ -406,7 +399,6 @@ struct transformation {
T.modelview=copy(modelview);
T.projection=copy(projection);
T.infinity=infinity;
- T.oblique=oblique;
return T;
}
}
@@ -414,11 +406,11 @@ struct transformation {
struct projection {
transform3 t; // projection*modelview (cached)
bool infinity;
- bool oblique;
bool absolute=false;
triple camera; // Position of camera.
triple up; // A vector that should be projected to direction (0,1).
triple target; // Point where camera is looking at.
+ triple normal; // Normal vector from target to projection plane.
pair viewportshift; // Fractional viewport shift.
real zoom=1; // Zoom factor.
real angle; // Lens angle (for perspective projection).
@@ -434,7 +426,6 @@ struct projection {
T=projector(camera,up,target);
t=T.compute();
infinity=T.infinity;
- oblique=T.oblique;
ninterpolate=infinity ? 1 : 16;
}
@@ -443,12 +434,14 @@ struct projection {
}
void operator init(triple camera, triple up=(0,0,1), triple target=(0,0,0),
+ triple normal=camera-target,
real zoom=1, real angle=0, pair viewportshift=0,
bool showtarget=true, bool autoadjust=true,
bool center=false, projector projector) {
this.camera=camera;
this.up=up;
this.target=target;
+ this.normal=normal;
this.zoom=zoom;
this.angle=angle;
this.viewportshift=viewportshift;
@@ -464,10 +457,10 @@ struct projection {
P.t=t;
P.infinity=infinity;
P.absolute=absolute;
- P.oblique=oblique;
P.camera=camera;
P.up=up;
P.target=target;
+ P.normal=normal;
P.zoom=zoom;
P.angle=angle;
P.viewportshift=viewportshift;
@@ -1281,7 +1274,7 @@ struct picture {
}
- // Calculate additional scaling required if only an approximate thisture
+ // Calculate additional scaling required if only an approximate picture
// size estimate is available.
transform3 scale3(frame f, real xsize3=this.xsize3,
real ysize3=this.ysize3, real zsize3=this.zsize3,
@@ -1370,6 +1363,18 @@ struct picture {
light,P);
}
+ // Fit a 3D picture.
+ frame fit3(projection P=currentprojection) {
+ if(settings.render == 0) return fit(P);
+ if(fixed) return scaled();
+ if(empty3()) return newframe;
+ transform3 t=scaling(xsize3,ysize3,zsize3,keepAspect);
+ frame f=fit3(t,null,P);
+ transform3 s=scale3(f,xsize3,ysize3,zsize3,keepAspect);
+ if(s == identity4) return f;
+ return fit3(s*t,null,P);
+ }
+
// In case only an approximate picture size estimate is available, return the
// fitted frame slightly scaled (including labels and true size distances)
// so that it precisely meets the given size specification.
@@ -1567,12 +1572,24 @@ void add(picture pic=currentpicture, drawer d, bool exact=false)
pic.add(d,exact);
}
+typedef void drawer3(frame f, transform3 t, picture pic, projection P);
+void add(picture pic=currentpicture, drawer3 d, bool exact=false)
+{
+ pic.add(d,exact);
+}
+
void add(picture pic=currentpicture, void d(picture,transform),
bool exact=false)
{
pic.add(d,exact);
}
+void add(picture pic=currentpicture, void d(picture,transform3),
+ bool exact=false)
+{
+ pic.add(d,exact);
+}
+
void begingroup(picture pic=currentpicture)
{
pic.add(new void(frame f, transform) {
@@ -1628,7 +1645,7 @@ void latticeshade(picture pic=currentpicture, path[] g, bool stroke=false,
p=copy(p);
}
pic.add(new void(frame f, transform t) {
- latticeshade(f,t*g,stroke,fillrule,p,false);
+ latticeshade(f,t*g,stroke,fillrule,p,t,false);
},true);
pic.addPath(g);
}
@@ -1738,7 +1755,8 @@ void tensorshade(picture pic=currentpicture, path[] g, bool stroke=false,
// Smoothly shade the regions between consecutive paths of a sequence using a
// given array of pens:
-void draw(picture pic=currentpicture, path[] g, pen[] p)
+void draw(picture pic=currentpicture, path[] g, pen fillrule=currentpen,
+ pen[] p)
{
path[] G;
pen[][] P;
@@ -1753,7 +1771,7 @@ void draw(picture pic=currentpicture, path[] g, pen[] p)
P.push(new pen[] {p[i],p[i],p[i+1],p[i+1]});
}
}
- tensorshade(pic,G,P);
+ tensorshade(pic,G,fillrule,P);
}
void functionshade(picture pic=currentpicture, path[] g, bool stroke=false,
@@ -1842,14 +1860,14 @@ transform fixedscaling(picture pic=currentpicture, pair min, pair max,
pic.keepAspect);
}
-// Add frame src about position to frame dest with optional grouping.
+// Add frame src to frame dest about position with optional grouping.
void add(frame dest, frame src, pair position, bool group=false,
filltype filltype=NoFill, bool above=true)
{
add(dest,shift(position)*src,group,filltype,above);
}
-// Add frame src about position to picture dest with optional grouping.
+// Add frame src to picture dest about position with optional grouping.
void add(picture dest=currentpicture, frame src, pair position=0,
bool group=true, filltype filltype=NoFill, bool above=true)
{
@@ -1883,7 +1901,14 @@ void add(picture dest=currentpicture, frame src, pair position, pair align,
add(dest,align(src,align),position,group,filltype,above);
}
-// Like attach(picture,frame,pair) but extend picture to accommodate frame;
+// Like add(frame,frame,pair) but align frame in direction align.
+void add(frame dest, frame src, pair position, pair align,
+ bool group=true, filltype filltype=NoFill, bool above=true)
+{
+ add(dest,align(src,align),position,group,filltype,above);
+}
+
+// Like add(picture,frame,pair,pair) but extend picture to accommodate frame;
void attach(picture dest=currentpicture, frame src, pair position,
pair align, bool group=true, filltype filltype=NoFill,
bool above=true)
@@ -1935,22 +1960,29 @@ void postscript(picture pic=currentpicture, string s)
},true);
}
-void tex(picture pic=currentpicture, string s)
+void postscript(picture pic=currentpicture, string s, pair min, pair max)
{
- pic.add(new void(frame f, transform) {
- tex(f,s);
+ pic.add(new void(frame f, transform t) {
+ postscript(f,s,t*min,t*max);
},true);
}
-void postscript(picture pic=currentpicture, string s, pair min, pair max)
+void tex(picture pic=currentpicture, string s)
{
- pic.add(new void(frame f, transform t) {
- postscript(f,s,t*min,t*max);
+ // Force TeX string s to be evaluated immediately (in case it is a macro).
+ frame g;
+ tex(g,s);
+ size(g);
+ pic.add(new void(frame f, transform) {
+ tex(f,s);
},true);
}
void tex(picture pic=currentpicture, string s, pair min, pair max)
{
+ frame g;
+ tex(g,s);
+ size(g);
pic.add(new void(frame f, transform t) {
tex(f,s,t*min,t*max);
},true);
@@ -1968,3 +2000,31 @@ void erase(picture pic=currentpicture)
pic.uptodate=false;
pic.erase();
}
+
+void begin(picture pic=currentpicture, string name, string id="",
+ bool visible=true)
+{
+ if(!latex() || !pdf()) return;
+ settings.twice=true;
+ if(id == "") id=string(++ocgindex);
+ tex(pic,"\begin{ocg}{"+name+"}{"+id+"}{"+(visible ? "1" : "0")+"}");
+ layer(pic);
+}
+
+void end(picture pic=currentpicture)
+{
+ if(!latex() || !pdf()) return;
+ tex(pic,"\end{ocg}");
+ layer(pic);
+}
+
+// For users of the LaTeX babel package.
+void deactivatequote(picture pic=currentpicture)
+{
+ tex(pic,"\catcode`\"=12");
+}
+
+void activatequote(picture pic=currentpicture)
+{
+ tex(pic,"\catcode`\"=13");
+}
diff --git a/Master/texmf/asymptote/plain_shipout.asy b/Master/texmf/asymptote/plain_shipout.asy
index 9691a8e2fcf..e96a3a8acb1 100644
--- a/Master/texmf/asymptote/plain_shipout.asy
+++ b/Master/texmf/asymptote/plain_shipout.asy
@@ -2,9 +2,7 @@
string defaultfilename;
string outprefix(string prefix=defaultfilename) {
- string s=prefix != "" ? prefix :
- (settings.outname == "" && interactive()) ? "out" : settings.outname;
- return stripextension(s);
+ return stripextension(prefix != "" ? prefix : outname());
}
string outformat(string format="")
@@ -14,7 +12,6 @@ string outformat(string format="")
return format;
}
-
bool shipped; // Was a picture or frame already shipped out?
frame currentpatterns;
diff --git a/Master/texmf/asymptote/plain_strings.asy b/Master/texmf/asymptote/plain_strings.asy
index 598d61e4249..138ab05ca05 100644
--- a/Master/texmf/asymptote/plain_strings.asy
+++ b/Master/texmf/asymptote/plain_strings.asy
@@ -83,19 +83,28 @@ string verbatim(string s)
}
// Split a string into an array of substrings delimited by delimiter
-string[] split(string s, string delimiter=" ")
+// If delimiter is an empty string, use space delimiter, discarding duplicates.
+string[] split(string s, string delimiter="")
{
+ bool prune=false;
+ if(delimiter == "") {
+ prune=true;
+ delimiter=" ";
+ }
+
string[] S;
int last=0;
int i;
int N=length(delimiter);
+ int n=length(s);
while((i=find(s,delimiter,last)) >= 0) {
if(i >= last)
S.push(substr(s,last,i-last));
last=i+N;
+ if(prune)
+ while(substr(s,last,1) == " ") ++last;
}
- int n=length(s);
- if(n >= last)
+ if(n > last || (n == last && !prune))
S.push(substr(s,last,n-last));
return S;
}
@@ -150,7 +159,12 @@ string graphic(string name, string options="")
{
if(latex()) {
if(options != "") options="["+options+"]";
- return "\includegraphics"+options+"{"+name+"}";
+ if(find(name," ") < 0)
+ return "\includegraphics"+options+"{"+name+"}";
+ else {
+ return "\includegraphics"+options+
+ (pdf() ? "{\""+stripextension(name)+"\".pdf}" : "{\""+name+"\"}");
+ }
}
if(settings.tex != "context")
notimplemented("graphic");
@@ -160,10 +174,10 @@ string graphic(string name, string options="")
string minipage(string s, real width=100bp)
{
if(latex())
- return "\begin{minipage}{"+(string) (width*pt)+"pt}"+s+"\end{minipage}";
+ return "\begin{minipage}{"+(string) (width/pt)+"pt}"+s+"\end{minipage}";
if(settings.tex != "context")
notimplemented("minipage");
- return "\startframedtext[none][frame=off,width="+(string) (width*pt)+
+ return "\startframedtext[none][frame=off,width="+(string) (width/pt)+
"pt]"+s+"\stopframedtext";
}
@@ -197,20 +211,3 @@ string phantom(string s)
}
restricted int ocgindex=0;
-
-void begin(picture pic=currentpicture, string name, string id="",
- bool visible=true)
-{
- if(!latex() || !pdf()) return;
- settings.twice=true;
- if(id == "") id=string(++ocgindex);
- tex(pic,"\begin{ocg}{"+name+"}{"+id+"}{"+(visible ? "1" : "0")+"}");
- layer(pic);
-}
-
-void end(picture pic=currentpicture)
-{
- if(!latex() || !pdf()) return;
- tex(pic,"\end{ocg}");
- layer(pic);
-}
diff --git a/Master/texmf/asymptote/slide.asy b/Master/texmf/asymptote/slide.asy
index 579253b182f..092c3429145 100644
--- a/Master/texmf/asymptote/slide.asy
+++ b/Master/texmf/asymptote/slide.asy
@@ -444,7 +444,7 @@ void asyinclude(string s, real xsize=0, real ysize=xsize)
picture currentpictureSave=currentpicture;
currentpicture=new picture;
_eval("include \""+s+"\";",true);
- s=stripdirectory(settings.outname+"_"+s);
+ s=stripdirectory(outprefix()+"_"+s);
codefile.push(s);
frame f=(xsize > 0 || ysize > 0) ?
currentpicture.fit(xsize,ysize) : currentpicture.fit();
@@ -490,7 +490,7 @@ void asyfigure(string s, string options="", string caption="", pair align=S,
string asywrite(string s, string preamble="")
{
static int count=0;
- string name=settings.outname+"_slide"+(string) count;
+ string name=outprefix()+"_slide"+(string) count;
++count;
file temp=output(name+".asy");
write(temp,preamble);
@@ -526,8 +526,8 @@ void item(string s, pen p=itempen, bool step=itemstep)
frame b;
label(b,bullet,(0,0),p);
real bulletwidth=max(b).x-min(b).x;
- remark(bullet+"\hangindent"+(string) bulletwidth+"pt$\,$"+s,p,
- -bulletwidth*pt,step=step);
+ remark(bullet+"\hangindent"+(string) (bulletwidth/pt)+"pt$\,$"+s,p,
+ -bulletwidth,step=step);
}
void subitem(string s, pen p=itempen)
diff --git a/Master/texmf/asymptote/solids.asy b/Master/texmf/asymptote/solids.asy
index db98af3088c..7e5883bc884 100644
--- a/Master/texmf/asymptote/solids.asy
+++ b/Master/texmf/asymptote/solids.asy
@@ -1,7 +1,7 @@
import three;
import graph3;
-pen defaultbackpen=linetype("4 4",4,scale=false);
+pen defaultbackpen=linetype(new real[] {4,4},4,scale=false);
// A solid geometry package.
diff --git a/Master/texmf/asymptote/three.asy b/Master/texmf/asymptote/three.asy
index 5c3a404514f..5b3dd26aba7 100644
--- a/Master/texmf/asymptote/three.asy
+++ b/Master/texmf/asymptote/three.asy
@@ -17,6 +17,7 @@ real linegranularity=0.005;
int linesectors=8; // Number of angular sectors.
real dotgranularity=0.0001;
real angleprecision=1e-5; // Precision for centering perspective projections.
+int maxangleiterations=25;
real rendermargin=0.02;
string defaultembed3Doptions;
@@ -190,7 +191,9 @@ projection operator * (transform3 t, projection P)
projection P=P.copy();
if(!P.absolute) {
P.camera=t*P.camera;
+ P.normal=t*(P.target+P.normal);
P.target=t*P.target;
+ P.normal -= P.target;
P.calculate();
}
return P;
@@ -268,9 +271,10 @@ projection oblique(real angle=45)
t[0][2]=-c2;
t[1][2]=-s2;
t[2][2]=1;
- return projection((c2,s2,1),up=Y,
+ t[2][3]=-1;
+ return projection((c2,s2,1),up=Y,normal=(0,0,1),
new transformation(triple,triple,triple) {
- return transformation(t,oblique=true);});
+ return transformation(t);});
}
projection obliqueZ(real angle=45) {return oblique(angle);}
@@ -287,9 +291,10 @@ projection obliqueX(real angle=45)
t[1][2]=1;
t[2][2]=0;
t[2][0]=1;
- return projection((1,c2,s2),
+ t[2][3]=-1;
+ return projection((1,c2,s2),normal=(1,0,0),
new transformation(triple,triple,triple) {
- return transformation(t,oblique=true);});
+ return transformation(t);});
}
projection obliqueY(real angle=45)
@@ -302,9 +307,10 @@ projection obliqueY(real angle=45)
t[1][2]=1;
t[2][1]=-1;
t[2][2]=0;
- return projection((c2,-1,s2),
+ t[2][3]=-1;
+ return projection((c2,-1,s2),normal=(0,-1,0),
new transformation(triple,triple,triple) {
- return transformation(t,oblique=true);});
+ return transformation(t);});
}
projection oblique=oblique();
@@ -349,13 +355,13 @@ triple invert(pair z, triple normal, triple point,
// Map pair to a triple on the projection plane.
triple invert(pair z, projection P=currentprojection)
{
- return invert(z,P.vector(),P.target,P);
+ return invert(z,P.normal,P.target,P);
}
// Map pair dir to a triple direction at point v on the projection plane.
triple invert(pair dir, triple v, projection P=currentprojection)
{
- return invert(project(v,P)+dir,P.vector(),v,P)-v;
+ return invert(project(v,P)+dir,P.normal,v,P)-v;
}
pair xypart(triple v)
@@ -675,24 +681,22 @@ guide3 operator .. (... guide3[] g)
};
}
-guide3 operator ::(... guide3[] a)
-{
- if(a.length == 0) return nullpath3;
- guide3 g=a[0];
- for(int i=1; i < a.length; ++i)
- g=g.. tension atleast 1 ..a[i];
- return g;
-}
+typedef guide3 interpolate3(... guide3[]);
-guide3 operator ---(... guide3[] a)
+interpolate3 join3(tensionSpecifier t)
{
- if(a.length == 0) return nullpath3;
- guide3 g=a[0];
- for(int i=1; i < a.length; ++i)
- g=g.. tension atleast infinity ..a[i];
- return g;
+ return new guide3(... guide3[] a) {
+ if(a.length == 0) return nullpath3;
+ guide3 g=a[0];
+ for(int i=1; i < a.length; ++i)
+ g=g..t..a[i];
+ return g;
+ };
}
+interpolate3 operator ::=join3(operator tension(1,true));
+interpolate3 operator ---=join3(operator tension(infinity,true));
+
flatguide3 operator cast(guide3 g)
{
flatguide3 f;
@@ -1056,12 +1060,12 @@ path3 invert(path p, triple normal, triple point,
path3 invert(path p, triple point, projection P=currentprojection)
{
- return path3(p,new triple(pair z) {return invert(z,P.vector(),point,P);});
+ return path3(p,new triple(pair z) {return invert(z,P.normal,point,P);});
}
path3 invert(path p, projection P=currentprojection)
{
- return path3(p,new triple(pair z) {return invert(z,P.vector(),P.target,P);});
+ return path3(p,new triple(pair z) {return invert(z,P.normal,P.target,P);});
}
// Construct a path from a path3 by applying P to each control point.
@@ -1250,7 +1254,7 @@ path3 solve(flatguide3 g)
path nurb(path3 p, projection P, int ninterpolate=P.ninterpolate)
{
triple f=P.camera;
- triple u=unit(P.vector());
+ triple u=unit(P.normal);
transform3 t=P.t;
path nurb(triple v0, triple v1, triple v2, triple v3) {
@@ -1360,8 +1364,9 @@ triple normal(path3 p)
if(abs(a) >= fuzz && abs(b) >= fuzz) {
triple n=cross(unit(a),unit(b));
real absn=abs(n);
+ if(absn < sqrtEpsilon) return false;
n=unit(n);
- if(absnormal > 0 && absn > sqrtEpsilon &&
+ if(absnormal > 0 &&
abs(normal-n) > sqrtEpsilon && abs(normal+n) > sqrtEpsilon)
return true;
else {
@@ -1455,7 +1460,7 @@ private transform3 flip(transform3 t, triple X, triple Y, triple Z,
return scale(s(v.x),s(v.y),s(v.z));
}
- triple u=unit(P.vector());
+ triple u=unit(P.normal);
triple up=unit(perp(P.up,u));
bool upright=dot(Z,u) >= 0;
if(dot(Y,up) < 0) {
@@ -1782,7 +1787,7 @@ transform3 align(triple u)
// return a rotation that maps X,Y to the projection plane.
transform3 transform3(projection P=currentprojection)
{
- triple w=unit(P.oblique ? P.camera : P.vector());
+ triple w=unit(P.normal);
triple v=unit(perp(P.up,w));
if(v == O) v=cross(perp(w),w);
triple u=cross(v,w);
@@ -1864,8 +1869,6 @@ triple max(explicit path3[] p)
return maxp;
}
-typedef guide3 interpolate3(... guide3[]);
-
path3 randompath3(int n, bool cumulate=true, interpolate3 join=operator ..)
{
guide3 g;
@@ -1948,8 +1951,9 @@ path3 arc(triple c, triple v1, triple v2, triple normal=O, bool direction=CCW)
real t1=t1[0];
real t2=t2[0];
int n=length(unitcircle3);
- if(t1 >= t2 && direction) t1 -= n;
- if(t2 >= t1 && !direction) t2 -= n;
+ if(direction) {
+ if (t1 >= t2) t1 -= n;
+ } else if(t2 >= t1) t2 -= n;
path3 p=subpath(unitcircle3,t1,t2);
if(align) p=T*p;
@@ -1986,11 +1990,6 @@ path3 plane(triple u, triple v, triple O=O)
return O--O+u--O+u+v--O+v--cycle;
}
-triple size3(frame f)
-{
- return max3(f)-min3(f);
-}
-
// PRC/OpenGL support
include three_light;
@@ -2125,10 +2124,9 @@ draw=new void(frame f, path3 g, material p=currentpen,
} else _draw(f,g,q,name);
} else _draw(f,g,q,name);
}
- string type=linetype(adjust(q,arclength(g),cyclic(g)));
- if(length(type) == 0) drawthick(g);
+ real[] dash=linetype(adjust(q,arclength(g),cyclic(g)));
+ if(dash.length == 0) drawthick(g);
else {
- real[] dash=(real[]) split(type," ");
if(sum(dash) > 0) {
dash.cyclic=true;
real offset=offset(q);
@@ -2418,7 +2416,7 @@ for(i=0; i < count; i++) {
var center=new Array(
";
for(int i=0; i < center.length; ++i)
- s += "Vector3("+format(center[i],",")+"),
+ s += "Vector3("+format(center[i]/cm,",")+"),
";
s += ");
@@ -2457,7 +2455,7 @@ runtime.addEventHandler(billboardHandler);
runtime.refresh();
";
-return s;
+ return s;
}
string lightscript(light light) {
@@ -2612,12 +2610,10 @@ struct scene
if(!P.absolute) {
this.P=t*P;
- if(this.P.center) {
- bool recalculate=false;
+ if(this.P.center && settings.render != 0) {
triple target=0.5*(m+M);
this.P.target=target;
- recalculate=true;
- if(recalculate) this.P.calculate();
+ this.P.calculate();
}
if(this.P.autoadjust || this.P.infinity)
adjusted=adjusted | this.P.adjust(m,M);
@@ -2674,7 +2670,6 @@ struct scene
// Choose the angle to be just large enough to view the entire image.
real angle(projection P) {
T=identity4;
- int maxiterations=100;
real h=-0.5*P.target.z;
pair r,R;
real diff=realMax;
@@ -2695,7 +2690,7 @@ struct scene
}
diff=abs(s-lasts);
++i;
- } while (diff > angleprecision && i < maxiterations);
+ } while (diff > angleprecision && i < maxangleiterations);
real aspect=width > 0 ? height/width : 1;
real rx=-r.x*aspect;
real Rx=R.x*aspect;
@@ -2757,7 +2752,7 @@ object embed(string label="", string text=label, string prefix=defaultfilename,
P=S.T*P;
}
if(settings.verbose > 0) {
- if(P.center || (!P.infinity && P.autoadjust))
+ if((P.center && settings.render != 0) || (!P.infinity && P.autoadjust))
write("adjusting target to ",tinv*target);
}
}
@@ -2767,7 +2762,9 @@ object embed(string label="", string text=label, string prefix=defaultfilename,
bool preview=settings.render > 0;
if(prc) {
// The movie15.sty package cannot handle spaces or dots in filenames.
- prefix=replace(prefix,new string[][]{{" ","_"},{".","_"}});
+ string dir=stripfile(prefix);
+ prefix=dir+replace(stripdirectory(prefix),
+ new string[][]{{" ","_"},{".","_"}});
if(settings.embed || nativeformat() == "pdf")
prefix += "+"+(string) file3.length;
} else
@@ -3063,7 +3060,8 @@ frame[] fit3(string prefix="", picture[] pictures, picture all,
for(int i=settings.reverse ? pictures.length-1 : 0;
i >= 0 && i < pictures.length && !settings.interrupt;
settings.reverse ? --i : ++i) {
- embedder(prefix,out[i],format,view,options,script,light,S.P);
+ frame f=embedder(prefix,out[i],format,view,options,script,light,S.P);
+ if(!settings.loop) out[i]=f;
}
if(!settings.loop) break;
}
@@ -3091,6 +3089,25 @@ fit=new frame[](string prefix="", picture[] pictures, string format="",
fit3(prefix,pictures,all,format,view,options,script,P);
};
+// Add frame src to picture dest about position.
+void add(picture dest=currentpicture, frame src, triple position)
+{
+ if(is3D(src)) {
+ dest.add(new void(frame f, transform3 t, picture, projection) {
+ add(f,shift(t*position)*src);
+ },true);
+ } else {
+ dest.add(new void(frame, transform3 t, picture pic, projection P) {
+ if(pic != null) {
+ pic.add(new void(frame f, transform T) {
+ add(f,T*shift(project(t*position,P))*src);
+ },true);
+ }
+ },true);
+ }
+ dest.addBox(position,position,min3(src),max3(src));
+}
+
exitfcn currentexitfunction=atexit();
void exitfunction()
diff --git a/Master/texmf/asymptote/three_arrows.asy b/Master/texmf/asymptote/three_arrows.asy
index 161a716bca6..b4319219284 100644
--- a/Master/texmf/asymptote/three_arrows.asy
+++ b/Master/texmf/asymptote/three_arrows.asy
@@ -70,6 +70,7 @@ struct arrowhead3
real size(pen p)=arrowsize;
real arcsize(pen p)=arcarrowsize;
real gap=1;
+ real size;
bool splitpath=true;
surface head(path3 g, position position=EndPoint,
@@ -88,7 +89,7 @@ struct arrowhead3
if(filltype == null) filltype=FillDraw(p);
bool draw=filltype.type != filltype.Fill;
triple v=point(s,length(s));
- triple N=normal == O ? P.vector() : normal;
+ triple N=normal == O ? P.normal : normal;
triple w=unit(v-point(s,0));
transform3 t=transform3(w,unit(cross(w,N)));
path3[] H=t*path3(h);
@@ -180,8 +181,7 @@ arrowhead3 HookHead3(real dir=arrowdir, real barb=arrowbarb)
filltype filltype=null, bool forwards=true,
projection P=currentprojection) {
if(size == 0) size=a.size(p);
-
- angle=min(angle*arrowhookfactor,45);
+
bool relative=position.relative;
real position=position.position.x;
if(relative) position=reltime(g,position);
@@ -265,11 +265,12 @@ arrowhead3 DefaultHead2(triple normal=O) {
projection P=currentprojection) {
if(size == 0) size=a.size(p);
path h=a.project(g,forwards,P);
+ a.size=min(size,arclength(h));
path[] H=a.align(DefaultHead.head(h,p,size,angle),h);
H=forwards ? yscale(-1)*H : H;
return a.surface(g,position,size,H,p,filltype,normal,P);
};
- a.gap=1.01;
+ a.gap=1.005;
return a;
}
arrowhead3 DefaultHead2=DefaultHead2();
@@ -282,14 +283,14 @@ arrowhead3 HookHead2(real dir=arrowdir, real barb=arrowbarb, triple normal=O)
filltype filltype=null, bool forwards=true,
projection P=currentprojection) {
if(size == 0) size=a.size(p);
- angle=min(angle*arrowhookfactor,45);
path h=a.project(g,forwards,P);
+ a.size=min(size,arclength(h));
path[] H=a.align(HookHead.head(h,p,size,angle),h);
H=forwards ? yscale(-1)*H : H;
return a.surface(g,position,size,H,p,filltype,normal,P);
};
a.arrowhead2=HookHead;
- a.gap=1.01;
+ a.gap=1.005;
return a;
}
arrowhead3 HookHead2=HookHead2();
@@ -302,6 +303,7 @@ arrowhead3 TeXHead2(triple normal=O) {
bool forwards=true, projection P=currentprojection) {
if(size == 0) size=a.size(p);
path h=a.project(g,forwards,P);
+ a.size=min(size,arclength(h));
h=rotate(-degrees(dir(h,length(h)),warn=false))*h;
path[] H=TeXHead.head(h,p,size,angle);
H=forwards ? yscale(-1)*H : H;
@@ -311,8 +313,8 @@ arrowhead3 TeXHead2(triple normal=O) {
};
a.arrowhead2=TeXHead;
a.size=TeXHead.size;
- a.gap=0.83;
a.splitpath=false;
+ a.gap=1.005;
return a;
}
arrowhead3 TeXHead2=TeXHead2();
@@ -359,6 +361,7 @@ void drawarrow(picture pic, arrowhead3 arrowhead=DefaultHead3,
path3 r=subpath(g,position,0);
size=min(arrowsizelimit*arclength(r),size);
surface head=arrowhead.head(g,position,q,size,angle,filltype,forwards,P);
+ if(arrowhead.size > 0) size=arrowhead.size;
bool endpoint=position > L-sqrtEpsilon;
if(arrowhead.splitpath || endpoint) {
if(position > 0) {
@@ -526,11 +529,11 @@ void bar(picture pic, triple a, triple d, triple perp=O,
pic.add(new void(frame f, transform3 t, picture pic2, projection P) {
picture opic;
triple A=t*a;
- triple v=d == O ? abs(perp)*unit(cross(P.vector(),perp)) : d;
+ triple v=d == O ? abs(perp)*unit(cross(P.normal,perp)) : d;
draw(opic,A-v--A+v,p,light);
add(f,opic.fit3(identity4,pic2,P));
});
- triple v=d == O ? cross(currentprojection.vector(),perp) : d;
+ triple v=d == O ? cross(currentprojection.normal,perp) : d;
pen q=(pen) p;
triple m=min3(q);
triple M=max3(q);
diff --git a/Master/texmf/asymptote/three_surface.asy b/Master/texmf/asymptote/three_surface.asy
index e520229371f..1be7eb0259c 100644
--- a/Master/texmf/asymptote/three_surface.asy
+++ b/Master/texmf/asymptote/three_surface.asy
@@ -1343,7 +1343,7 @@ triple rectify(triple dir)
path3[] align(path3[] g, transform3 t=identity4, triple position,
triple align, pen p=currentpen)
{
- if(determinant(t) == 0) return g;
+ if(determinant(t) == 0 || g.length == 0) return g;
triple m=min(g);
triple dir=rectify(inverse(t)*-align);
triple a=m+realmult(dir,max(g)-m);
@@ -1353,7 +1353,7 @@ path3[] align(path3[] g, transform3 t=identity4, triple position,
surface align(surface s, transform3 t=identity4, triple position,
triple align, pen p=currentpen)
{
- if(determinant(t) == 0) return s;
+ if(determinant(t) == 0 || s.s.length == 0) return s;
triple m=min(s);
triple dir=rectify(inverse(t)*-align);
triple a=m+realmult(dir,max(s)-m);
@@ -1367,17 +1367,11 @@ surface surface(Label L, triple position=O)
shift(position)*L.T3*s;
}
-path[] path(Label L, pair z=0, projection P)
+private path[] path(Label L, pair z=0, projection P)
{
path[] g=texpath(L);
- if(L.defaulttransform3) {
- return L.align.is3D ? align(g,z,project(L.align.dir3,P)-project(O,P),L.p) :
- shift(z)*g;
- } else {
- path3[] G=path3(g);
- return L.align.is3D ? shift(z)*project(align(G,L.T3,O,L.align.dir3,L.p),P) :
- shift(z)*project(L.T3*G,P);
- }
+ return L.align.is3D ? align(g,z,project(L.align.dir3,P)-project(O,P),L.p) :
+ shift(z)*g;
}
void label(frame f, Label L, triple position, align align=NoAlign,
@@ -1397,15 +1391,18 @@ void label(frame f, Label L, triple position, align align=NoAlign,
for(patch S : surface(L,position).s)
draw3D(f,S,position,L.p,light,partname(name,++i),interaction);
} else {
- if(L.filltype == NoFill)
- fill(f,path(L,project(position,P.t),P),
- color(L.T3*Z,L.p,light,shiftless(P.T.modelview)));
- else {
- frame d;
- fill(d,path(L,project(position,P.t),P),
- color(L.T3*Z,L.p,light,shiftless(P.T.modelview)));
- add(f,d,L.filltype);
- }
+ pen p=color(L.T3*Z,L.p,light,shiftless(P.T.modelview));
+ if(L.defaulttransform3) {
+ if(L.filltype == NoFill)
+ fill(f,path(L,project(position,P.t),P),p);
+ else {
+ frame d;
+ fill(d,path(L,project(position,P.t),P),p);
+ add(f,d,L.filltype);
+ }
+ } else
+ for(patch S : surface(L,position).s)
+ fill(f,project(S.external(),P,1),p);
}
}
@@ -1430,22 +1427,30 @@ void label(picture pic=currentpicture, Label L, triple position,
L.T=L.T*scale(abs(P.camera-v)/abs(P.vector()));
if(L.defaulttransform3)
L.T3=transform3(P);
+
if(is3D()) {
int i=-1;
for(patch S : surface(L,v).s)
draw3D(f,S,v,L.p,light,partname(name,++i),interaction);
}
+
if(pic != null) {
- if(L.filltype == NoFill)
- fill(project(v,P.t),pic,path(L,P),
- color(L.T3*Z,L.p,light,shiftless(P.T.modelview)));
- else {
- picture d;
- fill(project(v,P.t),d,path(L,P),
- color(L.T3*Z,L.p,light,shiftless(P.T.modelview)));
- add(pic,d,L.filltype);
- }
+ pen p=color(L.T3*Z,L.p,light,shiftless(P.T.modelview));
+ if(L.defaulttransform3) {
+ if(L.filltype == NoFill)
+ fill(project(v,P.t),pic,path(L,P),p);
+ else {
+ picture d;
+ fill(project(v,P.t),d,path(L,P),p);
+ add(pic,d,L.filltype);
+ }
+ } else
+ pic.add(new void(frame f, transform T) {
+ for(patch S : surface(L,v).s)
+ fill(f,T*project(S.external(),P,1),p);
+ });
}
+
},!L.defaulttransform3);
Label L=L.copy();
@@ -1678,12 +1683,28 @@ void dot(picture pic=currentpicture, Label L, triple v, align align=NoAlign,
label(pic,L,v);
}
+pair minbound(triple[] A, projection P)
+{
+ pair b=project(A[0],P);
+ for(triple v : A)
+ b=minbound(b,project(v,P.t));
+ return b;
+}
+
+pair maxbound(triple[] A, projection P)
+{
+ pair b=project(A[0],P);
+ for(triple v : A)
+ b=maxbound(b,project(v,P.t));
+ return b;
+}
+
pair minbound(triple[][] A, projection P)
{
pair b=project(A[0][0],P);
for(triple[] a : A) {
for(triple v : a) {
- b=minbound(b,project(v,P));
+ b=minbound(b,project(v,P.t));
}
}
return b;
@@ -1694,7 +1715,7 @@ pair maxbound(triple[][] A, projection P)
pair b=project(A[0][0],P);
for(triple[] a : A) {
for(triple v : a) {
- b=maxbound(b,project(v,P));
+ b=maxbound(b,project(v,P.t));
}
}
return b;
@@ -1711,6 +1732,24 @@ triple[][] operator / (triple[][] a, real[][] b)
return A;
}
+// Draw a NURBS curve.
+void draw(picture pic=currentpicture, triple[] P, real[] knot,
+ real[] weights=new real[], pen p=currentpen, string name="")
+{
+ P=copy(P);
+ knot=copy(knot);
+ weights=copy(weights);
+ pic.add(new void(frame f, transform3 t, picture pic, projection Q) {
+ if(is3D()) {
+ triple[] P=t*P;
+ draw(f,P,knot,weights,p,name);
+ if(pic != null)
+ pic.addBox(minbound(P,Q),maxbound(P,Q));
+ }
+ },true);
+ pic.addBox(minbound(P),maxbound(P));
+}
+
// Draw a NURBS surface.
void draw(picture pic=currentpicture, triple[][] P, real[] uknot, real[] vknot,
real[][] weights=new real[][], material m=currentpen,
@@ -1734,14 +1773,11 @@ void draw(picture pic=currentpicture, triple[][] P, real[] uknot, real[] vknot,
PRCshininess=PRCshininess(m.shininess);
draw(f,P,uknot,vknot,weights,m.p,m.opacity,m.shininess,PRCshininess,
granularity,colors,lighton,name);
- if(pic != null) {
- triple[][] R=weights.length > 0 ? P/weights : P;
- pic.addBox(minbound(R,Q),maxbound(R,Q));
- }
+ if(pic != null)
+ pic.addBox(minbound(P,Q),maxbound(P,Q));
}
},true);
- triple[][] R=weights.length > 0 ? P/weights : P;
- pic.addBox(minbound(R),maxbound(R));
+ pic.addBox(minbound(P),maxbound(P));
}
// A structure to subdivide two intersecting patches about their intersection.
diff --git a/Master/texmf/asymptote/version.asy b/Master/texmf/asymptote/version.asy
index adb68a2c9db..15dbe2fe25b 100644
--- a/Master/texmf/asymptote/version.asy
+++ b/Master/texmf/asymptote/version.asy
@@ -1 +1 @@
-string VERSION="1.88";
+string VERSION="1.94";
diff --git a/Master/texmf/doc/asymptote/CAD.pdf b/Master/texmf/doc/asymptote/CAD.pdf
index 8cee0cb9c7d..ee2b6692e8f 100644
--- a/Master/texmf/doc/asymptote/CAD.pdf
+++ b/Master/texmf/doc/asymptote/CAD.pdf
Binary files differ
diff --git a/Master/texmf/doc/asymptote/asymptote.pdf b/Master/texmf/doc/asymptote/asymptote.pdf
index 318bcae923c..699a02f61b2 100644
--- a/Master/texmf/doc/asymptote/asymptote.pdf
+++ b/Master/texmf/doc/asymptote/asymptote.pdf
Binary files differ
diff --git a/Master/texmf/doc/asymptote/examples/1overx.asy b/Master/texmf/doc/asymptote/examples/1overx.asy
new file mode 100644
index 00000000000..5d9775d44dc
--- /dev/null
+++ b/Master/texmf/doc/asymptote/examples/1overx.asy
@@ -0,0 +1,17 @@
+import graph;
+size(200,IgnoreAspect);
+
+real f(real x) {return 1/x;};
+
+bool3 branch(real x)
+{
+ static int lastsign=0;
+ if(x == 0) return false;
+ int sign=sgn(x);
+ bool b=lastsign == 0 || sign == lastsign;
+ lastsign=sign;
+ return b ? true : default;
+}
+
+draw(graph(f,-1,1,branch));
+axes("$x$","$y$",red);
diff --git a/Master/texmf/doc/asymptote/examples/Klein.asy b/Master/texmf/doc/asymptote/examples/Klein.asy
index 4c8089dd86a..0d31c495f01 100644
--- a/Master/texmf/doc/asymptote/examples/Klein.asy
+++ b/Master/texmf/doc/asymptote/examples/Klein.asy
@@ -39,6 +39,6 @@ draw(surface(xscale(0.26)*yscale(0.1)*rotate(90)*hi,s,4.9,1.4,h,bottom=false));
draw(s.uequals(0),blue+dashed);
draw(s.uequals(pi),blue+dashed);
-currentpicture.add(new void(frame f, transform3 t, picture pic, projection P) {
+add(new void(frame f, transform3 t, picture pic, projection P) {
draw(f,invert(box(min(f,P),max(f,P)),P));
});
diff --git a/Master/texmf/doc/asymptote/examples/NURBScurve.asy b/Master/texmf/doc/asymptote/examples/NURBScurve.asy
new file mode 100644
index 00000000000..b3b8c393b9e
--- /dev/null
+++ b/Master/texmf/doc/asymptote/examples/NURBScurve.asy
@@ -0,0 +1,33 @@
+import three;
+
+size(10cm);
+
+currentprojection=perspective(50,80,50);
+
+// Nonrational curve:
+// udegree=3, nu=6;
+real[] knot={0,0,0,0,0.4,0.6,1,1,1,1};
+
+triple[] P={
+ (-31.2061,12.001,6.45082),
+ (-31.3952,14.7353,6.53707),
+ (-31.5909,21.277,6.70051),
+ (-31.4284,25.4933,6.76745),
+ (-31.5413,30.3485,6.68777),
+ (-31.4896,32.2839,6.58385),
+ };
+
+draw(P,knot,green);
+
+// Rational Bezier curve:
+// udegree=3, nu=4;
+real[] knot={0,0,0,0,1,1,1,1};
+path3 g=scale3(20)*(X{Y}..{-X}Y);
+triple[] P={point(g,0),postcontrol(g,0),precontrol(g,1),point(g,1)};
+
+// Optional weights:
+real[] weights=array(P.length,1.0);
+weights[2]=5;
+
+draw(P,knot,weights,red);
+
diff --git a/Master/texmf/doc/asymptote/examples/NURBSsphere.asy b/Master/texmf/doc/asymptote/examples/NURBSsphere.asy
new file mode 100644
index 00000000000..d7f0e77321d
--- /dev/null
+++ b/Master/texmf/doc/asymptote/examples/NURBSsphere.asy
@@ -0,0 +1,32 @@
+import three;
+size(400);
+
+currentprojection=perspective(5,4,2,autoadjust=false);
+
+real[] uknot={0,0,0,1,1,2,2,3,3,4,4,4};
+
+real[] vknot={0,0,0,1,1,2,2,2};
+
+triple[][] P={{(0,0,1),(1,0,1),(1,0,0),(1,0,-1),(0,0,-1)},
+ {(0,0,1),(1,1,1),(1,1,0),(1,1,-1),(0,0,-1)},
+ {(0,0,1),(0,1,1),(0,1,0),(0,1,-1),(0,0,-1)},
+ {(0,0,1),(-1,1,1),(-1,1,0),(-1,1,-1),(0,0,-1)},
+ {(0,0,1),(-1,0,1),(-1,0,0),(-1,0,-1),(0,0,-1)},
+ {(0,0,1),(-1,-1,1),(-1,-1,0),(-1,-1,-1),(0,0,-1)},
+ {(0,0,1),(0,-1,1),(0,-1,0),(0,-1,-1),(0,0,-1)},
+ {(0,0,1),(1,-1,1),(1,-1,0),(1,-1,-1),(0,0,-1)},
+ {(0,0,1),(1,0,1),(1,0,0),(1,0,-1),(0,0,-1)}};
+
+real[][] weights={
+ {1,1,2,1,1},
+ {1,1,2,1,1},
+ {2,2,4,2,2},
+ {1,1,2,1,1},
+ {1,1,2,1,1},
+ {1,1,2,1,1},
+ {2,2,4,2,2},
+ {1,1,2,1,1},
+ {1,1,2,1,1}
+};
+
+draw(P,uknot,vknot,weights,yellow);
diff --git a/Master/texmf/doc/asymptote/examples/NURBSsurface.asy b/Master/texmf/doc/asymptote/examples/NURBSsurface.asy
index 3fcea79dbbd..878fd956393 100644
--- a/Master/texmf/doc/asymptote/examples/NURBSsurface.asy
+++ b/Master/texmf/doc/asymptote/examples/NURBSsurface.asy
@@ -2,7 +2,7 @@ import three;
size(10cm);
-currentprojection=perspective(40,40,50);
+currentprojection=perspective(50,80,50);
// Nonrational surface:
// udegree=3, vdegree=3, nu=5, nv=6;
@@ -56,6 +56,6 @@ triple[][] P=scale3(20)*octant1.P;
// Optional weights:
real[][] weights=array(P.length,array(P[0].length,1.0));
-weights[1][2]=0.5;
+weights[0][2]=5.0;
draw(P,uknot,vknot,weights,blue);
diff --git a/Master/texmf/doc/asymptote/examples/SierpinskiGasket.asy b/Master/texmf/doc/asymptote/examples/SierpinskiGasket.asy
new file mode 100644
index 00000000000..57251735db8
--- /dev/null
+++ b/Master/texmf/doc/asymptote/examples/SierpinskiGasket.asy
@@ -0,0 +1,31 @@
+size(200);
+import palette;
+import three;
+currentprojection=perspective(8,2,1);
+
+triple[] M={(0,0,1),1/3*(sqrt(8),0,-1),
+ 1/3*((sqrt(8))*Cos(120),(sqrt(8))*Sin(120),-1),
+ 1/3*((sqrt(8))*Cos(240),(sqrt(8))*Sin(240),-1)};
+
+int level=5;
+
+surface s;
+
+void recur(triple p, real u, int l) {
+ if(l < level)
+ for(triple V : M)
+ recur(p+u*V,u/2,l+1);
+ else
+ for(triple V : M) {
+ s.append(surface((p+u*(V+M[0]))--(p+u*(V+M[1]))--(p+u*(V+M[2]))--cycle));
+ s.append(surface((p+u*(V+M[0]))--(p+u*(V+M[2]))--(p+u*(V+M[3]))--cycle));
+ s.append(surface((p+u*(V+M[0]))--(p+u*(V+M[3]))--(p+u*(V+M[1]))--cycle));
+ s.append(surface((p+u*(V+M[3]))--(p+u*(V+M[2]))--(p+u*(V+M[1]))--cycle));
+ }
+}
+
+recur(O,0.5,1);
+
+s.colors(palette(s.map(zpart),Rainbow()));
+
+draw(s);
diff --git a/Master/texmf/doc/asymptote/examples/SierpinskiSponge.asy b/Master/texmf/doc/asymptote/examples/SierpinskiSponge.asy
new file mode 100644
index 00000000000..209c3d182ed
--- /dev/null
+++ b/Master/texmf/doc/asymptote/examples/SierpinskiSponge.asy
@@ -0,0 +1,42 @@
+size(200);
+import palette;
+import three;
+
+triple[] M={
+ (-1,-1,-1),(0,-1,-1),(1,-1,-1),(1,0,-1),
+ (1,1,-1),(0,1,-1),(-1,1,-1),(-1,0,-1),
+ (-1,-1,0),(1,-1,0),(1,1,0),(-1,1,0),
+ (-1,-1,1),(0,-1,1),(1,-1,1),(1,0,1),
+ (1,1,1),(0,1,1),(-1,1,1),(-1,0,1)
+};
+
+triple[] K={
+ (1,-1,-1),(1,0,-1),(1,1,-1),(1,1,0),
+ (1,1,1),(1,0,1),(1,-1,1),(1,-1,0),
+ (0,0,-1),(0,0,1),(0,-1,0),(0,1,0)
+};
+
+surface s;
+
+void recur(triple p, real u, int level) {
+ if(level > 1 )
+ for(triple V : M)
+ recur(p+u*V,u/3,level-1);
+ else
+ for(triple V : K) {
+ transform3 T=shift(p)*scale3(u)*shift(V)*scale3(0.5);
+ surface t=T*surface((1,-1,-1)--(1,1,-1)--(1,1,1)--(1,-1,1)--cycle);
+ s.append(t);
+ s.append(scale3(-1)*t);
+ }
+}
+
+recur((0,0,0),1/3,3);
+
+surface sf;
+sf.append(s);
+sf.append(rotate(90,Y)*s);
+sf.append(rotate(90,Z)*s);
+sf.colors(palette(sf.map(abs),Rainbow()));
+
+draw(sf);
diff --git a/Master/texmf/doc/asymptote/examples/alignbox.asy b/Master/texmf/doc/asymptote/examples/alignbox.asy
index 8f216c6a10c..67083b1e2e0 100644
--- a/Master/texmf/doc/asymptote/examples/alignbox.asy
+++ b/Master/texmf/doc/asymptote/examples/alignbox.asy
@@ -4,6 +4,6 @@ object left=align(object("$x^2$",ellipse,margin),W);
add(left);
object right=align(object("$\sin x$",ellipse,margin),4E);
add(right);
-currentpicture.add(new void(frame f, transform t) {
+add(new void(frame f, transform t) {
draw(f,point(left,NE,t)--point(right,W,t));
});
diff --git a/Master/texmf/doc/asymptote/examples/animations/inlinemovie.tex b/Master/texmf/doc/asymptote/examples/animations/inlinemovie.tex
index 3fa61b6673b..f3d9f5b0893 100644
--- a/Master/texmf/doc/asymptote/examples/animations/inlinemovie.tex
+++ b/Master/texmf/doc/asymptote/examples/animations/inlinemovie.tex
@@ -26,7 +26,7 @@ for(int i=0; i < 10; ++i) {
label(A.pdf("controls",delay=50,keep=!settings.inlinetex));
\end{asy}
%Uncomment the following line when not using the [inline] package option:
-%\ASYanimategraphics[controls,loop]{20}{movie1}{}{}
+%\ASYanimategraphics[controls]{50}{movie1}{}{}
\end{center}
And here is another one, clickable but without the control panel:
@@ -45,7 +45,7 @@ for(int i=0; i < 10; ++i) {
label(A.pdf(keep=!settings.inlinetex));
\end{asy}
%Uncomment the following line when not using the [inline] package option:
-%\ASYanimategraphics[controls,loop]{10}{movie2}{}{}
+%\ASYanimategraphics[controls]{10}{movie2}{}{}
\end{center}
\end{document}
diff --git a/Master/texmf/doc/asymptote/examples/animations/inlinemovie3.tex b/Master/texmf/doc/asymptote/examples/animations/inlinemovie3.tex
index 4cd9cce3150..46779e85b28 100644
--- a/Master/texmf/doc/asymptote/examples/animations/inlinemovie3.tex
+++ b/Master/texmf/doc/asymptote/examples/animations/inlinemovie3.tex
@@ -6,9 +6,9 @@
Here is an inline 3D PDF movie, generated with the commands
\begin{verbatim}
-pdflatex inlinemovie
-asy inlinemovie
-pdflatex inlinemovie
+pdflatex inlinemovie3
+asy inlinemovie3
+pdflatex inlinemovie3
\end{verbatim}
\begin{center}
diff --git a/Master/texmf/doc/asymptote/examples/clockarray.asy b/Master/texmf/doc/asymptote/examples/clockarray.asy
new file mode 100644
index 00000000000..be7fd899a0e
--- /dev/null
+++ b/Master/texmf/doc/asymptote/examples/clockarray.asy
@@ -0,0 +1,39 @@
+int nx=3;
+int ny=4;
+real xmargin=1cm;
+real ymargin=xmargin;
+
+size(settings.paperwidth,settings.paperheight);
+
+picture pic;
+real width=settings.paperwidth/nx-xmargin;
+real height=settings.paperheight/ny-ymargin;
+if(width <= 0 || height <= 0) abort("margin too big");
+size(pic,width,height);
+
+pen p=linewidth(0.5mm);
+draw(pic,unitcircle,p);
+
+real h=0.08;
+real m=0.05;
+
+for(int hour=1; hour <= 12; ++hour) {
+ pair z=dir((12-hour+3)*30);
+ label(pic,string(hour),z,z);
+ draw(pic,z--(1-h)*z,p);
+}
+
+for(int minutes=0; minutes < 60; ++minutes) {
+ pair z=dir(6*minutes);
+ draw(pic,z--(1-m)*z);
+}
+
+dot(pic,(0,0));
+
+frame f=pic.fit();
+pair size=size(f)+(xmargin,ymargin);
+
+for(int i=0; i < nx; ++i)
+ for(int j=0; j < ny; ++j)
+ add(shift(realmult(size,(i,j)))*f);
+
diff --git a/Master/texmf/doc/asymptote/examples/controlsystem.asy b/Master/texmf/doc/asymptote/examples/controlsystem.asy
index 0829bc90d51..bfd8336f1f6 100644
--- a/Master/texmf/doc/asymptote/examples/controlsystem.asy
+++ b/Master/texmf/doc/asymptote/examples/controlsystem.asy
@@ -15,25 +15,11 @@ draw(sum1);
draw(junction1);
add(new void(picture pic, transform t) {
- draw(pic,Label("$u$",0.5,N),path(new pair[]{t*(0,0),sum1.left(t)},
- Horizontal),Arrow,PenMargin);
+ blockconnector operator --=blockconnector(pic,t);
+
+ block(0,0)--Label("$u$",align=N)--Arrow--sum1--Arrow--delay--Arrow--
+ system--junction1--Label("$y$",align=N)--Arrow--block(1,0);
- draw(pic,path(new pair[]{sum1.right(t),delay.left(t)},Horizontal),Arrow,
- PenMargin);
- label(pic,"-",sum1.bottom(t),ESE);
-
- draw(pic,path(new pair[]{delay.right(t),system.left(t)},Horizontal),Arrow,
- PenMargin);
-
- draw(pic,path(new pair[]{system.right(t),junction1.left(t)},Horizontal),
- PenMargin);
-
- draw(pic,Label("$y$",0.5,N),path(new pair[]{junction1.right(t),t*(0.9,0)},
- Horizontal),Arrow,PenMargin);
-
- draw(pic,path(new pair[]{junction1.bottom(t),controller.right(t)},Vertical),
- Arrow,PenMargin);
-
- draw(pic,path(new pair[]{controller.left(t),sum1.bottom(t)},Horizontal),
- Arrow,PenMargin);
+ junction1--Down--Left--Arrow--controller--Left--Up--
+ Label("$-$",position=3,align=ESE)--Arrow--sum1;
});
diff --git a/Master/texmf/doc/asymptote/examples/cos3.asy b/Master/texmf/doc/asymptote/examples/cos3.asy
new file mode 100644
index 00000000000..fa9c8f49550
--- /dev/null
+++ b/Master/texmf/doc/asymptote/examples/cos3.asy
@@ -0,0 +1,25 @@
+import graph3;
+import palette;
+
+size(12cm,IgnoreAspect);
+currentprojection=orthographic(1,-2,1);
+
+real f(pair z) {return abs(cos(z));}
+
+real Arg(triple v)
+{
+ return degrees(cos((v.x,v.y)),warn=false);
+}
+
+surface s=surface(f,(-pi,-2),(pi,2),20,Spline);
+
+s.colors(palette(s.map(Arg),Wheel()));
+draw(s);
+
+real xmin=point((-1,-1,-1)).x;
+real xmax=point((1,1,1)).x;
+draw((xmin,0,0)--(xmax,0,0),dashed);
+
+xaxis3("$\mathop{\rm Re} z$",Bounds,InTicks);
+yaxis3("$\mathop{\rm Im} z$",Bounds,InTicks(beginlabel=false));
+zaxis3("$|\cos(z)|$",Bounds,InTicks);
diff --git a/Master/texmf/doc/asymptote/examples/cyclohexane.asy b/Master/texmf/doc/asymptote/examples/cyclohexane.asy
index d0121d8ea7e..8e1ff466b9d 100644
--- a/Master/texmf/doc/asymptote/examples/cyclohexane.asy
+++ b/Master/texmf/doc/asymptote/examples/cyclohexane.asy
@@ -1,61 +1,66 @@
import three;
-currentprojection = perspective(300,-650,500);
-
-surface carbon = scale3(70)*unitsphere; // 70 pm
-surface hydrogen = scale3(25)*unitsphere; // 25 pm
-
-real alpha = 90+aSin(1/3);
-
-real CCbond = 156; // 156 pm
-real CHbond = 110; // 110 pm
-
-triple c1 = (0,0,0);
-triple h1 = c1+CHbond*Z;
-triple c2 = rotate(alpha,c1,c1+Y)*(CCbond*Z);
-triple h2 = rotate(120,c1,c2)*h1;
-triple h3 = c2-CHbond*Z;
-triple h4 = rotate(120,c2,c1)*h3;
-
-triple c3 = rotate(120,c2,h3)*c1;
-triple h5 = c3+CHbond*Z;
-triple h6 = rotate(-120,c3,c2)*h5;
-
-triple c4 = rotate(-120,c3,h5)*c2;
-triple h7 = c4-CHbond*Z;
-triple h8 = rotate(120,c4,c3)*h7;
-
-triple c5 = rotate(120,c4,h7)*c3;
-triple h9 = c5+CHbond*Z;
-triple h10 = rotate(-120,c5,c4)*h9;
-
-triple c6 = rotate(-120,c5,h9)*c4;
-triple h11 = c6-CHbond*Z;
-triple h12 = rotate(120,c6,c5)*h11;
-
-draw(shift(c1)*carbon,black);
-draw(shift(c2)*carbon,black);
-draw(shift(c3)*carbon,black);
-draw(shift(c4)*carbon,black);
-draw(shift(c5)*carbon,black);
-draw(shift(c6)*carbon,black);
-
-
-draw(shift(h1)*hydrogen,lightgray);
-draw(shift(h2)*hydrogen,lightgray);
-draw(shift(h3)*hydrogen,lightgray);
-draw(shift(h4)*hydrogen,lightgray);
-draw(shift(h5)*hydrogen,lightgray);
-draw(shift(h6)*hydrogen,lightgray);
-draw(shift(h7)*hydrogen,lightgray);
-draw(shift(h8)*hydrogen,lightgray);
-draw(shift(h9)*hydrogen,lightgray);
-draw(shift(h10)*hydrogen,lightgray);
-draw(shift(h11)*hydrogen,lightgray);
-draw(shift(h12)*hydrogen,lightgray);
-
-
-pen thick = linewidth(10);
+currentprojection=perspective(300,-650,500);
+currentlight.background=palecyan;
+
+surface carbon=scale3(70)*unitsphere; // 70 pm
+surface hydrogen=scale3(25)*unitsphere; // 25 pm
+
+real alpha=90+aSin(1/3);
+
+real CCbond=156; // 156 pm
+real CHbond=110; // 110 pm
+
+triple c1=(0,0,0);
+triple h1=c1+CHbond*Z;
+triple c2=rotate(alpha,c1,c1+Y)*(CCbond*Z);
+triple h2=rotate(120,c1,c2)*h1;
+triple h3=c2-CHbond*Z;
+triple h4=rotate(120,c2,c1)*h3;
+
+triple c3=rotate(120,c2,h3)*c1;
+triple h5=c3+CHbond*Z;
+triple h6=rotate(-120,c3,c2)*h5;
+
+triple c4=rotate(-120,c3,h5)*c2;
+triple h7=c4-CHbond*Z;
+triple h8=rotate(120,c4,c3)*h7;
+
+triple c5=rotate(120,c4,h7)*c3;
+triple h9=c5+CHbond*Z;
+triple h10=rotate(-120,c5,c4)*h9;
+
+triple c6=rotate(-120,c5,h9)*c4;
+triple h11=c6-CHbond*Z;
+triple h12=rotate(120,c6,c5)*h11;
+
+pen Black=gray(0.4);
+
+draw(shift(c1)*carbon,Black);
+draw(shift(c2)*carbon,Black);
+draw(shift(c3)*carbon,Black);
+draw(shift(c4)*carbon,Black);
+draw(shift(c5)*carbon,Black);
+draw(shift(c6)*carbon,Black);
+
+
+material White=material(diffusepen=gray(0.4),emissivepen=gray(0.6));
+
+draw(shift(h1)*hydrogen,White);
+draw(shift(h2)*hydrogen,White);
+draw(shift(h3)*hydrogen,White);
+draw(shift(h4)*hydrogen,White);
+draw(shift(h5)*hydrogen,White);
+draw(shift(h6)*hydrogen,White);
+draw(shift(h7)*hydrogen,White);
+draw(shift(h8)*hydrogen,White);
+draw(shift(h9)*hydrogen,White);
+draw(shift(h10)*hydrogen,White);
+draw(shift(h11)*hydrogen,White);
+draw(shift(h12)*hydrogen,White);
+
+
+pen thick=linewidth(10);
draw(c1--c2--c3--c4--c5--c6--cycle,thick);
diff --git a/Master/texmf/doc/asymptote/examples/exp3.asy b/Master/texmf/doc/asymptote/examples/exp3.asy
new file mode 100644
index 00000000000..e7508a29297
--- /dev/null
+++ b/Master/texmf/doc/asymptote/examples/exp3.asy
@@ -0,0 +1,25 @@
+import graph3;
+import palette;
+
+size(12cm,IgnoreAspect);
+currentprojection=orthographic(1,-2,1);
+
+real f(pair z) {return abs(exp(z));}
+
+real Arg(triple v)
+{
+ return degrees(exp((v.x,v.y)),warn=false);
+}
+
+surface s=surface(f,(-2,-pi),(2,pi),20,Spline);
+
+s.colors(palette(s.map(Arg),Wheel()));
+draw(s);
+
+real xmin=point((-1,-1,-1)).x;
+real xmax=point((1,1,1)).x;
+draw((xmin,0,0)--(xmax,0,0),dashed);
+
+xaxis3("$\mathop{\rm Re} z$",Bounds,InTicks);
+yaxis3("$\mathop{\rm Im} z$",Bounds,InTicks(beginlabel=false));
+zaxis3("$|\exp(z)|$",Bounds,InTicks);
diff --git a/Master/texmf/doc/asymptote/examples/fequlogo.asy b/Master/texmf/doc/asymptote/examples/fequlogo.asy
index 29cae0be720..e53e1831419 100644
--- a/Master/texmf/doc/asymptote/examples/fequlogo.asy
+++ b/Master/texmf/doc/asymptote/examples/fequlogo.asy
@@ -33,7 +33,7 @@ real h=0.0125;
draw(surface(rotate(2)*xscale(0.32)*yscale(0.6)*lo,s,-pi/4-1.5*pi/20,0.5,h));
draw(surface(rotate(0)*xscale(-0.45)*yscale(0.3)*hi,s,0.8*pi,0.25,h),blue);
-currentpicture.add(new void(frame f, transform3 t, picture pic, projection P) {
+add(new void(frame f, transform3 t, picture pic, projection P) {
draw(f,surface(invert(box(min(f,P),max(f,P)),min3(f),P),
new pen[] {orange,red,yellow,brown}));
}
diff --git a/Master/texmf/doc/asymptote/examples/filesurface.asy b/Master/texmf/doc/asymptote/examples/filesurface.asy
index 702b503fc28..98adc045f07 100644
--- a/Master/texmf/doc/asymptote/examples/filesurface.asy
+++ b/Master/texmf/doc/asymptote/examples/filesurface.asy
@@ -26,9 +26,20 @@ draw(s,meshpen=thick());
triple m=currentpicture.userMin;
triple M=currentpicture.userMax;
triple target=0.5*(m+M);
-currentprojection=perspective(camera=target+realmult(dir(68,225),M-m),
- target=target);
xaxis3("$x$",Bounds,InTicks);
yaxis3("$y$",Bounds,InTicks(Step=1,step=0.1));
zaxis3("$z$",Bounds,InTicks);
+
+/*
+picture palette;
+size3(palette,1cm);
+draw(palette,unitcube,red);
+frame F=palette.fit3();
+add(F,(M.x,m.y,m.z));
+*/
+
+currentprojection=perspective(camera=target+realmult(dir(68,225),M-m),
+ target=target);
+
+
diff --git a/Master/texmf/doc/asymptote/examples/fillcontour.asy b/Master/texmf/doc/asymptote/examples/fillcontour.asy
index 1b93e002fff..311192fb7f8 100644
--- a/Master/texmf/doc/asymptote/examples/fillcontour.asy
+++ b/Master/texmf/doc/asymptote/examples/fillcontour.asy
@@ -5,7 +5,7 @@ import contour;
size(12cm,IgnoreAspect);
pair a=(pi/2,0);
-pair b=(1.5*pi+epsilon,2pi);
+pair b=(3pi/2,2pi);
real f(real x, real y) {return cos(x)*sin(y);}
diff --git a/Master/texmf/doc/asymptote/examples/flowchartdemo.asy b/Master/texmf/doc/asymptote/examples/flowchartdemo.asy
index def70d0dd0f..796e357a5ff 100644
--- a/Master/texmf/doc/asymptote/examples/flowchartdemo.asy
+++ b/Master/texmf/doc/asymptote/examples/flowchartdemo.asy
@@ -17,14 +17,11 @@ draw(block4);
draw(block5);
add(new void(picture pic, transform t) {
- draw(pic,path(new pair[]{block1.right(t),block2.top(t)},Horizontal),
- Arrow,PenMargin);
- draw(pic,Label("Yes",0.5,NW),path(new pair[]{block2.left(t),block3.top(t)},
- Horizontal),Arrow,PenMargin);
- draw(pic,Label("No",0.5,NE),path(new pair[]{block2.right(t),block4.top(t)},
- Horizontal),Arrow,PenMargin);
- draw(pic,path(new pair[]{block3.bottom(t),block5.left(t)},Vertical),
- Arrow,PenMargin);
- draw(pic,path(new pair[]{block4.bottom(t),block5.right(t)},Vertical),
- Arrow,PenMargin);
+ blockconnector operator --=blockconnector(pic,t);
+ // draw(pic,block1.right(t)--block2.top(t));
+ block1--Right--Down--Arrow--block2;
+ block2--Label("Yes",0.5,NW)--Left--Down--Arrow--block3;
+ block2--Right--Label("No",0.5,NE)--Down--Arrow--block4;
+ block4--Down--Left--Arrow--block5;
+ block3--Down--Right--Arrow--block5;
});
diff --git a/Master/texmf/doc/asymptote/examples/gamma3.asy b/Master/texmf/doc/asymptote/examples/gamma3.asy
index 1e400152a93..e7fdde015e0 100644
--- a/Master/texmf/doc/asymptote/examples/gamma3.asy
+++ b/Master/texmf/doc/asymptote/examples/gamma3.asy
@@ -24,6 +24,10 @@ real Arg(triple v)
s.colors(palette(s.map(Arg),Wheel()));
draw(s);
+real xmin=point((-1,-1,-1)).x;
+real xmax=point((1,1,1)).x;
+draw((xmin,0,0)--(xmax,0,0),dashed);
+
xaxis3("$\mathop{\rm Re} z$",Bounds,InTicks);
yaxis3("$\mathop{\rm Im} z$",Bounds,InTicks(beginlabel=false));
zaxis3("$|\Gamma(z)|$",Bounds,InTicks);
diff --git a/Master/texmf/doc/asymptote/examples/image.asy b/Master/texmf/doc/asymptote/examples/image.asy
index 3270c06e31e..37a2cf60172 100644
--- a/Master/texmf/doc/asymptote/examples/image.asy
+++ b/Master/texmf/doc/asymptote/examples/image.asy
@@ -19,4 +19,3 @@ bounds range=image(v,(0,0),(1,1),Palette);
palette(bar,"$A$",range,(0,0),(0.5cm,8cm),Right,Palette,
PaletteTicks("$%+#.1f$"));
add(bar.fit(),point(E),30E);
-
diff --git a/Master/texmf/doc/asymptote/examples/imagecontour.asy b/Master/texmf/doc/asymptote/examples/imagecontour.asy
index 25fdb3f6ed4..6b5eb455cad 100644
--- a/Master/texmf/doc/asymptote/examples/imagecontour.asy
+++ b/Master/texmf/doc/asymptote/examples/imagecontour.asy
@@ -18,8 +18,6 @@ pen Tickpen=black;
pen tickpen=gray+0.5*linewidth(currentpen);
pen[] Palette=BWRainbow();
-scale(false);
-
bounds range=image(f,Automatic,a,b,N,Palette);
// Major contours
diff --git a/Master/texmf/doc/asymptote/examples/intro.asy b/Master/texmf/doc/asymptote/examples/intro.asy
index f19f51b286d..4234b8cee8e 100644
--- a/Master/texmf/doc/asymptote/examples/intro.asy
+++ b/Master/texmf/doc/asymptote/examples/intro.asy
@@ -73,7 +73,6 @@ item("cyclic path:");
asyfilecode("square");
-
title("Scaling to a Given Size");
item("{\tt PostScript} units are often inconvenient.");
@@ -88,8 +87,10 @@ asyfigure("square");
item("One can also specify the size in {\tt cm}:");
-asyfilecode("bigsquare");
-
+asycode("
+size(3cm,3cm);
+draw(unitsquare);
+");
title("Labels");
diff --git a/Master/texmf/doc/asymptote/examples/irregularcontour.asy b/Master/texmf/doc/asymptote/examples/irregularcontour.asy
index b72ddd0e08b..70b38ae15e7 100644
--- a/Master/texmf/doc/asymptote/examples/irregularcontour.asy
+++ b/Master/texmf/doc/asymptote/examples/irregularcontour.asy
@@ -4,13 +4,15 @@ size(200);
int n=100;
-pair[] points=new pair[n];
-real[] values=new real[n];
-
real f(real a, real b) {return a^2+b^2;}
+srand(1);
+
real r() {return 1.1*(rand()/randMax*2-1);}
+pair[] points=new pair[n];
+real[] values=new real[n];
+
for(int i=0; i < n; ++i) {
points[i]=(r(),r());
values[i]=f(points[i].x,points[i].y);
diff --git a/Master/texmf/doc/asymptote/examples/label3.asy b/Master/texmf/doc/asymptote/examples/label3.asy
index fdf8d512e39..f8d5e07049f 100644
--- a/Master/texmf/doc/asymptote/examples/label3.asy
+++ b/Master/texmf/doc/asymptote/examples/label3.asy
@@ -1,7 +1,7 @@
import three;
-currentprojection=perspective(1,1,1,up=Y);
+currentprojection=perspective(0,0,1,up=Y);
label(scale(4)*"$\displaystyle\int_{-\infty}^{+\infty} e^{-\alpha x^2}\,dx=
-\sqrt{\frac{\pi}{\alpha}}$",O,blue);
+\sqrt{\frac{\pi}{\alpha}}$",O,blue,Embedded);
diff --git a/Master/texmf/doc/asymptote/examples/labelbox.asy b/Master/texmf/doc/asymptote/examples/labelbox.asy
index cd61a9da69c..38153b856e5 100644
--- a/Master/texmf/doc/asymptote/examples/labelbox.asy
+++ b/Master/texmf/doc/asymptote/examples/labelbox.asy
@@ -3,9 +3,9 @@ real margin=2mm;
pair z1=(0,1);
pair z0=(0,0);
-object label1=draw("small box",box,z1,margin);
-object label0=draw("LARGE ELLIPSE",ellipse,z0,margin);
+object Box=draw("small box",box,z1,margin);
+object Ellipse=draw("LARGE ELLIPSE",ellipse,z0,margin);
add(new void(frame f, transform t) {
- draw(f,point(label1,SW,t){SW}..{SW}point(label0,NNE,t));
+ draw(f,point(Box,SW,t){SW}..{SW}point(Ellipse,NNE,t));
});
diff --git a/Master/texmf/doc/asymptote/examples/logo3.asy b/Master/texmf/doc/asymptote/examples/logo3.asy
index 932efaca410..93b5a331e9e 100644
--- a/Master/texmf/doc/asymptote/examples/logo3.asy
+++ b/Master/texmf/doc/asymptote/examples/logo3.asy
@@ -2,32 +2,40 @@ import three;
size(560,320,IgnoreAspect);
size3(140,80,15);
-currentprojection=perspective(-3,20,10,up=Y);
+currentprojection=perspective(-2,20,10,up=Y);
currentlight=White;
-path[] outline;
-
real a=-0.4;
real b=0.95;
real y1=-5;
real y2=-3y1/2;
path A=(a,0){dir(10)}::{dir(89.5)}(0,y2);
-outline.push(A);
-outline.push((0,y1){dir(88.3)}::{dir(20)}(b,0));
+path B=(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)*
+transform t=scale(1,15);
+transform T=inverse(scale(t.yy,t.xx));
+path[] g=shift(0,1.979)*scale(0.01)*t*
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);
-outline.push((0,y1)--(0,y2));
-outline.push((a,0)--(b,0));
+pair u=intersectionpoint(A,w-1--w);
+
+real h=0.25*linewidth();
+real hy=(T*(h,h)).x;
+g.push(t*((a,hy)--(b,hy)..(b+hy,0)..(b,-hy)--(a,-hy)..(a-hy,0)..cycle));
+g.push(T*((h,y1)--(h,y2)..(0,y2+h)..(-h,y2)--(-h,y1)..(0,y1-h)..cycle));
+g.push(shift(0,w.y)*t*((u.x,hy)--(w.x,hy)..(w.x+hy,0)..(w.x,-hy)--(u.x,-hy)..(u.x-hy,0)..cycle));
+real f=0.75;
+g.push(point(A,0)--shift(-f*hy,f*h)*A--point(A,1)--shift(f*hy,-f*h)*reverse(A)--cycle);
+g.push(point(B,0)--shift(f*hy,-f*h)*B--point(B,1)--shift(-f*hy,f*h)*reverse(B)--cycle);
-for(path p : outline)
- draw(extrude(p,-0.1Z),material(lightgray,shininess=1.0));
+triple H=-0.1Z;
+material m=material(lightgray,shininess=1.0);
-draw(path3(outline),red+linewidth(0));
+for(path p : g)
+ draw(extrude(p,H),m);
-draw(surface(text),red,nolight);
+surface s=surface(g);
+draw(s,red,nolight);
+draw(shift(H)*s,m);
diff --git a/Master/texmf/doc/asymptote/examples/odetest.asy b/Master/texmf/doc/asymptote/examples/odetest.asy
index 68a7a2eca67..69f8ea3fd07 100644
--- a/Master/texmf/doc/asymptote/examples/odetest.asy
+++ b/Master/texmf/doc/asymptote/examples/odetest.asy
@@ -8,7 +8,7 @@ write();
write("system integration test");
real[] f(real t, real[] x) {return new real[] {x[1],1.5*x[0]^2};}
write(integrate(new real[] {4,-8},f,0,1,n=100,dynamic=true,tolmin=0.0002,
- tolmax=0.0004,RK3BS,verbose=true));
+ tolmax=0.0004,RK3BS,verbose=false));
write();
write("simultaneous newton test");
@@ -29,16 +29,15 @@ real[] initial(real[] x) {
}
real[] discrepancy(real[] x) {
- write("Error: ",x[0]-1);
- return new real[] {x[0]-1};
+ real error=x[0]-1;
+ write("Error: ",error);
+ return new real[] {error};
}
-write(solveBVP(f,0,1,n=10,initial,discrepancy,guess=new real[] {-30},RK4,
- iterations=10));
+real[] w0=solveBVP(f,0,1,n=10,dynamic=true,tolmin=0.0002,tolmax=0.0004,RK3BS,
+ initial,discrepancy,guess=new real[] {-30},iterations=10);
+write(w0);
write();
-write(solveBVP(f,0,1,n=100,initial,discrepancy,guess=new real[] {-30},RK4,
- iterations=10));
-write();
-write(solveBVP(f,0,1,n=10000,initial,discrepancy,guess=new real[] {-30},RK4,
- iterations=10));
+write(integrate(w0,f,0,1,n=10,dynamic=true,tolmin=0.0002,tolmax=0.0004,RK3BS,
+ verbose=false));
write();
diff --git a/Master/texmf/doc/asymptote/examples/orthocenter.asy b/Master/texmf/doc/asymptote/examples/orthocenter.asy
index 3a4b314f68f..73dfde51954 100644
--- a/Master/texmf/doc/asymptote/examples/orthocenter.asy
+++ b/Master/texmf/doc/asymptote/examples/orthocenter.asy
@@ -29,8 +29,8 @@ draw(O--Bp);
draw("4",C--O);
draw(O--Cp);
-dot("$O$",O,1.5*dir(B--Bp,Cp--C),red);
-dot("$A$",A,1.5*dir(C--A,B--A),red);
+dot("$O$",O,dir(B--Bp,Cp--C),red);
+dot("$A$",A,dir(C--A,B--A),red);
dot("$B$",B,NW,red);
dot("$C$",C,dir(A--C,B--C),red);
dot("$A'$",Ap,dir(A--Ap),red);
diff --git a/Master/texmf/doc/asymptote/examples/polardatagraph.asy b/Master/texmf/doc/asymptote/examples/polardatagraph.asy
new file mode 100644
index 00000000000..6bd646e8aa4
--- /dev/null
+++ b/Master/texmf/doc/asymptote/examples/polardatagraph.asy
@@ -0,0 +1,17 @@
+import graph;
+
+size(100);
+
+int n=30;
+real minRadius=0.2;
+real angles[]=uniform(0,2pi,n);
+angles.delete(angles.length-1);
+
+real[] r=new real[n];
+for(int i=0; i < n; ++i)
+ r[i]=unitrand()*(1-minRadius)+minRadius;
+
+interpolate join=operator ..(operator tension(10,true));
+draw(join(polargraph(r,angles,join),cycle),dot(red));
+
+
diff --git a/Master/texmf/doc/asymptote/examples/poster.asy b/Master/texmf/doc/asymptote/examples/poster.asy
index cfe4ad855e3..cbcefc4bf69 100644
--- a/Master/texmf/doc/asymptote/examples/poster.asy
+++ b/Master/texmf/doc/asymptote/examples/poster.asy
@@ -3,6 +3,7 @@ import slide;
import graph;
defaultpen(deepblue);
+pagenumberpen=invisible;
real f(real x) {return (x != 0) ? x*sin(1/x) : 0;}
pair F(real x) {return (x,f(x));}
@@ -28,5 +29,5 @@ 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,
+label("\tt http://www.pims.math.ca/science/2006/06yrc/",point(SW),2NE,
black+fontsize(18pt));
diff --git a/Master/texmf/doc/asymptote/examples/ring.asy b/Master/texmf/doc/asymptote/examples/ring.asy
index 54e0e25d489..6963d42d23f 100644
--- a/Master/texmf/doc/asymptote/examples/ring.asy
+++ b/Master/texmf/doc/asymptote/examples/ring.asy
@@ -1,5 +1,5 @@
size(0,100);
path unitcircle=E..N..W..S..cycle;
path g=scale(2)*unitcircle;
+label("$a \le r \le b$");
radialshade(unitcircle^^g,yellow+evenodd,(0,0),1.0,yellow+brown,(0,0),2);
-
diff --git a/Master/texmf/doc/asymptote/examples/sin3.asy b/Master/texmf/doc/asymptote/examples/sin3.asy
new file mode 100644
index 00000000000..d35cd271808
--- /dev/null
+++ b/Master/texmf/doc/asymptote/examples/sin3.asy
@@ -0,0 +1,25 @@
+import graph3;
+import palette;
+
+size(12cm,IgnoreAspect);
+currentprojection=orthographic(1,-2,1);
+
+real f(pair z) {return abs(sin(z));}
+
+real Arg(triple v)
+{
+ return degrees(sin((v.x,v.y)),warn=false);
+}
+
+surface s=surface(f,(-pi,-2),(pi,2),20,Spline);
+
+s.colors(palette(s.map(Arg),Wheel()));
+draw(s);
+
+real xmin=point((-1,-1,-1)).x;
+real xmax=point((1,1,1)).x;
+draw((xmin,0,0)--(xmax,0,0),dashed);
+
+xaxis3("$\mathop{\rm Re} z$",Bounds,InTicks);
+yaxis3("$\mathop{\rm Im} z$",Bounds,InTicks(beginlabel=false));
+zaxis3("$|\sin(z)|$",Bounds,InTicks);
diff --git a/Master/texmf/doc/asymptote/examples/slidedemo.asy b/Master/texmf/doc/asymptote/examples/slidedemo.asy
index ae2f48c33a2..52ede757b47 100644
--- a/Master/texmf/doc/asymptote/examples/slidedemo.asy
+++ b/Master/texmf/doc/asymptote/examples/slidedemo.asy
@@ -112,6 +112,6 @@ add(pic.fit(0,14cm));
title("\mbox{Asymptote: 2D \& 3D Vector Graphics Language}");
asyinclude("logo3");
center("\tt http://asymptote.sf.net");
-center("(freely available under the GNU public license)");
+center("(freely available under the LGPL license)");
bibliography("refs");
diff --git a/Master/texmf/doc/asymptote/examples/strokepath.asy b/Master/texmf/doc/asymptote/examples/strokepath.asy
index ee18b1c9bfe..c857150ec58 100644
--- a/Master/texmf/doc/asymptote/examples/strokepath.asy
+++ b/Master/texmf/doc/asymptote/examples/strokepath.asy
@@ -10,7 +10,7 @@ shipped=false;
size(400);
// Equivalent to draw(g,p):
-currentpicture.add(new void(frame f, transform t) {
+add(new void(frame f, transform t) {
fill(f,strokepath(t*g,p),red);
});
currentpicture.addPath(g,p);
diff --git a/Master/texmf/doc/asymptote/examples/tensor.asy b/Master/texmf/doc/asymptote/examples/tensor.asy
index aa633c4087b..19b1e087658 100644
--- a/Master/texmf/doc/asymptote/examples/tensor.asy
+++ b/Master/texmf/doc/asymptote/examples/tensor.asy
@@ -1,6 +1,5 @@
size(200);
-//pen[][] p={{red,green,blue,cyan},{green,blue,rgb(black),magenta}};
pen[][] p={{red,green,blue,cyan},{blue,green,magenta,rgb(black)}};
path G=(0,0){dir(-120)}..(1,0)..(1,1)..(0,1)..cycle;
path[] g={G,subpath(G,2,1)..(2,0)..(2,1)..cycle};
diff --git a/Master/texmf/doc/asymptote/examples/transparency.asy b/Master/texmf/doc/asymptote/examples/transparency.asy
index 02196a02ee9..36e741d294d 100644
--- a/Master/texmf/doc/asymptote/examples/transparency.asy
+++ b/Master/texmf/doc/asymptote/examples/transparency.asy
@@ -1,6 +1,7 @@
size(0,150);
-settings.outformat="pdf";
+if(settings.outformat == "")
+ settings.outformat="pdf";
begingroup();
fill(shift(1.5dir(120))*unitcircle,green+opacity(0.75));
diff --git a/Master/texmf/doc/asymptote/examples/triceratops.asy b/Master/texmf/doc/asymptote/examples/triceratops.asy
index e640a6b37f9..a9e6e93cd52 100644
--- a/Master/texmf/doc/asymptote/examples/triceratops.asy
+++ b/Master/texmf/doc/asymptote/examples/triceratops.asy
@@ -4,6 +4,6 @@ size(15cm);
currentprojection=orthographic(0,2,5,up=Y);
// A compressed version of the required data file may be obtained from:
-// http://www.cs.technion.ac.il/~irit/data/Viewpoint/galleon.obj.gz
+// http://www.cs.technion.ac.il/~irit/data/Viewpoint/triceratops.obj.gz
draw(obj("triceratops.obj",brown));
diff --git a/Master/texmf/doc/asymptote/examples/venn3.asy b/Master/texmf/doc/asymptote/examples/venn3.asy
new file mode 100644
index 00000000000..6118fab6e9a
--- /dev/null
+++ b/Master/texmf/doc/asymptote/examples/venn3.asy
@@ -0,0 +1,50 @@
+size(0,150);
+
+pen colour1=red;
+pen colour2=green;
+pen colour3=blue;
+
+real r=sqrt(3);
+
+pair z0=(0,0);
+pair z1=(-1,0);
+pair z2=(1,0);
+pair z3=(0,r);
+
+path c1=circle(z1,r);
+path c2=circle(z2,r);
+path c3=circle(z3,r);
+
+fill(c1,colour1);
+fill(c2,colour2);
+fill(c3,colour3);
+
+picture intersection12;
+fill(intersection12,c1,colour1+colour2);
+clip(intersection12,c2);
+
+picture intersection13;
+fill(intersection13,c1,colour1+colour3);
+clip(intersection13,c3);
+
+picture intersection23;
+fill(intersection23,c2,colour2+colour3);
+clip(intersection23,c3);
+
+picture intersection123;
+fill(intersection123,c1,colour1+colour2+colour3);
+clip(intersection123,c2);
+clip(intersection123,c3);
+
+add(intersection12);
+add(intersection13);
+add(intersection23);
+add(intersection123);
+
+draw(c1);
+draw(c2);
+draw(c3);
+
+label("$A$",z1);
+label("$B$",z2);
+label("$C$",z3);
diff --git a/Master/texmf/doc/asymptote/examples/washer.asy b/Master/texmf/doc/asymptote/examples/washer.asy
new file mode 100644
index 00000000000..083039e55a3
--- /dev/null
+++ b/Master/texmf/doc/asymptote/examples/washer.asy
@@ -0,0 +1,13 @@
+import three;
+size(10cm);
+
+path3[] p=reverse(unitcircle3)^^scale3(0.5)*unitcircle3;
+path[] g=reverse(unitcircle)^^scale(0.5)*unitcircle;
+triple H=-0.4Z;
+
+draw(surface(p,planar=true));
+draw(surface(shift(H)*p,planar=true));
+material m=material(lightgray,shininess=1.0);
+for(path pp : g)
+ draw(extrude(pp,H),m);
+
diff --git a/Master/texmf/doc/asymptote/examples/worksheet.asy b/Master/texmf/doc/asymptote/examples/worksheet.asy
index b3aa2dba8a0..f26797acabb 100644
--- a/Master/texmf/doc/asymptote/examples/worksheet.asy
+++ b/Master/texmf/doc/asymptote/examples/worksheet.asy
@@ -22,7 +22,7 @@ z += step;
for(int i=1; i <= 14; ++i) {
draw(pic,z--z+length);
z += step;
- draw(pic,z--z+length,dashed);
+ draw(pic,z--z+length,dashed+gray);
z += step;
void label(int i) {
label(pic,string(i)+".",z,0.2NE,fontsize(0.8*1.5*2*height*mm)+gray);
@@ -41,5 +41,8 @@ draw(pic,z--z+length);
add(pic.fit(),(0,0),W);
add(pic.fit(),(0,0),E);
+newpage();
+add(pic.fit(),(0,0),W);
+add(pic.fit(),(0,0),E);
diff --git a/Master/texmf/doc/asymptote/examples/xsin1x.asy b/Master/texmf/doc/asymptote/examples/xsin1x.asy
index e419ba19a69..cf394efb1a6 100644
--- a/Master/texmf/doc/asymptote/examples/xsin1x.asy
+++ b/Master/texmf/doc/asymptote/examples/xsin1x.asy
@@ -14,5 +14,11 @@ size(pic,50,IgnoreAspect);
xaxis(pic,red);
yaxis(pic,red);
draw(pic,graph(pic,f,-0.1/pi,0.1/pi,1000));
-attach(bbox(pic,blue),point(N+0.85W),10SE);
+
+add(new void(frame f, transform t) {
+ frame G=shift(point(f,N+0.85W))*align(bbox(pic,blue),10SE);
+ add(f,G);
+ draw(f,t*box(min(pic,user=true),max(pic,user=true)),blue);
+ draw(f,point(G,E)--t*point(pic,W),blue);
+ });
diff --git a/Master/texmf/doc/info/asy-faq.info b/Master/texmf/doc/info/asy-faq.info
index 41a897b34e5..32b8053f241 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
- 02 Oct 2009
+ 04 May 2010
This is the list of Frequently Asked Questions about Asymptote (asy).
diff --git a/Master/texmf/doc/info/asymptote.info b/Master/texmf/doc/info/asymptote.info
index 108efc52ce3..aa24a4f977a 100644
--- a/Master/texmf/doc/info/asymptote.info
+++ b/Master/texmf/doc/info/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.88.
+This file documents `Asymptote', version 1.94.
`http://asymptote.sourceforge.net'
@@ -23,7 +23,7 @@ File: asymptote.info, Node: Top, Next: Description, Up: (dir)
Asymptote
*********
-This file documents `Asymptote', version 1.88.
+This file documents `Asymptote', version 1.94.
`http://asymptote.sourceforge.net'
@@ -428,7 +428,7 @@ adjustment:
texpath
texcommand
dvips
-dvisvg
+dvisvgm
convert
display
animate
@@ -504,9 +504,9 @@ If your graphics card supports multisampling, we recommend using version
this step since `Asymptote' is configured to use the native glut
library on that platform). Download
- `http://prdownloads.sourceforge.net/freeglut/freeglut-2.6.0-rc1.tar.gz'
+ `http://prdownloads.sourceforge.net/freeglut/freeglut-2.6.0.tar.gz'
and type (as the root user):
-tar -zxf freeglut-2.6.0-rc1.tar.gz
+tar -zxf freeglut-2.6.0.tar.gz
cd freeglut-2.6.0
./configure --prefix=/usr
make install
@@ -1063,7 +1063,8 @@ void tensorshade(picture pic=currentpicture, path g, bool stroke=false,
pair[] z=new pair[]);
One can also smoothly shade the regions between consecutive paths of a
sequence using a given array of pens:
-void draw(picture pic=currentpicture, path[] g, pen[] p);
+void draw(picture pic=currentpicture, pen fillrule=currentpen, path[] g,
+ pen[] p);
Illustrations of tensor product and Coons shading are provided in the
example files `tensor.asy', `Coons.asy', `BezierSurface.asy', and
`rainbow.asy'.
@@ -1482,7 +1483,7 @@ user-defined types):
`pair realmult(pair z, pair w)'
returns the element-by-element product `(z.x*w.x,z.y*w.y)';
- `real dot(pair z, pair w)'
+ `real dot(explicit pair z, explicit pair w)'
returns the dot product `z.x*w.x+z.y*w.y';
`pair minbound(pair z, pair w)'
@@ -1646,9 +1647,10 @@ user-defined types):
string pairs {`before',`after'} to the corresponding string
`after';
- `string[] split(string s, string delimiter=" ")'
+ `string[] split(string s, string delimiter="")'
returns an array of strings obtained by splitting `s' into
- substrings delimited by `delimiter';
+ substrings delimited by `delimiter' (an empty delimiter
+ signifies a space, but with duplicate delimiters discarded);
`string format(string s, int n)'
returns a string containing `n' formatted according to the
@@ -1706,13 +1708,17 @@ user-defined types):
current locale. For example, to return the date corresponding
to 24 hours ago: time(seconds()-24*60*60);
- `void abort(string s)'
+ `void abort(string s="")'
aborts execution (with a non-zero return code in batch mode);
if string `s' is nonempty, a diagnostic message constructed
from the source file, line number, and `s' is printed;
+ `void assert(bool b, string s="")'
+ aborts execution with an error message constructed from `s' if
+ `b=false';
+
`void exit()'
- exits with a zero error return code in batch mode;
+ exits (with a zero error return code in batch mode);
`void sleep(int seconds)'
pauses for the given number of seconds;
@@ -1837,6 +1843,12 @@ File: asymptote.info, Node: Paths and guides, Next: Pens, Prev: Data types,
between node `floor(t)' and `floor(t)+1' corresponding to the
cubic spline parameter `t-floor(t)' (*note Bezier curves::).
+ `pair dir(path p)'
+ returns dir(p,length(p)).
+
+ `pair dir(path p, path g)'
+ returns unit(dir(p)+dir(g)).
+
`pair accel(path p, int t, int sign=0);'
If `sign < 0', return the acceleration of the incoming path
`p' at node `t'; if `sign > 0', return the acceleration of
@@ -1921,13 +1933,12 @@ File: asymptote.info, Node: Paths and guides, Next: Pens, Prev: Data types,
the absolute error specified by `fuzz', or if `fuzz < 0', to
machine precision.
- `real[] intersections(path p, explicit pair a, explicit pair b,'
- real fuzz=-1); Return all (unless there are infinitely many)
- intersection times of path `p' with the (infinite) line
- through points `a' and `b' as a sorted array. The
- intersections returned are guaranteed to be correct to within
- the absolute error specified by `fuzz', or if `fuzz < 0', to
- machine precision.
+ `real[] intersections(path p, explicit pair a, explicit pair b, real fuzz=-1);'
+ Return all (unless there are infinitely many) intersection
+ times of path `p' with the (infinite) line through points `a'
+ and `b' as a sorted array. The intersections returned are
+ guaranteed to be correct to within the absolute error
+ specified by `fuzz', or if `fuzz < 0', to machine precision.
`real[] times(path p, real x)'
returns all intersection times of path `p' with the vertical
@@ -2189,6 +2200,9 @@ number, until it saturates with one or more color components equal to 1.
A 6-character RGB hexidecimal string can be converted to a pen with
the routine pen rgb(string s);
+ A pen can be converted to a hexidecimal string with
+
+ * string hex(pen p);
Various shades and mixtures of the grayscale primary colors
`black' and `white', RGB primary colors `red', `green', and
@@ -2220,21 +2234,21 @@ number, until it saturates with one or more color components equal to 1.
hsv q=p;
write(q.h,q.s,q.v); // 180 0.5 0.75
- * Line types are specified with the function `pen linetype(string s,
- real offset=0, bool scale=true, bool adjust=true)', where `s' is a
- string of integer or real numbers separated by spaces. The
- optional parameter `offset' specifies where in the pattern to
- begin. The first number specifies how far (if `scale' is `true',
- in units of the pen line width; otherwise in `PostScript' units)
- to draw with the pen on, the second number specifies how far to
- draw with the pen off, and so on. If `adjust' is `true', these
- spacings are automatically adjusted by `Asymptote' to fit the
- arclength of the path. Here are the predefined line types: pen solid=linetype("");
- pen dotted=linetype("0 4");
- pen dashed=linetype("8 8");
- pen longdashed=linetype("24 8");
- pen dashdotted=linetype("8 8 0 8");
- pen longdashdotted=linetype("24 8 0 8");
+ * Line types are specified with the function `pen linetype(real[] a,
+ real offset=0, bool scale=true, bool adjust=true)', where `a' is
+ an array of real array numbers. The optional parameter `offset'
+ specifies where in the pattern to begin. The first number
+ specifies how far (if `scale' is `true', in units of the pen line
+ width; otherwise in `PostScript' units) to draw with the pen on,
+ the second number specifies how far to draw with the pen off, and
+ so on. If `adjust' is `true', these spacings are automatically
+ adjusted by `Asymptote' to fit the arclength of the path. Here are
+ the predefined line types: pen solid=linetype(new real[]);
+ pen dotted=linetype(new real[] {0,4});
+ pen dashed=linetype(new real[] {8,8});
+ pen longdashed=linetype(new real[] {24,8});
+ pen dashdotted=linetype(new real[] {8,8,0,8});
+ pen longdashdotted=linetype(new real[] {24,8,0,8});
pen Dotted=dotted+1.0;
pen Dotted(pen p=currentpen) {return dotted+2*linewidth(p);}
@@ -2242,7 +2256,7 @@ number, until it saturates with one or more color components equal to 1.
The default line type is `solid'; this may be changed with
`defaultpen(pen)'. The line type of a pen can be determined with
- the functions `string linetype(pen p=currentpen)', `real
+ the functions `real[] linetype(pen p=currentpen)', `real
offset(pen p)', `bool scale(pen p)', and `bool adjust(pen p)'.
* The pen line width is specified in `PostScript' units with `pen
@@ -2668,7 +2682,7 @@ File: asymptote.info, Node: Frames and pictures, Next: Files, Prev: Transform
Fill the interior and draw the boundary.
`FillDraw(real xmargin=0, real ymargin=xmargin, pen fillpen=nullpen,'
- `pen drawpen=nullpen);' If `fillpen' is `nullpen', fill with
+ `pen drawpen=nullpen)' If `fillpen' is `nullpen', fill with
the drawing pen; otherwise fill with pen `fillpen'. If
`drawpen' is `nullpen', draw the boundary with `fillpen';
otherwise with `drawpen'. An optional margin of `xmargin' and
@@ -2704,6 +2718,10 @@ File: asymptote.info, Node: Frames and pictures, Next: Files, Prev: Transform
Fill varying radially from `penc' at the center of the
bounding box to `penr' at the edge.
+ `RadialShadeDraw(real xmargin=0, real ymargin=xmargin, pen penc,'
+ `pen penr, pen drawpen=nullpen)' Fill with RadialShade and
+ draw the boundary.
+
For example, to draw a bounding box around a picture with a 0.25 cm
margin and output the resulting frame, use the command: shipout(bbox(0.25cm));
@@ -2756,7 +2774,7 @@ File: asymptote.info, Node: Frames and pictures, Next: Files, Prev: Transform
pair align, bool group=true, filltype filltype=NoFill,
bool above=true);
- The optional `align' argument in the last three forms specifies a
+ The optional `align' argument in the last form specifies a
direction to use for aligning the frame, in a manner analogous to
the `align' argument of `label' (*note label::). However, one key
difference is that when `align' is not specified, labels are
@@ -2857,11 +2875,10 @@ line is ignored. When reading strings, a comment character followed
immediately by another comment character is treated as a single literal
comment character.
- If the `-globalwrite' (or `-nosafe') option is enabled, one can
-change the current working directory to the contents of the string `s'
-with the function `string cd(string s)', which returns the new working
-directory. If `string s' is empty, the path is reset to the value it
-had at program startup.
+ One can change the current working directory for read operations to
+the contents of the string `s' with the function `string cd(string s)',
+which returns the new working directory. If `string s' is empty, the
+path is reset to the value it had at program startup.
When reading pairs, the enclosing parenthesis are optional. Strings
are also read by assignment, by reading characters up to but not
@@ -2911,7 +2928,7 @@ and single precision (32-bit) integers in Sun Microsystem's XDR
`UNIX' platforms). Alternatively, a file may also be opened with
`binput' or `boutput' to read or write double precision reals and single
precision integers in the native (nonportable) machine binary format.
-The virtual member functions `file singlereal(bool b=false)' and `file
+The virtual member functions `file singlereal(bool b=true)' and `file
singleint(bool b=true)' be used to change the precision of real and
integer I/O operations, respectively, for an XDR or binary file `f'.
Similarly, the function `file signedint(bool b=true)' can be used to
@@ -3376,7 +3393,8 @@ nonintegral built-in arithmetic types `T'. If `a' and `b' are pens,
they are first promoted to the same color space.
`Asymptote' also defines bitwise functions `int AND(int,int)', `int
-OR(int,int)', `int XOR(int,int)', and `int NOT(int)'.
+OR(int,int)', `int XOR(int,int)', `int NOT(int)', `int CLZ(int)' (count
+leading zeros), and `int CTZ(int)' (count trailing zeros).

File: asymptote.info, Node: Self & prefix operators, Next: User-defined operators, Prev: Arithmetic & logical, Up: Operators
@@ -3739,8 +3757,8 @@ real(real) functions `sin', `cos', `tan', `asin', `acos', `atan',
`exp', `log', `pow10', `log10', `sinh', `cosh', `tanh', `asinh',
`acosh', `atanh', `sqrt', `cbrt', `fabs', `expm1', `log1p', as well as
the identity function `identity'. `Asymptote' also defines the order
-`n' Bessel functions of the first kind `J(int n, real)' and second kind
-`Y(int n, real)', as well as the gamma function `gamma', the error
+`n' Bessel functions of the first kind `Jn(int n, real)' and second kind
+`Yn(int n, real)', as well as the gamma function `gamma', the error
function `erf', and the complementary error function `erfc'. The
standard real(real, real) functions `atan2', `hypot', `fmod',
`remainder' are also included.
@@ -3882,8 +3900,8 @@ array never leads to out-of-bounds errors or array resizing.
The member `A.keys' evaluates to an array of integers containing the
indices of initialized entries in the array in ascending order. Hence,
for an array of length `n' with all entries initialized, `A.keys'
-evaluates to the array of integers from `0' to `n-1' inclusive. A new
-keys array is produced each time `A.keys' is evaluated.
+evaluates to `{0,1,...,n-1}'. A new keys array is produced each time
+`A.keys' is evaluated.
The functions `A.push' and `A.append' append their arguments onto
the end of the array, while `A.insert(int i ... T[] x)' inserts `x'
@@ -3986,13 +4004,13 @@ of type `T[]'.
the index corresponding to the left-hand (smaller) endpoint.
`T[] copy(T[] a)'
- returns a deep copy of the array `a';
+ returns a copy of the array `a';
`T[][] copy(T[][] a)'
- returns a deep copy of the array `a';
+ returns a copy of the array `a';
`T[][][] copy(T[][][] a)'
- returns a deep copy of the array `a';
+ returns a copy of the array `a';
`T[] concat(... T[][] a)'
returns a new array formed by concatenating the arrays given as
@@ -4079,6 +4097,10 @@ of type `T[]'.
`real dot(real[] a, real[] b)'
returns the dot product of the vectors `a' and `b'.
+`pair dot(pair[] a, pair[] b)'
+ returns the complex dot product `sum(a*conj(b))' of the vectors
+ `a' and `b'.
+
`real[] tridiagonal(real[] a, real[] b, real[] c, real[] f);'
Solve the periodic tridiagonal problem L`x'=`f' and return the
solution `x', where `f' is an n vector and L is the n \times n
@@ -4128,7 +4150,7 @@ of type `T[]'.
are listed separately.
``pair[] quadraticroots(explicit pair a, explicit pair b, explicit pair c);''
- This numerically robust solver returns the two complex roots of the
+ This numerically robust solver returns the complex roots of the
quadratic equation ax^2+bx+c=0.
``real[] cubicroots(real a, real b, real c, real d);''
@@ -4648,7 +4670,7 @@ remove the files `latexusage-*', `latexusage_.pre', and
One can specify `width', `height', `viewportwidth',
`viewportheight', and `attach' `keyval'-style options to the `asy'
-environment. The current version (1.10) of `asymptote.sty' supports the
+environment. The current version of `asymptote.sty' supports the
embedding of 3D PRC files, either inline or, using the `attach' option
with the `attachfile2' (or older `attachfile') `LaTeX' package, as
annotated (but printable) attachments. For many applications, the
@@ -4873,7 +4895,7 @@ File: asymptote.info, Node: math, Next: interpolate, Prev: simplex, Up: Base
==========
This package extends `Asymptote''s mathematical capabilities with
-matrix arithmetic and intersection algorithms:
+useful functions such as
`void drawline(picture pic=currentpicture, pair P, pair Q, pen p=currentpen);'
draw the visible portion of the (infinite) line going through `P'
@@ -4888,10 +4910,48 @@ matrix arithmetic and intersection algorithms:
`n0' and `n1' passing through points `P0' and `P1', respectively.
If the planes are parallel, return `(infinity,infinity,infinity)'.
-``pair[] quarticroots(real a, real b, real c, real d, real e);''
+`pair[] quarticroots(real a, real b, real c, real d, real e);'
returns the four complex roots of the quartic equation
ax^4+bx^3+cx^2+dx+e=0.
+`pair[][] fft(pair[][] a, int sign=1)'
+ returns the two-dimensional Fourier transform of a using the given
+ `sign'.
+
+`real time(path g, real x, int n=0)'
+ returns the `n'th intersection time of path `g' with the vertical
+ line through x.
+
+`real time(path g, explicit pair z, int n=0)'
+ returns the `n'th intersection time of path `g' with the horizontal
+ line through `(0,z.y)'.
+
+`real value(path g, real x, int n=0)'
+ returns the `n'th `y' value of `g' at `x'.
+
+`real value(path g, real x, int n=0)'
+ returns the `n'th `x' value of `g' at `y=z.y'.
+
+`real slope(path g, real x, int n=0)'
+ returns the `n'th slope of `g' at `x'.
+
+`real slope(path g, explicit pair z, int n=0)'
+ returns the `n'th slope of `g' at `y=z.y'.
+
+ int[][] segment(bool[] b) returns the indices of consecutive
+ true-element segments of bool[] `b'.
+
+`real[] partialsum(real[] a)'
+ returns the partial sums of a real array `a'.
+
+`real[] partialsum(real[] a, real[] dx)'
+ returns the partial `dx'-weighted sums of a real array `a'.
+
+`bool increasing(real[] a, bool strict=false)'
+ returns, if `strict=false', whether `i > j' implies `a[i] >=
+ a[j]', or if `strict=true', whether `i > j' implies implies `a[i]
+ > a[j]'.
+

File: asymptote.info, Node: interpolate, Next: geometry, Prev: math, Up: Base modules
@@ -5370,6 +5430,12 @@ following routines:
sampling at `n' evenly spaced points, with the given interpolation
type.
+ * guide polargraph(picture pic=currentpicture, real[] r, real[] theta,
+ interpolate join=operator--);
+ Returns a polar-coordinate graph using the scaling information for
+ picture `pic' of the elements of the arrays (`r',`theta'), using
+ the given interpolation type.
+
@@ -5505,13 +5571,15 @@ following routines:
an optional pen used to draw the minor ticks.
- For convenience, the predefined tickmodifier `OmitTick(... real[]
- x)' tickmodifier can be used to remove specific auto-generated
- ticks and their labels. The `OmitFormat(string s=defaultformat ...
- real[] x)' ticklabel can be used to remove specific tick labels
- but not the corresponding ticks. The tickmodifier `NoZero' is an
- abbreviation for `OmitTick(0)' and the ticklabel `NoZeroFormat' is
- an abbrevation for `OmitFormat(0)'.
+ For convenience, the predefined tickmodifiers `OmitTick(... real[]
+ x)', `OmitTickInterval(real a, real b)', and
+ `OmitTickIntervals(real[] a, real[] b)' can be used to remove
+ specific auto-generated ticks and their labels. The
+ `OmitFormat(string s=defaultformat ... real[] x)' ticklabel can be
+ used to remove specific tick labels but not the corresponding
+ ticks. The tickmodifier `NoZero' is an abbreviation for
+ `OmitTick(0)' and the ticklabel `NoZeroFormat' is an abbrevation
+ for `OmitFormat(0)'.
It is also possible to specify custom tick locations with
`LeftTicks', `RightTicks', and `Ticks' by passing explicit real
@@ -5524,18 +5592,20 @@ following routines:
* void yaxis(picture pic=currentpicture, Label L="", axis axis=XZero,
real ymin=-infinity, real ymax=infinity, pen p=currentpen,
- ticks ticks=NoTicks, arrowbar arrow=None, bool above=false);
+ ticks ticks=NoTicks, arrowbar arrow=None, bool above=false,
+ bool autorotate=true);
Draw a y axis on picture `pic' from y=`ymin' to y=`ymax' using pen
- `p', optionally labelling it with Label `L'. The relative location
- of the label (a real number from [0,1]) defaults to 1 (*note
- Label::). An infinite value of `ymin' or `ymax' specifies that the
- corresponding axis limit will be automatically determined from the
- picture limits. The optional `arrow' argument takes the same
- values as in the `draw' command (*note arrows::). The axis is
- drawn before any existing objects in `pic' unless `above=true'.
- The tick type is specified by `ticks' and the axis placement is
- determined by one of the following `axis' types:
+ `p', optionally labelling it with a Label `L' that is autorotated
+ unless `autorotate=false'. The relative location of the label (a
+ real number from [0,1]) defaults to 1 (*note Label::). An infinite
+ value of `ymin' or `ymax' specifies that the corresponding axis
+ limit will be automatically determined from the picture limits.
+ The optional `arrow' argument takes the same values as in the
+ `draw' command (*note arrows::). The axis is drawn before any
+ existing objects in `pic' unless `above=true'. The tick type is
+ specified by `ticks' and the axis placement is determined by one
+ of the following `axis' types:
`XZero(bool extend=true)'
Request a y axis at x=0 (or x=1 on a logarithmic axis)
@@ -6569,9 +6639,9 @@ surface surface(path p, triple plane(pair)=XYplane);
draw(surface((0,0)--E+2N--2E--E+N..0.2E..cycle),red);
Planar Bezier surfaces patches are constructed using Orest Shardt's
`bezulate' routine, which decomposes (possibly nonsimply connected)
-regions bounded by nonselfintersecting cyclic paths (according to the
-`zerowinding' fill rule) into subregions bounded by cyclic paths of
-length `4' or less.
+regions bounded (according to the `zerowinding' fill rule) by simple
+cyclic paths (intersecting only at the endpoints) into subregions
+bounded by cyclic paths of length `4' or less.
Arbitrary thick three-dimensional curves and line caps (which the
`OpenGL' standard does not require implementations to provide) are
@@ -6682,14 +6752,17 @@ There are four choices for viewing 3D `Asymptote' output:
`antialias=1'. High resolution rendering is done by tiling the
image. If your graphics card allows it, the rendering can be made
more efficient by increasing the maximum tile size `maxtile'
- beyond the screen dimensions (indicated by `maxtile=(0,0)'. The
- tile size is also limited by the setting `maxviewport', which
- restricts the maximum width and height of the viewport. On `UNIX'
- systems some graphics drivers support batch mode (`-noV')
- rendering in an iconified window; this can be enabled with the
- setting `iconify=true'. Some (broken) `UNIX' graphics drivers may
- require the command line setting `-glOptions=-indirect', which
- requests (slower) indirect rendering.
+ beyond the screen dimensions (indicated by `maxtile=(0,0)'. If
+ your video card generates unwanted black stripes in the output,
+ try setting the horizontal and vertical components of `maxtiles'
+ to something less than your screen dimensions. The tile size is
+ also limited by the setting `maxviewport', which restricts the
+ maximum width and height of the viewport. On `UNIX' systems some
+ graphics drivers support batch mode (`-noV') rendering in an
+ iconified window; this can be enabled with the setting
+ `iconify=true'. Some (broken) `UNIX' graphics drivers may require
+ the command line setting `-glOptions=-indirect', which requests
+ (slower) indirect rendering.
3. Embed the 3D PRC format in a PDF file and view the resulting PDF
file with version `8.0' or later of `Adobe Reader'. In addition
@@ -6728,7 +6801,11 @@ The result is then fit with another application of deferred drawing to
the viewport dimensions corresponding to the usual two-dimensional
picture `size' parameters. The global pair `viewportmargin' may be used
to add horizontal and vertical margins to the viewport dimensions.
-Alternatively, a minimum `viewportsize' may be specified.
+Alternatively, a minimum `viewportsize' may be specified. A 3D picture
+`pic' can be explicitly fit to a 3D frame by calling
+frame pic.fit3(projection P=currentprojection);
+ and then added to picture `dest' about `position' with
+void add(picture dest=currentpicture, frame src, triple position=(0,0,0));
For convenience, the `three' module defines `O=(0,0,0)',
`X=(1,0,0)', `Y=(0,1,0)', and `Z=(0,0,1)', along with a unitcircle in
@@ -6844,18 +6921,33 @@ projection FrontView=orthographic(-Y,showtarget=true);
projection BackView=orthographic(Y,showtarget=true);
projection BottomView=orthographic(-Z,showtarget=true);
projection TopView=orthographic(Z,showtarget=true);
- The function
-void addViews(picture dest=currentpicture, picture src, bool group=true,
- filltype filltype=NoFill);
- adds picture `pic' as seen with `FrontView' aligned above the
-projection `TopView' and to the right of the projection `RightView'.
-Alternatively, the function
-void addAllViews(picture dest=currentpicture, picture src,
- real xmargin=0, real ymargin=xmargin,
- bool group=true, filltype filltype=NoFill);
- may be used to exhibit all six standard views, with FrontView,
-TopView, RightView in the upper row and BackView, BottomView, LeftView
-in the lower row.
+ The function
+void addViews(picture dest=currentpicture, picture src,
+ projection[][] views=SixViewsUS,
+ bool group=true, filltype filltype=NoFill);
+ adds to picture `dest' an array of views of picture `src' using the
+layout projection[][] `views'. The default layout `SixViewsUS' aligns
+the projection `FrontView' below `TopView' and above `BottomView', to
+the right of `LeftView' and left of `RightView' and `BackView'. The
+predefined layouts are:
+projection[][] ThreeViewsUS={{TopView},
+ {FrontView,RightView}};
+
+projection[][] SixViewsUS={{null,TopView},
+ {LeftView,FrontView,RightView,BackView},
+ {null,BottomView}};
+
+projection[][] ThreeViewsFR={{RightView,FrontView},
+ {null,TopView}};
+
+projection[][] SixViewsFR={{null,BottomView},
+ {RightView,FrontView,LeftView,BackView},
+ {null,TopView}};
+
+projection[][] ThreeViews={{FrontView,TopView,RightView}};
+
+projection[][] SixViews={{FrontView,TopView,RightView},
+ {BackView,BottomView,LeftView}};
A triple or path3 can be projected to a pair or path, with
`project(triple, projection P=currentprojection)' or `project(path3,
@@ -6874,7 +6966,8 @@ triple direction relative to a point `v' with the routine
triple invert(pair dir, triple v, projection P=currentprojection).
Three-dimensional objects may be transformed with one of the
-following built-in transform3 types:
+following built-in transform3 types (the identity transformation is
+`identity4'):
`shift(triple v)'
translates by the triple `v';
@@ -6893,7 +6986,7 @@ following built-in transform3 types:
`scale(real x, real y, real z)'
scales by `x' in the x direction, by `y' in the y direction, and
- by `z' in the z direction;
+ by `z' in the z direction;
`rotate(real angle, triple v)'
rotates by `angle' in degrees about an axis `v' through the origin;
@@ -6902,16 +6995,28 @@ following built-in transform3 types:
rotates by `angle' in degrees about the axis `u--v';
`reflect(triple u, triple v, triple w)'
- reflects about the plane through `u', `v', and `w'.
-
- Three-dimensional TeX Labels, which are by default drawn as Bezier
-surfaces directly on the projection plane, can be transformed from the
-`XY' plane by any of the above transforms or mapped to a specified
-two-dimensional plane with the transform3 types `XY', `YZ', `ZX', `YX',
-`ZY', `ZX'. There are also modified versions of these transforms that
-take an optional argument `projection P=currentprojection' that rotate
-and/or flip the label so that it is more readable from the initial
-viewpoint.
+ reflects about the plane through `u', `v', and `w'.
+
+ When not multiplied on the left by a transform3, three-dimensional
+TeX Labels are drawn as Bezier surfaces directly on the projection
+plane:
+void label(picture pic=currentpicture, Label L, triple position,
+ align align=NoAlign, pen p=currentpen,
+ light light=nolight, string name=L.s,
+ interaction interaction=
+ settings.autobillboard ? Billboard : Embedded)
+ The optional `name' parameter is used as a prefix for naming the label
+patches in the PRC model tree. The default interaction is `Billboard',
+which means that labels are rotated interactively so that they always
+lie on the projection plane. The interaction `Embedded' means that the
+label interacts as a normal `3D' surface, as illustrated in the example
+`billboard.asy'. Alternatively, a label can be transformed from the
+`XY' plane by an explicit transform3 or mapped to a specified
+two-dimensional plane with the predefined transform3 types `XY', `YZ',
+`ZX', `YX', `ZY', `ZX'. There are also modified versions of these
+transforms that take an optional argument `projection
+P=currentprojection' that rotate and/or flip the label so that it is
+more readable from the initial viewpoint.
A transform3 that projects in the direction `dir' onto the plane
with normal `n' through point `O' is returned by
@@ -7389,25 +7494,32 @@ frame for their object argument:
real dx=3, real minwidth=minblockwidth,
real minheight=minblockheight);
-"diamond-shaped flowchart block:"
+"parallelogram block:"
+ block parallelogram(object body, pair center=(0,0),
+ pen fillpen=invisible, pen drawpen=currentpen,
+ real dx=3, real slope=2,
+ real minwidth=minblockwidth,
+ real minheight=minblockheight);
+
+"diamond-shaped block:"
block diamond(object body, pair center=(0,0),
pen fillpen=invisible, pen drawpen=currentpen,
real ds=5, real dw=1,
real height=20, real minwidth=minblockwidth,
real minheight=minblockheight);
-"circular flowchart block:"
+"circular block:"
block circle(object body, pair center=(0,0), pen fillpen=invisible,
pen drawpen=currentpen, real dr=3,
real mindiameter=mincirclediameter);
-"rectangular flowchart block with rounded corners:"
+"rectangular block with rounded corners:"
block roundrectangle(object body, pair center=(0,0),
pen fillpen=invisible, pen drawpen=currentpen,
real ds=5, real dw=0, real minwidth=minblockwidth,
real minheight=minblockheight);
-"rectangular flowchart block with beveled edges:"
+"rectangular block with beveled edges:"
block bevel(object body, pair center=(0,0), pen fillpen=invisible,
pen drawpen=currentpen, real dh=5, real dw=5,
real minwidth=minblockwidth, real minheight=minblockheight);
@@ -7420,7 +7532,8 @@ path path(pair point[] ... flowdir dir[]);
pairs specified by `point' should be drawn in the `Horizontal' or
`Vertical' direction.
- Here is a simple flowchart example:
+ Here is a simple flowchart example (see also the example
+`controlsystem.asy'):
size(0,300);
@@ -7441,16 +7554,13 @@ draw(block4);
draw(block5);
add(new void(picture pic, transform t) {
- draw(pic,path(new pair[]{block1.right(t),block2.top(t)},Horizontal),
- Arrow,PenMargin);
- draw(pic,Label("Yes",0.5,NW),path(new pair[]{block2.left(t),block3.top(t)},
- Horizontal),Arrow,PenMargin);
- draw(pic,Label("No",0.5,NE),path(new pair[]{block2.right(t),block4.top(t)},
- Horizontal),Arrow,PenMargin);
- draw(pic,path(new pair[]{block3.bottom(t),block5.left(t)},Vertical),
- Arrow,PenMargin);
- draw(pic,path(new pair[]{block4.bottom(t),block5.right(t)},Vertical),
- Arrow,PenMargin);
+ blockconnector operator --=blockconnector(pic,t);
+ // draw(pic,block1.right(t)--block2.top(t));
+ block1--Right--Down--Arrow--block2;
+ block2--Label("Yes",0.5,NW)--Left--Down--Arrow--block3;
+ block2--Right--Label("No",0.5,NE)--Down--Arrow--block4;
+ block4--Down--Left--Arrow--block5;
+ block3--Down--Right--Arrow--block5;
});
@@ -7462,39 +7572,40 @@ File: asymptote.info, Node: contour, Next: contour3, Prev: flowchart, Up: Ba
==============
This package draws contour lines. To construct contours corresponding
-to the values in an array `c' for a function `f' on `box(a,b)', use
+to the values in a real array `c' for a function `f' on `box(a,b)', use
+the routine
guide[][] contour(real f(real, real), pair a, pair b,
real[] c, int nx=ngraph, int ny=nx,
- interpolate join=operator --);
+ interpolate join=operator --, int subsample=1);
The integers `nx' and `ny' define the resolution. The default
-resolution, `ngraph x ngraph' (here `ngraph' defaults to `100'), can be
-increased for greater accuracy. The default interpolation operator is
+resolution, `ngraph x ngraph' (here `ngraph' defaults to `100') can be
+increased for greater accuracy. The default interpolation operator is
`operator --' (linear). Spline interpolation (`operator ..') may
-produce smoother contours but it can also lead to overshooting.
+produce smoother contours but it can also lead to overshooting. The
+`subsample' parameter indicates the number of interior points that
+should be used to sample contours within each `1 x 1' box; the default
+value of `1' is usually sufficient.
To construct contours for an array of data values on a uniform
two-dimensional lattice on `box(a,b)', use
-guide[][] contour(real[][] f, real[][] midpoint=new real[][],
- pair a, pair b, real[] c,
- interpolate join=operator --);
+guide[][] contour(real[][] f, pair a, pair b, real[] c,
+ interpolate join=operator --, int subsample=1);
To construct contours for an array of data values on a nonoverlapping
-regular mesh specified by the two-dimensional array `z', optionally
-specifying the values of `f' at the mesh midpoints, use
-guide[][] contour(pair[][] z, real[][] f,
- real[][] midpoint=new real[][], real[] c,
- interpolate join=operator --);
+regular mesh specified by the two-dimensional array `z',
+guide[][] contour(pair[][] z, real[][] f, real[] c,
+ interpolate join=operator --, int subsample=1);
To construct contours for an array of values `f' specified at
irregularly positioned points `z', use the routine
guide[][] contour(pair[] z, real[] f, real[] c,
- interpolate join=operator --);
+ interpolate join=operator --, int subsample=1);
The contours themselves can be drawn with one of the routines
void draw(picture pic=currentpicture, Label[] L=new Label[],
- guide[][] g, pen p=currentpen)
+ guide[][] g, pen p=currentpen);
void draw(picture pic=currentpicture, Label[] L=new Label[],
- guide[][] g, pen[] p)
+ guide[][] g, pen[] p);
The following simple example draws the contour at value `1' for the
function z=x^2+y^2, which is a unit circle:
@@ -7556,8 +7667,6 @@ pen Tickpen=black;
pen tickpen=gray+0.5*linewidth(currentpen);
pen[] Palette=BWRainbow();
-scale(false);
-
bounds range=image(f,Automatic,a,b,N,Palette);
// Major contours
@@ -7588,13 +7697,15 @@ size(200);
int n=100;
-pair[] points=new pair[n];
-real[] values=new real[n];
-
real f(real a, real b) {return a^2+b^2;}
+srand(1);
+
real r() {return 1.1*(rand()/randMax*2-1);}
+pair[] points=new pair[n];
+real[] values=new real[n];
+
for(int i=0; i < n; ++i) {
points[i]=(r(),r());
values[i]=f(points[i].x,points[i].y);
@@ -7739,7 +7850,6 @@ Options (negate by replacing - with -no):
-gray Convert all colors to grayscale [false]
-h,-help Show summary of options; command-line only
-historylines n Retain n lines of history [1000]
--hyperrefOptions str LaTeX hyperref package options [setpagesize=false,unicode]
-iconify Iconify rendering window [false]
-inlineimage Generate inline embedded image [false]
-inlinetex Generate inline TeX code [false]
@@ -7776,6 +7886,7 @@ Options (negate by replacing - with -no):
-safe Disable system call [true]
-scroll n Scroll standard output n lines at a time [0]
-spinstep deg/sec Spin speed [60]
+-svgemulation Emulate unimplemented SVG shading [false]
-tabcompletion Interactive prompt auto-completion [true]
-tex engine latex|pdflatex|xelatex|tex|pdftex|context|none [latex]
-thick Render thick 3D lines [true]
@@ -7827,10 +7938,11 @@ batchMask=false;
interactiveMask=true;
Command-line options override these defaults. Most configuration
variables may also be changed at runtime. The advanced configuration
-variables `dvipsOptions', `convertOptions', `gsOptions',
-`psviewerOptions', `pdfviewerOptions', and `glOptions' allow
-specialized options to be passed as a string to the respective
-applications or libraries.
+variables `dvipsOptions', `hyperrefOptions', `convertOptions',
+`gsOptions', `psviewerOptions', `pdfviewerOptions', and `glOptions'
+allow specialized options to be passed as a string to the respective
+applications or libraries. The default value of `hyperrefOptions' is
+`setpagesize=false,unicode,pdfborder=0 0 0'.
If you insert
import plain;
@@ -7841,17 +7953,21 @@ settings.autoplain=true;
The default output format is EPS for the (default) `latex' and `tex'
tex engine and PDF for the `pdflatex', `xelatex', and `context' tex
engines. Alternative output formats may be produced using the `-f'
-option (or `outformat' setting). The optional setting `-render n'
-requests an output resolution of `n' pixels per `bp'. Antialiasing is
-controlled by the parameter `antialias', which by default specifies a
-sampling width of 2 pixels. `Asymptote' can produce any output format
-supported by the `ImageMagick' `convert' program (version 6.3.5 or
-later recommended; an `Invalid Parameter' error message indicates that
-the `MSDOS' utility `convert' is being used instead of the one that
-comes with `ImageMagick'). To give specific options to `convert', use
-the `convertOptions' setting or call convert manually. This example
-emulates how `Asymptote' produces antialiased `tiff' output at one
-pixel per `bp':
+option (or `outformat' setting). To produce SVG output, first install
+`dvisvgm' (version 0.8.7 or later) from
+`http://dvisvgm.sourceforge.net/down.html' and be sure to use the
+`latex' or `tex' tex engine.
+
+ `Asymptote' can also produce any output format supported by the
+`ImageMagick' `convert' program (version 6.3.5 or later recommended; an
+`Invalid Parameter' error message indicates that the `MSDOS' utility
+`convert' is being used instead of the one that comes with
+`ImageMagick'). The optional setting `-render n' requests an output
+resolution of `n' pixels per `bp'. Antialiasing is controlled by the
+parameter `antialias', which by default specifies a sampling width of 2
+pixels. To give other options to `convert', use the `convertOptions'
+setting or call convert manually. This example emulates how `Asymptote'
+produces antialiased `tiff' output at one pixel per `bp':
asy -o - venn | convert -alpha Off -density 144x144 -geometry 50%x eps:- venn.tiff
If the option `-nosafe' is given, `Asymptote' runs in unsafe mode.
@@ -7926,7 +8042,26 @@ input buffer.
Interactive mode can be conveniently used as a calculator:
expressions entered at the interactive prompt (for which a
corresponding `write' function exists) are automatically evaluated and
-written to `stdout'.
+written to `stdout'. If the expression is non-writable, its type
+signature will be printed out instead. In either case, the expression
+can be referred to using the symbol `%' in the next line input at the
+prompt. For example:
+> 2+3
+5
+> %*4
+20
+> 1/%
+0.05
+> sin(%)
+0.0499791692706783
+> currentpicture
+<picture currentpicture>
+> %.size(200,0)
+>
+
+ The `%' symbol, when used as a variable, is shorthand for the
+identifier `operator answer', which is set by the prompt after each
+written expression evaluation.
The following special commands are supported only in interactive mode
and must be entered immediately after the prompt:
@@ -8019,12 +8154,12 @@ requires `Python 2.6.2' and the `Python Imaging Library':
`http://www.python.org/ftp/python/2.6.2/python-2.6.2.msi'
- `http://effbot.org/downloads/PIL-1.1.7b1.win32-py2.6.exe'.
+ `http://effbot.org/media/downloads/PIL-1.1.7.win32-py2.6.exe'.
On `UNIX' systems, place
-`http://effbot.org/downloads/Imaging-1.1.7b1.tar.gz' in the `Asymptote'
-source directory, and type (as the root user):
-tar -zxf Imaging-1.1.7b1.tar.gz
-cd Imaging-1.1.7b1
+`http://effbot.org/media/downloads/Imaging-1.1.7.tar.gz' in the
+`Asymptote' source directory, and type (as the root user):
+tar -zxf Imaging-1.1.7.tar.gz
+cd Imaging-1.1.7
python setup.py install

@@ -8211,6 +8346,7 @@ Index
* != <1>: Arithmetic & logical.
(line 38)
* !=: Structures. (line 54)
+* % <1>: Interactive mode. (line 17)
* %: Arithmetic & logical.
(line 23)
* %=: Self & prefix operators.
@@ -8242,9 +8378,9 @@ Index
* ---: Bezier curves. (line 83)
* -=: Self & prefix operators.
(line 6)
-* -c: Options. (line 167)
-* -l: Options. (line 186)
-* -u: Options. (line 177)
+* -c: Options. (line 172)
+* -l: Options. (line 191)
+* -u: Options. (line 182)
* -V <1>: Tutorial. (line 19)
* -V: Configuring. (line 6)
* ..: Tutorial. (line 125)
@@ -8256,7 +8392,7 @@ Index
* 2D graphs: graph. (line 6)
* 3D graphs: graph3. (line 6)
* 3D grids: grid3. (line 6)
-* 3D PostScript: three. (line 532)
+* 3D PostScript: three. (line 567)
* 3D rendering: Compiling from UNIX source.
(line 16)
* :: Arithmetic & logical.
@@ -8281,12 +8417,12 @@ Index
(line 6)
* ^^: Tutorial. (line 132)
* a4: Configuring. (line 61)
-* abort: Data types. (line 321)
+* abort: Data types. (line 322)
* abs <1>: Mathematical functions.
(line 35)
* abs: Data types. (line 60)
-* accel <1>: three. (line 462)
-* accel: Paths and guides. (line 109)
+* accel <1>: three. (line 497)
+* accel: Paths and guides. (line 115)
* access: Import. (line 6)
* acknowledgments: Credits. (line 6)
* aCos: Mathematical functions.
@@ -8295,8 +8431,10 @@ Index
(line 6)
* acosh: Mathematical functions.
(line 6)
-* add: Frames and pictures. (line 192)
-* adjust: Pens. (line 112)
+* add <1>: three. (line 266)
+* add: Frames and pictures. (line 196)
+* addViews: three. (line 383)
+* adjust: Pens. (line 115)
* Ai: Mathematical functions.
(line 48)
* Ai_deriv: Mathematical functions.
@@ -8305,36 +8443,36 @@ Index
(line 48)
* alias <1>: Arrays. (line 184)
* alias: Structures. (line 54)
-* align: Options. (line 161)
+* align: Options. (line 166)
* Align: label. (line 12)
-* all: Arrays. (line 328)
-* Allow: Pens. (line 324)
+* all: Arrays. (line 332)
+* Allow: Pens. (line 327)
* AND: Arithmetic & logical.
(line 80)
* and: Bezier curves. (line 56)
* angle: Data types. (line 68)
* animate <1>: animation. (line 12)
-* animate <2>: Files. (line 151)
+* animate <2>: Files. (line 150)
* animate: Configuring. (line 67)
* animation: animation. (line 6)
* annotate: annotate. (line 6)
-* antialias <1>: Options. (line 140)
+* antialias <1>: Options. (line 141)
* antialias: three. (line 205)
* antialiasing: Compiling from UNIX source.
(line 16)
* append <1>: Arrays. (line 39)
-* append: Files. (line 36)
-* arc: three. (line 271)
+* append: Files. (line 35)
+* arc: three. (line 278)
* Arc: Paths and guides. (line 32)
* arc: Paths and guides. (line 22)
* ArcArrow: draw. (line 26)
-* ArcArrow3: three. (line 505)
+* ArcArrow3: three. (line 540)
* ArcArrows: draw. (line 26)
-* ArcArrows3: three. (line 505)
-* arclength <1>: three. (line 462)
-* arclength: Paths and guides. (line 136)
-* arctime <1>: three. (line 462)
-* arctime: Paths and guides. (line 140)
+* ArcArrows3: three. (line 540)
+* arclength <1>: three. (line 497)
+* arclength: Paths and guides. (line 142)
+* arctime <1>: three. (line 497)
+* arctime: Paths and guides. (line 146)
* arguments: Default arguments. (line 6)
* arithmetic operators: Arithmetic & logical.
(line 6)
@@ -8345,10 +8483,10 @@ Index
* Arrow: draw. (line 26)
* arrow: Drawing commands. (line 31)
* arrow keys: Tutorial. (line 35)
-* Arrow3: three. (line 505)
+* Arrow3: three. (line 540)
* Arrows: draw. (line 26)
* arrows: draw. (line 26)
-* Arrows3: three. (line 505)
+* Arrows3: three. (line 540)
* as: Import. (line 70)
* aSin: Mathematical functions.
(line 20)
@@ -8357,6 +8495,7 @@ Index
* asinh: Mathematical functions.
(line 6)
* Aspect: Frames and pictures. (line 54)
+* assert: Data types. (line 327)
* assignment: Programming. (line 8)
* asy: Import. (line 105)
* asy-mode: Editing modes. (line 6)
@@ -8373,57 +8512,59 @@ Index
* atanh: Mathematical functions.
(line 6)
* atleast: Bezier curves. (line 56)
-* attach <1>: graph. (line 405)
+* attach <1>: graph. (line 415)
* attach: LaTeX usage. (line 32)
-* autoadjust: three. (line 342)
+* autoadjust: three. (line 349)
* autoimport: Options. (line 109)
-* automatic scaling: graph. (line 672)
+* automatic scaling: graph. (line 682)
* axialshade: fill. (line 43)
* axis <1>: graph3. (line 66)
-* axis: graph. (line 870)
+* axis: graph. (line 880)
* azimuth: Data types. (line 124)
* babel: babel. (line 6)
-* background color: Frames and pictures. (line 164)
-* BackView: three. (line 369)
+* background color: Frames and pictures. (line 168)
+* BackView: three. (line 376)
* Bar: draw. (line 19)
-* Bar3: three. (line 505)
+* Bar3: three. (line 540)
* Bars: draw. (line 19)
-* Bars3: three. (line 505)
+* Bars3: three. (line 540)
* barsize: draw. (line 19)
* base modules: Base modules. (line 6)
-* basealign: Pens. (line 165)
+* basealign: Pens. (line 168)
* baseline: label. (line 92)
* batch mode: Tutorial. (line 6)
-* beep: Data types. (line 335)
+* beep: Data types. (line 340)
* BeginArcArrow: draw. (line 26)
-* BeginArcArrow3: three. (line 505)
+* BeginArcArrow3: three. (line 540)
* BeginArrow: draw. (line 26)
-* BeginArrow3: three. (line 505)
+* BeginArrow3: three. (line 540)
* BeginBar: draw. (line 19)
-* BeginBar3: three. (line 505)
+* BeginBar3: three. (line 540)
* BeginDotMargin: draw. (line 42)
-* BeginDotMargin3: three. (line 521)
+* BeginDotMargin3: three. (line 556)
* BeginMargin: draw. (line 42)
-* BeginMargin3: three. (line 521)
+* BeginMargin3: three. (line 556)
* BeginPenMargin: draw. (line 42)
-* BeginPenMargin2: three. (line 521)
-* BeginPenMargin3: three. (line 521)
+* BeginPenMargin2: three. (line 556)
+* BeginPenMargin3: three. (line 556)
* BeginPoint: label. (line 57)
* Bessel: Mathematical functions.
(line 48)
-* bevel: flowchart. (line 68)
-* beveljoin: Pens. (line 135)
+* bevel: flowchart. (line 75)
+* beveljoin: Pens. (line 138)
* Bezier curves: Bezier curves. (line 6)
* bezulate: three. (line 99)
* Bi: Mathematical functions.
(line 48)
* Bi_deriv: Mathematical functions.
(line 48)
-* binary format: Files. (line 71)
+* Billboard: three. (line 467)
+* binary format: Files. (line 70)
* binary operators: Arithmetic & logical.
(line 6)
* binarytree: binarytree. (line 6)
-* binput: Files. (line 71)
+* binput: Files. (line 70)
+* black stripes: three. (line 205)
* Blank: draw. (line 26)
* block.bottom: flowchart. (line 19)
* block.bottomleft: flowchart. (line 19)
@@ -8440,21 +8581,21 @@ Index
* bool3: Data types. (line 23)
* boolean operators: Arithmetic & logical.
(line 6)
-* Bottom: graph. (line 128)
-* BottomTop: graph. (line 134)
-* BottomView: three. (line 369)
-* bounding box: Frames and pictures. (line 164)
+* Bottom: graph. (line 134)
+* BottomTop: graph. (line 140)
+* BottomView: three. (line 376)
+* bounding box: Frames and pictures. (line 168)
* Bounds: graph3. (line 20)
-* boutput: Files. (line 71)
-* box <1>: three. (line 293)
+* boutput: Files. (line 70)
+* box <1>: three. (line 300)
* box: Frames and pictures. (line 22)
* bp: Tutorial. (line 24)
* break: Programming. (line 29)
* breakpoints: Debugger. (line 21)
-* brick: Pens. (line 248)
-* broken axis: graph. (line 773)
+* brick: Pens. (line 251)
+* broken axis: graph. (line 783)
* bug reports: Help. (line 23)
-* buildcycle: Paths and guides. (line 250)
+* buildcycle: Paths and guides. (line 255)
* Button-1: GUI. (line 6)
* Button-2: GUI. (line 6)
* BWRainbow: palette. (line 15)
@@ -8468,23 +8609,25 @@ Index
* cd: Files. (line 24)
* ceil: Mathematical functions.
(line 26)
-* center: three. (line 326)
+* center: three. (line 333)
* Center: label. (line 62)
-* checker: Pens. (line 248)
+* checker: Pens. (line 251)
* Chinese: unicode. (line 12)
* choose: Mathematical functions.
(line 39)
* Ci: Mathematical functions.
(line 48)
-* circle <1>: flowchart. (line 57)
-* circle: three. (line 267)
+* circle <1>: flowchart. (line 64)
+* circle: three. (line 274)
* Circle: Paths and guides. (line 17)
* circle: Paths and guides. (line 10)
* circlebarframe: markers. (line 18)
* CJK: unicode. (line 12)
* clear <1>: Debugger. (line 23)
-* clear: Files. (line 89)
-* clip: fill. (line 110)
+* clear: Files. (line 88)
+* clip: fill. (line 111)
+* CLZ: Arithmetic & logical.
+ (line 80)
* cm: Tutorial. (line 61)
* cmd: Configuring. (line 34)
* cmyk: Pens. (line 34)
@@ -8495,8 +8638,8 @@ Index
* coloredSegments: tube. (line 25)
* colorless: Pens. (line 54)
* colors: Pens. (line 51)
-* comma: Files. (line 59)
-* comma-separated-value mode: Arrays. (line 361)
+* comma: Files. (line 58)
+* comma-separated-value mode: Arrays. (line 365)
* command-line options <1>: Options. (line 6)
* command-line options: Configuring. (line 83)
* comment character: Files. (line 15)
@@ -8514,17 +8657,17 @@ Index
* configuring: Configuring. (line 6)
* conj: Data types. (line 57)
* constructors: Structures. (line 95)
-* context: Options. (line 140)
+* context: Options. (line 141)
* continue <1>: Debugger. (line 31)
* continue: Programming. (line 29)
* contour: contour. (line 9)
* contour3: contour3. (line 6)
* controls <1>: three. (line 6)
* controls: Bezier curves. (line 45)
-* controlSpecifier: Paths and guides. (line 374)
-* convert <1>: Options. (line 140)
+* controlSpecifier: Paths and guides. (line 379)
+* convert <1>: Options. (line 141)
* convert <2>: animation. (line 6)
-* convert <3>: Files. (line 151)
+* convert <3>: Files. (line 150)
* convert: Configuring. (line 67)
* convertOptions: Options. (line 128)
* Coons shading: fill. (line 74)
@@ -8536,43 +8679,45 @@ Index
* cosh: Mathematical functions.
(line 6)
* cputime: Structures. (line 177)
-* crop: graph. (line 626)
-* cropping graphs: graph. (line 626)
-* cross <1>: graph. (line 474)
+* crop: graph. (line 636)
+* cropping graphs: graph. (line 636)
+* cross <1>: graph. (line 484)
* cross: Data types. (line 167)
* crossframe: markers. (line 23)
-* crosshatch: Pens. (line 264)
-* csv: Arrays. (line 361)
-* cubicroots: Arrays. (line 317)
+* crosshatch: Pens. (line 267)
+* csv: Arrays. (line 365)
+* CTZ: Arithmetic & logical.
+ (line 80)
+* cubicroots: Arrays. (line 321)
* curl <1>: three. (line 6)
* curl: Bezier curves. (line 63)
-* curlSpecifier: Paths and guides. (line 386)
+* curlSpecifier: Paths and guides. (line 391)
* currentpen: Pens. (line 6)
-* currentprojection: three. (line 366)
+* currentprojection: three. (line 373)
* curve: slopefield. (line 20)
-* custom axis types: graph. (line 138)
-* custom mark routine: graph. (line 566)
-* custom tick locations: graph. (line 241)
-* cut: Paths and guides. (line 232)
+* custom axis types: graph. (line 144)
+* custom mark routine: graph. (line 576)
+* custom tick locations: graph. (line 249)
+* cut: Paths and guides. (line 237)
* cycle <1>: three. (line 6)
* cycle: Tutorial. (line 73)
-* cyclic <1>: three. (line 462)
+* cyclic <1>: three. (line 497)
* cyclic <2>: Arrays. (line 39)
* cyclic: Paths and guides. (line 74)
* Cyrillic: unicode. (line 7)
-* dashdotted: Pens. (line 92)
-* dashed: Pens. (line 92)
+* dashdotted: Pens. (line 95)
+* dashed: Pens. (line 95)
* data types: Data types. (line 6)
-* date: Data types. (line 291)
+* date: Data types. (line 292)
* Debian: UNIX binary distributions.
(line 19)
* debugger: Debugger. (line 6)
* declaration: Programming. (line 8)
* deconstruct: GUI usage. (line 6)
* default arguments: Default arguments. (line 6)
-* defaultformat: graph. (line 169)
+* defaultformat: graph. (line 175)
* DefaultHead: draw. (line 26)
-* DefaultHead3: three. (line 505)
+* DefaultHead3: three. (line 540)
* defaultpen: Pens. (line 46)
* deferred drawing: simplex. (line 6)
* Degrees: Mathematical functions.
@@ -8581,30 +8726,31 @@ Index
(line 17)
* degrees: Data types. (line 73)
* delete <1>: Arrays. (line 39)
-* delete: Files. (line 146)
+* delete: Files. (line 145)
* description: Description. (line 6)
-* diagonal: Arrays. (line 302)
-* diamond: flowchart. (line 50)
-* dimension: Arrays. (line 366)
-* dir <1>: three. (line 462)
+* diagonal: Arrays. (line 306)
+* diamond: flowchart. (line 57)
+* dimension: Arrays. (line 370)
+* dir <1>: three. (line 497)
* dir <2>: Paths and guides. (line 98)
* dir <3>: Data types. (line 85)
* dir: Search paths. (line 10)
* direction specifier: Bezier curves. (line 6)
* directory: Files. (line 24)
-* dirSpecifier: Paths and guides. (line 368)
-* dirtime: Paths and guides. (line 146)
+* dirSpecifier: Paths and guides. (line 373)
+* dirtime: Paths and guides. (line 152)
* display: Configuring. (line 67)
* do: Programming. (line 29)
-* dot <1>: Data types. (line 98)
+* dot <1>: Arrays. (line 262)
+* dot <2>: Data types. (line 98)
* dot: draw. (line 83)
* DotMargin: draw. (line 42)
-* DotMargin3: three. (line 521)
+* DotMargin3: three. (line 556)
* DotMargins: draw. (line 42)
-* DotMargins3: three. (line 521)
-* dotted: Pens. (line 92)
-* double deferred drawing: three. (line 248)
-* double precision: Files. (line 71)
+* DotMargins3: three. (line 556)
+* dotted: Pens. (line 95)
+* double deferred drawing: three. (line 251)
+* double precision: Files. (line 70)
* Draw: Frames and pictures. (line 147)
* draw: draw. (line 110)
* Draw: draw. (line 26)
@@ -8614,7 +8760,7 @@ Index
* drawtree: drawtree. (line 9)
* dvips: Configuring. (line 67)
* dvipsOptions: Options. (line 128)
-* dvisvg: Configuring. (line 67)
+* dvisvgm: Configuring. (line 67)
* E <1>: Mathematical functions.
(line 48)
* E: Tutorial. (line 104)
@@ -8628,28 +8774,30 @@ Index
* else: Programming. (line 8)
* emacs: Editing modes. (line 6)
* embed: embed. (line 6)
+* Embedded: three. (line 467)
* empty: Frames and pictures. (line 7)
* EndArcArrow: draw. (line 26)
-* EndArcArrow3: three. (line 505)
+* EndArcArrow3: three. (line 540)
* EndArrow: draw. (line 26)
-* EndArrow3: three. (line 505)
+* EndArrow3: three. (line 540)
* EndBar: draw. (line 19)
-* EndBar3: three. (line 505)
+* EndBar3: three. (line 540)
* EndDotMargin: draw. (line 42)
-* EndDotMargin3: three. (line 521)
-* endl: Files. (line 59)
+* EndDotMargin3: three. (line 556)
+* endl: Files. (line 58)
* EndMargin: draw. (line 42)
-* EndMargin3: three. (line 521)
+* EndMargin3: three. (line 556)
* EndPenMargin: draw. (line 42)
-* EndPenMargin2: three. (line 521)
-* EndPenMargin3: three. (line 521)
+* EndPenMargin2: three. (line 556)
+* EndPenMargin3: three. (line 556)
* EndPoint: label. (line 57)
* envelope: Frames and pictures. (line 22)
* environment variables: Configuring. (line 87)
-* eof <1>: Arrays. (line 343)
-* eof: Files. (line 89)
-* eol <1>: Arrays. (line 343)
-* eol: Files. (line 89)
+* eof <1>: Arrays. (line 347)
+* eof: Files. (line 88)
+* eol <1>: Arrays. (line 347)
+* eol: Files. (line 88)
+* EPS <1>: Options. (line 141)
* EPS: label. (line 80)
* erase <1>: Frames and pictures. (line 7)
* erase <2>: Data types. (line 239)
@@ -8659,14 +8807,14 @@ Index
* erfc: Mathematical functions.
(line 6)
* error: Files. (line 15)
-* error bars: graph. (line 522)
-* errorbars: graph. (line 474)
+* error bars: graph. (line 532)
+* errorbars: graph. (line 484)
* eval: Import. (line 101)
-* evenodd <1>: Pens. (line 149)
+* evenodd <1>: Pens. (line 152)
* evenodd: Tutorial. (line 146)
* exit <1>: Debugger. (line 57)
-* exit <2>: Interactive mode. (line 40)
-* exit: Data types. (line 326)
+* exit <2>: Interactive mode. (line 59)
+* exit: Data types. (line 331)
* exp: Mathematical functions.
(line 6)
* expi: Data types. (line 81)
@@ -8676,21 +8824,22 @@ Index
(line 6)
* exponential integral: Mathematical functions.
(line 48)
-* extendcap: Pens. (line 126)
+* extendcap: Pens. (line 129)
* extension <1>: MetaPost. (line 10)
-* extension: Paths and guides. (line 227)
+* extension: Paths and guides. (line 232)
* external: embed. (line 28)
-* extrude: three. (line 456)
+* extrude: three. (line 491)
* F: Mathematical functions.
(line 48)
* fabs: Mathematical functions.
(line 6)
-* face: three. (line 540)
+* face: three. (line 575)
* factorial: Mathematical functions.
(line 39)
* Fedora: UNIX binary distributions.
(line 15)
* feynman: feynman. (line 6)
+* fft <1>: math. (line 26)
* fft: Arrays. (line 249)
* FFTW: Compiling from UNIX source.
(line 58)
@@ -8704,49 +8853,50 @@ Index
* filldraw: fill. (line 11)
* FillDraw: draw. (line 26)
* filloutside: fill. (line 27)
-* fillrule: Pens. (line 149)
+* fillrule: Pens. (line 152)
* find <1>: Arrays. (line 159)
* find: Data types. (line 224)
-* firstcut: Paths and guides. (line 242)
+* firstcut: Paths and guides. (line 247)
* fit: Frames and pictures. (line 103)
-* fix-cm: Pens. (line 175)
+* fit3: three. (line 264)
+* fix-cm: Pens. (line 178)
* fixedscaling: Frames and pictures. (line 74)
* floor: Mathematical functions.
(line 26)
* flowchart: flowchart. (line 6)
-* flush: Files. (line 59)
+* flush: Files. (line 58)
* fmod: Mathematical functions.
(line 6)
-* font: Pens. (line 189)
-* font command: Pens. (line 189)
-* fontcommand: Pens. (line 204)
-* fontsize: Pens. (line 175)
+* font: Pens. (line 192)
+* font command: Pens. (line 192)
+* fontcommand: Pens. (line 207)
+* fontsize: Pens. (line 178)
* for: Programming. (line 8)
-* format <1>: Options. (line 140)
-* format: Data types. (line 266)
+* format <1>: Options. (line 141)
+* format: Data types. (line 267)
* forum: Help. (line 6)
* frame: Frames and pictures. (line 7)
* freeglut: Compiling from UNIX source.
(line 16)
* from: Import. (line 17)
-* FrontView: three. (line 369)
+* FrontView: three. (line 376)
* function declarations: Functions. (line 67)
-* function shading: fill. (line 95)
-* Function shading: fill. (line 95)
+* function shading: fill. (line 96)
+* Function shading: fill. (line 96)
* functions <1>: Mathematical functions.
(line 6)
* functions: Functions. (line 6)
-* functionshade: fill. (line 95)
+* functionshade: fill. (line 96)
* gamma: Mathematical functions.
(line 6)
* Gaussrand: Mathematical functions.
(line 39)
* geometry: geometry. (line 6)
-* getc: Files. (line 30)
-* getpair: Files. (line 114)
-* getreal: Files. (line 114)
-* getstring: Files. (line 114)
-* gettriple: Files. (line 114)
+* getc: Files. (line 29)
+* getpair: Files. (line 113)
+* getreal: Files. (line 113)
+* getstring: Files. (line 113)
+* gettriple: Files. (line 113)
* glOptions <1>: Options. (line 128)
* glOptions: three. (line 205)
* GNU Scientific Library: Mathematical functions.
@@ -8761,8 +8911,8 @@ Index
* gray: Pens. (line 25)
* Grayscale: palette. (line 9)
* grayscale: Pens. (line 25)
-* grid <1>: graph. (line 724)
-* grid: Pens. (line 248)
+* grid <1>: graph. (line 734)
+* grid: Pens. (line 251)
* grid3: grid3. (line 6)
* gs: Configuring. (line 6)
* gsl: Mathematical functions.
@@ -8773,27 +8923,29 @@ Index
* GUI: GUI. (line 6)
* GUI installation: GUI installation. (line 6)
* GUI usage: GUI usage. (line 6)
-* guide: Paths and guides. (line 295)
+* guide: Paths and guides. (line 300)
* guide3: three. (line 6)
-* hatch: Pens. (line 264)
+* hatch: Pens. (line 267)
* height: LaTeX usage. (line 32)
* help <1>: Debugger. (line 30)
* help <2>: Help. (line 6)
-* help: Interactive mode. (line 25)
+* help: Interactive mode. (line 44)
* Hermite: graph. (line 37)
* Hermite(splinetype splinetype: graph. (line 37)
-* hex: Data types. (line 279)
+* hex <1>: Pens. (line 60)
+* hex: Data types. (line 280)
* hexidecimal <1>: Pens. (line 59)
-* hexidecimal: Data types. (line 279)
-* hidden surface removal: three. (line 540)
+* hexidecimal: Data types. (line 280)
+* hidden surface removal: three. (line 575)
* histogram: Mathematical functions.
(line 39)
-* history <1>: Interactive mode. (line 40)
-* history: Files. (line 139)
-* historylines: Interactive mode. (line 45)
+* history <1>: Interactive mode. (line 59)
+* history: Files. (line 138)
+* historylines: Interactive mode. (line 64)
* HookHead: draw. (line 26)
-* HookHead3: three. (line 505)
-* Horizontal: flowchart. (line 74)
+* HookHead3: three. (line 540)
+* Horizontal: flowchart. (line 81)
+* hyperrefOptions: Options. (line 128)
* hypot: Mathematical functions.
(line 6)
* I: Mathematical functions.
@@ -8801,14 +8953,15 @@ Index
* i_scaled: Mathematical functions.
(line 48)
* iconic: three. (line 205)
-* identity <1>: Arrays. (line 299)
+* identity <1>: Arrays. (line 303)
* identity <2>: Mathematical functions.
(line 6)
* identity: Transforms. (line 24)
+* identity4: three. (line 427)
* if: Programming. (line 8)
* IgnoreAspect: Frames and pictures. (line 58)
* image: palette. (line 34)
-* ImageMagick <1>: Options. (line 140)
+* ImageMagick <1>: Options. (line 141)
* ImageMagick <2>: animation. (line 6)
* ImageMagick: Configuring. (line 67)
* images: palette. (line 6)
@@ -8818,43 +8971,44 @@ Index
* import: Import. (line 48)
* inches: Tutorial. (line 61)
* including images: label. (line 80)
+* increasing: math. (line 59)
* inheritance: Structures. (line 189)
* initialized: Arrays. (line 39)
* initializers: Variable initializers.
(line 6)
* InOutTicks: graph3. (line 34)
-* input <1>: Interactive mode. (line 29)
+* input <1>: Interactive mode. (line 48)
* input: Files. (line 11)
* insert <1>: Arrays. (line 39)
* insert: Data types. (line 235)
-* inside: Paths and guides. (line 274)
+* inside: Paths and guides. (line 279)
* inst: Debugger. (line 36)
* installation: Installation. (line 6)
* int: Data types. (line 28)
* integer division: Arithmetic & logical.
(line 6)
* interactive mode: Interactive mode. (line 6)
-* interior: Paths and guides. (line 270)
+* interior: Paths and guides. (line 275)
* international characters: unicode. (line 6)
* interp: Arithmetic & logical.
(line 76)
* interpolate: interpolate. (line 6)
-* intersect <1>: three. (line 462)
+* intersect <1>: three. (line 497)
* intersect <2>: math. (line 13)
-* intersect: Paths and guides. (line 175)
-* intersectionpoint <1>: three. (line 462)
+* intersect: Paths and guides. (line 181)
+* intersectionpoint <1>: three. (line 497)
* intersectionpoint <2>: math. (line 17)
-* intersectionpoint: Paths and guides. (line 219)
-* intersectionpoints <1>: three. (line 462)
-* intersectionpoints: Paths and guides. (line 223)
-* intersections <1>: three. (line 462)
-* intersections: Paths and guides. (line 186)
+* intersectionpoint: Paths and guides. (line 224)
+* intersectionpoints <1>: three. (line 497)
+* intersectionpoints: Paths and guides. (line 228)
+* intersections <1>: three. (line 497)
+* intersections: Paths and guides. (line 192)
* InTicks: graph3. (line 34)
* intMax: Data types. (line 28)
* intMin: Data types. (line 28)
-* inverse <1>: Arrays. (line 305)
+* inverse <1>: Arrays. (line 309)
* inverse: Transforms. (line 16)
-* invert: three. (line 395)
+* invert: three. (line 417)
* invisible: Pens. (line 39)
* J: Mathematical functions.
(line 6)
@@ -8869,37 +9023,38 @@ Index
* keys: Arrays. (line 39)
* keywords: Named arguments. (line 6)
* Korean: unicode. (line 12)
-* Label <1>: graph. (line 332)
+* label: three. (line 461)
+* Label <1>: graph. (line 342)
* Label: label. (line 15)
* label: clip. (line 16)
* Label: draw. (line 98)
* labelpath: labelpath. (line 6)
* labelpath3: labelpath3. (line 6)
-* labelx: graph. (line 332)
-* labely: graph. (line 332)
+* labelx: graph. (line 342)
+* labely: graph. (line 342)
* Landscape: Frames and pictures. (line 95)
-* lastcut: Paths and guides. (line 246)
+* lastcut: Paths and guides. (line 251)
* lasy-mode: Editing modes. (line 6)
-* latex: Options. (line 140)
-* LaTeX fonts: Pens. (line 189)
+* latex: Options. (line 141)
+* LaTeX fonts: Pens. (line 192)
* LaTeX usage: LaTeX usage. (line 6)
* latin1: latin1. (line 6)
* latitude: Data types. (line 134)
* latticeshade: fill. (line 32)
* layer: Drawing commands. (line 16)
-* leastsquares <1>: graph. (line 892)
+* leastsquares <1>: graph. (line 902)
* leastsquares: stats. (line 6)
-* Left: graph. (line 274)
-* LeftRight: graph. (line 280)
+* Left: graph. (line 284)
+* LeftRight: graph. (line 290)
* LeftSide: label. (line 62)
-* LeftTicks: graph. (line 155)
-* LeftView: three. (line 369)
-* legend <1>: graph. (line 421)
+* LeftTicks: graph. (line 161)
+* LeftView: three. (line 376)
+* legend <1>: graph. (line 431)
* legend <2>: draw. (line 64)
* legend: Drawing commands. (line 31)
* Legendre: Mathematical functions.
(line 48)
-* length <1>: three. (line 462)
+* length <1>: three. (line 497)
* length <2>: Arrays. (line 39)
* length <3>: Paths and guides. (line 65)
* length: Data types. (line 60)
@@ -8908,133 +9063,137 @@ Index
(line 6)
* libsigsegv <1>: Help. (line 33)
* libsigsegv: Functions. (line 88)
-* limits: graph. (line 626)
-* line: Arrays. (line 343)
-* line mode: Arrays. (line 343)
-* Linear: graph. (line 672)
-* linecap: Pens. (line 126)
-* linejoin: Pens. (line 135)
-* lineskip: Pens. (line 175)
-* linetype: Pens. (line 112)
-* linewidth: Pens. (line 116)
-* locale: Data types. (line 286)
-* Log: graph. (line 672)
+* limits: graph. (line 636)
+* line: Arrays. (line 347)
+* line mode: Arrays. (line 347)
+* Linear: graph. (line 682)
+* linecap: Pens. (line 129)
+* linejoin: Pens. (line 138)
+* lineskip: Pens. (line 178)
+* linetype: Pens. (line 115)
+* linewidth: Pens. (line 119)
+* locale: Data types. (line 287)
+* Log: graph. (line 682)
* log: Mathematical functions.
(line 6)
-* log-log graph: graph. (line 703)
+* log-log graph: graph. (line 713)
* log10: Mathematical functions.
(line 6)
* log1p: Mathematical functions.
(line 6)
-* log2 graph: graph. (line 753)
-* logarithmic graph: graph. (line 703)
+* log2 graph: graph. (line 763)
+* logarithmic graph: graph. (line 713)
* logical operators: Arithmetic & logical.
(line 6)
-* longdashdotted: Pens. (line 92)
-* longdashed: Pens. (line 92)
+* longdashdotted: Pens. (line 95)
+* longdashed: Pens. (line 95)
* longitude: Data types. (line 139)
* loop: Programming. (line 8)
* MacOS X binary distributions: MacOS X binary distributions.
(line 6)
-* makepen: Pens. (line 297)
+* makepen: Pens. (line 300)
* map: Arrays. (line 141)
* Margin: draw. (line 42)
-* Margin3: three. (line 521)
-* margins: three. (line 254)
+* Margin3: three. (line 556)
+* margins: three. (line 257)
* Margins: draw. (line 42)
-* Margins3: three. (line 521)
-* mark: graph. (line 474)
+* Margins3: three. (line 556)
+* mark: graph. (line 484)
* markangle: markers. (line 38)
-* marker: graph. (line 474)
+* marker: graph. (line 484)
* markers: markers. (line 6)
-* marknodes: graph. (line 474)
-* markuniform: graph. (line 474)
+* marknodes: graph. (line 484)
+* markuniform: graph. (line 484)
* math: math. (line 6)
* mathematical functions: Mathematical functions.
(line 6)
-* max <1>: three. (line 462)
+* max <1>: three. (line 497)
* max <2>: Arrays. (line 228)
* max <3>: Frames and pictures. (line 7)
-* max: Paths and guides. (line 259)
+* max: Paths and guides. (line 264)
* maxbound: Data types. (line 104)
* maxtile: three. (line 205)
-* maxtimes: Paths and guides. (line 214)
+* maxtimes: Paths and guides. (line 219)
* maxviewport: three. (line 205)
* MetaPost: MetaPost. (line 6)
* MetaPost ... : Bezier curves. (line 67)
-* MetaPost cutafter: Paths and guides. (line 247)
-* MetaPost cutbefore: Paths and guides. (line 243)
+* MetaPost cutafter: Paths and guides. (line 252)
+* MetaPost cutbefore: Paths and guides. (line 248)
* MetaPost pickup: Pens. (line 6)
* MetaPost whatever: MetaPost. (line 10)
* Microsoft Windows: Microsoft Windows. (line 6)
* MidArcArrow: draw. (line 26)
-* MidArcArrow3: three. (line 505)
+* MidArcArrow3: three. (line 540)
* MidArrow: draw. (line 26)
-* MidArrow3: three. (line 505)
-* midpoint: Paths and guides. (line 160)
+* MidArrow3: three. (line 540)
+* midpoint: Paths and guides. (line 166)
* MidPoint: label. (line 57)
-* min <1>: three. (line 462)
+* min <1>: three. (line 497)
* min <2>: Arrays. (line 221)
* min <3>: Frames and pictures. (line 7)
-* min: Paths and guides. (line 255)
+* min: Paths and guides. (line 260)
* minbound: Data types. (line 101)
* minipage: label. (line 119)
-* mintimes: Paths and guides. (line 209)
-* miterjoin: Pens. (line 135)
-* miterlimit: Pens. (line 144)
+* mintimes: Paths and guides. (line 214)
+* miterjoin: Pens. (line 138)
+* miterlimit: Pens. (line 147)
* mm: Tutorial. (line 61)
-* mode: Files. (line 85)
+* mode: Files. (line 84)
* mouse: GUI. (line 6)
* mouse bindings: three. (line 132)
-* Move: Pens. (line 336)
-* MoveQuiet: Pens. (line 342)
+* Move: Pens. (line 339)
+* MoveQuiet: Pens. (line 345)
* multisample: three. (line 122)
* multisampling: Compiling from UNIX source.
(line 16)
* N: Tutorial. (line 104)
-* name: Files. (line 85)
+* name: Files. (line 84)
* named arguments: Named arguments. (line 6)
* new <1>: Arrays. (line 109)
* new: Structures. (line 6)
* newframe: Frames and pictures. (line 7)
-* newl: Files. (line 59)
+* newl: Files. (line 58)
* newton: Mathematical functions.
(line 65)
* next: Debugger. (line 42)
-* NFSS: Pens. (line 189)
-* nobasealign: Pens. (line 165)
+* NFSS: Pens. (line 192)
+* nobasealign: Pens. (line 168)
* NoFill <1>: Frames and pictures. (line 141)
* NoFill: draw. (line 26)
* NoMargin: draw. (line 42)
-* NoMargin3: three. (line 521)
-* none: Files. (line 59)
+* NoMargin3: three. (line 556)
+* none: Files. (line 58)
* None: draw. (line 19)
-* normal: three. (line 448)
-* nosafe: Options. (line 156)
+* normal: three. (line 483)
+* nosafe: Options. (line 161)
* NOT: Arithmetic & logical.
(line 80)
-* NoTicks: graph. (line 155)
+* NoTicks: graph. (line 161)
* NoTicks3: graph3. (line 34)
* null: Structures. (line 6)
* nullpen <1>: Frames and pictures. (line 127)
* nullpen: label. (line 14)
-* NURBS: three. (line 346)
-* O: three. (line 262)
+* NURBS: three. (line 353)
+* O: three. (line 269)
* obj: obj. (line 9)
-* oblique: three. (line 307)
-* obliqueX: three. (line 315)
-* obliqueY: three. (line 322)
-* obliqueZ: three. (line 307)
+* oblique: three. (line 314)
+* obliqueX: three. (line 322)
+* obliqueY: three. (line 329)
+* obliqueZ: three. (line 314)
* ode: ode. (line 9)
-* offset <1>: Options. (line 161)
-* offset: Pens. (line 112)
-* opacity: Pens. (line 219)
+* offset <1>: Options. (line 166)
+* offset: Pens. (line 115)
+* OmitTick: graph. (line 239)
+* OmitTickInterval: graph. (line 239)
+* OmitTickIntervals: graph. (line 239)
+* opacity: Pens. (line 222)
* open: Files. (line 11)
* OpenGL: three. (line 122)
* operator: User-defined operators.
(line 6)
* operator --: graph. (line 31)
* operator ..: graph. (line 34)
+* operator answer: Interactive mode. (line 37)
* operator cast: Casts. (line 31)
* operator ecast: Casts. (line 58)
* operator init <1>: Structures. (line 141)
@@ -9045,14 +9204,14 @@ Index
* OR: Arithmetic & logical.
(line 80)
* orientation: Frames and pictures. (line 95)
-* orthographic: three. (line 326)
+* orthographic: three. (line 333)
* outformat: three. (line 122)
* outprefix: Frames and pictures. (line 83)
-* output <1>: Options. (line 140)
-* output: Files. (line 36)
+* output <1>: Options. (line 141)
+* output: Files. (line 35)
* OutTicks: graph3. (line 34)
* overloading functions: Functions. (line 44)
-* overwrite: Pens. (line 321)
+* overwrite: Pens. (line 324)
* P: Mathematical functions.
(line 48)
* pack: label. (line 102)
@@ -9063,58 +9222,61 @@ Index
* paperheight: Configuring. (line 61)
* papertype: Configuring. (line 61)
* paperwidth: Configuring. (line 61)
+* parallelogram: flowchart. (line 50)
* parametric surface: graph3. (line 100)
-* parametrized curve: graph. (line 626)
+* parametrized curve: graph. (line 636)
+* partialsum: math. (line 53)
* patch-dependent colors: three. (line 76)
-* path <1>: flowchart. (line 74)
+* path <1>: flowchart. (line 81)
* path <2>: three. (line 43)
* path: Paths and guides. (line 7)
-* path markers: graph. (line 474)
+* path markers: graph. (line 484)
* path3: three. (line 6)
* path[]: Tutorial. (line 132)
* patterns <1>: patterns. (line 6)
-* patterns: Pens. (line 235)
-* pdflatex: Options. (line 140)
+* patterns: Pens. (line 238)
+* PDF: Options. (line 141)
+* pdflatex: Options. (line 141)
* pdfviewer: Configuring. (line 6)
* pdfviewerOptions: Options. (line 128)
* pen: Pens. (line 6)
* PenMargin: draw. (line 42)
-* PenMargin2: three. (line 521)
-* PenMargin3: three. (line 521)
+* PenMargin2: three. (line 556)
+* PenMargin3: three. (line 556)
* PenMargins: draw. (line 42)
-* PenMargins2: three. (line 521)
-* PenMargins3: three. (line 521)
+* PenMargins2: three. (line 556)
+* PenMargins3: three. (line 556)
* perpendicular: geometry. (line 6)
-* perspective: three. (line 346)
+* perspective: three. (line 353)
* picture: Frames and pictures. (line 35)
-* picture alignment: Frames and pictures. (line 205)
+* picture alignment: Frames and pictures. (line 209)
* piecewisestraight: Paths and guides. (line 81)
* Pl: Mathematical functions.
(line 48)
* plain: plain. (line 6)
* planar: three. (line 84)
-* plane: three. (line 289)
-* planeproject: three. (line 445)
-* point <1>: three. (line 462)
+* plane: three. (line 296)
+* planeproject: three. (line 480)
+* point <1>: three. (line 497)
* point: Paths and guides. (line 84)
* polar: Data types. (line 119)
* polargraph: graph. (line 90)
-* polygon: graph. (line 474)
+* polygon: graph. (line 484)
* pop: Arrays. (line 39)
* Portrait: Frames and pictures. (line 95)
-* postcontrol <1>: three. (line 462)
-* postcontrol: Paths and guides. (line 129)
+* postcontrol <1>: three. (line 497)
+* postcontrol: Paths and guides. (line 135)
* postfix operators: Self & prefix operators.
(line 19)
-* postscript: Frames and pictures. (line 267)
-* PostScript fonts: Pens. (line 207)
+* postscript: Frames and pictures. (line 271)
+* PostScript fonts: Pens. (line 210)
* PostScript subpath: Tutorial. (line 132)
* pow10: Mathematical functions.
(line 6)
-* prc: three. (line 223)
-* precision: Files. (line 89)
-* precontrol <1>: three. (line 462)
-* precontrol: Paths and guides. (line 122)
+* prc: three. (line 226)
+* precision: Files. (line 88)
+* precontrol <1>: three. (line 497)
+* precontrol: Paths and guides. (line 128)
* prefix operators: Self & prefix operators.
(line 6)
* private: Structures. (line 6)
@@ -9127,30 +9289,31 @@ Index
* pt: Tutorial. (line 61)
* public: Structures. (line 6)
* push: Arrays. (line 39)
-* Python usage: Interactive mode. (line 61)
-* quadraticroots: Arrays. (line 308)
+* Python usage: Interactive mode. (line 80)
+* quadraticroots: Arrays. (line 312)
* quarticroots: math. (line 22)
* quit <1>: Debugger. (line 54)
-* quit <2>: Interactive mode. (line 40)
+* quit <2>: Interactive mode. (line 59)
* quit: Tutorial. (line 35)
* quote: Import. (line 119)
* quotient: Arithmetic & logical.
(line 6)
* RadialShade: Frames and pictures. (line 159)
* radialshade: fill. (line 49)
+* RadialShadeDraw: Frames and pictures. (line 163)
* radians: Mathematical functions.
(line 17)
-* radius <1>: three. (line 462)
-* radius: Paths and guides. (line 118)
+* radius <1>: three. (line 497)
+* radius: Paths and guides. (line 124)
* Rainbow: palette. (line 12)
* rand: Mathematical functions.
(line 39)
* randMax: Mathematical functions.
(line 39)
-* read: Arrays. (line 384)
+* read: Arrays. (line 388)
* reading: Files. (line 11)
-* reading string arrays: Arrays. (line 353)
-* readline: Files. (line 131)
+* reading string arrays: Arrays. (line 357)
+* readline: Files. (line 130)
* real: Data types. (line 33)
* realDigits: Data types. (line 33)
* realEpsilon: Data types. (line 33)
@@ -9161,67 +9324,69 @@ Index
* recursion: Functions. (line 88)
* reflect: Transforms. (line 51)
* Relative: label. (line 52)
-* relpoint: Paths and guides. (line 156)
-* reltime: Paths and guides. (line 152)
+* relpoint: Paths and guides. (line 162)
+* reltime: Paths and guides. (line 158)
* remainder: Mathematical functions.
(line 6)
-* rename: Files. (line 148)
-* render <1>: Options. (line 140)
+* rename: Files. (line 147)
+* render <1>: Options. (line 141)
* render: three. (line 122)
* replace: Data types. (line 252)
-* resetdefaultpen: Pens. (line 350)
+* resetdefaultpen: Pens. (line 353)
* rest arguments: Rest arguments. (line 6)
-* restore: Frames and pictures. (line 261)
+* restore: Frames and pictures. (line 265)
* restricted: Structures. (line 6)
* return: Debugger. (line 48)
-* reverse <1>: three. (line 462)
+* reverse <1>: three. (line 497)
* reverse <2>: Arrays. (line 146)
-* reverse <3>: Paths and guides. (line 163)
+* reverse <3>: Paths and guides. (line 169)
* reverse: Data types. (line 248)
-* rewind: Files. (line 89)
+* rewind: Files. (line 88)
* rfind: Data types. (line 229)
* rgb: Pens. (line 30)
* Riemann zeta function: Mathematical functions.
(line 48)
-* Right: graph. (line 277)
+* Right: graph. (line 287)
* RightSide: label. (line 62)
-* RightTicks: graph. (line 155)
-* RightView: three. (line 369)
+* RightTicks: graph. (line 161)
+* RightView: three. (line 376)
+* rotate: three. (line 448)
* Rotate: label. (line 37)
* Rotate(pair z): label. (line 40)
* round: Mathematical functions.
(line 26)
-* roundcap: Pens. (line 126)
+* roundcap: Pens. (line 129)
* roundedpath: roundedpath. (line 6)
-* roundjoin: Pens. (line 135)
-* roundrectangle: flowchart. (line 62)
+* roundjoin: Pens. (line 138)
+* roundrectangle: flowchart. (line 69)
* RPM: UNIX binary distributions.
(line 6)
* runtime imports: Import. (line 101)
* Russian: unicode. (line 7)
* S: Tutorial. (line 104)
-* safe: Options. (line 156)
-* save: Frames and pictures. (line 258)
-* saveline: Files. (line 131)
-* scale: three. (line 424)
-* Scale: graph. (line 688)
-* scale <1>: graph. (line 672)
+* safe: Options. (line 161)
+* save: Frames and pictures. (line 262)
+* saveline: Files. (line 130)
+* scale: three. (line 447)
+* Scale: graph. (line 698)
+* scale <1>: graph. (line 682)
* scale <2>: Transforms. (line 39)
-* scale: Pens. (line 112)
+* scale: Pens. (line 115)
* Scale: label. (line 46)
-* scale3: three. (line 421)
-* scaled graph: graph. (line 653)
-* scientific graph: graph. (line 386)
-* scroll: Files. (line 105)
+* scale3: three. (line 444)
+* scaled graph: graph. (line 663)
+* scientific graph: graph. (line 396)
+* scroll: Files. (line 104)
* search: Arrays. (line 164)
* search paths: Search paths. (line 6)
* Seascape: Frames and pictures. (line 100)
-* secondary axis: graph. (line 803)
-* secondaryX: graph. (line 803)
-* secondaryY: graph. (line 803)
-* seconds: Data types. (line 299)
-* seek: Files. (line 89)
-* seekeof: Files. (line 89)
+* secondary axis: graph. (line 813)
+* secondaryX: graph. (line 813)
+* secondaryY: graph. (line 813)
+* seconds: Data types. (line 300)
+* seek: Files. (line 88)
+* seekeof: Files. (line 88)
+* segment: math. (line 50)
* segmentation fault: Help. (line 33)
* self operators: Self & prefix operators.
(line 6)
@@ -9231,15 +9396,15 @@ Index
* sgn: Mathematical functions.
(line 26)
* shading: fill. (line 32)
-* shift <1>: three. (line 409)
+* shift <1>: three. (line 432)
* shift: Transforms. (line 27)
* Shift: label. (line 34)
* shiftless: Transforms. (line 53)
* shipout: Frames and pictures. (line 83)
-* showtarget: three. (line 326)
+* showtarget: three. (line 333)
* Si: Mathematical functions.
(line 48)
-* signedint: Files. (line 71)
+* signedint: Files. (line 70)
* SimpleHead: draw. (line 26)
* simplex: simplex. (line 6)
* simpson: Mathematical functions.
@@ -9248,70 +9413,75 @@ Index
(line 20)
* sin: Mathematical functions.
(line 6)
-* single precision: Files. (line 71)
-* singleint: Files. (line 71)
-* singlereal: Files. (line 71)
+* single precision: Files. (line 70)
+* singleint: Files. (line 70)
+* singlereal: Files. (line 70)
* sinh: Mathematical functions.
(line 6)
-* size <1>: Options. (line 140)
-* size <2>: three. (line 462)
+* SixViews: three. (line 391)
+* SixViewsFR: three. (line 391)
+* SixViewsUS: three. (line 391)
+* size <1>: Options. (line 141)
+* size <2>: three. (line 497)
* size <3>: Frames and pictures. (line 43)
* size: Paths and guides. (line 70)
-* size3: three. (line 251)
+* size3: three. (line 254)
* slant: Transforms. (line 45)
* Slant: label. (line 43)
-* sleep: Data types. (line 329)
-* slice: Paths and guides. (line 232)
+* sleep: Data types. (line 334)
+* slice: Paths and guides. (line 237)
* slices: Slices. (line 6)
* slide: slide. (line 6)
+* slope: math. (line 44)
* slopefield: slopefield. (line 6)
-* solid: Pens. (line 92)
+* solid: Pens. (line 95)
* solids: solids. (line 9)
-* solve: Arrays. (line 262)
+* solve: Arrays. (line 281)
* sort: Arrays. (line 187)
* Spline <1>: graph3. (line 100)
* Spline: graph. (line 34)
* split: Data types. (line 261)
* sqrt: Mathematical functions.
(line 6)
-* squarecap: Pens. (line 126)
+* squarecap: Pens. (line 129)
* srand: Mathematical functions.
(line 39)
* stack overflow <1>: Help. (line 33)
* stack overflow: Functions. (line 88)
* static: Static. (line 6)
* stats: stats. (line 6)
-* stdin: Files. (line 46)
-* stdout: Files. (line 46)
+* stdin: Files. (line 45)
+* stdout: Files. (line 45)
* step: Debugger. (line 39)
* stickframe: markers. (line 16)
* stop: Debugger. (line 10)
-* straight: three. (line 462)
+* straight: three. (line 497)
* Straight: graph. (line 31)
* straight: Paths and guides. (line 77)
-* strftime: Data types. (line 291)
+* strftime: Data types. (line 292)
* string: Data types. (line 179)
* stroke: fill. (line 36)
-* strokepath: Paths and guides. (line 289)
-* strptime: Data types. (line 299)
+* strokepath: Paths and guides. (line 294)
+* strptime: Data types. (line 300)
* struct: Structures. (line 6)
* structures: Structures. (line 6)
-* subpath <1>: three. (line 462)
-* subpath: Paths and guides. (line 166)
+* subpath <1>: three. (line 497)
+* subpath: Paths and guides. (line 172)
* subpictures: Frames and pictures. (line 103)
* substr: Data types. (line 244)
* Subversion: Subversion. (line 6)
* sum: Arrays. (line 216)
* superpath: Tutorial. (line 132)
-* Suppress: Pens. (line 328)
-* SuppressQuiet: Pens. (line 332)
+* Suppress: Pens. (line 331)
+* SuppressQuiet: Pens. (line 335)
* surface <1>: graph3. (line 100)
* surface: three. (line 47)
+* SVG: Options. (line 141)
* SVN: Subversion. (line 6)
-* system <1>: Options. (line 156)
-* system: Files. (line 156)
+* system <1>: Options. (line 161)
+* system: Files. (line 155)
* syzygy: syzygy. (line 6)
-* tab: Files. (line 59)
+* tab: Files. (line 58)
* tab completion: Tutorial. (line 35)
* Tan: Mathematical functions.
(line 20)
@@ -9319,74 +9489,78 @@ Index
(line 6)
* tanh: Mathematical functions.
(line 6)
-* target: three. (line 326)
-* tell: Files. (line 89)
+* target: three. (line 333)
+* tell: Files. (line 88)
* tension <1>: three. (line 6)
* tension: Bezier curves. (line 56)
-* tensionSpecifier: Paths and guides. (line 380)
+* tensionSpecifier: Paths and guides. (line 385)
* tensor product shading: fill. (line 74)
* tensorshade: fill. (line 74)
-* tex <1>: Options. (line 140)
-* tex: Frames and pictures. (line 274)
-* TeX fonts: Pens. (line 198)
+* tex <1>: Options. (line 141)
+* tex: Frames and pictures. (line 278)
+* TeX fonts: Pens. (line 201)
* TeX string: Data types. (line 179)
* texcommand: Configuring. (line 67)
* TeXHead: draw. (line 26)
-* TeXHead3: three. (line 505)
+* TeXHead3: three. (line 540)
* texpath <1>: label. (line 116)
* texpath: Configuring. (line 67)
-* texpreamble: Frames and pictures. (line 282)
-* texreset: Frames and pictures. (line 285)
-* textbook graph: graph. (line 361)
+* texpreamble: Frames and pictures. (line 286)
+* texreset: Frames and pictures. (line 289)
+* textbook graph: graph. (line 371)
* tgz: UNIX binary distributions.
(line 6)
* thick: three. (line 105)
* thin: three. (line 105)
* this: Structures. (line 6)
* three: three. (line 6)
-* tick: graph. (line 332)
-* Ticks: graph. (line 155)
-* ticks: graph. (line 155)
+* ThreeViews: three. (line 391)
+* ThreeViewsFR: three. (line 391)
+* ThreeViewsUS: three. (line 391)
+* tick: graph. (line 342)
+* Ticks: graph. (line 161)
+* ticks: graph. (line 161)
* tildeframe: markers. (line 26)
-* tile: Pens. (line 248)
-* tilings: Pens. (line 235)
-* time: Data types. (line 291)
-* times: Paths and guides. (line 201)
-* Top: graph. (line 131)
-* TopView: three. (line 369)
+* tile: Pens. (line 251)
+* tilings: Pens. (line 238)
+* time <1>: math. (line 30)
+* time: Data types. (line 292)
+* times: Paths and guides. (line 206)
+* Top: graph. (line 137)
+* TopView: three. (line 376)
* trace: Debugger. (line 51)
-* trailingzero: graph. (line 169)
-* transform <1>: three. (line 436)
+* trailingzero: graph. (line 175)
+* transform <1>: three. (line 472)
* transform: Transforms. (line 6)
-* transform3: three. (line 405)
-* transparency: Pens. (line 219)
+* transform3: three. (line 427)
+* transparency: Pens. (line 222)
* transpose: Arrays. (line 208)
* tree: tree. (line 9)
* trembling: trembling. (line 6)
* triangle: geometry. (line 6)
-* triangulate: contour. (line 156)
-* tridiagonal: Arrays. (line 265)
+* triangulate: contour. (line 157)
+* tridiagonal: Arrays. (line 269)
* trigonometric integrals: Mathematical functions.
(line 48)
* triple: Data types. (line 108)
* TrueMargin: draw. (line 42)
-* TrueMargin3: three. (line 521)
+* TrueMargin3: three. (line 556)
* tube <1>: tube. (line 6)
* tube: three. (line 105)
* tutorial: Tutorial. (line 6)
* typedef <1>: Functions. (line 36)
-* typedef: Data types. (line 339)
-* undefined: Paths and guides. (line 263)
+* typedef: Data types. (line 344)
+* undefined: Paths and guides. (line 268)
* UnFill: Frames and pictures. (line 152)
-* unfill: fill. (line 105)
+* unfill: fill. (line 106)
* UnFill: draw. (line 26)
* unicode: unicode. (line 6)
* uniform: Arrays. (line 155)
* Uninstall: Uninstall. (line 6)
* unit: Data types. (line 78)
-* unitbox <1>: three. (line 295)
+* unitbox <1>: three. (line 302)
* unitbox: Tutorial. (line 153)
-* unitcircle <1>: three. (line 262)
+* unitcircle <1>: three. (line 269)
* unitcircle: Tutorial. (line 126)
* unitrand: Mathematical functions.
(line 39)
@@ -9396,77 +9570,81 @@ Index
(line 6)
* unpacking: Rest arguments. (line 39)
* unravel: Import. (line 31)
-* up: three. (line 326)
-* update: Files. (line 36)
+* up: three. (line 333)
+* update: Files. (line 35)
* UpsideDown: Frames and pictures. (line 95)
-* usepackage: Frames and pictures. (line 287)
+* usepackage: Frames and pictures. (line 291)
* user coordinates: Tutorial. (line 84)
* user-defined operators: User-defined operators.
(line 6)
-* usleep: Data types. (line 332)
+* usleep: Data types. (line 337)
+* value: math. (line 38)
* variable initializers: Variable initializers.
(line 6)
-* vectorfield: graph. (line 965)
+* vectorfield: graph. (line 975)
* vectorfield3: graph3. (line 159)
-* vectorization: Arrays. (line 322)
-* verbatim: Frames and pictures. (line 267)
+* vectorization: Arrays. (line 326)
+* verbatim: Frames and pictures. (line 271)
* vertex-dependent colors: three. (line 76)
-* Vertical: flowchart. (line 74)
+* Vertical: flowchart. (line 81)
* viewportheight: LaTeX usage. (line 32)
-* viewportmargin: three. (line 254)
-* viewportsize: three. (line 254)
+* viewportmargin: three. (line 257)
+* viewportsize: three. (line 257)
* viewportwidth: LaTeX usage. (line 32)
-* views: three. (line 223)
+* views: three. (line 226)
* vim: Editing modes. (line 33)
* virtual functions: Structures. (line 189)
* void: Data types. (line 10)
* W: Tutorial. (line 104)
-* whatever: Paths and guides. (line 227)
+* whatever: Paths and guides. (line 232)
* Wheel: palette. (line 22)
* wheel mouse: GUI. (line 6)
* while: Programming. (line 29)
-* white-space string delimiter mode: Arrays. (line 353)
+* white-space string delimiter mode: Arrays. (line 357)
* width: LaTeX usage. (line 32)
-* windingnumber: Paths and guides. (line 263)
-* word: Arrays. (line 353)
-* write <1>: Arrays. (line 393)
-* write: Files. (line 51)
-* X: three. (line 262)
+* windingnumber: Paths and guides. (line 268)
+* word: Arrays. (line 357)
+* write <1>: Arrays. (line 397)
+* write: Files. (line 50)
+* X: three. (line 269)
* xasy: GUI. (line 6)
* xaxis3: graph3. (line 7)
-* xelatex <1>: Options. (line 140)
+* xelatex <1>: Options. (line 141)
* xelatex: embed. (line 10)
-* xequals: graph. (line 284)
-* XEquals: graph. (line 270)
-* xinput: Files. (line 71)
-* xlimits: graph. (line 626)
+* xequals: graph. (line 294)
+* XEquals: graph. (line 280)
+* xinput: Files. (line 70)
+* xlimits: graph. (line 636)
* XOR: Arithmetic & logical.
(line 80)
-* xoutput: Files. (line 71)
+* xoutput: Files. (line 70)
* xpart: Data types. (line 89)
* xscale: Transforms. (line 33)
-* xscale3: three. (line 412)
-* xtick: graph. (line 332)
+* xscale3: three. (line 435)
+* xtick: graph. (line 342)
+* XY: three. (line 457)
* XYEquals: graph3. (line 20)
* XYZero: graph3. (line 20)
* XZEquals: graph3. (line 20)
-* XZero: graph. (line 265)
+* XZero: graph. (line 275)
* XZZero: graph3. (line 20)
-* Y <1>: three. (line 262)
+* Y <1>: three. (line 269)
* Y: Mathematical functions.
(line 6)
* yaxis3: graph3. (line 7)
-* yequals: graph. (line 284)
-* YEquals: graph. (line 124)
-* ylimits: graph. (line 626)
+* yequals: graph. (line 294)
+* YEquals: graph. (line 130)
+* ylimits: graph. (line 636)
* ypart: Data types. (line 92)
* yscale: Transforms. (line 36)
-* yscale3: three. (line 415)
-* ytick: graph. (line 332)
+* yscale3: three. (line 438)
+* ytick: graph. (line 342)
+* YX: three. (line 472)
+* YZ: three. (line 472)
* YZEquals: graph3. (line 20)
-* YZero: graph. (line 119)
+* YZero: graph. (line 125)
* YZZero: graph3. (line 20)
-* Z: three. (line 262)
+* Z: three. (line 269)
* zaxis3: graph3. (line 7)
* zero_Ai: Mathematical functions.
(line 48)
@@ -9478,11 +9656,13 @@ Index
(line 48)
* zero_J: Mathematical functions.
(line 48)
-* zerowinding: Pens. (line 149)
+* zerowinding: Pens. (line 152)
* zeta: Mathematical functions.
(line 48)
* zpart: Data types. (line 161)
-* zscale3: three. (line 418)
+* zscale3: three. (line 441)
+* ZX: three. (line 472)
+* ZY: three. (line 472)
* |: Arithmetic & logical.
(line 62)
* ||: Arithmetic & logical.
@@ -9499,138 +9679,138 @@ Node: MacOS X binary distributions12493
Node: Microsoft Windows13377
Ref: psview14087
Node: Configuring15008
-Node: Search paths19228
-Node: Compiling from UNIX source20025
-Ref: multisampling20614
-Node: Editing modes23032
-Node: Subversion25464
-Node: Uninstall25927
-Node: Tutorial26277
-Ref: unitcircle30503
-Node: Drawing commands32484
-Node: draw34195
-Ref: arrows35343
-Node: fill40586
-Ref: gradient shading41630
-Node: clip45823
-Node: label46415
-Ref: Label47114
-Node: Bezier curves52839
-Node: Programming56416
-Ref: array iteration57230
-Node: Data types58312
-Ref: format67213
-Node: Paths and guides70677
-Ref: circle70931
-Ref: arctime76288
-Ref: extension80153
-Node: Pens86836
-Ref: fillrule94080
-Ref: basealign94977
-Ref: transparency97802
-Ref: makepen101245
-Ref: overwrite102083
-Node: Transforms103293
-Node: Frames and pictures105084
-Ref: envelope106225
-Ref: size107308
-Ref: unitsize108295
-Ref: shipout109355
-Ref: filltype111688
-Ref: add114657
-Ref: add about115603
-Ref: tex118548
-Node: Files119422
-Ref: cd120387
-Ref: scroll124856
-Node: Variable initializers127929
-Node: Structures130224
-Node: Operators137676
-Node: Arithmetic & logical137990
-Node: Self & prefix operators139887
-Node: User-defined operators140675
-Node: Implicit scaling141586
-Node: Functions142149
-Ref: stack overflow144902
-Node: Default arguments145466
-Node: Named arguments146205
-Node: Rest arguments148367
-Node: Mathematical functions151177
-Node: Arrays155782
-Ref: sort162842
-Ref: tridiagonal165133
-Ref: solve166361
-Node: Slices170558
-Node: Casts174451
-Node: Import176417
-Node: Static181647
-Node: LaTeX usage184543
-Node: Base modules189988
-Node: plain192488
-Node: simplex193140
-Node: math193413
-Node: interpolate194512
-Node: geometry194791
-Node: trembling195385
-Node: stats195736
-Node: patterns195996
-Node: markers196232
-Node: tree198015
-Node: binarytree198203
-Node: drawtree198792
-Node: syzygy198996
-Node: feynman199270
-Node: roundedpath199545
-Node: animation199828
-Ref: animate200245
-Node: embed201384
-Node: slide203173
-Node: MetaPost203513
-Node: unicode204229
-Node: latin1205117
-Node: babel205485
-Node: labelpath205714
-Node: labelpath3206534
-Node: annotate206845
-Node: CAD207316
-Node: graph207626
-Ref: ticks214450
-Ref: pathmarkers227558
-Ref: marker228023
-Ref: markuniform228374
-Ref: errorbars230165
-Ref: automatic scaling234221
-Node: palette244867
-Ref: images244985
-Ref: image249156
-Ref: logimage249634
-Ref: penimage250440
-Node: three250884
-Ref: PostScript3D273456
-Node: obj275148
-Node: graph3275400
-Ref: GaussianSurface280525
-Node: grid3281610
-Node: solids282350
-Node: tube283298
-Node: flowchart285533
-Node: contour290032
-Node: contour3295063
-Node: slopefield295370
-Node: ode296807
-Node: Options297067
-Ref: configuration file302880
-Ref: settings302880
-Ref: convert303975
-Node: Interactive mode306764
-Ref: history308429
-Node: GUI309734
-Node: GUI installation310237
-Node: GUI usage311375
-Node: PostScript to Asymptote312278
-Node: Help313034
-Node: Debugger314770
-Node: Credits316555
-Node: Index317468
+Node: Search paths19229
+Node: Compiling from UNIX source20026
+Ref: multisampling20615
+Node: Editing modes23025
+Node: Subversion25457
+Node: Uninstall25920
+Node: Tutorial26270
+Ref: unitcircle30496
+Node: Drawing commands32477
+Node: draw34188
+Ref: arrows35336
+Node: fill40579
+Ref: gradient shading41623
+Node: clip45851
+Node: label46443
+Ref: Label47142
+Node: Bezier curves52867
+Node: Programming56444
+Ref: array iteration57258
+Node: Data types58340
+Ref: format67348
+Node: Paths and guides70951
+Ref: circle71205
+Ref: arctime76693
+Ref: extension80548
+Node: Pens87231
+Ref: fillrule94597
+Ref: basealign95494
+Ref: transparency98319
+Ref: makepen101762
+Ref: overwrite102600
+Node: Transforms103810
+Node: Frames and pictures105601
+Ref: envelope106742
+Ref: size107825
+Ref: unitsize108812
+Ref: shipout109872
+Ref: filltype112205
+Ref: add115342
+Ref: add about116288
+Ref: tex119226
+Node: Files120100
+Ref: cd121065
+Ref: scroll125497
+Node: Variable initializers128570
+Node: Structures130865
+Node: Operators138317
+Node: Arithmetic & logical138631
+Node: Self & prefix operators140605
+Node: User-defined operators141393
+Node: Implicit scaling142304
+Node: Functions142867
+Ref: stack overflow145620
+Node: Default arguments146184
+Node: Named arguments146923
+Node: Rest arguments149085
+Node: Mathematical functions151895
+Node: Arrays156502
+Ref: sort163513
+Ref: tridiagonal165923
+Ref: solve167151
+Node: Slices171344
+Node: Casts175237
+Node: Import177203
+Node: Static182433
+Node: LaTeX usage185329
+Node: Base modules190767
+Node: plain193267
+Node: simplex193919
+Node: math194192
+Node: interpolate196525
+Node: geometry196804
+Node: trembling197398
+Node: stats197749
+Node: patterns198009
+Node: markers198245
+Node: tree200028
+Node: binarytree200216
+Node: drawtree200805
+Node: syzygy201009
+Node: feynman201283
+Node: roundedpath201558
+Node: animation201841
+Ref: animate202258
+Node: embed203397
+Node: slide205186
+Node: MetaPost205526
+Node: unicode206242
+Node: latin1207130
+Node: babel207498
+Node: labelpath207727
+Node: labelpath3208547
+Node: annotate208858
+Node: CAD209329
+Node: graph209639
+Ref: ticks216768
+Ref: pathmarkers230047
+Ref: marker230512
+Ref: markuniform230863
+Ref: errorbars232654
+Ref: automatic scaling236710
+Node: palette247356
+Ref: images247474
+Ref: image251645
+Ref: logimage252123
+Ref: penimage252929
+Node: three253373
+Ref: PostScript3D277702
+Node: obj279394
+Node: graph3279646
+Ref: GaussianSurface284771
+Node: grid3285856
+Node: solids286596
+Node: tube287544
+Node: flowchart289779
+Node: contour294348
+Node: contour3299473
+Node: slopefield299780
+Node: ode301217
+Node: Options301477
+Ref: configuration file307273
+Ref: settings307273
+Ref: convert308474
+Node: Interactive mode311441
+Ref: history313594
+Node: GUI314899
+Node: GUI installation315402
+Node: GUI usage316544
+Node: PostScript to Asymptote317447
+Node: Help318203
+Node: Debugger319939
+Node: Credits321724
+Node: Index322637

End Tag Table
diff --git a/Master/texmf/doc/man/man1/asy.1 b/Master/texmf/doc/man/man1/asy.1
index ea02a81a622..e5ff5977db3 100644
--- a/Master/texmf/doc/man/man1/asy.1
+++ b/Master/texmf/doc/man/man1/asy.1
@@ -109,9 +109,6 @@ Show summary of options; command-line only.
.B \-historylines n
Retain n lines of history [1000].
.TP
-.B \-hyperrefOptions str
-LaTeX hyperref package options [setpagesize=false,unicode].
-.TP
.B \-iconify
Iconify rendering window [false].
.TP
@@ -220,6 +217,9 @@ Scroll standard output n lines at a time [0].
.B \-spinstep deg/sec
Spin speed [60].
.TP
+.B \-svgemulation
+Emulate unimplemented SVG shading [false].
+.TP
.B \-tabcompletion
Interactive prompt auto-completion [true].
.TP
diff --git a/Master/texmf/doc/man/man1/asy.man1.pdf b/Master/texmf/doc/man/man1/asy.man1.pdf
index a1090c05fa6..98a595590e9 100644
--- a/Master/texmf/doc/man/man1/asy.man1.pdf
+++ b/Master/texmf/doc/man/man1/asy.man1.pdf
Binary files differ
diff --git a/Master/texmf/tex/latex/asymptote/asymptote.sty b/Master/texmf/tex/latex/asymptote/asymptote.sty
index ee4de194f36..4dc89de1e52 100644
--- a/Master/texmf/tex/latex/asymptote/asymptote.sty
+++ b/Master/texmf/tex/latex/asymptote/asymptote.sty
@@ -3,7 +3,7 @@
%%% Modified by John Bowman
%%% Adapted from comment.sty (Under GPL v2+)
-\ProvidesPackage{asymptote}[2009/08/15 v1.10 Asymptote style file for LaTeX]
+\ProvidesPackage{asymptote}[2010/04/15 v1.12 Asymptote style file for LaTeX]
\RequirePackage{keyval}
\RequirePackage{ifthen}
\newif\ifASYinline
@@ -51,13 +51,13 @@
\fi
\fi
\ifx\XeTeXversion\undefined
-\else
-\ASYPDFtrue
-\immediate\write\AsyStream{settings.texcommand="xelatex";}%
-\fi
\ifASYPDF
\immediate\write\AsyStream{settings.tex="pdflatex";}%
\fi
+\else
+\immediate\write\AsyStream{settings.tex="xelatex";}%
+\ASYPDFtrue
+\fi
\ifASYinline
\immediate\write\AsyStream{settings.inlinetex=true;}%
@@ -267,6 +267,26 @@
\fi%
}
+% Work around bug in dvips.def: allow spaces in file names.
+\def\Ginclude@eps#1{%
+ \message{<#1>}%
+ \bgroup
+ \def\@tempa{!}%
+ \dimen@\Gin@req@width
+ \dimen@ii.1bp%
+ \divide\dimen@\dimen@ii
+ \@tempdima\Gin@req@height
+ \divide\@tempdima\dimen@ii
+ \special{PSfile=#1\space
+ llx=\Gin@llx\space
+ lly=\Gin@lly\space
+ urx=\Gin@urx\space
+ ury=\Gin@ury\space
+ \ifx\Gin@scalex\@tempa\else rwi=\number\dimen@\space\fi
+ \ifx\Gin@scaley\@tempa\else rhi=\number\@tempdima\space\fi
+ \ifGin@clip clip\fi}%
+ \egroup}
+
\def\Asymptote{{\tt Asymptote}}
%%% Local Variables:
diff --git a/Master/tlpkg/asymptote/asy.exe b/Master/tlpkg/asymptote/asy.exe
index a8b10612361..d68dd6695fc 100755
--- a/Master/tlpkg/asymptote/asy.exe
+++ b/Master/tlpkg/asymptote/asy.exe
Binary files differ