diff options
44 files changed, 934 insertions, 1030 deletions
diff --git a/Build/source/utils/README b/Build/source/utils/README index 42edab08b79..6c8264c123c 100644 --- a/Build/source/utils/README +++ b/Build/source/utils/README @@ -5,7 +5,7 @@ You may freely use, modify and/or distribute this file. Extra utilities we (optionally) compile for TeX Live. See comments in ../texk/README. -asymptote 1.87 - checked 28sep09 +asymptote 1.88 - checked 2oct09 update to TL from CTAN, to include prebuilt doc. see http://tug.org/texlive/build.html#asymptote and tlpkg/bin/tl-update/asy diff --git a/Build/source/utils/asymptote/ChangeLog b/Build/source/utils/asymptote/ChangeLog index 54adba06d51..c2a47bd33f9 100644 --- a/Build/source/utils/asymptote/ChangeLog +++ b/Build/source/utils/asymptote/ChangeLog @@ -1,4 +1,129 @@ ------------------------------------------------------------------------ +r4696 | jcbowman | 2009-10-02 01:25:43 -0600 (Fri, 02 Oct 2009) | 2 lines +Changed paths: + M /trunk/asymptote/prc/oPRCFile.cc + M /trunk/asymptote/prc/oPRCFile.h + +Remove obsolete part name code. + +------------------------------------------------------------------------ +r4695 | jcbowman | 2009-10-01 21:52:36 -0600 (Thu, 01 Oct 2009) | 2 lines +Changed paths: + M /trunk/asymptote/doc/bigdiagonal.asy + +Add Arrow to tutorial example. + +------------------------------------------------------------------------ +r4694 | jcbowman | 2009-10-01 21:45:34 -0600 (Thu, 01 Oct 2009) | 2 lines +Changed paths: + M /trunk/asymptote/asymptote.spec + M /trunk/asymptote/base/three.asy + M /trunk/asymptote/drawsurface.cc + +Store center values in a lookup table. + +------------------------------------------------------------------------ +r4693 | jcbowman | 2009-10-01 17:37:30 -0600 (Thu, 01 Oct 2009) | 6 lines +Changed paths: + M /trunk/asymptote/base/three.asy + M /trunk/asymptote/base/three_surface.asy + M /trunk/asymptote/doc/asymptote.texi + M /trunk/asymptote/drawelement.h + M /trunk/asymptote/drawpath3.cc + M /trunk/asymptote/drawpath3.h + M /trunk/asymptote/drawsurface.cc + M /trunk/asymptote/drawsurface.h + M /trunk/asymptote/examples/billboard.asy + D /trunk/asymptote/examples/icosahedron.asy + A /trunk/asymptote/examples/truncatedIcosahedron.asy (from /trunk/asymptote/examples/icosahedron.asy:4690) + M /trunk/asymptote/picture.cc + M /trunk/asymptote/picture.h + M /trunk/asymptote/runpicture.in + M /trunk/asymptote/settings.cc + +Implement PRC billboard labels. + +Rename settings.billboard to settings.autobillboard. + +Make settings.autobillboard=true by default. + +------------------------------------------------------------------------ +r4692 | jcbowman | 2009-09-29 17:09:51 -0600 (Tue, 29 Sep 2009) | 2 lines +Changed paths: + M /trunk/asymptote/doc/asymptote.texi + A /trunk/asymptote/doc/bigdiagonal.asy + D /trunk/asymptote/doc/bigsquare.asy + M /trunk/asymptote/doc/labelsquare.asy + M /trunk/asymptote/doc/square.asy + +Improve tutorial. + +------------------------------------------------------------------------ +r4691 | jcbowman | 2009-09-29 14:59:26 -0600 (Tue, 29 Sep 2009) | 2 lines +Changed paths: + M /trunk/asymptote/doc/asymptote.texi + M /trunk/asymptote/examples/slidedemo.asy + +Improve tutorial. + +------------------------------------------------------------------------ +r4690 | jcbowman | 2009-09-29 10:07:11 -0600 (Tue, 29 Sep 2009) | 2 lines +Changed paths: + A /trunk/asymptote/examples/icosahedron.asy + A /trunk/asymptote/examples/worksheet.asy + +Add examples. + +------------------------------------------------------------------------ +r4689 | jcbowman | 2009-09-28 19:42:07 -0600 (Mon, 28 Sep 2009) | 4 lines +Changed paths: + M /trunk/asymptote/base/three.asy + M /trunk/asymptote/drawsurface.cc + M /trunk/asymptote/main.cc + M /trunk/asymptote/runarray.in + +Fix compilation under -disable-gl. + +Fix billboard size computation. + +------------------------------------------------------------------------ +r4688 | jcbowman | 2009-09-28 14:27:52 -0600 (Mon, 28 Sep 2009) | 2 lines +Changed paths: + A /trunk/asymptote/examples/fequlogo.asy + +Add example of arbitrary 3D background plane. + +------------------------------------------------------------------------ +r4687 | jcbowman | 2009-09-28 14:21:07 -0600 (Mon, 28 Sep 2009) | 4 lines +Changed paths: + M /trunk/asymptote/base/three_surface.asy + M /trunk/asymptote/examples/Klein.asy + +Cache meshpen, knot, weight, and color arrays. + +Change bottom=false argument to bottom=true. + +------------------------------------------------------------------------ +r4686 | jcbowman | 2009-09-28 13:39:58 -0600 (Mon, 28 Sep 2009) | 2 lines +Changed paths: + M /trunk/asymptote/picture.cc + +Clean up auxiliary dvi file when producing SVG. + +------------------------------------------------------------------------ +r4685 | jcbowman | 2009-09-28 10:16:08 -0600 (Mon, 28 Sep 2009) | 2 lines +Changed paths: + M /trunk/asymptote/base/obj.asy + +Add operator * (transform3, obj). + +------------------------------------------------------------------------ +r4684 | jcbowman | 2009-09-28 03:39:58 -0600 (Mon, 28 Sep 2009) | 1 line +Changed paths: + M /trunk/asymptote/configure.ac + +Increment version to 1.88svn. +------------------------------------------------------------------------ r4683 | jcbowman | 2009-09-28 01:57:28 -0600 (Mon, 28 Sep 2009) | 2 lines Changed paths: M /trunk/asymptote/glrender.cc diff --git a/Build/source/utils/asymptote/ReleaseNotes b/Build/source/utils/asymptote/ReleaseNotes index 17a4e9ccd6f..f5ca14b310f 100644 --- a/Build/source/utils/asymptote/ReleaseNotes +++ b/Build/source/utils/asymptote/ReleaseNotes @@ -1,3 +1,14 @@ +Release Notes for Version 1.88 + +Compilation without OpenGL was fixed. PRC billboard labels were +implemented; settings.billboard was renamed to settings.autobillboard +and by default enabled for all 3D labels. The surface constructor for +embedding labels on surfaces now draws both the top and bottom faces by +default. The meshpen, knot, weight, and color arrays are now properly cached. +The example fequlogo.asy illustrates how to draw an arbitrary 3D background +plane. The intermediate dvi file is now removed when producing SVG output. +Improvements were made to the tutorial. + Release Notes for Version 1.87 Support for SVG output was added (requires dvisvgm-0.8.4). Billboard diff --git a/Build/source/utils/asymptote/asy-keywords.el b/Build/source/utils/asymptote/asy-keywords.el index 7df3abc56d0..d3704119f9b 100644 --- a/Build/source/utils/asymptote/asy-keywords.el +++ b/Build/source/utils/asymptote/asy-keywords.el @@ -2,7 +2,7 @@ ;; This file is automatically generated by asy-list.pl. ;; Changes will be overwritten. ;; -(defvar asy-keywords-version "1.86") +(defvar asy-keywords-version "1.88") (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 TreeNode abscissa arc arrowhead binarytree binarytreeNode block bool bool3 bounds bqe circle conic coord coordsys cputime ellipse file filltype frame grid3 guide horner hsv hyperbola indexedTransform int inversion key light line linefit marginT marker mass object pair parabola path path3 pen picture point position projection real revolution scaleT scientific segment side slice splitface string surface tensionSpecifier ticklocate ticksgridT tickvalues transform transformation tree triangle trilinear triple vector vertex void )) (defvar asy-function-name '( -AND Arc ArcArrow ArcArrows Arrow Arrows Automatic AvantGarde BBox BWRainbow BWRainbow2 Bar Bars BeginArcArrow BeginArrow BeginBar BeginDotMargin BeginMargin BeginPenMargin Blank Bookman Bottom BottomTop Bounds Break Broken BrokenLog Ceil Circle CircleBarIntervalMarker Cos Courier CrossIntervalMarker DefaultFormat DefaultLogFormat Degrees Dir DotMargin DotMargins Dotted Draw Drawline Embed EndArcArrow EndArrow EndBar EndDotMargin EndMargin EndPenMargin Fill FillDraw Floor Format Full Gaussian Gaussrand Gaussrandpair Gradient Grayscale Helvetica Hermite HookHead InOutTicks InTicks J Label Landscape Left LeftRight LeftTicks Legend Linear Link Log LogFormat Margin Margins Mark MidArcArrow MidArrow NOT NewCenturySchoolBook NoBox NoMargin NoModifier NoTicks NoTicks3 NoZero NoZeroFormat None OR OmitFormat OmitTick OutTicks Ox Oy Palatino PaletteTicks Pen PenMargin PenMargins Pentype Portrait RadialShade Rainbow Range Relative Right RightTicks Rotate Round SQR Scale ScaleX ScaleY ScaleZ Seascape Shift Sin Slant Spline StickIntervalMarker Straight Symbol Tan TeXify Ticks Ticks3 TildeIntervalMarker TimesRoman Top TrueMargin UnFill UpsideDown Wheel X XEquals XOR XY XYEquals XYZero XYgrid XZEquals XZZero XZero XZgrid Y YEquals YXgrid YZ YZEquals YZZero YZero YZgrid Z ZX ZXgrid ZYgrid ZapfChancery ZapfDingbats _cputime _draw _eval _image _labelpath _strokepath _texpath aCos aSin aTan abort abs accel acos acosh acot acsc add addArrow addMargins addSaveFunction addnode addnodes addpenarc addpenline addseg adjust alias align all altitude angabscissa angle angpoint animate annotate anticomplementary antipedal apply approximate arc arcarrowsize arccircle arcdir arcfromcenter arcfromfocus arclength arcnodesnumber arcpoint arcsubtended arcsubtendedcenter arctime arctopath array arrow arrow2 arrowbase arrowbasepoints arrowsize asec asin asinh ask assert asy asycode asydir asyfigure asyfilecode asyinclude asywrite atan atan2 atanh atbreakpoint atexit atime attach attract atupdate autoformat autoscale autoscale3 axes axes3 axialshade axis axiscoverage azimuth babel background bangles bar barmarksize barsize basealign baseline bbox beep begin beginclip begingroup beginpoint between bevel bezier bezierP bezierPP bezierPPP bezulate bibliography bibliographystyle binarytree binarytreeNode binomial binput bins bisector bisectorpoint blend boutput box bqe breakpoint breakpoints brick buildRestoreDefaults buildRestoreThunk buildcycle bulletcolor canonical canonicalcartesiansystem cartesiansystem case1 case2 case3 cbrt cd ceil center centerToFocus centroid cevian change2 changecoordsys checkSegment checkconditionlength checker checklengths checkposition checktriangle choose circle circlebarframe circlemarkradius circlenodesnumber circumcenter circumcircle clamped clear clip clipdraw close cmyk code colatitude collect collinear color colorless colors colorspace comma compassmark complement complementary concat concurrent cone conic conicnodesnumber conictype conj connect containmentTree contains contour contour3 controlSpecifier convert coordinates coordsys copy cos cosh cot countIntersections cputime crop cropcode cross crossframe crosshatch crossmarksize csc cubicroots curabscissa curlSpecifier curpoint currentarrow currentexitfunction currentmomarrow currentpolarconicroutine curve cut cutafter cutbefore cyclic cylinder debugger deconstruct defaultdir defaultformat defaultpen defined degenerate degrees delete deletepreamble determinant diagonal diamond diffdiv dir dirSpecifier dirtime display distance divisors do_overpaint dot dotframe dotsize downcase draw drawAll drawDoubleLine drawFermion drawGhost drawGluon drawMomArrow drawPhoton drawScalar drawVertex drawVertexBox drawVertexBoxO drawVertexBoxX drawVertexO drawVertexOX drawVertexTriangle drawVertexTriangleO drawVertexX drawarrow drawarrow2 drawline drawtick duplicate elle ellipse ellipsenodesnumber embed embed3 empty enclose end endScript endclip endgroup endl endpoint endpoints eof eol equation equations erase erasestep erf erfc error errorbar errorbars eval excenter excircle exit exitXasyMode exitfunction exp expfactors expi expm1 exradius extend extension extouch fabs factorial fermat fft fhorner figure file filecode fill filldraw filloutside fillrule filltype find finite finiteDifferenceJacobian firstcut firstframe fit fit2 fixedscaling floor flush fmdefaults fmod focusToCenter font fontcommand fontsize foot format frac frequency fromCenter fromFocus fspline functionshade gamma generate_random_backtrace generateticks gergonne getc getint getpair getreal getstring gettriple gluon gouraudshade graph graphic gray grestore grid grid3 gsave halfbox hatch hdiffdiv hermite hex histogram history hline hprojection hsv hyperbola hyperbolanodesnumber hyperlink hypot identity image incenter incentral incircle increasing incrementposition indexedTransform indexedfigure initXasyMode initdefaults input inradius insert inside integrate interactive interior interp interpolate intersect intersection intersectionpoint intersectionpoints intersections intouch inverse inversion invisible is3D isDuplicate isogonal isogonalconjugate isotomic isotomicconjugate isparabola italic item key kurtosis kurtosisexcess label labelaxis labelmargin labelpath labels labeltick labelx labelx3 labely labely3 labelz labelz3 lastcut latex latitude latticeshade layer layout ldexp leastsquares legend legenditem length lift light limits line linear linecap lineinversion linejoin linemargin lineskip linetype linewidth link list lm_enorm lm_evaluate_default lm_lmdif lm_lmpar lm_minimize lm_print_default lm_print_quiet lm_qrfac lm_qrsolv locale locate locatefile location log log10 log1p logaxiscoverage longitude lookup magnetize makeNode makedraw makepen map margin markangle markangleradius markanglespace markarc marker markinterval marknodes markrightangle markuniform mass masscenter massformat math max max3 maxbezier maxbound maxcoords maxlength maxratio maxtimes mean medial median midpoint min min3 minbezier minbound minipage minratio mintimes miterlimit momArrowPath momarrowsize monotonic multifigure nativeformat natural needshipout newl newpage newslide newton newtree nextframe nextnormal nextpage nib nodabscissa none norm normalvideo notaknot nowarn numberpage nurb object offset onpath opacity opposite orientation orig_circlenodesnumber orig_circlenodesnumber1 orig_draw orig_ellipsenodesnumber orig_ellipsenodesnumber1 orig_hyperbolanodesnumber orig_parabolanodesnumber origin orthic orthocentercenter outformat outline outprefix output overloadedMessage overwrite pack pad pairs palette parabola parabolanodesnumber parallel partialsum path path3 pattern pause pdf pedal periodic perp perpendicular perpendicularmark phantom phi1 phi2 phi3 photon piecewisestraight point polar polarconicroutine polargraph polygon postcontrol postscript pow10 ppoint prc prc0 precision precontrol prepend print_random_addresses project projection purge pwhermite quadrant quadraticroots quantize quarticroots quotient radialshade radians radicalcenter radicalline radius rand randompath rd readline realmult realquarticroots rectangle rectangular rectify reflect relabscissa relative relativedistance reldir relpoint reltime remainder remark removeDuplicates rename replace report resetdefaultpen restore restoredefaults reverse reversevideo rf rfind rgb rgba rgbint rms rotate rotateO rotation round roundbox roundedpath roundrectangle samecoordsys sameside sample save savedefaults saveline scale scale3 scaleO scaleT scaleless scientific search searchtree sec secondaryX secondaryY seconds section sector seek seekeof segment sequence setpens sgn sgnd sharpangle sharpdegrees shift shiftless shipout shipout3 show side simeq simpson sin single sinh size size3 skewness skip slant sleep slope slopefield solve solveBVP sort sourceline sphere split sqrt square srand standardizecoordsys startScript startTrembling stdev step stickframe stickmarksize stickmarkspace stop straight straightness string stripdirectory stripextension stripfile strokepath subdivide subitem subpath substr sum surface symmedial symmedian system tab tableau tan tangent tangential tangents tanh tell tensionSpecifier tensorshade tex texcolor texify texpath texpreamble texreset texshipout texsize textpath thick thin tick tickMax tickMax3 tickMin tickMin3 ticklabelshift ticklocate tildeframe tildemarksize tile tiling time times title titlepage topbox transform transformation transpose tremble trembleFuzz tremble_circlenodesnumber tremble_circlenodesnumber1 tremble_draw tremble_ellipsenodesnumber tremble_ellipsenodesnumber1 tremble_hyperbolanodesnumber tremble_marknodes tremble_markuniform tremble_parabolanodesnumber triangle triangleAbc triangleabc triangulate tricoef tridiagonal trilinear trim trueMagnetize truepoint tube uncycle unfill uniform unit unitrand unitsize unityroot unstraighten upcase updatefunction uperiodic upscale uptodate usepackage usersetting usetypescript usleep value variance variancebiased vbox vector vectorfield verbatim view vline vperiodic vprojection warn warning windingnumber write xaxis xaxis3 xaxis3At xaxisAt xequals xinput xlimits xoutput xpart xscale xscaleO xtick xtick3 xtrans yaxis yaxis3 yaxis3At yaxisAt yequals ylimits ypart yscale yscaleO ytick ytick3 ytrans zaxis3 zaxis3At zero zero3 zlimits zpart ztick ztick3 ztrans )) +AND Arc ArcArrow ArcArrows Arrow Arrows Automatic AvantGarde BBox BWRainbow BWRainbow2 Bar Bars BeginArcArrow BeginArrow BeginBar BeginDotMargin BeginMargin BeginPenMargin Blank Bookman Bottom BottomTop Bounds Break Broken BrokenLog Ceil Circle CircleBarIntervalMarker Cos Courier CrossIntervalMarker DefaultFormat DefaultLogFormat Degrees Dir DotMargin DotMargins Dotted Draw Drawline Embed EndArcArrow EndArrow EndBar EndDotMargin EndMargin EndPenMargin Fill FillDraw Floor Format Full Gaussian Gaussrand Gaussrandpair Gradient Grayscale Helvetica Hermite HookHead InOutTicks InTicks J Label Landscape Left LeftRight LeftTicks Legend Linear Link Log LogFormat Margin Margins Mark MidArcArrow MidArrow NOT NewCenturySchoolBook NoBox NoMargin NoModifier NoTicks NoTicks3 NoZero NoZeroFormat None OR OmitFormat OmitTick OutTicks Ox Oy Palatino PaletteTicks Pen PenMargin PenMargins Pentype Portrait RadialShade Rainbow Range Relative Right RightTicks Rotate Round SQR Scale ScaleX ScaleY ScaleZ Seascape Shift Sin Slant Spline StickIntervalMarker Straight Symbol Tan TeXify Ticks Ticks3 TildeIntervalMarker TimesRoman Top TrueMargin UnFill UpsideDown Wheel X XEquals XOR XY XYEquals XYZero XYgrid XZEquals XZZero XZero XZgrid Y YEquals YXgrid YZ YZEquals YZZero YZero YZgrid Z ZX ZXgrid ZYgrid ZapfChancery ZapfDingbats _cputime _draw _eval _image _labelpath _projection _strokepath _texpath aCos aSin aTan abort abs accel acos acosh acot acsc add addArrow addMargins addSaveFunction addnode addnodes addpenarc addpenline addseg adjust alias align all altitude angabscissa angle angpoint animate annotate anticomplementary antipedal apply approximate arc arcarrowsize arccircle arcdir arcfromcenter arcfromfocus arclength arcnodesnumber arcpoint arcsubtended arcsubtendedcenter arctime arctopath array arrow arrow2 arrowbase arrowbasepoints arrowsize asec asin asinh ask assert asy asycode asydir asyfigure asyfilecode asyinclude asywrite atan atan2 atanh atbreakpoint atexit atime attach attract atupdate autoformat autoscale autoscale3 axes axes3 axialshade axis axiscoverage azimuth babel background bangles bar barmarksize barsize basealign baseline bbox beep begin beginclip begingroup beginpoint between bevel bezier bezierP bezierPP bezierPPP bezulate bibliography bibliographystyle binarytree binarytreeNode binomial binput bins bisector bisectorpoint blend boutput box bqe breakpoint breakpoints brick buildRestoreDefaults buildRestoreThunk buildcycle bulletcolor canonical canonicalcartesiansystem cartesiansystem case1 case2 case3 cbrt cd ceil center centerToFocus centroid cevian change2 changecoordsys checkSegment checkconditionlength checker checklengths checkposition checktriangle choose circle circlebarframe circlemarkradius circlenodesnumber circumcenter circumcircle clamped clear clip clipdraw close cmyk code colatitude collect collinear color colorless colors colorspace comma compassmark complement complementary concat concurrent cone conic conicnodesnumber conictype conj connect containmentTree contains contour contour3 controlSpecifier convert coordinates coordsys copy cos cosh cot countIntersections cputime crop cropcode cross crossframe crosshatch crossmarksize csc cubicroots curabscissa curlSpecifier curpoint currentarrow currentexitfunction currentmomarrow currentpolarconicroutine curve cut cutafter cutbefore cyclic cylinder debugger deconstruct defaultdir defaultformat defaultpen defined degenerate degrees delete deletepreamble determinant diagonal diamond diffdiv dir dirSpecifier dirtime display distance divisors do_overpaint dot dotframe dotsize downcase draw drawAll drawDoubleLine drawFermion drawGhost drawGluon drawMomArrow drawPhoton drawScalar drawVertex drawVertexBox drawVertexBoxO drawVertexBoxX drawVertexO drawVertexOX drawVertexTriangle drawVertexTriangleO drawVertexX drawarrow drawarrow2 drawline drawtick duplicate elle ellipse ellipsenodesnumber embed embed3 empty enclose end endScript endclip endgroup endl endpoint endpoints eof eol equation equations erase erasestep erf erfc error errorbar errorbars eval excenter excircle exit exitXasyMode exitfunction exp expfactors expi expm1 exradius extend extension extouch fabs factorial fermat fft fhorner figure file filecode fill filldraw filloutside fillrule filltype find finite finiteDifferenceJacobian firstcut firstframe fit fit2 fixedscaling floor flush fmdefaults fmod focusToCenter font fontcommand fontsize foot format frac frequency fromCenter fromFocus fspline functionshade gamma generate_random_backtrace generateticks gergonne getc getint getpair getreal getstring gettriple gluon gouraudshade graph graphic gray grestore grid grid3 gsave halfbox hatch hdiffdiv hermite hex histogram history hline hprojection hsv hyperbola hyperbolanodesnumber hyperlink hypot identity image incenter incentral incircle increasing incrementposition indexedTransform indexedfigure initXasyMode initdefaults input inradius insert inside integrate interactive interior interp interpolate intersect intersection intersectionpoint intersectionpoints intersections intouch inverse inversion invisible is3D isDuplicate isogonal isogonalconjugate isotomic isotomicconjugate isparabola italic item key kurtosis kurtosisexcess label labelaxis labelmargin labelpath labels labeltick labelx labelx3 labely labely3 labelz labelz3 lastcut latex latitude latticeshade layer layout ldexp leastsquares legend legenditem length lift light limits line linear linecap lineinversion linejoin linemargin lineskip linetype linewidth link list lm_enorm lm_evaluate_default lm_lmdif lm_lmpar lm_minimize lm_print_default lm_print_quiet lm_qrfac lm_qrsolv locale locate locatefile location log log10 log1p logaxiscoverage longitude lookup magnetize makeNode makedraw makepen map margin markangle markangleradius markanglespace markarc marker markinterval marknodes markrightangle markuniform mass masscenter massformat math max max3 maxbezier maxbound maxcoords maxlength maxratio maxtimes mean medial median midpoint min min3 minbezier minbound minipage minratio mintimes miterlimit momArrowPath momarrowsize monotonic multifigure nativeformat natural needshipout newl newpage newslide newton newtree nextframe nextnormal nextpage nib nodabscissa none norm normalvideo notaknot nowarn numberpage nurb object offset onpath opacity opposite orientation orig_circlenodesnumber orig_circlenodesnumber1 orig_draw orig_ellipsenodesnumber orig_ellipsenodesnumber1 orig_hyperbolanodesnumber orig_parabolanodesnumber origin orthic orthocentercenter outformat outline outprefix output overloadedMessage overwrite pack pad pairs palette parabola parabolanodesnumber parallel partialsum path path3 pattern pause pdf pedal periodic perp perpendicular perpendicularmark phantom phi1 phi2 phi3 photon piecewisestraight point polar polarconicroutine polargraph polygon postcontrol postscript pow10 ppoint prc prc0 precision precontrol prepend print_random_addresses project projection purge pwhermite quadrant quadraticroots quantize quarticroots quotient radialshade radians radicalcenter radicalline radius rand randompath rd readline realmult realquarticroots rectangle rectangular rectify reflect relabscissa relative relativedistance reldir relpoint reltime remainder remark removeDuplicates rename replace report resetdefaultpen restore restoredefaults reverse reversevideo rf rfind rgb rgba rgbint rms rotate rotateO rotation round roundbox roundedpath roundrectangle samecoordsys sameside sample save savedefaults saveline scale scale3 scaleO scaleT scaleless scientific search searchtree sec secondaryX secondaryY seconds section sector seek seekeof segment sequence setpens sgn sgnd sharpangle sharpdegrees shift shiftless shipout shipout3 show side simeq simpson sin single sinh size size3 skewness skip slant sleep slope slopefield solve solveBVP sort sourceline sphere split sqrt square srand standardizecoordsys startScript startTrembling stdev step stickframe stickmarksize stickmarkspace stop straight straightness string stripdirectory stripextension stripfile strokepath subdivide subitem subpath substr sum surface symmedial symmedian system tab tableau tan tangent tangential tangents tanh tell tensionSpecifier tensorshade tex texcolor texify texpath texpreamble texreset texshipout texsize textpath thick thin tick tickMax tickMax3 tickMin tickMin3 ticklabelshift ticklocate tildeframe tildemarksize tile tiling time times title titlepage topbox transform transformation transpose tremble trembleFuzz tremble_circlenodesnumber tremble_circlenodesnumber1 tremble_draw tremble_ellipsenodesnumber tremble_ellipsenodesnumber1 tremble_hyperbolanodesnumber tremble_marknodes tremble_markuniform tremble_parabolanodesnumber triangle triangleAbc triangleabc triangulate tricoef tridiagonal trilinear trim trueMagnetize truepoint tube uncycle unfill uniform unit unitrand unitsize unityroot unstraighten upcase updatefunction uperiodic upscale uptodate usepackage usersetting usetypescript usleep value variance variancebiased vbox vector vectorfield verbatim view vline vperiodic vprojection warn warning windingnumber write xaxis xaxis3 xaxis3At xaxisAt xequals xinput xlimits xoutput xpart xscale xscaleO xtick xtick3 xtrans yaxis yaxis3 yaxis3At yaxisAt yequals ylimits ypart yscale yscaleO ytick ytick3 ytrans zaxis3 zaxis3At zero zero3 zlimits zpart ztick ztick3 ztrans )) (defvar asy-variable-name '( AliceBlue Align Allow AntiqueWhite Apricot Aqua Aquamarine Aspect Azure BeginPoint Beige Bisque Bittersweet Black BlanchedAlmond Blue BlueGreen BlueViolet Both Break BrickRed Brown BurlyWood BurntOrange CCW CW CadetBlue CarnationPink Center Centered Cerulean Chartreuse Chocolate Coeff Coral CornflowerBlue Cornsilk Crimson Crop Cyan Dandelion DarkBlue DarkCyan DarkGoldenrod DarkGray DarkGreen DarkKhaki DarkMagenta DarkOliveGreen DarkOrange DarkOrchid DarkRed DarkSalmon DarkSeaGreen DarkSlateBlue DarkSlateGray DarkTurquoise DarkViolet DeepPink DeepSkyBlue DefaultHead DimGray DodgerBlue Dotted Draw E ENE EPS ESE E_Euler E_PC E_RK2 E_RK3BS Emerald EndPoint Euler Fill FillDraw FireBrick FloralWhite ForestGreen Fuchsia Gainsboro GhostWhite Gold Goldenrod Gray Green GreenYellow Honeydew HookHead Horizontal HotPink I IgnoreAspect IndianRed Indigo Ivory JOIN_IN JOIN_OUT JungleGreen Khaki LM_DWARF LM_MACHEP LM_SQRT_DWARF LM_SQRT_GIANT LM_USERTOL Label Lavender LavenderBlush LawnGreen LeftJustified LeftSide LemonChiffon LightBlue LightCoral LightCyan LightGoldenrodYellow LightGreen LightGrey LightPink LightSalmon LightSeaGreen LightSkyBlue LightSlateGray LightSteelBlue LightYellow Lime LimeGreen Linear Linen Log Logarithmic Magenta Mahogany Mark MarkFill Maroon Max MediumAquamarine MediumBlue MediumOrchid MediumPurple MediumSeaGreen MediumSlateBlue MediumSpringGreen MediumTurquoise MediumVioletRed Melon MidPoint MidnightBlue Min MintCream MistyRose Moccasin Move MoveQuiet Mulberry N NE NNE NNW NW NavajoWhite Navy NavyBlue NoAlign NoCrop NoFill NoSide OldLace Olive OliveDrab OliveGreen Orange OrangeRed Orchid Ox Oy PC PaleGoldenrod PaleGreen PaleTurquoise PaleVioletRed PapayaWhip Peach PeachPuff Periwinkle Peru PineGreen Pink Plum PowderBlue ProcessBlue Purple RK2 RK3 RK3BS RK4 RK5 RK5DP RK5F RawSienna Red RedOrange RedViolet Rhodamine RightJustified RightSide RosyBrown RoyalBlue RoyalPurple RubineRed S SE SSE SSW SW SaddleBrown Salmon SandyBrown SeaGreen Seashell Sepia Sienna Silver SimpleHead SkyBlue SlateBlue SlateGray Snow SpringGreen SteelBlue Suppress SuppressQuiet Tan TeXHead Teal TealBlue Thistle Ticksize Tomato Turquoise UnFill VERSION Value Vertical Violet VioletRed W WNW WSW Wheat White WhiteSmoke WildStrawberry XYAlign YAlign Yellow YellowGreen YellowOrange addpenarc addpenline align allowstepping angularsystem animationdelay appendsuffix arcarrowangle arcarrowfactor arrow2sizelimit arrowangle arrowbarb arrowdir arrowfactor arrowhookfactor arrowlength arrowsizelimit arrowtexfactor authorpen axis axiscoverage axislabelfactor background backgroundcolor backgroundpen barfactor barmarksizefactor basealign baselinetemplate beveljoin bigvertexpen bigvertexsize black blue bm bottom bp brown bullet byfoci byvertices camerafactor chartreuse circlemarkradiusfactor circlenodesnumberfactor circleprecision circlescale cm codefile codepen codeskip colorPen coloredNodes coloredSegments conditionlength conicnodesfactor count cputimeformat crossmarksizefactor currentcoordsys currentlight currentpatterns currentpen currentpicture currentposition currentprojection curvilinearsystem cuttings cyan darkblue darkbrown darkcyan darkgray darkgreen darkgrey darkmagenta darkolive darkred dashdotted dashed datepen dateskip debuggerlines debugging deepblue deepcyan deepgray deepgreen deepgrey deepmagenta deepred default defaultControl defaultS defaultbackpen defaultcoordsys defaultfilename defaultformat defaultmassformat defaultpen diagnostics differentlengths dot dotfactor dotframe dotted doublelinepen doublelinespacing down duplicateFuzz ellipsenodesnumberfactor eps epsgeo epsilon evenodd extendcap fermionpen figureborder figuremattpen firstnode firststep foregroundcolor fuchsia fuzz gapfactor ghostpen gluonamplitude gluonpen gluonratio gray green grey hatchepsilon havepagenumber heavyblue heavycyan heavygray heavygreen heavygrey heavymagenta heavyred hline hwratio hyperbolanodesnumberfactor identity4 ignore inXasyMode inch inches includegraphicscommand inf infinity institutionpen intMax intMin invert invisible itempen itemskip itemstep labelmargin landscape lastnode left legendhskip legendlinelength legendmargin legendmarkersize legendmaxrelativewidth legendvskip lightblue lightcyan lightgray lightgreen lightgrey lightmagenta lightolive lightred lightyellow linemargin lm_infmsg lm_shortmsg longdashdotted longdashed magenta magneticPoints magneticRadius mantissaBits markangleradius markangleradiusfactor markanglespace markanglespacefactor mediumblue mediumcyan mediumgray mediumgreen mediumgrey mediummagenta mediumred mediumyellow middle minDistDefault minblockheight minblockwidth mincirclediameter minipagemargin minipagewidth minvertexangle miterjoin mm momarrowfactor momarrowlength momarrowmargin momarrowoffset momarrowpen monoPen morepoints nCircle newbulletcolor ngraph nil nmesh nobasealign nodeMarginDefault nodesystem nomarker nopoint noprimary nullpath nullpen numarray ocgindex oldbulletcolor olive orange origin overpaint page pageheight pagemargin pagenumberalign pagenumberpen pagenumberposition pagewidth paleblue palecyan palegray palegreen palegrey palemagenta palered paleyellow parabolanodesnumberfactor perpfactor phi photonamplitude photonpen photonratio pi pink plain plus preamblenodes pt purple r3 r4a r4b randMax realDigits realEpsilon realMax realMin red relativesystem reverse right roundcap roundjoin royalblue salmon saveFunctions scalarpen sequencereal settings shipped signedtrailingzero solid springgreen sqrtEpsilon squarecap squarepen startposition stdin stdout stepfactor stepfraction steppagenumberpen stepping stickframe stickmarksizefactor stickmarkspacefactor textpen ticksize tildeframe tildemarksizefactor tinv titlealign titlepagepen titlepageposition titlepen titleskip top trailingzero treeLevelStep treeMinNodeWidth treeNodeStep trembleAngle trembleFrequency trembleRandom tremblingMode undefined unitcircle unitsquare up urlpen urlskip version vertexpen vertexsize viewportmargin viewportsize vline white wye xformStack yellow ylabelwidth zerotickfuzz zerowinding )) diff --git a/Build/source/utils/asymptote/asymptote.spec b/Build/source/utils/asymptote/asymptote.spec index ac717fb5396..10e8b88045f 100644 --- a/Build/source/utils/asymptote/asymptote.spec +++ b/Build/source/utils/asymptote/asymptote.spec @@ -1,7 +1,7 @@ %{!?_texmf: %define _texmf %(eval "echo `kpsewhich -expand-var '$TEXMFLOCAL'`")} Name: asymptote -Version: 1.87 +Version: 1.88 Release: 1%{?dist} Summary: Descriptive vector graphics language diff --git a/Build/source/utils/asymptote/base/obj.asy b/Build/source/utils/asymptote/base/obj.asy index 158d417c136..0a6c4ab047c 100644 --- a/Build/source/utils/asymptote/base/obj.asy +++ b/Build/source/utils/asymptote/base/obj.asy @@ -98,6 +98,15 @@ struct obj { } } +obj operator * (transform3 T, obj o) +{ + obj ot; + ot.s=T*o.s; + ot.surfacepen=copy(o.surfacepen); + ot.meshpen=copy(o.meshpen); + return ot; +} + void draw(picture pic=currentpicture, obj o, light light=currentlight) { draw(pic,o.s,o.surfacepen,o.meshpen,light); diff --git a/Build/source/utils/asymptote/base/three.asy b/Build/source/utils/asymptote/base/three.asy index 23a23223141..5c3a404514f 100644 --- a/Build/source/utils/asymptote/base/three.asy +++ b/Build/source/utils/asymptote/base/three.asy @@ -23,17 +23,9 @@ string defaultembed3Doptions; string defaultembed3Dscript; real defaulteyetoview=63mm/1000mm; -string defaultlabelname="label"; -string Billboard=" "+defaultlabelname; - -string defaultlabelname() -{ - return settings.billboard ? Billboard : defaultlabelname; -} - string partname(string s, int i=0) { - return s == "" ? s : s+"-"+string(i); + return s == "" ? "" : s+"-"+string(i); } triple O=(0,0,0); @@ -331,7 +323,7 @@ projection projection() { projection P; real[] a=_projection(); - if(a[10] == 0.0) return currentprojection; + if(a.length == 0 || a[10] == 0.0) return currentprojection; int k=0; return a[0] == 1 ? orthographic((a[++k],a[++k],a[++k]),(a[++k],a[++k],a[++k]), @@ -2349,6 +2341,11 @@ private string Format(real[] c) return Format((c[0],c[1],c[2])); } +private string format(triple v, string sep=" ") +{ + return string(v.x)+sep+string(v.y)+sep+string(v.z); +} + private string[] file3; private string projection(bool infinity, real viewplanesize) @@ -2372,6 +2369,97 @@ handler.onEvent=function(event) }"; } +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 billboard(int[] index, triple[] center) +{ + if(index.length == 0) return ""; + string s=" +var zero=new Vector3(0,0,0); +var meshes=scene.meshes; +var count=meshes.count; + +var index=new Array(); +for(i=0; i < count; i++) { + var mesh=meshes.getByIndex(i); + var name=mesh.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; + mesh.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 mesh=meshes.getByIndex(j); + var name=mesh.name; + var R=Matrix4x4(); + R.setView(zero,direction,up); + var c=center[k]; + var T=mesh.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; +} + string lightscript(light light) { string script="for(var i=scene.lights.count-1; i >= 0; i--) scene.lights.removeByIndex(i);"+'\n\n'; @@ -2379,8 +2467,8 @@ string lightscript(light light) { string Li="L"+string(i); real[] diffuse=light.diffuse[i]; script += Li+"=scene.createLight();"+'\n'+ - Li+".direction.set("+Format(-light.position[i],",")+");"+'\n'+ - Li+".color.set("+Format((diffuse[0],diffuse[1],diffuse[2]),",")+");"+'\n'; + Li+".direction.set("+format(-light.position[i],",")+");"+'\n'+ + Li+".color.set("+format((diffuse[0],diffuse[1],diffuse[2]),",")+");"+'\n'; } // Work around initialization bug in Adobe Reader 8.0: return script +" @@ -2437,10 +2525,13 @@ string embed3D(string label="", string text=label, string prefix, } else if(!P.absolute) P.angle=2*aTan(Tan(0.5*P.angle)); - string name=prefix+".js"; - writeJavaScript(name,lightscript+projection(P.infinity,viewplanesize),script); + 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); prefix += ".prc"; if(!settings.inlinetex) diff --git a/Build/source/utils/asymptote/base/three_surface.asy b/Build/source/utils/asymptote/base/three_surface.asy index b60a9be6156..e520229371f 100644 --- a/Build/source/utils/asymptote/base/three_surface.asy +++ b/Build/source/utils/asymptote/base/three_surface.asy @@ -1130,8 +1130,27 @@ real PRCshininess(real shininess) return s(shininess); } +struct interaction +{ + int type; + bool targetsize; + void operator init(int type, bool targetsize=false) { + this.type=type; + this.targetsize=targetsize; + } +} + +restricted interaction Embedded=interaction(0); +restricted interaction Billboard=interaction(1); + +interaction LabelInteraction() +{ + return settings.autobillboard ? Billboard : Embedded; +} + void draw3D(frame f, patch s, triple center=O, material m, - light light=currentlight, string name="") + light light=currentlight, string name="", + interaction interaction=Embedded) { if(s.colors.length > 0) m=mean(s.colors); @@ -1143,7 +1162,8 @@ void draw3D(frame f, patch s, triple center=O, material m, PRCshininess=PRCshininess(m.shininess); real granularity=m.granularity >= 0 ? m.granularity : defaultgranularity; draw(f,s.P,center,s.straight,m.p,m.opacity,m.shininess,PRCshininess, - granularity,s.planar ? s.normal(0.5,0.5) : O,s.colors,lighton,name); + granularity,s.planar ? s.normal(0.5,0.5) : O,s.colors,lighton,name, + interaction.type); } void tensorshade(transform t=identity(), frame f, patch s, @@ -1227,11 +1247,18 @@ void draw(picture pic=currentpicture, surface s, int nu=1, int nv=1, { if(s.empty()) return; + bool cyclic=surfacepen.cyclic; + surfacepen=copy(surfacepen); + surfacepen.cyclic=cyclic; + cyclic=meshpen.cyclic; + meshpen=copy(meshpen); + meshpen.cyclic=cyclic; + pic.add(new void(frame f, transform3 t, picture pic, projection P) { surface S=t*s; - if(is3D()) { + if(is3D()) draw(f,S,nu,nv,surfacepen,meshpen,light,meshlight,name); - } else if(pic != null) + else if(pic != null) pic.add(new void(frame f, transform T) { draw(T,f,S,nu,nv,surfacepen,meshpen,light,meshlight,P); },true); @@ -1354,20 +1381,21 @@ path[] path(Label L, pair z=0, projection P) } void label(frame f, Label L, triple position, align align=NoAlign, - pen p=currentpen, bool targetsize=false, light light=nolight, - string name=defaultlabelname(), projection P=currentprojection) + pen p=currentpen, light light=nolight, + string name=L.s, interaction interaction=LabelInteraction(), + projection P=currentprojection) { Label L=L.copy(); L.align(align); L.p(p); - if(targetsize && settings.render != 0) + if(interaction.targetsize && settings.render != 0) L.T=L.T*scale(abs(P.camera-position)/abs(P.vector())); if(L.defaulttransform3) L.T3=transform3(P); if(is3D()) { int i=-1; for(patch S : surface(L,position).s) - draw3D(f,S,position,L.p,light,partname(name,++i)); + draw3D(f,S,position,L.p,light,partname(name,++i),interaction); } else { if(L.filltype == NoFill) fill(f,path(L,project(position,P.t),P), @@ -1382,8 +1410,9 @@ void label(frame f, Label L, triple position, align align=NoAlign, } void label(picture pic=currentpicture, Label L, triple position, - align align=NoAlign, pen p=currentpen, bool targetsize=false, - light light=nolight, string name=defaultlabelname()) + align align=NoAlign, pen p=currentpen, + light light=nolight, string name=L.s, + interaction interaction=LabelInteraction()) { Label L=L.copy(); L.align(align); @@ -1397,14 +1426,14 @@ void label(picture pic=currentpicture, Label L, triple position, determinant(P.t) != 0) L.align(L.align.dir*unit(project(v+L.align.dir3,P.t)-project(v,P.t))); - if(targetsize && settings.render != 0) + if(interaction.targetsize && settings.render != 0) L.T=L.T*scale(abs(P.camera-v)/abs(P.vector())); if(L.defaulttransform3) L.T3=transform3(P); if(is3D()) { int i=-1; for(patch S : surface(L,v).s) - draw3D(f,S,v,L.p,light,partname(name,++i)); + draw3D(f,S,v,L.p,light,partname(name,++i),interaction); } if(pic != null) { if(L.filltype == NoFill) @@ -1420,7 +1449,7 @@ void label(picture pic=currentpicture, Label L, triple position, },!L.defaulttransform3); Label L=L.copy(); - if(targetsize && settings.render != 0) + if(interaction.targetsize && settings.render != 0) L.T=L.T*scale(abs(currentprojection.camera-position)/ abs(currentprojection.vector())); path[] g=texpath(L); @@ -1433,7 +1462,8 @@ void label(picture pic=currentpicture, Label L, triple position, } void label(picture pic=currentpicture, Label L, path3 g, align align=NoAlign, - bool targetsize=false, pen p=currentpen) + pen p=currentpen, string name=L.s, + interaction interaction=LabelInteraction()) { Label L=L.copy(); L.align(align); @@ -1449,7 +1479,7 @@ void label(picture pic=currentpicture, Label L, path3 g, align align=NoAlign, a.dir3=dir(g,position); // Pass 3D direction via unused field. L.align(a); } - label(pic,L,point(g,position),targetsize); + label(pic,L,point(g,position),name,interaction); } surface extrude(Label L, triple axis=Z) @@ -1467,7 +1497,7 @@ restricted surface nullsurface; // Embed a Label onto a surface. surface surface(Label L, surface s, real uoffset, real voffset, - real height=0, bool bottom=false, bool top=true) + real height=0, bool bottom=true, bool top=true) { int nu=s.index.length; int nv; @@ -1689,6 +1719,11 @@ void draw(picture pic=currentpicture, triple[][] P, real[] uknot, real[] vknot, if(colors.length > 0) m=mean(colors); bool lighton=light.on(); + P=copy(P); + uknot=copy(uknot); + vknot=copy(vknot); + weights=copy(weights); + colors=copy(colors); pic.add(new void(frame f, transform3 t, picture pic, projection Q) { if(is3D()) { triple[][] P=t*P; diff --git a/Build/source/utils/asymptote/configure b/Build/source/utils/asymptote/configure index 91a1d030313..e8552fac8df 100755 --- a/Build/source/utils/asymptote/configure +++ b/Build/source/utils/asymptote/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63 for Asymptote 1.87. +# Generated by GNU Autoconf 2.63 for Asymptote 1.88. # # Report bugs to <http://sourceforge.net/projects/asymptote>. # @@ -596,8 +596,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='Asymptote' PACKAGE_TARNAME='asymptote' -PACKAGE_VERSION='1.87' -PACKAGE_STRING='Asymptote 1.87' +PACKAGE_VERSION='1.88' +PACKAGE_STRING='Asymptote 1.88' PACKAGE_BUGREPORT='http://sourceforge.net/projects/asymptote' # Factoring default headers for most tests. @@ -1294,7 +1294,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Asymptote 1.87 to adapt to many kinds of systems. +\`configure' configures Asymptote 1.88 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1355,7 +1355,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Asymptote 1.87:";; + short | recursive ) echo "Configuration of Asymptote 1.88:";; esac cat <<\_ACEOF @@ -1465,7 +1465,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Asymptote configure 1.87 +Asymptote configure 1.88 generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1479,7 +1479,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Asymptote $as_me 1.87, which was +It was created by Asymptote $as_me 1.88, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ @@ -11522,7 +11522,7 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Asymptote $as_me 1.87, which was +This file was extended by Asymptote $as_me 1.88, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -11581,7 +11581,7 @@ Report bugs to <bug-autoconf@gnu.org>." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -Asymptote config.status 1.87 +Asymptote config.status 1.88 configured by $0, generated by GNU Autoconf 2.63, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff --git a/Build/source/utils/asymptote/configure.ac b/Build/source/utils/asymptote/configure.ac index b6f6ccdbdcf..0801123a961 100644 --- a/Build/source/utils/asymptote/configure.ac +++ b/Build/source/utils/asymptote/configure.ac @@ -3,7 +3,7 @@ # this file. AC_PREREQ(2) -AC_INIT([Asymptote],[1.87],[http://sourceforge.net/projects/asymptote]) +AC_INIT([Asymptote],[1.88],[http://sourceforge.net/projects/asymptote]) VERSION=$PACKAGE_VERSION AC_SUBST(VERSION) diff --git a/Build/source/utils/asymptote/doc/CAD.pdf b/Build/source/utils/asymptote/doc/CAD.pdf Binary files differindex c0710dfa00b..8cee0cb9c7d 100644 --- a/Build/source/utils/asymptote/doc/CAD.pdf +++ b/Build/source/utils/asymptote/doc/CAD.pdf diff --git a/Build/source/utils/asymptote/doc/FAQ/asy-faq.info b/Build/source/utils/asymptote/doc/FAQ/asy-faq.info index a32e2e9a481..41a897b34e5 100644 --- a/Build/source/utils/asymptote/doc/FAQ/asy-faq.info +++ b/Build/source/utils/asymptote/doc/FAQ/asy-faq.info @@ -9,7 +9,7 @@ END-INFO-DIR-ENTRY File: $prefix.info, Node: Top, Next: Question 1.1, Up: (dir) ASYMPTOTE FREQUENTLY ASKED QUESTIONS - 28 Sep 2009 + 02 Oct 2009 This is the list of Frequently Asked Questions about Asymptote (asy). diff --git a/Build/source/utils/asymptote/doc/asy.1 b/Build/source/utils/asymptote/doc/asy.1 index 5dfac3a04f2..ea02a81a622 100644 --- a/Build/source/utils/asymptote/doc/asy.1 +++ b/Build/source/utils/asymptote/doc/asy.1 @@ -43,6 +43,7 @@ Antialiasing width for rasterized output [2]. .TP .B \-auto3D Automatically activate 3D scene [true]. +-autobillboard 3D labels always face viewer by default [true] .TP .B \-autoimport string Module to automatically import. @@ -62,9 +63,6 @@ Mask fpu exceptions in batch mode [false]. .B \-batchView View output in batch mode [false]. .TP -.B \-billboard -Force unnamed labels to always face viewer [false]. -.TP .B \-bw Convert all colors to black and white [false]. .TP diff --git a/Build/source/utils/asymptote/doc/asymptote.pdf b/Build/source/utils/asymptote/doc/asymptote.pdf Binary files differindex cb9f66d0168..318bcae923c 100644 --- a/Build/source/utils/asymptote/doc/asymptote.pdf +++ b/Build/source/utils/asymptote/doc/asymptote.pdf diff --git a/Build/source/utils/asymptote/doc/asymptote.texi b/Build/source/utils/asymptote/doc/asymptote.texi index 6645b03a2cd..dcb39303f9b 100644 --- a/Build/source/utils/asymptote/doc/asymptote.texi +++ b/Build/source/utils/asymptote/doc/asymptote.texi @@ -211,7 +211,7 @@ as @TeX{}/@code{LaTeX} is the de-facto standard for typesetting equations. @item @code{LaTeX} typesetting of labels, for overall document consistency; -@item the ability to generate and embed 3D vector @acronym{PRC} graphics into @acronym{PDF} files; +@item the ability to generate and embed 3D vector @acronym{PRC} graphics within @acronym{PDF} files; @item a natural coordinate-based framework for technical drawings, inspired by @code{MetaPost}, with a much cleaner, powerful C++-like programming @@ -770,6 +770,7 @@ make uninstall @chapter Tutorial @cindex tutorial @cindex batch mode +@section Drawing in batch mode To draw a line from coordinate (0,0) to coordinate (100,100), create a text file @code{test.asy} containing @verbatiminclude diagonal.asy @@ -782,7 +783,7 @@ asy -V test @noindent Alternatively, @code{MSDOS} users can drag and drop @code{test.asy} onto the Desktop @code{asy} icon (or make @code{Asymptote} the default -application the extension @code{asy}). +application for the extension @code{asy}). @noindent @cindex @code{-V} @@ -792,11 +793,11 @@ viewer window so you can immediately view the result: @sp 1 @center @image{diagonal} @cindex @code{bp} -@cindex @code{pair} @noindent The @code{--} connector joins the two points @code{(0,0)} and -@code{(100,100)} with a linear segment. +@code{(100,100)} with a line segment. +@section Drawing in interactive mode Another method is @emph{interactive mode}, where @code{Asymptote} reads individual commands as they are entered by the user. To try this out, enter @code{Asymptote}'s interactive mode by clicking on the @@ -825,28 +826,25 @@ The tab key will automatically complete unambiguous words; otherwise, hitting tab again will show the possible choices. Further commands specific to interactive mode are described in @ref{Interactive mode}. -@cindex @code{cycle} -One can draw a line with more than two points and create a cyclic path -like this square: -@verbatiminclude square.asy -@sp 1 -@center @image{square} - -In @code{Asymptote} coordinates like (0,0) and (100,100) are called -@emph{pairs}. The pairs in the previous examples are expressed in -@code{PostScript} "big points" (1 @code{bp} = 1/72 @code{inch}). +@section Figure size +@cindex @code{pair} +In @code{Asymptote}, coordinates like @code{(0,0)} and @code{(100,100)}, +called @emph{pairs}, +are expressed in @code{PostScript} "big points" (1 @code{bp} = 1/72 +@code{inch}) and the default line width is @code{0.5bp}. However, it is often inconvenient to work directly in -@code{PostScript} coordinates. The next example draws a unit square -scaled to width 101 @code{bp} and height -101 @code{bp}. The output is identical to that of the previous example. +@code{PostScript} coordinates. +The next example produces identical output to the previous example, by +scaling the line @code{(0,0)--(1,1)} to fit a rectangle of width +@code{100.5 bp} and height @code{100.5 bp} (the extra @code{0.5bp} +accounts for the line width): @verbatim -size(101,101); -draw((0,0)--(1,0)--(1,1)--(0,1)--cycle); +size(100.5,100.5); +draw((0,0)--(1,1)); @end verbatim +@sp 1 +@center @image{diagonal} -For convenience, the path @code{(0,0)--(1,0)--(1,1)--(0,1)--cycle} -may be replaced with the predefined variable -@code{unitsquare}, or equivalently, @code{box((0,0),(1,1))}. @cindex @code{inches} @cindex @code{cm} @cindex @code{mm} @@ -857,9 +855,20 @@ Two nonzero size arguments (or a single size argument) restrict the size in both directions, preserving the aspect ratio. If 0 is given as a size argument, no restriction is made in that direction; the overall scaling will be determined by the other direction (@pxref{size}): -@verbatiminclude bigsquare.asy +@verbatiminclude bigdiagonal.asy @sp 1 -@center @image{bigsquare} +@center @image{bigdiagonal} + +@cindex @code{cycle} +To connect several points and create a cyclic path, use the +@code{cycle} keyword: +@verbatiminclude square.asy +@sp 1 +@center @image{square} +@noindent +For convenience, the path @code{(0,0)--(1,0)--(1,1)--(0,1)--cycle} +may be replaced with the predefined variable +@code{unitsquare}, or equivalently, @code{box((0,0),(1,1))}. @cindex user coordinates @cindex @code{unitsize} @@ -870,6 +879,7 @@ draw(unitsquare); @end verbatim @noindent +@section Labels Adding labels is easy in @code{Asymptote}; one specifies the label as a double-quoted @code{LaTeX} string, a coordinate, and an optional alignment direction: @@ -890,13 +900,18 @@ module @code{plain} (a user who has a local variable named @code{E} may access the compass direction @code{E} by prefixing it with the name of the module where it is defined: @code{plain.E}). +@section Paths This example draws a path that approximates a quarter circle, terminated with an arrowhead: @verbatiminclude quartercircle.asy @sp 1 @center @image{quartercircle} +@noindent +Here the directions @code{up} and @code{left} in braces specify the +incoming and outgoing directions at the points @code{(1,0)} and +@code{(0,1)}, respectively. -In general, a path is specified as a list of pairs (or other paths) +In general, a path is specified as a list of points (or other paths) interconnected with @cindex @code{cycle} @cindex @code{--} @@ -906,7 +921,7 @@ denotes a cubic spline (@pxref{Bezier curves}). @cindex @code{unitcircle} @anchor{unitcircle} @cindex @code{unitcircle} -Specifying a final node @code{cycle} creates a cyclic path that +Specifying a final @code{..cycle} creates a cyclic path that connects smoothly back to the initial node, as in this approximation (accurate to within 0.06%) of a unit circle: @verbatim @@ -950,9 +965,9 @@ cube @code{unitbox} without retracing steps (@pxref{three}): See section @ref{graph} (or the online @code{Asymptote} gallery and external links posted at @url{http://asymptote.sourceforge.net}) for -further examples, including two and interactive three-dimensional scientific -graphs. Additional examples have been posted by Philippe Ivaldi at -@url{http://www.piprime.fr/asymptote/}. +further examples, including two-dimensional and interactive +three-dimensional scientific graphs. Additional examples have been +posted by Philippe Ivaldi at @url{http://www.piprime.fr/asymptote}. A user-written @code{Asymptote} tutorial is available at @verbatim http://www.artofproblemsolving.com/Wiki/index.php/Asymptote:_Basics diff --git a/Build/source/utils/asymptote/doc/bigdiagonal.asy b/Build/source/utils/asymptote/doc/bigdiagonal.asy new file mode 100644 index 00000000000..7242b7ae845 --- /dev/null +++ b/Build/source/utils/asymptote/doc/bigdiagonal.asy @@ -0,0 +1,2 @@ +size(0,100.5); +draw((0,0)--(2,1),Arrow); diff --git a/Build/source/utils/asymptote/doc/bigsquare.asy b/Build/source/utils/asymptote/doc/bigsquare.asy deleted file mode 100644 index ae1f3046c7a..00000000000 --- a/Build/source/utils/asymptote/doc/bigsquare.asy +++ /dev/null @@ -1,2 +0,0 @@ -size(3cm,3cm); -draw(unitsquare); diff --git a/Build/source/utils/asymptote/doc/labelsquare.asy b/Build/source/utils/asymptote/doc/labelsquare.asy index 193314ae4d4..9531792b6a1 100644 --- a/Build/source/utils/asymptote/doc/labelsquare.asy +++ b/Build/source/utils/asymptote/doc/labelsquare.asy @@ -1,4 +1,4 @@ -size(0,3cm); +size(3cm); draw(unitsquare); label("$A$",(0,0),SW); label("$B$",(1,0),SE); diff --git a/Build/source/utils/asymptote/doc/options b/Build/source/utils/asymptote/doc/options index 41a40d5039c..a92d06501e5 100644 --- a/Build/source/utils/asymptote/doc/options +++ b/Build/source/utils/asymptote/doc/options @@ -7,13 +7,13 @@ Options (negate by replacing - with -no): -antialias n Antialiasing width for rasterized output [2] -arcballradius pixels Arcball radius [750] -auto3D Automatically activate 3D scene [true] +-autobillboard 3D labels always face viewer by default [true] -autoimport string Module to automatically import -autoplain Enable automatic importing of plain [true] -autoplay Autoplay 3D animations [false] -autorotate Enable automatic PDF page rotation [false] -batchMask Mask fpu exceptions in batch mode [false] -batchView View output in batch mode [false] --billboard Force unnamed labels to always face viewer [false] -bw Convert all colors to black and white [false] -cd directory Set current directory; command-line only -cmyk Convert rgb colors to cmyk [false] diff --git a/Build/source/utils/asymptote/doc/png/asymptote.info b/Build/source/utils/asymptote/doc/png/asymptote.info index ba90056f71c..108efc52ce3 100644 --- a/Build/source/utils/asymptote/doc/png/asymptote.info +++ b/Build/source/utils/asymptote/doc/png/asymptote.info @@ -1,7 +1,7 @@ This is asymptote.info, produced by makeinfo version 4.13 from ../asymptote.texi. -This file documents `Asymptote', version 1.87. +This file documents `Asymptote', version 1.88. `http://asymptote.sourceforge.net' @@ -23,7 +23,7 @@ File: asymptote.info, Node: Top, Next: Description, Up: (dir) Asymptote ********* -This file documents `Asymptote', version 1.87. +This file documents `Asymptote', version 1.88. `http://asymptote.sourceforge.net' @@ -196,8 +196,8 @@ weaker syntax and capabilities) called `MetaPost'. * `LaTeX' typesetting of labels, for overall document consistency; - * the ability to generate and embed 3D vector PRC graphics into PDF - files; + * the ability to generate and embed 3D vector PRC graphics within + PDF files; * a natural coordinate-based framework for technical drawings, inspired by `MetaPost', with a much cleaner, powerful C++-like @@ -641,6 +641,9 @@ File: asymptote.info, Node: Tutorial, Next: Drawing commands, Prev: Installat 3 Tutorial ********** +3.1 Drawing in batch mode +========================= + To draw a line from coordinate (0,0) to coordinate (100,100), create a text file `test.asy' containing @@ -648,7 +651,7 @@ draw((0,0)--(100,100)); Then execute the command asy -V test Alternatively, `MSDOS' users can drag and drop `test.asy' onto the -Desktop `asy' icon (or make `Asymptote' the default application the +Desktop `asy' icon (or make `Asymptote' the default application for the extension `asy'). This method, known as _batch mode_, outputs a `PostScript' file @@ -657,9 +660,12 @@ you can immediately view the result: The `--' connector joins the two points `(0,0)' and `(100,100)' with a -linear segment. +line segment. + +3.2 Drawing in interactive mode +=============================== - Another method is _interactive mode_, where `Asymptote' reads +Another method is _interactive mode_, where `Asymptote' reads individual commands as they are entered by the user. To try this out, enter `Asymptote''s interactive mode by clicking on the `Asymptote' icon or typing the command `asy'. Then type @@ -675,44 +681,56 @@ automatically complete unambiguous words; otherwise, hitting tab again will show the possible choices. Further commands specific to interactive mode are described in *note Interactive mode::. - One can draw a line with more than two points and create a cyclic -path like this square: +3.3 Figure size +=============== -draw((0,0)--(100,0)--(100,100)--(0,100)--cycle); +In `Asymptote', coordinates like `(0,0)' and `(100,100)', called +_pairs_, are expressed in `PostScript' "big points" (1 `bp' = 1/72 +`inch') and the default line width is `0.5bp'. However, it is often +inconvenient to work directly in `PostScript' coordinates. The next +example produces identical output to the previous example, by scaling +the line `(0,0)--(1,1)' to fit a rectangle of width `100.5 bp' and +height `100.5 bp' (the extra `0.5bp' accounts for the line width): +size(100.5,100.5); +draw((0,0)--(1,1)); -In `Asymptote' coordinates like (0,0) and (100,100) are called _pairs_. -The pairs in the previous examples are expressed in `PostScript' "big -points" (1 `bp' = 1/72 `inch'). However, it is often inconvenient to -work directly in `PostScript' coordinates. The next example draws a -unit square scaled to width 101 `bp' and height 101 `bp'. The output is -identical to that of the previous example. -size(101,101); -draw((0,0)--(1,0)--(1,1)--(0,1)--cycle); +One can also specify the size in `pt' (1 `pt' = 1/72.27 `inch'), `cm', +`mm', or `inches'. Two nonzero size arguments (or a single size +argument) restrict the size in both directions, preserving the aspect +ratio. If 0 is given as a size argument, no restriction is made in +that direction; the overall scaling will be determined by the other +direction (*note size::): + +size(0,100.5); +draw((0,0)--(2,1),Arrow); + - For convenience, the path `(0,0)--(1,0)--(1,1)--(0,1)--cycle' may be -replaced with the predefined variable `unitsquare', or equivalently, -`box((0,0),(1,1))'. One can also specify the size in `pt' (1 `pt' = -1/72.27 `inch'), `cm', `mm', or `inches'. Two nonzero size arguments -(or a single size argument) restrict the size in both directions, -preserving the aspect ratio. If 0 is given as a size argument, no -restriction is made in that direction; the overall scaling will be -determined by the other direction (*note size::): - -size(3cm,3cm); -draw(unitsquare); +To connect several points and create a cyclic path, use the `cycle' +keyword: + +size(100,100); +draw((0,0)--(1,0)--(1,1)--(0,1)--cycle); -To make the user coordinates represent multiples of exactly `1cm': +For convenience, the path `(0,0)--(1,0)--(1,1)--(0,1)--cycle' may be +replaced with the predefined variable `unitsquare', or equivalently, +`box((0,0),(1,1))'. + + To make the user coordinates represent multiples of exactly `1cm': unitsize(1cm); draw(unitsquare); - Adding labels is easy in `Asymptote'; one specifies the label as a + +3.4 Labels +========== + +Adding labels is easy in `Asymptote'; one specifies the label as a double-quoted `LaTeX' string, a coordinate, and an optional alignment direction: -size(0,3cm); +size(3cm); draw(unitsquare); label("$A$",(0,0),SW); label("$B$",(1,0),SE); @@ -728,20 +746,25 @@ the `Asymptote' base module `plain' (a user who has a local variable named `E' may access the compass direction `E' by prefixing it with the name of the module where it is defined: `plain.E'). - This example draws a path that approximates a quarter circle, +3.5 Paths +========= + +This example draws a path that approximates a quarter circle, terminated with an arrowhead: size(100,0); draw((1,0){up}..{left}(0,1),Arrow); +Here the directions `up' and `left' in braces specify the incoming and +outgoing directions at the points `(1,0)' and `(0,1)', respectively. -In general, a path is specified as a list of pairs (or other paths) + In general, a path is specified as a list of points (or other paths) interconnected with `--', which denotes a straight line segment, or `..', which denotes a cubic spline (*note Bezier curves::). Specifying -a final node `cycle' creates a cyclic path that connects smoothly back -to the initial node, as in this approximation (accurate to within -0.06%) of a unit circle: +a final `..cycle' creates a cyclic path that connects smoothly back to +the initial node, as in this approximation (accurate to within 0.06%) +of a unit circle: path unitcircle=E..N..W..S..cycle; An `Asymptote' path, being connected, is equivalent to a `Postscript @@ -790,10 +813,10 @@ label("(0,0,1)",(0,0,1),Z); See section *note graph:: (or the online `Asymptote' gallery and external links posted at `http://asymptote.sourceforge.net') for -further examples, including two and interactive three-dimensional -scientific graphs. Additional examples have been posted by Philippe -Ivaldi at `http://www.piprime.fr/asymptote/'. A user-written -`Asymptote' tutorial is available at +further examples, including two-dimensional and interactive +three-dimensional scientific graphs. Additional examples have been +posted by Philippe Ivaldi at `http://www.piprime.fr/asymptote'. A +user-written `Asymptote' tutorial is available at http://www.artofproblemsolving.com/Wiki/index.php/Asymptote:_Basics @@ -7693,13 +7716,13 @@ Options (negate by replacing - with -no): -antialias n Antialiasing width for rasterized output [2] -arcballradius pixels Arcball radius [750] -auto3D Automatically activate 3D scene [true] +-autobillboard 3D labels always face viewer by default [true] -autoimport string Module to automatically import -autoplain Enable automatic importing of plain [true] -autoplay Autoplay 3D animations [false] -autorotate Enable automatic PDF page rotation [false] -batchMask Mask fpu exceptions in batch mode [false] -batchView View output in batch mode [false] --billboard Force unnamed labels to always face viewer [false] -bw Convert all colors to black and white [false] -cd directory Set current directory; command-line only -cmyk Convert rgb colors to cmyk [false] @@ -8215,16 +8238,16 @@ Index (line 14) * -- <1>: Self & prefix operators. (line 6) -* --: Tutorial. (line 102) +* --: Tutorial. (line 125) * ---: Bezier curves. (line 83) * -=: Self & prefix operators. (line 6) * -c: Options. (line 167) * -l: Options. (line 186) * -u: Options. (line 177) -* -V <1>: Tutorial. (line 16) +* -V <1>: Tutorial. (line 19) * -V: Configuring. (line 6) -* ..: Tutorial. (line 102) +* ..: Tutorial. (line 125) * .asy: Search paths. (line 13) * /: Arithmetic & logical. (line 20) @@ -8256,7 +8279,7 @@ Index (line 28) * ^=: Self & prefix operators. (line 6) -* ^^: Tutorial. (line 109) +* ^^: Tutorial. (line 132) * a4: Configuring. (line 61) * abort: Data types. (line 321) * abs <1>: Mathematical functions. @@ -8321,7 +8344,7 @@ Index * arrow: label. (line 72) * Arrow: draw. (line 26) * arrow: Drawing commands. (line 31) -* arrow keys: Tutorial. (line 29) +* arrow keys: Tutorial. (line 35) * Arrow3: three. (line 505) * Arrows: draw. (line 26) * arrows: draw. (line 26) @@ -8425,7 +8448,7 @@ Index * boutput: Files. (line 71) * box <1>: three. (line 293) * box: Frames and pictures. (line 22) -* bp: Tutorial. (line 21) +* bp: Tutorial. (line 24) * break: Programming. (line 29) * breakpoints: Debugger. (line 21) * brick: Pens. (line 248) @@ -8462,7 +8485,7 @@ Index * clear <1>: Debugger. (line 23) * clear: Files. (line 89) * clip: fill. (line 110) -* cm: Tutorial. (line 58) +* cm: Tutorial. (line 61) * cmd: Configuring. (line 34) * cmyk: Pens. (line 34) * colatitude: Data types. (line 129) @@ -8477,7 +8500,7 @@ Index * command-line options <1>: Options. (line 6) * command-line options: Configuring. (line 83) * comment character: Files. (line 15) -* compass directions: Tutorial. (line 86) +* compass directions: Tutorial. (line 104) * Compiling from UNIX source: Compiling from UNIX source. (line 6) * complement: Arrays. (line 150) @@ -8532,7 +8555,7 @@ Index * custom tick locations: graph. (line 241) * cut: Paths and guides. (line 232) * cycle <1>: three. (line 6) -* cycle: Tutorial. (line 40) +* cycle: Tutorial. (line 73) * cyclic <1>: three. (line 462) * cyclic <2>: Arrays. (line 39) * cyclic: Paths and guides. (line 74) @@ -8594,7 +8617,7 @@ Index * dvisvg: Configuring. (line 67) * E <1>: Mathematical functions. (line 48) -* E: Tutorial. (line 86) +* E: Tutorial. (line 104) * Editing modes: Editing modes. (line 6) * Ei: Mathematical functions. (line 48) @@ -8630,7 +8653,7 @@ Index * EPS: label. (line 80) * erase <1>: Frames and pictures. (line 7) * erase <2>: Data types. (line 239) -* erase: Tutorial. (line 29) +* erase: Tutorial. (line 35) * erf: Mathematical functions. (line 6) * erfc: Mathematical functions. @@ -8640,7 +8663,7 @@ Index * errorbars: graph. (line 474) * eval: Import. (line 101) * evenodd <1>: Pens. (line 149) -* evenodd: Tutorial. (line 123) +* evenodd: Tutorial. (line 146) * exit <1>: Debugger. (line 57) * exit <2>: Interactive mode. (line 40) * exit: Data types. (line 326) @@ -8793,7 +8816,7 @@ Index * implicit linear solver: MetaPost. (line 10) * implicit scaling: Implicit scaling. (line 6) * import: Import. (line 48) -* inches: Tutorial. (line 58) +* inches: Tutorial. (line 61) * including images: label. (line 80) * inheritance: Structures. (line 189) * initialized: Arrays. (line 39) @@ -8959,7 +8982,7 @@ Index * mintimes: Paths and guides. (line 209) * miterjoin: Pens. (line 135) * miterlimit: Pens. (line 144) -* mm: Tutorial. (line 58) +* mm: Tutorial. (line 61) * mode: Files. (line 85) * mouse: GUI. (line 6) * mouse bindings: three. (line 132) @@ -8968,7 +8991,7 @@ Index * multisample: three. (line 122) * multisampling: Compiling from UNIX source. (line 16) -* N: Tutorial. (line 86) +* N: Tutorial. (line 104) * name: Files. (line 85) * named arguments: Named arguments. (line 6) * new <1>: Arrays. (line 109) @@ -9035,7 +9058,7 @@ Index * pack: label. (line 102) * packing: Rest arguments. (line 30) * pair <1>: Data types. (line 41) -* pair: Tutorial. (line 21) +* pair: Tutorial. (line 49) * pairs: Arrays. (line 245) * paperheight: Configuring. (line 61) * papertype: Configuring. (line 61) @@ -9048,7 +9071,7 @@ Index * path: Paths and guides. (line 7) * path markers: graph. (line 474) * path3: three. (line 6) -* path[]: Tutorial. (line 109) +* path[]: Tutorial. (line 132) * patterns <1>: patterns. (line 6) * patterns: Pens. (line 235) * pdflatex: Options. (line 140) @@ -9085,7 +9108,7 @@ Index (line 19) * postscript: Frames and pictures. (line 267) * PostScript fonts: Pens. (line 207) -* PostScript subpath: Tutorial. (line 109) +* PostScript subpath: Tutorial. (line 132) * pow10: Mathematical functions. (line 6) * prc: three. (line 223) @@ -9101,7 +9124,7 @@ Index * psview: Microsoft Windows. (line 16) * psviewer: Configuring. (line 6) * psviewerOptions: Options. (line 128) -* pt: Tutorial. (line 58) +* pt: Tutorial. (line 61) * public: Structures. (line 6) * push: Arrays. (line 39) * Python usage: Interactive mode. (line 61) @@ -9109,7 +9132,7 @@ Index * quarticroots: math. (line 22) * quit <1>: Debugger. (line 54) * quit <2>: Interactive mode. (line 40) -* quit: Tutorial. (line 29) +* quit: Tutorial. (line 35) * quote: Import. (line 119) * quotient: Arithmetic & logical. (line 6) @@ -9176,7 +9199,7 @@ Index (line 6) * runtime imports: Import. (line 101) * Russian: unicode. (line 7) -* S: Tutorial. (line 86) +* S: Tutorial. (line 104) * safe: Options. (line 156) * save: Frames and pictures. (line 258) * saveline: Files. (line 131) @@ -9279,7 +9302,7 @@ Index * substr: Data types. (line 244) * Subversion: Subversion. (line 6) * sum: Arrays. (line 216) -* superpath: Tutorial. (line 109) +* superpath: Tutorial. (line 132) * Suppress: Pens. (line 328) * SuppressQuiet: Pens. (line 332) * surface <1>: graph3. (line 100) @@ -9289,7 +9312,7 @@ Index * system: Files. (line 156) * syzygy: syzygy. (line 6) * tab: Files. (line 59) -* tab completion: Tutorial. (line 29) +* tab completion: Tutorial. (line 35) * Tan: Mathematical functions. (line 20) * tan: Mathematical functions. @@ -9362,13 +9385,13 @@ Index * Uninstall: Uninstall. (line 6) * unit: Data types. (line 78) * unitbox <1>: three. (line 295) -* unitbox: Tutorial. (line 130) +* unitbox: Tutorial. (line 153) * unitcircle <1>: three. (line 262) -* unitcircle: Tutorial. (line 103) +* unitcircle: Tutorial. (line 126) * unitrand: Mathematical functions. (line 39) * unitsize <1>: Frames and pictures. (line 64) -* unitsize: Tutorial. (line 70) +* unitsize: Tutorial. (line 84) * UNIX binary distributions: UNIX binary distributions. (line 6) * unpacking: Rest arguments. (line 39) @@ -9377,7 +9400,7 @@ Index * update: Files. (line 36) * UpsideDown: Frames and pictures. (line 95) * usepackage: Frames and pictures. (line 287) -* user coordinates: Tutorial. (line 70) +* user coordinates: Tutorial. (line 84) * user-defined operators: User-defined operators. (line 6) * usleep: Data types. (line 332) @@ -9397,7 +9420,7 @@ Index * vim: Editing modes. (line 33) * virtual functions: Structures. (line 189) * void: Data types. (line 10) -* W: Tutorial. (line 86) +* W: Tutorial. (line 104) * whatever: Paths and guides. (line 227) * Wheel: palette. (line 22) * wheel mouse: GUI. (line 6) @@ -9470,144 +9493,144 @@ Index Tag Table: Node: Top574 Node: Description6833 -Node: Installation10332 -Node: UNIX binary distributions11385 -Node: MacOS X binary distributions12491 -Node: Microsoft Windows13375 -Ref: psview14085 -Node: Configuring15006 -Node: Search paths19226 -Node: Compiling from UNIX source20023 -Ref: multisampling20612 -Node: Editing modes23030 -Node: Subversion25462 -Node: Uninstall25925 -Node: Tutorial26275 -Ref: unitcircle30105 -Node: Drawing commands32078 -Node: draw33789 -Ref: arrows34937 -Node: fill40180 -Ref: gradient shading41224 -Node: clip45417 -Node: label46009 -Ref: Label46708 -Node: Bezier curves52433 -Node: Programming56010 -Ref: array iteration56824 -Node: Data types57906 -Ref: format66807 -Node: Paths and guides70271 -Ref: circle70525 -Ref: arctime75882 -Ref: extension79747 -Node: Pens86430 -Ref: fillrule93674 -Ref: basealign94571 -Ref: transparency97396 -Ref: makepen100839 -Ref: overwrite101677 -Node: Transforms102887 -Node: Frames and pictures104678 -Ref: envelope105819 -Ref: size106902 -Ref: unitsize107889 -Ref: shipout108949 -Ref: filltype111282 -Ref: add114251 -Ref: add about115197 -Ref: tex118142 -Node: Files119016 -Ref: cd119981 -Ref: scroll124450 -Node: Variable initializers127523 -Node: Structures129818 -Node: Operators137270 -Node: Arithmetic & logical137584 -Node: Self & prefix operators139481 -Node: User-defined operators140269 -Node: Implicit scaling141180 -Node: Functions141743 -Ref: stack overflow144496 -Node: Default arguments145060 -Node: Named arguments145799 -Node: Rest arguments147961 -Node: Mathematical functions150771 -Node: Arrays155376 -Ref: sort162436 -Ref: tridiagonal164727 -Ref: solve165955 -Node: Slices170152 -Node: Casts174045 -Node: Import176011 -Node: Static181241 -Node: LaTeX usage184137 -Node: Base modules189582 -Node: plain192082 -Node: simplex192734 -Node: math193007 -Node: interpolate194106 -Node: geometry194385 -Node: trembling194979 -Node: stats195330 -Node: patterns195590 -Node: markers195826 -Node: tree197609 -Node: binarytree197797 -Node: drawtree198386 -Node: syzygy198590 -Node: feynman198864 -Node: roundedpath199139 -Node: animation199422 -Ref: animate199839 -Node: embed200978 -Node: slide202767 -Node: MetaPost203107 -Node: unicode203823 -Node: latin1204711 -Node: babel205079 -Node: labelpath205308 -Node: labelpath3206128 -Node: annotate206439 -Node: CAD206910 -Node: graph207220 -Ref: ticks214044 -Ref: pathmarkers227152 -Ref: marker227617 -Ref: markuniform227968 -Ref: errorbars229759 -Ref: automatic scaling233815 -Node: palette244461 -Ref: images244579 -Ref: image248750 -Ref: logimage249228 -Ref: penimage250034 -Node: three250478 -Ref: PostScript3D273050 -Node: obj274742 -Node: graph3274994 -Ref: GaussianSurface280119 -Node: grid3281204 -Node: solids281944 -Node: tube282892 -Node: flowchart285127 -Node: contour289626 -Node: contour3294657 -Node: slopefield294964 -Node: ode296401 -Node: Options296661 -Ref: configuration file302478 -Ref: settings302478 -Ref: convert303573 -Node: Interactive mode306362 -Ref: history308027 -Node: GUI309332 -Node: GUI installation309835 -Node: GUI usage310973 -Node: PostScript to Asymptote311876 -Node: Help312632 -Node: Debugger314368 -Node: Credits316153 -Node: Index317066 +Node: Installation10334 +Node: UNIX binary distributions11387 +Node: MacOS X binary distributions12493 +Node: Microsoft Windows13377 +Ref: psview14087 +Node: Configuring15008 +Node: Search paths19228 +Node: Compiling from UNIX source20025 +Ref: multisampling20614 +Node: Editing modes23032 +Node: Subversion25464 +Node: Uninstall25927 +Node: Tutorial26277 +Ref: unitcircle30503 +Node: Drawing commands32484 +Node: draw34195 +Ref: arrows35343 +Node: fill40586 +Ref: gradient shading41630 +Node: clip45823 +Node: label46415 +Ref: Label47114 +Node: Bezier curves52839 +Node: Programming56416 +Ref: array iteration57230 +Node: Data types58312 +Ref: format67213 +Node: Paths and guides70677 +Ref: circle70931 +Ref: arctime76288 +Ref: extension80153 +Node: Pens86836 +Ref: fillrule94080 +Ref: basealign94977 +Ref: transparency97802 +Ref: makepen101245 +Ref: overwrite102083 +Node: Transforms103293 +Node: Frames and pictures105084 +Ref: envelope106225 +Ref: size107308 +Ref: unitsize108295 +Ref: shipout109355 +Ref: filltype111688 +Ref: add114657 +Ref: add about115603 +Ref: tex118548 +Node: Files119422 +Ref: cd120387 +Ref: scroll124856 +Node: Variable initializers127929 +Node: Structures130224 +Node: Operators137676 +Node: Arithmetic & logical137990 +Node: Self & prefix operators139887 +Node: User-defined operators140675 +Node: Implicit scaling141586 +Node: Functions142149 +Ref: stack overflow144902 +Node: Default arguments145466 +Node: Named arguments146205 +Node: Rest arguments148367 +Node: Mathematical functions151177 +Node: Arrays155782 +Ref: sort162842 +Ref: tridiagonal165133 +Ref: solve166361 +Node: Slices170558 +Node: Casts174451 +Node: Import176417 +Node: Static181647 +Node: LaTeX usage184543 +Node: Base modules189988 +Node: plain192488 +Node: simplex193140 +Node: math193413 +Node: interpolate194512 +Node: geometry194791 +Node: trembling195385 +Node: stats195736 +Node: patterns195996 +Node: markers196232 +Node: tree198015 +Node: binarytree198203 +Node: drawtree198792 +Node: syzygy198996 +Node: feynman199270 +Node: roundedpath199545 +Node: animation199828 +Ref: animate200245 +Node: embed201384 +Node: slide203173 +Node: MetaPost203513 +Node: unicode204229 +Node: latin1205117 +Node: babel205485 +Node: labelpath205714 +Node: labelpath3206534 +Node: annotate206845 +Node: CAD207316 +Node: graph207626 +Ref: ticks214450 +Ref: pathmarkers227558 +Ref: marker228023 +Ref: markuniform228374 +Ref: errorbars230165 +Ref: automatic scaling234221 +Node: palette244867 +Ref: images244985 +Ref: image249156 +Ref: logimage249634 +Ref: penimage250440 +Node: three250884 +Ref: PostScript3D273456 +Node: obj275148 +Node: graph3275400 +Ref: GaussianSurface280525 +Node: grid3281610 +Node: solids282350 +Node: tube283298 +Node: flowchart285533 +Node: contour290032 +Node: contour3295063 +Node: slopefield295370 +Node: ode296807 +Node: Options297067 +Ref: configuration file302880 +Ref: settings302880 +Ref: convert303975 +Node: Interactive mode306764 +Ref: history308429 +Node: GUI309734 +Node: GUI installation310237 +Node: GUI usage311375 +Node: PostScript to Asymptote312278 +Node: Help313034 +Node: Debugger314770 +Node: Credits316555 +Node: Index317468 End Tag Table diff --git a/Build/source/utils/asymptote/doc/square.asy b/Build/source/utils/asymptote/doc/square.asy index f3f34a4c628..1bff4e438f5 100644 --- a/Build/source/utils/asymptote/doc/square.asy +++ b/Build/source/utils/asymptote/doc/square.asy @@ -1 +1,2 @@ -draw((0,0)--(100,0)--(100,100)--(0,100)--cycle); +size(100,100); +draw((0,0)--(1,0)--(1,1)--(0,1)--cycle); diff --git a/Build/source/utils/asymptote/drawelement.h b/Build/source/utils/asymptote/drawelement.h index e704912ac21..bdc7d2b020e 100644 --- a/Build/source/utils/asymptote/drawelement.h +++ b/Build/source/utils/asymptote/drawelement.h @@ -21,6 +21,8 @@ namespace camp { +enum Entity {LINE=0,CURVE,SURFACE,BILLBOARD_SURFACE,nENTITY}; + class box { pair p[4]; public: @@ -132,7 +134,9 @@ public: } // Output to a PRC file - virtual bool write(prcfile *) { + // The array origin contains the points about which to rotate billboard labels + virtual bool write(prcfile *out, unsigned int *count, vm::array *index, + vm::array *origin) { return false; } diff --git a/Build/source/utils/asymptote/drawpath3.cc b/Build/source/utils/asymptote/drawpath3.cc index 2586f4b9472..41a280d2f25 100644 --- a/Build/source/utils/asymptote/drawpath3.cc +++ b/Build/source/utils/asymptote/drawpath3.cc @@ -10,18 +10,30 @@ namespace camp { using vm::array; -bool drawPath3::write(prcfile *out) +bool drawPath3::write(prcfile *out, unsigned int *count, array *, array *) { Int n=g.length(); if(n == 0 || invisible) return true; + ostringstream buf; + if(straight) { + if(name == "") + buf << "line-" << count[LINE]++; + else + buf << name; + controls=new Triple[n+1]; for(Int i=0; i <= n; ++i) store(controls[i],g.point(i)); out->add(new PRCline(out,n+1,controls,color,scale3D,name.c_str())); } else { + if(name == "") + buf << "curve-" << count[CURVE]++; + else + buf << name; + int m=3*n+1; controls=new Triple[m]; store(controls[0],g.point((Int) 0)); diff --git a/Build/source/utils/asymptote/drawpath3.h b/Build/source/utils/asymptote/drawpath3.h index 342019f5abe..d956e49e243 100644 --- a/Build/source/utils/asymptote/drawpath3.h +++ b/Build/source/utils/asymptote/drawpath3.h @@ -51,7 +51,8 @@ public: } else b=pair(m(b.getx(),z.getx()),m(b.gety(),z.gety())); } - bool write(prcfile *out); + bool write(prcfile *out, unsigned int *count, vm::array *index, + vm::array *origin); void render(GLUnurbs*, double, const triple&, const triple&, double, bool transparent); diff --git a/Build/source/utils/asymptote/drawsurface.cc b/Build/source/utils/asymptote/drawsurface.cc index 541a3a0876f..61c661821a2 100644 --- a/Build/source/utils/asymptote/drawsurface.cc +++ b/Build/source/utils/asymptote/drawsurface.cc @@ -141,17 +141,40 @@ void drawSurface::ratio(pair &b, double (*m)(double, double), bool &first) } } -bool drawSurface::write(prcfile *out) +bool drawSurface::write(prcfile *out, unsigned int *count, array *index, + array *origin) { if(invisible) return true; + ostringstream buf; + if(name == "") + buf << "surface-" << count[SURFACE]++; + else + buf << name; + + if(interaction == BILLBOARD) { + triple Center=center*scale3D; + size_t n=origin->size(); + + if(n == 0 || Center != vm::read<triple>(origin,n-1)) { + origin->push(Center); + ++n; + } + + unsigned int i=count[BILLBOARD_SURFACE]++; + buf << "-" << i << "\001"; + index->push((Int) (n-1)); + } + PRCMaterial m(ambient,diffuse,emissive,specular,opacity,PRCshininess); if(straight) - out->add(new PRCBezierSurface(out,1,1,2,2,vertices,m,granularity,name)); + out->add(new PRCBezierSurface(out,1,1,2,2,vertices,m,granularity, + buf.str())); else - out->add(new PRCBezierSurface(out,3,3,4,4,controls,m,granularity,name)); + out->add(new PRCBezierSurface(out,3,3,4,4,controls,m,granularity, + buf.str())); return true; } @@ -216,6 +239,7 @@ inline double fraction(const triple& d, const triple& size) fraction(d.getz(),size.getz())); } +#ifdef HAVE_LIBGL struct billboard { triple u,v,w; @@ -242,6 +266,7 @@ struct billboard }; billboard BB; +#endif void drawSurface::render(GLUnurbs *nurb, double size2, const triple& Min, const triple& Max, @@ -250,59 +275,58 @@ void drawSurface::render(GLUnurbs *nurb, double size2, #ifdef HAVE_LIBGL if(invisible || ((colors ? colors[3]+colors[7]+colors[11]+colors[15] < 4.0 : diffuse.A < 1.0) ^ transparent)) return; - - bool havebillboard=name.size() >= 1 && name[0] == ' '; double s; static GLfloat Normal[3]; - if(havebillboard) BB.init(); - else { - static GLfloat v[16]; - static GLfloat v1[16]; - static GLfloat v2[16]; - - initMatrix(v1,Min.getx(),Min.gety(),Min.getz(),Max.gety(),Max.getz()); - initMatrix(v2,Max.getx(),Min.gety(),Min.getz(),Max.gety(),Max.getz()); - - glPushMatrix(); - glMultMatrixf(v1); - glGetFloatv(GL_MODELVIEW_MATRIX,v); - glPopMatrix(); - - bbox3 B(v[0],v[1],v[2]); - B.addnonempty(v[4],v[5],v[6]); - B.addnonempty(v[8],v[9],v[10]); - B.addnonempty(v[12],v[13],v[14]); - - glPushMatrix(); - glMultMatrixf(v2); - glGetFloatv(GL_MODELVIEW_MATRIX,v); - glPopMatrix(); - - B.addnonempty(v[0],v[1],v[2]); - B.addnonempty(v[4],v[5],v[6]); - B.addnonempty(v[8],v[9],v[10]); - B.addnonempty(v[12],v[13],v[14]); - - triple M=B.Max(); - triple m=B.Min(); - - if(perspective) { - double f=m.getz()*perspective; - double F=M.getz()*perspective; - s=max(f,F); - if(M.getx() < min(f*Min.getx(),F*Min.getx()) || - m.getx() > max(f*Max.getx(),F*Max.getx()) || - M.gety() < min(f*Min.gety(),F*Min.gety()) || - m.gety() > max(f*Max.gety(),F*Max.gety()) || - M.getz() < Min.getz() || - m.getz() > Max.getz()) return; - } else { - s=1.0; - if(M.getx() < Min.getx() || m.getx() > Max.getx() || - M.gety() < Min.gety() || m.gety() > Max.gety() || - M.getz() < Min.getz() || m.getz() > Max.getz()) return; - } + static GLfloat v[16]; + static GLfloat v1[16]; + static GLfloat v2[16]; + + initMatrix(v1,Min.getx(),Min.gety(),Min.getz(),Max.gety(),Max.getz()); + initMatrix(v2,Max.getx(),Min.gety(),Min.getz(),Max.gety(),Max.getz()); + + glPushMatrix(); + glMultMatrixf(v1); + glGetFloatv(GL_MODELVIEW_MATRIX,v); + glPopMatrix(); + + bbox3 B(v[0],v[1],v[2]); + B.addnonempty(v[4],v[5],v[6]); + B.addnonempty(v[8],v[9],v[10]); + B.addnonempty(v[12],v[13],v[14]); + + glPushMatrix(); + glMultMatrixf(v2); + glGetFloatv(GL_MODELVIEW_MATRIX,v); + glPopMatrix(); + + B.addnonempty(v[0],v[1],v[2]); + B.addnonempty(v[4],v[5],v[6]); + B.addnonempty(v[8],v[9],v[10]); + B.addnonempty(v[12],v[13],v[14]); + + triple M=B.Max(); + triple m=B.Min(); + + bool havebillboard=interaction == BILLBOARD; + + if(perspective) { + double f=m.getz()*perspective; + double F=M.getz()*perspective; + s=max(f,F); + if(!havebillboard && (M.getx() < min(f*Min.getx(),F*Min.getx()) || + m.getx() > max(f*Max.getx(),F*Max.getx()) || + M.gety() < min(f*Min.gety(),F*Min.gety()) || + m.gety() > max(f*Max.gety(),F*Max.gety()) || + M.getz() < Min.getz() || + m.getz() > Max.getz())) + return; + } else { + s=1.0; + if(!havebillboard && (M.getx() < Min.getx() || m.getx() > Max.getx() || + M.gety() < Min.gety() || m.gety() > Max.gety() || + M.getz() < Min.getz() || m.getz() > Max.getz())) + return; } bool ambientdiffuse=true; @@ -341,6 +365,7 @@ void drawSurface::render(GLUnurbs *nurb, double size2, Max.getz()-Min.getz()); bool havenormal=normal != zero; + if(havebillboard) BB.init(); if(!havenormal || (!straight && (fraction(d,size3)*size2 >= pixel || granularity == 0))) { @@ -418,8 +443,15 @@ drawElement *drawSurface::transformed(const array& t) return new drawSurface(t,this); } -bool drawNurbs::write(prcfile *out) +bool drawNurbs::write(prcfile *out, unsigned int *count, array *index, + array *origin) { + ostringstream buf; + if(name == "") + buf << "surface-" << count[SURFACE]++; + else + buf << name; + if(invisible) return true; diff --git a/Build/source/utils/asymptote/drawsurface.h b/Build/source/utils/asymptote/drawsurface.h index 693488cfcf6..c498c469068 100644 --- a/Build/source/utils/asymptote/drawsurface.h +++ b/Build/source/utils/asymptote/drawsurface.h @@ -18,6 +18,8 @@ extern double *copyArrayC(const array *a, size_t dim); namespace camp { +enum Interaction {EMBEDDED=0,BILLBOARD}; + #ifdef HAVE_LIBGL void storecolor(GLfloat *colors, int i, const vm::array &pens, int j); #endif @@ -40,6 +42,7 @@ protected: bool invisible; bool lighton; string name; + Interaction interaction; triple Min,Max; @@ -55,10 +58,11 @@ public: drawSurface(const vm::array& g, triple center, bool straight, const vm::array&p, double opacity, double shininess, double PRCshininess, double granularity, triple normal, - const vm::array &pens, bool lighton, const string& name) : + const vm::array &pens, bool lighton, const string& name, + Int interaction) : center(center), straight(straight), opacity(opacity), shininess(shininess), PRCshininess(PRCshininess), granularity(granularity), normal(unit(normal)), - lighton(lighton), name(name) { + lighton(lighton), name(name), interaction((Interaction) interaction) { string wrongsize= "Bezier surface patch requires 4x4 array of triples and array of 4 pens"; if(checkArray(&g) != 4 || checkArray(&p) != 4) @@ -113,7 +117,7 @@ public: emissive(s->emissive), specular(s->specular), opacity(s->opacity), shininess(s->shininess), PRCshininess(s->PRCshininess), granularity(s->granularity), invisible(s->invisible), - lighton(s->lighton), name(s->name) { + lighton(s->lighton), name(s->name), interaction(s->interaction) { for(size_t i=0; i < 4; ++i) { const double *c=s->vertices[i]; @@ -156,7 +160,8 @@ public: #endif } - bool write(prcfile *out); + bool write(prcfile *out, unsigned int *count, vm::array *index, + vm::array *origin); void displacement(); void render(GLUnurbs *nurb, double, const triple& Min, const triple& Max, @@ -342,7 +347,8 @@ public: #endif } - bool write(prcfile *out); + bool write(prcfile *out, unsigned int *count, vm::array *index, + vm::array *origin); void displacement(); void ratio(pair &b, double (*m)(double, double), bool &first); diff --git a/Build/source/utils/asymptote/errortest.asy b/Build/source/utils/asymptote/errortest.asy deleted file mode 100644 index 500a3972e1f..00000000000 --- a/Build/source/utils/asymptote/errortest.asy +++ /dev/null @@ -1,415 +0,0 @@ -/***** - * errortest.asy - * Andy Hammerlindl 2003/08/08 - * - * This struct attempts to trigger every error message reportable by the - * compiler to ensure that errors are being reported properly. - *****/ - -// name.cc -{ - // line 33 - x.y = 5; -} -{ - // line 50 - int x = z; -} -{ - // line 67 - x = 5; -} -{ - // line 84 - unreachable -} -{ - // line 95 - x y1; - x y2(); - x y3(int); - int y4(x); - struct m { - x y1; - x y2(); - x y3(int); - int y4(x); - } -} -{ - // line 130 - int x; - x.y = 4; -} -{ - // line 156 - struct m { - int x,y; - } - m.u.v = 5; -} -{ - // line 186 - struct m { - int x,y; - } - int x = m.z; -} -{ - // line 217 - struct m { - int x,y; - } - m.z = 5; -} -{ - // line 249 - unreachable -} -{ - // line 272 - not testable without typedef -} -{ - // line 283 - struct m { - int x,y; - } - m.u v; - struct mm { - m.u v; - } -} - -// exp.h -{ - // line 109 - 5 = 4; -} -{ - // line 136 - int f, f(); - f; - struct m { int f, f(); } - m.f; -} - -// exp.cc -{ - // line 40 - int x = {}; - int y = {4, 5, 6}; -} -{ - // line 110 - int f(), f(int); - f.m = 5; -} -{ - // line 122 - int x; - x.m = 5; -} -{ - // line 147 - struct point { - int x,y; - } - point p; - int x = p.z; -} -{ - // line 157 - struct point { - int x, y; - } - point p; - p.z; -} -{ - // line 163 - struct point { - int f(), f(int); - } - point p; - p.f; -} -{ - // line 204 - struct point { - int x, y; - } - point p; - p.z = 5; -} -{ - // line 229 - unreachable -} -{ - // lines 261 and 275 - wait for subscript to be fully implemented. -} -{ - // line 515 - void f(int), f(int, int); - f(); - f("Hello?"); -} -{ - // line 520 - not yet testable (need int->float casting or the like) -} -{ - // line 525 - void f(int); - f(); -} -{ - // line 649 - struct point { - int x,y; - } - point p; - p = +p; -} -{ - // line 1359 - int x, f(); - (true) ? x : f; -} -{ - // line 1359 - int a, a(), b, b(); - (true) ? a : b; -} -{ - // line 1581 - int x, f(); - x = f; -} -{ - // line 1586 - int a, a(), b, b(); - a = b; -} - -// newexp.cc -{ - // line 34 - int f() = new int () { - int x = 5; - }; -} -{ - // line 64 - int x = new int; -} -{ - // line 72 - struct a { - struct b { - } - } - - new a.b; -} - -// stm.cc -{ - // line 86 - 5; -} -{ - // line 246 - break; -} -{ - // line 261 - continue; -} -{ - // line 282 - void f() { - return 17; - } -} -{ - // line 288 - int f() { - return; - } -} - -// dec.cc -{ - // line 378 - int f() { - int x = 5; - } - int g() { - if (true) - return 7; - } -} - -// env.h -{ - // line 99 - struct m {} - struct m {} -} -{ - // line 109 - int f() { - return 1; - } - int f() { - return 2; - } - - int x = 1; - int x = 2; - - struct m { - int f() { - return 1; - } - int f() { - return 2; - } - - int x = 1; - int x = 2; - } -} - -// env.cc -{ - // line 107 - currently unreachable as no built-ins are currently used - // in records. -} -{ - // line 140 - // Assuming there is a built-in function void abort(string): - void f(string); - abort = f; -} -{ - // line 168 - currently unreachable as no built-in functions are - // currently used in records. -} -{ - // line 222 - int x = "Hello"; -} - -// Test permissions. -{ - struct A { - private int x=4; - restricted int y=5; - - private void f() {} - restricted void g() {} - } - - A a; - a.x; - a.x = 4; - a.x += 5; - a.y = 6; - a.y += 7; - - a.f; - a.f(); - a.f = new void() {}; - a.g = new void() {}; -} -{ - struct A { - private int x=4; - private void f() {} - } - - A a; - from a unravel x; - from a unravel f; -} -{ - struct A { - restricted int y=5; - restricted void g() {} - } - - A a; - from a unravel y,g; - y = 6; - y += 7; - - g = new void() {}; -} -{ - struct A { - private typedef int T; - } - A.T x; - A.T x=4; - int y=2; - A.T x=y; - A.T x=17+3*y; -} -{ - struct A { - private typedef int T; - } - from A unravel T; -} -{ - struct A { - private typedef int T; - } - A a; - a.T x; - a.T x=4; - int y=2; - a.T x=y; - a.T x=17+3*y; -} -{ - struct A { - private typedef int T; - } - A a; - from a unravel T; -} - -// Read-only settings -// Ensure that the safe and globalwrite options can't be modified inside the -// code. -{ - access settings; - settings.safe=false; - settings.safe=true; - settings.globalwrite=false; - settings.globalwrite=true; -} -{ - from settings access safe, globalwrite; - safe=false; - safe=true; - globalwrite=false; - globalwrite=true; -} -{ - from settings access safe as x, globalwrite as y; - x=false; - x=true; - y=false; - y=true; -} -{ - import settings; - settings.safe=false; - settings.safe=true; - settings.globalwrite=false; - settings.globalwrite=true; - safe=false; - safe=true; - globalwrite=false; - globalwrite=true; -} diff --git a/Build/source/utils/asymptote/examples/Klein.asy b/Build/source/utils/asymptote/examples/Klein.asy index 06ef4271660..4c8089dd86a 100644 --- a/Build/source/utils/asymptote/examples/Klein.asy +++ b/Build/source/utils/asymptote/examples/Klein.asy @@ -34,8 +34,8 @@ z=(2-\cos u)\sin v.\cr}$"; real h=0.0125; -draw(surface(xscale(-0.38)*yscale(-0.18)*lo,s,0,1.7,h)); -draw(surface(xscale(0.26)*yscale(0.1)*rotate(90)*hi,s,4.9,1.4,h)); +draw(surface(xscale(-0.38)*yscale(-0.18)*lo,s,0,1.7,h,bottom=false)); +draw(surface(xscale(0.26)*yscale(0.1)*rotate(90)*hi,s,4.9,1.4,h,bottom=false)); draw(s.uequals(0),blue+dashed); draw(s.uequals(pi),blue+dashed); diff --git a/Build/source/utils/asymptote/examples/billboard.asy b/Build/source/utils/asymptote/examples/billboard.asy index 13cc69bc7df..e126c1c5157 100644 --- a/Build/source/utils/asymptote/examples/billboard.asy +++ b/Build/source/utils/asymptote/examples/billboard.asy @@ -1,11 +1,8 @@ import three; -// Billboard support in PRC is not yet implemented. -settings.outformat="eps"; - size(100); draw(unitbox); label("Billboard",X,red,Billboard); -label("Fixed",Y,blue); +label("Embedded",Y,blue,Embedded); diff --git a/Build/source/utils/asymptote/examples/fequlogo.asy b/Build/source/utils/asymptote/examples/fequlogo.asy new file mode 100644 index 00000000000..29cae0be720 --- /dev/null +++ b/Build/source/utils/asymptote/examples/fequlogo.asy @@ -0,0 +1,40 @@ +// A compressed version of the required data file may be obtained from: +// http://www-roc.inria.fr/gamma/download/counter.php?dir=ARCHITEC/&get_obj=uhrturm.obj.gz + +import graph3; +import obj; + +size(200,0); +size3(200); + +settings.render=8; + +texpreamble("\usepackage[T1]{fontenc}"); +texpreamble("\usepackage{ccfonts,eulervm}"); + +currentprojection=perspective(4,1,2); +currentlight=(4,0,2); +currentlight.background=blue; + +real R=4; + +triple f1(pair t) {return (R*cos(t.x),R*sin(t.x),t.y);} + +draw(shift(-0.6Z)*scale3(0.66)*rotate(55,Z)*rotate(90,X)* + obj("uhrturm.obj",orange)); + +surface s=surface(f1,(0,0),(2pi,2),8,8,Spline); + +string lo="$\displaystyle f(x+y)=f(x)+f(y)$"; +string hi="$\displaystyle F_{t+s}=F_t\circ F_s$"; + +real h=0.0125; + +draw(surface(rotate(2)*xscale(0.32)*yscale(0.6)*lo,s,-pi/4-1.5*pi/20,0.5,h)); +draw(surface(rotate(0)*xscale(-0.45)*yscale(0.3)*hi,s,0.8*pi,0.25,h),blue); + +currentpicture.add(new void(frame f, transform3 t, picture pic, projection P) { + draw(f,surface(invert(box(min(f,P),max(f,P)),min3(f),P), + new pen[] {orange,red,yellow,brown})); + } +); diff --git a/Build/source/utils/asymptote/examples/slidedemo.asy b/Build/source/utils/asymptote/examples/slidedemo.asy index c57c60adf7e..ae2f48c33a2 100644 --- a/Build/source/utils/asymptote/examples/slidedemo.asy +++ b/Build/source/utils/asymptote/examples/slidedemo.asy @@ -7,7 +7,6 @@ orientation=Landscape; import slide; import three; -settings.toolbar=false; viewportsize=pagewidth-2pagemargin; usersetting(); diff --git a/Build/source/utils/asymptote/examples/truncatedIcosahedron.asy b/Build/source/utils/asymptote/examples/truncatedIcosahedron.asy new file mode 100644 index 00000000000..436c6121b9f --- /dev/null +++ b/Build/source/utils/asymptote/examples/truncatedIcosahedron.asy @@ -0,0 +1,66 @@ +import graph3; + +size(200); + +real c=(1+sqrt(5))/2; + +triple[] z={(c,1,0),(-c,1,0),(-c,-1,0),(c,-1,0)}; +triple[] x={(0,c,1),(0,-c,1),(0,-c,-1),(0,c,-1)}; +triple[] y={(1,0,c),(1,0,-c),(-1,0,-c),(-1,0,c)}; + +triple[][] Q={ + {(c,1,0),(1,0,-c),(0,c,-1),(0,c,1),(1,0,c),(c,-1,0)}, + {(-c,1,0),(0,c,1),(0,c,-1),(-1,0,-c),(-c,-1,0),(-1,0,c)}, + {(-c,-1,0),(-c,1,0),(-1,0,-c),(0,-c,-1),(0,-c,1),(-1,0,c)}, + {(c,-1,0),(c,1,0),(1,0,c),(0,-c,1),(0,-c,-1),(1,0,-c)}, + {(0,c,1),(0,c,-1),(-c,1,0),(-1,0,c),(1,0,c),(c,1,0)}, + {(0,-c,1),(0,-c,-1),(-c,-1,0),(-1,0,c),(1,0,c),(c,-1,0)}, + {(0,-c,-1),(0,-c,1),(c,-1,0),(1,0,-c),(-1,0,-c),(-c,-1,0)}, + {(0,c,-1),(0,c,1),(c,1,0),(1,0,-c),(-1,0,-c),(-c,1,0)}, + {(1,0,c),(-1,0,c),(0,-c,1),(c,-1,0),(c,1,0),(0,c,1)}, + {(1,0,-c),(-1,0,-c),(0,-c,-1),(c,-1,0),(c,1,0),(0,c,-1)}, + {(-1,0,-c),(1,0,-c),(0,c,-1),(-c,1,0),(-c,-1,0),(0,-c,-1)}, + {(-1,0,c),(1,0,c),(0,c,1),(-c,1,0),(-c,-1,0),(0,-c,1)} +}; + +real R=abs(interp(Q[0][0],Q[0][1],1/3)); + +triple[][] P; +for(int i=0; i < Q.length; ++i) { + P[i]=new triple[] ; + for(int j=0; j < Q[i].length; ++j) { + P[i][j]=Q[i][j]/R; + } +} + +for(int i=0; i < P.length; ++i) { + for(int j=1; j < P[i].length; ++j) { + triple C=P[i][0]; + triple A=P[i][j]; + triple B=P[i][j % 5+1]; + triple[] sixout=new + triple[] {interp(C,A,1/3),interp(C,A,2/3),interp(A,B,1/3),interp(A,B,2/3), + interp(B,C,1/3),interp(B,C,2/3)}; + triple M=(sum(sixout))/6; + triple[] sixin=sequence(new triple(int k) { + return interp(sixout[k],M,0.1); + },6); + draw(surface(reverse(operator--(...sixout)--cycle)^^ + operator--(...sixin)--cycle,planar=true),magenta); + } +} + +for(int i=0; i < P.length; ++i) { + triple[] fiveout=sequence(new triple(int k) { + return interp(P[i][0],P[i][k+1],1/3); + },5); + triple M=(sum(fiveout))/5; + triple[] fivein=sequence(new triple(int k) { + return interp(fiveout[k],M,0.1); + },5); + draw(surface(reverse(operator--(...fiveout)--cycle)^^ + operator--(...fivein)--cycle,planar=true),cyan); +} + + + diff --git a/Build/source/utils/asymptote/examples/worksheet.asy b/Build/source/utils/asymptote/examples/worksheet.asy new file mode 100644 index 00000000000..b3aa2dba8a0 --- /dev/null +++ b/Build/source/utils/asymptote/examples/worksheet.asy @@ -0,0 +1,45 @@ +import fontsize; + +defaultpen(Helvetica()); + +picture pic; +unitsize(pic,mm); + +pair z=(0,0); +real length=88; +real height=8; +pair step=height*S; + +label(pic,"Word Wall Spelling",z,Align); +z += step; +frame f; +label(f,"Name:"); +pair z0=(max(f).x,min(f).y); +draw(f,z0--z0+50mm); +add(pic,f,z,Align); +z += step; + +for(int i=1; i <= 14; ++i) { + draw(pic,z--z+length); + z += step; + draw(pic,z--z+length,dashed); + z += step; + void label(int i) { + label(pic,string(i)+".",z,0.2NE,fontsize(0.8*1.5*2*height*mm)+gray); + } + if(i <= 10) label(i); + else if(i == 11) { + pair z0=z+length/2; + pen p=fontsize(20pt); + label(pic,"Challenge Word",z0+N*height,I*Align.y,p+basealign); + label(pic,"(optional)",z0,I*Align.y,p); + } + else if(i == 12) label(1); + else if(i == 13) label(2); +} +draw(pic,z--z+length); + +add(pic.fit(),(0,0),W); +add(pic.fit(),(0,0),E); + + diff --git a/Build/source/utils/asymptote/main.cc b/Build/source/utils/asymptote/main.cc index 153e5a265f7..003ea5670fc 100644 --- a/Build/source/utils/asymptote/main.cc +++ b/Build/source/utils/asymptote/main.cc @@ -61,10 +61,12 @@ int sigsegv_handler (void *, int emergency) { if(!emergency) return 0; // Really a stack overflow em.runtime(vm::getPos()); +#ifdef HAVE_LIBGL if(gl::glthread) cerr << "Stack overflow or segmentation fault: rerun with -nothreads" << endl; else +#endif cerr << "Segmentation fault" << endl; abort(); } diff --git a/Build/source/utils/asymptote/patches/pstoedit-3.45asy.patch b/Build/source/utils/asymptote/patches/pstoedit-3.45asy.patch deleted file mode 100644 index da289bba0c0..00000000000 --- a/Build/source/utils/asymptote/patches/pstoedit-3.45asy.patch +++ /dev/null @@ -1,182 +0,0 @@ -diff -ru pstoedit-3.45/src/cppcomp.h pstoedit-3.45J/src/cppcomp.h ---- pstoedit-3.45/src/cppcomp.h 2007-07-22 05:27:40.000000000 -0600 -+++ pstoedit-3.45J/src/cppcomp.h 2009-02-11 23:20:06.000000000 -0700 -@@ -22,6 +22,8 @@ - - */ - -+#include <cstring> -+ - #ifdef _MSC_VER - # ifndef DLLEXPORT - # define DLLEXPORT __declspec( dllexport ) -@@ -242,7 +244,7 @@ - *de = 0; - } else { - cerr << "buffer overflow in strcpy_s. Input string: '" << so << "' count: " << count << " sourcelen " << sourcelen << " buffersize " << de_size << endl; -- exit(1); -+ _exit(1); - } - } - static inline void strcpy_s(char * de, size_t de_size, const char * so) { -diff -ru pstoedit-3.45/src/drvasy.cpp pstoedit-3.45J/src/drvasy.cpp ---- pstoedit-3.45/src/drvasy.cpp 2007-07-22 05:27:30.000000000 -0600 -+++ pstoedit-3.45J/src/drvasy.cpp 2007-12-08 16:22:58.000000000 -0700 -@@ -58,7 +58,8 @@ - clipmode(false), - evenoddmode(false), - firstpage(true), -- imgcount(0) -+ imgcount(0), -+ level(0) - { - // Output copyright information - outf << "// Converted from PostScript(TM) to Asymptote by pstoedit\n" -@@ -76,6 +77,29 @@ - options=0; - } - -+void drvASY::save() -+{ -+ while(gsavestack.size() && gsavestack.front()) { -+ gsavestack.pop_front(); -+ outf << "gsave();" << endl; -+ ++level; -+ clipstack.push_back(false); -+ } -+} -+ -+void drvASY::restore() { -+ while(gsavestack.size() && !gsavestack.front()) { -+ gsavestack.pop_front(); -+ while(clipstack.size() > 0) { -+ if(clipstack.back()) -+ outf << "endclip();" << endl; -+ clipstack.pop_back(); -+ } -+ outf << "grestore();" << endl; -+ if(level > 0) --level; -+ } -+} -+ - // Output a path - void drvASY::print_coords() - { -@@ -84,11 +108,7 @@ - bool havecycle=false; - bool firstpoint=false; - -- while(gsavestack.size() && gsavestack.front()) { -- gsavestack.pop_front(); -- outf << "gsave();" << endl; -- clipstack.push_back(false); -- } -+ save(); - - if (fillmode || clipmode) { - for (unsigned int n = 0; n < numberOfElementsInPath(); n++) { -@@ -247,16 +267,7 @@ - outf << ");" << endl; - } - } -- -- while(gsavestack.size() && !gsavestack.front()) { -- gsavestack.pop_front(); -- if(clipstack.size() > 0) { -- if(clipstack.back()) -- outf << "endclip();" << endl; -- clipstack.pop_back(); -- } -- outf << "grestore();" << endl; -- } -+ restore(); - } - - // Each page will produce a different figure -@@ -272,6 +283,8 @@ - - void drvASY::show_image(const PSImage & imageinfo) - { -+ restore(); -+ - if (outBaseName == "" ) { - errf << "images cannot be handled via standard output. Use an output file" << endl; - return; -@@ -285,9 +298,13 @@ - ostringstream buf; - buf << outBaseName << "." << imgcount << ".eps"; - -- outf << "label(graphic(\"" << buf.str() << "\"),(" -+ outf << "label(graphic(\"" << buf.str() << "\",\"bb=" -+ << ll.x_ << " " << ll.y_ << " " << ur.x_ << " " << ur.y_ << "\"),(" - << ll.x_ << "," << ll.y_ << "),align);" << endl; -- outf << "layer();" << endl; -+ -+ // Try to draw image in a separate layer. -+ if(level == 0) -+ outf << "layer();" << endl; - - ofstream outi(buf.str().c_str()); - if (!outi) { -@@ -304,6 +321,8 @@ - // Output a text string - void drvASY::show_text(const TextInfo & textinfo) - { -+ restore(); -+ - // Change fonts - string thisFontName(textinfo.currentFontName.value()); - string thisFontWeight(textinfo.currentFontWeight.value()); -@@ -361,7 +380,8 @@ - if(prevFontAngle != 0.0) outf << "rotate(" << prevFontAngle << ")*("; - bool texify=false; - bool quote=false; -- for (const char *c = textinfo.thetext.value(); *c; c++) { -+ const char *c=textinfo.thetext.value(); -+ if(*c) for (; *c; c++) { - if (*c >= ' ' && *c != '\\' && *c <= '~') { - if(!texify) { - if(quote) outf << "\"+"; -@@ -383,7 +403,7 @@ - } - outf << "\\char" << (int) *c; - } -- } -+ } else outf << "\"\""; - if(quote) outf << "\""; - if(texify) outf << ")"; - if(prevFontAngle != 0.0) outf << ")"; -diff -ru pstoedit-3.45/src/drvasy.h pstoedit-3.45J/src/drvasy.h ---- pstoedit-3.45/src/drvasy.h 2007-07-22 05:27:40.000000000 -0600 -+++ pstoedit-3.45J/src/drvasy.h 2007-12-08 16:22:51.000000000 -0700 -@@ -58,6 +58,8 @@ - - private: - void print_coords(); -+ void save(); -+ void restore(); - // Previous values of graphics state variables - string prevFontName; - string prevFontWeight; -@@ -80,6 +82,9 @@ - - int imgcount; - -+ unsigned int level; -+ // gsave nesting level -+ - std::list<bool> clipstack; - std::list<bool> gsavestack; - }; -diff -ru pstoedit-3.45/src/dynload.cpp pstoedit-3.45J/src/dynload.cpp ---- pstoedit-3.45/src/dynload.cpp 2007-07-22 05:27:36.000000000 -0600 -+++ pstoedit-3.45J/src/dynload.cpp 2009-02-11 15:28:59.000000000 -0700 -@@ -93,7 +93,7 @@ - { - if (handle) { - cerr << "error: DynLoader has already opened a library" << endl; -- exit(1); -+ _exit(1); - } - const unsigned int size = strlen(libname_P) + 1; - char *fulllibname = new char[size]; diff --git a/Build/source/utils/asymptote/picture.cc b/Build/source/utils/asymptote/picture.cc index c23b2ac58aa..b8bbbfb34f6 100644 --- a/Build/source/utils/asymptote/picture.cc +++ b/Build/source/utils/asymptote/picture.cc @@ -15,6 +15,7 @@ using std::ifstream; using std::ofstream; +using vm::array; using namespace settings; using namespace gl; @@ -291,6 +292,8 @@ bool picture::texprocess(const string& texname, const string& outname, ifstream outfile; outfile.open(texname.c_str()); + bool keep=getSetting<bool>("keep"); + if(outfile) { outfile.close(); @@ -298,9 +301,9 @@ bool picture::texprocess(const string& texname, const string& outname, string texengine=getSetting<string>("tex"); string dviname=auxname(prefix,"dvi"); + mem::vector<string> cmd; if(svgformat) { - mem::vector<string> cmd; cmd.push_back(getSetting<string>("dvisvgm")); cmd.push_back("-n"); cmd.push_back("--verbosity=3"); @@ -309,6 +312,8 @@ bool picture::texprocess(const string& texname, const string& outname, cmd.push_back(dviname); status=System(cmd,0,true,"dvisvgm"); if(status != 0) return false; + if(!keep) + unlink(dviname.c_str()); } else { if(!pdf) { string psname=auxname(prefix,"ps"); @@ -329,19 +334,18 @@ bool picture::texprocess(const string& texname, const string& outname, setenv("DVIPSRC",dvipsrc.c_str(),1); string papertype=getSetting<string>("papertype") == "letter" ? "letterSize" : "a4size"; - mem::vector<string> dcmd; - dcmd.push_back(getSetting<string>("dvips")); - dcmd.push_back("-R"); - dcmd.push_back("-Pdownload35"); - dcmd.push_back("-D600"); - dcmd.push_back("-O"+String(hoffset)+"bp,"+String(voffset)+"bp"); - dcmd.push_back("-T"+String(paperWidth)+"bp,"+String(paperHeight)+"bp"); - push_split(dcmd,getSetting<string>("dvipsOptions")); - dcmd.push_back("-t"+papertype); - if(verbose <= 1) dcmd.push_back("-q"); - dcmd.push_back("-o"+psname); - dcmd.push_back(dviname); - status=System(dcmd,0,true,"dvips"); + cmd.push_back(getSetting<string>("dvips")); + cmd.push_back("-R"); + cmd.push_back("-Pdownload35"); + cmd.push_back("-D600"); + cmd.push_back("-O"+String(hoffset)+"bp,"+String(voffset)+"bp"); + cmd.push_back("-T"+String(paperWidth)+"bp,"+String(paperHeight)+"bp"); + push_split(cmd,getSetting<string>("dvipsOptions")); + cmd.push_back("-t"+papertype); + if(verbose <= 1) cmd.push_back("-q"); + cmd.push_back("-o"+psname); + cmd.push_back(dviname); + status=System(cmd,0,true,"dvips"); if(status != 0) return false; ifstream fin(psname.c_str()); @@ -373,14 +377,14 @@ bool picture::texprocess(const string& texname, const string& outname, } else fout.verbatimline(s); } - if(!getSetting<bool>("keep")) { // Delete temporary files. + if(!keep) { unlink(dviname.c_str()); unlink(psname.c_str()); } } } - - if(!getSetting<bool>("keep")) { // Delete temporary files. + + if(!keep) { unlink(texname.c_str()); if(!getSetting<bool>("keepaux")) unlink(auxname(prefix,"aux").c_str()); @@ -923,21 +927,24 @@ bool picture::shipout3(const string& prefix, const string& format, return true; #endif #else - reportError("Cannot render image; please install glut, run ./configure, and recompile"); + reportError("Cannot render image; please install glut, run ./configure, and recompile"); #endif return false; } -bool picture::shipout3(const string& prefix) +bool picture::shipout3(const string& prefix, array *index, array *center) { bounds3(); bool status = true; string prcname=buildname(prefix,"prc"); prcfile prc(prcname); + unsigned int count[nENTITY]; + for(unsigned int i=0; i < nENTITY; ++i) + count[i]=0; for(nodelist::iterator p=nodes.begin(); p != nodes.end(); ++p) { assert(*p); - (*p)->write(&prc); + (*p)->write(&prc,count,index,center); } if(status) status=prc.finish(); @@ -963,7 +970,7 @@ picture *picture::transformed(const transform& t) return pic; } -picture *picture::transformed(const vm::array& t) +picture *picture::transformed(const array& t) { picture *pic = new picture; diff --git a/Build/source/utils/asymptote/picture.h b/Build/source/utils/asymptote/picture.h index fb56a29cccc..a0fc352b641 100644 --- a/Build/source/utils/asymptote/picture.h +++ b/Build/source/utils/asymptote/picture.h @@ -93,7 +93,8 @@ public: double *diffuse, double *ambient, double *specular, bool viewportlighting, bool view); - bool shipout3(const string& prefix); // Embedded PRC + // PRC output + bool shipout3(const string& prefix, vm::array *index, vm::array *center); bool reloadPDF(const string& Viewer, const string& outname) const; diff --git a/Build/source/utils/asymptote/prc/oPRCFile.cc b/Build/source/utils/asymptote/prc/oPRCFile.cc index e65910d56dd..d472092b9dc 100644 --- a/Build/source/utils/asymptote/prc/oPRCFile.cc +++ b/Build/source/utils/asymptote/prc/oPRCFile.cc @@ -24,19 +24,6 @@ using std::string; -static const string EntityName[]={"line","curve","surface"}; - -std::string Name(oPRCFile *p, Entity e, std::string s) -{ - if(s.empty()) { - uint32_t i=++(p->count[e]); - std::ostringstream buf; - buf << EntityName[e] << "-" << i; - return buf.str(); - } - return s; -} - uint32_t PRCentity::getGraphicsIndex() { if(useMaterial) diff --git a/Build/source/utils/asymptote/prc/oPRCFile.h b/Build/source/utils/asymptote/prc/oPRCFile.h index 3dd5f856e54..ddddd043b4d 100644 --- a/Build/source/utils/asymptote/prc/oPRCFile.h +++ b/Build/source/utils/asymptote/prc/oPRCFile.h @@ -36,10 +36,6 @@ class oPRCFile; -enum Entity {LINE=0,CURVE,SURFACE,nEntity}; - -std::string Name(oPRCFile *p, Entity e, std::string s); - struct RGBAColour { RGBAColour(double r=0.0, double g=0.0, double b=0.0, double a=1.0) : @@ -99,7 +95,7 @@ class PRCsurface : public PRCentity double cP[][3], double *kU, double *kV, const RGBAColour &c, double scale = 1.0, bool iR = false, double w[] = 0, double g = 0, std::string name = "") : - PRCentity(p,c,scale,Name(p,SURFACE,name)), degreeU(dU), degreeV(dV), + PRCentity(p,c,scale,name), degreeU(dU), degreeV(dV), numberOfControlPointsU(nU), numberOfControlPointsV(nV), knotsU(kU), knotsV(kV), controlPoints(cP), isRational(iR), weights(w), granularity(g) {} @@ -108,7 +104,7 @@ class PRCsurface : public PRCentity double cP[][3], double *kU, double *kV, const PRCMaterial &m, double scale = 1.0, bool iR = false, double w[] = 0, double g = 0, std::string name = "") : - PRCentity(p,m,scale,Name(p,SURFACE,name)), degreeU(dU), degreeV(dV), + PRCentity(p,m,scale,name), degreeU(dU), degreeV(dV), numberOfControlPointsU(nU), numberOfControlPointsV(nV), knotsU(kU), knotsV(kV), controlPoints(cP), isRational(iR), weights(w), granularity(g) {} @@ -138,11 +134,11 @@ class PRCline : public PRCentity // constructor with colour PRCline(oPRCFile *p, uint32_t n, double P[][3], const RGBAColour &c, double scale = 1.0, std::string name="") : - PRCentity(p,c,scale,Name(p,LINE,name)), numberOfPoints(n), points(P) {} + PRCentity(p,c,scale,name), numberOfPoints(n), points(P) {} // constructor with material PRCline(oPRCFile *p, uint32_t n, double P[][3], const PRCMaterial &m, double scale = 1.0, std::string name = "") : - PRCentity(p,m,scale,Name(p,LINE,name)), numberOfPoints(n), points(P) {} + PRCentity(p,m,scale,name), numberOfPoints(n), points(P) {} virtual void writeRepresentationItem(PRCbitStream&,uint32_t); virtual void writeTopologicalContext(PRCbitStream&); virtual void writeExtraGeometryContext(PRCbitStream&); @@ -158,14 +154,14 @@ class PRCcurve : public PRCentity PRCcurve(oPRCFile *p, uint32_t d, uint32_t n, double cP[][3], double *k, const RGBAColour &c, double scale = 1.0, bool iR = false, double w[] = 0, std::string name="") : - PRCentity(p,c,scale,Name(p,CURVE,name)), degree(d), + PRCentity(p,c,scale,name), degree(d), numberOfControlPoints(n), knots(k), controlPoints(cP), isRational(iR), weights(w) {} // constructor with material PRCcurve(oPRCFile *p, uint32_t d, uint32_t n, double cP[][3], double *k, const PRCMaterial &m, double scale = 1.0, bool iR = false, double w[] = 0, std::string name = "") : - PRCentity(p,m,scale,Name(p,CURVE,name)), degree(d), + PRCentity(p,m,scale,name), degree(d), numberOfControlPoints(n), knots(k), controlPoints(cP), isRational(iR), weights(w) {} virtual void writeRepresentationItem(PRCbitStream&,uint32_t); @@ -366,18 +362,12 @@ class oPRCFile oPRCFile(std::ostream &os, uint32_t n=1) : number_of_file_structures(n), fileStructures(new PRCFileStructure*[n]),modelFile(this), - fout(NULL),output(os) { - for(size_t i=0; i < nEntity; ++i) - count[i]=0; - } + fout(NULL),output(os) {} oPRCFile(const std::string &name, uint32_t n=1) : number_of_file_structures(n), fileStructures(new PRCFileStructure*[n]),modelFile(this), - fout(new std::ofstream(name.c_str())),output(*fout) { - for(size_t i=0; i < nEntity; ++i) - count[i]=0; - } + fout(new std::ofstream(name.c_str())),output(*fout) {} ~oPRCFile() { @@ -397,8 +387,6 @@ class oPRCFile uint32_t getMaterialIndex(const PRCMaterial&); uint32_t getSize(); - uint32_t count[nEntity]; - const uint32_t number_of_file_structures; PRCFileStructure **fileStructures; PRCHeader header; diff --git a/Build/source/utils/asymptote/runarray.cc b/Build/source/utils/asymptote/runarray.cc index 36a8b986e41..0413af229b5 100644 --- a/Build/source/utils/asymptote/runarray.cc +++ b/Build/source/utils/asymptote/runarray.cc @@ -2194,8 +2194,9 @@ void gen_runarray72(stack *Stack) void gen_runarray73(stack *Stack) { #line 1838 "runarray.in" - gl::projection P=gl::camera(); +#ifdef HAVE_LIBGL array *a=new array(14); + gl::projection P=gl::camera(); size_t k=0; (*a)[k++]=P.orthographic ? 1.0 : 0.0; @@ -2219,7 +2220,8 @@ void gen_runarray73(stack *Stack) (*a)[k++]=P.viewportshift.getx(); (*a)[k++]=P.viewportshift.gety(); - {Stack->push<realarray*>(a); return;} +#endif + {Stack->push<realarray*>(new array(0)); return;} } } // namespace run diff --git a/Build/source/utils/asymptote/runarray.in b/Build/source/utils/asymptote/runarray.in index 894f765df4f..6916a0450bb 100644 --- a/Build/source/utils/asymptote/runarray.in +++ b/Build/source/utils/asymptote/runarray.in @@ -1836,8 +1836,9 @@ pair maxratio(triplearray2 *P, pair b) realarray *_projection() { - gl::projection P=gl::camera(); +#ifdef HAVE_LIBGL array *a=new array(14); + gl::projection P=gl::camera(); size_t k=0; (*a)[k++]=P.orthographic ? 1.0 : 0.0; @@ -1861,5 +1862,6 @@ realarray *_projection() (*a)[k++]=P.viewportshift.getx(); (*a)[k++]=P.viewportshift.gety(); - return a; +#endif + return new array(0); } diff --git a/Build/source/utils/asymptote/runpicture.cc b/Build/source/utils/asymptote/runpicture.cc index 26ad0455d42..d5a4bae574a 100644 --- a/Build/source/utils/asymptote/runpicture.cc +++ b/Build/source/utils/asymptote/runpicture.cc @@ -701,13 +701,15 @@ void gen_runpicture39(stack *Stack) } #line 422 "runpicture.in" -// void shipout3(string prefix, picture *f); +// void shipout3(string prefix, picture *f, Intarray *index, triplearray *center); void gen_runpicture40(stack *Stack) { + triplearray * center=vm::pop<triplearray *>(Stack); + Intarray * index=vm::pop<Intarray *>(Stack); picture * f=vm::pop<picture *>(Stack); string prefix=vm::pop<string>(Stack); #line 423 "runpicture.in" - f->shipout3(prefix); + f->shipout3(prefix,index,center); } #line 427 "runpicture.in" @@ -858,9 +860,10 @@ void gen_runpicture42(stack *Stack) // Bezier patch #line 561 "runpicture.in" -// void draw(picture *f, triplearray2 *P, triple center, bool straight, penarray *p, real opacity, real shininess, real PRCshininess, real granularity, triple normal, penarray *colors, bool lighton, string name=emptystring); +// void draw(picture *f, triplearray2 *P, triple center, bool straight, penarray *p, real opacity, real shininess, real PRCshininess, real granularity, triple normal, penarray *colors, bool lighton, string name=emptystring, Int interaction); void gen_runpicture43(stack *Stack) { + Int interaction=vm::pop<Int>(Stack); string name=vm::pop<string>(Stack,emptystring); bool lighton=vm::pop<bool>(Stack); penarray * colors=vm::pop<penarray *>(Stack); @@ -877,7 +880,7 @@ void gen_runpicture43(stack *Stack) #line 565 "runpicture.in" f->append(new drawSurface(*P,center,straight,*p,opacity,shininess, PRCshininess,granularity,normal,*colors,lighton, - name)); + name,interaction)); } // General NURBS surface @@ -1035,13 +1038,13 @@ void gen_runpicture_venv(venv &ve) #line 396 "runpicture.in" addFunc(ve, run::gen_runpicture39, primVoid(), "shipout3", formal(primString() , "prefix", false, false), formal(primPicture(), "f", false, false), formal(primString() , "format", true, false), formal(primReal(), "width", false, false), formal(primReal(), "height", false, false), formal(primReal(), "angle", false, false), formal(primReal(), "zoom", false, false), formal(primTriple(), "m", false, false), formal(primTriple(), "m", false, false), formal(primPair(), "shift", false, false), formal(realArray2(), "t", false, false), formal(realArray(), "background", false, false), formal(tripleArray(), "lights", false, false), formal(realArray2(), "diffuse", false, false), formal(realArray2(), "ambient", false, false), formal(realArray2(), "specular", false, false), formal(primBoolean(), "viewportlighting", false, false), formal(primBoolean(), "view", true, false)); #line 422 "runpicture.in" - addFunc(ve, run::gen_runpicture40, primVoid(), "shipout3", formal(primString() , "prefix", false, false), formal(primPicture(), "f", false, false)); + addFunc(ve, run::gen_runpicture40, primVoid(), "shipout3", formal(primString() , "prefix", false, false), formal(primPicture(), "f", false, false), formal(IntArray(), "index", false, false), formal(tripleArray(), "center", false, false)); #line 427 "runpicture.in" addFunc(ve, run::gen_runpicture41, primVoid(), "deconstruct", formal(primPicture(), "f", false, false), formal(primPicture(), "preamble", true, false), formal(primReal(), "magnification", true, false), formal(transformFunction(), "xform", false, false)); #line 550 "runpicture.in" addFunc(ve, run::gen_runpicture42, primVoid(), "_draw", formal(primPicture(), "f", false, false), formal(primPath3(), "g", false, false), formal(primPen(), "p", false, false), formal(primString() , "name", true, false)); #line 560 "runpicture.in" - addFunc(ve, run::gen_runpicture43, primVoid(), "draw", formal(primPicture(), "f", false, false), formal(tripleArray2(), "p", false, false), formal(primTriple(), "center", false, false), formal(primBoolean(), "straight", false, false), formal(penArray() , "p", false, false), formal(primReal(), "opacity", false, false), formal(primReal(), "shininess", false, false), formal(primReal(), "prcshininess", false, false), formal(primReal(), "granularity", false, false), formal(primTriple(), "normal", false, false), formal(penArray() , "colors", false, false), formal(primBoolean(), "lighton", false, false), formal(primString() , "name", true, false)); + addFunc(ve, run::gen_runpicture43, primVoid(), "draw", formal(primPicture(), "f", false, false), formal(tripleArray2(), "p", false, false), formal(primTriple(), "center", false, false), formal(primBoolean(), "straight", false, false), formal(penArray() , "p", false, false), formal(primReal(), "opacity", false, false), formal(primReal(), "shininess", false, false), formal(primReal(), "prcshininess", false, false), formal(primReal(), "granularity", false, false), formal(primTriple(), "normal", false, false), formal(penArray() , "colors", false, false), formal(primBoolean(), "lighton", false, false), formal(primString() , "name", true, false), formal(primInt(), "interaction", false, false)); #line 571 "runpicture.in" addFunc(ve, run::gen_runpicture44, primVoid(), "draw", formal(primPicture(), "f", false, false), formal(tripleArray2(), "p", false, false), formal(realArray(), "uknot", false, false), formal(realArray(), "vknot", false, false), formal(realArray2(), "weights", true, false), formal(penArray() , "p", false, false), formal(primReal(), "opacity", false, false), formal(primReal(), "shininess", false, false), formal(primReal(), "prcshininess", false, false), formal(primReal(), "granularity", false, false), formal(penArray() , "colors", false, false), formal(primBoolean(), "lighton", false, false), formal(primString() , "name", true, false)); #line 581 "runpicture.in" diff --git a/Build/source/utils/asymptote/runpicture.in b/Build/source/utils/asymptote/runpicture.in index 6dbdcfc6877..b0540ae6def 100644 --- a/Build/source/utils/asymptote/runpicture.in +++ b/Build/source/utils/asymptote/runpicture.in @@ -419,9 +419,9 @@ void shipout3(string prefix, picture *f, string format=emptystring, delete[] T; } -void shipout3(string prefix, picture *f) +void shipout3(string prefix, picture *f, Intarray *index, triplearray *center) { - f->shipout3(prefix); + f->shipout3(prefix,index,center); } void deconstruct(picture *f, picture *preamble=NULL, real magnification=1, @@ -561,11 +561,11 @@ void _draw(picture *f, path3 g, pen p, string name=emptystring) void draw(picture *f, triplearray2 *P, triple center, bool straight, penarray *p, real opacity, real shininess, real PRCshininess, real granularity, triple normal, penarray *colors, bool lighton, - string name=emptystring) + string name=emptystring, Int interaction) { f->append(new drawSurface(*P,center,straight,*p,opacity,shininess, PRCshininess,granularity,normal,*colors,lighton, - name)); + name,interaction)); } // General NURBS surface diff --git a/Build/source/utils/asymptote/settings.cc b/Build/source/utils/asymptote/settings.cc index e32aa3dc80f..2a1e85bfa72 100644 --- a/Build/source/utils/asymptote/settings.cc +++ b/Build/source/utils/asymptote/settings.cc @@ -1093,9 +1093,8 @@ void initSettings() { "Render thick 3D lines", true)); addOption(new boolSetting("thin", 0, "Render thin 3D lines", true)); - addOption(new boolSetting("billboard", 0, - "Force unnamed labels to always face viewer", - false)); + addOption(new boolSetting("autobillboard", 0, + "3D labels always face viewer by default", true)); addOption(new boolSetting("threads", 0, "Use POSIX threads for 3D rendering", !msdos)); addOption(new boolSetting("fitscreen", 0, |