diff options
author | Karl Berry <karl@freefriends.org> | 2013-04-08 18:41:28 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-04-08 18:41:28 +0000 |
commit | a3358f7394e3adabeff44a4858bab8f13cbe1180 (patch) | |
tree | 014354d566c06a47c483b7231af921247180f770 /Master/texmf-dist | |
parent | 11bcd1a52098dab6ac5baa790409a2261a31755f (diff) |
asymptote 2.21
git-svn-id: svn://tug.org/texlive/trunk@29753 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
50 files changed, 1286 insertions, 961 deletions
diff --git a/Master/texmf-dist/asymptote/GUI/xasyVersion.py b/Master/texmf-dist/asymptote/GUI/xasyVersion.py index 7349b08d046..3afa87ce72c 100755 --- a/Master/texmf-dist/asymptote/GUI/xasyVersion.py +++ b/Master/texmf-dist/asymptote/GUI/xasyVersion.py @@ -1,2 +1,2 @@ #!/usr/bin/env python -xasyVersion = "2.16" +xasyVersion = "2.21" diff --git a/Master/texmf-dist/asymptote/asy-keywords.el b/Master/texmf-dist/asymptote/asy-keywords.el index 0bb5b66e7ab..4298d20ef11 100644 --- a/Master/texmf-dist/asymptote/asy-keywords.el +++ b/Master/texmf-dist/asymptote/asy-keywords.el @@ -2,7 +2,7 @@ ;; This file is automatically generated by asy-list.pl. ;; Changes will be overwritten. ;; -(defvar asy-keywords-version "2.16") +(defvar asy-keywords-version "2.21") (defvar asy-keyword-name '( and controls tension atleast curl if else while for do return break continue struct typedef new access import unravel from include quote static public private restricted this explicit true false null cycle newframe operator )) @@ -11,7 +11,7 @@ and controls tension atleast curl if else while for do return break continue str Braid FitResult Label Legend 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 CLZ CTZ Ceil Circle CircleBarIntervalMarker Cos Courier CrossIntervalMarker DOSendl DOSnewl DefaultFormat DefaultLogFormat Degrees Dir DotMargin DotMargins Dotted Draw Drawline Embed EndArcArrow EndArrow EndBar EndDotMargin EndMargin EndPenMargin Fill FillDraw Floor Format Full Gaussian Gaussrand Gaussrandpair Gradient Grayscale Helvetica Hermite HookHead InOutTicks InTicks Jn Label Landscape Left LeftRight LeftTicks Legend Linear 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 _begingroup3 _cputime _draw _eval _image _labelpath _projection _strokepath _texpath aCos aSin aTan abort abs accel acos acosh acot acsc activatequote add addArrow addMargins addSaveFunction addpenarc addpenline 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 ascii asec asin asinh ask assert asy asycode asydir asyfigure asyfilecode asyinclude asywrite atan atan2 atanh atbreakpoint atexit attach attract atupdate autoformat autoscale autoscale3 axes axes3 axialshade axis axiscoverage azimuth babel background bangles bar barmarksize barsize basealign baseline bbox beep begin beginclip begingroup beginpoint between bevel bezier bezierP bezierPP bezierPPP bezulate bibliography bibliographystyle binarytree binarytreeNode binomial bins bisector bisectorpoint bispline blend blockconnector box bqe breakpoint breakpoints brick buildRestoreDefaults buildRestoreThunk buildcycle bulletcolor byte calculateScaling 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 copyPairOrTriple cos cosh cot countIntersections cputime crop cropcode cross crossframe crosshatch crossmarksize csc cubicroots curabscissa curlSpecifier curpoint currentarrow currentexitfunction currentmomarrow currentpolarconicroutine curve cut cutafter cutbefore cyclic cylinder deactivatequote debugger deconstruct defaultdir defaultformat defaultpen defined degenerate degrees delete deletepreamble determinant diagonal diamond diffdiv dir dirSpecifier dirtime display distance divisors do_overpaint dot dotframe dotsize downcase draw drawAll drawDoubleLine drawFermion drawGhost drawGluon drawMomArrow drawPRCcylinder drawPRCdisk drawPRCsphere drawPRCtube drawPhoton drawScalar drawVertex drawVertexBox drawVertexBoxO drawVertexBoxX drawVertexO drawVertexOX drawVertexTriangle drawVertexTriangleO drawVertexX drawarrow drawarrow2 drawline drawpixel drawtick duplicate elle ellipse ellipsenodesnumber embed embed3 empty enclose end endScript endclip endgroup endgroup3 endl endpoint endpoints eof eol equation equations erase erasestep erf erfc error errorbar errorbars eval excenter excircle exit exitXasyMode exitfunction exp expfactors expi expm1 exradius extend extension extouch fabs factorial fermat fft fhorner figure file filecode fill filldraw filloutside fillrule filltype find 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 isnan isogonal isogonalconjugate isotomic isotomicconjugate isparabola italic item jobname key kurtosis kurtosisexcess label labelaxis labelmargin labelpath labels labeltick labelx labelx3 labely labely3 labelz labelz3 lastcut latex latitude latticeshade layer layout ldexp leastsquares legend legenditem length lexorder lift light limits line linear linecap lineinversion linejoin linemargin lineskip linetype linewidth link list lm_enorm lm_evaluate_default lm_lmdif lm_lmpar lm_minimize lm_print_default lm_print_quiet lm_qrfac lm_qrsolv locale locate locatefile location log log10 log1p logaxiscoverage longitude lookup makeNode makedraw makepen map margin markangle markangleradius markanglespace markarc marker markinterval marknodes markrightangle markthin markuniform mass masscenter massformat math max max3 maxAfterTransform maxbezier maxbound maxcoords maxlength maxratio maxtimes mean medial median midpoint min min3 minAfterTransform minbezier minbound minipage minratio mintimes miterlimit mktemp momArrowPath momarrowsize monotonic multifigure 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 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 printBytecode 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 sinh size size3 skewness skip slant sleep slope slopefield solve solveBVP sort sourceline sphere split sqrt square srand standardizecoordsys startScript stdev step stickframe stickmarksize stickmarkspace stop straight straightness string stripdirectory stripextension stripfile stripsuffix strokepath subdivide subitem subpath substr sum surface symmedial symmedian system tab tableau tan tangent tangential tangents tanh tell tensionSpecifier tensorshade tex texcolor texify texpath texpreamble texreset texshipout texsize textpath thick thin tick tickMax tickMax3 tickMin tickMin3 ticklabelshift ticklocate tildeframe tildemarksize tile tiling time times title titlepage topbox transform transformation transpose trembleFuzz triangle triangleAbc triangleabc triangulate tricoef tridiagonal trilinear trim truepoint tube uncycle unfill uniform unique unit unitrand unitsize unityroot unstraighten upcase updatefunction uperiodic upscale uptodate usepackage usersetting usetypescript usleep value variance variancebiased vbox vector vectorfield verbatim view vline vperiodic vprojection warn warning windingnumber write xaxis xaxis3 xaxis3At xaxisAt xequals xlimits xpart xscale xscaleO xtick xtick3 xtrans yaxis yaxis3 yaxis3At yaxisAt yequals ylimits ypart yscale yscaleO ytick ytick3 ytrans zaxis3 zaxis3At zero zero3 zlimits zpart ztick ztick3 ztrans )) +AND Arc ArcArrow ArcArrows Arrow Arrows 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 DOSendl DOSnewl DefaultFormat DefaultLogFormat Degrees Dir DotMargin DotMargins Dotted Draw Drawline Embed EndArcArrow EndArrow EndBar EndDotMargin EndMargin EndPenMargin Fill FillDraw Floor Format Full Gaussian Gaussrand Gaussrandpair Gradient Grayscale Helvetica Hermite HookHead InOutTicks InTicks Jn Label Landscape Left LeftRight LeftTicks Legend Linear Log LogFormat Margin Margins Mark MidArcArrow MidArrow NOT NewCenturySchoolBook NoBox NoMargin NoModifier NoTicks NoTicks3 NoZero NoZeroFormat None OR OmitFormat OmitTick OmitTickInterval OmitTickIntervals OutTicks Ox Oy Palatino PaletteTicks Pen PenMargin PenMargins Pentype Portrait RadialShade RadialShadeDraw Rainbow Range Relative Right RightTicks Rotate Round SQR Scale ScaleX ScaleY ScaleZ Seascape 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 _begingroup3 _cputime _draw _eval _image _labelpath _projection _strokepath _texpath aCos aSin aTan abort abs accel acos acosh acot acsc activatequote add addArrow addMargins addSaveFunction addpenarc addpenline 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 ascii asec asin asinh ask assert asy asycode asydir asyfigure asyfilecode asyinclude asywrite atan atan2 atanh atbreakpoint atexit attach attract atupdate autoformat autoscale autoscale3 axes axes3 axialshade axis axiscoverage azimuth babel background bangles bar barmarksize barsize basealign baseline bbox beep begin beginclip begingroup beginpoint between bevel bezier bezierP bezierPP bezierPPP bezulate bibliography bibliographystyle binarytree binarytreeNode binomial bins bisector bisectorpoint bispline blend blockconnector box bqe breakpoint breakpoints brick buildRestoreDefaults buildRestoreThunk buildcycle bulletcolor byte calculateScaling 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 copyPairOrTriple cos cosh cot countIntersections cputime crop cropcode cross crossframe crosshatch crossmarksize csc cubicroots curabscissa curlSpecifier curpoint currentarrow currentexitfunction currentmomarrow currentpolarconicroutine curve cut cutafter cutbefore cyclic cylinder deactivatequote debugger deconstruct defaultdir defaultformat defaultpen defined degenerate degrees delete deletepreamble determinant diagonal diamond diffdiv dir dirSpecifier dirtime display distance divisors do_overpaint dot dotframe dotsize downcase draw drawAll drawDoubleLine drawFermion drawGhost drawGluon drawMomArrow drawPRCcylinder drawPRCdisk drawPRCsphere drawPRCtube drawPhoton drawScalar drawVertex drawVertexBox drawVertexBoxO drawVertexBoxX drawVertexO drawVertexOX drawVertexTriangle drawVertexTriangleO drawVertexX drawarrow drawarrow2 drawline drawpixel drawtick duplicate elle ellipse ellipsenodesnumber embed embed3 embedplayer empty enclose end endScript endclip endgroup endgroup3 endl endpoint endpoints eof eol equation equations erase erasestep erf erfc error errorbar errorbars eval excenter excircle exit exitXasyMode exitfunction exp expfactors expi expm1 exradius extend extension extouch fabs factorial fermat fft fhorner figure file filecode fill filldraw filloutside fillrule filltype find 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 isnan isogonal isogonalconjugate isotomic isotomicconjugate isparabola italic item jobname key kurtosis kurtosisexcess label labelaxis labelmargin labelpath labels labeltick labelx labelx3 labely labely3 labelz labelz3 lastcut latex latitude latticeshade layer layout ldexp leastsquares legend legenditem length lexorder lift light limits line linear linecap lineinversion linejoin linemargin lineskip linetype linewidth link list lm_enorm lm_evaluate_default lm_lmdif lm_lmpar lm_minimize lm_print_default lm_print_quiet lm_qrfac lm_qrsolv locale locate locatefile location log log10 log1p logaxiscoverage longitude lookup makeNode makedraw makepen map margin markangle markangleradius markanglespace markarc marker markinterval marknodes markrightangle markthin markuniform mass masscenter massformat math max max3 maxAfterTransform maxbezier maxbound maxcoords maxlength maxratio maxtimes mean medial median midpoint min min3 minAfterTransform minbezier minbound minipage minratio mintimes miterlimit mktemp momArrowPath momarrowsize monotonic multifigure 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 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 printBytecode 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 sinh size size3 skewness skip slant sleep slope slopefield solve solveBVP sort sourceline sphere split sqrt square srand standardizecoordsys startScript stdev step stickframe stickmarksize stickmarkspace stop straight straightness string stripdirectory stripextension stripfile stripsuffix strokepath subdivide subitem subpath substr sum surface symmedial symmedian system tab tableau tan tangent tangential tangents tanh tell tensionSpecifier tensorshade tex texcolor texify texpath texpreamble texreset texshipout texsize textpath thick thin tick tickMax tickMax3 tickMin tickMin3 ticklabelshift ticklocate tildeframe tildemarksize tile tiling time times title titlepage topbox transform transformation transpose trembleFuzz triangle triangleAbc triangleabc triangulate tricoef tridiagonal trilinear trim truepoint tube uncycle unfill uniform unique unit unitrand unitsize unityroot unstraighten upcase updatefunction uperiodic upscale uptodate usepackage usersetting usetypescript usleep value variance variancebiased vbox vector vectorfield verbatim view vline vperiodic vprojection warn warning windingnumber write xaxis xaxis3 xaxis3At xaxisAt xequals xlimits xpart xscale xscaleO xtick xtick3 xtrans yaxis yaxis3 yaxis3At yaxisAt yequals ylimits ypart yscale yscaleO ytick ytick3 ytrans zaxis3 zaxis3At zero zero3 zlimits zpart ztick ztick3 ztrans )) (defvar asy-variable-name '( AliceBlue Align Allow AntiqueWhite Apricot Aqua Aquamarine Aspect Azure BeginPoint Beige Bisque Bittersweet Black BlanchedAlmond Blue BlueGreen BlueViolet Both Break BrickRed Brown BurlyWood BurntOrange CCW CW CadetBlue CarnationPink Center Centered Cerulean Chartreuse Chocolate Coeff Coral CornflowerBlue Cornsilk Crimson Crop Cyan Dandelion DarkBlue DarkCyan DarkGoldenrod DarkGray DarkGreen DarkKhaki DarkMagenta DarkOliveGreen DarkOrange DarkOrchid DarkRed DarkSalmon DarkSeaGreen DarkSlateBlue DarkSlateGray DarkTurquoise DarkViolet DeepPink DeepSkyBlue DefaultHead DimGray DodgerBlue Dotted Down Draw E ENE EPS ESE E_Euler E_PC E_RK2 E_RK3BS Emerald EndPoint Euler Fill FillDraw FireBrick FloralWhite ForestGreen Fuchsia Gainsboro GhostWhite Gold Goldenrod Gray Green GreenYellow Honeydew HookHead Horizontal HotPink I IgnoreAspect IndianRed Indigo Ivory JOIN_IN JOIN_OUT JungleGreen Khaki LM_DWARF LM_MACHEP LM_SQRT_DWARF LM_SQRT_GIANT LM_USERTOL Label Lavender LavenderBlush LawnGreen Left LeftJustified LeftSide LemonChiffon LightBlue LightCoral LightCyan LightGoldenrodYellow LightGreen LightGrey LightPink LightSalmon LightSeaGreen LightSkyBlue LightSlateGray LightSteelBlue LightYellow Lime LimeGreen Linear Linen Log Logarithmic Magenta Mahogany Mark MarkFill MarkPath Maroon Max MediumAquamarine MediumBlue MediumOrchid MediumPurple MediumSeaGreen MediumSlateBlue MediumSpringGreen MediumTurquoise MediumVioletRed Melon MidPoint MidnightBlue Min MintCream MistyRose Moccasin Move MoveQuiet Mulberry N NE NNE NNW 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 defaultseparator diagnostics differentlengths dot dotfactor dotframe dotted doublelinepen doublelinespacing down duplicateFuzz edge ellipsenodesnumberfactor eps epsgeo epsilon evenodd expansionfactor extendcap exterior fermionpen figureborder figuremattpen file3 firstnode firststep foregroundcolor fuchsia fuzz gapfactor ghostpen gluonamplitude gluonpen gluonratio gray green grey hatchepsilon havepagenumber heavyblue heavycyan heavygray heavygreen heavygrey heavymagenta heavyred hline hwratio 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 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 plain_bounds plain_scaling plus preamblenodes pt purple r3 r4a r4b randMax realDigits realEpsilon realMax realMin red relativesystem reverse right roundcap roundjoin royalblue salmon saveFunctions scalarpen sequencereal settings shipped signedtrailingzero solid springgreen sqrtEpsilon squarecap squarepen startposition stdin stdout stepfactor stepfraction steppagenumberpen stepping stickframe stickmarksizefactor stickmarkspacefactor swap textpen ticksize tildeframe tildemarksizefactor tinv titlealign titlepagepen titlepageposition titlepen titleskip top trailingzero treeLevelStep treeMinNodeWidth treeNodeStep trembleAngle trembleFrequency trembleRandom undefined unitcircle unitsquare up urlpen urlskip version vertexpen vertexsize viewportmargin viewportsize vline white wye xformStack yellow ylabelwidth zerotickfuzz zerowinding )) diff --git a/Master/texmf-dist/asymptote/asy_filetype.vim b/Master/texmf-dist/asymptote/asy_filetype.vim new file mode 100644 index 00000000000..3b614edf12b --- /dev/null +++ b/Master/texmf-dist/asymptote/asy_filetype.vim @@ -0,0 +1,3 @@ +" Vim filetype detection file +" Language: Asymptote +au BufNewFile,BufRead *.asy setfiletype asy diff --git a/Master/texmf-dist/asymptote/bezulate.asy b/Master/texmf-dist/asymptote/bezulate.asy index 5b21d8c1605..a0f6689b504 100644 --- a/Master/texmf-dist/asymptote/bezulate.asy +++ b/Master/texmf-dist/asymptote/bezulate.asy @@ -32,7 +32,7 @@ path[][] containmentTree(path[] paths) resultj.insert(0,g); // check to see if any other groups are contained within this curve for(int k=j+1; k < result.length;) { - if(inside(g,result[k][0]) == 1) { + if(inside(g,result[k][0],zerowinding) == 1) { resultj.append(result[k]); result.delete(k); } else ++k; @@ -101,22 +101,45 @@ void connect(path[] paths, path[] result, path[] patch) real d=2*abs(max(outer)-min(outer)); while(inners.length > 0) { int curveIndex = 0; - pair direction=I*dir(inners[curveIndex],0,1); // Use outgoing direction - if(direction == 0) // Try a random direction - direction=expi(2pi*unitrand()); - pair start=point(inners[curveIndex],0); - + //pair direction=I*dir(inners[curveIndex],0,1); // Use outgoing direction + //if(direction == 0) // Try a random direction + // direction=expi(2pi*unitrand()); + //pair start=point(inners[curveIndex],0); + + // find shortest distance between a node on the inner curve and a node + // on the outer curve + + real mindist = d; + int inner_i = 0; + int outer_i = 0; + for(int ni = 0; ni < length(inners[curveIndex]); ++ni) + { + for(int no = 0; no < length(outer); ++no) + { + real dist = abs(point(inners[curveIndex],ni)-point(outer,no)); + if(dist < mindist) + { + inner_i = ni; + outer_i = no; + mindist = dist; + } + } + } + pair start=point(inners[curveIndex],inner_i); + pair end = point(outer,outer_i); + // find first intersection of line segment with outer curve - real[][] ints=intersections(start,start+d*direction,outer); + //real[][] ints=intersections(start,start+d*direction,outer); + real[][] ints=intersections(start,end,outer); assert(ints.length != 0); real endtime=ints[0][1]; // endtime is time on outer - pair end = point(outer,endtime); - + end = point(outer,endtime); // find first intersection of end--start with any inner curve - real starttime=0; // starttime is time on inners[curveIndex] + real starttime=inner_i; // starttime is time on inners[curveIndex] real earliestTime=1; for(int j=0; j < inners.length; ++j) { real[][] ints=intersections(end,start,inners[j]); + if(ints.length > 0 && ints[0][0] < earliestTime) { earliestTime=ints[0][0]; // time on end--start starttime=ints[0][1]; // time on inner curve @@ -124,49 +147,80 @@ void connect(path[] paths, path[] result, path[] patch) } } start=point(inners[curveIndex],starttime); - - real timeoffset=2; - bool found=false; - path portion; + + + bool found_forward = false; + real timeoffset_forward = 2; + path portion_forward; path[] allCurves = {outer}; allCurves.append(inners); - while(!found && timeoffset > fuzz) { - timeoffset /= 2; + while(!found_forward && timeoffset_forward > fuzz) { + timeoffset_forward /= 2; if(countIntersections(allCurves,start, - point(outer,endtime+timeoffset)) == 2) + point(outer,endtime+timeoffset_forward)) == 2) { - portion = subpath(outer,endtime,endtime+timeoffset)--start--cycle; - found=true; + portion_forward = subpath(outer,endtime,endtime+timeoffset_forward)--start--cycle; + + found_forward=true; // check if an inner curve is inside the portion - for(int k = 0; found && k < inners.length; ++k) + for(int k = 0; found_forward && k < inners.length; ++k) { if(k!=curveIndex && - inside(portion,point(inners[k],0),zerowinding)) - found = false; + inside(portion_forward,point(inners[k],0),zerowinding)) + found_forward = false; } } } - - if(!found) timeoffset=-2; - while(!found && timeoffset < -fuzz) { - timeoffset /= 2; + + bool found_backward = false; + real timeoffset_backward = -2; + path portion_backward; + while(!found_backward && timeoffset_backward < -fuzz) { + timeoffset_backward /= 2; if(countIntersections(allCurves,start, - point(outer,endtime+timeoffset))==2) + point(outer,endtime+timeoffset_backward))==2) { - portion = subpath(outer,endtime+timeoffset,endtime)--start--cycle; - found = true; + portion_backward = subpath(outer,endtime+timeoffset_backward,endtime)--start--cycle; + found_backward = true; // check if an inner curve is inside the portion - for(int k = 0; found && k < inners.length; ++k) + for(int k = 0; found_backward && k < inners.length; ++k) { if(k!=curveIndex && - inside(portion,point(inners[k],0),zerowinding)) - found = false; + inside(portion_backward,point(inners[k],0),zerowinding)) + found_backward = false; } } } - assert(found); + assert(found_forward || found_backward); + real timeoffset; + path portion; + if(found_forward && !found_backward) + { + timeoffset = timeoffset_forward; + portion = portion_forward; + } + else if(found_backward && !found_forward) + { + timeoffset = timeoffset_backward; + portion = portion_backward; + } + else // assert handles case of neither found + { + if(timeoffset_forward > -timeoffset_backward) + { + timeoffset = timeoffset_forward; + portion = portion_forward; + } + else + { + timeoffset = timeoffset_backward; + portion = portion_backward; + } + } + endtime=min(endtime,endtime+timeoffset); + // or go from timeoffset+timeoffset_backward to timeoffset+timeoffset_forward? timeoffset=abs(timeoffset); // depends on the curves having opposite orientations diff --git a/Master/texmf-dist/asymptote/binarytree.asy b/Master/texmf-dist/asymptote/binarytree.asy index 0a80aec4b66..31e0e3aab61 100644 --- a/Master/texmf-dist/asymptote/binarytree.asy +++ b/Master/texmf-dist/asymptote/binarytree.asy @@ -1,17 +1,21 @@ /* ********************************************************************** * binarytree: An Asymptote module to draw binary trees * * * - * Copyright (C) 2006 * + * Copyright(C) 2006 * * Tobias Langner tobias[at]langner[dot]nightlabs[dot]de * * * * Modified by John Bowman * * * + * Condensed mode: * + * Copyright(C) 2012 * + * Gerasimos Dimitriadis dimeg [at] intracom [dot] gr * + * * ************************************************************************ * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * - * version 3 of the License, or (at your option) any later version. * + * version 3 of the License, or(at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * @@ -25,51 +29,105 @@ * Boston, MA 02110-1301 USA * * * * Or get it online: * - * http://www.gnu.org/copyleft/lesser.html * + * http: //www.gnu.org/copyleft/lesser.html * * * ***********************************************************************/ -/** - * default values - */ +// default values real minDistDefault=0.2cm; real nodeMarginDefault=0.1cm; -/** - * structure to represent nodes in a binary tree - */ +// structure to represent nodes in a binary tree struct binarytreeNode { int key; binarytreeNode left; binarytreeNode right; binarytreeNode parent; - - /** - * sets the left child of this node - */ + bool spans_calculated=false; + int left_span,total_left_span; + int right_span,total_right_span; + void update_spans(); + + // Get the horizontal span of the tree consisting of the current + // node plus the whole subtree that is rooted at the right child + // (condensed mode) + int getTotalRightSpan() { + if(spans_calculated == false) { + update_spans(); + } + + return total_right_span; + } + + // Get the horizontal span of the tree consisting of the current + // node plus the whole subtree that is rooted at the left child + // (condensed mode) + int getTotalLeftSpan() { + if(spans_calculated == false) { + update_spans(); + } + return total_left_span; + } + + // Get the horizontal distance between this node and its right child + // (condensed mode) + int getRightSpan() { + if(spans_calculated == false) { + update_spans(); + } + return right_span; + } + + // Get the horizontal distance between this node and its left child + // (condensed mode) + int getLeftSpan() { + if(spans_calculated == false) { + update_spans(); + } + return left_span; + } + + // Update all span figures for this node. + // condensed mode) + update_spans=new void() { + if(spans_calculated == true) + return; + + left_span=0; + total_left_span=0; + right_span=0; + total_right_span=0; + + if(left != null) { + left_span=left.getTotalRightSpan()+1; + total_left_span=left_span+left.getTotalLeftSpan(); + } + + if(right != null) { + right_span=right.getTotalLeftSpan()+1; + total_right_span=right_span+right.getTotalRightSpan(); + } + spans_calculated=true; + }; + + // set the left child of this node void setLeft(binarytreeNode left) { this.left=left; this.left.parent=this; } - /** - * sets the right child of this node - */ + // set the right child of this node void setRight(binarytreeNode right) { this.right=right; this.right.parent=this; } - /** - * returns a boolean indicating whether this node is the root - */ + // return a boolean indicating whether this node is the root bool isRoot() { return parent == null; } - /** - * Returns the level of the subtree rooted at this node. - */ + // return the level of the subtree rooted at this node. int getLevel() { if(isRoot()) return 1; @@ -77,26 +135,20 @@ struct binarytreeNode { return parent.getLevel()+1; } - /** - * sets the children of this binarytreeNode - */ + // set the children of this binarytreeNode void setChildren(binarytreeNode left, binarytreeNode right) { setLeft(left); setRight(right); } - /** - * creates a new binarytreeNode with key <key> - */ + // create a new binarytreeNode with key <key> static binarytreeNode binarytreeNode(int key) { binarytreeNode toReturn=new binarytreeNode; toReturn.key=key; return toReturn; } - /** - * returns the height of the subtree rooted at this node. - */ + // returns the height of the subtree rooted at this node. int getHeight() { if(left == null && right == null) return 1; @@ -111,43 +163,46 @@ struct binarytreeNode { binarytreeNode operator init() {return null;} -/** - * "constructor" for binarytreeNode - */ +// "constructor" for binarytreeNode binarytreeNode binarytreeNode(int key)=binarytreeNode.binarytreeNode; - -/** - * draws the tree rooted at the given <node> at the given position <pos>, with - * <height>: the height of the containing tree, - * <minDist>: the minimal horizontal distance of two nodes at the lowest level, - * <levelDist> the vertical distance between two levels, - * <nodeDiameter>: the diameter of one node. - */ +// draw the tree rooted at the given <node> at the given position <pos>, with +// <height>=the height of the containing tree, +// <minDist>=the minimal horizontal distance of two nodes at the lowest level, +// <levelDist>=the vertical distance between two levels, +// <nodeDiameter>=the diameter of one node. object draw(picture pic=currentpicture, binarytreeNode node, pair pos, int height, real minDist, real levelDist, real nodeDiameter, - pen p=currentpen) { + pen p=currentpen, bool condensed=false) { Label label=Label(math((string) node.key),pos); binarytreeNode left=node.left; binarytreeNode right=node.right; - /** - * returns the distance for two nodes at the given <level> when the - * containing tree has height <height> - * and the minimal distance between two nodes is <minDist>. - */ + // return the distance for two nodes at the given <level> when the + // containing tree has height <height> + // and the minimal distance between two nodes is <minDist> . real getDistance(int level, int height, real minDist) { return(nodeDiameter+minDist)*2^(height-level); } + // return the horiontal distance between node <n> and its left child + // (condensed mode) + real getLeftDistance(binarytreeNode n) { + return(nodeDiameter+minDist) *(real)n.getLeftSpan() * 0.5; + } + + // return the horiontal distance between node <n> and its right child + // (condensed mode) + real getRightDistance(binarytreeNode n) { + return(nodeDiameter+minDist) *(real)n.getRightSpan() * 0.5; + } + real dist=getDistance(node.getLevel(),height,minDist)/2; - /** - * draws the connection between the two nodes at the given positions - * by calculating the connection points - * and then drawing the corresponding arrow. - */ + // draw the connection between the two nodes at the given positions + // by calculating the connection points and drawing the corresponding + // arrow. void deferredDrawNodeConnection(pair parentPos, pair childPos) { pic.add(new void(frame f, transform t) { pair start,end; @@ -161,14 +216,26 @@ object draw(picture pic=currentpicture, binarytreeNode node, pair pos, } if(left != null) { - pair childPos=pos-(0,levelDist)-(dist/2,0); - draw(pic,left,childPos,height,minDist,levelDist,nodeDiameter,p); + pair childPos; + if(condensed == false) { + childPos=pos-(0,levelDist)-(dist/2,0); + } + else { + childPos=pos-(0,levelDist)-((real)getLeftDistance(node),0); + } + draw(pic,left,childPos,height,minDist,levelDist,nodeDiameter,p,condensed); deferredDrawNodeConnection(pos,childPos); } if(right != null) { - pair childPos=pos-(0,levelDist)+(dist/2,0); - draw(pic,right,childPos,height,minDist,levelDist,nodeDiameter,p); + pair childPos; + if(condensed == false) { + childPos=pos-(0,levelDist)+(dist/2,0); + } + else { + childPos=pos-(0,levelDist)+((real)getRightDistance(node),0); + } + draw(pic,right,childPos,height,minDist,levelDist,nodeDiameter,p,condensed); deferredDrawNodeConnection(pos,childPos); } @@ -199,16 +266,13 @@ int[] operator cast(key[] k) { key nil=key(0,false); -/** - * structure to represent a binary tree. - */ +// structure to represent a binary tree. struct binarytree { binarytreeNode root; int[] keys; - /** - * adds the given < key > to the tree by searching for its place and inserting it there. - */ + // add the given <key> to the tree by searching for its place and + // inserting it there. void addKey(int key) { binarytreeNode newNode=binarytreeNode(key); @@ -240,9 +304,7 @@ struct binarytree { } } - /** - * returns the height of the tree - */ + // return the height of the tree int getHeight() { if(root == null) return 0; @@ -250,9 +312,7 @@ struct binarytree { return root.getHeight(); } - /** - * adds all given keys to the tree sequentially - */ + // add all given keys to the tree sequentially void addSearchKeys(int[] keys) { for(int i=0; i < keys.length; ++i) { int key=keys[i]; @@ -283,9 +343,7 @@ struct binarytree { } - /** - * returns all key in the tree - */ + // return all key in the tree int[] getKeys() { return keys; } @@ -305,12 +363,10 @@ binarytree binarytree(...key[] keys) return bt; } -/** - * draws the given binary tree. - */ +// draw the given binary tree. void draw(picture pic=currentpicture, binarytree tree, real minDist=minDistDefault, real nodeMargin=nodeMarginDefault, - pen p=currentpen) + pen p=currentpen, bool condensed=false) { int[] keys=tree.getKeys(); @@ -322,5 +378,6 @@ void draw(picture pic=currentpicture, binarytree tree, real nodeDiameter=abs(max(f)-min(f))+2*nodeMargin; real levelDist=nodeDiameter*1.8; - draw(pic,tree.root,(0,0),tree.getHeight(),minDist,levelDist,nodeDiameter,p); + draw(pic,tree.root,(0,0),tree.getHeight(),minDist,levelDist,nodeDiameter,p, + condensed); } diff --git a/Master/texmf-dist/asymptote/embed.asy b/Master/texmf-dist/asymptote/embed.asy index 165de0b7534..8f982332d86 100644 --- a/Master/texmf-dist/asymptote/embed.asy +++ b/Master/texmf-dist/asymptote/embed.asy @@ -1,38 +1,36 @@ if(latex()) { usepackage("hyperref"); texpreamble("\hypersetup{"+settings.hyperrefOptions+"}"); - texpreamble(" -\ifx\pdfhorigin\undefined% -\usepackage[3D,dvipdfmx]{movie15} -\else% -\usepackage[3D]{movie15} -\fi% -\FPmessagesfalse% -"); + usepackage("media9","bigfiles"); } -// See http://www.ctan.org/tex-archive/macros/latex/contrib/movie15/README +// See http://www.ctan.org/tex-archive/macros/latex/contrib/media9/doc/media9.pdf // for documentation of the options. -// Embed object in pdf file -string embed(string name, string options="", real width=0, real height=0) +// Embed PRC or SWF content in pdf file +string embedplayer(string name, string text="", string options="", + real width=0, real height=0) { - if(options != "") options="["+options+"]{"; - if(width != 0) options += (string) (width/pt)+"pt"; - options += "}{"; - if(height != 0) options += (string) (height/pt)+"pt"; - return "\includemovie"+options+"}{"+name+"}"; + if(width != 0) options += ",width="+(string) (width/pt)+"pt"; + if(height != 0) options += ",height="+(string) (height/pt)+"pt"; + return "\includemedia["+options+"]{"+text+"}{"+name+"}"; } -string hyperlink(string url, string text) +// Embed media in pdf file +string embed(string name, string text="", string options="", + real width=0, real height=0) { - return "\href{"+url+"}{"+text+"}"; + return embedplayer("VPlayer.swf",text,"label="+name+ + ",activate=pageopen,addresource="+name+ + ",flashvars={source="+name+"&scaleMode=letterbox},"+ + options,width,height); } -string link(string label, string text, string options="") +string link(string label, string text="Play") { - // Run LaTeX twice to resolve references. - settings.twice=true; - if(options != "") options="["+options+"]"; - return "\movieref"+options+"{"+label+"}{"+text+"}"; + return "\PushButton[ + onclick={ + annotRM['"+label+"'].activated=true; + annotRM['"+label+"'].callAS('playPause'); + }]{\fbox{"+text+"}}"; } diff --git a/Master/texmf-dist/asymptote/external.asy b/Master/texmf-dist/asymptote/external.asy index 053f1eff4c1..f9ab5365aea 100644 --- a/Master/texmf-dist/asymptote/external.asy +++ b/Master/texmf-dist/asymptote/external.asy @@ -3,10 +3,10 @@ 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. -string embed(string name, string options="", real width=0, real height=0, - string image="") +string embed(string name, string text="", string options="", + real width=0, real height=0, string image="") { - string options; // Ignore movie15 options. + string options; // Ignore passed options. if(image == "") { image=stripdirectory(stripextension(name))+"."+nativeformat(); convert(name+"[0]",image,nativeformat()); @@ -30,8 +30,8 @@ string hyperlink(string url, string text) return "\href{"+url+"}{"+text+"}"; } -string link(string url, string text, string options="") +string link(string label, string text="Play") { - return hyperlink("run:"+url,text); + return hyperlink("run:"+label,text); } diff --git a/Master/texmf-dist/asymptote/graph.asy b/Master/texmf-dist/asymptote/graph.asy index cbcea4aeae3..410c59cf13a 100644 --- a/Master/texmf-dist/asymptote/graph.asy +++ b/Master/texmf-dist/asymptote/graph.asy @@ -1451,9 +1451,9 @@ void autoscale(picture pic=currentpicture, axis axis) if(pic.scale.x.scale.logarithmic && floor(pic.userMin().x) == floor(pic.userMax().x)) { if(pic.scale.x.automin()) - pic.userMinx(floor(pic.userMin().x)); + pic.userMinx2(floor(pic.userMin().x)); if(pic.scale.x.automax()) - pic.userMaxx(ceil(pic.userMax().x)); + pic.userMaxx2(ceil(pic.userMax().x)); } } else {mx.min=mx.max=0; pic.scale.set=false;} @@ -1462,9 +1462,9 @@ void autoscale(picture pic=currentpicture, axis axis) if(pic.scale.y.scale.logarithmic && floor(pic.userMin().y) == floor(pic.userMax().y)) { if(pic.scale.y.automin()) - pic.userMiny(floor(pic.userMin().y)); + pic.userMiny2(floor(pic.userMin().y)); if(pic.scale.y.automax()) - pic.userMaxy(ceil(pic.userMax().y)); + pic.userMaxy2(ceil(pic.userMax().y)); } } else {my.min=my.max=0; pic.scale.set=false;} @@ -1611,12 +1611,13 @@ void yaxis(picture pic=currentpicture, Label L="", axis axis=XZero, // Draw x and y axes. void axes(picture pic=currentpicture, Label xlabel="", Label ylabel="", + bool extend=true, pair min=(-infinity,-infinity), pair max=(infinity,infinity), pen p=currentpen, arrowbar arrow=None, margin margin=NoMargin, bool above=false) { - xaxis(pic,xlabel,min.x,max.x,p,arrow,margin,above); - yaxis(pic,ylabel,min.y,max.y,p,arrow,margin,above); + xaxis(pic,xlabel,YZero(extend),min.x,max.x,p,arrow,margin,above); + yaxis(pic,ylabel,XZero(extend),min.y,max.y,p,arrow,margin,above); } // Draw a yaxis at x. @@ -1788,6 +1789,7 @@ picture secondaryX(picture primary=currentpicture, void f(picture)) { if(!primary.scale.set) abort(noprimary); picture pic; + size(pic,primary); if(primary.userMax().x == primary.userMin().x) return pic; f(pic); if(!pic.userSetx()) return pic; @@ -1817,6 +1819,7 @@ picture secondaryY(picture primary=currentpicture, void f(picture)) { if(!primary.scale.set) abort(noprimary); picture pic; + size(pic,primary); if(primary.userMax().y == primary.userMin().y) return pic; f(pic); if(!pic.userSety()) return pic; diff --git a/Master/texmf-dist/asymptote/graph3.asy b/Master/texmf-dist/asymptote/graph3.asy index 91e5194bea9..fd7871e1547 100644 --- a/Master/texmf-dist/asymptote/graph3.asy +++ b/Master/texmf-dist/asymptote/graph3.asy @@ -931,9 +931,9 @@ void autoscale3(picture pic=currentpicture, axis axis) if(pic.scale.z.scale.logarithmic && floor(pic.userMin().z) == floor(pic.userMax().z)) { if(pic.scale.z.automin()) - pic.userMinz(floor(pic.userMin().z)); + pic.userMinz3(floor(pic.userMin().z)); if(pic.scale.z.automax()) - pic.userMaxz(ceil(pic.userMax().z)); + pic.userMaxz3(ceil(pic.userMax().z)); } } else {mz.min=mz.max=0; pic.scale.set=false;} @@ -1199,13 +1199,14 @@ void limits(picture pic=currentpicture, triple min, triple max) // Draw x, y and z axes. void axes3(picture pic=currentpicture, Label xlabel="", Label ylabel="", Label zlabel="", + bool extend=false, triple min=(-infinity,-infinity,-infinity), triple max=(infinity,infinity,infinity), pen p=currentpen, arrowbar3 arrow=None, margin3 margin=NoMargin3) { - xaxis3(pic,xlabel,min.x,max.x,p,arrow,margin); - yaxis3(pic,ylabel,min.y,max.y,p,arrow,margin); - zaxis3(pic,zlabel,min.z,max.z,p,arrow,margin); + xaxis3(pic,xlabel,YZZero(extend),min.x,max.x,p,arrow,margin); + yaxis3(pic,ylabel,XZZero(extend),min.y,max.y,p,arrow,margin); + zaxis3(pic,zlabel,XYZero(extend),min.z,max.z,p,arrow,margin); } triple Scale(picture pic=currentpicture, triple v) @@ -1884,7 +1885,8 @@ void draw(picture pic=currentpicture, Label[] L=new Label[], interaction interaction=LabelInteraction()) { pen thin=is3D() ? thin() : defaultpen; - if(g.length > 1) + bool group=g.length > 1 && (name != "" || render.defaultnames); + if(group) begingroup3(pic,name == "" ? "contours" : name,render); for(int cnt=0; cnt < g.length; ++cnt) { guide3[] gcnt=g[cnt]; @@ -1899,7 +1901,7 @@ void draw(picture pic=currentpicture, Label[] L=new Label[], } } } - if(g.length > 1) + if(group) endgroup3(pic); } @@ -1945,7 +1947,9 @@ picture vectorfield(path3 vector(pair v), triple f(pair z), pair a, pair b, scale=max > 0 ? maxlength/max : 1; } else scale=1; - begingroup3(pic,name == "" ? "vectorfield" : name,render); + bool group=name != "" || render.defaultnames; + if(group) + begingroup3(pic,name == "" ? "vectorfield" : name,render); for(int i=0; i <= nu; ++i) { real x=interp(a.x,b.x,i*du); for(int j=0; j <= nv; ++j) { @@ -1962,7 +1966,8 @@ picture vectorfield(path3 vector(pair v), triple f(pair z), pair a, pair b, } } } - endgroup3(pic); + if(group) + endgroup3(pic); return pic; } diff --git a/Master/texmf-dist/asymptote/palette.asy b/Master/texmf-dist/asymptote/palette.asy index b1d1985a323..62ca83f1c9a 100644 --- a/Master/texmf-dist/asymptote/palette.asy +++ b/Master/texmf-dist/asymptote/palette.asy @@ -92,11 +92,18 @@ bounds image(picture pic=currentpicture, real[][] f, range range=Full, initial=Scale(pic,initial); final=Scale(pic,final); - transform T=transpose ? swap : identity(); + pic.addBox(initial,final); + + transform T; + if(transpose) { + T=swap; + initial=T*initial; + final=T*final; + } + pic.add(new void(frame F, transform t) { - _image(F,f,T*initial,T*final,palette,t*T,copy=false,antialias=antialias); + _image(F,f,initial,final,palette,t*T,copy=false,antialias=antialias); },true); - pic.addBox(initial,final); return bounds; // Return bounds used for color space } @@ -131,11 +138,18 @@ void image(picture pic=currentpicture, pen[][] data, pair initial, pair final, initial=Scale(pic,initial); final=Scale(pic,final); - transform T=transpose ? swap : identity(); + pic.addBox(initial,final); + + transform T; + if(transpose) { + T=swap; + initial=T*initial; + final=T*final; + } + pic.add(new void(frame F, transform t) { - _image(F,data,T*initial,T*final,t*T,copy=false,antialias=antialias); + _image(F,data,initial,final,t*T,copy=false,antialias=antialias); },true); - pic.addBox(initial,final); } void image(picture pic=currentpicture, pen f(int, int), int width, int height, @@ -146,11 +160,21 @@ void image(picture pic=currentpicture, pen f(int, int), int width, int height, initial=Scale(pic,initial); final=Scale(pic,final); - transform T=transpose ? swap : identity(); + pic.addBox(initial,final); + + transform T; + if(transpose) { + T=swap; + int temp=width; + width=height; + height=temp; + initial=T*initial; + final=T*final; + } + pic.add(new void(frame F, transform t) { - _image(F,f,width,height,T*initial,T*final,t*T,antialias=antialias); + _image(F,f,width,height,initial,final,t*T,antialias=antialias); },true); - pic.addBox(initial,final); } bounds image(picture pic=currentpicture, pair[] z, real[] f, @@ -291,9 +315,19 @@ void palette(picture pic=currentpicture, Label L="", bounds bounds, } real[][] pdata={sequence(palette.length)}; - transform T=vertical ? swap : identity(); + transform T; + pair Tinitial,Tfinal; + if(vertical) { + T=swap; + Tinitial=T*initial; + Tfinal=T*final; + } else { + Tinitial=initial; + Tfinal=final; + } + pic.add(new void(frame f, transform t) { - _image(f,pdata,T*initial,T*final,palette,t*T,copy=false, + _image(f,pdata,Tinitial,Tfinal,palette,t*T,copy=false, antialias=antialias); },true); diff --git a/Master/texmf-dist/asymptote/plain.asy b/Master/texmf-dist/asymptote/plain.asy index e06bc66543c..14715bad918 100644 --- a/Master/texmf-dist/asymptote/plain.asy +++ b/Master/texmf-dist/asymptote/plain.asy @@ -39,8 +39,6 @@ include plain_markers; include plain_arrows; include plain_debugger; -pair viewportmargin=(0,0); // Horizontal and vertical 3D viewport margins. - typedef void exitfcn(); bool needshipout() { diff --git a/Master/texmf-dist/asymptote/plain_Label.asy b/Master/texmf-dist/asymptote/plain_Label.asy index a559ae88298..1e424ab1c0a 100644 --- a/Master/texmf-dist/asymptote/plain_Label.asy +++ b/Master/texmf-dist/asymptote/plain_Label.asy @@ -212,6 +212,9 @@ embed Rotate(pair z) { warn=false));}; } +path[] texpath(string s, pen p, bool tex=settings.tex != "none", + bool bbox=false); + struct Label { string s,size; position position; @@ -289,8 +292,11 @@ struct Label { void label(frame f, transform t=identity(), pair position, pair align) { pen p0=p == nullpen ? currentpen : p; align=length(align)*unit(rotation(t)*align); - label(f,s,size,embed(t)*shiftless(T), - t*position+align*labelmargin(p0)+shift(T)*0,align,p0); + pair S=t*position+align*labelmargin(p0)+shift(T)*0; + if(settings.tex != "none") + label(f,s,size,embed(t)*shiftless(T),S,align,p0); + else + fill(f,align(texpath(s,p0),S,align,p0),p0); } void out(frame f, transform t=identity(), pair position=position.position, @@ -352,8 +358,10 @@ struct Label { if(p != nullpen) write(file,", pen=",p); if(!defaulttransform) write(file,", transform=",T); - if(!defaulttransform3) + if(!defaulttransform3) { + write(file,", transform3=",endl); write(file,T3); + } write(file,"",suffix); } @@ -579,7 +587,7 @@ path[] texpath(Label L, bool tex=settings.tex != "none", bool bbox=false) void operator init(Label L) { - s=L.s; + s=replace(L.s,'\n',' '); fontsize=fontsize(L.p); font=font(L.p); } @@ -667,3 +675,8 @@ path[] texpath(Label L, bool tex=settings.tex != "none", bool bbox=false) return transform(pathcache[search(stringcache,stringfont(L),lexorder)],L); } + +texpath=new path[](string s, pen p, bool tex=settings.tex != "none", bool bbox=false) +{ + return texpath(Label(s,p)); +}; diff --git a/Master/texmf-dist/asymptote/plain_arrows.asy b/Master/texmf-dist/asymptote/plain_arrows.asy index 59b65aa4126..3ae60938ed1 100644 --- a/Master/texmf-dist/asymptote/plain_arrows.asy +++ b/Master/texmf-dist/asymptote/plain_arrows.asy @@ -40,8 +40,8 @@ real[] arrowbasepoints(path base, path left, path right) { real[][] Tl=transpose(intersections(left,base)); real[][] Tr=transpose(intersections(right,base)); - return new real[] {Tl.length > 0 ? Tl[0][0] : 1, - Tr.length > 0 ? Tr[0][0] : 1}; + return new real[] {Tl.length > 0 ? Tl[0][0] : 0, + Tr.length > 0 ? Tr[0][0] : 0}; } path arrowbase(path r, pair y, real t, real size) @@ -67,7 +67,7 @@ DefaultHead.head=new path(path g, position position=EndPoint, pen p=currentpen, real[] T=arrowbasepoints(base,left,right); pair denom=point(right,T[1])-y; real factor=denom != 0 ? length((point(left,T[0])-y)/denom) : 1; - path left=rotate(-angle,x)*r; + path left=rotate(-angle*factor,x)*r; path right=rotate(angle*factor,x)*r; real[] T=arrowbasepoints(base,left,right); return subpath(left,0,T[0])--subpath(right,T[1],0)&cycle; @@ -90,7 +90,7 @@ SimpleHead.head=new path(path g, position position=EndPoint, pen p=currentpen, real[] T=arrowbasepoints(base,left,right); pair denom=point(right,T[1])-y; real factor=denom != 0 ? length((point(left,T[0])-y)/denom) : 1; - path left=rotate(-angle,x)*r; + path left=rotate(-angle*factor,x)*r; path right=rotate(angle*factor,x)*r; real[] T=arrowbasepoints(base,left,right); return subpath(left,T[0],0)--subpath(right,0,T[1]); @@ -117,7 +117,7 @@ arrowhead HookHead(real dir=arrowdir, real barb=arrowbarb) real[] T=arrowbasepoints(base,left,right); pair denom=point(right,T[1])-y; real factor=denom != 0 ? length((point(left,T[0])-y)/denom) : 1; - path left=rotate(-angle,x)*r; + path left=rotate(-angle*factor,x)*r; path right=rotate(angle*factor,x)*r; real[] T=arrowbasepoints(base,left,right); left=subpath(left,0,T[0]); diff --git a/Master/texmf-dist/asymptote/plain_bounds.asy b/Master/texmf-dist/asymptote/plain_bounds.asy index 871d82f01b5..b74a6ceee6a 100644 --- a/Master/texmf-dist/asymptote/plain_bounds.asy +++ b/Master/texmf-dist/asymptote/plain_bounds.asy @@ -1,6 +1,6 @@ include plain_scaling; -// After an transformation, produce new coordinate bounds. For paths that +// After a transformation, produce new coordinate bounds. For paths that // have been added, this is only an approximation since it takes the bounds of // their transformed bounding box. private void addTransformedCoords(coords2 dest, transform t, @@ -466,8 +466,9 @@ private struct freezableBounds { acc.pushUserCoords(min, max); if (pathBounds.length > 0) acc.push(min(pathBounds), max(pathBounds)); - for (var pp : pathpenBounds) - acc.push(min(pp.g), max(pp.g)); + for (var pp : pathpenBounds) + if(size(pp.g) > 0) + acc.push(min(pp.g), max(pp.g)); for (var link : links) link.accumulateUserBounds(acc); diff --git a/Master/texmf-dist/asymptote/plain_paths.asy b/Master/texmf-dist/asymptote/plain_paths.asy index c768922ffd1..dad0d13be8e 100644 --- a/Master/texmf-dist/asymptote/plain_paths.asy +++ b/Master/texmf-dist/asymptote/plain_paths.asy @@ -115,26 +115,6 @@ void write(string s="", explicit guide[] x, suffix suffix=endl) write(stdout,s,x,suffix); } -private string nopoints="nullpath has no points"; - -pair min(explicit path[] p) -{ - if(p.length == 0) abort(nopoints); - pair minp=min(p[0]); - for(int i=1; i < p.length; ++i) - minp=minbound(minp,min(p[i])); - return minp; -} - -pair max(explicit path[] p) -{ - if(p.length == 0) abort(nopoints); - pair maxp=max(p[0]); - for(int i=1; i < p.length; ++i) - maxp=maxbound(maxp,max(p[i])); - return maxp; -} - interpolate operator ..(tensionSpecifier t) { return new guide(... guide[] a) { diff --git a/Master/texmf-dist/asymptote/plain_prethree.asy b/Master/texmf-dist/asymptote/plain_prethree.asy index 595bac2fad4..cfc0c3c7411 100644 --- a/Master/texmf-dist/asymptote/plain_prethree.asy +++ b/Master/texmf-dist/asymptote/plain_prethree.asy @@ -1,5 +1,7 @@ // Critical definitions for transform3 needed by projection and picture. +pair viewportmargin=(0.1,0.1); // Horizontal and vertical 3D viewport margins. + typedef real[][] transform3; restricted transform3 identity4=identity(4); diff --git a/Master/texmf-dist/asymptote/plain_shipout.asy b/Master/texmf-dist/asymptote/plain_shipout.asy index ccf94e6c9fd..9b30e6e1947 100644 --- a/Master/texmf-dist/asymptote/plain_shipout.asy +++ b/Master/texmf-dist/asymptote/plain_shipout.asy @@ -27,8 +27,8 @@ orientation orientation=Portrait; // Forward references to functions defined in module three. object embed3(string, frame, string, string, string, light, projection); -string Embed(string name, string options="", real width=0, real height=0); -string Link(string label, string text, string options=""); +string Embed(string name, string text="", string options="", real width=0, + real height=0); bool prc0(string format="") { diff --git a/Master/texmf-dist/asymptote/plain_strings.asy b/Master/texmf-dist/asymptote/plain_strings.asy index a466159d9c7..f4c856e8ad9 100644 --- a/Master/texmf-dist/asymptote/plain_strings.asy +++ b/Master/texmf-dist/asymptote/plain_strings.asy @@ -84,7 +84,8 @@ string verbatim(string s) } // Split a string into an array of substrings delimited by delimiter -// If delimiter is an empty string, use space delimiter, discarding duplicates. +// If delimiter is an empty string, use space delimiter but discard empty +// substrings. string[] split(string s, string delimiter="") { bool prune=false; @@ -99,11 +100,9 @@ string[] split(string s, string delimiter="") int N=length(delimiter); int n=length(s); while((i=find(s,delimiter,last)) >= 0) { - if(i >= last) + if(i > last || (i == last && !prune)) S.push(substr(s,last,i-last)); last=i+N; - if(prune) - while(substr(s,last,1) == " ") ++last; } if(n > last || (n == last && !prune)) S.push(substr(s,last,n-last)); @@ -143,7 +142,7 @@ string italic(string s) string baseline(string s, string template="\strut") { - return s != "" ? "\vphantom{"+template+"}"+s : s; + return s != "" && settings.tex != "none" ? "\vphantom{"+template+"}"+s : s; } string math(string s) @@ -221,7 +220,7 @@ string format(real x, string locale="") string phantom(string s) { - return "\phantom{"+s+"}"; + return settings.tex != "none" ? "\phantom{"+s+"}" : ""; } restricted int ocgindex=0; diff --git a/Master/texmf-dist/asymptote/solids.asy b/Master/texmf-dist/asymptote/solids.asy index e6613fc29c5..09bccd32aa9 100644 --- a/Master/texmf-dist/asymptote/solids.asy +++ b/Master/texmf-dist/asymptote/solids.asy @@ -351,7 +351,9 @@ void draw(picture pic=currentpicture, revolution r, int m=0, int n=nslice, } } - begingroup3(pic,name == "" ? "skeleton" : name,render); + bool group=name != "" || render.defaultnames; + if(group) + begingroup3(pic,name == "" ? "skeleton" : name,render); pic.add(new void(frame f, transform3 t, picture pic, projection P) { drawskeleton(f,t,P); if(pic != null) @@ -360,7 +362,8 @@ void draw(picture pic=currentpicture, revolution r, int m=0, int n=nslice, frame f; drawskeleton(f,identity4,P); pic.addBox(min3(f),max3(f)); - endgroup3(pic); + if(group) + endgroup3(pic); } else { skeleton s=r.skeleton(m,n,P); if(frontpen != nullpen) { diff --git a/Master/texmf-dist/asymptote/three.asy b/Master/texmf-dist/asymptote/three.asy index 5d7ae1a8ba5..ceb8cf89574 100644 --- a/Master/texmf-dist/asymptote/three.asy +++ b/Master/texmf-dist/asymptote/three.asy @@ -6,8 +6,7 @@ if(prc0()) { if(settings.tex == "context") settings.prc=false; else { access embed; - Embed=embed.embed; - Link=embed.link; + Embed=embed.embedplayer; } } @@ -40,6 +39,9 @@ struct render real tubegranularity; // granularity for rendering tubes bool labelfill; // fill subdivision cracks in unlighted labels + bool partnames; // assign part name indices to compound objects + bool defaultnames; // assign default names to unnamed objects + static render defaultrender; void operator init(real compression=defaultrender.compression, @@ -50,7 +52,9 @@ struct render int sphere=defaultrender.sphere, real margin=defaultrender.margin, real tubegranularity=defaultrender.tubegranularity, - bool labelfill=defaultrender.labelfill) + bool labelfill=defaultrender.labelfill, + bool partnames=defaultrender.partnames, + bool defaultnames=defaultrender.defaultnames) { this.compression=compression; this.granularity=granularity; @@ -61,6 +65,8 @@ struct render this.margin=margin; this.tubegranularity=tubegranularity; this.labelfill=labelfill; + this.partnames=partnames; + this.defaultnames=defaultnames; } } @@ -76,19 +82,21 @@ defaultrender.margin=0.02; defaultrender.tubegranularity=0.005; defaultrender.sphere=NURBSsphere; defaultrender.labelfill=true; +defaultrender.partnames=false; +defaultrender.defaultnames=true; real defaultshininess=0.25; real angleprecision=1e-5; // Precision for centering perspective projections. int maxangleiterations=25; -string defaultembed3Doptions; +string defaultembed3Doptions="3Dmenu"; string defaultembed3Dscript; real defaulteyetoview=63mm/1000mm; -string partname(int i=0) +string partname(int i, render render=defaultrender) { - return string(i+1); + return render.partnames ? string(i+1) : ""; } triple O=(0,0,0); @@ -2027,7 +2035,7 @@ path3 arc(triple c, triple v1, triple v2, triple normal=O, bool direction=CCW) real t2=t2[0]; int n=length(unitcircle3); if(direction) { - if (t1 >= t2) t1 -= n; + if(t1 >= t2) t1 -= n; } else if(t2 >= t1) t2 -= n; path3 p=subpath(unitcircle3,t1,t2); @@ -2223,7 +2231,7 @@ draw=new void(frame f, path3 g, material p=currentpen, transform3 tL=shift(gL)*align(dirL); transform3 tc0=shift(c0)*align(-dirc0); transform3 tcL=shift(cL)*align(dircL); - if(linecap == 0 || linecap == 2){ + if(linecap == 0 || linecap == 2) { transform3 scale2r=scale(r,r,1); T.s.append(t0*scale2r*unitdisk); disk(tc0*scale2r); @@ -2251,7 +2259,8 @@ draw=new void(frame f, path3 g, material p=currentpen, } else _draw(f,g,q); } else _draw(f,g,q); } - if(q != nullpen) + bool group=q != nullpen && (name != "" || render.defaultnames); + if(group) begingroup3(f,name == "" ? "curve" : name,render); if(linetype(q).length == 0) drawthick(g); else { @@ -2273,7 +2282,7 @@ draw=new void(frame f, path3 g, material p=currentpen, } } } - if(q != nullpen) + if(group) endgroup3(f); } else draw(f,project(g,P),q); }; @@ -2282,11 +2291,12 @@ void draw(frame f, explicit path3[] g, material p=currentpen, light light=nolight, string name="", render render=defaultrender, projection P=currentprojection) { - if(g.length > 1) - begingroup3(f,name == "" ? "curve" : name,render); + bool group=g.length > 1 && (name != "" || render.defaultnames); + if(group) + begingroup3(f,name == "" ? "curves" : name,render); for(int i=0; i < g.length; ++i) - draw(f,g[i],p,light,partname(i),render,P); - if(g.length > 1) + draw(f,g[i],p,light,partname(i,render),render,P); + if(group) endgroup3(f); } @@ -2294,12 +2304,13 @@ void draw(picture pic=currentpicture, explicit path3[] g, material p=currentpen, margin3 margin=NoMargin3, light light=nolight, string name="", render render=defaultrender) { - if(g.length > 1) + bool group=g.length > 1 && (name != "" || render.defaultnames); + if(group) begingroup3(pic,name == "" ? "curves" : name,render); for(int i=0; i < g.length; ++i) - draw(pic,g[i],p,margin,light,partname(i),render); - if(g.length > 1) - endgroup3(pic); + draw(pic,g[i],p,margin,light,partname(i,render),render); + if(group) + endgroup3(pic); } include three_arrows; @@ -2444,12 +2455,6 @@ void add(picture dest=currentpicture, object src, pair position=0, pair align=0, plain.add(dest,src,position,align,group,filltype,above); } -string cameralink(string label, string text="View Parameters") -{ - if(!prc() || Link == null) return ""; - return Link(label,text,"3Dgetview"); -} - private struct viewpoint { triple target,camera,up; real angle; @@ -2498,13 +2503,35 @@ projection perspective(string s) return P; } +projection absorthographic(triple camera=Z, triple target=O, real roll=0) +{ + triple u=unit(target-camera); + triple w=unit(Z-u.z*u); + triple up=rotate(roll,O,u)*w; + projection P= + projection(camera,up,target,1,0,false,false, + new transformation(triple camera, triple up, triple target) + {return transformation(look(camera,up,target));}); + P.absolute=true; + return P; +} + +projection absperspective(triple camera=Z, triple target=O, real roll=0, + real angle=30) +{ + triple u=unit(target-camera); + triple w=unit(Z-u.z*u); + triple up=rotate(roll,O,u)*w; + projection P=perspective(camera,up,target); + P.angle=angle; + P.absolute=true; + return P; +} + private string Format(real x) { - // Work around movie15.sty division by zero bug; - // e.g. u=unit((1e-10,1e-10,0.9)); - if(abs(x) < 1e-9) x=0; assert(abs(x) < 1e17,"Number too large: "+string(x)); - return format("%.18f",x,"C"); + return format("%.9f",x,"C"); } private string Format(triple v, string sep=" ") @@ -2522,116 +2549,13 @@ private string format(triple v, string sep=" ") return string(v.x)+sep+string(v.y)+sep+string(v.z); } -private string projection(bool infinity, real viewplanesize) -{ - return "activeCamera=scene.cameras.getByIndex(0); -function asyProjection() {"+ - (infinity ? "activeCamera.projectionType=activeCamera.TYPE_ORTHOGRAPHIC;" : - "activeCamera.projectionType=activeCamera.TYPE_PERSPECTIVE;")+" -activeCamera.viewPlaneSize="+string(viewplanesize)+"; -activeCamera.binding=activeCamera.BINDING_"+(infinity ? "MAX" : "VERTICAL")+"; -} - -asyProjection(); - -handler=new CameraEventHandler(); -runtime.addEventHandler(handler); -handler.onEvent=function(event) -{ - asyProjection(); - scene.update(); -}"; -} - -private string projection(bool infinity, real viewplanesize) +private string Format(transform3 t, string sep=" ") { - return "activeCamera=scene.cameras.getByIndex(0); -function asyProjection() {"+ - (infinity ? "activeCamera.projectionType=activeCamera.TYPE_ORTHOGRAPHIC;" : - "activeCamera.projectionType=activeCamera.TYPE_PERSPECTIVE;")+" -activeCamera.viewPlaneSize="+string(viewplanesize)+"; -activeCamera.binding=activeCamera.BINDING_"+(infinity ? "MAX" : "VERTICAL")+"; -} - -asyProjection(); - -handler=new CameraEventHandler(); -runtime.addEventHandler(handler); -handler.onEvent=function(event) -{ - asyProjection(); - scene.update(); -}"; -} - -private string billboard(int[] index, triple[] center) -{ - if(index.length == 0) return ""; - string s=" -var zero=new Vector3(0,0,0); -var nodes=scene.nodes; -var count=nodes.count; - -var index=new Array(); -for(i=0; i < count; i++) { - var node=nodes.getByIndex(i); - var name=node.name; - end=name.lastIndexOf(\".\")-1; - if(end > 0) { - if(name.substr(end,1) == \"\001\") { - start=name.lastIndexOf(\"-\")+1; - n=end-start; - if(n > 0) { - index[name.substr(start,n)]=i; - node.name=name.substr(0,start-1); - } - } - } -} - -var center=new Array( -"; - for(int i=0; i < center.length; ++i) - s += "Vector3("+format(center[i],",")+"), -"; - s += "); - -billboardHandler=new RenderEventHandler(); -billboardHandler.onEvent=function(event) -{ - var camera=scene.cameras.getByIndex(0); - var position=camera.position; - var direction=position.subtract(camera.targetPosition); - var up=camera.up.subtract(position); - - function f(i,k) { - j=index[i]; - if(j >= 0) { - var node=nodes.getByIndex(j); - var name=node.name; - var R=Matrix4x4(); - R.setView(zero,direction,up); - var c=center[k]; - var T=node.transform; - T.setIdentity(); - T.translateInPlace(c.scale(-1)); - T.multiplyInPlace(R); - T.translateInPlace(c); - } - } -"; - for(int i=0; i < index.length; ++i) - s += "f("+string(i)+","+string(index[i])+"); -"; - s += " - runtime.refresh(); -} - -runtime.addEventHandler(billboardHandler); - -runtime.refresh(); -"; - return s; + return + Format(t[0][0])+sep+Format(t[1][0])+sep+Format(t[2][0])+sep+ + Format(t[0][1])+sep+Format(t[1][1])+sep+Format(t[2][1])+sep+ + Format(t[0][2])+sep+Format(t[1][2])+sep+Format(t[2][2])+sep+ + Format(t[0][3])+sep+Format(t[1][3])+sep+Format(t[2][3]); } string lightscript(light light) { @@ -2675,11 +2599,12 @@ pair viewportmargin(pair lambda) return maxbound(0.5*(viewportsize-lambda),viewportmargin); } -string embed3D(string label="", string text=label, string prefix, +string embed3D(string prefix, string label=prefix, string text=label, frame f, string format="", real width=0, real height=0, string options="", string script="", - light light=currentlight, projection P=currentprojection) + light light=currentlight, projection P=currentprojection, + real viewplanesize=0) { if(!prc(format) || Embed == null) return ""; @@ -2688,63 +2613,53 @@ string embed3D(string label="", string text=label, string prefix, if(script == "") script=defaultembed3Dscript; - // Adobe Reader doesn't appear to support user-specified viewport lights. - string lightscript=light.on() && light.viewport ? "" : lightscript(light); - - real viewplanesize; if(P.infinity) { - triple lambda=max3(f)-min3(f); - pair margin=viewportmargin((lambda.x,lambda.y)); - viewplanesize=(max(lambda.x+2*margin.x,lambda.y+2*margin.y))/P.zoom; + if(viewplanesize==0) { + triple lambda=max3(f)-min3(f); + pair margin=viewportmargin((lambda.x,lambda.y)); + viewplanesize=(max(lambda.x+2*margin.x,lambda.y+2*margin.y))/P.zoom; + } } else if(!P.absolute) P.angle=2*aTan(Tan(0.5*P.angle)); - int[] index; - triple[] center; - shipout3(prefix,f,index,center); + shipout3(prefix,f); string name=prefix+".js"; - writeJavaScript(name,lightscript+projection(P.infinity,viewplanesize)+ - billboard(index,center),script); + // Adobe Reader doesn't appear to support user-specified viewport lights. + bool lightscript=light.on() && !light.viewport; + if(lightscript) + writeJavaScript(name,lightscript(light),script); if(!settings.inlinetex) file3.push(prefix+".prc"); - triple target=P.target; - if(P.viewportshift != 0) { - triple lambda=max3(f)-min3(f); - target -= (P.viewportshift.x*lambda.x/P.zoom, - P.viewportshift.y*lambda.y/P.zoom,0); - } + static transform3 flipxz=xscale3(-1)*zscale3(-1); + transform3 inv=inverse(flipxz*P.T.modelview); - triple v=P.vector(); - triple u=unit(v); - triple w=Z-u.z*u; - real roll; - if(abs(w) > sqrtEpsilon) { - w=unit(w); - triple up=unit(perp(P.up,u)); - roll=degrees(acos1(dot(up,w)))*sgn(dot(cross(up,w),u)); - } else roll=0; - - string options3=light.viewport ? "3Dlights=Headlamp" : "3Dlights=File"; + string options3="3Dlights="+ + (light.on() ? (light.viewport ? "Headlamp" : "File") : "None"); if(defaultembed3Doptions != "") options3 += ","+defaultembed3Doptions; + if((settings.render < 0 || !settings.embed) && settings.auto3D) - options3 += ",poster"; - options3 += ",text={"+text+"},label="+label+ - ",toolbar="+(settings.toolbar ? "true" : "false")+ - ",3Daac="+Format(P.angle)+ - ",3Dc2c="+Format(u)+ - ",3Dcoo="+Format(target)+ - ",3Droll="+Format(roll)+ - ",3Droo="+Format(abs(v))+ + options3 += ",activate=pagevisible"; + options3 += ",3Dtoolbar="+(settings.toolbar ? "true" : "false")+ + ",label="+label+ + (P.infinity ? ",3Dortho="+Format(1/viewplanesize) : + ",3Daac="+Format(P.angle))+ + ",3Dc2w="+Format(inv)+ + ",3Droo="+Format(abs(P.vector()))+ + ",3Dpsob="+(P.infinity ? "Max" : "H")+ ",3Dbg="+Format(light.background()); if(options != "") options3 += ","+options; if(settings.inlinetex) prefix=jobname(prefix); - options3 += ",3Djscript="+prefix+".js"; + if(lightscript) + options3 += ",add3Djscript="+prefix+".js"; + options3 += ",add3Djscript=asylabels.js"; - return Embed(prefix+".prc",options3,width,height); + return text == "" ? Embed(prefix+".prc","",options3,width,height) : + "\hbox to 0pt{"+text+"\hss}"+Embed(prefix+".prc","\phantom{"+text+"}", + options3); } struct scene @@ -2895,9 +2810,9 @@ struct scene } } -object embed(string label="", string text=label, string prefix=defaultfilename, - scene S, string format="", bool view=true, string options="", - string script="", light light=currentlight) +object embed(string prefix=outprefix(), string label=prefix, + string text=label, scene S, string format="", bool view=true, + string options="", string script="", light light=currentlight) { object F; transform3 modelview; @@ -2905,15 +2820,17 @@ object embed(string label="", string text=label, string prefix=defaultfilename, transform3 tinv=inverse(S.t); projection Q; + triple orthoshift; modelview=P.T.modelview; + transform3 inv; if(P.absolute) { Q=modelview*P; + inv=inverse(modelview); } else { triple target=P.target; S.f=modelview*S.f; P=modelview*P; Q=P.copy(); - light=modelview*light; if(P.infinity) { triple m=min3(S.f); @@ -2922,7 +2839,9 @@ object embed(string label="", string text=label, string prefix=defaultfilename, S.viewportmargin=viewportmargin((lambda.x,lambda.y)); S.width=ceil(lambda.x+2*S.viewportmargin.x); S.height=ceil(lambda.y+2*S.viewportmargin.y); - S.f=shift((-0.5(m.x+M.x),-0.5*(m.y+M.y),0))*S.f; // Eye will be at (0,0,0) + orthoshift=(-0.5(m.x+M.x),-0.5*(m.y+M.y),0); + S.f=shift(orthoshift)*S.f; // Eye will be at (0,0,0) + inv=inverse(modelview); } else { if(P.angle == 0) { P.angle=S.angle(P); @@ -2930,9 +2849,9 @@ object embed(string label="", string text=label, string prefix=defaultfilename, if(S.viewportmargin.y != 0) P.angle=2*aTan(Tan(0.5*P.angle)-S.viewportmargin.y/P.target.z); } + inv=inverse(modelview); Q.angle=P.angle; if(settings.verbose > 0) { - transform3 inv=inverse(modelview); if(S.adjusted) write("adjusting camera to ",tinv*inv*P.camera); target=inv*P.target; @@ -2944,12 +2863,13 @@ object embed(string label="", string text=label, string prefix=defaultfilename, write("adjusting target to ",tinv*target); } } - + light Light=modelview*light; + if(prefix == "") prefix=outprefix(); bool prc=prc(format); bool preview=settings.render > 0; if(prc) { - // The movie15.sty package cannot handle spaces or dots in filenames. + // The media9.sty package cannot handle spaces or dots in filenames. string dir=stripfile(prefix); prefix=dir+replace(stripdirectory(prefix), new string[][]{{" ","_"},{".","_"}}); @@ -2987,10 +2907,9 @@ object embed(string label="", string text=label, string prefix=defaultfilename, S.width-defaultrender.margin,S.height-defaultrender.margin, P.infinity ? 0 : 2aTan(Tan(0.5*P.angle)*P.zoom), P.zoom,m,M,P.viewportshift, - tinv*inverse(modelview)*shift(0,0,zcenter),light.background(), - P.absolute ? (modelview*light).position : light.position, - light.diffuse,light.ambient,light.specular, - light.viewport,view && !preview); + tinv*inv*shift(0,0,zcenter),Light.background(),Light.position, + Light.diffuse,Light.ambient,Light.specular, + Light.viewport,view && !preview); if(!preview) return F; } @@ -3008,19 +2927,48 @@ object embed(string label="", string text=label, string prefix=defaultfilename, image=graphic(image,"hiresbb"); } if(prc) { - if(!P.infinity && P.viewportshift != 0) + if(P.viewportshift != 0) { + if(!P.infinity) warning("offaxis", "PRC does not support off-axis projections; use pan instead of shift"); - F.L=embed3D(label,text=image,prefix,S.f,format, - S.width-2,S.height-2,options,script,light,Q); + + triple lambda=max3(S.f)-min3(S.f); + Q.target -= (P.viewportshift.x*lambda.x/P.zoom, + P.viewportshift.y*lambda.y/P.zoom,0); + } + + real viewplanesize=0; + if(P.absolute) { + if(P.infinity) { + S.f=modelview*S.f; + triple lambda=max3(S.f)-min3(S.f); + pair margin=viewportmargin((lambda.x,lambda.y)); + viewplanesize=(max(lambda.x+2*margin.x,lambda.y+2*margin.y))/Q.zoom; + S.f=inv*S.f; + } + Q=inv*Q; + } else { + if(P.infinity) { + triple lambda=max3(S.f)-min3(S.f); + pair margin=viewportmargin((lambda.x,lambda.y)); + viewplanesize=(max(lambda.x+2*margin.x,lambda.y+2*margin.y))/(Q.zoom); + transform3 t=inv*shift(-orthoshift); + Q=t*Q; + S.f=t*S.f; + } else { + Q=inv*Q; + S.f=inv*S.f; + } + } + F.L=embed3D(prefix,label,text=image,S.f,format, + S.width-2,S.height-2,options,script,light,Q,viewplanesize); } return F; } -object embed(string label="", string text=label, - string prefix=defaultfilename, - picture pic, string format="", +object embed(string prefix=outprefix(), string label=prefix, + string text=label, picture pic, string format="", real xsize=pic.xsize, real ysize=pic.ysize, bool keepAspect=pic.keepAspect, bool view=true, string options="", string script="", light light=currentlight, @@ -3029,7 +2977,7 @@ object embed(string label="", string text=label, bool is3D=is3D(format); scene S=scene(pic,xsize,ysize,keepAspect,is3D,P); if(is3D) - return embed(label,text,prefix,S,format,view,options,script,light); + return embed(prefix,label,text,S,format,view,options,script,light); else { object F; transform T=S.pic2.scaling(xsize,ysize,keepAspect); @@ -3039,8 +2987,8 @@ object embed(string label="", string text=label, } } -object embed(string label="", string text=label, - string prefix=defaultfilename, +object embed(string prefix=outprefix(), string label=prefix, + string text=label, frame f, string format="", real width=0, real height=0, bool view=true, string options="", string script="", light light=currentlight, projection P=currentprojection) diff --git a/Master/texmf-dist/asymptote/three_arrows.asy b/Master/texmf-dist/asymptote/three_arrows.asy index 8346a5bc6c1..5b9bd45d56f 100644 --- a/Master/texmf-dist/asymptote/three_arrows.asy +++ b/Master/texmf-dist/asymptote/three_arrows.asy @@ -118,7 +118,8 @@ struct arrowhead3 static path[] align(path H, path h) { static real fuzz=1000*realEpsilon; real[][] t=intersections(H,h,fuzz*max(abs(max(h)),abs(min(h)))); - return rotate(-degrees(point(H,t[0][0])-point(H,t[1][0]),warn=false))*H; + return t.length >= 2 ? + rotate(-degrees(point(H,t[0][0])-point(H,t[1][0]),warn=false))*H : H; } } @@ -248,8 +249,8 @@ real[] arrowbasepoints(path3 base, path3 left, path3 right) { real[][] Tl=transpose(intersections(left,base)); real[][] Tr=transpose(intersections(right,base)); - return new real[] {Tl.length > 0 ? Tl[0][0] : 1, - Tr.length > 0 ? Tr[0][0] : 1}; + return new real[] {Tl.length > 0 ? Tl[0][0] : 0, + Tr.length > 0 ? Tr[0][0] : 0}; } path3 arrowbase(path3 r, triple y, real t, real size) diff --git a/Master/texmf-dist/asymptote/three_light.asy b/Master/texmf-dist/asymptote/three_light.asy index eb85ed0c3e5..73f68b62a86 100644 --- a/Master/texmf-dist/asymptote/three_light.asy +++ b/Master/texmf-dist/asymptote/three_light.asy @@ -26,6 +26,11 @@ struct material { void specular(pen q) {p[3]=q;} } +material operator init() +{ + return material(); +} + void write(file file, string s="", material x, suffix suffix=none) { write(file,s); diff --git a/Master/texmf-dist/asymptote/three_surface.asy b/Master/texmf-dist/asymptote/three_surface.asy index 7d356e45e22..0ef497f6d56 100644 --- a/Master/texmf-dist/asymptote/three_surface.asy +++ b/Master/texmf-dist/asymptote/three_surface.asy @@ -689,7 +689,7 @@ struct surface { return ucyclic() ? g&cycle : g; } - // A constructor for a possibly nonconvex cyclic path in a given plane. + // A constructor for a possibly nonconvex simple cyclic path in a given plane. void operator init(path p, triple plane(pair)=XYplane) { bool straight=piecewisestraight(p); for(path g : regularize(p)) @@ -947,54 +947,54 @@ private triple[] split(triple z0, triple c0, triple c1, triple z1, real t=0.5) // produced by a horizontal split of P triple[][][] hsplit(triple[][] P) { - // get control points in rows - triple[] P0=P[0]; - triple[] P1=P[1]; - triple[] P2=P[2]; - triple[] P3=P[3]; - - triple[] c0=split(P0[0],P0[1],P0[2],P0[3]); - triple[] c1=split(P1[0],P1[1],P1[2],P1[3]); - triple[] c2=split(P2[0],P2[1],P2[2],P2[3]); - triple[] c3=split(P3[0],P3[1],P3[2],P3[3]); - // bottom, top - return new triple[][][] { + // get control points in rows + triple[] P0=P[0]; + triple[] P1=P[1]; + triple[] P2=P[2]; + triple[] P3=P[3]; + + triple[] c0=split(P0[0],P0[1],P0[2],P0[3]); + triple[] c1=split(P1[0],P1[1],P1[2],P1[3]); + triple[] c2=split(P2[0],P2[1],P2[2],P2[3]); + triple[] c3=split(P3[0],P3[1],P3[2],P3[3]); + // bottom, top + return new triple[][][] { {{P0[0],c0[0],c0[1],c0[2]}, {P1[0],c1[0],c1[1],c1[2]}, {P2[0],c2[0],c2[1],c2[2]}, {P3[0],c3[0],c3[1],c3[2]}}, - {{c0[2],c0[3],c0[4],P0[3]}, - {c1[2],c1[3],c1[4],P1[3]}, - {c2[2],c2[3],c2[4],P2[3]}, - {c3[2],c3[3],c3[4],P3[3]}} - }; + {{c0[2],c0[3],c0[4],P0[3]}, + {c1[2],c1[3],c1[4],P1[3]}, + {c2[2],c2[3],c2[4],P2[3]}, + {c3[2],c3[3],c3[4],P3[3]}} + }; } // Return the control points of the subpatches // produced by a vertical split of P triple[][][] vsplit(triple[][] P) { - // get control points in rows - triple[] P0=P[0]; - triple[] P1=P[1]; - triple[] P2=P[2]; - triple[] P3=P[3]; - - triple[] c0=split(P0[0],P1[0],P2[0],P3[0]); - triple[] c1=split(P0[1],P1[1],P2[1],P3[1]); - triple[] c2=split(P0[2],P1[2],P2[2],P3[2]); - triple[] c3=split(P0[3],P1[3],P2[3],P3[3]); - // left, right - return new triple[][][] { - {{P0[0],P0[1],P0[2],P0[3]}, - {c0[0],c1[0],c2[0],c3[0]}, - {c0[1],c1[1],c2[1],c3[1]}, - {c0[2],c1[2],c2[2],c3[2]}}, - {{c0[2],c1[2],c2[2],c3[2]}, - {c0[3],c1[3],c2[3],c3[3]}, - {c0[4],c1[4],c2[4],c3[4]}, - {P3[0],P3[1],P3[2],P3[3]}} - }; + // get control points in rows + triple[] P0=P[0]; + triple[] P1=P[1]; + triple[] P2=P[2]; + triple[] P3=P[3]; + + triple[] c0=split(P0[0],P1[0],P2[0],P3[0]); + triple[] c1=split(P0[1],P1[1],P2[1],P3[1]); + triple[] c2=split(P0[2],P1[2],P2[2],P3[2]); + triple[] c3=split(P0[3],P1[3],P2[3],P3[3]); + // left, right + return new triple[][][] { + {{P0[0],P0[1],P0[2],P0[3]}, + {c0[0],c1[0],c2[0],c3[0]}, + {c0[1],c1[1],c2[1],c3[1]}, + {c0[2],c1[2],c2[2],c3[2]}}, + {{c0[2],c1[2],c2[2],c3[2]}, + {c0[3],c1[3],c2[3],c3[3]}, + {c0[4],c1[4],c2[4],c3[4]}, + {P3[0],P3[1],P3[2],P3[3]}} + }; } // Return a 2D array of the control point arrays of the subpatches @@ -1023,7 +1023,7 @@ triple[][][][] split(triple[][] P, real u=1/2, real v=1/2) triple[] c9=split(c0[4],c1[4],c2[4],c3[4],u); triple[] cA=split(P0[3],P1[3],P2[3],P3[3],u); -// {{bottom-left, top-left}, {bottom-right, top-right}} + // {{bottom-left, top-left}, {bottom-right, top-right}} return new triple[][][][] { {{{P0[0],c0[0],c0[1],c0[2]}, {c4[0],c5[0],c6[0],c7[0]}, @@ -1206,7 +1206,7 @@ interaction LabelInteraction() return settings.autobillboard ? Billboard : Embedded; } -private material material(material m, light light) +material material(material m, light light) { return light.on() || invisible((pen) m) ? m : emissive(m); } @@ -1223,8 +1223,96 @@ void draw3D(frame f, int type=0, patch s, triple center=O, material m, PRCshininess=PRCshininess(m.shininess); draw(f,s.P,center,s.straight,m.p,m.opacity,m.shininess,PRCshininess, - s.planar ? s.normal(0.5,0.5) : O,s.colors, - light.on(),interaction.type,prc); + s.planar ? s.normal(0.5,0.5) : O,s.colors,interaction.type,prc); +} + +// Draw triangles on a frame. +void draw(frame f, triple[] v, int[][] vi, + triple[] n={}, int[][] ni={}, material m=currentpen, pen[] p={}, + int[][] pi={}, light light=currentlight) +{ + if(p.length > 0) + m=mean(p); + m=material(m,light); + real PRCshininess; + if(prc()) + PRCshininess=PRCshininess(m.shininess); + draw(f,v,vi,n,ni,m.p,m.opacity,m.shininess,PRCshininess,p,pi); +} + +// Draw triangles on a picture. +void draw(picture pic=currentpicture, triple[] v, int[][] vi, + triple[] n={}, int[][] ni={}, material m=currentpen, pen[] p={}, + int[][] pi={}, light light=currentlight) +{ + bool colors=pi.length > 0; + bool normals=ni.length > 0; + if(!colors && !normals) { + n=new triple[]; + ni=new int[vi.length][3]; + triple lastnormal=O; + for(int i=0; i < vi.length; ++i) { + int[] vii=vi[i]; + int[] nii=ni[i]; + triple normal=normal(new triple[] {v[vii[0]],v[vii[1]],v[vii[2]]}); + if(normal != lastnormal || n.length == 0) { + n.push(normal); + lastnormal=normal; + } + nii[0]=nii[1]=nii[2]=n.length-1; + } + } + + pic.add(new void(frame f, transform3 t, picture pic, projection P) { + triple[] v=t*v; + triple[] n=t*n; + + if(is3D()) { + draw(f,v,vi,n,ni,m,p,pi,light); + if(pic != null) { + for(int[] vii : vi) + for(int viij : vii) + pic.addPoint(project(v[viij],P)); + } + } else if(pic != null) { + static int[] edges={0,0,1}; + if(colors) { + for(int i=0; i < vi.length; ++i) { + int[] vii=vi[i]; + int[] pii=pi[i]; + gouraudshade(pic,project(v[vii[0]],P)--project(v[vii[1]],P)-- + project(v[vii[2]],P)--cycle, + new pen[] {p[pii[0]],p[pii[1]],p[pii[2]]},edges); + } + } else { + if(normals) { + for(int i=0; i < vi.length; ++i) { + int[] vii=vi[i]; + int[] nii=ni[i]; + gouraudshade(pic,project(v[vii[0]],P)--project(v[vii[1]],P)-- + project(v[vii[2]],P)--cycle, + new pen[] {color(n[nii[0]],m,light), + color(n[nii[1]],m,light), + color(n[nii[2]],m,light)},edges); + } + } else { + for(int i=0; i < vi.length; ++i) { + int[] vii=vi[i]; + path g=project(v[vii[0]],P)--project(v[vii[1]],P)-- + project(v[vii[2]],P)--cycle; + pen p=color(n[ni[i][0]],m,light); + fill(pic,g,p); + if(opacity(m.diffuse()) == 1) // Fill subdivision cracks + draw(pic,g,p); + } + } + } + } + },true); + + for(int[] vii : vi) + for(int viij : vii) + pic.addPoint(v[viij]); } void drawPRCsphere(frame f, transform3 t=identity4, bool half=false, material m, @@ -1273,25 +1361,30 @@ void draw(transform t=identity(), frame f, surface s, int nu=1, int nv=1, { bool is3D=is3D(); if(is3D) { - begingroup3(f,name == "" ? "surface" : name,render); + bool group=name != "" || render.defaultnames; + if(group) + begingroup3(f,name == "" ? "surface" : name,render); for(int i=0; i < s.s.length; ++i) draw3D(f,s.s[i],surfacepen[i],light); - endgroup3(f); + if(group) + endgroup3(f); pen modifiers=thin()+squarecap; for(int k=0; k < s.s.length; ++k) { pen meshpen=meshpen[k]; if(!invisible(meshpen)) { - begingroup3(f,meshname(name),render); + if(group) + begingroup3(f,meshname(name),render); meshpen=modifiers+meshpen; real step=nu == 0 ? 0 : 1/nu; for(int i=0; i <= nu; ++i) - draw(f,s.s[k].uequals(i*step),meshpen,meshlight,partname(i), + draw(f,s.s[k].uequals(i*step),meshpen,meshlight,partname(i,render), render); step=nv == 0 ? 0 : 1/nv; for(int j=0; j <= nv; ++j) - draw(f,s.s[k].vequals(j*step),meshpen,meshlight,partname(j), + draw(f,s.s[k].vequals(j*step),meshpen,meshlight,partname(j,render), render); - endgroup3(f); + if(group) + endgroup3(f); } } } @@ -1473,6 +1566,46 @@ private path[] path(Label L, pair z=0, projection P) shift(z)*g; } +transform3 alignshift(path3[] g, transform3 t=identity4, triple position, + triple align) +{ + if(determinant(t) == 0) return identity4; + triple m=min(g); + triple dir=rectify(inverse(t)*-align); + triple a=m+realmult(dir,max(g)-m); + return shift(-a); +} + +transform3 alignshift(surface s, transform3 t=identity4, triple position, + triple align) +{ + if(determinant(t) == 0) return identity4; + triple m=min(s); + triple dir=rectify(inverse(t)*-align); + triple a=m+realmult(dir,max(s)-m); + return shift(-a); +} + +transform3 aligntransform(path3[] g, transform3 t=identity4, triple position, + triple align, pen p=currentpen) +{ + if(determinant(t) == 0) return identity4; + triple m=min(g); + triple dir=rectify(inverse(t)*-align); + triple a=m+realmult(dir,max(g)-m); + return shift(position+align*labelmargin(p))*t*shift(-a); +} + +transform3 aligntransform(surface s, transform3 t=identity4, triple position, + triple align, pen p=currentpen) +{ + if(determinant(t) == 0) return identity4; + triple m=min(s); + triple dir=rectify(inverse(t)*-align); + triple a=m+realmult(dir,max(s)-m); + return shift(position+align*labelmargin(p))*t*shift(-a); +} + void label(frame f, Label L, triple position, align align=NoAlign, pen p=currentpen, light light=nolight, string name="", render render=defaultrender, @@ -1484,16 +1617,55 @@ void label(frame f, Label L, triple position, align align=NoAlign, L.p(p); if(interaction.targetsize && settings.render != 0) L.T=L.T*scale(abs(P.camera-position)/abs(P.vector())); + transform3 T=transform3(P); if(L.defaulttransform3) - L.T3=transform3(P); - begingroup3(f,name == "" ? L.s : name,render); + L.T3=T; + if(is3D()) { bool lighton=light.on(); - for(patch S : surface(L,position,bbox=P.bboxonly).s) { - draw3D(f,S,position,L.p,light,interaction); - // Fill subdivision cracks - if(render.labelfill && opacity(L.p) == 1 && !lighton) - _draw(f,S.external(),position,L.p,interaction.type); + if(name == "") name=L.s; + if(prc() && interaction.type == Billboard.type) { + surface s=surface(texpath(L)); + transform3 centering=L.align.is3D ? + alignshift(s,L.T3,position,L.align.dir3) : identity4; + transform3 positioning= + shift(L.align.is3D ? position+L.align.dir3*labelmargin(L.p) : position); + frame f1,f2,f3; + begingroup3(f1,name,render); + if(L.defaulttransform3) + begingroup3(f3,render,position,interaction.type); + else { + begingroup3(f2,render,position,interaction.type); + begingroup3(f3,render,position); + } + for(patch S : s.s) { + S=centering*S; + draw3D(f3,S,position,L.p,light,interaction); + // Fill subdivision cracks + if(render.labelfill && opacity(L.p) == 1 && !lighton) + _draw(f3,S.external(),position,L.p,interaction.type); + } + endgroup3(f3); + if(L.defaulttransform3) + add(f1,T*f3); + else { + add(f2,inverse(T)*L.T3*f3); + endgroup3(f2); + add(f1,T*f2); + } + endgroup3(f1); + add(f,positioning*f1); + } else { + begingroup3(f,name,render); + for(patch S : surface(L,position).s) { + triple V=L.align.is3D ? position+L.align.dir3*labelmargin(L.p) : + position; + draw3D(f,S,V,L.p,light,interaction); + // Fill subdivision cracks + if(render.labelfill && opacity(L.p) == 1 && !lighton) + _draw(f,S.external(),V,L.p,interaction.type); + } + endgroup3(f); } } else { pen p=color(L.T3*Z,L.p,light,shiftless(P.T.modelview)); @@ -1509,7 +1681,6 @@ void label(frame f, Label L, triple position, align align=NoAlign, for(patch S : surface(L,position).s) fill(f,project(S.external(),P,1),p); } - endgroup3(f); } void label(picture pic=currentpicture, Label L, triple position, @@ -1533,18 +1704,54 @@ void label(picture pic=currentpicture, Label L, triple position, if(interaction.targetsize && settings.render != 0) L.T=L.T*scale(abs(P.camera-v)/abs(P.vector())); + transform3 T=transform3(P); if(L.defaulttransform3) - L.T3=transform3(P); + L.T3=T; - begingroup3(f,name == "" ? L.s : name,render,v,interaction.type); - bool lighton=light.on(); - if(is3D()) { - for(patch S : surface(L,v,bbox=P.bboxonly).s) { - draw3D(f,S,v,L.p,light,interaction); - // Fill subdivision cracks - if(render.labelfill && opacity(L.p) == 1 && !lighton) - _draw(f,S.external(),v,L.p,interaction.type); + bool lighton=light.on(); + if(name == "") name=L.s; + if(prc() && interaction.type == Billboard.type) { + surface s=surface(texpath(L,bbox=P.bboxonly)); + transform3 centering=L.align.is3D ? + alignshift(s,L.T3,v,L.align.dir3) : identity4; + transform3 positioning= + shift(L.align.is3D ? v+L.align.dir3*labelmargin(L.p) : v); + frame f1,f2,f3; + begingroup3(f1,name,render); + if(L.defaulttransform3) + begingroup3(f3,render,v,interaction.type); + else { + begingroup3(f2,render,v,interaction.type); + begingroup3(f3,render,v); + } + for(patch S : s.s) { + S=centering*S; + draw3D(f3,S,v,L.p,light,interaction); + // Fill subdivision cracks + if(render.labelfill && opacity(L.p) == 1 && !lighton) + _draw(f3,S.external(),v,L.p,interaction.type); + } + endgroup3(f3); + if(L.defaulttransform3) + add(f1,T*f3); + else { + add(f2,inverse(T)*L.T3*f3); + endgroup3(f2); + add(f1,T*f2); + } + endgroup3(f1); + add(f,positioning*f1); + } else { + begingroup3(f,name,render); + for(patch S : surface(L,v,bbox=P.bboxonly).s) { + triple V=L.align.is3D ? v+L.align.dir3*labelmargin(L.p) : v; + draw3D(f,S,V,L.p,light,interaction); + // Fill subdivision cracks + if(render.labelfill && opacity(L.p) == 1 && !lighton) + _draw(f,S.external(),V,L.p,interaction.type); + } + endgroup3(f); } } @@ -1564,7 +1771,6 @@ void label(picture pic=currentpicture, Label L, triple position, fill(f,T*project(S.external(),P,1),p); }); } - endgroup3(f); },!L.defaulttransform3); @@ -1732,14 +1938,17 @@ void dot(frame f, triple v, material p=currentpen, { pen q=(pen) p; if(is3D()) { - begingroup3(f,name == "" ? "dot" : name,render); + bool group=name != "" || render.defaultnames; + if(group) + begingroup3(f,name == "" ? "dot" : name,render); real size=0.5*linewidth(dotsize(q)+q); transform3 T=shift(v)*scale3(size); for(patch s : unitsphere.s) draw3D(f,T*s,v,p,light,prc=false); if(prc()) drawPRCsphere(f,T,p,light); - endgroup3(f); + if(group) + endgroup3(f); } else dot(f,project(v,P.t),q); } @@ -1752,7 +1961,7 @@ void dot(frame f, triple[] v, material p=currentpen, light light=nolight, v=sort(v,lexorder); triple last=v[0]; - dot(f,last,p,light,name,P); + dot(f,last,p,light,name,render,P); for(int i=1; i < v.length; ++i) { triple V=v[i]; if(V != last) { @@ -1798,13 +2007,16 @@ void dot(picture pic=currentpicture, triple v, material p=currentpen, pic.add(new void(frame f, transform3 t, picture pic, projection P) { triple V=t*v; if(is3D()) { - begingroup3(f,name == "" ? "dot" : name,render); + bool group=name != "" || render.defaultnames; + if(group) + begingroup3(f,name == "" ? "dot" : name,render); transform3 T=shift(V)*scale3(size); for(patch s : unitsphere.s) draw3D(f,T*s,V,p,light,prc=false); if(prc()) drawPRCsphere(f,T,p,light,render); - endgroup3(f); + if(group) + endgroup3(f); } if(pic != null) dot(pic,project(V,P.t),q); @@ -1821,17 +2033,20 @@ void dot(picture pic=currentpicture, triple[] v, material p=currentpen, v=sort(v,lexorder); triple last=v[0]; - begingroup3(pic,name == "" ? "dots" : name,render); - dot(pic,last,p,light,partname(0),render); + bool group=name != "" || render.defaultnames; + if(group) + begingroup3(pic,name == "" ? "dots" : name,render); + dot(pic,last,p,light,partname(0,render),render); int k=0; for(int i=1; i < v.length; ++i) { triple V=v[i]; if(V != last) { - dot(pic,V,p,light,partname(++k),render); + dot(pic,V,p,light,partname(++k,render),render); last=V; } } - endgroup3(pic); + if(group) + endgroup3(pic); } } @@ -1957,9 +2172,12 @@ void draw(picture pic=currentpicture, triple[] P, real[] knot, pic.add(new void(frame f, transform3 t, picture pic, projection Q) { if(is3D()) { triple[] P=t*P; - begingroup3(f,name == "" ? "curve" : name,render); + bool group=name != "" || render.defaultnames; + if(group) + begingroup3(f,name == "" ? "curve" : name,render); draw(f,P,knot,weights,p); - endgroup3(f); + if(group) + endgroup3(f); if(pic != null) pic.addBox(minbound(P,Q),maxbound(P,Q)); } @@ -1975,6 +2193,7 @@ void draw(picture pic=currentpicture, triple[][] P, real[] uknot, real[] vknot, { if(colors.length > 0) m=mean(colors); + m=material(m,light); bool lighton=light.on(); P=copy(P); uknot=copy(uknot); @@ -1983,14 +2202,17 @@ void draw(picture pic=currentpicture, triple[][] P, real[] uknot, real[] vknot, colors=copy(colors); pic.add(new void(frame f, transform3 t, picture pic, projection Q) { if(is3D()) { - begingroup3(f,name == "" ? "surface" : name,render); + bool group=name != "" || render.defaultnames; + if(group) + begingroup3(f,name == "" ? "surface" : name,render); triple[][] P=t*P; real PRCshininess; if(prc()) PRCshininess=PRCshininess(m.shininess); draw(f,P,uknot,vknot,weights,m.p,m.opacity,m.shininess,PRCshininess, - colors,lighton); - endgroup3(f); + colors); + if(group) + endgroup3(f); if(pic != null) pic.addBox(minbound(P,Q),maxbound(P,Q)); } diff --git a/Master/texmf-dist/asymptote/three_tube.asy b/Master/texmf-dist/asymptote/three_tube.asy index aa5688f081e..8b621e92dda 100644 --- a/Master/texmf-dist/asymptote/three_tube.asy +++ b/Master/texmf-dist/asymptote/three_tube.asy @@ -405,10 +405,9 @@ struct tube if(abs(dir(p,i,1)-dir(p,i,-1)) > sqrtEpsilon) { generate(subpath(p,begin,i)); triple dir=dir(p,i,-1); - s.append(shift(point(p,i))*t*align(dir)* - (dir != O ? unithemisphere : unitsphere)); - int L=length(center); - sphere(shift(point(center,L))*t*align(dir(center,L,-1)), + transform3 T=t*align(dir); + s.append(shift(point(p,i))*T*(dir != O ? unithemisphere : unitsphere)); + sphere(shift(point(center,length(center)))*T, half=straight(p,i-1) && straight(p,i)); begin=i; } diff --git a/Master/texmf-dist/asymptote/version.asy b/Master/texmf-dist/asymptote/version.asy index 2912aa57db5..74236e525b9 100644 --- a/Master/texmf-dist/asymptote/version.asy +++ b/Master/texmf-dist/asymptote/version.asy @@ -1 +1 @@ -string VERSION="2.16"; +string VERSION="2.21"; diff --git a/Master/texmf-dist/doc/asymptote/CAD.pdf b/Master/texmf-dist/doc/asymptote/CAD.pdf Binary files differindex bb61b12dd4d..c5c3fef48b6 100644 --- a/Master/texmf-dist/doc/asymptote/CAD.pdf +++ b/Master/texmf-dist/doc/asymptote/CAD.pdf diff --git a/Master/texmf-dist/doc/asymptote/TeXShopAndAsymptote.pdf b/Master/texmf-dist/doc/asymptote/TeXShopAndAsymptote.pdf Binary files differindex 61dfa38cc71..83e2f90ea74 100644 --- a/Master/texmf-dist/doc/asymptote/TeXShopAndAsymptote.pdf +++ b/Master/texmf-dist/doc/asymptote/TeXShopAndAsymptote.pdf diff --git a/Master/texmf-dist/doc/asymptote/asy-latex.pdf b/Master/texmf-dist/doc/asymptote/asy-latex.pdf Binary files differindex 55883f461c8..49a797348ee 100644 --- a/Master/texmf-dist/doc/asymptote/asy-latex.pdf +++ b/Master/texmf-dist/doc/asymptote/asy-latex.pdf diff --git a/Master/texmf-dist/doc/asymptote/asyRefCard.pdf b/Master/texmf-dist/doc/asymptote/asyRefCard.pdf Binary files differindex bed262c88fd..fa105896284 100644 --- a/Master/texmf-dist/doc/asymptote/asyRefCard.pdf +++ b/Master/texmf-dist/doc/asymptote/asyRefCard.pdf diff --git a/Master/texmf-dist/doc/asymptote/asymptote.pdf b/Master/texmf-dist/doc/asymptote/asymptote.pdf Binary files differindex 914215456fb..d6463b5390c 100644 --- a/Master/texmf-dist/doc/asymptote/asymptote.pdf +++ b/Master/texmf-dist/doc/asymptote/asymptote.pdf diff --git a/Master/texmf-dist/doc/asymptote/examples/100d.views b/Master/texmf-dist/doc/asymptote/examples/100d.views index 5e73cb0c8b9..82dbb734792 100644 --- a/Master/texmf-dist/doc/asymptote/examples/100d.views +++ b/Master/texmf-dist/doc/asymptote/examples/100d.views @@ -1,30 +1,21 @@ -VIEW%={View A} - COO=0.000001944790710695088 -0.000000199754154551 -303.740966796875 - C2C=-0.43931567668914795 -0.011656288057565689 0.8982571363449097 - ROO=367.52660744556164 - ROLL=-75.86431813030065 +VIEW={View A} + COO=95.703857421875 -26.603919982910156 122.73419952392578 + C2C=-0.4144790768623352 0.7603927254676819 0.5000100135803223 + ROO=141.69743417830577 + ROLL=13.566625455930614 AAC=34.903342413559436 - BGCOLOR=1. 1. 1. - LIGHTS=Artwork - RENDERMODE=Solid END -VIEW%={View B} - COO=-52.16141891479492 50.85958480834961 -249.23748779296875 - C2C=-0.0608830563724041 0.722907543182373 -0.6882571578025818 - ROO=117.10558117788756 - ROLL=105.68252665017765 +VIEW={View B} + COO=15.9437837600708 -12.494922637939453 67.1521987915039 + C2C=0.9024380445480347 0.3321097493171692 0.27442431449890137 + ROO=303.7409567061654 + ROLL=66.40207458248847 AAC=34.903342413559436 - BGCOLOR=1. 1. 1. - LIGHTS=Artwork - RENDERMODE=Solid END -VIEW%={View C} - COO=2.2545230388641357 2.9914066791534424 -300.3456115722656 - C2C=0.8536049127578735 0.3032689690589905 -0.42354053258895874 - ROO=303.7410359852936 - ROLL=-126.08445879535664 +VIEW={View C} + COO=-42.11725616455078 -13.32657241821289 18.372915267944336 + C2C=0.6989848017692566 -0.009704185649752617 0.7150706648826599 + ROO=444.70718853041143 + ROLL=78.84753985408712 AAC=34.903342413559436 - BGCOLOR=1. 1. 1. - LIGHTS=Artwork - RENDERMODE=Solid END diff --git a/Master/texmf-dist/doc/asymptote/examples/BezierPatch.asy b/Master/texmf-dist/doc/asymptote/examples/BezierPatch.asy index 8d770e058ae..4e3e55cb40e 100644 --- a/Master/texmf-dist/doc/asymptote/examples/BezierPatch.asy +++ b/Master/texmf-dist/doc/asymptote/examples/BezierPatch.asy @@ -1,7 +1,7 @@ import three; size(10cm); -currentlight=Viewport; +currentlight=Headlamp; surface s=surface(patch(new triple[][] { {(0,0,0),(1,0,0),(1,0,0),(2,0,0)}, diff --git a/Master/texmf-dist/doc/asymptote/examples/BezierSurface.asy b/Master/texmf-dist/doc/asymptote/examples/BezierSurface.asy index f8cbc458ca0..62c01a55717 100644 --- a/Master/texmf-dist/doc/asymptote/examples/BezierSurface.asy +++ b/Master/texmf-dist/doc/asymptote/examples/BezierSurface.asy @@ -40,4 +40,3 @@ size3(pic,10cm); draw(pic,surface(P),blue); add(embed("label",pic),(0,0),N); -label(cameralink("label"),(0,0),10S,fontsize(24pt)); diff --git a/Master/texmf-dist/doc/asymptote/examples/animations/embeddedmovie.asy b/Master/texmf-dist/doc/asymptote/examples/animations/embeddedmovie.asy index 98dfd424db8..12fdf04dedc 100644 --- a/Master/texmf-dist/doc/asymptote/examples/animations/embeddedmovie.asy +++ b/Master/texmf-dist/doc/asymptote/examples/animations/embeddedmovie.asy @@ -6,8 +6,8 @@ import embed; // Add embedded movie //import external; // Add external movie (use this form under Linux). -// Generated needed mpeg file if it doesn't already exist. -asy("mpg","wheel"); +// Generated needed mp4 file if it doesn't already exist. +asy("mp4","wheel"); // Produce a pdf file. settings.outformat="pdf"; @@ -15,10 +15,5 @@ settings.outformat="pdf"; settings.twice=true; // An embedded movie: -label(embed("wheel.mpg","poster,text=wheel.mpg,label=wheel.mpg",20cm,5.6cm), - (0,0),N); - -// An optional button: -label(link("wheel.mpg","Play","play"),(0,0),S); - - +label(embed("wheel.mp4",20cm,5.6cm),(0,0),N); +label(link("wheel.mp4"),(0,0),S); diff --git a/Master/texmf-dist/doc/asymptote/examples/animations/embeddedu3d.asy b/Master/texmf-dist/doc/asymptote/examples/animations/embeddedu3d.asy index 1116c216fe2..b30ada927c2 100644 --- a/Master/texmf-dist/doc/asymptote/examples/animations/embeddedu3d.asy +++ b/Master/texmf-dist/doc/asymptote/examples/animations/embeddedu3d.asy @@ -1,6 +1,8 @@ // An embedded U3D object; // import embed; +settings.tex="pdflatex"; -label(embed("dice.u3d","poster,text=(dice.u3d),3Droo=27,label=dice",settings.paperwidth,settings.paperheight)); +label(embedplayer("dice.u3d","dice","activate=pagevisible,3Droo=27", + settings.paperwidth,settings.paperheight)); diff --git a/Master/texmf-dist/doc/asymptote/examples/animations/externalmovie.asy b/Master/texmf-dist/doc/asymptote/examples/animations/externalmovie.asy index 77c99528307..8dc8af74bb7 100644 --- a/Master/texmf-dist/doc/asymptote/examples/animations/externalmovie.asy +++ b/Master/texmf-dist/doc/asymptote/examples/animations/externalmovie.asy @@ -6,12 +6,11 @@ import external; settings.tex="pdflatex"; // Generated needed mpeg file if it doesn't already exist. -asy("mpg","wheel"); +asy("mp4","wheel"); // Produce a pdf file. settings.outformat="pdf"; // External movie: viewable even with the Linux version of acroread. -label(embed("wheel.mpg"),(0,0),N); - -label(link("wheel.mpg","Play"),(0,0),S); +label(embed("wheel.mp4"),(0,0),N); +label(link("wheel.mp4"),(0,0),S); diff --git a/Master/texmf-dist/doc/asymptote/examples/animations/slidemovies.asy b/Master/texmf-dist/doc/asymptote/examples/animations/slidemovies.asy index 205f94fbc85..bbfdd21eaba 100644 --- a/Master/texmf-dist/doc/asymptote/examples/animations/slidemovies.asy +++ b/Master/texmf-dist/doc/asymptote/examples/animations/slidemovies.asy @@ -33,15 +33,12 @@ display(a.pdf("autoplay,loop,controls",multipage=false)); display(b.pdf("controls",multipage=false)); // Generated needed files if they don't already exist. -asy("mpg","wheel"); +asy("mp4","wheel"); title("External Movie (portable)"); -display(external.embed("wheel.mpg", - "poster,text=wheel.mpg,label=wheel.mpg",20cm,5.6cm)); -display(external.link("wheel.mpg","Play","play")); +display(external.embed("wheel.mp4",20cm,5.6cm)); +display(external.link("wheel.mp4")); title("Embedded Movie (not portable)"); -display(embed.embed("wheel.mpg", - "poster,text=wheel.mpg,label=wheel.mpg", - 20cm,5.6cm)); -display(embed.link("wheel.mpg","Play","play")); +display(embed.embed("wheel.mp4",20cm,5.6cm)); +display(embed.link("wheel.mp4")); diff --git a/Master/texmf-dist/doc/asymptote/examples/binarytreetest.asy b/Master/texmf-dist/doc/asymptote/examples/binarytreetest.asy index 0078bb749e0..af55292e4a3 100644 --- a/Master/texmf-dist/doc/asymptote/examples/binarytreetest.asy +++ b/Master/texmf-dist/doc/asymptote/examples/binarytreetest.asy @@ -3,10 +3,10 @@ import binarytree; picture pic,pic2; binarytree bt=binarytree(1,2,4,nil,5,nil,nil,0,nil,nil,3,6,nil,nil,7); -draw(pic,bt); +draw(pic,bt,condensed=false); binarytree st=searchtree(10,5,2,1,3,4,7,6,8,9,15,13,12,11,14,17,16,18,19); -draw(pic2,st,blue); +draw(pic2,st,blue,condensed=true); add(pic.fit(),(0,0),10N); add(pic2.fit(),(0,0),10S); diff --git a/Master/texmf-dist/doc/asymptote/examples/cheese.asy b/Master/texmf-dist/doc/asymptote/examples/cheese.asy index 9a16e4130dc..05b9181fdf4 100644 --- a/Master/texmf-dist/doc/asymptote/examples/cheese.asy +++ b/Master/texmf-dist/doc/asymptote/examples/cheese.asy @@ -9,4 +9,7 @@ real f(real x, real y, real z) { surface sf=surface(contour3(f,(-2pi,-2pi,-2pi),(2pi,2pi,2pi),12)); sf.colors(palette(sf.map(abs),Gradient(red,yellow))); -draw(sf,nolight,render(merge=true)); + +currentlight=nolight; + +draw(sf,render(merge=true)); diff --git a/Master/texmf-dist/doc/asymptote/examples/loggraph.asy b/Master/texmf-dist/doc/asymptote/examples/loggraph.asy index edd9d3e0a67..d496fba1624 100644 --- a/Master/texmf-dist/doc/asymptote/examples/loggraph.asy +++ b/Master/texmf-dist/doc/asymptote/examples/loggraph.asy @@ -8,8 +8,7 @@ scale(Log,Log); draw(graph(f,0.1,10)); -//xlimits(1,10,Crop); -//ylimits(0.1,1,Crop); +//limits((1,0.1),(10,0.5),Crop); dot(Label("(3,5)",align=S),Scale((3,5))); diff --git a/Master/texmf-dist/doc/asymptote/examples/parametricgraph.asy b/Master/texmf-dist/doc/asymptote/examples/parametricgraph.asy index a5688a6f9dd..61c219d8104 100644 --- a/Master/texmf-dist/doc/asymptote/examples/parametricgraph.asy +++ b/Master/texmf-dist/doc/asymptote/examples/parametricgraph.asy @@ -7,8 +7,7 @@ real y(real t) {return sin(2pi*t);} draw(graph(x,y,0,1)); -//xlimits(0,1,Crop); -//ylimits(-1,0,Crop); +//limits((0,-1),(1,0),Crop); xaxis("$x$",BottomTop,LeftTicks); yaxis("$y$",LeftRight,RightTicks(trailingzero)); diff --git a/Master/texmf-dist/doc/asymptote/examples/pdb.asy b/Master/texmf-dist/doc/asymptote/examples/pdb.asy index b3b954c8c6a..ad86d5172c4 100644 --- a/Master/texmf-dist/doc/asymptote/examples/pdb.asy +++ b/Master/texmf-dist/doc/asymptote/examples/pdb.asy @@ -4,8 +4,6 @@ import cpkcolors; // A sample Protein Data Bank file for this example is available from // http://ndbserver.rutgers.edu/ftp/NDB/coordinates/na-biol/100d.pdb1 -bool getviews=true; - currentlight=White; //currentlight=nolight; @@ -160,13 +158,7 @@ string options; string viewfilename=prefix+".views"; if(!error(input(viewfilename,check=false))) - options="3Dviews2="+viewfilename; - -if(getviews && prc()) { - picture pic; - add(pic,embed("label",currentpicture,options=options),(0,0),N); - label(pic,cameralink("label"),(0,0),S,fontsize(12pt)); - shipout(prefix,pic,options=options); -} else - shipout(prefix,options=options); + options="3Dviews="+viewfilename; + +shipout(prefix,options=options); diff --git a/Master/texmf-dist/doc/asymptote/examples/projectrevolution.asy b/Master/texmf-dist/doc/asymptote/examples/projectrevolution.asy index 25cbe6d4902..8bbe7f38c3d 100644 --- a/Master/texmf-dist/doc/asymptote/examples/projectrevolution.asy +++ b/Master/texmf-dist/doc/asymptote/examples/projectrevolution.asy @@ -5,8 +5,8 @@ currentprojection=orthographic(20,0,3); size(400,300,IgnoreAspect); -revolution r=revolution(new real(real x) {return sin(x)*exp(-x/2);}, - 0,2pi,operator ..,Z); +revolution r=revolution(graph(new triple(real x) { + return (x,0,sin(x)*exp(-x/2));},0,2pi,operator ..),axis=Z); surface s=surface(r); surface S=planeproject(shift(-Z)*unitsquare3)*s; diff --git a/Master/texmf-dist/doc/asymptote/examples/triangles.asy b/Master/texmf-dist/doc/asymptote/examples/triangles.asy new file mode 100644 index 00000000000..c3b3c2aec84 --- /dev/null +++ b/Master/texmf-dist/doc/asymptote/examples/triangles.asy @@ -0,0 +1,19 @@ +import three; +size(10cm); + +triple[] v={O,X,X+Y,Y}; + +triple[] n={Z,X}; + +int[][] vi={{0,1,2},{2,3,0}}; +int[][] ni={{0,0,0},{1,1,1}}; + +pen[] p={red+opacity(0.5),green+opacity(0.5),blue+opacity(0.5), + black+opacity(0.5)}; + +// Adobe Reader exhibits a PRC rendering bug for opacities in (0.5,1): +//pen[] p={red+opacity(0.9),green+opacity(0.9),blue+opacity(0.9),black+opacity(0.9)}; + +int[][] pi={{0,1,2},{2,3,0}}; +draw(v,vi,n,ni,red); +draw(v+Z,vi,p,pi); diff --git a/Master/texmf-dist/doc/asymptote/examples/tvgen.asy b/Master/texmf-dist/doc/asymptote/examples/tvgen.asy index ade90e89211..1a9f151df26 100644 --- a/Master/texmf-dist/doc/asymptote/examples/tvgen.asy +++ b/Master/texmf-dist/doc/asymptote/examples/tvgen.asy @@ -23,7 +23,6 @@ * since local variants exist and parameters have varied over time. */ //papertype="a4"; -import plain; int verbose=settings.verbose/*+2*/; /* uncomment for debug info */ /* tv dot coordinates --> PS points */ diff --git a/Master/texmf-dist/doc/asymptote/examples/vertexshading.asy b/Master/texmf-dist/doc/asymptote/examples/vertexshading.asy index ea97b98daf3..13821ec0058 100644 --- a/Master/texmf-dist/doc/asymptote/examples/vertexshading.asy +++ b/Master/texmf-dist/doc/asymptote/examples/vertexshading.asy @@ -4,6 +4,6 @@ size(200); currentprojection=perspective(4,5,5); -draw(surface(unitcircle3,new pen[] {red,green,blue,white})); +draw(surface(unitcircle3,new pen[] {red,green,blue,black})); draw(surface(shift(Z)*unitsquare3, new pen[] {red,green+opacity(0.5),blue,black})); diff --git a/Master/texmf-dist/doc/info/asy-faq.info b/Master/texmf-dist/doc/info/asy-faq.info index ce35b88fc2b..fe63cc4aadf 100644 --- a/Master/texmf-dist/doc/info/asy-faq.info +++ b/Master/texmf-dist/doc/info/asy-faq.info @@ -10,7 +10,7 @@ END-INFO-DIR-ENTRY File: asy-faq.info, Node: Top, Next: Question 1.1, Up: (dir) ASYMPTOTE FREQUENTLY ASKED QUESTIONS - 30 May 2012 + 10 Oct 2012 This is the list of Frequently Asked Questions about Asymptote (asy). diff --git a/Master/texmf-dist/doc/info/asymptote.info b/Master/texmf-dist/doc/info/asymptote.info index ee7d4f40b51..5b88055da4c 100644 --- a/Master/texmf-dist/doc/info/asymptote.info +++ b/Master/texmf-dist/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 2.16. +This file documents `Asymptote', version 2.21. `http://asymptote.sourceforge.net' @@ -23,7 +23,7 @@ File: asymptote.info, Node: Top, Next: Description, Up: (dir) Asymptote ********* -This file documents `Asymptote', version 2.16. +This file documents `Asymptote', version 2.21. `http://asymptote.sourceforge.net' @@ -499,7 +499,7 @@ tar -xf asymptote-x.xx.src.tar cd asymptote-x.xx By default the system version of the Boehm garbage collector will be used; if it is old we recommend first putting -`http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-7.2b.tar.gz' +`http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-7.2d.tar.gz' in the `Asymptote' source directory. If your graphics card supports multisampling, we recommend using version @@ -1978,8 +1978,8 @@ File: asymptote.info, Node: Paths and guides, Next: Pens, Prev: Data types, respectively. `real[] maxtimes(path p)' - returns an array of length 2 containing the times at which - path `p' reaches its maximal horizontal and vertical extents, + returns an array of length 2 containing times at which path + `p' reaches its maximal horizontal and vertical extents, respectively. `pair intersectionpoint(path p, path q, real fuzz=-1);' @@ -3852,7 +3852,7 @@ module `gsl' that defines the airy functions `Ai(real)', `Bi(real)', `i_scaled(int, real)', `k_scaled(int, real)', `J(real, real)', `Y(real, real)', `I(real, real)', `K(real, real)', `zero_J(real, int)', the elliptic functions `F(real, real)', `E(real, real)', and `P(real, -real)', the Jacobi elliptic functions `real[] sndncn(real,real)', the +real)', the Jacobi elliptic functions `real[] sncndn(real,real)', the exponential/trigonometric integrals `Ei', `Si', and `Ci', the Legendre polynomials `Pl(int, real)', and the Riemann zeta function `zeta(real)'. For example, to compute the sine integral `Si' of 1.0: @@ -5145,10 +5145,10 @@ import binarytree; picture pic,pic2; binarytree bt=binarytree(1,2,4,nil,5,nil,nil,0,nil,nil,3,6,nil,nil,7); -draw(pic,bt); +draw(pic,bt,condensed=false); binarytree st=searchtree(10,5,2,1,3,4,7,6,8,9,15,13,12,11,14,17,16,18,19); -draw(pic2,st,blue); +draw(pic2,st,blue,condensed=true); add(pic.fit(),(0,0),10N); add(pic2.fit(),(0,0),10S); @@ -5236,33 +5236,19 @@ File: asymptote.info, Node: embed, Next: slide, Prev: animation, Up: Base mo This module provides an interface to the `LaTeX' package (included with `MikTeX') - `http://www.ctan.org/tex-archive/macros/latex/contrib/movie15' - for embedding movies, sounds, and 3D objects into a PDF document. However, -`XeLaTeX' users need to rename the modified version -`movie15_dvipdfmx.sty' from - - `http://asymptote.svn.sourceforge.net/viewvc/asymptote/trunk/asymptote/patches/' - to `movie15.sty' and place it in their `LaTeX' path. - - The latest version of the `movie15' package requires both `pdflatex' -version 1.20 or later and the file - - `http://www.ctan.org/tex-archive/macros/latex/contrib/oberdiek/ifdraft.dtx' - which can be installed by placing it in a directory `ifdraft' in the -local `LaTeX' directory (e.g. -`/usr/local/share/texmf/tex/latex/ifdraft') and executing in that -directory the commands: -tex ifdraft.dtx -texhash + `http://www.ctan.org/tex-archive/macros/latex/contrib/media9' + for embedding movies, sounds, and 3D objects into a PDF document. +Version 0.13 (2012/09/12) of `media9' or later is required. A more portable method for embedding movie files, which should work -on any platform and does not require the `movie15' or `ifdraft' -packages, is provided by using the `external' module instead of -`embed'. An example of these interfaces is provided in the file +on any platform and does not require the `media9' package, is provided +by using the `external' module instead of `embed'. + + Examples of the above two interfaces is provided in the file `embeddedmovie.asy' and `externalmovie.asy' in the `animations' -subdirectory of the examples directory. For a higher quality movie -generated directly by `Asymptote', use the `animate' module along with -the `animate.sty' package to embed a portable PDF animation (*note +subdirectory of the examples directory. For a higher quality embedded +movie generated directly by `Asymptote', use the `animate' module along +with the `animate.sty' package to embed a portable PDF animation (*note animate::). An example of embedding `U3D' code is provided in the file @@ -5703,6 +5689,7 @@ following routines: vertical or horizontal lines and axes at arbitrary locations. * void axes(picture pic=currentpicture, Label xlabel="", Label ylabel="", + bool extend=true, pair min=(-infinity,-infinity), pair max=(infinity,infinity), pen p=currentpen, arrowbar arrow=None, bool above=false); This convenience routine draws both x and y axes on picture `pic' @@ -6050,8 +6037,7 @@ following routines: draw(graph(x,y,0,1)); - //xlimits(0,1,Crop); - //ylimits(-1,0,Crop); + //limits((0,-1),(1,0),Crop); xaxis("$x$",BottomTop,LeftTicks); yaxis("$y$",LeftRight,RightTicks(trailingzero)); @@ -6119,8 +6105,7 @@ following routines: draw(graph(f,0.1,10)); - //xlimits(1,10,Crop); - //ylimits(0.1,1,Crop); + //limits((1,0.1),(10,0.5),Crop); dot(Label("(3,5)",align=S),Scale((3,5))); @@ -6746,6 +6731,19 @@ 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. + A more efficient routine also exists for drawing tessellations +composed of many 3D triangles, with specified vertices, and optional +normals or vertex colors: +void draw(picture pic=currentpicture, triple[] v, int[][] vi, + triple[] n={}, int[][] ni={}, material m=currentpen, pen[] p={}, + int[][] pi={}, light light=currentlight); + Here, the triple array `v' lists the distinct vertices, while the +array `vi' lists integer arrays of length 3 containing the indices of +`v' corresponding to the vertices of each triangle. Similarly, the +arguments `n' and `ni' contain optional normal data and `p' and `pi' +contain optional pen vertex data. An example of this tessellation +facility is given in `triangles.asy'. + Arbitrary thick three-dimensional curves and line caps (which the `OpenGL' standard does not require implementations to provide) are constructed with @@ -6873,18 +6871,18 @@ There are four choices for viewing 3D `Asymptote' output: `settings.outformat="pdf"', which can be specified by the command line option `-f pdf', put in the `Asymptote' configuration file (*note configuration file::), or specified in the script before - `three.asy' (or `graph3.asy') is imported. Version 2008/10/08 or - later of the `movie15' package is also required (*note embed::). - The example `pdb.asy' illustrates how one can generate a list of - predefined views (see `100d.views'). A stationary preview image - with a resolution of `n' pixels per `bp' can be embedded with the - setting `render=n'; this allows the file to be viewed with other - `PDF' viewers. Alternatively, the file `externalprc.tex' - illustrates how the resulting PRC and rendered image files can be - extracted and processed in a separate `LaTeX' file. However, see - *note LaTeX usage:: for an easier way to embed three-dimensional - `Asymptote' pictures within `LaTeX'. The open-source PRC - specification is available from + `three.asy' (or `graph3.asy') is imported. The `media9' LaTeX + package is also required (*note embed::). The example `pdb.asy' + illustrates how one can generate a list of predefined views (see + `100d.views'). A stationary preview image with a resolution of + `n' pixels per `bp' can be embedded with the setting `render=n'; + this allows the file to be viewed with other `PDF' viewers. + Alternatively, the file `externalprc.tex' illustrates how the + resulting PRC and rendered image files can be extracted and + processed in a separate `LaTeX' file. However, see *note LaTeX + usage:: for an easier way to embed three-dimensional `Asymptote' + pictures within `LaTeX'. The open-source PRC specification is + available from `http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/API_References/PRCReference/PRC_Format_Specification/'. 4. Project the scene to a two-dimensional vector (EPS or PDF) format @@ -7289,6 +7287,7 @@ axes in three dimensions. There is also a routine for drawing all three axis: void axes3(picture pic=currentpicture, Label xlabel="", Label ylabel="", Label zlabel="", + bool extend=false, triple min=(-infinity,-infinity,-infinity), triple max=(infinity,infinity,infinity), pen p=currentpen, arrowbar3 arrow=None); @@ -7944,6 +7943,7 @@ Options (negate by replacing - with -no): -autoplain Enable automatic importing of plain [true] -autoplay Autoplay 3D animations [false] -autorotate Enable automatic PDF page rotation [false] +-axes3 Show 3D axes in PDF output [true] -batchMask Mask fpu exceptions in batch mode [false] -batchView View output in batch mode [false] -bw Convert all colors to black and white [false] @@ -8492,9 +8492,9 @@ Index * ---: Bezier curves. (line 83) * -=: Self & prefix operators. (line 6) -* -c: Options. (line 174) -* -l: Options. (line 193) -* -u: Options. (line 184) +* -c: Options. (line 175) +* -l: Options. (line 194) +* -u: Options. (line 185) * -V <1>: Tutorial. (line 19) * -V: Configuring. (line 6) * ..: Tutorial. (line 127) @@ -8506,7 +8506,7 @@ Index * 2D graphs: graph. (line 6) * 3D graphs: graph3. (line 6) * 3D grids: grid3. (line 6) -* 3D PostScript: three. (line 581) +* 3D PostScript: three. (line 594) * 3D rendering: Compiling from UNIX source. (line 16) * :: Arithmetic & logical. @@ -8535,7 +8535,7 @@ Index * abs <1>: Mathematical functions. (line 35) * abs: Data types. (line 62) -* accel <1>: three. (line 507) +* accel <1>: three. (line 520) * accel: Paths and guides. (line 115) * access: Import. (line 6) * acknowledgments: Credits. (line 6) @@ -8545,9 +8545,9 @@ Index (line 6) * acosh: Mathematical functions. (line 6) -* add <1>: three. (line 271) +* add <1>: three. (line 284) * add: Frames and pictures. (line 196) -* addViews: three. (line 393) +* addViews: three. (line 406) * adjust: Pens. (line 115) * Ai: Mathematical functions. (line 48) @@ -8557,7 +8557,7 @@ Index (line 48) * alias <1>: Arrays. (line 181) * alias: Structures. (line 52) -* align: Options. (line 168) +* align: Options. (line 169) * Align: label. (line 12) * all: Arrays. (line 329) * Allow: Pens. (line 327) @@ -8570,23 +8570,23 @@ Index * animate: Configuring. (line 67) * animation: animation. (line 6) * annotate: annotate. (line 6) -* antialias <1>: Options. (line 143) -* antialias: three. (line 210) +* antialias <1>: Options. (line 144) +* antialias: three. (line 223) * antialiasing: Compiling from UNIX source. (line 16) * append <1>: Arrays. (line 39) * append: Files. (line 36) -* arc: three. (line 283) +* arc: three. (line 296) * Arc: Paths and guides. (line 32) * arc: Paths and guides. (line 22) * ArcArrow: draw. (line 26) -* ArcArrow3: three. (line 548) +* ArcArrow3: three. (line 561) * ArcArrows: draw. (line 26) -* ArcArrows3: three. (line 548) -* arclength <1>: three. (line 507) +* ArcArrows3: three. (line 561) +* arclength <1>: three. (line 520) * arclength: Paths and guides. (line 142) * arcpoint: Paths and guides. (line 152) -* arctime <1>: three. (line 507) +* arctime <1>: three. (line 520) * arctime: Paths and guides. (line 146) * arguments: Default arguments. (line 6) * arithmetic operators: Arithmetic & logical. @@ -8598,10 +8598,10 @@ Index * Arrow: draw. (line 26) * arrow: Drawing commands. (line 31) * arrow keys: Tutorial. (line 37) -* Arrow3: three. (line 548) +* Arrow3: three. (line 561) * Arrows: draw. (line 26) * arrows: draw. (line 26) -* Arrows3: three. (line 548) +* Arrows3: three. (line 561) * as: Import. (line 68) * ascii: Data types. (line 286) * aSin: Mathematical functions. @@ -8620,7 +8620,7 @@ Index * asyinclude: LaTeX usage. (line 46) * asymptote.sty: LaTeX usage. (line 6) * asymptote.xml: Editing modes. (line 49) -* ASYMPTOTE_CONFIG: Options. (line 115) +* ASYMPTOTE_CONFIG: Options. (line 116) * aTan: Mathematical functions. (line 20) * atan: Mathematical functions. @@ -8630,22 +8630,22 @@ Index * atanh: Mathematical functions. (line 6) * atleast: Bezier curves. (line 56) -* attach <1>: graph. (line 415) +* attach <1>: graph. (line 416) * attach: LaTeX usage. (line 51) -* autoadjust: three. (line 359) -* autoimport: Options. (line 111) +* autoadjust: three. (line 372) +* autoimport: Options. (line 112) * automatic scaling: graph. (line 682) * axialshade: fill. (line 43) -* axis <1>: graph3. (line 66) -* axis: graph. (line 880) +* axis <1>: graph3. (line 67) +* axis: graph. (line 879) * azimuth: Data types. (line 126) * babel: babel. (line 6) * background color: Frames and pictures. (line 168) -* BackView: three. (line 386) +* BackView: three. (line 399) * Bar: draw. (line 19) -* Bar3: three. (line 548) +* Bar3: three. (line 561) * Bars: draw. (line 19) -* Bars3: three. (line 548) +* Bars3: three. (line 561) * barsize: draw. (line 19) * base modules: Base modules. (line 6) * basealign: Pens. (line 168) @@ -8653,18 +8653,18 @@ Index * batch mode: Tutorial. (line 6) * beep: Data types. (line 357) * BeginArcArrow: draw. (line 26) -* BeginArcArrow3: three. (line 548) +* BeginArcArrow3: three. (line 561) * BeginArrow: draw. (line 26) -* BeginArrow3: three. (line 548) +* BeginArrow3: three. (line 561) * BeginBar: draw. (line 19) -* BeginBar3: three. (line 548) +* BeginBar3: three. (line 561) * BeginDotMargin: draw. (line 42) -* BeginDotMargin3: three. (line 564) +* BeginDotMargin3: three. (line 577) * BeginMargin: draw. (line 42) -* BeginMargin3: three. (line 564) +* BeginMargin3: three. (line 577) * BeginPenMargin: draw. (line 42) -* BeginPenMargin2: three. (line 564) -* BeginPenMargin3: three. (line 564) +* BeginPenMargin2: three. (line 577) +* BeginPenMargin3: three. (line 577) * BeginPoint: label. (line 56) * Bessel: Mathematical functions. (line 48) @@ -8676,13 +8676,13 @@ Index (line 48) * Bi_deriv: Mathematical functions. (line 48) -* Billboard: three. (line 477) +* Billboard: three. (line 490) * binary: Files. (line 75) * binary format: Files. (line 75) * binary operators: Arithmetic & logical. (line 6) * binarytree: binarytree. (line 6) -* black stripes: three. (line 210) +* black stripes: three. (line 223) * Blank: draw. (line 26) * block.bottom: flowchart. (line 19) * block.bottomleft: flowchart. (line 19) @@ -8701,16 +8701,16 @@ Index (line 6) * Bottom: graph. (line 134) * BottomTop: graph. (line 140) -* BottomView: three. (line 386) +* BottomView: three. (line 399) * bounding box: Frames and pictures. (line 168) -* Bounds: graph3. (line 20) -* box <1>: three. (line 305) +* Bounds: graph3. (line 21) +* box <1>: three. (line 318) * box: Frames and pictures. (line 22) * bp: Tutorial. (line 26) * break: Programming. (line 29) * breakpoints: Debugger. (line 21) * brick: Pens. (line 251) -* broken axis: graph. (line 783) +* broken axis: graph. (line 782) * bug reports: Help. (line 23) * buildcycle: Paths and guides. (line 258) * Button-1: GUI. (line 6) @@ -8720,14 +8720,14 @@ Index * C string: Data types. (line 191) * CAD: CAD. (line 6) * calculateTransform: Frames and pictures. (line 107) -* camera: three. (line 354) +* camera: three. (line 367) * casts: Casts. (line 6) * cbrt: Mathematical functions. (line 6) * cd: Files. (line 25) * ceil: Mathematical functions. (line 26) -* center: three. (line 338) +* center: three. (line 351) * Center: label. (line 61) * checker: Pens. (line 251) * Chinese: unicode. (line 12) @@ -8736,7 +8736,7 @@ Index * Ci: Mathematical functions. (line 48) * circle <1>: flowchart. (line 64) -* circle: three. (line 279) +* circle: three. (line 292) * Circle: Paths and guides. (line 17) * circle: Paths and guides. (line 10) * circlebarframe: markers. (line 18) @@ -8770,13 +8770,13 @@ Index * conditional <1>: Arithmetic & logical. (line 73) * conditional: Programming. (line 8) -* config: Options. (line 115) -* configuration file <1>: Options. (line 115) +* config: Options. (line 116) +* configuration file <1>: Options. (line 116) * configuration file: Configuring. (line 23) * configuring: Configuring. (line 6) * conj: Data types. (line 59) * constructors: Structures. (line 91) -* context: Options. (line 143) +* context: Options. (line 144) * continue <1>: Debugger. (line 31) * continue: Programming. (line 29) * contour: contour. (line 9) @@ -8784,11 +8784,11 @@ Index * controls <1>: three. (line 6) * controls: Bezier curves. (line 45) * controlSpecifier: Paths and guides. (line 382) -* convert <1>: Options. (line 143) +* convert <1>: Options. (line 144) * convert <2>: animation. (line 6) * convert <3>: Files. (line 154) * convert: Configuring. (line 67) -* convertOptions: Options. (line 130) +* convertOptions: Options. (line 131) * Coons shading: fill. (line 74) * copy: Arrays. (line 174) * Cos: Mathematical functions. @@ -8798,9 +8798,9 @@ Index * cosh: Mathematical functions. (line 6) * cputime: Structures. (line 169) -* crop: graph. (line 636) -* cropping graphs: graph. (line 636) -* cross <1>: graph. (line 484) +* crop: graph. (line 637) +* cropping graphs: graph. (line 637) +* cross <1>: graph. (line 485) * cross: Data types. (line 169) * crossframe: markers. (line 23) * crosshatch: Pens. (line 267) @@ -8812,15 +8812,15 @@ Index * curl: Bezier curves. (line 63) * curlSpecifier: Paths and guides. (line 394) * currentpen: Pens. (line 6) -* currentprojection: three. (line 383) +* currentprojection: three. (line 396) * curve: slopefield. (line 20) * custom axis types: graph. (line 144) -* custom mark routine: graph. (line 576) +* custom mark routine: graph. (line 577) * custom tick locations: graph. (line 249) * cut: Paths and guides. (line 240) * cycle <1>: three. (line 6) * cycle: Tutorial. (line 75) -* cyclic <1>: three. (line 507) +* cyclic <1>: three. (line 520) * cyclic <2>: Arrays. (line 39) * cyclic: Paths and guides. (line 74) * Cyrillic: unicode. (line 7) @@ -8836,7 +8836,7 @@ Index * default arguments: Default arguments. (line 6) * defaultformat: graph. (line 175) * DefaultHead: draw. (line 26) -* DefaultHead3: three. (line 548) +* DefaultHead3: three. (line 561) * defaultpen: Pens. (line 46) * defaultrender: three. (line 47) * deferred drawing: simplex. (line 6) @@ -8851,7 +8851,7 @@ Index * diagonal: Arrays. (line 303) * diamond: flowchart. (line 57) * dimension: Arrays. (line 367) -* dir <1>: three. (line 507) +* dir <1>: three. (line 520) * dir <2>: Paths and guides. (line 98) * dir <3>: Data types. (line 87) * dir: Search paths. (line 10) @@ -8867,12 +8867,13 @@ Index * dot <2>: Data types. (line 100) * dot: draw. (line 83) * DotMargin: draw. (line 42) -* DotMargin3: three. (line 564) +* DotMargin3: three. (line 577) * DotMargins: draw. (line 42) -* DotMargins3: three. (line 564) +* DotMargins3: three. (line 577) * dotted: Pens. (line 95) -* double deferred drawing: three. (line 256) +* double deferred drawing: three. (line 269) * double precision: Files. (line 75) +* draw: three. (line 112) * Draw: Frames and pictures. (line 147) * draw: draw. (line 110) * Draw: draw. (line 26) @@ -8881,7 +8882,7 @@ Index * drawline: math. (line 9) * drawtree: drawtree. (line 9) * dvips: Configuring. (line 67) -* dvipsOptions: Options. (line 130) +* dvipsOptions: Options. (line 131) * dvisvgm: Configuring. (line 67) * E <1>: Mathematical functions. (line 48) @@ -8896,22 +8897,22 @@ Index * else: Programming. (line 8) * emacs: Editing modes. (line 6) * embed: embed. (line 6) -* Embedded: three. (line 477) +* Embedded: three. (line 490) * empty: Frames and pictures. (line 7) * EndArcArrow: draw. (line 26) -* EndArcArrow3: three. (line 548) +* EndArcArrow3: three. (line 561) * EndArrow: draw. (line 26) -* EndArrow3: three. (line 548) +* EndArrow3: three. (line 561) * EndBar: draw. (line 19) -* EndBar3: three. (line 548) +* EndBar3: three. (line 561) * EndDotMargin: draw. (line 42) -* EndDotMargin3: three. (line 564) +* EndDotMargin3: three. (line 577) * endl: Files. (line 61) * EndMargin: draw. (line 42) -* EndMargin3: three. (line 564) +* EndMargin3: three. (line 577) * EndPenMargin: draw. (line 42) -* EndPenMargin2: three. (line 564) -* EndPenMargin3: three. (line 564) +* EndPenMargin2: three. (line 577) +* EndPenMargin3: three. (line 577) * EndPoint: label. (line 56) * envelope: Frames and pictures. (line 22) * environment variables: Configuring. (line 87) @@ -8919,7 +8920,7 @@ Index * eof: Files. (line 92) * eol <1>: Arrays. (line 344) * eol: Files. (line 92) -* EPS <1>: Options. (line 143) +* EPS <1>: Options. (line 144) * EPS: label. (line 79) * erase <1>: Frames and pictures. (line 7) * erase <2>: Data types. (line 241) @@ -8929,8 +8930,8 @@ Index * erfc: Mathematical functions. (line 6) * error: Files. (line 16) -* error bars: graph. (line 532) -* errorbars: graph. (line 484) +* error bars: graph. (line 533) +* errorbars: graph. (line 485) * eval: Import. (line 98) * evenodd <1>: Pens. (line 152) * evenodd: Tutorial. (line 148) @@ -8949,13 +8950,13 @@ Index * extendcap: Pens. (line 129) * extension <1>: MetaPost. (line 10) * extension: Paths and guides. (line 235) -* external: embed. (line 28) -* extrude: three. (line 501) +* external: embed. (line 13) +* extrude: three. (line 514) * F: Mathematical functions. (line 48) * fabs: Mathematical functions. (line 6) -* face: three. (line 589) +* face: three. (line 602) * factorial: Mathematical functions. (line 39) * Fedora: UNIX binary distributions. @@ -8980,7 +8981,7 @@ Index * find: Data types. (line 226) * firstcut: Paths and guides. (line 250) * fit: Frames and pictures. (line 103) -* fit3: three. (line 269) +* fit3: three. (line 282) * fixedscaling: Frames and pictures. (line 74) * floor: Mathematical functions. (line 26) @@ -8993,14 +8994,14 @@ Index * fontcommand: Pens. (line 207) * fontsize: Pens. (line 178) * for: Programming. (line 8) -* format <1>: Options. (line 143) +* format <1>: Options. (line 144) * format: Data types. (line 269) * forum: Help. (line 6) * frame: Frames and pictures. (line 7) * freeglut: Compiling from UNIX source. (line 16) * from: Import. (line 17) -* FrontView: three. (line 386) +* FrontView: three. (line 399) * function declarations: Functions. (line 67) * function shading: fill. (line 96) * Function shading: fill. (line 96) @@ -9018,8 +9019,8 @@ Index * getreal: Files. (line 117) * getstring: Files. (line 117) * gettriple: Files. (line 117) -* glOptions <1>: Options. (line 130) -* glOptions: three. (line 210) +* glOptions <1>: Options. (line 131) +* glOptions: three. (line 223) * GNU Scientific Library: Mathematical functions. (line 48) * gouraudshade: fill. (line 58) @@ -9032,7 +9033,7 @@ Index * gray: Pens. (line 25) * Grayscale: palette. (line 9) * grayscale: Pens. (line 25) -* grid <1>: graph. (line 734) +* grid <1>: graph. (line 733) * grid: Pens. (line 251) * grid3: grid3. (line 6) * gs: Configuring. (line 6) @@ -9040,7 +9041,7 @@ Index (line 48) * GSL: Compiling from UNIX source. (line 58) -* gsOptions: Options. (line 130) +* gsOptions: Options. (line 131) * GUI: GUI. (line 6) * GUI installation: GUI installation. (line 6) * GUI usage: GUI usage. (line 6) @@ -9057,32 +9058,32 @@ Index * hex: Data types. (line 283) * hexidecimal <1>: Pens. (line 59) * hexidecimal: Data types. (line 283) -* hidden surface removal: three. (line 589) +* hidden surface removal: three. (line 602) * histogram: Mathematical functions. (line 39) * history <1>: Interactive mode. (line 59) * history: Files. (line 142) * historylines: Interactive mode. (line 64) * HookHead: draw. (line 26) -* HookHead3: three. (line 548) +* HookHead3: three. (line 561) * Horizontal: flowchart. (line 81) -* hyperrefOptions: Options. (line 130) +* hyperrefOptions: Options. (line 131) * hypot: Mathematical functions. (line 6) * I: Mathematical functions. (line 48) * i_scaled: Mathematical functions. (line 48) -* iconic: three. (line 210) +* iconic: three. (line 223) * identity <1>: Arrays. (line 300) * identity <2>: Mathematical functions. (line 6) * identity: Transforms. (line 24) -* identity4: three. (line 437) +* identity4: three. (line 450) * if: Programming. (line 8) * IgnoreAspect: Frames and pictures. (line 58) * image: palette. (line 34) -* ImageMagick <1>: Options. (line 143) +* ImageMagick <1>: Options. (line 144) * ImageMagick <2>: animation. (line 6) * ImageMagick: Configuring. (line 67) * images: palette. (line 6) @@ -9100,7 +9101,7 @@ Index * initializers: Variable initializers. (line 6) * inline: LaTeX usage. (line 51) -* InOutTicks: graph3. (line 34) +* InOutTicks: graph3. (line 35) * input <1>: Interactive mode. (line 48) * input: Files. (line 10) * insert <1>: Arrays. (line 39) @@ -9117,22 +9118,22 @@ Index * interp: Arithmetic & logical. (line 76) * interpolate: interpolate. (line 6) -* intersect <1>: three. (line 507) +* intersect <1>: three. (line 520) * intersect <2>: math. (line 13) * intersect: Paths and guides. (line 184) -* intersectionpoint <1>: three. (line 507) +* intersectionpoint <1>: three. (line 520) * intersectionpoint <2>: math. (line 17) * intersectionpoint: Paths and guides. (line 227) -* intersectionpoints <1>: three. (line 507) +* intersectionpoints <1>: three. (line 520) * intersectionpoints: Paths and guides. (line 231) -* intersections <1>: three. (line 507) +* intersections <1>: three. (line 520) * intersections: Paths and guides. (line 195) -* InTicks: graph3. (line 34) +* InTicks: graph3. (line 35) * intMax: Data types. (line 28) * intMin: Data types. (line 28) * inverse <1>: Arrays. (line 306) * inverse: Transforms. (line 16) -* invert: three. (line 427) +* invert: three. (line 440) * invisible: Pens. (line 39) * isnan: Data types. (line 33) * J: Mathematical functions. @@ -9146,25 +9147,25 @@ Index * KDE editor: Editing modes. (line 49) * keepAspect <1>: LaTeX usage. (line 51) * keepAspect: Frames and pictures. (line 54) -* keyboard bindings:: three. (line 169) +* keyboard bindings:: three. (line 182) * keys: Arrays. (line 39) * keyword: Named arguments. (line 37) * keyword-only: Named arguments. (line 37) * keywords: Named arguments. (line 6) * Korean: unicode. (line 12) -* label: three. (line 471) -* Label <1>: graph. (line 342) +* label: three. (line 484) +* Label <1>: graph. (line 343) * Label: label. (line 14) * label: clip. (line 16) * Label: draw. (line 98) * labelpath: labelpath. (line 6) * labelpath3: labelpath3. (line 6) -* labelx: graph. (line 342) -* labely: graph. (line 342) +* labelx: graph. (line 343) +* labely: graph. (line 343) * Landscape: Frames and pictures. (line 95) * lastcut: Paths and guides. (line 254) * lasy-mode: Editing modes. (line 6) -* latex: Options. (line 143) +* latex: Options. (line 144) * LaTeX fonts: Pens. (line 192) * LaTeX usage: LaTeX usage. (line 6) * latexmk: LaTeX usage. (line 30) @@ -9172,19 +9173,19 @@ Index * latitude: Data types. (line 136) * latticeshade: fill. (line 32) * layer: Drawing commands. (line 16) -* leastsquares <1>: graph. (line 902) +* leastsquares <1>: graph. (line 901) * leastsquares: stats. (line 6) * Left: graph. (line 284) * LeftRight: graph. (line 290) * LeftSide: label. (line 61) * LeftTicks: graph. (line 161) -* LeftView: three. (line 386) -* legend <1>: graph. (line 431) +* LeftView: three. (line 399) +* legend <1>: graph. (line 432) * legend <2>: draw. (line 64) * legend: Drawing commands. (line 31) * Legendre: Mathematical functions. (line 48) -* length <1>: three. (line 507) +* length <1>: three. (line 520) * length <2>: Arrays. (line 39) * length <3>: Paths and guides. (line 65) * length: Data types. (line 62) @@ -9194,7 +9195,7 @@ Index (line 6) * libsigsegv <1>: Help. (line 33) * libsigsegv: Functions. (line 88) -* limits: graph. (line 636) +* limits: graph. (line 637) * line: Arrays. (line 344) * line mode: Arrays. (line 344) * Linear: graph. (line 682) @@ -9212,7 +9213,7 @@ Index (line 6) * log1p: Mathematical functions. (line 6) -* log2 graph: graph. (line 763) +* log2 graph: graph. (line 762) * logarithmic graph: graph. (line 713) * logical operators: Arithmetic & logical. (line 6) @@ -9225,28 +9226,28 @@ Index * makepen: Pens. (line 300) * map: Arrays. (line 141) * Margin: draw. (line 42) -* Margin3: three. (line 564) -* margins: three. (line 262) +* Margin3: three. (line 577) +* margins: three. (line 275) * Margins: draw. (line 42) -* Margins3: three. (line 564) -* mark: graph. (line 484) +* Margins3: three. (line 577) +* mark: graph. (line 485) * markangle: markers. (line 38) -* marker: graph. (line 484) +* marker: graph. (line 485) * markers: markers. (line 6) -* marknodes: graph. (line 484) -* markuniform: graph. (line 484) +* marknodes: graph. (line 485) +* markuniform: graph. (line 485) * mask: Data types. (line 33) * math: math. (line 6) * mathematical functions: Mathematical functions. (line 6) -* max <1>: three. (line 507) +* max <1>: three. (line 520) * max <2>: Arrays. (line 225) * max <3>: Frames and pictures. (line 7) * max: Paths and guides. (line 267) * maxbound: Data types. (line 106) -* maxtile: three. (line 210) +* maxtile: three. (line 223) * maxtimes: Paths and guides. (line 222) -* maxviewport: three. (line 210) +* maxviewport: three. (line 223) * MetaPost: MetaPost. (line 6) * MetaPost ... : Bezier curves. (line 67) * MetaPost cutafter: Paths and guides. (line 255) @@ -9255,12 +9256,12 @@ Index * MetaPost whatever: MetaPost. (line 10) * Microsoft Windows: Microsoft Windows. (line 6) * MidArcArrow: draw. (line 26) -* MidArcArrow3: three. (line 548) +* MidArcArrow3: three. (line 561) * MidArrow: draw. (line 26) -* MidArrow3: three. (line 548) +* MidArrow3: three. (line 561) * midpoint: Paths and guides. (line 169) * MidPoint: label. (line 56) -* min <1>: three. (line 507) +* min <1>: three. (line 520) * min <2>: Arrays. (line 218) * min <3>: Frames and pictures. (line 7) * min: Paths and guides. (line 263) @@ -9274,10 +9275,10 @@ Index * mode: Files. (line 75) * monotonic: graph. (line 37) * mouse: GUI. (line 6) -* mouse bindings: three. (line 137) +* mouse bindings: three. (line 150) * Move: Pens. (line 339) * MoveQuiet: Pens. (line 345) -* multisample: three. (line 127) +* multisample: three. (line 140) * multisampling: Compiling from UNIX source. (line 16) * N: Tutorial. (line 106) @@ -9296,35 +9297,35 @@ Index * NoFill <1>: Frames and pictures. (line 141) * NoFill: draw. (line 26) * NoMargin: draw. (line 42) -* NoMargin3: three. (line 564) +* NoMargin3: three. (line 577) * none: Files. (line 61) * None: draw. (line 19) -* normal: three. (line 493) -* nosafe: Options. (line 163) +* normal: three. (line 506) +* nosafe: Options. (line 164) * NOT: Arithmetic & logical. (line 80) * notaknot: graph. (line 37) * NoTicks: graph. (line 161) -* NoTicks3: graph3. (line 34) +* NoTicks3: graph3. (line 35) * null: Structures. (line 6) * nullpen <1>: Frames and pictures. (line 127) * nullpen: label. (line 14) -* NURBS: three. (line 363) -* O: three. (line 274) +* NURBS: three. (line 376) +* O: three. (line 287) * obj: obj. (line 9) -* oblique: three. (line 319) -* obliqueX: three. (line 327) -* obliqueY: three. (line 334) -* obliqueZ: three. (line 319) +* oblique: three. (line 332) +* obliqueX: three. (line 340) +* obliqueY: three. (line 347) +* obliqueZ: three. (line 332) * ode: ode. (line 9) -* offset <1>: Options. (line 168) +* offset <1>: Options. (line 169) * offset: Pens. (line 115) * OmitTick: graph. (line 239) * OmitTickInterval: graph. (line 239) * OmitTickIntervals: graph. (line 239) * opacity: Pens. (line 222) * open: Files. (line 12) -* OpenGL: three. (line 127) +* OpenGL: three. (line 140) * operator: User-defined operators. (line 6) * operator --: graph. (line 31) @@ -9340,12 +9341,12 @@ Index * OR: Arithmetic & logical. (line 80) * orientation: Frames and pictures. (line 95) -* orthographic: three. (line 338) -* outformat: three. (line 127) +* orthographic: three. (line 351) +* outformat: three. (line 140) * outprefix: Frames and pictures. (line 83) -* output <1>: Options. (line 143) +* output <1>: Options. (line 144) * output: Files. (line 36) -* OutTicks: graph3. (line 34) +* OutTicks: graph3. (line 35) * overloading functions: Functions. (line 44) * overwrite: Pens. (line 324) * P: Mathematical functions. @@ -9359,51 +9360,51 @@ Index * papertype: Configuring. (line 61) * paperwidth: Configuring. (line 61) * parallelogram: flowchart. (line 50) -* parametric surface: graph3. (line 100) -* parametrized curve: graph. (line 636) +* parametric surface: graph3. (line 101) +* parametrized curve: graph. (line 637) * partialsum: math. (line 53) * patch-dependent colors: three. (line 81) * path <1>: flowchart. (line 81) * path <2>: three. (line 43) * path: Paths and guides. (line 7) -* path markers: graph. (line 484) +* path markers: graph. (line 485) * path3: three. (line 6) * path[]: Tutorial. (line 134) * patterns <1>: patterns. (line 6) * patterns: Pens. (line 238) -* PDF: Options. (line 143) -* pdflatex: Options. (line 143) +* PDF: Options. (line 144) +* pdflatex: Options. (line 144) * pdfviewer: Configuring. (line 6) -* pdfviewerOptions: Options. (line 130) +* pdfviewerOptions: Options. (line 131) * pen: Pens. (line 6) * PenMargin: draw. (line 42) -* PenMargin2: three. (line 564) -* PenMargin3: three. (line 564) +* PenMargin2: three. (line 577) +* PenMargin3: three. (line 577) * PenMargins: draw. (line 42) -* PenMargins2: three. (line 564) -* PenMargins3: three. (line 564) +* PenMargins2: three. (line 577) +* PenMargins3: three. (line 577) * periodic: graph. (line 37) * perl: LaTeX usage. (line 30) * perpendicular: geometry. (line 6) -* perspective: three. (line 363) +* perspective: three. (line 376) * picture: Frames and pictures. (line 35) * picture alignment: Frames and pictures. (line 209) * piecewisestraight: Paths and guides. (line 81) -* pixel: three. (line 571) +* pixel: three. (line 584) * Pl: Mathematical functions. (line 48) * plain: plain. (line 6) * planar: three. (line 89) -* plane: three. (line 301) -* planeproject: three. (line 490) -* point <1>: three. (line 507) +* plane: three. (line 314) +* planeproject: three. (line 503) +* point <1>: three. (line 520) * point: Paths and guides. (line 84) * polar: Data types. (line 121) * polargraph: graph. (line 90) -* polygon: graph. (line 484) +* polygon: graph. (line 485) * pop: Arrays. (line 39) * Portrait: Frames and pictures. (line 95) -* postcontrol <1>: three. (line 507) +* postcontrol <1>: three. (line 520) * postcontrol: Paths and guides. (line 135) * postfix operators: Self & prefix operators. (line 19) @@ -9412,9 +9413,9 @@ Index * PostScript subpath: Tutorial. (line 134) * pow10: Mathematical functions. (line 6) -* prc: three. (line 231) +* prc: three. (line 244) * precision: Files. (line 92) -* precontrol <1>: three. (line 507) +* precontrol <1>: three. (line 520) * precontrol: Paths and guides. (line 128) * prefix operators: Self & prefix operators. (line 6) @@ -9424,7 +9425,7 @@ Index (line 6) * psview: Microsoft Windows. (line 16) * psviewer: Configuring. (line 6) -* psviewerOptions: Options. (line 130) +* psviewerOptions: Options. (line 131) * pt: Tutorial. (line 63) * public: Structures. (line 6) * push: Arrays. (line 39) @@ -9443,7 +9444,7 @@ Index * RadialShadeDraw: Frames and pictures. (line 163) * radians: Mathematical functions. (line 17) -* radius <1>: three. (line 507) +* radius <1>: three. (line 520) * radius: Paths and guides. (line 124) * Rainbow: palette. (line 12) * rand: Mathematical functions. @@ -9470,7 +9471,7 @@ Index * remainder: Mathematical functions. (line 6) * rename: Files. (line 151) -* render <1>: Options. (line 143) +* render <1>: Options. (line 144) * render: three. (line 47) * replace: Data types. (line 254) * resetdefaultpen: Pens. (line 353) @@ -9478,7 +9479,7 @@ Index * restore: Frames and pictures. (line 265) * restricted: Structures. (line 6) * return: Debugger. (line 48) -* reverse <1>: three. (line 507) +* reverse <1>: three. (line 520) * reverse <2>: Arrays. (line 146) * reverse <3>: Paths and guides. (line 172) * reverse: Data types. (line 250) @@ -9490,8 +9491,8 @@ Index * Right: graph. (line 287) * RightSide: label. (line 61) * RightTicks: graph. (line 161) -* RightView: three. (line 386) -* rotate: three. (line 458) +* RightView: three. (line 399) +* rotate: three. (line 471) * Rotate: label. (line 36) * Rotate(pair z): label. (line 39) * round: Mathematical functions. @@ -9505,25 +9506,25 @@ Index * runtime imports: Import. (line 98) * Russian: unicode. (line 7) * S: Tutorial. (line 106) -* safe: Options. (line 163) +* safe: Options. (line 164) * save: Frames and pictures. (line 262) * saveline: Files. (line 134) -* scale: three. (line 457) +* scale: three. (line 470) * Scale: graph. (line 698) * scale <1>: graph. (line 682) * scale <2>: Transforms. (line 39) * scale: Pens. (line 115) * Scale: label. (line 45) -* scale3: three. (line 454) +* scale3: three. (line 467) * scaled graph: graph. (line 663) -* scientific graph: graph. (line 396) +* scientific graph: graph. (line 397) * scroll: Files. (line 108) * search: Arrays. (line 164) * search paths: Search paths. (line 6) * Seascape: Frames and pictures. (line 100) -* secondary axis: graph. (line 813) -* secondaryX: graph. (line 813) -* secondaryY: graph. (line 813) +* secondary axis: graph. (line 812) +* secondaryX: graph. (line 812) +* secondaryY: graph. (line 812) * seconds: Data types. (line 306) * seek: Files. (line 92) * seekeof: Files. (line 92) @@ -9532,17 +9533,17 @@ Index * self operators: Self & prefix operators. (line 6) * sequence: Arrays. (line 128) -* settings <1>: Options. (line 115) +* settings <1>: Options. (line 116) * settings: Configuring. (line 23) * sgn: Mathematical functions. (line 26) * shading: fill. (line 32) -* shift <1>: three. (line 442) +* shift <1>: three. (line 455) * shift: Transforms. (line 27) * Shift: label. (line 33) * shiftless: Transforms. (line 53) * shipout: Frames and pictures. (line 83) -* showtarget: three. (line 338) +* showtarget: three. (line 351) * Si: Mathematical functions. (line 48) * signedint: Files. (line 75) @@ -9559,14 +9560,14 @@ Index * singlereal: Files. (line 75) * sinh: Mathematical functions. (line 6) -* SixViews: three. (line 401) -* SixViewsFR: three. (line 401) -* SixViewsUS: three. (line 401) -* size <1>: Options. (line 143) -* size <2>: three. (line 507) +* SixViews: three. (line 414) +* SixViewsFR: three. (line 414) +* SixViewsUS: three. (line 414) +* size <1>: Options. (line 144) +* size <2>: three. (line 520) * size <3>: Frames and pictures. (line 43) * size: Paths and guides. (line 70) -* size3: three. (line 259) +* size3: three. (line 272) * slant: Transforms. (line 45) * Slant: label. (line 42) * sleep: Data types. (line 351) @@ -9575,13 +9576,13 @@ Index * slide: slide. (line 6) * slope: math. (line 44) * slopefield: slopefield. (line 6) -* sndncn: Mathematical functions. +* sncndn: Mathematical functions. (line 48) * solid: Pens. (line 95) * solids: solids. (line 9) * solve: Arrays. (line 278) * sort: Arrays. (line 184) -* Spline <1>: graph3. (line 100) +* Spline <1>: graph3. (line 101) * Spline: graph. (line 34) * split: Data types. (line 263) * sqrt: Mathematical functions. @@ -9598,7 +9599,7 @@ Index * step: Debugger. (line 39) * stickframe: markers. (line 16) * stop: Debugger. (line 10) -* straight: three. (line 507) +* straight: three. (line 520) * Straight: graph. (line 31) * straight: Paths and guides. (line 77) * strftime: Data types. (line 298) @@ -9608,7 +9609,7 @@ Index * strptime: Data types. (line 306) * struct: Structures. (line 6) * structures: Structures. (line 6) -* subpath <1>: three. (line 507) +* subpath <1>: three. (line 520) * subpath: Paths and guides. (line 175) * subpictures: Frames and pictures. (line 103) * substr: Data types. (line 246) @@ -9617,11 +9618,11 @@ Index * superpath: Tutorial. (line 134) * Suppress: Pens. (line 331) * SuppressQuiet: Pens. (line 335) -* surface <1>: graph3. (line 100) +* surface <1>: graph3. (line 101) * surface: three. (line 47) -* SVG: Options. (line 143) +* SVG: Options. (line 144) * SVN: Subversion. (line 6) -* system <1>: Options. (line 163) +* system <1>: Options. (line 164) * system: Data types. (line 328) * syzygy: syzygy. (line 6) * tab: Files. (line 61) @@ -9632,35 +9633,36 @@ Index (line 6) * tanh: Mathematical functions. (line 6) -* target: three. (line 338) +* target: three. (line 351) * tell: Files. (line 92) * tension <1>: three. (line 6) * tension: Bezier curves. (line 56) * tensionSpecifier: Paths and guides. (line 388) * tensor product shading: fill. (line 74) * tensorshade: fill. (line 74) -* tex <1>: Options. (line 143) +* tessellation: three. (line 112) +* tex <1>: Options. (line 144) * tex: Frames and pictures. (line 278) * TeX fonts: Pens. (line 201) * TeX string: Data types. (line 181) * texcommand: Configuring. (line 67) * TeXHead: draw. (line 26) -* TeXHead3: three. (line 548) +* TeXHead3: three. (line 561) * texpath <1>: label. (line 115) * texpath: Configuring. (line 67) * texpreamble: Frames and pictures. (line 286) * texreset: Frames and pictures. (line 289) -* textbook graph: graph. (line 371) +* textbook graph: graph. (line 372) * tgz: UNIX binary distributions. (line 6) -* thick: three. (line 110) -* thin: three. (line 110) +* thick: three. (line 123) +* thin: three. (line 123) * this: Structures. (line 6) * three: three. (line 6) -* ThreeViews: three. (line 401) -* ThreeViewsFR: three. (line 401) -* ThreeViewsUS: three. (line 401) -* tick: graph. (line 342) +* ThreeViews: three. (line 414) +* ThreeViewsFR: three. (line 414) +* ThreeViewsUS: three. (line 414) +* tick: graph. (line 343) * Ticks: graph. (line 161) * ticks: graph. (line 161) * tildeframe: markers. (line 26) @@ -9670,31 +9672,32 @@ Index * time: Data types. (line 298) * times: Paths and guides. (line 209) * Top: graph. (line 137) -* TopView: three. (line 386) +* TopView: three. (line 399) * trace: Debugger. (line 51) * trailingzero: graph. (line 175) -* transform <1>: three. (line 482) +* transform <1>: three. (line 495) * transform: Transforms. (line 6) -* transform3: three. (line 437) +* transform3: three. (line 450) * transparency: Pens. (line 222) * transpose: Arrays. (line 205) * tree: tree. (line 9) * trembling: trembling. (line 6) * triangle: geometry. (line 6) +* triangles: three. (line 112) * triangulate: contour. (line 157) * tridiagonal: Arrays. (line 266) * trigonometric integrals: Mathematical functions. (line 48) * triple: Data types. (line 110) * TrueMargin: draw. (line 42) -* TrueMargin3: three. (line 564) +* TrueMargin3: three. (line 577) * tube <1>: tube. (line 6) -* tube: three. (line 110) +* tube: three. (line 123) * tutorial: Tutorial. (line 6) * type1cm: Pens. (line 178) * typedef <1>: Functions. (line 36) * typedef: Data types. (line 361) -* U3D: embed. (line 38) +* U3D: embed. (line 24) * undefined: Paths and guides. (line 271) * UnFill: Frames and pictures. (line 152) * unfill: fill. (line 106) @@ -9704,9 +9707,9 @@ Index * Uninstall: Uninstall. (line 6) * unique: math. (line 64) * unit: Data types. (line 80) -* unitbox <1>: three. (line 307) +* unitbox <1>: three. (line 320) * unitbox: Tutorial. (line 155) -* unitcircle <1>: three. (line 274) +* unitcircle <1>: three. (line 287) * unitcircle: Tutorial. (line 128) * unitrand: Mathematical functions. (line 39) @@ -9716,7 +9719,7 @@ Index (line 6) * unpacking: Rest arguments. (line 39) * unravel: Import. (line 30) -* up: three. (line 338) +* up: three. (line 351) * update: Files. (line 36) * UpsideDown: Frames and pictures. (line 95) * usepackage: Frames and pictures. (line 291) @@ -9729,17 +9732,17 @@ Index (line 63) * variable initializers: Variable initializers. (line 6) -* vectorfield: graph. (line 975) -* vectorfield3: graph3. (line 159) +* vectorfield: graph. (line 974) +* vectorfield3: graph3. (line 160) * vectorization: Arrays. (line 323) * verbatim: Frames and pictures. (line 271) * vertex-dependent colors: three. (line 81) * Vertical: flowchart. (line 81) * viewportheight: LaTeX usage. (line 51) -* viewportmargin: three. (line 262) -* viewportsize: three. (line 262) +* viewportmargin: three. (line 275) +* viewportsize: three. (line 275) * viewportwidth: LaTeX usage. (line 51) -* views: three. (line 231) +* views: three. (line 244) * vim: Editing modes. (line 33) * virtual functions: Structures. (line 181) * void: Data types. (line 10) @@ -9754,44 +9757,43 @@ Index * word: Arrays. (line 354) * write <1>: Arrays. (line 394) * write: Files. (line 53) -* X: three. (line 274) +* X: three. (line 287) * xasy: GUI. (line 6) * xaxis3: graph3. (line 7) * xdr: Files. (line 75) -* xelatex <1>: Options. (line 143) -* xelatex: embed. (line 10) +* xelatex: Options. (line 144) * xequals: graph. (line 294) * XEquals: graph. (line 280) -* xlimits: graph. (line 636) +* xlimits: graph. (line 637) * XOR: Arithmetic & logical. (line 80) * xpart: Data types. (line 91) * xscale: Transforms. (line 33) -* xscale3: three. (line 445) -* xtick: graph. (line 342) -* XY: three. (line 467) -* XYEquals: graph3. (line 20) -* XYZero: graph3. (line 20) -* XZEquals: graph3. (line 20) +* xscale3: three. (line 458) +* xtick: graph. (line 343) +* XY: three. (line 480) +* XYEquals: graph3. (line 21) +* XYZero: graph3. (line 21) +* XZEquals: graph3. (line 21) * XZero: graph. (line 275) -* XZZero: graph3. (line 20) -* Y <1>: three. (line 274) +* XZZero: graph3. (line 21) +* Y <1>: three. (line 287) * Y: Mathematical functions. (line 6) * yaxis3: graph3. (line 7) * yequals: graph. (line 294) * YEquals: graph. (line 130) -* ylimits: graph. (line 636) +* ylimits: graph. (line 637) * ypart: Data types. (line 94) * yscale: Transforms. (line 36) -* yscale3: three. (line 448) -* ytick: graph. (line 342) -* YX: three. (line 482) -* YZ: three. (line 482) -* YZEquals: graph3. (line 20) +* yscale3: three. (line 461) +* ytick: graph. (line 343) +* YX: three. (line 495) +* YZ: three. (line 495) +* YZEquals: graph3. (line 21) * YZero: graph. (line 125) -* YZZero: graph3. (line 20) -* Z: three. (line 274) +* YZZero: graph3. (line 21) +* Z: three. (line 287) * zaxis3: graph3. (line 7) * zero_Ai: Mathematical functions. (line 48) @@ -9807,9 +9809,9 @@ Index * zeta: Mathematical functions. (line 48) * zpart: Data types. (line 163) -* zscale3: three. (line 451) -* ZX: three. (line 482) -* ZY: three. (line 482) +* zscale3: three. (line 464) +* ZX: three. (line 495) +* ZY: three. (line 495) * |: Arithmetic & logical. (line 62) * ||: Arithmetic & logical. @@ -9849,115 +9851,115 @@ Node: Data types58494 Ref: format67691 Node: Paths and guides71944 Ref: circle72198 -Ref: extension81622 -Node: Pens88305 -Ref: fillrule95673 -Ref: basealign96570 -Ref: transparency99396 -Ref: makepen102839 -Ref: overwrite103677 -Node: Transforms104887 -Node: Frames and pictures106678 -Ref: envelope107819 -Ref: size108902 -Ref: unitsize109889 -Ref: shipout110949 -Ref: filltype113282 -Ref: add116419 -Ref: add about117365 -Ref: tex120303 -Node: Files121177 -Ref: cd122160 -Ref: scroll126834 -Node: Variable initializers129749 -Node: Structures132474 -Node: Operators139918 -Node: Arithmetic & logical140232 -Node: Self & prefix operators142205 -Node: User-defined operators142993 -Node: Implicit scaling143904 -Node: Functions144467 -Ref: stack overflow147220 -Node: Default arguments147784 -Node: Named arguments148523 -Node: Rest arguments151094 -Node: Mathematical functions154215 -Node: Arrays158880 -Ref: sort165869 -Ref: tridiagonal168273 -Ref: solve169501 -Node: Slices173694 -Node: Casts177584 -Node: Import179549 -Node: Static184786 -Node: LaTeX usage187680 -Node: Base modules194092 -Node: plain196592 -Node: simplex197244 -Node: math197517 -Node: interpolate200222 -Node: geometry200501 -Node: trembling201095 -Node: stats201446 -Node: patterns201706 -Node: markers201942 -Node: tree203725 -Node: binarytree203913 -Node: drawtree204502 -Node: syzygy204706 -Node: feynman204980 -Node: roundedpath205255 -Node: animation205538 -Ref: animate205958 -Node: embed207097 -Node: slide208700 -Node: MetaPost209040 -Node: unicode209756 -Node: latin1210644 -Node: babel211012 -Node: labelpath211241 -Node: labelpath3212061 -Node: annotate212372 -Node: CAD212843 -Node: graph213153 -Ref: ticks220282 -Ref: pathmarkers233576 -Ref: marker234041 -Ref: markuniform234392 -Ref: errorbars236183 -Ref: automatic scaling240239 -Node: palette250885 -Ref: images251003 -Ref: image255175 -Ref: logimage255653 -Ref: penimage256714 -Ref: penfunctionimage256935 -Node: three257659 -Ref: PostScript3D282639 -Node: obj284331 -Node: graph3284583 -Ref: GaussianSurface289708 -Node: grid3290812 -Node: solids291552 -Node: tube292500 -Node: flowchart294735 -Node: contour299304 -Node: contour3304429 -Node: slopefield304736 -Node: ode306173 -Node: Options306433 -Ref: configuration file312421 -Ref: settings312421 -Ref: convert313622 -Node: Interactive mode316589 -Ref: history318742 -Node: GUI320047 -Node: GUI installation320550 -Node: GUI usage321680 -Node: PostScript to Asymptote322583 -Node: Help323339 -Node: Debugger325075 -Node: Credits326860 -Node: Index327792 +Ref: extension81618 +Node: Pens88301 +Ref: fillrule95669 +Ref: basealign96566 +Ref: transparency99392 +Ref: makepen102835 +Ref: overwrite103673 +Node: Transforms104883 +Node: Frames and pictures106674 +Ref: envelope107815 +Ref: size108898 +Ref: unitsize109885 +Ref: shipout110945 +Ref: filltype113278 +Ref: add116415 +Ref: add about117361 +Ref: tex120299 +Node: Files121173 +Ref: cd122156 +Ref: scroll126830 +Node: Variable initializers129745 +Node: Structures132470 +Node: Operators139914 +Node: Arithmetic & logical140228 +Node: Self & prefix operators142201 +Node: User-defined operators142989 +Node: Implicit scaling143900 +Node: Functions144463 +Ref: stack overflow147216 +Node: Default arguments147780 +Node: Named arguments148519 +Node: Rest arguments151090 +Node: Mathematical functions154211 +Node: Arrays158876 +Ref: sort165865 +Ref: tridiagonal168269 +Ref: solve169497 +Node: Slices173690 +Node: Casts177580 +Node: Import179545 +Node: Static184782 +Node: LaTeX usage187676 +Node: Base modules194088 +Node: plain196588 +Node: simplex197240 +Node: math197513 +Node: interpolate200218 +Node: geometry200497 +Node: trembling201091 +Node: stats201442 +Node: patterns201702 +Node: markers201938 +Node: tree203721 +Node: binarytree203909 +Node: drawtree204529 +Node: syzygy204733 +Node: feynman205007 +Node: roundedpath205282 +Node: animation205565 +Ref: animate205985 +Node: embed207124 +Node: slide208151 +Node: MetaPost208491 +Node: unicode209207 +Node: latin1210095 +Node: babel210463 +Node: labelpath210692 +Node: labelpath3211512 +Node: annotate211823 +Node: CAD212294 +Node: graph212604 +Ref: ticks219733 +Ref: pathmarkers233060 +Ref: marker233525 +Ref: markuniform233876 +Ref: errorbars235667 +Ref: automatic scaling239704 +Node: palette250333 +Ref: images250451 +Ref: image254623 +Ref: logimage255101 +Ref: penimage256162 +Ref: penfunctionimage256383 +Node: three257107 +Ref: PostScript3D282792 +Node: obj284484 +Node: graph3284736 +Ref: GaussianSurface289891 +Node: grid3290995 +Node: solids291735 +Node: tube292683 +Node: flowchart294918 +Node: contour299487 +Node: contour3304612 +Node: slopefield304919 +Node: ode306356 +Node: Options306616 +Ref: configuration file312661 +Ref: settings312661 +Ref: convert313862 +Node: Interactive mode316829 +Ref: history318982 +Node: GUI320287 +Node: GUI installation320790 +Node: GUI usage321920 +Node: PostScript to Asymptote322823 +Node: Help323579 +Node: Debugger325315 +Node: Credits327100 +Node: Index328032 End Tag Table diff --git a/Master/texmf-dist/tex/latex/asymptote/asymptote.sty b/Master/texmf-dist/tex/latex/asymptote/asymptote.sty index 4433f6d607e..4a2f484caad 100644 --- a/Master/texmf-dist/tex/latex/asymptote/asymptote.sty +++ b/Master/texmf-dist/tex/latex/asymptote/asymptote.sty @@ -17,7 +17,7 @@ %% Licence: GPL2+ %% \ProvidesPackage{asymptote} - [2011/11/29 v1.26 Asymptote style file for LaTeX] + [2012/08/25 v1.27 Asymptote style file for LaTeX] \def\Asymptote{{\tt Asymptote}} \InputIfFileExists{\jobname.pre}{}{} \newbox\ASYbox @@ -345,6 +345,7 @@ }% }{% \PackageWarning{asymptote}{file #2 not found}% + \def\@tempa{}% }% }% \immediate\write\AsyStream{\unexpanded\expandafter{\@tempa}}% diff --git a/Master/texmf-dist/tex/latex/asymptote/ocg.sty b/Master/texmf-dist/tex/latex/asymptote/ocg.sty index 3ba555b58e8..87da828a8d2 100644 --- a/Master/texmf-dist/tex/latex/asymptote/ocg.sty +++ b/Master/texmf-dist/tex/latex/asymptote/ocg.sty @@ -1,8 +1,10 @@ %% Copyright (C) 2007 by Michael Ritzert <michael.ritz...@gmail.com> %% Spurious spaces removed by John Bowman [2009/06/01]. +%% Global macros to find the number of a PDF OCG object from its LaTeX +%% reference contributed by Paul Gaborit [2012/09/13]. \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{ocg}[2009/06/01] +\ProvidesPackage{ocg}[2012/09/13] \RequirePackage{ifpdf} \ifpdf @@ -37,6 +39,7 @@ \expandafter\gdef\csname OCG#2\endcsname{#1}% \immediate\pdfobj{<< /Type /OCG /Name (#1) >>}% new ocg \xdef\@ocg@curocg{\the\pdflastobj\space 0 R}% reference to id + \expandafter\xdef\csname OCGpdfobj#2\endcsname{\@ocg@curocg} \xdef\@ocg@ocgs{\@ocg@ocgs\space\@ocg@curocg}% list of all OCGs in "first defined" order \ifnum#3=1 %on \xdef\@ocg@ocgson{\@ocg@ocgson\space\@ocg@curocg}% list of all default-on OCGs |