summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-01-02 16:31:31 +0000
committerKarl Berry <karl@freefriends.org>2021-01-02 16:31:31 +0000
commit6457cd3f6e21e23e21db6dafff021d17f5457567 (patch)
tree08f169333e47c5fc1c50e828cf3a0f50bdf9b508 /Build
parentdc2504a4c02af0ec2fff00e6b833c6143a06b4cd (diff)
asy 2.68 sources
git-svn-id: svn://tug.org/texlive/trunk@57291 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/utils/README2
-rw-r--r--Build/source/utils/asymptote/BUGS4
-rw-r--r--Build/source/utils/asymptote/ChangeLog1353
-rw-r--r--Build/source/utils/asymptote/Delaunay.cc12
-rw-r--r--Build/source/utils/asymptote/GUI/Window1.py4
-rw-r--r--Build/source/utils/asymptote/GUI/configs/xasyconfig.cson2
-rw-r--r--Build/source/utils/asymptote/GUI/icons_rc.py3182
-rw-r--r--Build/source/utils/asymptote/GUI/setup.py2
-rwxr-xr-xBuild/source/utils/asymptote/GUI/xasy2asy.py17
-rw-r--r--Build/source/utils/asymptote/INSTALL2
-rw-r--r--Build/source/utils/asymptote/Makefile.in11
-rw-r--r--Build/source/utils/asymptote/ReleaseNotes65
-rw-r--r--Build/source/utils/asymptote/access.cc10
-rw-r--r--Build/source/utils/asymptote/access.h14
-rw-r--r--Build/source/utils/asymptote/align.h12
-rw-r--r--Build/source/utils/asymptote/angle.h6
-rw-r--r--Build/source/utils/asymptote/application.cc122
-rw-r--r--Build/source/utils/asymptote/application.h10
-rw-r--r--Build/source/utils/asymptote/array.cc11
-rw-r--r--Build/source/utils/asymptote/array.h18
-rw-r--r--Build/source/utils/asymptote/arrayop.h46
-rw-r--r--Build/source/utils/asymptote/asy-keywords.el6
-rw-r--r--Build/source/utils/asymptote/asy.list105
-rw-r--r--Build/source/utils/asymptote/asymptote.nsi2
-rw-r--r--Build/source/utils/asymptote/asymptote.spec8
-rw-r--r--Build/source/utils/asymptote/base/animation.asy14
-rw-r--r--Build/source/utils/asymptote/base/asy-mode.el2
-rw-r--r--Build/source/utils/asymptote/base/babel.asy2
-rw-r--r--Build/source/utils/asymptote/base/bezulate.asy62
-rw-r--r--Build/source/utils/asymptote/base/binarytree.asy100
-rw-r--r--Build/source/utils/asymptote/base/bsp.asy48
-rw-r--r--Build/source/utils/asymptote/base/colormap.asy7034
-rw-r--r--Build/source/utils/asymptote/base/contour.asy74
-rw-r--r--Build/source/utils/asymptote/base/contour3.asy54
-rw-r--r--Build/source/utils/asymptote/base/embed.asy10
-rw-r--r--Build/source/utils/asymptote/base/external.asy4
-rw-r--r--Build/source/utils/asymptote/base/feynman.asy16
-rw-r--r--Build/source/utils/asymptote/base/flowchart.asy200
-rw-r--r--Build/source/utils/asymptote/base/geometry.asy520
-rw-r--r--Build/source/utils/asymptote/base/graph.asy266
-rw-r--r--Build/source/utils/asymptote/base/graph3.asy341
-rw-r--r--Build/source/utils/asymptote/base/graph_splinetype.asy30
-rw-r--r--Build/source/utils/asymptote/base/grid3.asy6
-rw-r--r--Build/source/utils/asymptote/base/interpolate.asy8
-rw-r--r--Build/source/utils/asymptote/base/labelpath3.asy8
-rw-r--r--Build/source/utils/asymptote/base/latin1.asy2
-rw-r--r--Build/source/utils/asymptote/base/lmfit.asy76
-rw-r--r--Build/source/utils/asymptote/base/map.asy40
-rw-r--r--Build/source/utils/asymptote/base/math.asy16
-rw-r--r--Build/source/utils/asymptote/base/metapost.asy4
-rw-r--r--Build/source/utils/asymptote/base/obj.asy2
-rw-r--r--Build/source/utils/asymptote/base/ode.asy62
-rw-r--r--Build/source/utils/asymptote/base/palette.asy70
-rw-r--r--Build/source/utils/asymptote/base/patterns.asy4
-rw-r--r--Build/source/utils/asymptote/base/plain.asy61
-rw-r--r--Build/source/utils/asymptote/base/plain_Label.asy86
-rw-r--r--Build/source/utils/asymptote/base/plain_arcs.asy4
-rw-r--r--Build/source/utils/asymptote/base/plain_arrows.asy308
-rw-r--r--Build/source/utils/asymptote/base/plain_bounds.asy20
-rw-r--r--Build/source/utils/asymptote/base/plain_margins.asy10
-rw-r--r--Build/source/utils/asymptote/base/plain_picture.asy35
-rw-r--r--Build/source/utils/asymptote/base/plain_shipout.asy23
-rw-r--r--Build/source/utils/asymptote/base/rationalSimplex.asy30
-rw-r--r--Build/source/utils/asymptote/base/slide.asy2
-rw-r--r--Build/source/utils/asymptote/base/slopefield.asy1
-rw-r--r--Build/source/utils/asymptote/base/three.asy33
-rw-r--r--Build/source/utils/asymptote/base/three_light.asy2
-rw-r--r--Build/source/utils/asymptote/base/three_surface.asy20
-rw-r--r--Build/source/utils/asymptote/base/three_tube.asy4
-rw-r--r--Build/source/utils/asymptote/base/tube.asy4
-rw-r--r--Build/source/utils/asymptote/base/unicode.asy2
-rw-r--r--Build/source/utils/asymptote/base/webgl/asygl.js4
-rw-r--r--Build/source/utils/asymptote/bbox.h32
-rw-r--r--Build/source/utils/asymptote/bbox3.h30
-rw-r--r--Build/source/utils/asymptote/beziercurve.cc12
-rw-r--r--Build/source/utils/asymptote/beziercurve.h21
-rw-r--r--Build/source/utils/asymptote/bezierpatch.cc638
-rw-r--r--Build/source/utils/asymptote/bezierpatch.h45
-rw-r--r--Build/source/utils/asymptote/build-scripts/HOWTO-MSWindows18
-rw-r--r--Build/source/utils/asymptote/build-scripts/README-binaries2
-rw-r--r--Build/source/utils/asymptote/build-scripts/asy-format.el52
-rw-r--r--Build/source/utils/asymptote/build-scripts/asy-indent.el6
-rwxr-xr-xBuild/source/utils/asymptote/build-scripts/build-asygl2
-rwxr-xr-xBuild/source/utils/asymptote/build-scripts/build-asymptote.dos2
-rw-r--r--Build/source/utils/asymptote/build-scripts/cc-format.el52
-rw-r--r--Build/source/utils/asymptote/build-scripts/cc-indent.el6
-rw-r--r--Build/source/utils/asymptote/build-scripts/run-in-indent.el6
-rw-r--r--Build/source/utils/asymptote/builtin.cc148
-rw-r--r--Build/source/utils/asymptote/builtin.h8
-rw-r--r--Build/source/utils/asymptote/callable.h4
-rw-r--r--Build/source/utils/asymptote/camperror.cc10
-rw-r--r--Build/source/utils/asymptote/camperror.h4
-rw-r--r--Build/source/utils/asymptote/castop.h21
-rw-r--r--Build/source/utils/asymptote/cc-mode2.el38
-rw-r--r--Build/source/utils/asymptote/coder.cc14
-rw-r--r--Build/source/utils/asymptote/coder.h16
-rw-r--r--Build/source/utils/asymptote/common.h13
-rwxr-xr-xBuild/source/utils/asymptote/config.guess563
-rw-r--r--Build/source/utils/asymptote/config.h.in3
-rwxr-xr-xBuild/source/utils/asymptote/config.sub632
-rwxr-xr-xBuild/source/utils/asymptote/configure100
-rw-r--r--Build/source/utils/asymptote/configure.ac15
-rw-r--r--Build/source/utils/asymptote/constructor.cc6
-rw-r--r--Build/source/utils/asymptote/dec.cc50
-rw-r--r--Build/source/utils/asymptote/dec.h28
-rw-r--r--Build/source/utils/asymptote/doc/CAD.pdfbin167756 -> 186126 bytes
-rw-r--r--Build/source/utils/asymptote/doc/CDlabel.asy4
-rw-r--r--Build/source/utils/asymptote/doc/FAQ/asy-faq.bfnn46
-rw-r--r--Build/source/utils/asymptote/doc/FAQ/asy-faq.info44
-rwxr-xr-xBuild/source/utils/asymptote/doc/FAQ/bfnnconv.pl6
-rwxr-xr-xBuild/source/utils/asymptote/doc/FAQ/install-sh441
-rw-r--r--Build/source/utils/asymptote/doc/FAQ/m-html.pl11
-rw-r--r--Build/source/utils/asymptote/doc/HermiteSpline.asy12
-rw-r--r--Build/source/utils/asymptote/doc/TeXShopAndAsymptote.pdfbin77122 -> 76885 bytes
-rw-r--r--Build/source/utils/asymptote/doc/asy-latex.pdfbin194590 -> 194617 bytes
-rw-r--r--Build/source/utils/asymptote/doc/asy.116
-rw-r--r--Build/source/utils/asymptote/doc/asyRefCard.pdfbin121144 -> 121144 bytes
-rw-r--r--Build/source/utils/asymptote/doc/asymptote.pdfbin1293637 -> 1212778 bytes
-rw-r--r--Build/source/utils/asymptote/doc/asymptote.texi490
-rw-r--r--Build/source/utils/asymptote/doc/diatom.asy12
-rw-r--r--Build/source/utils/asymptote/doc/elliptic.asy4
-rw-r--r--Build/source/utils/asymptote/doc/exp.asy4
-rw-r--r--Build/source/utils/asymptote/doc/extra/intro.asy6
-rw-r--r--Build/source/utils/asymptote/doc/flowchartdemo.asy4
-rw-r--r--Build/source/utils/asymptote/doc/icon.asy4
-rw-r--r--Build/source/utils/asymptote/doc/imagecontour.asy2
-rwxr-xr-xBuild/source/utils/asymptote/doc/install-sh441
-rw-r--r--Build/source/utils/asymptote/doc/leastsquares.asy12
-rw-r--r--Build/source/utils/asymptote/doc/legend.asy26
-rw-r--r--Build/source/utils/asymptote/doc/linetype.asy2
-rw-r--r--Build/source/utils/asymptote/doc/logo.asy4
-rw-r--r--Build/source/utils/asymptote/doc/markers1.asy2
-rw-r--r--Build/source/utils/asymptote/doc/png/asymptote.info1751
-rw-r--r--Build/source/utils/asymptote/doc/secondaryaxis.asy2
-rw-r--r--Build/source/utils/asymptote/drawclipbegin.h20
-rw-r--r--Build/source/utils/asymptote/drawclipend.h16
-rw-r--r--Build/source/utils/asymptote/drawelement.h132
-rw-r--r--Build/source/utils/asymptote/drawfill.cc38
-rw-r--r--Build/source/utils/asymptote/drawfill.h123
-rw-r--r--Build/source/utils/asymptote/drawgrestore.h2
-rw-r--r--Build/source/utils/asymptote/drawgroup.h34
-rw-r--r--Build/source/utils/asymptote/drawgsave.h2
-rw-r--r--Build/source/utils/asymptote/drawimage.h14
-rw-r--r--Build/source/utils/asymptote/drawlabel.cc54
-rw-r--r--Build/source/utils/asymptote/drawlabel.h30
-rw-r--r--Build/source/utils/asymptote/drawlayer.h4
-rw-r--r--Build/source/utils/asymptote/drawpath.cc42
-rw-r--r--Build/source/utils/asymptote/drawpath.h6
-rw-r--r--Build/source/utils/asymptote/drawpath3.cc142
-rw-r--r--Build/source/utils/asymptote/drawpath3.h83
-rw-r--r--Build/source/utils/asymptote/drawsurface.cc191
-rw-r--r--Build/source/utils/asymptote/drawsurface.h251
-rw-r--r--Build/source/utils/asymptote/drawverbatim.h16
-rw-r--r--Build/source/utils/asymptote/entry.cc264
-rw-r--r--Build/source/utils/asymptote/entry.h53
-rw-r--r--Build/source/utils/asymptote/env.cc10
-rw-r--r--Build/source/utils/asymptote/env.h6
-rw-r--r--Build/source/utils/asymptote/errormsg.cc30
-rw-r--r--Build/source/utils/asymptote/errormsg.h46
-rw-r--r--Build/source/utils/asymptote/examples/100d.pdb1535
-rw-r--r--Build/source/utils/asymptote/examples/1overx.asy2
-rw-r--r--Build/source/utils/asymptote/examples/BezierPatch.asy6
-rw-r--r--Build/source/utils/asymptote/examples/BezierSurface.asy16
-rw-r--r--Build/source/utils/asymptote/examples/Gouraud.asy2
-rw-r--r--Build/source/utils/asymptote/examples/Klein.asy11
-rw-r--r--Build/source/utils/asymptote/examples/NURBScurve.asy15
-rw-r--r--Build/source/utils/asymptote/examples/NURBSsphere.asy28
-rw-r--r--Build/source/utils/asymptote/examples/NURBSsurface.asy80
-rw-r--r--Build/source/utils/asymptote/examples/RiemannSphere.asy6
-rw-r--r--Build/source/utils/asymptote/examples/RiemannSurface.asy6
-rw-r--r--Build/source/utils/asymptote/examples/RiemannSurfaceRoot.asy4
-rw-r--r--Build/source/utils/asymptote/examples/SierpinskiGasket.asy14
-rw-r--r--Build/source/utils/asymptote/examples/SierpinskiSponge.asy56
-rw-r--r--Build/source/utils/asymptote/examples/animations/slidemovies.asy2
-rw-r--r--Build/source/utils/asymptote/examples/axialshade.asy5
-rw-r--r--Build/source/utils/asymptote/examples/bars3.asy2
-rw-r--r--Build/source/utils/asymptote/examples/centroidfg.asy6
-rw-r--r--Build/source/utils/asymptote/examples/colorpatch.asy6
-rw-r--r--Build/source/utils/asymptote/examples/colorplanes.asy2
-rw-r--r--Build/source/utils/asymptote/examples/conicurv.asy4
-rw-r--r--Build/source/utils/asymptote/examples/contextfonts.asy2
-rw-r--r--Build/source/utils/asymptote/examples/controlsystem.asy4
-rw-r--r--Build/source/utils/asymptote/examples/cosaddition.asy2
-rw-r--r--Build/source/utils/asymptote/examples/cpkcolors.asy472
-rw-r--r--Build/source/utils/asymptote/examples/curvedlabel3.asy2
-rw-r--r--Build/source/utils/asymptote/examples/dimension.asy24
-rw-r--r--Build/source/utils/asymptote/examples/electromagnetic.asy56
-rw-r--r--Build/source/utils/asymptote/examples/equilchord.asy2
-rw-r--r--Build/source/utils/asymptote/examples/fequlogo.asy4
-rw-r--r--Build/source/utils/asymptote/examples/filesurface.asy12
-rw-r--r--Build/source/utils/asymptote/examples/fillcontour.asy2
-rw-r--r--Build/source/utils/asymptote/examples/fin.asy44
-rw-r--r--Build/source/utils/asymptote/examples/floatingdisk.asy50
-rw-r--r--Build/source/utils/asymptote/examples/floor.asy4
-rw-r--r--Build/source/utils/asymptote/examples/gamma.asy2
-rw-r--r--Build/source/utils/asymptote/examples/gamma3.asy2
-rw-r--r--Build/source/utils/asymptote/examples/genustwo.asy14
-rw-r--r--Build/source/utils/asymptote/examples/imagehistogram.asy58
-rw-r--r--Build/source/utils/asymptote/examples/integraltest.asy12
-rw-r--r--Build/source/utils/asymptote/examples/interpolate1.asy6
-rw-r--r--Build/source/utils/asymptote/examples/jump.asy4
-rw-r--r--Build/source/utils/asymptote/examples/label3zoom.asy16
-rw-r--r--Build/source/utils/asymptote/examples/linearregression.asy8
-rw-r--r--Build/source/utils/asymptote/examples/lmfit1.asy6
-rw-r--r--Build/source/utils/asymptote/examples/logo3.asy21
-rw-r--r--Build/source/utils/asymptote/examples/lowupint.asy4
-rw-r--r--Build/source/utils/asymptote/examples/markregular.asy10
-rw-r--r--Build/source/utils/asymptote/examples/mergeExample.asy18
-rw-r--r--Build/source/utils/asymptote/examples/mosaic.asy26
-rw-r--r--Build/source/utils/asymptote/examples/mosquito.asy4
-rw-r--r--Build/source/utils/asymptote/examples/near_earth.asy4
-rw-r--r--Build/source/utils/asymptote/examples/oneoverx.asy2
-rw-r--r--Build/source/utils/asymptote/examples/pOrbital.asy (renamed from Build/source/utils/asymptote/examples/p-orbital.asy)4
-rw-r--r--Build/source/utils/asymptote/examples/pathintersectsurface.asy11
-rw-r--r--Build/source/utils/asymptote/examples/pdb.asy21
-rw-r--r--Build/source/utils/asymptote/examples/pipes.asy56
-rw-r--r--Build/source/utils/asymptote/examples/poster.asy2
-rw-r--r--Build/source/utils/asymptote/examples/projectrevolution.asy22
-rw-r--r--Build/source/utils/asymptote/examples/rainbow.asy2
-rw-r--r--Build/source/utils/asymptote/examples/roll.asy2
-rw-r--r--Build/source/utils/asymptote/examples/roundpath.asy2
-rw-r--r--Build/source/utils/asymptote/examples/shadestroke.asy2
-rw-r--r--Build/source/utils/asymptote/examples/sinxlex.asy4
-rw-r--r--Build/source/utils/asymptote/examples/slidedemo.asy4
-rw-r--r--Build/source/utils/asymptote/examples/slope.asy22
-rw-r--r--Build/source/utils/asymptote/examples/soccerball.asy58
-rw-r--r--Build/source/utils/asymptote/examples/spectrum.asy2
-rw-r--r--Build/source/utils/asymptote/examples/sphereskeleton.asy6
-rw-r--r--Build/source/utils/asymptote/examples/spiral3.asy4
-rw-r--r--Build/source/utils/asymptote/examples/spline.asy20
-rw-r--r--Build/source/utils/asymptote/examples/splitpatch.asy32
-rw-r--r--Build/source/utils/asymptote/examples/spring.asy6
-rw-r--r--Build/source/utils/asymptote/examples/stereoscopic.asy4
-rw-r--r--Build/source/utils/asymptote/examples/strokeshade.asy2
-rw-r--r--Build/source/utils/asymptote/examples/teapot.asy100
-rw-r--r--Build/source/utils/asymptote/examples/thermodynamics.asy100
-rw-r--r--Build/source/utils/asymptote/examples/torus.asy6
-rw-r--r--Build/source/utils/asymptote/examples/triads.asy10
-rw-r--r--Build/source/utils/asymptote/examples/triangle.asy2
-rw-r--r--Build/source/utils/asymptote/examples/truncatedIcosahedron.asy29
-rw-r--r--Build/source/utils/asymptote/examples/tvgen.asy384
-rw-r--r--Build/source/utils/asymptote/examples/twistedtubes.asy30
-rw-r--r--Build/source/utils/asymptote/examples/unitoctant.asy41
-rw-r--r--Build/source/utils/asymptote/examples/unitoctantx.asy35
-rw-r--r--Build/source/utils/asymptote/examples/vertexshading.asy6
-rw-r--r--Build/source/utils/asymptote/examples/worldmap.asy10
-rw-r--r--Build/source/utils/asymptote/examples/xstitch.asy14
-rw-r--r--Build/source/utils/asymptote/examples/xxsq01x-1.asy4
-rw-r--r--Build/source/utils/asymptote/examples/xxsq01y.asy4
-rw-r--r--Build/source/utils/asymptote/examples/yingyang.asy2
-rw-r--r--Build/source/utils/asymptote/exp.cc126
-rw-r--r--Build/source/utils/asymptote/exp.h28
-rw-r--r--Build/source/utils/asymptote/fftw++.h418
-rw-r--r--Build/source/utils/asymptote/fileio.cc62
-rw-r--r--Build/source/utils/asymptote/fileio.h279
-rw-r--r--Build/source/utils/asymptote/flatguide.h18
-rw-r--r--Build/source/utils/asymptote/fpu.h8
-rw-r--r--Build/source/utils/asymptote/frame.h6
-rw-r--r--Build/source/utils/asymptote/fundec.cc20
-rw-r--r--Build/source/utils/asymptote/fundec.h6
-rw-r--r--Build/source/utils/asymptote/genv.cc8
-rw-r--r--Build/source/utils/asymptote/glew.c4
-rw-r--r--Build/source/utils/asymptote/glrender.cc698
-rw-r--r--Build/source/utils/asymptote/glrender.h59
-rw-r--r--Build/source/utils/asymptote/gsl.cc32
-rw-r--r--Build/source/utils/asymptote/guide.cc20
-rw-r--r--Build/source/utils/asymptote/guide.h54
-rw-r--r--Build/source/utils/asymptote/guideflags.h4
-rw-r--r--Build/source/utils/asymptote/impdatum.cc62
-rw-r--r--Build/source/utils/asymptote/inst.h6
-rwxr-xr-xBuild/source/utils/asymptote/install-sh454
-rw-r--r--Build/source/utils/asymptote/interact.cc28
-rw-r--r--Build/source/utils/asymptote/interact.h4
-rw-r--r--Build/source/utils/asymptote/item.h94
-rw-r--r--Build/source/utils/asymptote/jsfile.cc119
-rw-r--r--Build/source/utils/asymptote/jsfile.h41
-rw-r--r--Build/source/utils/asymptote/knot.cc12
-rw-r--r--Build/source/utils/asymptote/knot.h38
-rw-r--r--Build/source/utils/asymptote/lexical.h6
-rw-r--r--Build/source/utils/asymptote/locate.cc22
-rw-r--r--Build/source/utils/asymptote/locate.h3
-rw-r--r--Build/source/utils/asymptote/main.cc51
-rw-r--r--Build/source/utils/asymptote/material.h28
-rw-r--r--Build/source/utils/asymptote/mathop.h26
-rw-r--r--Build/source/utils/asymptote/memory.h26
-rw-r--r--Build/source/utils/asymptote/mod.h6
-rw-r--r--Build/source/utils/asymptote/name.cc10
-rw-r--r--Build/source/utils/asymptote/name.h4
-rw-r--r--Build/source/utils/asymptote/newexp.cc6
-rw-r--r--Build/source/utils/asymptote/newexp.h4
-rw-r--r--Build/source/utils/asymptote/opcodes.h2
-rw-r--r--Build/source/utils/asymptote/pair.h34
-rw-r--r--Build/source/utils/asymptote/parser.cc129
-rw-r--r--Build/source/utils/asymptote/parser.h13
-rw-r--r--Build/source/utils/asymptote/path.cc174
-rw-r--r--Build/source/utils/asymptote/path.h74
-rw-r--r--Build/source/utils/asymptote/path3.cc220
-rw-r--r--Build/source/utils/asymptote/path3.h64
-rw-r--r--Build/source/utils/asymptote/pen.h294
-rw-r--r--Build/source/utils/asymptote/picture.cc491
-rw-r--r--Build/source/utils/asymptote/picture.h52
-rw-r--r--Build/source/utils/asymptote/pipestream.cc18
-rw-r--r--Build/source/utils/asymptote/pipestream.h19
-rw-r--r--Build/source/utils/asymptote/policy.h4
-rw-r--r--Build/source/utils/asymptote/prcfile.h4
-rw-r--r--Build/source/utils/asymptote/primitives.h2
-rw-r--r--Build/source/utils/asymptote/process.cc38
-rw-r--r--Build/source/utils/asymptote/process.h22
-rw-r--r--Build/source/utils/asymptote/profiler.h98
-rw-r--r--Build/source/utils/asymptote/program.cc10
-rw-r--r--Build/source/utils/asymptote/program.h2
-rw-r--r--Build/source/utils/asymptote/psfile.cc204
-rw-r--r--Build/source/utils/asymptote/psfile.h102
-rw-r--r--Build/source/utils/asymptote/record.cc6
-rw-r--r--Build/source/utils/asymptote/record.h6
-rw-r--r--Build/source/utils/asymptote/refaccess.cc2
-rw-r--r--Build/source/utils/asymptote/revision.cc2
-rw-r--r--Build/source/utils/asymptote/rounding.h34
-rw-r--r--Build/source/utils/asymptote/runarray.cc727
-rw-r--r--Build/source/utils/asymptote/runarray.in287
-rw-r--r--Build/source/utils/asymptote/runbacktrace.in2
-rw-r--r--Build/source/utils/asymptote/runfile.cc257
-rw-r--r--Build/source/utils/asymptote/runfile.in67
-rw-r--r--Build/source/utils/asymptote/runhistory.cc75
-rw-r--r--Build/source/utils/asymptote/runhistory.in45
-rw-r--r--Build/source/utils/asymptote/runlabel.cc130
-rw-r--r--Build/source/utils/asymptote/runlabel.in120
-rw-r--r--Build/source/utils/asymptote/runmath.cc80
-rw-r--r--Build/source/utils/asymptote/runmath.in108
-rw-r--r--Build/source/utils/asymptote/runpair.cc271
-rw-r--r--Build/source/utils/asymptote/runpair.in43
-rw-r--r--Build/source/utils/asymptote/runpath.cc34
-rw-r--r--Build/source/utils/asymptote/runpath.in26
-rw-r--r--Build/source/utils/asymptote/runpath3d.cc8
-rw-r--r--Build/source/utils/asymptote/runpath3d.in12
-rw-r--r--Build/source/utils/asymptote/runpicture.cc480
-rw-r--r--Build/source/utils/asymptote/runpicture.in126
-rw-r--r--Build/source/utils/asymptote/runstring.cc175
-rw-r--r--Build/source/utils/asymptote/runstring.in87
-rw-r--r--Build/source/utils/asymptote/runsystem.cc32
-rw-r--r--Build/source/utils/asymptote/runsystem.in10
-rw-r--r--Build/source/utils/asymptote/runtime.cc991
-rw-r--r--Build/source/utils/asymptote/runtime.in104
-rw-r--r--Build/source/utils/asymptote/runtimebase.in4
-rw-r--r--Build/source/utils/asymptote/runtriple.cc155
-rw-r--r--Build/source/utils/asymptote/runtriple.in29
-rw-r--r--Build/source/utils/asymptote/seconds.h70
-rw-r--r--Build/source/utils/asymptote/settings.cc282
-rw-r--r--Build/source/utils/asymptote/settings.h28
-rw-r--r--Build/source/utils/asymptote/shaders.cc12
-rw-r--r--Build/source/utils/asymptote/shaders.h2
-rw-r--r--Build/source/utils/asymptote/simpson.cc12
-rw-r--r--Build/source/utils/asymptote/stack.cc130
-rw-r--r--Build/source/utils/asymptote/stack.h32
-rw-r--r--Build/source/utils/asymptote/statistics.h12
-rw-r--r--Build/source/utils/asymptote/stm.cc36
-rw-r--r--Build/source/utils/asymptote/stm.h8
-rw-r--r--Build/source/utils/asymptote/symbol.cc14
-rw-r--r--Build/source/utils/asymptote/symbol.h6
-rw-r--r--Build/source/utils/asymptote/texfile.cc368
-rw-r--r--Build/source/utils/asymptote/texfile.h161
-rw-r--r--Build/source/utils/asymptote/tr.cc528
-rw-r--r--Build/source/utils/asymptote/tr.h82
-rw-r--r--Build/source/utils/asymptote/transform.h17
-rw-r--r--Build/source/utils/asymptote/triple.h70
-rw-r--r--Build/source/utils/asymptote/types.cc144
-rw-r--r--Build/source/utils/asymptote/types.h24
-rw-r--r--Build/source/utils/asymptote/util.cc130
-rw-r--r--Build/source/utils/asymptote/util.h25
-rw-r--r--Build/source/utils/asymptote/varinit.cc2
-rw-r--r--Build/source/utils/asymptote/varinit.h2
-rw-r--r--Build/source/utils/asymptote/vm.h6
-rwxr-xr-xBuild/source/utils/asymptote/wce2
-rw-r--r--Build/source/utils/asymptote/webgl/gl.js312
-rw-r--r--Build/source/utils/asymptote/webgl/license2
-rw-r--r--Build/source/utils/asymptote/xstream.h69
376 files changed, 20011 insertions, 17154 deletions
diff --git a/Build/source/utils/README b/Build/source/utils/README
index 755610fb492..4c491f35912 100644
--- a/Build/source/utils/README
+++ b/Build/source/utils/README
@@ -4,7 +4,7 @@ Public domain. Originally written 2005 by Karl Berry.
Extra utilities we (optionally) compile for TeX Live.
See comments in ../texk/README.
-asymptote 2.65 - checked 26mar20
+asymptote 2.68 - checked 2jan21
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/BUGS b/Build/source/utils/asymptote/BUGS
index 06febe85d42..77e2ef14f25 100644
--- a/Build/source/utils/asymptote/BUGS
+++ b/Build/source/utils/asymptote/BUGS
@@ -2,5 +2,5 @@ If you find a bug in Asymptote, please check (if possible) whether the bug
is still present in the latest git developmental code before submitting a
bug report.
-New bugs can be submitted using the Bug Tracking System at
-http://asymptote.sourceforge.net/
+New bugs can be submitted at
+https://github.com/vectorgraphics/asymptote/issues
diff --git a/Build/source/utils/asymptote/ChangeLog b/Build/source/utils/asymptote/ChangeLog
index 6260ef75520..a7239423a6f 100644
--- a/Build/source/utils/asymptote/ChangeLog
+++ b/Build/source/utils/asymptote/ChangeLog
@@ -1,3 +1,1329 @@
+commit 3b88c382bf0dd59daa6427a9fc4f03c246b5d218
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Nov 22 18:02:21 2020 -0700
+
+ Fix normalization in tube rendering.
+
+commit 31ab4195580be6ac65ad226d29a568c82147e166
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Nov 22 15:09:09 2020 -0700
+
+ Update freeglut installation instructions.
+
+commit 7cedd768019efd0fe435fa7d7a8b281298f4d6ba
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Nov 22 10:34:07 2020 -0700
+
+ Work around further floating point exceptions in OpenGL libraries.
+
+commit 437aef9cb8ae639727f635b51121a00fdb16423d
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Nov 22 01:29:47 2020 -0700
+
+ Add Label align(Label,dir) for aligning Label normal in direction dir.
+
+commit df6f1c2641fd51975a11244be7b66c477f73a856
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sat Nov 21 22:15:22 2020 -0700
+
+ Add settings.compress=true option to control PDF image compression.
+
+commit a36959ecbdc74fe83720dd28a009d65e16a0302a
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sat Nov 21 21:48:36 2020 -0700
+
+ Implement bool isometry(transform) function.
+
+commit 1108f83337b6d6f2ac33b9fd0bb0fb47c0578065
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sat Nov 21 21:18:53 2020 -0700
+
+ Fix bug2 #149 and #154 (thanks to Oliver Guibe).
+
+commit b1ab048d6cf6b703a992a296c870d3b1c5a63b3e
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sat Nov 21 20:54:05 2020 -0700
+
+ Skip over uninitialized elements of transposed arrays.
+
+commit 959cdd4823cb1e61b407878c89a66ae97a90e326
+Author: John Bowman <bowman@ualberta.ca>
+Date: Fri Nov 20 23:33:21 2020 -0700
+
+ Work around floating point exceptions (FE_INVALID) in OpenGL libraries.
+
+commit d541f69d20ed7d7a88e25cfe08323780796439ff
+Author: John Bowman <bowman@ualberta.ca>
+Date: Thu Nov 19 14:30:13 2020 -0700
+
+ Qualify namespace.
+
+commit f8de14a7ed23d3496188275092c731f8a0fc9aa5
+Author: John Bowman <bowman@ualberta.ca>
+Date: Thu Nov 19 11:51:58 2020 -0700
+
+ Restore image enccoding.
+
+commit 9606da530260600112145360c3eaadada1ed645f
+Author: John Bowman <bowman@ualberta.ca>
+Date: Mon Nov 16 09:57:35 2020 -0700
+
+ Fix comment.
+
+commit f513ffde5c8540e1b45a93fd0391541a6f4aa2f7
+Author: John Bowman <bowman@ualberta.ca>
+Date: Mon Nov 16 09:53:28 2020 -0700
+
+ Read null fields as undefined values in cvs mode and in line mode.
+
+commit 5402f40f5c752ed3069a8102b9a1f46a561bc8b0
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Nov 15 23:35:42 2020 -0700
+
+ Fix warning message.
+
+commit e67fba800818c8713165829ee64268c445355da3
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Nov 15 00:26:51 2020 -0700
+
+ Fix more uninitialized variables.
+
+commit ea1eca1727d19625c5be8359cd88d38236eb0737
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Nov 15 00:06:41 2020 -0700
+
+ Fix uninitialized variable.
+
+commit a9d1f7abf90309502026af608db3aed4cb405ce2
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sat Nov 14 23:44:25 2020 -0700
+
+ Return unbounded direction in rationalSimplex.
+
+commit ac9ece43497c23bba3d0738db5a0fb1e8e7090d8
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Nov 8 12:49:10 2020 -0700
+
+ Fix comment.
+
+commit 4d6872d552573ba947d3a524549b159d322ff284
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Nov 8 12:39:12 2020 -0700
+
+ Add RELEASE variable.
+
+commit a3d85fb37e5a28e021f417b8355362b03f93b5d1
+Author: John Bowman <bowman@ualberta.ca>
+Date: Tue Oct 27 21:49:55 2020 -0600
+
+ Always define xStandard in optimal case in rationalSimplex.
+
+commit 5ced24a1d9658364e76ddc04a9b61890ee53d543
+Author: John Bowman <bowman@ualberta.ca>
+Date: Tue Oct 27 03:18:54 2020 -0600
+
+ Support logarithmic graphs of surfaces.
+
+commit e688d42e33a521facdb050c77b454b819478d3fd
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Oct 25 23:08:36 2020 -0600
+
+ Open files without assuming an asy suffix.
+
+commit 3361214340d58235f4dbb8f24017d0cd5d94da72
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Oct 25 22:24:51 2020 -0600
+
+ Use ps2write instead of eps2write where possible, for compatibility with gs 9.53.
+
+commit 42b291049920c2a023ab5f3598cc917eb36297ca
+Merge: e62d0401 d9826965
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Oct 25 20:18:21 2020 -0600
+
+ Merge branch 'spotrh-curl-config', standardized.
+
+commit d9826965be5768c417b790fb6ff6ba59aeb89246
+Merge: e62d0401 a055a0ae
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Oct 25 20:09:49 2020 -0600
+
+ Merge branch 'curl-config' of https://github.com/spotrh/asymptote into spotrh-curl-config.
+
+commit e62d040114aaadfa9c3a6d6a70cd001cdea11e36
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Oct 25 20:01:06 2020 -0600
+
+ Make end argument of Margin functions optional.
+
+commit e5db49aa7b3ede25ae2cf4c08adfe2fe533420b1
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Oct 25 19:59:54 2020 -0600
+
+ Expose solution to standard problem in rationalSimplex.
+
+commit 69e5f0cc8ccdb8128319c4cd8c1f13cae01ce82d
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sat Oct 10 00:11:57 2020 -0600
+
+ Make --version indicate if configured for OSMesa software rendering.
+
+commit d54e2ac82481e410ffa2bb52a1fb9d217d95eb98
+Author: John Bowman <bowman@ualberta.ca>
+Date: Wed Oct 7 17:39:51 2020 -0600
+
+ Add high resolution wall clock time.
+
+commit a055a0ae813e7ed443b3d48e0822e5e7199bef65
+Author: Tom Callaway <spot@fedoraproject.org>
+Date: Fri Oct 2 18:50:51 2020 -0400
+
+ add --disable-curl option to prevent curl check and compile without optional URL support
+
+commit 27a55b7891214aa0654e7a97207c5ba762ceb1aa
+Author: John Bowman <bowman@ualberta.ca>
+Date: Mon Sep 14 13:48:03 2020 -0600
+
+ Fix centering of slides.
+
+commit 576b7333baf56cd833a1098dd85a22af1bbfdafb
+Author: John Bowman <bowman@ualberta.ca>
+Date: Fri Aug 28 21:56:16 2020 -0600
+
+ Support null characters and null strings in replace.
+
+commit be534393f9b3404573479dc9851817e6c5fbda94
+Author: John Bowman <bowman@ualberta.ca>
+Date: Mon Aug 24 12:59:25 2020 -0600
+
+ Disable image encoding in PDF conversion.
+
+commit 1fd27cc14606206aba81bf131e0bef36e9329457
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sat Aug 22 12:15:26 2020 -0600
+
+ Fix extraction of git revision.
+
+commit 8dbece952d9ddece1349215243c473bafcc7b4c6
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sat Aug 22 09:56:46 2020 -0600
+
+ Fix configuration without readline support.
+
+commit d6500a226b021edf99002596f7226015950dc6af
+Author: John Bowman <bowman@ualberta.ca>
+Date: Thu Aug 20 22:47:49 2020 -0600
+
+ Allow binary mode to read the entire file into a string.
+
+commit 880ef36e9878dfbcdcf28b953d11bfd392805643
+Author: John Bowman <bowman@ualberta.ca>
+Date: Thu Aug 20 21:04:51 2020 -0600
+
+ Fix getc when reading NUL character.
+
+commit e3ac2208915f6c496974a8dc3342861de4f2e2d1
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sat Aug 15 12:52:42 2020 -0600
+
+ Fix commit 986d64236b299c1643451f4e774170cb8ebcec00.
+
+commit 6cea1c06c2054f1b7433e2d01ed6a2ec863b6726
+Author: John Bowman <bowman@ualberta.ca>
+Date: Thu Aug 13 16:06:15 2020 -0600
+
+ Update URLs.
+
+commit af12ec3b6fcca4e273dad4fdd3b431bada30608f
+Merge: 986d6423 68682879
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Aug 9 08:29:58 2020 -0600
+
+ Merge pull request #170 from bmwiedemann/date
+
+ Allow to override build date with SOURCE_DATE_EPOCH.
+
+commit 68682879ce9704606fb0d46734dfaba4966de9b5
+Author: Bernhard M. Wiedemann <bwiedemann@suse.de>
+Date: Sun Aug 9 14:10:55 2020 +0200
+
+ Allow to override build date with SOURCE_DATE_EPOCH
+
+ in order to make builds reproducible.
+ See https://reproducible-builds.org/ for why this is good
+ and https://reproducible-builds.org/specs/source-date-epoch/
+ for the definition of this variable.
+
+ Also consistently use ISO 8601 date format to be understood everywhere.
+ This also avoids %B and %h that are locale-dependent.
+
+ Also use UTC/gmtime to be independent of timezone.
+
+ Also rewrite the shell `date` calls into perl to avoid
+ trouble with the different date command implementations.
+
+ This PR was done while working on reproducible builds for openSUSE.
+
+commit 986d64236b299c1643451f4e774170cb8ebcec00
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sat Aug 8 11:18:38 2020 -0600
+
+ Fix last revision.
+
+commit 4c06e580baa7051128d3e8ab4b06a0315a1eecd7
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sat Aug 8 01:05:57 2020 -0600
+
+ Simplify code.
+
+commit d2f6e59eb42763c2e9a1f6ca5e057f6bf13991cd
+Author: John Bowman <bowman@ualberta.ca>
+Date: Thu Aug 6 22:27:33 2020 -0600
+
+ Fix last revision.
+
+commit 7ae96b7754d1025c02be514e3d31433cce52b609
+Author: John Bowman <bowman@ualberta.ca>
+Date: Thu Aug 6 22:05:07 2020 -0600
+
+ Remove -0 suffix from git version for tagged releases.
+
+commit 610c4624a7ac69ee4ccfedd6075b1cb28c14d7ce
+Author: John Bowman <bowman@ualberta.ca>
+Date: Wed Aug 5 23:39:05 2020 -0600
+
+ Fix last revision.
+
+commit dc4243ccd1c5ab766241707ab10f16d7c9738ef7
+Author: John Bowman <bowman@ualberta.ca>
+Date: Wed Aug 5 23:34:47 2020 -0600
+
+ Backport curlProgress to libCurl < 7.32.
+
+commit 94f99a26ab9b72f3a3fbc2239f9e7b529b7166e2
+Author: John Bowman <bowman@ualberta.ca>
+Date: Wed Aug 5 22:18:03 2020 -0600
+
+ Increment version to 2.68.
+
+commit bccdb51e0cfa5b7b7bf5c08c1f9496a7ba9a012d
+Author: John Bowman <bowman@ualberta.ca>
+Date: Wed Aug 5 17:45:17 2020 -0600
+
+ Reformat run*.in files.
+
+commit 37bf3ce87aed185a465da781db931a68aff7745d
+Author: John Bowman <bowman@ualberta.ca>
+Date: Wed Aug 5 17:01:26 2020 -0600
+
+ Allow URL requests to be interrupted.
+
+commit 92d7b6fe3bbd0d1ee5238ac5d87469e6d17e89f4
+Author: John Bowman <bowman@ualberta.ca>
+Date: Wed Aug 5 16:19:42 2020 -0600
+
+ Port to MSDOS.
+
+commit 9dc14b7b56eeaddae51c5f24012ac51a5faf93f9
+Author: John Bowman <bowman@ualberta.ca>
+Date: Wed Aug 5 01:56:15 2020 -0600
+
+ Fix hang on quit under MSDOS.
+
+commit bfefd605c7eb661f03eba5405795d6dff3e9cd43
+Author: John Bowman <bowman@ualberta.ca>
+Date: Tue Aug 4 22:50:32 2020 -0600
+
+ Fix readline interrupt handling under MacOS X.
+
+commit 1fb62259fe1b94a5b3ef0b44ce7f7d32a3be76b3
+Author: John Bowman <bowman@ualberta.ca>
+Date: Tue Aug 4 12:40:53 2020 -0600
+
+ Remove xasy link from MSDOS build.
+
+commit 5050ce7ee703ef3ec3c4d84cd420a019178c6859
+Author: John Bowman <bowman@ualberta.ca>
+Date: Mon Aug 3 14:18:29 2020 -0600
+
+ Reformat examples.
+
+commit 372ae2ca61bea75271c85549dd166b71d4dc72b4
+Author: John Bowman <bowman@ualberta.ca>
+Date: Mon Aug 3 13:59:33 2020 -0600
+
+ Indent projection output.
+
+commit b552792d5adb112b469ea55e8b95ffc299969ec0
+Author: John Bowman <bowman@ualberta.ca>
+Date: Mon Aug 3 13:20:15 2020 -0600
+
+ Add C++ and asy indenting and formatting Emacs lisp scripts.
+
+commit b03e2ba9dc2287c16869dc51e87fe5715eb3c2d4
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Aug 2 23:08:08 2020 -0600
+
+ Fix last revision.
+
+commit 55406a03c263d9a33c22f823110bee247146ffdc
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Aug 2 22:52:47 2020 -0600
+
+ Fix compilation without libcurl.
+
+commit e0f8c79e64f4b2d14f0dbd6f95472480bd718b72
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Aug 2 22:50:42 2020 -0600
+
+ Reformat base files.
+
+commit ef00491a49965e998549a2df0bb6d01fb4bb7d61
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Aug 2 21:13:13 2020 -0600
+
+ Reformat .cc and .h files.
+
+commit 5de4352e05ba6a03f95a128b81e702d6a3d27314
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Aug 2 20:21:07 2020 -0600
+
+ Update asygl.
+
+commit 98b22e43550672e01cf257f982380efa18f4f92b
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Aug 2 19:15:52 2020 -0600
+
+ Document newpage.
+
+commit 083efd7710a851e2e33331bcbac9ac42cf4dabe6
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Aug 2 18:12:45 2020 -0600
+
+ Avoid unnecessary remesh on zoom in AsyGL.
+
+commit 23c2ac57fd6336eda71251c25a7324732e1433d9
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Aug 2 18:00:30 2020 -0600
+
+ Force remeshing on export.
+
+commit bfc7bc0db8ca496f5ea9545024f84749ae3ea636
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Aug 2 17:50:26 2020 -0600
+
+ Fix exporting when devicepixelratio > 1.
+
+commit 5e57b75e78b4d596cdc00d3a35a2c8c40df17f90
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sat Aug 1 21:02:48 2020 -0600
+
+ Implement devicepixelratio setting.
+
+commit ef0bb9f3fd39c3528fd963b27c6989c3287faacf
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sat Aug 1 20:27:52 2020 -0600
+
+ Extend URL support to input().
+
+commit 45e8475ce686ca92aad94488c10824fc1f1d044f
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sat Aug 1 14:41:48 2020 -0600
+
+ Support importing URLs.
+
+commit 81b4d1e85225fb540c8cf64d733b810ab3ab07d6
+Author: John Bowman <bowman@ualberta.ca>
+Date: Fri Jul 31 18:18:57 2020 -0600
+
+ Remove obsolete code.
+
+commit 2e497032037cff813426a1ece1f42ec1ab924d68
+Author: John Bowman <bowman@ualberta.ca>
+Date: Wed Jul 29 22:58:25 2020 -0600
+
+ Fix interrupt handling under MacOS X.
+
+commit c2c8c095416e766063ad0af943d1a931d14095e0
+Author: John Bowman <bowman@ualberta.ca>
+Date: Wed Jul 29 01:52:40 2020 -0600
+
+ Implement portable whitespace skipping also for pairs.
+
+commit ed3e87bb4795ac6cf648af9b4f12e2418efad11a
+Author: John Bowman <bowman@ualberta.ca>
+Date: Wed Jul 29 01:35:03 2020 -0600
+
+ Implement portable way of skipping whitespace.
+ Make casts from empty strings yield uninitialized values.
+
+commit 8ba38823755e09de6463a42396e1db7291276254
+Author: John Bowman <bowman@ualberta.ca>
+Date: Tue Jul 28 21:06:49 2020 -0600
+
+ Simplify code.
+
+commit ad7054342d291ce32f71951b7e7eeea381d29efb
+Author: John Bowman <bowman@ualberta.ca>
+Date: Tue Jul 28 21:05:19 2020 -0600
+
+ Fix numerical precision issue.
+
+commit 111cd165f5c7f4a0496a9efbf746d4f2a316a48c
+Author: John Bowman <bowman@ualberta.ca>
+Date: Mon Jul 27 00:30:18 2020 -0600
+
+ Format documentation.
+
+commit 9193d9d8ee934b325e575d405631d4fb252b1d8d
+Merge: ef016d74 013e0cb2
+Author: John Bowman <bowman@ualberta.ca>
+Date: Mon Jul 27 00:20:41 2020 -0600
+
+ Merge pull request #144 from ivankokan/master
+
+ Obsolete *encoding modules
+
+commit 013e0cb25362e46cecb40ea468aa95e66788dd12
+Merge: aa8a5244 ef016d74
+Author: Ivan Kokan <ivan.kokan@gmail.com>
+Date: Mon Jul 27 02:26:20 2020 +0200
+
+ Merge branch 'master' into master
+
+commit ef016d741c443e8e84ff8248a9622c820813b754
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Jul 26 17:47:02 2020 -0600
+
+ Document that clipping has no notion of depth.
+
+commit 1b11525273e0661d3a3f4f8dc988b29982e7f5c2
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Jul 26 12:15:06 2020 -0600
+
+ Fix segmentation fault caused by obsolete code.
+
+commit eb1ec4d911ee9b4c3f34a07505183291d3793e6e
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Jul 26 11:34:09 2020 -0600
+
+ Update documentation.
+
+commit 6473c8487d59a4891c406cd127b3bb2d200ebe62
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Jul 26 11:02:35 2020 -0600
+
+ Simplify code.
+
+commit 52b458f036b7f9222a084ffef4e94092342608bf
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sat Jul 25 20:56:11 2020 -0600
+
+ Fix copy constructors for path and path3.
+
+commit e5da02595a16d3a6adc60cd9d4589b5cf31b4fd3
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sat Jul 25 17:59:27 2020 -0600
+
+ Port to MacOS X.
+
+commit bb56b10d431a5acd66b28c4a4bb22ba99ef7c1c8
+Author: John Bowman <bowman@ualberta.ca>
+Date: Fri Jul 24 00:09:24 2020 -0600
+
+ Improve repositioning of OpenGL window.
+
+commit 47f463e5a739c02838fd549e7a4dc3b0f8471f21
+Author: John Bowman <bowman@ualberta.ca>
+Date: Thu Jul 23 03:39:28 2020 -0600
+
+ Always reposition OpenGL window when not fitting to screen.
+
+commit 1ba366e2ba2380e17c81df2b6cd4114869745ad4
+Author: John Bowman <bowman@ualberta.ca>
+Date: Wed Jul 22 20:19:12 2020 -0600
+
+ Normalize triple dir(path3, path3).
+
+commit bc0b6499e5f71b36a3177f677db5277078164dbd
+Author: John Bowman <bowman@ualberta.ca>
+Date: Wed Jul 22 00:39:18 2020 -0600
+
+ Prevent xasy from hanging on asy errors.
+
+commit dee047a7596538e2012152c52a753938ea9d310b
+Author: John Bowman <bowman@ualberta.ca>
+Date: Mon Jul 20 00:31:32 2020 -0600
+
+ Update asygl.
+
+commit 7574872dca70fda79c6cd65e350b57fc135bd794
+Author: John Bowman <bowman@ualberta.ca>
+Date: Mon Jul 20 00:28:29 2020 -0600
+
+ Make + and - keys zoom in and out, rather than expand and shrink viewport.
+
+commit 2066ef194ec9f7c135b165ea8b157e78320306a6
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sat Jul 18 22:46:22 2020 -0600
+
+ Update asygl.
+
+commit 5089b775299a17831a86c4ae38d1081de3e1282a
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sat Jul 18 22:45:58 2020 -0600
+
+ Improve resizing.
+
+commit 242615a1b755ea943603daad9aa6060e5f2eca1e
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sat Jul 18 20:44:53 2020 -0600
+
+ Workaround JSON bug by escaping colons.
+
+commit 7294cb2bf8a3fc0c182b36c9b1ee8b49cc5a8b3d
+Author: John Bowman <bowman@ualberta.ca>
+Date: Fri Jul 17 13:07:35 2020 -0600
+
+ Update asygl.
+
+commit 5a2bd75f8f8ee73c0617896f0d1183fe4c673c05
+Author: John Bowman <bowman@ualberta.ca>
+Date: Fri Jul 17 13:06:43 2020 -0600
+
+ Fix absolute mode.
+
+commit 55e4e0dba58565b91ae1dd1df715b49db339a305
+Author: John Bowman <bowman@ualberta.ca>
+Date: Fri Jul 17 12:47:08 2020 -0600
+
+ Update asygl.
+
+commit ba16a591ca3b924fb1e9db399f4c942d36341d68
+Author: John Bowman <bowman@ualberta.ca>
+Date: Fri Jul 17 12:46:45 2020 -0600
+
+ Reset initial zoom.
+
+commit c47728d59cb3d9a8ffb394cbffb79c2ddc631816
+Author: John Bowman <bowman@ualberta.ca>
+Date: Fri Jul 17 12:25:14 2020 -0600
+
+ Update asygl.
+
+commit e0281de557eb186728d66fd0c183d65a50b8f0b5
+Author: John Bowman <bowman@ualberta.ca>
+Date: Fri Jul 17 12:24:18 2020 -0600
+
+ Always listen for WebGL resize events.
+
+commit 99c614d893cea7dffb9a41c13c20460248944cd2
+Author: John Bowman <bowman@ualberta.ca>
+Date: Thu Jul 16 23:23:58 2020 -0600
+
+ Document settings.absolute.
+
+commit af6c53a9825bc1e2dc73f8aa8a720b299d6a4e6c
+Author: John Bowman <bowman@ualberta.ca>
+Date: Thu Jul 16 23:00:29 2020 -0600
+
+ Fix invalid array dimensions error.
+
+commit b5eac1db427fbc956d01b243fffc2b4f20415355
+Author: John Bowman <bowman@ualberta.ca>
+Date: Wed Jul 15 11:41:01 2020 -0600
+
+ Update example.
+
+commit 9c9caaca5c63f04bde69205e0da9e163ee256344
+Author: John Bowman <bowman@ualberta.ca>
+Date: Wed Jul 15 02:59:52 2020 -0600
+
+ Disable cd with -noglobalread.
+
+commit 0278c8841589770d71e2803e57dcfb6ce002cfcf
+Author: John Bowman <bowman@ualberta.ca>
+Date: Wed Jul 15 01:00:25 2020 -0600
+
+ Allow reading from search path even with -noglobalread.
+
+commit cf7c0373f82cb7d1de78bb95d7b619e096552628
+Author: John Bowman <bowman@ualberta.ca>
+Date: Wed Jul 15 00:13:00 2020 -0600
+
+ Add examples directory to search path.
+
+commit 516d7847b2a58425c7763bbb0e79eebea7f72c15
+Author: John Bowman <bowman@ualberta.ca>
+Date: Tue Jul 14 23:14:10 2020 -0600
+
+ Fix inpath.
+
+commit 0a5015b2f86a656a8b04d2592a606b68bb6e4d53
+Author: John Bowman <bowman@ualberta.ca>
+Date: Tue Jul 14 16:42:20 2020 -0600
+
+ Add missing file.
+
+commit cde71e2634cd45113f60cd9aec96f0221e1b1d58
+Author: John Bowman <bowman@ualberta.ca>
+Date: Tue Jul 14 16:37:57 2020 -0600
+
+ Install data file.
+
+commit 2056aa9c63bd1bf9fc7f3cdb7415aa7c1cefbe07
+Author: John Bowman <bowman@ualberta.ca>
+Date: Tue Jul 14 16:12:41 2020 -0600
+
+ Add -globalread setting (default true).
+
+commit 246022516af218d6ae4cebf027965479d049b8d9
+Author: John Bowman <bowman@ualberta.ca>
+Date: Tue Jul 14 10:57:38 2020 -0600
+
+ Open files using search path.
+
+commit 2e4762d4381307876a100e42116592d8aba3a75a
+Author: John Bowman <bowman@ualberta.ca>
+Date: Tue Jul 14 01:56:07 2020 -0600
+
+ Reinstate putting clipPath definitions in <defs> section, with fix to Gouraud shading.
+
+commit 5b5c8aeddfe9e99eec14c30591713f4d128bb8cf
+Author: John Bowman <bowman@ualberta.ca>
+Date: Tue Jul 14 01:52:54 2020 -0600
+
+ Revert "Put clipPath definitions in <defs> section."
+
+ This reverts commit fbf03b07cfbabaeb7be861ac652f4b46fdc0e2cb.
+
+commit fbf03b07cfbabaeb7be861ac652f4b46fdc0e2cb
+Author: John Bowman <bowman@ualberta.ca>
+Date: Tue Jul 14 01:24:40 2020 -0600
+
+ Put clipPath definitions in <defs> section.
+
+commit 62bfac5dc40fe8f9ceefe2f834fdf6febd5971d5
+Author: John Bowman <bowman@ualberta.ca>
+Date: Tue Jul 14 00:56:40 2020 -0600
+
+ Use distinct clipping IDs.
+
+commit 5778d7e16e456bf9caacdadcf354ccfd41aff4c2
+Author: John Bowman <bowman@ualberta.ca>
+Date: Tue Jul 14 00:39:31 2020 -0600
+
+ Fix svg clipping.
+
+commit cd0faa137d52fea979e73b3748986cbcd396f882
+Author: John Bowman <bowman@ualberta.ca>
+Date: Mon Jul 13 02:23:24 2020 -0600
+
+ Remove unused svg transform.
+
+commit 29004b9576e08e6da0aae0df07ea08351e555953
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Jul 12 16:42:38 2020 -0600
+
+ Remove duplicate </head>.
+
+commit a2eb67615714aaa43674da43b8e5be8f597dbb1f
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Jul 12 09:34:59 2020 -0600
+
+ Support compilation and 2D svg to html conversion without GLM library.
+
+commit 89ca60bd9e8ea5b23d7deea2dfdf2d54b8496d25
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sat Jul 11 23:50:35 2020 -0600
+
+ Display error location in interactive mode when importing files;
+ output to stderr.
+
+commit 4c0160df84ee208b7f0b4f6480405299d4ae94d4
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sat Jul 11 02:27:54 2020 -0600
+
+ Display error location.
+
+commit bde2b3f814ffaf77f10bf78352b34f3584523734
+Author: John Bowman <bowman@ualberta.ca>
+Date: Fri Jul 10 19:37:51 2020 -0600
+
+ Remove body margin and scrollbar.
+
+commit 7bb9309de9929be530547de88d1cdeac052f2231
+Author: John Bowman <bowman@ualberta.ca>
+Date: Fri Jul 10 12:53:41 2020 -0600
+
+ Fit 2D html output to canvas unless settings.absolute=true.
+
+commit 497363ecde2cc4856756ed54ae2723799a183674
+Author: John Bowman <bowman@ualberta.ca>
+Date: Fri Jul 10 12:49:41 2020 -0600
+
+ Show dvisvgm diagnostics.
+
+commit 97843dd13d26027a05a108e16f60f910703648b7
+Author: John Bowman <bowman@ualberta.ca>
+Date: Thu Jul 9 16:08:10 2020 -0600
+
+ Fix tutorial URL.
+
+commit b6d53dc435fda60c836606f8d763dbdaf56e8501
+Author: John Bowman <bowman@ualberta.ca>
+Date: Thu Jul 9 09:34:10 2020 -0600
+
+ Fix format in documentation.
+
+commit aa8a5244e46c1d04300513a4107245a3575ceedd
+Author: ivankokan <ivan.kokan@gmail.com>
+Date: Thu Jul 9 15:53:58 2020 +0200
+
+ Format docs
+
+commit 9cca9e9106e6ad4aa89389d25b11712d7ac4edec
+Merge: e0b8e3de d968c027
+Author: Ivan Kokan <ivan.kokan@gmail.com>
+Date: Thu Jul 9 15:14:31 2020 +0200
+
+ Merge branch 'master' into master
+
+commit d968c027432b225800655e508fa00bff2da086b5
+Author: John Bowman <bowman@ualberta.ca>
+Date: Thu Jul 9 00:58:10 2020 -0600
+
+ Improve logo3.
+
+commit 3fd657ee90bc66143b86d7c15a3eb28200e88611
+Author: John Bowman <bowman@ualberta.ca>
+Date: Tue Jul 7 23:06:48 2020 -0600
+
+ Work around dvisvgm bug.
+
+commit 978d0e0d8ce48a7f71d1880dea6454133c8f6698
+Author: John Bowman <bowman@ualberta.ca>
+Date: Tue Jul 7 02:01:25 2020 -0600
+
+ Increment version to 2.67.
+
+commit 695f398ded015ec27835b833f29d220794c45831
+Author: John Bowman <bowman@ualberta.ca>
+Date: Mon Jul 6 22:54:59 2020 -0600
+
+ Enable PDF transparency for SVG and HTML formats.
+
+commit 4ec6f561926704c685739dd77183e2c56929db80
+Author: John Bowman <bowman@ualberta.ca>
+Date: Mon Jul 6 22:44:19 2020 -0600
+
+ Only implement PDF transparency for PDF formats.
+
+commit f030d57672c300689ad4b955f8bd5ab897cfffc9
+Author: John Bowman <bowman@ualberta.ca>
+Date: Mon Jul 6 22:34:53 2020 -0600
+
+ Remove unused code.
+
+commit c1083e547bd5c43c2baf253d5ffbf376aa1b49eb
+Author: John Bowman <bowman@ualberta.ca>
+Date: Mon Jul 6 20:52:05 2020 -0600
+
+ Work around broken signals on MSWindows.
+
+commit 6e050f717ffeea7701c9de1e2b8ffe5ff9b9a7cb
+Author: John Bowman <bowman@ualberta.ca>
+Date: Mon Jul 6 00:04:25 2020 -0600
+
+ Fix tempdir.
+
+commit a6c626a111b49512bf8e54e4482d3aef47d63555
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Jul 5 22:20:28 2020 -0600
+
+ Update documentation.
+
+commit 7b7b491898243d71f190b4ebad02e92805b8d0d1
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Jul 5 21:34:08 2020 -0600
+
+ Document the Asymptote Web Application.
+
+commit ef354c08562686b6afdd5aafd6e63fe1edfdf0ef
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Jul 5 20:20:09 2020 -0600
+
+ Remove unused variable.
+
+commit 6129a12bd26dd018d38cd96c62e8fa74b5cf36a9
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Jul 5 20:11:27 2020 -0600
+
+ Fix pdfreload.
+
+commit fa3122974baecf2d7743e87705f3b12c913e560b
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Jul 5 01:44:07 2020 -0600
+
+ Use custom tmpdir for dvisvgm to avoid permission conflicts.
+
+commit 042ab6b6973dc045ad80a5e99ecf29034f67416b
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Jul 5 00:20:44 2020 -0600
+
+ Fix pdfoffsets.
+
+commit b081ac0d5b435bcb1531fd8d6211b552f62a8679
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sat Jul 4 03:26:15 2020 -0600
+
+ Update dependencies.
+
+commit bd9c1e2def171eea72ea13f7755a2601da4401f8
+Author: John Bowman <bowman@ualberta.ca>
+Date: Fri Jul 3 01:46:42 2020 -0600
+
+ Fix fullscreen mode. The default maxviewport value of (0,0) now specifies
+ the screen dimensions.
+
+commit 499234d65838272830fc133635729be93474ebfa
+Author: John Bowman <bowman@ualberta.ca>
+Date: Thu Jul 2 22:55:56 2020 -0600
+
+ Remove X-server dependency for offscreen rendering.
+
+commit 217bb1c86beaa5daa7dbea6691a9a7afb088c355
+Author: John Bowman <bowman@ualberta.ca>
+Date: Thu Jul 2 14:36:45 2020 -0600
+
+ Remove obsolete offscreen setting.
+
+commit 1ddfc8e10bb10020c77b550217743b9b77f0a845
+Author: John Bowman <bowman@ualberta.ca>
+Date: Thu Jul 2 11:35:12 2020 -0600
+
+ Add missing conditionals; simplify code.
+
+commit c19d2327b109655e9a99c795bc2724738af3fc3c
+Author: John Bowman <bowman@ualberta.ca>
+Date: Thu Jul 2 11:20:01 2020 -0600
+
+ Support offscreen rendering again when configured with --enable-offscreen.
+
+commit b800078b4d81c126cf43984b12d876e919292e7c
+Author: John Bowman <bowman@ualberta.ca>
+Date: Thu Jul 2 00:14:30 2020 -0600
+
+ Work around FE_INVALID when using Gallium libGL.
+
+commit 6c6267318f959de91711984d192d96846fe11dae
+Author: John Bowman <bowman@ualberta.ca>
+Date: Mon Jun 29 01:38:31 2020 -0600
+
+ Fix warning message.
+
+commit 117081fc1c6909080df76502b15dfcb1576cd0c6
+Author: John Bowman <bowman@ualberta.ca>
+Date: Mon Jun 29 01:31:13 2020 -0600
+
+ Fix warning message.
+
+commit d573cbb922fac2f8106e70afdf9637e2ce2d6d36
+Author: John Bowman <bowman@ualberta.ca>
+Date: Mon Jun 29 00:48:08 2020 -0600
+
+ Fix documentation of mapTemplate.
+
+commit 9bdd507eabc2e5f9dbe2b3c2fde74c0552156372
+Author: John Bowman <bowman@ualberta.ca>
+Date: Mon Jun 29 00:39:47 2020 -0600
+
+ Illustrate how to create parametrized code by implementing a struct
+ mapping keys to values, with a specified default. Also implement mapArray,
+ simplifying the construction of general array mappings.
+
+commit 9cdbfd99e9e6bc80055c3929016d7a65e589f690
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sat Jun 27 23:35:55 2020 -0600
+
+ Redefine map2 to map, T1 to mapFrom and T2 to mapTo.
+
+commit 24631469c445b7722566ccfe1b4a91e6cca70c19
+Author: John Bowman <bowman@ualberta.ca>
+Date: Fri Jun 26 21:23:38 2020 -0600
+
+ Add map2 code for defining T2[] map(T2 f(T1), T1[] a).
+
+commit 503273b5f076f3a46083922b6e0f8a892001a763
+Author: John Bowman <bowman@ualberta.ca>
+Date: Fri Jun 26 04:31:57 2020 -0600
+
+ Fix bug #162: opening .asy file in Xasy crashes on MSWindows.
+
+commit 7ddc5b161a2cb3394e6ae0b986c8714fc6ff1e0e
+Author: John Bowman <bowman@ualberta.ca>
+Date: Thu Jun 25 00:10:46 2020 -0600
+
+ Extend currentlight.background to 2D images; by default, use a white background for both 2D and 3D HTML images.
+
+commit 61624215084386cbba889dd008c95fcfa3f436e1
+Author: John Bowman <bowman@ualberta.ca>
+Date: Wed Jun 24 22:32:49 2020 -0600
+
+ Fix 2D html tags.
+
+commit 1b8c77abebeb4a3e65d1f30eda6d5b60ffe820f2
+Author: John Bowman <bowman@ualberta.ca>
+Date: Mon Jun 22 14:58:38 2020 -0600
+
+ Fix xasy svg shading.
+
+commit 96cf6bb0c46c830c3676a442900e4bd968e0a50c
+Author: John Bowman <bowman@ualberta.ca>
+Date: Mon Jun 22 01:38:25 2020 -0600
+
+ Fix Windows override in xasyconfig.cson.
+
+commit 448695a92747861476497f92e23e6d779596ed16
+Author: John Bowman <bowman@ualberta.ca>
+Date: Mon Jun 22 01:24:43 2020 -0600
+
+ Implement real abs2(pair) and real abs2(triple).
+
+commit 4e76a3267bb44d163378bd50f72eb6340089b469
+Author: John Bowman <bowman@ualberta.ca>
+Date: Mon Jun 22 00:04:38 2020 -0600
+
+ Fix deconstruction of png images into svg format.
+
+commit b1d4da9a0e0d69047df43c15bbe9b22f01ebb0d5
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Jun 21 18:37:41 2020 -0600
+
+ Check array dimensions.
+
+commit 1264820193c3d27b79082431762636cb4c19b8ee
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Jun 21 18:02:46 2020 -0600
+
+ Fix camera adjustment.
+
+commit 0353f3bd5edc99e5f83fdae04f7d14393dfa623d
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Jun 21 16:39:19 2020 -0600
+
+ Improve detection of TeX errors.
+
+commit d0049ae28dcd4ee1664e27dff18a43dbbc7c8521
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Jun 21 01:41:57 2020 -0600
+
+ Fix CPU to CPU optimization for Bezier curves by rendering one segment at a time.
+
+commit 6cafa5abb72d1ab2f69ab6ba9fc8ba7c4417bfe6
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Jun 21 01:25:41 2020 -0600
+
+ Update asygl.
+
+commit 6a04bf13097bb8e196bdfcbf1f9c9b30fd5fe4b8
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Jun 21 01:22:27 2020 -0600
+
+ Port CPU to GPU copying optimization to AsyGL library.
+
+commit 0fcf4e50d0fdaf43d839d15c8eea7ff99ab4ed71
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sat Jun 20 00:01:45 2020 -0600
+
+ Update to new Ghostscript transparency model.
+
+commit d2e946715241e559433ae56b2cc726901b1474d6
+Author: John Bowman <bowman@ualberta.ca>
+Date: Fri Jun 19 19:12:15 2020 -0600
+
+ Output 2D html images using inline svg commands.
+
+commit 239b54d06b51b52b6fb1d7a929fada19039356a9
+Author: John Bowman <bowman@ualberta.ca>
+Date: Thu Jun 18 22:22:22 2020 -0600
+
+ Force PNG content to be embedded in SVG output.
+
+commit c1215bee4c483b75f547098fc0849e4f5277a404
+Author: John Bowman <bowman@ualberta.ca>
+Date: Thu Jun 18 18:55:12 2020 -0600
+
+ Fix tensor shading with latex engine and svg outformat.
+ Check for mismatched endspecial. Simplify code.
+
+commit cb9a4f90466dac50aeec00bd7dbb91cb609f5c0a
+Author: John Bowman <bowman@ualberta.ca>
+Date: Thu Jun 18 00:02:18 2020 -0600
+
+ Update asygl.
+
+commit d56cfbf30c5dfd26abdd13af139f2419ae28b3b1
+Author: John Bowman <bowman@ualberta.ca>
+Date: Thu Jun 18 00:01:46 2020 -0600
+
+ Fix WebGL shrink and expand.
+
+commit bb772d94c88a0968f744a02faadddbc0c4d214a4
+Author: John Bowman <bowman@ualberta.ca>
+Date: Wed Jun 17 22:00:11 2020 -0600
+
+ Increase WebGL precision of example.
+
+commit 55217bf80236b08d820ef235e84478100d094077
+Author: John Bowman <bowman@ualberta.ca>
+Date: Wed Jun 17 21:11:05 2020 -0600
+
+ Update asygl.
+
+commit 31d27c0d7a4dcb36f87ab2aa046371936dc6d176
+Author: John Bowman <bowman@ualberta.ca>
+Date: Wed Jun 17 21:10:09 2020 -0600
+
+ Extend WebGL viewport to edge of canvas; simplify code.
+
+commit 5b6237b879a56a222e9c3689181485646ab4ea51
+Author: John Bowman <bowman@ualberta.ca>
+Date: Wed Jun 17 16:04:49 2020 -0600
+
+ Update asygl.
+
+commit 07b4ae5679569041c070c6f50c0bd8eb3e0a97aa
+Author: John Bowman <bowman@ualberta.ca>
+Date: Wed Jun 17 16:04:03 2020 -0600
+
+ Fix WebGL aspect ratio and centering.
+
+commit c209a949e54d90bdf71a4d576602a6b004b894f3
+Author: John Bowman <bowman@ualberta.ca>
+Date: Wed Jun 17 10:57:13 2020 -0600
+
+ Update asygl.
+
+commit 9e93b99175d0aa06535022dbddeaebd7b75f4377
+Author: John Bowman <bowman@ualberta.ca>
+Date: Wed Jun 17 10:56:39 2020 -0600
+
+ Restore aspect ratio sizing code.
+
+commit eb022a5e1fc3c8bc2008e33980a47a99d269159b
+Author: John Bowman <bowman@ualberta.ca>
+Date: Wed Jun 17 08:30:47 2020 -0600
+
+ Update asygl.
+
+commit e773510775bf63cfb81fc44077c3651cccf49a9c
+Author: John Bowman <bowman@ualberta.ca>
+Date: Wed Jun 17 08:27:04 2020 -0600
+
+ Center html output in Javascript code.
+
+commit d604442f8a09550276cf03721ab3c71047eb9f6b
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Jun 14 02:31:48 2020 -0600
+
+ Increase precision of planar Bezier surfaces in WebGL.
+
+commit 38a8732d7c292de07142e789a7abf6115a52ed82
+Author: John Bowman <bowman@ualberta.ca>
+Date: Tue Jun 2 11:49:16 2020 -0600
+
+ Revert "Center html output."
+
+ This reverts commit 8d6fcc11cbc1118f6f4253efb8766998f83425fe.
+
+commit 3546418498d27270de2ea77a8e59a97bc90697ef
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun May 24 23:03:01 2020 -0600
+
+ Remove clip from slopefield module.
+
+commit 8d6fcc11cbc1118f6f4253efb8766998f83425fe
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun May 24 21:31:48 2020 -0600
+
+ Center html output.
+
+commit 56f89ede630ce95f6d0e57c5adf58bc925229ad8
+Author: John Bowman <bowman@ualberta.ca>
+Date: Mon May 11 19:46:20 2020 -0600
+
+ Force copying of sorted transparent triangles to GPU.
+
+commit b44d17ae26dcd0f3d3ea63188f93528230390cfe
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun May 10 22:08:53 2020 -0600
+
+ Raise logo3 camera.
+
+commit d9bbb71b151c1ff1ee920045607240ed80ead95f
+Author: John Bowman <bowman@ualberta.ca>
+Date: Wed May 6 01:00:21 2020 -0600
+
+ Brighten default light Headlamp.
+
+commit d9b7e5f6759da978831a03be481f5b0712f77ba7
+Author: John Bowman <bowman@ualberta.ca>
+Date: Wed May 6 00:11:21 2020 -0600
+
+ Fix previous commit.
+
+commit a81b3656d2087a9f038fdd3417698d23d0518808
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun May 3 21:25:09 2020 -0600
+
+ Fix copying of materials from CPU to GPU.
+
+commit d536e5e45d45c7893d6703d8ef9c56c2df0d97b7
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun May 3 10:32:42 2020 -0600
+
+ Simplify code.
+
+commit a869eb33b2549b19fd67a64031d202a2fb834cd1
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun May 3 01:02:48 2020 -0600
+
+ Fix svg output for axialshade and radialshade.
+
+commit 90f4700de45c7b5a86c109d004209d8ef688bf88
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun May 3 00:21:51 2020 -0600
+
+ Work around dvisvgm --pdf limitations.
+
+commit 05faf64b39ec7ac03318a7b4c738cae9d107239a
+Author: John Bowman <bowman@ualberta.ca>
+Date: Fri May 1 04:31:10 2020 -0600
+
+ Copy vertex and material data from CPU to GPU only when necessary.
+
+commit 091d66b78d5f6283140d9d3f1ca776629e88360d
+Author: John Bowman <bowman@ualberta.ca>
+Date: Wed Apr 29 23:27:23 2020 -0600
+
+ Make svgemulation=true by default to emulate Gouraud shading in SVG;
+ remove obsolete experimental code.
+
+commit ada6af005b220947cd64c534d2f0e64f5b860b24
+Author: John Bowman <bowman@ualberta.ca>
+Date: Wed Apr 29 00:20:26 2020 -0600
+
+ Improve emulation of SVG Gouraud shading with option -svgemulation.
+
+commit fa31a4f26318806e76146fcdf4d5a38493ddcd17
+Author: John Bowman <bowman@ualberta.ca>
+Date: Mon Apr 27 09:04:14 2020 -0600
+
+ Fix typo in documentation.
+
+commit 154d7bbd45c8a2e3c92ed98ffdfb0d9614cab4dd
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Apr 26 18:17:56 2020 -0600
+
+ Work around dvisvgm --pdf limitations; fix -fsvg -render=0.
+
+commit 90b198134af21c9989e904ee72b78779b7ecbb2d
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sun Apr 26 15:56:54 2020 -0600
+
+ Fix segmentation fault; consolidate error messages.
+
+commit 1c15884c9505b3e2b01dfdc1bd21ace199d3b746
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sat Apr 25 19:30:15 2020 -0600
+
+ Flatten a monochrome tensor patch with interior internal control points to a
+ filled cyclic path.
+
+commit cb4c2c03e7cd77adceeab539e0d173798abf9717
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sat Apr 25 11:53:07 2020 -0600
+
+ Allow dvisvgm --pdf now that version 2.9.1 supports PNG images.
+
+commit 3063abbcfcf1d8b8b4fc6b67a37375bfc746f6cc
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sat Apr 25 08:58:11 2020 -0600
+
+ Consistently use dvisvgm -v3 verbosity option.
+
+commit 21b9f1a684678f931d56c26ccb8ea7fb11f5769c
+Author: John Bowman <bowman@ualberta.ca>
+Date: Sat Apr 25 00:08:59 2020 -0600
+
+ Fix export of 3D rendered bitmaps to svg.
+
+commit e0b8e3def55318505b24cd850b94efa2ac037d0b
+Author: ivankokan <ivan.kokan@gmail.com>
+Date: Thu Apr 23 00:38:59 2020 +0200
+
+ Update sourceforge URLs in FAQ
+
+commit fcd9aeb92d892f97925f6f428a00efd376bd2da7
+Author: ivankokan <ivan.kokan@gmail.com>
+Date: Thu Apr 23 00:32:10 2020 +0200
+
+ Update FAQ for international fonts question
+
+commit 825488fbb1395202f35b436df146da6f8560a6af
+Author: ivankokan <ivan.kokan@gmail.com>
+Date: Thu Apr 23 00:01:44 2020 +0200
+
+ CJK package URL
+
+commit 285f855a0312465f1c1d96757a5098061d929725
+Merge: 35428571 881b585a
+Author: John Bowman <bowman@ualberta.ca>
+Date: Mon Apr 13 14:56:25 2020 -0600
+
+ Merge pull request #151 from jsonn/patch-1
+
+ Check for libc++ directly, not for the kernel
+
+commit 881b585a2f8f0a927ce7d77c59eba0a4774ce98e
+Author: John Bowman <bowman@ualberta.ca>
+Date: Mon Apr 13 14:55:49 2020 -0600
+
+ Update comment.
+
+commit 44cb71efe77b4e7e9e12367bebcc39b0eebff767
+Author: Joerg Sonnenberger <joerg@bec.de>
+Date: Mon Apr 13 21:49:01 2020 +0200
+
+ Check for libc++ directly, not for the kernel
+
+commit 35428571776efdcaedcc9f920e927526849727a0
+Author: John Bowman <bowman@ualberta.ca>
+Date: Mon Apr 13 10:13:53 2020 -0600
+
+ Fix Bezier patch bounds bug introduced in bf3be19f7f1daf5730dabbf5c89e8a4f0f451a7d.
+
+commit 7f9480e35619e4cd6e7114cd025603c2e1937586
+Author: John Bowman <bowman@ualberta.ca>
+Date: Mon Apr 13 10:10:31 2020 -0600
+
+ Revert "Fix export bug."
+
+ This reverts commit 1566850db2aac0b78ec9806e35af514e7a185e63.
+
+commit decb4d5109744545082eb1843dcb2f1a52d4158c
+Author: John Bowman <bowman@ualberta.ca>
+Date: Fri Apr 3 08:39:40 2020 -0600
+
+ Add libtirpc dependency.
+
+commit 386b93b6d4770893d01ebc2ba25637546bca9f33
+Author: John Bowman <bowman@ualberta.ca>
+Date: Wed Mar 25 22:23:40 2020 -0600
+
+ Increment version to 2.66.
+
commit 1566850db2aac0b78ec9806e35af514e7a185e63
Author: John Bowman <bowman@ualberta.ca>
Date: Tue Mar 24 23:30:17 2020 -0600
@@ -342,6 +1668,33 @@ Date: Mon Feb 17 21:25:27 2020 -0700
Fix test degenerate normals.
+commit c1a8c0a212aa32eed3a0e78b91ad1abc540795cf
+Author: ivankokan <ivan.kokan@gmail.com>
+Date: Wed Feb 12 17:25:00 2020 +0100
+
+ Update documentation
+
+commit 173d1e8c9d2de43a11053b98f0f964af658a8a02
+Author: ivankokan <ivan.kokan@gmail.com>
+Date: Wed Feb 12 14:35:31 2020 +0100
+
+ Remove latin1 module
+
+commit 525dbb95a60cc75f7f55075b8d0e1deaba981edf
+Author: ivankokan <ivan.kokan@gmail.com>
+Date: Wed Feb 12 14:33:06 2020 +0100
+
+ Remove unicode module
+
+commit d560eaefbcffe9eb6c26db1d4fd1b365daa5799a
+Merge: 2898b83f 9beb5b6c
+Author: Ivan Kokan <ivan.kokan@gmail.com>
+Date: Wed Feb 12 13:42:05 2020 +0100
+
+ Merge pull request #2 from vectorgraphics/master
+
+ Sync
+
commit 9beb5b6c72ce47c8fad8c33f14b78015c9baa40f
Author: John Bowman <bowman@ualberta.ca>
Date: Wed Feb 5 22:26:02 2020 -0700
diff --git a/Build/source/utils/asymptote/Delaunay.cc b/Build/source/utils/asymptote/Delaunay.cc
index 3e9e5507f21..2090ddfeb3e 100644
--- a/Build/source/utils/asymptote/Delaunay.cc
+++ b/Build/source/utils/asymptote/Delaunay.cc
@@ -13,7 +13,7 @@ inline double max(double a, double b)
return (a > b) ? a : b;
}
-int XYZCompare(const void *v1, const void *v2)
+int XYZCompare(const void *v1, const void *v2)
{
double x1=((XYZ*)v1)->p[0];
double x2=((XYZ*)v2)->p[0];
@@ -48,7 +48,7 @@ Int Triangulate(Int nv, XYZ pxyz[], ITRIANGLE v[], Int &ntri,
if(presort) qsort(pxyz,nv,sizeof(XYZ),XYZCompare);
else postsort=false;
-
+
/* Allocate memory for the completeness list, flag for each triangle */
Int trimax = 4 * nv;
Int *complete = new Int[trimax];
@@ -114,14 +114,14 @@ Int Triangulate(Int nv, XYZ pxyz[], ITRIANGLE v[], Int &ntri,
double *a=pxyz[vj->p1].p;
double *b=pxyz[vj->p2].p;
double *c=pxyz[vj->p3].p;
-
+
if(incircle(a,b,c,d) <= 0.0) { // Point d is inside or on circumcircle
/* Check that we haven't exceeded the edge list size */
if(nedge + 3 >= emax) {
emax += 100;
IEDGE *p_EdgeTemp = new IEDGE[emax];
for (Int i = 0; i < nedge; i++) {
- p_EdgeTemp[i] = edges[i];
+ p_EdgeTemp[i] = edges[i];
}
delete[] edges;
edges = p_EdgeTemp;
@@ -199,7 +199,7 @@ Int Triangulate(Int nv, XYZ pxyz[], ITRIANGLE v[], Int &ntri,
delete[] edges;
delete[] complete;
- if(postsort) {
+ if(postsort) {
for(Int i = 0; i < ntri; i++) {
ITRIANGLE *vi=v+i;
vi->p1=pxyz[vi->p1].i;
@@ -209,4 +209,4 @@ Int Triangulate(Int nv, XYZ pxyz[], ITRIANGLE v[], Int &ntri,
}
return 0;
-}
+}
diff --git a/Build/source/utils/asymptote/GUI/Window1.py b/Build/source/utils/asymptote/GUI/Window1.py
index 4e0a57af2c6..1f7b67b1fa1 100644
--- a/Build/source/utils/asymptote/GUI/Window1.py
+++ b/Build/source/utils/asymptote/GUI/Window1.py
@@ -772,11 +772,11 @@ class MainWindow1(Qw.QMainWindow):
self.asyfyCanvas()
def actionManual(self):
- asyManualURL = 'http://asymptote.sourceforge.net/asymptote.pdf'
+ asyManualURL = 'https://asymptote.sourceforge.io/asymptote.pdf'
webbrowser.open_new(asyManualURL)
def actionAbout(self):
- Qw.QMessageBox.about(self,"xasy","This is xasy "+xasyVersion.xasyVersion+"; a graphical front end to the Asymptote vector graphics language: http://asymptote.sourceforge.net/")
+ Qw.QMessageBox.about(self,"xasy","This is xasy "+xasyVersion.xasyVersion+"; a graphical front end to the Asymptote vector graphics language: https://asymptote.sourceforge.io/")
def btnExportAsyOnClick(self):
diag = Qw.QFileDialog(self)
diff --git a/Build/source/utils/asymptote/GUI/configs/xasyconfig.cson b/Build/source/utils/asymptote/GUI/configs/xasyconfig.cson
index de6e7b3e8fd..c87f8c5b531 100644
--- a/Build/source/utils/asymptote/GUI/configs/xasyconfig.cson
+++ b/Build/source/utils/asymptote/GUI/configs/xasyconfig.cson
@@ -54,7 +54,7 @@ debugMode: true
# Overrides
-windows:
+Windows:
externalEditor: "notepad.exe"
Darwin:
diff --git a/Build/source/utils/asymptote/GUI/icons_rc.py b/Build/source/utils/asymptote/GUI/icons_rc.py
index f30a6bbc804..96e67359f90 100644
--- a/Build/source/utils/asymptote/GUI/icons_rc.py
+++ b/Build/source/utils/asymptote/GUI/icons_rc.py
@@ -9,13 +9,13 @@
from PyQt5 import QtCore
qt_resource_data = b"\
-\x00\x00\x03\xe6\
+\x00\x00\x02\x7d\
\x3c\
\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\
\x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x75\x74\x66\
\x2d\x38\x22\x3f\x3e\x0d\x0a\x3c\x21\x2d\x2d\x20\x47\x65\x6e\x65\
\x72\x61\x74\x6f\x72\x3a\x20\x41\x64\x6f\x62\x65\x20\x49\x6c\x6c\
-\x75\x73\x74\x72\x61\x74\x6f\x72\x20\x31\x38\x2e\x31\x2e\x31\x2c\
+\x75\x73\x74\x72\x61\x74\x6f\x72\x20\x31\x36\x2e\x32\x2e\x31\x2c\
\x20\x53\x56\x47\x20\x45\x78\x70\x6f\x72\x74\x20\x50\x6c\x75\x67\
\x2d\x49\x6e\x20\x2e\x20\x53\x56\x47\x20\x56\x65\x72\x73\x69\x6f\
\x6e\x3a\x20\x36\x2e\x30\x30\x20\x42\x75\x69\x6c\x64\x20\x30\x29\
@@ -27,53 +27,334 @@ qt_resource_data = b"\
\x73\x2f\x53\x56\x47\x2f\x31\x2e\x31\x2f\x44\x54\x44\x2f\x73\x76\
\x67\x31\x31\x2e\x64\x74\x64\x22\x3e\x0d\x0a\x3c\x73\x76\x67\x20\
\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\x31\x22\x20\x69\x64\
-\x3d\x22\x43\x68\x65\x76\x72\x6f\x6e\x5f\x63\x69\x72\x63\x6c\x65\
-\x64\x5f\x72\x69\x67\x68\x74\x22\x20\x78\x6d\x6c\x6e\x73\x3d\x22\
-\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\
-\x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x22\x20\x78\x6d\x6c\x6e\
-\x73\x3a\x78\x6c\x69\x6e\x6b\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\
-\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\x39\x39\x39\x2f\
-\x78\x6c\x69\x6e\x6b\x22\x0d\x0a\x09\x20\x78\x3d\x22\x30\x70\x78\
-\x22\x20\x79\x3d\x22\x30\x70\x78\x22\x20\x76\x69\x65\x77\x42\x6f\
-\x78\x3d\x22\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\x32\x22\x20\
-\x65\x6e\x61\x62\x6c\x65\x2d\x62\x61\x63\x6b\x67\x72\x6f\x75\x6e\
-\x64\x3d\x22\x6e\x65\x77\x20\x30\x20\x30\x20\x35\x31\x32\x20\x35\
-\x31\x32\x22\x20\x78\x6d\x6c\x3a\x73\x70\x61\x63\x65\x3d\x22\x70\
-\x72\x65\x73\x65\x72\x76\x65\x22\x3e\x0d\x0a\x3c\x67\x20\x74\x72\
-\x61\x6e\x73\x66\x6f\x72\x6d\x3d\x27\x6d\x61\x74\x72\x69\x78\x28\
-\x32\x34\x20\x30\x20\x30\x20\x32\x34\x20\x30\x20\x30\x29\x27\x3e\
-\x0d\x0a\x3c\x70\x61\x74\x68\x20\x64\x3d\x22\x4d\x31\x31\x2c\x31\
-\x30\x4c\x38\x2e\x36\x39\x38\x2c\x37\x2e\x34\x39\x34\x63\x2d\x30\
-\x2e\x31\x39\x36\x2d\x30\x2e\x31\x39\x38\x2d\x30\x2e\x31\x39\x36\
-\x2d\x30\x2e\x35\x31\x39\x2c\x30\x2d\x30\x2e\x37\x31\x38\x63\x30\
-\x2e\x31\x39\x36\x2d\x30\x2e\x31\x39\x37\x2c\x30\x2e\x35\x31\x35\
-\x2d\x30\x2e\x31\x39\x37\x2c\x30\x2e\x37\x31\x2c\x30\x6c\x32\x2e\
-\x38\x30\x37\x2c\x32\x2e\x38\x36\x34\x0d\x0a\x09\x63\x30\x2e\x31\
-\x39\x36\x2c\x30\x2e\x31\x39\x39\x2c\x30\x2e\x31\x39\x36\x2c\x30\
-\x2e\x35\x32\x2c\x30\x2c\x30\x2e\x37\x31\x37\x6c\x2d\x32\x2e\x38\
-\x30\x37\x2c\x32\x2e\x38\x36\x34\x63\x2d\x30\x2e\x31\x39\x35\x2c\
-\x30\x2e\x31\x39\x39\x2d\x30\x2e\x35\x31\x34\x2c\x30\x2e\x31\x39\
-\x38\x2d\x30\x2e\x37\x31\x2c\x30\x63\x2d\x30\x2e\x31\x39\x36\x2d\
-\x30\x2e\x31\x39\x37\x2d\x30\x2e\x31\x39\x36\x2d\x30\x2e\x35\x31\
-\x38\x2c\x30\x2d\x30\x2e\x37\x31\x37\x4c\x31\x31\x2c\x31\x30\x7a\
-\x20\x4d\x31\x30\x2c\x30\x2e\x34\x0d\x0a\x09\x63\x35\x2e\x33\x30\
-\x32\x2c\x30\x2c\x39\x2e\x36\x2c\x34\x2e\x32\x39\x38\x2c\x39\x2e\
-\x36\x2c\x39\x2e\x36\x63\x30\x2c\x35\x2e\x33\x30\x33\x2d\x34\x2e\
-\x32\x39\x38\x2c\x39\x2e\x36\x2d\x39\x2e\x36\x2c\x39\x2e\x36\x53\
-\x30\x2e\x34\x2c\x31\x35\x2e\x33\x30\x33\x2c\x30\x2e\x34\x2c\x31\
-\x30\x43\x30\x2e\x34\x2c\x34\x2e\x36\x39\x38\x2c\x34\x2e\x36\x39\
-\x38\x2c\x30\x2e\x34\x2c\x31\x30\x2c\x30\x2e\x34\x7a\x20\x4d\x31\
-\x30\x2c\x31\x38\x2e\x33\x35\x34\x0d\x0a\x09\x63\x34\x2e\x36\x31\
-\x33\x2c\x30\x2c\x38\x2e\x33\x35\x34\x2d\x33\x2e\x37\x34\x2c\x38\
-\x2e\x33\x35\x34\x2d\x38\x2e\x33\x35\x34\x63\x30\x2d\x34\x2e\x36\
-\x31\x34\x2d\x33\x2e\x37\x34\x31\x2d\x38\x2e\x33\x35\x34\x2d\x38\
-\x2e\x33\x35\x34\x2d\x38\x2e\x33\x35\x34\x63\x2d\x34\x2e\x36\x31\
-\x35\x2c\x30\x2d\x38\x2e\x33\x35\x34\x2c\x33\x2e\x37\x34\x2d\x38\
-\x2e\x33\x35\x34\x2c\x38\x2e\x33\x35\x34\x0d\x0a\x09\x43\x31\x2e\
-\x36\x34\x35\x2c\x31\x34\x2e\x36\x31\x34\x2c\x35\x2e\x33\x38\x35\
-\x2c\x31\x38\x2e\x33\x35\x34\x2c\x31\x30\x2c\x31\x38\x2e\x33\x35\
-\x34\x7a\x22\x2f\x3e\x0d\x0a\x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\x73\
-\x76\x67\x3e\x0d\x0a\
+\x3d\x22\x4c\x61\x79\x65\x72\x5f\x31\x22\x20\x78\x6d\x6c\x6e\x73\
+\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\
+\x6f\x72\x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x22\x20\x78\x6d\
+\x6c\x6e\x73\x3a\x78\x6c\x69\x6e\x6b\x3d\x22\x68\x74\x74\x70\x3a\
+\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\x39\x39\
+\x39\x2f\x78\x6c\x69\x6e\x6b\x22\x20\x78\x3d\x22\x30\x70\x78\x22\
+\x20\x79\x3d\x22\x30\x70\x78\x22\x0d\x0a\x09\x20\x77\x69\x64\x74\
+\x68\x3d\x22\x35\x31\x32\x70\x78\x22\x20\x68\x65\x69\x67\x68\x74\
+\x3d\x22\x35\x31\x32\x70\x78\x22\x20\x76\x69\x65\x77\x42\x6f\x78\
+\x3d\x22\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\x32\x22\x20\x65\
+\x6e\x61\x62\x6c\x65\x2d\x62\x61\x63\x6b\x67\x72\x6f\x75\x6e\x64\
+\x3d\x22\x6e\x65\x77\x20\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\
+\x32\x22\x20\x78\x6d\x6c\x3a\x73\x70\x61\x63\x65\x3d\x22\x70\x72\
+\x65\x73\x65\x72\x76\x65\x22\x3e\x0d\x0a\x3c\x67\x20\x69\x64\x3d\
+\x22\x49\x63\x6f\x6e\x5f\x38\x5f\x22\x3e\x0d\x0a\x09\x3c\x67\x3e\
+\x0d\x0a\x09\x09\x3c\x70\x61\x74\x68\x20\x64\x3d\x22\x4d\x34\x32\
+\x37\x2c\x32\x33\x34\x2e\x36\x32\x35\x48\x31\x36\x37\x2e\x32\x39\
+\x36\x6c\x31\x31\x39\x2e\x37\x30\x32\x2d\x31\x31\x39\x2e\x37\x30\
+\x32\x4c\x32\x35\x36\x2c\x38\x35\x4c\x38\x35\x2c\x32\x35\x36\x6c\
+\x31\x37\x31\x2c\x31\x37\x31\x6c\x32\x39\x2e\x39\x32\x32\x2d\x32\
+\x39\x2e\x39\x32\x34\x4c\x31\x36\x37\x2e\x32\x39\x36\x2c\x32\x37\
+\x37\x2e\x33\x37\x35\x48\x34\x32\x37\x56\x32\x33\x34\x2e\x36\x32\
+\x35\x7a\x22\x2f\x3e\x0d\x0a\x09\x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\
+\x67\x3e\x0d\x0a\x3c\x2f\x73\x76\x67\x3e\x0d\x0a\
+\x00\x00\x02\x7f\
+\x3c\
+\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\
+\x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x75\x74\x66\
+\x2d\x38\x22\x3f\x3e\x0d\x0a\x3c\x21\x2d\x2d\x20\x47\x65\x6e\x65\
+\x72\x61\x74\x6f\x72\x3a\x20\x41\x64\x6f\x62\x65\x20\x49\x6c\x6c\
+\x75\x73\x74\x72\x61\x74\x6f\x72\x20\x31\x36\x2e\x32\x2e\x31\x2c\
+\x20\x53\x56\x47\x20\x45\x78\x70\x6f\x72\x74\x20\x50\x6c\x75\x67\
+\x2d\x49\x6e\x20\x2e\x20\x53\x56\x47\x20\x56\x65\x72\x73\x69\x6f\
+\x6e\x3a\x20\x36\x2e\x30\x30\x20\x42\x75\x69\x6c\x64\x20\x30\x29\
+\x20\x20\x2d\x2d\x3e\x0d\x0a\x3c\x21\x44\x4f\x43\x54\x59\x50\x45\
+\x20\x73\x76\x67\x20\x50\x55\x42\x4c\x49\x43\x20\x22\x2d\x2f\x2f\
+\x57\x33\x43\x2f\x2f\x44\x54\x44\x20\x53\x56\x47\x20\x31\x2e\x31\
+\x2f\x2f\x45\x4e\x22\x20\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\
+\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x47\x72\x61\x70\x68\x69\x63\
+\x73\x2f\x53\x56\x47\x2f\x31\x2e\x31\x2f\x44\x54\x44\x2f\x73\x76\
+\x67\x31\x31\x2e\x64\x74\x64\x22\x3e\x0d\x0a\x3c\x73\x76\x67\x20\
+\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\x31\x22\x20\x69\x64\
+\x3d\x22\x4c\x61\x79\x65\x72\x5f\x31\x22\x20\x78\x6d\x6c\x6e\x73\
+\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\
+\x6f\x72\x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x22\x20\x78\x6d\
+\x6c\x6e\x73\x3a\x78\x6c\x69\x6e\x6b\x3d\x22\x68\x74\x74\x70\x3a\
+\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\x39\x39\
+\x39\x2f\x78\x6c\x69\x6e\x6b\x22\x20\x78\x3d\x22\x30\x70\x78\x22\
+\x20\x79\x3d\x22\x30\x70\x78\x22\x0d\x0a\x09\x20\x77\x69\x64\x74\
+\x68\x3d\x22\x35\x31\x32\x70\x78\x22\x20\x68\x65\x69\x67\x68\x74\
+\x3d\x22\x35\x31\x32\x70\x78\x22\x20\x76\x69\x65\x77\x42\x6f\x78\
+\x3d\x22\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\x32\x22\x20\x73\
+\x74\x79\x6c\x65\x3d\x22\x65\x6e\x61\x62\x6c\x65\x2d\x62\x61\x63\
+\x6b\x67\x72\x6f\x75\x6e\x64\x3a\x6e\x65\x77\x20\x30\x20\x30\x20\
+\x35\x31\x32\x20\x35\x31\x32\x3b\x22\x20\x78\x6d\x6c\x3a\x73\x70\
+\x61\x63\x65\x3d\x22\x70\x72\x65\x73\x65\x72\x76\x65\x22\x3e\x0d\
+\x0a\x3c\x70\x6f\x6c\x79\x67\x6f\x6e\x20\x70\x6f\x69\x6e\x74\x73\
+\x3d\x22\x32\x38\x38\x2c\x39\x36\x20\x33\x33\x37\x2e\x39\x2c\x31\
+\x34\x35\x2e\x39\x20\x32\x37\x34\x2c\x32\x30\x39\x2e\x37\x20\x32\
+\x37\x34\x2c\x32\x30\x39\x2e\x37\x20\x31\x34\x35\x2e\x39\x2c\x33\
+\x33\x37\x2e\x39\x20\x39\x36\x2c\x32\x38\x38\x20\x39\x36\x2c\x34\
+\x31\x36\x20\x32\x32\x34\x2c\x34\x31\x36\x20\x31\x37\x34\x2e\x31\
+\x2c\x33\x36\x36\x2e\x31\x20\x33\x35\x37\x2e\x34\x2c\x31\x38\x32\
+\x2e\x39\x20\x33\x36\x36\x2e\x31\x2c\x31\x37\x34\x2e\x31\x20\x0d\
+\x0a\x09\x34\x31\x36\x2c\x32\x32\x34\x20\x34\x31\x36\x2c\x39\x36\
+\x20\x22\x2f\x3e\x0d\x0a\x3c\x2f\x73\x76\x67\x3e\x0d\x0a\
+\x00\x00\x07\x80\
+\x3c\
+\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\
+\x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x75\x74\x66\
+\x2d\x38\x22\x3f\x3e\x0d\x0a\x3c\x21\x2d\x2d\x20\x47\x65\x6e\x65\
+\x72\x61\x74\x6f\x72\x3a\x20\x41\x64\x6f\x62\x65\x20\x49\x6c\x6c\
+\x75\x73\x74\x72\x61\x74\x6f\x72\x20\x31\x36\x2e\x32\x2e\x31\x2c\
+\x20\x53\x56\x47\x20\x45\x78\x70\x6f\x72\x74\x20\x50\x6c\x75\x67\
+\x2d\x49\x6e\x20\x2e\x20\x53\x56\x47\x20\x56\x65\x72\x73\x69\x6f\
+\x6e\x3a\x20\x36\x2e\x30\x30\x20\x42\x75\x69\x6c\x64\x20\x30\x29\
+\x20\x20\x2d\x2d\x3e\x0d\x0a\x3c\x21\x44\x4f\x43\x54\x59\x50\x45\
+\x20\x73\x76\x67\x20\x50\x55\x42\x4c\x49\x43\x20\x22\x2d\x2f\x2f\
+\x57\x33\x43\x2f\x2f\x44\x54\x44\x20\x53\x56\x47\x20\x31\x2e\x31\
+\x2f\x2f\x45\x4e\x22\x20\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\
+\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x47\x72\x61\x70\x68\x69\x63\
+\x73\x2f\x53\x56\x47\x2f\x31\x2e\x31\x2f\x44\x54\x44\x2f\x73\x76\
+\x67\x31\x31\x2e\x64\x74\x64\x22\x3e\x0d\x0a\x3c\x73\x76\x67\x20\
+\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\x31\x22\x20\x69\x64\
+\x3d\x22\x4c\x61\x79\x65\x72\x5f\x31\x22\x20\x78\x6d\x6c\x6e\x73\
+\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\
+\x6f\x72\x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x22\x20\x78\x6d\
+\x6c\x6e\x73\x3a\x78\x6c\x69\x6e\x6b\x3d\x22\x68\x74\x74\x70\x3a\
+\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\x39\x39\
+\x39\x2f\x78\x6c\x69\x6e\x6b\x22\x20\x78\x3d\x22\x30\x70\x78\x22\
+\x20\x79\x3d\x22\x30\x70\x78\x22\x0d\x0a\x09\x20\x77\x69\x64\x74\
+\x68\x3d\x22\x35\x31\x32\x70\x78\x22\x20\x68\x65\x69\x67\x68\x74\
+\x3d\x22\x35\x31\x32\x70\x78\x22\x20\x76\x69\x65\x77\x42\x6f\x78\
+\x3d\x22\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\x32\x22\x20\x65\
+\x6e\x61\x62\x6c\x65\x2d\x62\x61\x63\x6b\x67\x72\x6f\x75\x6e\x64\
+\x3d\x22\x6e\x65\x77\x20\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\
+\x32\x22\x20\x78\x6d\x6c\x3a\x73\x70\x61\x63\x65\x3d\x22\x70\x72\
+\x65\x73\x65\x72\x76\x65\x22\x3e\x0d\x0a\x3c\x67\x3e\x0d\x0a\x09\
+\x3c\x70\x61\x74\x68\x20\x64\x3d\x22\x4d\x31\x39\x33\x2e\x34\x36\
+\x2c\x32\x34\x39\x2e\x30\x35\x36\x63\x33\x2e\x37\x32\x33\x2d\x30\
+\x2e\x36\x37\x2c\x37\x2e\x35\x38\x39\x2d\x31\x2e\x30\x34\x31\x2c\
+\x31\x31\x2e\x35\x38\x36\x2d\x31\x2e\x30\x34\x31\x4c\x32\x30\x31\
+\x2e\x39\x32\x34\x2c\x32\x34\x38\x68\x31\x30\x33\x2e\x38\x32\x33\
+\x63\x34\x2e\x35\x30\x33\x2c\x30\x2c\x38\x2e\x38\x30\x36\x2d\x30\
+\x2e\x36\x31\x37\x2c\x31\x32\x2e\x39\x30\x38\x2d\x31\x2e\x37\x35\
+\x34\x0d\x0a\x09\x09\x63\x31\x39\x2e\x33\x37\x2d\x35\x2e\x33\x36\
+\x33\x2c\x33\x33\x2e\x33\x34\x35\x2d\x32\x32\x2e\x35\x33\x37\x2c\
+\x33\x33\x2e\x33\x34\x35\x2d\x34\x33\x2e\x36\x36\x33\x76\x2d\x33\
+\x30\x2e\x38\x32\x32\x76\x2d\x35\x36\x2e\x34\x30\x32\x63\x30\x2d\
+\x32\x34\x2e\x38\x33\x32\x2d\x32\x31\x2e\x31\x35\x2d\x34\x33\x2e\
+\x34\x38\x34\x2d\x34\x36\x2e\x32\x38\x39\x2d\x34\x37\x2e\x36\x30\
+\x36\x0d\x0a\x09\x09\x63\x2d\x31\x35\x2e\x39\x33\x31\x2d\x32\x2e\
+\x36\x32\x34\x2d\x33\x39\x2e\x32\x35\x38\x2d\x33\x2e\x38\x32\x37\
+\x2d\x35\x35\x2e\x30\x38\x39\x2d\x33\x2e\x37\x34\x39\x63\x2d\x31\
+\x35\x2e\x38\x32\x39\x2c\x30\x2e\x30\x38\x36\x2d\x33\x30\x2e\x39\
+\x38\x31\x2c\x31\x2e\x34\x30\x34\x2d\x34\x34\x2e\x32\x37\x37\x2c\
+\x33\x2e\x37\x34\x39\x43\x31\x36\x37\x2e\x31\x34\x33\x2c\x37\x34\
+\x2e\x35\x37\x36\x2c\x31\x36\x30\x2c\x38\x38\x2e\x39\x32\x38\x2c\
+\x31\x36\x30\x2c\x31\x31\x35\x2e\x33\x35\x39\x56\x31\x34\x34\x68\
+\x39\x36\x0d\x0a\x09\x09\x76\x31\x36\x48\x31\x32\x38\x2e\x38\x32\
+\x63\x2d\x33\x35\x2e\x36\x32\x38\x2c\x30\x2d\x36\x34\x2e\x35\x33\
+\x38\x2c\x34\x32\x2e\x35\x37\x31\x2d\x36\x34\x2e\x38\x31\x33\x2c\
+\x39\x35\x2e\x32\x34\x32\x43\x36\x34\x2e\x30\x30\x35\x2c\x32\x35\
+\x35\x2e\x34\x39\x35\x2c\x36\x34\x2c\x32\x35\x35\x2e\x37\x34\x37\
+\x2c\x36\x34\x2c\x32\x35\x36\x63\x30\x2c\x39\x2e\x35\x32\x33\x2c\
+\x30\x2e\x39\x34\x2c\x31\x38\x2e\x37\x32\x2c\x32\x2e\x36\x38\x35\
+\x2c\x32\x37\x2e\x34\x30\x34\x0d\x0a\x09\x09\x43\x37\x34\x2e\x36\
+\x34\x38\x2c\x33\x32\x33\x2e\x30\x37\x2c\x39\x39\x2e\x34\x35\x31\
+\x2c\x33\x35\x32\x2c\x31\x32\x38\x2e\x38\x32\x2c\x33\x35\x32\x48\
+\x31\x34\x34\x76\x2d\x32\x2e\x36\x36\x32\x76\x2d\x34\x33\x2e\x32\
+\x37\x33\x43\x31\x34\x34\x2c\x32\x37\x39\x2e\x32\x33\x38\x2c\x31\
+\x36\x34\x2e\x31\x34\x36\x2c\x32\x35\x34\x2e\x33\x33\x32\x2c\x31\
+\x39\x33\x2e\x34\x36\x2c\x32\x34\x39\x2e\x30\x35\x36\x7a\x20\x4d\
+\x32\x30\x33\x2e\x36\x35\x36\x2c\x31\x32\x37\x2e\x30\x30\x32\x0d\
+\x0a\x09\x09\x63\x2d\x39\x2e\x35\x39\x32\x2c\x30\x2d\x31\x37\x2e\
+\x33\x38\x34\x2d\x37\x2e\x37\x38\x35\x2d\x31\x37\x2e\x33\x38\x34\
+\x2d\x31\x37\x2e\x34\x30\x33\x63\x30\x2d\x39\x2e\x36\x36\x34\x2c\
+\x37\x2e\x37\x37\x34\x2d\x31\x37\x2e\x35\x32\x2c\x31\x37\x2e\x33\
+\x38\x34\x2d\x31\x37\x2e\x35\x32\x63\x39\x2e\x35\x37\x34\x2c\x30\
+\x2c\x31\x37\x2e\x33\x39\x39\x2c\x37\x2e\x38\x35\x35\x2c\x31\x37\
+\x2e\x33\x39\x39\x2c\x31\x37\x2e\x35\x32\x0d\x0a\x09\x09\x43\x32\
+\x32\x31\x2e\x30\x35\x36\x2c\x31\x31\x39\x2e\x32\x31\x37\x2c\x32\
+\x31\x33\x2e\x32\x34\x36\x2c\x31\x32\x37\x2e\x30\x30\x32\x2c\x32\
+\x30\x33\x2e\x36\x35\x36\x2c\x31\x32\x37\x2e\x30\x30\x32\x7a\x22\
+\x2f\x3e\x0d\x0a\x09\x3c\x70\x61\x74\x68\x20\x64\x3d\x22\x4d\x34\
+\x34\x33\x2e\x39\x35\x31\x2c\x32\x32\x32\x2e\x35\x34\x33\x43\x34\
+\x33\x34\x2e\x37\x38\x2c\x31\x38\x36\x2e\x30\x32\x31\x2c\x34\x31\
+\x31\x2e\x30\x33\x33\x2c\x31\x36\x30\x2c\x33\x38\x33\x2e\x31\x38\
+\x2c\x31\x36\x30\x48\x33\x36\x38\x76\x32\x2e\x36\x32\x36\x76\x33\
+\x38\x2e\x30\x34\x36\x63\x30\x2c\x33\x33\x2e\x39\x31\x35\x2d\x32\
+\x32\x2e\x32\x38\x36\x2c\x35\x38\x2e\x34\x37\x34\x2d\x34\x39\x2e\
+\x34\x38\x39\x2c\x36\x32\x2e\x36\x38\x31\x0d\x0a\x09\x09\x63\x2d\
+\x32\x2e\x37\x33\x37\x2c\x30\x2e\x34\x32\x34\x2d\x35\x2e\x34\x38\
+\x33\x2c\x30\x2e\x36\x34\x36\x2d\x38\x2e\x33\x30\x31\x2c\x30\x2e\
+\x36\x34\x36\x48\x32\x30\x36\x2e\x33\x35\x31\x63\x2d\x34\x2e\x35\
+\x31\x38\x2c\x30\x2d\x38\x2e\x39\x30\x34\x2c\x30\x2e\x35\x38\x34\
+\x2d\x31\x33\x2e\x30\x34\x39\x2c\x31\x2e\x36\x37\x32\x43\x31\x37\
+\x34\x2e\x31\x38\x2c\x32\x37\x30\x2e\x36\x38\x39\x2c\x31\x36\x30\
+\x2c\x32\x38\x36\x2e\x36\x2c\x31\x36\x30\x2c\x33\x30\x37\x2e\x32\
+\x33\x36\x76\x33\x32\x2e\x39\x32\x32\x0d\x0a\x09\x09\x76\x35\x34\
+\x2e\x33\x30\x35\x63\x30\x2c\x32\x34\x2e\x38\x33\x32\x2c\x32\x34\
+\x2e\x39\x37\x37\x2c\x33\x39\x2e\x34\x32\x36\x2c\x34\x39\x2e\x34\
+\x38\x31\x2c\x34\x36\x2e\x35\x35\x31\x63\x32\x39\x2e\x33\x32\x37\
+\x2c\x38\x2e\x35\x33\x31\x2c\x36\x31\x2e\x32\x36\x37\x2c\x31\x30\
+\x2e\x30\x36\x38\x2c\x39\x36\x2e\x33\x36\x36\x2c\x30\x43\x33\x32\
+\x39\x2e\x31\x35\x2c\x34\x33\x34\x2e\x33\x35\x34\x2c\x33\x35\x32\
+\x2c\x34\x32\x30\x2e\x38\x39\x33\x2c\x33\x35\x32\x2c\x33\x39\x34\
+\x2e\x34\x36\x33\x56\x33\x36\x38\x0d\x0a\x09\x09\x68\x2d\x39\x36\
+\x76\x2d\x31\x36\x68\x31\x32\x37\x2e\x31\x38\x63\x32\x35\x2e\x32\
+\x34\x2c\x30\x2c\x34\x37\x2e\x31\x30\x37\x2d\x32\x31\x2e\x33\x36\
+\x35\x2c\x35\x37\x2e\x38\x31\x34\x2d\x35\x32\x2e\x35\x34\x39\x43\
+\x34\x34\x35\x2e\x34\x37\x34\x2c\x32\x38\x36\x2e\x34\x30\x34\x2c\
+\x34\x34\x38\x2c\x32\x37\x31\x2e\x36\x34\x31\x2c\x34\x34\x38\x2c\
+\x32\x35\x36\x0d\x0a\x09\x09\x43\x34\x34\x38\x2c\x32\x34\x34\x2e\
+\x32\x33\x32\x2c\x34\x34\x36\x2e\x35\x36\x37\x2c\x32\x33\x32\x2e\
+\x39\x36\x32\x2c\x34\x34\x33\x2e\x39\x35\x31\x2c\x32\x32\x32\x2e\
+\x35\x34\x33\x7a\x20\x4d\x33\x30\x37\x2e\x38\x36\x37\x2c\x33\x38\
+\x32\x2e\x38\x32\x63\x39\x2e\x35\x39\x2c\x30\x2c\x31\x37\x2e\x33\
+\x38\x31\x2c\x37\x2e\x37\x38\x35\x2c\x31\x37\x2e\x33\x38\x31\x2c\
+\x31\x37\x2e\x34\x0d\x0a\x09\x09\x63\x30\x2c\x39\x2e\x36\x35\x2d\
+\x37\x2e\x37\x39\x31\x2c\x31\x37\x2e\x35\x32\x31\x2d\x31\x37\x2e\
+\x33\x38\x31\x2c\x31\x37\x2e\x35\x32\x31\x63\x2d\x39\x2e\x35\x37\
+\x37\x2c\x30\x2d\x31\x37\x2e\x33\x39\x39\x2d\x37\x2e\x38\x37\x31\
+\x2d\x31\x37\x2e\x33\x39\x39\x2d\x31\x37\x2e\x35\x32\x31\x43\x32\
+\x39\x30\x2e\x34\x36\x38\x2c\x33\x39\x30\x2e\x35\x39\x2c\x32\x39\
+\x38\x2e\x32\x37\x34\x2c\x33\x38\x32\x2e\x38\x32\x2c\x33\x30\x37\
+\x2e\x38\x36\x37\x2c\x33\x38\x32\x2e\x38\x32\x7a\x22\x2f\x3e\x0d\
+\x0a\x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\x73\x76\x67\x3e\x0d\x0a\
+\x00\x00\x03\xc4\
+\x3c\
+\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\
+\x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x75\x74\x66\
+\x2d\x38\x22\x3f\x3e\x0d\x0a\x3c\x21\x2d\x2d\x20\x47\x65\x6e\x65\
+\x72\x61\x74\x6f\x72\x3a\x20\x41\x64\x6f\x62\x65\x20\x49\x6c\x6c\
+\x75\x73\x74\x72\x61\x74\x6f\x72\x20\x31\x38\x2e\x31\x2e\x30\x2c\
+\x20\x53\x56\x47\x20\x45\x78\x70\x6f\x72\x74\x20\x50\x6c\x75\x67\
+\x2d\x49\x6e\x20\x2e\x20\x53\x56\x47\x20\x56\x65\x72\x73\x69\x6f\
+\x6e\x3a\x20\x36\x2e\x30\x30\x20\x42\x75\x69\x6c\x64\x20\x30\x29\
+\x20\x20\x2d\x2d\x3e\x0d\x0a\x3c\x21\x44\x4f\x43\x54\x59\x50\x45\
+\x20\x73\x76\x67\x20\x50\x55\x42\x4c\x49\x43\x20\x22\x2d\x2f\x2f\
+\x57\x33\x43\x2f\x2f\x44\x54\x44\x20\x53\x56\x47\x20\x31\x2e\x31\
+\x2f\x2f\x45\x4e\x22\x20\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\
+\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x47\x72\x61\x70\x68\x69\x63\
+\x73\x2f\x53\x56\x47\x2f\x31\x2e\x31\x2f\x44\x54\x44\x2f\x73\x76\
+\x67\x31\x31\x2e\x64\x74\x64\x22\x3e\x0d\x0a\x3c\x73\x76\x67\x20\
+\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\x31\x22\x20\x69\x64\
+\x3d\x22\x4d\x61\x67\x6e\x69\x66\x79\x69\x6e\x67\x5f\x67\x6c\x61\
+\x73\x73\x22\x20\x78\x6d\x6c\x6e\x73\x3d\x22\x68\x74\x74\x70\x3a\
+\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x32\x30\x30\
+\x30\x2f\x73\x76\x67\x22\x20\x78\x6d\x6c\x6e\x73\x3a\x78\x6c\x69\
+\x6e\x6b\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\
+\x33\x2e\x6f\x72\x67\x2f\x31\x39\x39\x39\x2f\x78\x6c\x69\x6e\x6b\
+\x22\x20\x78\x3d\x22\x30\x70\x78\x22\x0d\x0a\x09\x20\x79\x3d\x22\
+\x30\x70\x78\x22\x20\x76\x69\x65\x77\x42\x6f\x78\x3d\x22\x30\x20\
+\x30\x20\x35\x31\x32\x20\x35\x31\x32\x22\x20\x65\x6e\x61\x62\x6c\
+\x65\x2d\x62\x61\x63\x6b\x67\x72\x6f\x75\x6e\x64\x3d\x22\x6e\x65\
+\x77\x20\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\x32\x22\x20\x78\
+\x6d\x6c\x3a\x73\x70\x61\x63\x65\x3d\x22\x70\x72\x65\x73\x65\x72\
+\x76\x65\x22\x3e\x0d\x0a\x3c\x67\x20\x74\x72\x61\x6e\x73\x66\x6f\
+\x72\x6d\x3d\x27\x6d\x61\x74\x72\x69\x78\x28\x32\x34\x20\x30\x20\
+\x30\x20\x32\x34\x20\x30\x20\x30\x29\x27\x3e\x0d\x0a\x3c\x70\x61\
+\x74\x68\x20\x64\x3d\x22\x4d\x31\x37\x2e\x35\x34\x35\x2c\x31\x35\
+\x2e\x34\x36\x37\x6c\x2d\x33\x2e\x37\x37\x39\x2d\x33\x2e\x37\x37\
+\x39\x63\x30\x2e\x35\x37\x2d\x30\x2e\x39\x33\x35\x2c\x30\x2e\x38\
+\x39\x38\x2d\x32\x2e\x30\x33\x35\x2c\x30\x2e\x38\x39\x38\x2d\x33\
+\x2e\x32\x31\x63\x30\x2d\x33\x2e\x34\x31\x37\x2d\x32\x2e\x39\x36\
+\x31\x2d\x36\x2e\x33\x37\x37\x2d\x36\x2e\x33\x37\x38\x2d\x36\x2e\
+\x33\x37\x37\x0d\x0a\x09\x43\x34\x2e\x38\x36\x39\x2c\x32\x2e\x31\
+\x2c\x32\x2e\x31\x2c\x34\x2e\x38\x37\x2c\x32\x2e\x31\x2c\x38\x2e\
+\x32\x38\x37\x63\x30\x2c\x33\x2e\x34\x31\x36\x2c\x32\x2e\x39\x36\
+\x31\x2c\x36\x2e\x33\x37\x37\x2c\x36\x2e\x33\x37\x37\x2c\x36\x2e\
+\x33\x37\x37\x63\x31\x2e\x31\x33\x37\x2c\x30\x2c\x32\x2e\x32\x2d\
+\x30\x2e\x33\x30\x39\x2c\x33\x2e\x31\x31\x35\x2d\x30\x2e\x38\x34\
+\x34\x6c\x33\x2e\x37\x39\x39\x2c\x33\x2e\x38\x30\x31\x0d\x0a\x09\
+\x63\x30\x2e\x33\x37\x32\x2c\x30\x2e\x33\x37\x31\x2c\x30\x2e\x39\
+\x37\x35\x2c\x30\x2e\x33\x37\x31\x2c\x31\x2e\x33\x34\x36\x2c\x30\
+\x6c\x30\x2e\x39\x34\x33\x2d\x30\x2e\x39\x34\x33\x43\x31\x38\x2e\
+\x30\x35\x31\x2c\x31\x36\x2e\x33\x30\x37\x2c\x31\x37\x2e\x39\x31\
+\x36\x2c\x31\x35\x2e\x38\x33\x38\x2c\x31\x37\x2e\x35\x34\x35\x2c\
+\x31\x35\x2e\x34\x36\x37\x7a\x20\x4d\x34\x2e\x30\x30\x34\x2c\x38\
+\x2e\x32\x38\x37\x0d\x0a\x09\x63\x30\x2d\x32\x2e\x33\x36\x36\x2c\
+\x31\x2e\x39\x31\x37\x2d\x34\x2e\x32\x38\x33\x2c\x34\x2e\x32\x38\
+\x32\x2d\x34\x2e\x32\x38\x33\x63\x32\x2e\x33\x36\x36\x2c\x30\x2c\
+\x34\x2e\x34\x37\x34\x2c\x32\x2e\x31\x30\x37\x2c\x34\x2e\x34\x37\
+\x34\x2c\x34\x2e\x34\x37\x34\x63\x30\x2c\x32\x2e\x33\x36\x35\x2d\
+\x31\x2e\x39\x31\x38\x2c\x34\x2e\x32\x38\x33\x2d\x34\x2e\x32\x38\
+\x33\x2c\x34\x2e\x32\x38\x33\x0d\x0a\x09\x43\x36\x2e\x31\x31\x31\
+\x2c\x31\x32\x2e\x37\x36\x2c\x34\x2e\x30\x30\x34\x2c\x31\x30\x2e\
+\x36\x35\x32\x2c\x34\x2e\x30\x30\x34\x2c\x38\x2e\x32\x38\x37\x7a\
+\x22\x2f\x3e\x0d\x0a\x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\x73\x76\x67\
+\x3e\x0d\x0a\
+\x00\x00\x04\xaa\
+\x3c\
+\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\
+\x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x75\x74\x66\
+\x2d\x38\x22\x3f\x3e\x0d\x0a\x3c\x21\x2d\x2d\x20\x47\x65\x6e\x65\
+\x72\x61\x74\x6f\x72\x3a\x20\x41\x64\x6f\x62\x65\x20\x49\x6c\x6c\
+\x75\x73\x74\x72\x61\x74\x6f\x72\x20\x31\x38\x2e\x31\x2e\x30\x2c\
+\x20\x53\x56\x47\x20\x45\x78\x70\x6f\x72\x74\x20\x50\x6c\x75\x67\
+\x2d\x49\x6e\x20\x2e\x20\x53\x56\x47\x20\x56\x65\x72\x73\x69\x6f\
+\x6e\x3a\x20\x36\x2e\x30\x30\x20\x42\x75\x69\x6c\x64\x20\x30\x29\
+\x20\x20\x2d\x2d\x3e\x0d\x0a\x3c\x21\x44\x4f\x43\x54\x59\x50\x45\
+\x20\x73\x76\x67\x20\x50\x55\x42\x4c\x49\x43\x20\x22\x2d\x2f\x2f\
+\x57\x33\x43\x2f\x2f\x44\x54\x44\x20\x53\x56\x47\x20\x31\x2e\x31\
+\x2f\x2f\x45\x4e\x22\x20\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\
+\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x47\x72\x61\x70\x68\x69\x63\
+\x73\x2f\x53\x56\x47\x2f\x31\x2e\x31\x2f\x44\x54\x44\x2f\x73\x76\
+\x67\x31\x31\x2e\x64\x74\x64\x22\x3e\x0d\x0a\x3c\x73\x76\x67\x20\
+\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\x31\x22\x20\x69\x64\
+\x3d\x22\x43\x6f\x64\x65\x22\x20\x78\x6d\x6c\x6e\x73\x3d\x22\x68\
+\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\
+\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x22\x20\x78\x6d\x6c\x6e\x73\
+\x3a\x78\x6c\x69\x6e\x6b\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\
+\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\x39\x39\x39\x2f\x78\
+\x6c\x69\x6e\x6b\x22\x20\x78\x3d\x22\x32\x34\x70\x78\x22\x20\x79\
+\x3d\x22\x32\x34\x70\x78\x22\x0d\x0a\x09\x20\x76\x69\x65\x77\x42\
+\x6f\x78\x3d\x22\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\x32\x22\
+\x20\x65\x6e\x61\x62\x6c\x65\x2d\x62\x61\x63\x6b\x67\x72\x6f\x75\
+\x6e\x64\x3d\x22\x6e\x65\x77\x20\x30\x20\x30\x20\x35\x31\x32\x20\
+\x35\x31\x32\x22\x20\x78\x6d\x6c\x3a\x73\x70\x61\x63\x65\x3d\x22\
+\x70\x72\x65\x73\x65\x72\x76\x65\x22\x3e\x0d\x0a\x3c\x67\x20\x74\
+\x72\x61\x6e\x73\x66\x6f\x72\x6d\x3d\x27\x6d\x61\x74\x72\x69\x78\
+\x28\x32\x34\x20\x30\x20\x30\x20\x32\x34\x20\x30\x20\x30\x29\x27\
+\x3e\x3c\x70\x61\x74\x68\x20\x64\x3d\x22\x4d\x35\x2e\x37\x31\x39\
+\x2c\x31\x34\x2e\x37\x35\x63\x2d\x30\x2e\x32\x33\x36\x2c\x30\x2d\
+\x30\x2e\x34\x37\x34\x2d\x30\x2e\x30\x38\x33\x2d\x30\x2e\x36\x36\
+\x34\x2d\x30\x2e\x32\x35\x32\x4c\x2d\x30\x2e\x30\x30\x35\x2c\x31\
+\x30\x6c\x35\x2e\x33\x34\x31\x2d\x34\x2e\x37\x34\x38\x43\x35\x2e\
+\x37\x34\x38\x2c\x34\x2e\x38\x38\x37\x2c\x36\x2e\x33\x38\x2c\x34\
+\x2e\x39\x32\x32\x2c\x36\x2e\x37\x34\x37\x2c\x35\x2e\x33\x33\x35\
+\x0d\x0a\x09\x63\x30\x2e\x33\x36\x37\x2c\x30\x2e\x34\x31\x33\x2c\
+\x30\x2e\x33\x33\x2c\x31\x2e\x30\x34\x35\x2d\x30\x2e\x30\x38\x33\
+\x2c\x31\x2e\x34\x31\x32\x4c\x33\x2e\x30\x30\x35\x2c\x31\x30\x6c\
+\x33\x2e\x33\x37\x38\x2c\x33\x2e\x30\x30\x32\x63\x30\x2e\x34\x31\
+\x33\x2c\x30\x2e\x33\x36\x37\x2c\x30\x2e\x34\x35\x2c\x30\x2e\x39\
+\x39\x39\x2c\x30\x2e\x30\x38\x33\x2c\x31\x2e\x34\x31\x32\x0d\x0a\
+\x09\x43\x36\x2e\x32\x36\x39\x2c\x31\x34\x2e\x36\x33\x37\x2c\x35\
+\x2e\x39\x39\x34\x2c\x31\x34\x2e\x37\x35\x2c\x35\x2e\x37\x31\x39\
+\x2c\x31\x34\x2e\x37\x35\x7a\x20\x4d\x31\x34\x2e\x36\x36\x34\x2c\
+\x31\x34\x2e\x37\x34\x38\x4c\x32\x30\x2e\x30\x30\x35\x2c\x31\x30\
+\x6c\x2d\x35\x2e\x30\x36\x2d\x34\x2e\x34\x39\x38\x63\x2d\x30\x2e\
+\x34\x31\x33\x2d\x30\x2e\x33\x36\x37\x2d\x31\x2e\x30\x34\x35\x2d\
+\x30\x2e\x33\x33\x2d\x31\x2e\x34\x31\x31\x2c\x30\x2e\x30\x38\x33\
+\x0d\x0a\x09\x63\x2d\x30\x2e\x33\x36\x37\x2c\x30\x2e\x34\x31\x33\
+\x2d\x30\x2e\x33\x33\x2c\x31\x2e\x30\x34\x35\x2c\x30\x2e\x30\x38\
+\x33\x2c\x31\x2e\x34\x31\x32\x4c\x31\x36\x2e\x39\x39\x35\x2c\x31\
+\x30\x6c\x2d\x33\x2e\x36\x35\x39\x2c\x33\x2e\x32\x35\x32\x63\x2d\
+\x30\x2e\x34\x31\x33\x2c\x30\x2e\x33\x36\x37\x2d\x30\x2e\x34\x35\
+\x2c\x30\x2e\x39\x39\x39\x2d\x30\x2e\x30\x38\x33\x2c\x31\x2e\x34\
+\x31\x32\x43\x31\x33\x2e\x34\x35\x2c\x31\x34\x2e\x38\x38\x37\x2c\
+\x31\x33\x2e\x37\x32\x35\x2c\x31\x35\x2c\x31\x34\x2c\x31\x35\x0d\
+\x0a\x09\x43\x31\x34\x2e\x32\x33\x36\x2c\x31\x35\x2c\x31\x34\x2e\
+\x34\x37\x34\x2c\x31\x34\x2e\x39\x31\x37\x2c\x31\x34\x2e\x36\x36\
+\x34\x2c\x31\x34\x2e\x37\x34\x38\x7a\x20\x4d\x39\x2e\x39\x38\x36\
+\x2c\x31\x36\x2e\x31\x36\x35\x6c\x32\x2d\x31\x32\x63\x30\x2e\x30\
+\x39\x31\x2d\x30\x2e\x35\x34\x35\x2d\x30\x2e\x32\x37\x37\x2d\x31\
+\x2e\x30\x36\x2d\x30\x2e\x38\x32\x32\x2d\x31\x2e\x31\x35\x31\x0d\
+\x0a\x09\x63\x2d\x30\x2e\x35\x34\x37\x2d\x30\x2e\x30\x39\x32\x2d\
+\x31\x2e\x30\x36\x31\x2c\x30\x2e\x32\x37\x37\x2d\x31\x2e\x31\x35\
+\x2c\x30\x2e\x38\x32\x32\x6c\x2d\x32\x2c\x31\x32\x63\x2d\x30\x2e\
+\x30\x39\x31\x2c\x30\x2e\x35\x34\x35\x2c\x30\x2e\x32\x37\x37\x2c\
+\x31\x2e\x30\x36\x2c\x30\x2e\x38\x32\x32\x2c\x31\x2e\x31\x35\x31\
+\x43\x38\x2e\x38\x39\x32\x2c\x31\x36\x2e\x39\x39\x36\x2c\x38\x2e\
+\x39\x34\x36\x2c\x31\x37\x2c\x39\x2e\x30\x30\x31\x2c\x31\x37\x0d\
+\x0a\x09\x43\x39\x2e\x34\x38\x31\x2c\x31\x37\x2c\x39\x2e\x39\x30\
+\x35\x2c\x31\x36\x2e\x36\x35\x33\x2c\x39\x2e\x39\x38\x36\x2c\x31\
+\x36\x2e\x31\x36\x35\x7a\x22\x2f\x3e\x0d\x0a\x3c\x2f\x67\x3e\x0d\
+\x0a\x3c\x2f\x73\x76\x67\x3e\x0d\x0a\
\x00\x00\x02\xf2\
\x3c\
\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\
@@ -124,32 +405,7 @@ qt_resource_data = b"\
\x35\x39\x39\x2c\x31\x30\x2c\x31\x37\x2e\x35\x39\x39\x7a\x22\x2f\
\x3e\x0d\x0a\x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\x73\x76\x67\x3e\x0d\
\x0a\
-\x00\x00\x01\x69\
-\x3c\
-\x73\x76\x67\x20\x78\x6d\x6c\x6e\x73\x3d\x22\x68\x74\x74\x70\x3a\
-\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x32\x30\x30\
-\x30\x2f\x73\x76\x67\x22\x20\x77\x69\x64\x74\x68\x3d\x22\x35\x31\
-\x32\x70\x78\x22\x20\x68\x65\x69\x67\x68\x74\x3d\x22\x35\x31\x32\
-\x70\x78\x22\x20\x76\x69\x65\x77\x42\x6f\x78\x3d\x22\x30\x20\x30\
-\x20\x35\x31\x32\x20\x35\x31\x32\x22\x3e\x3c\x67\x20\x74\x72\x61\
-\x6e\x73\x66\x6f\x72\x6d\x3d\x27\x6d\x61\x74\x72\x69\x78\x28\x32\
-\x34\x20\x30\x20\x30\x20\x32\x34\x20\x30\x20\x30\x29\x27\x3e\x3c\
-\x70\x61\x74\x68\x20\x64\x3d\x22\x4d\x34\x2e\x33\x34\x20\x31\x35\
-\x2e\x36\x36\x41\x37\x2e\x39\x37\x20\x37\x2e\x39\x37\x20\x30\x20\
-\x30\x20\x30\x20\x39\x20\x31\x37\x2e\x39\x34\x56\x31\x30\x48\x35\
-\x56\x38\x68\x34\x56\x35\x2e\x38\x33\x61\x33\x20\x33\x20\x30\x20\
-\x31\x20\x31\x20\x32\x20\x30\x56\x38\x68\x34\x76\x32\x68\x2d\x34\
-\x76\x37\x2e\x39\x34\x61\x37\x2e\x39\x37\x20\x37\x2e\x39\x37\x20\
-\x30\x20\x30\x20\x30\x20\x34\x2e\x36\x36\x2d\x32\x2e\x32\x38\x6c\
-\x2d\x31\x2e\x34\x32\x2d\x31\x2e\x34\x32\x68\x35\x2e\x36\x36\x6c\
-\x2d\x32\x2e\x38\x33\x20\x32\x2e\x38\x33\x61\x31\x30\x20\x31\x30\
-\x20\x30\x20\x30\x20\x31\x2d\x31\x34\x2e\x31\x34\x20\x30\x4c\x2e\
-\x31\x20\x31\x34\x2e\x32\x34\x68\x35\x2e\x36\x36\x6c\x2d\x31\x2e\
-\x34\x32\x20\x31\x2e\x34\x32\x7a\x4d\x31\x30\x20\x34\x61\x31\x20\
-\x31\x20\x30\x20\x31\x20\x30\x20\x30\x2d\x32\x20\x31\x20\x31\x20\
-\x30\x20\x30\x20\x30\x20\x30\x20\x32\x7a\x22\x2f\x3e\x3c\x2f\x67\
-\x3e\x3c\x2f\x73\x76\x67\x3e\x0a\
-\x00\x00\x03\x46\
+\x00\x00\x04\x64\
\x3c\
\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\
\x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x75\x74\x66\
@@ -176,34 +432,52 @@ qt_resource_data = b"\
\x20\x79\x3d\x22\x30\x70\x78\x22\x0d\x0a\x09\x20\x77\x69\x64\x74\
\x68\x3d\x22\x35\x31\x32\x70\x78\x22\x20\x68\x65\x69\x67\x68\x74\
\x3d\x22\x35\x31\x32\x70\x78\x22\x20\x76\x69\x65\x77\x42\x6f\x78\
-\x3d\x22\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\x32\x22\x20\x73\
-\x74\x79\x6c\x65\x3d\x22\x65\x6e\x61\x62\x6c\x65\x2d\x62\x61\x63\
-\x6b\x67\x72\x6f\x75\x6e\x64\x3a\x6e\x65\x77\x20\x30\x20\x30\x20\
-\x35\x31\x32\x20\x35\x31\x32\x3b\x22\x20\x78\x6d\x6c\x3a\x73\x70\
-\x61\x63\x65\x3d\x22\x70\x72\x65\x73\x65\x72\x76\x65\x22\x3e\x0d\
-\x0a\x3c\x70\x61\x74\x68\x20\x64\x3d\x22\x4d\x34\x33\x37\x2e\x35\
-\x2c\x33\x38\x36\x2e\x36\x4c\x33\x30\x36\x2e\x39\x2c\x32\x35\x36\
-\x6c\x31\x33\x30\x2e\x36\x2d\x31\x33\x30\x2e\x36\x63\x31\x34\x2e\
-\x31\x2d\x31\x34\x2e\x31\x2c\x31\x34\x2e\x31\x2d\x33\x36\x2e\x38\
-\x2c\x30\x2d\x35\x30\x2e\x39\x63\x2d\x31\x34\x2e\x31\x2d\x31\x34\
-\x2e\x31\x2d\x33\x36\x2e\x38\x2d\x31\x34\x2e\x31\x2d\x35\x30\x2e\
-\x39\x2c\x30\x4c\x32\x35\x36\x2c\x32\x30\x35\x2e\x31\x4c\x31\x32\
-\x35\x2e\x34\x2c\x37\x34\x2e\x35\x0d\x0a\x09\x63\x2d\x31\x34\x2e\
-\x31\x2d\x31\x34\x2e\x31\x2d\x33\x36\x2e\x38\x2d\x31\x34\x2e\x31\
-\x2d\x35\x30\x2e\x39\x2c\x30\x63\x2d\x31\x34\x2e\x31\x2c\x31\x34\
-\x2e\x31\x2d\x31\x34\x2e\x31\x2c\x33\x36\x2e\x38\x2c\x30\x2c\x35\
-\x30\x2e\x39\x4c\x32\x30\x35\x2e\x31\x2c\x32\x35\x36\x4c\x37\x34\
-\x2e\x35\x2c\x33\x38\x36\x2e\x36\x63\x2d\x31\x34\x2e\x31\x2c\x31\
-\x34\x2e\x31\x2d\x31\x34\x2e\x31\x2c\x33\x36\x2e\x38\x2c\x30\x2c\
-\x35\x30\x2e\x39\x0d\x0a\x09\x63\x31\x34\x2e\x31\x2c\x31\x34\x2e\
-\x31\x2c\x33\x36\x2e\x38\x2c\x31\x34\x2e\x31\x2c\x35\x30\x2e\x39\
-\x2c\x30\x4c\x32\x35\x36\x2c\x33\x30\x36\x2e\x39\x6c\x31\x33\x30\
-\x2e\x36\x2c\x31\x33\x30\x2e\x36\x63\x31\x34\x2e\x31\x2c\x31\x34\
-\x2e\x31\x2c\x33\x36\x2e\x38\x2c\x31\x34\x2e\x31\x2c\x35\x30\x2e\
-\x39\x2c\x30\x43\x34\x35\x31\x2e\x35\x2c\x34\x32\x33\x2e\x34\x2c\
-\x34\x35\x31\x2e\x35\x2c\x34\x30\x30\x2e\x36\x2c\x34\x33\x37\x2e\
-\x35\x2c\x33\x38\x36\x2e\x36\x7a\x22\x2f\x3e\x0d\x0a\x3c\x2f\x73\
-\x76\x67\x3e\x0d\x0a\
+\x3d\x22\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\x32\x22\x20\x65\
+\x6e\x61\x62\x6c\x65\x2d\x62\x61\x63\x6b\x67\x72\x6f\x75\x6e\x64\
+\x3d\x22\x6e\x65\x77\x20\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\
+\x32\x22\x20\x78\x6d\x6c\x3a\x73\x70\x61\x63\x65\x3d\x22\x70\x72\
+\x65\x73\x65\x72\x76\x65\x22\x3e\x0d\x0a\x3c\x67\x20\x69\x64\x3d\
+\x22\x49\x63\x6f\x6e\x22\x3e\x0d\x0a\x09\x3c\x67\x3e\x0d\x0a\x09\
+\x09\x3c\x70\x61\x74\x68\x20\x64\x3d\x22\x4d\x32\x35\x36\x2c\x31\
+\x37\x36\x63\x2d\x34\x34\x2e\x30\x30\x34\x2c\x30\x2d\x38\x30\x2e\
+\x30\x30\x31\x2c\x33\x36\x2d\x38\x30\x2e\x30\x30\x31\x2c\x38\x30\
+\x63\x30\x2c\x34\x34\x2e\x30\x30\x34\x2c\x33\x35\x2e\x39\x39\x37\
+\x2c\x38\x30\x2c\x38\x30\x2e\x30\x30\x31\x2c\x38\x30\x63\x34\x34\
+\x2e\x30\x30\x35\x2c\x30\x2c\x37\x39\x2e\x39\x39\x39\x2d\x33\x35\
+\x2e\x39\x39\x36\x2c\x37\x39\x2e\x39\x39\x39\x2d\x38\x30\x0d\x0a\
+\x09\x09\x09\x43\x33\x33\x35\x2e\x39\x39\x39\x2c\x32\x31\x32\x2c\
+\x33\x30\x30\x2e\x30\x30\x35\x2c\x31\x37\x36\x2c\x32\x35\x36\x2c\
+\x31\x37\x36\x7a\x20\x4d\x34\x34\x36\x2e\x39\x33\x38\x2c\x32\x33\
+\x34\x2e\x36\x36\x37\x63\x2d\x39\x2e\x36\x30\x35\x2d\x38\x38\x2e\
+\x35\x33\x31\x2d\x38\x31\x2e\x30\x37\x34\x2d\x31\x36\x30\x2d\x31\
+\x36\x39\x2e\x36\x30\x35\x2d\x31\x36\x39\x2e\x35\x39\x39\x56\x33\
+\x32\x68\x2d\x34\x32\x2e\x36\x36\x36\x76\x33\x33\x2e\x30\x36\x37\
+\x0d\x0a\x09\x09\x09\x63\x2d\x38\x38\x2e\x35\x33\x31\x2c\x39\x2e\
+\x35\x39\x39\x2d\x31\x36\x30\x2c\x38\x31\x2e\x30\x36\x38\x2d\x31\
+\x36\x39\x2e\x36\x30\x34\x2c\x31\x36\x39\x2e\x35\x39\x39\x48\x33\
+\x32\x76\x34\x32\x2e\x36\x36\x37\x68\x33\x33\x2e\x30\x36\x32\x63\
+\x39\x2e\x36\x30\x34\x2c\x38\x38\x2e\x35\x33\x31\x2c\x38\x31\x2e\
+\x30\x37\x32\x2c\x31\x36\x30\x2c\x31\x36\x39\x2e\x36\x30\x34\x2c\
+\x31\x36\x39\x2e\x36\x30\x34\x56\x34\x38\x30\x68\x34\x32\x2e\x36\
+\x36\x36\x76\x2d\x33\x33\x2e\x30\x36\x32\x0d\x0a\x09\x09\x09\x63\
+\x38\x38\x2e\x35\x33\x31\x2d\x39\x2e\x36\x30\x34\x2c\x31\x36\x30\
+\x2d\x38\x31\x2e\x30\x37\x33\x2c\x31\x36\x39\x2e\x36\x30\x35\x2d\
+\x31\x36\x39\x2e\x36\x30\x34\x48\x34\x38\x30\x76\x2d\x34\x32\x2e\
+\x36\x36\x37\x48\x34\x34\x36\x2e\x39\x33\x38\x7a\x20\x4d\x32\x35\
+\x36\x2c\x34\x30\x35\x2e\x33\x33\x33\x63\x2d\x38\x32\x2e\x31\x33\
+\x37\x2c\x30\x2d\x31\x34\x39\x2e\x33\x33\x34\x2d\x36\x37\x2e\x31\
+\x39\x38\x2d\x31\x34\x39\x2e\x33\x33\x34\x2d\x31\x34\x39\x2e\x33\
+\x33\x33\x0d\x0a\x09\x09\x09\x63\x30\x2d\x38\x32\x2e\x31\x33\x36\
+\x2c\x36\x37\x2e\x31\x39\x37\x2d\x31\x34\x39\x2e\x33\x33\x33\x2c\
+\x31\x34\x39\x2e\x33\x33\x34\x2d\x31\x34\x39\x2e\x33\x33\x33\x63\
+\x38\x32\x2e\x31\x33\x35\x2c\x30\x2c\x31\x34\x39\x2e\x33\x33\x32\
+\x2c\x36\x37\x2e\x31\x39\x38\x2c\x31\x34\x39\x2e\x33\x33\x32\x2c\
+\x31\x34\x39\x2e\x33\x33\x33\x43\x34\x30\x35\x2e\x33\x33\x32\x2c\
+\x33\x33\x38\x2e\x31\x33\x35\x2c\x33\x33\x38\x2e\x31\x33\x35\x2c\
+\x34\x30\x35\x2e\x33\x33\x33\x2c\x32\x35\x36\x2c\x34\x30\x35\x2e\
+\x33\x33\x33\x7a\x0d\x0a\x09\x09\x09\x22\x2f\x3e\x0d\x0a\x09\x3c\
+\x2f\x67\x3e\x0d\x0a\x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\x73\x76\x67\
+\x3e\x0d\x0a\
\x00\x00\x04\xca\
\x3c\
\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\
@@ -283,6 +557,233 @@ qt_resource_data = b"\
\x36\x37\x2c\x37\x2e\x34\x37\x30\x34\x0a\x09\x48\x33\x2e\x33\x37\
\x33\x33\x4c\x37\x2e\x35\x2c\x33\x2e\x38\x39\x39\x33\x7a\x22\x2f\
\x3e\x0a\x3c\x2f\x73\x76\x67\x3e\x0a\
+\x00\x00\x00\x6c\
+\x3c\
+\x73\x76\x67\x20\x78\x6d\x6c\x6e\x73\x3d\x22\x68\x74\x74\x70\x3a\
+\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x32\x30\x30\
+\x30\x2f\x73\x76\x67\x22\x20\x76\x69\x65\x77\x42\x6f\x78\x3d\x22\
+\x30\x20\x30\x20\x32\x30\x20\x32\x30\x22\x3e\x3c\x70\x61\x74\x68\
+\x20\x64\x3d\x22\x4d\x31\x38\x20\x31\x32\x76\x31\x48\x38\x76\x35\
+\x6c\x2d\x36\x2d\x36\x20\x36\x2d\x36\x76\x35\x68\x38\x56\x32\x68\
+\x32\x7a\x22\x2f\x3e\x3c\x2f\x73\x76\x67\x3e\
+\x00\x00\x04\xa2\
+\x3c\
+\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x27\x31\x2e\
+\x30\x27\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x27\x55\x54\x46\
+\x2d\x38\x27\x3f\x3e\x0a\x3c\x21\x2d\x2d\x20\x54\x68\x69\x73\x20\
+\x66\x69\x6c\x65\x20\x77\x61\x73\x20\x67\x65\x6e\x65\x72\x61\x74\
+\x65\x64\x20\x62\x79\x20\x64\x76\x69\x73\x76\x67\x6d\x20\x32\x2e\
+\x38\x20\x2d\x2d\x3e\x0a\x3c\x73\x76\x67\x20\x76\x65\x72\x73\x69\
+\x6f\x6e\x3d\x27\x31\x2e\x31\x27\x20\x78\x6d\x6c\x6e\x73\x3d\x27\
+\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\
+\x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x27\x20\x78\x6d\x6c\x6e\
+\x73\x3a\x78\x6c\x69\x6e\x6b\x3d\x27\x68\x74\x74\x70\x3a\x2f\x2f\
+\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\x39\x39\x39\x2f\
+\x78\x6c\x69\x6e\x6b\x27\x20\x77\x69\x64\x74\x68\x3d\x27\x36\x33\
+\x2e\x39\x39\x39\x36\x70\x74\x27\x20\x68\x65\x69\x67\x68\x74\x3d\
+\x27\x36\x33\x2e\x39\x39\x39\x37\x70\x74\x27\x20\x76\x69\x65\x77\
+\x42\x6f\x78\x3d\x27\x35\x36\x2e\x34\x30\x39\x34\x20\x35\x33\x2e\
+\x38\x35\x38\x33\x20\x36\x33\x2e\x39\x39\x39\x36\x20\x36\x33\x2e\
+\x39\x39\x39\x37\x27\x3e\x0a\x3c\x67\x20\x69\x64\x3d\x27\x70\x61\
+\x67\x65\x31\x27\x3e\x0a\x3c\x67\x20\x74\x72\x61\x6e\x73\x66\x6f\
+\x72\x6d\x3d\x27\x6d\x61\x74\x72\x69\x78\x28\x30\x2e\x39\x39\x36\
+\x32\x36\x34\x20\x30\x20\x30\x20\x30\x2e\x39\x39\x36\x32\x36\x34\
+\x20\x35\x38\x2e\x34\x36\x36\x39\x20\x31\x31\x37\x2e\x38\x35\x38\
+\x29\x27\x3e\x0a\x3c\x70\x61\x74\x68\x20\x64\x3d\x27\x4d\x20\x33\
+\x2e\x39\x35\x37\x33\x35\x20\x2d\x33\x32\x2e\x31\x32\x43\x20\x34\
+\x2e\x31\x35\x35\x35\x36\x20\x2d\x33\x39\x2e\x32\x37\x34\x35\x20\
+\x36\x2e\x39\x38\x34\x37\x33\x20\x2d\x34\x36\x2e\x31\x30\x34\x37\
+\x20\x31\x31\x2e\x39\x30\x33\x36\x20\x2d\x35\x31\x2e\x33\x30\x33\
+\x39\x43\x20\x32\x37\x2e\x34\x34\x31\x31\x20\x2d\x36\x37\x2e\x37\
+\x32\x36\x39\x20\x35\x33\x2e\x33\x30\x32\x31\x20\x2d\x36\x31\x2e\
+\x35\x34\x30\x35\x20\x35\x36\x2e\x31\x35\x32\x33\x20\x2d\x34\x32\
+\x2e\x35\x30\x32\x32\x43\x20\x35\x37\x2e\x36\x32\x37\x20\x2d\x33\
+\x32\x2e\x36\x35\x31\x39\x20\x35\x30\x2e\x35\x38\x35\x36\x20\x2d\
+\x32\x33\x2e\x35\x36\x32\x31\x20\x34\x30\x2e\x36\x37\x39\x34\x20\
+\x2d\x32\x32\x2e\x35\x32\x38\x31\x27\x20\x66\x69\x6c\x6c\x3d\x27\
+\x6e\x6f\x6e\x65\x27\x20\x73\x74\x72\x6f\x6b\x65\x3d\x27\x23\x30\
+\x30\x30\x30\x30\x30\x27\x20\x73\x74\x72\x6f\x6b\x65\x2d\x6c\x69\
+\x6e\x65\x63\x61\x70\x3d\x27\x72\x6f\x75\x6e\x64\x27\x20\x73\x74\
+\x72\x6f\x6b\x65\x2d\x6c\x69\x6e\x65\x6a\x6f\x69\x6e\x3d\x27\x72\
+\x6f\x75\x6e\x64\x27\x20\x73\x74\x72\x6f\x6b\x65\x2d\x6d\x69\x74\
+\x65\x72\x6c\x69\x6d\x69\x74\x3d\x27\x31\x30\x2e\x30\x33\x37\x35\
+\x27\x20\x73\x74\x72\x6f\x6b\x65\x2d\x77\x69\x64\x74\x68\x3d\x27\
+\x32\x2e\x35\x30\x39\x33\x37\x27\x2f\x3e\x0a\x3c\x2f\x67\x3e\x0a\
+\x3c\x67\x20\x74\x72\x61\x6e\x73\x66\x6f\x72\x6d\x3d\x27\x6d\x61\
+\x74\x72\x69\x78\x28\x30\x2e\x39\x39\x36\x32\x36\x34\x20\x30\x20\
+\x30\x20\x30\x2e\x39\x39\x36\x32\x36\x34\x20\x35\x38\x2e\x34\x36\
+\x36\x39\x20\x31\x31\x37\x2e\x38\x35\x38\x29\x27\x3e\x0a\x3c\x63\
+\x69\x72\x63\x6c\x65\x20\x63\x78\x3d\x27\x33\x2e\x39\x35\x37\x33\
+\x35\x27\x20\x63\x79\x3d\x27\x2d\x33\x32\x2e\x31\x32\x27\x20\x66\
+\x69\x6c\x6c\x3d\x27\x23\x30\x30\x30\x30\x30\x30\x27\x20\x72\x3d\
+\x27\x36\x2e\x30\x32\x32\x35\x27\x2f\x3e\x0a\x3c\x2f\x67\x3e\x0a\
+\x3c\x67\x20\x74\x72\x61\x6e\x73\x66\x6f\x72\x6d\x3d\x27\x6d\x61\
+\x74\x72\x69\x78\x28\x30\x2e\x39\x39\x36\x32\x36\x34\x20\x30\x20\
+\x30\x20\x30\x2e\x39\x39\x36\x32\x36\x34\x20\x35\x38\x2e\x34\x36\
+\x36\x39\x20\x31\x31\x37\x2e\x38\x35\x38\x29\x27\x3e\x0a\x3c\x63\
+\x69\x72\x63\x6c\x65\x20\x63\x78\x3d\x27\x31\x31\x2e\x39\x30\x33\
+\x36\x27\x20\x63\x79\x3d\x27\x2d\x35\x31\x2e\x33\x30\x33\x39\x27\
+\x20\x66\x69\x6c\x6c\x3d\x27\x23\x30\x30\x30\x30\x30\x30\x27\x20\
+\x72\x3d\x27\x36\x2e\x30\x32\x32\x35\x27\x2f\x3e\x0a\x3c\x2f\x67\
+\x3e\x0a\x3c\x67\x20\x74\x72\x61\x6e\x73\x66\x6f\x72\x6d\x3d\x27\
+\x6d\x61\x74\x72\x69\x78\x28\x30\x2e\x39\x39\x36\x32\x36\x34\x20\
+\x30\x20\x30\x20\x30\x2e\x39\x39\x36\x32\x36\x34\x20\x35\x38\x2e\
+\x34\x36\x36\x39\x20\x31\x31\x37\x2e\x38\x35\x38\x29\x27\x3e\x0a\
+\x3c\x63\x69\x72\x63\x6c\x65\x20\x63\x78\x3d\x27\x35\x36\x2e\x31\
+\x35\x32\x33\x27\x20\x63\x79\x3d\x27\x2d\x34\x32\x2e\x35\x30\x32\
+\x32\x27\x20\x66\x69\x6c\x6c\x3d\x27\x23\x30\x30\x30\x30\x30\x30\
+\x27\x20\x72\x3d\x27\x36\x2e\x30\x32\x32\x35\x27\x2f\x3e\x0a\x3c\
+\x2f\x67\x3e\x0a\x3c\x67\x20\x74\x72\x61\x6e\x73\x66\x6f\x72\x6d\
+\x3d\x27\x6d\x61\x74\x72\x69\x78\x28\x30\x2e\x39\x39\x36\x32\x36\
+\x34\x20\x30\x20\x30\x20\x30\x2e\x39\x39\x36\x32\x36\x34\x20\x35\
+\x38\x2e\x34\x36\x36\x39\x20\x31\x31\x37\x2e\x38\x35\x38\x29\x27\
+\x3e\x0a\x3c\x63\x69\x72\x63\x6c\x65\x20\x63\x78\x3d\x27\x34\x30\
+\x2e\x36\x37\x39\x34\x27\x20\x63\x79\x3d\x27\x2d\x32\x32\x2e\x35\
+\x32\x38\x31\x27\x20\x66\x69\x6c\x6c\x3d\x27\x23\x30\x30\x30\x30\
+\x30\x30\x27\x20\x72\x3d\x27\x36\x2e\x30\x32\x32\x35\x27\x2f\x3e\
+\x0a\x3c\x2f\x67\x3e\x0a\x3c\x2f\x67\x3e\x0a\x3c\x2f\x73\x76\x67\
+\x3e\
+\x00\x00\x02\xb7\
+\x3c\
+\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\
+\x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x75\x74\x66\
+\x2d\x38\x22\x3f\x3e\x0d\x0a\x3c\x21\x2d\x2d\x20\x47\x65\x6e\x65\
+\x72\x61\x74\x6f\x72\x3a\x20\x41\x64\x6f\x62\x65\x20\x49\x6c\x6c\
+\x75\x73\x74\x72\x61\x74\x6f\x72\x20\x31\x36\x2e\x32\x2e\x31\x2c\
+\x20\x53\x56\x47\x20\x45\x78\x70\x6f\x72\x74\x20\x50\x6c\x75\x67\
+\x2d\x49\x6e\x20\x2e\x20\x53\x56\x47\x20\x56\x65\x72\x73\x69\x6f\
+\x6e\x3a\x20\x36\x2e\x30\x30\x20\x42\x75\x69\x6c\x64\x20\x30\x29\
+\x20\x20\x2d\x2d\x3e\x0d\x0a\x3c\x21\x44\x4f\x43\x54\x59\x50\x45\
+\x20\x73\x76\x67\x20\x50\x55\x42\x4c\x49\x43\x20\x22\x2d\x2f\x2f\
+\x57\x33\x43\x2f\x2f\x44\x54\x44\x20\x53\x56\x47\x20\x31\x2e\x31\
+\x2f\x2f\x45\x4e\x22\x20\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\
+\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x47\x72\x61\x70\x68\x69\x63\
+\x73\x2f\x53\x56\x47\x2f\x31\x2e\x31\x2f\x44\x54\x44\x2f\x73\x76\
+\x67\x31\x31\x2e\x64\x74\x64\x22\x3e\x0d\x0a\x3c\x73\x76\x67\x20\
+\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\x31\x22\x20\x69\x64\
+\x3d\x22\x4c\x61\x79\x65\x72\x5f\x31\x22\x20\x78\x6d\x6c\x6e\x73\
+\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\
+\x6f\x72\x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x22\x20\x78\x6d\
+\x6c\x6e\x73\x3a\x78\x6c\x69\x6e\x6b\x3d\x22\x68\x74\x74\x70\x3a\
+\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\x39\x39\
+\x39\x2f\x78\x6c\x69\x6e\x6b\x22\x20\x78\x3d\x22\x30\x70\x78\x22\
+\x20\x79\x3d\x22\x30\x70\x78\x22\x0d\x0a\x09\x20\x77\x69\x64\x74\
+\x68\x3d\x22\x35\x31\x32\x70\x78\x22\x20\x68\x65\x69\x67\x68\x74\
+\x3d\x22\x35\x31\x32\x70\x78\x22\x20\x76\x69\x65\x77\x42\x6f\x78\
+\x3d\x22\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\x32\x22\x20\x65\
+\x6e\x61\x62\x6c\x65\x2d\x62\x61\x63\x6b\x67\x72\x6f\x75\x6e\x64\
+\x3d\x22\x6e\x65\x77\x20\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\
+\x32\x22\x20\x78\x6d\x6c\x3a\x73\x70\x61\x63\x65\x3d\x22\x70\x72\
+\x65\x73\x65\x72\x76\x65\x22\x3e\x0d\x0a\x3c\x67\x20\x69\x64\x3d\
+\x22\x49\x63\x6f\x6e\x5f\x35\x5f\x22\x3e\x0d\x0a\x09\x3c\x67\x3e\
+\x0d\x0a\x09\x09\x3c\x70\x6f\x6c\x79\x67\x6f\x6e\x20\x70\x6f\x69\
+\x6e\x74\x73\x3d\x22\x34\x30\x35\x2c\x31\x33\x36\x2e\x37\x39\x38\
+\x20\x33\x37\x35\x2e\x32\x30\x32\x2c\x31\x30\x37\x20\x32\x35\x36\
+\x2c\x32\x32\x36\x2e\x32\x30\x32\x20\x31\x33\x36\x2e\x37\x39\x38\
+\x2c\x31\x30\x37\x20\x31\x30\x37\x2c\x31\x33\x36\x2e\x37\x39\x38\
+\x20\x32\x32\x36\x2e\x32\x30\x32\x2c\x32\x35\x36\x20\x31\x30\x37\
+\x2c\x33\x37\x35\x2e\x32\x30\x32\x20\x31\x33\x36\x2e\x37\x39\x38\
+\x2c\x34\x30\x35\x20\x32\x35\x36\x2c\x32\x38\x35\x2e\x37\x39\x38\
+\x20\x0d\x0a\x09\x09\x09\x33\x37\x35\x2e\x32\x30\x32\x2c\x34\x30\
+\x35\x20\x34\x30\x35\x2c\x33\x37\x35\x2e\x32\x30\x32\x20\x32\x38\
+\x35\x2e\x37\x39\x38\x2c\x32\x35\x36\x20\x09\x09\x22\x2f\x3e\x0d\
+\x0a\x09\x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\
+\x73\x76\x67\x3e\x0d\x0a\
+\x00\x00\x05\xca\
+\x3c\
+\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\
+\x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x75\x74\x66\
+\x2d\x38\x22\x3f\x3e\x0d\x0a\x3c\x21\x2d\x2d\x20\x47\x65\x6e\x65\
+\x72\x61\x74\x6f\x72\x3a\x20\x41\x64\x6f\x62\x65\x20\x49\x6c\x6c\
+\x75\x73\x74\x72\x61\x74\x6f\x72\x20\x31\x36\x2e\x32\x2e\x31\x2c\
+\x20\x53\x56\x47\x20\x45\x78\x70\x6f\x72\x74\x20\x50\x6c\x75\x67\
+\x2d\x49\x6e\x20\x2e\x20\x53\x56\x47\x20\x56\x65\x72\x73\x69\x6f\
+\x6e\x3a\x20\x36\x2e\x30\x30\x20\x42\x75\x69\x6c\x64\x20\x30\x29\
+\x20\x20\x2d\x2d\x3e\x0d\x0a\x3c\x21\x44\x4f\x43\x54\x59\x50\x45\
+\x20\x73\x76\x67\x20\x50\x55\x42\x4c\x49\x43\x20\x22\x2d\x2f\x2f\
+\x57\x33\x43\x2f\x2f\x44\x54\x44\x20\x53\x56\x47\x20\x31\x2e\x31\
+\x2f\x2f\x45\x4e\x22\x20\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\
+\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x47\x72\x61\x70\x68\x69\x63\
+\x73\x2f\x53\x56\x47\x2f\x31\x2e\x31\x2f\x44\x54\x44\x2f\x73\x76\
+\x67\x31\x31\x2e\x64\x74\x64\x22\x3e\x0d\x0a\x3c\x73\x76\x67\x20\
+\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\x31\x22\x20\x69\x64\
+\x3d\x22\x4c\x61\x79\x65\x72\x5f\x31\x22\x20\x78\x6d\x6c\x6e\x73\
+\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\
+\x6f\x72\x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x22\x20\x78\x6d\
+\x6c\x6e\x73\x3a\x78\x6c\x69\x6e\x6b\x3d\x22\x68\x74\x74\x70\x3a\
+\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\x39\x39\
+\x39\x2f\x78\x6c\x69\x6e\x6b\x22\x20\x78\x3d\x22\x30\x70\x78\x22\
+\x20\x79\x3d\x22\x30\x70\x78\x22\x0d\x0a\x09\x20\x77\x69\x64\x74\
+\x68\x3d\x22\x35\x31\x32\x70\x78\x22\x20\x68\x65\x69\x67\x68\x74\
+\x3d\x22\x35\x31\x32\x70\x78\x22\x20\x76\x69\x65\x77\x42\x6f\x78\
+\x3d\x22\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\x32\x22\x20\x65\
+\x6e\x61\x62\x6c\x65\x2d\x62\x61\x63\x6b\x67\x72\x6f\x75\x6e\x64\
+\x3d\x22\x6e\x65\x77\x20\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\
+\x32\x22\x20\x78\x6d\x6c\x3a\x73\x70\x61\x63\x65\x3d\x22\x70\x72\
+\x65\x73\x65\x72\x76\x65\x22\x3e\x0d\x0a\x3c\x70\x61\x74\x68\x20\
+\x64\x3d\x22\x4d\x34\x35\x30\x2e\x36\x37\x39\x2c\x32\x37\x33\x2e\
+\x35\x63\x2d\x31\x34\x2e\x35\x38\x35\x2d\x31\x34\x2e\x35\x37\x37\
+\x2d\x33\x36\x2e\x30\x35\x34\x2d\x31\x35\x2e\x38\x39\x2d\x35\x30\
+\x2e\x36\x33\x39\x2d\x31\x2e\x33\x31\x32\x6c\x2d\x34\x31\x2e\x36\
+\x38\x37\x2c\x34\x31\x2e\x36\x36\x34\x63\x2d\x31\x30\x2e\x38\x35\
+\x32\x2c\x31\x30\x2e\x38\x33\x36\x2d\x32\x33\x2e\x39\x33\x2c\x31\
+\x30\x2e\x38\x35\x39\x2d\x33\x31\x2e\x35\x36\x34\x2c\x31\x2e\x38\
+\x35\x32\x0d\x0a\x09\x63\x2d\x35\x2e\x30\x35\x37\x2d\x35\x2e\x39\
+\x36\x38\x2d\x33\x2e\x30\x36\x31\x2d\x32\x34\x2e\x33\x37\x34\x2d\
+\x31\x2e\x36\x34\x34\x2d\x33\x36\x2e\x30\x34\x39\x6c\x32\x30\x2e\
+\x39\x30\x37\x2d\x31\x37\x31\x2e\x38\x34\x39\x63\x31\x2e\x38\x36\
+\x37\x2d\x31\x35\x2e\x33\x35\x33\x2d\x39\x2e\x30\x37\x2d\x33\x30\
+\x2e\x31\x38\x35\x2d\x32\x34\x2e\x34\x33\x2d\x33\x32\x2e\x30\x35\
+\x31\x0d\x0a\x09\x63\x2d\x31\x35\x2e\x33\x35\x38\x2d\x31\x2e\x38\
+\x36\x37\x2d\x32\x39\x2e\x33\x32\x32\x2c\x39\x2e\x39\x33\x39\x2d\
+\x33\x31\x2e\x31\x39\x31\x2c\x32\x35\x2e\x32\x38\x39\x4c\x32\x36\
+\x37\x2e\x33\x37\x2c\x32\x33\x36\x2e\x30\x32\x31\x63\x2d\x31\x2e\
+\x32\x30\x35\x2c\x33\x2e\x33\x35\x38\x2d\x33\x2e\x37\x39\x2c\x33\
+\x2e\x39\x33\x38\x2d\x34\x2e\x30\x38\x31\x2d\x30\x2e\x35\x38\x32\
+\x4c\x32\x35\x35\x2e\x34\x34\x2c\x36\x30\x0d\x0a\x09\x63\x30\x2d\
+\x31\x35\x2e\x34\x36\x35\x2d\x31\x32\x2e\x35\x34\x32\x2d\x32\x38\
+\x2d\x32\x38\x2e\x30\x31\x34\x2d\x32\x38\x63\x2d\x31\x35\x2e\x34\
+\x37\x33\x2c\x30\x2d\x32\x38\x2e\x30\x31\x35\x2c\x31\x32\x2e\x35\
+\x33\x35\x2d\x32\x38\x2e\x30\x31\x35\x2c\x32\x38\x6c\x2d\x30\x2e\
+\x35\x35\x32\x2c\x31\x37\x36\x2e\x37\x35\x32\x63\x30\x2e\x31\x34\
+\x36\x2c\x32\x2e\x30\x34\x2d\x31\x2e\x36\x30\x34\x2c\x32\x2e\x36\
+\x32\x34\x2d\x31\x2e\x39\x32\x2c\x30\x2e\x32\x39\x34\x4c\x31\x37\
+\x32\x2e\x30\x31\x36\x2c\x39\x39\x2e\x30\x37\x37\x0d\x0a\x09\x63\
+\x2d\x32\x2e\x37\x35\x2d\x31\x35\x2e\x32\x31\x39\x2d\x31\x37\x2e\
+\x33\x32\x33\x2d\x32\x36\x2e\x32\x30\x33\x2d\x33\x32\x2e\x35\x34\
+\x38\x2d\x32\x33\x2e\x34\x35\x33\x63\x2d\x31\x35\x2e\x32\x32\x37\
+\x2c\x32\x2e\x37\x34\x38\x2d\x32\x35\x2e\x33\x33\x39\x2c\x31\x38\
+\x2e\x31\x38\x37\x2d\x32\x32\x2e\x35\x39\x31\x2c\x33\x33\x2e\x34\
+\x30\x33\x6c\x32\x32\x2e\x31\x39\x33\x2c\x31\x36\x31\x2e\x34\x35\
+\x35\x0d\x0a\x09\x63\x30\x2e\x30\x32\x33\x2c\x32\x2e\x38\x37\x32\
+\x2d\x30\x2e\x39\x34\x31\x2c\x34\x2e\x35\x31\x33\x2d\x32\x2e\x33\
+\x30\x38\x2c\x30\x2e\x38\x33\x31\x6c\x2d\x33\x33\x2e\x31\x30\x39\
+\x2d\x38\x38\x2e\x35\x31\x37\x63\x2d\x35\x2e\x31\x38\x2d\x31\x34\
+\x2e\x35\x37\x32\x2d\x32\x31\x2e\x31\x39\x36\x2d\x32\x33\x2e\x30\
+\x36\x35\x2d\x33\x35\x2e\x37\x37\x36\x2d\x31\x37\x2e\x38\x38\x39\
+\x0d\x0a\x09\x63\x2d\x31\x34\x2e\x35\x37\x39\x2c\x35\x2e\x31\x37\
+\x37\x2d\x32\x32\x2e\x32\x30\x31\x2c\x32\x32\x2e\x30\x36\x31\x2d\
+\x31\x37\x2e\x30\x32\x33\x2c\x33\x36\x2e\x36\x33\x31\x6c\x35\x38\
+\x2e\x30\x34\x32\x2c\x31\x38\x39\x2e\x36\x32\x35\x63\x30\x2e\x33\
+\x30\x33\x2c\x31\x2e\x30\x34\x36\x2c\x30\x2e\x36\x32\x34\x2c\x32\
+\x2e\x30\x38\x35\x2c\x30\x2e\x39\x35\x33\x2c\x33\x2e\x31\x31\x38\
+\x6c\x30\x2e\x31\x32\x31\x2c\x30\x2e\x33\x39\x0d\x0a\x09\x63\x30\
+\x2e\x30\x31\x31\x2c\x30\x2e\x30\x33\x31\x2c\x30\x2e\x30\x32\x35\
+\x2c\x30\x2e\x30\x35\x38\x2c\x30\x2e\x30\x33\x35\x2c\x30\x2e\x30\
+\x38\x38\x43\x31\x32\x36\x2e\x30\x37\x39\x2c\x34\x34\x34\x2e\x32\
+\x33\x33\x2c\x31\x37\x32\x2e\x35\x37\x2c\x34\x38\x30\x2c\x32\x32\
+\x37\x2e\x34\x32\x37\x2c\x34\x38\x30\x63\x33\x35\x2e\x31\x31\x36\
+\x2c\x30\x2c\x37\x31\x2e\x35\x39\x31\x2d\x31\x32\x2e\x33\x37\x38\
+\x2c\x39\x39\x2e\x33\x35\x37\x2d\x33\x33\x2e\x36\x37\x32\x0d\x0a\
+\x09\x63\x30\x2e\x30\x30\x31\x2c\x30\x2c\x30\x2e\x30\x30\x33\x2d\
+\x30\x2e\x30\x30\x32\x2c\x30\x2e\x30\x30\x33\x2d\x30\x2e\x30\x30\
+\x32\x63\x32\x39\x2e\x39\x39\x2d\x31\x38\x2e\x30\x35\x31\x2c\x31\
+\x32\x36\x2e\x30\x37\x31\x2d\x31\x32\x31\x2e\x33\x34\x37\x2c\x31\
+\x32\x36\x2e\x30\x37\x31\x2d\x31\x32\x31\x2e\x33\x34\x37\x43\x34\
+\x36\x37\x2e\x34\x34\x35\x2c\x33\x31\x30\x2e\x34\x30\x32\x2c\x34\
+\x36\x35\x2e\x32\x36\x36\x2c\x32\x38\x38\x2e\x30\x38\x2c\x34\x35\
+\x30\x2e\x36\x37\x39\x2c\x32\x37\x33\x2e\x35\x7a\x22\x2f\x3e\x0d\
+\x0a\x3c\x2f\x73\x76\x67\x3e\x0d\x0a\
\x00\x00\x05\xd4\
\x3c\
\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x27\x31\x2e\
@@ -379,6 +880,116 @@ qt_resource_data = b"\
\x2d\x77\x69\x64\x74\x68\x3d\x27\x33\x2e\x35\x31\x33\x31\x32\x27\
\x2f\x3e\x0a\x3c\x2f\x67\x3e\x0a\x3c\x2f\x67\x3e\x0a\x3c\x2f\x73\
\x76\x67\x3e\
+\x00\x00\x02\xa1\
+\x3c\
+\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\
+\x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x75\x74\x66\
+\x2d\x38\x22\x3f\x3e\x0d\x0a\x3c\x21\x2d\x2d\x20\x47\x65\x6e\x65\
+\x72\x61\x74\x6f\x72\x3a\x20\x41\x64\x6f\x62\x65\x20\x49\x6c\x6c\
+\x75\x73\x74\x72\x61\x74\x6f\x72\x20\x31\x38\x2e\x31\x2e\x31\x2c\
+\x20\x53\x56\x47\x20\x45\x78\x70\x6f\x72\x74\x20\x50\x6c\x75\x67\
+\x2d\x49\x6e\x20\x2e\x20\x53\x56\x47\x20\x56\x65\x72\x73\x69\x6f\
+\x6e\x3a\x20\x36\x2e\x30\x30\x20\x42\x75\x69\x6c\x64\x20\x30\x29\
+\x20\x20\x2d\x2d\x3e\x0d\x0a\x3c\x21\x44\x4f\x43\x54\x59\x50\x45\
+\x20\x73\x76\x67\x20\x50\x55\x42\x4c\x49\x43\x20\x22\x2d\x2f\x2f\
+\x57\x33\x43\x2f\x2f\x44\x54\x44\x20\x53\x56\x47\x20\x31\x2e\x31\
+\x2f\x2f\x45\x4e\x22\x20\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\
+\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x47\x72\x61\x70\x68\x69\x63\
+\x73\x2f\x53\x56\x47\x2f\x31\x2e\x31\x2f\x44\x54\x44\x2f\x73\x76\
+\x67\x31\x31\x2e\x64\x74\x64\x22\x3e\x0d\x0a\x3c\x73\x76\x67\x20\
+\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\x31\x22\x20\x69\x64\
+\x3d\x22\x53\x61\x76\x65\x22\x20\x78\x6d\x6c\x6e\x73\x3d\x22\x68\
+\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\
+\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x22\x20\x78\x6d\x6c\x6e\x73\
+\x3a\x78\x6c\x69\x6e\x6b\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\
+\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\x39\x39\x39\x2f\x78\
+\x6c\x69\x6e\x6b\x22\x20\x78\x3d\x22\x35\x31\x32\x70\x78\x22\x20\
+\x79\x3d\x22\x35\x31\x32\x70\x78\x22\x0d\x0a\x09\x20\x76\x69\x65\
+\x77\x42\x6f\x78\x3d\x22\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\
+\x32\x22\x20\x65\x6e\x61\x62\x6c\x65\x2d\x62\x61\x63\x6b\x67\x72\
+\x6f\x75\x6e\x64\x3d\x22\x6e\x65\x77\x20\x30\x20\x30\x20\x35\x31\
+\x32\x20\x35\x31\x32\x22\x20\x78\x6d\x6c\x3a\x73\x70\x61\x63\x65\
+\x3d\x22\x70\x72\x65\x73\x65\x72\x76\x65\x22\x3e\x0d\x0a\x3c\x67\
+\x20\x74\x72\x61\x6e\x73\x66\x6f\x72\x6d\x3d\x27\x6d\x61\x74\x72\
+\x69\x78\x28\x32\x34\x20\x30\x20\x30\x20\x32\x34\x20\x30\x20\x30\
+\x29\x27\x3e\x0d\x0a\x3c\x70\x61\x74\x68\x20\x64\x3d\x22\x4d\x31\
+\x35\x2e\x31\x37\x33\x2c\x32\x48\x34\x43\x32\x2e\x38\x39\x39\x2c\
+\x32\x2c\x32\x2c\x32\x2e\x39\x2c\x32\x2c\x34\x76\x31\x32\x63\x30\
+\x2c\x31\x2e\x31\x2c\x30\x2e\x38\x39\x39\x2c\x32\x2c\x32\x2c\x32\
+\x68\x31\x32\x63\x31\x2e\x31\x30\x31\x2c\x30\x2c\x32\x2d\x30\x2e\
+\x39\x2c\x32\x2d\x32\x56\x35\x2e\x31\x32\x37\x4c\x31\x35\x2e\x31\
+\x37\x33\x2c\x32\x7a\x20\x4d\x31\x34\x2c\x38\x63\x30\x2c\x30\x2e\
+\x35\x34\x39\x2d\x30\x2e\x34\x35\x2c\x31\x2d\x31\x2c\x31\x48\x37\
+\x0d\x0a\x09\x43\x36\x2e\x34\x35\x2c\x39\x2c\x36\x2c\x38\x2e\x35\
+\x34\x39\x2c\x36\x2c\x38\x56\x33\x68\x38\x56\x38\x7a\x20\x4d\x31\
+\x33\x2c\x34\x68\x2d\x32\x76\x34\x68\x32\x56\x34\x7a\x22\x2f\x3e\
+\x0d\x0a\x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\x73\x76\x67\x3e\x0d\x0a\
+\
+\x00\x00\x03\xe6\
+\x3c\
+\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\
+\x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x75\x74\x66\
+\x2d\x38\x22\x3f\x3e\x0d\x0a\x3c\x21\x2d\x2d\x20\x47\x65\x6e\x65\
+\x72\x61\x74\x6f\x72\x3a\x20\x41\x64\x6f\x62\x65\x20\x49\x6c\x6c\
+\x75\x73\x74\x72\x61\x74\x6f\x72\x20\x31\x38\x2e\x31\x2e\x31\x2c\
+\x20\x53\x56\x47\x20\x45\x78\x70\x6f\x72\x74\x20\x50\x6c\x75\x67\
+\x2d\x49\x6e\x20\x2e\x20\x53\x56\x47\x20\x56\x65\x72\x73\x69\x6f\
+\x6e\x3a\x20\x36\x2e\x30\x30\x20\x42\x75\x69\x6c\x64\x20\x30\x29\
+\x20\x20\x2d\x2d\x3e\x0d\x0a\x3c\x21\x44\x4f\x43\x54\x59\x50\x45\
+\x20\x73\x76\x67\x20\x50\x55\x42\x4c\x49\x43\x20\x22\x2d\x2f\x2f\
+\x57\x33\x43\x2f\x2f\x44\x54\x44\x20\x53\x56\x47\x20\x31\x2e\x31\
+\x2f\x2f\x45\x4e\x22\x20\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\
+\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x47\x72\x61\x70\x68\x69\x63\
+\x73\x2f\x53\x56\x47\x2f\x31\x2e\x31\x2f\x44\x54\x44\x2f\x73\x76\
+\x67\x31\x31\x2e\x64\x74\x64\x22\x3e\x0d\x0a\x3c\x73\x76\x67\x20\
+\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\x31\x22\x20\x69\x64\
+\x3d\x22\x43\x68\x65\x76\x72\x6f\x6e\x5f\x63\x69\x72\x63\x6c\x65\
+\x64\x5f\x72\x69\x67\x68\x74\x22\x20\x78\x6d\x6c\x6e\x73\x3d\x22\
+\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\
+\x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x22\x20\x78\x6d\x6c\x6e\
+\x73\x3a\x78\x6c\x69\x6e\x6b\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\
+\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\x39\x39\x39\x2f\
+\x78\x6c\x69\x6e\x6b\x22\x0d\x0a\x09\x20\x78\x3d\x22\x30\x70\x78\
+\x22\x20\x79\x3d\x22\x30\x70\x78\x22\x20\x76\x69\x65\x77\x42\x6f\
+\x78\x3d\x22\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\x32\x22\x20\
+\x65\x6e\x61\x62\x6c\x65\x2d\x62\x61\x63\x6b\x67\x72\x6f\x75\x6e\
+\x64\x3d\x22\x6e\x65\x77\x20\x30\x20\x30\x20\x35\x31\x32\x20\x35\
+\x31\x32\x22\x20\x78\x6d\x6c\x3a\x73\x70\x61\x63\x65\x3d\x22\x70\
+\x72\x65\x73\x65\x72\x76\x65\x22\x3e\x0d\x0a\x3c\x67\x20\x74\x72\
+\x61\x6e\x73\x66\x6f\x72\x6d\x3d\x27\x6d\x61\x74\x72\x69\x78\x28\
+\x32\x34\x20\x30\x20\x30\x20\x32\x34\x20\x30\x20\x30\x29\x27\x3e\
+\x0d\x0a\x3c\x70\x61\x74\x68\x20\x64\x3d\x22\x4d\x31\x31\x2c\x31\
+\x30\x4c\x38\x2e\x36\x39\x38\x2c\x37\x2e\x34\x39\x34\x63\x2d\x30\
+\x2e\x31\x39\x36\x2d\x30\x2e\x31\x39\x38\x2d\x30\x2e\x31\x39\x36\
+\x2d\x30\x2e\x35\x31\x39\x2c\x30\x2d\x30\x2e\x37\x31\x38\x63\x30\
+\x2e\x31\x39\x36\x2d\x30\x2e\x31\x39\x37\x2c\x30\x2e\x35\x31\x35\
+\x2d\x30\x2e\x31\x39\x37\x2c\x30\x2e\x37\x31\x2c\x30\x6c\x32\x2e\
+\x38\x30\x37\x2c\x32\x2e\x38\x36\x34\x0d\x0a\x09\x63\x30\x2e\x31\
+\x39\x36\x2c\x30\x2e\x31\x39\x39\x2c\x30\x2e\x31\x39\x36\x2c\x30\
+\x2e\x35\x32\x2c\x30\x2c\x30\x2e\x37\x31\x37\x6c\x2d\x32\x2e\x38\
+\x30\x37\x2c\x32\x2e\x38\x36\x34\x63\x2d\x30\x2e\x31\x39\x35\x2c\
+\x30\x2e\x31\x39\x39\x2d\x30\x2e\x35\x31\x34\x2c\x30\x2e\x31\x39\
+\x38\x2d\x30\x2e\x37\x31\x2c\x30\x63\x2d\x30\x2e\x31\x39\x36\x2d\
+\x30\x2e\x31\x39\x37\x2d\x30\x2e\x31\x39\x36\x2d\x30\x2e\x35\x31\
+\x38\x2c\x30\x2d\x30\x2e\x37\x31\x37\x4c\x31\x31\x2c\x31\x30\x7a\
+\x20\x4d\x31\x30\x2c\x30\x2e\x34\x0d\x0a\x09\x63\x35\x2e\x33\x30\
+\x32\x2c\x30\x2c\x39\x2e\x36\x2c\x34\x2e\x32\x39\x38\x2c\x39\x2e\
+\x36\x2c\x39\x2e\x36\x63\x30\x2c\x35\x2e\x33\x30\x33\x2d\x34\x2e\
+\x32\x39\x38\x2c\x39\x2e\x36\x2d\x39\x2e\x36\x2c\x39\x2e\x36\x53\
+\x30\x2e\x34\x2c\x31\x35\x2e\x33\x30\x33\x2c\x30\x2e\x34\x2c\x31\
+\x30\x43\x30\x2e\x34\x2c\x34\x2e\x36\x39\x38\x2c\x34\x2e\x36\x39\
+\x38\x2c\x30\x2e\x34\x2c\x31\x30\x2c\x30\x2e\x34\x7a\x20\x4d\x31\
+\x30\x2c\x31\x38\x2e\x33\x35\x34\x0d\x0a\x09\x63\x34\x2e\x36\x31\
+\x33\x2c\x30\x2c\x38\x2e\x33\x35\x34\x2d\x33\x2e\x37\x34\x2c\x38\
+\x2e\x33\x35\x34\x2d\x38\x2e\x33\x35\x34\x63\x30\x2d\x34\x2e\x36\
+\x31\x34\x2d\x33\x2e\x37\x34\x31\x2d\x38\x2e\x33\x35\x34\x2d\x38\
+\x2e\x33\x35\x34\x2d\x38\x2e\x33\x35\x34\x63\x2d\x34\x2e\x36\x31\
+\x35\x2c\x30\x2d\x38\x2e\x33\x35\x34\x2c\x33\x2e\x37\x34\x2d\x38\
+\x2e\x33\x35\x34\x2c\x38\x2e\x33\x35\x34\x0d\x0a\x09\x43\x31\x2e\
+\x36\x34\x35\x2c\x31\x34\x2e\x36\x31\x34\x2c\x35\x2e\x33\x38\x35\
+\x2c\x31\x38\x2e\x33\x35\x34\x2c\x31\x30\x2c\x31\x38\x2e\x33\x35\
+\x34\x7a\x22\x2f\x3e\x0d\x0a\x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\x73\
+\x76\x67\x3e\x0d\x0a\
\x00\x00\x03\x4c\
\x3c\
\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\
@@ -434,7 +1045,7 @@ qt_resource_data = b"\
\x2c\x34\x32\x32\x2e\x34\x2c\x32\x35\x36\x2c\x34\x32\x32\x2e\x34\
\x7a\x22\x2f\x3e\x0d\x0a\x09\x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\x67\
\x3e\x0d\x0a\x3c\x2f\x73\x76\x67\x3e\x0d\x0a\
-\x00\x00\x07\x80\
+\x00\x00\x03\xeb\
\x3c\
\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\
\x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x75\x74\x66\
@@ -461,108 +1072,51 @@ qt_resource_data = b"\
\x20\x79\x3d\x22\x30\x70\x78\x22\x0d\x0a\x09\x20\x77\x69\x64\x74\
\x68\x3d\x22\x35\x31\x32\x70\x78\x22\x20\x68\x65\x69\x67\x68\x74\
\x3d\x22\x35\x31\x32\x70\x78\x22\x20\x76\x69\x65\x77\x42\x6f\x78\
-\x3d\x22\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\x32\x22\x20\x65\
-\x6e\x61\x62\x6c\x65\x2d\x62\x61\x63\x6b\x67\x72\x6f\x75\x6e\x64\
-\x3d\x22\x6e\x65\x77\x20\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\
-\x32\x22\x20\x78\x6d\x6c\x3a\x73\x70\x61\x63\x65\x3d\x22\x70\x72\
-\x65\x73\x65\x72\x76\x65\x22\x3e\x0d\x0a\x3c\x67\x3e\x0d\x0a\x09\
-\x3c\x70\x61\x74\x68\x20\x64\x3d\x22\x4d\x31\x39\x33\x2e\x34\x36\
-\x2c\x32\x34\x39\x2e\x30\x35\x36\x63\x33\x2e\x37\x32\x33\x2d\x30\
-\x2e\x36\x37\x2c\x37\x2e\x35\x38\x39\x2d\x31\x2e\x30\x34\x31\x2c\
-\x31\x31\x2e\x35\x38\x36\x2d\x31\x2e\x30\x34\x31\x4c\x32\x30\x31\
-\x2e\x39\x32\x34\x2c\x32\x34\x38\x68\x31\x30\x33\x2e\x38\x32\x33\
-\x63\x34\x2e\x35\x30\x33\x2c\x30\x2c\x38\x2e\x38\x30\x36\x2d\x30\
-\x2e\x36\x31\x37\x2c\x31\x32\x2e\x39\x30\x38\x2d\x31\x2e\x37\x35\
-\x34\x0d\x0a\x09\x09\x63\x31\x39\x2e\x33\x37\x2d\x35\x2e\x33\x36\
-\x33\x2c\x33\x33\x2e\x33\x34\x35\x2d\x32\x32\x2e\x35\x33\x37\x2c\
-\x33\x33\x2e\x33\x34\x35\x2d\x34\x33\x2e\x36\x36\x33\x76\x2d\x33\
-\x30\x2e\x38\x32\x32\x76\x2d\x35\x36\x2e\x34\x30\x32\x63\x30\x2d\
-\x32\x34\x2e\x38\x33\x32\x2d\x32\x31\x2e\x31\x35\x2d\x34\x33\x2e\
-\x34\x38\x34\x2d\x34\x36\x2e\x32\x38\x39\x2d\x34\x37\x2e\x36\x30\
-\x36\x0d\x0a\x09\x09\x63\x2d\x31\x35\x2e\x39\x33\x31\x2d\x32\x2e\
-\x36\x32\x34\x2d\x33\x39\x2e\x32\x35\x38\x2d\x33\x2e\x38\x32\x37\
-\x2d\x35\x35\x2e\x30\x38\x39\x2d\x33\x2e\x37\x34\x39\x63\x2d\x31\
-\x35\x2e\x38\x32\x39\x2c\x30\x2e\x30\x38\x36\x2d\x33\x30\x2e\x39\
-\x38\x31\x2c\x31\x2e\x34\x30\x34\x2d\x34\x34\x2e\x32\x37\x37\x2c\
-\x33\x2e\x37\x34\x39\x43\x31\x36\x37\x2e\x31\x34\x33\x2c\x37\x34\
-\x2e\x35\x37\x36\x2c\x31\x36\x30\x2c\x38\x38\x2e\x39\x32\x38\x2c\
-\x31\x36\x30\x2c\x31\x31\x35\x2e\x33\x35\x39\x56\x31\x34\x34\x68\
-\x39\x36\x0d\x0a\x09\x09\x76\x31\x36\x48\x31\x32\x38\x2e\x38\x32\
-\x63\x2d\x33\x35\x2e\x36\x32\x38\x2c\x30\x2d\x36\x34\x2e\x35\x33\
-\x38\x2c\x34\x32\x2e\x35\x37\x31\x2d\x36\x34\x2e\x38\x31\x33\x2c\
-\x39\x35\x2e\x32\x34\x32\x43\x36\x34\x2e\x30\x30\x35\x2c\x32\x35\
-\x35\x2e\x34\x39\x35\x2c\x36\x34\x2c\x32\x35\x35\x2e\x37\x34\x37\
-\x2c\x36\x34\x2c\x32\x35\x36\x63\x30\x2c\x39\x2e\x35\x32\x33\x2c\
-\x30\x2e\x39\x34\x2c\x31\x38\x2e\x37\x32\x2c\x32\x2e\x36\x38\x35\
-\x2c\x32\x37\x2e\x34\x30\x34\x0d\x0a\x09\x09\x43\x37\x34\x2e\x36\
-\x34\x38\x2c\x33\x32\x33\x2e\x30\x37\x2c\x39\x39\x2e\x34\x35\x31\
-\x2c\x33\x35\x32\x2c\x31\x32\x38\x2e\x38\x32\x2c\x33\x35\x32\x48\
-\x31\x34\x34\x76\x2d\x32\x2e\x36\x36\x32\x76\x2d\x34\x33\x2e\x32\
-\x37\x33\x43\x31\x34\x34\x2c\x32\x37\x39\x2e\x32\x33\x38\x2c\x31\
-\x36\x34\x2e\x31\x34\x36\x2c\x32\x35\x34\x2e\x33\x33\x32\x2c\x31\
-\x39\x33\x2e\x34\x36\x2c\x32\x34\x39\x2e\x30\x35\x36\x7a\x20\x4d\
-\x32\x30\x33\x2e\x36\x35\x36\x2c\x31\x32\x37\x2e\x30\x30\x32\x0d\
-\x0a\x09\x09\x63\x2d\x39\x2e\x35\x39\x32\x2c\x30\x2d\x31\x37\x2e\
-\x33\x38\x34\x2d\x37\x2e\x37\x38\x35\x2d\x31\x37\x2e\x33\x38\x34\
-\x2d\x31\x37\x2e\x34\x30\x33\x63\x30\x2d\x39\x2e\x36\x36\x34\x2c\
-\x37\x2e\x37\x37\x34\x2d\x31\x37\x2e\x35\x32\x2c\x31\x37\x2e\x33\
-\x38\x34\x2d\x31\x37\x2e\x35\x32\x63\x39\x2e\x35\x37\x34\x2c\x30\
-\x2c\x31\x37\x2e\x33\x39\x39\x2c\x37\x2e\x38\x35\x35\x2c\x31\x37\
-\x2e\x33\x39\x39\x2c\x31\x37\x2e\x35\x32\x0d\x0a\x09\x09\x43\x32\
-\x32\x31\x2e\x30\x35\x36\x2c\x31\x31\x39\x2e\x32\x31\x37\x2c\x32\
-\x31\x33\x2e\x32\x34\x36\x2c\x31\x32\x37\x2e\x30\x30\x32\x2c\x32\
-\x30\x33\x2e\x36\x35\x36\x2c\x31\x32\x37\x2e\x30\x30\x32\x7a\x22\
-\x2f\x3e\x0d\x0a\x09\x3c\x70\x61\x74\x68\x20\x64\x3d\x22\x4d\x34\
-\x34\x33\x2e\x39\x35\x31\x2c\x32\x32\x32\x2e\x35\x34\x33\x43\x34\
-\x33\x34\x2e\x37\x38\x2c\x31\x38\x36\x2e\x30\x32\x31\x2c\x34\x31\
-\x31\x2e\x30\x33\x33\x2c\x31\x36\x30\x2c\x33\x38\x33\x2e\x31\x38\
-\x2c\x31\x36\x30\x48\x33\x36\x38\x76\x32\x2e\x36\x32\x36\x76\x33\
-\x38\x2e\x30\x34\x36\x63\x30\x2c\x33\x33\x2e\x39\x31\x35\x2d\x32\
-\x32\x2e\x32\x38\x36\x2c\x35\x38\x2e\x34\x37\x34\x2d\x34\x39\x2e\
-\x34\x38\x39\x2c\x36\x32\x2e\x36\x38\x31\x0d\x0a\x09\x09\x63\x2d\
-\x32\x2e\x37\x33\x37\x2c\x30\x2e\x34\x32\x34\x2d\x35\x2e\x34\x38\
-\x33\x2c\x30\x2e\x36\x34\x36\x2d\x38\x2e\x33\x30\x31\x2c\x30\x2e\
-\x36\x34\x36\x48\x32\x30\x36\x2e\x33\x35\x31\x63\x2d\x34\x2e\x35\
-\x31\x38\x2c\x30\x2d\x38\x2e\x39\x30\x34\x2c\x30\x2e\x35\x38\x34\
-\x2d\x31\x33\x2e\x30\x34\x39\x2c\x31\x2e\x36\x37\x32\x43\x31\x37\
-\x34\x2e\x31\x38\x2c\x32\x37\x30\x2e\x36\x38\x39\x2c\x31\x36\x30\
-\x2c\x32\x38\x36\x2e\x36\x2c\x31\x36\x30\x2c\x33\x30\x37\x2e\x32\
-\x33\x36\x76\x33\x32\x2e\x39\x32\x32\x0d\x0a\x09\x09\x76\x35\x34\
-\x2e\x33\x30\x35\x63\x30\x2c\x32\x34\x2e\x38\x33\x32\x2c\x32\x34\
-\x2e\x39\x37\x37\x2c\x33\x39\x2e\x34\x32\x36\x2c\x34\x39\x2e\x34\
-\x38\x31\x2c\x34\x36\x2e\x35\x35\x31\x63\x32\x39\x2e\x33\x32\x37\
-\x2c\x38\x2e\x35\x33\x31\x2c\x36\x31\x2e\x32\x36\x37\x2c\x31\x30\
-\x2e\x30\x36\x38\x2c\x39\x36\x2e\x33\x36\x36\x2c\x30\x43\x33\x32\
-\x39\x2e\x31\x35\x2c\x34\x33\x34\x2e\x33\x35\x34\x2c\x33\x35\x32\
-\x2c\x34\x32\x30\x2e\x38\x39\x33\x2c\x33\x35\x32\x2c\x33\x39\x34\
-\x2e\x34\x36\x33\x56\x33\x36\x38\x0d\x0a\x09\x09\x68\x2d\x39\x36\
-\x76\x2d\x31\x36\x68\x31\x32\x37\x2e\x31\x38\x63\x32\x35\x2e\x32\
-\x34\x2c\x30\x2c\x34\x37\x2e\x31\x30\x37\x2d\x32\x31\x2e\x33\x36\
-\x35\x2c\x35\x37\x2e\x38\x31\x34\x2d\x35\x32\x2e\x35\x34\x39\x43\
-\x34\x34\x35\x2e\x34\x37\x34\x2c\x32\x38\x36\x2e\x34\x30\x34\x2c\
-\x34\x34\x38\x2c\x32\x37\x31\x2e\x36\x34\x31\x2c\x34\x34\x38\x2c\
-\x32\x35\x36\x0d\x0a\x09\x09\x43\x34\x34\x38\x2c\x32\x34\x34\x2e\
-\x32\x33\x32\x2c\x34\x34\x36\x2e\x35\x36\x37\x2c\x32\x33\x32\x2e\
-\x39\x36\x32\x2c\x34\x34\x33\x2e\x39\x35\x31\x2c\x32\x32\x32\x2e\
-\x35\x34\x33\x7a\x20\x4d\x33\x30\x37\x2e\x38\x36\x37\x2c\x33\x38\
-\x32\x2e\x38\x32\x63\x39\x2e\x35\x39\x2c\x30\x2c\x31\x37\x2e\x33\
-\x38\x31\x2c\x37\x2e\x37\x38\x35\x2c\x31\x37\x2e\x33\x38\x31\x2c\
-\x31\x37\x2e\x34\x0d\x0a\x09\x09\x63\x30\x2c\x39\x2e\x36\x35\x2d\
-\x37\x2e\x37\x39\x31\x2c\x31\x37\x2e\x35\x32\x31\x2d\x31\x37\x2e\
-\x33\x38\x31\x2c\x31\x37\x2e\x35\x32\x31\x63\x2d\x39\x2e\x35\x37\
-\x37\x2c\x30\x2d\x31\x37\x2e\x33\x39\x39\x2d\x37\x2e\x38\x37\x31\
-\x2d\x31\x37\x2e\x33\x39\x39\x2d\x31\x37\x2e\x35\x32\x31\x43\x32\
-\x39\x30\x2e\x34\x36\x38\x2c\x33\x39\x30\x2e\x35\x39\x2c\x32\x39\
-\x38\x2e\x32\x37\x34\x2c\x33\x38\x32\x2e\x38\x32\x2c\x33\x30\x37\
-\x2e\x38\x36\x37\x2c\x33\x38\x32\x2e\x38\x32\x7a\x22\x2f\x3e\x0d\
-\x0a\x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\x73\x76\x67\x3e\x0d\x0a\
-\x00\x00\x03\xc4\
+\x3d\x22\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\x32\x22\x20\x73\
+\x74\x79\x6c\x65\x3d\x22\x65\x6e\x61\x62\x6c\x65\x2d\x62\x61\x63\
+\x6b\x67\x72\x6f\x75\x6e\x64\x3a\x6e\x65\x77\x20\x30\x20\x30\x20\
+\x35\x31\x32\x20\x35\x31\x32\x3b\x22\x20\x78\x6d\x6c\x3a\x73\x70\
+\x61\x63\x65\x3d\x22\x70\x72\x65\x73\x65\x72\x76\x65\x22\x3e\x0d\
+\x0a\x3c\x67\x3e\x0d\x0a\x09\x3c\x70\x61\x74\x68\x20\x64\x3d\x22\
+\x4d\x32\x35\x36\x2c\x31\x32\x38\x63\x2d\x38\x31\x2e\x39\x2c\x30\
+\x2d\x31\x34\x35\x2e\x37\x2c\x34\x38\x2e\x38\x2d\x32\x32\x34\x2c\
+\x31\x32\x38\x63\x36\x37\x2e\x34\x2c\x36\x37\x2e\x37\x2c\x31\x32\
+\x34\x2c\x31\x32\x38\x2c\x32\x32\x34\x2c\x31\x32\x38\x63\x39\x39\
+\x2e\x39\x2c\x30\x2c\x31\x37\x33\x2e\x34\x2d\x37\x36\x2e\x34\x2c\
+\x32\x32\x34\x2d\x31\x32\x36\x2e\x36\x0d\x0a\x09\x09\x43\x34\x32\
+\x38\x2e\x32\x2c\x31\x39\x38\x2e\x36\x2c\x33\x35\x34\x2e\x38\x2c\
+\x31\x32\x38\x2c\x32\x35\x36\x2c\x31\x32\x38\x7a\x20\x4d\x32\x35\
+\x36\x2c\x33\x34\x37\x2e\x33\x63\x2d\x34\x39\x2e\x34\x2c\x30\x2d\
+\x38\x39\x2e\x36\x2d\x34\x31\x2d\x38\x39\x2e\x36\x2d\x39\x31\x2e\
+\x33\x63\x30\x2d\x35\x30\x2e\x34\x2c\x34\x30\x2e\x32\x2d\x39\x31\
+\x2e\x33\x2c\x38\x39\x2e\x36\x2d\x39\x31\x2e\x33\x73\x38\x39\x2e\
+\x36\x2c\x34\x31\x2c\x38\x39\x2e\x36\x2c\x39\x31\x2e\x33\x0d\x0a\
+\x09\x09\x43\x33\x34\x35\x2e\x36\x2c\x33\x30\x36\x2e\x34\x2c\x33\
+\x30\x35\x2e\x34\x2c\x33\x34\x37\x2e\x33\x2c\x32\x35\x36\x2c\x33\
+\x34\x37\x2e\x33\x7a\x22\x2f\x3e\x0d\x0a\x09\x3c\x67\x3e\x0d\x0a\
+\x09\x09\x3c\x70\x61\x74\x68\x20\x64\x3d\x22\x4d\x32\x35\x36\x2c\
+\x32\x32\x34\x63\x30\x2d\x37\x2e\x39\x2c\x32\x2e\x39\x2d\x31\x35\
+\x2e\x31\x2c\x37\x2e\x36\x2d\x32\x30\x2e\x37\x63\x2d\x32\x2e\x35\
+\x2d\x30\x2e\x34\x2d\x35\x2d\x30\x2e\x36\x2d\x37\x2e\x36\x2d\x30\
+\x2e\x36\x63\x2d\x32\x38\x2e\x38\x2c\x30\x2d\x35\x32\x2e\x33\x2c\
+\x32\x33\x2e\x39\x2d\x35\x32\x2e\x33\x2c\x35\x33\x2e\x33\x63\x30\
+\x2c\x32\x39\x2e\x34\x2c\x32\x33\x2e\x35\x2c\x35\x33\x2e\x33\x2c\
+\x35\x32\x2e\x33\x2c\x35\x33\x2e\x33\x0d\x0a\x09\x09\x09\x73\x35\
+\x32\x2e\x33\x2d\x32\x33\x2e\x39\x2c\x35\x32\x2e\x33\x2d\x35\x33\
+\x2e\x33\x63\x30\x2d\x32\x2e\x33\x2d\x30\x2e\x32\x2d\x34\x2e\x36\
+\x2d\x30\x2e\x34\x2d\x36\x2e\x39\x63\x2d\x35\x2e\x35\x2c\x34\x2e\
+\x33\x2d\x31\x32\x2e\x33\x2c\x36\x2e\x39\x2d\x31\x39\x2e\x38\x2c\
+\x36\x2e\x39\x43\x32\x37\x30\x2e\x33\x2c\x32\x35\x36\x2c\x32\x35\
+\x36\x2c\x32\x34\x31\x2e\x37\x2c\x32\x35\x36\x2c\x32\x32\x34\x7a\
+\x22\x2f\x3e\x0d\x0a\x09\x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\x67\x3e\
+\x0d\x0a\x3c\x2f\x73\x76\x67\x3e\x0d\x0a\
+\x00\x00\x02\x79\
\x3c\
\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\
\x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x75\x74\x66\
\x2d\x38\x22\x3f\x3e\x0d\x0a\x3c\x21\x2d\x2d\x20\x47\x65\x6e\x65\
\x72\x61\x74\x6f\x72\x3a\x20\x41\x64\x6f\x62\x65\x20\x49\x6c\x6c\
-\x75\x73\x74\x72\x61\x74\x6f\x72\x20\x31\x38\x2e\x31\x2e\x30\x2c\
+\x75\x73\x74\x72\x61\x74\x6f\x72\x20\x31\x36\x2e\x32\x2e\x31\x2c\
\x20\x53\x56\x47\x20\x45\x78\x70\x6f\x72\x74\x20\x50\x6c\x75\x67\
\x2d\x49\x6e\x20\x2e\x20\x53\x56\x47\x20\x56\x65\x72\x73\x69\x6f\
\x6e\x3a\x20\x36\x2e\x30\x30\x20\x42\x75\x69\x6c\x64\x20\x30\x29\
@@ -574,128 +1128,88 @@ qt_resource_data = b"\
\x73\x2f\x53\x56\x47\x2f\x31\x2e\x31\x2f\x44\x54\x44\x2f\x73\x76\
\x67\x31\x31\x2e\x64\x74\x64\x22\x3e\x0d\x0a\x3c\x73\x76\x67\x20\
\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\x31\x22\x20\x69\x64\
-\x3d\x22\x4d\x61\x67\x6e\x69\x66\x79\x69\x6e\x67\x5f\x67\x6c\x61\
-\x73\x73\x22\x20\x78\x6d\x6c\x6e\x73\x3d\x22\x68\x74\x74\x70\x3a\
-\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x32\x30\x30\
-\x30\x2f\x73\x76\x67\x22\x20\x78\x6d\x6c\x6e\x73\x3a\x78\x6c\x69\
-\x6e\x6b\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\
-\x33\x2e\x6f\x72\x67\x2f\x31\x39\x39\x39\x2f\x78\x6c\x69\x6e\x6b\
-\x22\x20\x78\x3d\x22\x30\x70\x78\x22\x0d\x0a\x09\x20\x79\x3d\x22\
-\x30\x70\x78\x22\x20\x76\x69\x65\x77\x42\x6f\x78\x3d\x22\x30\x20\
-\x30\x20\x35\x31\x32\x20\x35\x31\x32\x22\x20\x65\x6e\x61\x62\x6c\
-\x65\x2d\x62\x61\x63\x6b\x67\x72\x6f\x75\x6e\x64\x3d\x22\x6e\x65\
-\x77\x20\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\x32\x22\x20\x78\
-\x6d\x6c\x3a\x73\x70\x61\x63\x65\x3d\x22\x70\x72\x65\x73\x65\x72\
-\x76\x65\x22\x3e\x0d\x0a\x3c\x67\x20\x74\x72\x61\x6e\x73\x66\x6f\
-\x72\x6d\x3d\x27\x6d\x61\x74\x72\x69\x78\x28\x32\x34\x20\x30\x20\
-\x30\x20\x32\x34\x20\x30\x20\x30\x29\x27\x3e\x0d\x0a\x3c\x70\x61\
-\x74\x68\x20\x64\x3d\x22\x4d\x31\x37\x2e\x35\x34\x35\x2c\x31\x35\
-\x2e\x34\x36\x37\x6c\x2d\x33\x2e\x37\x37\x39\x2d\x33\x2e\x37\x37\
-\x39\x63\x30\x2e\x35\x37\x2d\x30\x2e\x39\x33\x35\x2c\x30\x2e\x38\
-\x39\x38\x2d\x32\x2e\x30\x33\x35\x2c\x30\x2e\x38\x39\x38\x2d\x33\
-\x2e\x32\x31\x63\x30\x2d\x33\x2e\x34\x31\x37\x2d\x32\x2e\x39\x36\
-\x31\x2d\x36\x2e\x33\x37\x37\x2d\x36\x2e\x33\x37\x38\x2d\x36\x2e\
-\x33\x37\x37\x0d\x0a\x09\x43\x34\x2e\x38\x36\x39\x2c\x32\x2e\x31\
-\x2c\x32\x2e\x31\x2c\x34\x2e\x38\x37\x2c\x32\x2e\x31\x2c\x38\x2e\
-\x32\x38\x37\x63\x30\x2c\x33\x2e\x34\x31\x36\x2c\x32\x2e\x39\x36\
-\x31\x2c\x36\x2e\x33\x37\x37\x2c\x36\x2e\x33\x37\x37\x2c\x36\x2e\
-\x33\x37\x37\x63\x31\x2e\x31\x33\x37\x2c\x30\x2c\x32\x2e\x32\x2d\
-\x30\x2e\x33\x30\x39\x2c\x33\x2e\x31\x31\x35\x2d\x30\x2e\x38\x34\
-\x34\x6c\x33\x2e\x37\x39\x39\x2c\x33\x2e\x38\x30\x31\x0d\x0a\x09\
-\x63\x30\x2e\x33\x37\x32\x2c\x30\x2e\x33\x37\x31\x2c\x30\x2e\x39\
-\x37\x35\x2c\x30\x2e\x33\x37\x31\x2c\x31\x2e\x33\x34\x36\x2c\x30\
-\x6c\x30\x2e\x39\x34\x33\x2d\x30\x2e\x39\x34\x33\x43\x31\x38\x2e\
-\x30\x35\x31\x2c\x31\x36\x2e\x33\x30\x37\x2c\x31\x37\x2e\x39\x31\
-\x36\x2c\x31\x35\x2e\x38\x33\x38\x2c\x31\x37\x2e\x35\x34\x35\x2c\
-\x31\x35\x2e\x34\x36\x37\x7a\x20\x4d\x34\x2e\x30\x30\x34\x2c\x38\
-\x2e\x32\x38\x37\x0d\x0a\x09\x63\x30\x2d\x32\x2e\x33\x36\x36\x2c\
-\x31\x2e\x39\x31\x37\x2d\x34\x2e\x32\x38\x33\x2c\x34\x2e\x32\x38\
-\x32\x2d\x34\x2e\x32\x38\x33\x63\x32\x2e\x33\x36\x36\x2c\x30\x2c\
-\x34\x2e\x34\x37\x34\x2c\x32\x2e\x31\x30\x37\x2c\x34\x2e\x34\x37\
-\x34\x2c\x34\x2e\x34\x37\x34\x63\x30\x2c\x32\x2e\x33\x36\x35\x2d\
-\x31\x2e\x39\x31\x38\x2c\x34\x2e\x32\x38\x33\x2d\x34\x2e\x32\x38\
-\x33\x2c\x34\x2e\x32\x38\x33\x0d\x0a\x09\x43\x36\x2e\x31\x31\x31\
-\x2c\x31\x32\x2e\x37\x36\x2c\x34\x2e\x30\x30\x34\x2c\x31\x30\x2e\
-\x36\x35\x32\x2c\x34\x2e\x30\x30\x34\x2c\x38\x2e\x32\x38\x37\x7a\
-\x22\x2f\x3e\x0d\x0a\x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\x73\x76\x67\
-\x3e\x0d\x0a\
-\x00\x00\x04\xaa\
+\x3d\x22\x4c\x61\x79\x65\x72\x5f\x31\x22\x20\x78\x6d\x6c\x6e\x73\
+\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\
+\x6f\x72\x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x22\x20\x78\x6d\
+\x6c\x6e\x73\x3a\x78\x6c\x69\x6e\x6b\x3d\x22\x68\x74\x74\x70\x3a\
+\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\x39\x39\
+\x39\x2f\x78\x6c\x69\x6e\x6b\x22\x20\x78\x3d\x22\x30\x70\x78\x22\
+\x20\x79\x3d\x22\x30\x70\x78\x22\x0d\x0a\x09\x20\x77\x69\x64\x74\
+\x68\x3d\x22\x35\x31\x32\x70\x78\x22\x20\x68\x65\x69\x67\x68\x74\
+\x3d\x22\x35\x31\x32\x70\x78\x22\x20\x76\x69\x65\x77\x42\x6f\x78\
+\x3d\x22\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\x32\x22\x20\x65\
+\x6e\x61\x62\x6c\x65\x2d\x62\x61\x63\x6b\x67\x72\x6f\x75\x6e\x64\
+\x3d\x22\x6e\x65\x77\x20\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\
+\x32\x22\x20\x78\x6d\x6c\x3a\x73\x70\x61\x63\x65\x3d\x22\x70\x72\
+\x65\x73\x65\x72\x76\x65\x22\x3e\x0d\x0a\x3c\x67\x20\x69\x64\x3d\
+\x22\x49\x63\x6f\x6e\x5f\x31\x5f\x22\x3e\x0d\x0a\x09\x3c\x67\x3e\
+\x0d\x0a\x09\x09\x3c\x67\x3e\x0d\x0a\x09\x09\x09\x3c\x70\x6f\x6c\
+\x79\x67\x6f\x6e\x20\x70\x6f\x69\x6e\x74\x73\x3d\x22\x31\x38\x36\
+\x2e\x33\x30\x31\x2c\x33\x33\x39\x2e\x38\x39\x33\x20\x39\x36\x2c\
+\x32\x34\x39\x2e\x34\x36\x31\x20\x36\x34\x2c\x32\x37\x39\x2e\x39\
+\x36\x38\x20\x31\x38\x36\x2e\x33\x30\x31\x2c\x34\x30\x32\x20\x34\
+\x34\x38\x2c\x31\x34\x30\x2e\x35\x30\x36\x20\x34\x31\x36\x2c\x31\
+\x31\x30\x20\x09\x09\x09\x22\x2f\x3e\x0d\x0a\x09\x09\x3c\x2f\x67\
+\x3e\x0d\x0a\x09\x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\x67\x3e\x0d\x0a\
+\x3c\x2f\x73\x76\x67\x3e\x0d\x0a\
+\x00\x00\x03\x7c\
\x3c\
-\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\
-\x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x75\x74\x66\
-\x2d\x38\x22\x3f\x3e\x0d\x0a\x3c\x21\x2d\x2d\x20\x47\x65\x6e\x65\
-\x72\x61\x74\x6f\x72\x3a\x20\x41\x64\x6f\x62\x65\x20\x49\x6c\x6c\
-\x75\x73\x74\x72\x61\x74\x6f\x72\x20\x31\x38\x2e\x31\x2e\x30\x2c\
-\x20\x53\x56\x47\x20\x45\x78\x70\x6f\x72\x74\x20\x50\x6c\x75\x67\
-\x2d\x49\x6e\x20\x2e\x20\x53\x56\x47\x20\x56\x65\x72\x73\x69\x6f\
-\x6e\x3a\x20\x36\x2e\x30\x30\x20\x42\x75\x69\x6c\x64\x20\x30\x29\
-\x20\x20\x2d\x2d\x3e\x0d\x0a\x3c\x21\x44\x4f\x43\x54\x59\x50\x45\
-\x20\x73\x76\x67\x20\x50\x55\x42\x4c\x49\x43\x20\x22\x2d\x2f\x2f\
-\x57\x33\x43\x2f\x2f\x44\x54\x44\x20\x53\x56\x47\x20\x31\x2e\x31\
-\x2f\x2f\x45\x4e\x22\x20\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\
-\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x47\x72\x61\x70\x68\x69\x63\
-\x73\x2f\x53\x56\x47\x2f\x31\x2e\x31\x2f\x44\x54\x44\x2f\x73\x76\
-\x67\x31\x31\x2e\x64\x74\x64\x22\x3e\x0d\x0a\x3c\x73\x76\x67\x20\
-\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\x31\x22\x20\x69\x64\
-\x3d\x22\x43\x6f\x64\x65\x22\x20\x78\x6d\x6c\x6e\x73\x3d\x22\x68\
-\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\
-\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x22\x20\x78\x6d\x6c\x6e\x73\
-\x3a\x78\x6c\x69\x6e\x6b\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\
-\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\x39\x39\x39\x2f\x78\
-\x6c\x69\x6e\x6b\x22\x20\x78\x3d\x22\x32\x34\x70\x78\x22\x20\x79\
-\x3d\x22\x32\x34\x70\x78\x22\x0d\x0a\x09\x20\x76\x69\x65\x77\x42\
-\x6f\x78\x3d\x22\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\x32\x22\
-\x20\x65\x6e\x61\x62\x6c\x65\x2d\x62\x61\x63\x6b\x67\x72\x6f\x75\
-\x6e\x64\x3d\x22\x6e\x65\x77\x20\x30\x20\x30\x20\x35\x31\x32\x20\
-\x35\x31\x32\x22\x20\x78\x6d\x6c\x3a\x73\x70\x61\x63\x65\x3d\x22\
-\x70\x72\x65\x73\x65\x72\x76\x65\x22\x3e\x0d\x0a\x3c\x67\x20\x74\
-\x72\x61\x6e\x73\x66\x6f\x72\x6d\x3d\x27\x6d\x61\x74\x72\x69\x78\
-\x28\x32\x34\x20\x30\x20\x30\x20\x32\x34\x20\x30\x20\x30\x29\x27\
-\x3e\x3c\x70\x61\x74\x68\x20\x64\x3d\x22\x4d\x35\x2e\x37\x31\x39\
-\x2c\x31\x34\x2e\x37\x35\x63\x2d\x30\x2e\x32\x33\x36\x2c\x30\x2d\
-\x30\x2e\x34\x37\x34\x2d\x30\x2e\x30\x38\x33\x2d\x30\x2e\x36\x36\
-\x34\x2d\x30\x2e\x32\x35\x32\x4c\x2d\x30\x2e\x30\x30\x35\x2c\x31\
-\x30\x6c\x35\x2e\x33\x34\x31\x2d\x34\x2e\x37\x34\x38\x43\x35\x2e\
-\x37\x34\x38\x2c\x34\x2e\x38\x38\x37\x2c\x36\x2e\x33\x38\x2c\x34\
-\x2e\x39\x32\x32\x2c\x36\x2e\x37\x34\x37\x2c\x35\x2e\x33\x33\x35\
-\x0d\x0a\x09\x63\x30\x2e\x33\x36\x37\x2c\x30\x2e\x34\x31\x33\x2c\
-\x30\x2e\x33\x33\x2c\x31\x2e\x30\x34\x35\x2d\x30\x2e\x30\x38\x33\
-\x2c\x31\x2e\x34\x31\x32\x4c\x33\x2e\x30\x30\x35\x2c\x31\x30\x6c\
-\x33\x2e\x33\x37\x38\x2c\x33\x2e\x30\x30\x32\x63\x30\x2e\x34\x31\
-\x33\x2c\x30\x2e\x33\x36\x37\x2c\x30\x2e\x34\x35\x2c\x30\x2e\x39\
-\x39\x39\x2c\x30\x2e\x30\x38\x33\x2c\x31\x2e\x34\x31\x32\x0d\x0a\
-\x09\x43\x36\x2e\x32\x36\x39\x2c\x31\x34\x2e\x36\x33\x37\x2c\x35\
-\x2e\x39\x39\x34\x2c\x31\x34\x2e\x37\x35\x2c\x35\x2e\x37\x31\x39\
-\x2c\x31\x34\x2e\x37\x35\x7a\x20\x4d\x31\x34\x2e\x36\x36\x34\x2c\
-\x31\x34\x2e\x37\x34\x38\x4c\x32\x30\x2e\x30\x30\x35\x2c\x31\x30\
-\x6c\x2d\x35\x2e\x30\x36\x2d\x34\x2e\x34\x39\x38\x63\x2d\x30\x2e\
-\x34\x31\x33\x2d\x30\x2e\x33\x36\x37\x2d\x31\x2e\x30\x34\x35\x2d\
-\x30\x2e\x33\x33\x2d\x31\x2e\x34\x31\x31\x2c\x30\x2e\x30\x38\x33\
-\x0d\x0a\x09\x63\x2d\x30\x2e\x33\x36\x37\x2c\x30\x2e\x34\x31\x33\
-\x2d\x30\x2e\x33\x33\x2c\x31\x2e\x30\x34\x35\x2c\x30\x2e\x30\x38\
-\x33\x2c\x31\x2e\x34\x31\x32\x4c\x31\x36\x2e\x39\x39\x35\x2c\x31\
-\x30\x6c\x2d\x33\x2e\x36\x35\x39\x2c\x33\x2e\x32\x35\x32\x63\x2d\
-\x30\x2e\x34\x31\x33\x2c\x30\x2e\x33\x36\x37\x2d\x30\x2e\x34\x35\
-\x2c\x30\x2e\x39\x39\x39\x2d\x30\x2e\x30\x38\x33\x2c\x31\x2e\x34\
-\x31\x32\x43\x31\x33\x2e\x34\x35\x2c\x31\x34\x2e\x38\x38\x37\x2c\
-\x31\x33\x2e\x37\x32\x35\x2c\x31\x35\x2c\x31\x34\x2c\x31\x35\x0d\
-\x0a\x09\x43\x31\x34\x2e\x32\x33\x36\x2c\x31\x35\x2c\x31\x34\x2e\
-\x34\x37\x34\x2c\x31\x34\x2e\x39\x31\x37\x2c\x31\x34\x2e\x36\x36\
-\x34\x2c\x31\x34\x2e\x37\x34\x38\x7a\x20\x4d\x39\x2e\x39\x38\x36\
-\x2c\x31\x36\x2e\x31\x36\x35\x6c\x32\x2d\x31\x32\x63\x30\x2e\x30\
-\x39\x31\x2d\x30\x2e\x35\x34\x35\x2d\x30\x2e\x32\x37\x37\x2d\x31\
-\x2e\x30\x36\x2d\x30\x2e\x38\x32\x32\x2d\x31\x2e\x31\x35\x31\x0d\
-\x0a\x09\x63\x2d\x30\x2e\x35\x34\x37\x2d\x30\x2e\x30\x39\x32\x2d\
-\x31\x2e\x30\x36\x31\x2c\x30\x2e\x32\x37\x37\x2d\x31\x2e\x31\x35\
-\x2c\x30\x2e\x38\x32\x32\x6c\x2d\x32\x2c\x31\x32\x63\x2d\x30\x2e\
-\x30\x39\x31\x2c\x30\x2e\x35\x34\x35\x2c\x30\x2e\x32\x37\x37\x2c\
-\x31\x2e\x30\x36\x2c\x30\x2e\x38\x32\x32\x2c\x31\x2e\x31\x35\x31\
-\x43\x38\x2e\x38\x39\x32\x2c\x31\x36\x2e\x39\x39\x36\x2c\x38\x2e\
-\x39\x34\x36\x2c\x31\x37\x2c\x39\x2e\x30\x30\x31\x2c\x31\x37\x0d\
-\x0a\x09\x43\x39\x2e\x34\x38\x31\x2c\x31\x37\x2c\x39\x2e\x39\x30\
-\x35\x2c\x31\x36\x2e\x36\x35\x33\x2c\x39\x2e\x39\x38\x36\x2c\x31\
-\x36\x2e\x31\x36\x35\x7a\x22\x2f\x3e\x0d\x0a\x3c\x2f\x67\x3e\x0d\
-\x0a\x3c\x2f\x73\x76\x67\x3e\x0d\x0a\
+\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x27\x31\x2e\
+\x30\x27\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x27\x55\x54\x46\
+\x2d\x38\x27\x3f\x3e\x0a\x3c\x21\x2d\x2d\x20\x54\x68\x69\x73\x20\
+\x66\x69\x6c\x65\x20\x77\x61\x73\x20\x67\x65\x6e\x65\x72\x61\x74\
+\x65\x64\x20\x62\x79\x20\x64\x76\x69\x73\x76\x67\x6d\x20\x32\x2e\
+\x38\x20\x2d\x2d\x3e\x0a\x3c\x73\x76\x67\x20\x76\x65\x72\x73\x69\
+\x6f\x6e\x3d\x27\x31\x2e\x31\x27\x20\x78\x6d\x6c\x6e\x73\x3d\x27\
+\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\
+\x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x27\x20\x78\x6d\x6c\x6e\
+\x73\x3a\x78\x6c\x69\x6e\x6b\x3d\x27\x68\x74\x74\x70\x3a\x2f\x2f\
+\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\x39\x39\x39\x2f\
+\x78\x6c\x69\x6e\x6b\x27\x20\x77\x69\x64\x74\x68\x3d\x27\x36\x33\
+\x2e\x39\x39\x39\x36\x70\x74\x27\x20\x68\x65\x69\x67\x68\x74\x3d\
+\x27\x36\x33\x2e\x39\x39\x39\x37\x70\x74\x27\x20\x76\x69\x65\x77\
+\x42\x6f\x78\x3d\x27\x35\x36\x2e\x34\x30\x39\x34\x20\x35\x33\x2e\
+\x38\x35\x38\x33\x20\x36\x33\x2e\x39\x39\x39\x36\x20\x36\x33\x2e\
+\x39\x39\x39\x37\x27\x3e\x0a\x3c\x67\x20\x69\x64\x3d\x27\x70\x61\
+\x67\x65\x31\x27\x3e\x0a\x3c\x67\x20\x74\x72\x61\x6e\x73\x66\x6f\
+\x72\x6d\x3d\x27\x6d\x61\x74\x72\x69\x78\x28\x30\x2e\x39\x39\x36\
+\x32\x36\x34\x20\x30\x20\x30\x20\x30\x2e\x39\x39\x36\x32\x36\x34\
+\x20\x35\x36\x2e\x34\x30\x39\x34\x20\x31\x31\x37\x2e\x38\x35\x38\
+\x29\x27\x3e\x0a\x3c\x70\x61\x74\x68\x20\x64\x3d\x27\x4d\x20\x32\
+\x2e\x30\x30\x37\x35\x20\x2d\x32\x2e\x30\x30\x37\x35\x4c\x20\x36\
+\x32\x2e\x32\x33\x32\x35\x20\x2d\x32\x2e\x30\x30\x37\x35\x4c\x20\
+\x36\x32\x2e\x32\x33\x32\x35\x20\x2d\x36\x32\x2e\x32\x33\x32\x35\
+\x4c\x20\x32\x2e\x30\x30\x37\x35\x20\x2d\x36\x32\x2e\x32\x33\x32\
+\x35\x4c\x20\x32\x2e\x30\x30\x37\x35\x20\x2d\x32\x2e\x30\x30\x37\
+\x35\x5a\x27\x20\x66\x69\x6c\x6c\x3d\x27\x6e\x6f\x6e\x65\x27\x20\
+\x73\x74\x72\x6f\x6b\x65\x3d\x27\x23\x30\x30\x30\x30\x30\x30\x27\
+\x20\x73\x74\x72\x6f\x6b\x65\x2d\x6c\x69\x6e\x65\x63\x61\x70\x3d\
+\x27\x72\x6f\x75\x6e\x64\x27\x20\x73\x74\x72\x6f\x6b\x65\x2d\x6c\
+\x69\x6e\x65\x6a\x6f\x69\x6e\x3d\x27\x72\x6f\x75\x6e\x64\x27\x20\
+\x73\x74\x72\x6f\x6b\x65\x2d\x6d\x69\x74\x65\x72\x6c\x69\x6d\x69\
+\x74\x3d\x27\x31\x30\x2e\x30\x33\x37\x35\x27\x20\x73\x74\x72\x6f\
+\x6b\x65\x2d\x77\x69\x64\x74\x68\x3d\x27\x34\x2e\x30\x31\x35\x27\
+\x2f\x3e\x0a\x3c\x2f\x67\x3e\x0a\x3c\x67\x20\x74\x72\x61\x6e\x73\
+\x66\x6f\x72\x6d\x3d\x27\x6d\x61\x74\x72\x69\x78\x28\x30\x2e\x39\
+\x39\x36\x32\x36\x34\x20\x30\x20\x30\x20\x30\x2e\x39\x39\x36\x32\
+\x36\x34\x20\x35\x36\x2e\x34\x30\x39\x34\x20\x31\x31\x37\x2e\x38\
+\x35\x38\x29\x27\x3e\x0a\x3c\x70\x61\x74\x68\x20\x64\x3d\x27\x4d\
+\x20\x34\x37\x2e\x31\x37\x36\x32\x20\x2d\x33\x32\x2e\x31\x32\x43\
+\x20\x34\x37\x2e\x31\x37\x36\x32\x20\x2d\x34\x30\x2e\x34\x33\x35\
+\x33\x20\x34\x30\x2e\x34\x33\x35\x33\x20\x2d\x34\x37\x2e\x31\x37\
+\x36\x32\x20\x33\x32\x2e\x31\x32\x20\x2d\x34\x37\x2e\x31\x37\x36\
+\x32\x43\x20\x32\x33\x2e\x38\x30\x34\x37\x20\x2d\x34\x37\x2e\x31\
+\x37\x36\x32\x20\x31\x37\x2e\x30\x36\x33\x37\x20\x2d\x34\x30\x2e\
+\x34\x33\x35\x33\x20\x31\x37\x2e\x30\x36\x33\x37\x20\x2d\x33\x32\
+\x2e\x31\x32\x43\x20\x31\x37\x2e\x30\x36\x33\x37\x20\x2d\x32\x33\
+\x2e\x38\x30\x34\x37\x20\x32\x33\x2e\x38\x30\x34\x37\x20\x2d\x31\
+\x37\x2e\x30\x36\x33\x37\x20\x33\x32\x2e\x31\x32\x20\x2d\x31\x37\
+\x2e\x30\x36\x33\x37\x43\x20\x34\x30\x2e\x34\x33\x35\x33\x20\x2d\
+\x31\x37\x2e\x30\x36\x33\x37\x20\x34\x37\x2e\x31\x37\x36\x32\x20\
+\x2d\x32\x33\x2e\x38\x30\x34\x37\x20\x34\x37\x2e\x31\x37\x36\x32\
+\x20\x2d\x33\x32\x2e\x31\x32\x5a\x27\x20\x66\x69\x6c\x6c\x3d\x27\
+\x23\x30\x30\x30\x30\x30\x30\x27\x2f\x3e\x0a\x3c\x2f\x67\x3e\x0a\
+\x3c\x2f\x67\x3e\x0a\x3c\x2f\x73\x76\x67\x3e\
\x00\x00\x03\x26\
\x3c\
\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\
@@ -794,86 +1308,6 @@ qt_resource_data = b"\
\x48\x39\x36\x76\x33\x32\x68\x33\x32\x30\x56\x39\x36\x7a\x22\x2f\
\x3e\x0d\x0a\x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\x73\x76\x67\x3e\x0d\
\x0a\
-\x00\x00\x04\xd5\
-\x3c\
-\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x27\x31\x2e\
-\x30\x27\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x27\x55\x54\x46\
-\x2d\x38\x27\x3f\x3e\x0a\x3c\x21\x2d\x2d\x20\x54\x68\x69\x73\x20\
-\x66\x69\x6c\x65\x20\x77\x61\x73\x20\x67\x65\x6e\x65\x72\x61\x74\
-\x65\x64\x20\x62\x79\x20\x64\x76\x69\x73\x76\x67\x6d\x20\x32\x2e\
-\x38\x20\x2d\x2d\x3e\x0a\x3c\x73\x76\x67\x20\x76\x65\x72\x73\x69\
-\x6f\x6e\x3d\x27\x31\x2e\x31\x27\x20\x78\x6d\x6c\x6e\x73\x3d\x27\
-\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\
-\x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x27\x20\x78\x6d\x6c\x6e\
-\x73\x3a\x78\x6c\x69\x6e\x6b\x3d\x27\x68\x74\x74\x70\x3a\x2f\x2f\
-\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\x39\x39\x39\x2f\
-\x78\x6c\x69\x6e\x6b\x27\x20\x77\x69\x64\x74\x68\x3d\x27\x36\x33\
-\x2e\x39\x39\x39\x36\x70\x74\x27\x20\x68\x65\x69\x67\x68\x74\x3d\
-\x27\x36\x33\x2e\x39\x39\x39\x37\x70\x74\x27\x20\x76\x69\x65\x77\
-\x42\x6f\x78\x3d\x27\x35\x36\x2e\x34\x30\x39\x34\x20\x35\x33\x2e\
-\x38\x35\x38\x33\x20\x36\x33\x2e\x39\x39\x39\x36\x20\x36\x33\x2e\
-\x39\x39\x39\x37\x27\x3e\x0a\x3c\x67\x20\x69\x64\x3d\x27\x70\x61\
-\x67\x65\x31\x27\x3e\x0a\x3c\x67\x20\x74\x72\x61\x6e\x73\x66\x6f\
-\x72\x6d\x3d\x27\x6d\x61\x74\x72\x69\x78\x28\x30\x2e\x39\x39\x36\
-\x32\x36\x34\x20\x30\x20\x30\x20\x30\x2e\x39\x39\x36\x32\x36\x34\
-\x20\x35\x38\x2e\x34\x36\x36\x39\x20\x31\x31\x37\x2e\x38\x35\x38\
-\x29\x27\x3e\x0a\x3c\x70\x61\x74\x68\x20\x64\x3d\x27\x4d\x20\x33\
-\x2e\x39\x35\x37\x33\x35\x20\x2d\x33\x32\x2e\x31\x32\x43\x20\x32\
-\x2e\x32\x38\x39\x32\x32\x20\x2d\x33\x39\x2e\x33\x31\x31\x33\x20\
-\x36\x2e\x33\x36\x37\x30\x32\x20\x2d\x34\x36\x2e\x32\x33\x38\x36\
-\x20\x31\x31\x2e\x39\x30\x33\x36\x20\x2d\x35\x31\x2e\x33\x30\x33\
-\x39\x43\x20\x32\x39\x2e\x36\x36\x38\x37\x20\x2d\x36\x37\x2e\x35\
-\x35\x36\x38\x20\x35\x35\x2e\x32\x32\x39\x32\x20\x2d\x36\x30\x2e\
-\x36\x34\x32\x20\x35\x36\x2e\x31\x35\x32\x33\x20\x2d\x34\x32\x2e\
-\x35\x30\x32\x32\x43\x20\x35\x36\x2e\x36\x31\x33\x36\x20\x2d\x33\
-\x33\x2e\x34\x33\x38\x31\x20\x34\x39\x2e\x31\x31\x33\x32\x20\x2d\
-\x32\x36\x2e\x35\x39\x35\x39\x20\x34\x30\x2e\x36\x37\x39\x34\x20\
-\x2d\x32\x32\x2e\x35\x32\x38\x31\x43\x20\x32\x35\x2e\x33\x39\x39\
-\x35\x20\x2d\x31\x35\x2e\x31\x35\x38\x32\x20\x37\x2e\x31\x39\x39\
-\x33\x35\x20\x2d\x31\x38\x2e\x31\x34\x33\x36\x20\x33\x2e\x39\x35\
-\x37\x33\x35\x20\x2d\x33\x32\x2e\x31\x32\x5a\x27\x20\x66\x69\x6c\
-\x6c\x3d\x27\x6e\x6f\x6e\x65\x27\x20\x73\x74\x72\x6f\x6b\x65\x3d\
-\x27\x23\x30\x30\x30\x30\x30\x30\x27\x20\x73\x74\x72\x6f\x6b\x65\
-\x2d\x6c\x69\x6e\x65\x63\x61\x70\x3d\x27\x72\x6f\x75\x6e\x64\x27\
-\x20\x73\x74\x72\x6f\x6b\x65\x2d\x6c\x69\x6e\x65\x6a\x6f\x69\x6e\
-\x3d\x27\x72\x6f\x75\x6e\x64\x27\x20\x73\x74\x72\x6f\x6b\x65\x2d\
-\x6d\x69\x74\x65\x72\x6c\x69\x6d\x69\x74\x3d\x27\x31\x30\x2e\x30\
-\x33\x37\x35\x27\x20\x73\x74\x72\x6f\x6b\x65\x2d\x77\x69\x64\x74\
-\x68\x3d\x27\x32\x2e\x35\x30\x39\x33\x37\x27\x2f\x3e\x0a\x3c\x2f\
-\x67\x3e\x0a\x3c\x67\x20\x74\x72\x61\x6e\x73\x66\x6f\x72\x6d\x3d\
-\x27\x6d\x61\x74\x72\x69\x78\x28\x30\x2e\x39\x39\x36\x32\x36\x34\
-\x20\x30\x20\x30\x20\x30\x2e\x39\x39\x36\x32\x36\x34\x20\x35\x38\
-\x2e\x34\x36\x36\x39\x20\x31\x31\x37\x2e\x38\x35\x38\x29\x27\x3e\
-\x0a\x3c\x63\x69\x72\x63\x6c\x65\x20\x63\x78\x3d\x27\x33\x2e\x39\
-\x35\x37\x33\x35\x27\x20\x63\x79\x3d\x27\x2d\x33\x32\x2e\x31\x32\
-\x27\x20\x66\x69\x6c\x6c\x3d\x27\x23\x30\x30\x30\x30\x30\x30\x27\
-\x20\x72\x3d\x27\x36\x2e\x30\x32\x32\x35\x27\x2f\x3e\x0a\x3c\x2f\
-\x67\x3e\x0a\x3c\x67\x20\x74\x72\x61\x6e\x73\x66\x6f\x72\x6d\x3d\
-\x27\x6d\x61\x74\x72\x69\x78\x28\x30\x2e\x39\x39\x36\x32\x36\x34\
-\x20\x30\x20\x30\x20\x30\x2e\x39\x39\x36\x32\x36\x34\x20\x35\x38\
-\x2e\x34\x36\x36\x39\x20\x31\x31\x37\x2e\x38\x35\x38\x29\x27\x3e\
-\x0a\x3c\x63\x69\x72\x63\x6c\x65\x20\x63\x78\x3d\x27\x31\x31\x2e\
-\x39\x30\x33\x36\x27\x20\x63\x79\x3d\x27\x2d\x35\x31\x2e\x33\x30\
-\x33\x39\x27\x20\x66\x69\x6c\x6c\x3d\x27\x23\x30\x30\x30\x30\x30\
-\x30\x27\x20\x72\x3d\x27\x36\x2e\x30\x32\x32\x35\x27\x2f\x3e\x0a\
-\x3c\x2f\x67\x3e\x0a\x3c\x67\x20\x74\x72\x61\x6e\x73\x66\x6f\x72\
-\x6d\x3d\x27\x6d\x61\x74\x72\x69\x78\x28\x30\x2e\x39\x39\x36\x32\
-\x36\x34\x20\x30\x20\x30\x20\x30\x2e\x39\x39\x36\x32\x36\x34\x20\
-\x35\x38\x2e\x34\x36\x36\x39\x20\x31\x31\x37\x2e\x38\x35\x38\x29\
-\x27\x3e\x0a\x3c\x63\x69\x72\x63\x6c\x65\x20\x63\x78\x3d\x27\x35\
-\x36\x2e\x31\x35\x32\x33\x27\x20\x63\x79\x3d\x27\x2d\x34\x32\x2e\
-\x35\x30\x32\x32\x27\x20\x66\x69\x6c\x6c\x3d\x27\x23\x30\x30\x30\
-\x30\x30\x30\x27\x20\x72\x3d\x27\x36\x2e\x30\x32\x32\x35\x27\x2f\
-\x3e\x0a\x3c\x2f\x67\x3e\x0a\x3c\x67\x20\x74\x72\x61\x6e\x73\x66\
-\x6f\x72\x6d\x3d\x27\x6d\x61\x74\x72\x69\x78\x28\x30\x2e\x39\x39\
-\x36\x32\x36\x34\x20\x30\x20\x30\x20\x30\x2e\x39\x39\x36\x32\x36\
-\x34\x20\x35\x38\x2e\x34\x36\x36\x39\x20\x31\x31\x37\x2e\x38\x35\
-\x38\x29\x27\x3e\x0a\x3c\x63\x69\x72\x63\x6c\x65\x20\x63\x78\x3d\
-\x27\x34\x30\x2e\x36\x37\x39\x34\x27\x20\x63\x79\x3d\x27\x2d\x32\
-\x32\x2e\x35\x32\x38\x31\x27\x20\x66\x69\x6c\x6c\x3d\x27\x23\x30\
-\x30\x30\x30\x30\x30\x27\x20\x72\x3d\x27\x36\x2e\x30\x32\x32\x35\
-\x27\x2f\x3e\x0a\x3c\x2f\x67\x3e\x0a\x3c\x2f\x67\x3e\x0a\x3c\x2f\
-\x73\x76\x67\x3e\
\x00\x00\x03\x36\
\x3c\
\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\
@@ -928,13 +1362,13 @@ qt_resource_data = b"\
\x2c\x34\x34\x38\x20\x31\x39\x32\x2c\x33\x39\x36\x2e\x37\x39\x35\
\x20\x09\x22\x2f\x3e\x0d\x0a\x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\x73\
\x76\x67\x3e\x0d\x0a\
-\x00\x00\x02\x7d\
+\x00\x00\x03\x0c\
\x3c\
\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\
\x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x75\x74\x66\
\x2d\x38\x22\x3f\x3e\x0d\x0a\x3c\x21\x2d\x2d\x20\x47\x65\x6e\x65\
\x72\x61\x74\x6f\x72\x3a\x20\x41\x64\x6f\x62\x65\x20\x49\x6c\x6c\
-\x75\x73\x74\x72\x61\x74\x6f\x72\x20\x31\x36\x2e\x32\x2e\x31\x2c\
+\x75\x73\x74\x72\x61\x74\x6f\x72\x20\x31\x38\x2e\x31\x2e\x30\x2c\
\x20\x53\x56\x47\x20\x45\x78\x70\x6f\x72\x74\x20\x50\x6c\x75\x67\
\x2d\x49\x6e\x20\x2e\x20\x53\x56\x47\x20\x56\x65\x72\x73\x69\x6f\
\x6e\x3a\x20\x36\x2e\x30\x30\x20\x42\x75\x69\x6c\x64\x20\x30\x29\
@@ -946,37 +1380,46 @@ qt_resource_data = b"\
\x73\x2f\x53\x56\x47\x2f\x31\x2e\x31\x2f\x44\x54\x44\x2f\x73\x76\
\x67\x31\x31\x2e\x64\x74\x64\x22\x3e\x0d\x0a\x3c\x73\x76\x67\x20\
\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\x31\x22\x20\x69\x64\
-\x3d\x22\x4c\x61\x79\x65\x72\x5f\x31\x22\x20\x78\x6d\x6c\x6e\x73\
-\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\
-\x6f\x72\x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x22\x20\x78\x6d\
-\x6c\x6e\x73\x3a\x78\x6c\x69\x6e\x6b\x3d\x22\x68\x74\x74\x70\x3a\
-\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\x39\x39\
-\x39\x2f\x78\x6c\x69\x6e\x6b\x22\x20\x78\x3d\x22\x30\x70\x78\x22\
-\x20\x79\x3d\x22\x30\x70\x78\x22\x0d\x0a\x09\x20\x77\x69\x64\x74\
-\x68\x3d\x22\x35\x31\x32\x70\x78\x22\x20\x68\x65\x69\x67\x68\x74\
-\x3d\x22\x35\x31\x32\x70\x78\x22\x20\x76\x69\x65\x77\x42\x6f\x78\
-\x3d\x22\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\x32\x22\x20\x65\
-\x6e\x61\x62\x6c\x65\x2d\x62\x61\x63\x6b\x67\x72\x6f\x75\x6e\x64\
-\x3d\x22\x6e\x65\x77\x20\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\
-\x32\x22\x20\x78\x6d\x6c\x3a\x73\x70\x61\x63\x65\x3d\x22\x70\x72\
-\x65\x73\x65\x72\x76\x65\x22\x3e\x0d\x0a\x3c\x67\x20\x69\x64\x3d\
-\x22\x49\x63\x6f\x6e\x5f\x38\x5f\x22\x3e\x0d\x0a\x09\x3c\x67\x3e\
-\x0d\x0a\x09\x09\x3c\x70\x61\x74\x68\x20\x64\x3d\x22\x4d\x34\x32\
-\x37\x2c\x32\x33\x34\x2e\x36\x32\x35\x48\x31\x36\x37\x2e\x32\x39\
-\x36\x6c\x31\x31\x39\x2e\x37\x30\x32\x2d\x31\x31\x39\x2e\x37\x30\
-\x32\x4c\x32\x35\x36\x2c\x38\x35\x4c\x38\x35\x2c\x32\x35\x36\x6c\
-\x31\x37\x31\x2c\x31\x37\x31\x6c\x32\x39\x2e\x39\x32\x32\x2d\x32\
-\x39\x2e\x39\x32\x34\x4c\x31\x36\x37\x2e\x32\x39\x36\x2c\x32\x37\
-\x37\x2e\x33\x37\x35\x48\x34\x32\x37\x56\x32\x33\x34\x2e\x36\x32\
-\x35\x7a\x22\x2f\x3e\x0d\x0a\x09\x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\
-\x67\x3e\x0d\x0a\x3c\x2f\x73\x76\x67\x3e\x0d\x0a\
-\x00\x00\x05\x27\
+\x3d\x22\x43\x68\x65\x63\x6b\x22\x20\x78\x6d\x6c\x6e\x73\x3d\x22\
+\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\
+\x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x22\x20\x78\x6d\x6c\x6e\
+\x73\x3a\x78\x6c\x69\x6e\x6b\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\
+\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\x39\x39\x39\x2f\
+\x78\x6c\x69\x6e\x6b\x22\x20\x78\x3d\x22\x30\x70\x78\x22\x20\x79\
+\x3d\x22\x30\x70\x78\x22\x0d\x0a\x09\x20\x76\x69\x65\x77\x42\x6f\
+\x78\x3d\x22\x30\x20\x30\x20\x32\x30\x20\x32\x30\x22\x20\x65\x6e\
+\x61\x62\x6c\x65\x2d\x62\x61\x63\x6b\x67\x72\x6f\x75\x6e\x64\x3d\
+\x22\x6e\x65\x77\x20\x30\x20\x30\x20\x32\x30\x20\x32\x30\x22\x20\
+\x78\x6d\x6c\x3a\x73\x70\x61\x63\x65\x3d\x22\x70\x72\x65\x73\x65\
+\x72\x76\x65\x22\x3e\x0d\x0a\x3c\x70\x61\x74\x68\x20\x64\x3d\x22\
+\x4d\x38\x2e\x32\x39\x34\x2c\x31\x36\x2e\x39\x39\x38\x63\x2d\x30\
+\x2e\x34\x33\x35\x2c\x30\x2d\x30\x2e\x38\x34\x37\x2d\x30\x2e\x32\
+\x30\x33\x2d\x31\x2e\x31\x31\x31\x2d\x30\x2e\x35\x35\x33\x4c\x33\
+\x2e\x36\x31\x2c\x31\x31\x2e\x37\x32\x34\x63\x2d\x30\x2e\x34\x36\
+\x35\x2d\x30\x2e\x36\x31\x33\x2d\x30\x2e\x33\x34\x34\x2d\x31\x2e\
+\x34\x38\x36\x2c\x30\x2e\x32\x37\x2d\x31\x2e\x39\x35\x31\x0d\x0a\
+\x09\x63\x30\x2e\x36\x31\x35\x2d\x30\x2e\x34\x36\x37\x2c\x31\x2e\
+\x34\x38\x38\x2d\x30\x2e\x33\x34\x34\x2c\x31\x2e\x39\x35\x33\x2c\
+\x30\x2e\x32\x37\x6c\x32\x2e\x33\x35\x31\x2c\x33\x2e\x31\x30\x34\
+\x6c\x35\x2e\x39\x31\x31\x2d\x39\x2e\x34\x39\x32\x63\x30\x2e\x34\
+\x30\x37\x2d\x30\x2e\x36\x35\x32\x2c\x31\x2e\x32\x36\x37\x2d\x30\
+\x2e\x38\x35\x32\x2c\x31\x2e\x39\x32\x31\x2d\x30\x2e\x34\x34\x35\
+\x0d\x0a\x09\x63\x30\x2e\x36\x35\x33\x2c\x30\x2e\x34\x30\x36\x2c\
+\x30\x2e\x38\x35\x34\x2c\x31\x2e\x32\x36\x36\x2c\x30\x2e\x34\x34\
+\x36\x2c\x31\x2e\x39\x32\x4c\x39\x2e\x34\x37\x38\x2c\x31\x36\x2e\
+\x33\x34\x63\x2d\x30\x2e\x32\x34\x32\x2c\x30\x2e\x33\x39\x31\x2d\
+\x30\x2e\x36\x36\x31\x2c\x30\x2e\x36\x33\x35\x2d\x31\x2e\x31\x32\
+\x2c\x30\x2e\x36\x35\x36\x43\x38\x2e\x33\x33\x36\x2c\x31\x36\x2e\
+\x39\x39\x38\x2c\x38\x2e\x33\x31\x36\x2c\x31\x36\x2e\x39\x39\x38\
+\x2c\x38\x2e\x32\x39\x34\x2c\x31\x36\x2e\x39\x39\x38\x7a\x22\x2f\
+\x3e\x0d\x0a\x3c\x2f\x73\x76\x67\x3e\x0d\x0a\
+\x00\x00\x03\xf5\
\x3c\
\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\
\x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x75\x74\x66\
\x2d\x38\x22\x3f\x3e\x0d\x0a\x3c\x21\x2d\x2d\x20\x47\x65\x6e\x65\
\x72\x61\x74\x6f\x72\x3a\x20\x41\x64\x6f\x62\x65\x20\x49\x6c\x6c\
-\x75\x73\x74\x72\x61\x74\x6f\x72\x20\x31\x36\x2e\x32\x2e\x31\x2c\
+\x75\x73\x74\x72\x61\x74\x6f\x72\x20\x31\x38\x2e\x31\x2e\x31\x2c\
\x20\x53\x56\x47\x20\x45\x78\x70\x6f\x72\x74\x20\x50\x6c\x75\x67\
\x2d\x49\x6e\x20\x2e\x20\x53\x56\x47\x20\x56\x65\x72\x73\x69\x6f\
\x6e\x3a\x20\x36\x2e\x30\x30\x20\x42\x75\x69\x6c\x64\x20\x30\x29\
@@ -988,74 +1431,55 @@ qt_resource_data = b"\
\x73\x2f\x53\x56\x47\x2f\x31\x2e\x31\x2f\x44\x54\x44\x2f\x73\x76\
\x67\x31\x31\x2e\x64\x74\x64\x22\x3e\x0d\x0a\x3c\x73\x76\x67\x20\
\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\x31\x22\x20\x69\x64\
-\x3d\x22\x4c\x61\x79\x65\x72\x5f\x31\x22\x20\x78\x6d\x6c\x6e\x73\
-\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\
-\x6f\x72\x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x22\x20\x78\x6d\
-\x6c\x6e\x73\x3a\x78\x6c\x69\x6e\x6b\x3d\x22\x68\x74\x74\x70\x3a\
-\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\x39\x39\
-\x39\x2f\x78\x6c\x69\x6e\x6b\x22\x20\x78\x3d\x22\x30\x70\x78\x22\
-\x20\x79\x3d\x22\x30\x70\x78\x22\x0d\x0a\x09\x20\x77\x69\x64\x74\
-\x68\x3d\x22\x35\x31\x32\x70\x78\x22\x20\x68\x65\x69\x67\x68\x74\
-\x3d\x22\x35\x31\x32\x70\x78\x22\x20\x76\x69\x65\x77\x42\x6f\x78\
+\x3d\x22\x43\x68\x65\x76\x72\x6f\x6e\x5f\x63\x69\x72\x63\x6c\x65\
+\x64\x5f\x6c\x65\x66\x74\x22\x20\x78\x6d\x6c\x6e\x73\x3d\x22\x68\
+\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\
+\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x22\x20\x78\x6d\x6c\x6e\x73\
+\x3a\x78\x6c\x69\x6e\x6b\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\
+\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\x39\x39\x39\x2f\x78\
+\x6c\x69\x6e\x6b\x22\x0d\x0a\x09\x20\x78\x3d\x22\x30\x70\x78\x22\
+\x20\x79\x3d\x22\x30\x70\x78\x22\x20\x76\x69\x65\x77\x42\x6f\x78\
\x3d\x22\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\x32\x22\x20\x65\
\x6e\x61\x62\x6c\x65\x2d\x62\x61\x63\x6b\x67\x72\x6f\x75\x6e\x64\
\x3d\x22\x6e\x65\x77\x20\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\
\x32\x22\x20\x78\x6d\x6c\x3a\x73\x70\x61\x63\x65\x3d\x22\x70\x72\
-\x65\x73\x65\x72\x76\x65\x22\x3e\x0d\x0a\x3c\x67\x20\x69\x64\x3d\
-\x22\x49\x63\x6f\x6e\x5f\x31\x32\x5f\x22\x3e\x0d\x0a\x09\x3c\x67\
-\x3e\x0d\x0a\x09\x09\x3c\x70\x61\x74\x68\x20\x64\x3d\x22\x4d\x32\
-\x35\x36\x2c\x36\x34\x43\x31\x35\x30\x2e\x34\x30\x31\x2c\x36\x34\
-\x2c\x36\x34\x2c\x31\x35\x30\x2e\x34\x30\x31\x2c\x36\x34\x2c\x32\
-\x35\x36\x63\x30\x2c\x31\x30\x35\x2e\x36\x30\x34\x2c\x38\x36\x2e\
-\x34\x30\x31\x2c\x31\x39\x32\x2c\x31\x39\x32\x2c\x31\x39\x32\x63\
-\x31\x38\x2e\x31\x33\x36\x2c\x30\x2c\x33\x32\x2d\x31\x33\x2e\x38\
-\x36\x34\x2c\x33\x32\x2d\x33\x32\x0d\x0a\x09\x09\x09\x63\x30\x2d\
-\x38\x2e\x35\x33\x31\x2d\x33\x2e\x31\x39\x38\x2d\x31\x36\x2d\x38\
-\x2e\x35\x33\x31\x2d\x32\x31\x2e\x33\x33\x33\x63\x2d\x35\x2e\x33\
-\x33\x33\x2d\x35\x2e\x33\x33\x34\x2d\x38\x2e\x35\x33\x31\x2d\x31\
-\x32\x2e\x38\x30\x33\x2d\x38\x2e\x35\x33\x31\x2d\x32\x31\x2e\x33\
-\x33\x34\x63\x30\x2d\x31\x38\x2e\x31\x33\x35\x2c\x31\x33\x2e\x38\
-\x36\x34\x2d\x33\x32\x2c\x33\x32\x2d\x33\x32\x68\x33\x38\x2e\x33\
-\x39\x36\x0d\x0a\x09\x09\x09\x63\x35\x38\x2e\x36\x36\x37\x2c\x30\
-\x2c\x31\x30\x36\x2e\x36\x36\x37\x2d\x34\x38\x2c\x31\x30\x36\x2e\
-\x36\x36\x37\x2d\x31\x30\x36\x2e\x36\x36\x36\x43\x34\x34\x38\x2c\
-\x31\x34\x30\x2e\x38\x30\x32\x2c\x33\x36\x31\x2e\x36\x30\x34\x2c\
-\x36\x34\x2c\x32\x35\x36\x2c\x36\x34\x7a\x20\x4d\x31\x33\x38\x2e\
-\x36\x36\x37\x2c\x32\x35\x36\x63\x2d\x31\x38\x2e\x31\x33\x36\x2c\
-\x30\x2d\x33\x32\x2d\x31\x33\x2e\x38\x36\x34\x2d\x33\x32\x2d\x33\
-\x32\x73\x31\x33\x2e\x38\x36\x34\x2d\x33\x32\x2c\x33\x32\x2d\x33\
-\x32\x0d\x0a\x09\x09\x09\x63\x31\x38\x2e\x31\x33\x35\x2c\x30\x2c\
-\x33\x32\x2c\x31\x33\x2e\x38\x36\x34\x2c\x33\x32\x2c\x33\x32\x53\
-\x31\x35\x36\x2e\x38\x30\x32\x2c\x32\x35\x36\x2c\x31\x33\x38\x2e\
-\x36\x36\x37\x2c\x32\x35\x36\x7a\x20\x4d\x32\x30\x32\x2e\x36\x36\
-\x37\x2c\x31\x37\x30\x2e\x36\x36\x37\x63\x2d\x31\x38\x2e\x31\x33\
-\x36\x2c\x30\x2d\x33\x32\x2d\x31\x33\x2e\x38\x36\x35\x2d\x33\x32\
-\x2d\x33\x32\x63\x30\x2d\x31\x38\x2e\x31\x33\x36\x2c\x31\x33\x2e\
-\x38\x36\x34\x2d\x33\x32\x2c\x33\x32\x2d\x33\x32\x0d\x0a\x09\x09\
-\x09\x63\x31\x38\x2e\x31\x33\x35\x2c\x30\x2c\x33\x32\x2c\x31\x33\
-\x2e\x38\x36\x34\x2c\x33\x32\x2c\x33\x32\x43\x32\x33\x34\x2e\x36\
-\x36\x37\x2c\x31\x35\x36\x2e\x38\x30\x32\x2c\x32\x32\x30\x2e\x38\
-\x30\x32\x2c\x31\x37\x30\x2e\x36\x36\x37\x2c\x32\x30\x32\x2e\x36\
-\x36\x37\x2c\x31\x37\x30\x2e\x36\x36\x37\x7a\x20\x4d\x33\x30\x39\
-\x2e\x33\x33\x33\x2c\x31\x37\x30\x2e\x36\x36\x37\x63\x2d\x31\x38\
-\x2e\x31\x33\x35\x2c\x30\x2d\x33\x32\x2d\x31\x33\x2e\x38\x36\x35\
-\x2d\x33\x32\x2d\x33\x32\x0d\x0a\x09\x09\x09\x63\x30\x2d\x31\x38\
-\x2e\x31\x33\x36\x2c\x31\x33\x2e\x38\x36\x35\x2d\x33\x32\x2c\x33\
-\x32\x2d\x33\x32\x63\x31\x38\x2e\x31\x33\x36\x2c\x30\x2c\x33\x32\
-\x2c\x31\x33\x2e\x38\x36\x34\x2c\x33\x32\x2c\x33\x32\x43\x33\x34\
-\x31\x2e\x33\x33\x33\x2c\x31\x35\x36\x2e\x38\x30\x32\x2c\x33\x32\
-\x37\x2e\x34\x36\x39\x2c\x31\x37\x30\x2e\x36\x36\x37\x2c\x33\x30\
-\x39\x2e\x33\x33\x33\x2c\x31\x37\x30\x2e\x36\x36\x37\x7a\x20\x4d\
-\x33\x37\x33\x2e\x33\x33\x33\x2c\x32\x35\x36\x0d\x0a\x09\x09\x09\
-\x63\x2d\x31\x38\x2e\x31\x33\x35\x2c\x30\x2d\x33\x32\x2d\x31\x33\
-\x2e\x38\x36\x34\x2d\x33\x32\x2d\x33\x32\x73\x31\x33\x2e\x38\x36\
-\x35\x2d\x33\x32\x2c\x33\x32\x2d\x33\x32\x63\x31\x38\x2e\x31\x33\
-\x36\x2c\x30\x2c\x33\x32\x2c\x31\x33\x2e\x38\x36\x34\x2c\x33\x32\
-\x2c\x33\x32\x53\x33\x39\x31\x2e\x34\x36\x39\x2c\x32\x35\x36\x2c\
-\x33\x37\x33\x2e\x33\x33\x33\x2c\x32\x35\x36\x7a\x22\x2f\x3e\x0d\
-\x0a\x09\x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\
-\x73\x76\x67\x3e\x0d\x0a\
-\x00\x00\x02\x7d\
+\x65\x73\x65\x72\x76\x65\x22\x3e\x0d\x0a\x3c\x67\x20\x74\x72\x61\
+\x6e\x73\x66\x6f\x72\x6d\x3d\x27\x6d\x61\x74\x72\x69\x78\x28\x32\
+\x34\x20\x30\x20\x30\x20\x32\x34\x20\x30\x20\x30\x29\x27\x3e\x0d\
+\x0a\x3c\x70\x61\x74\x68\x20\x64\x3d\x22\x4d\x31\x31\x2e\x33\x30\
+\x32\x2c\x36\x2e\x37\x37\x36\x63\x2d\x30\x2e\x31\x39\x36\x2d\x30\
+\x2e\x31\x39\x37\x2d\x30\x2e\x35\x31\x35\x2d\x30\x2e\x31\x39\x37\
+\x2d\x30\x2e\x37\x31\x2c\x30\x4c\x37\x2e\x37\x38\x35\x2c\x39\x2e\
+\x36\x34\x31\x63\x2d\x30\x2e\x31\x39\x36\x2c\x30\x2e\x31\x39\x39\
+\x2d\x30\x2e\x31\x39\x36\x2c\x30\x2e\x35\x32\x2c\x30\x2c\x30\x2e\
+\x37\x31\x37\x6c\x32\x2e\x38\x30\x37\x2c\x32\x2e\x38\x36\x34\x0d\
+\x0a\x09\x63\x30\x2e\x31\x39\x35\x2c\x30\x2e\x31\x39\x39\x2c\x30\
+\x2e\x35\x31\x34\x2c\x30\x2e\x31\x39\x38\x2c\x30\x2e\x37\x31\x2c\
+\x30\x63\x30\x2e\x31\x39\x36\x2d\x30\x2e\x31\x39\x37\x2c\x30\x2e\
+\x31\x39\x36\x2d\x30\x2e\x35\x31\x38\x2c\x30\x2d\x30\x2e\x37\x31\
+\x37\x4c\x39\x2c\x31\x30\x6c\x32\x2e\x33\x30\x32\x2d\x32\x2e\x35\
+\x30\x36\x43\x31\x31\x2e\x34\x39\x38\x2c\x37\x2e\x32\x39\x36\x2c\
+\x31\x31\x2e\x34\x39\x38\x2c\x36\x2e\x39\x37\x36\x2c\x31\x31\x2e\
+\x33\x30\x32\x2c\x36\x2e\x37\x37\x36\x7a\x0d\x0a\x09\x20\x4d\x31\
+\x30\x2c\x30\x2e\x34\x63\x2d\x35\x2e\x33\x30\x32\x2c\x30\x2d\x39\
+\x2e\x36\x2c\x34\x2e\x32\x39\x38\x2d\x39\x2e\x36\x2c\x39\x2e\x36\
+\x63\x30\x2c\x35\x2e\x33\x30\x33\x2c\x34\x2e\x32\x39\x38\x2c\x39\
+\x2e\x36\x2c\x39\x2e\x36\x2c\x39\x2e\x36\x73\x39\x2e\x36\x2d\x34\
+\x2e\x32\x39\x37\x2c\x39\x2e\x36\x2d\x39\x2e\x36\x43\x31\x39\x2e\
+\x36\x2c\x34\x2e\x36\x39\x38\x2c\x31\x35\x2e\x33\x30\x32\x2c\x30\
+\x2e\x34\x2c\x31\x30\x2c\x30\x2e\x34\x7a\x20\x4d\x31\x30\x2c\x31\
+\x38\x2e\x33\x35\x34\x0d\x0a\x09\x63\x2d\x34\x2e\x36\x31\x35\x2c\
+\x30\x2d\x38\x2e\x33\x35\x34\x2d\x33\x2e\x37\x34\x2d\x38\x2e\x33\
+\x35\x34\x2d\x38\x2e\x33\x35\x34\x63\x30\x2d\x34\x2e\x36\x31\x34\
+\x2c\x33\x2e\x37\x33\x39\x2d\x38\x2e\x33\x35\x34\x2c\x38\x2e\x33\
+\x35\x34\x2d\x38\x2e\x33\x35\x34\x63\x34\x2e\x36\x31\x33\x2c\x30\
+\x2c\x38\x2e\x33\x35\x34\x2c\x33\x2e\x37\x34\x2c\x38\x2e\x33\x35\
+\x34\x2c\x38\x2e\x33\x35\x34\x0d\x0a\x09\x43\x31\x38\x2e\x33\x35\
+\x34\x2c\x31\x34\x2e\x36\x31\x34\x2c\x31\x34\x2e\x36\x31\x33\x2c\
+\x31\x38\x2e\x33\x35\x34\x2c\x31\x30\x2c\x31\x38\x2e\x33\x35\x34\
+\x7a\x22\x2f\x3e\x0d\x0a\x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\x73\x76\
+\x67\x3e\x0d\x0a\
+\x00\x00\x02\xc9\
\x3c\
\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\
\x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x75\x74\x66\
@@ -1082,114 +1506,94 @@ qt_resource_data = b"\
\x20\x79\x3d\x22\x30\x70\x78\x22\x0d\x0a\x09\x20\x77\x69\x64\x74\
\x68\x3d\x22\x35\x31\x32\x70\x78\x22\x20\x68\x65\x69\x67\x68\x74\
\x3d\x22\x35\x31\x32\x70\x78\x22\x20\x76\x69\x65\x77\x42\x6f\x78\
-\x3d\x22\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\x32\x22\x20\x65\
-\x6e\x61\x62\x6c\x65\x2d\x62\x61\x63\x6b\x67\x72\x6f\x75\x6e\x64\
-\x3d\x22\x6e\x65\x77\x20\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\
-\x32\x22\x20\x78\x6d\x6c\x3a\x73\x70\x61\x63\x65\x3d\x22\x70\x72\
-\x65\x73\x65\x72\x76\x65\x22\x3e\x0d\x0a\x3c\x67\x20\x69\x64\x3d\
-\x22\x49\x63\x6f\x6e\x5f\x38\x5f\x22\x3e\x0d\x0a\x09\x3c\x67\x3e\
-\x0d\x0a\x09\x09\x3c\x70\x61\x74\x68\x20\x64\x3d\x22\x4d\x38\x35\
-\x2c\x32\x37\x37\x2e\x33\x37\x35\x68\x32\x35\x39\x2e\x37\x30\x34\
-\x4c\x32\x32\x35\x2e\x30\x30\x32\x2c\x33\x39\x37\x2e\x30\x37\x37\
-\x4c\x32\x35\x36\x2c\x34\x32\x37\x6c\x31\x37\x31\x2d\x31\x37\x31\
-\x4c\x32\x35\x36\x2c\x38\x35\x6c\x2d\x32\x39\x2e\x39\x32\x32\x2c\
-\x32\x39\x2e\x39\x32\x34\x6c\x31\x31\x38\x2e\x36\x32\x36\x2c\x31\
-\x31\x39\x2e\x37\x30\x31\x48\x38\x35\x56\x32\x37\x37\x2e\x33\x37\
-\x35\x7a\x22\x2f\x3e\x0d\x0a\x09\x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\
-\x67\x3e\x0d\x0a\x3c\x2f\x73\x76\x67\x3e\x0d\x0a\
-\x00\x00\x03\x52\
+\x3d\x22\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\x32\x22\x20\x73\
+\x74\x79\x6c\x65\x3d\x22\x65\x6e\x61\x62\x6c\x65\x2d\x62\x61\x63\
+\x6b\x67\x72\x6f\x75\x6e\x64\x3a\x6e\x65\x77\x20\x30\x20\x30\x20\
+\x35\x31\x32\x20\x35\x31\x32\x3b\x22\x20\x78\x6d\x6c\x3a\x73\x70\
+\x61\x63\x65\x3d\x22\x70\x72\x65\x73\x65\x72\x76\x65\x22\x3e\x0d\
+\x0a\x3c\x70\x6f\x6c\x79\x67\x6f\x6e\x20\x70\x6f\x69\x6e\x74\x73\
+\x3d\x22\x34\x38\x30\x2c\x32\x35\x36\x20\x33\x38\x34\x2c\x31\x36\
+\x30\x20\x33\x38\x34\x2c\x32\x33\x36\x20\x32\x37\x36\x2c\x32\x33\
+\x36\x20\x32\x37\x36\x2c\x31\x32\x38\x20\x33\x35\x32\x2c\x31\x32\
+\x38\x20\x32\x35\x36\x2c\x33\x32\x20\x31\x36\x30\x2c\x31\x32\x38\
+\x20\x32\x33\x36\x2c\x31\x32\x38\x20\x32\x33\x36\x2c\x32\x33\x36\
+\x20\x31\x32\x38\x2c\x32\x33\x36\x20\x31\x32\x38\x2c\x31\x36\x30\
+\x20\x33\x32\x2c\x32\x35\x36\x20\x31\x32\x38\x2c\x33\x35\x32\x20\
+\x0d\x0a\x09\x31\x32\x38\x2c\x32\x37\x36\x20\x32\x33\x36\x2c\x32\
+\x37\x36\x20\x32\x33\x36\x2c\x33\x38\x34\x20\x31\x36\x30\x2c\x33\
+\x38\x34\x20\x32\x35\x36\x2c\x34\x38\x30\x20\x33\x35\x32\x2c\x33\
+\x38\x34\x20\x32\x37\x35\x2e\x38\x2c\x33\x38\x34\x20\x32\x37\x35\
+\x2e\x34\x2c\x32\x37\x35\x2e\x35\x20\x33\x38\x34\x2c\x32\x37\x35\
+\x2e\x38\x20\x33\x38\x34\x2c\x33\x35\x32\x20\x22\x2f\x3e\x0d\x0a\
+\x3c\x2f\x73\x76\x67\x3e\x0d\x0a\
+\x00\x00\x04\x1c\
\x3c\
-\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\
-\x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x75\x74\x66\
-\x2d\x38\x22\x3f\x3e\x0d\x0a\x3c\x21\x2d\x2d\x20\x47\x65\x6e\x65\
-\x72\x61\x74\x6f\x72\x3a\x20\x41\x64\x6f\x62\x65\x20\x49\x6c\x6c\
-\x75\x73\x74\x72\x61\x74\x6f\x72\x20\x31\x36\x2e\x32\x2e\x31\x2c\
-\x20\x53\x56\x47\x20\x45\x78\x70\x6f\x72\x74\x20\x50\x6c\x75\x67\
-\x2d\x49\x6e\x20\x2e\x20\x53\x56\x47\x20\x56\x65\x72\x73\x69\x6f\
-\x6e\x3a\x20\x36\x2e\x30\x30\x20\x42\x75\x69\x6c\x64\x20\x30\x29\
-\x20\x20\x2d\x2d\x3e\x0d\x0a\x3c\x21\x44\x4f\x43\x54\x59\x50\x45\
-\x20\x73\x76\x67\x20\x50\x55\x42\x4c\x49\x43\x20\x22\x2d\x2f\x2f\
-\x57\x33\x43\x2f\x2f\x44\x54\x44\x20\x53\x56\x47\x20\x31\x2e\x31\
-\x2f\x2f\x45\x4e\x22\x20\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\
-\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x47\x72\x61\x70\x68\x69\x63\
-\x73\x2f\x53\x56\x47\x2f\x31\x2e\x31\x2f\x44\x54\x44\x2f\x73\x76\
-\x67\x31\x31\x2e\x64\x74\x64\x22\x3e\x0d\x0a\x3c\x73\x76\x67\x20\
-\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\x31\x22\x20\x69\x64\
-\x3d\x22\x4c\x61\x79\x65\x72\x5f\x31\x22\x20\x78\x6d\x6c\x6e\x73\
-\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\
-\x6f\x72\x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x22\x20\x78\x6d\
-\x6c\x6e\x73\x3a\x78\x6c\x69\x6e\x6b\x3d\x22\x68\x74\x74\x70\x3a\
-\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\x39\x39\
-\x39\x2f\x78\x6c\x69\x6e\x6b\x22\x20\x78\x3d\x22\x30\x70\x78\x22\
-\x20\x79\x3d\x22\x30\x70\x78\x22\x0d\x0a\x09\x20\x77\x69\x64\x74\
-\x68\x3d\x22\x35\x31\x32\x70\x78\x22\x20\x68\x65\x69\x67\x68\x74\
-\x3d\x22\x35\x31\x32\x70\x78\x22\x20\x76\x69\x65\x77\x42\x6f\x78\
-\x3d\x22\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\x32\x22\x20\x65\
-\x6e\x61\x62\x6c\x65\x2d\x62\x61\x63\x6b\x67\x72\x6f\x75\x6e\x64\
-\x3d\x22\x6e\x65\x77\x20\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\
-\x32\x22\x20\x78\x6d\x6c\x3a\x73\x70\x61\x63\x65\x3d\x22\x70\x72\
-\x65\x73\x65\x72\x76\x65\x22\x3e\x0d\x0a\x3c\x70\x61\x74\x68\x20\
-\x64\x3d\x22\x4d\x34\x33\x37\x2e\x33\x33\x34\x2c\x31\x34\x34\x48\
-\x32\x35\x36\x2e\x30\x30\x36\x6c\x2d\x34\x32\x2e\x36\x36\x38\x2d\
-\x34\x38\x48\x37\x34\x2e\x36\x36\x36\x43\x35\x31\x2e\x31\x39\x37\
-\x2c\x39\x36\x2c\x33\x32\x2c\x31\x31\x35\x2e\x31\x39\x38\x2c\x33\
-\x32\x2c\x31\x33\x38\x2e\x36\x36\x37\x76\x32\x33\x34\x2e\x36\x36\
-\x36\x43\x33\x32\x2c\x33\x39\x36\x2e\x38\x30\x32\x2c\x35\x31\x2e\
-\x31\x39\x37\x2c\x34\x31\x36\x2c\x37\x34\x2e\x36\x36\x36\x2c\x34\
-\x31\x36\x68\x33\x36\x32\x2e\x36\x36\x38\x0d\x0a\x09\x43\x34\x36\
-\x30\x2e\x38\x30\x33\x2c\x34\x31\x36\x2c\x34\x38\x30\x2c\x33\x39\
-\x36\x2e\x38\x30\x32\x2c\x34\x38\x30\x2c\x33\x37\x33\x2e\x33\x33\
-\x33\x56\x31\x38\x36\x2e\x36\x36\x37\x43\x34\x38\x30\x2c\x31\x36\
-\x33\x2e\x31\x39\x38\x2c\x34\x36\x30\x2e\x38\x30\x33\x2c\x31\x34\
-\x34\x2c\x34\x33\x37\x2e\x33\x33\x34\x2c\x31\x34\x34\x7a\x20\x4d\
-\x34\x34\x38\x2c\x33\x37\x33\x2e\x33\x33\x33\x0d\x0a\x09\x63\x30\
-\x2c\x35\x2e\x37\x38\x32\x2d\x34\x2e\x38\x38\x35\x2c\x31\x30\x2e\
-\x36\x36\x37\x2d\x31\x30\x2e\x36\x36\x36\x2c\x31\x30\x2e\x36\x36\
-\x37\x48\x37\x34\x2e\x36\x36\x36\x43\x36\x38\x2e\x38\x38\x34\x2c\
-\x33\x38\x34\x2c\x36\x34\x2c\x33\x37\x39\x2e\x31\x31\x35\x2c\x36\
-\x34\x2c\x33\x37\x33\x2e\x33\x33\x33\x56\x31\x37\x36\x68\x33\x37\
-\x33\x2e\x33\x33\x34\x63\x35\x2e\x37\x38\x31\x2c\x30\x2c\x31\x30\
-\x2e\x36\x36\x36\x2c\x34\x2e\x38\x38\x35\x2c\x31\x30\x2e\x36\x36\
-\x36\x2c\x31\x30\x2e\x36\x36\x37\x0d\x0a\x09\x56\x33\x37\x33\x2e\
-\x33\x33\x33\x7a\x22\x2f\x3e\x0d\x0a\x3c\x2f\x73\x76\x67\x3e\x0d\
-\x0a\
-\x00\x00\x02\x21\
-\x00\
-\x00\x07\xaf\x78\x9c\xdd\x55\x4d\x6f\x9c\x30\x10\xbd\xf7\x57\x4c\
-\xd5\x83\xdb\x03\xc6\xdf\x86\x28\x24\x52\x57\xea\x29\xbd\x25\x97\
-\xde\x68\xf0\x82\x9b\x5d\x58\x01\x5d\xb6\xff\xbe\x66\xd7\x60\x4a\
-\xaa\xf4\x92\x43\x15\x90\x30\xf3\x18\xbf\x99\xe7\xf1\x98\xeb\xdb\
-\xd3\x7e\x07\x47\xd3\x76\xb6\xa9\x33\x44\x31\x41\x60\xea\xc7\xa6\
-\xb0\x75\x99\xa1\x87\xfb\x2f\x51\x82\x6e\x6f\xde\x5d\xbf\x8f\x22\
-\xb8\xaf\x6c\x07\x5b\xbb\x33\x30\xe4\x1d\x94\xa6\x36\x6d\xde\x9b\
-\x02\xbe\xff\x82\xe2\x68\xbb\x63\xb9\x07\x86\x13\x88\x22\xe7\xef\
-\xac\x25\x2b\x45\xe0\xe2\xd4\x5d\x86\xaa\xbe\x3f\x5c\xc5\xf1\x30\
-\x0c\x78\xe0\xb8\x69\xcb\x98\x11\x42\x62\xe7\xef\x5d\xae\x4e\x3b\
-\x5b\x3f\xfd\xcd\x91\xa6\x69\x1a\x9f\xbf\x22\x18\x6c\xd1\x57\x19\
-\x52\x1c\x3b\x50\x1d\x7a\x04\x95\xb1\x65\xd5\x4f\x90\x1e\xa1\xa3\
-\x35\xc3\xe7\xe6\x94\x21\xa9\xb0\x20\xa9\x00\xc9\x71\x22\x13\x0e\
-\x7e\x9a\x1f\x35\x72\x09\x97\x60\x8b\x0c\x1d\xf2\xd2\xd0\x8b\xd9\
-\xb7\x79\xdd\x6d\x9b\x76\x9f\xa1\x7d\xde\xb7\xf6\xf4\x91\x38\x67\
-\xc5\x94\x00\x32\xde\x93\x31\x71\x53\xaa\x47\xf2\x4f\xe3\xec\x43\
-\xde\x57\xe0\xe8\xbe\x42\x8a\xb9\xd0\x82\x41\xc4\x38\x26\x94\xde\
-\x05\xc0\xbf\x3c\x47\x36\xcf\x90\x7f\x03\x8b\x39\x12\x53\x29\x29\
-\x05\x9a\x62\x29\x38\x85\x88\x62\x2d\x95\x54\xc0\x19\xa6\x6c\x36\
-\x37\x20\x04\x56\xa9\x4a\x83\x83\x14\x38\x49\x99\x0a\x14\x33\x30\
-\xe7\xfa\x02\x32\x09\x9c\x01\xae\xb0\xd2\x42\x6e\x02\x22\x08\x4e\
-\x94\x4a\x42\x64\xf7\xc2\x94\x14\x53\x6a\xde\xdc\x84\xdc\x27\x87\
-\x59\xdd\x44\x31\x03\x3e\xca\xdd\x7a\xa5\xbf\xa1\x71\xab\xee\x32\
-\xf4\x41\x6f\xc7\x1b\xc5\xae\x2e\x71\xf9\x8a\xa5\x0d\x42\x53\xac\
-\x29\x49\x97\x42\xdd\xbe\x22\x9c\x2d\x84\x6a\xcc\x09\xd5\xb3\xd0\
-\x8b\xb9\x14\xea\x1d\x82\x50\x4f\x11\x84\x4e\x51\x02\x22\xb1\xa4\
-\x89\x0c\x24\x17\x76\x1f\xe3\x3c\x2c\xaa\x7c\x81\x43\xd2\x7e\xf2\
-\x5a\xc5\xbc\x6e\x75\x53\x1b\x04\x5d\xdf\x36\x4f\xc6\xad\x22\x39\
-\x5f\x13\x10\xb9\x2e\x34\x8f\xf9\x21\x43\x6d\xf3\xb3\x2e\xfe\x80\
-\x7f\x34\xb6\x5e\xe3\x7b\xdb\x9b\x76\x67\xdd\xe0\x4e\x03\x82\x09\
-\xd7\x72\xfe\xe6\x5b\x99\xbb\x7c\x38\x65\xaf\x5f\xa7\xf5\x0a\xbe\
-\xe1\x1e\xf4\x0a\xdf\x5c\x09\x5f\x68\x35\xc9\x30\x4b\xf4\xe2\x4c\
-\x51\x0c\x8b\x84\xcf\x67\x8a\x37\x17\xad\x36\x39\x84\x6a\x79\x8a\
-\xf5\x46\xf9\x6f\x96\xf1\xf2\x70\xbf\xc8\x9b\xdf\xf9\x80\xe2\xe1\
-\
+\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x27\x31\x2e\
+\x30\x27\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x27\x55\x54\x46\
+\x2d\x38\x27\x3f\x3e\x0a\x3c\x21\x2d\x2d\x20\x54\x68\x69\x73\x20\
+\x66\x69\x6c\x65\x20\x77\x61\x73\x20\x67\x65\x6e\x65\x72\x61\x74\
+\x65\x64\x20\x62\x79\x20\x64\x76\x69\x73\x76\x67\x6d\x20\x32\x2e\
+\x38\x20\x2d\x2d\x3e\x0a\x3c\x73\x76\x67\x20\x76\x65\x72\x73\x69\
+\x6f\x6e\x3d\x27\x31\x2e\x31\x27\x20\x78\x6d\x6c\x6e\x73\x3d\x27\
+\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\
+\x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x27\x20\x78\x6d\x6c\x6e\
+\x73\x3a\x78\x6c\x69\x6e\x6b\x3d\x27\x68\x74\x74\x70\x3a\x2f\x2f\
+\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\x39\x39\x39\x2f\
+\x78\x6c\x69\x6e\x6b\x27\x20\x77\x69\x64\x74\x68\x3d\x27\x36\x33\
+\x2e\x39\x39\x39\x36\x70\x74\x27\x20\x68\x65\x69\x67\x68\x74\x3d\
+\x27\x36\x33\x2e\x39\x39\x39\x37\x70\x74\x27\x20\x76\x69\x65\x77\
+\x42\x6f\x78\x3d\x27\x35\x36\x2e\x34\x30\x39\x34\x20\x35\x33\x2e\
+\x38\x35\x38\x33\x20\x36\x33\x2e\x39\x39\x39\x36\x20\x36\x33\x2e\
+\x39\x39\x39\x37\x27\x3e\x0a\x3c\x67\x20\x69\x64\x3d\x27\x70\x61\
+\x67\x65\x31\x27\x3e\x0a\x3c\x67\x20\x74\x72\x61\x6e\x73\x66\x6f\
+\x72\x6d\x3d\x27\x6d\x61\x74\x72\x69\x78\x28\x30\x2e\x39\x39\x36\
+\x32\x36\x34\x20\x30\x20\x30\x20\x30\x2e\x39\x39\x36\x32\x36\x34\
+\x20\x35\x36\x2e\x34\x30\x39\x34\x20\x31\x31\x37\x2e\x38\x35\x38\
+\x29\x27\x3e\x0a\x3c\x70\x61\x74\x68\x20\x64\x3d\x27\x4d\x20\x32\
+\x2e\x30\x30\x37\x35\x20\x2d\x32\x2e\x30\x30\x37\x35\x4c\x20\x36\
+\x32\x2e\x32\x33\x32\x35\x20\x2d\x32\x2e\x30\x30\x37\x35\x4c\x20\
+\x36\x32\x2e\x32\x33\x32\x35\x20\x2d\x36\x32\x2e\x32\x33\x32\x35\
+\x4c\x20\x32\x2e\x30\x30\x37\x35\x20\x2d\x36\x32\x2e\x32\x33\x32\
+\x35\x4c\x20\x32\x2e\x30\x30\x37\x35\x20\x2d\x32\x2e\x30\x30\x37\
+\x35\x5a\x27\x20\x66\x69\x6c\x6c\x3d\x27\x6e\x6f\x6e\x65\x27\x20\
+\x73\x74\x72\x6f\x6b\x65\x3d\x27\x23\x30\x30\x30\x30\x30\x30\x27\
+\x20\x73\x74\x72\x6f\x6b\x65\x2d\x6c\x69\x6e\x65\x63\x61\x70\x3d\
+\x27\x72\x6f\x75\x6e\x64\x27\x20\x73\x74\x72\x6f\x6b\x65\x2d\x6c\
+\x69\x6e\x65\x6a\x6f\x69\x6e\x3d\x27\x72\x6f\x75\x6e\x64\x27\x20\
+\x73\x74\x72\x6f\x6b\x65\x2d\x6d\x69\x74\x65\x72\x6c\x69\x6d\x69\
+\x74\x3d\x27\x31\x30\x2e\x30\x33\x37\x35\x27\x20\x73\x74\x72\x6f\
+\x6b\x65\x2d\x77\x69\x64\x74\x68\x3d\x27\x34\x2e\x30\x31\x35\x27\
+\x2f\x3e\x0a\x3c\x2f\x67\x3e\x0a\x3c\x67\x20\x74\x72\x61\x6e\x73\
+\x66\x6f\x72\x6d\x3d\x27\x6d\x61\x74\x72\x69\x78\x28\x30\x2e\x39\
+\x39\x36\x32\x36\x34\x20\x30\x20\x30\x20\x30\x2e\x39\x39\x36\x32\
+\x36\x34\x20\x35\x36\x2e\x34\x30\x39\x34\x20\x31\x31\x37\x2e\x38\
+\x35\x38\x29\x27\x3e\x0a\x3c\x70\x61\x74\x68\x20\x64\x3d\x27\x4d\
+\x20\x32\x2e\x30\x30\x37\x35\x20\x2d\x33\x32\x2e\x31\x32\x4c\x20\
+\x36\x32\x2e\x32\x33\x32\x35\x20\x2d\x33\x32\x2e\x31\x32\x27\x20\
+\x66\x69\x6c\x6c\x3d\x27\x6e\x6f\x6e\x65\x27\x20\x73\x74\x72\x6f\
+\x6b\x65\x3d\x27\x23\x30\x30\x30\x30\x30\x30\x27\x20\x73\x74\x72\
+\x6f\x6b\x65\x2d\x6c\x69\x6e\x65\x63\x61\x70\x3d\x27\x72\x6f\x75\
+\x6e\x64\x27\x20\x73\x74\x72\x6f\x6b\x65\x2d\x6c\x69\x6e\x65\x6a\
+\x6f\x69\x6e\x3d\x27\x72\x6f\x75\x6e\x64\x27\x20\x73\x74\x72\x6f\
+\x6b\x65\x2d\x6d\x69\x74\x65\x72\x6c\x69\x6d\x69\x74\x3d\x27\x31\
+\x30\x2e\x30\x33\x37\x35\x27\x20\x73\x74\x72\x6f\x6b\x65\x2d\x77\
+\x69\x64\x74\x68\x3d\x27\x34\x2e\x30\x31\x35\x27\x2f\x3e\x0a\x3c\
+\x2f\x67\x3e\x0a\x3c\x67\x20\x74\x72\x61\x6e\x73\x66\x6f\x72\x6d\
+\x3d\x27\x6d\x61\x74\x72\x69\x78\x28\x30\x2e\x39\x39\x36\x32\x36\
+\x34\x20\x30\x20\x30\x20\x30\x2e\x39\x39\x36\x32\x36\x34\x20\x35\
+\x36\x2e\x34\x30\x39\x34\x20\x31\x31\x37\x2e\x38\x35\x38\x29\x27\
+\x3e\x0a\x3c\x70\x61\x74\x68\x20\x64\x3d\x27\x4d\x20\x33\x32\x2e\
+\x31\x32\x20\x2d\x32\x2e\x30\x30\x37\x35\x4c\x20\x33\x32\x2e\x31\
+\x32\x20\x2d\x36\x32\x2e\x32\x33\x32\x35\x27\x20\x66\x69\x6c\x6c\
+\x3d\x27\x6e\x6f\x6e\x65\x27\x20\x73\x74\x72\x6f\x6b\x65\x3d\x27\
+\x23\x30\x30\x30\x30\x30\x30\x27\x20\x73\x74\x72\x6f\x6b\x65\x2d\
+\x6c\x69\x6e\x65\x63\x61\x70\x3d\x27\x72\x6f\x75\x6e\x64\x27\x20\
+\x73\x74\x72\x6f\x6b\x65\x2d\x6c\x69\x6e\x65\x6a\x6f\x69\x6e\x3d\
+\x27\x72\x6f\x75\x6e\x64\x27\x20\x73\x74\x72\x6f\x6b\x65\x2d\x6d\
+\x69\x74\x65\x72\x6c\x69\x6d\x69\x74\x3d\x27\x31\x30\x2e\x30\x33\
+\x37\x35\x27\x20\x73\x74\x72\x6f\x6b\x65\x2d\x77\x69\x64\x74\x68\
+\x3d\x27\x34\x2e\x30\x31\x35\x27\x2f\x3e\x0a\x3c\x2f\x67\x3e\x0a\
+\x3c\x2f\x67\x3e\x0a\x3c\x2f\x73\x76\x67\x3e\
\x00\x00\x04\x3d\
\x3c\
\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x27\x31\x2e\
@@ -1260,7 +1664,7 @@ qt_resource_data = b"\
\x66\x69\x6c\x6c\x3d\x27\x23\x30\x30\x30\x30\x30\x30\x27\x20\x72\
\x3d\x27\x36\x2e\x30\x32\x32\x35\x27\x2f\x3e\x0a\x3c\x2f\x67\x3e\
\x0a\x3c\x2f\x67\x3e\x0a\x3c\x2f\x73\x76\x67\x3e\
-\x00\x00\x02\xc9\
+\x00\x00\x03\x46\
\x3c\
\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\
\x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x75\x74\x66\
@@ -1292,22 +1696,82 @@ qt_resource_data = b"\
\x6b\x67\x72\x6f\x75\x6e\x64\x3a\x6e\x65\x77\x20\x30\x20\x30\x20\
\x35\x31\x32\x20\x35\x31\x32\x3b\x22\x20\x78\x6d\x6c\x3a\x73\x70\
\x61\x63\x65\x3d\x22\x70\x72\x65\x73\x65\x72\x76\x65\x22\x3e\x0d\
-\x0a\x3c\x70\x6f\x6c\x79\x67\x6f\x6e\x20\x70\x6f\x69\x6e\x74\x73\
-\x3d\x22\x34\x38\x30\x2c\x32\x35\x36\x20\x33\x38\x34\x2c\x31\x36\
-\x30\x20\x33\x38\x34\x2c\x32\x33\x36\x20\x32\x37\x36\x2c\x32\x33\
-\x36\x20\x32\x37\x36\x2c\x31\x32\x38\x20\x33\x35\x32\x2c\x31\x32\
-\x38\x20\x32\x35\x36\x2c\x33\x32\x20\x31\x36\x30\x2c\x31\x32\x38\
-\x20\x32\x33\x36\x2c\x31\x32\x38\x20\x32\x33\x36\x2c\x32\x33\x36\
-\x20\x31\x32\x38\x2c\x32\x33\x36\x20\x31\x32\x38\x2c\x31\x36\x30\
-\x20\x33\x32\x2c\x32\x35\x36\x20\x31\x32\x38\x2c\x33\x35\x32\x20\
-\x0d\x0a\x09\x31\x32\x38\x2c\x32\x37\x36\x20\x32\x33\x36\x2c\x32\
-\x37\x36\x20\x32\x33\x36\x2c\x33\x38\x34\x20\x31\x36\x30\x2c\x33\
-\x38\x34\x20\x32\x35\x36\x2c\x34\x38\x30\x20\x33\x35\x32\x2c\x33\
-\x38\x34\x20\x32\x37\x35\x2e\x38\x2c\x33\x38\x34\x20\x32\x37\x35\
-\x2e\x34\x2c\x32\x37\x35\x2e\x35\x20\x33\x38\x34\x2c\x32\x37\x35\
-\x2e\x38\x20\x33\x38\x34\x2c\x33\x35\x32\x20\x22\x2f\x3e\x0d\x0a\
-\x3c\x2f\x73\x76\x67\x3e\x0d\x0a\
-\x00\x00\x02\xfc\
+\x0a\x3c\x70\x61\x74\x68\x20\x64\x3d\x22\x4d\x34\x33\x37\x2e\x35\
+\x2c\x33\x38\x36\x2e\x36\x4c\x33\x30\x36\x2e\x39\x2c\x32\x35\x36\
+\x6c\x31\x33\x30\x2e\x36\x2d\x31\x33\x30\x2e\x36\x63\x31\x34\x2e\
+\x31\x2d\x31\x34\x2e\x31\x2c\x31\x34\x2e\x31\x2d\x33\x36\x2e\x38\
+\x2c\x30\x2d\x35\x30\x2e\x39\x63\x2d\x31\x34\x2e\x31\x2d\x31\x34\
+\x2e\x31\x2d\x33\x36\x2e\x38\x2d\x31\x34\x2e\x31\x2d\x35\x30\x2e\
+\x39\x2c\x30\x4c\x32\x35\x36\x2c\x32\x30\x35\x2e\x31\x4c\x31\x32\
+\x35\x2e\x34\x2c\x37\x34\x2e\x35\x0d\x0a\x09\x63\x2d\x31\x34\x2e\
+\x31\x2d\x31\x34\x2e\x31\x2d\x33\x36\x2e\x38\x2d\x31\x34\x2e\x31\
+\x2d\x35\x30\x2e\x39\x2c\x30\x63\x2d\x31\x34\x2e\x31\x2c\x31\x34\
+\x2e\x31\x2d\x31\x34\x2e\x31\x2c\x33\x36\x2e\x38\x2c\x30\x2c\x35\
+\x30\x2e\x39\x4c\x32\x30\x35\x2e\x31\x2c\x32\x35\x36\x4c\x37\x34\
+\x2e\x35\x2c\x33\x38\x36\x2e\x36\x63\x2d\x31\x34\x2e\x31\x2c\x31\
+\x34\x2e\x31\x2d\x31\x34\x2e\x31\x2c\x33\x36\x2e\x38\x2c\x30\x2c\
+\x35\x30\x2e\x39\x0d\x0a\x09\x63\x31\x34\x2e\x31\x2c\x31\x34\x2e\
+\x31\x2c\x33\x36\x2e\x38\x2c\x31\x34\x2e\x31\x2c\x35\x30\x2e\x39\
+\x2c\x30\x4c\x32\x35\x36\x2c\x33\x30\x36\x2e\x39\x6c\x31\x33\x30\
+\x2e\x36\x2c\x31\x33\x30\x2e\x36\x63\x31\x34\x2e\x31\x2c\x31\x34\
+\x2e\x31\x2c\x33\x36\x2e\x38\x2c\x31\x34\x2e\x31\x2c\x35\x30\x2e\
+\x39\x2c\x30\x43\x34\x35\x31\x2e\x35\x2c\x34\x32\x33\x2e\x34\x2c\
+\x34\x35\x31\x2e\x35\x2c\x34\x30\x30\x2e\x36\x2c\x34\x33\x37\x2e\
+\x35\x2c\x33\x38\x36\x2e\x36\x7a\x22\x2f\x3e\x0d\x0a\x3c\x2f\x73\
+\x76\x67\x3e\x0d\x0a\
+\x00\x00\x01\xdd\
+\x00\
+\x00\x06\xe4\x78\x9c\xcd\x54\x4d\x6f\x9b\x40\x10\x3d\x13\x29\xff\
+\x61\xba\xb7\x4a\xec\x17\xc4\xd4\xa6\xa6\x51\xfd\x21\xcb\x52\x9a\
+\x58\x6a\xea\xaa\xa7\x0a\xc3\x16\x50\x28\x20\x58\xc0\xce\xaf\xef\
+\xee\x92\x54\x51\x95\xfa\x18\xfb\xb0\x33\xda\x79\x6f\xde\xbc\x65\
+\x24\xa6\xd7\xfb\xdf\x39\x74\xa2\x6e\xb2\xb2\x08\x10\x27\x0c\x81\
+\x28\xa2\x32\xce\x8a\x24\x40\xad\xfc\x85\xc7\xe8\xfa\xd3\xe5\xc5\
+\xf4\x1d\xc6\xb0\x12\x85\xa8\x43\x59\xd6\x3e\x7c\x8e\xcb\x9d\x80\
+\x75\x9e\xb7\x8d\x34\x25\xe0\x1e\x71\x08\xb7\xe1\xeb\x76\x05\xcb\
+\x7d\x55\xd6\x12\x36\x79\x9b\xe0\x75\x01\xc4\x14\xb7\xc3\x10\x1f\
+\x3c\xc2\x18\xcc\xda\x2c\x8f\x81\xbd\x07\xc0\xd8\xe8\x2f\xee\xe6\
+\xf7\x3f\x36\x4b\x68\xba\x04\x36\xdf\x66\x37\xeb\x39\x20\x4c\xe9\
+\x77\x77\x4e\xe9\xe2\x7e\x61\x24\x38\xe1\x94\x2e\x6f\x11\xa0\x54\
+\xca\xca\xa7\xb4\xef\x7b\xd2\xbb\xa4\xac\x13\xba\xaa\xc3\x2a\xcd\
+\xa2\x86\x2a\x22\xd5\x44\xd5\x44\x95\x18\xe7\x24\x96\x31\xd2\x33\
+\xb4\xf4\x8b\xa7\x72\x04\x59\x1c\xa0\x9b\xf0\x20\xea\x9f\xea\xa2\
+\xbe\x44\xd1\x04\xaf\x48\x3b\x8c\x31\x2d\xf5\x44\xf1\xf7\x79\x56\
+\x3c\xbc\x46\xe4\x93\xc9\x84\x1a\x54\x51\x03\xc4\xaa\x3d\x82\xc3\
+\x90\x2f\x2f\x2c\xe8\xb3\x58\xa6\x01\x1a\x71\x47\x03\xa9\xc8\x92\
+\x54\xfe\xbd\x76\x99\xe8\x67\xa5\xee\x02\x06\xaa\xa6\x0f\x82\x46\
+\x1e\x72\x11\x20\x51\x84\xbb\x5c\xe0\x5d\x18\x3d\x24\x75\xd9\x16\
+\xb1\x5f\x88\x1e\x5e\x30\x3f\x1a\x6f\x7e\x53\x85\x91\xa2\x57\xb5\
+\x68\x44\xdd\x09\xf3\xea\x44\x05\x6b\x88\xd6\xb4\x0a\x65\x0a\xea\
+\xd1\x5f\xb8\xc7\x6c\x3e\x72\x89\x1b\x31\xdb\x25\x1f\xb0\x6b\x7b\
+\x2a\xaa\xa3\x73\x8a\x47\x8c\x8c\x22\xac\x00\x9b\xe9\x22\x76\xf1\
+\x13\xdc\x0d\x10\x33\x98\xfb\xdc\xa0\x73\x6a\x00\xd3\xa2\x4b\xb6\
+\x51\xd4\x67\x6b\xe6\x3c\xea\x4f\x60\x59\xf4\x1f\x1f\xce\x78\x7c\
+\x16\x3e\xae\xb8\x77\x3a\x1f\x53\xfa\xff\x25\x39\x63\xfe\x26\xa6\
+\xcc\x9c\x23\x4b\x3a\x07\x1f\x7a\x49\x27\xf3\x71\x6c\x49\x57\x6c\
+\xf2\x26\xa6\xcc\x9c\x23\x4b\x3a\x07\x1f\x7a\x49\x27\xf3\x31\x2c\
+\xe9\x39\xaa\x7f\xb6\xca\x7f\x00\x99\x18\x96\x19\
+\x00\x00\x01\x1c\
+\x3c\
+\x73\x76\x67\x20\x78\x6d\x6c\x6e\x73\x3d\x22\x68\x74\x74\x70\x3a\
+\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x32\x30\x30\
+\x30\x2f\x73\x76\x67\x22\x20\x77\x69\x64\x74\x68\x3d\x22\x35\x31\
+\x32\x70\x78\x22\x20\x68\x65\x69\x67\x68\x74\x3d\x22\x35\x31\x32\
+\x70\x78\x22\x0a\x20\x20\x20\x20\x20\x76\x69\x65\x77\x42\x6f\x78\
+\x3d\x22\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\x32\x22\x3e\x0a\
+\x3c\x67\x20\x74\x72\x61\x6e\x73\x66\x6f\x72\x6d\x3d\x27\x6d\x61\
+\x74\x72\x69\x78\x28\x34\x38\x20\x30\x20\x30\x20\x34\x38\x20\x34\
+\x38\x20\x34\x38\x29\x27\x3e\x0a\x20\x20\x3c\x70\x61\x74\x68\x20\
+\x64\x3d\x22\x4d\x30\x20\x30\x76\x32\x68\x2e\x35\x63\x30\x2d\x2e\
+\x35\x35\x2e\x34\x35\x2d\x31\x20\x31\x2d\x31\x68\x31\x2e\x35\x76\
+\x35\x2e\x35\x63\x30\x20\x2e\x32\x38\x2d\x2e\x32\x32\x2e\x35\x2d\
+\x2e\x35\x2e\x35\x68\x2d\x2e\x35\x76\x31\x68\x34\x76\x2d\x31\x68\
+\x2d\x2e\x35\x63\x2d\x2e\x32\x38\x20\x30\x2d\x2e\x35\x2d\x2e\x32\
+\x32\x2d\x2e\x35\x2d\x2e\x35\x76\x2d\x35\x2e\x35\x68\x31\x2e\x35\
+\x63\x2e\x35\x35\x20\x30\x20\x31\x20\x2e\x34\x35\x20\x31\x20\x31\
+\x68\x2e\x35\x76\x2d\x32\x68\x2d\x38\x7a\x22\x20\x2f\x3e\x0a\x3c\
+\x2f\x67\x3e\x0a\x3c\x2f\x73\x76\x67\x3e\x0a\
+\x00\x00\x05\x27\
\x3c\
\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\
\x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x75\x74\x66\
@@ -1339,25 +1803,60 @@ qt_resource_data = b"\
\x3d\x22\x6e\x65\x77\x20\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\
\x32\x22\x20\x78\x6d\x6c\x3a\x73\x70\x61\x63\x65\x3d\x22\x70\x72\
\x65\x73\x65\x72\x76\x65\x22\x3e\x0d\x0a\x3c\x67\x20\x69\x64\x3d\
-\x22\x49\x63\x6f\x6e\x5f\x32\x30\x5f\x22\x3e\x0d\x0a\x09\x3c\x67\
+\x22\x49\x63\x6f\x6e\x5f\x31\x32\x5f\x22\x3e\x0d\x0a\x09\x3c\x67\
\x3e\x0d\x0a\x09\x09\x3c\x70\x61\x74\x68\x20\x64\x3d\x22\x4d\x32\
-\x35\x36\x2c\x34\x38\x43\x31\x34\x31\x2e\x36\x30\x31\x2c\x34\x38\
-\x2c\x34\x38\x2c\x31\x34\x31\x2e\x36\x30\x31\x2c\x34\x38\x2c\x32\
-\x35\x36\x73\x39\x33\x2e\x36\x30\x31\x2c\x32\x30\x38\x2c\x32\x30\
-\x38\x2c\x32\x30\x38\x73\x32\x30\x38\x2d\x39\x33\x2e\x36\x30\x31\
-\x2c\x32\x30\x38\x2d\x32\x30\x38\x53\x33\x37\x30\x2e\x33\x39\x39\
-\x2c\x34\x38\x2c\x32\x35\x36\x2c\x34\x38\x7a\x20\x4d\x32\x35\x36\
-\x2c\x34\x32\x32\x2e\x33\x39\x39\x0d\x0a\x09\x09\x09\x63\x2d\x39\
-\x31\x2e\x35\x31\x38\x2c\x30\x2d\x31\x36\x36\x2e\x33\x39\x39\x2d\
-\x37\x34\x2e\x38\x38\x32\x2d\x31\x36\x36\x2e\x33\x39\x39\x2d\x31\
-\x36\x36\x2e\x33\x39\x39\x53\x31\x36\x34\x2e\x34\x38\x32\x2c\x38\
-\x39\x2e\x36\x2c\x32\x35\x36\x2c\x38\x39\x2e\x36\x53\x34\x32\x32\
-\x2e\x34\x2c\x31\x36\x34\x2e\x34\x38\x32\x2c\x34\x32\x32\x2e\x34\
-\x2c\x32\x35\x36\x53\x33\x34\x37\x2e\x35\x31\x38\x2c\x34\x32\x32\
-\x2e\x33\x39\x39\x2c\x32\x35\x36\x2c\x34\x32\x32\x2e\x33\x39\x39\
-\x7a\x22\x2f\x3e\x0d\x0a\x09\x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\x67\
-\x3e\x0d\x0a\x3c\x2f\x73\x76\x67\x3e\x0d\x0a\
-\x00\x00\x03\x6c\
+\x35\x36\x2c\x36\x34\x43\x31\x35\x30\x2e\x34\x30\x31\x2c\x36\x34\
+\x2c\x36\x34\x2c\x31\x35\x30\x2e\x34\x30\x31\x2c\x36\x34\x2c\x32\
+\x35\x36\x63\x30\x2c\x31\x30\x35\x2e\x36\x30\x34\x2c\x38\x36\x2e\
+\x34\x30\x31\x2c\x31\x39\x32\x2c\x31\x39\x32\x2c\x31\x39\x32\x63\
+\x31\x38\x2e\x31\x33\x36\x2c\x30\x2c\x33\x32\x2d\x31\x33\x2e\x38\
+\x36\x34\x2c\x33\x32\x2d\x33\x32\x0d\x0a\x09\x09\x09\x63\x30\x2d\
+\x38\x2e\x35\x33\x31\x2d\x33\x2e\x31\x39\x38\x2d\x31\x36\x2d\x38\
+\x2e\x35\x33\x31\x2d\x32\x31\x2e\x33\x33\x33\x63\x2d\x35\x2e\x33\
+\x33\x33\x2d\x35\x2e\x33\x33\x34\x2d\x38\x2e\x35\x33\x31\x2d\x31\
+\x32\x2e\x38\x30\x33\x2d\x38\x2e\x35\x33\x31\x2d\x32\x31\x2e\x33\
+\x33\x34\x63\x30\x2d\x31\x38\x2e\x31\x33\x35\x2c\x31\x33\x2e\x38\
+\x36\x34\x2d\x33\x32\x2c\x33\x32\x2d\x33\x32\x68\x33\x38\x2e\x33\
+\x39\x36\x0d\x0a\x09\x09\x09\x63\x35\x38\x2e\x36\x36\x37\x2c\x30\
+\x2c\x31\x30\x36\x2e\x36\x36\x37\x2d\x34\x38\x2c\x31\x30\x36\x2e\
+\x36\x36\x37\x2d\x31\x30\x36\x2e\x36\x36\x36\x43\x34\x34\x38\x2c\
+\x31\x34\x30\x2e\x38\x30\x32\x2c\x33\x36\x31\x2e\x36\x30\x34\x2c\
+\x36\x34\x2c\x32\x35\x36\x2c\x36\x34\x7a\x20\x4d\x31\x33\x38\x2e\
+\x36\x36\x37\x2c\x32\x35\x36\x63\x2d\x31\x38\x2e\x31\x33\x36\x2c\
+\x30\x2d\x33\x32\x2d\x31\x33\x2e\x38\x36\x34\x2d\x33\x32\x2d\x33\
+\x32\x73\x31\x33\x2e\x38\x36\x34\x2d\x33\x32\x2c\x33\x32\x2d\x33\
+\x32\x0d\x0a\x09\x09\x09\x63\x31\x38\x2e\x31\x33\x35\x2c\x30\x2c\
+\x33\x32\x2c\x31\x33\x2e\x38\x36\x34\x2c\x33\x32\x2c\x33\x32\x53\
+\x31\x35\x36\x2e\x38\x30\x32\x2c\x32\x35\x36\x2c\x31\x33\x38\x2e\
+\x36\x36\x37\x2c\x32\x35\x36\x7a\x20\x4d\x32\x30\x32\x2e\x36\x36\
+\x37\x2c\x31\x37\x30\x2e\x36\x36\x37\x63\x2d\x31\x38\x2e\x31\x33\
+\x36\x2c\x30\x2d\x33\x32\x2d\x31\x33\x2e\x38\x36\x35\x2d\x33\x32\
+\x2d\x33\x32\x63\x30\x2d\x31\x38\x2e\x31\x33\x36\x2c\x31\x33\x2e\
+\x38\x36\x34\x2d\x33\x32\x2c\x33\x32\x2d\x33\x32\x0d\x0a\x09\x09\
+\x09\x63\x31\x38\x2e\x31\x33\x35\x2c\x30\x2c\x33\x32\x2c\x31\x33\
+\x2e\x38\x36\x34\x2c\x33\x32\x2c\x33\x32\x43\x32\x33\x34\x2e\x36\
+\x36\x37\x2c\x31\x35\x36\x2e\x38\x30\x32\x2c\x32\x32\x30\x2e\x38\
+\x30\x32\x2c\x31\x37\x30\x2e\x36\x36\x37\x2c\x32\x30\x32\x2e\x36\
+\x36\x37\x2c\x31\x37\x30\x2e\x36\x36\x37\x7a\x20\x4d\x33\x30\x39\
+\x2e\x33\x33\x33\x2c\x31\x37\x30\x2e\x36\x36\x37\x63\x2d\x31\x38\
+\x2e\x31\x33\x35\x2c\x30\x2d\x33\x32\x2d\x31\x33\x2e\x38\x36\x35\
+\x2d\x33\x32\x2d\x33\x32\x0d\x0a\x09\x09\x09\x63\x30\x2d\x31\x38\
+\x2e\x31\x33\x36\x2c\x31\x33\x2e\x38\x36\x35\x2d\x33\x32\x2c\x33\
+\x32\x2d\x33\x32\x63\x31\x38\x2e\x31\x33\x36\x2c\x30\x2c\x33\x32\
+\x2c\x31\x33\x2e\x38\x36\x34\x2c\x33\x32\x2c\x33\x32\x43\x33\x34\
+\x31\x2e\x33\x33\x33\x2c\x31\x35\x36\x2e\x38\x30\x32\x2c\x33\x32\
+\x37\x2e\x34\x36\x39\x2c\x31\x37\x30\x2e\x36\x36\x37\x2c\x33\x30\
+\x39\x2e\x33\x33\x33\x2c\x31\x37\x30\x2e\x36\x36\x37\x7a\x20\x4d\
+\x33\x37\x33\x2e\x33\x33\x33\x2c\x32\x35\x36\x0d\x0a\x09\x09\x09\
+\x63\x2d\x31\x38\x2e\x31\x33\x35\x2c\x30\x2d\x33\x32\x2d\x31\x33\
+\x2e\x38\x36\x34\x2d\x33\x32\x2d\x33\x32\x73\x31\x33\x2e\x38\x36\
+\x35\x2d\x33\x32\x2c\x33\x32\x2d\x33\x32\x63\x31\x38\x2e\x31\x33\
+\x36\x2c\x30\x2c\x33\x32\x2c\x31\x33\x2e\x38\x36\x34\x2c\x33\x32\
+\x2c\x33\x32\x53\x33\x39\x31\x2e\x34\x36\x39\x2c\x32\x35\x36\x2c\
+\x33\x37\x33\x2e\x33\x33\x33\x2c\x32\x35\x36\x7a\x22\x2f\x3e\x0d\
+\x0a\x09\x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\
+\x73\x76\x67\x3e\x0d\x0a\
+\x00\x00\x02\x7d\
\x3c\
\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\
\x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x75\x74\x66\
@@ -1388,32 +1887,17 @@ qt_resource_data = b"\
\x6e\x61\x62\x6c\x65\x2d\x62\x61\x63\x6b\x67\x72\x6f\x75\x6e\x64\
\x3d\x22\x6e\x65\x77\x20\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\
\x32\x22\x20\x78\x6d\x6c\x3a\x73\x70\x61\x63\x65\x3d\x22\x70\x72\
-\x65\x73\x65\x72\x76\x65\x22\x3e\x0d\x0a\x3c\x67\x3e\x0d\x0a\x09\
-\x0d\x0a\x09\x09\x3c\x72\x65\x63\x74\x20\x78\x3d\x22\x31\x37\x38\
-\x2e\x38\x34\x36\x22\x20\x79\x3d\x22\x39\x32\x2e\x30\x38\x37\x22\
-\x20\x74\x72\x61\x6e\x73\x66\x6f\x72\x6d\x3d\x22\x6d\x61\x74\x72\
-\x69\x78\x28\x2d\x30\x2e\x37\x30\x37\x31\x20\x2d\x30\x2e\x37\x30\
-\x37\x31\x20\x30\x2e\x37\x30\x37\x31\x20\x2d\x30\x2e\x37\x30\x37\
-\x31\x20\x32\x32\x34\x2e\x33\x34\x37\x36\x20\x36\x33\x31\x2e\x31\
-\x34\x39\x38\x29\x22\x20\x77\x69\x64\x74\x68\x3d\x22\x31\x32\x38\
-\x2e\x30\x38\x35\x22\x20\x68\x65\x69\x67\x68\x74\x3d\x22\x33\x35\
-\x34\x2e\x30\x34\x39\x22\x2f\x3e\x0d\x0a\x09\x3c\x70\x61\x74\x68\
-\x20\x64\x3d\x22\x4d\x34\x37\x31\x2e\x37\x32\x33\x2c\x38\x38\x2e\
-\x33\x39\x33\x6c\x2d\x34\x38\x2e\x31\x31\x35\x2d\x34\x38\x2e\x31\
-\x31\x34\x63\x2d\x31\x31\x2e\x37\x32\x33\x2d\x31\x31\x2e\x37\x32\
-\x34\x2d\x33\x31\x2e\x35\x35\x38\x2d\x31\x30\x2e\x38\x39\x36\x2d\
-\x34\x34\x2e\x33\x30\x34\x2c\x31\x2e\x38\x35\x6c\x2d\x34\x35\x2e\
-\x32\x30\x32\x2c\x34\x35\x2e\x32\x30\x33\x6c\x39\x30\x2e\x35\x36\
-\x39\x2c\x39\x30\x2e\x35\x36\x38\x6c\x34\x35\x2e\x32\x30\x32\x2d\
-\x34\x35\x2e\x32\x30\x32\x0d\x0a\x09\x09\x43\x34\x38\x32\x2e\x36\
-\x31\x36\x2c\x31\x31\x39\x2e\x39\x35\x32\x2c\x34\x38\x33\x2e\x34\
-\x34\x35\x2c\x31\x30\x30\x2e\x31\x31\x36\x2c\x34\x37\x31\x2e\x37\
-\x32\x33\x2c\x38\x38\x2e\x33\x39\x33\x7a\x22\x2f\x3e\x0d\x0a\x09\
-\x3c\x70\x6f\x6c\x79\x67\x6f\x6e\x20\x70\x6f\x69\x6e\x74\x73\x3d\
-\x22\x36\x34\x2e\x30\x32\x31\x2c\x33\x36\x33\x2e\x32\x35\x32\x20\
-\x33\x32\x2c\x34\x38\x30\x20\x31\x34\x38\x2e\x37\x33\x37\x2c\x34\
-\x34\x37\x2e\x39\x37\x39\x20\x09\x22\x2f\x3e\x0d\x0a\x3c\x2f\x67\
-\x3e\x0d\x0a\x3c\x2f\x73\x76\x67\x3e\x0d\x0a\
+\x65\x73\x65\x72\x76\x65\x22\x3e\x0d\x0a\x3c\x67\x20\x69\x64\x3d\
+\x22\x49\x63\x6f\x6e\x5f\x38\x5f\x22\x3e\x0d\x0a\x09\x3c\x67\x3e\
+\x0d\x0a\x09\x09\x3c\x70\x61\x74\x68\x20\x64\x3d\x22\x4d\x38\x35\
+\x2c\x32\x37\x37\x2e\x33\x37\x35\x68\x32\x35\x39\x2e\x37\x30\x34\
+\x4c\x32\x32\x35\x2e\x30\x30\x32\x2c\x33\x39\x37\x2e\x30\x37\x37\
+\x4c\x32\x35\x36\x2c\x34\x32\x37\x6c\x31\x37\x31\x2d\x31\x37\x31\
+\x4c\x32\x35\x36\x2c\x38\x35\x6c\x2d\x32\x39\x2e\x39\x32\x32\x2c\
+\x32\x39\x2e\x39\x32\x34\x6c\x31\x31\x38\x2e\x36\x32\x36\x2c\x31\
+\x31\x39\x2e\x37\x30\x31\x48\x38\x35\x56\x32\x37\x37\x2e\x33\x37\
+\x35\x7a\x22\x2f\x3e\x0d\x0a\x09\x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\
+\x67\x3e\x0d\x0a\x3c\x2f\x73\x76\x67\x3e\x0d\x0a\
\x00\x00\x04\x4e\
\x3c\
\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x27\x31\x2e\
@@ -1485,7 +1969,7 @@ qt_resource_data = b"\
\x20\x66\x69\x6c\x6c\x3d\x27\x23\x30\x30\x30\x30\x30\x30\x27\x20\
\x72\x3d\x27\x36\x2e\x30\x32\x32\x35\x27\x2f\x3e\x0a\x3c\x2f\x67\
\x3e\x0a\x3c\x2f\x67\x3e\x0a\x3c\x2f\x73\x76\x67\x3e\
-\x00\x00\x02\xf7\
+\x00\x00\x03\x52\
\x3c\
\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\
\x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x75\x74\x66\
@@ -1512,146 +1996,35 @@ qt_resource_data = b"\
\x20\x79\x3d\x22\x30\x70\x78\x22\x0d\x0a\x09\x20\x77\x69\x64\x74\
\x68\x3d\x22\x35\x31\x32\x70\x78\x22\x20\x68\x65\x69\x67\x68\x74\
\x3d\x22\x35\x31\x32\x70\x78\x22\x20\x76\x69\x65\x77\x42\x6f\x78\
-\x3d\x22\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\x32\x22\x20\x73\
-\x74\x79\x6c\x65\x3d\x22\x65\x6e\x61\x62\x6c\x65\x2d\x62\x61\x63\
-\x6b\x67\x72\x6f\x75\x6e\x64\x3a\x6e\x65\x77\x20\x30\x20\x30\x20\
-\x35\x31\x32\x20\x35\x31\x32\x3b\x22\x20\x78\x6d\x6c\x3a\x73\x70\
-\x61\x63\x65\x3d\x22\x70\x72\x65\x73\x65\x72\x76\x65\x22\x3e\x0d\
-\x0a\x3c\x70\x61\x74\x68\x20\x64\x3d\x22\x4d\x34\x31\x37\x2e\x34\
-\x2c\x32\x32\x34\x48\x32\x38\x38\x56\x39\x34\x2e\x36\x63\x30\x2d\
-\x31\x36\x2e\x39\x2d\x31\x34\x2e\x33\x2d\x33\x30\x2e\x36\x2d\x33\
-\x32\x2d\x33\x30\x2e\x36\x63\x2d\x31\x37\x2e\x37\x2c\x30\x2d\x33\
-\x32\x2c\x31\x33\x2e\x37\x2d\x33\x32\x2c\x33\x30\x2e\x36\x56\x32\
-\x32\x34\x48\x39\x34\x2e\x36\x43\x37\x37\x2e\x37\x2c\x32\x32\x34\
-\x2c\x36\x34\x2c\x32\x33\x38\x2e\x33\x2c\x36\x34\x2c\x32\x35\x36\
-\x0d\x0a\x09\x63\x30\x2c\x31\x37\x2e\x37\x2c\x31\x33\x2e\x37\x2c\
-\x33\x32\x2c\x33\x30\x2e\x36\x2c\x33\x32\x48\x32\x32\x34\x76\x31\
-\x32\x39\x2e\x34\x63\x30\x2c\x31\x36\x2e\x39\x2c\x31\x34\x2e\x33\
-\x2c\x33\x30\x2e\x36\x2c\x33\x32\x2c\x33\x30\x2e\x36\x63\x31\x37\
-\x2e\x37\x2c\x30\x2c\x33\x32\x2d\x31\x33\x2e\x37\x2c\x33\x32\x2d\
-\x33\x30\x2e\x36\x56\x32\x38\x38\x68\x31\x32\x39\x2e\x34\x63\x31\
-\x36\x2e\x39\x2c\x30\x2c\x33\x30\x2e\x36\x2d\x31\x34\x2e\x33\x2c\
-\x33\x30\x2e\x36\x2d\x33\x32\x0d\x0a\x09\x43\x34\x34\x38\x2c\x32\
-\x33\x38\x2e\x33\x2c\x34\x33\x34\x2e\x33\x2c\x32\x32\x34\x2c\x34\
-\x31\x37\x2e\x34\x2c\x32\x32\x34\x7a\x22\x2f\x3e\x0d\x0a\x3c\x2f\
-\x73\x76\x67\x3e\x0d\x0a\
-\x00\x00\x03\x0c\
-\x3c\
-\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\
-\x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x75\x74\x66\
-\x2d\x38\x22\x3f\x3e\x0d\x0a\x3c\x21\x2d\x2d\x20\x47\x65\x6e\x65\
-\x72\x61\x74\x6f\x72\x3a\x20\x41\x64\x6f\x62\x65\x20\x49\x6c\x6c\
-\x75\x73\x74\x72\x61\x74\x6f\x72\x20\x31\x38\x2e\x31\x2e\x30\x2c\
-\x20\x53\x56\x47\x20\x45\x78\x70\x6f\x72\x74\x20\x50\x6c\x75\x67\
-\x2d\x49\x6e\x20\x2e\x20\x53\x56\x47\x20\x56\x65\x72\x73\x69\x6f\
-\x6e\x3a\x20\x36\x2e\x30\x30\x20\x42\x75\x69\x6c\x64\x20\x30\x29\
-\x20\x20\x2d\x2d\x3e\x0d\x0a\x3c\x21\x44\x4f\x43\x54\x59\x50\x45\
-\x20\x73\x76\x67\x20\x50\x55\x42\x4c\x49\x43\x20\x22\x2d\x2f\x2f\
-\x57\x33\x43\x2f\x2f\x44\x54\x44\x20\x53\x56\x47\x20\x31\x2e\x31\
-\x2f\x2f\x45\x4e\x22\x20\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\
-\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x47\x72\x61\x70\x68\x69\x63\
-\x73\x2f\x53\x56\x47\x2f\x31\x2e\x31\x2f\x44\x54\x44\x2f\x73\x76\
-\x67\x31\x31\x2e\x64\x74\x64\x22\x3e\x0d\x0a\x3c\x73\x76\x67\x20\
-\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\x31\x22\x20\x69\x64\
-\x3d\x22\x43\x68\x65\x63\x6b\x22\x20\x78\x6d\x6c\x6e\x73\x3d\x22\
-\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\
-\x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x22\x20\x78\x6d\x6c\x6e\
-\x73\x3a\x78\x6c\x69\x6e\x6b\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\
-\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\x39\x39\x39\x2f\
-\x78\x6c\x69\x6e\x6b\x22\x20\x78\x3d\x22\x30\x70\x78\x22\x20\x79\
-\x3d\x22\x30\x70\x78\x22\x0d\x0a\x09\x20\x76\x69\x65\x77\x42\x6f\
-\x78\x3d\x22\x30\x20\x30\x20\x32\x30\x20\x32\x30\x22\x20\x65\x6e\
-\x61\x62\x6c\x65\x2d\x62\x61\x63\x6b\x67\x72\x6f\x75\x6e\x64\x3d\
-\x22\x6e\x65\x77\x20\x30\x20\x30\x20\x32\x30\x20\x32\x30\x22\x20\
-\x78\x6d\x6c\x3a\x73\x70\x61\x63\x65\x3d\x22\x70\x72\x65\x73\x65\
-\x72\x76\x65\x22\x3e\x0d\x0a\x3c\x70\x61\x74\x68\x20\x64\x3d\x22\
-\x4d\x38\x2e\x32\x39\x34\x2c\x31\x36\x2e\x39\x39\x38\x63\x2d\x30\
-\x2e\x34\x33\x35\x2c\x30\x2d\x30\x2e\x38\x34\x37\x2d\x30\x2e\x32\
-\x30\x33\x2d\x31\x2e\x31\x31\x31\x2d\x30\x2e\x35\x35\x33\x4c\x33\
-\x2e\x36\x31\x2c\x31\x31\x2e\x37\x32\x34\x63\x2d\x30\x2e\x34\x36\
-\x35\x2d\x30\x2e\x36\x31\x33\x2d\x30\x2e\x33\x34\x34\x2d\x31\x2e\
-\x34\x38\x36\x2c\x30\x2e\x32\x37\x2d\x31\x2e\x39\x35\x31\x0d\x0a\
-\x09\x63\x30\x2e\x36\x31\x35\x2d\x30\x2e\x34\x36\x37\x2c\x31\x2e\
-\x34\x38\x38\x2d\x30\x2e\x33\x34\x34\x2c\x31\x2e\x39\x35\x33\x2c\
-\x30\x2e\x32\x37\x6c\x32\x2e\x33\x35\x31\x2c\x33\x2e\x31\x30\x34\
-\x6c\x35\x2e\x39\x31\x31\x2d\x39\x2e\x34\x39\x32\x63\x30\x2e\x34\
-\x30\x37\x2d\x30\x2e\x36\x35\x32\x2c\x31\x2e\x32\x36\x37\x2d\x30\
-\x2e\x38\x35\x32\x2c\x31\x2e\x39\x32\x31\x2d\x30\x2e\x34\x34\x35\
-\x0d\x0a\x09\x63\x30\x2e\x36\x35\x33\x2c\x30\x2e\x34\x30\x36\x2c\
-\x30\x2e\x38\x35\x34\x2c\x31\x2e\x32\x36\x36\x2c\x30\x2e\x34\x34\
-\x36\x2c\x31\x2e\x39\x32\x4c\x39\x2e\x34\x37\x38\x2c\x31\x36\x2e\
-\x33\x34\x63\x2d\x30\x2e\x32\x34\x32\x2c\x30\x2e\x33\x39\x31\x2d\
-\x30\x2e\x36\x36\x31\x2c\x30\x2e\x36\x33\x35\x2d\x31\x2e\x31\x32\
-\x2c\x30\x2e\x36\x35\x36\x43\x38\x2e\x33\x33\x36\x2c\x31\x36\x2e\
-\x39\x39\x38\x2c\x38\x2e\x33\x31\x36\x2c\x31\x36\x2e\x39\x39\x38\
-\x2c\x38\x2e\x32\x39\x34\x2c\x31\x36\x2e\x39\x39\x38\x7a\x22\x2f\
-\x3e\x0d\x0a\x3c\x2f\x73\x76\x67\x3e\x0d\x0a\
-\x00\x00\x03\xf5\
-\x3c\
-\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\
-\x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x75\x74\x66\
-\x2d\x38\x22\x3f\x3e\x0d\x0a\x3c\x21\x2d\x2d\x20\x47\x65\x6e\x65\
-\x72\x61\x74\x6f\x72\x3a\x20\x41\x64\x6f\x62\x65\x20\x49\x6c\x6c\
-\x75\x73\x74\x72\x61\x74\x6f\x72\x20\x31\x38\x2e\x31\x2e\x31\x2c\
-\x20\x53\x56\x47\x20\x45\x78\x70\x6f\x72\x74\x20\x50\x6c\x75\x67\
-\x2d\x49\x6e\x20\x2e\x20\x53\x56\x47\x20\x56\x65\x72\x73\x69\x6f\
-\x6e\x3a\x20\x36\x2e\x30\x30\x20\x42\x75\x69\x6c\x64\x20\x30\x29\
-\x20\x20\x2d\x2d\x3e\x0d\x0a\x3c\x21\x44\x4f\x43\x54\x59\x50\x45\
-\x20\x73\x76\x67\x20\x50\x55\x42\x4c\x49\x43\x20\x22\x2d\x2f\x2f\
-\x57\x33\x43\x2f\x2f\x44\x54\x44\x20\x53\x56\x47\x20\x31\x2e\x31\
-\x2f\x2f\x45\x4e\x22\x20\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\
-\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x47\x72\x61\x70\x68\x69\x63\
-\x73\x2f\x53\x56\x47\x2f\x31\x2e\x31\x2f\x44\x54\x44\x2f\x73\x76\
-\x67\x31\x31\x2e\x64\x74\x64\x22\x3e\x0d\x0a\x3c\x73\x76\x67\x20\
-\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\x31\x22\x20\x69\x64\
-\x3d\x22\x43\x68\x65\x76\x72\x6f\x6e\x5f\x63\x69\x72\x63\x6c\x65\
-\x64\x5f\x6c\x65\x66\x74\x22\x20\x78\x6d\x6c\x6e\x73\x3d\x22\x68\
-\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\
-\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x22\x20\x78\x6d\x6c\x6e\x73\
-\x3a\x78\x6c\x69\x6e\x6b\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\
-\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\x39\x39\x39\x2f\x78\
-\x6c\x69\x6e\x6b\x22\x0d\x0a\x09\x20\x78\x3d\x22\x30\x70\x78\x22\
-\x20\x79\x3d\x22\x30\x70\x78\x22\x20\x76\x69\x65\x77\x42\x6f\x78\
\x3d\x22\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\x32\x22\x20\x65\
\x6e\x61\x62\x6c\x65\x2d\x62\x61\x63\x6b\x67\x72\x6f\x75\x6e\x64\
\x3d\x22\x6e\x65\x77\x20\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\
\x32\x22\x20\x78\x6d\x6c\x3a\x73\x70\x61\x63\x65\x3d\x22\x70\x72\
-\x65\x73\x65\x72\x76\x65\x22\x3e\x0d\x0a\x3c\x67\x20\x74\x72\x61\
-\x6e\x73\x66\x6f\x72\x6d\x3d\x27\x6d\x61\x74\x72\x69\x78\x28\x32\
-\x34\x20\x30\x20\x30\x20\x32\x34\x20\x30\x20\x30\x29\x27\x3e\x0d\
-\x0a\x3c\x70\x61\x74\x68\x20\x64\x3d\x22\x4d\x31\x31\x2e\x33\x30\
-\x32\x2c\x36\x2e\x37\x37\x36\x63\x2d\x30\x2e\x31\x39\x36\x2d\x30\
-\x2e\x31\x39\x37\x2d\x30\x2e\x35\x31\x35\x2d\x30\x2e\x31\x39\x37\
-\x2d\x30\x2e\x37\x31\x2c\x30\x4c\x37\x2e\x37\x38\x35\x2c\x39\x2e\
-\x36\x34\x31\x63\x2d\x30\x2e\x31\x39\x36\x2c\x30\x2e\x31\x39\x39\
-\x2d\x30\x2e\x31\x39\x36\x2c\x30\x2e\x35\x32\x2c\x30\x2c\x30\x2e\
-\x37\x31\x37\x6c\x32\x2e\x38\x30\x37\x2c\x32\x2e\x38\x36\x34\x0d\
-\x0a\x09\x63\x30\x2e\x31\x39\x35\x2c\x30\x2e\x31\x39\x39\x2c\x30\
-\x2e\x35\x31\x34\x2c\x30\x2e\x31\x39\x38\x2c\x30\x2e\x37\x31\x2c\
-\x30\x63\x30\x2e\x31\x39\x36\x2d\x30\x2e\x31\x39\x37\x2c\x30\x2e\
-\x31\x39\x36\x2d\x30\x2e\x35\x31\x38\x2c\x30\x2d\x30\x2e\x37\x31\
-\x37\x4c\x39\x2c\x31\x30\x6c\x32\x2e\x33\x30\x32\x2d\x32\x2e\x35\
-\x30\x36\x43\x31\x31\x2e\x34\x39\x38\x2c\x37\x2e\x32\x39\x36\x2c\
-\x31\x31\x2e\x34\x39\x38\x2c\x36\x2e\x39\x37\x36\x2c\x31\x31\x2e\
-\x33\x30\x32\x2c\x36\x2e\x37\x37\x36\x7a\x0d\x0a\x09\x20\x4d\x31\
-\x30\x2c\x30\x2e\x34\x63\x2d\x35\x2e\x33\x30\x32\x2c\x30\x2d\x39\
-\x2e\x36\x2c\x34\x2e\x32\x39\x38\x2d\x39\x2e\x36\x2c\x39\x2e\x36\
-\x63\x30\x2c\x35\x2e\x33\x30\x33\x2c\x34\x2e\x32\x39\x38\x2c\x39\
-\x2e\x36\x2c\x39\x2e\x36\x2c\x39\x2e\x36\x73\x39\x2e\x36\x2d\x34\
-\x2e\x32\x39\x37\x2c\x39\x2e\x36\x2d\x39\x2e\x36\x43\x31\x39\x2e\
-\x36\x2c\x34\x2e\x36\x39\x38\x2c\x31\x35\x2e\x33\x30\x32\x2c\x30\
-\x2e\x34\x2c\x31\x30\x2c\x30\x2e\x34\x7a\x20\x4d\x31\x30\x2c\x31\
-\x38\x2e\x33\x35\x34\x0d\x0a\x09\x63\x2d\x34\x2e\x36\x31\x35\x2c\
-\x30\x2d\x38\x2e\x33\x35\x34\x2d\x33\x2e\x37\x34\x2d\x38\x2e\x33\
-\x35\x34\x2d\x38\x2e\x33\x35\x34\x63\x30\x2d\x34\x2e\x36\x31\x34\
-\x2c\x33\x2e\x37\x33\x39\x2d\x38\x2e\x33\x35\x34\x2c\x38\x2e\x33\
-\x35\x34\x2d\x38\x2e\x33\x35\x34\x63\x34\x2e\x36\x31\x33\x2c\x30\
-\x2c\x38\x2e\x33\x35\x34\x2c\x33\x2e\x37\x34\x2c\x38\x2e\x33\x35\
-\x34\x2c\x38\x2e\x33\x35\x34\x0d\x0a\x09\x43\x31\x38\x2e\x33\x35\
-\x34\x2c\x31\x34\x2e\x36\x31\x34\x2c\x31\x34\x2e\x36\x31\x33\x2c\
-\x31\x38\x2e\x33\x35\x34\x2c\x31\x30\x2c\x31\x38\x2e\x33\x35\x34\
-\x7a\x22\x2f\x3e\x0d\x0a\x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\x73\x76\
-\x67\x3e\x0d\x0a\
+\x65\x73\x65\x72\x76\x65\x22\x3e\x0d\x0a\x3c\x70\x61\x74\x68\x20\
+\x64\x3d\x22\x4d\x34\x33\x37\x2e\x33\x33\x34\x2c\x31\x34\x34\x48\
+\x32\x35\x36\x2e\x30\x30\x36\x6c\x2d\x34\x32\x2e\x36\x36\x38\x2d\
+\x34\x38\x48\x37\x34\x2e\x36\x36\x36\x43\x35\x31\x2e\x31\x39\x37\
+\x2c\x39\x36\x2c\x33\x32\x2c\x31\x31\x35\x2e\x31\x39\x38\x2c\x33\
+\x32\x2c\x31\x33\x38\x2e\x36\x36\x37\x76\x32\x33\x34\x2e\x36\x36\
+\x36\x43\x33\x32\x2c\x33\x39\x36\x2e\x38\x30\x32\x2c\x35\x31\x2e\
+\x31\x39\x37\x2c\x34\x31\x36\x2c\x37\x34\x2e\x36\x36\x36\x2c\x34\
+\x31\x36\x68\x33\x36\x32\x2e\x36\x36\x38\x0d\x0a\x09\x43\x34\x36\
+\x30\x2e\x38\x30\x33\x2c\x34\x31\x36\x2c\x34\x38\x30\x2c\x33\x39\
+\x36\x2e\x38\x30\x32\x2c\x34\x38\x30\x2c\x33\x37\x33\x2e\x33\x33\
+\x33\x56\x31\x38\x36\x2e\x36\x36\x37\x43\x34\x38\x30\x2c\x31\x36\
+\x33\x2e\x31\x39\x38\x2c\x34\x36\x30\x2e\x38\x30\x33\x2c\x31\x34\
+\x34\x2c\x34\x33\x37\x2e\x33\x33\x34\x2c\x31\x34\x34\x7a\x20\x4d\
+\x34\x34\x38\x2c\x33\x37\x33\x2e\x33\x33\x33\x0d\x0a\x09\x63\x30\
+\x2c\x35\x2e\x37\x38\x32\x2d\x34\x2e\x38\x38\x35\x2c\x31\x30\x2e\
+\x36\x36\x37\x2d\x31\x30\x2e\x36\x36\x36\x2c\x31\x30\x2e\x36\x36\
+\x37\x48\x37\x34\x2e\x36\x36\x36\x43\x36\x38\x2e\x38\x38\x34\x2c\
+\x33\x38\x34\x2c\x36\x34\x2c\x33\x37\x39\x2e\x31\x31\x35\x2c\x36\
+\x34\x2c\x33\x37\x33\x2e\x33\x33\x33\x56\x31\x37\x36\x68\x33\x37\
+\x33\x2e\x33\x33\x34\x63\x35\x2e\x37\x38\x31\x2c\x30\x2c\x31\x30\
+\x2e\x36\x36\x36\x2c\x34\x2e\x38\x38\x35\x2c\x31\x30\x2e\x36\x36\
+\x36\x2c\x31\x30\x2e\x36\x36\x37\x0d\x0a\x09\x56\x33\x37\x33\x2e\
+\x33\x33\x33\x7a\x22\x2f\x3e\x0d\x0a\x3c\x2f\x73\x76\x67\x3e\x0d\
+\x0a\
\x00\x00\x03\x22\
\x3c\
\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\
@@ -1705,53 +2078,7 @@ qt_resource_data = b"\
\x35\x2c\x33\x39\x32\x2c\x32\x35\x36\x2c\x33\x39\x32\x7a\x22\x2f\
\x3e\x0d\x0a\x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\x73\x76\x67\x3e\x0d\
\x0a\
-\x00\x00\x02\xb7\
-\x3c\
-\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\
-\x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x75\x74\x66\
-\x2d\x38\x22\x3f\x3e\x0d\x0a\x3c\x21\x2d\x2d\x20\x47\x65\x6e\x65\
-\x72\x61\x74\x6f\x72\x3a\x20\x41\x64\x6f\x62\x65\x20\x49\x6c\x6c\
-\x75\x73\x74\x72\x61\x74\x6f\x72\x20\x31\x36\x2e\x32\x2e\x31\x2c\
-\x20\x53\x56\x47\x20\x45\x78\x70\x6f\x72\x74\x20\x50\x6c\x75\x67\
-\x2d\x49\x6e\x20\x2e\x20\x53\x56\x47\x20\x56\x65\x72\x73\x69\x6f\
-\x6e\x3a\x20\x36\x2e\x30\x30\x20\x42\x75\x69\x6c\x64\x20\x30\x29\
-\x20\x20\x2d\x2d\x3e\x0d\x0a\x3c\x21\x44\x4f\x43\x54\x59\x50\x45\
-\x20\x73\x76\x67\x20\x50\x55\x42\x4c\x49\x43\x20\x22\x2d\x2f\x2f\
-\x57\x33\x43\x2f\x2f\x44\x54\x44\x20\x53\x56\x47\x20\x31\x2e\x31\
-\x2f\x2f\x45\x4e\x22\x20\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\
-\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x47\x72\x61\x70\x68\x69\x63\
-\x73\x2f\x53\x56\x47\x2f\x31\x2e\x31\x2f\x44\x54\x44\x2f\x73\x76\
-\x67\x31\x31\x2e\x64\x74\x64\x22\x3e\x0d\x0a\x3c\x73\x76\x67\x20\
-\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\x31\x22\x20\x69\x64\
-\x3d\x22\x4c\x61\x79\x65\x72\x5f\x31\x22\x20\x78\x6d\x6c\x6e\x73\
-\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\
-\x6f\x72\x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x22\x20\x78\x6d\
-\x6c\x6e\x73\x3a\x78\x6c\x69\x6e\x6b\x3d\x22\x68\x74\x74\x70\x3a\
-\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\x39\x39\
-\x39\x2f\x78\x6c\x69\x6e\x6b\x22\x20\x78\x3d\x22\x30\x70\x78\x22\
-\x20\x79\x3d\x22\x30\x70\x78\x22\x0d\x0a\x09\x20\x77\x69\x64\x74\
-\x68\x3d\x22\x35\x31\x32\x70\x78\x22\x20\x68\x65\x69\x67\x68\x74\
-\x3d\x22\x35\x31\x32\x70\x78\x22\x20\x76\x69\x65\x77\x42\x6f\x78\
-\x3d\x22\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\x32\x22\x20\x65\
-\x6e\x61\x62\x6c\x65\x2d\x62\x61\x63\x6b\x67\x72\x6f\x75\x6e\x64\
-\x3d\x22\x6e\x65\x77\x20\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\
-\x32\x22\x20\x78\x6d\x6c\x3a\x73\x70\x61\x63\x65\x3d\x22\x70\x72\
-\x65\x73\x65\x72\x76\x65\x22\x3e\x0d\x0a\x3c\x67\x20\x69\x64\x3d\
-\x22\x49\x63\x6f\x6e\x5f\x35\x5f\x22\x3e\x0d\x0a\x09\x3c\x67\x3e\
-\x0d\x0a\x09\x09\x3c\x70\x6f\x6c\x79\x67\x6f\x6e\x20\x70\x6f\x69\
-\x6e\x74\x73\x3d\x22\x34\x30\x35\x2c\x31\x33\x36\x2e\x37\x39\x38\
-\x20\x33\x37\x35\x2e\x32\x30\x32\x2c\x31\x30\x37\x20\x32\x35\x36\
-\x2c\x32\x32\x36\x2e\x32\x30\x32\x20\x31\x33\x36\x2e\x37\x39\x38\
-\x2c\x31\x30\x37\x20\x31\x30\x37\x2c\x31\x33\x36\x2e\x37\x39\x38\
-\x20\x32\x32\x36\x2e\x32\x30\x32\x2c\x32\x35\x36\x20\x31\x30\x37\
-\x2c\x33\x37\x35\x2e\x32\x30\x32\x20\x31\x33\x36\x2e\x37\x39\x38\
-\x2c\x34\x30\x35\x20\x32\x35\x36\x2c\x32\x38\x35\x2e\x37\x39\x38\
-\x20\x0d\x0a\x09\x09\x09\x33\x37\x35\x2e\x32\x30\x32\x2c\x34\x30\
-\x35\x20\x34\x30\x35\x2c\x33\x37\x35\x2e\x32\x30\x32\x20\x32\x38\
-\x35\x2e\x37\x39\x38\x2c\x32\x35\x36\x20\x09\x09\x22\x2f\x3e\x0d\
-\x0a\x09\x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\
-\x73\x76\x67\x3e\x0d\x0a\
-\x00\x00\x02\x79\
+\x00\x00\x03\x6c\
\x3c\
\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\
\x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x75\x74\x66\
@@ -1782,115 +2109,70 @@ qt_resource_data = b"\
\x6e\x61\x62\x6c\x65\x2d\x62\x61\x63\x6b\x67\x72\x6f\x75\x6e\x64\
\x3d\x22\x6e\x65\x77\x20\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\
\x32\x22\x20\x78\x6d\x6c\x3a\x73\x70\x61\x63\x65\x3d\x22\x70\x72\
-\x65\x73\x65\x72\x76\x65\x22\x3e\x0d\x0a\x3c\x67\x20\x69\x64\x3d\
-\x22\x49\x63\x6f\x6e\x5f\x31\x5f\x22\x3e\x0d\x0a\x09\x3c\x67\x3e\
-\x0d\x0a\x09\x09\x3c\x67\x3e\x0d\x0a\x09\x09\x09\x3c\x70\x6f\x6c\
-\x79\x67\x6f\x6e\x20\x70\x6f\x69\x6e\x74\x73\x3d\x22\x31\x38\x36\
-\x2e\x33\x30\x31\x2c\x33\x33\x39\x2e\x38\x39\x33\x20\x39\x36\x2c\
-\x32\x34\x39\x2e\x34\x36\x31\x20\x36\x34\x2c\x32\x37\x39\x2e\x39\
-\x36\x38\x20\x31\x38\x36\x2e\x33\x30\x31\x2c\x34\x30\x32\x20\x34\
-\x34\x38\x2c\x31\x34\x30\x2e\x35\x30\x36\x20\x34\x31\x36\x2c\x31\
-\x31\x30\x20\x09\x09\x09\x22\x2f\x3e\x0d\x0a\x09\x09\x3c\x2f\x67\
-\x3e\x0d\x0a\x09\x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\x67\x3e\x0d\x0a\
-\x3c\x2f\x73\x76\x67\x3e\x0d\x0a\
-\x00\x00\x03\xeb\
-\x3c\
-\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\
-\x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x75\x74\x66\
-\x2d\x38\x22\x3f\x3e\x0d\x0a\x3c\x21\x2d\x2d\x20\x47\x65\x6e\x65\
-\x72\x61\x74\x6f\x72\x3a\x20\x41\x64\x6f\x62\x65\x20\x49\x6c\x6c\
-\x75\x73\x74\x72\x61\x74\x6f\x72\x20\x31\x36\x2e\x32\x2e\x31\x2c\
-\x20\x53\x56\x47\x20\x45\x78\x70\x6f\x72\x74\x20\x50\x6c\x75\x67\
-\x2d\x49\x6e\x20\x2e\x20\x53\x56\x47\x20\x56\x65\x72\x73\x69\x6f\
-\x6e\x3a\x20\x36\x2e\x30\x30\x20\x42\x75\x69\x6c\x64\x20\x30\x29\
-\x20\x20\x2d\x2d\x3e\x0d\x0a\x3c\x21\x44\x4f\x43\x54\x59\x50\x45\
-\x20\x73\x76\x67\x20\x50\x55\x42\x4c\x49\x43\x20\x22\x2d\x2f\x2f\
-\x57\x33\x43\x2f\x2f\x44\x54\x44\x20\x53\x56\x47\x20\x31\x2e\x31\
-\x2f\x2f\x45\x4e\x22\x20\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\
-\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x47\x72\x61\x70\x68\x69\x63\
-\x73\x2f\x53\x56\x47\x2f\x31\x2e\x31\x2f\x44\x54\x44\x2f\x73\x76\
-\x67\x31\x31\x2e\x64\x74\x64\x22\x3e\x0d\x0a\x3c\x73\x76\x67\x20\
-\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\x31\x22\x20\x69\x64\
-\x3d\x22\x4c\x61\x79\x65\x72\x5f\x31\x22\x20\x78\x6d\x6c\x6e\x73\
-\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\
-\x6f\x72\x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x22\x20\x78\x6d\
-\x6c\x6e\x73\x3a\x78\x6c\x69\x6e\x6b\x3d\x22\x68\x74\x74\x70\x3a\
-\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\x39\x39\
-\x39\x2f\x78\x6c\x69\x6e\x6b\x22\x20\x78\x3d\x22\x30\x70\x78\x22\
-\x20\x79\x3d\x22\x30\x70\x78\x22\x0d\x0a\x09\x20\x77\x69\x64\x74\
-\x68\x3d\x22\x35\x31\x32\x70\x78\x22\x20\x68\x65\x69\x67\x68\x74\
-\x3d\x22\x35\x31\x32\x70\x78\x22\x20\x76\x69\x65\x77\x42\x6f\x78\
-\x3d\x22\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\x32\x22\x20\x73\
-\x74\x79\x6c\x65\x3d\x22\x65\x6e\x61\x62\x6c\x65\x2d\x62\x61\x63\
-\x6b\x67\x72\x6f\x75\x6e\x64\x3a\x6e\x65\x77\x20\x30\x20\x30\x20\
-\x35\x31\x32\x20\x35\x31\x32\x3b\x22\x20\x78\x6d\x6c\x3a\x73\x70\
-\x61\x63\x65\x3d\x22\x70\x72\x65\x73\x65\x72\x76\x65\x22\x3e\x0d\
-\x0a\x3c\x67\x3e\x0d\x0a\x09\x3c\x70\x61\x74\x68\x20\x64\x3d\x22\
-\x4d\x32\x35\x36\x2c\x31\x32\x38\x63\x2d\x38\x31\x2e\x39\x2c\x30\
-\x2d\x31\x34\x35\x2e\x37\x2c\x34\x38\x2e\x38\x2d\x32\x32\x34\x2c\
-\x31\x32\x38\x63\x36\x37\x2e\x34\x2c\x36\x37\x2e\x37\x2c\x31\x32\
-\x34\x2c\x31\x32\x38\x2c\x32\x32\x34\x2c\x31\x32\x38\x63\x39\x39\
-\x2e\x39\x2c\x30\x2c\x31\x37\x33\x2e\x34\x2d\x37\x36\x2e\x34\x2c\
-\x32\x32\x34\x2d\x31\x32\x36\x2e\x36\x0d\x0a\x09\x09\x43\x34\x32\
-\x38\x2e\x32\x2c\x31\x39\x38\x2e\x36\x2c\x33\x35\x34\x2e\x38\x2c\
-\x31\x32\x38\x2c\x32\x35\x36\x2c\x31\x32\x38\x7a\x20\x4d\x32\x35\
-\x36\x2c\x33\x34\x37\x2e\x33\x63\x2d\x34\x39\x2e\x34\x2c\x30\x2d\
-\x38\x39\x2e\x36\x2d\x34\x31\x2d\x38\x39\x2e\x36\x2d\x39\x31\x2e\
-\x33\x63\x30\x2d\x35\x30\x2e\x34\x2c\x34\x30\x2e\x32\x2d\x39\x31\
-\x2e\x33\x2c\x38\x39\x2e\x36\x2d\x39\x31\x2e\x33\x73\x38\x39\x2e\
-\x36\x2c\x34\x31\x2c\x38\x39\x2e\x36\x2c\x39\x31\x2e\x33\x0d\x0a\
-\x09\x09\x43\x33\x34\x35\x2e\x36\x2c\x33\x30\x36\x2e\x34\x2c\x33\
-\x30\x35\x2e\x34\x2c\x33\x34\x37\x2e\x33\x2c\x32\x35\x36\x2c\x33\
-\x34\x37\x2e\x33\x7a\x22\x2f\x3e\x0d\x0a\x09\x3c\x67\x3e\x0d\x0a\
-\x09\x09\x3c\x70\x61\x74\x68\x20\x64\x3d\x22\x4d\x32\x35\x36\x2c\
-\x32\x32\x34\x63\x30\x2d\x37\x2e\x39\x2c\x32\x2e\x39\x2d\x31\x35\
-\x2e\x31\x2c\x37\x2e\x36\x2d\x32\x30\x2e\x37\x63\x2d\x32\x2e\x35\
-\x2d\x30\x2e\x34\x2d\x35\x2d\x30\x2e\x36\x2d\x37\x2e\x36\x2d\x30\
-\x2e\x36\x63\x2d\x32\x38\x2e\x38\x2c\x30\x2d\x35\x32\x2e\x33\x2c\
-\x32\x33\x2e\x39\x2d\x35\x32\x2e\x33\x2c\x35\x33\x2e\x33\x63\x30\
-\x2c\x32\x39\x2e\x34\x2c\x32\x33\x2e\x35\x2c\x35\x33\x2e\x33\x2c\
-\x35\x32\x2e\x33\x2c\x35\x33\x2e\x33\x0d\x0a\x09\x09\x09\x73\x35\
-\x32\x2e\x33\x2d\x32\x33\x2e\x39\x2c\x35\x32\x2e\x33\x2d\x35\x33\
-\x2e\x33\x63\x30\x2d\x32\x2e\x33\x2d\x30\x2e\x32\x2d\x34\x2e\x36\
-\x2d\x30\x2e\x34\x2d\x36\x2e\x39\x63\x2d\x35\x2e\x35\x2c\x34\x2e\
-\x33\x2d\x31\x32\x2e\x33\x2c\x36\x2e\x39\x2d\x31\x39\x2e\x38\x2c\
-\x36\x2e\x39\x43\x32\x37\x30\x2e\x33\x2c\x32\x35\x36\x2c\x32\x35\
-\x36\x2c\x32\x34\x31\x2e\x37\x2c\x32\x35\x36\x2c\x32\x32\x34\x7a\
-\x22\x2f\x3e\x0d\x0a\x09\x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\x67\x3e\
-\x0d\x0a\x3c\x2f\x73\x76\x67\x3e\x0d\x0a\
-\x00\x00\x01\xdd\
+\x65\x73\x65\x72\x76\x65\x22\x3e\x0d\x0a\x3c\x67\x3e\x0d\x0a\x09\
+\x0d\x0a\x09\x09\x3c\x72\x65\x63\x74\x20\x78\x3d\x22\x31\x37\x38\
+\x2e\x38\x34\x36\x22\x20\x79\x3d\x22\x39\x32\x2e\x30\x38\x37\x22\
+\x20\x74\x72\x61\x6e\x73\x66\x6f\x72\x6d\x3d\x22\x6d\x61\x74\x72\
+\x69\x78\x28\x2d\x30\x2e\x37\x30\x37\x31\x20\x2d\x30\x2e\x37\x30\
+\x37\x31\x20\x30\x2e\x37\x30\x37\x31\x20\x2d\x30\x2e\x37\x30\x37\
+\x31\x20\x32\x32\x34\x2e\x33\x34\x37\x36\x20\x36\x33\x31\x2e\x31\
+\x34\x39\x38\x29\x22\x20\x77\x69\x64\x74\x68\x3d\x22\x31\x32\x38\
+\x2e\x30\x38\x35\x22\x20\x68\x65\x69\x67\x68\x74\x3d\x22\x33\x35\
+\x34\x2e\x30\x34\x39\x22\x2f\x3e\x0d\x0a\x09\x3c\x70\x61\x74\x68\
+\x20\x64\x3d\x22\x4d\x34\x37\x31\x2e\x37\x32\x33\x2c\x38\x38\x2e\
+\x33\x39\x33\x6c\x2d\x34\x38\x2e\x31\x31\x35\x2d\x34\x38\x2e\x31\
+\x31\x34\x63\x2d\x31\x31\x2e\x37\x32\x33\x2d\x31\x31\x2e\x37\x32\
+\x34\x2d\x33\x31\x2e\x35\x35\x38\x2d\x31\x30\x2e\x38\x39\x36\x2d\
+\x34\x34\x2e\x33\x30\x34\x2c\x31\x2e\x38\x35\x6c\x2d\x34\x35\x2e\
+\x32\x30\x32\x2c\x34\x35\x2e\x32\x30\x33\x6c\x39\x30\x2e\x35\x36\
+\x39\x2c\x39\x30\x2e\x35\x36\x38\x6c\x34\x35\x2e\x32\x30\x32\x2d\
+\x34\x35\x2e\x32\x30\x32\x0d\x0a\x09\x09\x43\x34\x38\x32\x2e\x36\
+\x31\x36\x2c\x31\x31\x39\x2e\x39\x35\x32\x2c\x34\x38\x33\x2e\x34\
+\x34\x35\x2c\x31\x30\x30\x2e\x31\x31\x36\x2c\x34\x37\x31\x2e\x37\
+\x32\x33\x2c\x38\x38\x2e\x33\x39\x33\x7a\x22\x2f\x3e\x0d\x0a\x09\
+\x3c\x70\x6f\x6c\x79\x67\x6f\x6e\x20\x70\x6f\x69\x6e\x74\x73\x3d\
+\x22\x36\x34\x2e\x30\x32\x31\x2c\x33\x36\x33\x2e\x32\x35\x32\x20\
+\x33\x32\x2c\x34\x38\x30\x20\x31\x34\x38\x2e\x37\x33\x37\x2c\x34\
+\x34\x37\x2e\x39\x37\x39\x20\x09\x22\x2f\x3e\x0d\x0a\x3c\x2f\x67\
+\x3e\x0d\x0a\x3c\x2f\x73\x76\x67\x3e\x0d\x0a\
+\x00\x00\x02\x21\
\x00\
-\x00\x06\xe4\x78\x9c\xcd\x54\x4d\x6f\x9b\x40\x10\x3d\x13\x29\xff\
-\x61\xba\xb7\x4a\xec\x17\xc4\xd4\xa6\xa6\x51\xfd\x21\xcb\x52\x9a\
-\x58\x6a\xea\xaa\xa7\x0a\xc3\x16\x50\x28\x20\x58\xc0\xce\xaf\xef\
-\xee\x92\x54\x51\x95\xfa\x18\xfb\xb0\x33\xda\x79\x6f\xde\xbc\x65\
-\x24\xa6\xd7\xfb\xdf\x39\x74\xa2\x6e\xb2\xb2\x08\x10\x27\x0c\x81\
-\x28\xa2\x32\xce\x8a\x24\x40\xad\xfc\x85\xc7\xe8\xfa\xd3\xe5\xc5\
-\xf4\x1d\xc6\xb0\x12\x85\xa8\x43\x59\xd6\x3e\x7c\x8e\xcb\x9d\x80\
-\x75\x9e\xb7\x8d\x34\x25\xe0\x1e\x71\x08\xb7\xe1\xeb\x76\x05\xcb\
-\x7d\x55\xd6\x12\x36\x79\x9b\xe0\x75\x01\xc4\x14\xb7\xc3\x10\x1f\
-\x3c\xc2\x18\xcc\xda\x2c\x8f\x81\xbd\x07\xc0\xd8\xe8\x2f\xee\xe6\
-\xf7\x3f\x36\x4b\x68\xba\x04\x36\xdf\x66\x37\xeb\x39\x20\x4c\xe9\
-\x77\x77\x4e\xe9\xe2\x7e\x61\x24\x38\xe1\x94\x2e\x6f\x11\xa0\x54\
-\xca\xca\xa7\xb4\xef\x7b\xd2\xbb\xa4\xac\x13\xba\xaa\xc3\x2a\xcd\
-\xa2\x86\x2a\x22\xd5\x44\xd5\x44\x95\x18\xe7\x24\x96\x31\xd2\x33\
-\xb4\xf4\x8b\xa7\x72\x04\x59\x1c\xa0\x9b\xf0\x20\xea\x9f\xea\xa2\
-\xbe\x44\xd1\x04\xaf\x48\x3b\x8c\x31\x2d\xf5\x44\xf1\xf7\x79\x56\
-\x3c\xbc\x46\xe4\x93\xc9\x84\x1a\x54\x51\x03\xc4\xaa\x3d\x82\xc3\
-\x90\x2f\x2f\x2c\xe8\xb3\x58\xa6\x01\x1a\x71\x47\x03\xa9\xc8\x92\
-\x54\xfe\xbd\x76\x99\xe8\x67\xa5\xee\x02\x06\xaa\xa6\x0f\x82\x46\
-\x1e\x72\x11\x20\x51\x84\xbb\x5c\xe0\x5d\x18\x3d\x24\x75\xd9\x16\
-\xb1\x5f\x88\x1e\x5e\x30\x3f\x1a\x6f\x7e\x53\x85\x91\xa2\x57\xb5\
-\x68\x44\xdd\x09\xf3\xea\x44\x05\x6b\x88\xd6\xb4\x0a\x65\x0a\xea\
-\xd1\x5f\xb8\xc7\x6c\x3e\x72\x89\x1b\x31\xdb\x25\x1f\xb0\x6b\x7b\
-\x2a\xaa\xa3\x73\x8a\x47\x8c\x8c\x22\xac\x00\x9b\xe9\x22\x76\xf1\
-\x13\xdc\x0d\x10\x33\x98\xfb\xdc\xa0\x73\x6a\x00\xd3\xa2\x4b\xb6\
-\x51\xd4\x67\x6b\xe6\x3c\xea\x4f\x60\x59\xf4\x1f\x1f\xce\x78\x7c\
-\x16\x3e\xae\xb8\x77\x3a\x1f\x53\xfa\xff\x25\x39\x63\xfe\x26\xa6\
-\xcc\x9c\x23\x4b\x3a\x07\x1f\x7a\x49\x27\xf3\x71\x6c\x49\x57\x6c\
-\xf2\x26\xa6\xcc\x9c\x23\x4b\x3a\x07\x1f\x7a\x49\x27\xf3\x31\x2c\
-\xe9\x39\xaa\x7f\xb6\xca\x7f\x00\x99\x18\x96\x19\
-\x00\x00\x02\x7f\
+\x00\x07\xaf\x78\x9c\xdd\x55\x4d\x6f\x9c\x30\x10\xbd\xf7\x57\x4c\
+\xd5\x83\xdb\x03\xc6\xdf\x86\x28\x24\x52\x57\xea\x29\xbd\x25\x97\
+\xde\x68\xf0\x82\x9b\x5d\x58\x01\x5d\xb6\xff\xbe\x66\xd7\x60\x4a\
+\xaa\xf4\x92\x43\x15\x90\x30\xf3\x18\xbf\x99\xe7\xf1\x98\xeb\xdb\
+\xd3\x7e\x07\x47\xd3\x76\xb6\xa9\x33\x44\x31\x41\x60\xea\xc7\xa6\
+\xb0\x75\x99\xa1\x87\xfb\x2f\x51\x82\x6e\x6f\xde\x5d\xbf\x8f\x22\
+\xb8\xaf\x6c\x07\x5b\xbb\x33\x30\xe4\x1d\x94\xa6\x36\x6d\xde\x9b\
+\x02\xbe\xff\x82\xe2\x68\xbb\x63\xb9\x07\x86\x13\x88\x22\xe7\xef\
+\xac\x25\x2b\x45\xe0\xe2\xd4\x5d\x86\xaa\xbe\x3f\x5c\xc5\xf1\x30\
+\x0c\x78\xe0\xb8\x69\xcb\x98\x11\x42\x62\xe7\xef\x5d\xae\x4e\x3b\
+\x5b\x3f\xfd\xcd\x91\xa6\x69\x1a\x9f\xbf\x22\x18\x6c\xd1\x57\x19\
+\x52\x1c\x3b\x50\x1d\x7a\x04\x95\xb1\x65\xd5\x4f\x90\x1e\xa1\xa3\
+\x35\xc3\xe7\xe6\x94\x21\xa9\xb0\x20\xa9\x00\xc9\x71\x22\x13\x0e\
+\x7e\x9a\x1f\x35\x72\x09\x97\x60\x8b\x0c\x1d\xf2\xd2\xd0\x8b\xd9\
+\xb7\x79\xdd\x6d\x9b\x76\x9f\xa1\x7d\xde\xb7\xf6\xf4\x91\x38\x67\
+\xc5\x94\x00\x32\xde\x93\x31\x71\x53\xaa\x47\xf2\x4f\xe3\xec\x43\
+\xde\x57\xe0\xe8\xbe\x42\x8a\xb9\xd0\x82\x41\xc4\x38\x26\x94\xde\
+\x05\xc0\xbf\x3c\x47\x36\xcf\x90\x7f\x03\x8b\x39\x12\x53\x29\x29\
+\x05\x9a\x62\x29\x38\x85\x88\x62\x2d\x95\x54\xc0\x19\xa6\x6c\x36\
+\x37\x20\x04\x56\xa9\x4a\x83\x83\x14\x38\x49\x99\x0a\x14\x33\x30\
+\xe7\xfa\x02\x32\x09\x9c\x01\xae\xb0\xd2\x42\x6e\x02\x22\x08\x4e\
+\x94\x4a\x42\x64\xf7\xc2\x94\x14\x53\x6a\xde\xdc\x84\xdc\x27\x87\
+\x59\xdd\x44\x31\x03\x3e\xca\xdd\x7a\xa5\xbf\xa1\x71\xab\xee\x32\
+\xf4\x41\x6f\xc7\x1b\xc5\xae\x2e\x71\xf9\x8a\xa5\x0d\x42\x53\xac\
+\x29\x49\x97\x42\xdd\xbe\x22\x9c\x2d\x84\x6a\xcc\x09\xd5\xb3\xd0\
+\x8b\xb9\x14\xea\x1d\x82\x50\x4f\x11\x84\x4e\x51\x02\x22\xb1\xa4\
+\x89\x0c\x24\x17\x76\x1f\xe3\x3c\x2c\xaa\x7c\x81\x43\xd2\x7e\xf2\
+\x5a\xc5\xbc\x6e\x75\x53\x1b\x04\x5d\xdf\x36\x4f\xc6\xad\x22\x39\
+\x5f\x13\x10\xb9\x2e\x34\x8f\xf9\x21\x43\x6d\xf3\xb3\x2e\xfe\x80\
+\x7f\x34\xb6\x5e\xe3\x7b\xdb\x9b\x76\x67\xdd\xe0\x4e\x03\x82\x09\
+\xd7\x72\xfe\xe6\x5b\x99\xbb\x7c\x38\x65\xaf\x5f\xa7\xf5\x0a\xbe\
+\xe1\x1e\xf4\x0a\xdf\x5c\x09\x5f\x68\x35\xc9\x30\x4b\xf4\xe2\x4c\
+\x51\x0c\x8b\x84\xcf\x67\x8a\x37\x17\xad\x36\x39\x84\x6a\x79\x8a\
+\xf5\x46\xf9\x6f\x96\xf1\xf2\x70\xbf\xc8\x9b\xdf\xf9\x80\xe2\xe1\
+\
+\x00\x00\x02\xf7\
\x3c\
\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\
\x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x75\x74\x66\
@@ -1922,26 +2204,50 @@ qt_resource_data = b"\
\x6b\x67\x72\x6f\x75\x6e\x64\x3a\x6e\x65\x77\x20\x30\x20\x30\x20\
\x35\x31\x32\x20\x35\x31\x32\x3b\x22\x20\x78\x6d\x6c\x3a\x73\x70\
\x61\x63\x65\x3d\x22\x70\x72\x65\x73\x65\x72\x76\x65\x22\x3e\x0d\
-\x0a\x3c\x70\x6f\x6c\x79\x67\x6f\x6e\x20\x70\x6f\x69\x6e\x74\x73\
-\x3d\x22\x32\x38\x38\x2c\x39\x36\x20\x33\x33\x37\x2e\x39\x2c\x31\
-\x34\x35\x2e\x39\x20\x32\x37\x34\x2c\x32\x30\x39\x2e\x37\x20\x32\
-\x37\x34\x2c\x32\x30\x39\x2e\x37\x20\x31\x34\x35\x2e\x39\x2c\x33\
-\x33\x37\x2e\x39\x20\x39\x36\x2c\x32\x38\x38\x20\x39\x36\x2c\x34\
-\x31\x36\x20\x32\x32\x34\x2c\x34\x31\x36\x20\x31\x37\x34\x2e\x31\
-\x2c\x33\x36\x36\x2e\x31\x20\x33\x35\x37\x2e\x34\x2c\x31\x38\x32\
-\x2e\x39\x20\x33\x36\x36\x2e\x31\x2c\x31\x37\x34\x2e\x31\x20\x0d\
-\x0a\x09\x34\x31\x36\x2c\x32\x32\x34\x20\x34\x31\x36\x2c\x39\x36\
-\x20\x22\x2f\x3e\x0d\x0a\x3c\x2f\x73\x76\x67\x3e\x0d\x0a\
-\x00\x00\x00\x6c\
+\x0a\x3c\x70\x61\x74\x68\x20\x64\x3d\x22\x4d\x34\x31\x37\x2e\x34\
+\x2c\x32\x32\x34\x48\x32\x38\x38\x56\x39\x34\x2e\x36\x63\x30\x2d\
+\x31\x36\x2e\x39\x2d\x31\x34\x2e\x33\x2d\x33\x30\x2e\x36\x2d\x33\
+\x32\x2d\x33\x30\x2e\x36\x63\x2d\x31\x37\x2e\x37\x2c\x30\x2d\x33\
+\x32\x2c\x31\x33\x2e\x37\x2d\x33\x32\x2c\x33\x30\x2e\x36\x56\x32\
+\x32\x34\x48\x39\x34\x2e\x36\x43\x37\x37\x2e\x37\x2c\x32\x32\x34\
+\x2c\x36\x34\x2c\x32\x33\x38\x2e\x33\x2c\x36\x34\x2c\x32\x35\x36\
+\x0d\x0a\x09\x63\x30\x2c\x31\x37\x2e\x37\x2c\x31\x33\x2e\x37\x2c\
+\x33\x32\x2c\x33\x30\x2e\x36\x2c\x33\x32\x48\x32\x32\x34\x76\x31\
+\x32\x39\x2e\x34\x63\x30\x2c\x31\x36\x2e\x39\x2c\x31\x34\x2e\x33\
+\x2c\x33\x30\x2e\x36\x2c\x33\x32\x2c\x33\x30\x2e\x36\x63\x31\x37\
+\x2e\x37\x2c\x30\x2c\x33\x32\x2d\x31\x33\x2e\x37\x2c\x33\x32\x2d\
+\x33\x30\x2e\x36\x56\x32\x38\x38\x68\x31\x32\x39\x2e\x34\x63\x31\
+\x36\x2e\x39\x2c\x30\x2c\x33\x30\x2e\x36\x2d\x31\x34\x2e\x33\x2c\
+\x33\x30\x2e\x36\x2d\x33\x32\x0d\x0a\x09\x43\x34\x34\x38\x2c\x32\
+\x33\x38\x2e\x33\x2c\x34\x33\x34\x2e\x33\x2c\x32\x32\x34\x2c\x34\
+\x31\x37\x2e\x34\x2c\x32\x32\x34\x7a\x22\x2f\x3e\x0d\x0a\x3c\x2f\
+\x73\x76\x67\x3e\x0d\x0a\
+\x00\x00\x01\x69\
\x3c\
\x73\x76\x67\x20\x78\x6d\x6c\x6e\x73\x3d\x22\x68\x74\x74\x70\x3a\
\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x32\x30\x30\
-\x30\x2f\x73\x76\x67\x22\x20\x76\x69\x65\x77\x42\x6f\x78\x3d\x22\
-\x30\x20\x30\x20\x32\x30\x20\x32\x30\x22\x3e\x3c\x70\x61\x74\x68\
-\x20\x64\x3d\x22\x4d\x31\x38\x20\x31\x32\x76\x31\x48\x38\x76\x35\
-\x6c\x2d\x36\x2d\x36\x20\x36\x2d\x36\x76\x35\x68\x38\x56\x32\x68\
-\x32\x7a\x22\x2f\x3e\x3c\x2f\x73\x76\x67\x3e\
-\x00\x00\x04\x64\
+\x30\x2f\x73\x76\x67\x22\x20\x77\x69\x64\x74\x68\x3d\x22\x35\x31\
+\x32\x70\x78\x22\x20\x68\x65\x69\x67\x68\x74\x3d\x22\x35\x31\x32\
+\x70\x78\x22\x20\x76\x69\x65\x77\x42\x6f\x78\x3d\x22\x30\x20\x30\
+\x20\x35\x31\x32\x20\x35\x31\x32\x22\x3e\x3c\x67\x20\x74\x72\x61\
+\x6e\x73\x66\x6f\x72\x6d\x3d\x27\x6d\x61\x74\x72\x69\x78\x28\x32\
+\x34\x20\x30\x20\x30\x20\x32\x34\x20\x30\x20\x30\x29\x27\x3e\x3c\
+\x70\x61\x74\x68\x20\x64\x3d\x22\x4d\x34\x2e\x33\x34\x20\x31\x35\
+\x2e\x36\x36\x41\x37\x2e\x39\x37\x20\x37\x2e\x39\x37\x20\x30\x20\
+\x30\x20\x30\x20\x39\x20\x31\x37\x2e\x39\x34\x56\x31\x30\x48\x35\
+\x56\x38\x68\x34\x56\x35\x2e\x38\x33\x61\x33\x20\x33\x20\x30\x20\
+\x31\x20\x31\x20\x32\x20\x30\x56\x38\x68\x34\x76\x32\x68\x2d\x34\
+\x76\x37\x2e\x39\x34\x61\x37\x2e\x39\x37\x20\x37\x2e\x39\x37\x20\
+\x30\x20\x30\x20\x30\x20\x34\x2e\x36\x36\x2d\x32\x2e\x32\x38\x6c\
+\x2d\x31\x2e\x34\x32\x2d\x31\x2e\x34\x32\x68\x35\x2e\x36\x36\x6c\
+\x2d\x32\x2e\x38\x33\x20\x32\x2e\x38\x33\x61\x31\x30\x20\x31\x30\
+\x20\x30\x20\x30\x20\x31\x2d\x31\x34\x2e\x31\x34\x20\x30\x4c\x2e\
+\x31\x20\x31\x34\x2e\x32\x34\x68\x35\x2e\x36\x36\x6c\x2d\x31\x2e\
+\x34\x32\x20\x31\x2e\x34\x32\x7a\x4d\x31\x30\x20\x34\x61\x31\x20\
+\x31\x20\x30\x20\x31\x20\x30\x20\x30\x2d\x32\x20\x31\x20\x31\x20\
+\x30\x20\x30\x20\x30\x20\x30\x20\x32\x7a\x22\x2f\x3e\x3c\x2f\x67\
+\x3e\x3c\x2f\x73\x76\x67\x3e\x0a\
+\x00\x00\x02\xfc\
\x3c\
\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\
\x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x75\x74\x66\
@@ -1973,334 +2279,25 @@ qt_resource_data = b"\
\x3d\x22\x6e\x65\x77\x20\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\
\x32\x22\x20\x78\x6d\x6c\x3a\x73\x70\x61\x63\x65\x3d\x22\x70\x72\
\x65\x73\x65\x72\x76\x65\x22\x3e\x0d\x0a\x3c\x67\x20\x69\x64\x3d\
-\x22\x49\x63\x6f\x6e\x22\x3e\x0d\x0a\x09\x3c\x67\x3e\x0d\x0a\x09\
-\x09\x3c\x70\x61\x74\x68\x20\x64\x3d\x22\x4d\x32\x35\x36\x2c\x31\
-\x37\x36\x63\x2d\x34\x34\x2e\x30\x30\x34\x2c\x30\x2d\x38\x30\x2e\
-\x30\x30\x31\x2c\x33\x36\x2d\x38\x30\x2e\x30\x30\x31\x2c\x38\x30\
-\x63\x30\x2c\x34\x34\x2e\x30\x30\x34\x2c\x33\x35\x2e\x39\x39\x37\
-\x2c\x38\x30\x2c\x38\x30\x2e\x30\x30\x31\x2c\x38\x30\x63\x34\x34\
-\x2e\x30\x30\x35\x2c\x30\x2c\x37\x39\x2e\x39\x39\x39\x2d\x33\x35\
-\x2e\x39\x39\x36\x2c\x37\x39\x2e\x39\x39\x39\x2d\x38\x30\x0d\x0a\
-\x09\x09\x09\x43\x33\x33\x35\x2e\x39\x39\x39\x2c\x32\x31\x32\x2c\
-\x33\x30\x30\x2e\x30\x30\x35\x2c\x31\x37\x36\x2c\x32\x35\x36\x2c\
-\x31\x37\x36\x7a\x20\x4d\x34\x34\x36\x2e\x39\x33\x38\x2c\x32\x33\
-\x34\x2e\x36\x36\x37\x63\x2d\x39\x2e\x36\x30\x35\x2d\x38\x38\x2e\
-\x35\x33\x31\x2d\x38\x31\x2e\x30\x37\x34\x2d\x31\x36\x30\x2d\x31\
-\x36\x39\x2e\x36\x30\x35\x2d\x31\x36\x39\x2e\x35\x39\x39\x56\x33\
-\x32\x68\x2d\x34\x32\x2e\x36\x36\x36\x76\x33\x33\x2e\x30\x36\x37\
-\x0d\x0a\x09\x09\x09\x63\x2d\x38\x38\x2e\x35\x33\x31\x2c\x39\x2e\
-\x35\x39\x39\x2d\x31\x36\x30\x2c\x38\x31\x2e\x30\x36\x38\x2d\x31\
-\x36\x39\x2e\x36\x30\x34\x2c\x31\x36\x39\x2e\x35\x39\x39\x48\x33\
-\x32\x76\x34\x32\x2e\x36\x36\x37\x68\x33\x33\x2e\x30\x36\x32\x63\
-\x39\x2e\x36\x30\x34\x2c\x38\x38\x2e\x35\x33\x31\x2c\x38\x31\x2e\
-\x30\x37\x32\x2c\x31\x36\x30\x2c\x31\x36\x39\x2e\x36\x30\x34\x2c\
-\x31\x36\x39\x2e\x36\x30\x34\x56\x34\x38\x30\x68\x34\x32\x2e\x36\
-\x36\x36\x76\x2d\x33\x33\x2e\x30\x36\x32\x0d\x0a\x09\x09\x09\x63\
-\x38\x38\x2e\x35\x33\x31\x2d\x39\x2e\x36\x30\x34\x2c\x31\x36\x30\
-\x2d\x38\x31\x2e\x30\x37\x33\x2c\x31\x36\x39\x2e\x36\x30\x35\x2d\
-\x31\x36\x39\x2e\x36\x30\x34\x48\x34\x38\x30\x76\x2d\x34\x32\x2e\
-\x36\x36\x37\x48\x34\x34\x36\x2e\x39\x33\x38\x7a\x20\x4d\x32\x35\
-\x36\x2c\x34\x30\x35\x2e\x33\x33\x33\x63\x2d\x38\x32\x2e\x31\x33\
-\x37\x2c\x30\x2d\x31\x34\x39\x2e\x33\x33\x34\x2d\x36\x37\x2e\x31\
-\x39\x38\x2d\x31\x34\x39\x2e\x33\x33\x34\x2d\x31\x34\x39\x2e\x33\
-\x33\x33\x0d\x0a\x09\x09\x09\x63\x30\x2d\x38\x32\x2e\x31\x33\x36\
-\x2c\x36\x37\x2e\x31\x39\x37\x2d\x31\x34\x39\x2e\x33\x33\x33\x2c\
-\x31\x34\x39\x2e\x33\x33\x34\x2d\x31\x34\x39\x2e\x33\x33\x33\x63\
-\x38\x32\x2e\x31\x33\x35\x2c\x30\x2c\x31\x34\x39\x2e\x33\x33\x32\
-\x2c\x36\x37\x2e\x31\x39\x38\x2c\x31\x34\x39\x2e\x33\x33\x32\x2c\
-\x31\x34\x39\x2e\x33\x33\x33\x43\x34\x30\x35\x2e\x33\x33\x32\x2c\
-\x33\x33\x38\x2e\x31\x33\x35\x2c\x33\x33\x38\x2e\x31\x33\x35\x2c\
-\x34\x30\x35\x2e\x33\x33\x33\x2c\x32\x35\x36\x2c\x34\x30\x35\x2e\
-\x33\x33\x33\x7a\x0d\x0a\x09\x09\x09\x22\x2f\x3e\x0d\x0a\x09\x3c\
-\x2f\x67\x3e\x0d\x0a\x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\x73\x76\x67\
-\x3e\x0d\x0a\
-\x00\x00\x02\xa1\
-\x3c\
-\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\
-\x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x75\x74\x66\
-\x2d\x38\x22\x3f\x3e\x0d\x0a\x3c\x21\x2d\x2d\x20\x47\x65\x6e\x65\
-\x72\x61\x74\x6f\x72\x3a\x20\x41\x64\x6f\x62\x65\x20\x49\x6c\x6c\
-\x75\x73\x74\x72\x61\x74\x6f\x72\x20\x31\x38\x2e\x31\x2e\x31\x2c\
-\x20\x53\x56\x47\x20\x45\x78\x70\x6f\x72\x74\x20\x50\x6c\x75\x67\
-\x2d\x49\x6e\x20\x2e\x20\x53\x56\x47\x20\x56\x65\x72\x73\x69\x6f\
-\x6e\x3a\x20\x36\x2e\x30\x30\x20\x42\x75\x69\x6c\x64\x20\x30\x29\
-\x20\x20\x2d\x2d\x3e\x0d\x0a\x3c\x21\x44\x4f\x43\x54\x59\x50\x45\
-\x20\x73\x76\x67\x20\x50\x55\x42\x4c\x49\x43\x20\x22\x2d\x2f\x2f\
-\x57\x33\x43\x2f\x2f\x44\x54\x44\x20\x53\x56\x47\x20\x31\x2e\x31\
-\x2f\x2f\x45\x4e\x22\x20\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\
-\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x47\x72\x61\x70\x68\x69\x63\
-\x73\x2f\x53\x56\x47\x2f\x31\x2e\x31\x2f\x44\x54\x44\x2f\x73\x76\
-\x67\x31\x31\x2e\x64\x74\x64\x22\x3e\x0d\x0a\x3c\x73\x76\x67\x20\
-\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\x31\x22\x20\x69\x64\
-\x3d\x22\x53\x61\x76\x65\x22\x20\x78\x6d\x6c\x6e\x73\x3d\x22\x68\
-\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\
-\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x22\x20\x78\x6d\x6c\x6e\x73\
-\x3a\x78\x6c\x69\x6e\x6b\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\
-\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\x39\x39\x39\x2f\x78\
-\x6c\x69\x6e\x6b\x22\x20\x78\x3d\x22\x35\x31\x32\x70\x78\x22\x20\
-\x79\x3d\x22\x35\x31\x32\x70\x78\x22\x0d\x0a\x09\x20\x76\x69\x65\
-\x77\x42\x6f\x78\x3d\x22\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\
-\x32\x22\x20\x65\x6e\x61\x62\x6c\x65\x2d\x62\x61\x63\x6b\x67\x72\
-\x6f\x75\x6e\x64\x3d\x22\x6e\x65\x77\x20\x30\x20\x30\x20\x35\x31\
-\x32\x20\x35\x31\x32\x22\x20\x78\x6d\x6c\x3a\x73\x70\x61\x63\x65\
-\x3d\x22\x70\x72\x65\x73\x65\x72\x76\x65\x22\x3e\x0d\x0a\x3c\x67\
-\x20\x74\x72\x61\x6e\x73\x66\x6f\x72\x6d\x3d\x27\x6d\x61\x74\x72\
-\x69\x78\x28\x32\x34\x20\x30\x20\x30\x20\x32\x34\x20\x30\x20\x30\
-\x29\x27\x3e\x0d\x0a\x3c\x70\x61\x74\x68\x20\x64\x3d\x22\x4d\x31\
-\x35\x2e\x31\x37\x33\x2c\x32\x48\x34\x43\x32\x2e\x38\x39\x39\x2c\
-\x32\x2c\x32\x2c\x32\x2e\x39\x2c\x32\x2c\x34\x76\x31\x32\x63\x30\
-\x2c\x31\x2e\x31\x2c\x30\x2e\x38\x39\x39\x2c\x32\x2c\x32\x2c\x32\
-\x68\x31\x32\x63\x31\x2e\x31\x30\x31\x2c\x30\x2c\x32\x2d\x30\x2e\
-\x39\x2c\x32\x2d\x32\x56\x35\x2e\x31\x32\x37\x4c\x31\x35\x2e\x31\
-\x37\x33\x2c\x32\x7a\x20\x4d\x31\x34\x2c\x38\x63\x30\x2c\x30\x2e\
-\x35\x34\x39\x2d\x30\x2e\x34\x35\x2c\x31\x2d\x31\x2c\x31\x48\x37\
-\x0d\x0a\x09\x43\x36\x2e\x34\x35\x2c\x39\x2c\x36\x2c\x38\x2e\x35\
-\x34\x39\x2c\x36\x2c\x38\x56\x33\x68\x38\x56\x38\x7a\x20\x4d\x31\
-\x33\x2c\x34\x68\x2d\x32\x76\x34\x68\x32\x56\x34\x7a\x22\x2f\x3e\
-\x0d\x0a\x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\x73\x76\x67\x3e\x0d\x0a\
-\
-\x00\x00\x04\x1c\
-\x3c\
-\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x27\x31\x2e\
-\x30\x27\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x27\x55\x54\x46\
-\x2d\x38\x27\x3f\x3e\x0a\x3c\x21\x2d\x2d\x20\x54\x68\x69\x73\x20\
-\x66\x69\x6c\x65\x20\x77\x61\x73\x20\x67\x65\x6e\x65\x72\x61\x74\
-\x65\x64\x20\x62\x79\x20\x64\x76\x69\x73\x76\x67\x6d\x20\x32\x2e\
-\x38\x20\x2d\x2d\x3e\x0a\x3c\x73\x76\x67\x20\x76\x65\x72\x73\x69\
-\x6f\x6e\x3d\x27\x31\x2e\x31\x27\x20\x78\x6d\x6c\x6e\x73\x3d\x27\
-\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\
-\x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x27\x20\x78\x6d\x6c\x6e\
-\x73\x3a\x78\x6c\x69\x6e\x6b\x3d\x27\x68\x74\x74\x70\x3a\x2f\x2f\
-\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\x39\x39\x39\x2f\
-\x78\x6c\x69\x6e\x6b\x27\x20\x77\x69\x64\x74\x68\x3d\x27\x36\x33\
-\x2e\x39\x39\x39\x36\x70\x74\x27\x20\x68\x65\x69\x67\x68\x74\x3d\
-\x27\x36\x33\x2e\x39\x39\x39\x37\x70\x74\x27\x20\x76\x69\x65\x77\
-\x42\x6f\x78\x3d\x27\x35\x36\x2e\x34\x30\x39\x34\x20\x35\x33\x2e\
-\x38\x35\x38\x33\x20\x36\x33\x2e\x39\x39\x39\x36\x20\x36\x33\x2e\
-\x39\x39\x39\x37\x27\x3e\x0a\x3c\x67\x20\x69\x64\x3d\x27\x70\x61\
-\x67\x65\x31\x27\x3e\x0a\x3c\x67\x20\x74\x72\x61\x6e\x73\x66\x6f\
-\x72\x6d\x3d\x27\x6d\x61\x74\x72\x69\x78\x28\x30\x2e\x39\x39\x36\
-\x32\x36\x34\x20\x30\x20\x30\x20\x30\x2e\x39\x39\x36\x32\x36\x34\
-\x20\x35\x36\x2e\x34\x30\x39\x34\x20\x31\x31\x37\x2e\x38\x35\x38\
-\x29\x27\x3e\x0a\x3c\x70\x61\x74\x68\x20\x64\x3d\x27\x4d\x20\x32\
-\x2e\x30\x30\x37\x35\x20\x2d\x32\x2e\x30\x30\x37\x35\x4c\x20\x36\
-\x32\x2e\x32\x33\x32\x35\x20\x2d\x32\x2e\x30\x30\x37\x35\x4c\x20\
-\x36\x32\x2e\x32\x33\x32\x35\x20\x2d\x36\x32\x2e\x32\x33\x32\x35\
-\x4c\x20\x32\x2e\x30\x30\x37\x35\x20\x2d\x36\x32\x2e\x32\x33\x32\
-\x35\x4c\x20\x32\x2e\x30\x30\x37\x35\x20\x2d\x32\x2e\x30\x30\x37\
-\x35\x5a\x27\x20\x66\x69\x6c\x6c\x3d\x27\x6e\x6f\x6e\x65\x27\x20\
-\x73\x74\x72\x6f\x6b\x65\x3d\x27\x23\x30\x30\x30\x30\x30\x30\x27\
-\x20\x73\x74\x72\x6f\x6b\x65\x2d\x6c\x69\x6e\x65\x63\x61\x70\x3d\
-\x27\x72\x6f\x75\x6e\x64\x27\x20\x73\x74\x72\x6f\x6b\x65\x2d\x6c\
-\x69\x6e\x65\x6a\x6f\x69\x6e\x3d\x27\x72\x6f\x75\x6e\x64\x27\x20\
-\x73\x74\x72\x6f\x6b\x65\x2d\x6d\x69\x74\x65\x72\x6c\x69\x6d\x69\
-\x74\x3d\x27\x31\x30\x2e\x30\x33\x37\x35\x27\x20\x73\x74\x72\x6f\
-\x6b\x65\x2d\x77\x69\x64\x74\x68\x3d\x27\x34\x2e\x30\x31\x35\x27\
-\x2f\x3e\x0a\x3c\x2f\x67\x3e\x0a\x3c\x67\x20\x74\x72\x61\x6e\x73\
-\x66\x6f\x72\x6d\x3d\x27\x6d\x61\x74\x72\x69\x78\x28\x30\x2e\x39\
-\x39\x36\x32\x36\x34\x20\x30\x20\x30\x20\x30\x2e\x39\x39\x36\x32\
-\x36\x34\x20\x35\x36\x2e\x34\x30\x39\x34\x20\x31\x31\x37\x2e\x38\
-\x35\x38\x29\x27\x3e\x0a\x3c\x70\x61\x74\x68\x20\x64\x3d\x27\x4d\
-\x20\x32\x2e\x30\x30\x37\x35\x20\x2d\x33\x32\x2e\x31\x32\x4c\x20\
-\x36\x32\x2e\x32\x33\x32\x35\x20\x2d\x33\x32\x2e\x31\x32\x27\x20\
-\x66\x69\x6c\x6c\x3d\x27\x6e\x6f\x6e\x65\x27\x20\x73\x74\x72\x6f\
-\x6b\x65\x3d\x27\x23\x30\x30\x30\x30\x30\x30\x27\x20\x73\x74\x72\
-\x6f\x6b\x65\x2d\x6c\x69\x6e\x65\x63\x61\x70\x3d\x27\x72\x6f\x75\
-\x6e\x64\x27\x20\x73\x74\x72\x6f\x6b\x65\x2d\x6c\x69\x6e\x65\x6a\
-\x6f\x69\x6e\x3d\x27\x72\x6f\x75\x6e\x64\x27\x20\x73\x74\x72\x6f\
-\x6b\x65\x2d\x6d\x69\x74\x65\x72\x6c\x69\x6d\x69\x74\x3d\x27\x31\
-\x30\x2e\x30\x33\x37\x35\x27\x20\x73\x74\x72\x6f\x6b\x65\x2d\x77\
-\x69\x64\x74\x68\x3d\x27\x34\x2e\x30\x31\x35\x27\x2f\x3e\x0a\x3c\
-\x2f\x67\x3e\x0a\x3c\x67\x20\x74\x72\x61\x6e\x73\x66\x6f\x72\x6d\
-\x3d\x27\x6d\x61\x74\x72\x69\x78\x28\x30\x2e\x39\x39\x36\x32\x36\
-\x34\x20\x30\x20\x30\x20\x30\x2e\x39\x39\x36\x32\x36\x34\x20\x35\
-\x36\x2e\x34\x30\x39\x34\x20\x31\x31\x37\x2e\x38\x35\x38\x29\x27\
-\x3e\x0a\x3c\x70\x61\x74\x68\x20\x64\x3d\x27\x4d\x20\x33\x32\x2e\
-\x31\x32\x20\x2d\x32\x2e\x30\x30\x37\x35\x4c\x20\x33\x32\x2e\x31\
-\x32\x20\x2d\x36\x32\x2e\x32\x33\x32\x35\x27\x20\x66\x69\x6c\x6c\
-\x3d\x27\x6e\x6f\x6e\x65\x27\x20\x73\x74\x72\x6f\x6b\x65\x3d\x27\
-\x23\x30\x30\x30\x30\x30\x30\x27\x20\x73\x74\x72\x6f\x6b\x65\x2d\
-\x6c\x69\x6e\x65\x63\x61\x70\x3d\x27\x72\x6f\x75\x6e\x64\x27\x20\
-\x73\x74\x72\x6f\x6b\x65\x2d\x6c\x69\x6e\x65\x6a\x6f\x69\x6e\x3d\
-\x27\x72\x6f\x75\x6e\x64\x27\x20\x73\x74\x72\x6f\x6b\x65\x2d\x6d\
-\x69\x74\x65\x72\x6c\x69\x6d\x69\x74\x3d\x27\x31\x30\x2e\x30\x33\
-\x37\x35\x27\x20\x73\x74\x72\x6f\x6b\x65\x2d\x77\x69\x64\x74\x68\
-\x3d\x27\x34\x2e\x30\x31\x35\x27\x2f\x3e\x0a\x3c\x2f\x67\x3e\x0a\
-\x3c\x2f\x67\x3e\x0a\x3c\x2f\x73\x76\x67\x3e\
-\x00\x00\x05\xca\
-\x3c\
-\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\
-\x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x75\x74\x66\
-\x2d\x38\x22\x3f\x3e\x0d\x0a\x3c\x21\x2d\x2d\x20\x47\x65\x6e\x65\
-\x72\x61\x74\x6f\x72\x3a\x20\x41\x64\x6f\x62\x65\x20\x49\x6c\x6c\
-\x75\x73\x74\x72\x61\x74\x6f\x72\x20\x31\x36\x2e\x32\x2e\x31\x2c\
-\x20\x53\x56\x47\x20\x45\x78\x70\x6f\x72\x74\x20\x50\x6c\x75\x67\
-\x2d\x49\x6e\x20\x2e\x20\x53\x56\x47\x20\x56\x65\x72\x73\x69\x6f\
-\x6e\x3a\x20\x36\x2e\x30\x30\x20\x42\x75\x69\x6c\x64\x20\x30\x29\
-\x20\x20\x2d\x2d\x3e\x0d\x0a\x3c\x21\x44\x4f\x43\x54\x59\x50\x45\
-\x20\x73\x76\x67\x20\x50\x55\x42\x4c\x49\x43\x20\x22\x2d\x2f\x2f\
-\x57\x33\x43\x2f\x2f\x44\x54\x44\x20\x53\x56\x47\x20\x31\x2e\x31\
-\x2f\x2f\x45\x4e\x22\x20\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\
-\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x47\x72\x61\x70\x68\x69\x63\
-\x73\x2f\x53\x56\x47\x2f\x31\x2e\x31\x2f\x44\x54\x44\x2f\x73\x76\
-\x67\x31\x31\x2e\x64\x74\x64\x22\x3e\x0d\x0a\x3c\x73\x76\x67\x20\
-\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\x31\x22\x20\x69\x64\
-\x3d\x22\x4c\x61\x79\x65\x72\x5f\x31\x22\x20\x78\x6d\x6c\x6e\x73\
-\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\
-\x6f\x72\x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x22\x20\x78\x6d\
-\x6c\x6e\x73\x3a\x78\x6c\x69\x6e\x6b\x3d\x22\x68\x74\x74\x70\x3a\
-\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\x39\x39\
-\x39\x2f\x78\x6c\x69\x6e\x6b\x22\x20\x78\x3d\x22\x30\x70\x78\x22\
-\x20\x79\x3d\x22\x30\x70\x78\x22\x0d\x0a\x09\x20\x77\x69\x64\x74\
-\x68\x3d\x22\x35\x31\x32\x70\x78\x22\x20\x68\x65\x69\x67\x68\x74\
-\x3d\x22\x35\x31\x32\x70\x78\x22\x20\x76\x69\x65\x77\x42\x6f\x78\
-\x3d\x22\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\x32\x22\x20\x65\
-\x6e\x61\x62\x6c\x65\x2d\x62\x61\x63\x6b\x67\x72\x6f\x75\x6e\x64\
-\x3d\x22\x6e\x65\x77\x20\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\
-\x32\x22\x20\x78\x6d\x6c\x3a\x73\x70\x61\x63\x65\x3d\x22\x70\x72\
-\x65\x73\x65\x72\x76\x65\x22\x3e\x0d\x0a\x3c\x70\x61\x74\x68\x20\
-\x64\x3d\x22\x4d\x34\x35\x30\x2e\x36\x37\x39\x2c\x32\x37\x33\x2e\
-\x35\x63\x2d\x31\x34\x2e\x35\x38\x35\x2d\x31\x34\x2e\x35\x37\x37\
-\x2d\x33\x36\x2e\x30\x35\x34\x2d\x31\x35\x2e\x38\x39\x2d\x35\x30\
-\x2e\x36\x33\x39\x2d\x31\x2e\x33\x31\x32\x6c\x2d\x34\x31\x2e\x36\
-\x38\x37\x2c\x34\x31\x2e\x36\x36\x34\x63\x2d\x31\x30\x2e\x38\x35\
-\x32\x2c\x31\x30\x2e\x38\x33\x36\x2d\x32\x33\x2e\x39\x33\x2c\x31\
-\x30\x2e\x38\x35\x39\x2d\x33\x31\x2e\x35\x36\x34\x2c\x31\x2e\x38\
-\x35\x32\x0d\x0a\x09\x63\x2d\x35\x2e\x30\x35\x37\x2d\x35\x2e\x39\
-\x36\x38\x2d\x33\x2e\x30\x36\x31\x2d\x32\x34\x2e\x33\x37\x34\x2d\
-\x31\x2e\x36\x34\x34\x2d\x33\x36\x2e\x30\x34\x39\x6c\x32\x30\x2e\
-\x39\x30\x37\x2d\x31\x37\x31\x2e\x38\x34\x39\x63\x31\x2e\x38\x36\
-\x37\x2d\x31\x35\x2e\x33\x35\x33\x2d\x39\x2e\x30\x37\x2d\x33\x30\
-\x2e\x31\x38\x35\x2d\x32\x34\x2e\x34\x33\x2d\x33\x32\x2e\x30\x35\
-\x31\x0d\x0a\x09\x63\x2d\x31\x35\x2e\x33\x35\x38\x2d\x31\x2e\x38\
-\x36\x37\x2d\x32\x39\x2e\x33\x32\x32\x2c\x39\x2e\x39\x33\x39\x2d\
-\x33\x31\x2e\x31\x39\x31\x2c\x32\x35\x2e\x32\x38\x39\x4c\x32\x36\
-\x37\x2e\x33\x37\x2c\x32\x33\x36\x2e\x30\x32\x31\x63\x2d\x31\x2e\
-\x32\x30\x35\x2c\x33\x2e\x33\x35\x38\x2d\x33\x2e\x37\x39\x2c\x33\
-\x2e\x39\x33\x38\x2d\x34\x2e\x30\x38\x31\x2d\x30\x2e\x35\x38\x32\
-\x4c\x32\x35\x35\x2e\x34\x34\x2c\x36\x30\x0d\x0a\x09\x63\x30\x2d\
-\x31\x35\x2e\x34\x36\x35\x2d\x31\x32\x2e\x35\x34\x32\x2d\x32\x38\
-\x2d\x32\x38\x2e\x30\x31\x34\x2d\x32\x38\x63\x2d\x31\x35\x2e\x34\
-\x37\x33\x2c\x30\x2d\x32\x38\x2e\x30\x31\x35\x2c\x31\x32\x2e\x35\
-\x33\x35\x2d\x32\x38\x2e\x30\x31\x35\x2c\x32\x38\x6c\x2d\x30\x2e\
-\x35\x35\x32\x2c\x31\x37\x36\x2e\x37\x35\x32\x63\x30\x2e\x31\x34\
-\x36\x2c\x32\x2e\x30\x34\x2d\x31\x2e\x36\x30\x34\x2c\x32\x2e\x36\
-\x32\x34\x2d\x31\x2e\x39\x32\x2c\x30\x2e\x32\x39\x34\x4c\x31\x37\
-\x32\x2e\x30\x31\x36\x2c\x39\x39\x2e\x30\x37\x37\x0d\x0a\x09\x63\
-\x2d\x32\x2e\x37\x35\x2d\x31\x35\x2e\x32\x31\x39\x2d\x31\x37\x2e\
-\x33\x32\x33\x2d\x32\x36\x2e\x32\x30\x33\x2d\x33\x32\x2e\x35\x34\
-\x38\x2d\x32\x33\x2e\x34\x35\x33\x63\x2d\x31\x35\x2e\x32\x32\x37\
-\x2c\x32\x2e\x37\x34\x38\x2d\x32\x35\x2e\x33\x33\x39\x2c\x31\x38\
-\x2e\x31\x38\x37\x2d\x32\x32\x2e\x35\x39\x31\x2c\x33\x33\x2e\x34\
-\x30\x33\x6c\x32\x32\x2e\x31\x39\x33\x2c\x31\x36\x31\x2e\x34\x35\
-\x35\x0d\x0a\x09\x63\x30\x2e\x30\x32\x33\x2c\x32\x2e\x38\x37\x32\
-\x2d\x30\x2e\x39\x34\x31\x2c\x34\x2e\x35\x31\x33\x2d\x32\x2e\x33\
-\x30\x38\x2c\x30\x2e\x38\x33\x31\x6c\x2d\x33\x33\x2e\x31\x30\x39\
-\x2d\x38\x38\x2e\x35\x31\x37\x63\x2d\x35\x2e\x31\x38\x2d\x31\x34\
-\x2e\x35\x37\x32\x2d\x32\x31\x2e\x31\x39\x36\x2d\x32\x33\x2e\x30\
-\x36\x35\x2d\x33\x35\x2e\x37\x37\x36\x2d\x31\x37\x2e\x38\x38\x39\
-\x0d\x0a\x09\x63\x2d\x31\x34\x2e\x35\x37\x39\x2c\x35\x2e\x31\x37\
-\x37\x2d\x32\x32\x2e\x32\x30\x31\x2c\x32\x32\x2e\x30\x36\x31\x2d\
-\x31\x37\x2e\x30\x32\x33\x2c\x33\x36\x2e\x36\x33\x31\x6c\x35\x38\
-\x2e\x30\x34\x32\x2c\x31\x38\x39\x2e\x36\x32\x35\x63\x30\x2e\x33\
-\x30\x33\x2c\x31\x2e\x30\x34\x36\x2c\x30\x2e\x36\x32\x34\x2c\x32\
-\x2e\x30\x38\x35\x2c\x30\x2e\x39\x35\x33\x2c\x33\x2e\x31\x31\x38\
-\x6c\x30\x2e\x31\x32\x31\x2c\x30\x2e\x33\x39\x0d\x0a\x09\x63\x30\
-\x2e\x30\x31\x31\x2c\x30\x2e\x30\x33\x31\x2c\x30\x2e\x30\x32\x35\
-\x2c\x30\x2e\x30\x35\x38\x2c\x30\x2e\x30\x33\x35\x2c\x30\x2e\x30\
-\x38\x38\x43\x31\x32\x36\x2e\x30\x37\x39\x2c\x34\x34\x34\x2e\x32\
-\x33\x33\x2c\x31\x37\x32\x2e\x35\x37\x2c\x34\x38\x30\x2c\x32\x32\
-\x37\x2e\x34\x32\x37\x2c\x34\x38\x30\x63\x33\x35\x2e\x31\x31\x36\
-\x2c\x30\x2c\x37\x31\x2e\x35\x39\x31\x2d\x31\x32\x2e\x33\x37\x38\
-\x2c\x39\x39\x2e\x33\x35\x37\x2d\x33\x33\x2e\x36\x37\x32\x0d\x0a\
-\x09\x63\x30\x2e\x30\x30\x31\x2c\x30\x2c\x30\x2e\x30\x30\x33\x2d\
-\x30\x2e\x30\x30\x32\x2c\x30\x2e\x30\x30\x33\x2d\x30\x2e\x30\x30\
-\x32\x63\x32\x39\x2e\x39\x39\x2d\x31\x38\x2e\x30\x35\x31\x2c\x31\
-\x32\x36\x2e\x30\x37\x31\x2d\x31\x32\x31\x2e\x33\x34\x37\x2c\x31\
-\x32\x36\x2e\x30\x37\x31\x2d\x31\x32\x31\x2e\x33\x34\x37\x43\x34\
-\x36\x37\x2e\x34\x34\x35\x2c\x33\x31\x30\x2e\x34\x30\x32\x2c\x34\
-\x36\x35\x2e\x32\x36\x36\x2c\x32\x38\x38\x2e\x30\x38\x2c\x34\x35\
-\x30\x2e\x36\x37\x39\x2c\x32\x37\x33\x2e\x35\x7a\x22\x2f\x3e\x0d\
-\x0a\x3c\x2f\x73\x76\x67\x3e\x0d\x0a\
-\x00\x00\x03\x7c\
-\x3c\
-\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x27\x31\x2e\
-\x30\x27\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x27\x55\x54\x46\
-\x2d\x38\x27\x3f\x3e\x0a\x3c\x21\x2d\x2d\x20\x54\x68\x69\x73\x20\
-\x66\x69\x6c\x65\x20\x77\x61\x73\x20\x67\x65\x6e\x65\x72\x61\x74\
-\x65\x64\x20\x62\x79\x20\x64\x76\x69\x73\x76\x67\x6d\x20\x32\x2e\
-\x38\x20\x2d\x2d\x3e\x0a\x3c\x73\x76\x67\x20\x76\x65\x72\x73\x69\
-\x6f\x6e\x3d\x27\x31\x2e\x31\x27\x20\x78\x6d\x6c\x6e\x73\x3d\x27\
-\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\
-\x67\x2f\x32\x30\x30\x30\x2f\x73\x76\x67\x27\x20\x78\x6d\x6c\x6e\
-\x73\x3a\x78\x6c\x69\x6e\x6b\x3d\x27\x68\x74\x74\x70\x3a\x2f\x2f\
-\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x31\x39\x39\x39\x2f\
-\x78\x6c\x69\x6e\x6b\x27\x20\x77\x69\x64\x74\x68\x3d\x27\x36\x33\
-\x2e\x39\x39\x39\x36\x70\x74\x27\x20\x68\x65\x69\x67\x68\x74\x3d\
-\x27\x36\x33\x2e\x39\x39\x39\x37\x70\x74\x27\x20\x76\x69\x65\x77\
-\x42\x6f\x78\x3d\x27\x35\x36\x2e\x34\x30\x39\x34\x20\x35\x33\x2e\
-\x38\x35\x38\x33\x20\x36\x33\x2e\x39\x39\x39\x36\x20\x36\x33\x2e\
-\x39\x39\x39\x37\x27\x3e\x0a\x3c\x67\x20\x69\x64\x3d\x27\x70\x61\
-\x67\x65\x31\x27\x3e\x0a\x3c\x67\x20\x74\x72\x61\x6e\x73\x66\x6f\
-\x72\x6d\x3d\x27\x6d\x61\x74\x72\x69\x78\x28\x30\x2e\x39\x39\x36\
-\x32\x36\x34\x20\x30\x20\x30\x20\x30\x2e\x39\x39\x36\x32\x36\x34\
-\x20\x35\x36\x2e\x34\x30\x39\x34\x20\x31\x31\x37\x2e\x38\x35\x38\
-\x29\x27\x3e\x0a\x3c\x70\x61\x74\x68\x20\x64\x3d\x27\x4d\x20\x32\
-\x2e\x30\x30\x37\x35\x20\x2d\x32\x2e\x30\x30\x37\x35\x4c\x20\x36\
-\x32\x2e\x32\x33\x32\x35\x20\x2d\x32\x2e\x30\x30\x37\x35\x4c\x20\
-\x36\x32\x2e\x32\x33\x32\x35\x20\x2d\x36\x32\x2e\x32\x33\x32\x35\
-\x4c\x20\x32\x2e\x30\x30\x37\x35\x20\x2d\x36\x32\x2e\x32\x33\x32\
-\x35\x4c\x20\x32\x2e\x30\x30\x37\x35\x20\x2d\x32\x2e\x30\x30\x37\
-\x35\x5a\x27\x20\x66\x69\x6c\x6c\x3d\x27\x6e\x6f\x6e\x65\x27\x20\
-\x73\x74\x72\x6f\x6b\x65\x3d\x27\x23\x30\x30\x30\x30\x30\x30\x27\
-\x20\x73\x74\x72\x6f\x6b\x65\x2d\x6c\x69\x6e\x65\x63\x61\x70\x3d\
-\x27\x72\x6f\x75\x6e\x64\x27\x20\x73\x74\x72\x6f\x6b\x65\x2d\x6c\
-\x69\x6e\x65\x6a\x6f\x69\x6e\x3d\x27\x72\x6f\x75\x6e\x64\x27\x20\
-\x73\x74\x72\x6f\x6b\x65\x2d\x6d\x69\x74\x65\x72\x6c\x69\x6d\x69\
-\x74\x3d\x27\x31\x30\x2e\x30\x33\x37\x35\x27\x20\x73\x74\x72\x6f\
-\x6b\x65\x2d\x77\x69\x64\x74\x68\x3d\x27\x34\x2e\x30\x31\x35\x27\
-\x2f\x3e\x0a\x3c\x2f\x67\x3e\x0a\x3c\x67\x20\x74\x72\x61\x6e\x73\
-\x66\x6f\x72\x6d\x3d\x27\x6d\x61\x74\x72\x69\x78\x28\x30\x2e\x39\
-\x39\x36\x32\x36\x34\x20\x30\x20\x30\x20\x30\x2e\x39\x39\x36\x32\
-\x36\x34\x20\x35\x36\x2e\x34\x30\x39\x34\x20\x31\x31\x37\x2e\x38\
-\x35\x38\x29\x27\x3e\x0a\x3c\x70\x61\x74\x68\x20\x64\x3d\x27\x4d\
-\x20\x34\x37\x2e\x31\x37\x36\x32\x20\x2d\x33\x32\x2e\x31\x32\x43\
-\x20\x34\x37\x2e\x31\x37\x36\x32\x20\x2d\x34\x30\x2e\x34\x33\x35\
-\x33\x20\x34\x30\x2e\x34\x33\x35\x33\x20\x2d\x34\x37\x2e\x31\x37\
-\x36\x32\x20\x33\x32\x2e\x31\x32\x20\x2d\x34\x37\x2e\x31\x37\x36\
-\x32\x43\x20\x32\x33\x2e\x38\x30\x34\x37\x20\x2d\x34\x37\x2e\x31\
-\x37\x36\x32\x20\x31\x37\x2e\x30\x36\x33\x37\x20\x2d\x34\x30\x2e\
-\x34\x33\x35\x33\x20\x31\x37\x2e\x30\x36\x33\x37\x20\x2d\x33\x32\
-\x2e\x31\x32\x43\x20\x31\x37\x2e\x30\x36\x33\x37\x20\x2d\x32\x33\
-\x2e\x38\x30\x34\x37\x20\x32\x33\x2e\x38\x30\x34\x37\x20\x2d\x31\
-\x37\x2e\x30\x36\x33\x37\x20\x33\x32\x2e\x31\x32\x20\x2d\x31\x37\
-\x2e\x30\x36\x33\x37\x43\x20\x34\x30\x2e\x34\x33\x35\x33\x20\x2d\
-\x31\x37\x2e\x30\x36\x33\x37\x20\x34\x37\x2e\x31\x37\x36\x32\x20\
-\x2d\x32\x33\x2e\x38\x30\x34\x37\x20\x34\x37\x2e\x31\x37\x36\x32\
-\x20\x2d\x33\x32\x2e\x31\x32\x5a\x27\x20\x66\x69\x6c\x6c\x3d\x27\
-\x23\x30\x30\x30\x30\x30\x30\x27\x2f\x3e\x0a\x3c\x2f\x67\x3e\x0a\
-\x3c\x2f\x67\x3e\x0a\x3c\x2f\x73\x76\x67\x3e\
-\x00\x00\x01\x1c\
-\x3c\
-\x73\x76\x67\x20\x78\x6d\x6c\x6e\x73\x3d\x22\x68\x74\x74\x70\x3a\
-\x2f\x2f\x77\x77\x77\x2e\x77\x33\x2e\x6f\x72\x67\x2f\x32\x30\x30\
-\x30\x2f\x73\x76\x67\x22\x20\x77\x69\x64\x74\x68\x3d\x22\x35\x31\
-\x32\x70\x78\x22\x20\x68\x65\x69\x67\x68\x74\x3d\x22\x35\x31\x32\
-\x70\x78\x22\x0a\x20\x20\x20\x20\x20\x76\x69\x65\x77\x42\x6f\x78\
-\x3d\x22\x30\x20\x30\x20\x35\x31\x32\x20\x35\x31\x32\x22\x3e\x0a\
-\x3c\x67\x20\x74\x72\x61\x6e\x73\x66\x6f\x72\x6d\x3d\x27\x6d\x61\
-\x74\x72\x69\x78\x28\x34\x38\x20\x30\x20\x30\x20\x34\x38\x20\x34\
-\x38\x20\x34\x38\x29\x27\x3e\x0a\x20\x20\x3c\x70\x61\x74\x68\x20\
-\x64\x3d\x22\x4d\x30\x20\x30\x76\x32\x68\x2e\x35\x63\x30\x2d\x2e\
-\x35\x35\x2e\x34\x35\x2d\x31\x20\x31\x2d\x31\x68\x31\x2e\x35\x76\
-\x35\x2e\x35\x63\x30\x20\x2e\x32\x38\x2d\x2e\x32\x32\x2e\x35\x2d\
-\x2e\x35\x2e\x35\x68\x2d\x2e\x35\x76\x31\x68\x34\x76\x2d\x31\x68\
-\x2d\x2e\x35\x63\x2d\x2e\x32\x38\x20\x30\x2d\x2e\x35\x2d\x2e\x32\
-\x32\x2d\x2e\x35\x2d\x2e\x35\x76\x2d\x35\x2e\x35\x68\x31\x2e\x35\
-\x63\x2e\x35\x35\x20\x30\x20\x31\x20\x2e\x34\x35\x20\x31\x20\x31\
-\x68\x2e\x35\x76\x2d\x32\x68\x2d\x38\x7a\x22\x20\x2f\x3e\x0a\x3c\
-\x2f\x67\x3e\x0a\x3c\x2f\x73\x76\x67\x3e\x0a\
-\x00\x00\x04\xa2\
+\x22\x49\x63\x6f\x6e\x5f\x32\x30\x5f\x22\x3e\x0d\x0a\x09\x3c\x67\
+\x3e\x0d\x0a\x09\x09\x3c\x70\x61\x74\x68\x20\x64\x3d\x22\x4d\x32\
+\x35\x36\x2c\x34\x38\x43\x31\x34\x31\x2e\x36\x30\x31\x2c\x34\x38\
+\x2c\x34\x38\x2c\x31\x34\x31\x2e\x36\x30\x31\x2c\x34\x38\x2c\x32\
+\x35\x36\x73\x39\x33\x2e\x36\x30\x31\x2c\x32\x30\x38\x2c\x32\x30\
+\x38\x2c\x32\x30\x38\x73\x32\x30\x38\x2d\x39\x33\x2e\x36\x30\x31\
+\x2c\x32\x30\x38\x2d\x32\x30\x38\x53\x33\x37\x30\x2e\x33\x39\x39\
+\x2c\x34\x38\x2c\x32\x35\x36\x2c\x34\x38\x7a\x20\x4d\x32\x35\x36\
+\x2c\x34\x32\x32\x2e\x33\x39\x39\x0d\x0a\x09\x09\x09\x63\x2d\x39\
+\x31\x2e\x35\x31\x38\x2c\x30\x2d\x31\x36\x36\x2e\x33\x39\x39\x2d\
+\x37\x34\x2e\x38\x38\x32\x2d\x31\x36\x36\x2e\x33\x39\x39\x2d\x31\
+\x36\x36\x2e\x33\x39\x39\x53\x31\x36\x34\x2e\x34\x38\x32\x2c\x38\
+\x39\x2e\x36\x2c\x32\x35\x36\x2c\x38\x39\x2e\x36\x53\x34\x32\x32\
+\x2e\x34\x2c\x31\x36\x34\x2e\x34\x38\x32\x2c\x34\x32\x32\x2e\x34\
+\x2c\x32\x35\x36\x53\x33\x34\x37\x2e\x35\x31\x38\x2c\x34\x32\x32\
+\x2e\x33\x39\x39\x2c\x32\x35\x36\x2c\x34\x32\x32\x2e\x33\x39\x39\
+\x7a\x22\x2f\x3e\x0d\x0a\x09\x3c\x2f\x67\x3e\x0d\x0a\x3c\x2f\x67\
+\x3e\x0d\x0a\x3c\x2f\x73\x76\x67\x3e\x0d\x0a\
+\x00\x00\x04\xd5\
\x3c\
\x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x27\x31\x2e\
\x30\x27\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x27\x55\x54\x46\
@@ -2324,59 +2321,62 @@ qt_resource_data = b"\
\x32\x36\x34\x20\x30\x20\x30\x20\x30\x2e\x39\x39\x36\x32\x36\x34\
\x20\x35\x38\x2e\x34\x36\x36\x39\x20\x31\x31\x37\x2e\x38\x35\x38\
\x29\x27\x3e\x0a\x3c\x70\x61\x74\x68\x20\x64\x3d\x27\x4d\x20\x33\
-\x2e\x39\x35\x37\x33\x35\x20\x2d\x33\x32\x2e\x31\x32\x43\x20\x34\
-\x2e\x31\x35\x35\x35\x36\x20\x2d\x33\x39\x2e\x32\x37\x34\x35\x20\
-\x36\x2e\x39\x38\x34\x37\x33\x20\x2d\x34\x36\x2e\x31\x30\x34\x37\
+\x2e\x39\x35\x37\x33\x35\x20\x2d\x33\x32\x2e\x31\x32\x43\x20\x32\
+\x2e\x32\x38\x39\x32\x32\x20\x2d\x33\x39\x2e\x33\x31\x31\x33\x20\
+\x36\x2e\x33\x36\x37\x30\x32\x20\x2d\x34\x36\x2e\x32\x33\x38\x36\
\x20\x31\x31\x2e\x39\x30\x33\x36\x20\x2d\x35\x31\x2e\x33\x30\x33\
-\x39\x43\x20\x32\x37\x2e\x34\x34\x31\x31\x20\x2d\x36\x37\x2e\x37\
-\x32\x36\x39\x20\x35\x33\x2e\x33\x30\x32\x31\x20\x2d\x36\x31\x2e\
-\x35\x34\x30\x35\x20\x35\x36\x2e\x31\x35\x32\x33\x20\x2d\x34\x32\
-\x2e\x35\x30\x32\x32\x43\x20\x35\x37\x2e\x36\x32\x37\x20\x2d\x33\
-\x32\x2e\x36\x35\x31\x39\x20\x35\x30\x2e\x35\x38\x35\x36\x20\x2d\
-\x32\x33\x2e\x35\x36\x32\x31\x20\x34\x30\x2e\x36\x37\x39\x34\x20\
-\x2d\x32\x32\x2e\x35\x32\x38\x31\x27\x20\x66\x69\x6c\x6c\x3d\x27\
-\x6e\x6f\x6e\x65\x27\x20\x73\x74\x72\x6f\x6b\x65\x3d\x27\x23\x30\
-\x30\x30\x30\x30\x30\x27\x20\x73\x74\x72\x6f\x6b\x65\x2d\x6c\x69\
-\x6e\x65\x63\x61\x70\x3d\x27\x72\x6f\x75\x6e\x64\x27\x20\x73\x74\
-\x72\x6f\x6b\x65\x2d\x6c\x69\x6e\x65\x6a\x6f\x69\x6e\x3d\x27\x72\
-\x6f\x75\x6e\x64\x27\x20\x73\x74\x72\x6f\x6b\x65\x2d\x6d\x69\x74\
-\x65\x72\x6c\x69\x6d\x69\x74\x3d\x27\x31\x30\x2e\x30\x33\x37\x35\
-\x27\x20\x73\x74\x72\x6f\x6b\x65\x2d\x77\x69\x64\x74\x68\x3d\x27\
-\x32\x2e\x35\x30\x39\x33\x37\x27\x2f\x3e\x0a\x3c\x2f\x67\x3e\x0a\
-\x3c\x67\x20\x74\x72\x61\x6e\x73\x66\x6f\x72\x6d\x3d\x27\x6d\x61\
-\x74\x72\x69\x78\x28\x30\x2e\x39\x39\x36\x32\x36\x34\x20\x30\x20\
-\x30\x20\x30\x2e\x39\x39\x36\x32\x36\x34\x20\x35\x38\x2e\x34\x36\
-\x36\x39\x20\x31\x31\x37\x2e\x38\x35\x38\x29\x27\x3e\x0a\x3c\x63\
-\x69\x72\x63\x6c\x65\x20\x63\x78\x3d\x27\x33\x2e\x39\x35\x37\x33\
-\x35\x27\x20\x63\x79\x3d\x27\x2d\x33\x32\x2e\x31\x32\x27\x20\x66\
-\x69\x6c\x6c\x3d\x27\x23\x30\x30\x30\x30\x30\x30\x27\x20\x72\x3d\
-\x27\x36\x2e\x30\x32\x32\x35\x27\x2f\x3e\x0a\x3c\x2f\x67\x3e\x0a\
-\x3c\x67\x20\x74\x72\x61\x6e\x73\x66\x6f\x72\x6d\x3d\x27\x6d\x61\
-\x74\x72\x69\x78\x28\x30\x2e\x39\x39\x36\x32\x36\x34\x20\x30\x20\
-\x30\x20\x30\x2e\x39\x39\x36\x32\x36\x34\x20\x35\x38\x2e\x34\x36\
-\x36\x39\x20\x31\x31\x37\x2e\x38\x35\x38\x29\x27\x3e\x0a\x3c\x63\
-\x69\x72\x63\x6c\x65\x20\x63\x78\x3d\x27\x31\x31\x2e\x39\x30\x33\
-\x36\x27\x20\x63\x79\x3d\x27\x2d\x35\x31\x2e\x33\x30\x33\x39\x27\
-\x20\x66\x69\x6c\x6c\x3d\x27\x23\x30\x30\x30\x30\x30\x30\x27\x20\
-\x72\x3d\x27\x36\x2e\x30\x32\x32\x35\x27\x2f\x3e\x0a\x3c\x2f\x67\
-\x3e\x0a\x3c\x67\x20\x74\x72\x61\x6e\x73\x66\x6f\x72\x6d\x3d\x27\
-\x6d\x61\x74\x72\x69\x78\x28\x30\x2e\x39\x39\x36\x32\x36\x34\x20\
-\x30\x20\x30\x20\x30\x2e\x39\x39\x36\x32\x36\x34\x20\x35\x38\x2e\
-\x34\x36\x36\x39\x20\x31\x31\x37\x2e\x38\x35\x38\x29\x27\x3e\x0a\
-\x3c\x63\x69\x72\x63\x6c\x65\x20\x63\x78\x3d\x27\x35\x36\x2e\x31\
-\x35\x32\x33\x27\x20\x63\x79\x3d\x27\x2d\x34\x32\x2e\x35\x30\x32\
-\x32\x27\x20\x66\x69\x6c\x6c\x3d\x27\x23\x30\x30\x30\x30\x30\x30\
-\x27\x20\x72\x3d\x27\x36\x2e\x30\x32\x32\x35\x27\x2f\x3e\x0a\x3c\
-\x2f\x67\x3e\x0a\x3c\x67\x20\x74\x72\x61\x6e\x73\x66\x6f\x72\x6d\
-\x3d\x27\x6d\x61\x74\x72\x69\x78\x28\x30\x2e\x39\x39\x36\x32\x36\
-\x34\x20\x30\x20\x30\x20\x30\x2e\x39\x39\x36\x32\x36\x34\x20\x35\
-\x38\x2e\x34\x36\x36\x39\x20\x31\x31\x37\x2e\x38\x35\x38\x29\x27\
-\x3e\x0a\x3c\x63\x69\x72\x63\x6c\x65\x20\x63\x78\x3d\x27\x34\x30\
-\x2e\x36\x37\x39\x34\x27\x20\x63\x79\x3d\x27\x2d\x32\x32\x2e\x35\
-\x32\x38\x31\x27\x20\x66\x69\x6c\x6c\x3d\x27\x23\x30\x30\x30\x30\
-\x30\x30\x27\x20\x72\x3d\x27\x36\x2e\x30\x32\x32\x35\x27\x2f\x3e\
-\x0a\x3c\x2f\x67\x3e\x0a\x3c\x2f\x67\x3e\x0a\x3c\x2f\x73\x76\x67\
-\x3e\
+\x39\x43\x20\x32\x39\x2e\x36\x36\x38\x37\x20\x2d\x36\x37\x2e\x35\
+\x35\x36\x38\x20\x35\x35\x2e\x32\x32\x39\x32\x20\x2d\x36\x30\x2e\
+\x36\x34\x32\x20\x35\x36\x2e\x31\x35\x32\x33\x20\x2d\x34\x32\x2e\
+\x35\x30\x32\x32\x43\x20\x35\x36\x2e\x36\x31\x33\x36\x20\x2d\x33\
+\x33\x2e\x34\x33\x38\x31\x20\x34\x39\x2e\x31\x31\x33\x32\x20\x2d\
+\x32\x36\x2e\x35\x39\x35\x39\x20\x34\x30\x2e\x36\x37\x39\x34\x20\
+\x2d\x32\x32\x2e\x35\x32\x38\x31\x43\x20\x32\x35\x2e\x33\x39\x39\
+\x35\x20\x2d\x31\x35\x2e\x31\x35\x38\x32\x20\x37\x2e\x31\x39\x39\
+\x33\x35\x20\x2d\x31\x38\x2e\x31\x34\x33\x36\x20\x33\x2e\x39\x35\
+\x37\x33\x35\x20\x2d\x33\x32\x2e\x31\x32\x5a\x27\x20\x66\x69\x6c\
+\x6c\x3d\x27\x6e\x6f\x6e\x65\x27\x20\x73\x74\x72\x6f\x6b\x65\x3d\
+\x27\x23\x30\x30\x30\x30\x30\x30\x27\x20\x73\x74\x72\x6f\x6b\x65\
+\x2d\x6c\x69\x6e\x65\x63\x61\x70\x3d\x27\x72\x6f\x75\x6e\x64\x27\
+\x20\x73\x74\x72\x6f\x6b\x65\x2d\x6c\x69\x6e\x65\x6a\x6f\x69\x6e\
+\x3d\x27\x72\x6f\x75\x6e\x64\x27\x20\x73\x74\x72\x6f\x6b\x65\x2d\
+\x6d\x69\x74\x65\x72\x6c\x69\x6d\x69\x74\x3d\x27\x31\x30\x2e\x30\
+\x33\x37\x35\x27\x20\x73\x74\x72\x6f\x6b\x65\x2d\x77\x69\x64\x74\
+\x68\x3d\x27\x32\x2e\x35\x30\x39\x33\x37\x27\x2f\x3e\x0a\x3c\x2f\
+\x67\x3e\x0a\x3c\x67\x20\x74\x72\x61\x6e\x73\x66\x6f\x72\x6d\x3d\
+\x27\x6d\x61\x74\x72\x69\x78\x28\x30\x2e\x39\x39\x36\x32\x36\x34\
+\x20\x30\x20\x30\x20\x30\x2e\x39\x39\x36\x32\x36\x34\x20\x35\x38\
+\x2e\x34\x36\x36\x39\x20\x31\x31\x37\x2e\x38\x35\x38\x29\x27\x3e\
+\x0a\x3c\x63\x69\x72\x63\x6c\x65\x20\x63\x78\x3d\x27\x33\x2e\x39\
+\x35\x37\x33\x35\x27\x20\x63\x79\x3d\x27\x2d\x33\x32\x2e\x31\x32\
+\x27\x20\x66\x69\x6c\x6c\x3d\x27\x23\x30\x30\x30\x30\x30\x30\x27\
+\x20\x72\x3d\x27\x36\x2e\x30\x32\x32\x35\x27\x2f\x3e\x0a\x3c\x2f\
+\x67\x3e\x0a\x3c\x67\x20\x74\x72\x61\x6e\x73\x66\x6f\x72\x6d\x3d\
+\x27\x6d\x61\x74\x72\x69\x78\x28\x30\x2e\x39\x39\x36\x32\x36\x34\
+\x20\x30\x20\x30\x20\x30\x2e\x39\x39\x36\x32\x36\x34\x20\x35\x38\
+\x2e\x34\x36\x36\x39\x20\x31\x31\x37\x2e\x38\x35\x38\x29\x27\x3e\
+\x0a\x3c\x63\x69\x72\x63\x6c\x65\x20\x63\x78\x3d\x27\x31\x31\x2e\
+\x39\x30\x33\x36\x27\x20\x63\x79\x3d\x27\x2d\x35\x31\x2e\x33\x30\
+\x33\x39\x27\x20\x66\x69\x6c\x6c\x3d\x27\x23\x30\x30\x30\x30\x30\
+\x30\x27\x20\x72\x3d\x27\x36\x2e\x30\x32\x32\x35\x27\x2f\x3e\x0a\
+\x3c\x2f\x67\x3e\x0a\x3c\x67\x20\x74\x72\x61\x6e\x73\x66\x6f\x72\
+\x6d\x3d\x27\x6d\x61\x74\x72\x69\x78\x28\x30\x2e\x39\x39\x36\x32\
+\x36\x34\x20\x30\x20\x30\x20\x30\x2e\x39\x39\x36\x32\x36\x34\x20\
+\x35\x38\x2e\x34\x36\x36\x39\x20\x31\x31\x37\x2e\x38\x35\x38\x29\
+\x27\x3e\x0a\x3c\x63\x69\x72\x63\x6c\x65\x20\x63\x78\x3d\x27\x35\
+\x36\x2e\x31\x35\x32\x33\x27\x20\x63\x79\x3d\x27\x2d\x34\x32\x2e\
+\x35\x30\x32\x32\x27\x20\x66\x69\x6c\x6c\x3d\x27\x23\x30\x30\x30\
+\x30\x30\x30\x27\x20\x72\x3d\x27\x36\x2e\x30\x32\x32\x35\x27\x2f\
+\x3e\x0a\x3c\x2f\x67\x3e\x0a\x3c\x67\x20\x74\x72\x61\x6e\x73\x66\
+\x6f\x72\x6d\x3d\x27\x6d\x61\x74\x72\x69\x78\x28\x30\x2e\x39\x39\
+\x36\x32\x36\x34\x20\x30\x20\x30\x20\x30\x2e\x39\x39\x36\x32\x36\
+\x34\x20\x35\x38\x2e\x34\x36\x36\x39\x20\x31\x31\x37\x2e\x38\x35\
+\x38\x29\x27\x3e\x0a\x3c\x63\x69\x72\x63\x6c\x65\x20\x63\x78\x3d\
+\x27\x34\x30\x2e\x36\x37\x39\x34\x27\x20\x63\x79\x3d\x27\x2d\x32\
+\x32\x2e\x35\x32\x38\x31\x27\x20\x66\x69\x6c\x6c\x3d\x27\x23\x30\
+\x30\x30\x30\x30\x30\x27\x20\x72\x3d\x27\x36\x2e\x30\x32\x32\x35\
+\x27\x2f\x3e\x0a\x3c\x2f\x67\x3e\x0a\x3c\x2f\x67\x3e\x0a\x3c\x2f\
+\x73\x76\x67\x3e\
"
qt_resource_name = b"\
@@ -2384,51 +2384,91 @@ qt_resource_name = b"\
\x00\x6f\xa6\x53\
\x00\x69\
\x00\x63\x00\x6f\x00\x6e\x00\x73\
-\x00\x1d\
-\x06\xec\xf4\xc7\
+\x00\x16\
+\x01\xfb\x76\x27\
+\x00\x61\
+\x00\x6e\x00\x64\x00\x72\x00\x6f\x00\x69\x00\x64\x00\x2d\x00\x61\x00\x72\x00\x72\x00\x6f\x00\x77\x00\x2d\x00\x62\x00\x61\x00\x63\
+\x00\x6b\x00\x2e\x00\x73\x00\x76\x00\x67\
+\x00\x10\
+\x0c\x57\x65\x47\
+\x00\x61\
+\x00\x72\x00\x72\x00\x6f\x00\x77\x00\x2d\x00\x72\x00\x65\x00\x73\x00\x69\x00\x7a\x00\x65\x00\x2e\x00\x73\x00\x76\x00\x67\
+\x00\x11\
+\x01\x60\xbc\x47\
+\x00\x73\
+\x00\x6f\x00\x63\x00\x69\x00\x61\x00\x6c\x00\x2d\x00\x70\x00\x79\x00\x74\x00\x68\x00\x6f\x00\x6e\x00\x2e\x00\x73\x00\x76\x00\x67\
+\
+\x00\x14\
+\x0f\xa5\xe0\xc7\
+\x00\x6d\
+\x00\x61\x00\x67\x00\x6e\x00\x69\x00\x66\x00\x79\x00\x69\x00\x6e\x00\x67\x00\x2d\x00\x67\x00\x6c\x00\x61\x00\x73\x00\x73\x00\x2e\
+\x00\x73\x00\x76\x00\x67\
+\x00\x08\
+\x05\xa8\x57\x87\
\x00\x63\
-\x00\x68\x00\x65\x00\x76\x00\x72\x00\x6f\x00\x6e\x00\x2d\x00\x77\x00\x69\x00\x74\x00\x68\x00\x2d\x00\x63\x00\x69\x00\x72\x00\x63\
-\x00\x6c\x00\x65\x00\x2d\x00\x72\x00\x69\x00\x67\x00\x68\x00\x74\x00\x2e\x00\x73\x00\x76\x00\x67\
+\x00\x6f\x00\x64\x00\x65\x00\x2e\x00\x73\x00\x76\x00\x67\
\x00\x0a\
\x0a\x2d\x1b\xc7\
\x00\x63\
\x00\x69\x00\x72\x00\x63\x00\x6c\x00\x65\x00\x2e\x00\x73\x00\x76\x00\x67\
-\x00\x0a\
-\x0f\x68\x53\xe7\
+\x00\x12\
+\x0c\x5e\xd4\xa7\
\x00\x61\
-\x00\x6e\x00\x63\x00\x68\x00\x6f\x00\x72\x00\x2e\x00\x73\x00\x76\x00\x67\
-\x00\x0f\
-\x09\x76\x60\xc7\
-\x00\x63\
-\x00\x6c\x00\x6f\x00\x73\x00\x65\x00\x2d\x00\x72\x00\x6f\x00\x75\x00\x6e\x00\x64\x00\x2e\x00\x73\x00\x76\x00\x67\
+\x00\x6e\x00\x64\x00\x72\x00\x6f\x00\x69\x00\x64\x00\x2d\x00\x6c\x00\x6f\x00\x63\x00\x61\x00\x74\x00\x65\x00\x2e\x00\x73\x00\x76\
+\x00\x67\
\x00\x17\
\x06\xc6\x02\xa7\
\x00\x74\
\x00\x72\x00\x69\x00\x61\x00\x6e\x00\x67\x00\x6c\x00\x65\x00\x2d\x00\x73\x00\x74\x00\x72\x00\x6f\x00\x6b\x00\x65\x00\x64\x00\x2d\
\x00\x31\x00\x35\x00\x2e\x00\x73\x00\x76\x00\x67\
+\x00\x15\
+\x0f\xc4\x59\xe7\
+\x00\x73\
+\x00\x75\x00\x62\x00\x64\x00\x69\x00\x72\x00\x65\x00\x63\x00\x74\x00\x6f\x00\x72\x00\x79\x00\x2d\x00\x6c\x00\x65\x00\x66\x00\x74\
+\x00\x2e\x00\x73\x00\x76\x00\x67\
+\x00\x0d\
+\x05\x20\xce\x87\
+\x00\x6f\
+\x00\x70\x00\x65\x00\x6e\x00\x63\x00\x75\x00\x72\x00\x76\x00\x65\x00\x2e\x00\x73\x00\x76\x00\x67\
+\x00\x11\
+\x0c\xdb\x38\xe7\
+\x00\x61\
+\x00\x6e\x00\x64\x00\x72\x00\x6f\x00\x69\x00\x64\x00\x2d\x00\x63\x00\x6c\x00\x6f\x00\x73\x00\x65\x00\x2e\x00\x73\x00\x76\x00\x67\
+\
+\x00\x10\
+\x06\xe3\xaf\xe7\
+\x00\x61\
+\x00\x6e\x00\x64\x00\x72\x00\x6f\x00\x69\x00\x64\x00\x2d\x00\x68\x00\x61\x00\x6e\x00\x64\x00\x2e\x00\x73\x00\x76\x00\x67\
\x00\x0a\
\x01\xca\x6d\x87\
\x00\x62\
\x00\x75\x00\x63\x00\x6b\x00\x65\x00\x74\x00\x2e\x00\x73\x00\x76\x00\x67\
+\x00\x08\
+\x08\xc8\x55\xe7\
+\x00\x73\
+\x00\x61\x00\x76\x00\x65\x00\x2e\x00\x73\x00\x76\x00\x67\
+\x00\x1d\
+\x06\xec\xf4\xc7\
+\x00\x63\
+\x00\x68\x00\x65\x00\x76\x00\x72\x00\x6f\x00\x6e\x00\x2d\x00\x77\x00\x69\x00\x74\x00\x68\x00\x2d\x00\x63\x00\x69\x00\x72\x00\x63\
+\x00\x6c\x00\x65\x00\x2d\x00\x72\x00\x69\x00\x67\x00\x68\x00\x74\x00\x2e\x00\x73\x00\x76\x00\x67\
\x00\x1b\
\x0e\xb5\x68\xe7\
\x00\x61\
\x00\x6e\x00\x64\x00\x72\x00\x6f\x00\x69\x00\x64\x00\x2d\x00\x72\x00\x61\x00\x64\x00\x69\x00\x6f\x00\x2d\x00\x62\x00\x75\x00\x74\
\x00\x74\x00\x6f\x00\x6e\x00\x2d\x00\x6f\x00\x6e\x00\x2e\x00\x73\x00\x76\x00\x67\
-\x00\x11\
-\x01\x60\xbc\x47\
-\x00\x73\
-\x00\x6f\x00\x63\x00\x69\x00\x61\x00\x6c\x00\x2d\x00\x70\x00\x79\x00\x74\x00\x68\x00\x6f\x00\x6e\x00\x2e\x00\x73\x00\x76\x00\x67\
-\
-\x00\x14\
-\x0f\xa5\xe0\xc7\
-\x00\x6d\
-\x00\x61\x00\x67\x00\x6e\x00\x69\x00\x66\x00\x79\x00\x69\x00\x6e\x00\x67\x00\x2d\x00\x67\x00\x6c\x00\x61\x00\x73\x00\x73\x00\x2e\
-\x00\x73\x00\x76\x00\x67\
-\x00\x08\
-\x05\xa8\x57\x87\
+\x00\x07\
+\x0c\xf8\x5a\x07\
+\x00\x65\
+\x00\x79\x00\x65\x00\x2e\x00\x73\x00\x76\x00\x67\
+\x00\x10\
+\x08\xe4\xaf\x47\
+\x00\x61\
+\x00\x6e\x00\x64\x00\x72\x00\x6f\x00\x69\x00\x64\x00\x2d\x00\x64\x00\x6f\x00\x6e\x00\x65\x00\x2e\x00\x73\x00\x76\x00\x67\
+\x00\x0a\
+\x0a\xc8\x62\x67\
\x00\x63\
-\x00\x6f\x00\x64\x00\x65\x00\x2e\x00\x73\x00\x76\x00\x67\
+\x00\x65\x00\x6e\x00\x74\x00\x65\x00\x72\x00\x2e\x00\x73\x00\x76\x00\x67\
\x00\x13\
\x03\x24\x75\x47\
\x00\x61\
@@ -2439,20 +2479,44 @@ qt_resource_name = b"\
\x00\x61\
\x00\x6e\x00\x64\x00\x72\x00\x6f\x00\x69\x00\x64\x00\x2d\x00\x64\x00\x65\x00\x6c\x00\x65\x00\x74\x00\x65\x00\x2e\x00\x73\x00\x76\
\x00\x67\
-\x00\x0f\
-\x04\xf2\xa7\x87\
-\x00\x63\
-\x00\x6c\x00\x6f\x00\x73\x00\x65\x00\x64\x00\x63\x00\x75\x00\x72\x00\x76\x00\x65\x00\x2e\x00\x73\x00\x76\x00\x67\
\x00\x12\
\x04\xb2\x21\x47\
\x00\x61\
\x00\x6e\x00\x64\x00\x72\x00\x6f\x00\x69\x00\x64\x00\x2d\x00\x65\x00\x78\x00\x70\x00\x61\x00\x6e\x00\x64\x00\x2e\x00\x73\x00\x76\
\x00\x67\
-\x00\x16\
-\x01\xfb\x76\x27\
+\x00\x09\
+\x0b\x9e\x89\x07\
+\x00\x63\
+\x00\x68\x00\x65\x00\x63\x00\x6b\x00\x2e\x00\x73\x00\x76\x00\x67\
+\x00\x1c\
+\x04\x66\xe1\x67\
+\x00\x63\
+\x00\x68\x00\x65\x00\x76\x00\x72\x00\x6f\x00\x6e\x00\x2d\x00\x77\x00\x69\x00\x74\x00\x68\x00\x2d\x00\x63\x00\x69\x00\x72\x00\x63\
+\x00\x6c\x00\x65\x00\x2d\x00\x6c\x00\x65\x00\x66\x00\x74\x00\x2e\x00\x73\x00\x76\x00\x67\
+\x00\x0e\
+\x05\xed\x38\x67\
\x00\x61\
-\x00\x6e\x00\x64\x00\x72\x00\x6f\x00\x69\x00\x64\x00\x2d\x00\x61\x00\x72\x00\x72\x00\x6f\x00\x77\x00\x2d\x00\x62\x00\x61\x00\x63\
-\x00\x6b\x00\x2e\x00\x73\x00\x76\x00\x67\
+\x00\x72\x00\x72\x00\x6f\x00\x77\x00\x2d\x00\x6d\x00\x6f\x00\x76\x00\x65\x00\x2e\x00\x73\x00\x76\x00\x67\
+\x00\x10\
+\x08\x89\xfa\x47\
+\x00\x63\
+\x00\x65\x00\x6e\x00\x74\x00\x65\x00\x72\x00\x6f\x00\x72\x00\x69\x00\x67\x00\x69\x00\x6e\x00\x2e\x00\x73\x00\x76\x00\x67\
+\x00\x0f\
+\x07\x0e\xc4\x87\
+\x00\x6f\
+\x00\x70\x00\x65\x00\x6e\x00\x70\x00\x6f\x00\x6c\x00\x79\x00\x67\x00\x6f\x00\x6e\x00\x2e\x00\x73\x00\x76\x00\x67\
+\x00\x0f\
+\x09\x76\x60\xc7\
+\x00\x63\
+\x00\x6c\x00\x6f\x00\x73\x00\x65\x00\x2d\x00\x72\x00\x6f\x00\x75\x00\x6e\x00\x64\x00\x2e\x00\x73\x00\x76\x00\x67\
+\x00\x08\
+\x08\xf7\x57\x07\
+\x00\x67\
+\x00\x72\x00\x69\x00\x64\x00\x2e\x00\x73\x00\x76\x00\x67\
+\x00\x08\
+\x0c\xf7\x55\x87\
+\x00\x74\
+\x00\x65\x00\x78\x00\x74\x00\x2e\x00\x73\x00\x76\x00\x67\
\x00\x19\
\x0f\xef\x7b\xe7\
\x00\x61\
@@ -2463,156 +2527,92 @@ qt_resource_name = b"\
\x00\x61\
\x00\x6e\x00\x64\x00\x72\x00\x6f\x00\x69\x00\x64\x00\x2d\x00\x61\x00\x72\x00\x72\x00\x6f\x00\x77\x00\x2d\x00\x66\x00\x6f\x00\x72\
\x00\x77\x00\x61\x00\x72\x00\x64\x00\x2e\x00\x73\x00\x76\x00\x67\
+\x00\x11\
+\x0c\xa7\xc7\x47\
+\x00\x63\
+\x00\x6c\x00\x6f\x00\x73\x00\x65\x00\x64\x00\x70\x00\x6f\x00\x6c\x00\x79\x00\x67\x00\x6f\x00\x6e\x00\x2e\x00\x73\x00\x76\x00\x67\
+\
\x00\x17\
\x07\x87\x48\x27\
\x00\x61\
\x00\x6e\x00\x64\x00\x72\x00\x6f\x00\x69\x00\x64\x00\x2d\x00\x66\x00\x6f\x00\x6c\x00\x64\x00\x65\x00\x72\x00\x2d\x00\x6f\x00\x70\
\x00\x65\x00\x6e\x00\x2e\x00\x73\x00\x76\x00\x67\
-\x00\x10\
-\x04\xa9\x22\xc7\
-\x00\x66\
-\x00\x69\x00\x6c\x00\x6c\x00\x65\x00\x64\x00\x62\x00\x75\x00\x63\x00\x6b\x00\x65\x00\x74\x00\x2e\x00\x73\x00\x76\x00\x67\
-\x00\x0f\
-\x07\x0e\xc4\x87\
-\x00\x6f\
-\x00\x70\x00\x65\x00\x6e\x00\x70\x00\x6f\x00\x6c\x00\x79\x00\x67\x00\x6f\x00\x6e\x00\x2e\x00\x73\x00\x76\x00\x67\
-\x00\x0e\
-\x05\xed\x38\x67\
-\x00\x61\
-\x00\x72\x00\x72\x00\x6f\x00\x77\x00\x2d\x00\x6d\x00\x6f\x00\x76\x00\x65\x00\x2e\x00\x73\x00\x76\x00\x67\
-\x00\x1c\
-\x08\x8a\x79\x07\
+\x00\x12\
+\x08\x79\x97\xe7\
\x00\x61\
-\x00\x6e\x00\x64\x00\x72\x00\x6f\x00\x69\x00\x64\x00\x2d\x00\x72\x00\x61\x00\x64\x00\x69\x00\x6f\x00\x2d\x00\x62\x00\x75\x00\x74\
-\x00\x74\x00\x6f\x00\x6e\x00\x2d\x00\x6f\x00\x66\x00\x66\x00\x2e\x00\x73\x00\x76\x00\x67\
+\x00\x6e\x00\x64\x00\x72\x00\x6f\x00\x69\x00\x64\x00\x2d\x00\x63\x00\x61\x00\x6d\x00\x65\x00\x72\x00\x61\x00\x2e\x00\x73\x00\x76\
+\x00\x67\
\x00\x08\
\x0b\x07\x57\xa7\
\x00\x65\
\x00\x64\x00\x69\x00\x74\x00\x2e\x00\x73\x00\x76\x00\x67\
-\x00\x11\
-\x0c\xa7\xc7\x47\
-\x00\x63\
-\x00\x6c\x00\x6f\x00\x73\x00\x65\x00\x64\x00\x70\x00\x6f\x00\x6c\x00\x79\x00\x67\x00\x6f\x00\x6e\x00\x2e\x00\x73\x00\x76\x00\x67\
-\
+\x00\x10\
+\x04\xa9\x22\xc7\
+\x00\x66\
+\x00\x69\x00\x6c\x00\x6c\x00\x65\x00\x64\x00\x62\x00\x75\x00\x63\x00\x6b\x00\x65\x00\x74\x00\x2e\x00\x73\x00\x76\x00\x67\
\x00\x0e\
\x0f\xcb\xd5\xc7\
\x00\x70\
\x00\x6c\x00\x75\x00\x73\x00\x2d\x00\x72\x00\x6f\x00\x75\x00\x6e\x00\x64\x00\x2e\x00\x73\x00\x76\x00\x67\
-\x00\x09\
-\x0b\x9e\x89\x07\
-\x00\x63\
-\x00\x68\x00\x65\x00\x63\x00\x6b\x00\x2e\x00\x73\x00\x76\x00\x67\
-\x00\x1c\
-\x04\x66\xe1\x67\
-\x00\x63\
-\x00\x68\x00\x65\x00\x76\x00\x72\x00\x6f\x00\x6e\x00\x2d\x00\x77\x00\x69\x00\x74\x00\x68\x00\x2d\x00\x63\x00\x69\x00\x72\x00\x63\
-\x00\x6c\x00\x65\x00\x2d\x00\x6c\x00\x65\x00\x66\x00\x74\x00\x2e\x00\x73\x00\x76\x00\x67\
-\x00\x12\
-\x08\x79\x97\xe7\
-\x00\x61\
-\x00\x6e\x00\x64\x00\x72\x00\x6f\x00\x69\x00\x64\x00\x2d\x00\x63\x00\x61\x00\x6d\x00\x65\x00\x72\x00\x61\x00\x2e\x00\x73\x00\x76\
-\x00\x67\
-\x00\x11\
-\x0c\xdb\x38\xe7\
-\x00\x61\
-\x00\x6e\x00\x64\x00\x72\x00\x6f\x00\x69\x00\x64\x00\x2d\x00\x63\x00\x6c\x00\x6f\x00\x73\x00\x65\x00\x2e\x00\x73\x00\x76\x00\x67\
-\
-\x00\x10\
-\x08\xe4\xaf\x47\
-\x00\x61\
-\x00\x6e\x00\x64\x00\x72\x00\x6f\x00\x69\x00\x64\x00\x2d\x00\x64\x00\x6f\x00\x6e\x00\x65\x00\x2e\x00\x73\x00\x76\x00\x67\
-\x00\x07\
-\x0c\xf8\x5a\x07\
-\x00\x65\
-\x00\x79\x00\x65\x00\x2e\x00\x73\x00\x76\x00\x67\
-\x00\x08\
-\x08\xf7\x57\x07\
-\x00\x67\
-\x00\x72\x00\x69\x00\x64\x00\x2e\x00\x73\x00\x76\x00\x67\
-\x00\x10\
-\x0c\x57\x65\x47\
-\x00\x61\
-\x00\x72\x00\x72\x00\x6f\x00\x77\x00\x2d\x00\x72\x00\x65\x00\x73\x00\x69\x00\x7a\x00\x65\x00\x2e\x00\x73\x00\x76\x00\x67\
-\x00\x15\
-\x0f\xc4\x59\xe7\
-\x00\x73\
-\x00\x75\x00\x62\x00\x64\x00\x69\x00\x72\x00\x65\x00\x63\x00\x74\x00\x6f\x00\x72\x00\x79\x00\x2d\x00\x6c\x00\x65\x00\x66\x00\x74\
-\x00\x2e\x00\x73\x00\x76\x00\x67\
-\x00\x12\
-\x0c\x5e\xd4\xa7\
+\x00\x0a\
+\x0f\x68\x53\xe7\
\x00\x61\
-\x00\x6e\x00\x64\x00\x72\x00\x6f\x00\x69\x00\x64\x00\x2d\x00\x6c\x00\x6f\x00\x63\x00\x61\x00\x74\x00\x65\x00\x2e\x00\x73\x00\x76\
-\x00\x67\
-\x00\x08\
-\x08\xc8\x55\xe7\
-\x00\x73\
-\x00\x61\x00\x76\x00\x65\x00\x2e\x00\x73\x00\x76\x00\x67\
-\x00\x10\
-\x08\x89\xfa\x47\
-\x00\x63\
-\x00\x65\x00\x6e\x00\x74\x00\x65\x00\x72\x00\x6f\x00\x72\x00\x69\x00\x67\x00\x69\x00\x6e\x00\x2e\x00\x73\x00\x76\x00\x67\
-\x00\x10\
-\x06\xe3\xaf\xe7\
+\x00\x6e\x00\x63\x00\x68\x00\x6f\x00\x72\x00\x2e\x00\x73\x00\x76\x00\x67\
+\x00\x1c\
+\x08\x8a\x79\x07\
\x00\x61\
-\x00\x6e\x00\x64\x00\x72\x00\x6f\x00\x69\x00\x64\x00\x2d\x00\x68\x00\x61\x00\x6e\x00\x64\x00\x2e\x00\x73\x00\x76\x00\x67\
-\x00\x0a\
-\x0a\xc8\x62\x67\
+\x00\x6e\x00\x64\x00\x72\x00\x6f\x00\x69\x00\x64\x00\x2d\x00\x72\x00\x61\x00\x64\x00\x69\x00\x6f\x00\x2d\x00\x62\x00\x75\x00\x74\
+\x00\x74\x00\x6f\x00\x6e\x00\x2d\x00\x6f\x00\x66\x00\x66\x00\x2e\x00\x73\x00\x76\x00\x67\
+\x00\x0f\
+\x04\xf2\xa7\x87\
\x00\x63\
-\x00\x65\x00\x6e\x00\x74\x00\x65\x00\x72\x00\x2e\x00\x73\x00\x76\x00\x67\
-\x00\x08\
-\x0c\xf7\x55\x87\
-\x00\x74\
-\x00\x65\x00\x78\x00\x74\x00\x2e\x00\x73\x00\x76\x00\x67\
-\x00\x0d\
-\x05\x20\xce\x87\
-\x00\x6f\
-\x00\x70\x00\x65\x00\x6e\x00\x63\x00\x75\x00\x72\x00\x76\x00\x65\x00\x2e\x00\x73\x00\x76\x00\x67\
+\x00\x6c\x00\x6f\x00\x73\x00\x65\x00\x64\x00\x63\x00\x75\x00\x72\x00\x76\x00\x65\x00\x2e\x00\x73\x00\x76\x00\x67\
"
qt_resource_struct_v1 = b"\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x29\x00\x00\x00\x02\
-\x00\x00\x01\x32\x00\x00\x00\x00\x00\x01\x00\x00\x19\x8d\
-\x00\x00\x00\xdc\x00\x00\x00\x00\x00\x01\x00\x00\x10\x65\
-\x00\x00\x02\x42\x00\x00\x00\x00\x00\x01\x00\x00\x37\x6a\
-\x00\x00\x01\x9e\x00\x00\x00\x00\x00\x01\x00\x00\x29\x87\
-\x00\x00\x04\x3a\x00\x00\x00\x00\x00\x01\x00\x00\x5e\xed\
-\x00\x00\x03\x18\x00\x01\x00\x00\x00\x01\x00\x00\x44\xed\
-\x00\x00\x02\x18\x00\x00\x00\x00\x00\x01\x00\x00\x34\x30\
-\x00\x00\x01\xf4\x00\x00\x00\x00\x00\x01\x00\x00\x2f\x57\
-\x00\x00\x06\x2c\x00\x00\x00\x00\x00\x01\x00\x00\x89\xa2\
-\x00\x00\x01\x88\x00\x00\x00\x00\x00\x01\x00\x00\x24\xd9\
-\x00\x00\x03\x62\x00\x00\x00\x00\x00\x01\x00\x00\x4b\x53\
-\x00\x00\x00\xa8\x00\x00\x00\x00\x00\x01\x00\x00\x0b\x97\
-\x00\x00\x05\xd6\x00\x00\x00\x00\x00\x01\x00\x00\x7f\x34\
+\x00\x00\x00\x68\x00\x00\x00\x00\x00\x01\x00\x00\x05\x04\
+\x00\x00\x01\xea\x00\x00\x00\x00\x00\x01\x00\x00\x2e\xc9\
\x00\x00\x00\x10\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
-\x00\x00\x03\x3e\x00\x00\x00\x00\x00\x01\x00\x00\x47\x12\
-\x00\x00\x02\xe4\x00\x00\x00\x00\x00\x01\x00\x00\x41\x97\
-\x00\x00\x01\xca\x00\x00\x00\x00\x00\x01\x00\x00\x2c\xb1\
-\x00\x00\x04\x78\x00\x00\x00\x00\x00\x01\x00\x00\x62\xe6\
-\x00\x00\x05\xb0\x00\x00\x00\x00\x00\x01\x00\x00\x7b\x14\
-\x00\x00\x03\x84\x00\x00\x00\x00\x00\x01\x00\x00\x4e\x20\
-\x00\x00\x05\x9a\x00\x00\x00\x00\x00\x01\x00\x00\x78\x6f\
-\x00\x00\x04\xca\x00\x00\x00\x00\x00\x01\x00\x00\x68\xc7\
-\x00\x00\x05\x04\x00\x01\x00\x00\x00\x01\x00\x00\x6f\x33\
-\x00\x00\x00\x84\x00\x00\x00\x00\x00\x01\x00\x00\x08\x4d\
-\x00\x00\x00\x50\x00\x00\x00\x00\x00\x01\x00\x00\x03\xea\
-\x00\x00\x02\xac\x00\x00\x00\x00\x00\x01\x00\x00\x3f\x16\
-\x00\x00\x05\xfc\x00\x00\x00\x00\x00\x01\x00\x00\x85\x02\
-\x00\x00\x03\xc2\x00\x00\x00\x00\x00\x01\x00\x00\x51\x20\
-\x00\x00\x04\x22\x00\x00\x00\x00\x00\x01\x00\x00\x5b\xdd\
-\x00\x00\x05\x1a\x00\x00\x00\x00\x00\x01\x00\x00\x71\x14\
-\x00\x00\x05\x70\x00\x00\x00\x00\x00\x01\x00\x00\x74\x07\
-\x00\x00\x03\xd8\x00\x00\x00\x00\x00\x01\x00\x00\x54\x90\
-\x00\x00\x04\xa2\x00\x00\x00\x00\x00\x01\x00\x00\x66\x0c\
-\x00\x00\x06\x16\x00\x00\x00\x00\x00\x01\x00\x00\x88\x82\
-\x00\x00\x04\xf0\x00\x00\x00\x00\x00\x01\x00\x00\x6b\x44\
-\x00\x00\x00\xf6\x00\x00\x00\x00\x00\x01\x00\x00\x16\x3d\
-\x00\x00\x00\x6a\x00\x00\x00\x00\x00\x01\x00\x00\x06\xe0\
-\x00\x00\x01\x5a\x00\x00\x00\x00\x00\x01\x00\x00\x21\x11\
-\x00\x00\x05\x40\x00\x00\x00\x00\x00\x01\x00\x00\x73\x97\
-\x00\x00\x04\x00\x00\x00\x00\x00\x00\x01\x00\x00\x58\xe2\
-\x00\x00\x02\x74\x00\x00\x00\x00\x00\x01\x00\x00\x39\xeb\
+\x00\x00\x02\xea\x00\x00\x00\x00\x00\x01\x00\x00\x48\x6c\
+\x00\x00\x03\x82\x00\x00\x00\x00\x00\x01\x00\x00\x54\x86\
+\x00\x00\x05\x88\x00\x01\x00\x00\x00\x01\x00\x00\x7f\xe2\
+\x00\x00\x03\x40\x00\x00\x00\x00\x00\x01\x00\x00\x4e\x3c\
+\x00\x00\x06\x28\x00\x00\x00\x00\x00\x01\x00\x00\x89\x6f\
+\x00\x00\x01\x7c\x00\x00\x00\x00\x00\x01\x00\x00\x21\x9a\
+\x00\x00\x00\xbe\x00\x00\x00\x00\x00\x01\x00\x00\x10\x50\
+\x00\x00\x03\xc0\x00\x00\x00\x00\x00\x01\x00\x00\x58\x7f\
+\x00\x00\x01\x18\x00\x00\x00\x00\x00\x01\x00\x00\x1c\x5c\
+\x00\x00\x01\xc4\x00\x00\x00\x00\x00\x01\x00\x00\x28\xfb\
+\x00\x00\x02\x1a\x00\x00\x00\x00\x00\x01\x00\x00\x37\x46\
+\x00\x00\x04\x08\x00\x00\x00\x00\x00\x01\x00\x00\x5f\x6c\
+\x00\x00\x05\x14\x00\x00\x00\x00\x00\x01\x00\x00\x75\xf6\
+\x00\x00\x03\x16\x00\x00\x00\x00\x00\x01\x00\x00\x4b\x96\
+\x00\x00\x05\x48\x00\x00\x00\x00\x00\x01\x00\x00\x79\x4c\
+\x00\x00\x03\xe2\x00\x00\x00\x00\x00\x01\x00\x00\x5b\x4c\
+\x00\x00\x05\xea\x00\x00\x00\x00\x00\x01\x00\x00\x86\x6f\
+\x00\x00\x02\x04\x00\x00\x00\x00\x00\x01\x00\x00\x34\xa1\
+\x00\x00\x02\xaa\x00\x00\x00\x00\x00\x01\x00\x00\x42\x6f\
+\x00\x00\x04\x50\x00\x01\x00\x00\x00\x01\x00\x00\x66\xf7\
+\x00\x00\x04\x2c\x00\x00\x00\x00\x00\x01\x00\x00\x63\xad\
+\x00\x00\x00\xd4\x00\x00\x00\x00\x00\x01\x00\x00\x14\xfe\
+\x00\x00\x04\xb4\x00\x00\x00\x00\x00\x01\x00\x00\x6f\x23\
+\x00\x00\x02\xd0\x00\x00\x00\x00\x00\x01\x00\x00\x44\xec\
+\x00\x00\x05\x72\x00\x00\x00\x00\x00\x01\x00\x00\x7c\x72\
+\x00\x00\x03\x6a\x00\x00\x00\x00\x00\x01\x00\x00\x51\x76\
+\x00\x00\x00\x42\x00\x00\x00\x00\x00\x01\x00\x00\x02\x81\
+\x00\x00\x00\xee\x00\x00\x00\x00\x00\x01\x00\x00\x17\xf4\
+\x00\x00\x04\xec\x00\x00\x00\x00\x00\x01\x00\x00\x71\xa4\
+\x00\x00\x01\x9c\x00\x00\x00\x00\x00\x01\x00\x00\x26\x40\
+\x00\x00\x04\x66\x00\x00\x00\x00\x00\x01\x00\x00\x68\xd8\
+\x00\x00\x02\x96\x00\x00\x00\x00\x00\x01\x00\x00\x3e\x80\
+\x00\x00\x02\x5a\x00\x00\x00\x00\x00\x01\x00\x00\x3b\x30\
+\x00\x00\x05\xd0\x00\x00\x00\x00\x00\x01\x00\x00\x85\x02\
+\x00\x00\x00\x90\x00\x00\x00\x00\x00\x01\x00\x00\x0c\x88\
+\x00\x00\x01\x4c\x00\x00\x00\x00\x00\x01\x00\x00\x21\x2a\
+\x00\x00\x05\xae\x00\x00\x00\x00\x00\x01\x00\x00\x82\x07\
+\x00\x00\x04\x7c\x00\x00\x00\x00\x00\x01\x00\x00\x69\xf8\
"
qt_resource_struct_v2 = b"\
@@ -2620,88 +2620,88 @@ qt_resource_struct_v2 = b"\
\x00\x00\x00\x00\x00\x00\x00\x00\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x29\x00\x00\x00\x02\
\x00\x00\x00\x00\x00\x00\x00\x00\
-\x00\x00\x01\x32\x00\x00\x00\x00\x00\x01\x00\x00\x19\x8d\
-\x00\x00\x01\x71\x14\x51\x77\x39\
-\x00\x00\x00\xdc\x00\x00\x00\x00\x00\x01\x00\x00\x10\x65\
-\x00\x00\x01\x71\x14\x51\x77\x38\
-\x00\x00\x02\x42\x00\x00\x00\x00\x00\x01\x00\x00\x37\x6a\
-\x00\x00\x01\x71\x14\x51\x77\x38\
-\x00\x00\x01\x9e\x00\x00\x00\x00\x00\x01\x00\x00\x29\x87\
-\x00\x00\x01\x71\x14\x51\x77\x38\
-\x00\x00\x04\x3a\x00\x00\x00\x00\x00\x01\x00\x00\x5e\xed\
-\x00\x00\x01\x71\x14\x51\x77\x38\
-\x00\x00\x03\x18\x00\x01\x00\x00\x00\x01\x00\x00\x44\xed\
-\x00\x00\x01\x71\x14\x51\x77\x38\
-\x00\x00\x02\x18\x00\x00\x00\x00\x00\x01\x00\x00\x34\x30\
-\x00\x00\x01\x71\x14\x51\x77\x38\
-\x00\x00\x01\xf4\x00\x00\x00\x00\x00\x01\x00\x00\x2f\x57\
-\x00\x00\x01\x71\x14\x51\x77\x38\
-\x00\x00\x06\x2c\x00\x00\x00\x00\x00\x01\x00\x00\x89\xa2\
-\x00\x00\x01\x71\x14\x51\x77\x39\
-\x00\x00\x01\x88\x00\x00\x00\x00\x00\x01\x00\x00\x24\xd9\
-\x00\x00\x01\x71\x14\x51\x77\x38\
-\x00\x00\x03\x62\x00\x00\x00\x00\x00\x01\x00\x00\x4b\x53\
-\x00\x00\x01\x71\x14\x51\x77\x38\
-\x00\x00\x00\xa8\x00\x00\x00\x00\x00\x01\x00\x00\x0b\x97\
-\x00\x00\x01\x71\x14\x51\x77\x39\
-\x00\x00\x05\xd6\x00\x00\x00\x00\x00\x01\x00\x00\x7f\x34\
-\x00\x00\x01\x71\x14\x51\x77\x38\
+\x00\x00\x00\x68\x00\x00\x00\x00\x00\x01\x00\x00\x05\x04\
+\x00\x00\x01\x75\xf2\xdd\xa0\xdd\
+\x00\x00\x01\xea\x00\x00\x00\x00\x00\x01\x00\x00\x2e\xc9\
+\x00\x00\x01\x75\xf2\xdd\xa0\xdc\
\x00\x00\x00\x10\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
-\x00\x00\x01\x71\x14\x51\x77\x38\
-\x00\x00\x03\x3e\x00\x00\x00\x00\x00\x01\x00\x00\x47\x12\
-\x00\x00\x01\x71\x14\x51\x77\x39\
-\x00\x00\x02\xe4\x00\x00\x00\x00\x00\x01\x00\x00\x41\x97\
-\x00\x00\x01\x71\x14\x51\x77\x38\
-\x00\x00\x01\xca\x00\x00\x00\x00\x00\x01\x00\x00\x2c\xb1\
-\x00\x00\x01\x71\x14\x51\x77\x38\
-\x00\x00\x04\x78\x00\x00\x00\x00\x00\x01\x00\x00\x62\xe6\
-\x00\x00\x01\x71\x14\x51\x77\x38\
-\x00\x00\x05\xb0\x00\x00\x00\x00\x00\x01\x00\x00\x7b\x14\
-\x00\x00\x01\x71\x14\x51\x77\x38\
-\x00\x00\x03\x84\x00\x00\x00\x00\x00\x01\x00\x00\x4e\x20\
-\x00\x00\x01\x71\x14\x51\x77\x38\
-\x00\x00\x05\x9a\x00\x00\x00\x00\x00\x01\x00\x00\x78\x6f\
-\x00\x00\x01\x71\x14\x51\x77\x39\
-\x00\x00\x04\xca\x00\x00\x00\x00\x00\x01\x00\x00\x68\xc7\
-\x00\x00\x01\x71\x14\x51\x77\x38\
-\x00\x00\x05\x04\x00\x01\x00\x00\x00\x01\x00\x00\x6f\x33\
-\x00\x00\x01\x71\x14\x51\x77\x39\
-\x00\x00\x00\x84\x00\x00\x00\x00\x00\x01\x00\x00\x08\x4d\
-\x00\x00\x01\x71\x14\x51\x77\x38\
-\x00\x00\x00\x50\x00\x00\x00\x00\x00\x01\x00\x00\x03\xea\
-\x00\x00\x01\x71\x14\x51\x77\x38\
-\x00\x00\x02\xac\x00\x00\x00\x00\x00\x01\x00\x00\x3f\x16\
-\x00\x00\x01\x71\x14\x51\x77\x38\
-\x00\x00\x05\xfc\x00\x00\x00\x00\x00\x01\x00\x00\x85\x02\
-\x00\x00\x01\x71\x14\x51\x77\x38\
-\x00\x00\x03\xc2\x00\x00\x00\x00\x00\x01\x00\x00\x51\x20\
-\x00\x00\x01\x71\x14\x51\x77\x38\
-\x00\x00\x04\x22\x00\x00\x00\x00\x00\x01\x00\x00\x5b\xdd\
-\x00\x00\x01\x71\x14\x51\x77\x38\
-\x00\x00\x05\x1a\x00\x00\x00\x00\x00\x01\x00\x00\x71\x14\
-\x00\x00\x01\x71\x14\x51\x77\x38\
-\x00\x00\x05\x70\x00\x00\x00\x00\x00\x01\x00\x00\x74\x07\
-\x00\x00\x01\x71\x14\x51\x77\x38\
-\x00\x00\x03\xd8\x00\x00\x00\x00\x00\x01\x00\x00\x54\x90\
-\x00\x00\x01\x71\x14\x51\x77\x38\
-\x00\x00\x04\xa2\x00\x00\x00\x00\x00\x01\x00\x00\x66\x0c\
-\x00\x00\x01\x71\x14\x51\x77\x38\
-\x00\x00\x06\x16\x00\x00\x00\x00\x00\x01\x00\x00\x88\x82\
-\x00\x00\x01\x71\x14\x51\x77\x39\
-\x00\x00\x04\xf0\x00\x00\x00\x00\x00\x01\x00\x00\x6b\x44\
-\x00\x00\x01\x71\x14\x51\x77\x38\
-\x00\x00\x00\xf6\x00\x00\x00\x00\x00\x01\x00\x00\x16\x3d\
-\x00\x00\x01\x71\x14\x51\x77\x38\
-\x00\x00\x00\x6a\x00\x00\x00\x00\x00\x01\x00\x00\x06\xe0\
-\x00\x00\x01\x71\x14\x51\x77\x37\
-\x00\x00\x01\x5a\x00\x00\x00\x00\x00\x01\x00\x00\x21\x11\
-\x00\x00\x01\x71\x14\x51\x77\x39\
-\x00\x00\x05\x40\x00\x00\x00\x00\x00\x01\x00\x00\x73\x97\
-\x00\x00\x01\x71\x14\x51\x77\x39\
-\x00\x00\x04\x00\x00\x00\x00\x00\x00\x01\x00\x00\x58\xe2\
-\x00\x00\x01\x71\x14\x51\x77\x39\
-\x00\x00\x02\x74\x00\x00\x00\x00\x00\x01\x00\x00\x39\xeb\
-\x00\x00\x01\x71\x14\x51\x77\x38\
+\x00\x00\x01\x75\xf2\xdd\xa0\xdb\
+\x00\x00\x02\xea\x00\x00\x00\x00\x00\x01\x00\x00\x48\x6c\
+\x00\x00\x01\x75\xf2\xdd\xa0\xdc\
+\x00\x00\x03\x82\x00\x00\x00\x00\x00\x01\x00\x00\x54\x86\
+\x00\x00\x01\x75\xf2\xdd\xa0\xdc\
+\x00\x00\x05\x88\x00\x01\x00\x00\x00\x01\x00\x00\x7f\xe2\
+\x00\x00\x01\x75\xf2\xdd\xa0\xdd\
+\x00\x00\x03\x40\x00\x00\x00\x00\x00\x01\x00\x00\x4e\x3c\
+\x00\x00\x01\x75\xf2\xdd\xa0\xdc\
+\x00\x00\x06\x28\x00\x00\x00\x00\x00\x01\x00\x00\x89\x6f\
+\x00\x00\x01\x75\xf2\xdd\xa0\xdc\
+\x00\x00\x01\x7c\x00\x00\x00\x00\x00\x01\x00\x00\x21\x9a\
+\x00\x00\x01\x75\xf2\xdd\xa0\xdd\
+\x00\x00\x00\xbe\x00\x00\x00\x00\x00\x01\x00\x00\x10\x50\
+\x00\x00\x01\x75\xf2\xdd\xa0\xdc\
+\x00\x00\x03\xc0\x00\x00\x00\x00\x00\x01\x00\x00\x58\x7f\
+\x00\x00\x01\x75\xf2\xdd\xa0\xdc\
+\x00\x00\x01\x18\x00\x00\x00\x00\x00\x01\x00\x00\x1c\x5c\
+\x00\x00\x01\x75\xf2\xdd\xa0\xdd\
+\x00\x00\x01\xc4\x00\x00\x00\x00\x00\x01\x00\x00\x28\xfb\
+\x00\x00\x01\x75\xf2\xdd\xa0\xdc\
+\x00\x00\x02\x1a\x00\x00\x00\x00\x00\x01\x00\x00\x37\x46\
+\x00\x00\x01\x75\xf2\xdd\xa0\xdc\
+\x00\x00\x04\x08\x00\x00\x00\x00\x00\x01\x00\x00\x5f\x6c\
+\x00\x00\x01\x75\xf2\xdd\xa0\xdd\
+\x00\x00\x05\x14\x00\x00\x00\x00\x00\x01\x00\x00\x75\xf6\
+\x00\x00\x01\x75\xf2\xdd\xa0\xdc\
+\x00\x00\x03\x16\x00\x00\x00\x00\x00\x01\x00\x00\x4b\x96\
+\x00\x00\x01\x75\xf2\xdd\xa0\xdc\
+\x00\x00\x05\x48\x00\x00\x00\x00\x00\x01\x00\x00\x79\x4c\
+\x00\x00\x01\x75\xf2\xdd\xa0\xdb\
+\x00\x00\x03\xe2\x00\x00\x00\x00\x00\x01\x00\x00\x5b\x4c\
+\x00\x00\x01\x75\xf2\xdd\xa0\xdc\
+\x00\x00\x05\xea\x00\x00\x00\x00\x00\x01\x00\x00\x86\x6f\
+\x00\x00\x01\x75\xf2\xdd\xa0\xdc\
+\x00\x00\x02\x04\x00\x00\x00\x00\x00\x01\x00\x00\x34\xa1\
+\x00\x00\x01\x75\xf2\xdd\xa0\xdd\
+\x00\x00\x02\xaa\x00\x00\x00\x00\x00\x01\x00\x00\x42\x6f\
+\x00\x00\x01\x75\xf2\xdd\xa0\xdc\
+\x00\x00\x04\x50\x00\x01\x00\x00\x00\x01\x00\x00\x66\xf7\
+\x00\x00\x01\x75\xf2\xdd\xa0\xdd\
+\x00\x00\x04\x2c\x00\x00\x00\x00\x00\x01\x00\x00\x63\xad\
+\x00\x00\x01\x75\xf2\xdd\xa0\xdc\
+\x00\x00\x00\xd4\x00\x00\x00\x00\x00\x01\x00\x00\x14\xfe\
+\x00\x00\x01\x75\xf2\xdd\xa0\xdc\
+\x00\x00\x04\xb4\x00\x00\x00\x00\x00\x01\x00\x00\x6f\x23\
+\x00\x00\x01\x75\xf2\xdd\xa0\xdb\
+\x00\x00\x02\xd0\x00\x00\x00\x00\x00\x01\x00\x00\x44\xec\
+\x00\x00\x01\x75\xf2\xdd\xa0\xdc\
+\x00\x00\x05\x72\x00\x00\x00\x00\x00\x01\x00\x00\x7c\x72\
+\x00\x00\x01\x75\xf2\xdd\xa0\xdd\
+\x00\x00\x03\x6a\x00\x00\x00\x00\x00\x01\x00\x00\x51\x76\
+\x00\x00\x01\x75\xf2\xdd\xa0\xdc\
+\x00\x00\x00\x42\x00\x00\x00\x00\x00\x01\x00\x00\x02\x81\
+\x00\x00\x01\x75\xf2\xdd\xa0\xdc\
+\x00\x00\x00\xee\x00\x00\x00\x00\x00\x01\x00\x00\x17\xf4\
+\x00\x00\x01\x75\xf2\xdd\xa0\xdc\
+\x00\x00\x04\xec\x00\x00\x00\x00\x00\x01\x00\x00\x71\xa4\
+\x00\x00\x01\x75\xf2\xdd\xa0\xdc\
+\x00\x00\x01\x9c\x00\x00\x00\x00\x00\x01\x00\x00\x26\x40\
+\x00\x00\x01\x75\xf2\xdd\xa0\xdc\
+\x00\x00\x04\x66\x00\x00\x00\x00\x00\x01\x00\x00\x68\xd8\
+\x00\x00\x01\x75\xf2\xdd\xa0\xdd\
+\x00\x00\x02\x96\x00\x00\x00\x00\x00\x01\x00\x00\x3e\x80\
+\x00\x00\x01\x75\xf2\xdd\xa0\xdd\
+\x00\x00\x02\x5a\x00\x00\x00\x00\x00\x01\x00\x00\x3b\x30\
+\x00\x00\x01\x75\xf2\xdd\xa0\xdc\
+\x00\x00\x05\xd0\x00\x00\x00\x00\x00\x01\x00\x00\x85\x02\
+\x00\x00\x01\x75\xf2\xdd\xa0\xdb\
+\x00\x00\x00\x90\x00\x00\x00\x00\x00\x01\x00\x00\x0c\x88\
+\x00\x00\x01\x75\xf2\xdd\xa0\xdd\
+\x00\x00\x01\x4c\x00\x00\x00\x00\x00\x01\x00\x00\x21\x2a\
+\x00\x00\x01\x75\xf2\xdd\xa0\xdd\
+\x00\x00\x05\xae\x00\x00\x00\x00\x00\x01\x00\x00\x82\x07\
+\x00\x00\x01\x75\xf2\xdd\xa0\xdd\
+\x00\x00\x04\x7c\x00\x00\x00\x00\x00\x01\x00\x00\x69\xf8\
+\x00\x00\x01\x75\xf2\xdd\xa0\xdc\
"
qt_version = [int(v) for v in QtCore.qVersion().split('.')]
diff --git a/Build/source/utils/asymptote/GUI/setup.py b/Build/source/utils/asymptote/GUI/setup.py
index d6a4c0d6a78..e49e3468d7f 100644
--- a/Build/source/utils/asymptote/GUI/setup.py
+++ b/Build/source/utils/asymptote/GUI/setup.py
@@ -8,6 +8,6 @@ setup(
version=xasyVersion.xasyVersion,
author="Supakorn Rassameemasmuang, Orest Shardt, and John C. Bowman",
description="User interface for Asymptote, a vector graphics language",
- url="http://asymptote.sourceforge.net",
+ url="https://asymptote.sourceforge.io",
download_url="https://sourceforge.net/projects/asymptote/"
)
diff --git a/Build/source/utils/asymptote/GUI/xasy2asy.py b/Build/source/utils/asymptote/GUI/xasy2asy.py
index 4b2d0274f74..12bccb453cf 100755
--- a/Build/source/utils/asymptote/GUI/xasy2asy.py
+++ b/Build/source/utils/asymptote/GUI/xasy2asy.py
@@ -716,7 +716,7 @@ class xasyItem(Qc.QObject):
image = Qg.QImage(file)
elif fileformat == 'svg':
if containsClip:
- image = xs.SvgObject(file)
+ image = xs.SvgObject(self.asyengine.tempDirName+file)
else:
image = Qs.QSvgRenderer(file)
assert image.isValid()
@@ -826,7 +826,7 @@ class xasyItem(Qc.QObject):
for i in range(len(imageInfos)):
box, key, localCount, useClip = imageInfos[i]
l, b, r, t = [float(a) for a in box.split()]
- name = "{:s}_{:d}.{:s}".format(self.asyengine.tempDirName, i, fileformat)
+ name = "_{:d}.{:s}".format(i, fileformat)
self.imageHandleQueue.put((name, fileformat, (l, -t, r, -b), i, key, localCount, useClip))
@@ -873,12 +873,15 @@ class xasyItem(Qc.QObject):
n += 1
- if text == "Error\n":
- self.imageHandleQueue.put(("ERROR", fin.readline()))
- else:
- render()
+ if raw_text != "Error\n":
+ if text == "Error\n":
+ self.imageHandleQueue.put(("ERROR", fin.readline()))
+ else:
+ render()
- self.asy2psmap = asyTransform(xu.listize(fin.readline().rstrip(),float))
+ self.asy2psmap = asyTransform(xu.listize(fin.readline().rstrip(),float))
+ else:
+ self.asy2psmap = identity()
self.imageHandleQueue.put((None,))
self.asyfied = True
diff --git a/Build/source/utils/asymptote/INSTALL b/Build/source/utils/asymptote/INSTALL
index ae5e3394b9e..602c338363a 100644
--- a/Build/source/utils/asymptote/INSTALL
+++ b/Build/source/utils/asymptote/INSTALL
@@ -16,7 +16,7 @@ you should change the first line to
./configure --prefix=$HOME/asymptote
If you get errors from a broken texinfo or pdftex installation, simply put
-http://asymptote.sourceforge.net/asymptote.pdf
+https://asymptote.sourceforge.io/asymptote.pdf
in the doc directory and repeat the commands make all and make install.
For a list of configure options, type
diff --git a/Build/source/utils/asymptote/Makefile.in b/Build/source/utils/asymptote/Makefile.in
index 6488ca9b33d..a6705f95360 100644
--- a/Build/source/utils/asymptote/Makefile.in
+++ b/Build/source/utils/asymptote/Makefile.in
@@ -13,7 +13,7 @@ GCPPLIB = @GCPPLIB@
GCLIBS = $(GCPPLIB) $(GCLIB)
LFLAGS = @LDFLAGS@
LIBS = $(LFLAGS) @PTHREAD_LIBS@ @GLEW@ @LIBS@ $(GCLIBS)
-DOSLIBS = $(subst -lncurses, -ltermcap, $(LIBS)) -lgdi32 -lwinmm -s -static
+DOSLIBS = $(subst -lncurses, -ltermcap, $(LIBS)) -lwolfssl -lgdi32 -lwinmm -s -static
PERL = perl
@@ -60,7 +60,7 @@ CLEAN = camp.output base/version.asy doc/version.texi \
GUI/xasyVersion.py $(XNAME) doc/asy-latex.pdf $(SYMBOLSH)
EXTRA = asy-mode.el asy-init.el asy.vim asy_filetype.vim asy-kate.sh \
asymptote.py reload.js nopapersize.ps
-EXEXTRA = piicon.png *.views *.dat *.bib
+EXEXTRA = piicon.png 100d.pdb1 *.views *.dat *.bib
DOCEXTRA = *.asy *.csv *.dat latexusage.tex externalprc.tex pixel.pdf
KEYWORDS = base $(ASYMPTOTE_SITEDIR)
LATEXFILES = asymptote.sty asycolors.sty ocg.sty latexmkrc
@@ -107,8 +107,8 @@ REVISION = "const char *REVISION="
last = $(shell head -1 revision.cc | sed -e 's/.*\"\(.*\)\";/\1/')
usinggit = $(shell if test -d ".git"; then echo yes; fi)
ifeq ($(usinggit),yes)
- revision = $(shell LC_ALL="C" git describe --long | sed -e 's/git//' \
- | sed -e 's/-g.*//')
+ revision = $(shell LC_ALL="C" git describe --long | \
+ sed -e 's/git-\([0-9]*\)-g.*/-\1/' | sed -e 's/-0-g.*//')
else
revision = @VERSION@
endif
@@ -136,6 +136,7 @@ version: $(GCLIB) $(FILES:=.o) $(notdir $(UIFILES:.ui=.py)) GUI/icons_rc.py
echo string VERSION=\"$(revision)\"\; > base/version.asy
echo @set VERSION $(revision) > doc/version.texi
echo @set Datadir @datadir@ >> doc/version.texi
+ echo @set Docdir @docdir@ >> doc/version.texi
echo "#!/usr/bin/env python3" > GUI/xasyVersion.py
echo xasyVersion = \"$(revision)\" >> GUI/xasyVersion.py
@@ -356,7 +357,7 @@ check-all: asy FORCE
./wce
$(MAKE) -C tests all
-glew.o: glew.c GL/glew.h
+glew.o: glew.c GL/glew.h GL/glew.c config.h
$(CC) -I. $(GLEWOPTS) -o glew.o -c glew.c
.SUFFIXES: .c .cc .o .d .ui .py
diff --git a/Build/source/utils/asymptote/ReleaseNotes b/Build/source/utils/asymptote/ReleaseNotes
index 08749387122..7e1cbf7fb41 100644
--- a/Build/source/utils/asymptote/ReleaseNotes
+++ b/Build/source/utils/asymptote/ReleaseNotes
@@ -1,3 +1,68 @@
+Release Notes for Version 2.68
+
+Floating point exceptions in OpenGL libraries are now masked.
+A normalization used to render tubes was fixed. A Label align(Label,dir)
+function was added for aligning label normals. A new settings.compress=true
+option controls PDF image compression. A bool isometry(transform) function
+was added. Various bugs in the geometry module were fixed.
+The transpose function ignores uninitialized elements.
+Null fields are treated as undefined values in cvs mode and in line mode.
+Uninitialized rendering variables were fixed. A RELEASE variable was added.
+Logarithmic graphs of surfaces are supported. Files are opened
+without assuming an asy suffix. Suport for Ghostscript 9.53 was implemented.
+The end argument of Margin functions is now optional. A function
+cputime().change.clock that returns the high-resolution elapsed wall clock
+time was added. A --disable-curl option was added.
+The centering of slides was fixed. Null characters and null strings are
+supported in the replace function. Configuration without readline support
+was fixed. In binary mode, an entire file can be read into a string.
+The getc function now works properly when reading the NUL character.
+Reproducible builds are supported.
+
+Release Notes for Version 2.67
+
+Support was added for importing and inputting URLs. Compilation and 2D SVG
+to HTML conversion no longer requires the GLM library; 2D html output is
+fit to the canvas unless settings.absolute=true. Diagnostics for dvisvgm
+were enabled; SVG clipping was fixed. A -globalread setting (default true)
+was implemented. Files are opened using the search path, which now
+includes the examples directory. An invalid array dimensions error was fixed.
+A WebGL resize event listener was added; the + and - keys now zoom in and out,
+rather than expanding and shrinking the viewport. Remeshing on export is
+forced; unnecessary remeshing on zoom in AsyGL is avoided.
+The triple dir(path3, path3) function was normalized. The repositioning of
+OpenGL windows was fixed. The copy constructors for path and path3 were fixed.
+Asymptote errors no longer cause Xasy to hang. A numerical precision issue
+was fixed. A portable way of skipping whitespace was implemented; casts
+from empty strings now yield uninitialized values. Interrupt handling under
+MacOS X was fixed. A devicepixelratio setting was implemented. The error
+location is displayed in the console. Segmentation faults were fixed.
+The documentation was updated and the code was reformatted. A hang on exit
+under MSWindows was fixed. Obsolete encoding modules were removed.
+
+Release Notes for Version 2.66
+
+A bug in the Bezier patch bounds was fixed. Vertex and material data are
+copied from the CPU to GPU only when necessary. The default Headlamp light
+was brightened. WebGL output is centered in the viewport, extending to the
+canvas boundary; the precision of planar Bezier surfaces was increased
+to avoid artifacts. Fullscreen mode has been fixed; the new default
+maxviewport=(0,0) specifies the screen dimensions. Camera adjustment was fixed.
+Problems with Xasy and interactive signals under MSWindows were fixed.
+A background color for both 2D and 3D images can be specified with
+currentlight.background. Offscreen rendering on headless machines has been
+reinstated; while the setting offscreen has been removed, one can again
+configure asy for either onscreen or offscreen rendering. Clipping was removed
+from the slopefield module. Functions mapArray, mapTemplate, real abs2(pair),
+and real abs2(triple) were implemented. The new Ghostscript transparency model
+requires Ghostscript 9.52 or later. The detection of TeX errors was improved.
+An array segmentation fault was fixed; array dimensions are checked.
+Flattened monochrome tensor patches with interior internal control points are
+now drawn as filled cyclic paths. PDF offsets were fixed, along with the
+auto-reload feature for Acroread. SVG support was improved; 2D images can now
+be output in HTML format using inline SVG code, to support the
+Asymptote Web Application, a new cloud service at http://asymptote.ualberta.ca.
+
Release Notes for Version 2.65
A bug in rendering 2D preview images of a 3D scene was fixed.
diff --git a/Build/source/utils/asymptote/access.cc b/Build/source/utils/asymptote/access.cc
index f71dba71bf3..c1e65f0baec 100644
--- a/Build/source/utils/asymptote/access.cc
+++ b/Build/source/utils/asymptote/access.cc
@@ -56,7 +56,7 @@ void bltinAccess::encode(action act, position pos, coder &e, frame *)
e.encode(inst::pop);
encode(act, pos, e);
}
-
+
/* callableAccess */
void callableAccess::encode(action act, position pos, coder &e)
{
@@ -79,7 +79,7 @@ void callableAccess::encode(action act, position pos, coder &e, frame *)
e.encode(inst::pop);
encode(act, pos, e);
}
-
+
/* frameAccess */
void frameAccess::encode(action act, position pos, coder &e)
@@ -122,8 +122,8 @@ void localAccess::encode(action act, position pos, coder &e)
offset);
}
else if (e.encode(level)) {
- e.encode(act == WRITE ? inst::fieldsave : inst::fieldpush,
- offset);
+ e.encode(act == WRITE ? inst::fieldsave : inst::fieldpush,
+ offset);
}
else {
frameError(pos);
@@ -159,5 +159,5 @@ void qualifiedAccess::encode(action act, position pos, coder &e, frame *top)
field->encode(act, pos, e, qualifierLevel);
}
-
+
} // namespace trans
diff --git a/Build/source/utils/asymptote/access.h b/Build/source/utils/asymptote/access.h
index 08e0a48e3a9..f1f82f92660 100644
--- a/Build/source/utils/asymptote/access.h
+++ b/Build/source/utils/asymptote/access.h
@@ -17,11 +17,11 @@
#include "vm.h"
namespace vm {
- struct callable;
+struct callable;
}
namespace trans {
-
+
class frame;
class coder;
@@ -32,7 +32,7 @@ enum action {
};
// These serves as the base class for the accesses.
-class access : public gc {
+class access : public gc {
protected:
// Generic compiler access error - if the compiler functions properly,
// none of these should be reachable by the user.
@@ -44,7 +44,7 @@ protected:
public:
virtual ~access() = 0;
-
+
// Encode a read/write/call of the access when nothing is on the stack.
virtual void encode(action, position pos, coder &)
{
@@ -59,7 +59,7 @@ public:
};
// This class represents identity conversions in casting.
-class identAccess : public access
+class identAccess : public access
{
virtual void encode(action act, position, coder&);
};
@@ -95,7 +95,7 @@ class frameAccess : public access {
public:
frameAccess(frame *f)
: f(f) {}
-
+
void encode(action act, position pos, coder &e);
void encode(action act, position pos, coder &e, frame *top);
};
@@ -116,7 +116,7 @@ public:
class qualifiedAccess : public access {
// The location and frame of the record.
access *qualifier;
- frame *qualifierLevel;
+ frame *qualifierLevel;
// The location of the field relative to the record.
access *field;
diff --git a/Build/source/utils/asymptote/align.h b/Build/source/utils/asymptote/align.h
index f6f2e94f689..fe891deb056 100644
--- a/Build/source/utils/asymptote/align.h
+++ b/Build/source/utils/asymptote/align.h
@@ -18,8 +18,8 @@
#ifdef __Array_h__
namespace Array {
-static const array1<Complex> NULL1;
-static const array2<Complex> NULL2;
+static const array1<Complex> NULL1;
+static const array2<Complex> NULL2;
static const array3<Complex> NULL3;
}
@@ -64,9 +64,9 @@ inline void newAlign(T *&v, size_t len, size_t align)
const char *nomem="Memory limits exceeded";
#ifdef HAVE_POSIX_MEMALIGN
int rc=posix_memalign(&mem,align,len*sizeof(T));
-#else
+#else
int rc=posix_memalign0(&mem,align,len*sizeof(T));
-#endif
+#endif
if(rc == EINVAL) std::cerr << invalid << std::endl;
if(rc == ENOMEM) std::cerr << nomem << std::endl;
v=(T *) mem;
@@ -81,7 +81,7 @@ inline void deleteAlign(T *v, size_t len)
free(v);
#else
free0(v);
-#endif
+#endif
}
}
@@ -115,7 +115,7 @@ inline void deleteAlign(T *p)
free(p);
#else
Array::free0(p);
-#endif
+#endif
}
}
diff --git a/Build/source/utils/asymptote/angle.h b/Build/source/utils/asymptote/angle.h
index 984b1546aaf..686f5469d6d 100644
--- a/Build/source/utils/asymptote/angle.h
+++ b/Build/source/utils/asymptote/angle.h
@@ -17,7 +17,7 @@ const double PI=acos(-1.0);
const double Cpiby180=PI/180.0;
const double C180bypi=180.0/PI;
-
+
inline double radians(double theta)
{
return theta*Cpiby180;
@@ -39,12 +39,12 @@ inline double angle(double x, double y, bool warn=true)
}
return atan2(y,x);
}
-
+
// Return an angle in the interval [0,360).
inline double principalBranch(double deg)
{
deg=fmod(deg,360.0);
- if(deg < 0) deg += 360.0;
+ if(deg < 0) deg += 360.0;
return deg;
}
diff --git a/Build/source/utils/asymptote/application.cc b/Build/source/utils/asymptote/application.cc
index 853896a9ea4..0a3c0f10353 100644
--- a/Build/source/utils/asymptote/application.cc
+++ b/Build/source/utils/asymptote/application.cc
@@ -53,7 +53,7 @@ void restArg::trans(coenv &e, temp_vector &temps)
if (rest)
rest->trans(e, temps);
-
+
transMaker(e, (Int)inits.size(), (bool)rest);
}
@@ -93,7 +93,7 @@ class maximizer {
++y;
l.push_front(x);
}
-
+
// Tests if x is maximal.
bool maximal(application *x) {
for (app_list::iterator y=l.begin(); y!=l.end(); ++y)
@@ -140,7 +140,7 @@ void application::initRest() {
}
}
-//const Int REST=-1;
+//const Int REST=-1;
const Int NOMATCH=-2;
Int application::find(symbol name) {
@@ -185,7 +185,7 @@ bool application::matchAtSpot(size_t spot, env &e, formal &source,
{
formal &target=sig->getFormal(spot);
if(target.t->kind == types::ty_error) return false;
-
+
score s=castScore(e, target, source);
if (s == FAIL)
@@ -252,7 +252,7 @@ bool application::matchRest(env &e, formal &source, varinit *a,
}
return false;
}
-
+
// When the argument should be evaluated, possibly adjusting for a rest
// argument which occurs before named arguments.
size_t adjustIndex(size_t i, size_t ri)
@@ -291,7 +291,7 @@ bool application::matchSignature(env &e, types::signature *source,
// Fill in any remaining arguments with their defaults.
return complete();
}
-
+
bool application::matchOpen(env &e, signature *source, arglist &al) {
assert(rest);
@@ -316,8 +316,8 @@ application *application::match(env &e, function *t, signature *source,
application *app=new application(t);
bool success = t->getSignature()->isOpen ?
- app->matchOpen(e, source, al) :
- app->matchSignature(e, source, al);
+ app->matchOpen(e, source, al) :
+ app->matchSignature(e, source, al);
//cout << "MATCH " << success << endl;
@@ -428,7 +428,7 @@ bool exactMightMatch(signature *target, signature *source)
if (source->hasRest()) {
if (!target->hasRest())
return false;
-
+
if (!equivalent(source->getRest().t, target->getRest().t))
return false;
}
@@ -454,42 +454,42 @@ app_list exactMultimatch(env &e,
return l; /* empty */
for (ty_vector::iterator t=o->sub.begin(); t!=o->sub.end(); ++t)
- {
- if ((*t)->kind != ty_function)
- continue;
-
- function *ft = (function *)*t;
-
- // First we run a test to see if all arguments could be exactly matched.
- // If this returns false, no such match is possible.
- // If it returns true, an exact match may or may not be possible.
- if (!exactMightMatch(ft->getSignature(), source))
- continue;
-
- application *a=application::match(e, ft, source, al);
-
- // Consider calling
- // void f(A a=new A, int y)
- // with
- // f(3)
- // This matches exactly if there is no implicit cast from int to A.
- // Otherwise, it does not match.
- // Thus, there is no way to know if the
- // match truly is exact without looking at the environment.
- // In such a case, exactMightMatch() must return true, but there is no
- // exact match. Such false positives are eliminated here.
- //
- // Consider calling
- // void f(int x, real y=0.0, int z=0)
- // with
- // f(1,2)
- // exactMightMatch() will return true, matching 1 to x and 2 to z, but the
- // application::match will give an inexact match of 1 to x to 2 to y, due
- // to the cast from int to real. Therefore, we must test for exactness
- // even after matching.
- if (a && a->exact())
- l.push_back(a);
- }
+ {
+ if ((*t)->kind != ty_function)
+ continue;
+
+ function *ft = (function *)*t;
+
+ // First we run a test to see if all arguments could be exactly matched.
+ // If this returns false, no such match is possible.
+ // If it returns true, an exact match may or may not be possible.
+ if (!exactMightMatch(ft->getSignature(), source))
+ continue;
+
+ application *a=application::match(e, ft, source, al);
+
+ // Consider calling
+ // void f(A a=new A, int y)
+ // with
+ // f(3)
+ // This matches exactly if there is no implicit cast from int to A.
+ // Otherwise, it does not match.
+ // Thus, there is no way to know if the
+ // match truly is exact without looking at the environment.
+ // In such a case, exactMightMatch() must return true, but there is no
+ // exact match. Such false positives are eliminated here.
+ //
+ // Consider calling
+ // void f(int x, real y=0.0, int z=0)
+ // with
+ // f(1,2)
+ // exactMightMatch() will return true, matching 1 to x and 2 to z, but the
+ // application::match will give an inexact match of 1 to x to 2 to y, due
+ // to the cast from int to real. Therefore, we must test for exactness
+ // even after matching.
+ if (a && a->exact())
+ l.push_back(a);
+ }
//cout << "EXACTMATCH " << (!l.empty()) << endl;
return l;
@@ -514,8 +514,8 @@ bool halfExactMightMatch(env &e,
// application::match. It would be nice to avoid this somehow, but the
// additional complexity is probably not worth the minor speed improvement.
if (equivalent(formals[0].t, t1))
- return e.fastCastable(formals[1].t, t2);
- else
+ return e.fastCastable(formals[1].t, t2);
+ else
return equivalent(formals[1].t, t2) && e.fastCastable(formals[0].t, t1);
}
@@ -550,24 +550,24 @@ app_list halfExactMultimatch(env &e,
assert(t1); assert(t2);
for (ty_vector::iterator t=o->sub.begin(); t!=o->sub.end(); ++t)
- {
- if ((*t)->kind != ty_function)
- continue;
+ {
+ if ((*t)->kind != ty_function)
+ continue;
- function *ft = (function *)*t;
+ function *ft = (function *)*t;
#if 1
- if (!halfExactMightMatch(e, ft->getSignature(), t1, t2))
- continue;
+ if (!halfExactMightMatch(e, ft->getSignature(), t1, t2))
+ continue;
#endif
- application *a=application::match(e, ft, source, al);
+ application *a=application::match(e, ft, source, al);
#if 1
- if (a && a->halfExact())
- l.push_back(a);
+ if (a && a->halfExact())
+ l.push_back(a);
#endif
- }
+ }
return l;
}
@@ -578,7 +578,7 @@ app_list halfExactMultimatch(env &e,
// not give any speed-up.
bool tooManyArgs(types::signature *target, types::signature *source) {
return source->getNumFormals() > target->getNumFormals() &&
- !target->hasRest();
+ !target->hasRest();
}
// The full overloading resolution system, which handles casting of arguments,
@@ -624,9 +624,9 @@ app_list inexactMultimatch(env &e,
assert(a->exact() == exactlyMatchable(ft->getSignature(), source));
if (a->halfExact() && !namedFormals(source)) {
assert(halfExactMightMatch(e, target, source->getFormal(0).t,
- source->getFormal(1).t));
+ source->getFormal(1).t));
}
-
+
}
if (a && a->exact())
exact = true;
@@ -640,7 +640,7 @@ app_list inexactMultimatch(env &e,
cout << (perfect ? "PERFECT" :
exact ? "EXACT" :
halfExact ? "HALFEXACT" :
- "IMPERFECT")
+ "IMPERFECT")
<< endl;
#endif
diff --git a/Build/source/utils/asymptote/application.h b/Build/source/utils/asymptote/application.h
index 8ca4296bd3b..fcf3f8e5114 100644
--- a/Build/source/utils/asymptote/application.h
+++ b/Build/source/utils/asymptote/application.h
@@ -18,7 +18,7 @@
// Defined in runtime.in:
namespace run {
- void pushDefault(vm::stack *Stack);
+void pushDefault(vm::stack *Stack);
}
using absyntax::arglist;
@@ -93,7 +93,7 @@ public:
restArg()
: rest(0) {}
- virtual ~restArg()
+ virtual ~restArg()
{}
// Encodes the instructions to make an array from size elements on the stack.
@@ -247,11 +247,11 @@ class application : public gc {
// Matches the argument to a formal in the target signature (possibly causing
// other formals in the target to be matched to default values), and updates
- // the matchpoint accordingly.
+ // the matchpoint accordingly.
bool matchArgument(env &e, types::formal& source,
varinit *a, size_t evalIndex);
- // Match an argument bound to a name, as in f(index=7).
+ // Match an argument bound to a name, as in f(index=7).
bool matchNamedArgument(env &e, types::formal& source,
varinit *a, size_t evalIndex);
@@ -261,7 +261,7 @@ class application : public gc {
// Match a rest argument in the calling expression.
bool matchRest(env &e, types::formal& f, varinit *a, size_t evalIndex);
-
+
// Match the argument represented in signature to the target signature. On
// success, all of the arguments in args will be properly set up.
bool matchSignature(env &e, types::signature *source, arglist &al);
diff --git a/Build/source/utils/asymptote/array.cc b/Build/source/utils/asymptote/array.cc
index 58c43710641..c70f5e22f38 100644
--- a/Build/source/utils/asymptote/array.cc
+++ b/Build/source/utils/asymptote/array.cc
@@ -1,7 +1,7 @@
/*****
* array.cc
* Andy Hammerlindl 2008/01/26
- *
+ *
* Array type used by virtual machine.
*****/
@@ -10,6 +10,8 @@
namespace vm {
+const char *dereferenceNullArray="dereference of null array";
+
inline void checkBackSlice(Int left, Int right)
{
if (right < left)
@@ -156,10 +158,11 @@ void array::setSlice(Int left, Int right, array *a)
item copyItemToDepth(item i, size_t depth)
{
- if (depth == 0)
+ if(depth == 0)
return i;
- else
- return get<array *>(i)->copyToDepth(depth);
+ array* a=get<array*>(i);
+ if(a == 0) vm::error(dereferenceNullArray);
+ return a->copyToDepth(depth);
}
array *array::copyToDepth(size_t depth)
diff --git a/Build/source/utils/asymptote/array.h b/Build/source/utils/asymptote/array.h
index 58a97d7b253..0fd353b2e11 100644
--- a/Build/source/utils/asymptote/array.h
+++ b/Build/source/utils/asymptote/array.h
@@ -1,7 +1,7 @@
/*****
* array.h
* Tom Prince 2005/06/18
- *
+ *
* Array type used by virtual machine.
*****/
@@ -14,15 +14,17 @@
namespace vm {
+extern const char *dereferenceNullArray;
+
// Arrays are vectors with push and pop functions.
class array : public mem::vector<item> {
- bool cycle;
+ bool cycle;
void setNonBridgingSlice(size_t l, size_t r, mem::vector<item> *a);
void setBridgingSlice(size_t l, size_t r, mem::vector<item> *a);
public:
array() : cycle(false) {}
-
+
array(size_t n)
: mem::vector<item>(n), cycle(false)
{}
@@ -46,14 +48,14 @@ public:
{
return get<T>((*this)[i]);
}
-
+
array *slice(Int left, Int right);
void setSlice(Int left, Int right, array *a);
void cyclic(bool b) {
cycle=b;
}
-
+
bool cyclic() const {
return cycle;
}
@@ -75,7 +77,7 @@ inline T read(const array &a, size_t i)
inline size_t checkArray(const vm::array *a)
{
- if(a == 0) vm::error("dereference of null array");
+ if(a == 0) vm::error(dereferenceNullArray);
return a->size();
}
@@ -87,14 +89,14 @@ inline void checkEqual(size_t i, size_t j) {
vm::error(buf);
}
-inline size_t checkArrays(const vm::array *a, const vm::array *b)
+inline size_t checkArrays(const vm::array *a, const vm::array *b)
{
size_t asize=checkArray(a);
size_t bsize=checkArray(b);
checkEqual(asize,bsize);
return asize;
}
-
+
// Copies an item to a depth d. If d == 0 then the item is just returned
// without copying, otherwise, the array and its subarrays are copied to
// depth d.
diff --git a/Build/source/utils/asymptote/arrayop.h b/Build/source/utils/asymptote/arrayop.h
index f63d8ae099b..ee1310a914d 100644
--- a/Build/source/utils/asymptote/arrayop.h
+++ b/Build/source/utils/asymptote/arrayop.h
@@ -24,7 +24,7 @@ using camp::tab;
vm::array *copyArray(vm::array *a);
vm::array *copyArray2(vm::array *a);
-
+
template<class T, class U, template <class S> class op>
void arrayOp(vm::stack *s)
{
@@ -73,7 +73,7 @@ void sumArray(vm::stack *s)
}
extern const char *arrayempty;
-
+
template<class T, template <class S> class op>
void binopArray(vm::stack *s)
{
@@ -202,7 +202,7 @@ bool Array2Equals(vm::stack *s)
if(n == 0) return true;
size_t n0=checkArray(read<array*>(a,0));
if(n0 != checkArray(read<array*>(b,0))) return false;
-
+
for(size_t i=0; i < n; ++i) {
array *ai=read<array*>(a,i);
array *bi=read<array*>(b,i);
@@ -300,7 +300,7 @@ void searchArray(vm::stack *s)
size_t u=size-1;
if(key >= read<T>(a,u)) {s->push((Int) u); return;}
size_t l=0;
-
+
while (l < u) {
size_t i=(l+u)/2;
if(key < read<T>(a,i)) u=i;
@@ -311,9 +311,9 @@ void searchArray(vm::stack *s)
}
extern string emptystring;
-
+
void writestring(vm::stack *s);
-
+
template<class T>
void write(vm::stack *s)
{
@@ -325,7 +325,7 @@ void write(vm::stack *s)
bool defaultfile=isdefault(it);
camp::ofile *f=defaultfile ? &camp::Stdout : vm::get<camp::ofile*>(it);
if(!f->isOpen() || !f->enabled()) return;
-
+
size_t size=checkArray(a);
if(S != "") f->write(S);
f->write(first);
@@ -356,14 +356,14 @@ void writeArray(vm::stack *s)
bool defaultfile=isdefault(it);
camp::ofile *f=defaultfile ? &camp::Stdout : vm::get<camp::ofile*>(it);
if(!f->isOpen() || !f->enabled()) return;
-
+
size_t asize=checkArray(a);
size_t Asize=checkArray(A);
if(f->Standard()) interact::lines=0;
else if(!f->isOpen()) return;
try {
if(S != "") {f->write(S); f->writeline();}
-
+
size_t i=0;
bool cont=true;
while(cont) {
@@ -402,7 +402,7 @@ void writeArray(vm::stack *s)
}
f->flush();
}
-
+
template<class T>
void writeArray2(vm::stack *s)
{
@@ -411,10 +411,10 @@ void writeArray2(vm::stack *s)
bool defaultfile=isdefault(it);
camp::ofile *f=defaultfile ? &camp::Stdout : vm::get<camp::ofile*>(it);
if(!f->isOpen() || !f->enabled()) return;
-
+
size_t size=checkArray(a);
if(f->Standard()) interact::lines=0;
-
+
try {
for(size_t i=0; i < size; i++) {
vm::item& I=(*a)[i];
@@ -443,10 +443,10 @@ void writeArray3(vm::stack *s)
bool defaultfile=isdefault(it);
camp::ofile *f=defaultfile ? &camp::Stdout : vm::get<camp::ofile*>(it);
if(!f->isOpen() || !f->enabled()) return;
-
+
size_t size=checkArray(a);
if(f->Standard()) interact::lines=0;
-
+
try {
for(size_t i=0; i < size;) {
vm::item& I=(*a)[i];
@@ -477,7 +477,7 @@ void writeArray3(vm::stack *s)
}
template <class T, class S, T (*func)(S)>
-void arrayFunc(vm::stack *s)
+void arrayFunc(vm::stack *s)
{
array *a=pop<array*>(s);
size_t size=checkArray(a);
@@ -488,7 +488,7 @@ void arrayFunc(vm::stack *s)
}
template <class T, class S, T (*func)(S)>
-void arrayFunc2(vm::stack *s)
+void arrayFunc2(vm::stack *s)
{
array *a=pop<array*>(s);
size_t size=checkArray(a);
@@ -499,7 +499,7 @@ void arrayFunc2(vm::stack *s)
array *ci=new array(aisize);
(*c)[i]=ci;
for(size_t j=0; j < aisize; j++)
- (*ci)[j]=func(read<S>(ai,j));
+ (*ci)[j]=func(read<S>(ai,j));
}
s->push(c);
}
@@ -526,7 +526,7 @@ inline void copyArrayC(T* &dest, const vm::array *a, size_t dim=0,
{
size_t size=checkdimension(a,dim);
dest=(placement == NoGC) ? new T[size] : new(placement) T[size];
- for(size_t i=0; i < size; i++)
+ for(size_t i=0; i < size; i++)
dest[i]=vm::read<T>(a,i);
}
@@ -536,7 +536,7 @@ inline void copyArrayC(T* &dest, const vm::array *a, T (*cast)(A),
{
size_t size=checkdimension(a,dim);
dest=(placement == NoGC) ? new T[size] : new(placement) T[size];
- for(size_t i=0; i < size; i++)
+ for(size_t i=0; i < size; i++)
dest[i]=cast(vm::read<A>(a,i));
}
@@ -559,17 +559,17 @@ inline void copyArray2C(T* &dest, const vm::array *a, bool square=true,
buf << "second matrix dimension must be " << dim2;
vm::error(buf);
}
-
+
dest=(placement == NoGC) ? new T[n*m] : new(placement) T[n*m];
for(size_t i=0; i < n; i++) {
vm::array *ai=vm::read<vm::array*>(a,i);
size_t aisize=checkArray(ai);
if(aisize == m) {
T *desti=dest+i*m;
- for(size_t j=0; j < m; j++)
+ for(size_t j=0; j < m; j++)
desti[j]=vm::read<T>(ai,j);
} else
- vm::error(square ? "matrix must be square" :
+ vm::error(square ? "matrix must be square" :
"matrix must be rectangular");
}
}
@@ -581,7 +581,7 @@ inline vm::array* copyCArray2(const size_t n, const size_t m, const T* p)
for(size_t i=0; i < n; ++i) {
array *ai=new array(m);
(*a)[i]=ai;
- for(size_t j=0; j < m; ++j)
+ for(size_t j=0; j < m; ++j)
(*ai)[j]=p[m*i+j];
}
return a;
diff --git a/Build/source/utils/asymptote/asy-keywords.el b/Build/source/utils/asymptote/asy-keywords.el
index ff2d1e952d1..72c6ff88861 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 "2.65")
+(defvar asy-keywords-version "2.68")
(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 Solution TreeNode abscissa arc arrowhead binarytree binarytreeNode block bool bool3 bounds bqe circle conic coord coordsys cputime ellipse evaluatedpoint file filltype frame grid3 guide horner hsv hyperbola int inversion key light line linefit marginT marker mass node object pair parabola patch path path3 pen picture point position positionedvector projection rational real revolution scaleT scientific segment side simplex slice solution splitface string surface tensionSpecifier ticklocate ticksgridT tickvalues transform transformation tree triangle trilinear triple vector vertex void ))
(defvar asy-function-name '(
-AND Arc ArcArrow ArcArrows Arrow Arrows AtA Automatic AvantGarde B03 B13 B23 B33 BBox BWRainbow BWRainbow2 Bar Bars BeginArcArrow BeginArrow BeginBar BeginDotMargin BeginMargin BeginPenMargin Blank Bookman Bottom BottomTop Bounds Break Broken BrokenLog CLZ CTZ Ceil Circle CircleBarIntervalMarker Cos Courier CrossIntervalMarker DOSendl DOSnewl DefaultFormat DefaultLogFormat Degrees Dir DotMargin DotMargins Dotted Draw Drawline Embed EndArcArrow EndArrow EndBar EndDotMargin EndMargin EndPenMargin Fill FillDraw Finite Floor Format Full Gaussian Gaussrand Gaussrandpair Gradient Grayscale Helvetica Hermite HookHead InOutTicks InTicks Jn Label Landscape Left LeftRight LeftTicks Legend Linear Log LogFormat Margin Margins Mark MidArcArrow MidArrow NOT NewCenturySchoolBook NoBox NoMargin NoModifier NoTicks NoTicks3 NoZero NoZeroFormat None OR OmitFormat OmitTick OmitTickInterval OmitTickIntervals OutTicks Ox Oy Palatino PaletteTicks Pen PenMargin PenMargins Pentype Portrait RGB RadialShade RadialShadeDraw 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 Yn Z ZX ZXgrid ZYgrid ZapfChancery ZapfDingbats _begingroup3 _cputime _draw _eval _findroot _image _labelpath _projection _shipout _strokepath _texpath aCos aSin aTan abort abs accel acos acosh acot acsc activatequote add addArrow addMargins addSaveFunction addpenarc addpenline addseg adjust alias align all altitude angabscissa angle angledegrees angpoint animate annotate anticomplementary antipedal apply approximate arc arcarrowsize arccircle arcdir arcfromcenter arcfromfocus arclength arcnodesnumber arcpoint arcsubtended arcsubtendedcenter arctime arctopath array arrow arrow2 arrowbase arrowbasepoints arrowsize ascii asec asin asinh ask assert asy asycode asydir asyfigure asyfilecode asyinclude asywrite atan atan2 atanh atbreakpoint atexit attach attract atupdate autoformat autoscale autoscale3 axes axes3 axialshade axis axiscoverage azimuth babel background bangles bar barmarksize barsize basealign baseline bbox beep begin beginclip begingroup beginpoint between bevel bezier bezierP bezierPP bezierPPP bezulate bibliography bibliographystyle binarytree binarytreeNode binomial bins bisector bisectorpoint bispline bispline0 bitreverse blend blockconnector box bqe brace breakpoint breakpoints brick buildRestoreDefaults buildRestoreThunk buildcycle bulletcolor byte calculateScaling canonical canonicalcartesiansystem cartesiansystem case1 case2 case3 cbrt cd ceil center centerToFocus centroid cevian change2 changecoordsys checkSegment check_fpt_zero checkconditionlength checker checkincreasing checklengths checkposition checkpt checkptincube 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 copyPairOrTriple cos cosh cot countIntersections cputime crop cropcode cross crossframe crosshatch crossmarksize csc cubicroots curabscissa curlSpecifier curpoint currentarrow currentexitfunction currentmomarrow currentpolarconicroutine curve cut cutafter cutbefore cyclic cylinder deactivatequote debugger deconstruct defaultdir defaultformat defaultpen defined degenerate degrees delete deletepreamble determinant diagonal diamond diffdiv dir dirSpecifier dirtime display distance divisors do_overpaint dot dotframe dotsize downcase draw drawAll drawCylinder drawDisk drawDoubleLine drawFermion drawGhost drawGluon drawMomArrow drawPhoton drawScalar drawSphere drawTube drawVertex drawVertexBox drawVertexBoxO drawVertexBoxX drawVertexO drawVertexOX drawVertexTriangle drawVertexTriangleO drawVertexX drawarrow drawarrow2 drawbeziertriangle drawline drawpixel drawstrokepath drawtick duplicate elle ellipse ellipsenodesnumber embed embed3 embedplayer empty enclose end endclip endgroup endgroup3 endl endpoint endpoints eof eol equation equations erase erasestep erf erfc error errorbar errorbars eval excenter excircle exit exitfunction exp expfactors expi expm1 exradius extend extension extouch fabs factorial fermat fft fhorner figure file filecode fill filldraw filloutside fillrule filltype find findall findroot finite finiteDifferenceJacobian firstcut firstframe fit fit2 fixedscaling floor flush fmdefaults fmod focusToCenter font fontcommand fontsize foot format frac frequency fromCenter fromFocus fspline functionshade gamma gcd generate_random_backtrace generateticks gergonne getc getint getpair getreal getstring gettriple gluon gouraudshade graph graphic graphicscale gray grestore grid grid3 gsave halfbox hatch hdiffdiv hermite hex histogram history hline hprojection hsv hyperbola hyperbolanodesnumber hyperlink hypot identity image implicitsurface incenter incentral incircle increasing incrementposition indexedfigure initdefaults initialized input inradius insert inside insphere integrate interactive interior interp interpolate intersect intersection intersectionpoint intersectionpoints intersections intouch inverse inversion invisible is3D isDuplicate isnan isogonal isogonalconjugate isotomic isotomicconjugate isparabola italic item jobname key kurtosis kurtosisexcess label labelaxis labelmargin labelpath labels labeltick labelx labelx3 labely labely3 labelz labelz3 lastcut latex latitude latticeshade layer layout lcm ldexp leastsquares legend legenditem length lexorder lift light limits line linear linecap lineinversion linejoin linemargin lineskip linetype linewidth link list lm_enorm lm_evaluate_default lm_lmdif lm_lmpar lm_minimize lm_print_default lm_print_quiet lm_qrfac lm_qrsolv locale locate locatefile location log log10 log1p logaxiscoverage longitude lookup make3dgrid makeMappingArray makeNode makecircle makedraw makepen maketriangle map margin markangle markangleradius markanglespace markarc marker markinterval marknodes markrightangle markthin markuniform mass masscenter massformat math max max3 maxAfterTransform maxbezier maxbound maxcoords maxlength maxratio maxtimes mean medial median midpoint min min3 minAfterTransform minbezier minbound minipage minratio mintimes miterlimit mktemp momArrowPath momarrowsize monotonic multifigure nGrad nativeformat natural newl newpage newslide newton newtree nextframe nextnormal nextpage nib nodabscissa node none norm normalout normalvideo nosetpagesize notaknot nowarn numberpage nurb object offset onpath opacity opposite orient orientation origin orthic orthocentercenter outdirectory outformat outline outname outprefix output overloadedMessage overwrite pack pad pairs palette parabola parabolanodesnumber parallel parallelogram partialsum patchwithnormals path path3 pathbetween pathinface pattern pause pdf pedal periodic perp perpendicular perpendicularmark phantom phi1 phi2 phi3 photon piecewisestraight point polar polarconicroutine polargraph polygon popcount postcontrol postscript pow10 ppoint prc prc0 prconly precision precontrol prepend printBytecode print_random_addresses progress project projection projecttospan projecttospan_findcoeffs purge pwhermite quadpatches quadrant quadraticroots quantize quarticroots quotient radialshade radians radicalcenter radicalline radius rand randompath rationalidentity rd readline realmult realquarticroots rectangle rectangular rectify reflect relabscissa relative relativedistance reldir relpoint reltime remainder remark removeDuplicates rename render 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 segmentlimits sequence setpens sgn sgnd sharpangle sharpdegrees shift shiftless shipout shipout3 show simeq simplex simplexPhase1 simplexPhase2 simplexStandard simplexTableau simplexWrite simpson sin sinh size size3 skewness skip slant sleep slice slope slopefield solve solveBVP sort sourceline sphere split sqrt square srand standardizecoordsys stdev step stickframe stickmarksize stickmarkspace stop straight straightness string stripdirectory stripextension stripfile stripsuffix strokepath subdivide subitem subpath substr sum surface symmedial symmedian system tab tableau tan tangent tangential tangents tanh tell tensionSpecifier tensorshade tex texcolor texify texpath texpreamble texreset texshipout texsize texstring textpath thick thin tick tickMax tickMax3 tickMin tickMin3 ticklabelshift ticklocate tildeframe tildemarksize tile tiling time times title titlepage topbox toplocation transform transformation transpose trembleFuzz triangle triangleAbc triangleabc triangletoquads trianglewithnormals triangulate tricoef tridiagonal trilinear trim truepoint tube uncycle unfill uniform unique unit unitrand unitsize unityroot unstraighten upcase updatefunction uperiodic upscale uptodate usepackage usersetting usetypescript usleep value variance variancebiased vbox vector vectorfield verbatim view vline vperiodic vprojection warn warning windingnumber write xasyKEY xaxis xaxis3 xaxis3At xaxisAt xequals xlimits xmap xpart xscale xscaleO xtick xtick3 xtrans yaxis yaxis3 yaxis3At yaxisAt yequals ylimits ypart yscale yscaleO ytick ytick3 ytrans zaxis3 zaxis3At zero zlimits zpart ztick ztick3 ztrans ))
+AND Arc ArcArrow ArcArrows Arrow Arrows AtA Automatic AvantGarde B03 B13 B23 B33 BBox BWRainbow BWRainbow2 Bar Bars BeginArcArrow BeginArrow BeginBar BeginDotMargin BeginMargin BeginPenMargin Blank Bookman Bottom BottomTop Bounds Break Broken BrokenLog CLZ CTZ Ceil Circle CircleBarIntervalMarker Cos Courier CrossIntervalMarker DOSendl DOSnewl DefaultFormat DefaultLogFormat Degrees Dir DotMargin DotMargins Dotted Draw Drawline Embed EndArcArrow EndArrow EndBar EndDotMargin EndMargin EndPenMargin Fill FillDraw Finite Floor Format Full Gaussian Gaussrand Gaussrandpair Gradient Grayscale Helvetica Hermite HookHead InOutTicks InTicks Jn Label Landscape Left LeftRight LeftTicks Legend Linear Log LogFormat Margin Margins Mark MidArcArrow MidArrow NOT NewCenturySchoolBook NoBox NoMargin NoModifier NoTicks NoTicks3 NoZero NoZeroFormat None OR OmitFormat OmitTick OmitTickInterval OmitTickIntervals OutTicks Ox Oy Palatino PaletteTicks Pen PenMargin PenMargins Pentype Portrait RGB RadialShade RadialShadeDraw 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 Yn Z ZX ZXgrid ZYgrid ZapfChancery ZapfDingbats _begingroup3 _cputime _draw _eval _findroot _image _labelpath _projection _shipout _strokepath _texpath aCos aSin aTan abort abs abs2 accel acos acosh acot acsc activatequote add addArrow addMargins addSaveFunction addpenarc addpenline addseg adjust alias align all altitude angabscissa angle angledegrees angpoint animate annotate anticomplementary antipedal apply approximate arc arcarrowsize arccircle arcdir arcfromcenter arcfromfocus arclength arcnodesnumber arcpoint arcsubtended arcsubtendedcenter arctime arctopath array arrow arrow2 arrowbase arrowbasepoints arrowsize ascii asec asin asinh ask assert asy asycode asydir asyfigure asyfilecode asyinclude asywrite atan atan2 atanh atbreakpoint atexit attach attract atupdate autoformat autoscale autoscale3 axes axes3 axialshade axis axiscoverage azimuth babel background bangles bar barmarksize barsize basealign baseline bbox beep begin beginclip begingroup beginpoint between bevel bezier bezierP bezierPP bezierPPP bezulate bibliography bibliographystyle binarytree binarytreeNode binomial bins bisector bisectorpoint bispline bispline0 bitreverse blend blockconnector box bqe brace breakpoint breakpoints brick buildRestoreDefaults buildRestoreThunk buildcycle bulletcolor byte calculateScaling canonical canonicalcartesiansystem cartesiansystem case1 case2 case3 cbrt cd ceil center centerToFocus centroid cevian change2 changecoordsys checkSegment check_fpt_zero checkconditionlength checker checkincreasing checklengths checkposition checkpt checkptincube 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 copyPairOrTriple cos cosh cot countIntersections cputime crop cropcode cross crossframe crosshatch crossmarksize csc cubicroots curabscissa curlSpecifier curpoint currentarrow currentexitfunction currentmomarrow currentpolarconicroutine curve cut cutafter cutbefore cyclic cylinder deactivatequote debugger deconstruct defaultdir defaultformat defaultpen defined degenerate degrees delete deletepreamble determinant diagonal diamond diffdiv dir dirSpecifier dirtime display distance divisors do_overpaint dot dotframe dotsize downcase draw drawAll drawCylinder drawDisk drawDoubleLine drawFermion drawGhost drawGluon drawMomArrow drawPhoton drawScalar drawSphere drawTube drawVertex drawVertexBox drawVertexBoxO drawVertexBoxX drawVertexO drawVertexOX drawVertexTriangle drawVertexTriangleO drawVertexX drawarrow drawarrow2 drawbeziertriangle drawline drawpixel drawstrokepath drawtick duplicate elle ellipse ellipsenodesnumber embed embed3 embedplayer empty enclose end endclip endgroup endgroup3 endl endpoint endpoints eof eol equation equations erase erasestep erf erfc error errorbar errorbars eval excenter excircle exit exitfunction exp expfactors expi expm1 exradius extend extension extouch fabs factorial fermat fft fhorner figure file filecode fill filldraw filloutside fillrule filltype find findall findroot finite finiteDifferenceJacobian firstcut firstframe fit fit2 fixedscaling floor flush fmdefaults fmod focusToCenter font fontcommand fontsize foot format frac frequency fromCenter fromFocus fspline functionshade gamma gcd generate_random_backtrace generateticks gergonne getc getint getpair getreal getstring gettriple gluon gouraudshade graph graphic graphicscale gray grestore grid grid3 gsave halfbox hatch hdiffdiv hermite hex histogram history hline hprojection hsv hyperbola hyperbolanodesnumber hyperlink hypot identity image implicitsurface incenter incentral incircle increasing incrementposition indexedfigure initdefaults initialized input inradius insert inside insphere integrate interactive interior interp interpolate intersect intersection intersectionpoint intersectionpoints intersections intouch inverse inversion invisible is3D isDuplicate isnan isogonal isogonalconjugate isometry isotomic isotomicconjugate isparabola italic item jobname key kurtosis kurtosisexcess label labelaxis labelmargin labelpath labels labeltick labelx labelx3 labely labely3 labelz labelz3 lastcut latex latitude latticeshade layer layout lcm ldexp leastsquares legend legenditem length lexorder lift light limits line linear linecap lineinversion linejoin linemargin lineskip linetype linewidth link list lm_enorm lm_evaluate_default lm_lmdif lm_lmpar lm_minimize lm_print_default lm_print_quiet lm_qrfac lm_qrsolv locale locate locatefile location log log10 log1p logaxiscoverage longitude lookup make3dgrid makeMappingArray makeNode makecircle makedraw makepen maketriangle map mapArray mapTemplate margin markangle markangleradius markanglespace markarc marker markinterval marknodes markrightangle markthin markuniform mass masscenter massformat math max max3 maxAfterTransform maxbezier maxbound maxcoords maxlength maxratio maxtimes mean medial median midpoint min min3 minAfterTransform minbezier minbound minipage minratio mintimes miterlimit mktemp momArrowPath momarrowsize monotonic multifigure nGrad nativeformat natural newl newpage newslide newton newtree nextframe nextnormal nextpage nib nodabscissa node none norm normalout normalvideo notaknot nowarn numberpage nurb object offset onpath opacity opposite orient orientation origin orthic orthocentercenter outdirectory outformat outline outname outprefix output overloadedMessage overwrite pack pad pairs palette parabola parabolanodesnumber parallel parallelogram partialsum patchwithnormals path path3 pathbetween pathinface pattern pause pdf pedal periodic perp perpendicular perpendicularmark phantom phi1 phi2 phi3 photon piecewisestraight point polar polarconicroutine polargraph polygon popcount postcontrol postscript pow10 ppoint prc prc0 prconly precision precontrol prepend printBytecode print_random_addresses progress project projection projecttospan projecttospan_findcoeffs purge pwhermite quadpatches quadrant quadraticroots quantize quarticroots quotient radialshade radians radicalcenter radicalline radius rand randompath rationalidentity rd readline realmult realquarticroots rectangle rectangular rectify reflect relabscissa relative relativedistance reldir relpoint reltime remainder remark removeDuplicates rename render 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 segmentlimits sequence setpens sgn sgnd sharpangle sharpdegrees shift shiftless shipout shipout3 show simeq simplex simplexInit simplexPhase1 simplexPhase2 simplexTableau simplexWrite simpson sin sinh size size3 skewness skip slant sleep slice slope slopefield solve solveBVP sort sourceline sphere split sqrt square srand standardizecoordsys stdev step stickframe stickmarksize stickmarkspace stop straight straightness string stripdirectory stripextension stripfile stripsuffix strokepath subdivide subitem subpath substr sum surface symmedial symmedian system tab tableau tan tangent tangential tangents tanh tell tensionSpecifier tensorshade tex texcolor texify texpath texpreamble texreset texshipout texsize texstring textpath thick thin tick tickMax tickMax3 tickMin tickMin3 ticklabelshift ticklocate tildeframe tildemarksize tile tiling time times title titlepage topbox toplocation transform transformation transpose trembleFuzz triangle triangleAbc triangleabc triangletoquads trianglewithnormals triangulate tricoef tridiagonal trilinear trim truepoint tube type uncycle unfill uniform unique unit unitrand unitsize unityroot unstraighten upcase updatefunction uperiodic upscale uptodate usepackage usersetting usetypescript usleep value variance variancebiased vbox vector vectorfield verbatim view vline vperiodic vprojection warn warning windingnumber write xasyKEY xaxis xaxis3 xaxis3At xaxisAt xequals xlimits xmap xpart xscale xscaleO xtick xtick3 xtrans yaxis yaxis3 yaxis3At yaxisAt yequals ylimits ypart yscale yscaleO ytick ytick3 ytrans zaxis3 zaxis3At zero zlimits zpart ztick ztick3 ztrans ))
(defvar asy-variable-name '(
-Accent AliceBlue Align Allow AntiqueWhite Apricot Aqua Aquamarine Aspect Azure BeginPoint Beige Bisque Bittersweet Black BlanchedAlmond Blue BlueGreen BlueViolet Blues Both BrBG Break BrickRed Brown BuGn BuPu BurlyWood BurntOrange CCW CMRmap CW CadetBlue CarnationPink Center Centered Cerulean Chartreuse Chocolate Coeff Coral CornflowerBlue Cornsilk Crimson Crop Cyan Dandelion Dark2 DarkBlue DarkCyan DarkGoldenrod DarkGray DarkGreen DarkKhaki DarkMagenta DarkOliveGreen DarkOrange DarkOrchid DarkRed DarkSalmon DarkSeaGreen DarkSlateBlue DarkSlateGray DarkTurquoise DarkViolet DeepPink DeepSkyBlue DefaultHead DimGray DodgerBlue Dotted Down Draw E ENE EPS ESE E_Euler E_PC E_RK2 E_RK3BS Emerald EndPoint Euler Fill FillDraw FireBrick FloralWhite ForestGreen Fuchsia Gainsboro GhostWhite GnBu Gold Goldenrod Gray Green GreenYellow Greens Greys Honeydew HookHead Horizontal HotPink I IgnoreAspect IndianRed Indigo Infinity Ivory JOIN_IN JOIN_OUT JungleGreen Khaki LM_DWARF LM_MACHEP LM_SQRT_DWARF LM_SQRT_GIANT LM_USERTOL Label Lavender LavenderBlush LawnGreen Left LeftJustified LeftSide LemonChiffon LightBlue LightCoral LightCyan LightGoldenrodYellow LightGreen LightGrey LightPink LightSalmon LightSeaGreen LightSkyBlue LightSlateGray LightSteelBlue LightYellow Lime LimeGreen Linear Linen Log Logarithmic Magenta Mahogany Mark MarkFill MarkPath Maroon Max MediumAquamarine MediumBlue MediumOrchid MediumPurple MediumSeaGreen MediumSlateBlue MediumSpringGreen MediumTurquoise MediumVioletRed Melon MidPoint MidnightBlue Min MintCream MistyRose Moccasin Move MoveQuiet Mulberry N NE NNE NNW NULL_VERTEX NW NavajoWhite Navy NavyBlue NoAlign NoCrop NoFill NoSide OldLace Olive OliveDrab OliveGreen OrRd Orange OrangeRed Oranges Orchid Ox Oy PC PRGn Paired PaleGoldenrod PaleGreen PaleTurquoise PaleVioletRed PapayaWhip Pastel1 Pastel2 Peach PeachPuff Periwinkle Peru PiYG PineGreen Pink Plum PowderBlue ProcessBlue PuBu PuBuGn PuOr PuRd Purple Purples RK2 RK3 RK3BS RK4 RK5 RK5DP RK5F RawSienna RdBu RdGy RdPu RdYlBu RdYlGn Red RedOrange RedViolet Reds Rhodamine Right RightJustified RightSide RosyBrown RoyalBlue RoyalPurple RubineRed S SE SSE SSW SW SaddleBrown Salmon SandyBrown SeaGreen Seashell Sepia Set1 Set2 Set3 Sienna Silver SimpleHead SkyBlue SlateBlue SlateGray Snow Spectral SpringGreen SteelBlue Suppress SuppressQuiet Tan TeXHead Teal TealBlue Thistle Ticksize Tomato Turquoise UnFill Up VERSION Value Vertical Violet VioletRed W WNW WSW Wheat White WhiteSmoke WildStrawberry XHIGH XLOW XYAlign YAlign YHIGH YLOW Yellow YellowGreen YellowOrange YlGn YlGnBu YlOrBr YlOrRd ZHIGH ZLOW _outpipe aboveequationskip addpenarc addpenline align allowstepping angularsystem animationdelay appendsuffix arcarrowangle arcarrowfactor arrow2sizelimit arrowangle arrowbarb arrowdir arrowfactor arrowhookfactor arrowlength arrowsizelimit arrowtexfactor authorpen autumn axis axiscoverage axislabelfactor background backgroundcolor backgroundpen barfactor barmarksizefactor basealign baselinetemplate bernstein beveljoin bigvertexpen bigvertexsize binary black blue bm bone bottom bp bracedefaultratio braceinnerangle bracemidangle braceouterangle brg brown bullet bwr byfoci byvertices camerafactor chartreuse circlemarkradiusfactor circlenodesnumberfactor circleprecision circlescale cividis cm codefile codepen codeskip colorPen coloredNodes coloredSegments conditionlength conicnodesfactor cool coolwarm copper 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 deepyellow default defaultControl defaultS defaultbackpen defaultcoordsys defaultexcursion defaultfilename defaultformat defaultmassformat defaultpen defaultseparator differentlengths dot dotfactor dotfilltype dotframe dotted doublelinepen doublelinespacing down duplicateFuzz ellipsenodesnumberfactor eps epsgeo epsilon evenodd expansionfactor extendcap fermionpen figureborder figuremattpen file3 firstnode firststep foregroundcolor fuchsia fuzz gapfactor ghostpen gist_earth gist_ncar gist_stern gluonamplitude gluonpen gluonratio gray green grey hatchepsilon havepagenumber heavyblue heavycyan heavygray heavygreen heavygrey heavymagenta heavyred hline hot hsv hwratio hyperbolanodesnumberfactor identity identity4 ignore implicitshipout inch inches includegraphicscommand inf inferno infinity institutionpen intMax intMin invert invisible itempen itemskip itemstep jet 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 magma magneticRadius mantissaBits markangleradius markangleradiusfactor markanglespace markanglespacefactor maxrefinements 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 nan newbulletcolor ngraph nil nipy_spectral nmesh nobasealign nodeMarginDefault nodesystem nomarker nopoint noprimary nullpath nullpen numarray ocgindex oldbulletcolor olive orange origin overpaint page pageheight pagemargin pagenumberalign pagenumberpen pagenumberposition pagewidth paleblue palecyan palegray palegreen palegrey palemagenta palered paleyellow parabolanodesnumberfactor perpfactor phi photonamplitude photonpen photonratio pi pink plain plain_bounds plain_scaling plasma plus preamblenodes pt purple r3 r4a r4b randMax realDigits realEpsilon realMax realMin red relativesystem reverse right roundcap roundjoin royalblue salmon saveFunctions scalarpen seismic sequencereal settings signedtrailingzero simplex solid spinner spring springgreen sqrtEpsilon squarecap squarepen startposition stdin stdout stepfactor stepfraction steppagenumberpen stepping stickframe stickmarksizefactor stickmarkspacefactor summer swap tab10 tab20 tab20b tab20c textpen ticksize tildeframe tildemarksizefactor tinv titlealign titlepagepen titlepageposition titlepen titleskip top trailingzero treeLevelStep treeMinNodeWidth treeNodeStep trembleAngle trembleFrequency trembleRandom tubegranularity twilight twilight_shifted undefined unitcircle unitsquare up urlpen urlskip version vertexpen vertexsize viewportmargin viewportsize viridis vline white winter wistia wye yellow ylabelwidth zeroTransform zerotickfuzz zerowinding ))
+Accent AliceBlue Align Allow AntiqueWhite Apricot Aqua Aquamarine Aspect Azure BeginPoint Beige Bisque Bittersweet Black BlanchedAlmond Blue BlueGreen BlueViolet Blues Both BrBG Break BrickRed Brown BuGn BuPu BurlyWood BurntOrange CCW CMRmap CW CadetBlue CarnationPink Center Centered Cerulean Chartreuse Chocolate Coeff Coral CornflowerBlue Cornsilk Crimson Crop Cyan Dandelion Dark2 DarkBlue DarkCyan DarkGoldenrod DarkGray DarkGreen DarkKhaki DarkMagenta DarkOliveGreen DarkOrange DarkOrchid DarkRed DarkSalmon DarkSeaGreen DarkSlateBlue DarkSlateGray DarkTurquoise DarkViolet DeepPink DeepSkyBlue DefaultHead DimGray DodgerBlue Dotted Down Draw E ENE EPS ESE E_Euler E_PC E_RK2 E_RK3BS Emerald EndPoint Euler Fill FillDraw FireBrick FloralWhite ForestGreen Fuchsia Gainsboro GhostWhite GnBu Gold Goldenrod Gray Green GreenYellow Greens Greys Honeydew HookHead Horizontal HotPink I IgnoreAspect IndianRed Indigo Infinity Ivory JOIN_IN JOIN_OUT JungleGreen Khaki LM_DWARF LM_MACHEP LM_SQRT_DWARF LM_SQRT_GIANT LM_USERTOL Label Lavender LavenderBlush LawnGreen Left LeftJustified LeftSide LemonChiffon LightBlue LightCoral LightCyan LightGoldenrodYellow LightGreen LightGrey LightPink LightSalmon LightSeaGreen LightSkyBlue LightSlateGray LightSteelBlue LightYellow Lime LimeGreen Linear Linen Log Logarithmic Magenta Mahogany Mark MarkFill MarkPath Maroon Max MediumAquamarine MediumBlue MediumOrchid MediumPurple MediumSeaGreen MediumSlateBlue MediumSpringGreen MediumTurquoise MediumVioletRed Melon MidPoint MidnightBlue Min MintCream MistyRose Moccasin Move MoveQuiet Mulberry N NE NNE NNW NULL_VERTEX NW NavajoWhite Navy NavyBlue NoAlign NoCrop NoFill NoSide OldLace Olive OliveDrab OliveGreen OrRd Orange OrangeRed Oranges Orchid Ox Oy PC PRGn Paired PaleGoldenrod PaleGreen PaleTurquoise PaleVioletRed PapayaWhip Pastel1 Pastel2 Peach PeachPuff Periwinkle Peru PiYG PineGreen Pink Plum PowderBlue ProcessBlue PuBu PuBuGn PuOr PuRd Purple Purples RELEASE RK2 RK3 RK3BS RK4 RK5 RK5DP RK5F RawSienna RdBu RdGy RdPu RdYlBu RdYlGn Red RedOrange RedViolet Reds Rhodamine Right RightJustified RightSide RosyBrown RoyalBlue RoyalPurple RubineRed S SE SSE SSW SW SaddleBrown Salmon SandyBrown SeaGreen Seashell Sepia Set1 Set2 Set3 Sienna Silver SimpleHead SkyBlue SlateBlue SlateGray Snow Spectral SpringGreen SteelBlue Suppress SuppressQuiet Tan TeXHead Teal TealBlue Thistle Ticksize Tomato Turquoise UnFill Up VERSION Value Vertical Violet VioletRed W WNW WSW Wheat White WhiteSmoke WildStrawberry XHIGH XLOW XYAlign YAlign YHIGH YLOW Yellow YellowGreen YellowOrange YlGn YlGnBu YlOrBr YlOrRd ZHIGH ZLOW _outpipe aboveequationskip addpenarc addpenline align allowstepping angularsystem animationdelay appendsuffix arcarrowangle arcarrowfactor arrow2sizelimit arrowangle arrowbarb arrowdir arrowfactor arrowhookfactor arrowlength arrowsizelimit arrowtexfactor authorpen autumn axis axiscoverage axislabelfactor background backgroundcolor backgroundpen barfactor barmarksizefactor basealign baselinetemplate bernstein beveljoin bigvertexpen bigvertexsize binary black blue bm bone bottom bp bracedefaultratio braceinnerangle bracemidangle braceouterangle brg brown bullet bwr byfoci byvertices camerafactor chartreuse circlemarkradiusfactor circlenodesnumberfactor circleprecision circlescale cividis cm codefile codepen codeskip colorPen coloredNodes coloredSegments conditionlength conicnodesfactor cool coolwarm copper 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 deepyellow default defaultControl defaultS defaultbackpen defaultcoordsys defaultexcursion defaultfilename defaultformat defaultmassformat defaultpen defaultseparator differentlengths dot dotfactor dotfilltype dotframe dotted doublelinepen doublelinespacing down duplicateFuzz ellipsenodesnumberfactor eps epsgeo epsilon evenodd expansionfactor extendcap fermionpen figureborder figuremattpen file3 firstnode firststep foregroundcolor fuchsia fuzz gapfactor ghostpen gist_earth gist_ncar gist_stern gluonamplitude gluonpen gluonratio gray green grey hatchepsilon havepagenumber heavyblue heavycyan heavygray heavygreen heavygrey heavymagenta heavyred hline hot hsv hwratio hyperbolanodesnumberfactor identity identity4 ignore implicitshipout inch inches includegraphicscommand inf inferno infinity institutionpen intMax intMin invert invisible itempen itemskip itemstep jet 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 magma magneticRadius mantissaBits markangleradius markangleradiusfactor markanglespace markanglespacefactor maxrefinements 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 nan newbulletcolor ngraph nil nipy_spectral nmesh nobasealign nodeMarginDefault nodesystem nomarker nopoint noprimary nullpath nullpen numarray ocgindex oldbulletcolor olive orange origin overpaint page pageheight pagemargin pagenumberalign pagenumberpen pagenumberposition pagewidth paleblue palecyan palegray palegreen palegrey palemagenta palered paleyellow parabolanodesnumberfactor perpfactor phi photonamplitude photonpen photonratio pi pink plain plain_bounds plain_scaling plasma plus preamblenodes pt purple r3 r4a r4b randMax realDigits realEpsilon realMax realMin red relativesystem reverse right roundcap roundjoin royalblue salmon saveFunctions scalarpen seismic sequencereal settings signedtrailingzero simplex solid spinner spring springgreen sqrtEpsilon squarecap squarepen startposition stdin stdout stepfactor stepfraction steppagenumberpen stepping stickframe stickmarksizefactor stickmarkspacefactor summer swap tab10 tab20 tab20b tab20c textpen ticksize tildeframe tildemarksizefactor tinv titlealign titlepagepen titlepageposition titlepen titleskip top trailingzero treeLevelStep treeMinNodeWidth treeNodeStep trembleAngle trembleFrequency trembleRandom tubegranularity twilight twilight_shifted undefined unitcircle unitsquare up urlpen urlskip version vertexpen vertexsize viewportmargin viewportsize viridis vline white winter wistia wye yellow ylabelwidth zeroTransform zerotickfuzz zerowinding ))
diff --git a/Build/source/utils/asymptote/asy.list b/Build/source/utils/asymptote/asy.list
index f22515923f5..cfca81e8b8b 100644
--- a/Build/source/utils/asymptote/asy.list
+++ b/Build/source/utils/asymptote/asy.list
@@ -8,7 +8,6 @@ string stripdirectory(string s);
real sqrtEpsilon;
string stripextension(string s);
version version;
-void nosetpagesize();
void texpreamble(string s);
pen beveljoin;
string cputimeformat;
@@ -21,7 +20,7 @@ pen heavyblue;
filltype dotfilltype;
pen heavygreen;
pen heavycyan;
-marginT PenMargin(path, pen)(real begin, real end);
+marginT PenMargin(path, pen)(real begin, real end=<default>);
marginT PenMargin(path, pen);
int realDigits;
pen heavymagenta;
@@ -93,6 +92,8 @@ pair N;
bool view();
void usersetting();
pair S;
+real abs2(pair z);
+real abs2(triple v);
void nowarn(string s);
transform rotate(real angle, pair z=<default>);
int quotient(int x, int y);
@@ -374,6 +375,7 @@ transform fixedscaling(picture pic=<default>, pair min, pair max, pen p=<default
pen Symbol(string series=<default>, string shape=<default>);
slice firstcut(path p, path knife);
pen squarecap;
+bool isometry(transform t);
pen squarepen;
pen deepyellow;
real barsize(pen p=<default>);
@@ -383,10 +385,8 @@ bool EndArcArrow(picture, path, pen, marginT(path, pen));
bool EndArcArrow(picture, path, pen, marginT(path, pen))(arrowhead arrowhead=<default>, real size=<default>, real angle=<default>, filltype filltype=<default>, position position=<default>);
void tensorshade(frame f, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[][] p, path[] b=<default>, pair[][] z=<default>, bool copy=<default>);
void tensorshade(picture pic=<default>, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[][] p, path[] b=<default>, pair[][] z=<default>, bool copy=<default>);
-void tensorshade(frame f, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[] p, path b=<default>, pair[] z);
-void tensorshade(picture pic=<default>, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[] p, path b=<default>, pair[] z);
-void tensorshade(frame f, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[] p, path b=<default>);
-void tensorshade(picture pic=<default>, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[] p, path b=<default>);
+void tensorshade(frame f, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[] p, path b=<default>, pair[] z=<default>);
+void tensorshade(picture pic=<default>, path[] g, bool stroke=<default>, pen fillrule=<default>, pen[] p, path b=<default>, pair[] z=<default>);
string[] split(string s, string delimiter=<default>);
void addSaveFunction(void s()());
object embed3(string, frame, string, string, string, light, projection);
@@ -636,8 +636,8 @@ triple[] sequence(triple f(int), int n);
path[] sequence(path f(int), int n);
frame[] sequence(frame f(int), int n);
triple minbezier(triple[][] p, triple b);
-path trim(path g, real begin, real end);
-marginT DotMargin(path, pen)(real begin, real end);
+path trim(path g, real begin, real end=<default>);
+marginT DotMargin(path, pen)(real begin, real end=<default>);
marginT DotMargin(path, pen);
marginT DotMargins(path, pen);
string string(int x);
@@ -731,7 +731,7 @@ pair sqrt(explicit pair z);
string[] spinner;
real[] times(path p, real x);
real[] times(path p, explicit pair z);
-void drawbeziertriangle(frame f, triple[][] p, triple center, bool straight, pen[] p, real opacity, real shininess, real metallic, real fresnel0, pen[] colors, int interaction, bool primitive=<default>);
+void drawbeziertriangle(frame f, triple[][] p, triple center, bool straight, pen[] p, real opacity, real shininess, real metallic, real fresnel0, pen[] colors, int interaction, int digits, bool primitive=<default>);
void Draw(picture pic=<default>, path g, pen p=<default>);
filltype Draw;
void Draw(picture pic=<default>, explicit path[] g, pen p=<default>);
@@ -805,7 +805,7 @@ real inf;
real arctime(path p, real l);
real arctime(path3 p, real dval);
pen palemagenta;
-void draw(frame f, triple[][] p, triple center, bool straight, pen[] p, real opacity, real shininess, real metallic, real fresnel0, pen[] colors, int interaction, bool primitive=<default>);
+void draw(frame f, triple[][] p, triple center, bool straight, pen[] p, real opacity, real shininess, real metallic, real fresnel0, pen[] colors, int interaction, int digits, bool primitive=<default>);
void draw(frame f, triple[] p, real[] knot, real[] weights=<default>, pen p);
void draw(frame f, triple[][] p, real[] uknot, real[] vknot, real[][] weights=<default>, pen[] p, real opacity, real shininess, real metallic, real fresnel0, pen[] colors);
void draw(frame f, triple[] v, int[][] vi, triple[] n, int[][] ni, pen[] p, real opacity, real shininess, real metallic, real fresnel0, pen[] c=<default>, int[][] ci=<default>);
@@ -1197,7 +1197,7 @@ pair project(triple v, real[][] t);
bool prc(string format=<default>);
projection projection(triple camera, triple up=<default>, triple target=<default>, triple normal=<default>, real zoom=<default>, real angle=<default>, pair viewportshift=<default>, bool showtarget=<default>, bool autoadjust=<default>, bool center=<default>, transformation projector(triple camera, triple up, triple target));
void endl(file file);
-marginT TrueMargin(path, pen)(real begin, real end);
+marginT TrueMargin(path, pen)(real begin, real end=<default>);
pair bezier(pair a, pair b, pair c, pair d, real t);
triple bezier(triple a, triple b, triple c, triple d, real t);
pair SSE;
@@ -1812,6 +1812,7 @@ real interp(real a, real b, real t);
pair interp(explicit pair a, explicit pair b, real t);
triple interp(triple a, triple b, real t);
pen interp(pen a, pen b, real t);
+void mapArray(string From, string To);
frame Seascape(frame f);
bool interior(int windingnumber, pen fillrule);
real[] intersect(path p, path q, real fuzz=<default>);
@@ -1824,6 +1825,7 @@ real[][] intersections(path3 p, path3 q, real fuzz=<default>);
real[][] intersections(path3 p, triple[][] p, real fuzz=<default>);
int animate(string args=<default>, string file=<default>, string format=<default>);
void generate_random_backtrace();
+real RELEASE;
pair intersectionpoint(path p, path q, real fuzz=<default>);
pair[] intersectionpoints(path p, path q, real fuzz=<default>);
pair[] intersectionpoints(explicit path[] p, explicit path[] q, real fuzz=<default>);
@@ -1834,6 +1836,7 @@ pen adjust(pen p, real arclength, bool cyclic);
pair Align;
void exit();
real[] uniform(real a, real b, int n);
+void type(string type, string name);
pair viewportsize;
pair viewportmargin;
string VERSION;
@@ -1867,7 +1870,7 @@ pen palegreen;
pen palegrey;
void clip(frame f, path[] g, bool stroke=<default>, pen fillrule=<default>, bool copy=<default>);
void clip(picture pic=<default>, path[] g, bool stroke=<default>, pen fillrule=<default>, bool copy=<default>);
-marginT Margin(path, pen)(real begin, real end);
+marginT Margin(path, pen)(real begin, real end=<default>);
marginT Margin(path, pen);
position Relative(real position);
side Relative(explicit pair align);
@@ -2557,8 +2560,8 @@ line line(explicit side side);
line complementary(explicit line l);
line[] complementary(explicit segment s);
arc complementary(arc a);
-bool between(point M, point O, point N);
point ppoint(arc a, real x);
+bool between(point M, point O, point N);
path fromFocus(conic co, real angle1, real angle2, int n, bool direction);
bool sameside(point M, point N, point O);
bool sameside(point M, point P, line l);
@@ -3012,8 +3015,8 @@ real ScaleY(picture pic=<default>, real y);
void xaxisAt(picture pic=<default>, Label L=<default>, void axis(picture, axisT), real xmin=<default>, real xmax=<default>, pen p=<default>, void ticks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, bool above=<default>, bool opposite=<default>);
void yaxisAt(picture pic=<default>, Label L=<default>, void axis(picture, axisT), real ymin=<default>, real ymax=<default>, pen p=<default>, void ticks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, bool above=<default>, bool opposite=<default>);
void xaxis(picture pic=<default>, Label L=<default>, void axis(picture, axisT)=<default>, real xmin=<default>, real xmax=<default>, pen p=<default>, void ticks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, bool above=<default>);
-void yaxis(picture pic=<default>, Label L=<default>, void axis(picture, axisT)=<default>, real ymin=<default>, real ymax=<default>, pen p=<default>, void ticks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, bool above=<default>, bool autorotate=<default>);
tickvalues generateticks(int sign, Label F=<default>, string ticklabel(real)=<default>, int N, int n=<default>, real Step=<default>, real step=<default>, real Size=<default>, real size=<default>, transform T, pair side, path g, real limit, pen p, ticklocate locate, int[] divisor, bool opposite);
+void yaxis(picture pic=<default>, Label L=<default>, void axis(picture, axisT)=<default>, real ymin=<default>, real ymax=<default>, pen p=<default>, void ticks(frame, transform, Label, pair, path, path, pen, bool(picture, path, pen, marginT(path, pen)), marginT(path, pen), ticklocate, int[], bool opposite=<default>)=<default>, bool arrow(picture, path, pen, marginT(path, pen))=<default>, marginT margin(path, pen)=<default>, bool above=<default>, bool autorotate=<default>);
void checkconditionlength(int x, int y);
real xtrans(transform t, real x);
void Top(picture, axisT)(bool extend=<default>);
@@ -3106,15 +3109,15 @@ void zaxis3At(picture pic=<default>, Label L=<default>, void axis(picture, axisT
void xaxis3(picture pic=<default>, Label L=<default>, void axis(picture, axisT)=<default>, real xmin=<default>, real xmax=<default>, pen p=<default>, void ticks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)=<default>, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>, bool above=<default>);
void yaxis3(picture pic=<default>, Label L=<default>, void axis(picture, axisT)=<default>, real ymin=<default>, real ymax=<default>, pen p=<default>, void ticks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)=<default>, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>, bool above=<default>);
void zaxis3(picture pic=<default>, Label L=<default>, void axis(picture, axisT)=<default>, real zmin=<default>, real zmax=<default>, pen p=<default>, void ticks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)=<default>, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>, bool above=<default>);
-surface surface(triple[][] f, bool[][] cond=<default>);
-surface surface(real[][] f, real[] x, real[] y, real[] xsplinetype(real[], real[])=<default>, real[] ysplinetype(real[], real[])=<default>, bool[][] cond=<default>);
-surface surface(real[][] f, pair a, pair b, real[] xsplinetype(real[], real[]), real[] ysplinetype(real[], real[])=<default>, bool[][] cond=<default>);
-surface surface(real[][] f, pair a, pair b, bool[][] cond=<default>);
-surface surface(triple f(pair z), pair a, pair b, int nu=<default>, int nv=<default>, bool cond(pair z)=<default>);
-surface surface(triple f(pair z), real[] u, real[] v, real[](real[], real[])[] usplinetype, real[](real[], real[])[] vsplinetype=<default>, bool cond(pair z)=<default>);
-surface surface(triple f(pair z), pair a, pair b, int nu=<default>, int nv=<default>, real[](real[], real[])[] usplinetype, real[](real[], real[])[] vsplinetype=<default>, bool cond(pair z)=<default>);
-surface surface(real f(pair z), pair a, pair b, int nx=<default>, int ny=<default>, bool cond(pair z)=<default>);
-surface surface(real f(pair z), pair a, pair b, int nx=<default>, int ny=<default>, real[] xsplinetype(real[], real[]), real[] ysplinetype(real[], real[])=<default>, bool cond(pair z)=<default>);
+surface surface(picture pic=<default>, triple[][] f, bool[][] cond=<default>);
+surface surface(picture pic=<default>, real[][] f, real[] x, real[] y, real[] xsplinetype(real[], real[])=<default>, real[] ysplinetype(real[], real[])=<default>, bool[][] cond=<default>);
+surface surface(picture pic=<default>, real[][] f, pair a, pair b, real[] xsplinetype(real[], real[]), real[] ysplinetype(real[], real[])=<default>, bool[][] cond=<default>);
+surface surface(picture pic=<default>, real[][] f, pair a, pair b, bool[][] cond=<default>);
+surface surface(picture pic=<default>, triple f(pair z), pair a, pair b, int nu=<default>, int nv=<default>, bool cond(pair z)=<default>);
+surface surface(picture pic=<default>, triple f(pair z), real[] u, real[] v, real[](real[], real[])[] usplinetype, real[](real[], real[])[] vsplinetype=<default>, bool cond(pair z)=<default>);
+surface surface(picture pic=<default>, triple f(pair z), pair a, pair b, int nu=<default>, int nv=<default>, real[](real[], real[])[] usplinetype, real[](real[], real[])[] vsplinetype=<default>, bool cond(pair z)=<default>);
+surface surface(picture pic=<default>, real f(pair z), pair a, pair b, int nx=<default>, int ny=<default>, bool cond(pair z)=<default>);
+surface surface(picture pic=<default>, real f(pair z), pair a, pair b, int nx=<default>, int ny=<default>, real[] xsplinetype(real[], real[]), real[] ysplinetype(real[], real[])=<default>, bool cond(pair z)=<default>);
void XYEquals(picture, axisT)(real x, real y, triple align=<default>, bool extend=<default>);
triple Dir(real)(triple dir);
void draw(picture pic=<default>, Label[] L=<default>, void(flatguide3)[][] g, pen[] p, light light=<default>, string name=<default>, render render=<default>, interaction interaction=<default>);
@@ -3126,7 +3129,11 @@ void drawtick(picture pic, real[][] T, path3 g, path3 g2, ticklocate locate, rea
triple tickMin3(picture pic);
triple tickMax3(picture pic);
triple Scale(picture pic=<default>, triple v);
+triple[][] Scale(picture pic=<default>, triple[][] P);
+real ScaleX(picture pic=<default>, real x);
+real ScaleY(picture pic=<default>, real y);
real ScaleZ(picture pic=<default>, real z);
+real[][] ScaleZ(picture pic=<default>, real[][] P);
picture vectorfield(path3 vector(pair v), triple f(pair z), pair a, pair b, int nu=<default>, int nv=<default>, bool truesize=<default>, real maxlength=<default>, bool cond(pair z)=<default>, pen p=<default>, bool arrow(picture, path3, material, marginT3(path3, pen), light, light)=<default>, marginT3 margin(path3, pen)=<default>, string name=<default>, render render=<default>);
path3 Circle(triple c, real r, triple normal=<default>, int n=<default>);
void InTicks(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)(Label format=<default>, string ticklabel(real)=<default>, bool beginlabel=<default>, bool endlabel=<default>, int N=<default>, int n=<default>, real Step=<default>, real step=<default>, bool begin=<default>, bool end=<default>, tickvalues modify(tickvalues)=<default>, real Size=<default>, real size=<default>, bool extend=<default>, pen pTick=<default>, pen ptick=<default>);
@@ -3179,6 +3186,7 @@ void tick(picture pic=<default>, Label L, real value, triple v, triple dir, stri
surface bispline(real[][] z, real[][] p, real[][] q, real[][] r, real[] x, real[] y, bool[][] cond=<default>);
real[][][] bispline(real[][] f, real[] x, real[] y, real[] xsplinetype(real[], real[])=<default>, real[] ysplinetype(real[], real[])=<default>, bool[][] cond=<default>);
real[][][] bispline0(real[][] z, real[][] p, real[][] q, real[][] r, real[] x, real[] y, bool[][] cond=<default>);
+real[] uniform(real T(real x), real Tinv(real x), real a, real b, int n);
void NoTicks3(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>)();
void NoTicks3(picture, real[][], Label, path3, path3, pen, bool(picture, path3, material, marginT3(path3, pen), light, light), marginT3(path3, pen), ticklocate, int[], bool opposite=<default>, bool primary=<default>);
bool Crop;
@@ -3304,6 +3312,7 @@ real LM_USERTOL;
real LM_DWARF;
void lm_print_quiet(int n_par, real[] par, int m_dat, real[] fvec, lm_data_type data, int iflag, int iter, int nfev);
void lm_print_default(int n_par, real[] par, int m_dat, real[] fvec, lm_data_type data, int iflag, int iter, int nfev);
+void mapTemplate(string name, string key, string value, string default);
real barmarksize(pen p=<default>);
real barmarksizefactor;
marker CrossIntervalMarker(int i=<default>, int n=<default>, real size=<default>, real space=<default>, real angle=<default>, pair offset=<default>, bool rotated=<default>, pen p=<default>, frame uniform=<default>, bool above=<default>);
@@ -3504,9 +3513,9 @@ int lcm(int m, int n);
rational max(rational a, rational b);
rational max(rational[] a);
simplex operator init();
+void simplexInit(rational[] c, rational[][] A, int[] s=<default>, rational[] b, int count);
void simplexPhase1(rational[] c, rational[][] A, rational[] b, int[] Bindices);
void simplexTableau(rational[][] E, int[] Bindices, int I=<default>, int J=<default>);
-void simplexStandard(rational[] c, rational[][] A, int[] s=<default>, rational[] b);
void simplexPhase2();
void simplexWrite(rational[][] E, int[] Bindices, int, int);
path roundedpath(path A, real R, real S=<default>);
@@ -3555,11 +3564,11 @@ void background();
pen backgroundcolor;
void normalvideo();
void title(string s, pair position=<default>, pair align=<default>, pen p=<default>, bool newslide=<default>);
-pen authorpen;
pen titlepen;
real titleskip;
pair dateskip;
pair titlealign;
+pen authorpen;
pen titlepagepen;
void titlepage(string title, string author, string institution=<default>, string date=<default>, string url=<default>, bool newslide=<default>);
pair titlepageposition;
@@ -3572,9 +3581,9 @@ void code(bool center=<default>, string s, pen p=<default>, real indent=<default
transform tinv;
pair urlskip;
void numberpage(pen p=<default>);
+pen urlpen;
bool allowstepping;
pair currentposition;
-pen urlpen;
int[] firstnode;
bool firststep;
string asywrite(string s, string preamble=<default>);
@@ -3717,8 +3726,8 @@ Relation r4b;
Component wye;
pair max(pair[] z);
real hwratio;
-pen WildStrawberry;
pen Orchid;
+pen WildStrawberry;
pen Magenta;
pen BrickRed;
pen CadetBlue;
@@ -3744,8 +3753,8 @@ pen ForestGreen;
pen BurntOrange;
pen Tan;
pen Aquamarine;
-pen Lavender;
pen Brown;
+pen Lavender;
pen RubineRed;
pen TealBlue;
pen White;
@@ -3762,8 +3771,8 @@ pen NavyBlue;
pen Rhodamine;
pen YellowOrange;
pen Maroon;
-pen YellowGreen;
pen ProcessBlue;
+pen YellowGreen;
pen LimeGreen;
pen Green;
pen GreenYellow;
@@ -3778,8 +3787,8 @@ pen Violet;
pen Periwinkle;
pen Thistle;
pen Yellow;
-pen DarkOrchid;
pen JungleGreen;
+pen DarkOrchid;
pen CornflowerBlue;
pen RoyalBlue;
pen Melon;
@@ -3812,33 +3821,32 @@ real degrees(rmf a, rmf b);
string VERSION;
pen Orchid;
pen Indigo;
-pen Seashell;
pen Beige;
pen SlateBlue;
pen SlateGray;
pen Magenta;
-pen GhostWhite;
pen CadetBlue;
pen DeepPink;
+pen LavenderBlush;
+pen Wheat;
pen SpringGreen;
pen MidnightBlue;
+pen PeachPuff;
pen Olive;
pen OliveDrab;
pen Salmon;
-pen LavenderBlush;
-pen Wheat;
+pen Lime;
+pen SteelBlue;
pen Chocolate;
pen Cyan;
pen Gainsboro;
pen Ivory;
-pen PeachPuff;
pen PapayaWhip;
pen Red;
pen Pink;
pen MintCream;
pen DarkTurquoise;
-pen Lime;
-pen SteelBlue;
+pen LemonChiffon;
pen Gray;
pen MediumBlue;
pen MediumOrchid;
@@ -3850,6 +3858,7 @@ pen MediumSpringGreen;
pen MediumTurquoise;
pen MediumVioletRed;
pen Plum;
+pen Aqua;
pen Blue;
pen Gold;
pen BlueViolet;
@@ -3857,18 +3866,16 @@ pen Goldenrod;
pen ForestGreen;
pen Chartreuse;
pen NavajoWhite;
-pen LemonChiffon;
pen Tan;
pen DarkMagenta;
pen AntiqueWhite;
-pen Aquamarine;
pen PaleTurquoise;
-pen Aqua;
+pen Aquamarine;
pen IndianRed;
pen Crimson;
-pen Lavender;
pen Azure;
pen LawnGreen;
+pen Lavender;
pen Brown;
pen BurlyWood;
pen Moccasin;
@@ -3877,6 +3884,7 @@ pen Peru;
pen White;
pen Purple;
pen WhiteSmoke;
+pen Sienna;
pen DimGray;
pen Orange;
pen OrangeRed;
@@ -3884,27 +3892,28 @@ pen Fuchsia;
pen Honeydew;
pen Bisque;
pen RosyBrown;
-pen Sienna;
pen Black;
pen Khaki;
pen FireBrick;
+pen DarkOliveGreen;
+pen DarkOrange;
pen Snow;
pen Maroon;
pen YellowGreen;
pen LimeGreen;
+pen Silver;
pen OldLace;
-pen DarkOliveGreen;
-pen DarkOrange;
pen Green;
pen GreenYellow;
pen DarkCyan;
pen FloralWhite;
pen DarkRed;
-pen Silver;
+pen SandyBrown;
pen BlanchedAlmond;
pen PowderBlue;
pen DarkGray;
pen DarkGreen;
+pen DeepSkyBlue;
pen DarkGoldenrod;
pen SkyBlue;
pen SeaGreen;
@@ -3912,13 +3921,12 @@ pen DarkViolet;
pen Teal;
pen Violet;
pen AliceBlue;
-pen SandyBrown;
pen HotPink;
pen DodgerBlue;
pen SaddleBrown;
pen Tomato;
pen DarkKhaki;
-pen DeepSkyBlue;
+pen Cornsilk;
pen Thistle;
pen LightBlue;
pen LightCoral;
@@ -3936,8 +3944,8 @@ pen LightSeaGreen;
pen Navy;
pen LightSkyBlue;
pen PaleVioletRed;
+pen Seashell;
pen DarkOrchid;
-pen Cornsilk;
pen CornflowerBlue;
pen LightSlateGray;
pen LightSteelBlue;
@@ -3945,6 +3953,7 @@ pen rgbint(int r, int g, int b);
pen LightYellow;
pen Coral;
pen MistyRose;
+pen GhostWhite;
pen DarkSalmon;
pen DarkSeaGreen;
pen RoyalBlue;
diff --git a/Build/source/utils/asymptote/asymptote.nsi b/Build/source/utils/asymptote/asymptote.nsi
index c9afcdb8b4a..ffa5c89e25d 100644
--- a/Build/source/utils/asymptote/asymptote.nsi
+++ b/Build/source/utils/asymptote/asymptote.nsi
@@ -1,6 +1,6 @@
!define PRODUCT_NAME "Asymptote"
!include AsymptoteInstallInfo.nsi
-!define PRODUCT_WEB_SITE "http://asymptote.sourceforge.net/"
+!define PRODUCT_WEB_SITE "https://asymptote.sourceforge.io/"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\Asymptote"
!define PRODUCT_FILE_TYPE_REGKEY1 "Software\Classes\.asy"
!define PRODUCT_FILE_TYPE_REGKEY2 "Software\Classes\ASYFile\shell\open\command"
diff --git a/Build/source/utils/asymptote/asymptote.spec b/Build/source/utils/asymptote/asymptote.spec
index c481752d32e..aec82a31997 100644
--- a/Build/source/utils/asymptote/asymptote.spec
+++ b/Build/source/utils/asymptote/asymptote.spec
@@ -3,13 +3,13 @@
%global __python %{__python3}
Name: asymptote
-Version: 2.65
+Version: 2.68
Release: 1%{?dist}
Summary: Descriptive vector graphics language
Group: Applications/Publishing
License: GPL
-URL: http://asymptote.sourceforge.net/
+URL: https://asymptote.sourceforge.io/
Source: http://downloads.sourceforge.net/sourceforge/asymptote/asymptote-%{version}.src.tgz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -20,9 +20,11 @@ BuildRequires: gc-devel >= 6.7
BuildRequires: gsl-devel
BuildRequires: glm-devel
BuildRequires: tetex-latex
-BuildRequires: ghostscript >= 9.14
+BuildRequires: ghostscript >= 9.52
+BuildRequires: dvisvgm >= 2.9.1
BuildRequires: texinfo >= 4.7
BuildRequires: ImageMagick
+BuildRequires: libtirpc-devel
Requires: tetex-latex
Requires: freeglut-devel >= 3.0.0
diff --git a/Build/source/utils/asymptote/base/animation.asy b/Build/source/utils/asymptote/base/animation.asy
index f12ee75f2ba..1ce89c60e6e 100644
--- a/Build/source/utils/asymptote/base/animation.asy
+++ b/Build/source/utils/asymptote/base/animation.asy
@@ -30,14 +30,14 @@ struct animation {
string prefix;
bool global; // If true, use a global scaling for all frames; this requires
// extra memory since the actual shipout is deferred until all frames have
- // been generated.
+ // been generated.
void operator init(string prefix="", bool global=true) {
prefix=replace(stripdirectory(outprefix(prefix))," ","_");
this.prefix=prefix;
this.global=global;
}
-
+
string basename(string prefix=stripextension(prefix)) {
return "_"+prefix;
}
@@ -57,14 +57,14 @@ struct animation {
plain.shipout(name,f,format=format,view=false);
files.push(name+"."+format);
}
-
+
void add(picture pic=currentpicture, enclosure enclosure=NoBox) {
if(global) {
++index;
pictures.push(pic.copy());
} else this.shipout(enclosure(pic.fit()));
}
-
+
void purge(bool keep=settings.keep) {
if(!keep) {
for(int i=0; i < files.length; ++i)
@@ -130,7 +130,7 @@ struct animation {
return s;
}
- bool pdflatex()
+ bool pdflatex()
{
return latex() && pdf();
}
@@ -143,13 +143,13 @@ struct animation {
if(!pdflatex())
abort("inline pdf animations require -tex pdflatex or -tex xelatex");
if(settings.outformat != "") settings.outformat="pdf";
-
+
string filename=basename();
string pdfname=filename+".pdf";
if(global)
export(filename,enclosure,multipage=multipage);
-
+
if(!keep) {
exitfcn currentexitfunction=atexit();
void exitfunction() {
diff --git a/Build/source/utils/asymptote/base/asy-mode.el b/Build/source/utils/asymptote/base/asy-mode.el
index c1960e23035..ec3a3746d74 100644
--- a/Build/source/utils/asymptote/base/asy-mode.el
+++ b/Build/source/utils/asymptote/base/asy-mode.el
@@ -102,7 +102,7 @@ This package has been tested in:
This package seems to work with XEmacs 21.4 but not all the features are available (in particular syntax highlighting).
-Report bugs to http://asymptote.sourceforge.net
+Report bugs to https://github.com/vectorgraphics/asymptote/issues
Some variables can be customized: M-x customize-group <RET> asymptote <RET>."
diff --git a/Build/source/utils/asymptote/base/babel.asy b/Build/source/utils/asymptote/base/babel.asy
index e93dec2a5cb..ada173c8a96 100644
--- a/Build/source/utils/asymptote/base/babel.asy
+++ b/Build/source/utils/asymptote/base/babel.asy
@@ -1,4 +1,4 @@
-void babel(string s)
+void babel(string s)
{
usepackage("babel",s);
}
diff --git a/Build/source/utils/asymptote/base/bezulate.asy b/Build/source/utils/asymptote/base/bezulate.asy
index 38d35718d4a..756ee00ac31 100644
--- a/Build/source/utils/asymptote/base/bezulate.asy
+++ b/Build/source/utils/asymptote/base/bezulate.asy
@@ -106,29 +106,29 @@ void connect(path[] paths, path[] result, path[] patch)
//if(direction == 0) // Try a random direction
// direction=expi(2pi*unitrand());
//pair start=point(inners[curveIndex],0);
-
+
// find shortest distance between a node on the inner curve and a node
// on the outer curve
-
+
real mindist = d;
int inner_i = 0;
int outer_i = 0;
for(int ni = 0; ni < length(inners[curveIndex]); ++ni)
- {
+ {
for(int no = 0; no < length(outer); ++no)
- {
+ {
real dist = abs(point(inners[curveIndex],ni)-point(outer,no));
if(dist < mindist)
- {
+ {
inner_i = ni;
outer_i = no;
mindist = dist;
- }
- }
- }
+ }
+ }
+ }
pair start=point(inners[curveIndex],inner_i);
- pair end = point(outer,outer_i);
-
+ pair end = point(outer,outer_i);
+
// find first intersection of line segment with outer curve
//real[][] ints=intersections(start,start+d*direction,outer);
real[][] ints=intersections(start,end,outer);
@@ -140,7 +140,7 @@ void connect(path[] paths, path[] result, path[] patch)
real earliestTime=1;
for(int j=0; j < inners.length; ++j) {
real[][] ints=intersections(end,start,inners[j]);
-
+
if(ints.length > 0 && ints[0][0] < earliestTime) {
earliestTime=ints[0][0]; // time on end--start
starttime=ints[0][1]; // time on inner curve
@@ -148,8 +148,8 @@ void connect(path[] paths, path[] result, path[] patch)
}
}
start=point(inners[curveIndex],starttime);
-
-
+
+
bool found_forward = false;
real timeoffset_forward = 2;
path portion_forward;
@@ -162,7 +162,7 @@ void connect(path[] paths, path[] result, path[] patch)
point(outer,endtime+timeoffset_forward)) == 2)
{
portion_forward = subpath(outer,endtime,endtime+timeoffset_forward)--start--cycle;
-
+
found_forward=true;
// check if an inner curve is inside the portion
for(int k = 0; found_forward && k < inners.length; ++k)
@@ -173,7 +173,7 @@ void connect(path[] paths, path[] result, path[] patch)
}
}
}
-
+
bool found_backward = false;
real timeoffset_backward = -2;
path portion_backward;
@@ -197,29 +197,29 @@ void connect(path[] paths, path[] result, path[] patch)
real timeoffset;
path portion;
if(found_forward && !found_backward)
- {
- timeoffset = timeoffset_forward;
- portion = portion_forward;
- }
- else if(found_backward && !found_forward)
- {
- timeoffset = timeoffset_backward;
- portion = portion_backward;
- }
- else // assert handles case of neither found
- {
- if(timeoffset_forward > -timeoffset_backward)
{
timeoffset = timeoffset_forward;
portion = portion_forward;
}
- else
+ else if(found_backward && !found_forward)
{
timeoffset = timeoffset_backward;
portion = portion_backward;
- }
- }
-
+ }
+ else // assert handles case of neither found
+ {
+ if(timeoffset_forward > -timeoffset_backward)
+ {
+ timeoffset = timeoffset_forward;
+ portion = portion_forward;
+ }
+ else
+ {
+ timeoffset = timeoffset_backward;
+ portion = portion_backward;
+ }
+ }
+
endtime=min(endtime,endtime+timeoffset);
// or go from timeoffset+timeoffset_backward to timeoffset+timeoffset_forward?
timeoffset=abs(timeoffset);
diff --git a/Build/source/utils/asymptote/base/binarytree.asy b/Build/source/utils/asymptote/base/binarytree.asy
index 31e0e3aab61..4906c6ee58d 100644
--- a/Build/source/utils/asymptote/base/binarytree.asy
+++ b/Build/source/utils/asymptote/base/binarytree.asy
@@ -48,8 +48,8 @@ struct binarytreeNode {
int right_span,total_right_span;
void update_spans();
- // Get the horizontal span of the tree consisting of the current
- // node plus the whole subtree that is rooted at the right child
+ // Get the horizontal span of the tree consisting of the current
+ // node plus the whole subtree that is rooted at the right child
// (condensed mode)
int getTotalRightSpan() {
if(spans_calculated == false) {
@@ -59,8 +59,8 @@ struct binarytreeNode {
return total_right_span;
}
- // Get the horizontal span of the tree consisting of the current
- // node plus the whole subtree that is rooted at the left child
+ // Get the horizontal span of the tree consisting of the current
+ // node plus the whole subtree that is rooted at the left child
// (condensed mode)
int getTotalLeftSpan() {
if(spans_calculated == false) {
@@ -87,27 +87,27 @@ struct binarytreeNode {
return left_span;
}
- // Update all span figures for this node.
+ // Update all span figures for this node.
// condensed mode)
update_spans=new void() {
- if(spans_calculated == true)
- return;
-
- left_span=0;
- total_left_span=0;
- right_span=0;
- total_right_span=0;
-
- if(left != null) {
- left_span=left.getTotalRightSpan()+1;
- total_left_span=left_span+left.getTotalLeftSpan();
- }
-
- if(right != null) {
- right_span=right.getTotalLeftSpan()+1;
- total_right_span=right_span+right.getTotalRightSpan();
- }
- spans_calculated=true;
+ if(spans_calculated == true)
+ return;
+
+ left_span=0;
+ total_left_span=0;
+ right_span=0;
+ total_right_span=0;
+
+ if(left != null) {
+ left_span=left.getTotalRightSpan()+1;
+ total_left_span=left_span+left.getTotalLeftSpan();
+ }
+
+ if(right != null) {
+ right_span=right.getTotalLeftSpan()+1;
+ total_right_span=right_span+right.getTotalRightSpan();
+ }
+ spans_calculated=true;
};
// set the left child of this node
@@ -134,20 +134,20 @@ struct binarytreeNode {
else
return parent.getLevel()+1;
}
-
+
// set the children of this binarytreeNode
void setChildren(binarytreeNode left, binarytreeNode right) {
setLeft(left);
setRight(right);
}
-
- // create a new binarytreeNode with key <key>
+
+ // create a new binarytreeNode with key <key>
static binarytreeNode binarytreeNode(int key) {
binarytreeNode toReturn=new binarytreeNode;
toReturn.key=key;
return toReturn;
}
-
+
// returns the height of the subtree rooted at this node.
int getHeight() {
if(left == null && right == null)
@@ -156,7 +156,7 @@ struct binarytreeNode {
return right.getHeight()+1;
if(right == null)
return left.getHeight()+1;
-
+
return max(left.getHeight(),right.getHeight())+1;
}
}
@@ -175,12 +175,12 @@ object draw(picture pic=currentpicture, binarytreeNode node, pair pos,
int height, real minDist, real levelDist, real nodeDiameter,
pen p=currentpen, bool condensed=false) {
Label label=Label(math((string) node.key),pos);
-
- binarytreeNode left=node.left;
+
+ binarytreeNode left=node.left;
binarytreeNode right=node.right;
// return the distance for two nodes at the given <level> when the
- // containing tree has height <height>
+ // containing tree has height <height>
// and the minimal distance between two nodes is <minDist> .
real getDistance(int level, int height, real minDist) {
return(nodeDiameter+minDist)*2^(height-level);
@@ -205,15 +205,15 @@ object draw(picture pic=currentpicture, binarytreeNode node, pair pos,
// arrow.
void deferredDrawNodeConnection(pair parentPos, pair childPos) {
pic.add(new void(frame f, transform t) {
- pair start,end;
- // calculate connection path
- transform T=shift(nodeDiameter/2*unit(t*childPos-t*parentPos));
- path arr=(T*t*parentPos)--(inverse(T)*t*childPos);
- draw(f,PenMargin(arr,p).g,p,Arrow(5));
- });
+ pair start,end;
+ // calculate connection path
+ transform T=shift(nodeDiameter/2*unit(t*childPos-t*parentPos));
+ path arr=(T*t*parentPos)--(inverse(T)*t*childPos);
+ draw(f,PenMargin(arr,p).g,p,Arrow(5));
+ });
pic.addPoint(parentPos);
pic.addPoint(childPos);
- }
+ }
if(left != null) {
pair childPos;
@@ -238,13 +238,13 @@ object draw(picture pic=currentpicture, binarytreeNode node, pair pos,
draw(pic,right,childPos,height,minDist,levelDist,nodeDiameter,p,condensed);
deferredDrawNodeConnection(pos,childPos);
}
-
+
picture obj;
draw(obj,circle((0,0),nodeDiameter/2),p);
label(obj,label,(0,0),p);
-
+
add(pic,obj,pos);
-
+
return label;
}
@@ -270,18 +270,18 @@ key nil=key(0,false);
struct binarytree {
binarytreeNode root;
int[] keys;
-
+
// add the given <key> to the tree by searching for its place and
// inserting it there.
void addKey(int key) {
binarytreeNode newNode=binarytreeNode(key);
-
+
if(root == null) {
root=newNode;
keys.push(key);
- return;
+ return;
}
-
+
binarytreeNode n=root;
while(n != null) {
if(key < n.key) {
@@ -303,7 +303,7 @@ struct binarytree {
}
}
}
-
+
// return the height of the tree
int getHeight() {
if(root == null)
@@ -311,7 +311,7 @@ struct binarytree {
else
return root.getHeight();
}
-
+
// add all given keys to the tree sequentially
void addSearchKeys(int[] keys) {
for(int i=0; i < keys.length; ++i) {
@@ -321,7 +321,7 @@ struct binarytree {
addKey(key);
}
}
-
+
binarytreeNode build(key[] keys, int[] ind) {
if(ind[0] >= keys.length) return null;
key k=keys[ind[0]];
@@ -369,9 +369,9 @@ void draw(picture pic=currentpicture, binarytree tree,
pen p=currentpen, bool condensed=false)
{
int[] keys=tree.getKeys();
-
+
// calculate the node diameter so that all keys fit into it
- frame f;
+ frame f;
for(int i=0; i < keys.length; ++i)
label(f,math(string(keys[i])),p);
diff --git a/Build/source/utils/asymptote/base/bsp.asy b/Build/source/utils/asymptote/base/bsp.asy
index cf9d7e0781f..526f264a772 100644
--- a/Build/source/utils/asymptote/base/bsp.asy
+++ b/Build/source/utils/asymptote/base/bsp.asy
@@ -33,13 +33,13 @@ struct face {
picture operator cast(face f) {return f.pic;}
face operator cast(path3 p) {return face(p);}
-
+
struct line {
triple point;
triple dir;
}
-private line intersection(face a, face b)
+private line intersection(face a, face b)
{
line L;
L.point=intersectionpoint(a.normal,a.point,b.normal,b.point);
@@ -49,12 +49,12 @@ private line intersection(face a, face b)
struct half {
pair[] left,right;
-
+
// Sort the points in the pair array z according to whether they lie on the
// left or right side of the line L in the direction dir passing through P.
// Points exactly on L are considered to be on the right side.
// Also push any points of intersection of L with the path operator --(... z)
- // onto each of the arrays left and right.
+ // onto each of the arrays left and right.
void operator init(pair dir, pair P ... pair[] z) {
pair lastz;
pair invdir=dir != 0 ? 1/dir : 0;
@@ -73,7 +73,7 @@ struct half {
}
}
}
-
+
struct splitface {
face back,front;
}
@@ -84,7 +84,7 @@ splitface split(face a, face cut, projection P)
splitface S;
void nointersection() {
- if(abs(dot(a.point-P.camera,a.normal)) >=
+ if(abs(dot(a.point-P.camera,a.normal)) >=
abs(dot(cut.point-P.camera,cut.normal))) {
S.back=a;
S.front=null;
@@ -113,7 +113,7 @@ splitface split(face a, face cut, projection P)
nointersection();
return S;
}
-
+
pair point=a.t*project(L.point,P);
pair dir=a.t*project(L.point+L.dir,P)-point;
pair invdir=dir != 0 ? 1/dir : 0;
@@ -122,7 +122,7 @@ splitface split(face a, face cut, projection P)
real t=intersect(apoint,P.camera,cut.normal,cut.point);
bool rightfront=left ^ (t <= 0 || t >= 1);
-
+
face back=a, front=a.copy();
pair max=max(a.fit);
pair min=min(a.fit);
@@ -151,7 +151,7 @@ struct bsp
bsp back;
bsp front;
face node;
-
+
// Construct the bsp.
void operator init(face[] faces, projection P) {
if(faces.length != 0) {
@@ -166,7 +166,7 @@ struct bsp
this.back=bsp(back,P);
}
}
-
+
// Draw from back to front.
void add(frame f) {
if(back != null) back.add(f);
@@ -183,22 +183,22 @@ void add(picture pic=currentpicture, face[] faces,
face[] Faces=new face[n];
for(int i=0; i < n; ++i)
Faces[i]=faces[i].copy();
-
+
pic.add(new void (frame f, transform t, transform T,
- pair m, pair M) {
- // Fit all of the pictures so we know their exact sizes.
- face[] faces=new face[n];
- for(int i=0; i < n; ++i) {
- faces[i]=Faces[i].copy();
- face F=faces[i];
- F.t=t*T*F.pic.T;
- F.fit=F.pic.fit(t,T*F.pic.T,m,M);
- }
-
- bsp bsp=bsp(faces,P);
- if(bsp != null) bsp.add(f);
+ pair m, pair M) {
+ // Fit all of the pictures so we know their exact sizes.
+ face[] faces=new face[n];
+ for(int i=0; i < n; ++i) {
+ faces[i]=Faces[i].copy();
+ face F=faces[i];
+ F.t=t*T*F.pic.T;
+ F.fit=F.pic.fit(t,T*F.pic.T,m,M);
+ }
+
+ bsp bsp=bsp(faces,P);
+ if(bsp != null) bsp.add(f);
});
-
+
for(int i=0; i < n; ++i) {
picture F=Faces[i].pic;
pic.userBox3(F.userMin3(), F.userMax3());
diff --git a/Build/source/utils/asymptote/base/colormap.asy b/Build/source/utils/asymptote/base/colormap.asy
index 4b2242d6615..8ab4e420d1f 100644
--- a/Build/source/utils/asymptote/base/colormap.asy
+++ b/Build/source/utils/asymptote/base/colormap.asy
@@ -10,7 +10,7 @@
// pen[] Palette = wistia.palette()
//
// There are two types of palettes. For a complete list see below:
-//
+//
// 1) The segmented palettes can be used as
// <name>.palette(int NColors=256, real gamma=1.)
// NColors are the number of colors in the palette
@@ -19,7 +19,7 @@
// 2) The listed palettes can only be used as
// <name>.palette()
//
-// Both functions return pen[] that can be used as a palette in the
+// Both functions return pen[] that can be used as a palette in the
// module palette.
// list of palettes
@@ -112,7 +112,7 @@
// SOURCE CODE
//
private real[] makeMappingArray(int N, triple[] data, real gamma=1.) {
- real[] x;
+ real[] x;
real[] y0;
real[] y1;
@@ -121,13 +121,13 @@ private real[] makeMappingArray(int N, triple[] data, real gamma=1.) {
y0.push(data[i].y);
y1.push(data[i].z);
};
-
+
x = x*(N-1);
- real[] lut = new real[N];
+ real[] lut = new real[N];
real[] xind = (N - 1) * uniform(0, 1, N-1) ** gamma;
int[] ind = map(new int(real xi) {return search(x, xi);}, xind);
ind = ind[1:N-1]; // note that the index is shifted from python
-
+
real[] dist = (xind[1:N-1] - x[ind])/(x[ind+1] - x[ind]);
lut[1:N-1] = dist * (y0[ind+1] - y1[ind]) + y1[ind];
@@ -153,9 +153,9 @@ struct seg_data {
real[] green = makeMappingArray(NColors, this.g, gamma);
real[] blue = makeMappingArray(NColors, this.b, gamma);
- pen[] pal =
- sequence(new pen(int i) {return rgb(red[i], green[i], blue[i]);},
- NColors);
+ pen[] pal =
+ sequence(new pen(int i) {return rgb(red[i], green[i], blue[i]);},
+ NColors);
return pal;
}
@@ -174,3717 +174,3717 @@ struct list_data {
// DATA
//
list_data Accent = list_data(new pen[] {
- rgb (0.4980392156862745, 0.788235294117647, 0.4980392156862745) ,
- rgb (0.7450980392156863, 0.6823529411764706, 0.8313725490196079) ,
- rgb (0.9921568627450981, 0.7529411764705882, 0.5254901960784314) ,
- rgb (1.0, 1.0, 0.6) ,
- rgb (0.2196078431372549, 0.4235294117647059, 0.6901960784313725) ,
- rgb (0.9411764705882353, 0.00784313725490196, 0.4980392156862745) ,
- rgb (0.7490196078431373, 0.3568627450980392, 0.09019607843137253) ,
- rgb (0.4, 0.4, 0.4)
-});
+ rgb (0.4980392156862745, 0.788235294117647, 0.4980392156862745) ,
+ rgb (0.7450980392156863, 0.6823529411764706, 0.8313725490196079) ,
+ rgb (0.9921568627450981, 0.7529411764705882, 0.5254901960784314) ,
+ rgb (1.0, 1.0, 0.6) ,
+ rgb (0.2196078431372549, 0.4235294117647059, 0.6901960784313725) ,
+ rgb (0.9411764705882353, 0.00784313725490196, 0.4980392156862745) ,
+ rgb (0.7490196078431373, 0.3568627450980392, 0.09019607843137253) ,
+ rgb (0.4, 0.4, 0.4)
+ });
list_data Blues = list_data(new pen[] {
- rgb (0.9686274509803922, 0.984313725490196, 1.0) ,
- rgb (0.8705882352941177, 0.9215686274509803, 0.9686274509803922) ,
- rgb (0.7764705882352941, 0.8588235294117647, 0.9372549019607843) ,
- rgb (0.6196078431372549, 0.792156862745098, 0.8823529411764706) ,
- rgb (0.4196078431372549, 0.6823529411764706, 0.8392156862745098) ,
- rgb (0.25882352941176473, 0.5725490196078431, 0.7764705882352941) ,
- rgb (0.12941176470588237, 0.44313725490196076, 0.7098039215686275) ,
- rgb (0.03137254901960784, 0.3176470588235294, 0.611764705882353) ,
- rgb (0.03137254901960784, 0.18823529411764706, 0.4196078431372549)
-});
+ rgb (0.9686274509803922, 0.984313725490196, 1.0) ,
+ rgb (0.8705882352941177, 0.9215686274509803, 0.9686274509803922) ,
+ rgb (0.7764705882352941, 0.8588235294117647, 0.9372549019607843) ,
+ rgb (0.6196078431372549, 0.792156862745098, 0.8823529411764706) ,
+ rgb (0.4196078431372549, 0.6823529411764706, 0.8392156862745098) ,
+ rgb (0.25882352941176473, 0.5725490196078431, 0.7764705882352941) ,
+ rgb (0.12941176470588237, 0.44313725490196076, 0.7098039215686275) ,
+ rgb (0.03137254901960784, 0.3176470588235294, 0.611764705882353) ,
+ rgb (0.03137254901960784, 0.18823529411764706, 0.4196078431372549)
+ });
list_data BrBG = list_data(new pen[] {
- rgb (0.32941176470588235, 0.18823529411764706, 0.0196078431372549) ,
- rgb (0.5490196078431373, 0.3176470588235294, 0.0392156862745098) ,
- rgb (0.7490196078431373, 0.5058823529411764, 0.17647058823529413) ,
- rgb (0.8745098039215686, 0.7607843137254902, 0.49019607843137253) ,
- rgb (0.9647058823529412, 0.9098039215686274, 0.7647058823529411) ,
- rgb (0.9607843137254902, 0.9607843137254902, 0.9607843137254902) ,
- rgb (0.7803921568627451, 0.9176470588235294, 0.8980392156862745) ,
- rgb (0.5019607843137255, 0.803921568627451, 0.7568627450980392) ,
- rgb (0.20784313725490197, 0.592156862745098, 0.5607843137254902) ,
- rgb (0.00392156862745098, 0.4, 0.3686274509803922) ,
- rgb (0.0, 0.23529411764705882, 0.18823529411764706)
-});
+ rgb (0.32941176470588235, 0.18823529411764706, 0.0196078431372549) ,
+ rgb (0.5490196078431373, 0.3176470588235294, 0.0392156862745098) ,
+ rgb (0.7490196078431373, 0.5058823529411764, 0.17647058823529413) ,
+ rgb (0.8745098039215686, 0.7607843137254902, 0.49019607843137253) ,
+ rgb (0.9647058823529412, 0.9098039215686274, 0.7647058823529411) ,
+ rgb (0.9607843137254902, 0.9607843137254902, 0.9607843137254902) ,
+ rgb (0.7803921568627451, 0.9176470588235294, 0.8980392156862745) ,
+ rgb (0.5019607843137255, 0.803921568627451, 0.7568627450980392) ,
+ rgb (0.20784313725490197, 0.592156862745098, 0.5607843137254902) ,
+ rgb (0.00392156862745098, 0.4, 0.3686274509803922) ,
+ rgb (0.0, 0.23529411764705882, 0.18823529411764706)
+ });
list_data BuGn = list_data(new pen[] {
- rgb (0.9686274509803922, 0.9882352941176471, 0.9921568627450981) ,
- rgb (0.8980392156862745, 0.9607843137254902, 0.9764705882352941) ,
- rgb (0.8, 0.9254901960784314, 0.9019607843137255) ,
- rgb (0.6, 0.8470588235294118, 0.788235294117647) ,
- rgb (0.4, 0.7607843137254902, 0.6431372549019608) ,
- rgb (0.2549019607843137, 0.6823529411764706, 0.4627450980392157) ,
- rgb (0.13725490196078433, 0.5450980392156862, 0.27058823529411763) ,
- rgb (0.0, 0.42745098039215684, 0.17254901960784313) ,
- rgb (0.0, 0.26666666666666666, 0.10588235294117647)
-});
+ rgb (0.9686274509803922, 0.9882352941176471, 0.9921568627450981) ,
+ rgb (0.8980392156862745, 0.9607843137254902, 0.9764705882352941) ,
+ rgb (0.8, 0.9254901960784314, 0.9019607843137255) ,
+ rgb (0.6, 0.8470588235294118, 0.788235294117647) ,
+ rgb (0.4, 0.7607843137254902, 0.6431372549019608) ,
+ rgb (0.2549019607843137, 0.6823529411764706, 0.4627450980392157) ,
+ rgb (0.13725490196078433, 0.5450980392156862, 0.27058823529411763) ,
+ rgb (0.0, 0.42745098039215684, 0.17254901960784313) ,
+ rgb (0.0, 0.26666666666666666, 0.10588235294117647)
+ });
list_data BuPu = list_data(new pen[] {
- rgb (0.9686274509803922, 0.9882352941176471, 0.9921568627450981) ,
- rgb (0.8784313725490196, 0.9254901960784314, 0.9568627450980393) ,
- rgb (0.7490196078431373, 0.8274509803921568, 0.9019607843137255) ,
- rgb (0.6196078431372549, 0.7372549019607844, 0.8549019607843137) ,
- rgb (0.5490196078431373, 0.5882352941176471, 0.7764705882352941) ,
- rgb (0.5490196078431373, 0.4196078431372549, 0.6941176470588235) ,
- rgb (0.5333333333333333, 0.2549019607843137, 0.615686274509804) ,
- rgb (0.5058823529411764, 0.05882352941176471, 0.48627450980392156) ,
- rgb (0.30196078431372547, 0.0, 0.29411764705882354)
-});
+ rgb (0.9686274509803922, 0.9882352941176471, 0.9921568627450981) ,
+ rgb (0.8784313725490196, 0.9254901960784314, 0.9568627450980393) ,
+ rgb (0.7490196078431373, 0.8274509803921568, 0.9019607843137255) ,
+ rgb (0.6196078431372549, 0.7372549019607844, 0.8549019607843137) ,
+ rgb (0.5490196078431373, 0.5882352941176471, 0.7764705882352941) ,
+ rgb (0.5490196078431373, 0.4196078431372549, 0.6941176470588235) ,
+ rgb (0.5333333333333333, 0.2549019607843137, 0.615686274509804) ,
+ rgb (0.5058823529411764, 0.05882352941176471, 0.48627450980392156) ,
+ rgb (0.30196078431372547, 0.0, 0.29411764705882354)
+ });
seg_data CMRmap = seg_data(
- new triple[] { // red
- (0.0, 0.0, 0.0) ,
- (0.125, 0.15, 0.15) ,
- (0.25, 0.3, 0.3) ,
- (0.375, 0.6, 0.6) ,
- (0.5, 1.0, 1.0) ,
- (0.625, 0.9, 0.9) ,
- (0.75, 0.9, 0.9) ,
- (0.875, 0.9, 0.9) ,
- (1.0, 1.0, 1.0)
- },
- new triple[] { // green
- (0.0, 0.0, 0.0) ,
- (0.125, 0.15, 0.15) ,
- (0.25, 0.15, 0.15) ,
- (0.375, 0.2, 0.2) ,
- (0.5, 0.25, 0.25) ,
- (0.625, 0.5, 0.5) ,
- (0.75, 0.75, 0.75) ,
- (0.875, 0.9, 0.9) ,
- (1.0, 1.0, 1.0)
- },
- new triple[] { // blue
- (0.0, 0.0, 0.0) ,
- (0.125, 0.5, 0.5) ,
- (0.25, 0.75, 0.75) ,
- (0.375, 0.5, 0.5) ,
- (0.5, 0.15, 0.15) ,
- (0.625, 0.0, 0.0) ,
- (0.75, 0.1, 0.1) ,
- (0.875, 0.5, 0.5) ,
- (1.0, 1.0, 1.0)
- }
-);
+ new triple[] { // red
+ (0.0, 0.0, 0.0) ,
+ (0.125, 0.15, 0.15) ,
+ (0.25, 0.3, 0.3) ,
+ (0.375, 0.6, 0.6) ,
+ (0.5, 1.0, 1.0) ,
+ (0.625, 0.9, 0.9) ,
+ (0.75, 0.9, 0.9) ,
+ (0.875, 0.9, 0.9) ,
+ (1.0, 1.0, 1.0)
+ },
+ new triple[] { // green
+ (0.0, 0.0, 0.0) ,
+ (0.125, 0.15, 0.15) ,
+ (0.25, 0.15, 0.15) ,
+ (0.375, 0.2, 0.2) ,
+ (0.5, 0.25, 0.25) ,
+ (0.625, 0.5, 0.5) ,
+ (0.75, 0.75, 0.75) ,
+ (0.875, 0.9, 0.9) ,
+ (1.0, 1.0, 1.0)
+ },
+ new triple[] { // blue
+ (0.0, 0.0, 0.0) ,
+ (0.125, 0.5, 0.5) ,
+ (0.25, 0.75, 0.75) ,
+ (0.375, 0.5, 0.5) ,
+ (0.5, 0.15, 0.15) ,
+ (0.625, 0.0, 0.0) ,
+ (0.75, 0.1, 0.1) ,
+ (0.875, 0.5, 0.5) ,
+ (1.0, 1.0, 1.0)
+ }
+ );
list_data Dark2 = list_data(new pen[] {
- rgb (0.10588235294117647, 0.6196078431372549, 0.4666666666666667) ,
- rgb (0.8509803921568627, 0.37254901960784315, 0.00784313725490196) ,
- rgb (0.4588235294117647, 0.4392156862745098, 0.7019607843137254) ,
- rgb (0.9058823529411765, 0.1607843137254902, 0.5411764705882353) ,
- rgb (0.4, 0.6509803921568628, 0.11764705882352941) ,
- rgb (0.9019607843137255, 0.6705882352941176, 0.00784313725490196) ,
- rgb (0.6509803921568628, 0.4627450980392157, 0.11372549019607843) ,
- rgb (0.4, 0.4, 0.4)
-});
+ rgb (0.10588235294117647, 0.6196078431372549, 0.4666666666666667) ,
+ rgb (0.8509803921568627, 0.37254901960784315, 0.00784313725490196) ,
+ rgb (0.4588235294117647, 0.4392156862745098, 0.7019607843137254) ,
+ rgb (0.9058823529411765, 0.1607843137254902, 0.5411764705882353) ,
+ rgb (0.4, 0.6509803921568628, 0.11764705882352941) ,
+ rgb (0.9019607843137255, 0.6705882352941176, 0.00784313725490196) ,
+ rgb (0.6509803921568628, 0.4627450980392157, 0.11372549019607843) ,
+ rgb (0.4, 0.4, 0.4)
+ });
list_data GnBu = list_data(new pen[] {
- rgb (0.9686274509803922, 0.9882352941176471, 0.9411764705882353) ,
- rgb (0.8784313725490196, 0.9529411764705882, 0.8588235294117647) ,
- rgb (0.8, 0.9215686274509803, 0.7725490196078432) ,
- rgb (0.6588235294117647, 0.8666666666666667, 0.7098039215686275) ,
- rgb (0.4823529411764706, 0.8, 0.7686274509803922) ,
- rgb (0.3058823529411765, 0.7019607843137254, 0.8274509803921568) ,
- rgb (0.16862745098039217, 0.5490196078431373, 0.7450980392156863) ,
- rgb (0.03137254901960784, 0.40784313725490196, 0.6745098039215687) ,
- rgb (0.03137254901960784, 0.25098039215686274, 0.5058823529411764)
-});
+ rgb (0.9686274509803922, 0.9882352941176471, 0.9411764705882353) ,
+ rgb (0.8784313725490196, 0.9529411764705882, 0.8588235294117647) ,
+ rgb (0.8, 0.9215686274509803, 0.7725490196078432) ,
+ rgb (0.6588235294117647, 0.8666666666666667, 0.7098039215686275) ,
+ rgb (0.4823529411764706, 0.8, 0.7686274509803922) ,
+ rgb (0.3058823529411765, 0.7019607843137254, 0.8274509803921568) ,
+ rgb (0.16862745098039217, 0.5490196078431373, 0.7450980392156863) ,
+ rgb (0.03137254901960784, 0.40784313725490196, 0.6745098039215687) ,
+ rgb (0.03137254901960784, 0.25098039215686274, 0.5058823529411764)
+ });
list_data Greens = list_data(new pen[] {
- rgb (0.9686274509803922, 0.9882352941176471, 0.9607843137254902) ,
- rgb (0.8980392156862745, 0.9607843137254902, 0.8784313725490196) ,
- rgb (0.7803921568627451, 0.9137254901960784, 0.7529411764705882) ,
- rgb (0.6313725490196078, 0.8509803921568627, 0.6078431372549019) ,
- rgb (0.4549019607843137, 0.7686274509803922, 0.4627450980392157) ,
- rgb (0.2549019607843137, 0.6705882352941176, 0.36470588235294116) ,
- rgb (0.13725490196078433, 0.5450980392156862, 0.27058823529411763) ,
- rgb (0.0, 0.42745098039215684, 0.17254901960784313) ,
- rgb (0.0, 0.26666666666666666, 0.10588235294117647)
-});
+ rgb (0.9686274509803922, 0.9882352941176471, 0.9607843137254902) ,
+ rgb (0.8980392156862745, 0.9607843137254902, 0.8784313725490196) ,
+ rgb (0.7803921568627451, 0.9137254901960784, 0.7529411764705882) ,
+ rgb (0.6313725490196078, 0.8509803921568627, 0.6078431372549019) ,
+ rgb (0.4549019607843137, 0.7686274509803922, 0.4627450980392157) ,
+ rgb (0.2549019607843137, 0.6705882352941176, 0.36470588235294116) ,
+ rgb (0.13725490196078433, 0.5450980392156862, 0.27058823529411763) ,
+ rgb (0.0, 0.42745098039215684, 0.17254901960784313) ,
+ rgb (0.0, 0.26666666666666666, 0.10588235294117647)
+ });
list_data Greys = list_data(new pen[] {
- rgb (1.0, 1.0, 1.0) ,
- rgb (0.9411764705882353, 0.9411764705882353, 0.9411764705882353) ,
- rgb (0.8509803921568627, 0.8509803921568627, 0.8509803921568627) ,
- rgb (0.7411764705882353, 0.7411764705882353, 0.7411764705882353) ,
- rgb (0.5882352941176471, 0.5882352941176471, 0.5882352941176471) ,
- rgb (0.45098039215686275, 0.45098039215686275, 0.45098039215686275) ,
- rgb (0.3215686274509804, 0.3215686274509804, 0.3215686274509804) ,
- rgb (0.1450980392156863, 0.1450980392156863, 0.1450980392156863) ,
- rgb (0.0, 0.0, 0.0)
-});
+ rgb (1.0, 1.0, 1.0) ,
+ rgb (0.9411764705882353, 0.9411764705882353, 0.9411764705882353) ,
+ rgb (0.8509803921568627, 0.8509803921568627, 0.8509803921568627) ,
+ rgb (0.7411764705882353, 0.7411764705882353, 0.7411764705882353) ,
+ rgb (0.5882352941176471, 0.5882352941176471, 0.5882352941176471) ,
+ rgb (0.45098039215686275, 0.45098039215686275, 0.45098039215686275) ,
+ rgb (0.3215686274509804, 0.3215686274509804, 0.3215686274509804) ,
+ rgb (0.1450980392156863, 0.1450980392156863, 0.1450980392156863) ,
+ rgb (0.0, 0.0, 0.0)
+ });
list_data OrRd = list_data(new pen[] {
- rgb (1.0, 0.9686274509803922, 0.9254901960784314) ,
- rgb (0.996078431372549, 0.9098039215686274, 0.7843137254901961) ,
- rgb (0.9921568627450981, 0.8313725490196079, 0.6196078431372549) ,
- rgb (0.9921568627450981, 0.7333333333333333, 0.5176470588235295) ,
- rgb (0.9882352941176471, 0.5529411764705883, 0.34901960784313724) ,
- rgb (0.9372549019607843, 0.396078431372549, 0.2823529411764706) ,
- rgb (0.8431372549019608, 0.18823529411764706, 0.12156862745098039) ,
- rgb (0.7019607843137254, 0.0, 0.0) ,
- rgb (0.4980392156862745, 0.0, 0.0)
-});
+ rgb (1.0, 0.9686274509803922, 0.9254901960784314) ,
+ rgb (0.996078431372549, 0.9098039215686274, 0.7843137254901961) ,
+ rgb (0.9921568627450981, 0.8313725490196079, 0.6196078431372549) ,
+ rgb (0.9921568627450981, 0.7333333333333333, 0.5176470588235295) ,
+ rgb (0.9882352941176471, 0.5529411764705883, 0.34901960784313724) ,
+ rgb (0.9372549019607843, 0.396078431372549, 0.2823529411764706) ,
+ rgb (0.8431372549019608, 0.18823529411764706, 0.12156862745098039) ,
+ rgb (0.7019607843137254, 0.0, 0.0) ,
+ rgb (0.4980392156862745, 0.0, 0.0)
+ });
list_data Oranges = list_data(new pen[] {
- rgb (1.0, 0.9607843137254902, 0.9215686274509803) ,
- rgb (0.996078431372549, 0.9019607843137255, 0.807843137254902) ,
- rgb (0.9921568627450981, 0.8156862745098039, 0.6352941176470588) ,
- rgb (0.9921568627450981, 0.6823529411764706, 0.4196078431372549) ,
- rgb (0.9921568627450981, 0.5529411764705883, 0.23529411764705882) ,
- rgb (0.9450980392156862, 0.4117647058823529, 0.07450980392156863) ,
- rgb (0.8509803921568627, 0.2823529411764706, 0.00392156862745098) ,
- rgb (0.6509803921568628, 0.21176470588235294, 0.01176470588235294) ,
- rgb (0.4980392156862745, 0.15294117647058825, 0.01568627450980392)
-});
+ rgb (1.0, 0.9607843137254902, 0.9215686274509803) ,
+ rgb (0.996078431372549, 0.9019607843137255, 0.807843137254902) ,
+ rgb (0.9921568627450981, 0.8156862745098039, 0.6352941176470588) ,
+ rgb (0.9921568627450981, 0.6823529411764706, 0.4196078431372549) ,
+ rgb (0.9921568627450981, 0.5529411764705883, 0.23529411764705882) ,
+ rgb (0.9450980392156862, 0.4117647058823529, 0.07450980392156863) ,
+ rgb (0.8509803921568627, 0.2823529411764706, 0.00392156862745098) ,
+ rgb (0.6509803921568628, 0.21176470588235294, 0.01176470588235294) ,
+ rgb (0.4980392156862745, 0.15294117647058825, 0.01568627450980392)
+ });
list_data PRGn = list_data(new pen[] {
- rgb (0.25098039215686274, 0.0, 0.29411764705882354) ,
- rgb (0.4627450980392157, 0.16470588235294117, 0.5137254901960784) ,
- rgb (0.6, 0.4392156862745098, 0.6705882352941176) ,
- rgb (0.7607843137254902, 0.6470588235294118, 0.8117647058823529) ,
- rgb (0.9058823529411765, 0.8313725490196079, 0.9098039215686274) ,
- rgb (0.9686274509803922, 0.9686274509803922, 0.9686274509803922) ,
- rgb (0.8509803921568627, 0.9411764705882353, 0.8274509803921568) ,
- rgb (0.6509803921568628, 0.8588235294117647, 0.6274509803921569) ,
- rgb (0.35294117647058826, 0.6823529411764706, 0.3803921568627451) ,
- rgb (0.10588235294117647, 0.47058823529411764, 0.21568627450980393) ,
- rgb (0.0, 0.26666666666666666, 0.10588235294117647)
-});
+ rgb (0.25098039215686274, 0.0, 0.29411764705882354) ,
+ rgb (0.4627450980392157, 0.16470588235294117, 0.5137254901960784) ,
+ rgb (0.6, 0.4392156862745098, 0.6705882352941176) ,
+ rgb (0.7607843137254902, 0.6470588235294118, 0.8117647058823529) ,
+ rgb (0.9058823529411765, 0.8313725490196079, 0.9098039215686274) ,
+ rgb (0.9686274509803922, 0.9686274509803922, 0.9686274509803922) ,
+ rgb (0.8509803921568627, 0.9411764705882353, 0.8274509803921568) ,
+ rgb (0.6509803921568628, 0.8588235294117647, 0.6274509803921569) ,
+ rgb (0.35294117647058826, 0.6823529411764706, 0.3803921568627451) ,
+ rgb (0.10588235294117647, 0.47058823529411764, 0.21568627450980393) ,
+ rgb (0.0, 0.26666666666666666, 0.10588235294117647)
+ });
list_data Paired = list_data(new pen[] {
- rgb (0.6509803921568628, 0.807843137254902, 0.8901960784313725) ,
- rgb (0.12156862745098039, 0.47058823529411764, 0.7058823529411765) ,
- rgb (0.6980392156862745, 0.8745098039215686, 0.5411764705882353) ,
- rgb (0.2, 0.6274509803921569, 0.17254901960784313) ,
- rgb (0.984313725490196, 0.6039215686274509, 0.6) ,
- rgb (0.8901960784313725, 0.10196078431372549, 0.10980392156862745) ,
- rgb (0.9921568627450981, 0.7490196078431373, 0.43529411764705883) ,
- rgb (1.0, 0.4980392156862745, 0.0) ,
- rgb (0.792156862745098, 0.6980392156862745, 0.8392156862745098) ,
- rgb (0.41568627450980394, 0.23921568627450981, 0.6039215686274509) ,
- rgb (1.0, 1.0, 0.6) ,
- rgb (0.6941176470588235, 0.34901960784313724, 0.1568627450980392)
-});
+ rgb (0.6509803921568628, 0.807843137254902, 0.8901960784313725) ,
+ rgb (0.12156862745098039, 0.47058823529411764, 0.7058823529411765) ,
+ rgb (0.6980392156862745, 0.8745098039215686, 0.5411764705882353) ,
+ rgb (0.2, 0.6274509803921569, 0.17254901960784313) ,
+ rgb (0.984313725490196, 0.6039215686274509, 0.6) ,
+ rgb (0.8901960784313725, 0.10196078431372549, 0.10980392156862745) ,
+ rgb (0.9921568627450981, 0.7490196078431373, 0.43529411764705883) ,
+ rgb (1.0, 0.4980392156862745, 0.0) ,
+ rgb (0.792156862745098, 0.6980392156862745, 0.8392156862745098) ,
+ rgb (0.41568627450980394, 0.23921568627450981, 0.6039215686274509) ,
+ rgb (1.0, 1.0, 0.6) ,
+ rgb (0.6941176470588235, 0.34901960784313724, 0.1568627450980392)
+ });
list_data Pastel1 = list_data(new pen[] {
- rgb (0.984313725490196, 0.7058823529411765, 0.6823529411764706) ,
- rgb (0.7019607843137254, 0.803921568627451, 0.8901960784313725) ,
- rgb (0.8, 0.9215686274509803, 0.7725490196078432) ,
- rgb (0.8705882352941177, 0.796078431372549, 0.8941176470588236) ,
- rgb (0.996078431372549, 0.8509803921568627, 0.6509803921568628) ,
- rgb (1.0, 1.0, 0.8) ,
- rgb (0.8980392156862745, 0.8470588235294118, 0.7411764705882353) ,
- rgb (0.9921568627450981, 0.8549019607843137, 0.9254901960784314) ,
- rgb (0.9490196078431372, 0.9490196078431372, 0.9490196078431372)
-});
+ rgb (0.984313725490196, 0.7058823529411765, 0.6823529411764706) ,
+ rgb (0.7019607843137254, 0.803921568627451, 0.8901960784313725) ,
+ rgb (0.8, 0.9215686274509803, 0.7725490196078432) ,
+ rgb (0.8705882352941177, 0.796078431372549, 0.8941176470588236) ,
+ rgb (0.996078431372549, 0.8509803921568627, 0.6509803921568628) ,
+ rgb (1.0, 1.0, 0.8) ,
+ rgb (0.8980392156862745, 0.8470588235294118, 0.7411764705882353) ,
+ rgb (0.9921568627450981, 0.8549019607843137, 0.9254901960784314) ,
+ rgb (0.9490196078431372, 0.9490196078431372, 0.9490196078431372)
+ });
list_data Pastel2 = list_data(new pen[] {
- rgb (0.7019607843137254, 0.8862745098039215, 0.803921568627451) ,
- rgb (0.9921568627450981, 0.803921568627451, 0.6745098039215687) ,
- rgb (0.796078431372549, 0.8352941176470589, 0.9098039215686274) ,
- rgb (0.9568627450980393, 0.792156862745098, 0.8941176470588236) ,
- rgb (0.9019607843137255, 0.9607843137254902, 0.788235294117647) ,
- rgb (1.0, 0.9490196078431372, 0.6823529411764706) ,
- rgb (0.9450980392156862, 0.8862745098039215, 0.8) ,
- rgb (0.8, 0.8, 0.8)
-});
+ rgb (0.7019607843137254, 0.8862745098039215, 0.803921568627451) ,
+ rgb (0.9921568627450981, 0.803921568627451, 0.6745098039215687) ,
+ rgb (0.796078431372549, 0.8352941176470589, 0.9098039215686274) ,
+ rgb (0.9568627450980393, 0.792156862745098, 0.8941176470588236) ,
+ rgb (0.9019607843137255, 0.9607843137254902, 0.788235294117647) ,
+ rgb (1.0, 0.9490196078431372, 0.6823529411764706) ,
+ rgb (0.9450980392156862, 0.8862745098039215, 0.8) ,
+ rgb (0.8, 0.8, 0.8)
+ });
list_data PiYG = list_data(new pen[] {
- rgb (0.5568627450980392, 0.00392156862745098, 0.3215686274509804) ,
- rgb (0.7725490196078432, 0.10588235294117647, 0.49019607843137253) ,
- rgb (0.8705882352941177, 0.4666666666666667, 0.6823529411764706) ,
- rgb (0.9450980392156862, 0.7137254901960784, 0.8549019607843137) ,
- rgb (0.9921568627450981, 0.8784313725490196, 0.9372549019607843) ,
- rgb (0.9686274509803922, 0.9686274509803922, 0.9686274509803922) ,
- rgb (0.9019607843137255, 0.9607843137254902, 0.8156862745098039) ,
- rgb (0.7215686274509804, 0.8823529411764706, 0.5254901960784314) ,
- rgb (0.4980392156862745, 0.7372549019607844, 0.2549019607843137) ,
- rgb (0.30196078431372547, 0.5725490196078431, 0.12941176470588237) ,
- rgb (0.15294117647058825, 0.39215686274509803, 0.09803921568627451)
-});
+ rgb (0.5568627450980392, 0.00392156862745098, 0.3215686274509804) ,
+ rgb (0.7725490196078432, 0.10588235294117647, 0.49019607843137253) ,
+ rgb (0.8705882352941177, 0.4666666666666667, 0.6823529411764706) ,
+ rgb (0.9450980392156862, 0.7137254901960784, 0.8549019607843137) ,
+ rgb (0.9921568627450981, 0.8784313725490196, 0.9372549019607843) ,
+ rgb (0.9686274509803922, 0.9686274509803922, 0.9686274509803922) ,
+ rgb (0.9019607843137255, 0.9607843137254902, 0.8156862745098039) ,
+ rgb (0.7215686274509804, 0.8823529411764706, 0.5254901960784314) ,
+ rgb (0.4980392156862745, 0.7372549019607844, 0.2549019607843137) ,
+ rgb (0.30196078431372547, 0.5725490196078431, 0.12941176470588237) ,
+ rgb (0.15294117647058825, 0.39215686274509803, 0.09803921568627451)
+ });
list_data PuBuGn = list_data(new pen[] {
- rgb (1.0, 0.9686274509803922, 0.984313725490196) ,
- rgb (0.9254901960784314, 0.8862745098039215, 0.9411764705882353) ,
- rgb (0.8156862745098039, 0.8196078431372549, 0.9019607843137255) ,
- rgb (0.6509803921568628, 0.7411764705882353, 0.8588235294117647) ,
- rgb (0.403921568627451, 0.6627450980392157, 0.8117647058823529) ,
- rgb (0.21176470588235294, 0.5647058823529412, 0.7529411764705882) ,
- rgb (0.00784313725490196, 0.5058823529411764, 0.5411764705882353) ,
- rgb (0.00392156862745098, 0.4235294117647059, 0.34901960784313724) ,
- rgb (0.00392156862745098, 0.27450980392156865, 0.21176470588235294)
-});
+ rgb (1.0, 0.9686274509803922, 0.984313725490196) ,
+ rgb (0.9254901960784314, 0.8862745098039215, 0.9411764705882353) ,
+ rgb (0.8156862745098039, 0.8196078431372549, 0.9019607843137255) ,
+ rgb (0.6509803921568628, 0.7411764705882353, 0.8588235294117647) ,
+ rgb (0.403921568627451, 0.6627450980392157, 0.8117647058823529) ,
+ rgb (0.21176470588235294, 0.5647058823529412, 0.7529411764705882) ,
+ rgb (0.00784313725490196, 0.5058823529411764, 0.5411764705882353) ,
+ rgb (0.00392156862745098, 0.4235294117647059, 0.34901960784313724) ,
+ rgb (0.00392156862745098, 0.27450980392156865, 0.21176470588235294)
+ });
list_data PuBu = list_data(new pen[] {
- rgb (1.0, 0.9686274509803922, 0.984313725490196) ,
- rgb (0.9254901960784314, 0.9058823529411765, 0.9490196078431372) ,
- rgb (0.8156862745098039, 0.8196078431372549, 0.9019607843137255) ,
- rgb (0.6509803921568628, 0.7411764705882353, 0.8588235294117647) ,
- rgb (0.4549019607843137, 0.6627450980392157, 0.8117647058823529) ,
- rgb (0.21176470588235294, 0.5647058823529412, 0.7529411764705882) ,
- rgb (0.0196078431372549, 0.4392156862745098, 0.6901960784313725) ,
- rgb (0.01568627450980392, 0.35294117647058826, 0.5529411764705883) ,
- rgb (0.00784313725490196, 0.2196078431372549, 0.34509803921568627)
-});
+ rgb (1.0, 0.9686274509803922, 0.984313725490196) ,
+ rgb (0.9254901960784314, 0.9058823529411765, 0.9490196078431372) ,
+ rgb (0.8156862745098039, 0.8196078431372549, 0.9019607843137255) ,
+ rgb (0.6509803921568628, 0.7411764705882353, 0.8588235294117647) ,
+ rgb (0.4549019607843137, 0.6627450980392157, 0.8117647058823529) ,
+ rgb (0.21176470588235294, 0.5647058823529412, 0.7529411764705882) ,
+ rgb (0.0196078431372549, 0.4392156862745098, 0.6901960784313725) ,
+ rgb (0.01568627450980392, 0.35294117647058826, 0.5529411764705883) ,
+ rgb (0.00784313725490196, 0.2196078431372549, 0.34509803921568627)
+ });
list_data PuOr = list_data(new pen[] {
- rgb (0.4980392156862745, 0.23137254901960785, 0.03137254901960784) ,
- rgb (0.7019607843137254, 0.34509803921568627, 0.02352941176470588) ,
- rgb (0.8784313725490196, 0.5098039215686274, 0.0784313725490196) ,
- rgb (0.9921568627450981, 0.7215686274509804, 0.38823529411764707) ,
- rgb (0.996078431372549, 0.8784313725490196, 0.7137254901960784) ,
- rgb (0.9686274509803922, 0.9686274509803922, 0.9686274509803922) ,
- rgb (0.8470588235294118, 0.8549019607843137, 0.9215686274509803) ,
- rgb (0.6980392156862745, 0.6705882352941176, 0.8235294117647058) ,
- rgb (0.5019607843137255, 0.45098039215686275, 0.6745098039215687) ,
- rgb (0.32941176470588235, 0.15294117647058825, 0.5333333333333333) ,
- rgb (0.17647058823529413, 0.0, 0.29411764705882354)
-});
+ rgb (0.4980392156862745, 0.23137254901960785, 0.03137254901960784) ,
+ rgb (0.7019607843137254, 0.34509803921568627, 0.02352941176470588) ,
+ rgb (0.8784313725490196, 0.5098039215686274, 0.0784313725490196) ,
+ rgb (0.9921568627450981, 0.7215686274509804, 0.38823529411764707) ,
+ rgb (0.996078431372549, 0.8784313725490196, 0.7137254901960784) ,
+ rgb (0.9686274509803922, 0.9686274509803922, 0.9686274509803922) ,
+ rgb (0.8470588235294118, 0.8549019607843137, 0.9215686274509803) ,
+ rgb (0.6980392156862745, 0.6705882352941176, 0.8235294117647058) ,
+ rgb (0.5019607843137255, 0.45098039215686275, 0.6745098039215687) ,
+ rgb (0.32941176470588235, 0.15294117647058825, 0.5333333333333333) ,
+ rgb (0.17647058823529413, 0.0, 0.29411764705882354)
+ });
list_data PuRd = list_data(new pen[] {
- rgb (0.9686274509803922, 0.9568627450980393, 0.9764705882352941) ,
- rgb (0.9058823529411765, 0.8823529411764706, 0.9372549019607843) ,
- rgb (0.8313725490196079, 0.7254901960784313, 0.8549019607843137) ,
- rgb (0.788235294117647, 0.5803921568627451, 0.7803921568627451) ,
- rgb (0.8745098039215686, 0.396078431372549, 0.6901960784313725) ,
- rgb (0.9058823529411765, 0.1607843137254902, 0.5411764705882353) ,
- rgb (0.807843137254902, 0.07058823529411765, 0.33725490196078434) ,
- rgb (0.596078431372549, 0.0, 0.2627450980392157) ,
- rgb (0.403921568627451, 0.0, 0.12156862745098039)
-});
+ rgb (0.9686274509803922, 0.9568627450980393, 0.9764705882352941) ,
+ rgb (0.9058823529411765, 0.8823529411764706, 0.9372549019607843) ,
+ rgb (0.8313725490196079, 0.7254901960784313, 0.8549019607843137) ,
+ rgb (0.788235294117647, 0.5803921568627451, 0.7803921568627451) ,
+ rgb (0.8745098039215686, 0.396078431372549, 0.6901960784313725) ,
+ rgb (0.9058823529411765, 0.1607843137254902, 0.5411764705882353) ,
+ rgb (0.807843137254902, 0.07058823529411765, 0.33725490196078434) ,
+ rgb (0.596078431372549, 0.0, 0.2627450980392157) ,
+ rgb (0.403921568627451, 0.0, 0.12156862745098039)
+ });
list_data Purples = list_data(new pen[] {
- rgb (0.9882352941176471, 0.984313725490196, 0.9921568627450981) ,
- rgb (0.9372549019607843, 0.9294117647058824, 0.9607843137254902) ,
- rgb (0.8549019607843137, 0.8549019607843137, 0.9215686274509803) ,
- rgb (0.7372549019607844, 0.7411764705882353, 0.8627450980392157) ,
- rgb (0.6196078431372549, 0.6039215686274509, 0.7843137254901961) ,
- rgb (0.5019607843137255, 0.49019607843137253, 0.7294117647058823) ,
- rgb (0.41568627450980394, 0.3176470588235294, 0.6392156862745098) ,
- rgb (0.32941176470588235, 0.15294117647058825, 0.5607843137254902) ,
- rgb (0.24705882352941178, 0.0, 0.49019607843137253)
-});
+ rgb (0.9882352941176471, 0.984313725490196, 0.9921568627450981) ,
+ rgb (0.9372549019607843, 0.9294117647058824, 0.9607843137254902) ,
+ rgb (0.8549019607843137, 0.8549019607843137, 0.9215686274509803) ,
+ rgb (0.7372549019607844, 0.7411764705882353, 0.8627450980392157) ,
+ rgb (0.6196078431372549, 0.6039215686274509, 0.7843137254901961) ,
+ rgb (0.5019607843137255, 0.49019607843137253, 0.7294117647058823) ,
+ rgb (0.41568627450980394, 0.3176470588235294, 0.6392156862745098) ,
+ rgb (0.32941176470588235, 0.15294117647058825, 0.5607843137254902) ,
+ rgb (0.24705882352941178, 0.0, 0.49019607843137253)
+ });
list_data RdBu = list_data(new pen[] {
- rgb (0.403921568627451, 0.0, 0.12156862745098039) ,
- rgb (0.6980392156862745, 0.09411764705882353, 0.16862745098039217) ,
- rgb (0.8392156862745098, 0.3764705882352941, 0.30196078431372547) ,
- rgb (0.9568627450980393, 0.6470588235294118, 0.5098039215686274) ,
- rgb (0.9921568627450981, 0.8588235294117647, 0.7803921568627451) ,
- rgb (0.9686274509803922, 0.9686274509803922, 0.9686274509803922) ,
- rgb (0.8196078431372549, 0.8980392156862745, 0.9411764705882353) ,
- rgb (0.5725490196078431, 0.7725490196078432, 0.8705882352941177) ,
- rgb (0.2627450980392157, 0.5764705882352941, 0.7647058823529411) ,
- rgb (0.12941176470588237, 0.4, 0.6745098039215687) ,
- rgb (0.0196078431372549, 0.18823529411764706, 0.3803921568627451)
-});
+ rgb (0.403921568627451, 0.0, 0.12156862745098039) ,
+ rgb (0.6980392156862745, 0.09411764705882353, 0.16862745098039217) ,
+ rgb (0.8392156862745098, 0.3764705882352941, 0.30196078431372547) ,
+ rgb (0.9568627450980393, 0.6470588235294118, 0.5098039215686274) ,
+ rgb (0.9921568627450981, 0.8588235294117647, 0.7803921568627451) ,
+ rgb (0.9686274509803922, 0.9686274509803922, 0.9686274509803922) ,
+ rgb (0.8196078431372549, 0.8980392156862745, 0.9411764705882353) ,
+ rgb (0.5725490196078431, 0.7725490196078432, 0.8705882352941177) ,
+ rgb (0.2627450980392157, 0.5764705882352941, 0.7647058823529411) ,
+ rgb (0.12941176470588237, 0.4, 0.6745098039215687) ,
+ rgb (0.0196078431372549, 0.18823529411764706, 0.3803921568627451)
+ });
list_data RdGy = list_data(new pen[] {
- rgb (0.403921568627451, 0.0, 0.12156862745098039) ,
- rgb (0.6980392156862745, 0.09411764705882353, 0.16862745098039217) ,
- rgb (0.8392156862745098, 0.3764705882352941, 0.30196078431372547) ,
- rgb (0.9568627450980393, 0.6470588235294118, 0.5098039215686274) ,
- rgb (0.9921568627450981, 0.8588235294117647, 0.7803921568627451) ,
- rgb (1.0, 1.0, 1.0) ,
- rgb (0.8784313725490196, 0.8784313725490196, 0.8784313725490196) ,
- rgb (0.7294117647058823, 0.7294117647058823, 0.7294117647058823) ,
- rgb (0.5294117647058824, 0.5294117647058824, 0.5294117647058824) ,
- rgb (0.30196078431372547, 0.30196078431372547, 0.30196078431372547) ,
- rgb (0.10196078431372549, 0.10196078431372549, 0.10196078431372549)
-});
+ rgb (0.403921568627451, 0.0, 0.12156862745098039) ,
+ rgb (0.6980392156862745, 0.09411764705882353, 0.16862745098039217) ,
+ rgb (0.8392156862745098, 0.3764705882352941, 0.30196078431372547) ,
+ rgb (0.9568627450980393, 0.6470588235294118, 0.5098039215686274) ,
+ rgb (0.9921568627450981, 0.8588235294117647, 0.7803921568627451) ,
+ rgb (1.0, 1.0, 1.0) ,
+ rgb (0.8784313725490196, 0.8784313725490196, 0.8784313725490196) ,
+ rgb (0.7294117647058823, 0.7294117647058823, 0.7294117647058823) ,
+ rgb (0.5294117647058824, 0.5294117647058824, 0.5294117647058824) ,
+ rgb (0.30196078431372547, 0.30196078431372547, 0.30196078431372547) ,
+ rgb (0.10196078431372549, 0.10196078431372549, 0.10196078431372549)
+ });
list_data RdPu = list_data(new pen[] {
- rgb (1.0, 0.9686274509803922, 0.9529411764705882) ,
- rgb (0.9921568627450981, 0.8784313725490196, 0.8666666666666667) ,
- rgb (0.9882352941176471, 0.7725490196078432, 0.7529411764705882) ,
- rgb (0.9803921568627451, 0.6235294117647059, 0.7098039215686275) ,
- rgb (0.9686274509803922, 0.40784313725490196, 0.6313725490196078) ,
- rgb (0.8666666666666667, 0.20392156862745098, 0.592156862745098) ,
- rgb (0.6823529411764706, 0.00392156862745098, 0.49411764705882355) ,
- rgb (0.47843137254901963, 0.00392156862745098, 0.4666666666666667) ,
- rgb (0.28627450980392155, 0.0, 0.41568627450980394)
-});
+ rgb (1.0, 0.9686274509803922, 0.9529411764705882) ,
+ rgb (0.9921568627450981, 0.8784313725490196, 0.8666666666666667) ,
+ rgb (0.9882352941176471, 0.7725490196078432, 0.7529411764705882) ,
+ rgb (0.9803921568627451, 0.6235294117647059, 0.7098039215686275) ,
+ rgb (0.9686274509803922, 0.40784313725490196, 0.6313725490196078) ,
+ rgb (0.8666666666666667, 0.20392156862745098, 0.592156862745098) ,
+ rgb (0.6823529411764706, 0.00392156862745098, 0.49411764705882355) ,
+ rgb (0.47843137254901963, 0.00392156862745098, 0.4666666666666667) ,
+ rgb (0.28627450980392155, 0.0, 0.41568627450980394)
+ });
list_data RdYlBu = list_data(new pen[] {
- rgb (0.6470588235294118, 0.0, 0.14901960784313725) ,
- rgb (0.8431372549019608, 0.18823529411764706, 0.15294117647058825) ,
- rgb (0.9568627450980393, 0.42745098039215684, 0.2627450980392157) ,
- rgb (0.9921568627450981, 0.6823529411764706, 0.3803921568627451) ,
- rgb (0.996078431372549, 0.8784313725490196, 0.5647058823529412) ,
- rgb (1.0, 1.0, 0.7490196078431373) ,
- rgb (0.8784313725490196, 0.9529411764705882, 0.9725490196078431) ,
- rgb (0.6705882352941176, 0.8509803921568627, 0.9137254901960784) ,
- rgb (0.4549019607843137, 0.6784313725490196, 0.8196078431372549) ,
- rgb (0.27058823529411763, 0.4588235294117647, 0.7058823529411765) ,
- rgb (0.19215686274509805, 0.21176470588235294, 0.5843137254901961)
-});
+ rgb (0.6470588235294118, 0.0, 0.14901960784313725) ,
+ rgb (0.8431372549019608, 0.18823529411764706, 0.15294117647058825) ,
+ rgb (0.9568627450980393, 0.42745098039215684, 0.2627450980392157) ,
+ rgb (0.9921568627450981, 0.6823529411764706, 0.3803921568627451) ,
+ rgb (0.996078431372549, 0.8784313725490196, 0.5647058823529412) ,
+ rgb (1.0, 1.0, 0.7490196078431373) ,
+ rgb (0.8784313725490196, 0.9529411764705882, 0.9725490196078431) ,
+ rgb (0.6705882352941176, 0.8509803921568627, 0.9137254901960784) ,
+ rgb (0.4549019607843137, 0.6784313725490196, 0.8196078431372549) ,
+ rgb (0.27058823529411763, 0.4588235294117647, 0.7058823529411765) ,
+ rgb (0.19215686274509805, 0.21176470588235294, 0.5843137254901961)
+ });
list_data RdYlGn = list_data(new pen[] {
- rgb (0.6470588235294118, 0.0, 0.14901960784313725) ,
- rgb (0.8431372549019608, 0.18823529411764706, 0.15294117647058825) ,
- rgb (0.9568627450980393, 0.42745098039215684, 0.2627450980392157) ,
- rgb (0.9921568627450981, 0.6823529411764706, 0.3803921568627451) ,
- rgb (0.996078431372549, 0.8784313725490196, 0.5450980392156862) ,
- rgb (1.0, 1.0, 0.7490196078431373) ,
- rgb (0.8509803921568627, 0.9372549019607843, 0.5450980392156862) ,
- rgb (0.6509803921568628, 0.8509803921568627, 0.41568627450980394) ,
- rgb (0.4, 0.7411764705882353, 0.38823529411764707) ,
- rgb (0.10196078431372549, 0.596078431372549, 0.3137254901960784) ,
- rgb (0.0, 0.40784313725490196, 0.21568627450980393)
-});
+ rgb (0.6470588235294118, 0.0, 0.14901960784313725) ,
+ rgb (0.8431372549019608, 0.18823529411764706, 0.15294117647058825) ,
+ rgb (0.9568627450980393, 0.42745098039215684, 0.2627450980392157) ,
+ rgb (0.9921568627450981, 0.6823529411764706, 0.3803921568627451) ,
+ rgb (0.996078431372549, 0.8784313725490196, 0.5450980392156862) ,
+ rgb (1.0, 1.0, 0.7490196078431373) ,
+ rgb (0.8509803921568627, 0.9372549019607843, 0.5450980392156862) ,
+ rgb (0.6509803921568628, 0.8509803921568627, 0.41568627450980394) ,
+ rgb (0.4, 0.7411764705882353, 0.38823529411764707) ,
+ rgb (0.10196078431372549, 0.596078431372549, 0.3137254901960784) ,
+ rgb (0.0, 0.40784313725490196, 0.21568627450980393)
+ });
list_data Reds = list_data(new pen[] {
- rgb (1.0, 0.9607843137254902, 0.9411764705882353) ,
- rgb (0.996078431372549, 0.8784313725490196, 0.8235294117647058) ,
- rgb (0.9882352941176471, 0.7333333333333333, 0.6313725490196078) ,
- rgb (0.9882352941176471, 0.5725490196078431, 0.4470588235294118) ,
- rgb (0.984313725490196, 0.41568627450980394, 0.2901960784313726) ,
- rgb (0.9372549019607843, 0.23137254901960785, 0.17254901960784313) ,
- rgb (0.796078431372549, 0.09411764705882353, 0.11372549019607843) ,
- rgb (0.6470588235294118, 0.058823529411764705, 0.08235294117647057) ,
- rgb (0.403921568627451, 0.0, 0.05098039215686274)
-});
+ rgb (1.0, 0.9607843137254902, 0.9411764705882353) ,
+ rgb (0.996078431372549, 0.8784313725490196, 0.8235294117647058) ,
+ rgb (0.9882352941176471, 0.7333333333333333, 0.6313725490196078) ,
+ rgb (0.9882352941176471, 0.5725490196078431, 0.4470588235294118) ,
+ rgb (0.984313725490196, 0.41568627450980394, 0.2901960784313726) ,
+ rgb (0.9372549019607843, 0.23137254901960785, 0.17254901960784313) ,
+ rgb (0.796078431372549, 0.09411764705882353, 0.11372549019607843) ,
+ rgb (0.6470588235294118, 0.058823529411764705, 0.08235294117647057) ,
+ rgb (0.403921568627451, 0.0, 0.05098039215686274)
+ });
list_data Set1 = list_data(new pen[] {
- rgb (0.8941176470588236, 0.10196078431372549, 0.10980392156862745) ,
- rgb (0.21568627450980393, 0.49411764705882355, 0.7215686274509804) ,
- rgb (0.30196078431372547, 0.6862745098039216, 0.2901960784313726) ,
- rgb (0.596078431372549, 0.3058823529411765, 0.6392156862745098) ,
- rgb (1.0, 0.4980392156862745, 0.0) ,
- rgb (1.0, 1.0, 0.2) ,
- rgb (0.6509803921568628, 0.33725490196078434, 0.1568627450980392) ,
- rgb (0.9686274509803922, 0.5058823529411764, 0.7490196078431373) ,
- rgb (0.6, 0.6, 0.6)
-});
+ rgb (0.8941176470588236, 0.10196078431372549, 0.10980392156862745) ,
+ rgb (0.21568627450980393, 0.49411764705882355, 0.7215686274509804) ,
+ rgb (0.30196078431372547, 0.6862745098039216, 0.2901960784313726) ,
+ rgb (0.596078431372549, 0.3058823529411765, 0.6392156862745098) ,
+ rgb (1.0, 0.4980392156862745, 0.0) ,
+ rgb (1.0, 1.0, 0.2) ,
+ rgb (0.6509803921568628, 0.33725490196078434, 0.1568627450980392) ,
+ rgb (0.9686274509803922, 0.5058823529411764, 0.7490196078431373) ,
+ rgb (0.6, 0.6, 0.6)
+ });
list_data Set2 = list_data(new pen[] {
- rgb (0.4, 0.7607843137254902, 0.6470588235294118) ,
- rgb (0.9882352941176471, 0.5529411764705883, 0.3843137254901961) ,
- rgb (0.5529411764705883, 0.6274509803921569, 0.796078431372549) ,
- rgb (0.9058823529411765, 0.5411764705882353, 0.7647058823529411) ,
- rgb (0.6509803921568628, 0.8470588235294118, 0.32941176470588235) ,
- rgb (1.0, 0.8509803921568627, 0.1843137254901961) ,
- rgb (0.8980392156862745, 0.7686274509803922, 0.5803921568627451) ,
- rgb (0.7019607843137254, 0.7019607843137254, 0.7019607843137254)
-});
+ rgb (0.4, 0.7607843137254902, 0.6470588235294118) ,
+ rgb (0.9882352941176471, 0.5529411764705883, 0.3843137254901961) ,
+ rgb (0.5529411764705883, 0.6274509803921569, 0.796078431372549) ,
+ rgb (0.9058823529411765, 0.5411764705882353, 0.7647058823529411) ,
+ rgb (0.6509803921568628, 0.8470588235294118, 0.32941176470588235) ,
+ rgb (1.0, 0.8509803921568627, 0.1843137254901961) ,
+ rgb (0.8980392156862745, 0.7686274509803922, 0.5803921568627451) ,
+ rgb (0.7019607843137254, 0.7019607843137254, 0.7019607843137254)
+ });
list_data Set3 = list_data(new pen[] {
- rgb (0.5529411764705883, 0.8274509803921568, 0.7803921568627451) ,
- rgb (1.0, 1.0, 0.7019607843137254) ,
- rgb (0.7450980392156863, 0.7294117647058823, 0.8549019607843137) ,
- rgb (0.984313725490196, 0.5019607843137255, 0.4470588235294118) ,
- rgb (0.5019607843137255, 0.6941176470588235, 0.8274509803921568) ,
- rgb (0.9921568627450981, 0.7058823529411765, 0.3843137254901961) ,
- rgb (0.7019607843137254, 0.8705882352941177, 0.4117647058823529) ,
- rgb (0.9882352941176471, 0.803921568627451, 0.8980392156862745) ,
- rgb (0.8509803921568627, 0.8509803921568627, 0.8509803921568627) ,
- rgb (0.7372549019607844, 0.5019607843137255, 0.7411764705882353) ,
- rgb (0.8, 0.9215686274509803, 0.7725490196078432) ,
- rgb (1.0, 0.9294117647058824, 0.43529411764705883)
-});
+ rgb (0.5529411764705883, 0.8274509803921568, 0.7803921568627451) ,
+ rgb (1.0, 1.0, 0.7019607843137254) ,
+ rgb (0.7450980392156863, 0.7294117647058823, 0.8549019607843137) ,
+ rgb (0.984313725490196, 0.5019607843137255, 0.4470588235294118) ,
+ rgb (0.5019607843137255, 0.6941176470588235, 0.8274509803921568) ,
+ rgb (0.9921568627450981, 0.7058823529411765, 0.3843137254901961) ,
+ rgb (0.7019607843137254, 0.8705882352941177, 0.4117647058823529) ,
+ rgb (0.9882352941176471, 0.803921568627451, 0.8980392156862745) ,
+ rgb (0.8509803921568627, 0.8509803921568627, 0.8509803921568627) ,
+ rgb (0.7372549019607844, 0.5019607843137255, 0.7411764705882353) ,
+ rgb (0.8, 0.9215686274509803, 0.7725490196078432) ,
+ rgb (1.0, 0.9294117647058824, 0.43529411764705883)
+ });
list_data Spectral = list_data(new pen[] {
- rgb (0.6196078431372549, 0.00392156862745098, 0.25882352941176473) ,
- rgb (0.8352941176470589, 0.24313725490196078, 0.30980392156862746) ,
- rgb (0.9568627450980393, 0.42745098039215684, 0.2627450980392157) ,
- rgb (0.9921568627450981, 0.6823529411764706, 0.3803921568627451) ,
- rgb (0.996078431372549, 0.8784313725490196, 0.5450980392156862) ,
- rgb (1.0, 1.0, 0.7490196078431373) ,
- rgb (0.9019607843137255, 0.9607843137254902, 0.596078431372549) ,
- rgb (0.6705882352941176, 0.8666666666666667, 0.6431372549019608) ,
- rgb (0.4, 0.7607843137254902, 0.6470588235294118) ,
- rgb (0.19607843137254902, 0.5333333333333333, 0.7411764705882353) ,
- rgb (0.3686274509803922, 0.30980392156862746, 0.6352941176470588)
-});
+ rgb (0.6196078431372549, 0.00392156862745098, 0.25882352941176473) ,
+ rgb (0.8352941176470589, 0.24313725490196078, 0.30980392156862746) ,
+ rgb (0.9568627450980393, 0.42745098039215684, 0.2627450980392157) ,
+ rgb (0.9921568627450981, 0.6823529411764706, 0.3803921568627451) ,
+ rgb (0.996078431372549, 0.8784313725490196, 0.5450980392156862) ,
+ rgb (1.0, 1.0, 0.7490196078431373) ,
+ rgb (0.9019607843137255, 0.9607843137254902, 0.596078431372549) ,
+ rgb (0.6705882352941176, 0.8666666666666667, 0.6431372549019608) ,
+ rgb (0.4, 0.7607843137254902, 0.6470588235294118) ,
+ rgb (0.19607843137254902, 0.5333333333333333, 0.7411764705882353) ,
+ rgb (0.3686274509803922, 0.30980392156862746, 0.6352941176470588)
+ });
list_data YlGnBu = list_data(new pen[] {
- rgb (1.0, 1.0, 0.8509803921568627) ,
- rgb (0.9294117647058824, 0.9725490196078431, 0.6941176470588235) ,
- rgb (0.7803921568627451, 0.9137254901960784, 0.7058823529411765) ,
- rgb (0.4980392156862745, 0.803921568627451, 0.7333333333333333) ,
- rgb (0.2549019607843137, 0.7137254901960784, 0.7686274509803922) ,
- rgb (0.11372549019607843, 0.5686274509803921, 0.7529411764705882) ,
- rgb (0.13333333333333333, 0.3686274509803922, 0.6588235294117647) ,
- rgb (0.1450980392156863, 0.20392156862745098, 0.5803921568627451) ,
- rgb (0.03137254901960784, 0.11372549019607843, 0.34509803921568627)
-});
+ rgb (1.0, 1.0, 0.8509803921568627) ,
+ rgb (0.9294117647058824, 0.9725490196078431, 0.6941176470588235) ,
+ rgb (0.7803921568627451, 0.9137254901960784, 0.7058823529411765) ,
+ rgb (0.4980392156862745, 0.803921568627451, 0.7333333333333333) ,
+ rgb (0.2549019607843137, 0.7137254901960784, 0.7686274509803922) ,
+ rgb (0.11372549019607843, 0.5686274509803921, 0.7529411764705882) ,
+ rgb (0.13333333333333333, 0.3686274509803922, 0.6588235294117647) ,
+ rgb (0.1450980392156863, 0.20392156862745098, 0.5803921568627451) ,
+ rgb (0.03137254901960784, 0.11372549019607843, 0.34509803921568627)
+ });
list_data YlGn = list_data(new pen[] {
- rgb (1.0, 1.0, 0.8980392156862745) ,
- rgb (0.9686274509803922, 0.9882352941176471, 0.7254901960784313) ,
- rgb (0.8509803921568627, 0.9411764705882353, 0.6392156862745098) ,
- rgb (0.6784313725490196, 0.8666666666666667, 0.5568627450980392) ,
- rgb (0.47058823529411764, 0.7764705882352941, 0.4745098039215686) ,
- rgb (0.2549019607843137, 0.6705882352941176, 0.36470588235294116) ,
- rgb (0.13725490196078433, 0.5176470588235295, 0.2627450980392157) ,
- rgb (0.0, 0.40784313725490196, 0.21568627450980393) ,
- rgb (0.0, 0.27058823529411763, 0.1607843137254902)
-});
+ rgb (1.0, 1.0, 0.8980392156862745) ,
+ rgb (0.9686274509803922, 0.9882352941176471, 0.7254901960784313) ,
+ rgb (0.8509803921568627, 0.9411764705882353, 0.6392156862745098) ,
+ rgb (0.6784313725490196, 0.8666666666666667, 0.5568627450980392) ,
+ rgb (0.47058823529411764, 0.7764705882352941, 0.4745098039215686) ,
+ rgb (0.2549019607843137, 0.6705882352941176, 0.36470588235294116) ,
+ rgb (0.13725490196078433, 0.5176470588235295, 0.2627450980392157) ,
+ rgb (0.0, 0.40784313725490196, 0.21568627450980393) ,
+ rgb (0.0, 0.27058823529411763, 0.1607843137254902)
+ });
list_data YlOrBr = list_data(new pen[] {
- rgb (1.0, 1.0, 0.8980392156862745) ,
- rgb (1.0, 0.9686274509803922, 0.7372549019607844) ,
- rgb (0.996078431372549, 0.8901960784313725, 0.5686274509803921) ,
- rgb (0.996078431372549, 0.7686274509803922, 0.30980392156862746) ,
- rgb (0.996078431372549, 0.6, 0.1607843137254902) ,
- rgb (0.9254901960784314, 0.4392156862745098, 0.0784313725490196) ,
- rgb (0.8, 0.2980392156862745, 0.00784313725490196) ,
- rgb (0.6, 0.20392156862745098, 0.01568627450980392) ,
- rgb (0.4, 0.1450980392156863, 0.02352941176470588)
-});
+ rgb (1.0, 1.0, 0.8980392156862745) ,
+ rgb (1.0, 0.9686274509803922, 0.7372549019607844) ,
+ rgb (0.996078431372549, 0.8901960784313725, 0.5686274509803921) ,
+ rgb (0.996078431372549, 0.7686274509803922, 0.30980392156862746) ,
+ rgb (0.996078431372549, 0.6, 0.1607843137254902) ,
+ rgb (0.9254901960784314, 0.4392156862745098, 0.0784313725490196) ,
+ rgb (0.8, 0.2980392156862745, 0.00784313725490196) ,
+ rgb (0.6, 0.20392156862745098, 0.01568627450980392) ,
+ rgb (0.4, 0.1450980392156863, 0.02352941176470588)
+ });
list_data YlOrRd = list_data(new pen[] {
- rgb (1.0, 1.0, 0.8) ,
- rgb (1.0, 0.9294117647058824, 0.6274509803921569) ,
- rgb (0.996078431372549, 0.8509803921568627, 0.4627450980392157) ,
- rgb (0.996078431372549, 0.6980392156862745, 0.2980392156862745) ,
- rgb (0.9921568627450981, 0.5529411764705883, 0.23529411764705882) ,
- rgb (0.9882352941176471, 0.3058823529411765, 0.16470588235294117) ,
- rgb (0.8901960784313725, 0.10196078431372549, 0.10980392156862745) ,
- rgb (0.7411764705882353, 0.0, 0.14901960784313725) ,
- rgb (0.5019607843137255, 0.0, 0.14901960784313725)
-});
+ rgb (1.0, 1.0, 0.8) ,
+ rgb (1.0, 0.9294117647058824, 0.6274509803921569) ,
+ rgb (0.996078431372549, 0.8509803921568627, 0.4627450980392157) ,
+ rgb (0.996078431372549, 0.6980392156862745, 0.2980392156862745) ,
+ rgb (0.9921568627450981, 0.5529411764705883, 0.23529411764705882) ,
+ rgb (0.9882352941176471, 0.3058823529411765, 0.16470588235294117) ,
+ rgb (0.8901960784313725, 0.10196078431372549, 0.10980392156862745) ,
+ rgb (0.7411764705882353, 0.0, 0.14901960784313725) ,
+ rgb (0.5019607843137255, 0.0, 0.14901960784313725)
+ });
seg_data autumn = seg_data(
- new triple[] { // red
- (0.0, 1.0, 1.0) ,
- (1.0, 1.0, 1.0)
- },
- new triple[] { // green
- (0.0, 0.0, 0.0) ,
- (1.0, 1.0, 1.0)
- },
- new triple[] { // blue
- (0.0, 0.0, 0.0) ,
- (1.0, 0.0, 0.0)
- }
-);
+ new triple[] { // red
+ (0.0, 1.0, 1.0) ,
+ (1.0, 1.0, 1.0)
+ },
+ new triple[] { // green
+ (0.0, 0.0, 0.0) ,
+ (1.0, 1.0, 1.0)
+ },
+ new triple[] { // blue
+ (0.0, 0.0, 0.0) ,
+ (1.0, 0.0, 0.0)
+ }
+ );
seg_data binary = seg_data(
- new triple[] { // red
- (0.0, 1.0, 1.0) ,
- (1.0, 0.0, 0.0)
- },
- new triple[] { // green
- (0.0, 1.0, 1.0) ,
- (1.0, 0.0, 0.0)
- },
- new triple[] { // blue
- (0.0, 1.0, 1.0) ,
- (1.0, 0.0, 0.0)
- }
-);
+ new triple[] { // red
+ (0.0, 1.0, 1.0) ,
+ (1.0, 0.0, 0.0)
+ },
+ new triple[] { // green
+ (0.0, 1.0, 1.0) ,
+ (1.0, 0.0, 0.0)
+ },
+ new triple[] { // blue
+ (0.0, 1.0, 1.0) ,
+ (1.0, 0.0, 0.0)
+ }
+ );
seg_data bone = seg_data(
- new triple[] { // red
- (0.0, 0.0, 0.0) ,
- (0.746032, 0.652778, 0.652778) ,
- (1.0, 1.0, 1.0)
- },
- new triple[] { // green
- (0.0, 0.0, 0.0) ,
- (0.365079, 0.319444, 0.319444) ,
- (0.746032, 0.777778, 0.777778) ,
- (1.0, 1.0, 1.0)
- },
- new triple[] { // blue
- (0.0, 0.0, 0.0) ,
- (0.365079, 0.444444, 0.444444) ,
- (1.0, 1.0, 1.0)
- }
-);
+ new triple[] { // red
+ (0.0, 0.0, 0.0) ,
+ (0.746032, 0.652778, 0.652778) ,
+ (1.0, 1.0, 1.0)
+ },
+ new triple[] { // green
+ (0.0, 0.0, 0.0) ,
+ (0.365079, 0.319444, 0.319444) ,
+ (0.746032, 0.777778, 0.777778) ,
+ (1.0, 1.0, 1.0)
+ },
+ new triple[] { // blue
+ (0.0, 0.0, 0.0) ,
+ (0.365079, 0.444444, 0.444444) ,
+ (1.0, 1.0, 1.0)
+ }
+ );
list_data brg = list_data(new pen[] {
- rgb (0.0, 0.0, 1.0) ,
- rgb (1.0, 0.0, 0.0) ,
- rgb (0.0, 1.0, 0.0)
-});
+ rgb (0.0, 0.0, 1.0) ,
+ rgb (1.0, 0.0, 0.0) ,
+ rgb (0.0, 1.0, 0.0)
+ });
list_data bwr = list_data(new pen[] {
- rgb (0.0, 0.0, 1.0) ,
- rgb (1.0, 1.0, 1.0) ,
- rgb (1.0, 0.0, 0.0)
-});
+ rgb (0.0, 0.0, 1.0) ,
+ rgb (1.0, 1.0, 1.0) ,
+ rgb (1.0, 0.0, 0.0)
+ });
seg_data cool = seg_data(
- new triple[] { // red
- (0.0, 0.0, 0.0) ,
- (1.0, 1.0, 1.0)
- },
- new triple[] { // green
- (0.0, 1.0, 1.0) ,
- (1.0, 0.0, 0.0)
- },
- new triple[] { // blue
- (0.0, 1.0, 1.0) ,
- (1.0, 1.0, 1.0)
- }
-);
+ new triple[] { // red
+ (0.0, 0.0, 0.0) ,
+ (1.0, 1.0, 1.0)
+ },
+ new triple[] { // green
+ (0.0, 1.0, 1.0) ,
+ (1.0, 0.0, 0.0)
+ },
+ new triple[] { // blue
+ (0.0, 1.0, 1.0) ,
+ (1.0, 1.0, 1.0)
+ }
+ );
seg_data coolwarm = seg_data(
- new triple[] { // red
- (0.0, 0.2298057, 0.2298057) ,
- (0.03125, 0.26623388, 0.26623388) ,
- (0.0625, 0.30386891, 0.30386891) ,
- (0.09375, 0.342804478, 0.342804478) ,
- (0.125, 0.38301334, 0.38301334) ,
- (0.15625, 0.424369608, 0.424369608) ,
- (0.1875, 0.46666708, 0.46666708) ,
- (0.21875, 0.509635204, 0.509635204) ,
- (0.25, 0.552953156, 0.552953156) ,
- (0.28125, 0.596262162, 0.596262162) ,
- (0.3125, 0.639176211, 0.639176211) ,
- (0.34375, 0.681291281, 0.681291281) ,
- (0.375, 0.722193294, 0.722193294) ,
- (0.40625, 0.761464949, 0.761464949) ,
- (0.4375, 0.798691636, 0.798691636) ,
- (0.46875, 0.833466556, 0.833466556) ,
- (0.5, 0.865395197, 0.865395197) ,
- (0.53125, 0.897787179, 0.897787179) ,
- (0.5625, 0.924127593, 0.924127593) ,
- (0.59375, 0.944468518, 0.944468518) ,
- (0.625, 0.958852946, 0.958852946) ,
- (0.65625, 0.96732803, 0.96732803) ,
- (0.6875, 0.969954137, 0.969954137) ,
- (0.71875, 0.966811177, 0.966811177) ,
- (0.75, 0.958003065, 0.958003065) ,
- (0.78125, 0.943660866, 0.943660866) ,
- (0.8125, 0.923944917, 0.923944917) ,
- (0.84375, 0.89904617, 0.89904617) ,
- (0.875, 0.869186849, 0.869186849) ,
- (0.90625, 0.834620542, 0.834620542) ,
- (0.9375, 0.795631745, 0.795631745) ,
- (0.96875, 0.752534934, 0.752534934) ,
- (1.0, 0.705673158, 0.705673158)
- },
- new triple[] { // green
- (0.0, 0.298717966, 0.298717966) ,
- (0.03125, 0.353094838, 0.353094838) ,
- (0.0625, 0.406535296, 0.406535296) ,
- (0.09375, 0.458757618, 0.458757618) ,
- (0.125, 0.50941904, 0.50941904) ,
- (0.15625, 0.558148092, 0.558148092) ,
- (0.1875, 0.604562568, 0.604562568) ,
- (0.21875, 0.648280772, 0.648280772) ,
- (0.25, 0.688929332, 0.688929332) ,
- (0.28125, 0.726149107, 0.726149107) ,
- (0.3125, 0.759599947, 0.759599947) ,
- (0.34375, 0.788964712, 0.788964712) ,
- (0.375, 0.813952739, 0.813952739) ,
- (0.40625, 0.834302879, 0.834302879) ,
- (0.4375, 0.849786142, 0.849786142) ,
- (0.46875, 0.860207984, 0.860207984) ,
- (0.5, 0.86541021, 0.86541021) ,
- (0.53125, 0.848937047, 0.848937047) ,
- (0.5625, 0.827384882, 0.827384882) ,
- (0.59375, 0.800927443, 0.800927443) ,
- (0.625, 0.769767752, 0.769767752) ,
- (0.65625, 0.734132809, 0.734132809) ,
- (0.6875, 0.694266682, 0.694266682) ,
- (0.71875, 0.650421156, 0.650421156) ,
- (0.75, 0.602842431, 0.602842431) ,
- (0.78125, 0.551750968, 0.551750968) ,
- (0.8125, 0.49730856, 0.49730856) ,
- (0.84375, 0.439559467, 0.439559467) ,
- (0.875, 0.378313092, 0.378313092) ,
- (0.90625, 0.312874446, 0.312874446) ,
- (0.9375, 0.24128379, 0.24128379) ,
- (0.96875, 0.157246067, 0.157246067) ,
- (1.0, 0.01555616, 0.01555616)
- },
- new triple[] { // blue
- (0.0, 0.753683153, 0.753683153) ,
- (0.03125, 0.801466763, 0.801466763) ,
- (0.0625, 0.84495867, 0.84495867) ,
- (0.09375, 0.883725899, 0.883725899) ,
- (0.125, 0.917387822, 0.917387822) ,
- (0.15625, 0.945619588, 0.945619588) ,
- (0.1875, 0.968154911, 0.968154911) ,
- (0.21875, 0.98478814, 0.98478814) ,
- (0.25, 0.995375608, 0.995375608) ,
- (0.28125, 0.999836203, 0.999836203) ,
- (0.3125, 0.998151185, 0.998151185) ,
- (0.34375, 0.990363227, 0.990363227) ,
- (0.375, 0.976574709, 0.976574709) ,
- (0.40625, 0.956945269, 0.956945269) ,
- (0.4375, 0.931688648, 0.931688648) ,
- (0.46875, 0.901068838, 0.901068838) ,
- (0.5, 0.865395561, 0.865395561) ,
- (0.53125, 0.820880546, 0.820880546) ,
- (0.5625, 0.774508472, 0.774508472) ,
- (0.59375, 0.726736146, 0.726736146) ,
- (0.625, 0.678007945, 0.678007945) ,
- (0.65625, 0.628751763, 0.628751763) ,
- (0.6875, 0.579375448, 0.579375448) ,
- (0.71875, 0.530263762, 0.530263762) ,
- (0.75, 0.481775914, 0.481775914) ,
- (0.78125, 0.434243684, 0.434243684) ,
- (0.8125, 0.387970225, 0.387970225) ,
- (0.84375, 0.343229596, 0.343229596) ,
- (0.875, 0.300267182, 0.300267182) ,
- (0.90625, 0.259301199, 0.259301199) ,
- (0.9375, 0.220525627, 0.220525627) ,
- (0.96875, 0.184115123, 0.184115123) ,
- (1.0, 0.150232812, 0.150232812)
- }
-);
+ new triple[] { // red
+ (0.0, 0.2298057, 0.2298057) ,
+ (0.03125, 0.26623388, 0.26623388) ,
+ (0.0625, 0.30386891, 0.30386891) ,
+ (0.09375, 0.342804478, 0.342804478) ,
+ (0.125, 0.38301334, 0.38301334) ,
+ (0.15625, 0.424369608, 0.424369608) ,
+ (0.1875, 0.46666708, 0.46666708) ,
+ (0.21875, 0.509635204, 0.509635204) ,
+ (0.25, 0.552953156, 0.552953156) ,
+ (0.28125, 0.596262162, 0.596262162) ,
+ (0.3125, 0.639176211, 0.639176211) ,
+ (0.34375, 0.681291281, 0.681291281) ,
+ (0.375, 0.722193294, 0.722193294) ,
+ (0.40625, 0.761464949, 0.761464949) ,
+ (0.4375, 0.798691636, 0.798691636) ,
+ (0.46875, 0.833466556, 0.833466556) ,
+ (0.5, 0.865395197, 0.865395197) ,
+ (0.53125, 0.897787179, 0.897787179) ,
+ (0.5625, 0.924127593, 0.924127593) ,
+ (0.59375, 0.944468518, 0.944468518) ,
+ (0.625, 0.958852946, 0.958852946) ,
+ (0.65625, 0.96732803, 0.96732803) ,
+ (0.6875, 0.969954137, 0.969954137) ,
+ (0.71875, 0.966811177, 0.966811177) ,
+ (0.75, 0.958003065, 0.958003065) ,
+ (0.78125, 0.943660866, 0.943660866) ,
+ (0.8125, 0.923944917, 0.923944917) ,
+ (0.84375, 0.89904617, 0.89904617) ,
+ (0.875, 0.869186849, 0.869186849) ,
+ (0.90625, 0.834620542, 0.834620542) ,
+ (0.9375, 0.795631745, 0.795631745) ,
+ (0.96875, 0.752534934, 0.752534934) ,
+ (1.0, 0.705673158, 0.705673158)
+ },
+ new triple[] { // green
+ (0.0, 0.298717966, 0.298717966) ,
+ (0.03125, 0.353094838, 0.353094838) ,
+ (0.0625, 0.406535296, 0.406535296) ,
+ (0.09375, 0.458757618, 0.458757618) ,
+ (0.125, 0.50941904, 0.50941904) ,
+ (0.15625, 0.558148092, 0.558148092) ,
+ (0.1875, 0.604562568, 0.604562568) ,
+ (0.21875, 0.648280772, 0.648280772) ,
+ (0.25, 0.688929332, 0.688929332) ,
+ (0.28125, 0.726149107, 0.726149107) ,
+ (0.3125, 0.759599947, 0.759599947) ,
+ (0.34375, 0.788964712, 0.788964712) ,
+ (0.375, 0.813952739, 0.813952739) ,
+ (0.40625, 0.834302879, 0.834302879) ,
+ (0.4375, 0.849786142, 0.849786142) ,
+ (0.46875, 0.860207984, 0.860207984) ,
+ (0.5, 0.86541021, 0.86541021) ,
+ (0.53125, 0.848937047, 0.848937047) ,
+ (0.5625, 0.827384882, 0.827384882) ,
+ (0.59375, 0.800927443, 0.800927443) ,
+ (0.625, 0.769767752, 0.769767752) ,
+ (0.65625, 0.734132809, 0.734132809) ,
+ (0.6875, 0.694266682, 0.694266682) ,
+ (0.71875, 0.650421156, 0.650421156) ,
+ (0.75, 0.602842431, 0.602842431) ,
+ (0.78125, 0.551750968, 0.551750968) ,
+ (0.8125, 0.49730856, 0.49730856) ,
+ (0.84375, 0.439559467, 0.439559467) ,
+ (0.875, 0.378313092, 0.378313092) ,
+ (0.90625, 0.312874446, 0.312874446) ,
+ (0.9375, 0.24128379, 0.24128379) ,
+ (0.96875, 0.157246067, 0.157246067) ,
+ (1.0, 0.01555616, 0.01555616)
+ },
+ new triple[] { // blue
+ (0.0, 0.753683153, 0.753683153) ,
+ (0.03125, 0.801466763, 0.801466763) ,
+ (0.0625, 0.84495867, 0.84495867) ,
+ (0.09375, 0.883725899, 0.883725899) ,
+ (0.125, 0.917387822, 0.917387822) ,
+ (0.15625, 0.945619588, 0.945619588) ,
+ (0.1875, 0.968154911, 0.968154911) ,
+ (0.21875, 0.98478814, 0.98478814) ,
+ (0.25, 0.995375608, 0.995375608) ,
+ (0.28125, 0.999836203, 0.999836203) ,
+ (0.3125, 0.998151185, 0.998151185) ,
+ (0.34375, 0.990363227, 0.990363227) ,
+ (0.375, 0.976574709, 0.976574709) ,
+ (0.40625, 0.956945269, 0.956945269) ,
+ (0.4375, 0.931688648, 0.931688648) ,
+ (0.46875, 0.901068838, 0.901068838) ,
+ (0.5, 0.865395561, 0.865395561) ,
+ (0.53125, 0.820880546, 0.820880546) ,
+ (0.5625, 0.774508472, 0.774508472) ,
+ (0.59375, 0.726736146, 0.726736146) ,
+ (0.625, 0.678007945, 0.678007945) ,
+ (0.65625, 0.628751763, 0.628751763) ,
+ (0.6875, 0.579375448, 0.579375448) ,
+ (0.71875, 0.530263762, 0.530263762) ,
+ (0.75, 0.481775914, 0.481775914) ,
+ (0.78125, 0.434243684, 0.434243684) ,
+ (0.8125, 0.387970225, 0.387970225) ,
+ (0.84375, 0.343229596, 0.343229596) ,
+ (0.875, 0.300267182, 0.300267182) ,
+ (0.90625, 0.259301199, 0.259301199) ,
+ (0.9375, 0.220525627, 0.220525627) ,
+ (0.96875, 0.184115123, 0.184115123) ,
+ (1.0, 0.150232812, 0.150232812)
+ }
+ );
seg_data copper = seg_data(
- new triple[] { // red
- (0.0, 0.0, 0.0) ,
- (0.809524, 1.0, 1.0) ,
- (1.0, 1.0, 1.0)
- },
- new triple[] { // green
- (0.0, 0.0, 0.0) ,
- (1.0, 0.7812, 0.7812)
- },
- new triple[] { // blue
- (0.0, 0.0, 0.0) ,
- (1.0, 0.4975, 0.4975)
- }
-);
+ new triple[] { // red
+ (0.0, 0.0, 0.0) ,
+ (0.809524, 1.0, 1.0) ,
+ (1.0, 1.0, 1.0)
+ },
+ new triple[] { // green
+ (0.0, 0.0, 0.0) ,
+ (1.0, 0.7812, 0.7812)
+ },
+ new triple[] { // blue
+ (0.0, 0.0, 0.0) ,
+ (1.0, 0.4975, 0.4975)
+ }
+ );
seg_data gist_earth = seg_data(
- new triple[] { // red
- (0.0, 0.0, 0.0) ,
- (0.2824, 0.1882, 0.1882) ,
- (0.4588, 0.2714, 0.2714) ,
- (0.549, 0.4719, 0.4719) ,
- (0.698, 0.7176, 0.7176) ,
- (0.7882, 0.7553, 0.7553) ,
- (1.0, 0.9922, 0.9922)
- },
- new triple[] { // green
- (0.0, 0.0, 0.0) ,
- (0.0275, 0.0, 0.0) ,
- (0.1098, 0.1893, 0.1893) ,
- (0.1647, 0.3035, 0.3035) ,
- (0.2078, 0.3841, 0.3841) ,
- (0.2824, 0.502, 0.502) ,
- (0.5216, 0.6397, 0.6397) ,
- (0.698, 0.7171, 0.7171) ,
- (0.7882, 0.6392, 0.6392) ,
- (0.7922, 0.6413, 0.6413) ,
- (0.8, 0.6447, 0.6447) ,
- (0.8078, 0.6481, 0.6481) ,
- (0.8157, 0.6549, 0.6549) ,
- (0.8667, 0.6991, 0.6991) ,
- (0.8745, 0.7103, 0.7103) ,
- (0.8824, 0.7216, 0.7216) ,
- (0.8902, 0.7323, 0.7323) ,
- (0.898, 0.743, 0.743) ,
- (0.9412, 0.8275, 0.8275) ,
- (0.9569, 0.8635, 0.8635) ,
- (0.9647, 0.8816, 0.8816) ,
- (0.9961, 0.9733, 0.9733) ,
- (1.0, 0.9843, 0.9843)
- },
- new triple[] { // blue
- (0.0, 0.0, 0.0) ,
- (0.0039, 0.1684, 0.1684) ,
- (0.0078, 0.2212, 0.2212) ,
- (0.0275, 0.4329, 0.4329) ,
- (0.0314, 0.4549, 0.4549) ,
- (0.2824, 0.5004, 0.5004) ,
- (0.4667, 0.2748, 0.2748) ,
- (0.5451, 0.3205, 0.3205) ,
- (0.7843, 0.3961, 0.3961) ,
- (0.8941, 0.6651, 0.6651) ,
- (1.0, 0.9843, 0.9843)
- }
-);
+ new triple[] { // red
+ (0.0, 0.0, 0.0) ,
+ (0.2824, 0.1882, 0.1882) ,
+ (0.4588, 0.2714, 0.2714) ,
+ (0.549, 0.4719, 0.4719) ,
+ (0.698, 0.7176, 0.7176) ,
+ (0.7882, 0.7553, 0.7553) ,
+ (1.0, 0.9922, 0.9922)
+ },
+ new triple[] { // green
+ (0.0, 0.0, 0.0) ,
+ (0.0275, 0.0, 0.0) ,
+ (0.1098, 0.1893, 0.1893) ,
+ (0.1647, 0.3035, 0.3035) ,
+ (0.2078, 0.3841, 0.3841) ,
+ (0.2824, 0.502, 0.502) ,
+ (0.5216, 0.6397, 0.6397) ,
+ (0.698, 0.7171, 0.7171) ,
+ (0.7882, 0.6392, 0.6392) ,
+ (0.7922, 0.6413, 0.6413) ,
+ (0.8, 0.6447, 0.6447) ,
+ (0.8078, 0.6481, 0.6481) ,
+ (0.8157, 0.6549, 0.6549) ,
+ (0.8667, 0.6991, 0.6991) ,
+ (0.8745, 0.7103, 0.7103) ,
+ (0.8824, 0.7216, 0.7216) ,
+ (0.8902, 0.7323, 0.7323) ,
+ (0.898, 0.743, 0.743) ,
+ (0.9412, 0.8275, 0.8275) ,
+ (0.9569, 0.8635, 0.8635) ,
+ (0.9647, 0.8816, 0.8816) ,
+ (0.9961, 0.9733, 0.9733) ,
+ (1.0, 0.9843, 0.9843)
+ },
+ new triple[] { // blue
+ (0.0, 0.0, 0.0) ,
+ (0.0039, 0.1684, 0.1684) ,
+ (0.0078, 0.2212, 0.2212) ,
+ (0.0275, 0.4329, 0.4329) ,
+ (0.0314, 0.4549, 0.4549) ,
+ (0.2824, 0.5004, 0.5004) ,
+ (0.4667, 0.2748, 0.2748) ,
+ (0.5451, 0.3205, 0.3205) ,
+ (0.7843, 0.3961, 0.3961) ,
+ (0.8941, 0.6651, 0.6651) ,
+ (1.0, 0.9843, 0.9843)
+ }
+ );
seg_data gist_ncar = seg_data(
- new triple[] { // red
- (0.0, 0.0, 0.0) ,
- (0.3098, 0.0, 0.0) ,
- (0.3725, 0.3993, 0.3993) ,
- (0.4235, 0.5003, 0.5003) ,
- (0.5333, 1.0, 1.0) ,
- (0.7922, 1.0, 1.0) ,
- (0.8471, 0.6218, 0.6218) ,
- (0.898, 0.9235, 0.9235) ,
- (1.0, 0.9961, 0.9961)
- },
- new triple[] { // green
- (0.0, 0.0, 0.0) ,
- (0.051, 0.3722, 0.3722) ,
- (0.1059, 0.0, 0.0) ,
- (0.1569, 0.7202, 0.7202) ,
- (0.1608, 0.7537, 0.7537) ,
- (0.1647, 0.7752, 0.7752) ,
- (0.2157, 1.0, 1.0) ,
- (0.2588, 0.9804, 0.9804) ,
- (0.2706, 0.9804, 0.9804) ,
- (0.3176, 1.0, 1.0) ,
- (0.3686, 0.8081, 0.8081) ,
- (0.4275, 1.0, 1.0) ,
- (0.5216, 1.0, 1.0) ,
- (0.6314, 0.7292, 0.7292) ,
- (0.6863, 0.2796, 0.2796) ,
- (0.7451, 0.0, 0.0) ,
- (0.7922, 0.0, 0.0) ,
- (0.8431, 0.1753, 0.1753) ,
- (0.898, 0.5, 0.5) ,
- (1.0, 0.9725, 0.9725)
- },
- new triple[] { // blue
- (0.0, 0.502, 0.502) ,
- (0.051, 0.0222, 0.0222) ,
- (0.1098, 1.0, 1.0) ,
- (0.2039, 1.0, 1.0) ,
- (0.2627, 0.6145, 0.6145) ,
- (0.3216, 0.0, 0.0) ,
- (0.4157, 0.0, 0.0) ,
- (0.4745, 0.2342, 0.2342) ,
- (0.5333, 0.0, 0.0) ,
- (0.5804, 0.0, 0.0) ,
- (0.6314, 0.0549, 0.0549) ,
- (0.6902, 0.0, 0.0) ,
- (0.7373, 0.0, 0.0) ,
- (0.7922, 0.9738, 0.9738) ,
- (0.8, 1.0, 1.0) ,
- (0.8431, 1.0, 1.0) ,
- (0.898, 0.9341, 0.9341) ,
- (1.0, 0.9961, 0.9961)
- }
-);
+ new triple[] { // red
+ (0.0, 0.0, 0.0) ,
+ (0.3098, 0.0, 0.0) ,
+ (0.3725, 0.3993, 0.3993) ,
+ (0.4235, 0.5003, 0.5003) ,
+ (0.5333, 1.0, 1.0) ,
+ (0.7922, 1.0, 1.0) ,
+ (0.8471, 0.6218, 0.6218) ,
+ (0.898, 0.9235, 0.9235) ,
+ (1.0, 0.9961, 0.9961)
+ },
+ new triple[] { // green
+ (0.0, 0.0, 0.0) ,
+ (0.051, 0.3722, 0.3722) ,
+ (0.1059, 0.0, 0.0) ,
+ (0.1569, 0.7202, 0.7202) ,
+ (0.1608, 0.7537, 0.7537) ,
+ (0.1647, 0.7752, 0.7752) ,
+ (0.2157, 1.0, 1.0) ,
+ (0.2588, 0.9804, 0.9804) ,
+ (0.2706, 0.9804, 0.9804) ,
+ (0.3176, 1.0, 1.0) ,
+ (0.3686, 0.8081, 0.8081) ,
+ (0.4275, 1.0, 1.0) ,
+ (0.5216, 1.0, 1.0) ,
+ (0.6314, 0.7292, 0.7292) ,
+ (0.6863, 0.2796, 0.2796) ,
+ (0.7451, 0.0, 0.0) ,
+ (0.7922, 0.0, 0.0) ,
+ (0.8431, 0.1753, 0.1753) ,
+ (0.898, 0.5, 0.5) ,
+ (1.0, 0.9725, 0.9725)
+ },
+ new triple[] { // blue
+ (0.0, 0.502, 0.502) ,
+ (0.051, 0.0222, 0.0222) ,
+ (0.1098, 1.0, 1.0) ,
+ (0.2039, 1.0, 1.0) ,
+ (0.2627, 0.6145, 0.6145) ,
+ (0.3216, 0.0, 0.0) ,
+ (0.4157, 0.0, 0.0) ,
+ (0.4745, 0.2342, 0.2342) ,
+ (0.5333, 0.0, 0.0) ,
+ (0.5804, 0.0, 0.0) ,
+ (0.6314, 0.0549, 0.0549) ,
+ (0.6902, 0.0, 0.0) ,
+ (0.7373, 0.0, 0.0) ,
+ (0.7922, 0.9738, 0.9738) ,
+ (0.8, 1.0, 1.0) ,
+ (0.8431, 1.0, 1.0) ,
+ (0.898, 0.9341, 0.9341) ,
+ (1.0, 0.9961, 0.9961)
+ }
+ );
seg_data gist_stern = seg_data(
- new triple[] { // red
- (0.0, 0.0, 0.0) ,
- (0.0547, 1.0, 1.0) ,
- (0.25, 0.027, 0.25) ,
- (1.0, 1.0, 1.0)
- },
- new triple[] { // green
- (0, 0, 0) ,
- (1, 1, 1)
- },
- new triple[] { // blue
- (0.0, 0.0, 0.0) ,
- (0.5, 1.0, 1.0) ,
- (0.735, 0.0, 0.0) ,
- (1.0, 1.0, 1.0)
- }
-);
+ new triple[] { // red
+ (0.0, 0.0, 0.0) ,
+ (0.0547, 1.0, 1.0) ,
+ (0.25, 0.027, 0.25) ,
+ (1.0, 1.0, 1.0)
+ },
+ new triple[] { // green
+ (0, 0, 0) ,
+ (1, 1, 1)
+ },
+ new triple[] { // blue
+ (0.0, 0.0, 0.0) ,
+ (0.5, 1.0, 1.0) ,
+ (0.735, 0.0, 0.0) ,
+ (1.0, 1.0, 1.0)
+ }
+ );
seg_data gray = seg_data(
- new triple[] { // red
- (0.0, 0, 0) ,
- (1.0, 1, 1)
- },
- new triple[] { // green
- (0.0, 0, 0) ,
- (1.0, 1, 1)
- },
- new triple[] { // blue
- (0.0, 0, 0) ,
- (1.0, 1, 1)
- }
-);
+ new triple[] { // red
+ (0.0, 0, 0) ,
+ (1.0, 1, 1)
+ },
+ new triple[] { // green
+ (0.0, 0, 0) ,
+ (1.0, 1, 1)
+ },
+ new triple[] { // blue
+ (0.0, 0, 0) ,
+ (1.0, 1, 1)
+ }
+ );
seg_data hot = seg_data(
- new triple[] { // red
- (0.0, 0.0416, 0.0416) ,
- (0.365079, 1.0, 1.0) ,
- (1.0, 1.0, 1.0)
- },
- new triple[] { // green
- (0.0, 0.0, 0.0) ,
- (0.365079, 0.0, 0.0) ,
- (0.746032, 1.0, 1.0) ,
- (1.0, 1.0, 1.0)
- },
- new triple[] { // blue
- (0.0, 0.0, 0.0) ,
- (0.746032, 0.0, 0.0) ,
- (1.0, 1.0, 1.0)
- }
-);
+ new triple[] { // red
+ (0.0, 0.0416, 0.0416) ,
+ (0.365079, 1.0, 1.0) ,
+ (1.0, 1.0, 1.0)
+ },
+ new triple[] { // green
+ (0.0, 0.0, 0.0) ,
+ (0.365079, 0.0, 0.0) ,
+ (0.746032, 1.0, 1.0) ,
+ (1.0, 1.0, 1.0)
+ },
+ new triple[] { // blue
+ (0.0, 0.0, 0.0) ,
+ (0.746032, 0.0, 0.0) ,
+ (1.0, 1.0, 1.0)
+ }
+ );
seg_data hsv = seg_data(
- new triple[] { // red
- (0.0, 1.0, 1.0) ,
- (0.15873, 1.0, 1.0) ,
- (0.174603, 0.96875, 0.96875) ,
- (0.333333, 0.03125, 0.03125) ,
- (0.349206, 0.0, 0.0) ,
- (0.666667, 0.0, 0.0) ,
- (0.68254, 0.03125, 0.03125) ,
- (0.84127, 0.96875, 0.96875) ,
- (0.857143, 1.0, 1.0) ,
- (1.0, 1.0, 1.0)
- },
- new triple[] { // green
- (0.0, 0.0, 0.0) ,
- (0.15873, 0.9375, 0.9375) ,
- (0.174603, 1.0, 1.0) ,
- (0.507937, 1.0, 1.0) ,
- (0.666667, 0.0625, 0.0625) ,
- (0.68254, 0.0, 0.0) ,
- (1.0, 0.0, 0.0)
- },
- new triple[] { // blue
- (0.0, 0.0, 0.0) ,
- (0.333333, 0.0, 0.0) ,
- (0.349206, 0.0625, 0.0625) ,
- (0.507937, 1.0, 1.0) ,
- (0.84127, 1.0, 1.0) ,
- (0.857143, 0.9375, 0.9375) ,
- (1.0, 0.09375, 0.09375)
- }
-);
+ new triple[] { // red
+ (0.0, 1.0, 1.0) ,
+ (0.15873, 1.0, 1.0) ,
+ (0.174603, 0.96875, 0.96875) ,
+ (0.333333, 0.03125, 0.03125) ,
+ (0.349206, 0.0, 0.0) ,
+ (0.666667, 0.0, 0.0) ,
+ (0.68254, 0.03125, 0.03125) ,
+ (0.84127, 0.96875, 0.96875) ,
+ (0.857143, 1.0, 1.0) ,
+ (1.0, 1.0, 1.0)
+ },
+ new triple[] { // green
+ (0.0, 0.0, 0.0) ,
+ (0.15873, 0.9375, 0.9375) ,
+ (0.174603, 1.0, 1.0) ,
+ (0.507937, 1.0, 1.0) ,
+ (0.666667, 0.0625, 0.0625) ,
+ (0.68254, 0.0, 0.0) ,
+ (1.0, 0.0, 0.0)
+ },
+ new triple[] { // blue
+ (0.0, 0.0, 0.0) ,
+ (0.333333, 0.0, 0.0) ,
+ (0.349206, 0.0625, 0.0625) ,
+ (0.507937, 1.0, 1.0) ,
+ (0.84127, 1.0, 1.0) ,
+ (0.857143, 0.9375, 0.9375) ,
+ (1.0, 0.09375, 0.09375)
+ }
+ );
seg_data jet = seg_data(
- new triple[] { // red
- (0.0, 0, 0) ,
- (0.35, 0, 0) ,
- (0.66, 1, 1) ,
- (0.89, 1, 1) ,
- (1, 0.5, 0.5)
- },
- new triple[] { // green
- (0.0, 0, 0) ,
- (0.125, 0, 0) ,
- (0.375, 1, 1) ,
- (0.64, 1, 1) ,
- (0.91, 0, 0) ,
- (1, 0, 0)
- },
- new triple[] { // blue
- (0.0, 0.5, 0.5) ,
- (0.11, 1, 1) ,
- (0.34, 1, 1) ,
- (0.65, 0, 0) ,
- (1, 0, 0)
- }
-);
+ new triple[] { // red
+ (0.0, 0, 0) ,
+ (0.35, 0, 0) ,
+ (0.66, 1, 1) ,
+ (0.89, 1, 1) ,
+ (1, 0.5, 0.5)
+ },
+ new triple[] { // green
+ (0.0, 0, 0) ,
+ (0.125, 0, 0) ,
+ (0.375, 1, 1) ,
+ (0.64, 1, 1) ,
+ (0.91, 0, 0) ,
+ (1, 0, 0)
+ },
+ new triple[] { // blue
+ (0.0, 0.5, 0.5) ,
+ (0.11, 1, 1) ,
+ (0.34, 1, 1) ,
+ (0.65, 0, 0) ,
+ (1, 0, 0)
+ }
+ );
seg_data nipy_spectral = seg_data(
- new triple[] { // red
- (0.0, 0.0, 0.0) ,
- (0.05, 0.4667, 0.4667) ,
- (0.1, 0.5333, 0.5333) ,
- (0.15, 0.0, 0.0) ,
- (0.2, 0.0, 0.0) ,
- (0.25, 0.0, 0.0) ,
- (0.3, 0.0, 0.0) ,
- (0.35, 0.0, 0.0) ,
- (0.4, 0.0, 0.0) ,
- (0.45, 0.0, 0.0) ,
- (0.5, 0.0, 0.0) ,
- (0.55, 0.0, 0.0) ,
- (0.6, 0.0, 0.0) ,
- (0.65, 0.7333, 0.7333) ,
- (0.7, 0.9333, 0.9333) ,
- (0.75, 1.0, 1.0) ,
- (0.8, 1.0, 1.0) ,
- (0.85, 1.0, 1.0) ,
- (0.9, 0.8667, 0.8667) ,
- (0.95, 0.8, 0.8) ,
- (1.0, 0.8, 0.8)
- },
- new triple[] { // green
- (0.0, 0.0, 0.0) ,
- (0.05, 0.0, 0.0) ,
- (0.1, 0.0, 0.0) ,
- (0.15, 0.0, 0.0) ,
- (0.2, 0.0, 0.0) ,
- (0.25, 0.4667, 0.4667) ,
- (0.3, 0.6, 0.6) ,
- (0.35, 0.6667, 0.6667) ,
- (0.4, 0.6667, 0.6667) ,
- (0.45, 0.6, 0.6) ,
- (0.5, 0.7333, 0.7333) ,
- (0.55, 0.8667, 0.8667) ,
- (0.6, 1.0, 1.0) ,
- (0.65, 1.0, 1.0) ,
- (0.7, 0.9333, 0.9333) ,
- (0.75, 0.8, 0.8) ,
- (0.8, 0.6, 0.6) ,
- (0.85, 0.0, 0.0) ,
- (0.9, 0.0, 0.0) ,
- (0.95, 0.0, 0.0) ,
- (1.0, 0.8, 0.8)
- },
- new triple[] { // blue
- (0.0, 0.0, 0.0) ,
- (0.05, 0.5333, 0.5333) ,
- (0.1, 0.6, 0.6) ,
- (0.15, 0.6667, 0.6667) ,
- (0.2, 0.8667, 0.8667) ,
- (0.25, 0.8667, 0.8667) ,
- (0.3, 0.8667, 0.8667) ,
- (0.35, 0.6667, 0.6667) ,
- (0.4, 0.5333, 0.5333) ,
- (0.45, 0.0, 0.0) ,
- (0.5, 0.0, 0.0) ,
- (0.55, 0.0, 0.0) ,
- (0.6, 0.0, 0.0) ,
- (0.65, 0.0, 0.0) ,
- (0.7, 0.0, 0.0) ,
- (0.75, 0.0, 0.0) ,
- (0.8, 0.0, 0.0) ,
- (0.85, 0.0, 0.0) ,
- (0.9, 0.0, 0.0) ,
- (0.95, 0.0, 0.0) ,
- (1.0, 0.8, 0.8)
- }
-);
+ new triple[] { // red
+ (0.0, 0.0, 0.0) ,
+ (0.05, 0.4667, 0.4667) ,
+ (0.1, 0.5333, 0.5333) ,
+ (0.15, 0.0, 0.0) ,
+ (0.2, 0.0, 0.0) ,
+ (0.25, 0.0, 0.0) ,
+ (0.3, 0.0, 0.0) ,
+ (0.35, 0.0, 0.0) ,
+ (0.4, 0.0, 0.0) ,
+ (0.45, 0.0, 0.0) ,
+ (0.5, 0.0, 0.0) ,
+ (0.55, 0.0, 0.0) ,
+ (0.6, 0.0, 0.0) ,
+ (0.65, 0.7333, 0.7333) ,
+ (0.7, 0.9333, 0.9333) ,
+ (0.75, 1.0, 1.0) ,
+ (0.8, 1.0, 1.0) ,
+ (0.85, 1.0, 1.0) ,
+ (0.9, 0.8667, 0.8667) ,
+ (0.95, 0.8, 0.8) ,
+ (1.0, 0.8, 0.8)
+ },
+ new triple[] { // green
+ (0.0, 0.0, 0.0) ,
+ (0.05, 0.0, 0.0) ,
+ (0.1, 0.0, 0.0) ,
+ (0.15, 0.0, 0.0) ,
+ (0.2, 0.0, 0.0) ,
+ (0.25, 0.4667, 0.4667) ,
+ (0.3, 0.6, 0.6) ,
+ (0.35, 0.6667, 0.6667) ,
+ (0.4, 0.6667, 0.6667) ,
+ (0.45, 0.6, 0.6) ,
+ (0.5, 0.7333, 0.7333) ,
+ (0.55, 0.8667, 0.8667) ,
+ (0.6, 1.0, 1.0) ,
+ (0.65, 1.0, 1.0) ,
+ (0.7, 0.9333, 0.9333) ,
+ (0.75, 0.8, 0.8) ,
+ (0.8, 0.6, 0.6) ,
+ (0.85, 0.0, 0.0) ,
+ (0.9, 0.0, 0.0) ,
+ (0.95, 0.0, 0.0) ,
+ (1.0, 0.8, 0.8)
+ },
+ new triple[] { // blue
+ (0.0, 0.0, 0.0) ,
+ (0.05, 0.5333, 0.5333) ,
+ (0.1, 0.6, 0.6) ,
+ (0.15, 0.6667, 0.6667) ,
+ (0.2, 0.8667, 0.8667) ,
+ (0.25, 0.8667, 0.8667) ,
+ (0.3, 0.8667, 0.8667) ,
+ (0.35, 0.6667, 0.6667) ,
+ (0.4, 0.5333, 0.5333) ,
+ (0.45, 0.0, 0.0) ,
+ (0.5, 0.0, 0.0) ,
+ (0.55, 0.0, 0.0) ,
+ (0.6, 0.0, 0.0) ,
+ (0.65, 0.0, 0.0) ,
+ (0.7, 0.0, 0.0) ,
+ (0.75, 0.0, 0.0) ,
+ (0.8, 0.0, 0.0) ,
+ (0.85, 0.0, 0.0) ,
+ (0.9, 0.0, 0.0) ,
+ (0.95, 0.0, 0.0) ,
+ (1.0, 0.8, 0.8)
+ }
+ );
seg_data pink = seg_data(
- new triple[] { // red
- (0.0, 0.1178, 0.1178) ,
- (0.015873, 0.195857, 0.195857) ,
- (0.031746, 0.250661, 0.250661) ,
- (0.047619, 0.295468, 0.295468) ,
- (0.063492, 0.334324, 0.334324) ,
- (0.079365, 0.369112, 0.369112) ,
- (0.095238, 0.400892, 0.400892) ,
- (0.111111, 0.430331, 0.430331) ,
- (0.126984, 0.457882, 0.457882) ,
- (0.142857, 0.483867, 0.483867) ,
- (0.15873, 0.508525, 0.508525) ,
- (0.174603, 0.532042, 0.532042) ,
- (0.190476, 0.554563, 0.554563) ,
- (0.206349, 0.576204, 0.576204) ,
- (0.222222, 0.597061, 0.597061) ,
- (0.238095, 0.617213, 0.617213) ,
- (0.253968, 0.636729, 0.636729) ,
- (0.269841, 0.655663, 0.655663) ,
- (0.285714, 0.674066, 0.674066) ,
- (0.301587, 0.69198, 0.69198) ,
- (0.31746, 0.709441, 0.709441) ,
- (0.333333, 0.726483, 0.726483) ,
- (0.349206, 0.743134, 0.743134) ,
- (0.365079, 0.759421, 0.759421) ,
- (0.380952, 0.766356, 0.766356) ,
- (0.396825, 0.773229, 0.773229) ,
- (0.412698, 0.780042, 0.780042) ,
- (0.428571, 0.786796, 0.786796) ,
- (0.444444, 0.793492, 0.793492) ,
- (0.460317, 0.800132, 0.800132) ,
- (0.47619, 0.806718, 0.806718) ,
- (0.492063, 0.81325, 0.81325) ,
- (0.507937, 0.81973, 0.81973) ,
- (0.52381, 0.82616, 0.82616) ,
- (0.539683, 0.832539, 0.832539) ,
- (0.555556, 0.83887, 0.83887) ,
- (0.571429, 0.845154, 0.845154) ,
- (0.587302, 0.851392, 0.851392) ,
- (0.603175, 0.857584, 0.857584) ,
- (0.619048, 0.863731, 0.863731) ,
- (0.634921, 0.869835, 0.869835) ,
- (0.650794, 0.875897, 0.875897) ,
- (0.666667, 0.881917, 0.881917) ,
- (0.68254, 0.887896, 0.887896) ,
- (0.698413, 0.893835, 0.893835) ,
- (0.714286, 0.899735, 0.899735) ,
- (0.730159, 0.905597, 0.905597) ,
- (0.746032, 0.911421, 0.911421) ,
- (0.761905, 0.917208, 0.917208) ,
- (0.777778, 0.922958, 0.922958) ,
- (0.793651, 0.928673, 0.928673) ,
- (0.809524, 0.934353, 0.934353) ,
- (0.825397, 0.939999, 0.939999) ,
- (0.84127, 0.945611, 0.945611) ,
- (0.857143, 0.95119, 0.95119) ,
- (0.873016, 0.956736, 0.956736) ,
- (0.888889, 0.96225, 0.96225) ,
- (0.904762, 0.967733, 0.967733) ,
- (0.920635, 0.973185, 0.973185) ,
- (0.936508, 0.978607, 0.978607) ,
- (0.952381, 0.983999, 0.983999) ,
- (0.968254, 0.989361, 0.989361) ,
- (0.984127, 0.994695, 0.994695) ,
- (1.0, 1.0, 1.0)
- },
- new triple[] { // green
- (0.0, 0.0, 0.0) ,
- (0.015873, 0.102869, 0.102869) ,
- (0.031746, 0.145479, 0.145479) ,
- (0.047619, 0.178174, 0.178174) ,
- (0.063492, 0.205738, 0.205738) ,
- (0.079365, 0.230022, 0.230022) ,
- (0.095238, 0.251976, 0.251976) ,
- (0.111111, 0.272166, 0.272166) ,
- (0.126984, 0.290957, 0.290957) ,
- (0.142857, 0.308607, 0.308607) ,
- (0.15873, 0.3253, 0.3253) ,
- (0.174603, 0.341178, 0.341178) ,
- (0.190476, 0.356348, 0.356348) ,
- (0.206349, 0.370899, 0.370899) ,
- (0.222222, 0.3849, 0.3849) ,
- (0.238095, 0.39841, 0.39841) ,
- (0.253968, 0.411476, 0.411476) ,
- (0.269841, 0.424139, 0.424139) ,
- (0.285714, 0.436436, 0.436436) ,
- (0.301587, 0.448395, 0.448395) ,
- (0.31746, 0.460044, 0.460044) ,
- (0.333333, 0.471405, 0.471405) ,
- (0.349206, 0.482498, 0.482498) ,
- (0.365079, 0.493342, 0.493342) ,
- (0.380952, 0.517549, 0.517549) ,
- (0.396825, 0.540674, 0.540674) ,
- (0.412698, 0.562849, 0.562849) ,
- (0.428571, 0.584183, 0.584183) ,
- (0.444444, 0.604765, 0.604765) ,
- (0.460317, 0.624669, 0.624669) ,
- (0.47619, 0.643958, 0.643958) ,
- (0.492063, 0.662687, 0.662687) ,
- (0.507937, 0.6809, 0.6809) ,
- (0.52381, 0.698638, 0.698638) ,
- (0.539683, 0.715937, 0.715937) ,
- (0.555556, 0.732828, 0.732828) ,
- (0.571429, 0.749338, 0.749338) ,
- (0.587302, 0.765493, 0.765493) ,
- (0.603175, 0.781313, 0.781313) ,
- (0.619048, 0.796819, 0.796819) ,
- (0.634921, 0.812029, 0.812029) ,
- (0.650794, 0.82696, 0.82696) ,
- (0.666667, 0.841625, 0.841625) ,
- (0.68254, 0.85604, 0.85604) ,
- (0.698413, 0.870216, 0.870216) ,
- (0.714286, 0.884164, 0.884164) ,
- (0.730159, 0.897896, 0.897896) ,
- (0.746032, 0.911421, 0.911421) ,
- (0.761905, 0.917208, 0.917208) ,
- (0.777778, 0.922958, 0.922958) ,
- (0.793651, 0.928673, 0.928673) ,
- (0.809524, 0.934353, 0.934353) ,
- (0.825397, 0.939999, 0.939999) ,
- (0.84127, 0.945611, 0.945611) ,
- (0.857143, 0.95119, 0.95119) ,
- (0.873016, 0.956736, 0.956736) ,
- (0.888889, 0.96225, 0.96225) ,
- (0.904762, 0.967733, 0.967733) ,
- (0.920635, 0.973185, 0.973185) ,
- (0.936508, 0.978607, 0.978607) ,
- (0.952381, 0.983999, 0.983999) ,
- (0.968254, 0.989361, 0.989361) ,
- (0.984127, 0.994695, 0.994695) ,
- (1.0, 1.0, 1.0)
- },
- new triple[] { // blue
- (0.0, 0.0, 0.0) ,
- (0.015873, 0.102869, 0.102869) ,
- (0.031746, 0.145479, 0.145479) ,
- (0.047619, 0.178174, 0.178174) ,
- (0.063492, 0.205738, 0.205738) ,
- (0.079365, 0.230022, 0.230022) ,
- (0.095238, 0.251976, 0.251976) ,
- (0.111111, 0.272166, 0.272166) ,
- (0.126984, 0.290957, 0.290957) ,
- (0.142857, 0.308607, 0.308607) ,
- (0.15873, 0.3253, 0.3253) ,
- (0.174603, 0.341178, 0.341178) ,
- (0.190476, 0.356348, 0.356348) ,
- (0.206349, 0.370899, 0.370899) ,
- (0.222222, 0.3849, 0.3849) ,
- (0.238095, 0.39841, 0.39841) ,
- (0.253968, 0.411476, 0.411476) ,
- (0.269841, 0.424139, 0.424139) ,
- (0.285714, 0.436436, 0.436436) ,
- (0.301587, 0.448395, 0.448395) ,
- (0.31746, 0.460044, 0.460044) ,
- (0.333333, 0.471405, 0.471405) ,
- (0.349206, 0.482498, 0.482498) ,
- (0.365079, 0.493342, 0.493342) ,
- (0.380952, 0.503953, 0.503953) ,
- (0.396825, 0.514344, 0.514344) ,
- (0.412698, 0.524531, 0.524531) ,
- (0.428571, 0.534522, 0.534522) ,
- (0.444444, 0.544331, 0.544331) ,
- (0.460317, 0.553966, 0.553966) ,
- (0.47619, 0.563436, 0.563436) ,
- (0.492063, 0.57275, 0.57275) ,
- (0.507937, 0.581914, 0.581914) ,
- (0.52381, 0.590937, 0.590937) ,
- (0.539683, 0.599824, 0.599824) ,
- (0.555556, 0.608581, 0.608581) ,
- (0.571429, 0.617213, 0.617213) ,
- (0.587302, 0.625727, 0.625727) ,
- (0.603175, 0.634126, 0.634126) ,
- (0.619048, 0.642416, 0.642416) ,
- (0.634921, 0.6506, 0.6506) ,
- (0.650794, 0.658682, 0.658682) ,
- (0.666667, 0.666667, 0.666667) ,
- (0.68254, 0.674556, 0.674556) ,
- (0.698413, 0.682355, 0.682355) ,
- (0.714286, 0.690066, 0.690066) ,
- (0.730159, 0.697691, 0.697691) ,
- (0.746032, 0.705234, 0.705234) ,
- (0.761905, 0.727166, 0.727166) ,
- (0.777778, 0.748455, 0.748455) ,
- (0.793651, 0.769156, 0.769156) ,
- (0.809524, 0.789314, 0.789314) ,
- (0.825397, 0.808969, 0.808969) ,
- (0.84127, 0.828159, 0.828159) ,
- (0.857143, 0.846913, 0.846913) ,
- (0.873016, 0.865261, 0.865261) ,
- (0.888889, 0.883229, 0.883229) ,
- (0.904762, 0.900837, 0.900837) ,
- (0.920635, 0.918109, 0.918109) ,
- (0.936508, 0.935061, 0.935061) ,
- (0.952381, 0.951711, 0.951711) ,
- (0.968254, 0.968075, 0.968075) ,
- (0.984127, 0.984167, 0.984167) ,
- (1.0, 1.0, 1.0)
- }
-);
+ new triple[] { // red
+ (0.0, 0.1178, 0.1178) ,
+ (0.015873, 0.195857, 0.195857) ,
+ (0.031746, 0.250661, 0.250661) ,
+ (0.047619, 0.295468, 0.295468) ,
+ (0.063492, 0.334324, 0.334324) ,
+ (0.079365, 0.369112, 0.369112) ,
+ (0.095238, 0.400892, 0.400892) ,
+ (0.111111, 0.430331, 0.430331) ,
+ (0.126984, 0.457882, 0.457882) ,
+ (0.142857, 0.483867, 0.483867) ,
+ (0.15873, 0.508525, 0.508525) ,
+ (0.174603, 0.532042, 0.532042) ,
+ (0.190476, 0.554563, 0.554563) ,
+ (0.206349, 0.576204, 0.576204) ,
+ (0.222222, 0.597061, 0.597061) ,
+ (0.238095, 0.617213, 0.617213) ,
+ (0.253968, 0.636729, 0.636729) ,
+ (0.269841, 0.655663, 0.655663) ,
+ (0.285714, 0.674066, 0.674066) ,
+ (0.301587, 0.69198, 0.69198) ,
+ (0.31746, 0.709441, 0.709441) ,
+ (0.333333, 0.726483, 0.726483) ,
+ (0.349206, 0.743134, 0.743134) ,
+ (0.365079, 0.759421, 0.759421) ,
+ (0.380952, 0.766356, 0.766356) ,
+ (0.396825, 0.773229, 0.773229) ,
+ (0.412698, 0.780042, 0.780042) ,
+ (0.428571, 0.786796, 0.786796) ,
+ (0.444444, 0.793492, 0.793492) ,
+ (0.460317, 0.800132, 0.800132) ,
+ (0.47619, 0.806718, 0.806718) ,
+ (0.492063, 0.81325, 0.81325) ,
+ (0.507937, 0.81973, 0.81973) ,
+ (0.52381, 0.82616, 0.82616) ,
+ (0.539683, 0.832539, 0.832539) ,
+ (0.555556, 0.83887, 0.83887) ,
+ (0.571429, 0.845154, 0.845154) ,
+ (0.587302, 0.851392, 0.851392) ,
+ (0.603175, 0.857584, 0.857584) ,
+ (0.619048, 0.863731, 0.863731) ,
+ (0.634921, 0.869835, 0.869835) ,
+ (0.650794, 0.875897, 0.875897) ,
+ (0.666667, 0.881917, 0.881917) ,
+ (0.68254, 0.887896, 0.887896) ,
+ (0.698413, 0.893835, 0.893835) ,
+ (0.714286, 0.899735, 0.899735) ,
+ (0.730159, 0.905597, 0.905597) ,
+ (0.746032, 0.911421, 0.911421) ,
+ (0.761905, 0.917208, 0.917208) ,
+ (0.777778, 0.922958, 0.922958) ,
+ (0.793651, 0.928673, 0.928673) ,
+ (0.809524, 0.934353, 0.934353) ,
+ (0.825397, 0.939999, 0.939999) ,
+ (0.84127, 0.945611, 0.945611) ,
+ (0.857143, 0.95119, 0.95119) ,
+ (0.873016, 0.956736, 0.956736) ,
+ (0.888889, 0.96225, 0.96225) ,
+ (0.904762, 0.967733, 0.967733) ,
+ (0.920635, 0.973185, 0.973185) ,
+ (0.936508, 0.978607, 0.978607) ,
+ (0.952381, 0.983999, 0.983999) ,
+ (0.968254, 0.989361, 0.989361) ,
+ (0.984127, 0.994695, 0.994695) ,
+ (1.0, 1.0, 1.0)
+ },
+ new triple[] { // green
+ (0.0, 0.0, 0.0) ,
+ (0.015873, 0.102869, 0.102869) ,
+ (0.031746, 0.145479, 0.145479) ,
+ (0.047619, 0.178174, 0.178174) ,
+ (0.063492, 0.205738, 0.205738) ,
+ (0.079365, 0.230022, 0.230022) ,
+ (0.095238, 0.251976, 0.251976) ,
+ (0.111111, 0.272166, 0.272166) ,
+ (0.126984, 0.290957, 0.290957) ,
+ (0.142857, 0.308607, 0.308607) ,
+ (0.15873, 0.3253, 0.3253) ,
+ (0.174603, 0.341178, 0.341178) ,
+ (0.190476, 0.356348, 0.356348) ,
+ (0.206349, 0.370899, 0.370899) ,
+ (0.222222, 0.3849, 0.3849) ,
+ (0.238095, 0.39841, 0.39841) ,
+ (0.253968, 0.411476, 0.411476) ,
+ (0.269841, 0.424139, 0.424139) ,
+ (0.285714, 0.436436, 0.436436) ,
+ (0.301587, 0.448395, 0.448395) ,
+ (0.31746, 0.460044, 0.460044) ,
+ (0.333333, 0.471405, 0.471405) ,
+ (0.349206, 0.482498, 0.482498) ,
+ (0.365079, 0.493342, 0.493342) ,
+ (0.380952, 0.517549, 0.517549) ,
+ (0.396825, 0.540674, 0.540674) ,
+ (0.412698, 0.562849, 0.562849) ,
+ (0.428571, 0.584183, 0.584183) ,
+ (0.444444, 0.604765, 0.604765) ,
+ (0.460317, 0.624669, 0.624669) ,
+ (0.47619, 0.643958, 0.643958) ,
+ (0.492063, 0.662687, 0.662687) ,
+ (0.507937, 0.6809, 0.6809) ,
+ (0.52381, 0.698638, 0.698638) ,
+ (0.539683, 0.715937, 0.715937) ,
+ (0.555556, 0.732828, 0.732828) ,
+ (0.571429, 0.749338, 0.749338) ,
+ (0.587302, 0.765493, 0.765493) ,
+ (0.603175, 0.781313, 0.781313) ,
+ (0.619048, 0.796819, 0.796819) ,
+ (0.634921, 0.812029, 0.812029) ,
+ (0.650794, 0.82696, 0.82696) ,
+ (0.666667, 0.841625, 0.841625) ,
+ (0.68254, 0.85604, 0.85604) ,
+ (0.698413, 0.870216, 0.870216) ,
+ (0.714286, 0.884164, 0.884164) ,
+ (0.730159, 0.897896, 0.897896) ,
+ (0.746032, 0.911421, 0.911421) ,
+ (0.761905, 0.917208, 0.917208) ,
+ (0.777778, 0.922958, 0.922958) ,
+ (0.793651, 0.928673, 0.928673) ,
+ (0.809524, 0.934353, 0.934353) ,
+ (0.825397, 0.939999, 0.939999) ,
+ (0.84127, 0.945611, 0.945611) ,
+ (0.857143, 0.95119, 0.95119) ,
+ (0.873016, 0.956736, 0.956736) ,
+ (0.888889, 0.96225, 0.96225) ,
+ (0.904762, 0.967733, 0.967733) ,
+ (0.920635, 0.973185, 0.973185) ,
+ (0.936508, 0.978607, 0.978607) ,
+ (0.952381, 0.983999, 0.983999) ,
+ (0.968254, 0.989361, 0.989361) ,
+ (0.984127, 0.994695, 0.994695) ,
+ (1.0, 1.0, 1.0)
+ },
+ new triple[] { // blue
+ (0.0, 0.0, 0.0) ,
+ (0.015873, 0.102869, 0.102869) ,
+ (0.031746, 0.145479, 0.145479) ,
+ (0.047619, 0.178174, 0.178174) ,
+ (0.063492, 0.205738, 0.205738) ,
+ (0.079365, 0.230022, 0.230022) ,
+ (0.095238, 0.251976, 0.251976) ,
+ (0.111111, 0.272166, 0.272166) ,
+ (0.126984, 0.290957, 0.290957) ,
+ (0.142857, 0.308607, 0.308607) ,
+ (0.15873, 0.3253, 0.3253) ,
+ (0.174603, 0.341178, 0.341178) ,
+ (0.190476, 0.356348, 0.356348) ,
+ (0.206349, 0.370899, 0.370899) ,
+ (0.222222, 0.3849, 0.3849) ,
+ (0.238095, 0.39841, 0.39841) ,
+ (0.253968, 0.411476, 0.411476) ,
+ (0.269841, 0.424139, 0.424139) ,
+ (0.285714, 0.436436, 0.436436) ,
+ (0.301587, 0.448395, 0.448395) ,
+ (0.31746, 0.460044, 0.460044) ,
+ (0.333333, 0.471405, 0.471405) ,
+ (0.349206, 0.482498, 0.482498) ,
+ (0.365079, 0.493342, 0.493342) ,
+ (0.380952, 0.503953, 0.503953) ,
+ (0.396825, 0.514344, 0.514344) ,
+ (0.412698, 0.524531, 0.524531) ,
+ (0.428571, 0.534522, 0.534522) ,
+ (0.444444, 0.544331, 0.544331) ,
+ (0.460317, 0.553966, 0.553966) ,
+ (0.47619, 0.563436, 0.563436) ,
+ (0.492063, 0.57275, 0.57275) ,
+ (0.507937, 0.581914, 0.581914) ,
+ (0.52381, 0.590937, 0.590937) ,
+ (0.539683, 0.599824, 0.599824) ,
+ (0.555556, 0.608581, 0.608581) ,
+ (0.571429, 0.617213, 0.617213) ,
+ (0.587302, 0.625727, 0.625727) ,
+ (0.603175, 0.634126, 0.634126) ,
+ (0.619048, 0.642416, 0.642416) ,
+ (0.634921, 0.6506, 0.6506) ,
+ (0.650794, 0.658682, 0.658682) ,
+ (0.666667, 0.666667, 0.666667) ,
+ (0.68254, 0.674556, 0.674556) ,
+ (0.698413, 0.682355, 0.682355) ,
+ (0.714286, 0.690066, 0.690066) ,
+ (0.730159, 0.697691, 0.697691) ,
+ (0.746032, 0.705234, 0.705234) ,
+ (0.761905, 0.727166, 0.727166) ,
+ (0.777778, 0.748455, 0.748455) ,
+ (0.793651, 0.769156, 0.769156) ,
+ (0.809524, 0.789314, 0.789314) ,
+ (0.825397, 0.808969, 0.808969) ,
+ (0.84127, 0.828159, 0.828159) ,
+ (0.857143, 0.846913, 0.846913) ,
+ (0.873016, 0.865261, 0.865261) ,
+ (0.888889, 0.883229, 0.883229) ,
+ (0.904762, 0.900837, 0.900837) ,
+ (0.920635, 0.918109, 0.918109) ,
+ (0.936508, 0.935061, 0.935061) ,
+ (0.952381, 0.951711, 0.951711) ,
+ (0.968254, 0.968075, 0.968075) ,
+ (0.984127, 0.984167, 0.984167) ,
+ (1.0, 1.0, 1.0)
+ }
+ );
list_data seismic = list_data(new pen[] {
- rgb (0.0, 0.0, 0.3) ,
- rgb (0.0, 0.0, 1.0) ,
- rgb (1.0, 1.0, 1.0) ,
- rgb (1.0, 0.0, 0.0) ,
- rgb (0.5, 0.0, 0.0)
-});
+ rgb (0.0, 0.0, 0.3) ,
+ rgb (0.0, 0.0, 1.0) ,
+ rgb (1.0, 1.0, 1.0) ,
+ rgb (1.0, 0.0, 0.0) ,
+ rgb (0.5, 0.0, 0.0)
+ });
seg_data spring = seg_data(
- new triple[] { // red
- (0.0, 1.0, 1.0) ,
- (1.0, 1.0, 1.0)
- },
- new triple[] { // green
- (0.0, 0.0, 0.0) ,
- (1.0, 1.0, 1.0)
- },
- new triple[] { // blue
- (0.0, 1.0, 1.0) ,
- (1.0, 0.0, 0.0)
- }
-);
+ new triple[] { // red
+ (0.0, 1.0, 1.0) ,
+ (1.0, 1.0, 1.0)
+ },
+ new triple[] { // green
+ (0.0, 0.0, 0.0) ,
+ (1.0, 1.0, 1.0)
+ },
+ new triple[] { // blue
+ (0.0, 1.0, 1.0) ,
+ (1.0, 0.0, 0.0)
+ }
+ );
seg_data summer = seg_data(
- new triple[] { // red
- (0.0, 0.0, 0.0) ,
- (1.0, 1.0, 1.0)
- },
- new triple[] { // green
- (0.0, 0.5, 0.5) ,
- (1.0, 1.0, 1.0)
- },
- new triple[] { // blue
- (0.0, 0.4, 0.4) ,
- (1.0, 0.4, 0.4)
- }
-);
+ new triple[] { // red
+ (0.0, 0.0, 0.0) ,
+ (1.0, 1.0, 1.0)
+ },
+ new triple[] { // green
+ (0.0, 0.5, 0.5) ,
+ (1.0, 1.0, 1.0)
+ },
+ new triple[] { // blue
+ (0.0, 0.4, 0.4) ,
+ (1.0, 0.4, 0.4)
+ }
+ );
list_data tab10 = list_data(new pen[] {
- rgb (0.12156862745098039, 0.4666666666666667, 0.7058823529411765) ,
- rgb (1.0, 0.4980392156862745, 0.054901960784313725) ,
- rgb (0.17254901960784313, 0.6274509803921569, 0.17254901960784313) ,
- rgb (0.8392156862745098, 0.15294117647058825, 0.1568627450980392) ,
- rgb (0.5803921568627451, 0.403921568627451, 0.7411764705882353) ,
- rgb (0.5490196078431373, 0.33725490196078434, 0.29411764705882354) ,
- rgb (0.8901960784313725, 0.4666666666666667, 0.7607843137254902) ,
- rgb (0.4980392156862745, 0.4980392156862745, 0.4980392156862745) ,
- rgb (0.7372549019607844, 0.7411764705882353, 0.13333333333333333) ,
- rgb (0.09019607843137255, 0.7450980392156863, 0.8117647058823529)
-});
+ rgb (0.12156862745098039, 0.4666666666666667, 0.7058823529411765) ,
+ rgb (1.0, 0.4980392156862745, 0.054901960784313725) ,
+ rgb (0.17254901960784313, 0.6274509803921569, 0.17254901960784313) ,
+ rgb (0.8392156862745098, 0.15294117647058825, 0.1568627450980392) ,
+ rgb (0.5803921568627451, 0.403921568627451, 0.7411764705882353) ,
+ rgb (0.5490196078431373, 0.33725490196078434, 0.29411764705882354) ,
+ rgb (0.8901960784313725, 0.4666666666666667, 0.7607843137254902) ,
+ rgb (0.4980392156862745, 0.4980392156862745, 0.4980392156862745) ,
+ rgb (0.7372549019607844, 0.7411764705882353, 0.13333333333333333) ,
+ rgb (0.09019607843137255, 0.7450980392156863, 0.8117647058823529)
+ });
list_data tab20 = list_data(new pen[] {
- rgb (0.12156862745098039, 0.4666666666666667, 0.7058823529411765) ,
- rgb (0.6823529411764706, 0.7803921568627451, 0.9098039215686274) ,
- rgb (1.0, 0.4980392156862745, 0.054901960784313725) ,
- rgb (1.0, 0.7333333333333333, 0.47058823529411764) ,
- rgb (0.17254901960784313, 0.6274509803921569, 0.17254901960784313) ,
- rgb (0.596078431372549, 0.8745098039215686, 0.5411764705882353) ,
- rgb (0.8392156862745098, 0.15294117647058825, 0.1568627450980392) ,
- rgb (1.0, 0.596078431372549, 0.5882352941176471) ,
- rgb (0.5803921568627451, 0.403921568627451, 0.7411764705882353) ,
- rgb (0.7725490196078432, 0.6901960784313725, 0.8352941176470589) ,
- rgb (0.5490196078431373, 0.33725490196078434, 0.29411764705882354) ,
- rgb (0.7686274509803922, 0.611764705882353, 0.5803921568627451) ,
- rgb (0.8901960784313725, 0.4666666666666667, 0.7607843137254902) ,
- rgb (0.9686274509803922, 0.7137254901960784, 0.8235294117647058) ,
- rgb (0.4980392156862745, 0.4980392156862745, 0.4980392156862745) ,
- rgb (0.7803921568627451, 0.7803921568627451, 0.7803921568627451) ,
- rgb (0.7372549019607844, 0.7411764705882353, 0.13333333333333333) ,
- rgb (0.8588235294117647, 0.8588235294117647, 0.5529411764705883) ,
- rgb (0.09019607843137255, 0.7450980392156863, 0.8117647058823529) ,
- rgb (0.6196078431372549, 0.8549019607843137, 0.8980392156862745)
-});
+ rgb (0.12156862745098039, 0.4666666666666667, 0.7058823529411765) ,
+ rgb (0.6823529411764706, 0.7803921568627451, 0.9098039215686274) ,
+ rgb (1.0, 0.4980392156862745, 0.054901960784313725) ,
+ rgb (1.0, 0.7333333333333333, 0.47058823529411764) ,
+ rgb (0.17254901960784313, 0.6274509803921569, 0.17254901960784313) ,
+ rgb (0.596078431372549, 0.8745098039215686, 0.5411764705882353) ,
+ rgb (0.8392156862745098, 0.15294117647058825, 0.1568627450980392) ,
+ rgb (1.0, 0.596078431372549, 0.5882352941176471) ,
+ rgb (0.5803921568627451, 0.403921568627451, 0.7411764705882353) ,
+ rgb (0.7725490196078432, 0.6901960784313725, 0.8352941176470589) ,
+ rgb (0.5490196078431373, 0.33725490196078434, 0.29411764705882354) ,
+ rgb (0.7686274509803922, 0.611764705882353, 0.5803921568627451) ,
+ rgb (0.8901960784313725, 0.4666666666666667, 0.7607843137254902) ,
+ rgb (0.9686274509803922, 0.7137254901960784, 0.8235294117647058) ,
+ rgb (0.4980392156862745, 0.4980392156862745, 0.4980392156862745) ,
+ rgb (0.7803921568627451, 0.7803921568627451, 0.7803921568627451) ,
+ rgb (0.7372549019607844, 0.7411764705882353, 0.13333333333333333) ,
+ rgb (0.8588235294117647, 0.8588235294117647, 0.5529411764705883) ,
+ rgb (0.09019607843137255, 0.7450980392156863, 0.8117647058823529) ,
+ rgb (0.6196078431372549, 0.8549019607843137, 0.8980392156862745)
+ });
list_data tab20b = list_data(new pen[] {
- rgb (0.2235294117647059, 0.23137254901960785, 0.4745098039215686) ,
- rgb (0.3215686274509804, 0.32941176470588235, 0.6392156862745098) ,
- rgb (0.4196078431372549, 0.43137254901960786, 0.8117647058823529) ,
- rgb (0.611764705882353, 0.6196078431372549, 0.8705882352941177) ,
- rgb (0.38823529411764707, 0.4745098039215686, 0.2235294117647059) ,
- rgb (0.5490196078431373, 0.6352941176470588, 0.3215686274509804) ,
- rgb (0.7098039215686275, 0.8117647058823529, 0.4196078431372549) ,
- rgb (0.807843137254902, 0.8588235294117647, 0.611764705882353) ,
- rgb (0.5490196078431373, 0.42745098039215684, 0.19215686274509805) ,
- rgb (0.7411764705882353, 0.6196078431372549, 0.2235294117647059) ,
- rgb (0.9058823529411765, 0.7294117647058823, 0.3215686274509804) ,
- rgb (0.9058823529411765, 0.796078431372549, 0.5803921568627451) ,
- rgb (0.5176470588235295, 0.23529411764705882, 0.2235294117647059) ,
- rgb (0.6784313725490196, 0.28627450980392155, 0.2901960784313726) ,
- rgb (0.8392156862745098, 0.3803921568627451, 0.4196078431372549) ,
- rgb (0.9058823529411765, 0.5882352941176471, 0.611764705882353) ,
- rgb (0.4823529411764706, 0.2549019607843137, 0.45098039215686275) ,
- rgb (0.6470588235294118, 0.3176470588235294, 0.5803921568627451) ,
- rgb (0.807843137254902, 0.42745098039215684, 0.7411764705882353) ,
- rgb (0.8705882352941177, 0.6196078431372549, 0.8392156862745098)
-});
+ rgb (0.2235294117647059, 0.23137254901960785, 0.4745098039215686) ,
+ rgb (0.3215686274509804, 0.32941176470588235, 0.6392156862745098) ,
+ rgb (0.4196078431372549, 0.43137254901960786, 0.8117647058823529) ,
+ rgb (0.611764705882353, 0.6196078431372549, 0.8705882352941177) ,
+ rgb (0.38823529411764707, 0.4745098039215686, 0.2235294117647059) ,
+ rgb (0.5490196078431373, 0.6352941176470588, 0.3215686274509804) ,
+ rgb (0.7098039215686275, 0.8117647058823529, 0.4196078431372549) ,
+ rgb (0.807843137254902, 0.8588235294117647, 0.611764705882353) ,
+ rgb (0.5490196078431373, 0.42745098039215684, 0.19215686274509805) ,
+ rgb (0.7411764705882353, 0.6196078431372549, 0.2235294117647059) ,
+ rgb (0.9058823529411765, 0.7294117647058823, 0.3215686274509804) ,
+ rgb (0.9058823529411765, 0.796078431372549, 0.5803921568627451) ,
+ rgb (0.5176470588235295, 0.23529411764705882, 0.2235294117647059) ,
+ rgb (0.6784313725490196, 0.28627450980392155, 0.2901960784313726) ,
+ rgb (0.8392156862745098, 0.3803921568627451, 0.4196078431372549) ,
+ rgb (0.9058823529411765, 0.5882352941176471, 0.611764705882353) ,
+ rgb (0.4823529411764706, 0.2549019607843137, 0.45098039215686275) ,
+ rgb (0.6470588235294118, 0.3176470588235294, 0.5803921568627451) ,
+ rgb (0.807843137254902, 0.42745098039215684, 0.7411764705882353) ,
+ rgb (0.8705882352941177, 0.6196078431372549, 0.8392156862745098)
+ });
list_data tab20c = list_data(new pen[] {
- rgb (0.19215686274509805, 0.5098039215686274, 0.7411764705882353) ,
- rgb (0.4196078431372549, 0.6823529411764706, 0.8392156862745098) ,
- rgb (0.6196078431372549, 0.792156862745098, 0.8823529411764706) ,
- rgb (0.7764705882352941, 0.8588235294117647, 0.9372549019607843) ,
- rgb (0.9019607843137255, 0.3333333333333333, 0.050980392156862744) ,
- rgb (0.9921568627450981, 0.5529411764705883, 0.23529411764705882) ,
- rgb (0.9921568627450981, 0.6823529411764706, 0.4196078431372549) ,
- rgb (0.9921568627450981, 0.8156862745098039, 0.6352941176470588) ,
- rgb (0.19215686274509805, 0.6392156862745098, 0.32941176470588235) ,
- rgb (0.4549019607843137, 0.7686274509803922, 0.4627450980392157) ,
- rgb (0.6313725490196078, 0.8509803921568627, 0.6078431372549019) ,
- rgb (0.7803921568627451, 0.9137254901960784, 0.7529411764705882) ,
- rgb (0.4588235294117647, 0.4196078431372549, 0.6941176470588235) ,
- rgb (0.6196078431372549, 0.6039215686274509, 0.7843137254901961) ,
- rgb (0.7372549019607844, 0.7411764705882353, 0.8627450980392157) ,
- rgb (0.8549019607843137, 0.8549019607843137, 0.9215686274509803) ,
- rgb (0.38823529411764707, 0.38823529411764707, 0.38823529411764707) ,
- rgb (0.5882352941176471, 0.5882352941176471, 0.5882352941176471) ,
- rgb (0.7411764705882353, 0.7411764705882353, 0.7411764705882353) ,
- rgb (0.8509803921568627, 0.8509803921568627, 0.8509803921568627)
-});
+ rgb (0.19215686274509805, 0.5098039215686274, 0.7411764705882353) ,
+ rgb (0.4196078431372549, 0.6823529411764706, 0.8392156862745098) ,
+ rgb (0.6196078431372549, 0.792156862745098, 0.8823529411764706) ,
+ rgb (0.7764705882352941, 0.8588235294117647, 0.9372549019607843) ,
+ rgb (0.9019607843137255, 0.3333333333333333, 0.050980392156862744) ,
+ rgb (0.9921568627450981, 0.5529411764705883, 0.23529411764705882) ,
+ rgb (0.9921568627450981, 0.6823529411764706, 0.4196078431372549) ,
+ rgb (0.9921568627450981, 0.8156862745098039, 0.6352941176470588) ,
+ rgb (0.19215686274509805, 0.6392156862745098, 0.32941176470588235) ,
+ rgb (0.4549019607843137, 0.7686274509803922, 0.4627450980392157) ,
+ rgb (0.6313725490196078, 0.8509803921568627, 0.6078431372549019) ,
+ rgb (0.7803921568627451, 0.9137254901960784, 0.7529411764705882) ,
+ rgb (0.4588235294117647, 0.4196078431372549, 0.6941176470588235) ,
+ rgb (0.6196078431372549, 0.6039215686274509, 0.7843137254901961) ,
+ rgb (0.7372549019607844, 0.7411764705882353, 0.8627450980392157) ,
+ rgb (0.8549019607843137, 0.8549019607843137, 0.9215686274509803) ,
+ rgb (0.38823529411764707, 0.38823529411764707, 0.38823529411764707) ,
+ rgb (0.5882352941176471, 0.5882352941176471, 0.5882352941176471) ,
+ rgb (0.7411764705882353, 0.7411764705882353, 0.7411764705882353) ,
+ rgb (0.8509803921568627, 0.8509803921568627, 0.8509803921568627)
+ });
seg_data winter = seg_data(
- new triple[] { // red
- (0.0, 0.0, 0.0) ,
- (1.0, 0.0, 0.0)
- },
- new triple[] { // green
- (0.0, 0.0, 0.0) ,
- (1.0, 1.0, 1.0)
- },
- new triple[] { // blue
- (0.0, 1.0, 1.0) ,
- (1.0, 0.5, 0.5)
- }
-);
+ new triple[] { // red
+ (0.0, 0.0, 0.0) ,
+ (1.0, 0.0, 0.0)
+ },
+ new triple[] { // green
+ (0.0, 0.0, 0.0) ,
+ (1.0, 1.0, 1.0)
+ },
+ new triple[] { // blue
+ (0.0, 1.0, 1.0) ,
+ (1.0, 0.5, 0.5)
+ }
+ );
seg_data wistia = seg_data(
- new triple[] { // red
- (0.0, 0.8941176470588236, 0.8941176470588236) ,
- (0.25, 1.0, 1.0) ,
- (0.5, 1.0, 1.0) ,
- (0.75, 1.0, 1.0) ,
- (1.0, 0.9882352941176471, 0.9882352941176471)
- },
- new triple[] { // green
- (0.0, 1.0, 1.0) ,
- (0.25, 0.9098039215686274, 0.9098039215686274) ,
- (0.5, 0.7411764705882353, 0.7411764705882353) ,
- (0.75, 0.6274509803921569, 0.6274509803921569) ,
- (1.0, 0.4980392156862745, 0.4980392156862745)
- },
- new triple[] { // blue
- (0.0, 0.47843137254901963, 0.47843137254901963) ,
- (0.25, 0.10196078431372549, 0.10196078431372549) ,
- (0.5, 0.0, 0.0) ,
- (0.75, 0.0, 0.0) ,
- (1.0, 0.0, 0.0)
- }
-);
+ new triple[] { // red
+ (0.0, 0.8941176470588236, 0.8941176470588236) ,
+ (0.25, 1.0, 1.0) ,
+ (0.5, 1.0, 1.0) ,
+ (0.75, 1.0, 1.0) ,
+ (1.0, 0.9882352941176471, 0.9882352941176471)
+ },
+ new triple[] { // green
+ (0.0, 1.0, 1.0) ,
+ (0.25, 0.9098039215686274, 0.9098039215686274) ,
+ (0.5, 0.7411764705882353, 0.7411764705882353) ,
+ (0.75, 0.6274509803921569, 0.6274509803921569) ,
+ (1.0, 0.4980392156862745, 0.4980392156862745)
+ },
+ new triple[] { // blue
+ (0.0, 0.47843137254901963, 0.47843137254901963) ,
+ (0.25, 0.10196078431372549, 0.10196078431372549) ,
+ (0.5, 0.0, 0.0) ,
+ (0.75, 0.0, 0.0) ,
+ (1.0, 0.0, 0.0)
+ }
+ );
list_data cividis = list_data(new pen[] {
- rgb (0.0, 0.135112, 0.304751) ,
- rgb (0.0, 0.138068, 0.311105) ,
- rgb (0.0, 0.141013, 0.317579) ,
- rgb (0.0, 0.143951, 0.323982) ,
- rgb (0.0, 0.146877, 0.330479) ,
- rgb (0.0, 0.149791, 0.337065) ,
- rgb (0.0, 0.152673, 0.343704) ,
- rgb (0.0, 0.155377, 0.3505) ,
- rgb (0.0, 0.157932, 0.357521) ,
- rgb (0.0, 0.160495, 0.364534) ,
- rgb (0.0, 0.163058, 0.371608) ,
- rgb (0.0, 0.165621, 0.378769) ,
- rgb (0.0, 0.168204, 0.385902) ,
- rgb (0.0, 0.1708, 0.3931) ,
- rgb (0.0, 0.17342, 0.400353) ,
- rgb (0.0, 0.176082, 0.407577) ,
- rgb (0.0, 0.178802, 0.414764) ,
- rgb (0.0, 0.18161, 0.421859) ,
- rgb (0.0, 0.18455, 0.428802) ,
- rgb (0.0, 0.186915, 0.435532) ,
- rgb (0.0, 0.188769, 0.439563) ,
- rgb (0.0, 0.19095, 0.441085) ,
- rgb (0.0, 0.193366, 0.441561) ,
- rgb (0.003602, 0.195911, 0.441564) ,
- rgb (0.017852, 0.198528, 0.441248) ,
- rgb (0.03211, 0.201199, 0.440785) ,
- rgb (0.046205, 0.203903, 0.440196) ,
- rgb (0.058378, 0.206629, 0.439531) ,
- rgb (0.068968, 0.209372, 0.438863) ,
- rgb (0.078624, 0.212122, 0.438105) ,
- rgb (0.087465, 0.214879, 0.437342) ,
- rgb (0.095645, 0.217643, 0.436593) ,
- rgb (0.103401, 0.220406, 0.43579) ,
- rgb (0.110658, 0.22317, 0.435067) ,
- rgb (0.117612, 0.225935, 0.434308) ,
- rgb (0.124291, 0.228697, 0.433547) ,
- rgb (0.130669, 0.231458, 0.43284) ,
- rgb (0.13683, 0.234216, 0.432148) ,
- rgb (0.142852, 0.236972, 0.431404) ,
- rgb (0.148638, 0.239724, 0.430752) ,
- rgb (0.154261, 0.242475, 0.43012) ,
- rgb (0.159733, 0.245221, 0.429528) ,
- rgb (0.165113, 0.247965, 0.428908) ,
- rgb (0.170362, 0.250707, 0.428325) ,
- rgb (0.17549, 0.253444, 0.42779) ,
- rgb (0.180503, 0.25618, 0.427299) ,
- rgb (0.185453, 0.258914, 0.426788) ,
- rgb (0.190303, 0.261644, 0.426329) ,
- rgb (0.195057, 0.264372, 0.425924) ,
- rgb (0.199764, 0.267099, 0.425497) ,
- rgb (0.204385, 0.269823, 0.425126) ,
- rgb (0.208926, 0.272546, 0.424809) ,
- rgb (0.213431, 0.275266, 0.42448) ,
- rgb (0.217863, 0.277985, 0.424206) ,
- rgb (0.222264, 0.280702, 0.423914) ,
- rgb (0.226598, 0.283419, 0.423678) ,
- rgb (0.230871, 0.286134, 0.423498) ,
- rgb (0.23512, 0.288848, 0.423304) ,
- rgb (0.239312, 0.291562, 0.423167) ,
- rgb (0.243485, 0.294274, 0.423014) ,
- rgb (0.247605, 0.296986, 0.422917) ,
- rgb (0.251675, 0.299698, 0.422873) ,
- rgb (0.255731, 0.302409, 0.422814) ,
- rgb (0.25974, 0.30512, 0.42281) ,
- rgb (0.263738, 0.307831, 0.422789) ,
- rgb (0.267693, 0.310542, 0.422821) ,
- rgb (0.271639, 0.313253, 0.422837) ,
- rgb (0.275513, 0.315965, 0.422979) ,
- rgb (0.279411, 0.318677, 0.423031) ,
- rgb (0.28324, 0.32139, 0.423211) ,
- rgb (0.287065, 0.324103, 0.423373) ,
- rgb (0.290884, 0.326816, 0.423517) ,
- rgb (0.294669, 0.329531, 0.423716) ,
- rgb (0.298421, 0.332247, 0.423973) ,
- rgb (0.302169, 0.334963, 0.424213) ,
- rgb (0.305886, 0.337681, 0.424512) ,
- rgb (0.309601, 0.340399, 0.42479) ,
- rgb (0.313287, 0.34312, 0.42512) ,
- rgb (0.316941, 0.345842, 0.425512) ,
- rgb (0.320595, 0.348565, 0.425889) ,
- rgb (0.32425, 0.351289, 0.42625) ,
- rgb (0.327875, 0.354016, 0.42667) ,
- rgb (0.331474, 0.356744, 0.427144) ,
- rgb (0.335073, 0.359474, 0.427605) ,
- rgb (0.338673, 0.362206, 0.428053) ,
- rgb (0.342246, 0.364939, 0.428559) ,
- rgb (0.345793, 0.367676, 0.429127) ,
- rgb (0.349341, 0.370414, 0.429685) ,
- rgb (0.352892, 0.373153, 0.430226) ,
- rgb (0.356418, 0.375896, 0.430823) ,
- rgb (0.359916, 0.378641, 0.431501) ,
- rgb (0.363446, 0.381388, 0.432075) ,
- rgb (0.366923, 0.384139, 0.432796) ,
- rgb (0.37043, 0.38689, 0.433428) ,
- rgb (0.373884, 0.389646, 0.434209) ,
- rgb (0.377371, 0.392404, 0.43489) ,
- rgb (0.38083, 0.395164, 0.435653) ,
- rgb (0.384268, 0.397928, 0.436475) ,
- rgb (0.387705, 0.400694, 0.437305) ,
- rgb (0.391151, 0.403464, 0.438096) ,
- rgb (0.394568, 0.406236, 0.438986) ,
- rgb (0.397991, 0.409011, 0.439848) ,
- rgb (0.401418, 0.41179, 0.440708) ,
- rgb (0.40482, 0.414572, 0.441642) ,
- rgb (0.408226, 0.417357, 0.44257) ,
- rgb (0.411607, 0.420145, 0.443577) ,
- rgb (0.414992, 0.422937, 0.444578) ,
- rgb (0.418383, 0.425733, 0.44556) ,
- rgb (0.421748, 0.428531, 0.44664) ,
- rgb (0.42512, 0.431334, 0.447692) ,
- rgb (0.428462, 0.43414, 0.448864) ,
- rgb (0.431817, 0.43695, 0.449982) ,
- rgb (0.435168, 0.439763, 0.451134) ,
- rgb (0.438504, 0.44258, 0.452341) ,
- rgb (0.44181, 0.445402, 0.453659) ,
- rgb (0.445148, 0.448226, 0.454885) ,
- rgb (0.448447, 0.451053, 0.456264) ,
- rgb (0.451759, 0.453887, 0.457582) ,
- rgb (0.455072, 0.456718, 0.458976) ,
- rgb (0.458366, 0.459552, 0.460457) ,
- rgb (0.461616, 0.462405, 0.461969) ,
- rgb (0.464947, 0.465241, 0.463395) ,
- rgb (0.468254, 0.468083, 0.464908) ,
- rgb (0.471501, 0.47096, 0.466357) ,
- rgb (0.474812, 0.473832, 0.467681) ,
- rgb (0.478186, 0.476699, 0.468845) ,
- rgb (0.481622, 0.479573, 0.469767) ,
- rgb (0.485141, 0.482451, 0.470384) ,
- rgb (0.488697, 0.485318, 0.471008) ,
- rgb (0.492278, 0.488198, 0.471453) ,
- rgb (0.495913, 0.491076, 0.471751) ,
- rgb (0.499552, 0.49396, 0.472032) ,
- rgb (0.503185, 0.496851, 0.472305) ,
- rgb (0.506866, 0.499743, 0.472432) ,
- rgb (0.51054, 0.502643, 0.47255) ,
- rgb (0.514226, 0.505546, 0.47264) ,
- rgb (0.51792, 0.508454, 0.472707) ,
- rgb (0.521643, 0.511367, 0.472639) ,
- rgb (0.525348, 0.514285, 0.47266) ,
- rgb (0.529086, 0.517207, 0.472543) ,
- rgb (0.532829, 0.520135, 0.472401) ,
- rgb (0.536553, 0.523067, 0.472352) ,
- rgb (0.540307, 0.526005, 0.472163) ,
- rgb (0.544069, 0.528948, 0.471947) ,
- rgb (0.54784, 0.531895, 0.471704) ,
- rgb (0.551612, 0.534849, 0.471439) ,
- rgb (0.555393, 0.537807, 0.471147) ,
- rgb (0.559181, 0.540771, 0.470829) ,
- rgb (0.562972, 0.543741, 0.470488) ,
- rgb (0.566802, 0.546715, 0.469988) ,
- rgb (0.570607, 0.549695, 0.469593) ,
- rgb (0.574417, 0.552682, 0.469172) ,
- rgb (0.578236, 0.555673, 0.468724) ,
- rgb (0.582087, 0.55867, 0.468118) ,
- rgb (0.585916, 0.561674, 0.467618) ,
- rgb (0.589753, 0.564682, 0.46709) ,
- rgb (0.593622, 0.567697, 0.466401) ,
- rgb (0.597469, 0.570718, 0.465821) ,
- rgb (0.601354, 0.573743, 0.465074) ,
- rgb (0.605211, 0.576777, 0.464441) ,
- rgb (0.609105, 0.579816, 0.463638) ,
- rgb (0.612977, 0.582861, 0.46295) ,
- rgb (0.616852, 0.585913, 0.462237) ,
- rgb (0.620765, 0.58897, 0.461351) ,
- rgb (0.624654, 0.592034, 0.460583) ,
- rgb (0.628576, 0.595104, 0.459641) ,
- rgb (0.632506, 0.59818, 0.458668) ,
- rgb (0.636412, 0.601264, 0.457818) ,
- rgb (0.640352, 0.604354, 0.456791) ,
- rgb (0.64427, 0.60745, 0.455886) ,
- rgb (0.648222, 0.610553, 0.454801) ,
- rgb (0.652178, 0.613664, 0.453689) ,
- rgb (0.656114, 0.61678, 0.452702) ,
- rgb (0.660082, 0.619904, 0.451534) ,
- rgb (0.664055, 0.623034, 0.450338) ,
- rgb (0.668008, 0.626171, 0.44927) ,
- rgb (0.671991, 0.629316, 0.448018) ,
- rgb (0.675981, 0.632468, 0.446736) ,
- rgb (0.679979, 0.635626, 0.445424) ,
- rgb (0.68395, 0.638793, 0.444251) ,
- rgb (0.687957, 0.641966, 0.442886) ,
- rgb (0.691971, 0.645145, 0.441491) ,
- rgb (0.695985, 0.648334, 0.440072) ,
- rgb (0.700008, 0.651529, 0.438624) ,
- rgb (0.704037, 0.654731, 0.437147) ,
- rgb (0.708067, 0.657942, 0.435647) ,
- rgb (0.712105, 0.66116, 0.434117) ,
- rgb (0.716177, 0.664384, 0.432386) ,
- rgb (0.720222, 0.667618, 0.430805) ,
- rgb (0.724274, 0.670859, 0.429194) ,
- rgb (0.728334, 0.674107, 0.427554) ,
- rgb (0.732422, 0.677364, 0.425717) ,
- rgb (0.736488, 0.680629, 0.424028) ,
- rgb (0.740589, 0.6839, 0.422131) ,
- rgb (0.744664, 0.687181, 0.420393) ,
- rgb (0.748772, 0.69047, 0.418448) ,
- rgb (0.752886, 0.693766, 0.416472) ,
- rgb (0.756975, 0.697071, 0.414659) ,
- rgb (0.761096, 0.700384, 0.412638) ,
- rgb (0.765223, 0.703705, 0.410587) ,
- rgb (0.769353, 0.707035, 0.408516) ,
- rgb (0.773486, 0.710373, 0.406422) ,
- rgb (0.777651, 0.713719, 0.404112) ,
- rgb (0.781795, 0.717074, 0.401966) ,
- rgb (0.785965, 0.720438, 0.399613) ,
- rgb (0.790116, 0.72381, 0.397423) ,
- rgb (0.794298, 0.72719, 0.395016) ,
- rgb (0.79848, 0.73058, 0.392597) ,
- rgb (0.802667, 0.733978, 0.390153) ,
- rgb (0.806859, 0.737385, 0.387684) ,
- rgb (0.811054, 0.740801, 0.385198) ,
- rgb (0.815274, 0.744226, 0.382504) ,
- rgb (0.819499, 0.747659, 0.379785) ,
- rgb (0.823729, 0.751101, 0.377043) ,
- rgb (0.827959, 0.754553, 0.374292) ,
- rgb (0.832192, 0.758014, 0.371529) ,
- rgb (0.836429, 0.761483, 0.368747) ,
- rgb (0.840693, 0.764962, 0.365746) ,
- rgb (0.844957, 0.76845, 0.362741) ,
- rgb (0.849223, 0.771947, 0.359729) ,
- rgb (0.853515, 0.775454, 0.3565) ,
- rgb (0.857809, 0.778969, 0.353259) ,
- rgb (0.862105, 0.782494, 0.350011) ,
- rgb (0.866421, 0.786028, 0.346571) ,
- rgb (0.870717, 0.789572, 0.343333) ,
- rgb (0.875057, 0.793125, 0.339685) ,
- rgb (0.879378, 0.796687, 0.336241) ,
- rgb (0.88372, 0.800258, 0.332599) ,
- rgb (0.888081, 0.803839, 0.32877) ,
- rgb (0.89244, 0.80743, 0.324968) ,
- rgb (0.896818, 0.81103, 0.320982) ,
- rgb (0.901195, 0.814639, 0.317021) ,
- rgb (0.905589, 0.818257, 0.312889) ,
- rgb (0.91, 0.821885, 0.308594) ,
- rgb (0.914407, 0.825522, 0.304348) ,
- rgb (0.918828, 0.829168, 0.29996) ,
- rgb (0.923279, 0.832822, 0.295244) ,
- rgb (0.927724, 0.836486, 0.290611) ,
- rgb (0.93218, 0.840159, 0.28588) ,
- rgb (0.93666, 0.843841, 0.280876) ,
- rgb (0.941147, 0.84753, 0.275815) ,
- rgb (0.945654, 0.851228, 0.270532) ,
- rgb (0.950178, 0.854933, 0.265085) ,
- rgb (0.954725, 0.858646, 0.259365) ,
- rgb (0.959284, 0.862365, 0.253563) ,
- rgb (0.963872, 0.866089, 0.247445) ,
- rgb (0.968469, 0.869819, 0.24131) ,
- rgb (0.973114, 0.87355, 0.234677) ,
- rgb (0.97778, 0.877281, 0.227954) ,
- rgb (0.982497, 0.881008, 0.220878) ,
- rgb (0.987293, 0.884718, 0.213336) ,
- rgb (0.992218, 0.888385, 0.205468) ,
- rgb (0.994847, 0.892954, 0.203445) ,
- rgb (0.995249, 0.898384, 0.207561) ,
- rgb (0.995503, 0.903866, 0.21237) ,
- rgb (0.995737, 0.909344, 0.217772)
-});
+ rgb (0.0, 0.135112, 0.304751) ,
+ rgb (0.0, 0.138068, 0.311105) ,
+ rgb (0.0, 0.141013, 0.317579) ,
+ rgb (0.0, 0.143951, 0.323982) ,
+ rgb (0.0, 0.146877, 0.330479) ,
+ rgb (0.0, 0.149791, 0.337065) ,
+ rgb (0.0, 0.152673, 0.343704) ,
+ rgb (0.0, 0.155377, 0.3505) ,
+ rgb (0.0, 0.157932, 0.357521) ,
+ rgb (0.0, 0.160495, 0.364534) ,
+ rgb (0.0, 0.163058, 0.371608) ,
+ rgb (0.0, 0.165621, 0.378769) ,
+ rgb (0.0, 0.168204, 0.385902) ,
+ rgb (0.0, 0.1708, 0.3931) ,
+ rgb (0.0, 0.17342, 0.400353) ,
+ rgb (0.0, 0.176082, 0.407577) ,
+ rgb (0.0, 0.178802, 0.414764) ,
+ rgb (0.0, 0.18161, 0.421859) ,
+ rgb (0.0, 0.18455, 0.428802) ,
+ rgb (0.0, 0.186915, 0.435532) ,
+ rgb (0.0, 0.188769, 0.439563) ,
+ rgb (0.0, 0.19095, 0.441085) ,
+ rgb (0.0, 0.193366, 0.441561) ,
+ rgb (0.003602, 0.195911, 0.441564) ,
+ rgb (0.017852, 0.198528, 0.441248) ,
+ rgb (0.03211, 0.201199, 0.440785) ,
+ rgb (0.046205, 0.203903, 0.440196) ,
+ rgb (0.058378, 0.206629, 0.439531) ,
+ rgb (0.068968, 0.209372, 0.438863) ,
+ rgb (0.078624, 0.212122, 0.438105) ,
+ rgb (0.087465, 0.214879, 0.437342) ,
+ rgb (0.095645, 0.217643, 0.436593) ,
+ rgb (0.103401, 0.220406, 0.43579) ,
+ rgb (0.110658, 0.22317, 0.435067) ,
+ rgb (0.117612, 0.225935, 0.434308) ,
+ rgb (0.124291, 0.228697, 0.433547) ,
+ rgb (0.130669, 0.231458, 0.43284) ,
+ rgb (0.13683, 0.234216, 0.432148) ,
+ rgb (0.142852, 0.236972, 0.431404) ,
+ rgb (0.148638, 0.239724, 0.430752) ,
+ rgb (0.154261, 0.242475, 0.43012) ,
+ rgb (0.159733, 0.245221, 0.429528) ,
+ rgb (0.165113, 0.247965, 0.428908) ,
+ rgb (0.170362, 0.250707, 0.428325) ,
+ rgb (0.17549, 0.253444, 0.42779) ,
+ rgb (0.180503, 0.25618, 0.427299) ,
+ rgb (0.185453, 0.258914, 0.426788) ,
+ rgb (0.190303, 0.261644, 0.426329) ,
+ rgb (0.195057, 0.264372, 0.425924) ,
+ rgb (0.199764, 0.267099, 0.425497) ,
+ rgb (0.204385, 0.269823, 0.425126) ,
+ rgb (0.208926, 0.272546, 0.424809) ,
+ rgb (0.213431, 0.275266, 0.42448) ,
+ rgb (0.217863, 0.277985, 0.424206) ,
+ rgb (0.222264, 0.280702, 0.423914) ,
+ rgb (0.226598, 0.283419, 0.423678) ,
+ rgb (0.230871, 0.286134, 0.423498) ,
+ rgb (0.23512, 0.288848, 0.423304) ,
+ rgb (0.239312, 0.291562, 0.423167) ,
+ rgb (0.243485, 0.294274, 0.423014) ,
+ rgb (0.247605, 0.296986, 0.422917) ,
+ rgb (0.251675, 0.299698, 0.422873) ,
+ rgb (0.255731, 0.302409, 0.422814) ,
+ rgb (0.25974, 0.30512, 0.42281) ,
+ rgb (0.263738, 0.307831, 0.422789) ,
+ rgb (0.267693, 0.310542, 0.422821) ,
+ rgb (0.271639, 0.313253, 0.422837) ,
+ rgb (0.275513, 0.315965, 0.422979) ,
+ rgb (0.279411, 0.318677, 0.423031) ,
+ rgb (0.28324, 0.32139, 0.423211) ,
+ rgb (0.287065, 0.324103, 0.423373) ,
+ rgb (0.290884, 0.326816, 0.423517) ,
+ rgb (0.294669, 0.329531, 0.423716) ,
+ rgb (0.298421, 0.332247, 0.423973) ,
+ rgb (0.302169, 0.334963, 0.424213) ,
+ rgb (0.305886, 0.337681, 0.424512) ,
+ rgb (0.309601, 0.340399, 0.42479) ,
+ rgb (0.313287, 0.34312, 0.42512) ,
+ rgb (0.316941, 0.345842, 0.425512) ,
+ rgb (0.320595, 0.348565, 0.425889) ,
+ rgb (0.32425, 0.351289, 0.42625) ,
+ rgb (0.327875, 0.354016, 0.42667) ,
+ rgb (0.331474, 0.356744, 0.427144) ,
+ rgb (0.335073, 0.359474, 0.427605) ,
+ rgb (0.338673, 0.362206, 0.428053) ,
+ rgb (0.342246, 0.364939, 0.428559) ,
+ rgb (0.345793, 0.367676, 0.429127) ,
+ rgb (0.349341, 0.370414, 0.429685) ,
+ rgb (0.352892, 0.373153, 0.430226) ,
+ rgb (0.356418, 0.375896, 0.430823) ,
+ rgb (0.359916, 0.378641, 0.431501) ,
+ rgb (0.363446, 0.381388, 0.432075) ,
+ rgb (0.366923, 0.384139, 0.432796) ,
+ rgb (0.37043, 0.38689, 0.433428) ,
+ rgb (0.373884, 0.389646, 0.434209) ,
+ rgb (0.377371, 0.392404, 0.43489) ,
+ rgb (0.38083, 0.395164, 0.435653) ,
+ rgb (0.384268, 0.397928, 0.436475) ,
+ rgb (0.387705, 0.400694, 0.437305) ,
+ rgb (0.391151, 0.403464, 0.438096) ,
+ rgb (0.394568, 0.406236, 0.438986) ,
+ rgb (0.397991, 0.409011, 0.439848) ,
+ rgb (0.401418, 0.41179, 0.440708) ,
+ rgb (0.40482, 0.414572, 0.441642) ,
+ rgb (0.408226, 0.417357, 0.44257) ,
+ rgb (0.411607, 0.420145, 0.443577) ,
+ rgb (0.414992, 0.422937, 0.444578) ,
+ rgb (0.418383, 0.425733, 0.44556) ,
+ rgb (0.421748, 0.428531, 0.44664) ,
+ rgb (0.42512, 0.431334, 0.447692) ,
+ rgb (0.428462, 0.43414, 0.448864) ,
+ rgb (0.431817, 0.43695, 0.449982) ,
+ rgb (0.435168, 0.439763, 0.451134) ,
+ rgb (0.438504, 0.44258, 0.452341) ,
+ rgb (0.44181, 0.445402, 0.453659) ,
+ rgb (0.445148, 0.448226, 0.454885) ,
+ rgb (0.448447, 0.451053, 0.456264) ,
+ rgb (0.451759, 0.453887, 0.457582) ,
+ rgb (0.455072, 0.456718, 0.458976) ,
+ rgb (0.458366, 0.459552, 0.460457) ,
+ rgb (0.461616, 0.462405, 0.461969) ,
+ rgb (0.464947, 0.465241, 0.463395) ,
+ rgb (0.468254, 0.468083, 0.464908) ,
+ rgb (0.471501, 0.47096, 0.466357) ,
+ rgb (0.474812, 0.473832, 0.467681) ,
+ rgb (0.478186, 0.476699, 0.468845) ,
+ rgb (0.481622, 0.479573, 0.469767) ,
+ rgb (0.485141, 0.482451, 0.470384) ,
+ rgb (0.488697, 0.485318, 0.471008) ,
+ rgb (0.492278, 0.488198, 0.471453) ,
+ rgb (0.495913, 0.491076, 0.471751) ,
+ rgb (0.499552, 0.49396, 0.472032) ,
+ rgb (0.503185, 0.496851, 0.472305) ,
+ rgb (0.506866, 0.499743, 0.472432) ,
+ rgb (0.51054, 0.502643, 0.47255) ,
+ rgb (0.514226, 0.505546, 0.47264) ,
+ rgb (0.51792, 0.508454, 0.472707) ,
+ rgb (0.521643, 0.511367, 0.472639) ,
+ rgb (0.525348, 0.514285, 0.47266) ,
+ rgb (0.529086, 0.517207, 0.472543) ,
+ rgb (0.532829, 0.520135, 0.472401) ,
+ rgb (0.536553, 0.523067, 0.472352) ,
+ rgb (0.540307, 0.526005, 0.472163) ,
+ rgb (0.544069, 0.528948, 0.471947) ,
+ rgb (0.54784, 0.531895, 0.471704) ,
+ rgb (0.551612, 0.534849, 0.471439) ,
+ rgb (0.555393, 0.537807, 0.471147) ,
+ rgb (0.559181, 0.540771, 0.470829) ,
+ rgb (0.562972, 0.543741, 0.470488) ,
+ rgb (0.566802, 0.546715, 0.469988) ,
+ rgb (0.570607, 0.549695, 0.469593) ,
+ rgb (0.574417, 0.552682, 0.469172) ,
+ rgb (0.578236, 0.555673, 0.468724) ,
+ rgb (0.582087, 0.55867, 0.468118) ,
+ rgb (0.585916, 0.561674, 0.467618) ,
+ rgb (0.589753, 0.564682, 0.46709) ,
+ rgb (0.593622, 0.567697, 0.466401) ,
+ rgb (0.597469, 0.570718, 0.465821) ,
+ rgb (0.601354, 0.573743, 0.465074) ,
+ rgb (0.605211, 0.576777, 0.464441) ,
+ rgb (0.609105, 0.579816, 0.463638) ,
+ rgb (0.612977, 0.582861, 0.46295) ,
+ rgb (0.616852, 0.585913, 0.462237) ,
+ rgb (0.620765, 0.58897, 0.461351) ,
+ rgb (0.624654, 0.592034, 0.460583) ,
+ rgb (0.628576, 0.595104, 0.459641) ,
+ rgb (0.632506, 0.59818, 0.458668) ,
+ rgb (0.636412, 0.601264, 0.457818) ,
+ rgb (0.640352, 0.604354, 0.456791) ,
+ rgb (0.64427, 0.60745, 0.455886) ,
+ rgb (0.648222, 0.610553, 0.454801) ,
+ rgb (0.652178, 0.613664, 0.453689) ,
+ rgb (0.656114, 0.61678, 0.452702) ,
+ rgb (0.660082, 0.619904, 0.451534) ,
+ rgb (0.664055, 0.623034, 0.450338) ,
+ rgb (0.668008, 0.626171, 0.44927) ,
+ rgb (0.671991, 0.629316, 0.448018) ,
+ rgb (0.675981, 0.632468, 0.446736) ,
+ rgb (0.679979, 0.635626, 0.445424) ,
+ rgb (0.68395, 0.638793, 0.444251) ,
+ rgb (0.687957, 0.641966, 0.442886) ,
+ rgb (0.691971, 0.645145, 0.441491) ,
+ rgb (0.695985, 0.648334, 0.440072) ,
+ rgb (0.700008, 0.651529, 0.438624) ,
+ rgb (0.704037, 0.654731, 0.437147) ,
+ rgb (0.708067, 0.657942, 0.435647) ,
+ rgb (0.712105, 0.66116, 0.434117) ,
+ rgb (0.716177, 0.664384, 0.432386) ,
+ rgb (0.720222, 0.667618, 0.430805) ,
+ rgb (0.724274, 0.670859, 0.429194) ,
+ rgb (0.728334, 0.674107, 0.427554) ,
+ rgb (0.732422, 0.677364, 0.425717) ,
+ rgb (0.736488, 0.680629, 0.424028) ,
+ rgb (0.740589, 0.6839, 0.422131) ,
+ rgb (0.744664, 0.687181, 0.420393) ,
+ rgb (0.748772, 0.69047, 0.418448) ,
+ rgb (0.752886, 0.693766, 0.416472) ,
+ rgb (0.756975, 0.697071, 0.414659) ,
+ rgb (0.761096, 0.700384, 0.412638) ,
+ rgb (0.765223, 0.703705, 0.410587) ,
+ rgb (0.769353, 0.707035, 0.408516) ,
+ rgb (0.773486, 0.710373, 0.406422) ,
+ rgb (0.777651, 0.713719, 0.404112) ,
+ rgb (0.781795, 0.717074, 0.401966) ,
+ rgb (0.785965, 0.720438, 0.399613) ,
+ rgb (0.790116, 0.72381, 0.397423) ,
+ rgb (0.794298, 0.72719, 0.395016) ,
+ rgb (0.79848, 0.73058, 0.392597) ,
+ rgb (0.802667, 0.733978, 0.390153) ,
+ rgb (0.806859, 0.737385, 0.387684) ,
+ rgb (0.811054, 0.740801, 0.385198) ,
+ rgb (0.815274, 0.744226, 0.382504) ,
+ rgb (0.819499, 0.747659, 0.379785) ,
+ rgb (0.823729, 0.751101, 0.377043) ,
+ rgb (0.827959, 0.754553, 0.374292) ,
+ rgb (0.832192, 0.758014, 0.371529) ,
+ rgb (0.836429, 0.761483, 0.368747) ,
+ rgb (0.840693, 0.764962, 0.365746) ,
+ rgb (0.844957, 0.76845, 0.362741) ,
+ rgb (0.849223, 0.771947, 0.359729) ,
+ rgb (0.853515, 0.775454, 0.3565) ,
+ rgb (0.857809, 0.778969, 0.353259) ,
+ rgb (0.862105, 0.782494, 0.350011) ,
+ rgb (0.866421, 0.786028, 0.346571) ,
+ rgb (0.870717, 0.789572, 0.343333) ,
+ rgb (0.875057, 0.793125, 0.339685) ,
+ rgb (0.879378, 0.796687, 0.336241) ,
+ rgb (0.88372, 0.800258, 0.332599) ,
+ rgb (0.888081, 0.803839, 0.32877) ,
+ rgb (0.89244, 0.80743, 0.324968) ,
+ rgb (0.896818, 0.81103, 0.320982) ,
+ rgb (0.901195, 0.814639, 0.317021) ,
+ rgb (0.905589, 0.818257, 0.312889) ,
+ rgb (0.91, 0.821885, 0.308594) ,
+ rgb (0.914407, 0.825522, 0.304348) ,
+ rgb (0.918828, 0.829168, 0.29996) ,
+ rgb (0.923279, 0.832822, 0.295244) ,
+ rgb (0.927724, 0.836486, 0.290611) ,
+ rgb (0.93218, 0.840159, 0.28588) ,
+ rgb (0.93666, 0.843841, 0.280876) ,
+ rgb (0.941147, 0.84753, 0.275815) ,
+ rgb (0.945654, 0.851228, 0.270532) ,
+ rgb (0.950178, 0.854933, 0.265085) ,
+ rgb (0.954725, 0.858646, 0.259365) ,
+ rgb (0.959284, 0.862365, 0.253563) ,
+ rgb (0.963872, 0.866089, 0.247445) ,
+ rgb (0.968469, 0.869819, 0.24131) ,
+ rgb (0.973114, 0.87355, 0.234677) ,
+ rgb (0.97778, 0.877281, 0.227954) ,
+ rgb (0.982497, 0.881008, 0.220878) ,
+ rgb (0.987293, 0.884718, 0.213336) ,
+ rgb (0.992218, 0.888385, 0.205468) ,
+ rgb (0.994847, 0.892954, 0.203445) ,
+ rgb (0.995249, 0.898384, 0.207561) ,
+ rgb (0.995503, 0.903866, 0.21237) ,
+ rgb (0.995737, 0.909344, 0.217772)
+ });
list_data inferno = list_data(new pen[] {
- rgb (0.001462, 0.000466, 0.013866) ,
- rgb (0.002267, 0.00127, 0.01857) ,
- rgb (0.003299, 0.002249, 0.024239) ,
- rgb (0.004547, 0.003392, 0.030909) ,
- rgb (0.006006, 0.004692, 0.038558) ,
- rgb (0.007676, 0.006136, 0.046836) ,
- rgb (0.009561, 0.007713, 0.055143) ,
- rgb (0.011663, 0.009417, 0.06346) ,
- rgb (0.013995, 0.011225, 0.071862) ,
- rgb (0.016561, 0.013136, 0.080282) ,
- rgb (0.019373, 0.015133, 0.088767) ,
- rgb (0.022447, 0.017199, 0.097327) ,
- rgb (0.025793, 0.019331, 0.10593) ,
- rgb (0.029432, 0.021503, 0.114621) ,
- rgb (0.033385, 0.023702, 0.123397) ,
- rgb (0.037668, 0.025921, 0.132232) ,
- rgb (0.042253, 0.028139, 0.141141) ,
- rgb (0.046915, 0.030324, 0.150164) ,
- rgb (0.051644, 0.032474, 0.159254) ,
- rgb (0.056449, 0.034569, 0.168414) ,
- rgb (0.06134, 0.03659, 0.177642) ,
- rgb (0.066331, 0.038504, 0.186962) ,
- rgb (0.071429, 0.040294, 0.196354) ,
- rgb (0.076637, 0.041905, 0.205799) ,
- rgb (0.081962, 0.043328, 0.215289) ,
- rgb (0.087411, 0.044556, 0.224813) ,
- rgb (0.09299, 0.045583, 0.234358) ,
- rgb (0.098702, 0.046402, 0.243904) ,
- rgb (0.104551, 0.047008, 0.25343) ,
- rgb (0.110536, 0.047399, 0.262912) ,
- rgb (0.116656, 0.047574, 0.272321) ,
- rgb (0.122908, 0.047536, 0.281624) ,
- rgb (0.129285, 0.047293, 0.290788) ,
- rgb (0.135778, 0.046856, 0.299776) ,
- rgb (0.142378, 0.046242, 0.308553) ,
- rgb (0.149073, 0.045468, 0.317085) ,
- rgb (0.15585, 0.044559, 0.325338) ,
- rgb (0.162689, 0.043554, 0.333277) ,
- rgb (0.169575, 0.042489, 0.340874) ,
- rgb (0.176493, 0.041402, 0.348111) ,
- rgb (0.183429, 0.040329, 0.354971) ,
- rgb (0.190367, 0.039309, 0.361447) ,
- rgb (0.197297, 0.0384, 0.367535) ,
- rgb (0.204209, 0.037632, 0.373238) ,
- rgb (0.211095, 0.03703, 0.378563) ,
- rgb (0.217949, 0.036615, 0.383522) ,
- rgb (0.224763, 0.036405, 0.388129) ,
- rgb (0.231538, 0.036405, 0.3924) ,
- rgb (0.238273, 0.036621, 0.396353) ,
- rgb (0.244967, 0.037055, 0.400007) ,
- rgb (0.25162, 0.037705, 0.403378) ,
- rgb (0.258234, 0.038571, 0.406485) ,
- rgb (0.26481, 0.039647, 0.409345) ,
- rgb (0.271347, 0.040922, 0.411976) ,
- rgb (0.27785, 0.042353, 0.414392) ,
- rgb (0.284321, 0.043933, 0.416608) ,
- rgb (0.290763, 0.045644, 0.418637) ,
- rgb (0.297178, 0.04747, 0.420491) ,
- rgb (0.303568, 0.049396, 0.422182) ,
- rgb (0.309935, 0.051407, 0.423721) ,
- rgb (0.316282, 0.05349, 0.425116) ,
- rgb (0.32261, 0.055634, 0.426377) ,
- rgb (0.328921, 0.057827, 0.427511) ,
- rgb (0.335217, 0.06006, 0.428524) ,
- rgb (0.3415, 0.062325, 0.429425) ,
- rgb (0.347771, 0.064616, 0.430217) ,
- rgb (0.354032, 0.066925, 0.430906) ,
- rgb (0.360284, 0.069247, 0.431497) ,
- rgb (0.366529, 0.071579, 0.431994) ,
- rgb (0.372768, 0.073915, 0.4324) ,
- rgb (0.379001, 0.076253, 0.432719) ,
- rgb (0.385228, 0.078591, 0.432955) ,
- rgb (0.391453, 0.080927, 0.433109) ,
- rgb (0.397674, 0.083257, 0.433183) ,
- rgb (0.403894, 0.08558, 0.433179) ,
- rgb (0.410113, 0.087896, 0.433098) ,
- rgb (0.416331, 0.090203, 0.432943) ,
- rgb (0.422549, 0.092501, 0.432714) ,
- rgb (0.428768, 0.09479, 0.432412) ,
- rgb (0.434987, 0.097069, 0.432039) ,
- rgb (0.441207, 0.099338, 0.431594) ,
- rgb (0.447428, 0.101597, 0.43108) ,
- rgb (0.453651, 0.103848, 0.430498) ,
- rgb (0.459875, 0.106089, 0.429846) ,
- rgb (0.4661, 0.108322, 0.429125) ,
- rgb (0.472328, 0.110547, 0.428334) ,
- rgb (0.478558, 0.112764, 0.427475) ,
- rgb (0.484789, 0.114974, 0.426548) ,
- rgb (0.491022, 0.117179, 0.425552) ,
- rgb (0.497257, 0.119379, 0.424488) ,
- rgb (0.503493, 0.121575, 0.423356) ,
- rgb (0.50973, 0.123769, 0.422156) ,
- rgb (0.515967, 0.12596, 0.420887) ,
- rgb (0.522206, 0.12815, 0.419549) ,
- rgb (0.528444, 0.130341, 0.418142) ,
- rgb (0.534683, 0.132534, 0.416667) ,
- rgb (0.54092, 0.134729, 0.415123) ,
- rgb (0.547157, 0.136929, 0.413511) ,
- rgb (0.553392, 0.139134, 0.411829) ,
- rgb (0.559624, 0.141346, 0.410078) ,
- rgb (0.565854, 0.143567, 0.408258) ,
- rgb (0.572081, 0.145797, 0.406369) ,
- rgb (0.578304, 0.148039, 0.404411) ,
- rgb (0.584521, 0.150294, 0.402385) ,
- rgb (0.590734, 0.152563, 0.40029) ,
- rgb (0.59694, 0.154848, 0.398125) ,
- rgb (0.603139, 0.157151, 0.395891) ,
- rgb (0.60933, 0.159474, 0.393589) ,
- rgb (0.615513, 0.161817, 0.391219) ,
- rgb (0.621685, 0.164184, 0.388781) ,
- rgb (0.627847, 0.166575, 0.386276) ,
- rgb (0.633998, 0.168992, 0.383704) ,
- rgb (0.640135, 0.171438, 0.381065) ,
- rgb (0.64626, 0.173914, 0.378359) ,
- rgb (0.652369, 0.176421, 0.375586) ,
- rgb (0.658463, 0.178962, 0.372748) ,
- rgb (0.66454, 0.181539, 0.369846) ,
- rgb (0.670599, 0.184153, 0.366879) ,
- rgb (0.676638, 0.186807, 0.363849) ,
- rgb (0.682656, 0.189501, 0.360757) ,
- rgb (0.688653, 0.192239, 0.357603) ,
- rgb (0.694627, 0.195021, 0.354388) ,
- rgb (0.700576, 0.197851, 0.351113) ,
- rgb (0.7065, 0.200728, 0.347777) ,
- rgb (0.712396, 0.203656, 0.344383) ,
- rgb (0.718264, 0.206636, 0.340931) ,
- rgb (0.724103, 0.20967, 0.337424) ,
- rgb (0.729909, 0.212759, 0.333861) ,
- rgb (0.735683, 0.215906, 0.330245) ,
- rgb (0.741423, 0.219112, 0.326576) ,
- rgb (0.747127, 0.222378, 0.322856) ,
- rgb (0.752794, 0.225706, 0.319085) ,
- rgb (0.758422, 0.229097, 0.315266) ,
- rgb (0.76401, 0.232554, 0.311399) ,
- rgb (0.769556, 0.236077, 0.307485) ,
- rgb (0.775059, 0.239667, 0.303526) ,
- rgb (0.780517, 0.243327, 0.299523) ,
- rgb (0.785929, 0.247056, 0.295477) ,
- rgb (0.791293, 0.250856, 0.29139) ,
- rgb (0.796607, 0.254728, 0.287264) ,
- rgb (0.801871, 0.258674, 0.283099) ,
- rgb (0.807082, 0.262692, 0.278898) ,
- rgb (0.812239, 0.266786, 0.274661) ,
- rgb (0.817341, 0.270954, 0.27039) ,
- rgb (0.822386, 0.275197, 0.266085) ,
- rgb (0.827372, 0.279517, 0.26175) ,
- rgb (0.832299, 0.283913, 0.257383) ,
- rgb (0.837165, 0.288385, 0.252988) ,
- rgb (0.841969, 0.292933, 0.248564) ,
- rgb (0.846709, 0.297559, 0.244113) ,
- rgb (0.851384, 0.30226, 0.239636) ,
- rgb (0.855992, 0.307038, 0.235133) ,
- rgb (0.860533, 0.311892, 0.230606) ,
- rgb (0.865006, 0.316822, 0.226055) ,
- rgb (0.869409, 0.321827, 0.221482) ,
- rgb (0.873741, 0.326906, 0.216886) ,
- rgb (0.878001, 0.33206, 0.212268) ,
- rgb (0.882188, 0.337287, 0.207628) ,
- rgb (0.886302, 0.342586, 0.202968) ,
- rgb (0.890341, 0.347957, 0.198286) ,
- rgb (0.894305, 0.353399, 0.193584) ,
- rgb (0.898192, 0.358911, 0.18886) ,
- rgb (0.902003, 0.364492, 0.184116) ,
- rgb (0.905735, 0.37014, 0.17935) ,
- rgb (0.90939, 0.375856, 0.174563) ,
- rgb (0.912966, 0.381636, 0.169755) ,
- rgb (0.916462, 0.387481, 0.164924) ,
- rgb (0.919879, 0.393389, 0.16007) ,
- rgb (0.923215, 0.399359, 0.155193) ,
- rgb (0.92647, 0.405389, 0.150292) ,
- rgb (0.929644, 0.411479, 0.145367) ,
- rgb (0.932737, 0.417627, 0.140417) ,
- rgb (0.935747, 0.423831, 0.13544) ,
- rgb (0.938675, 0.430091, 0.130438) ,
- rgb (0.941521, 0.436405, 0.125409) ,
- rgb (0.944285, 0.442772, 0.120354) ,
- rgb (0.946965, 0.449191, 0.115272) ,
- rgb (0.949562, 0.45566, 0.110164) ,
- rgb (0.952075, 0.462178, 0.105031) ,
- rgb (0.954506, 0.468744, 0.099874) ,
- rgb (0.956852, 0.475356, 0.094695) ,
- rgb (0.959114, 0.482014, 0.089499) ,
- rgb (0.961293, 0.488716, 0.084289) ,
- rgb (0.963387, 0.495462, 0.079073) ,
- rgb (0.965397, 0.502249, 0.073859) ,
- rgb (0.967322, 0.509078, 0.068659) ,
- rgb (0.969163, 0.515946, 0.063488) ,
- rgb (0.970919, 0.522853, 0.058367) ,
- rgb (0.97259, 0.529798, 0.053324) ,
- rgb (0.974176, 0.53678, 0.048392) ,
- rgb (0.975677, 0.543798, 0.043618) ,
- rgb (0.977092, 0.55085, 0.03905) ,
- rgb (0.978422, 0.557937, 0.034931) ,
- rgb (0.979666, 0.565057, 0.031409) ,
- rgb (0.980824, 0.572209, 0.028508) ,
- rgb (0.981895, 0.579392, 0.02625) ,
- rgb (0.982881, 0.586606, 0.024661) ,
- rgb (0.983779, 0.593849, 0.02377) ,
- rgb (0.984591, 0.601122, 0.023606) ,
- rgb (0.985315, 0.608422, 0.024202) ,
- rgb (0.985952, 0.61575, 0.025592) ,
- rgb (0.986502, 0.623105, 0.027814) ,
- rgb (0.986964, 0.630485, 0.030908) ,
- rgb (0.987337, 0.63789, 0.034916) ,
- rgb (0.987622, 0.64532, 0.039886) ,
- rgb (0.987819, 0.652773, 0.045581) ,
- rgb (0.987926, 0.66025, 0.05175) ,
- rgb (0.987945, 0.667748, 0.058329) ,
- rgb (0.987874, 0.675267, 0.065257) ,
- rgb (0.987714, 0.682807, 0.072489) ,
- rgb (0.987464, 0.690366, 0.07999) ,
- rgb (0.987124, 0.697944, 0.087731) ,
- rgb (0.986694, 0.70554, 0.095694) ,
- rgb (0.986175, 0.713153, 0.103863) ,
- rgb (0.985566, 0.720782, 0.112229) ,
- rgb (0.984865, 0.728427, 0.120785) ,
- rgb (0.984075, 0.736087, 0.129527) ,
- rgb (0.983196, 0.743758, 0.138453) ,
- rgb (0.982228, 0.751442, 0.147565) ,
- rgb (0.981173, 0.759135, 0.156863) ,
- rgb (0.980032, 0.766837, 0.166353) ,
- rgb (0.978806, 0.774545, 0.176037) ,
- rgb (0.977497, 0.782258, 0.185923) ,
- rgb (0.976108, 0.789974, 0.196018) ,
- rgb (0.974638, 0.797692, 0.206332) ,
- rgb (0.973088, 0.805409, 0.216877) ,
- rgb (0.971468, 0.813122, 0.227658) ,
- rgb (0.969783, 0.820825, 0.238686) ,
- rgb (0.968041, 0.828515, 0.249972) ,
- rgb (0.966243, 0.836191, 0.261534) ,
- rgb (0.964394, 0.843848, 0.273391) ,
- rgb (0.962517, 0.851476, 0.285546) ,
- rgb (0.960626, 0.859069, 0.29801) ,
- rgb (0.95872, 0.866624, 0.31082) ,
- rgb (0.956834, 0.874129, 0.323974) ,
- rgb (0.954997, 0.881569, 0.337475) ,
- rgb (0.953215, 0.888942, 0.351369) ,
- rgb (0.951546, 0.896226, 0.365627) ,
- rgb (0.950018, 0.903409, 0.380271) ,
- rgb (0.948683, 0.910473, 0.395289) ,
- rgb (0.947594, 0.917399, 0.410665) ,
- rgb (0.946809, 0.924168, 0.426373) ,
- rgb (0.946392, 0.930761, 0.442367) ,
- rgb (0.946403, 0.937159, 0.458592) ,
- rgb (0.946903, 0.943348, 0.47497) ,
- rgb (0.947937, 0.949318, 0.491426) ,
- rgb (0.949545, 0.955063, 0.50786) ,
- rgb (0.95174, 0.960587, 0.524203) ,
- rgb (0.954529, 0.965896, 0.540361) ,
- rgb (0.957896, 0.971003, 0.556275) ,
- rgb (0.961812, 0.975924, 0.571925) ,
- rgb (0.966249, 0.980678, 0.587206) ,
- rgb (0.971162, 0.985282, 0.602154) ,
- rgb (0.976511, 0.989753, 0.61676) ,
- rgb (0.982257, 0.994109, 0.631017) ,
- rgb (0.988362, 0.998364, 0.644924)
-});
+ rgb (0.001462, 0.000466, 0.013866) ,
+ rgb (0.002267, 0.00127, 0.01857) ,
+ rgb (0.003299, 0.002249, 0.024239) ,
+ rgb (0.004547, 0.003392, 0.030909) ,
+ rgb (0.006006, 0.004692, 0.038558) ,
+ rgb (0.007676, 0.006136, 0.046836) ,
+ rgb (0.009561, 0.007713, 0.055143) ,
+ rgb (0.011663, 0.009417, 0.06346) ,
+ rgb (0.013995, 0.011225, 0.071862) ,
+ rgb (0.016561, 0.013136, 0.080282) ,
+ rgb (0.019373, 0.015133, 0.088767) ,
+ rgb (0.022447, 0.017199, 0.097327) ,
+ rgb (0.025793, 0.019331, 0.10593) ,
+ rgb (0.029432, 0.021503, 0.114621) ,
+ rgb (0.033385, 0.023702, 0.123397) ,
+ rgb (0.037668, 0.025921, 0.132232) ,
+ rgb (0.042253, 0.028139, 0.141141) ,
+ rgb (0.046915, 0.030324, 0.150164) ,
+ rgb (0.051644, 0.032474, 0.159254) ,
+ rgb (0.056449, 0.034569, 0.168414) ,
+ rgb (0.06134, 0.03659, 0.177642) ,
+ rgb (0.066331, 0.038504, 0.186962) ,
+ rgb (0.071429, 0.040294, 0.196354) ,
+ rgb (0.076637, 0.041905, 0.205799) ,
+ rgb (0.081962, 0.043328, 0.215289) ,
+ rgb (0.087411, 0.044556, 0.224813) ,
+ rgb (0.09299, 0.045583, 0.234358) ,
+ rgb (0.098702, 0.046402, 0.243904) ,
+ rgb (0.104551, 0.047008, 0.25343) ,
+ rgb (0.110536, 0.047399, 0.262912) ,
+ rgb (0.116656, 0.047574, 0.272321) ,
+ rgb (0.122908, 0.047536, 0.281624) ,
+ rgb (0.129285, 0.047293, 0.290788) ,
+ rgb (0.135778, 0.046856, 0.299776) ,
+ rgb (0.142378, 0.046242, 0.308553) ,
+ rgb (0.149073, 0.045468, 0.317085) ,
+ rgb (0.15585, 0.044559, 0.325338) ,
+ rgb (0.162689, 0.043554, 0.333277) ,
+ rgb (0.169575, 0.042489, 0.340874) ,
+ rgb (0.176493, 0.041402, 0.348111) ,
+ rgb (0.183429, 0.040329, 0.354971) ,
+ rgb (0.190367, 0.039309, 0.361447) ,
+ rgb (0.197297, 0.0384, 0.367535) ,
+ rgb (0.204209, 0.037632, 0.373238) ,
+ rgb (0.211095, 0.03703, 0.378563) ,
+ rgb (0.217949, 0.036615, 0.383522) ,
+ rgb (0.224763, 0.036405, 0.388129) ,
+ rgb (0.231538, 0.036405, 0.3924) ,
+ rgb (0.238273, 0.036621, 0.396353) ,
+ rgb (0.244967, 0.037055, 0.400007) ,
+ rgb (0.25162, 0.037705, 0.403378) ,
+ rgb (0.258234, 0.038571, 0.406485) ,
+ rgb (0.26481, 0.039647, 0.409345) ,
+ rgb (0.271347, 0.040922, 0.411976) ,
+ rgb (0.27785, 0.042353, 0.414392) ,
+ rgb (0.284321, 0.043933, 0.416608) ,
+ rgb (0.290763, 0.045644, 0.418637) ,
+ rgb (0.297178, 0.04747, 0.420491) ,
+ rgb (0.303568, 0.049396, 0.422182) ,
+ rgb (0.309935, 0.051407, 0.423721) ,
+ rgb (0.316282, 0.05349, 0.425116) ,
+ rgb (0.32261, 0.055634, 0.426377) ,
+ rgb (0.328921, 0.057827, 0.427511) ,
+ rgb (0.335217, 0.06006, 0.428524) ,
+ rgb (0.3415, 0.062325, 0.429425) ,
+ rgb (0.347771, 0.064616, 0.430217) ,
+ rgb (0.354032, 0.066925, 0.430906) ,
+ rgb (0.360284, 0.069247, 0.431497) ,
+ rgb (0.366529, 0.071579, 0.431994) ,
+ rgb (0.372768, 0.073915, 0.4324) ,
+ rgb (0.379001, 0.076253, 0.432719) ,
+ rgb (0.385228, 0.078591, 0.432955) ,
+ rgb (0.391453, 0.080927, 0.433109) ,
+ rgb (0.397674, 0.083257, 0.433183) ,
+ rgb (0.403894, 0.08558, 0.433179) ,
+ rgb (0.410113, 0.087896, 0.433098) ,
+ rgb (0.416331, 0.090203, 0.432943) ,
+ rgb (0.422549, 0.092501, 0.432714) ,
+ rgb (0.428768, 0.09479, 0.432412) ,
+ rgb (0.434987, 0.097069, 0.432039) ,
+ rgb (0.441207, 0.099338, 0.431594) ,
+ rgb (0.447428, 0.101597, 0.43108) ,
+ rgb (0.453651, 0.103848, 0.430498) ,
+ rgb (0.459875, 0.106089, 0.429846) ,
+ rgb (0.4661, 0.108322, 0.429125) ,
+ rgb (0.472328, 0.110547, 0.428334) ,
+ rgb (0.478558, 0.112764, 0.427475) ,
+ rgb (0.484789, 0.114974, 0.426548) ,
+ rgb (0.491022, 0.117179, 0.425552) ,
+ rgb (0.497257, 0.119379, 0.424488) ,
+ rgb (0.503493, 0.121575, 0.423356) ,
+ rgb (0.50973, 0.123769, 0.422156) ,
+ rgb (0.515967, 0.12596, 0.420887) ,
+ rgb (0.522206, 0.12815, 0.419549) ,
+ rgb (0.528444, 0.130341, 0.418142) ,
+ rgb (0.534683, 0.132534, 0.416667) ,
+ rgb (0.54092, 0.134729, 0.415123) ,
+ rgb (0.547157, 0.136929, 0.413511) ,
+ rgb (0.553392, 0.139134, 0.411829) ,
+ rgb (0.559624, 0.141346, 0.410078) ,
+ rgb (0.565854, 0.143567, 0.408258) ,
+ rgb (0.572081, 0.145797, 0.406369) ,
+ rgb (0.578304, 0.148039, 0.404411) ,
+ rgb (0.584521, 0.150294, 0.402385) ,
+ rgb (0.590734, 0.152563, 0.40029) ,
+ rgb (0.59694, 0.154848, 0.398125) ,
+ rgb (0.603139, 0.157151, 0.395891) ,
+ rgb (0.60933, 0.159474, 0.393589) ,
+ rgb (0.615513, 0.161817, 0.391219) ,
+ rgb (0.621685, 0.164184, 0.388781) ,
+ rgb (0.627847, 0.166575, 0.386276) ,
+ rgb (0.633998, 0.168992, 0.383704) ,
+ rgb (0.640135, 0.171438, 0.381065) ,
+ rgb (0.64626, 0.173914, 0.378359) ,
+ rgb (0.652369, 0.176421, 0.375586) ,
+ rgb (0.658463, 0.178962, 0.372748) ,
+ rgb (0.66454, 0.181539, 0.369846) ,
+ rgb (0.670599, 0.184153, 0.366879) ,
+ rgb (0.676638, 0.186807, 0.363849) ,
+ rgb (0.682656, 0.189501, 0.360757) ,
+ rgb (0.688653, 0.192239, 0.357603) ,
+ rgb (0.694627, 0.195021, 0.354388) ,
+ rgb (0.700576, 0.197851, 0.351113) ,
+ rgb (0.7065, 0.200728, 0.347777) ,
+ rgb (0.712396, 0.203656, 0.344383) ,
+ rgb (0.718264, 0.206636, 0.340931) ,
+ rgb (0.724103, 0.20967, 0.337424) ,
+ rgb (0.729909, 0.212759, 0.333861) ,
+ rgb (0.735683, 0.215906, 0.330245) ,
+ rgb (0.741423, 0.219112, 0.326576) ,
+ rgb (0.747127, 0.222378, 0.322856) ,
+ rgb (0.752794, 0.225706, 0.319085) ,
+ rgb (0.758422, 0.229097, 0.315266) ,
+ rgb (0.76401, 0.232554, 0.311399) ,
+ rgb (0.769556, 0.236077, 0.307485) ,
+ rgb (0.775059, 0.239667, 0.303526) ,
+ rgb (0.780517, 0.243327, 0.299523) ,
+ rgb (0.785929, 0.247056, 0.295477) ,
+ rgb (0.791293, 0.250856, 0.29139) ,
+ rgb (0.796607, 0.254728, 0.287264) ,
+ rgb (0.801871, 0.258674, 0.283099) ,
+ rgb (0.807082, 0.262692, 0.278898) ,
+ rgb (0.812239, 0.266786, 0.274661) ,
+ rgb (0.817341, 0.270954, 0.27039) ,
+ rgb (0.822386, 0.275197, 0.266085) ,
+ rgb (0.827372, 0.279517, 0.26175) ,
+ rgb (0.832299, 0.283913, 0.257383) ,
+ rgb (0.837165, 0.288385, 0.252988) ,
+ rgb (0.841969, 0.292933, 0.248564) ,
+ rgb (0.846709, 0.297559, 0.244113) ,
+ rgb (0.851384, 0.30226, 0.239636) ,
+ rgb (0.855992, 0.307038, 0.235133) ,
+ rgb (0.860533, 0.311892, 0.230606) ,
+ rgb (0.865006, 0.316822, 0.226055) ,
+ rgb (0.869409, 0.321827, 0.221482) ,
+ rgb (0.873741, 0.326906, 0.216886) ,
+ rgb (0.878001, 0.33206, 0.212268) ,
+ rgb (0.882188, 0.337287, 0.207628) ,
+ rgb (0.886302, 0.342586, 0.202968) ,
+ rgb (0.890341, 0.347957, 0.198286) ,
+ rgb (0.894305, 0.353399, 0.193584) ,
+ rgb (0.898192, 0.358911, 0.18886) ,
+ rgb (0.902003, 0.364492, 0.184116) ,
+ rgb (0.905735, 0.37014, 0.17935) ,
+ rgb (0.90939, 0.375856, 0.174563) ,
+ rgb (0.912966, 0.381636, 0.169755) ,
+ rgb (0.916462, 0.387481, 0.164924) ,
+ rgb (0.919879, 0.393389, 0.16007) ,
+ rgb (0.923215, 0.399359, 0.155193) ,
+ rgb (0.92647, 0.405389, 0.150292) ,
+ rgb (0.929644, 0.411479, 0.145367) ,
+ rgb (0.932737, 0.417627, 0.140417) ,
+ rgb (0.935747, 0.423831, 0.13544) ,
+ rgb (0.938675, 0.430091, 0.130438) ,
+ rgb (0.941521, 0.436405, 0.125409) ,
+ rgb (0.944285, 0.442772, 0.120354) ,
+ rgb (0.946965, 0.449191, 0.115272) ,
+ rgb (0.949562, 0.45566, 0.110164) ,
+ rgb (0.952075, 0.462178, 0.105031) ,
+ rgb (0.954506, 0.468744, 0.099874) ,
+ rgb (0.956852, 0.475356, 0.094695) ,
+ rgb (0.959114, 0.482014, 0.089499) ,
+ rgb (0.961293, 0.488716, 0.084289) ,
+ rgb (0.963387, 0.495462, 0.079073) ,
+ rgb (0.965397, 0.502249, 0.073859) ,
+ rgb (0.967322, 0.509078, 0.068659) ,
+ rgb (0.969163, 0.515946, 0.063488) ,
+ rgb (0.970919, 0.522853, 0.058367) ,
+ rgb (0.97259, 0.529798, 0.053324) ,
+ rgb (0.974176, 0.53678, 0.048392) ,
+ rgb (0.975677, 0.543798, 0.043618) ,
+ rgb (0.977092, 0.55085, 0.03905) ,
+ rgb (0.978422, 0.557937, 0.034931) ,
+ rgb (0.979666, 0.565057, 0.031409) ,
+ rgb (0.980824, 0.572209, 0.028508) ,
+ rgb (0.981895, 0.579392, 0.02625) ,
+ rgb (0.982881, 0.586606, 0.024661) ,
+ rgb (0.983779, 0.593849, 0.02377) ,
+ rgb (0.984591, 0.601122, 0.023606) ,
+ rgb (0.985315, 0.608422, 0.024202) ,
+ rgb (0.985952, 0.61575, 0.025592) ,
+ rgb (0.986502, 0.623105, 0.027814) ,
+ rgb (0.986964, 0.630485, 0.030908) ,
+ rgb (0.987337, 0.63789, 0.034916) ,
+ rgb (0.987622, 0.64532, 0.039886) ,
+ rgb (0.987819, 0.652773, 0.045581) ,
+ rgb (0.987926, 0.66025, 0.05175) ,
+ rgb (0.987945, 0.667748, 0.058329) ,
+ rgb (0.987874, 0.675267, 0.065257) ,
+ rgb (0.987714, 0.682807, 0.072489) ,
+ rgb (0.987464, 0.690366, 0.07999) ,
+ rgb (0.987124, 0.697944, 0.087731) ,
+ rgb (0.986694, 0.70554, 0.095694) ,
+ rgb (0.986175, 0.713153, 0.103863) ,
+ rgb (0.985566, 0.720782, 0.112229) ,
+ rgb (0.984865, 0.728427, 0.120785) ,
+ rgb (0.984075, 0.736087, 0.129527) ,
+ rgb (0.983196, 0.743758, 0.138453) ,
+ rgb (0.982228, 0.751442, 0.147565) ,
+ rgb (0.981173, 0.759135, 0.156863) ,
+ rgb (0.980032, 0.766837, 0.166353) ,
+ rgb (0.978806, 0.774545, 0.176037) ,
+ rgb (0.977497, 0.782258, 0.185923) ,
+ rgb (0.976108, 0.789974, 0.196018) ,
+ rgb (0.974638, 0.797692, 0.206332) ,
+ rgb (0.973088, 0.805409, 0.216877) ,
+ rgb (0.971468, 0.813122, 0.227658) ,
+ rgb (0.969783, 0.820825, 0.238686) ,
+ rgb (0.968041, 0.828515, 0.249972) ,
+ rgb (0.966243, 0.836191, 0.261534) ,
+ rgb (0.964394, 0.843848, 0.273391) ,
+ rgb (0.962517, 0.851476, 0.285546) ,
+ rgb (0.960626, 0.859069, 0.29801) ,
+ rgb (0.95872, 0.866624, 0.31082) ,
+ rgb (0.956834, 0.874129, 0.323974) ,
+ rgb (0.954997, 0.881569, 0.337475) ,
+ rgb (0.953215, 0.888942, 0.351369) ,
+ rgb (0.951546, 0.896226, 0.365627) ,
+ rgb (0.950018, 0.903409, 0.380271) ,
+ rgb (0.948683, 0.910473, 0.395289) ,
+ rgb (0.947594, 0.917399, 0.410665) ,
+ rgb (0.946809, 0.924168, 0.426373) ,
+ rgb (0.946392, 0.930761, 0.442367) ,
+ rgb (0.946403, 0.937159, 0.458592) ,
+ rgb (0.946903, 0.943348, 0.47497) ,
+ rgb (0.947937, 0.949318, 0.491426) ,
+ rgb (0.949545, 0.955063, 0.50786) ,
+ rgb (0.95174, 0.960587, 0.524203) ,
+ rgb (0.954529, 0.965896, 0.540361) ,
+ rgb (0.957896, 0.971003, 0.556275) ,
+ rgb (0.961812, 0.975924, 0.571925) ,
+ rgb (0.966249, 0.980678, 0.587206) ,
+ rgb (0.971162, 0.985282, 0.602154) ,
+ rgb (0.976511, 0.989753, 0.61676) ,
+ rgb (0.982257, 0.994109, 0.631017) ,
+ rgb (0.988362, 0.998364, 0.644924)
+ });
list_data magma = list_data(new pen[] {
- rgb (0.001462, 0.000466, 0.013866) ,
- rgb (0.002258, 0.001295, 0.018331) ,
- rgb (0.003279, 0.002305, 0.023708) ,
- rgb (0.004512, 0.00349, 0.029965) ,
- rgb (0.00595, 0.004843, 0.03713) ,
- rgb (0.007588, 0.006356, 0.044973) ,
- rgb (0.009426, 0.008022, 0.052844) ,
- rgb (0.011465, 0.009828, 0.06075) ,
- rgb (0.013708, 0.011771, 0.068667) ,
- rgb (0.016156, 0.01384, 0.076603) ,
- rgb (0.018815, 0.016026, 0.084584) ,
- rgb (0.021692, 0.01832, 0.09261) ,
- rgb (0.024792, 0.020715, 0.100676) ,
- rgb (0.028123, 0.023201, 0.108787) ,
- rgb (0.031696, 0.025765, 0.116965) ,
- rgb (0.03552, 0.028397, 0.125209) ,
- rgb (0.039608, 0.03109, 0.133515) ,
- rgb (0.04383, 0.03383, 0.141886) ,
- rgb (0.048062, 0.036607, 0.150327) ,
- rgb (0.05232, 0.039407, 0.158841) ,
- rgb (0.056615, 0.04216, 0.167446) ,
- rgb (0.060949, 0.044794, 0.176129) ,
- rgb (0.06533, 0.047318, 0.184892) ,
- rgb (0.069764, 0.049726, 0.193735) ,
- rgb (0.074257, 0.052017, 0.20266) ,
- rgb (0.078815, 0.054184, 0.211667) ,
- rgb (0.083446, 0.056225, 0.220755) ,
- rgb (0.088155, 0.058133, 0.229922) ,
- rgb (0.092949, 0.059904, 0.239164) ,
- rgb (0.097833, 0.061531, 0.248477) ,
- rgb (0.102815, 0.06301, 0.257854) ,
- rgb (0.107899, 0.064335, 0.267289) ,
- rgb (0.113094, 0.065492, 0.276784) ,
- rgb (0.118405, 0.066479, 0.286321) ,
- rgb (0.123833, 0.067295, 0.295879) ,
- rgb (0.12938, 0.067935, 0.305443) ,
- rgb (0.135053, 0.068391, 0.315) ,
- rgb (0.140858, 0.068654, 0.324538) ,
- rgb (0.146785, 0.068738, 0.334011) ,
- rgb (0.152839, 0.068637, 0.343404) ,
- rgb (0.159018, 0.068354, 0.352688) ,
- rgb (0.165308, 0.067911, 0.361816) ,
- rgb (0.171713, 0.067305, 0.370771) ,
- rgb (0.178212, 0.066576, 0.379497) ,
- rgb (0.184801, 0.065732, 0.387973) ,
- rgb (0.19146, 0.064818, 0.396152) ,
- rgb (0.198177, 0.063862, 0.404009) ,
- rgb (0.204935, 0.062907, 0.411514) ,
- rgb (0.211718, 0.061992, 0.418647) ,
- rgb (0.218512, 0.061158, 0.425392) ,
- rgb (0.225302, 0.060445, 0.431742) ,
- rgb (0.232077, 0.059889, 0.437695) ,
- rgb (0.238826, 0.059517, 0.443256) ,
- rgb (0.245543, 0.059352, 0.448436) ,
- rgb (0.25222, 0.059415, 0.453248) ,
- rgb (0.258857, 0.059706, 0.45771) ,
- rgb (0.265447, 0.060237, 0.46184) ,
- rgb (0.271994, 0.060994, 0.46566) ,
- rgb (0.278493, 0.061978, 0.46919) ,
- rgb (0.284951, 0.063168, 0.472451) ,
- rgb (0.291366, 0.064553, 0.475462) ,
- rgb (0.29774, 0.066117, 0.478243) ,
- rgb (0.304081, 0.067835, 0.480812) ,
- rgb (0.310382, 0.069702, 0.483186) ,
- rgb (0.316654, 0.07169, 0.48538) ,
- rgb (0.322899, 0.073782, 0.487408) ,
- rgb (0.329114, 0.075972, 0.489287) ,
- rgb (0.335308, 0.078236, 0.491024) ,
- rgb (0.341482, 0.080564, 0.492631) ,
- rgb (0.347636, 0.082946, 0.494121) ,
- rgb (0.353773, 0.085373, 0.495501) ,
- rgb (0.359898, 0.087831, 0.496778) ,
- rgb (0.366012, 0.090314, 0.49796) ,
- rgb (0.372116, 0.092816, 0.499053) ,
- rgb (0.378211, 0.095332, 0.500067) ,
- rgb (0.384299, 0.097855, 0.501002) ,
- rgb (0.390384, 0.100379, 0.501864) ,
- rgb (0.396467, 0.102902, 0.502658) ,
- rgb (0.402548, 0.10542, 0.503386) ,
- rgb (0.408629, 0.10793, 0.504052) ,
- rgb (0.414709, 0.110431, 0.504662) ,
- rgb (0.420791, 0.11292, 0.505215) ,
- rgb (0.426877, 0.115395, 0.505714) ,
- rgb (0.432967, 0.117855, 0.50616) ,
- rgb (0.439062, 0.120298, 0.506555) ,
- rgb (0.445163, 0.122724, 0.506901) ,
- rgb (0.451271, 0.125132, 0.507198) ,
- rgb (0.457386, 0.127522, 0.507448) ,
- rgb (0.463508, 0.129893, 0.507652) ,
- rgb (0.46964, 0.132245, 0.507809) ,
- rgb (0.47578, 0.134577, 0.507921) ,
- rgb (0.481929, 0.136891, 0.507989) ,
- rgb (0.488088, 0.139186, 0.508011) ,
- rgb (0.494258, 0.141462, 0.507988) ,
- rgb (0.500438, 0.143719, 0.50792) ,
- rgb (0.506629, 0.145958, 0.507806) ,
- rgb (0.512831, 0.148179, 0.507648) ,
- rgb (0.519045, 0.150383, 0.507443) ,
- rgb (0.52527, 0.152569, 0.507192) ,
- rgb (0.531507, 0.154739, 0.506895) ,
- rgb (0.537755, 0.156894, 0.506551) ,
- rgb (0.544015, 0.159033, 0.506159) ,
- rgb (0.550287, 0.161158, 0.505719) ,
- rgb (0.556571, 0.163269, 0.50523) ,
- rgb (0.562866, 0.165368, 0.504692) ,
- rgb (0.569172, 0.167454, 0.504105) ,
- rgb (0.57549, 0.16953, 0.503466) ,
- rgb (0.581819, 0.171596, 0.502777) ,
- rgb (0.588158, 0.173652, 0.502035) ,
- rgb (0.594508, 0.175701, 0.501241) ,
- rgb (0.600868, 0.177743, 0.500394) ,
- rgb (0.607238, 0.179779, 0.499492) ,
- rgb (0.613617, 0.181811, 0.498536) ,
- rgb (0.620005, 0.18384, 0.497524) ,
- rgb (0.626401, 0.185867, 0.496456) ,
- rgb (0.632805, 0.187893, 0.495332) ,
- rgb (0.639216, 0.189921, 0.49415) ,
- rgb (0.645633, 0.191952, 0.49291) ,
- rgb (0.652056, 0.193986, 0.491611) ,
- rgb (0.658483, 0.196027, 0.490253) ,
- rgb (0.664915, 0.198075, 0.488836) ,
- rgb (0.671349, 0.200133, 0.487358) ,
- rgb (0.677786, 0.202203, 0.485819) ,
- rgb (0.684224, 0.204286, 0.484219) ,
- rgb (0.690661, 0.206384, 0.482558) ,
- rgb (0.697098, 0.208501, 0.480835) ,
- rgb (0.703532, 0.210638, 0.479049) ,
- rgb (0.709962, 0.212797, 0.477201) ,
- rgb (0.716387, 0.214982, 0.47529) ,
- rgb (0.722805, 0.217194, 0.473316) ,
- rgb (0.729216, 0.219437, 0.471279) ,
- rgb (0.735616, 0.221713, 0.46918) ,
- rgb (0.742004, 0.224025, 0.467018) ,
- rgb (0.748378, 0.226377, 0.464794) ,
- rgb (0.754737, 0.228772, 0.462509) ,
- rgb (0.761077, 0.231214, 0.460162) ,
- rgb (0.767398, 0.233705, 0.457755) ,
- rgb (0.773695, 0.236249, 0.455289) ,
- rgb (0.779968, 0.238851, 0.452765) ,
- rgb (0.786212, 0.241514, 0.450184) ,
- rgb (0.792427, 0.244242, 0.447543) ,
- rgb (0.798608, 0.24704, 0.444848) ,
- rgb (0.804752, 0.249911, 0.442102) ,
- rgb (0.810855, 0.252861, 0.439305) ,
- rgb (0.816914, 0.255895, 0.436461) ,
- rgb (0.822926, 0.259016, 0.433573) ,
- rgb (0.828886, 0.262229, 0.430644) ,
- rgb (0.834791, 0.26554, 0.427671) ,
- rgb (0.840636, 0.268953, 0.424666) ,
- rgb (0.846416, 0.272473, 0.421631) ,
- rgb (0.852126, 0.276106, 0.418573) ,
- rgb (0.857763, 0.279857, 0.415496) ,
- rgb (0.86332, 0.283729, 0.412403) ,
- rgb (0.868793, 0.287728, 0.409303) ,
- rgb (0.874176, 0.291859, 0.406205) ,
- rgb (0.879464, 0.296125, 0.403118) ,
- rgb (0.884651, 0.30053, 0.400047) ,
- rgb (0.889731, 0.305079, 0.397002) ,
- rgb (0.8947, 0.309773, 0.393995) ,
- rgb (0.899552, 0.314616, 0.391037) ,
- rgb (0.904281, 0.31961, 0.388137) ,
- rgb (0.908884, 0.324755, 0.385308) ,
- rgb (0.913354, 0.330052, 0.382563) ,
- rgb (0.917689, 0.3355, 0.379915) ,
- rgb (0.921884, 0.341098, 0.377376) ,
- rgb (0.925937, 0.346844, 0.374959) ,
- rgb (0.929845, 0.352734, 0.372677) ,
- rgb (0.933606, 0.358764, 0.370541) ,
- rgb (0.937221, 0.364929, 0.368567) ,
- rgb (0.940687, 0.371224, 0.366762) ,
- rgb (0.944006, 0.377643, 0.365136) ,
- rgb (0.94718, 0.384178, 0.363701) ,
- rgb (0.95021, 0.39082, 0.362468) ,
- rgb (0.953099, 0.397563, 0.361438) ,
- rgb (0.955849, 0.4044, 0.360619) ,
- rgb (0.958464, 0.411324, 0.360014) ,
- rgb (0.960949, 0.418323, 0.35963) ,
- rgb (0.96331, 0.42539, 0.359469) ,
- rgb (0.965549, 0.432519, 0.359529) ,
- rgb (0.967671, 0.439703, 0.35981) ,
- rgb (0.96968, 0.446936, 0.360311) ,
- rgb (0.971582, 0.45421, 0.36103) ,
- rgb (0.973381, 0.46152, 0.361965) ,
- rgb (0.975082, 0.468861, 0.363111) ,
- rgb (0.97669, 0.476226, 0.364466) ,
- rgb (0.97821, 0.483612, 0.366025) ,
- rgb (0.979645, 0.491014, 0.367783) ,
- rgb (0.981, 0.498428, 0.369734) ,
- rgb (0.982279, 0.505851, 0.371874) ,
- rgb (0.983485, 0.51328, 0.374198) ,
- rgb (0.984622, 0.520713, 0.376698) ,
- rgb (0.985693, 0.528148, 0.379371) ,
- rgb (0.9867, 0.535582, 0.38221) ,
- rgb (0.987646, 0.543015, 0.38521) ,
- rgb (0.988533, 0.550446, 0.388365) ,
- rgb (0.989363, 0.557873, 0.391671) ,
- rgb (0.990138, 0.565296, 0.395122) ,
- rgb (0.990871, 0.572706, 0.398714) ,
- rgb (0.991558, 0.580107, 0.402441) ,
- rgb (0.992196, 0.587502, 0.406299) ,
- rgb (0.992785, 0.594891, 0.410283) ,
- rgb (0.993326, 0.602275, 0.41439) ,
- rgb (0.993834, 0.609644, 0.418613) ,
- rgb (0.994309, 0.616999, 0.42295) ,
- rgb (0.994738, 0.62435, 0.427397) ,
- rgb (0.995122, 0.631696, 0.431951) ,
- rgb (0.99548, 0.639027, 0.436607) ,
- rgb (0.99581, 0.646344, 0.441361) ,
- rgb (0.996096, 0.653659, 0.446213) ,
- rgb (0.996341, 0.660969, 0.45116) ,
- rgb (0.99658, 0.668256, 0.456192) ,
- rgb (0.996775, 0.675541, 0.461314) ,
- rgb (0.996925, 0.682828, 0.466526) ,
- rgb (0.997077, 0.690088, 0.471811) ,
- rgb (0.997186, 0.697349, 0.477182) ,
- rgb (0.997254, 0.704611, 0.482635) ,
- rgb (0.997325, 0.711848, 0.488154) ,
- rgb (0.997351, 0.719089, 0.493755) ,
- rgb (0.997351, 0.726324, 0.499428) ,
- rgb (0.997341, 0.733545, 0.505167) ,
- rgb (0.997285, 0.740772, 0.510983) ,
- rgb (0.997228, 0.747981, 0.516859) ,
- rgb (0.997138, 0.75519, 0.522806) ,
- rgb (0.997019, 0.762398, 0.528821) ,
- rgb (0.996898, 0.769591, 0.534892) ,
- rgb (0.996727, 0.776795, 0.541039) ,
- rgb (0.996571, 0.783977, 0.547233) ,
- rgb (0.996369, 0.791167, 0.553499) ,
- rgb (0.996162, 0.798348, 0.55982) ,
- rgb (0.995932, 0.805527, 0.566202) ,
- rgb (0.99568, 0.812706, 0.572645) ,
- rgb (0.995424, 0.819875, 0.57914) ,
- rgb (0.995131, 0.827052, 0.585701) ,
- rgb (0.994851, 0.834213, 0.592307) ,
- rgb (0.994524, 0.841387, 0.598983) ,
- rgb (0.994222, 0.84854, 0.605696) ,
- rgb (0.993866, 0.855711, 0.612482) ,
- rgb (0.993545, 0.862859, 0.619299) ,
- rgb (0.99317, 0.870024, 0.626189) ,
- rgb (0.992831, 0.877168, 0.633109) ,
- rgb (0.99244, 0.88433, 0.640099) ,
- rgb (0.992089, 0.89147, 0.647116) ,
- rgb (0.991688, 0.898627, 0.654202) ,
- rgb (0.991332, 0.905763, 0.661309) ,
- rgb (0.99093, 0.912915, 0.668481) ,
- rgb (0.99057, 0.920049, 0.675675) ,
- rgb (0.990175, 0.927196, 0.682926) ,
- rgb (0.989815, 0.934329, 0.690198) ,
- rgb (0.989434, 0.94147, 0.697519) ,
- rgb (0.989077, 0.948604, 0.704863) ,
- rgb (0.988717, 0.955742, 0.712242) ,
- rgb (0.988367, 0.962878, 0.719649) ,
- rgb (0.988033, 0.970012, 0.727077) ,
- rgb (0.987691, 0.977154, 0.734536) ,
- rgb (0.987387, 0.984288, 0.742002) ,
- rgb (0.987053, 0.991438, 0.749504)
-});
+ rgb (0.001462, 0.000466, 0.013866) ,
+ rgb (0.002258, 0.001295, 0.018331) ,
+ rgb (0.003279, 0.002305, 0.023708) ,
+ rgb (0.004512, 0.00349, 0.029965) ,
+ rgb (0.00595, 0.004843, 0.03713) ,
+ rgb (0.007588, 0.006356, 0.044973) ,
+ rgb (0.009426, 0.008022, 0.052844) ,
+ rgb (0.011465, 0.009828, 0.06075) ,
+ rgb (0.013708, 0.011771, 0.068667) ,
+ rgb (0.016156, 0.01384, 0.076603) ,
+ rgb (0.018815, 0.016026, 0.084584) ,
+ rgb (0.021692, 0.01832, 0.09261) ,
+ rgb (0.024792, 0.020715, 0.100676) ,
+ rgb (0.028123, 0.023201, 0.108787) ,
+ rgb (0.031696, 0.025765, 0.116965) ,
+ rgb (0.03552, 0.028397, 0.125209) ,
+ rgb (0.039608, 0.03109, 0.133515) ,
+ rgb (0.04383, 0.03383, 0.141886) ,
+ rgb (0.048062, 0.036607, 0.150327) ,
+ rgb (0.05232, 0.039407, 0.158841) ,
+ rgb (0.056615, 0.04216, 0.167446) ,
+ rgb (0.060949, 0.044794, 0.176129) ,
+ rgb (0.06533, 0.047318, 0.184892) ,
+ rgb (0.069764, 0.049726, 0.193735) ,
+ rgb (0.074257, 0.052017, 0.20266) ,
+ rgb (0.078815, 0.054184, 0.211667) ,
+ rgb (0.083446, 0.056225, 0.220755) ,
+ rgb (0.088155, 0.058133, 0.229922) ,
+ rgb (0.092949, 0.059904, 0.239164) ,
+ rgb (0.097833, 0.061531, 0.248477) ,
+ rgb (0.102815, 0.06301, 0.257854) ,
+ rgb (0.107899, 0.064335, 0.267289) ,
+ rgb (0.113094, 0.065492, 0.276784) ,
+ rgb (0.118405, 0.066479, 0.286321) ,
+ rgb (0.123833, 0.067295, 0.295879) ,
+ rgb (0.12938, 0.067935, 0.305443) ,
+ rgb (0.135053, 0.068391, 0.315) ,
+ rgb (0.140858, 0.068654, 0.324538) ,
+ rgb (0.146785, 0.068738, 0.334011) ,
+ rgb (0.152839, 0.068637, 0.343404) ,
+ rgb (0.159018, 0.068354, 0.352688) ,
+ rgb (0.165308, 0.067911, 0.361816) ,
+ rgb (0.171713, 0.067305, 0.370771) ,
+ rgb (0.178212, 0.066576, 0.379497) ,
+ rgb (0.184801, 0.065732, 0.387973) ,
+ rgb (0.19146, 0.064818, 0.396152) ,
+ rgb (0.198177, 0.063862, 0.404009) ,
+ rgb (0.204935, 0.062907, 0.411514) ,
+ rgb (0.211718, 0.061992, 0.418647) ,
+ rgb (0.218512, 0.061158, 0.425392) ,
+ rgb (0.225302, 0.060445, 0.431742) ,
+ rgb (0.232077, 0.059889, 0.437695) ,
+ rgb (0.238826, 0.059517, 0.443256) ,
+ rgb (0.245543, 0.059352, 0.448436) ,
+ rgb (0.25222, 0.059415, 0.453248) ,
+ rgb (0.258857, 0.059706, 0.45771) ,
+ rgb (0.265447, 0.060237, 0.46184) ,
+ rgb (0.271994, 0.060994, 0.46566) ,
+ rgb (0.278493, 0.061978, 0.46919) ,
+ rgb (0.284951, 0.063168, 0.472451) ,
+ rgb (0.291366, 0.064553, 0.475462) ,
+ rgb (0.29774, 0.066117, 0.478243) ,
+ rgb (0.304081, 0.067835, 0.480812) ,
+ rgb (0.310382, 0.069702, 0.483186) ,
+ rgb (0.316654, 0.07169, 0.48538) ,
+ rgb (0.322899, 0.073782, 0.487408) ,
+ rgb (0.329114, 0.075972, 0.489287) ,
+ rgb (0.335308, 0.078236, 0.491024) ,
+ rgb (0.341482, 0.080564, 0.492631) ,
+ rgb (0.347636, 0.082946, 0.494121) ,
+ rgb (0.353773, 0.085373, 0.495501) ,
+ rgb (0.359898, 0.087831, 0.496778) ,
+ rgb (0.366012, 0.090314, 0.49796) ,
+ rgb (0.372116, 0.092816, 0.499053) ,
+ rgb (0.378211, 0.095332, 0.500067) ,
+ rgb (0.384299, 0.097855, 0.501002) ,
+ rgb (0.390384, 0.100379, 0.501864) ,
+ rgb (0.396467, 0.102902, 0.502658) ,
+ rgb (0.402548, 0.10542, 0.503386) ,
+ rgb (0.408629, 0.10793, 0.504052) ,
+ rgb (0.414709, 0.110431, 0.504662) ,
+ rgb (0.420791, 0.11292, 0.505215) ,
+ rgb (0.426877, 0.115395, 0.505714) ,
+ rgb (0.432967, 0.117855, 0.50616) ,
+ rgb (0.439062, 0.120298, 0.506555) ,
+ rgb (0.445163, 0.122724, 0.506901) ,
+ rgb (0.451271, 0.125132, 0.507198) ,
+ rgb (0.457386, 0.127522, 0.507448) ,
+ rgb (0.463508, 0.129893, 0.507652) ,
+ rgb (0.46964, 0.132245, 0.507809) ,
+ rgb (0.47578, 0.134577, 0.507921) ,
+ rgb (0.481929, 0.136891, 0.507989) ,
+ rgb (0.488088, 0.139186, 0.508011) ,
+ rgb (0.494258, 0.141462, 0.507988) ,
+ rgb (0.500438, 0.143719, 0.50792) ,
+ rgb (0.506629, 0.145958, 0.507806) ,
+ rgb (0.512831, 0.148179, 0.507648) ,
+ rgb (0.519045, 0.150383, 0.507443) ,
+ rgb (0.52527, 0.152569, 0.507192) ,
+ rgb (0.531507, 0.154739, 0.506895) ,
+ rgb (0.537755, 0.156894, 0.506551) ,
+ rgb (0.544015, 0.159033, 0.506159) ,
+ rgb (0.550287, 0.161158, 0.505719) ,
+ rgb (0.556571, 0.163269, 0.50523) ,
+ rgb (0.562866, 0.165368, 0.504692) ,
+ rgb (0.569172, 0.167454, 0.504105) ,
+ rgb (0.57549, 0.16953, 0.503466) ,
+ rgb (0.581819, 0.171596, 0.502777) ,
+ rgb (0.588158, 0.173652, 0.502035) ,
+ rgb (0.594508, 0.175701, 0.501241) ,
+ rgb (0.600868, 0.177743, 0.500394) ,
+ rgb (0.607238, 0.179779, 0.499492) ,
+ rgb (0.613617, 0.181811, 0.498536) ,
+ rgb (0.620005, 0.18384, 0.497524) ,
+ rgb (0.626401, 0.185867, 0.496456) ,
+ rgb (0.632805, 0.187893, 0.495332) ,
+ rgb (0.639216, 0.189921, 0.49415) ,
+ rgb (0.645633, 0.191952, 0.49291) ,
+ rgb (0.652056, 0.193986, 0.491611) ,
+ rgb (0.658483, 0.196027, 0.490253) ,
+ rgb (0.664915, 0.198075, 0.488836) ,
+ rgb (0.671349, 0.200133, 0.487358) ,
+ rgb (0.677786, 0.202203, 0.485819) ,
+ rgb (0.684224, 0.204286, 0.484219) ,
+ rgb (0.690661, 0.206384, 0.482558) ,
+ rgb (0.697098, 0.208501, 0.480835) ,
+ rgb (0.703532, 0.210638, 0.479049) ,
+ rgb (0.709962, 0.212797, 0.477201) ,
+ rgb (0.716387, 0.214982, 0.47529) ,
+ rgb (0.722805, 0.217194, 0.473316) ,
+ rgb (0.729216, 0.219437, 0.471279) ,
+ rgb (0.735616, 0.221713, 0.46918) ,
+ rgb (0.742004, 0.224025, 0.467018) ,
+ rgb (0.748378, 0.226377, 0.464794) ,
+ rgb (0.754737, 0.228772, 0.462509) ,
+ rgb (0.761077, 0.231214, 0.460162) ,
+ rgb (0.767398, 0.233705, 0.457755) ,
+ rgb (0.773695, 0.236249, 0.455289) ,
+ rgb (0.779968, 0.238851, 0.452765) ,
+ rgb (0.786212, 0.241514, 0.450184) ,
+ rgb (0.792427, 0.244242, 0.447543) ,
+ rgb (0.798608, 0.24704, 0.444848) ,
+ rgb (0.804752, 0.249911, 0.442102) ,
+ rgb (0.810855, 0.252861, 0.439305) ,
+ rgb (0.816914, 0.255895, 0.436461) ,
+ rgb (0.822926, 0.259016, 0.433573) ,
+ rgb (0.828886, 0.262229, 0.430644) ,
+ rgb (0.834791, 0.26554, 0.427671) ,
+ rgb (0.840636, 0.268953, 0.424666) ,
+ rgb (0.846416, 0.272473, 0.421631) ,
+ rgb (0.852126, 0.276106, 0.418573) ,
+ rgb (0.857763, 0.279857, 0.415496) ,
+ rgb (0.86332, 0.283729, 0.412403) ,
+ rgb (0.868793, 0.287728, 0.409303) ,
+ rgb (0.874176, 0.291859, 0.406205) ,
+ rgb (0.879464, 0.296125, 0.403118) ,
+ rgb (0.884651, 0.30053, 0.400047) ,
+ rgb (0.889731, 0.305079, 0.397002) ,
+ rgb (0.8947, 0.309773, 0.393995) ,
+ rgb (0.899552, 0.314616, 0.391037) ,
+ rgb (0.904281, 0.31961, 0.388137) ,
+ rgb (0.908884, 0.324755, 0.385308) ,
+ rgb (0.913354, 0.330052, 0.382563) ,
+ rgb (0.917689, 0.3355, 0.379915) ,
+ rgb (0.921884, 0.341098, 0.377376) ,
+ rgb (0.925937, 0.346844, 0.374959) ,
+ rgb (0.929845, 0.352734, 0.372677) ,
+ rgb (0.933606, 0.358764, 0.370541) ,
+ rgb (0.937221, 0.364929, 0.368567) ,
+ rgb (0.940687, 0.371224, 0.366762) ,
+ rgb (0.944006, 0.377643, 0.365136) ,
+ rgb (0.94718, 0.384178, 0.363701) ,
+ rgb (0.95021, 0.39082, 0.362468) ,
+ rgb (0.953099, 0.397563, 0.361438) ,
+ rgb (0.955849, 0.4044, 0.360619) ,
+ rgb (0.958464, 0.411324, 0.360014) ,
+ rgb (0.960949, 0.418323, 0.35963) ,
+ rgb (0.96331, 0.42539, 0.359469) ,
+ rgb (0.965549, 0.432519, 0.359529) ,
+ rgb (0.967671, 0.439703, 0.35981) ,
+ rgb (0.96968, 0.446936, 0.360311) ,
+ rgb (0.971582, 0.45421, 0.36103) ,
+ rgb (0.973381, 0.46152, 0.361965) ,
+ rgb (0.975082, 0.468861, 0.363111) ,
+ rgb (0.97669, 0.476226, 0.364466) ,
+ rgb (0.97821, 0.483612, 0.366025) ,
+ rgb (0.979645, 0.491014, 0.367783) ,
+ rgb (0.981, 0.498428, 0.369734) ,
+ rgb (0.982279, 0.505851, 0.371874) ,
+ rgb (0.983485, 0.51328, 0.374198) ,
+ rgb (0.984622, 0.520713, 0.376698) ,
+ rgb (0.985693, 0.528148, 0.379371) ,
+ rgb (0.9867, 0.535582, 0.38221) ,
+ rgb (0.987646, 0.543015, 0.38521) ,
+ rgb (0.988533, 0.550446, 0.388365) ,
+ rgb (0.989363, 0.557873, 0.391671) ,
+ rgb (0.990138, 0.565296, 0.395122) ,
+ rgb (0.990871, 0.572706, 0.398714) ,
+ rgb (0.991558, 0.580107, 0.402441) ,
+ rgb (0.992196, 0.587502, 0.406299) ,
+ rgb (0.992785, 0.594891, 0.410283) ,
+ rgb (0.993326, 0.602275, 0.41439) ,
+ rgb (0.993834, 0.609644, 0.418613) ,
+ rgb (0.994309, 0.616999, 0.42295) ,
+ rgb (0.994738, 0.62435, 0.427397) ,
+ rgb (0.995122, 0.631696, 0.431951) ,
+ rgb (0.99548, 0.639027, 0.436607) ,
+ rgb (0.99581, 0.646344, 0.441361) ,
+ rgb (0.996096, 0.653659, 0.446213) ,
+ rgb (0.996341, 0.660969, 0.45116) ,
+ rgb (0.99658, 0.668256, 0.456192) ,
+ rgb (0.996775, 0.675541, 0.461314) ,
+ rgb (0.996925, 0.682828, 0.466526) ,
+ rgb (0.997077, 0.690088, 0.471811) ,
+ rgb (0.997186, 0.697349, 0.477182) ,
+ rgb (0.997254, 0.704611, 0.482635) ,
+ rgb (0.997325, 0.711848, 0.488154) ,
+ rgb (0.997351, 0.719089, 0.493755) ,
+ rgb (0.997351, 0.726324, 0.499428) ,
+ rgb (0.997341, 0.733545, 0.505167) ,
+ rgb (0.997285, 0.740772, 0.510983) ,
+ rgb (0.997228, 0.747981, 0.516859) ,
+ rgb (0.997138, 0.75519, 0.522806) ,
+ rgb (0.997019, 0.762398, 0.528821) ,
+ rgb (0.996898, 0.769591, 0.534892) ,
+ rgb (0.996727, 0.776795, 0.541039) ,
+ rgb (0.996571, 0.783977, 0.547233) ,
+ rgb (0.996369, 0.791167, 0.553499) ,
+ rgb (0.996162, 0.798348, 0.55982) ,
+ rgb (0.995932, 0.805527, 0.566202) ,
+ rgb (0.99568, 0.812706, 0.572645) ,
+ rgb (0.995424, 0.819875, 0.57914) ,
+ rgb (0.995131, 0.827052, 0.585701) ,
+ rgb (0.994851, 0.834213, 0.592307) ,
+ rgb (0.994524, 0.841387, 0.598983) ,
+ rgb (0.994222, 0.84854, 0.605696) ,
+ rgb (0.993866, 0.855711, 0.612482) ,
+ rgb (0.993545, 0.862859, 0.619299) ,
+ rgb (0.99317, 0.870024, 0.626189) ,
+ rgb (0.992831, 0.877168, 0.633109) ,
+ rgb (0.99244, 0.88433, 0.640099) ,
+ rgb (0.992089, 0.89147, 0.647116) ,
+ rgb (0.991688, 0.898627, 0.654202) ,
+ rgb (0.991332, 0.905763, 0.661309) ,
+ rgb (0.99093, 0.912915, 0.668481) ,
+ rgb (0.99057, 0.920049, 0.675675) ,
+ rgb (0.990175, 0.927196, 0.682926) ,
+ rgb (0.989815, 0.934329, 0.690198) ,
+ rgb (0.989434, 0.94147, 0.697519) ,
+ rgb (0.989077, 0.948604, 0.704863) ,
+ rgb (0.988717, 0.955742, 0.712242) ,
+ rgb (0.988367, 0.962878, 0.719649) ,
+ rgb (0.988033, 0.970012, 0.727077) ,
+ rgb (0.987691, 0.977154, 0.734536) ,
+ rgb (0.987387, 0.984288, 0.742002) ,
+ rgb (0.987053, 0.991438, 0.749504)
+ });
list_data plasma = list_data(new pen[] {
- rgb (0.050383, 0.029803, 0.527975) ,
- rgb (0.063536, 0.028426, 0.533124) ,
- rgb (0.075353, 0.027206, 0.538007) ,
- rgb (0.086222, 0.026125, 0.542658) ,
- rgb (0.096379, 0.025165, 0.547103) ,
- rgb (0.10598, 0.024309, 0.551368) ,
- rgb (0.115124, 0.023556, 0.555468) ,
- rgb (0.123903, 0.022878, 0.559423) ,
- rgb (0.132381, 0.022258, 0.56325) ,
- rgb (0.140603, 0.021687, 0.566959) ,
- rgb (0.148607, 0.021154, 0.570562) ,
- rgb (0.156421, 0.020651, 0.574065) ,
- rgb (0.16407, 0.020171, 0.577478) ,
- rgb (0.171574, 0.019706, 0.580806) ,
- rgb (0.17895, 0.019252, 0.584054) ,
- rgb (0.186213, 0.018803, 0.587228) ,
- rgb (0.193374, 0.018354, 0.59033) ,
- rgb (0.200445, 0.017902, 0.593364) ,
- rgb (0.207435, 0.017442, 0.596333) ,
- rgb (0.21435, 0.016973, 0.599239) ,
- rgb (0.221197, 0.016497, 0.602083) ,
- rgb (0.227983, 0.016007, 0.604867) ,
- rgb (0.234715, 0.015502, 0.607592) ,
- rgb (0.241396, 0.014979, 0.610259) ,
- rgb (0.248032, 0.014439, 0.612868) ,
- rgb (0.254627, 0.013882, 0.615419) ,
- rgb (0.261183, 0.013308, 0.617911) ,
- rgb (0.267703, 0.012716, 0.620346) ,
- rgb (0.274191, 0.012109, 0.622722) ,
- rgb (0.280648, 0.011488, 0.625038) ,
- rgb (0.287076, 0.010855, 0.627295) ,
- rgb (0.293478, 0.010213, 0.62949) ,
- rgb (0.299855, 0.009561, 0.631624) ,
- rgb (0.30621, 0.008902, 0.633694) ,
- rgb (0.312543, 0.008239, 0.6357) ,
- rgb (0.318856, 0.007576, 0.63764) ,
- rgb (0.32515, 0.006915, 0.639512) ,
- rgb (0.331426, 0.006261, 0.641316) ,
- rgb (0.337683, 0.005618, 0.643049) ,
- rgb (0.343925, 0.004991, 0.64471) ,
- rgb (0.35015, 0.004382, 0.646298) ,
- rgb (0.356359, 0.003798, 0.64781) ,
- rgb (0.362553, 0.003243, 0.649245) ,
- rgb (0.368733, 0.002724, 0.650601) ,
- rgb (0.374897, 0.002245, 0.651876) ,
- rgb (0.381047, 0.001814, 0.653068) ,
- rgb (0.387183, 0.001434, 0.654177) ,
- rgb (0.393304, 0.001114, 0.655199) ,
- rgb (0.399411, 0.000859, 0.656133) ,
- rgb (0.405503, 0.000678, 0.656977) ,
- rgb (0.41158, 0.000577, 0.65773) ,
- rgb (0.417642, 0.000564, 0.65839) ,
- rgb (0.423689, 0.000646, 0.658956) ,
- rgb (0.429719, 0.000831, 0.659425) ,
- rgb (0.435734, 0.001127, 0.659797) ,
- rgb (0.441732, 0.00154, 0.660069) ,
- rgb (0.447714, 0.00208, 0.66024) ,
- rgb (0.453677, 0.002755, 0.66031) ,
- rgb (0.459623, 0.003574, 0.660277) ,
- rgb (0.46555, 0.004545, 0.660139) ,
- rgb (0.471457, 0.005678, 0.659897) ,
- rgb (0.477344, 0.00698, 0.659549) ,
- rgb (0.48321, 0.00846, 0.659095) ,
- rgb (0.489055, 0.010127, 0.658534) ,
- rgb (0.494877, 0.01199, 0.657865) ,
- rgb (0.500678, 0.014055, 0.657088) ,
- rgb (0.506454, 0.016333, 0.656202) ,
- rgb (0.512206, 0.018833, 0.655209) ,
- rgb (0.517933, 0.021563, 0.654109) ,
- rgb (0.523633, 0.024532, 0.652901) ,
- rgb (0.529306, 0.027747, 0.651586) ,
- rgb (0.534952, 0.031217, 0.650165) ,
- rgb (0.54057, 0.03495, 0.64864) ,
- rgb (0.546157, 0.038954, 0.64701) ,
- rgb (0.551715, 0.043136, 0.645277) ,
- rgb (0.557243, 0.047331, 0.643443) ,
- rgb (0.562738, 0.051545, 0.641509) ,
- rgb (0.568201, 0.055778, 0.639477) ,
- rgb (0.573632, 0.060028, 0.637349) ,
- rgb (0.579029, 0.064296, 0.635126) ,
- rgb (0.584391, 0.068579, 0.632812) ,
- rgb (0.589719, 0.072878, 0.630408) ,
- rgb (0.595011, 0.07719, 0.627917) ,
- rgb (0.600266, 0.081516, 0.625342) ,
- rgb (0.605485, 0.085854, 0.622686) ,
- rgb (0.610667, 0.090204, 0.619951) ,
- rgb (0.615812, 0.094564, 0.61714) ,
- rgb (0.620919, 0.098934, 0.614257) ,
- rgb (0.625987, 0.103312, 0.611305) ,
- rgb (0.631017, 0.107699, 0.608287) ,
- rgb (0.636008, 0.112092, 0.605205) ,
- rgb (0.640959, 0.116492, 0.602065) ,
- rgb (0.645872, 0.120898, 0.598867) ,
- rgb (0.650746, 0.125309, 0.595617) ,
- rgb (0.65558, 0.129725, 0.592317) ,
- rgb (0.660374, 0.134144, 0.588971) ,
- rgb (0.665129, 0.138566, 0.585582) ,
- rgb (0.669845, 0.142992, 0.582154) ,
- rgb (0.674522, 0.147419, 0.578688) ,
- rgb (0.67916, 0.151848, 0.575189) ,
- rgb (0.683758, 0.156278, 0.57166) ,
- rgb (0.688318, 0.160709, 0.568103) ,
- rgb (0.69284, 0.165141, 0.564522) ,
- rgb (0.697324, 0.169573, 0.560919) ,
- rgb (0.701769, 0.174005, 0.557296) ,
- rgb (0.706178, 0.178437, 0.553657) ,
- rgb (0.710549, 0.182868, 0.550004) ,
- rgb (0.714883, 0.187299, 0.546338) ,
- rgb (0.719181, 0.191729, 0.542663) ,
- rgb (0.723444, 0.196158, 0.538981) ,
- rgb (0.72767, 0.200586, 0.535293) ,
- rgb (0.731862, 0.205013, 0.531601) ,
- rgb (0.736019, 0.209439, 0.527908) ,
- rgb (0.740143, 0.213864, 0.524216) ,
- rgb (0.744232, 0.218288, 0.520524) ,
- rgb (0.748289, 0.222711, 0.516834) ,
- rgb (0.752312, 0.227133, 0.513149) ,
- rgb (0.756304, 0.231555, 0.509468) ,
- rgb (0.760264, 0.235976, 0.505794) ,
- rgb (0.764193, 0.240396, 0.502126) ,
- rgb (0.76809, 0.244817, 0.498465) ,
- rgb (0.771958, 0.249237, 0.494813) ,
- rgb (0.775796, 0.253658, 0.491171) ,
- rgb (0.779604, 0.258078, 0.487539) ,
- rgb (0.783383, 0.2625, 0.483918) ,
- rgb (0.787133, 0.266922, 0.480307) ,
- rgb (0.790855, 0.271345, 0.476706) ,
- rgb (0.794549, 0.27577, 0.473117) ,
- rgb (0.798216, 0.280197, 0.469538) ,
- rgb (0.801855, 0.284626, 0.465971) ,
- rgb (0.805467, 0.289057, 0.462415) ,
- rgb (0.809052, 0.293491, 0.45887) ,
- rgb (0.812612, 0.297928, 0.455338) ,
- rgb (0.816144, 0.302368, 0.451816) ,
- rgb (0.819651, 0.306812, 0.448306) ,
- rgb (0.823132, 0.311261, 0.444806) ,
- rgb (0.826588, 0.315714, 0.441316) ,
- rgb (0.830018, 0.320172, 0.437836) ,
- rgb (0.833422, 0.324635, 0.434366) ,
- rgb (0.836801, 0.329105, 0.430905) ,
- rgb (0.840155, 0.33358, 0.427455) ,
- rgb (0.843484, 0.338062, 0.424013) ,
- rgb (0.846788, 0.342551, 0.420579) ,
- rgb (0.850066, 0.347048, 0.417153) ,
- rgb (0.853319, 0.351553, 0.413734) ,
- rgb (0.856547, 0.356066, 0.410322) ,
- rgb (0.85975, 0.360588, 0.406917) ,
- rgb (0.862927, 0.365119, 0.403519) ,
- rgb (0.866078, 0.36966, 0.400126) ,
- rgb (0.869203, 0.374212, 0.396738) ,
- rgb (0.872303, 0.378774, 0.393355) ,
- rgb (0.875376, 0.383347, 0.389976) ,
- rgb (0.878423, 0.387932, 0.3866) ,
- rgb (0.881443, 0.392529, 0.383229) ,
- rgb (0.884436, 0.397139, 0.37986) ,
- rgb (0.887402, 0.401762, 0.376494) ,
- rgb (0.89034, 0.406398, 0.37313) ,
- rgb (0.89325, 0.411048, 0.369768) ,
- rgb (0.896131, 0.415712, 0.366407) ,
- rgb (0.898984, 0.420392, 0.363047) ,
- rgb (0.901807, 0.425087, 0.359688) ,
- rgb (0.904601, 0.429797, 0.356329) ,
- rgb (0.907365, 0.434524, 0.35297) ,
- rgb (0.910098, 0.439268, 0.34961) ,
- rgb (0.9128, 0.444029, 0.346251) ,
- rgb (0.915471, 0.448807, 0.34289) ,
- rgb (0.918109, 0.453603, 0.339529) ,
- rgb (0.920714, 0.458417, 0.336166) ,
- rgb (0.923287, 0.463251, 0.332801) ,
- rgb (0.925825, 0.468103, 0.329435) ,
- rgb (0.928329, 0.472975, 0.326067) ,
- rgb (0.930798, 0.477867, 0.322697) ,
- rgb (0.933232, 0.48278, 0.319325) ,
- rgb (0.93563, 0.487712, 0.315952) ,
- rgb (0.93799, 0.492667, 0.312575) ,
- rgb (0.940313, 0.497642, 0.309197) ,
- rgb (0.942598, 0.502639, 0.305816) ,
- rgb (0.944844, 0.507658, 0.302433) ,
- rgb (0.947051, 0.512699, 0.299049) ,
- rgb (0.949217, 0.517763, 0.295662) ,
- rgb (0.951344, 0.52285, 0.292275) ,
- rgb (0.953428, 0.52796, 0.288883) ,
- rgb (0.95547, 0.533093, 0.28549) ,
- rgb (0.957469, 0.53825, 0.282096) ,
- rgb (0.959424, 0.543431, 0.278701) ,
- rgb (0.961336, 0.548636, 0.275305) ,
- rgb (0.963203, 0.553865, 0.271909) ,
- rgb (0.965024, 0.559118, 0.268513) ,
- rgb (0.966798, 0.564396, 0.265118) ,
- rgb (0.968526, 0.5697, 0.261721) ,
- rgb (0.970205, 0.575028, 0.258325) ,
- rgb (0.971835, 0.580382, 0.254931) ,
- rgb (0.973416, 0.585761, 0.25154) ,
- rgb (0.974947, 0.591165, 0.248151) ,
- rgb (0.976428, 0.596595, 0.244767) ,
- rgb (0.977856, 0.602051, 0.241387) ,
- rgb (0.979233, 0.607532, 0.238013) ,
- rgb (0.980556, 0.613039, 0.234646) ,
- rgb (0.981826, 0.618572, 0.231287) ,
- rgb (0.983041, 0.624131, 0.227937) ,
- rgb (0.984199, 0.629718, 0.224595) ,
- rgb (0.985301, 0.63533, 0.221265) ,
- rgb (0.986345, 0.640969, 0.217948) ,
- rgb (0.987332, 0.646633, 0.214648) ,
- rgb (0.98826, 0.652325, 0.211364) ,
- rgb (0.989128, 0.658043, 0.2081) ,
- rgb (0.989935, 0.663787, 0.204859) ,
- rgb (0.990681, 0.669558, 0.201642) ,
- rgb (0.991365, 0.675355, 0.198453) ,
- rgb (0.991985, 0.681179, 0.195295) ,
- rgb (0.992541, 0.68703, 0.19217) ,
- rgb (0.993032, 0.692907, 0.189084) ,
- rgb (0.993456, 0.69881, 0.186041) ,
- rgb (0.993814, 0.704741, 0.183043) ,
- rgb (0.994103, 0.710698, 0.180097) ,
- rgb (0.994324, 0.716681, 0.177208) ,
- rgb (0.994474, 0.722691, 0.174381) ,
- rgb (0.994553, 0.728728, 0.171622) ,
- rgb (0.994561, 0.734791, 0.168938) ,
- rgb (0.994495, 0.74088, 0.166335) ,
- rgb (0.994355, 0.746995, 0.163821) ,
- rgb (0.994141, 0.753137, 0.161404) ,
- rgb (0.993851, 0.759304, 0.159092) ,
- rgb (0.993482, 0.765499, 0.156891) ,
- rgb (0.993033, 0.77172, 0.154808) ,
- rgb (0.992505, 0.777967, 0.152855) ,
- rgb (0.991897, 0.784239, 0.151042) ,
- rgb (0.991209, 0.790537, 0.149377) ,
- rgb (0.990439, 0.796859, 0.14787) ,
- rgb (0.989587, 0.803205, 0.146529) ,
- rgb (0.988648, 0.809579, 0.145357) ,
- rgb (0.987621, 0.815978, 0.144363) ,
- rgb (0.986509, 0.822401, 0.143557) ,
- rgb (0.985314, 0.828846, 0.142945) ,
- rgb (0.984031, 0.835315, 0.142528) ,
- rgb (0.982653, 0.841812, 0.142303) ,
- rgb (0.98119, 0.848329, 0.142279) ,
- rgb (0.979644, 0.854866, 0.142453) ,
- rgb (0.977995, 0.861432, 0.142808) ,
- rgb (0.976265, 0.868016, 0.143351) ,
- rgb (0.974443, 0.874622, 0.144061) ,
- rgb (0.97253, 0.88125, 0.144923) ,
- rgb (0.970533, 0.887896, 0.145919) ,
- rgb (0.968443, 0.894564, 0.147014) ,
- rgb (0.966271, 0.901249, 0.14818) ,
- rgb (0.964021, 0.90795, 0.14937) ,
- rgb (0.961681, 0.914672, 0.15052) ,
- rgb (0.959276, 0.921407, 0.151566) ,
- rgb (0.956808, 0.928152, 0.152409) ,
- rgb (0.954287, 0.934908, 0.152921) ,
- rgb (0.951726, 0.941671, 0.152925) ,
- rgb (0.949151, 0.948435, 0.152178) ,
- rgb (0.946602, 0.95519, 0.150328) ,
- rgb (0.944152, 0.961916, 0.146861) ,
- rgb (0.941896, 0.96859, 0.140956) ,
- rgb (0.940015, 0.975158, 0.131326)
-});
+ rgb (0.050383, 0.029803, 0.527975) ,
+ rgb (0.063536, 0.028426, 0.533124) ,
+ rgb (0.075353, 0.027206, 0.538007) ,
+ rgb (0.086222, 0.026125, 0.542658) ,
+ rgb (0.096379, 0.025165, 0.547103) ,
+ rgb (0.10598, 0.024309, 0.551368) ,
+ rgb (0.115124, 0.023556, 0.555468) ,
+ rgb (0.123903, 0.022878, 0.559423) ,
+ rgb (0.132381, 0.022258, 0.56325) ,
+ rgb (0.140603, 0.021687, 0.566959) ,
+ rgb (0.148607, 0.021154, 0.570562) ,
+ rgb (0.156421, 0.020651, 0.574065) ,
+ rgb (0.16407, 0.020171, 0.577478) ,
+ rgb (0.171574, 0.019706, 0.580806) ,
+ rgb (0.17895, 0.019252, 0.584054) ,
+ rgb (0.186213, 0.018803, 0.587228) ,
+ rgb (0.193374, 0.018354, 0.59033) ,
+ rgb (0.200445, 0.017902, 0.593364) ,
+ rgb (0.207435, 0.017442, 0.596333) ,
+ rgb (0.21435, 0.016973, 0.599239) ,
+ rgb (0.221197, 0.016497, 0.602083) ,
+ rgb (0.227983, 0.016007, 0.604867) ,
+ rgb (0.234715, 0.015502, 0.607592) ,
+ rgb (0.241396, 0.014979, 0.610259) ,
+ rgb (0.248032, 0.014439, 0.612868) ,
+ rgb (0.254627, 0.013882, 0.615419) ,
+ rgb (0.261183, 0.013308, 0.617911) ,
+ rgb (0.267703, 0.012716, 0.620346) ,
+ rgb (0.274191, 0.012109, 0.622722) ,
+ rgb (0.280648, 0.011488, 0.625038) ,
+ rgb (0.287076, 0.010855, 0.627295) ,
+ rgb (0.293478, 0.010213, 0.62949) ,
+ rgb (0.299855, 0.009561, 0.631624) ,
+ rgb (0.30621, 0.008902, 0.633694) ,
+ rgb (0.312543, 0.008239, 0.6357) ,
+ rgb (0.318856, 0.007576, 0.63764) ,
+ rgb (0.32515, 0.006915, 0.639512) ,
+ rgb (0.331426, 0.006261, 0.641316) ,
+ rgb (0.337683, 0.005618, 0.643049) ,
+ rgb (0.343925, 0.004991, 0.64471) ,
+ rgb (0.35015, 0.004382, 0.646298) ,
+ rgb (0.356359, 0.003798, 0.64781) ,
+ rgb (0.362553, 0.003243, 0.649245) ,
+ rgb (0.368733, 0.002724, 0.650601) ,
+ rgb (0.374897, 0.002245, 0.651876) ,
+ rgb (0.381047, 0.001814, 0.653068) ,
+ rgb (0.387183, 0.001434, 0.654177) ,
+ rgb (0.393304, 0.001114, 0.655199) ,
+ rgb (0.399411, 0.000859, 0.656133) ,
+ rgb (0.405503, 0.000678, 0.656977) ,
+ rgb (0.41158, 0.000577, 0.65773) ,
+ rgb (0.417642, 0.000564, 0.65839) ,
+ rgb (0.423689, 0.000646, 0.658956) ,
+ rgb (0.429719, 0.000831, 0.659425) ,
+ rgb (0.435734, 0.001127, 0.659797) ,
+ rgb (0.441732, 0.00154, 0.660069) ,
+ rgb (0.447714, 0.00208, 0.66024) ,
+ rgb (0.453677, 0.002755, 0.66031) ,
+ rgb (0.459623, 0.003574, 0.660277) ,
+ rgb (0.46555, 0.004545, 0.660139) ,
+ rgb (0.471457, 0.005678, 0.659897) ,
+ rgb (0.477344, 0.00698, 0.659549) ,
+ rgb (0.48321, 0.00846, 0.659095) ,
+ rgb (0.489055, 0.010127, 0.658534) ,
+ rgb (0.494877, 0.01199, 0.657865) ,
+ rgb (0.500678, 0.014055, 0.657088) ,
+ rgb (0.506454, 0.016333, 0.656202) ,
+ rgb (0.512206, 0.018833, 0.655209) ,
+ rgb (0.517933, 0.021563, 0.654109) ,
+ rgb (0.523633, 0.024532, 0.652901) ,
+ rgb (0.529306, 0.027747, 0.651586) ,
+ rgb (0.534952, 0.031217, 0.650165) ,
+ rgb (0.54057, 0.03495, 0.64864) ,
+ rgb (0.546157, 0.038954, 0.64701) ,
+ rgb (0.551715, 0.043136, 0.645277) ,
+ rgb (0.557243, 0.047331, 0.643443) ,
+ rgb (0.562738, 0.051545, 0.641509) ,
+ rgb (0.568201, 0.055778, 0.639477) ,
+ rgb (0.573632, 0.060028, 0.637349) ,
+ rgb (0.579029, 0.064296, 0.635126) ,
+ rgb (0.584391, 0.068579, 0.632812) ,
+ rgb (0.589719, 0.072878, 0.630408) ,
+ rgb (0.595011, 0.07719, 0.627917) ,
+ rgb (0.600266, 0.081516, 0.625342) ,
+ rgb (0.605485, 0.085854, 0.622686) ,
+ rgb (0.610667, 0.090204, 0.619951) ,
+ rgb (0.615812, 0.094564, 0.61714) ,
+ rgb (0.620919, 0.098934, 0.614257) ,
+ rgb (0.625987, 0.103312, 0.611305) ,
+ rgb (0.631017, 0.107699, 0.608287) ,
+ rgb (0.636008, 0.112092, 0.605205) ,
+ rgb (0.640959, 0.116492, 0.602065) ,
+ rgb (0.645872, 0.120898, 0.598867) ,
+ rgb (0.650746, 0.125309, 0.595617) ,
+ rgb (0.65558, 0.129725, 0.592317) ,
+ rgb (0.660374, 0.134144, 0.588971) ,
+ rgb (0.665129, 0.138566, 0.585582) ,
+ rgb (0.669845, 0.142992, 0.582154) ,
+ rgb (0.674522, 0.147419, 0.578688) ,
+ rgb (0.67916, 0.151848, 0.575189) ,
+ rgb (0.683758, 0.156278, 0.57166) ,
+ rgb (0.688318, 0.160709, 0.568103) ,
+ rgb (0.69284, 0.165141, 0.564522) ,
+ rgb (0.697324, 0.169573, 0.560919) ,
+ rgb (0.701769, 0.174005, 0.557296) ,
+ rgb (0.706178, 0.178437, 0.553657) ,
+ rgb (0.710549, 0.182868, 0.550004) ,
+ rgb (0.714883, 0.187299, 0.546338) ,
+ rgb (0.719181, 0.191729, 0.542663) ,
+ rgb (0.723444, 0.196158, 0.538981) ,
+ rgb (0.72767, 0.200586, 0.535293) ,
+ rgb (0.731862, 0.205013, 0.531601) ,
+ rgb (0.736019, 0.209439, 0.527908) ,
+ rgb (0.740143, 0.213864, 0.524216) ,
+ rgb (0.744232, 0.218288, 0.520524) ,
+ rgb (0.748289, 0.222711, 0.516834) ,
+ rgb (0.752312, 0.227133, 0.513149) ,
+ rgb (0.756304, 0.231555, 0.509468) ,
+ rgb (0.760264, 0.235976, 0.505794) ,
+ rgb (0.764193, 0.240396, 0.502126) ,
+ rgb (0.76809, 0.244817, 0.498465) ,
+ rgb (0.771958, 0.249237, 0.494813) ,
+ rgb (0.775796, 0.253658, 0.491171) ,
+ rgb (0.779604, 0.258078, 0.487539) ,
+ rgb (0.783383, 0.2625, 0.483918) ,
+ rgb (0.787133, 0.266922, 0.480307) ,
+ rgb (0.790855, 0.271345, 0.476706) ,
+ rgb (0.794549, 0.27577, 0.473117) ,
+ rgb (0.798216, 0.280197, 0.469538) ,
+ rgb (0.801855, 0.284626, 0.465971) ,
+ rgb (0.805467, 0.289057, 0.462415) ,
+ rgb (0.809052, 0.293491, 0.45887) ,
+ rgb (0.812612, 0.297928, 0.455338) ,
+ rgb (0.816144, 0.302368, 0.451816) ,
+ rgb (0.819651, 0.306812, 0.448306) ,
+ rgb (0.823132, 0.311261, 0.444806) ,
+ rgb (0.826588, 0.315714, 0.441316) ,
+ rgb (0.830018, 0.320172, 0.437836) ,
+ rgb (0.833422, 0.324635, 0.434366) ,
+ rgb (0.836801, 0.329105, 0.430905) ,
+ rgb (0.840155, 0.33358, 0.427455) ,
+ rgb (0.843484, 0.338062, 0.424013) ,
+ rgb (0.846788, 0.342551, 0.420579) ,
+ rgb (0.850066, 0.347048, 0.417153) ,
+ rgb (0.853319, 0.351553, 0.413734) ,
+ rgb (0.856547, 0.356066, 0.410322) ,
+ rgb (0.85975, 0.360588, 0.406917) ,
+ rgb (0.862927, 0.365119, 0.403519) ,
+ rgb (0.866078, 0.36966, 0.400126) ,
+ rgb (0.869203, 0.374212, 0.396738) ,
+ rgb (0.872303, 0.378774, 0.393355) ,
+ rgb (0.875376, 0.383347, 0.389976) ,
+ rgb (0.878423, 0.387932, 0.3866) ,
+ rgb (0.881443, 0.392529, 0.383229) ,
+ rgb (0.884436, 0.397139, 0.37986) ,
+ rgb (0.887402, 0.401762, 0.376494) ,
+ rgb (0.89034, 0.406398, 0.37313) ,
+ rgb (0.89325, 0.411048, 0.369768) ,
+ rgb (0.896131, 0.415712, 0.366407) ,
+ rgb (0.898984, 0.420392, 0.363047) ,
+ rgb (0.901807, 0.425087, 0.359688) ,
+ rgb (0.904601, 0.429797, 0.356329) ,
+ rgb (0.907365, 0.434524, 0.35297) ,
+ rgb (0.910098, 0.439268, 0.34961) ,
+ rgb (0.9128, 0.444029, 0.346251) ,
+ rgb (0.915471, 0.448807, 0.34289) ,
+ rgb (0.918109, 0.453603, 0.339529) ,
+ rgb (0.920714, 0.458417, 0.336166) ,
+ rgb (0.923287, 0.463251, 0.332801) ,
+ rgb (0.925825, 0.468103, 0.329435) ,
+ rgb (0.928329, 0.472975, 0.326067) ,
+ rgb (0.930798, 0.477867, 0.322697) ,
+ rgb (0.933232, 0.48278, 0.319325) ,
+ rgb (0.93563, 0.487712, 0.315952) ,
+ rgb (0.93799, 0.492667, 0.312575) ,
+ rgb (0.940313, 0.497642, 0.309197) ,
+ rgb (0.942598, 0.502639, 0.305816) ,
+ rgb (0.944844, 0.507658, 0.302433) ,
+ rgb (0.947051, 0.512699, 0.299049) ,
+ rgb (0.949217, 0.517763, 0.295662) ,
+ rgb (0.951344, 0.52285, 0.292275) ,
+ rgb (0.953428, 0.52796, 0.288883) ,
+ rgb (0.95547, 0.533093, 0.28549) ,
+ rgb (0.957469, 0.53825, 0.282096) ,
+ rgb (0.959424, 0.543431, 0.278701) ,
+ rgb (0.961336, 0.548636, 0.275305) ,
+ rgb (0.963203, 0.553865, 0.271909) ,
+ rgb (0.965024, 0.559118, 0.268513) ,
+ rgb (0.966798, 0.564396, 0.265118) ,
+ rgb (0.968526, 0.5697, 0.261721) ,
+ rgb (0.970205, 0.575028, 0.258325) ,
+ rgb (0.971835, 0.580382, 0.254931) ,
+ rgb (0.973416, 0.585761, 0.25154) ,
+ rgb (0.974947, 0.591165, 0.248151) ,
+ rgb (0.976428, 0.596595, 0.244767) ,
+ rgb (0.977856, 0.602051, 0.241387) ,
+ rgb (0.979233, 0.607532, 0.238013) ,
+ rgb (0.980556, 0.613039, 0.234646) ,
+ rgb (0.981826, 0.618572, 0.231287) ,
+ rgb (0.983041, 0.624131, 0.227937) ,
+ rgb (0.984199, 0.629718, 0.224595) ,
+ rgb (0.985301, 0.63533, 0.221265) ,
+ rgb (0.986345, 0.640969, 0.217948) ,
+ rgb (0.987332, 0.646633, 0.214648) ,
+ rgb (0.98826, 0.652325, 0.211364) ,
+ rgb (0.989128, 0.658043, 0.2081) ,
+ rgb (0.989935, 0.663787, 0.204859) ,
+ rgb (0.990681, 0.669558, 0.201642) ,
+ rgb (0.991365, 0.675355, 0.198453) ,
+ rgb (0.991985, 0.681179, 0.195295) ,
+ rgb (0.992541, 0.68703, 0.19217) ,
+ rgb (0.993032, 0.692907, 0.189084) ,
+ rgb (0.993456, 0.69881, 0.186041) ,
+ rgb (0.993814, 0.704741, 0.183043) ,
+ rgb (0.994103, 0.710698, 0.180097) ,
+ rgb (0.994324, 0.716681, 0.177208) ,
+ rgb (0.994474, 0.722691, 0.174381) ,
+ rgb (0.994553, 0.728728, 0.171622) ,
+ rgb (0.994561, 0.734791, 0.168938) ,
+ rgb (0.994495, 0.74088, 0.166335) ,
+ rgb (0.994355, 0.746995, 0.163821) ,
+ rgb (0.994141, 0.753137, 0.161404) ,
+ rgb (0.993851, 0.759304, 0.159092) ,
+ rgb (0.993482, 0.765499, 0.156891) ,
+ rgb (0.993033, 0.77172, 0.154808) ,
+ rgb (0.992505, 0.777967, 0.152855) ,
+ rgb (0.991897, 0.784239, 0.151042) ,
+ rgb (0.991209, 0.790537, 0.149377) ,
+ rgb (0.990439, 0.796859, 0.14787) ,
+ rgb (0.989587, 0.803205, 0.146529) ,
+ rgb (0.988648, 0.809579, 0.145357) ,
+ rgb (0.987621, 0.815978, 0.144363) ,
+ rgb (0.986509, 0.822401, 0.143557) ,
+ rgb (0.985314, 0.828846, 0.142945) ,
+ rgb (0.984031, 0.835315, 0.142528) ,
+ rgb (0.982653, 0.841812, 0.142303) ,
+ rgb (0.98119, 0.848329, 0.142279) ,
+ rgb (0.979644, 0.854866, 0.142453) ,
+ rgb (0.977995, 0.861432, 0.142808) ,
+ rgb (0.976265, 0.868016, 0.143351) ,
+ rgb (0.974443, 0.874622, 0.144061) ,
+ rgb (0.97253, 0.88125, 0.144923) ,
+ rgb (0.970533, 0.887896, 0.145919) ,
+ rgb (0.968443, 0.894564, 0.147014) ,
+ rgb (0.966271, 0.901249, 0.14818) ,
+ rgb (0.964021, 0.90795, 0.14937) ,
+ rgb (0.961681, 0.914672, 0.15052) ,
+ rgb (0.959276, 0.921407, 0.151566) ,
+ rgb (0.956808, 0.928152, 0.152409) ,
+ rgb (0.954287, 0.934908, 0.152921) ,
+ rgb (0.951726, 0.941671, 0.152925) ,
+ rgb (0.949151, 0.948435, 0.152178) ,
+ rgb (0.946602, 0.95519, 0.150328) ,
+ rgb (0.944152, 0.961916, 0.146861) ,
+ rgb (0.941896, 0.96859, 0.140956) ,
+ rgb (0.940015, 0.975158, 0.131326)
+ });
list_data twilight = list_data(new pen[] {
- rgb (0.8857501584075443, 0.8500092494306783, 0.8879736506427196) ,
- rgb (0.8837852019553906, 0.8507294054031063, 0.8872322209694989) ,
- rgb (0.8817223105928579, 0.8512759407765347, 0.8863805692551482) ,
- rgb (0.8795410528270573, 0.8516567540749572, 0.8854143767924102) ,
- rgb (0.8772488085896548, 0.8518702833887027, 0.8843412038131143) ,
- rgb (0.8748534750857597, 0.8519152612302319, 0.8831692696761383) ,
- rgb (0.8723313408512408, 0.8518016547808089, 0.8818970435500162) ,
- rgb (0.8697047485350982, 0.8515240300479789, 0.8805388339000336) ,
- rgb (0.8669601550533358, 0.8510896085314068, 0.8790976697717334) ,
- rgb (0.86408985081464, 0.8505039116750779, 0.8775792578489263) ,
- rgb (0.8611024543689985, 0.8497675485700126, 0.8759924292343957) ,
- rgb (0.8579825924567037, 0.8488893481028184, 0.8743403855344628) ,
- rgb (0.8547259318925698, 0.8478748812467282, 0.8726282980930582) ,
- rgb (0.8513371457085719, 0.8467273579611647, 0.8708608165735044) ,
- rgb (0.8478071070257792, 0.8454546229209523, 0.8690403678369444) ,
- rgb (0.8441261828674842, 0.8440648271103739, 0.8671697332269007) ,
- rgb (0.8403042080595778, 0.8425605950855084, 0.865250882410458) ,
- rgb (0.8363403180919118, 0.8409479651895194, 0.8632852800107016) ,
- rgb (0.8322270571293441, 0.8392349062775448, 0.8612756350042788) ,
- rgb (0.8279689431601354, 0.837426007513952, 0.8592239945130679) ,
- rgb (0.8235742968025285, 0.8355248776479544, 0.8571319132851495) ,
- rgb (0.8190465467793753, 0.8335364929949034, 0.855002062870101) ,
- rgb (0.8143898212114309, 0.8314655869419785, 0.8528375906214702) ,
- rgb (0.8095999819094809, 0.8293189667350546, 0.8506444160105037) ,
- rgb (0.8046916442981458, 0.8270983878056066, 0.8484244929697402) ,
- rgb (0.79967075421268, 0.8248078181208093, 0.8461821002957853) ,
- rgb (0.7945430508923111, 0.8224511622630462, 0.8439218478682798) ,
- rgb (0.7893144556460892, 0.8200321318870201, 0.8416486380471222) ,
- rgb (0.7839910104276492, 0.8175542640053343, 0.8393674746403673) ,
- rgb (0.7785789200822759, 0.8150208937874255, 0.8370834463093898) ,
- rgb (0.7730841659017094, 0.8124352473546601, 0.8348017295057968) ,
- rgb (0.7675110850441786, 0.8098007598713145, 0.8325281663805967) ,
- rgb (0.7618690793798029, 0.8071194938764749, 0.830266486168872) ,
- rgb (0.7561644358438198, 0.8043940873347794, 0.8280213899472) ,
- rgb (0.750403467654067, 0.8016269900896532, 0.8257973785108242) ,
- rgb (0.7445924777189017, 0.7988204771958325, 0.8235986758615652) ,
- rgb (0.7387377170049494, 0.7959766573503101, 0.8214292278043301) ,
- rgb (0.7328454364552346, 0.7930974646884407, 0.8192926338423038) ,
- rgb (0.726921775128297, 0.7901846863592763, 0.8171921746672638) ,
- rgb (0.7209728066553678, 0.7872399592345264, 0.8151307392087926) ,
- rgb (0.7150040307625213, 0.7842648709158119, 0.8131111655994991) ,
- rgb (0.709020781345393, 0.7812608871607091, 0.8111359185511793) ,
- rgb (0.7030297722540817, 0.7782290497335813, 0.8092061884805697) ,
- rgb (0.6970365443886174, 0.7751705000806606, 0.8073233538006345) ,
- rgb (0.691046410093091, 0.7720862946067809, 0.8054884169067907) ,
- rgb (0.6850644615439593, 0.7689774029354699, 0.8037020626717691) ,
- rgb (0.6790955449988215, 0.765844721313959, 0.8019646617300199) ,
- rgb (0.6731442255942621, 0.7626890873389048, 0.8002762854580953) ,
- rgb (0.6672147980375281, 0.7595112803730375, 0.7986367465453776) ,
- rgb (0.6613112930078745, 0.7563120270871903, 0.7970456043491897) ,
- rgb (0.6554369232645472, 0.7530920875676843, 0.7955027112903105) ,
- rgb (0.6495957300425348, 0.7498520122194177, 0.7940067402149911) ,
- rgb (0.6437910831099849, 0.7465923800833657, 0.7925565320130605) ,
- rgb (0.6380258682854598, 0.7433137671403319, 0.7911510045957317) ,
- rgb (0.6323027138710603, 0.740016721601314, 0.7897889276264043) ,
- rgb (0.6266240202260459, 0.7367017540369944, 0.7884690131633456) ,
- rgb (0.6209919306481755, 0.733369347989232, 0.7871899462469658) ,
- rgb (0.6154084641177048, 0.7300199523273969, 0.7859502270675048) ,
- rgb (0.6098754317609306, 0.7266539875975829, 0.7847483573269471) ,
- rgb (0.6043943420027486, 0.7232718614323369, 0.7835829559353559) ,
- rgb (0.5989665814482068, 0.7198739489224673, 0.7824525989934664) ,
- rgb (0.5935933569683722, 0.7164606049658685, 0.781355882376401) ,
- rgb (0.588275797805555, 0.7130321464645814, 0.7802914140563652) ,
- rgb (0.5830148703693241, 0.7095888767699747, 0.7792578182047659) ,
- rgb (0.5778116438998202, 0.7061310615715398, 0.7782534512102552) ,
- rgb (0.5726668948158774, 0.7026589535425779, 0.7772770268091199) ,
- rgb (0.5675811785386197, 0.6991727930264627, 0.776327485342753) ,
- rgb (0.5625551535721934, 0.6956727838162965, 0.7754035914230984) ,
- rgb (0.5575894041960517, 0.6921591145825405, 0.7745041337932782) ,
- rgb (0.5526845058934713, 0.6886319451516638, 0.7736279426902245) ,
- rgb (0.5478409815301863, 0.6850914221850988, 0.7727738647344087) ,
- rgb (0.5430593242401823, 0.6815376725306588, 0.7719407969783508) ,
- rgb (0.5383401557517628, 0.677970811290954, 0.7711273443905772) ,
- rgb (0.533683891477284, 0.6743909370521273, 0.7703325054879735) ,
- rgb (0.529090861832473, 0.6707981230280622, 0.7695555229231313) ,
- rgb (0.5245615147059358, 0.6671924299614223, 0.7687954171423095) ,
- rgb (0.5200962739223556, 0.6635739143403039, 0.768051194033441) ,
- rgb (0.5156955988596057, 0.65994260812898, 0.7673219148959617) ,
- rgb (0.5113599254160193, 0.6562985398183186, 0.7666066378064533) ,
- rgb (0.5070896957645166, 0.6526417240314645, 0.7659044566083585) ,
- rgb (0.5028853540415561, 0.6489721673409526, 0.7652144671817491) ,
- rgb (0.4987473366135607, 0.6452898684900934, 0.7645357873418008) ,
- rgb (0.4946761847863938, 0.6415948411950443, 0.7638671900213091) ,
- rgb (0.4906722493856122, 0.6378870485884708, 0.7632081276316384) ,
- rgb (0.4867359599430568, 0.6341664625110051, 0.7625578008592404) ,
- rgb (0.4828677867260272, 0.6304330455306234, 0.761915371498953) ,
- rgb (0.47906816236197386, 0.6266867625186013, 0.7612800037566242) ,
- rgb (0.47533752394906287, 0.6229275728383581, 0.7606508557181775) ,
- rgb (0.4716762951887709, 0.6191554324288464, 0.7600270922788305) ,
- rgb (0.46808490970531597, 0.6153702869579029, 0.7594078989109274) ,
- rgb (0.4645637671630393, 0.6115720882286415, 0.7587924262302581) ,
- rgb (0.4611132664702388, 0.607760777169989, 0.7581798643680714) ,
- rgb (0.45773377230160567, 0.6039363004658646, 0.7575693690185916) ,
- rgb (0.45442563977552913, 0.6000985950385866, 0.7569601366060649) ,
- rgb (0.45118918687617743, 0.5962476205135354, 0.7563512064324664) ,
- rgb (0.4480247093358917, 0.5923833145214658, 0.7557417647410792) ,
- rgb (0.4449324685421538, 0.5885055998308617, 0.7551311041857901) ,
- rgb (0.441912717666964, 0.5846144110017557, 0.7545183888441067) ,
- rgb (0.43896563958048396, 0.5807096924109849, 0.7539027620828594) ,
- rgb (0.4360913895835637, 0.5767913799818608, 0.7532834105961016) ,
- rgb (0.43329008867358393, 0.5728594162560667, 0.7526594653256667) ,
- rgb (0.4305617907305757, 0.5689137457245718, 0.752030080993127) ,
- rgb (0.42790652284925834, 0.5649543060909209, 0.7513944352191484) ,
- rgb (0.42532423665011354, 0.560981049599503, 0.7507516498900512) ,
- rgb (0.4228148567577266, 0.5569939212699658, 0.7501008698822764) ,
- rgb (0.42037822361396326, 0.5529928715810817, 0.7494412559451894) ,
- rgb (0.4180141407923363, 0.5489778542188889, 0.7487719316700112) ,
- rgb (0.4157223260454232, 0.544948827153504, 0.7480920445900052) ,
- rgb (0.4135024574331473, 0.5409057477109848, 0.7474007329754309) ,
- rgb (0.4113541469730457, 0.5368485776500593, 0.7466971285506578) ,
- rgb (0.4092768899914751, 0.5327773017713032, 0.7459803063570782) ,
- rgb (0.4072701869421907, 0.5286918801105741, 0.7452494263758127) ,
- rgb (0.4053334378930318, 0.5245922817498312, 0.7445036583670813) ,
- rgb (0.40346600333905397, 0.5204784765384003, 0.7437421522356709) ,
- rgb (0.40166714010896104, 0.5163504496968876, 0.7429640345324835) ,
- rgb (0.39993606933454834, 0.5122081814321852, 0.7421684457131799) ,
- rgb (0.3982719152586337, 0.5080516653927614, 0.7413545091809972) ,
- rgb (0.3966737490566561, 0.5038808905384797, 0.7405213858051674) ,
- rgb (0.3951405880820763, 0.4996958532637776, 0.7396682021171571) ,
- rgb (0.39367135736822567, 0.4954965577745118, 0.738794102296364) ,
- rgb (0.39226494876209317, 0.4912830033289926, 0.7378982478447508) ,
- rgb (0.390920175719949, 0.4870552025122304, 0.7369797713388125) ,
- rgb (0.38963580160340855, 0.48281316715123496, 0.7360378254693274) ,
- rgb (0.3884105330084243, 0.47855691131792805, 0.7350715764115726) ,
- rgb (0.3872430145933025, 0.4742864593363539, 0.7340801678785439) ,
- rgb (0.386131841788921, 0.4700018340988123, 0.7330627749243106) ,
- rgb (0.3850755679365139, 0.46570306719930193, 0.732018540336905) ,
- rgb (0.38407269378943537, 0.46139018782416635, 0.7309466543290268) ,
- rgb (0.3831216808440275, 0.457063235814072, 0.7298462679135326) ,
- rgb (0.38222094988570376, 0.45272225034283325, 0.7287165614400378) ,
- rgb (0.3813688793045416, 0.4483672766927786, 0.7275567131714135) ,
- rgb (0.3805638069656562, 0.4439983720863372, 0.7263658704513531) ,
- rgb (0.3798040374484875, 0.4396155882122263, 0.7251432377876109) ,
- rgb (0.3790878928311076, 0.43521897612544935, 0.7238879869132313) ,
- rgb (0.378413635091359, 0.43080859411413064, 0.7225993199306104) ,
- rgb (0.3777794975351373, 0.4263845142616835, 0.7212763999353023) ,
- rgb (0.3771837184425123, 0.4219468022345483, 0.7199184152447577) ,
- rgb (0.37662448930806297, 0.41749553747893614, 0.7185245473617611) ,
- rgb (0.37610001286385814, 0.4130307995247706, 0.7170939691992023) ,
- rgb (0.375608469194424, 0.40855267638072096, 0.7156258509158755) ,
- rgb (0.37514802505380473, 0.4040612609993941, 0.7141193695725726) ,
- rgb (0.3747168601930223, 0.3995566498711684, 0.7125736851650046) ,
- rgb (0.3743131319931234, 0.3950389482828331, 0.7109879652237746) ,
- rgb (0.3739349933047578, 0.3905082752937583, 0.7093613429347845) ,
- rgb (0.3735806215098284, 0.3859647438605754, 0.7076929760731058) ,
- rgb (0.37324816143326384, 0.38140848555753937, 0.7059820097480604) ,
- rgb (0.3729357864666503, 0.3768396383521984, 0.7042275578058994) ,
- rgb (0.37264166757849604, 0.3722583500483685, 0.7024287314570723) ,
- rgb (0.37236397858465387, 0.36766477862108266, 0.7005846349652077) ,
- rgb (0.3721008970244382, 0.3630590973698238, 0.6986943461507372) ,
- rgb (0.3718506155898596, 0.3584414828587522, 0.6967569581025654) ,
- rgb (0.3716113323440048, 0.3538121372967869, 0.6947714991938089) ,
- rgb (0.37138124223736607, 0.34917126878479027, 0.6927370347192883) ,
- rgb (0.37115856636209105, 0.3445191141023017, 0.6906525358646499) ,
- rgb (0.3709415155133733, 0.33985591488818123, 0.6885170337950512) ,
- rgb (0.3707283327942267, 0.33518193808489577, 0.6863294816960677) ,
- rgb (0.37051738634484427, 0.3304974124430785, 0.6840888878885721) ,
- rgb (0.37030682071842685, 0.32580269697872455, 0.6817941168448668) ,
- rgb (0.37009487130772695, 0.3210981375964933, 0.6794440539905685) ,
- rgb (0.3698798032902536, 0.31638410101153364, 0.6770375543809057) ,
- rgb (0.36965987626565955, 0.3116609876295197, 0.6745734474341955) ,
- rgb (0.3694333459127623, 0.3069292355186234, 0.6720505284912062) ,
- rgb (0.36919847837592484, 0.3021893217650707, 0.6694675433161452) ,
- rgb (0.3689535530659678, 0.29744175492366276, 0.6668232208982426) ,
- rgb (0.3686968223189527, 0.292687098561501, 0.6641162529823691) ,
- rgb (0.36842655638020444, 0.2879259643777846, 0.661345269109446) ,
- rgb (0.3681410147989972, 0.2831590122118299, 0.6585088880697231) ,
- rgb (0.3678384369653108, 0.2783869718129776, 0.655605668384537) ,
- rgb (0.36751707094367697, 0.2736106331709098, 0.6526341171161864) ,
- rgb (0.36717513650699446, 0.26883085667326956, 0.6495927229789225) ,
- rgb (0.3668108554010799, 0.26404857724525643, 0.6464799165290824) ,
- rgb (0.3664224325155063, 0.25926481158628106, 0.6432940914076554) ,
- rgb (0.36600853966739794, 0.25448043878086224, 0.6400336180336859) ,
- rgb (0.3655669837353898, 0.24969683475296395, 0.6366967518748858) ,
- rgb (0.3650957984588681, 0.24491536803550484, 0.6332817352005559) ,
- rgb (0.3645930889012501, 0.24013747024823828, 0.629786801550261) ,
- rgb (0.3640569302208851, 0.23536470386204195, 0.6262101345195302) ,
- rgb (0.36348537610385145, 0.2305987621839642, 0.6225498862239288) ,
- rgb (0.3628764356004103, 0.2258414929328703, 0.6188041741082302) ,
- rgb (0.36222809558295926, 0.22109488427338303, 0.6149711234609613) ,
- rgb (0.36153829010998356, 0.21636111429594002, 0.6110488067964093) ,
- rgb (0.36080493826624654, 0.21164251793458128, 0.6070353217206471) ,
- rgb (0.36002681809096376, 0.20694122817889948, 0.6029284543191687) ,
- rgb (0.35920088560930186, 0.20226037920758122, 0.5987265295935138) ,
- rgb (0.3583248996661781, 0.197602942459778, 0.5944276851750107) ,
- rgb (0.35739663292915563, 0.1929720819784246, 0.5900301125106313) ,
- rgb (0.35641381143126327, 0.18837119869242164, 0.5855320765920552) ,
- rgb (0.3553741530690672, 0.18380392577704466, 0.580931914318328) ,
- rgb (0.3542753496066376, 0.17927413271618647, 0.5762280966066872) ,
- rgb (0.35311574421123737, 0.17478570377561287, 0.5714187152355529) ,
- rgb (0.3518924860887379, 0.17034320478524959, 0.5665028491121665) ,
- rgb (0.3506030444193101, 0.1659512998472086, 0.5614796470399323) ,
- rgb (0.34924513554955644, 0.16161477763045118, 0.5563483747416378) ,
- rgb (0.3478165323877778, 0.1573386351115298, 0.5511085345270326) ,
- rgb (0.3463150717579309, 0.15312802296627787, 0.5457599924248665) ,
- rgb (0.34473901574536375, 0.1489882058982641, 0.5403024592040654) ,
- rgb (0.34308600291572294, 0.14492465359918028, 0.534737042820671) ,
- rgb (0.34135411074506483, 0.1409427920655632, 0.5290650094033675) ,
- rgb (0.33954168752669694, 0.1370480189671817, 0.5232879753508524) ,
- rgb (0.3376473209067111, 0.13324562282438077, 0.5174080757397947) ,
- rgb (0.33566978565015315, 0.12954074251271822, 0.5114280721516895) ,
- rgb (0.33360804901486, 0.1259381830100592, 0.505351647966549) ,
- rgb (0.33146154891145124, 0.12244245263391232, 0.4991827458843107) ,
- rgb (0.3292300520323141, 0.11905764321981127, 0.49292595612342666) ,
- rgb (0.3269137124539796, 0.1157873496841953, 0.4865864649569746) ,
- rgb (0.32451307931207785, 0.11263459791730848, 0.48017007211645196) ,
- rgb (0.3220288227606932, 0.10960114111258401, 0.4736849472572688) ,
- rgb (0.31946262395497965, 0.1066887988239266, 0.46713728801395243) ,
- rgb (0.316816480890235, 0.10389861387653518, 0.46053414662739794) ,
- rgb (0.3140927841475553, 0.10123077676403242, 0.45388335612058467) ,
- rgb (0.31129434479712365, 0.0986847719340522, 0.4471931371516162) ,
- rgb (0.30842444457210105, 0.09625938534057774, 0.44047194882050544) ,
- rgb (0.30548675819945936, 0.09395276484082374, 0.4337284999936111) ,
- rgb (0.3024853636457425, 0.0917611873973036, 0.42697404043749887) ,
- rgb (0.2994248396021477, 0.08968225371675004, 0.42021619665853854) ,
- rgb (0.2963100038890529, 0.08771325096046395, 0.41346259134143476) ,
- rgb (0.2931459309698525, 0.08585065688962071, 0.40672178082365834) ,
- rgb (0.2899379244517661, 0.08409078829085731, 0.40000214725256295) ,
- rgb (0.28669151388283165, 0.08242987384848069, 0.39331182532243375) ,
- rgb (0.28341239797185225, 0.08086415336549937, 0.38665868550105914) ,
- rgb (0.2801063857697547, 0.07938999480226153, 0.38005028528138707) ,
- rgb (0.2767793961581559, 0.07800394103378822, 0.37349382846504675) ,
- rgb (0.2734373934245081, 0.07670280023749607, 0.36699616136347685) ,
- rgb (0.2700863774911405, 0.07548367558427554, 0.36056376228111864) ,
- rgb (0.26673233211995284, 0.0743440180285462, 0.3542027606624096) ,
- rgb (0.26338121807151404, 0.07328165793989708, 0.34791888996380105) ,
- rgb (0.26003895187439957, 0.0722947810433622, 0.3417175669546984) ,
- rgb (0.256711916510839, 0.07138010624208224, 0.3356064898460009) ,
- rgb (0.25340685873736807, 0.07053358292685183, 0.3295945757321303) ,
- rgb (0.2501284530619938, 0.06975820642910699, 0.32368100685760637) ,
- rgb (0.24688226237959, 0.06905363944920445, 0.31786993834254956) ,
- rgb (0.24367372557466271, 0.06841985515092269, 0.3121652405088837) ,
- rgb (0.2405081333229594, 0.0678571038148556, 0.3065705449367832) ,
- rgb (0.23739062429054825, 0.06736588805055552, 0.3010892218406587) ,
- rgb (0.23433055727563878, 0.0669355996616394, 0.295740099298676) ,
- rgb (0.23132955273021344, 0.06657618693909059, 0.29051361067988485) ,
- rgb (0.2283917709422868, 0.06628997924139618, 0.28541074411068496) ,
- rgb (0.22552164337737857, 0.0660781731193956, 0.28043398847505197) ,
- rgb (0.22272706739121817, 0.06593379067565194, 0.275597146520537) ,
- rgb (0.22001251100779617, 0.0658579189189076, 0.2709027999432586) ,
- rgb (0.21737845072382705, 0.06585966123356204, 0.2663420934966951) ,
- rgb (0.21482843531473683, 0.06594038561377849, 0.26191675992376573) ,
- rgb (0.21237411048541005, 0.06608502466175845, 0.2576516509356954) ,
- rgb (0.21001214221188125, 0.06630857391894718, 0.2535289048041211) ,
- rgb (0.2077442377448806, 0.06661453200418091, 0.24954644291943817) ,
- rgb (0.20558051999470117, 0.06699046239786874, 0.24572497420147632) ,
- rgb (0.20352007949514977, 0.06744417961242422, 0.24205576625191821) ,
- rgb (0.2015613376412984, 0.06798327102620025, 0.23852974228695395) ,
- rgb (0.19971571438603364, 0.06859271055370472, 0.23517094067076993) ,
- rgb (0.19794834061899208, 0.06931406607166066, 0.23194647381302336) ,
- rgb (0.1960826032659409, 0.07032122724242362, 0.22874673279569585) ,
- rgb (0.19410351363791453, 0.07160830485689157, 0.22558727307410353) ,
- rgb (0.19199449184606268, 0.0731828306492733, 0.22243385243433622) ,
- rgb (0.18975853639094634, 0.07501986186214377, 0.2193005075652994) ,
- rgb (0.18739228342697645, 0.07710209689958833, 0.21618875376309582) ,
- rgb (0.18488035509396164, 0.07942573027972388, 0.21307651648984993) ,
- rgb (0.18774482037046955, 0.07725158846803931, 0.21387448578597812) ,
- rgb (0.19049578401722037, 0.07531127841678764, 0.2146562337112265) ,
- rgb (0.1931548636579131, 0.07360681904011795, 0.21542362939081539) ,
- rgb (0.19571853588267552, 0.07215778103960274, 0.21617499187076789) ,
- rgb (0.19819343656336558, 0.07097462525273879, 0.21690975060032436) ,
- rgb (0.20058760685133747, 0.07006457614998421, 0.21762721310371608) ,
- rgb (0.20290365333558247, 0.06943524858045896, 0.21833167885096033) ,
- rgb (0.20531725273301316, 0.06891959226639757, 0.21911516689288835) ,
- rgb (0.20785704662965598, 0.06848439879702528, 0.22000133917653536) ,
- rgb (0.21052882914958676, 0.06812195249816172, 0.22098759107715404) ,
- rgb (0.2133313859647627, 0.06783014842602667, 0.2220704321302429) ,
- rgb (0.21625279838647882, 0.06761633027051639, 0.22324568672294431) ,
- rgb (0.21930503925136402, 0.06746578636294004, 0.22451023616807558) ,
- rgb (0.22247308588973624, 0.06738821405309284, 0.22585960379408354) ,
- rgb (0.2257539681670791, 0.06738213230014747, 0.22728984778098055) ,
- rgb (0.2291562027859284, 0.06743473087115257, 0.22879681433956656) ,
- rgb (0.23266299920501882, 0.06755710438847978, 0.23037617493752832) ,
- rgb (0.23627495835774248, 0.06774359820987802, 0.23202360805926608) ,
- rgb (0.23999586188690308, 0.06798502996477995, 0.23373434258507808) ,
- rgb (0.2438114972024792, 0.06828985152901187, 0.23550427698321885) ,
- rgb (0.247720929905011, 0.06865333790948652, 0.2373288009471749) ,
- rgb (0.25172899728289466, 0.0690646308260355, 0.23920260612763083) ,
- rgb (0.2558213554748177, 0.06953231029187984, 0.24112190491594204) ,
- rgb (0.25999463887892144, 0.07005385560386188, 0.24308218808684579) ,
- rgb (0.2642551220706094, 0.07061659562299544, 0.24507758869355967) ,
- rgb (0.2685909594817286, 0.07122671627792246, 0.24710443563450618) ,
- rgb (0.272997015188973, 0.07188355544616351, 0.2491584709323293) ,
- rgb (0.277471508091428, 0.07258296989925478, 0.2512349399594277) ,
- rgb (0.2820174629736694, 0.07331569321404097, 0.25332800295084507) ,
- rgb (0.28662309235899847, 0.07408846082680887, 0.2554347867371703) ,
- rgb (0.29128515387578635, 0.0748990498474667, 0.25755101595750435) ,
- rgb (0.2960004726065818, 0.07574533600095842, 0.25967245030364566) ,
- rgb (0.3007727681291869, 0.07661782433616476, 0.2617929409781967) ,
- rgb (0.30559226007249934, 0.07752196310753731, 0.2639100669211966) ,
- rgb (0.31045520848595526, 0.07845687167618218, 0.2660200572779356) ,
- rgb (0.3153587000920581, 0.07942099731524319, 0.2681190407694196) ,
- rgb (0.3202998655799406, 0.08041299473755484, 0.2702032289303951) ,
- rgb (0.3252788886040126, 0.08142839007654609, 0.27226772884656186) ,
- rgb (0.3302917447118144, 0.08246763389003825, 0.27430929404579435) ,
- rgb (0.3353335322445545, 0.08353243411900396, 0.2763253435679004) ,
- rgb (0.34040164359597463, 0.08462223619170267, 0.27831254595259397) ,
- rgb (0.345493557138718, 0.08573665496512634, 0.28026769921081435) ,
- rgb (0.3506067824603248, 0.08687555176033529, 0.28218770540182386) ,
- rgb (0.35573889947341125, 0.08803897435024335, 0.2840695897279818) ,
- rgb (0.36088752387578377, 0.0892271943627452, 0.28591050458531014) ,
- rgb (0.36605031412464006, 0.0904406854276979, 0.2877077458811747) ,
- rgb (0.3712250843130934, 0.09167999748026273, 0.2894586539763317) ,
- rgb (0.3764103053221462, 0.09294519809377791, 0.2911602415731392) ,
- rgb (0.38160247377467543, 0.09423873126371218, 0.2928110750626949) ,
- rgb (0.3867993907954417, 0.09556181960083443, 0.29440901248173756) ,
- rgb (0.39199887556812907, 0.09691583650296684, 0.2959521200550908) ,
- rgb (0.39719876876325577, 0.09830232096827862, 0.2974385647628578) ,
- rgb (0.40239692379737496, 0.09972293031495055, 0.2988667436973397) ,
- rgb (0.4075912039268871, 0.10117945586419633, 0.300235195077286) ,
- rgb (0.41277985630360303, 0.1026734006932461, 0.3015422643746897) ,
- rgb (0.41796105205173684, 0.10420644885760968, 0.3027865203963184) ,
- rgb (0.42313214269556043, 0.10578120994917611, 0.3039675809469457) ,
- rgb (0.4282910131578975, 0.1073997763055258, 0.30508479060294547) ,
- rgb (0.4334355841041439, 0.1090642347484701, 0.3061376792828915) ,
- rgb (0.4385637818793154, 0.11077667828375456, 0.30712600062348083) ,
- rgb (0.44367358645071275, 0.11253912421257944, 0.3080497309546545) ,
- rgb (0.4487629917317482, 0.1143535557462255, 0.30890905921943196) ,
- rgb (0.4538300508699989, 0.11622183788331528, 0.3097044124984492) ,
- rgb (0.45887288947308297, 0.11814571137706886, 0.3104363697903881) ,
- rgb (0.46389102840284874, 0.12012561256850712, 0.31110343446582983) ,
- rgb (0.46888111384598413, 0.12216445576414045, 0.31170911458932665) ,
- rgb (0.473841437035254, 0.12426354237989065, 0.31225470169927194) ,
- rgb (0.47877034239726296, 0.12642401401409453, 0.3127417273582196) ,
- rgb (0.48366628618847957, 0.1286467902201389, 0.31317188565991266) ,
- rgb (0.48852847371852987, 0.13093210934893723, 0.31354553695453014) ,
- rgb (0.49335504375145617, 0.13328091630401023, 0.31386561956734976) ,
- rgb (0.4981443546207415, 0.13569380302451714, 0.314135190862664) ,
- rgb (0.5028952497497061, 0.13817086581280427, 0.3143566215383367) ,
- rgb (0.5076068118105369, 0.14071192654913128, 0.3145320012008257) ,
- rgb (0.5122783510532176, 0.14331656120063752, 0.3146630922831542) ,
- rgb (0.5169084880054446, 0.14598463068714407, 0.3147540759228004) ,
- rgb (0.5214965286322996, 0.14871544765633712, 0.3148076795453443) ,
- rgb (0.5260418962547748, 0.15150818660835483, 0.31482653406646727) ,
- rgb (0.5305442048985645, 0.15436183633886777, 0.3148129978918713) ,
- rgb (0.5350027976174474, 0.15727540775107324, 0.3147708520739653) ,
- rgb (0.5394173664919906, 0.16024769309971934, 0.31470295028655965) ,
- rgb (0.5437877131360856, 0.16327738551419116, 0.31461204226295625) ,
- rgb (0.5481137003346762, 0.1663630904279047, 0.3145010299091471) ,
- rgb (0.5523952157271191, 0.16950338809328983, 0.3143729155461537) ,
- rgb (0.5566322903496934, 0.17269677158182117, 0.31423043195101424) ,
- rgb (0.5608249903911717, 0.17594170887918095, 0.31407639883970623) ,
- rgb (0.564973435290177, 0.17923664950367169, 0.3139136046337036) ,
- rgb (0.5690778478401143, 0.18258004462335425, 0.3137444095679653) ,
- rgb (0.5731384575410787, 0.18597036007065024, 0.3135712686852) ,
- rgb (0.5771555081299204, 0.18940601489760422, 0.3133970433357208) ,
- rgb (0.5811293276158656, 0.19288548904692518, 0.3132239939418394) ,
- rgb (0.5850602439646688, 0.19640737049066315, 0.3130540116373273) ,
- rgb (0.5889486193554471, 0.19997020971775276, 0.31288922211590126) ,
- rgb (0.5927948053652026, 0.20357251410079796, 0.3127323483930494) ,
- rgb (0.5965991810912237, 0.207212956082026, 0.3125852303112123) ,
- rgb (0.6003621301041158, 0.21089030138947745, 0.3124493441041469) ,
- rgb (0.6040840169673274, 0.21460331490206347, 0.31232652641170694) ,
- rgb (0.6077652399481865, 0.21835070166659282, 0.312219032918702) ,
- rgb (0.6114062072731884, 0.22213124697023234, 0.3121288139643524) ,
- rgb (0.6150072323639137, 0.22594402043981826, 0.3120568068576574) ,
- rgb (0.6185686525887719, 0.2297879924917992, 0.3120046383872893) ,
- rgb (0.6220907982108261, 0.2336621873300741, 0.3119738327362739) ,
- rgb (0.6255741650043496, 0.23756535071152696, 0.3119669831491227) ,
- rgb (0.6290189201698587, 0.24149689191922535, 0.3119844719564572) ,
- rgb (0.6324253485421027, 0.24545598775548677, 0.3120276597462445) ,
- rgb (0.6357937104834237, 0.24944185818822678, 0.3120979395330059) ,
- rgb (0.6391243387840212, 0.2534536546198314, 0.3121968961206398) ,
- rgb (0.642417577481186, 0.257490519876798, 0.31232631707560987) ,
- rgb (0.6456734938264543, 0.2615520316161528, 0.31248673753935263) ,
- rgb (0.6488923016945825, 0.2656375533620908, 0.3126794181957019) ,
- rgb (0.652074172902773, 0.269746505252367, 0.3129056060581917) ,
- rgb (0.6552193260932713, 0.2738782665241015, 0.3131666792687211) ,
- rgb (0.6583280801134499, 0.2780321095766563, 0.3134643447952643) ,
- rgb (0.6614003753260178, 0.28220778870555907, 0.3137991292649849) ,
- rgb (0.6644363246987884, 0.2864048361425618, 0.31417223403606975) ,
- rgb (0.6674360376636913, 0.29062280081258873, 0.31458483752056837) ,
- rgb (0.670399595476762, 0.29486126309253047, 0.3150381395687221) ,
- rgb (0.6733272556481733, 0.29911962764489264, 0.3155337232398221) ,
- rgb (0.6762189792440975, 0.30339762792450425, 0.3160724937230589) ,
- rgb (0.6790747402815734, 0.30769497879760166, 0.31665545668946665) ,
- rgb (0.6818945715094452, 0.31201133280550686, 0.3172838048924495) ,
- rgb (0.6846785094249453, 0.3163463482122221, 0.31795870784057567) ,
- rgb (0.6874265643516962, 0.32069970535138104, 0.3186813762227769) ,
- rgb (0.6901389321505248, 0.32507091815606004, 0.319453323328983) ,
- rgb (0.6928154484676493, 0.32945984647042675, 0.3202754315314667) ,
- rgb (0.6954560834689112, 0.33386622163232865, 0.3211488430698579) ,
- rgb (0.6980608153581771, 0.3382897632604862, 0.3220747885521809) ,
- rgb (0.700629624772421, 0.34273019305341756, 0.32305449047765694) ,
- rgb (0.7031624945881415, 0.34718723719598, 0.32408913679491225) ,
- rgb (0.7056595112261009, 0.3516605297812094, 0.32518014084085567) ,
- rgb (0.7081205956842048, 0.356149855233803, 0.32632861885644465) ,
- rgb (0.7105456546582587, 0.36065500290840113, 0.3275357416278876) ,
- rgb (0.7129346683977347, 0.36517570519856757, 0.3288027427038317) ,
- rgb (0.7152876061484729, 0.3697117022522345, 0.3301308728723546) ,
- rgb (0.7176044490813385, 0.3742627271068619, 0.3315213862095893) ,
- rgb (0.7198852149054985, 0.37882848839337313, 0.332975552002454) ,
- rgb (0.7221299918421461, 0.3834086450896306, 0.33449469983585844) ,
- rgb (0.7243386564778159, 0.38800301593162145, 0.3360799596569183) ,
- rgb (0.7265112290022755, 0.3926113126792577, 0.3377325942005665) ,
- rgb (0.7286477385671655, 0.39723324476747235, 0.33945384341064017) ,
- rgb (0.7307482075484517, 0.401868526884681, 0.3412449533046818) ,
- rgb (0.7328127050626875, 0.4065168468778026, 0.3431071517341082) ,
- rgb (0.7348413359856494, 0.4111778700451951, 0.3450416947080907) ,
- rgb (0.7368342217358587, 0.4158512585029011, 0.347049785207584) ,
- rgb (0.7387914002459927, 0.4205367299231533, 0.34913260148542435) ,
- rgb (0.7407130161950609, 0.4252339389526239, 0.35129130890802607) ,
- rgb (0.7425992159973317, 0.42994254036133867, 0.3535270924537459) ,
- rgb (0.7444501867657067, 0.4346621718461711, 0.35584108091122535) ,
- rgb (0.7462661578916344, 0.439392450449735, 0.3582343914230064) ,
- rgb (0.7480473927555956, 0.44413297780351974, 0.36070813602540136) ,
- rgb (0.7497942054717047, 0.4488833348154881, 0.3632633755836028) ,
- rgb (0.7515068504589166, 0.45364314496866825, 0.36590112443835765) ,
- rgb (0.7531856636904657, 0.45841199172949604, 0.3686223664223477) ,
- rgb (0.7548310506695954, 0.46318942799460555, 0.3714280448394211) ,
- rgb (0.7564434157714071, 0.4679750143794846, 0.37431909037543515) ,
- rgb (0.7580232553845584, 0.4727682731566229, 0.3772963553109668) ,
- rgb (0.7595711110534006, 0.4775687122205708, 0.380360657784311) ,
- rgb (0.7610876378057071, 0.48237579130289127, 0.3835127572385229) ,
- rgb (0.7625733355405261, 0.48718906673415824, 0.38675335037837993) ,
- rgb (0.7640288560928866, 0.49200802533379656, 0.39008308392311997) ,
- rgb (0.7654549259333051, 0.4968321290972723, 0.3935025400011538) ,
- rgb (0.7668522895064389, 0.5016608471009063, 0.39701221751773474) ,
- rgb (0.768221765997353, 0.5064936237128791, 0.40061257089416885) ,
- rgb (0.7695642334401418, 0.5113298901696085, 0.4043039806968248) ,
- rgb (0.7708809196230247, 0.516168926434691, 0.40808667584648967) ,
- rgb (0.7721725722960555, 0.5210102658711383, 0.4119608998712287) ,
- rgb (0.7734402182988989, 0.5258533209345156, 0.41592679539764366) ,
- rgb (0.774684947460632, 0.5306974938477673, 0.4199844035696376) ,
- rgb (0.775907907306857, 0.5355421788246119, 0.42413367909988375) ,
- rgb (0.7771103295521099, 0.5403867491056124, 0.4283745037125848) ,
- rgb (0.7782934580763312, 0.545230594884266, 0.432706647838971) ,
- rgb (0.7794586273150664, 0.5500730841397727, 0.4371297985644476) ,
- rgb (0.7806077474948377, 0.5549133574489061, 0.4416433242636464) ,
- rgb (0.7817418047898184, 0.5597509805259486, 0.44624687186865436) ,
- rgb (0.7828622526444091, 0.5645853311116688, 0.45093985823706345) ,
- rgb (0.7839706083641448, 0.5694157832671042, 0.4557215474289206) ,
- rgb (0.7850684501960684, 0.5742417003617839, 0.46059116206904965) ,
- rgb (0.7861573713233296, 0.5790624629815756, 0.465547782819184) ,
- rgb (0.7872390410818835, 0.5838774374455721, 0.47059039582133383) ,
- rgb (0.7883151404562396, 0.5886860017356244, 0.4757179187907608) ,
- rgb (0.7893873776625194, 0.5934875421745599, 0.48092913815357724) ,
- rgb (0.7904577684772788, 0.5982813427706246, 0.48622257801969754) ,
- rgb (0.7915283284347561, 0.603066705931472, 0.49159667021646397) ,
- rgb (0.7926003430423745, 0.6078432208703702, 0.4970502062153201) ,
- rgb (0.7936755969866496, 0.6126102933407219, 0.5025816129126943) ,
- rgb (0.7947558597265404, 0.617367344002207, 0.5081892121310299) ,
- rgb (0.7958429237958377, 0.6221137880845115, 0.5138712409190979) ,
- rgb (0.7969385471995161, 0.626849056792967, 0.5196258425240281) ,
- rgb (0.7980444781513664, 0.6315725822508955, 0.5254510814483478) ,
- rgb (0.7991624518501963, 0.6362837937202919, 0.5313449594256143) ,
- rgb (0.8002941538975398, 0.6409821330674986, 0.5373053518514104) ,
- rgb (0.8014412429256005, 0.6456670345921877, 0.5433300863249918) ,
- rgb (0.8026053114611295, 0.6503379374810385, 0.5494169158460365) ,
- rgb (0.8037879253107763, 0.6549942654947263, 0.5555635086708381) ,
- rgb (0.804990547908103, 0.6596354502756416, 0.5617674511054698) ,
- rgb (0.8062146052692706, 0.6642608958528229, 0.5680262917864979) ,
- rgb (0.8074614045096935, 0.6688700095398864, 0.5743374637345958) ,
- rgb (0.8087321917008969, 0.6734621670219452, 0.5806983480557674) ,
- rgb (0.8100280946652069, 0.6780367267397182, 0.5871062690808275) ,
- rgb (0.8113501401176333, 0.6825930154624339, 0.5935584890905076) ,
- rgb (0.8126992203988149, 0.6871303371461888, 0.600052148204351) ,
- rgb (0.8140761104699334, 0.6916479479148213, 0.6065843782630862) ,
- rgb (0.8154814662727948, 0.6961450550830809, 0.6131522120932265) ,
- rgb (0.8169157577505589, 0.7006208301478398, 0.6197526063725792) ,
- rgb (0.8183793116449822, 0.705074381896351, 0.626382454789333) ,
- rgb (0.8198723065045529, 0.7095047497878748, 0.6330385704006711) ,
- rgb (0.8213947205565636, 0.7139109141951604, 0.6397176669767276) ,
- rgb (0.8229463511042843, 0.7182917733129006, 0.6464164243818421) ,
- rgb (0.8245268129450285, 0.7226461431208888, 0.653131379154226) ,
- rgb (0.8261354971058026, 0.7269727551823826, 0.659859001562165) ,
- rgb (0.8277716072353446, 0.7312702332407809, 0.6665957020468297) ,
- rgb (0.8294340781648147, 0.7355371221572935, 0.6733377200930191) ,
- rgb (0.8311216352909631, 0.7397718464763862, 0.6800812520363146) ,
- rgb (0.8328327718577798, 0.7439727181745988, 0.6868223587464855) ,
- rgb (0.8345656905566583, 0.7481379479992134, 0.6935569764986385) ,
- rgb (0.8363189884473793, 0.7522654895287526, 0.7002799902886496) ,
- rgb (0.8380912347613196, 0.7563531486080863, 0.7069856139021298) ,
- rgb (0.8398783988412087, 0.7603990719977968, 0.7136714781112923) ,
- rgb (0.8416775076684515, 0.7644010120098295, 0.7203329938728462) ,
- rgb (0.843485292229337, 0.7683566039987018, 0.7269653699897204) ,
- rgb (0.8452981073195511, 0.7722633860104472, 0.7335636824054149) ,
- rgb (0.847111955079651, 0.7761188023604716, 0.7401227576280706) ,
- rgb (0.8489224556311764, 0.7799202140765015, 0.7466371929366437) ,
- rgb (0.8507269702317879, 0.7836645734238389, 0.7530974636118285) ,
- rgb (0.8525190720770844, 0.7873493613354844, 0.7594994148789691) ,
- rgb (0.8542921961147046, 0.7909719677709199, 0.765838014779141) ,
- rgb (0.856040223147254, 0.7945296360155061, 0.7721061003767414) ,
- rgb (0.857756629435049, 0.7980196314271393, 0.778295716672475) ,
- rgb (0.8594346370300241, 0.8014392309950078, 0.7843978875138392) ,
- rgb (0.8610711702756552, 0.8047851790981223, 0.7903952966373629) ,
- rgb (0.8626560105112757, 0.8080552380426153, 0.796282666437655) ,
- rgb (0.8641834372394103, 0.8112464422465354, 0.8020461269686395) ,
- rgb (0.8656493432560532, 0.8143554406751491, 0.8076697232416455) ,
- rgb (0.867053149070485, 0.8173780404191124, 0.813134196269114) ,
- rgb (0.8683995469581863, 0.8203087551218152, 0.8184163896312899) ,
- rgb (0.8696913150261381, 0.8231415885956916, 0.8235047668317317) ,
- rgb (0.8709384671729751, 0.8258685788943851, 0.8283849726114961) ,
- rgb (0.8721533197845432, 0.8284805282370967, 0.8330486712880828) ,
- rgb (0.8733517136091627, 0.8309671525127262, 0.8374885100119709) ,
- rgb (0.8745379332026019, 0.8333197294864546, 0.8417192535806901) ,
- rgb (0.875714587099614, 0.8355302318472394, 0.8457553751902708) ,
- rgb (0.8768784845161469, 0.8375923807118654, 0.8496137354915025) ,
- rgb (0.8780229843664901, 0.8395016561854007, 0.8533064535245892) ,
- rgb (0.8791324424079277, 0.8412555488447591, 0.8568557229103964) ,
- rgb (0.8801929331569581, 0.8428522482477862, 0.8602739992715663) ,
- rgb (0.8811916987134195, 0.8442906671771735, 0.8635659516866988) ,
- rgb (0.8821154248940161, 0.8455700725455935, 0.8667376504623333) ,
- rgb (0.8829516859544853, 0.8466897027569927, 0.8697961704819097) ,
- rgb (0.8836912714589804, 0.8476489176151927, 0.8727414710144156) ,
- rgb (0.8843271305411354, 0.8484474157205542, 0.8755678522824297) ,
- rgb (0.8848513815990857, 0.849084264228938, 0.8782823528537247) ,
- rgb (0.8852589797263047, 0.8495589281098921, 0.8808841479402484) ,
- rgb (0.8855471481195238, 0.8498717428363158, 0.8833620612117095) ,
- rgb (0.8857115512284565, 0.8500218611585632, 0.8857253899008712)
-});
+ rgb (0.8857501584075443, 0.8500092494306783, 0.8879736506427196) ,
+ rgb (0.8837852019553906, 0.8507294054031063, 0.8872322209694989) ,
+ rgb (0.8817223105928579, 0.8512759407765347, 0.8863805692551482) ,
+ rgb (0.8795410528270573, 0.8516567540749572, 0.8854143767924102) ,
+ rgb (0.8772488085896548, 0.8518702833887027, 0.8843412038131143) ,
+ rgb (0.8748534750857597, 0.8519152612302319, 0.8831692696761383) ,
+ rgb (0.8723313408512408, 0.8518016547808089, 0.8818970435500162) ,
+ rgb (0.8697047485350982, 0.8515240300479789, 0.8805388339000336) ,
+ rgb (0.8669601550533358, 0.8510896085314068, 0.8790976697717334) ,
+ rgb (0.86408985081464, 0.8505039116750779, 0.8775792578489263) ,
+ rgb (0.8611024543689985, 0.8497675485700126, 0.8759924292343957) ,
+ rgb (0.8579825924567037, 0.8488893481028184, 0.8743403855344628) ,
+ rgb (0.8547259318925698, 0.8478748812467282, 0.8726282980930582) ,
+ rgb (0.8513371457085719, 0.8467273579611647, 0.8708608165735044) ,
+ rgb (0.8478071070257792, 0.8454546229209523, 0.8690403678369444) ,
+ rgb (0.8441261828674842, 0.8440648271103739, 0.8671697332269007) ,
+ rgb (0.8403042080595778, 0.8425605950855084, 0.865250882410458) ,
+ rgb (0.8363403180919118, 0.8409479651895194, 0.8632852800107016) ,
+ rgb (0.8322270571293441, 0.8392349062775448, 0.8612756350042788) ,
+ rgb (0.8279689431601354, 0.837426007513952, 0.8592239945130679) ,
+ rgb (0.8235742968025285, 0.8355248776479544, 0.8571319132851495) ,
+ rgb (0.8190465467793753, 0.8335364929949034, 0.855002062870101) ,
+ rgb (0.8143898212114309, 0.8314655869419785, 0.8528375906214702) ,
+ rgb (0.8095999819094809, 0.8293189667350546, 0.8506444160105037) ,
+ rgb (0.8046916442981458, 0.8270983878056066, 0.8484244929697402) ,
+ rgb (0.79967075421268, 0.8248078181208093, 0.8461821002957853) ,
+ rgb (0.7945430508923111, 0.8224511622630462, 0.8439218478682798) ,
+ rgb (0.7893144556460892, 0.8200321318870201, 0.8416486380471222) ,
+ rgb (0.7839910104276492, 0.8175542640053343, 0.8393674746403673) ,
+ rgb (0.7785789200822759, 0.8150208937874255, 0.8370834463093898) ,
+ rgb (0.7730841659017094, 0.8124352473546601, 0.8348017295057968) ,
+ rgb (0.7675110850441786, 0.8098007598713145, 0.8325281663805967) ,
+ rgb (0.7618690793798029, 0.8071194938764749, 0.830266486168872) ,
+ rgb (0.7561644358438198, 0.8043940873347794, 0.8280213899472) ,
+ rgb (0.750403467654067, 0.8016269900896532, 0.8257973785108242) ,
+ rgb (0.7445924777189017, 0.7988204771958325, 0.8235986758615652) ,
+ rgb (0.7387377170049494, 0.7959766573503101, 0.8214292278043301) ,
+ rgb (0.7328454364552346, 0.7930974646884407, 0.8192926338423038) ,
+ rgb (0.726921775128297, 0.7901846863592763, 0.8171921746672638) ,
+ rgb (0.7209728066553678, 0.7872399592345264, 0.8151307392087926) ,
+ rgb (0.7150040307625213, 0.7842648709158119, 0.8131111655994991) ,
+ rgb (0.709020781345393, 0.7812608871607091, 0.8111359185511793) ,
+ rgb (0.7030297722540817, 0.7782290497335813, 0.8092061884805697) ,
+ rgb (0.6970365443886174, 0.7751705000806606, 0.8073233538006345) ,
+ rgb (0.691046410093091, 0.7720862946067809, 0.8054884169067907) ,
+ rgb (0.6850644615439593, 0.7689774029354699, 0.8037020626717691) ,
+ rgb (0.6790955449988215, 0.765844721313959, 0.8019646617300199) ,
+ rgb (0.6731442255942621, 0.7626890873389048, 0.8002762854580953) ,
+ rgb (0.6672147980375281, 0.7595112803730375, 0.7986367465453776) ,
+ rgb (0.6613112930078745, 0.7563120270871903, 0.7970456043491897) ,
+ rgb (0.6554369232645472, 0.7530920875676843, 0.7955027112903105) ,
+ rgb (0.6495957300425348, 0.7498520122194177, 0.7940067402149911) ,
+ rgb (0.6437910831099849, 0.7465923800833657, 0.7925565320130605) ,
+ rgb (0.6380258682854598, 0.7433137671403319, 0.7911510045957317) ,
+ rgb (0.6323027138710603, 0.740016721601314, 0.7897889276264043) ,
+ rgb (0.6266240202260459, 0.7367017540369944, 0.7884690131633456) ,
+ rgb (0.6209919306481755, 0.733369347989232, 0.7871899462469658) ,
+ rgb (0.6154084641177048, 0.7300199523273969, 0.7859502270675048) ,
+ rgb (0.6098754317609306, 0.7266539875975829, 0.7847483573269471) ,
+ rgb (0.6043943420027486, 0.7232718614323369, 0.7835829559353559) ,
+ rgb (0.5989665814482068, 0.7198739489224673, 0.7824525989934664) ,
+ rgb (0.5935933569683722, 0.7164606049658685, 0.781355882376401) ,
+ rgb (0.588275797805555, 0.7130321464645814, 0.7802914140563652) ,
+ rgb (0.5830148703693241, 0.7095888767699747, 0.7792578182047659) ,
+ rgb (0.5778116438998202, 0.7061310615715398, 0.7782534512102552) ,
+ rgb (0.5726668948158774, 0.7026589535425779, 0.7772770268091199) ,
+ rgb (0.5675811785386197, 0.6991727930264627, 0.776327485342753) ,
+ rgb (0.5625551535721934, 0.6956727838162965, 0.7754035914230984) ,
+ rgb (0.5575894041960517, 0.6921591145825405, 0.7745041337932782) ,
+ rgb (0.5526845058934713, 0.6886319451516638, 0.7736279426902245) ,
+ rgb (0.5478409815301863, 0.6850914221850988, 0.7727738647344087) ,
+ rgb (0.5430593242401823, 0.6815376725306588, 0.7719407969783508) ,
+ rgb (0.5383401557517628, 0.677970811290954, 0.7711273443905772) ,
+ rgb (0.533683891477284, 0.6743909370521273, 0.7703325054879735) ,
+ rgb (0.529090861832473, 0.6707981230280622, 0.7695555229231313) ,
+ rgb (0.5245615147059358, 0.6671924299614223, 0.7687954171423095) ,
+ rgb (0.5200962739223556, 0.6635739143403039, 0.768051194033441) ,
+ rgb (0.5156955988596057, 0.65994260812898, 0.7673219148959617) ,
+ rgb (0.5113599254160193, 0.6562985398183186, 0.7666066378064533) ,
+ rgb (0.5070896957645166, 0.6526417240314645, 0.7659044566083585) ,
+ rgb (0.5028853540415561, 0.6489721673409526, 0.7652144671817491) ,
+ rgb (0.4987473366135607, 0.6452898684900934, 0.7645357873418008) ,
+ rgb (0.4946761847863938, 0.6415948411950443, 0.7638671900213091) ,
+ rgb (0.4906722493856122, 0.6378870485884708, 0.7632081276316384) ,
+ rgb (0.4867359599430568, 0.6341664625110051, 0.7625578008592404) ,
+ rgb (0.4828677867260272, 0.6304330455306234, 0.761915371498953) ,
+ rgb (0.47906816236197386, 0.6266867625186013, 0.7612800037566242) ,
+ rgb (0.47533752394906287, 0.6229275728383581, 0.7606508557181775) ,
+ rgb (0.4716762951887709, 0.6191554324288464, 0.7600270922788305) ,
+ rgb (0.46808490970531597, 0.6153702869579029, 0.7594078989109274) ,
+ rgb (0.4645637671630393, 0.6115720882286415, 0.7587924262302581) ,
+ rgb (0.4611132664702388, 0.607760777169989, 0.7581798643680714) ,
+ rgb (0.45773377230160567, 0.6039363004658646, 0.7575693690185916) ,
+ rgb (0.45442563977552913, 0.6000985950385866, 0.7569601366060649) ,
+ rgb (0.45118918687617743, 0.5962476205135354, 0.7563512064324664) ,
+ rgb (0.4480247093358917, 0.5923833145214658, 0.7557417647410792) ,
+ rgb (0.4449324685421538, 0.5885055998308617, 0.7551311041857901) ,
+ rgb (0.441912717666964, 0.5846144110017557, 0.7545183888441067) ,
+ rgb (0.43896563958048396, 0.5807096924109849, 0.7539027620828594) ,
+ rgb (0.4360913895835637, 0.5767913799818608, 0.7532834105961016) ,
+ rgb (0.43329008867358393, 0.5728594162560667, 0.7526594653256667) ,
+ rgb (0.4305617907305757, 0.5689137457245718, 0.752030080993127) ,
+ rgb (0.42790652284925834, 0.5649543060909209, 0.7513944352191484) ,
+ rgb (0.42532423665011354, 0.560981049599503, 0.7507516498900512) ,
+ rgb (0.4228148567577266, 0.5569939212699658, 0.7501008698822764) ,
+ rgb (0.42037822361396326, 0.5529928715810817, 0.7494412559451894) ,
+ rgb (0.4180141407923363, 0.5489778542188889, 0.7487719316700112) ,
+ rgb (0.4157223260454232, 0.544948827153504, 0.7480920445900052) ,
+ rgb (0.4135024574331473, 0.5409057477109848, 0.7474007329754309) ,
+ rgb (0.4113541469730457, 0.5368485776500593, 0.7466971285506578) ,
+ rgb (0.4092768899914751, 0.5327773017713032, 0.7459803063570782) ,
+ rgb (0.4072701869421907, 0.5286918801105741, 0.7452494263758127) ,
+ rgb (0.4053334378930318, 0.5245922817498312, 0.7445036583670813) ,
+ rgb (0.40346600333905397, 0.5204784765384003, 0.7437421522356709) ,
+ rgb (0.40166714010896104, 0.5163504496968876, 0.7429640345324835) ,
+ rgb (0.39993606933454834, 0.5122081814321852, 0.7421684457131799) ,
+ rgb (0.3982719152586337, 0.5080516653927614, 0.7413545091809972) ,
+ rgb (0.3966737490566561, 0.5038808905384797, 0.7405213858051674) ,
+ rgb (0.3951405880820763, 0.4996958532637776, 0.7396682021171571) ,
+ rgb (0.39367135736822567, 0.4954965577745118, 0.738794102296364) ,
+ rgb (0.39226494876209317, 0.4912830033289926, 0.7378982478447508) ,
+ rgb (0.390920175719949, 0.4870552025122304, 0.7369797713388125) ,
+ rgb (0.38963580160340855, 0.48281316715123496, 0.7360378254693274) ,
+ rgb (0.3884105330084243, 0.47855691131792805, 0.7350715764115726) ,
+ rgb (0.3872430145933025, 0.4742864593363539, 0.7340801678785439) ,
+ rgb (0.386131841788921, 0.4700018340988123, 0.7330627749243106) ,
+ rgb (0.3850755679365139, 0.46570306719930193, 0.732018540336905) ,
+ rgb (0.38407269378943537, 0.46139018782416635, 0.7309466543290268) ,
+ rgb (0.3831216808440275, 0.457063235814072, 0.7298462679135326) ,
+ rgb (0.38222094988570376, 0.45272225034283325, 0.7287165614400378) ,
+ rgb (0.3813688793045416, 0.4483672766927786, 0.7275567131714135) ,
+ rgb (0.3805638069656562, 0.4439983720863372, 0.7263658704513531) ,
+ rgb (0.3798040374484875, 0.4396155882122263, 0.7251432377876109) ,
+ rgb (0.3790878928311076, 0.43521897612544935, 0.7238879869132313) ,
+ rgb (0.378413635091359, 0.43080859411413064, 0.7225993199306104) ,
+ rgb (0.3777794975351373, 0.4263845142616835, 0.7212763999353023) ,
+ rgb (0.3771837184425123, 0.4219468022345483, 0.7199184152447577) ,
+ rgb (0.37662448930806297, 0.41749553747893614, 0.7185245473617611) ,
+ rgb (0.37610001286385814, 0.4130307995247706, 0.7170939691992023) ,
+ rgb (0.375608469194424, 0.40855267638072096, 0.7156258509158755) ,
+ rgb (0.37514802505380473, 0.4040612609993941, 0.7141193695725726) ,
+ rgb (0.3747168601930223, 0.3995566498711684, 0.7125736851650046) ,
+ rgb (0.3743131319931234, 0.3950389482828331, 0.7109879652237746) ,
+ rgb (0.3739349933047578, 0.3905082752937583, 0.7093613429347845) ,
+ rgb (0.3735806215098284, 0.3859647438605754, 0.7076929760731058) ,
+ rgb (0.37324816143326384, 0.38140848555753937, 0.7059820097480604) ,
+ rgb (0.3729357864666503, 0.3768396383521984, 0.7042275578058994) ,
+ rgb (0.37264166757849604, 0.3722583500483685, 0.7024287314570723) ,
+ rgb (0.37236397858465387, 0.36766477862108266, 0.7005846349652077) ,
+ rgb (0.3721008970244382, 0.3630590973698238, 0.6986943461507372) ,
+ rgb (0.3718506155898596, 0.3584414828587522, 0.6967569581025654) ,
+ rgb (0.3716113323440048, 0.3538121372967869, 0.6947714991938089) ,
+ rgb (0.37138124223736607, 0.34917126878479027, 0.6927370347192883) ,
+ rgb (0.37115856636209105, 0.3445191141023017, 0.6906525358646499) ,
+ rgb (0.3709415155133733, 0.33985591488818123, 0.6885170337950512) ,
+ rgb (0.3707283327942267, 0.33518193808489577, 0.6863294816960677) ,
+ rgb (0.37051738634484427, 0.3304974124430785, 0.6840888878885721) ,
+ rgb (0.37030682071842685, 0.32580269697872455, 0.6817941168448668) ,
+ rgb (0.37009487130772695, 0.3210981375964933, 0.6794440539905685) ,
+ rgb (0.3698798032902536, 0.31638410101153364, 0.6770375543809057) ,
+ rgb (0.36965987626565955, 0.3116609876295197, 0.6745734474341955) ,
+ rgb (0.3694333459127623, 0.3069292355186234, 0.6720505284912062) ,
+ rgb (0.36919847837592484, 0.3021893217650707, 0.6694675433161452) ,
+ rgb (0.3689535530659678, 0.29744175492366276, 0.6668232208982426) ,
+ rgb (0.3686968223189527, 0.292687098561501, 0.6641162529823691) ,
+ rgb (0.36842655638020444, 0.2879259643777846, 0.661345269109446) ,
+ rgb (0.3681410147989972, 0.2831590122118299, 0.6585088880697231) ,
+ rgb (0.3678384369653108, 0.2783869718129776, 0.655605668384537) ,
+ rgb (0.36751707094367697, 0.2736106331709098, 0.6526341171161864) ,
+ rgb (0.36717513650699446, 0.26883085667326956, 0.6495927229789225) ,
+ rgb (0.3668108554010799, 0.26404857724525643, 0.6464799165290824) ,
+ rgb (0.3664224325155063, 0.25926481158628106, 0.6432940914076554) ,
+ rgb (0.36600853966739794, 0.25448043878086224, 0.6400336180336859) ,
+ rgb (0.3655669837353898, 0.24969683475296395, 0.6366967518748858) ,
+ rgb (0.3650957984588681, 0.24491536803550484, 0.6332817352005559) ,
+ rgb (0.3645930889012501, 0.24013747024823828, 0.629786801550261) ,
+ rgb (0.3640569302208851, 0.23536470386204195, 0.6262101345195302) ,
+ rgb (0.36348537610385145, 0.2305987621839642, 0.6225498862239288) ,
+ rgb (0.3628764356004103, 0.2258414929328703, 0.6188041741082302) ,
+ rgb (0.36222809558295926, 0.22109488427338303, 0.6149711234609613) ,
+ rgb (0.36153829010998356, 0.21636111429594002, 0.6110488067964093) ,
+ rgb (0.36080493826624654, 0.21164251793458128, 0.6070353217206471) ,
+ rgb (0.36002681809096376, 0.20694122817889948, 0.6029284543191687) ,
+ rgb (0.35920088560930186, 0.20226037920758122, 0.5987265295935138) ,
+ rgb (0.3583248996661781, 0.197602942459778, 0.5944276851750107) ,
+ rgb (0.35739663292915563, 0.1929720819784246, 0.5900301125106313) ,
+ rgb (0.35641381143126327, 0.18837119869242164, 0.5855320765920552) ,
+ rgb (0.3553741530690672, 0.18380392577704466, 0.580931914318328) ,
+ rgb (0.3542753496066376, 0.17927413271618647, 0.5762280966066872) ,
+ rgb (0.35311574421123737, 0.17478570377561287, 0.5714187152355529) ,
+ rgb (0.3518924860887379, 0.17034320478524959, 0.5665028491121665) ,
+ rgb (0.3506030444193101, 0.1659512998472086, 0.5614796470399323) ,
+ rgb (0.34924513554955644, 0.16161477763045118, 0.5563483747416378) ,
+ rgb (0.3478165323877778, 0.1573386351115298, 0.5511085345270326) ,
+ rgb (0.3463150717579309, 0.15312802296627787, 0.5457599924248665) ,
+ rgb (0.34473901574536375, 0.1489882058982641, 0.5403024592040654) ,
+ rgb (0.34308600291572294, 0.14492465359918028, 0.534737042820671) ,
+ rgb (0.34135411074506483, 0.1409427920655632, 0.5290650094033675) ,
+ rgb (0.33954168752669694, 0.1370480189671817, 0.5232879753508524) ,
+ rgb (0.3376473209067111, 0.13324562282438077, 0.5174080757397947) ,
+ rgb (0.33566978565015315, 0.12954074251271822, 0.5114280721516895) ,
+ rgb (0.33360804901486, 0.1259381830100592, 0.505351647966549) ,
+ rgb (0.33146154891145124, 0.12244245263391232, 0.4991827458843107) ,
+ rgb (0.3292300520323141, 0.11905764321981127, 0.49292595612342666) ,
+ rgb (0.3269137124539796, 0.1157873496841953, 0.4865864649569746) ,
+ rgb (0.32451307931207785, 0.11263459791730848, 0.48017007211645196) ,
+ rgb (0.3220288227606932, 0.10960114111258401, 0.4736849472572688) ,
+ rgb (0.31946262395497965, 0.1066887988239266, 0.46713728801395243) ,
+ rgb (0.316816480890235, 0.10389861387653518, 0.46053414662739794) ,
+ rgb (0.3140927841475553, 0.10123077676403242, 0.45388335612058467) ,
+ rgb (0.31129434479712365, 0.0986847719340522, 0.4471931371516162) ,
+ rgb (0.30842444457210105, 0.09625938534057774, 0.44047194882050544) ,
+ rgb (0.30548675819945936, 0.09395276484082374, 0.4337284999936111) ,
+ rgb (0.3024853636457425, 0.0917611873973036, 0.42697404043749887) ,
+ rgb (0.2994248396021477, 0.08968225371675004, 0.42021619665853854) ,
+ rgb (0.2963100038890529, 0.08771325096046395, 0.41346259134143476) ,
+ rgb (0.2931459309698525, 0.08585065688962071, 0.40672178082365834) ,
+ rgb (0.2899379244517661, 0.08409078829085731, 0.40000214725256295) ,
+ rgb (0.28669151388283165, 0.08242987384848069, 0.39331182532243375) ,
+ rgb (0.28341239797185225, 0.08086415336549937, 0.38665868550105914) ,
+ rgb (0.2801063857697547, 0.07938999480226153, 0.38005028528138707) ,
+ rgb (0.2767793961581559, 0.07800394103378822, 0.37349382846504675) ,
+ rgb (0.2734373934245081, 0.07670280023749607, 0.36699616136347685) ,
+ rgb (0.2700863774911405, 0.07548367558427554, 0.36056376228111864) ,
+ rgb (0.26673233211995284, 0.0743440180285462, 0.3542027606624096) ,
+ rgb (0.26338121807151404, 0.07328165793989708, 0.34791888996380105) ,
+ rgb (0.26003895187439957, 0.0722947810433622, 0.3417175669546984) ,
+ rgb (0.256711916510839, 0.07138010624208224, 0.3356064898460009) ,
+ rgb (0.25340685873736807, 0.07053358292685183, 0.3295945757321303) ,
+ rgb (0.2501284530619938, 0.06975820642910699, 0.32368100685760637) ,
+ rgb (0.24688226237959, 0.06905363944920445, 0.31786993834254956) ,
+ rgb (0.24367372557466271, 0.06841985515092269, 0.3121652405088837) ,
+ rgb (0.2405081333229594, 0.0678571038148556, 0.3065705449367832) ,
+ rgb (0.23739062429054825, 0.06736588805055552, 0.3010892218406587) ,
+ rgb (0.23433055727563878, 0.0669355996616394, 0.295740099298676) ,
+ rgb (0.23132955273021344, 0.06657618693909059, 0.29051361067988485) ,
+ rgb (0.2283917709422868, 0.06628997924139618, 0.28541074411068496) ,
+ rgb (0.22552164337737857, 0.0660781731193956, 0.28043398847505197) ,
+ rgb (0.22272706739121817, 0.06593379067565194, 0.275597146520537) ,
+ rgb (0.22001251100779617, 0.0658579189189076, 0.2709027999432586) ,
+ rgb (0.21737845072382705, 0.06585966123356204, 0.2663420934966951) ,
+ rgb (0.21482843531473683, 0.06594038561377849, 0.26191675992376573) ,
+ rgb (0.21237411048541005, 0.06608502466175845, 0.2576516509356954) ,
+ rgb (0.21001214221188125, 0.06630857391894718, 0.2535289048041211) ,
+ rgb (0.2077442377448806, 0.06661453200418091, 0.24954644291943817) ,
+ rgb (0.20558051999470117, 0.06699046239786874, 0.24572497420147632) ,
+ rgb (0.20352007949514977, 0.06744417961242422, 0.24205576625191821) ,
+ rgb (0.2015613376412984, 0.06798327102620025, 0.23852974228695395) ,
+ rgb (0.19971571438603364, 0.06859271055370472, 0.23517094067076993) ,
+ rgb (0.19794834061899208, 0.06931406607166066, 0.23194647381302336) ,
+ rgb (0.1960826032659409, 0.07032122724242362, 0.22874673279569585) ,
+ rgb (0.19410351363791453, 0.07160830485689157, 0.22558727307410353) ,
+ rgb (0.19199449184606268, 0.0731828306492733, 0.22243385243433622) ,
+ rgb (0.18975853639094634, 0.07501986186214377, 0.2193005075652994) ,
+ rgb (0.18739228342697645, 0.07710209689958833, 0.21618875376309582) ,
+ rgb (0.18488035509396164, 0.07942573027972388, 0.21307651648984993) ,
+ rgb (0.18774482037046955, 0.07725158846803931, 0.21387448578597812) ,
+ rgb (0.19049578401722037, 0.07531127841678764, 0.2146562337112265) ,
+ rgb (0.1931548636579131, 0.07360681904011795, 0.21542362939081539) ,
+ rgb (0.19571853588267552, 0.07215778103960274, 0.21617499187076789) ,
+ rgb (0.19819343656336558, 0.07097462525273879, 0.21690975060032436) ,
+ rgb (0.20058760685133747, 0.07006457614998421, 0.21762721310371608) ,
+ rgb (0.20290365333558247, 0.06943524858045896, 0.21833167885096033) ,
+ rgb (0.20531725273301316, 0.06891959226639757, 0.21911516689288835) ,
+ rgb (0.20785704662965598, 0.06848439879702528, 0.22000133917653536) ,
+ rgb (0.21052882914958676, 0.06812195249816172, 0.22098759107715404) ,
+ rgb (0.2133313859647627, 0.06783014842602667, 0.2220704321302429) ,
+ rgb (0.21625279838647882, 0.06761633027051639, 0.22324568672294431) ,
+ rgb (0.21930503925136402, 0.06746578636294004, 0.22451023616807558) ,
+ rgb (0.22247308588973624, 0.06738821405309284, 0.22585960379408354) ,
+ rgb (0.2257539681670791, 0.06738213230014747, 0.22728984778098055) ,
+ rgb (0.2291562027859284, 0.06743473087115257, 0.22879681433956656) ,
+ rgb (0.23266299920501882, 0.06755710438847978, 0.23037617493752832) ,
+ rgb (0.23627495835774248, 0.06774359820987802, 0.23202360805926608) ,
+ rgb (0.23999586188690308, 0.06798502996477995, 0.23373434258507808) ,
+ rgb (0.2438114972024792, 0.06828985152901187, 0.23550427698321885) ,
+ rgb (0.247720929905011, 0.06865333790948652, 0.2373288009471749) ,
+ rgb (0.25172899728289466, 0.0690646308260355, 0.23920260612763083) ,
+ rgb (0.2558213554748177, 0.06953231029187984, 0.24112190491594204) ,
+ rgb (0.25999463887892144, 0.07005385560386188, 0.24308218808684579) ,
+ rgb (0.2642551220706094, 0.07061659562299544, 0.24507758869355967) ,
+ rgb (0.2685909594817286, 0.07122671627792246, 0.24710443563450618) ,
+ rgb (0.272997015188973, 0.07188355544616351, 0.2491584709323293) ,
+ rgb (0.277471508091428, 0.07258296989925478, 0.2512349399594277) ,
+ rgb (0.2820174629736694, 0.07331569321404097, 0.25332800295084507) ,
+ rgb (0.28662309235899847, 0.07408846082680887, 0.2554347867371703) ,
+ rgb (0.29128515387578635, 0.0748990498474667, 0.25755101595750435) ,
+ rgb (0.2960004726065818, 0.07574533600095842, 0.25967245030364566) ,
+ rgb (0.3007727681291869, 0.07661782433616476, 0.2617929409781967) ,
+ rgb (0.30559226007249934, 0.07752196310753731, 0.2639100669211966) ,
+ rgb (0.31045520848595526, 0.07845687167618218, 0.2660200572779356) ,
+ rgb (0.3153587000920581, 0.07942099731524319, 0.2681190407694196) ,
+ rgb (0.3202998655799406, 0.08041299473755484, 0.2702032289303951) ,
+ rgb (0.3252788886040126, 0.08142839007654609, 0.27226772884656186) ,
+ rgb (0.3302917447118144, 0.08246763389003825, 0.27430929404579435) ,
+ rgb (0.3353335322445545, 0.08353243411900396, 0.2763253435679004) ,
+ rgb (0.34040164359597463, 0.08462223619170267, 0.27831254595259397) ,
+ rgb (0.345493557138718, 0.08573665496512634, 0.28026769921081435) ,
+ rgb (0.3506067824603248, 0.08687555176033529, 0.28218770540182386) ,
+ rgb (0.35573889947341125, 0.08803897435024335, 0.2840695897279818) ,
+ rgb (0.36088752387578377, 0.0892271943627452, 0.28591050458531014) ,
+ rgb (0.36605031412464006, 0.0904406854276979, 0.2877077458811747) ,
+ rgb (0.3712250843130934, 0.09167999748026273, 0.2894586539763317) ,
+ rgb (0.3764103053221462, 0.09294519809377791, 0.2911602415731392) ,
+ rgb (0.38160247377467543, 0.09423873126371218, 0.2928110750626949) ,
+ rgb (0.3867993907954417, 0.09556181960083443, 0.29440901248173756) ,
+ rgb (0.39199887556812907, 0.09691583650296684, 0.2959521200550908) ,
+ rgb (0.39719876876325577, 0.09830232096827862, 0.2974385647628578) ,
+ rgb (0.40239692379737496, 0.09972293031495055, 0.2988667436973397) ,
+ rgb (0.4075912039268871, 0.10117945586419633, 0.300235195077286) ,
+ rgb (0.41277985630360303, 0.1026734006932461, 0.3015422643746897) ,
+ rgb (0.41796105205173684, 0.10420644885760968, 0.3027865203963184) ,
+ rgb (0.42313214269556043, 0.10578120994917611, 0.3039675809469457) ,
+ rgb (0.4282910131578975, 0.1073997763055258, 0.30508479060294547) ,
+ rgb (0.4334355841041439, 0.1090642347484701, 0.3061376792828915) ,
+ rgb (0.4385637818793154, 0.11077667828375456, 0.30712600062348083) ,
+ rgb (0.44367358645071275, 0.11253912421257944, 0.3080497309546545) ,
+ rgb (0.4487629917317482, 0.1143535557462255, 0.30890905921943196) ,
+ rgb (0.4538300508699989, 0.11622183788331528, 0.3097044124984492) ,
+ rgb (0.45887288947308297, 0.11814571137706886, 0.3104363697903881) ,
+ rgb (0.46389102840284874, 0.12012561256850712, 0.31110343446582983) ,
+ rgb (0.46888111384598413, 0.12216445576414045, 0.31170911458932665) ,
+ rgb (0.473841437035254, 0.12426354237989065, 0.31225470169927194) ,
+ rgb (0.47877034239726296, 0.12642401401409453, 0.3127417273582196) ,
+ rgb (0.48366628618847957, 0.1286467902201389, 0.31317188565991266) ,
+ rgb (0.48852847371852987, 0.13093210934893723, 0.31354553695453014) ,
+ rgb (0.49335504375145617, 0.13328091630401023, 0.31386561956734976) ,
+ rgb (0.4981443546207415, 0.13569380302451714, 0.314135190862664) ,
+ rgb (0.5028952497497061, 0.13817086581280427, 0.3143566215383367) ,
+ rgb (0.5076068118105369, 0.14071192654913128, 0.3145320012008257) ,
+ rgb (0.5122783510532176, 0.14331656120063752, 0.3146630922831542) ,
+ rgb (0.5169084880054446, 0.14598463068714407, 0.3147540759228004) ,
+ rgb (0.5214965286322996, 0.14871544765633712, 0.3148076795453443) ,
+ rgb (0.5260418962547748, 0.15150818660835483, 0.31482653406646727) ,
+ rgb (0.5305442048985645, 0.15436183633886777, 0.3148129978918713) ,
+ rgb (0.5350027976174474, 0.15727540775107324, 0.3147708520739653) ,
+ rgb (0.5394173664919906, 0.16024769309971934, 0.31470295028655965) ,
+ rgb (0.5437877131360856, 0.16327738551419116, 0.31461204226295625) ,
+ rgb (0.5481137003346762, 0.1663630904279047, 0.3145010299091471) ,
+ rgb (0.5523952157271191, 0.16950338809328983, 0.3143729155461537) ,
+ rgb (0.5566322903496934, 0.17269677158182117, 0.31423043195101424) ,
+ rgb (0.5608249903911717, 0.17594170887918095, 0.31407639883970623) ,
+ rgb (0.564973435290177, 0.17923664950367169, 0.3139136046337036) ,
+ rgb (0.5690778478401143, 0.18258004462335425, 0.3137444095679653) ,
+ rgb (0.5731384575410787, 0.18597036007065024, 0.3135712686852) ,
+ rgb (0.5771555081299204, 0.18940601489760422, 0.3133970433357208) ,
+ rgb (0.5811293276158656, 0.19288548904692518, 0.3132239939418394) ,
+ rgb (0.5850602439646688, 0.19640737049066315, 0.3130540116373273) ,
+ rgb (0.5889486193554471, 0.19997020971775276, 0.31288922211590126) ,
+ rgb (0.5927948053652026, 0.20357251410079796, 0.3127323483930494) ,
+ rgb (0.5965991810912237, 0.207212956082026, 0.3125852303112123) ,
+ rgb (0.6003621301041158, 0.21089030138947745, 0.3124493441041469) ,
+ rgb (0.6040840169673274, 0.21460331490206347, 0.31232652641170694) ,
+ rgb (0.6077652399481865, 0.21835070166659282, 0.312219032918702) ,
+ rgb (0.6114062072731884, 0.22213124697023234, 0.3121288139643524) ,
+ rgb (0.6150072323639137, 0.22594402043981826, 0.3120568068576574) ,
+ rgb (0.6185686525887719, 0.2297879924917992, 0.3120046383872893) ,
+ rgb (0.6220907982108261, 0.2336621873300741, 0.3119738327362739) ,
+ rgb (0.6255741650043496, 0.23756535071152696, 0.3119669831491227) ,
+ rgb (0.6290189201698587, 0.24149689191922535, 0.3119844719564572) ,
+ rgb (0.6324253485421027, 0.24545598775548677, 0.3120276597462445) ,
+ rgb (0.6357937104834237, 0.24944185818822678, 0.3120979395330059) ,
+ rgb (0.6391243387840212, 0.2534536546198314, 0.3121968961206398) ,
+ rgb (0.642417577481186, 0.257490519876798, 0.31232631707560987) ,
+ rgb (0.6456734938264543, 0.2615520316161528, 0.31248673753935263) ,
+ rgb (0.6488923016945825, 0.2656375533620908, 0.3126794181957019) ,
+ rgb (0.652074172902773, 0.269746505252367, 0.3129056060581917) ,
+ rgb (0.6552193260932713, 0.2738782665241015, 0.3131666792687211) ,
+ rgb (0.6583280801134499, 0.2780321095766563, 0.3134643447952643) ,
+ rgb (0.6614003753260178, 0.28220778870555907, 0.3137991292649849) ,
+ rgb (0.6644363246987884, 0.2864048361425618, 0.31417223403606975) ,
+ rgb (0.6674360376636913, 0.29062280081258873, 0.31458483752056837) ,
+ rgb (0.670399595476762, 0.29486126309253047, 0.3150381395687221) ,
+ rgb (0.6733272556481733, 0.29911962764489264, 0.3155337232398221) ,
+ rgb (0.6762189792440975, 0.30339762792450425, 0.3160724937230589) ,
+ rgb (0.6790747402815734, 0.30769497879760166, 0.31665545668946665) ,
+ rgb (0.6818945715094452, 0.31201133280550686, 0.3172838048924495) ,
+ rgb (0.6846785094249453, 0.3163463482122221, 0.31795870784057567) ,
+ rgb (0.6874265643516962, 0.32069970535138104, 0.3186813762227769) ,
+ rgb (0.6901389321505248, 0.32507091815606004, 0.319453323328983) ,
+ rgb (0.6928154484676493, 0.32945984647042675, 0.3202754315314667) ,
+ rgb (0.6954560834689112, 0.33386622163232865, 0.3211488430698579) ,
+ rgb (0.6980608153581771, 0.3382897632604862, 0.3220747885521809) ,
+ rgb (0.700629624772421, 0.34273019305341756, 0.32305449047765694) ,
+ rgb (0.7031624945881415, 0.34718723719598, 0.32408913679491225) ,
+ rgb (0.7056595112261009, 0.3516605297812094, 0.32518014084085567) ,
+ rgb (0.7081205956842048, 0.356149855233803, 0.32632861885644465) ,
+ rgb (0.7105456546582587, 0.36065500290840113, 0.3275357416278876) ,
+ rgb (0.7129346683977347, 0.36517570519856757, 0.3288027427038317) ,
+ rgb (0.7152876061484729, 0.3697117022522345, 0.3301308728723546) ,
+ rgb (0.7176044490813385, 0.3742627271068619, 0.3315213862095893) ,
+ rgb (0.7198852149054985, 0.37882848839337313, 0.332975552002454) ,
+ rgb (0.7221299918421461, 0.3834086450896306, 0.33449469983585844) ,
+ rgb (0.7243386564778159, 0.38800301593162145, 0.3360799596569183) ,
+ rgb (0.7265112290022755, 0.3926113126792577, 0.3377325942005665) ,
+ rgb (0.7286477385671655, 0.39723324476747235, 0.33945384341064017) ,
+ rgb (0.7307482075484517, 0.401868526884681, 0.3412449533046818) ,
+ rgb (0.7328127050626875, 0.4065168468778026, 0.3431071517341082) ,
+ rgb (0.7348413359856494, 0.4111778700451951, 0.3450416947080907) ,
+ rgb (0.7368342217358587, 0.4158512585029011, 0.347049785207584) ,
+ rgb (0.7387914002459927, 0.4205367299231533, 0.34913260148542435) ,
+ rgb (0.7407130161950609, 0.4252339389526239, 0.35129130890802607) ,
+ rgb (0.7425992159973317, 0.42994254036133867, 0.3535270924537459) ,
+ rgb (0.7444501867657067, 0.4346621718461711, 0.35584108091122535) ,
+ rgb (0.7462661578916344, 0.439392450449735, 0.3582343914230064) ,
+ rgb (0.7480473927555956, 0.44413297780351974, 0.36070813602540136) ,
+ rgb (0.7497942054717047, 0.4488833348154881, 0.3632633755836028) ,
+ rgb (0.7515068504589166, 0.45364314496866825, 0.36590112443835765) ,
+ rgb (0.7531856636904657, 0.45841199172949604, 0.3686223664223477) ,
+ rgb (0.7548310506695954, 0.46318942799460555, 0.3714280448394211) ,
+ rgb (0.7564434157714071, 0.4679750143794846, 0.37431909037543515) ,
+ rgb (0.7580232553845584, 0.4727682731566229, 0.3772963553109668) ,
+ rgb (0.7595711110534006, 0.4775687122205708, 0.380360657784311) ,
+ rgb (0.7610876378057071, 0.48237579130289127, 0.3835127572385229) ,
+ rgb (0.7625733355405261, 0.48718906673415824, 0.38675335037837993) ,
+ rgb (0.7640288560928866, 0.49200802533379656, 0.39008308392311997) ,
+ rgb (0.7654549259333051, 0.4968321290972723, 0.3935025400011538) ,
+ rgb (0.7668522895064389, 0.5016608471009063, 0.39701221751773474) ,
+ rgb (0.768221765997353, 0.5064936237128791, 0.40061257089416885) ,
+ rgb (0.7695642334401418, 0.5113298901696085, 0.4043039806968248) ,
+ rgb (0.7708809196230247, 0.516168926434691, 0.40808667584648967) ,
+ rgb (0.7721725722960555, 0.5210102658711383, 0.4119608998712287) ,
+ rgb (0.7734402182988989, 0.5258533209345156, 0.41592679539764366) ,
+ rgb (0.774684947460632, 0.5306974938477673, 0.4199844035696376) ,
+ rgb (0.775907907306857, 0.5355421788246119, 0.42413367909988375) ,
+ rgb (0.7771103295521099, 0.5403867491056124, 0.4283745037125848) ,
+ rgb (0.7782934580763312, 0.545230594884266, 0.432706647838971) ,
+ rgb (0.7794586273150664, 0.5500730841397727, 0.4371297985644476) ,
+ rgb (0.7806077474948377, 0.5549133574489061, 0.4416433242636464) ,
+ rgb (0.7817418047898184, 0.5597509805259486, 0.44624687186865436) ,
+ rgb (0.7828622526444091, 0.5645853311116688, 0.45093985823706345) ,
+ rgb (0.7839706083641448, 0.5694157832671042, 0.4557215474289206) ,
+ rgb (0.7850684501960684, 0.5742417003617839, 0.46059116206904965) ,
+ rgb (0.7861573713233296, 0.5790624629815756, 0.465547782819184) ,
+ rgb (0.7872390410818835, 0.5838774374455721, 0.47059039582133383) ,
+ rgb (0.7883151404562396, 0.5886860017356244, 0.4757179187907608) ,
+ rgb (0.7893873776625194, 0.5934875421745599, 0.48092913815357724) ,
+ rgb (0.7904577684772788, 0.5982813427706246, 0.48622257801969754) ,
+ rgb (0.7915283284347561, 0.603066705931472, 0.49159667021646397) ,
+ rgb (0.7926003430423745, 0.6078432208703702, 0.4970502062153201) ,
+ rgb (0.7936755969866496, 0.6126102933407219, 0.5025816129126943) ,
+ rgb (0.7947558597265404, 0.617367344002207, 0.5081892121310299) ,
+ rgb (0.7958429237958377, 0.6221137880845115, 0.5138712409190979) ,
+ rgb (0.7969385471995161, 0.626849056792967, 0.5196258425240281) ,
+ rgb (0.7980444781513664, 0.6315725822508955, 0.5254510814483478) ,
+ rgb (0.7991624518501963, 0.6362837937202919, 0.5313449594256143) ,
+ rgb (0.8002941538975398, 0.6409821330674986, 0.5373053518514104) ,
+ rgb (0.8014412429256005, 0.6456670345921877, 0.5433300863249918) ,
+ rgb (0.8026053114611295, 0.6503379374810385, 0.5494169158460365) ,
+ rgb (0.8037879253107763, 0.6549942654947263, 0.5555635086708381) ,
+ rgb (0.804990547908103, 0.6596354502756416, 0.5617674511054698) ,
+ rgb (0.8062146052692706, 0.6642608958528229, 0.5680262917864979) ,
+ rgb (0.8074614045096935, 0.6688700095398864, 0.5743374637345958) ,
+ rgb (0.8087321917008969, 0.6734621670219452, 0.5806983480557674) ,
+ rgb (0.8100280946652069, 0.6780367267397182, 0.5871062690808275) ,
+ rgb (0.8113501401176333, 0.6825930154624339, 0.5935584890905076) ,
+ rgb (0.8126992203988149, 0.6871303371461888, 0.600052148204351) ,
+ rgb (0.8140761104699334, 0.6916479479148213, 0.6065843782630862) ,
+ rgb (0.8154814662727948, 0.6961450550830809, 0.6131522120932265) ,
+ rgb (0.8169157577505589, 0.7006208301478398, 0.6197526063725792) ,
+ rgb (0.8183793116449822, 0.705074381896351, 0.626382454789333) ,
+ rgb (0.8198723065045529, 0.7095047497878748, 0.6330385704006711) ,
+ rgb (0.8213947205565636, 0.7139109141951604, 0.6397176669767276) ,
+ rgb (0.8229463511042843, 0.7182917733129006, 0.6464164243818421) ,
+ rgb (0.8245268129450285, 0.7226461431208888, 0.653131379154226) ,
+ rgb (0.8261354971058026, 0.7269727551823826, 0.659859001562165) ,
+ rgb (0.8277716072353446, 0.7312702332407809, 0.6665957020468297) ,
+ rgb (0.8294340781648147, 0.7355371221572935, 0.6733377200930191) ,
+ rgb (0.8311216352909631, 0.7397718464763862, 0.6800812520363146) ,
+ rgb (0.8328327718577798, 0.7439727181745988, 0.6868223587464855) ,
+ rgb (0.8345656905566583, 0.7481379479992134, 0.6935569764986385) ,
+ rgb (0.8363189884473793, 0.7522654895287526, 0.7002799902886496) ,
+ rgb (0.8380912347613196, 0.7563531486080863, 0.7069856139021298) ,
+ rgb (0.8398783988412087, 0.7603990719977968, 0.7136714781112923) ,
+ rgb (0.8416775076684515, 0.7644010120098295, 0.7203329938728462) ,
+ rgb (0.843485292229337, 0.7683566039987018, 0.7269653699897204) ,
+ rgb (0.8452981073195511, 0.7722633860104472, 0.7335636824054149) ,
+ rgb (0.847111955079651, 0.7761188023604716, 0.7401227576280706) ,
+ rgb (0.8489224556311764, 0.7799202140765015, 0.7466371929366437) ,
+ rgb (0.8507269702317879, 0.7836645734238389, 0.7530974636118285) ,
+ rgb (0.8525190720770844, 0.7873493613354844, 0.7594994148789691) ,
+ rgb (0.8542921961147046, 0.7909719677709199, 0.765838014779141) ,
+ rgb (0.856040223147254, 0.7945296360155061, 0.7721061003767414) ,
+ rgb (0.857756629435049, 0.7980196314271393, 0.778295716672475) ,
+ rgb (0.8594346370300241, 0.8014392309950078, 0.7843978875138392) ,
+ rgb (0.8610711702756552, 0.8047851790981223, 0.7903952966373629) ,
+ rgb (0.8626560105112757, 0.8080552380426153, 0.796282666437655) ,
+ rgb (0.8641834372394103, 0.8112464422465354, 0.8020461269686395) ,
+ rgb (0.8656493432560532, 0.8143554406751491, 0.8076697232416455) ,
+ rgb (0.867053149070485, 0.8173780404191124, 0.813134196269114) ,
+ rgb (0.8683995469581863, 0.8203087551218152, 0.8184163896312899) ,
+ rgb (0.8696913150261381, 0.8231415885956916, 0.8235047668317317) ,
+ rgb (0.8709384671729751, 0.8258685788943851, 0.8283849726114961) ,
+ rgb (0.8721533197845432, 0.8284805282370967, 0.8330486712880828) ,
+ rgb (0.8733517136091627, 0.8309671525127262, 0.8374885100119709) ,
+ rgb (0.8745379332026019, 0.8333197294864546, 0.8417192535806901) ,
+ rgb (0.875714587099614, 0.8355302318472394, 0.8457553751902708) ,
+ rgb (0.8768784845161469, 0.8375923807118654, 0.8496137354915025) ,
+ rgb (0.8780229843664901, 0.8395016561854007, 0.8533064535245892) ,
+ rgb (0.8791324424079277, 0.8412555488447591, 0.8568557229103964) ,
+ rgb (0.8801929331569581, 0.8428522482477862, 0.8602739992715663) ,
+ rgb (0.8811916987134195, 0.8442906671771735, 0.8635659516866988) ,
+ rgb (0.8821154248940161, 0.8455700725455935, 0.8667376504623333) ,
+ rgb (0.8829516859544853, 0.8466897027569927, 0.8697961704819097) ,
+ rgb (0.8836912714589804, 0.8476489176151927, 0.8727414710144156) ,
+ rgb (0.8843271305411354, 0.8484474157205542, 0.8755678522824297) ,
+ rgb (0.8848513815990857, 0.849084264228938, 0.8782823528537247) ,
+ rgb (0.8852589797263047, 0.8495589281098921, 0.8808841479402484) ,
+ rgb (0.8855471481195238, 0.8498717428363158, 0.8833620612117095) ,
+ rgb (0.8857115512284565, 0.8500218611585632, 0.8857253899008712)
+ });
list_data twilight_shifted = list_data(new pen[] {
- rgb (0.18739228342697645, 0.07710209689958833, 0.21618875376309582) ,
- rgb (0.18975853639094634, 0.07501986186214377, 0.2193005075652994) ,
- rgb (0.19199449184606268, 0.0731828306492733, 0.22243385243433622) ,
- rgb (0.19410351363791453, 0.07160830485689157, 0.22558727307410353) ,
- rgb (0.1960826032659409, 0.07032122724242362, 0.22874673279569585) ,
- rgb (0.19794834061899208, 0.06931406607166066, 0.23194647381302336) ,
- rgb (0.19971571438603364, 0.06859271055370472, 0.23517094067076993) ,
- rgb (0.2015613376412984, 0.06798327102620025, 0.23852974228695395) ,
- rgb (0.20352007949514977, 0.06744417961242422, 0.24205576625191821) ,
- rgb (0.20558051999470117, 0.06699046239786874, 0.24572497420147632) ,
- rgb (0.2077442377448806, 0.06661453200418091, 0.24954644291943817) ,
- rgb (0.21001214221188125, 0.06630857391894718, 0.2535289048041211) ,
- rgb (0.21237411048541005, 0.06608502466175845, 0.2576516509356954) ,
- rgb (0.21482843531473683, 0.06594038561377849, 0.26191675992376573) ,
- rgb (0.21737845072382705, 0.06585966123356204, 0.2663420934966951) ,
- rgb (0.22001251100779617, 0.0658579189189076, 0.2709027999432586) ,
- rgb (0.22272706739121817, 0.06593379067565194, 0.275597146520537) ,
- rgb (0.22552164337737857, 0.0660781731193956, 0.28043398847505197) ,
- rgb (0.2283917709422868, 0.06628997924139618, 0.28541074411068496) ,
- rgb (0.23132955273021344, 0.06657618693909059, 0.29051361067988485) ,
- rgb (0.23433055727563878, 0.0669355996616394, 0.295740099298676) ,
- rgb (0.23739062429054825, 0.06736588805055552, 0.3010892218406587) ,
- rgb (0.2405081333229594, 0.0678571038148556, 0.3065705449367832) ,
- rgb (0.24367372557466271, 0.06841985515092269, 0.3121652405088837) ,
- rgb (0.24688226237959, 0.06905363944920445, 0.31786993834254956) ,
- rgb (0.2501284530619938, 0.06975820642910699, 0.32368100685760637) ,
- rgb (0.25340685873736807, 0.07053358292685183, 0.3295945757321303) ,
- rgb (0.256711916510839, 0.07138010624208224, 0.3356064898460009) ,
- rgb (0.26003895187439957, 0.0722947810433622, 0.3417175669546984) ,
- rgb (0.26338121807151404, 0.07328165793989708, 0.34791888996380105) ,
- rgb (0.26673233211995284, 0.0743440180285462, 0.3542027606624096) ,
- rgb (0.2700863774911405, 0.07548367558427554, 0.36056376228111864) ,
- rgb (0.2734373934245081, 0.07670280023749607, 0.36699616136347685) ,
- rgb (0.2767793961581559, 0.07800394103378822, 0.37349382846504675) ,
- rgb (0.2801063857697547, 0.07938999480226153, 0.38005028528138707) ,
- rgb (0.28341239797185225, 0.08086415336549937, 0.38665868550105914) ,
- rgb (0.28669151388283165, 0.08242987384848069, 0.39331182532243375) ,
- rgb (0.2899379244517661, 0.08409078829085731, 0.40000214725256295) ,
- rgb (0.2931459309698525, 0.08585065688962071, 0.40672178082365834) ,
- rgb (0.2963100038890529, 0.08771325096046395, 0.41346259134143476) ,
- rgb (0.2994248396021477, 0.08968225371675004, 0.42021619665853854) ,
- rgb (0.3024853636457425, 0.0917611873973036, 0.42697404043749887) ,
- rgb (0.30548675819945936, 0.09395276484082374, 0.4337284999936111) ,
- rgb (0.30842444457210105, 0.09625938534057774, 0.44047194882050544) ,
- rgb (0.31129434479712365, 0.0986847719340522, 0.4471931371516162) ,
- rgb (0.3140927841475553, 0.10123077676403242, 0.45388335612058467) ,
- rgb (0.316816480890235, 0.10389861387653518, 0.46053414662739794) ,
- rgb (0.31946262395497965, 0.1066887988239266, 0.46713728801395243) ,
- rgb (0.3220288227606932, 0.10960114111258401, 0.4736849472572688) ,
- rgb (0.32451307931207785, 0.11263459791730848, 0.48017007211645196) ,
- rgb (0.3269137124539796, 0.1157873496841953, 0.4865864649569746) ,
- rgb (0.3292300520323141, 0.11905764321981127, 0.49292595612342666) ,
- rgb (0.33146154891145124, 0.12244245263391232, 0.4991827458843107) ,
- rgb (0.33360804901486, 0.1259381830100592, 0.505351647966549) ,
- rgb (0.33566978565015315, 0.12954074251271822, 0.5114280721516895) ,
- rgb (0.3376473209067111, 0.13324562282438077, 0.5174080757397947) ,
- rgb (0.33954168752669694, 0.1370480189671817, 0.5232879753508524) ,
- rgb (0.34135411074506483, 0.1409427920655632, 0.5290650094033675) ,
- rgb (0.34308600291572294, 0.14492465359918028, 0.534737042820671) ,
- rgb (0.34473901574536375, 0.1489882058982641, 0.5403024592040654) ,
- rgb (0.3463150717579309, 0.15312802296627787, 0.5457599924248665) ,
- rgb (0.3478165323877778, 0.1573386351115298, 0.5511085345270326) ,
- rgb (0.34924513554955644, 0.16161477763045118, 0.5563483747416378) ,
- rgb (0.3506030444193101, 0.1659512998472086, 0.5614796470399323) ,
- rgb (0.3518924860887379, 0.17034320478524959, 0.5665028491121665) ,
- rgb (0.35311574421123737, 0.17478570377561287, 0.5714187152355529) ,
- rgb (0.3542753496066376, 0.17927413271618647, 0.5762280966066872) ,
- rgb (0.3553741530690672, 0.18380392577704466, 0.580931914318328) ,
- rgb (0.35641381143126327, 0.18837119869242164, 0.5855320765920552) ,
- rgb (0.35739663292915563, 0.1929720819784246, 0.5900301125106313) ,
- rgb (0.3583248996661781, 0.197602942459778, 0.5944276851750107) ,
- rgb (0.35920088560930186, 0.20226037920758122, 0.5987265295935138) ,
- rgb (0.36002681809096376, 0.20694122817889948, 0.6029284543191687) ,
- rgb (0.36080493826624654, 0.21164251793458128, 0.6070353217206471) ,
- rgb (0.36153829010998356, 0.21636111429594002, 0.6110488067964093) ,
- rgb (0.36222809558295926, 0.22109488427338303, 0.6149711234609613) ,
- rgb (0.3628764356004103, 0.2258414929328703, 0.6188041741082302) ,
- rgb (0.36348537610385145, 0.2305987621839642, 0.6225498862239288) ,
- rgb (0.3640569302208851, 0.23536470386204195, 0.6262101345195302) ,
- rgb (0.3645930889012501, 0.24013747024823828, 0.629786801550261) ,
- rgb (0.3650957984588681, 0.24491536803550484, 0.6332817352005559) ,
- rgb (0.3655669837353898, 0.24969683475296395, 0.6366967518748858) ,
- rgb (0.36600853966739794, 0.25448043878086224, 0.6400336180336859) ,
- rgb (0.3664224325155063, 0.25926481158628106, 0.6432940914076554) ,
- rgb (0.3668108554010799, 0.26404857724525643, 0.6464799165290824) ,
- rgb (0.36717513650699446, 0.26883085667326956, 0.6495927229789225) ,
- rgb (0.36751707094367697, 0.2736106331709098, 0.6526341171161864) ,
- rgb (0.3678384369653108, 0.2783869718129776, 0.655605668384537) ,
- rgb (0.3681410147989972, 0.2831590122118299, 0.6585088880697231) ,
- rgb (0.36842655638020444, 0.2879259643777846, 0.661345269109446) ,
- rgb (0.3686968223189527, 0.292687098561501, 0.6641162529823691) ,
- rgb (0.3689535530659678, 0.29744175492366276, 0.6668232208982426) ,
- rgb (0.36919847837592484, 0.3021893217650707, 0.6694675433161452) ,
- rgb (0.3694333459127623, 0.3069292355186234, 0.6720505284912062) ,
- rgb (0.36965987626565955, 0.3116609876295197, 0.6745734474341955) ,
- rgb (0.3698798032902536, 0.31638410101153364, 0.6770375543809057) ,
- rgb (0.37009487130772695, 0.3210981375964933, 0.6794440539905685) ,
- rgb (0.37030682071842685, 0.32580269697872455, 0.6817941168448668) ,
- rgb (0.37051738634484427, 0.3304974124430785, 0.6840888878885721) ,
- rgb (0.3707283327942267, 0.33518193808489577, 0.6863294816960677) ,
- rgb (0.3709415155133733, 0.33985591488818123, 0.6885170337950512) ,
- rgb (0.37115856636209105, 0.3445191141023017, 0.6906525358646499) ,
- rgb (0.37138124223736607, 0.34917126878479027, 0.6927370347192883) ,
- rgb (0.3716113323440048, 0.3538121372967869, 0.6947714991938089) ,
- rgb (0.3718506155898596, 0.3584414828587522, 0.6967569581025654) ,
- rgb (0.3721008970244382, 0.3630590973698238, 0.6986943461507372) ,
- rgb (0.37236397858465387, 0.36766477862108266, 0.7005846349652077) ,
- rgb (0.37264166757849604, 0.3722583500483685, 0.7024287314570723) ,
- rgb (0.3729357864666503, 0.3768396383521984, 0.7042275578058994) ,
- rgb (0.37324816143326384, 0.38140848555753937, 0.7059820097480604) ,
- rgb (0.3735806215098284, 0.3859647438605754, 0.7076929760731058) ,
- rgb (0.3739349933047578, 0.3905082752937583, 0.7093613429347845) ,
- rgb (0.3743131319931234, 0.3950389482828331, 0.7109879652237746) ,
- rgb (0.3747168601930223, 0.3995566498711684, 0.7125736851650046) ,
- rgb (0.37514802505380473, 0.4040612609993941, 0.7141193695725726) ,
- rgb (0.375608469194424, 0.40855267638072096, 0.7156258509158755) ,
- rgb (0.37610001286385814, 0.4130307995247706, 0.7170939691992023) ,
- rgb (0.37662448930806297, 0.41749553747893614, 0.7185245473617611) ,
- rgb (0.3771837184425123, 0.4219468022345483, 0.7199184152447577) ,
- rgb (0.3777794975351373, 0.4263845142616835, 0.7212763999353023) ,
- rgb (0.378413635091359, 0.43080859411413064, 0.7225993199306104) ,
- rgb (0.3790878928311076, 0.43521897612544935, 0.7238879869132313) ,
- rgb (0.3798040374484875, 0.4396155882122263, 0.7251432377876109) ,
- rgb (0.3805638069656562, 0.4439983720863372, 0.7263658704513531) ,
- rgb (0.3813688793045416, 0.4483672766927786, 0.7275567131714135) ,
- rgb (0.38222094988570376, 0.45272225034283325, 0.7287165614400378) ,
- rgb (0.3831216808440275, 0.457063235814072, 0.7298462679135326) ,
- rgb (0.38407269378943537, 0.46139018782416635, 0.7309466543290268) ,
- rgb (0.3850755679365139, 0.46570306719930193, 0.732018540336905) ,
- rgb (0.386131841788921, 0.4700018340988123, 0.7330627749243106) ,
- rgb (0.3872430145933025, 0.4742864593363539, 0.7340801678785439) ,
- rgb (0.3884105330084243, 0.47855691131792805, 0.7350715764115726) ,
- rgb (0.38963580160340855, 0.48281316715123496, 0.7360378254693274) ,
- rgb (0.390920175719949, 0.4870552025122304, 0.7369797713388125) ,
- rgb (0.39226494876209317, 0.4912830033289926, 0.7378982478447508) ,
- rgb (0.39367135736822567, 0.4954965577745118, 0.738794102296364) ,
- rgb (0.3951405880820763, 0.4996958532637776, 0.7396682021171571) ,
- rgb (0.3966737490566561, 0.5038808905384797, 0.7405213858051674) ,
- rgb (0.3982719152586337, 0.5080516653927614, 0.7413545091809972) ,
- rgb (0.39993606933454834, 0.5122081814321852, 0.7421684457131799) ,
- rgb (0.40166714010896104, 0.5163504496968876, 0.7429640345324835) ,
- rgb (0.40346600333905397, 0.5204784765384003, 0.7437421522356709) ,
- rgb (0.4053334378930318, 0.5245922817498312, 0.7445036583670813) ,
- rgb (0.4072701869421907, 0.5286918801105741, 0.7452494263758127) ,
- rgb (0.4092768899914751, 0.5327773017713032, 0.7459803063570782) ,
- rgb (0.4113541469730457, 0.5368485776500593, 0.7466971285506578) ,
- rgb (0.4135024574331473, 0.5409057477109848, 0.7474007329754309) ,
- rgb (0.4157223260454232, 0.544948827153504, 0.7480920445900052) ,
- rgb (0.4180141407923363, 0.5489778542188889, 0.7487719316700112) ,
- rgb (0.42037822361396326, 0.5529928715810817, 0.7494412559451894) ,
- rgb (0.4228148567577266, 0.5569939212699658, 0.7501008698822764) ,
- rgb (0.42532423665011354, 0.560981049599503, 0.7507516498900512) ,
- rgb (0.42790652284925834, 0.5649543060909209, 0.7513944352191484) ,
- rgb (0.4305617907305757, 0.5689137457245718, 0.752030080993127) ,
- rgb (0.43329008867358393, 0.5728594162560667, 0.7526594653256667) ,
- rgb (0.4360913895835637, 0.5767913799818608, 0.7532834105961016) ,
- rgb (0.43896563958048396, 0.5807096924109849, 0.7539027620828594) ,
- rgb (0.441912717666964, 0.5846144110017557, 0.7545183888441067) ,
- rgb (0.4449324685421538, 0.5885055998308617, 0.7551311041857901) ,
- rgb (0.4480247093358917, 0.5923833145214658, 0.7557417647410792) ,
- rgb (0.45118918687617743, 0.5962476205135354, 0.7563512064324664) ,
- rgb (0.45442563977552913, 0.6000985950385866, 0.7569601366060649) ,
- rgb (0.45773377230160567, 0.6039363004658646, 0.7575693690185916) ,
- rgb (0.4611132664702388, 0.607760777169989, 0.7581798643680714) ,
- rgb (0.4645637671630393, 0.6115720882286415, 0.7587924262302581) ,
- rgb (0.46808490970531597, 0.6153702869579029, 0.7594078989109274) ,
- rgb (0.4716762951887709, 0.6191554324288464, 0.7600270922788305) ,
- rgb (0.47533752394906287, 0.6229275728383581, 0.7606508557181775) ,
- rgb (0.47906816236197386, 0.6266867625186013, 0.7612800037566242) ,
- rgb (0.4828677867260272, 0.6304330455306234, 0.761915371498953) ,
- rgb (0.4867359599430568, 0.6341664625110051, 0.7625578008592404) ,
- rgb (0.4906722493856122, 0.6378870485884708, 0.7632081276316384) ,
- rgb (0.4946761847863938, 0.6415948411950443, 0.7638671900213091) ,
- rgb (0.4987473366135607, 0.6452898684900934, 0.7645357873418008) ,
- rgb (0.5028853540415561, 0.6489721673409526, 0.7652144671817491) ,
- rgb (0.5070896957645166, 0.6526417240314645, 0.7659044566083585) ,
- rgb (0.5113599254160193, 0.6562985398183186, 0.7666066378064533) ,
- rgb (0.5156955988596057, 0.65994260812898, 0.7673219148959617) ,
- rgb (0.5200962739223556, 0.6635739143403039, 0.768051194033441) ,
- rgb (0.5245615147059358, 0.6671924299614223, 0.7687954171423095) ,
- rgb (0.529090861832473, 0.6707981230280622, 0.7695555229231313) ,
- rgb (0.533683891477284, 0.6743909370521273, 0.7703325054879735) ,
- rgb (0.5383401557517628, 0.677970811290954, 0.7711273443905772) ,
- rgb (0.5430593242401823, 0.6815376725306588, 0.7719407969783508) ,
- rgb (0.5478409815301863, 0.6850914221850988, 0.7727738647344087) ,
- rgb (0.5526845058934713, 0.6886319451516638, 0.7736279426902245) ,
- rgb (0.5575894041960517, 0.6921591145825405, 0.7745041337932782) ,
- rgb (0.5625551535721934, 0.6956727838162965, 0.7754035914230984) ,
- rgb (0.5675811785386197, 0.6991727930264627, 0.776327485342753) ,
- rgb (0.5726668948158774, 0.7026589535425779, 0.7772770268091199) ,
- rgb (0.5778116438998202, 0.7061310615715398, 0.7782534512102552) ,
- rgb (0.5830148703693241, 0.7095888767699747, 0.7792578182047659) ,
- rgb (0.588275797805555, 0.7130321464645814, 0.7802914140563652) ,
- rgb (0.5935933569683722, 0.7164606049658685, 0.781355882376401) ,
- rgb (0.5989665814482068, 0.7198739489224673, 0.7824525989934664) ,
- rgb (0.6043943420027486, 0.7232718614323369, 0.7835829559353559) ,
- rgb (0.6098754317609306, 0.7266539875975829, 0.7847483573269471) ,
- rgb (0.6154084641177048, 0.7300199523273969, 0.7859502270675048) ,
- rgb (0.6209919306481755, 0.733369347989232, 0.7871899462469658) ,
- rgb (0.6266240202260459, 0.7367017540369944, 0.7884690131633456) ,
- rgb (0.6323027138710603, 0.740016721601314, 0.7897889276264043) ,
- rgb (0.6380258682854598, 0.7433137671403319, 0.7911510045957317) ,
- rgb (0.6437910831099849, 0.7465923800833657, 0.7925565320130605) ,
- rgb (0.6495957300425348, 0.7498520122194177, 0.7940067402149911) ,
- rgb (0.6554369232645472, 0.7530920875676843, 0.7955027112903105) ,
- rgb (0.6613112930078745, 0.7563120270871903, 0.7970456043491897) ,
- rgb (0.6672147980375281, 0.7595112803730375, 0.7986367465453776) ,
- rgb (0.6731442255942621, 0.7626890873389048, 0.8002762854580953) ,
- rgb (0.6790955449988215, 0.765844721313959, 0.8019646617300199) ,
- rgb (0.6850644615439593, 0.7689774029354699, 0.8037020626717691) ,
- rgb (0.691046410093091, 0.7720862946067809, 0.8054884169067907) ,
- rgb (0.6970365443886174, 0.7751705000806606, 0.8073233538006345) ,
- rgb (0.7030297722540817, 0.7782290497335813, 0.8092061884805697) ,
- rgb (0.709020781345393, 0.7812608871607091, 0.8111359185511793) ,
- rgb (0.7150040307625213, 0.7842648709158119, 0.8131111655994991) ,
- rgb (0.7209728066553678, 0.7872399592345264, 0.8151307392087926) ,
- rgb (0.726921775128297, 0.7901846863592763, 0.8171921746672638) ,
- rgb (0.7328454364552346, 0.7930974646884407, 0.8192926338423038) ,
- rgb (0.7387377170049494, 0.7959766573503101, 0.8214292278043301) ,
- rgb (0.7445924777189017, 0.7988204771958325, 0.8235986758615652) ,
- rgb (0.750403467654067, 0.8016269900896532, 0.8257973785108242) ,
- rgb (0.7561644358438198, 0.8043940873347794, 0.8280213899472) ,
- rgb (0.7618690793798029, 0.8071194938764749, 0.830266486168872) ,
- rgb (0.7675110850441786, 0.8098007598713145, 0.8325281663805967) ,
- rgb (0.7730841659017094, 0.8124352473546601, 0.8348017295057968) ,
- rgb (0.7785789200822759, 0.8150208937874255, 0.8370834463093898) ,
- rgb (0.7839910104276492, 0.8175542640053343, 0.8393674746403673) ,
- rgb (0.7893144556460892, 0.8200321318870201, 0.8416486380471222) ,
- rgb (0.7945430508923111, 0.8224511622630462, 0.8439218478682798) ,
- rgb (0.79967075421268, 0.8248078181208093, 0.8461821002957853) ,
- rgb (0.8046916442981458, 0.8270983878056066, 0.8484244929697402) ,
- rgb (0.8095999819094809, 0.8293189667350546, 0.8506444160105037) ,
- rgb (0.8143898212114309, 0.8314655869419785, 0.8528375906214702) ,
- rgb (0.8190465467793753, 0.8335364929949034, 0.855002062870101) ,
- rgb (0.8235742968025285, 0.8355248776479544, 0.8571319132851495) ,
- rgb (0.8279689431601354, 0.837426007513952, 0.8592239945130679) ,
- rgb (0.8322270571293441, 0.8392349062775448, 0.8612756350042788) ,
- rgb (0.8363403180919118, 0.8409479651895194, 0.8632852800107016) ,
- rgb (0.8403042080595778, 0.8425605950855084, 0.865250882410458) ,
- rgb (0.8441261828674842, 0.8440648271103739, 0.8671697332269007) ,
- rgb (0.8478071070257792, 0.8454546229209523, 0.8690403678369444) ,
- rgb (0.8513371457085719, 0.8467273579611647, 0.8708608165735044) ,
- rgb (0.8547259318925698, 0.8478748812467282, 0.8726282980930582) ,
- rgb (0.8579825924567037, 0.8488893481028184, 0.8743403855344628) ,
- rgb (0.8611024543689985, 0.8497675485700126, 0.8759924292343957) ,
- rgb (0.86408985081464, 0.8505039116750779, 0.8775792578489263) ,
- rgb (0.8669601550533358, 0.8510896085314068, 0.8790976697717334) ,
- rgb (0.8697047485350982, 0.8515240300479789, 0.8805388339000336) ,
- rgb (0.8723313408512408, 0.8518016547808089, 0.8818970435500162) ,
- rgb (0.8748534750857597, 0.8519152612302319, 0.8831692696761383) ,
- rgb (0.8772488085896548, 0.8518702833887027, 0.8843412038131143) ,
- rgb (0.8795410528270573, 0.8516567540749572, 0.8854143767924102) ,
- rgb (0.8817223105928579, 0.8512759407765347, 0.8863805692551482) ,
- rgb (0.8837852019553906, 0.8507294054031063, 0.8872322209694989) ,
- rgb (0.8857501584075443, 0.8500092494306783, 0.8879736506427196) ,
- rgb (0.8857115512284565, 0.8500218611585632, 0.8857253899008712) ,
- rgb (0.8855471481195238, 0.8498717428363158, 0.8833620612117095) ,
- rgb (0.8852589797263047, 0.8495589281098921, 0.8808841479402484) ,
- rgb (0.8848513815990857, 0.849084264228938, 0.8782823528537247) ,
- rgb (0.8843271305411354, 0.8484474157205542, 0.8755678522824297) ,
- rgb (0.8836912714589804, 0.8476489176151927, 0.8727414710144156) ,
- rgb (0.8829516859544853, 0.8466897027569927, 0.8697961704819097) ,
- rgb (0.8821154248940161, 0.8455700725455935, 0.8667376504623333) ,
- rgb (0.8811916987134195, 0.8442906671771735, 0.8635659516866988) ,
- rgb (0.8801929331569581, 0.8428522482477862, 0.8602739992715663) ,
- rgb (0.8791324424079277, 0.8412555488447591, 0.8568557229103964) ,
- rgb (0.8780229843664901, 0.8395016561854007, 0.8533064535245892) ,
- rgb (0.8768784845161469, 0.8375923807118654, 0.8496137354915025) ,
- rgb (0.875714587099614, 0.8355302318472394, 0.8457553751902708) ,
- rgb (0.8745379332026019, 0.8333197294864546, 0.8417192535806901) ,
- rgb (0.8733517136091627, 0.8309671525127262, 0.8374885100119709) ,
- rgb (0.8721533197845432, 0.8284805282370967, 0.8330486712880828) ,
- rgb (0.8709384671729751, 0.8258685788943851, 0.8283849726114961) ,
- rgb (0.8696913150261381, 0.8231415885956916, 0.8235047668317317) ,
- rgb (0.8683995469581863, 0.8203087551218152, 0.8184163896312899) ,
- rgb (0.867053149070485, 0.8173780404191124, 0.813134196269114) ,
- rgb (0.8656493432560532, 0.8143554406751491, 0.8076697232416455) ,
- rgb (0.8641834372394103, 0.8112464422465354, 0.8020461269686395) ,
- rgb (0.8626560105112757, 0.8080552380426153, 0.796282666437655) ,
- rgb (0.8610711702756552, 0.8047851790981223, 0.7903952966373629) ,
- rgb (0.8594346370300241, 0.8014392309950078, 0.7843978875138392) ,
- rgb (0.857756629435049, 0.7980196314271393, 0.778295716672475) ,
- rgb (0.856040223147254, 0.7945296360155061, 0.7721061003767414) ,
- rgb (0.8542921961147046, 0.7909719677709199, 0.765838014779141) ,
- rgb (0.8525190720770844, 0.7873493613354844, 0.7594994148789691) ,
- rgb (0.8507269702317879, 0.7836645734238389, 0.7530974636118285) ,
- rgb (0.8489224556311764, 0.7799202140765015, 0.7466371929366437) ,
- rgb (0.847111955079651, 0.7761188023604716, 0.7401227576280706) ,
- rgb (0.8452981073195511, 0.7722633860104472, 0.7335636824054149) ,
- rgb (0.843485292229337, 0.7683566039987018, 0.7269653699897204) ,
- rgb (0.8416775076684515, 0.7644010120098295, 0.7203329938728462) ,
- rgb (0.8398783988412087, 0.7603990719977968, 0.7136714781112923) ,
- rgb (0.8380912347613196, 0.7563531486080863, 0.7069856139021298) ,
- rgb (0.8363189884473793, 0.7522654895287526, 0.7002799902886496) ,
- rgb (0.8345656905566583, 0.7481379479992134, 0.6935569764986385) ,
- rgb (0.8328327718577798, 0.7439727181745988, 0.6868223587464855) ,
- rgb (0.8311216352909631, 0.7397718464763862, 0.6800812520363146) ,
- rgb (0.8294340781648147, 0.7355371221572935, 0.6733377200930191) ,
- rgb (0.8277716072353446, 0.7312702332407809, 0.6665957020468297) ,
- rgb (0.8261354971058026, 0.7269727551823826, 0.659859001562165) ,
- rgb (0.8245268129450285, 0.7226461431208888, 0.653131379154226) ,
- rgb (0.8229463511042843, 0.7182917733129006, 0.6464164243818421) ,
- rgb (0.8213947205565636, 0.7139109141951604, 0.6397176669767276) ,
- rgb (0.8198723065045529, 0.7095047497878748, 0.6330385704006711) ,
- rgb (0.8183793116449822, 0.705074381896351, 0.626382454789333) ,
- rgb (0.8169157577505589, 0.7006208301478398, 0.6197526063725792) ,
- rgb (0.8154814662727948, 0.6961450550830809, 0.6131522120932265) ,
- rgb (0.8140761104699334, 0.6916479479148213, 0.6065843782630862) ,
- rgb (0.8126992203988149, 0.6871303371461888, 0.600052148204351) ,
- rgb (0.8113501401176333, 0.6825930154624339, 0.5935584890905076) ,
- rgb (0.8100280946652069, 0.6780367267397182, 0.5871062690808275) ,
- rgb (0.8087321917008969, 0.6734621670219452, 0.5806983480557674) ,
- rgb (0.8074614045096935, 0.6688700095398864, 0.5743374637345958) ,
- rgb (0.8062146052692706, 0.6642608958528229, 0.5680262917864979) ,
- rgb (0.804990547908103, 0.6596354502756416, 0.5617674511054698) ,
- rgb (0.8037879253107763, 0.6549942654947263, 0.5555635086708381) ,
- rgb (0.8026053114611295, 0.6503379374810385, 0.5494169158460365) ,
- rgb (0.8014412429256005, 0.6456670345921877, 0.5433300863249918) ,
- rgb (0.8002941538975398, 0.6409821330674986, 0.5373053518514104) ,
- rgb (0.7991624518501963, 0.6362837937202919, 0.5313449594256143) ,
- rgb (0.7980444781513664, 0.6315725822508955, 0.5254510814483478) ,
- rgb (0.7969385471995161, 0.626849056792967, 0.5196258425240281) ,
- rgb (0.7958429237958377, 0.6221137880845115, 0.5138712409190979) ,
- rgb (0.7947558597265404, 0.617367344002207, 0.5081892121310299) ,
- rgb (0.7936755969866496, 0.6126102933407219, 0.5025816129126943) ,
- rgb (0.7926003430423745, 0.6078432208703702, 0.4970502062153201) ,
- rgb (0.7915283284347561, 0.603066705931472, 0.49159667021646397) ,
- rgb (0.7904577684772788, 0.5982813427706246, 0.48622257801969754) ,
- rgb (0.7893873776625194, 0.5934875421745599, 0.48092913815357724) ,
- rgb (0.7883151404562396, 0.5886860017356244, 0.4757179187907608) ,
- rgb (0.7872390410818835, 0.5838774374455721, 0.47059039582133383) ,
- rgb (0.7861573713233296, 0.5790624629815756, 0.465547782819184) ,
- rgb (0.7850684501960684, 0.5742417003617839, 0.46059116206904965) ,
- rgb (0.7839706083641448, 0.5694157832671042, 0.4557215474289206) ,
- rgb (0.7828622526444091, 0.5645853311116688, 0.45093985823706345) ,
- rgb (0.7817418047898184, 0.5597509805259486, 0.44624687186865436) ,
- rgb (0.7806077474948377, 0.5549133574489061, 0.4416433242636464) ,
- rgb (0.7794586273150664, 0.5500730841397727, 0.4371297985644476) ,
- rgb (0.7782934580763312, 0.545230594884266, 0.432706647838971) ,
- rgb (0.7771103295521099, 0.5403867491056124, 0.4283745037125848) ,
- rgb (0.775907907306857, 0.5355421788246119, 0.42413367909988375) ,
- rgb (0.774684947460632, 0.5306974938477673, 0.4199844035696376) ,
- rgb (0.7734402182988989, 0.5258533209345156, 0.41592679539764366) ,
- rgb (0.7721725722960555, 0.5210102658711383, 0.4119608998712287) ,
- rgb (0.7708809196230247, 0.516168926434691, 0.40808667584648967) ,
- rgb (0.7695642334401418, 0.5113298901696085, 0.4043039806968248) ,
- rgb (0.768221765997353, 0.5064936237128791, 0.40061257089416885) ,
- rgb (0.7668522895064389, 0.5016608471009063, 0.39701221751773474) ,
- rgb (0.7654549259333051, 0.4968321290972723, 0.3935025400011538) ,
- rgb (0.7640288560928866, 0.49200802533379656, 0.39008308392311997) ,
- rgb (0.7625733355405261, 0.48718906673415824, 0.38675335037837993) ,
- rgb (0.7610876378057071, 0.48237579130289127, 0.3835127572385229) ,
- rgb (0.7595711110534006, 0.4775687122205708, 0.380360657784311) ,
- rgb (0.7580232553845584, 0.4727682731566229, 0.3772963553109668) ,
- rgb (0.7564434157714071, 0.4679750143794846, 0.37431909037543515) ,
- rgb (0.7548310506695954, 0.46318942799460555, 0.3714280448394211) ,
- rgb (0.7531856636904657, 0.45841199172949604, 0.3686223664223477) ,
- rgb (0.7515068504589166, 0.45364314496866825, 0.36590112443835765) ,
- rgb (0.7497942054717047, 0.4488833348154881, 0.3632633755836028) ,
- rgb (0.7480473927555956, 0.44413297780351974, 0.36070813602540136) ,
- rgb (0.7462661578916344, 0.439392450449735, 0.3582343914230064) ,
- rgb (0.7444501867657067, 0.4346621718461711, 0.35584108091122535) ,
- rgb (0.7425992159973317, 0.42994254036133867, 0.3535270924537459) ,
- rgb (0.7407130161950609, 0.4252339389526239, 0.35129130890802607) ,
- rgb (0.7387914002459927, 0.4205367299231533, 0.34913260148542435) ,
- rgb (0.7368342217358587, 0.4158512585029011, 0.347049785207584) ,
- rgb (0.7348413359856494, 0.4111778700451951, 0.3450416947080907) ,
- rgb (0.7328127050626875, 0.4065168468778026, 0.3431071517341082) ,
- rgb (0.7307482075484517, 0.401868526884681, 0.3412449533046818) ,
- rgb (0.7286477385671655, 0.39723324476747235, 0.33945384341064017) ,
- rgb (0.7265112290022755, 0.3926113126792577, 0.3377325942005665) ,
- rgb (0.7243386564778159, 0.38800301593162145, 0.3360799596569183) ,
- rgb (0.7221299918421461, 0.3834086450896306, 0.33449469983585844) ,
- rgb (0.7198852149054985, 0.37882848839337313, 0.332975552002454) ,
- rgb (0.7176044490813385, 0.3742627271068619, 0.3315213862095893) ,
- rgb (0.7152876061484729, 0.3697117022522345, 0.3301308728723546) ,
- rgb (0.7129346683977347, 0.36517570519856757, 0.3288027427038317) ,
- rgb (0.7105456546582587, 0.36065500290840113, 0.3275357416278876) ,
- rgb (0.7081205956842048, 0.356149855233803, 0.32632861885644465) ,
- rgb (0.7056595112261009, 0.3516605297812094, 0.32518014084085567) ,
- rgb (0.7031624945881415, 0.34718723719598, 0.32408913679491225) ,
- rgb (0.700629624772421, 0.34273019305341756, 0.32305449047765694) ,
- rgb (0.6980608153581771, 0.3382897632604862, 0.3220747885521809) ,
- rgb (0.6954560834689112, 0.33386622163232865, 0.3211488430698579) ,
- rgb (0.6928154484676493, 0.32945984647042675, 0.3202754315314667) ,
- rgb (0.6901389321505248, 0.32507091815606004, 0.319453323328983) ,
- rgb (0.6874265643516962, 0.32069970535138104, 0.3186813762227769) ,
- rgb (0.6846785094249453, 0.3163463482122221, 0.31795870784057567) ,
- rgb (0.6818945715094452, 0.31201133280550686, 0.3172838048924495) ,
- rgb (0.6790747402815734, 0.30769497879760166, 0.31665545668946665) ,
- rgb (0.6762189792440975, 0.30339762792450425, 0.3160724937230589) ,
- rgb (0.6733272556481733, 0.29911962764489264, 0.3155337232398221) ,
- rgb (0.670399595476762, 0.29486126309253047, 0.3150381395687221) ,
- rgb (0.6674360376636913, 0.29062280081258873, 0.31458483752056837) ,
- rgb (0.6644363246987884, 0.2864048361425618, 0.31417223403606975) ,
- rgb (0.6614003753260178, 0.28220778870555907, 0.3137991292649849) ,
- rgb (0.6583280801134499, 0.2780321095766563, 0.3134643447952643) ,
- rgb (0.6552193260932713, 0.2738782665241015, 0.3131666792687211) ,
- rgb (0.652074172902773, 0.269746505252367, 0.3129056060581917) ,
- rgb (0.6488923016945825, 0.2656375533620908, 0.3126794181957019) ,
- rgb (0.6456734938264543, 0.2615520316161528, 0.31248673753935263) ,
- rgb (0.642417577481186, 0.257490519876798, 0.31232631707560987) ,
- rgb (0.6391243387840212, 0.2534536546198314, 0.3121968961206398) ,
- rgb (0.6357937104834237, 0.24944185818822678, 0.3120979395330059) ,
- rgb (0.6324253485421027, 0.24545598775548677, 0.3120276597462445) ,
- rgb (0.6290189201698587, 0.24149689191922535, 0.3119844719564572) ,
- rgb (0.6255741650043496, 0.23756535071152696, 0.3119669831491227) ,
- rgb (0.6220907982108261, 0.2336621873300741, 0.3119738327362739) ,
- rgb (0.6185686525887719, 0.2297879924917992, 0.3120046383872893) ,
- rgb (0.6150072323639137, 0.22594402043981826, 0.3120568068576574) ,
- rgb (0.6114062072731884, 0.22213124697023234, 0.3121288139643524) ,
- rgb (0.6077652399481865, 0.21835070166659282, 0.312219032918702) ,
- rgb (0.6040840169673274, 0.21460331490206347, 0.31232652641170694) ,
- rgb (0.6003621301041158, 0.21089030138947745, 0.3124493441041469) ,
- rgb (0.5965991810912237, 0.207212956082026, 0.3125852303112123) ,
- rgb (0.5927948053652026, 0.20357251410079796, 0.3127323483930494) ,
- rgb (0.5889486193554471, 0.19997020971775276, 0.31288922211590126) ,
- rgb (0.5850602439646688, 0.19640737049066315, 0.3130540116373273) ,
- rgb (0.5811293276158656, 0.19288548904692518, 0.3132239939418394) ,
- rgb (0.5771555081299204, 0.18940601489760422, 0.3133970433357208) ,
- rgb (0.5731384575410787, 0.18597036007065024, 0.3135712686852) ,
- rgb (0.5690778478401143, 0.18258004462335425, 0.3137444095679653) ,
- rgb (0.564973435290177, 0.17923664950367169, 0.3139136046337036) ,
- rgb (0.5608249903911717, 0.17594170887918095, 0.31407639883970623) ,
- rgb (0.5566322903496934, 0.17269677158182117, 0.31423043195101424) ,
- rgb (0.5523952157271191, 0.16950338809328983, 0.3143729155461537) ,
- rgb (0.5481137003346762, 0.1663630904279047, 0.3145010299091471) ,
- rgb (0.5437877131360856, 0.16327738551419116, 0.31461204226295625) ,
- rgb (0.5394173664919906, 0.16024769309971934, 0.31470295028655965) ,
- rgb (0.5350027976174474, 0.15727540775107324, 0.3147708520739653) ,
- rgb (0.5305442048985645, 0.15436183633886777, 0.3148129978918713) ,
- rgb (0.5260418962547748, 0.15150818660835483, 0.31482653406646727) ,
- rgb (0.5214965286322996, 0.14871544765633712, 0.3148076795453443) ,
- rgb (0.5169084880054446, 0.14598463068714407, 0.3147540759228004) ,
- rgb (0.5122783510532176, 0.14331656120063752, 0.3146630922831542) ,
- rgb (0.5076068118105369, 0.14071192654913128, 0.3145320012008257) ,
- rgb (0.5028952497497061, 0.13817086581280427, 0.3143566215383367) ,
- rgb (0.4981443546207415, 0.13569380302451714, 0.314135190862664) ,
- rgb (0.49335504375145617, 0.13328091630401023, 0.31386561956734976) ,
- rgb (0.48852847371852987, 0.13093210934893723, 0.31354553695453014) ,
- rgb (0.48366628618847957, 0.1286467902201389, 0.31317188565991266) ,
- rgb (0.47877034239726296, 0.12642401401409453, 0.3127417273582196) ,
- rgb (0.473841437035254, 0.12426354237989065, 0.31225470169927194) ,
- rgb (0.46888111384598413, 0.12216445576414045, 0.31170911458932665) ,
- rgb (0.46389102840284874, 0.12012561256850712, 0.31110343446582983) ,
- rgb (0.45887288947308297, 0.11814571137706886, 0.3104363697903881) ,
- rgb (0.4538300508699989, 0.11622183788331528, 0.3097044124984492) ,
- rgb (0.4487629917317482, 0.1143535557462255, 0.30890905921943196) ,
- rgb (0.44367358645071275, 0.11253912421257944, 0.3080497309546545) ,
- rgb (0.4385637818793154, 0.11077667828375456, 0.30712600062348083) ,
- rgb (0.4334355841041439, 0.1090642347484701, 0.3061376792828915) ,
- rgb (0.4282910131578975, 0.1073997763055258, 0.30508479060294547) ,
- rgb (0.42313214269556043, 0.10578120994917611, 0.3039675809469457) ,
- rgb (0.41796105205173684, 0.10420644885760968, 0.3027865203963184) ,
- rgb (0.41277985630360303, 0.1026734006932461, 0.3015422643746897) ,
- rgb (0.4075912039268871, 0.10117945586419633, 0.300235195077286) ,
- rgb (0.40239692379737496, 0.09972293031495055, 0.2988667436973397) ,
- rgb (0.39719876876325577, 0.09830232096827862, 0.2974385647628578) ,
- rgb (0.39199887556812907, 0.09691583650296684, 0.2959521200550908) ,
- rgb (0.3867993907954417, 0.09556181960083443, 0.29440901248173756) ,
- rgb (0.38160247377467543, 0.09423873126371218, 0.2928110750626949) ,
- rgb (0.3764103053221462, 0.09294519809377791, 0.2911602415731392) ,
- rgb (0.3712250843130934, 0.09167999748026273, 0.2894586539763317) ,
- rgb (0.36605031412464006, 0.0904406854276979, 0.2877077458811747) ,
- rgb (0.36088752387578377, 0.0892271943627452, 0.28591050458531014) ,
- rgb (0.35573889947341125, 0.08803897435024335, 0.2840695897279818) ,
- rgb (0.3506067824603248, 0.08687555176033529, 0.28218770540182386) ,
- rgb (0.345493557138718, 0.08573665496512634, 0.28026769921081435) ,
- rgb (0.34040164359597463, 0.08462223619170267, 0.27831254595259397) ,
- rgb (0.3353335322445545, 0.08353243411900396, 0.2763253435679004) ,
- rgb (0.3302917447118144, 0.08246763389003825, 0.27430929404579435) ,
- rgb (0.3252788886040126, 0.08142839007654609, 0.27226772884656186) ,
- rgb (0.3202998655799406, 0.08041299473755484, 0.2702032289303951) ,
- rgb (0.3153587000920581, 0.07942099731524319, 0.2681190407694196) ,
- rgb (0.31045520848595526, 0.07845687167618218, 0.2660200572779356) ,
- rgb (0.30559226007249934, 0.07752196310753731, 0.2639100669211966) ,
- rgb (0.3007727681291869, 0.07661782433616476, 0.2617929409781967) ,
- rgb (0.2960004726065818, 0.07574533600095842, 0.25967245030364566) ,
- rgb (0.29128515387578635, 0.0748990498474667, 0.25755101595750435) ,
- rgb (0.28662309235899847, 0.07408846082680887, 0.2554347867371703) ,
- rgb (0.2820174629736694, 0.07331569321404097, 0.25332800295084507) ,
- rgb (0.277471508091428, 0.07258296989925478, 0.2512349399594277) ,
- rgb (0.272997015188973, 0.07188355544616351, 0.2491584709323293) ,
- rgb (0.2685909594817286, 0.07122671627792246, 0.24710443563450618) ,
- rgb (0.2642551220706094, 0.07061659562299544, 0.24507758869355967) ,
- rgb (0.25999463887892144, 0.07005385560386188, 0.24308218808684579) ,
- rgb (0.2558213554748177, 0.06953231029187984, 0.24112190491594204) ,
- rgb (0.25172899728289466, 0.0690646308260355, 0.23920260612763083) ,
- rgb (0.247720929905011, 0.06865333790948652, 0.2373288009471749) ,
- rgb (0.2438114972024792, 0.06828985152901187, 0.23550427698321885) ,
- rgb (0.23999586188690308, 0.06798502996477995, 0.23373434258507808) ,
- rgb (0.23627495835774248, 0.06774359820987802, 0.23202360805926608) ,
- rgb (0.23266299920501882, 0.06755710438847978, 0.23037617493752832) ,
- rgb (0.2291562027859284, 0.06743473087115257, 0.22879681433956656) ,
- rgb (0.2257539681670791, 0.06738213230014747, 0.22728984778098055) ,
- rgb (0.22247308588973624, 0.06738821405309284, 0.22585960379408354) ,
- rgb (0.21930503925136402, 0.06746578636294004, 0.22451023616807558) ,
- rgb (0.21625279838647882, 0.06761633027051639, 0.22324568672294431) ,
- rgb (0.2133313859647627, 0.06783014842602667, 0.2220704321302429) ,
- rgb (0.21052882914958676, 0.06812195249816172, 0.22098759107715404) ,
- rgb (0.20785704662965598, 0.06848439879702528, 0.22000133917653536) ,
- rgb (0.20531725273301316, 0.06891959226639757, 0.21911516689288835) ,
- rgb (0.20290365333558247, 0.06943524858045896, 0.21833167885096033) ,
- rgb (0.20058760685133747, 0.07006457614998421, 0.21762721310371608) ,
- rgb (0.19819343656336558, 0.07097462525273879, 0.21690975060032436) ,
- rgb (0.19571853588267552, 0.07215778103960274, 0.21617499187076789) ,
- rgb (0.1931548636579131, 0.07360681904011795, 0.21542362939081539) ,
- rgb (0.19049578401722037, 0.07531127841678764, 0.2146562337112265) ,
- rgb (0.18774482037046955, 0.07725158846803931, 0.21387448578597812) ,
- rgb (0.18488035509396164, 0.07942573027972388, 0.21307651648984993)
-});
+ rgb (0.18739228342697645, 0.07710209689958833, 0.21618875376309582) ,
+ rgb (0.18975853639094634, 0.07501986186214377, 0.2193005075652994) ,
+ rgb (0.19199449184606268, 0.0731828306492733, 0.22243385243433622) ,
+ rgb (0.19410351363791453, 0.07160830485689157, 0.22558727307410353) ,
+ rgb (0.1960826032659409, 0.07032122724242362, 0.22874673279569585) ,
+ rgb (0.19794834061899208, 0.06931406607166066, 0.23194647381302336) ,
+ rgb (0.19971571438603364, 0.06859271055370472, 0.23517094067076993) ,
+ rgb (0.2015613376412984, 0.06798327102620025, 0.23852974228695395) ,
+ rgb (0.20352007949514977, 0.06744417961242422, 0.24205576625191821) ,
+ rgb (0.20558051999470117, 0.06699046239786874, 0.24572497420147632) ,
+ rgb (0.2077442377448806, 0.06661453200418091, 0.24954644291943817) ,
+ rgb (0.21001214221188125, 0.06630857391894718, 0.2535289048041211) ,
+ rgb (0.21237411048541005, 0.06608502466175845, 0.2576516509356954) ,
+ rgb (0.21482843531473683, 0.06594038561377849, 0.26191675992376573) ,
+ rgb (0.21737845072382705, 0.06585966123356204, 0.2663420934966951) ,
+ rgb (0.22001251100779617, 0.0658579189189076, 0.2709027999432586) ,
+ rgb (0.22272706739121817, 0.06593379067565194, 0.275597146520537) ,
+ rgb (0.22552164337737857, 0.0660781731193956, 0.28043398847505197) ,
+ rgb (0.2283917709422868, 0.06628997924139618, 0.28541074411068496) ,
+ rgb (0.23132955273021344, 0.06657618693909059, 0.29051361067988485) ,
+ rgb (0.23433055727563878, 0.0669355996616394, 0.295740099298676) ,
+ rgb (0.23739062429054825, 0.06736588805055552, 0.3010892218406587) ,
+ rgb (0.2405081333229594, 0.0678571038148556, 0.3065705449367832) ,
+ rgb (0.24367372557466271, 0.06841985515092269, 0.3121652405088837) ,
+ rgb (0.24688226237959, 0.06905363944920445, 0.31786993834254956) ,
+ rgb (0.2501284530619938, 0.06975820642910699, 0.32368100685760637) ,
+ rgb (0.25340685873736807, 0.07053358292685183, 0.3295945757321303) ,
+ rgb (0.256711916510839, 0.07138010624208224, 0.3356064898460009) ,
+ rgb (0.26003895187439957, 0.0722947810433622, 0.3417175669546984) ,
+ rgb (0.26338121807151404, 0.07328165793989708, 0.34791888996380105) ,
+ rgb (0.26673233211995284, 0.0743440180285462, 0.3542027606624096) ,
+ rgb (0.2700863774911405, 0.07548367558427554, 0.36056376228111864) ,
+ rgb (0.2734373934245081, 0.07670280023749607, 0.36699616136347685) ,
+ rgb (0.2767793961581559, 0.07800394103378822, 0.37349382846504675) ,
+ rgb (0.2801063857697547, 0.07938999480226153, 0.38005028528138707) ,
+ rgb (0.28341239797185225, 0.08086415336549937, 0.38665868550105914) ,
+ rgb (0.28669151388283165, 0.08242987384848069, 0.39331182532243375) ,
+ rgb (0.2899379244517661, 0.08409078829085731, 0.40000214725256295) ,
+ rgb (0.2931459309698525, 0.08585065688962071, 0.40672178082365834) ,
+ rgb (0.2963100038890529, 0.08771325096046395, 0.41346259134143476) ,
+ rgb (0.2994248396021477, 0.08968225371675004, 0.42021619665853854) ,
+ rgb (0.3024853636457425, 0.0917611873973036, 0.42697404043749887) ,
+ rgb (0.30548675819945936, 0.09395276484082374, 0.4337284999936111) ,
+ rgb (0.30842444457210105, 0.09625938534057774, 0.44047194882050544) ,
+ rgb (0.31129434479712365, 0.0986847719340522, 0.4471931371516162) ,
+ rgb (0.3140927841475553, 0.10123077676403242, 0.45388335612058467) ,
+ rgb (0.316816480890235, 0.10389861387653518, 0.46053414662739794) ,
+ rgb (0.31946262395497965, 0.1066887988239266, 0.46713728801395243) ,
+ rgb (0.3220288227606932, 0.10960114111258401, 0.4736849472572688) ,
+ rgb (0.32451307931207785, 0.11263459791730848, 0.48017007211645196) ,
+ rgb (0.3269137124539796, 0.1157873496841953, 0.4865864649569746) ,
+ rgb (0.3292300520323141, 0.11905764321981127, 0.49292595612342666) ,
+ rgb (0.33146154891145124, 0.12244245263391232, 0.4991827458843107) ,
+ rgb (0.33360804901486, 0.1259381830100592, 0.505351647966549) ,
+ rgb (0.33566978565015315, 0.12954074251271822, 0.5114280721516895) ,
+ rgb (0.3376473209067111, 0.13324562282438077, 0.5174080757397947) ,
+ rgb (0.33954168752669694, 0.1370480189671817, 0.5232879753508524) ,
+ rgb (0.34135411074506483, 0.1409427920655632, 0.5290650094033675) ,
+ rgb (0.34308600291572294, 0.14492465359918028, 0.534737042820671) ,
+ rgb (0.34473901574536375, 0.1489882058982641, 0.5403024592040654) ,
+ rgb (0.3463150717579309, 0.15312802296627787, 0.5457599924248665) ,
+ rgb (0.3478165323877778, 0.1573386351115298, 0.5511085345270326) ,
+ rgb (0.34924513554955644, 0.16161477763045118, 0.5563483747416378) ,
+ rgb (0.3506030444193101, 0.1659512998472086, 0.5614796470399323) ,
+ rgb (0.3518924860887379, 0.17034320478524959, 0.5665028491121665) ,
+ rgb (0.35311574421123737, 0.17478570377561287, 0.5714187152355529) ,
+ rgb (0.3542753496066376, 0.17927413271618647, 0.5762280966066872) ,
+ rgb (0.3553741530690672, 0.18380392577704466, 0.580931914318328) ,
+ rgb (0.35641381143126327, 0.18837119869242164, 0.5855320765920552) ,
+ rgb (0.35739663292915563, 0.1929720819784246, 0.5900301125106313) ,
+ rgb (0.3583248996661781, 0.197602942459778, 0.5944276851750107) ,
+ rgb (0.35920088560930186, 0.20226037920758122, 0.5987265295935138) ,
+ rgb (0.36002681809096376, 0.20694122817889948, 0.6029284543191687) ,
+ rgb (0.36080493826624654, 0.21164251793458128, 0.6070353217206471) ,
+ rgb (0.36153829010998356, 0.21636111429594002, 0.6110488067964093) ,
+ rgb (0.36222809558295926, 0.22109488427338303, 0.6149711234609613) ,
+ rgb (0.3628764356004103, 0.2258414929328703, 0.6188041741082302) ,
+ rgb (0.36348537610385145, 0.2305987621839642, 0.6225498862239288) ,
+ rgb (0.3640569302208851, 0.23536470386204195, 0.6262101345195302) ,
+ rgb (0.3645930889012501, 0.24013747024823828, 0.629786801550261) ,
+ rgb (0.3650957984588681, 0.24491536803550484, 0.6332817352005559) ,
+ rgb (0.3655669837353898, 0.24969683475296395, 0.6366967518748858) ,
+ rgb (0.36600853966739794, 0.25448043878086224, 0.6400336180336859) ,
+ rgb (0.3664224325155063, 0.25926481158628106, 0.6432940914076554) ,
+ rgb (0.3668108554010799, 0.26404857724525643, 0.6464799165290824) ,
+ rgb (0.36717513650699446, 0.26883085667326956, 0.6495927229789225) ,
+ rgb (0.36751707094367697, 0.2736106331709098, 0.6526341171161864) ,
+ rgb (0.3678384369653108, 0.2783869718129776, 0.655605668384537) ,
+ rgb (0.3681410147989972, 0.2831590122118299, 0.6585088880697231) ,
+ rgb (0.36842655638020444, 0.2879259643777846, 0.661345269109446) ,
+ rgb (0.3686968223189527, 0.292687098561501, 0.6641162529823691) ,
+ rgb (0.3689535530659678, 0.29744175492366276, 0.6668232208982426) ,
+ rgb (0.36919847837592484, 0.3021893217650707, 0.6694675433161452) ,
+ rgb (0.3694333459127623, 0.3069292355186234, 0.6720505284912062) ,
+ rgb (0.36965987626565955, 0.3116609876295197, 0.6745734474341955) ,
+ rgb (0.3698798032902536, 0.31638410101153364, 0.6770375543809057) ,
+ rgb (0.37009487130772695, 0.3210981375964933, 0.6794440539905685) ,
+ rgb (0.37030682071842685, 0.32580269697872455, 0.6817941168448668) ,
+ rgb (0.37051738634484427, 0.3304974124430785, 0.6840888878885721) ,
+ rgb (0.3707283327942267, 0.33518193808489577, 0.6863294816960677) ,
+ rgb (0.3709415155133733, 0.33985591488818123, 0.6885170337950512) ,
+ rgb (0.37115856636209105, 0.3445191141023017, 0.6906525358646499) ,
+ rgb (0.37138124223736607, 0.34917126878479027, 0.6927370347192883) ,
+ rgb (0.3716113323440048, 0.3538121372967869, 0.6947714991938089) ,
+ rgb (0.3718506155898596, 0.3584414828587522, 0.6967569581025654) ,
+ rgb (0.3721008970244382, 0.3630590973698238, 0.6986943461507372) ,
+ rgb (0.37236397858465387, 0.36766477862108266, 0.7005846349652077) ,
+ rgb (0.37264166757849604, 0.3722583500483685, 0.7024287314570723) ,
+ rgb (0.3729357864666503, 0.3768396383521984, 0.7042275578058994) ,
+ rgb (0.37324816143326384, 0.38140848555753937, 0.7059820097480604) ,
+ rgb (0.3735806215098284, 0.3859647438605754, 0.7076929760731058) ,
+ rgb (0.3739349933047578, 0.3905082752937583, 0.7093613429347845) ,
+ rgb (0.3743131319931234, 0.3950389482828331, 0.7109879652237746) ,
+ rgb (0.3747168601930223, 0.3995566498711684, 0.7125736851650046) ,
+ rgb (0.37514802505380473, 0.4040612609993941, 0.7141193695725726) ,
+ rgb (0.375608469194424, 0.40855267638072096, 0.7156258509158755) ,
+ rgb (0.37610001286385814, 0.4130307995247706, 0.7170939691992023) ,
+ rgb (0.37662448930806297, 0.41749553747893614, 0.7185245473617611) ,
+ rgb (0.3771837184425123, 0.4219468022345483, 0.7199184152447577) ,
+ rgb (0.3777794975351373, 0.4263845142616835, 0.7212763999353023) ,
+ rgb (0.378413635091359, 0.43080859411413064, 0.7225993199306104) ,
+ rgb (0.3790878928311076, 0.43521897612544935, 0.7238879869132313) ,
+ rgb (0.3798040374484875, 0.4396155882122263, 0.7251432377876109) ,
+ rgb (0.3805638069656562, 0.4439983720863372, 0.7263658704513531) ,
+ rgb (0.3813688793045416, 0.4483672766927786, 0.7275567131714135) ,
+ rgb (0.38222094988570376, 0.45272225034283325, 0.7287165614400378) ,
+ rgb (0.3831216808440275, 0.457063235814072, 0.7298462679135326) ,
+ rgb (0.38407269378943537, 0.46139018782416635, 0.7309466543290268) ,
+ rgb (0.3850755679365139, 0.46570306719930193, 0.732018540336905) ,
+ rgb (0.386131841788921, 0.4700018340988123, 0.7330627749243106) ,
+ rgb (0.3872430145933025, 0.4742864593363539, 0.7340801678785439) ,
+ rgb (0.3884105330084243, 0.47855691131792805, 0.7350715764115726) ,
+ rgb (0.38963580160340855, 0.48281316715123496, 0.7360378254693274) ,
+ rgb (0.390920175719949, 0.4870552025122304, 0.7369797713388125) ,
+ rgb (0.39226494876209317, 0.4912830033289926, 0.7378982478447508) ,
+ rgb (0.39367135736822567, 0.4954965577745118, 0.738794102296364) ,
+ rgb (0.3951405880820763, 0.4996958532637776, 0.7396682021171571) ,
+ rgb (0.3966737490566561, 0.5038808905384797, 0.7405213858051674) ,
+ rgb (0.3982719152586337, 0.5080516653927614, 0.7413545091809972) ,
+ rgb (0.39993606933454834, 0.5122081814321852, 0.7421684457131799) ,
+ rgb (0.40166714010896104, 0.5163504496968876, 0.7429640345324835) ,
+ rgb (0.40346600333905397, 0.5204784765384003, 0.7437421522356709) ,
+ rgb (0.4053334378930318, 0.5245922817498312, 0.7445036583670813) ,
+ rgb (0.4072701869421907, 0.5286918801105741, 0.7452494263758127) ,
+ rgb (0.4092768899914751, 0.5327773017713032, 0.7459803063570782) ,
+ rgb (0.4113541469730457, 0.5368485776500593, 0.7466971285506578) ,
+ rgb (0.4135024574331473, 0.5409057477109848, 0.7474007329754309) ,
+ rgb (0.4157223260454232, 0.544948827153504, 0.7480920445900052) ,
+ rgb (0.4180141407923363, 0.5489778542188889, 0.7487719316700112) ,
+ rgb (0.42037822361396326, 0.5529928715810817, 0.7494412559451894) ,
+ rgb (0.4228148567577266, 0.5569939212699658, 0.7501008698822764) ,
+ rgb (0.42532423665011354, 0.560981049599503, 0.7507516498900512) ,
+ rgb (0.42790652284925834, 0.5649543060909209, 0.7513944352191484) ,
+ rgb (0.4305617907305757, 0.5689137457245718, 0.752030080993127) ,
+ rgb (0.43329008867358393, 0.5728594162560667, 0.7526594653256667) ,
+ rgb (0.4360913895835637, 0.5767913799818608, 0.7532834105961016) ,
+ rgb (0.43896563958048396, 0.5807096924109849, 0.7539027620828594) ,
+ rgb (0.441912717666964, 0.5846144110017557, 0.7545183888441067) ,
+ rgb (0.4449324685421538, 0.5885055998308617, 0.7551311041857901) ,
+ rgb (0.4480247093358917, 0.5923833145214658, 0.7557417647410792) ,
+ rgb (0.45118918687617743, 0.5962476205135354, 0.7563512064324664) ,
+ rgb (0.45442563977552913, 0.6000985950385866, 0.7569601366060649) ,
+ rgb (0.45773377230160567, 0.6039363004658646, 0.7575693690185916) ,
+ rgb (0.4611132664702388, 0.607760777169989, 0.7581798643680714) ,
+ rgb (0.4645637671630393, 0.6115720882286415, 0.7587924262302581) ,
+ rgb (0.46808490970531597, 0.6153702869579029, 0.7594078989109274) ,
+ rgb (0.4716762951887709, 0.6191554324288464, 0.7600270922788305) ,
+ rgb (0.47533752394906287, 0.6229275728383581, 0.7606508557181775) ,
+ rgb (0.47906816236197386, 0.6266867625186013, 0.7612800037566242) ,
+ rgb (0.4828677867260272, 0.6304330455306234, 0.761915371498953) ,
+ rgb (0.4867359599430568, 0.6341664625110051, 0.7625578008592404) ,
+ rgb (0.4906722493856122, 0.6378870485884708, 0.7632081276316384) ,
+ rgb (0.4946761847863938, 0.6415948411950443, 0.7638671900213091) ,
+ rgb (0.4987473366135607, 0.6452898684900934, 0.7645357873418008) ,
+ rgb (0.5028853540415561, 0.6489721673409526, 0.7652144671817491) ,
+ rgb (0.5070896957645166, 0.6526417240314645, 0.7659044566083585) ,
+ rgb (0.5113599254160193, 0.6562985398183186, 0.7666066378064533) ,
+ rgb (0.5156955988596057, 0.65994260812898, 0.7673219148959617) ,
+ rgb (0.5200962739223556, 0.6635739143403039, 0.768051194033441) ,
+ rgb (0.5245615147059358, 0.6671924299614223, 0.7687954171423095) ,
+ rgb (0.529090861832473, 0.6707981230280622, 0.7695555229231313) ,
+ rgb (0.533683891477284, 0.6743909370521273, 0.7703325054879735) ,
+ rgb (0.5383401557517628, 0.677970811290954, 0.7711273443905772) ,
+ rgb (0.5430593242401823, 0.6815376725306588, 0.7719407969783508) ,
+ rgb (0.5478409815301863, 0.6850914221850988, 0.7727738647344087) ,
+ rgb (0.5526845058934713, 0.6886319451516638, 0.7736279426902245) ,
+ rgb (0.5575894041960517, 0.6921591145825405, 0.7745041337932782) ,
+ rgb (0.5625551535721934, 0.6956727838162965, 0.7754035914230984) ,
+ rgb (0.5675811785386197, 0.6991727930264627, 0.776327485342753) ,
+ rgb (0.5726668948158774, 0.7026589535425779, 0.7772770268091199) ,
+ rgb (0.5778116438998202, 0.7061310615715398, 0.7782534512102552) ,
+ rgb (0.5830148703693241, 0.7095888767699747, 0.7792578182047659) ,
+ rgb (0.588275797805555, 0.7130321464645814, 0.7802914140563652) ,
+ rgb (0.5935933569683722, 0.7164606049658685, 0.781355882376401) ,
+ rgb (0.5989665814482068, 0.7198739489224673, 0.7824525989934664) ,
+ rgb (0.6043943420027486, 0.7232718614323369, 0.7835829559353559) ,
+ rgb (0.6098754317609306, 0.7266539875975829, 0.7847483573269471) ,
+ rgb (0.6154084641177048, 0.7300199523273969, 0.7859502270675048) ,
+ rgb (0.6209919306481755, 0.733369347989232, 0.7871899462469658) ,
+ rgb (0.6266240202260459, 0.7367017540369944, 0.7884690131633456) ,
+ rgb (0.6323027138710603, 0.740016721601314, 0.7897889276264043) ,
+ rgb (0.6380258682854598, 0.7433137671403319, 0.7911510045957317) ,
+ rgb (0.6437910831099849, 0.7465923800833657, 0.7925565320130605) ,
+ rgb (0.6495957300425348, 0.7498520122194177, 0.7940067402149911) ,
+ rgb (0.6554369232645472, 0.7530920875676843, 0.7955027112903105) ,
+ rgb (0.6613112930078745, 0.7563120270871903, 0.7970456043491897) ,
+ rgb (0.6672147980375281, 0.7595112803730375, 0.7986367465453776) ,
+ rgb (0.6731442255942621, 0.7626890873389048, 0.8002762854580953) ,
+ rgb (0.6790955449988215, 0.765844721313959, 0.8019646617300199) ,
+ rgb (0.6850644615439593, 0.7689774029354699, 0.8037020626717691) ,
+ rgb (0.691046410093091, 0.7720862946067809, 0.8054884169067907) ,
+ rgb (0.6970365443886174, 0.7751705000806606, 0.8073233538006345) ,
+ rgb (0.7030297722540817, 0.7782290497335813, 0.8092061884805697) ,
+ rgb (0.709020781345393, 0.7812608871607091, 0.8111359185511793) ,
+ rgb (0.7150040307625213, 0.7842648709158119, 0.8131111655994991) ,
+ rgb (0.7209728066553678, 0.7872399592345264, 0.8151307392087926) ,
+ rgb (0.726921775128297, 0.7901846863592763, 0.8171921746672638) ,
+ rgb (0.7328454364552346, 0.7930974646884407, 0.8192926338423038) ,
+ rgb (0.7387377170049494, 0.7959766573503101, 0.8214292278043301) ,
+ rgb (0.7445924777189017, 0.7988204771958325, 0.8235986758615652) ,
+ rgb (0.750403467654067, 0.8016269900896532, 0.8257973785108242) ,
+ rgb (0.7561644358438198, 0.8043940873347794, 0.8280213899472) ,
+ rgb (0.7618690793798029, 0.8071194938764749, 0.830266486168872) ,
+ rgb (0.7675110850441786, 0.8098007598713145, 0.8325281663805967) ,
+ rgb (0.7730841659017094, 0.8124352473546601, 0.8348017295057968) ,
+ rgb (0.7785789200822759, 0.8150208937874255, 0.8370834463093898) ,
+ rgb (0.7839910104276492, 0.8175542640053343, 0.8393674746403673) ,
+ rgb (0.7893144556460892, 0.8200321318870201, 0.8416486380471222) ,
+ rgb (0.7945430508923111, 0.8224511622630462, 0.8439218478682798) ,
+ rgb (0.79967075421268, 0.8248078181208093, 0.8461821002957853) ,
+ rgb (0.8046916442981458, 0.8270983878056066, 0.8484244929697402) ,
+ rgb (0.8095999819094809, 0.8293189667350546, 0.8506444160105037) ,
+ rgb (0.8143898212114309, 0.8314655869419785, 0.8528375906214702) ,
+ rgb (0.8190465467793753, 0.8335364929949034, 0.855002062870101) ,
+ rgb (0.8235742968025285, 0.8355248776479544, 0.8571319132851495) ,
+ rgb (0.8279689431601354, 0.837426007513952, 0.8592239945130679) ,
+ rgb (0.8322270571293441, 0.8392349062775448, 0.8612756350042788) ,
+ rgb (0.8363403180919118, 0.8409479651895194, 0.8632852800107016) ,
+ rgb (0.8403042080595778, 0.8425605950855084, 0.865250882410458) ,
+ rgb (0.8441261828674842, 0.8440648271103739, 0.8671697332269007) ,
+ rgb (0.8478071070257792, 0.8454546229209523, 0.8690403678369444) ,
+ rgb (0.8513371457085719, 0.8467273579611647, 0.8708608165735044) ,
+ rgb (0.8547259318925698, 0.8478748812467282, 0.8726282980930582) ,
+ rgb (0.8579825924567037, 0.8488893481028184, 0.8743403855344628) ,
+ rgb (0.8611024543689985, 0.8497675485700126, 0.8759924292343957) ,
+ rgb (0.86408985081464, 0.8505039116750779, 0.8775792578489263) ,
+ rgb (0.8669601550533358, 0.8510896085314068, 0.8790976697717334) ,
+ rgb (0.8697047485350982, 0.8515240300479789, 0.8805388339000336) ,
+ rgb (0.8723313408512408, 0.8518016547808089, 0.8818970435500162) ,
+ rgb (0.8748534750857597, 0.8519152612302319, 0.8831692696761383) ,
+ rgb (0.8772488085896548, 0.8518702833887027, 0.8843412038131143) ,
+ rgb (0.8795410528270573, 0.8516567540749572, 0.8854143767924102) ,
+ rgb (0.8817223105928579, 0.8512759407765347, 0.8863805692551482) ,
+ rgb (0.8837852019553906, 0.8507294054031063, 0.8872322209694989) ,
+ rgb (0.8857501584075443, 0.8500092494306783, 0.8879736506427196) ,
+ rgb (0.8857115512284565, 0.8500218611585632, 0.8857253899008712) ,
+ rgb (0.8855471481195238, 0.8498717428363158, 0.8833620612117095) ,
+ rgb (0.8852589797263047, 0.8495589281098921, 0.8808841479402484) ,
+ rgb (0.8848513815990857, 0.849084264228938, 0.8782823528537247) ,
+ rgb (0.8843271305411354, 0.8484474157205542, 0.8755678522824297) ,
+ rgb (0.8836912714589804, 0.8476489176151927, 0.8727414710144156) ,
+ rgb (0.8829516859544853, 0.8466897027569927, 0.8697961704819097) ,
+ rgb (0.8821154248940161, 0.8455700725455935, 0.8667376504623333) ,
+ rgb (0.8811916987134195, 0.8442906671771735, 0.8635659516866988) ,
+ rgb (0.8801929331569581, 0.8428522482477862, 0.8602739992715663) ,
+ rgb (0.8791324424079277, 0.8412555488447591, 0.8568557229103964) ,
+ rgb (0.8780229843664901, 0.8395016561854007, 0.8533064535245892) ,
+ rgb (0.8768784845161469, 0.8375923807118654, 0.8496137354915025) ,
+ rgb (0.875714587099614, 0.8355302318472394, 0.8457553751902708) ,
+ rgb (0.8745379332026019, 0.8333197294864546, 0.8417192535806901) ,
+ rgb (0.8733517136091627, 0.8309671525127262, 0.8374885100119709) ,
+ rgb (0.8721533197845432, 0.8284805282370967, 0.8330486712880828) ,
+ rgb (0.8709384671729751, 0.8258685788943851, 0.8283849726114961) ,
+ rgb (0.8696913150261381, 0.8231415885956916, 0.8235047668317317) ,
+ rgb (0.8683995469581863, 0.8203087551218152, 0.8184163896312899) ,
+ rgb (0.867053149070485, 0.8173780404191124, 0.813134196269114) ,
+ rgb (0.8656493432560532, 0.8143554406751491, 0.8076697232416455) ,
+ rgb (0.8641834372394103, 0.8112464422465354, 0.8020461269686395) ,
+ rgb (0.8626560105112757, 0.8080552380426153, 0.796282666437655) ,
+ rgb (0.8610711702756552, 0.8047851790981223, 0.7903952966373629) ,
+ rgb (0.8594346370300241, 0.8014392309950078, 0.7843978875138392) ,
+ rgb (0.857756629435049, 0.7980196314271393, 0.778295716672475) ,
+ rgb (0.856040223147254, 0.7945296360155061, 0.7721061003767414) ,
+ rgb (0.8542921961147046, 0.7909719677709199, 0.765838014779141) ,
+ rgb (0.8525190720770844, 0.7873493613354844, 0.7594994148789691) ,
+ rgb (0.8507269702317879, 0.7836645734238389, 0.7530974636118285) ,
+ rgb (0.8489224556311764, 0.7799202140765015, 0.7466371929366437) ,
+ rgb (0.847111955079651, 0.7761188023604716, 0.7401227576280706) ,
+ rgb (0.8452981073195511, 0.7722633860104472, 0.7335636824054149) ,
+ rgb (0.843485292229337, 0.7683566039987018, 0.7269653699897204) ,
+ rgb (0.8416775076684515, 0.7644010120098295, 0.7203329938728462) ,
+ rgb (0.8398783988412087, 0.7603990719977968, 0.7136714781112923) ,
+ rgb (0.8380912347613196, 0.7563531486080863, 0.7069856139021298) ,
+ rgb (0.8363189884473793, 0.7522654895287526, 0.7002799902886496) ,
+ rgb (0.8345656905566583, 0.7481379479992134, 0.6935569764986385) ,
+ rgb (0.8328327718577798, 0.7439727181745988, 0.6868223587464855) ,
+ rgb (0.8311216352909631, 0.7397718464763862, 0.6800812520363146) ,
+ rgb (0.8294340781648147, 0.7355371221572935, 0.6733377200930191) ,
+ rgb (0.8277716072353446, 0.7312702332407809, 0.6665957020468297) ,
+ rgb (0.8261354971058026, 0.7269727551823826, 0.659859001562165) ,
+ rgb (0.8245268129450285, 0.7226461431208888, 0.653131379154226) ,
+ rgb (0.8229463511042843, 0.7182917733129006, 0.6464164243818421) ,
+ rgb (0.8213947205565636, 0.7139109141951604, 0.6397176669767276) ,
+ rgb (0.8198723065045529, 0.7095047497878748, 0.6330385704006711) ,
+ rgb (0.8183793116449822, 0.705074381896351, 0.626382454789333) ,
+ rgb (0.8169157577505589, 0.7006208301478398, 0.6197526063725792) ,
+ rgb (0.8154814662727948, 0.6961450550830809, 0.6131522120932265) ,
+ rgb (0.8140761104699334, 0.6916479479148213, 0.6065843782630862) ,
+ rgb (0.8126992203988149, 0.6871303371461888, 0.600052148204351) ,
+ rgb (0.8113501401176333, 0.6825930154624339, 0.5935584890905076) ,
+ rgb (0.8100280946652069, 0.6780367267397182, 0.5871062690808275) ,
+ rgb (0.8087321917008969, 0.6734621670219452, 0.5806983480557674) ,
+ rgb (0.8074614045096935, 0.6688700095398864, 0.5743374637345958) ,
+ rgb (0.8062146052692706, 0.6642608958528229, 0.5680262917864979) ,
+ rgb (0.804990547908103, 0.6596354502756416, 0.5617674511054698) ,
+ rgb (0.8037879253107763, 0.6549942654947263, 0.5555635086708381) ,
+ rgb (0.8026053114611295, 0.6503379374810385, 0.5494169158460365) ,
+ rgb (0.8014412429256005, 0.6456670345921877, 0.5433300863249918) ,
+ rgb (0.8002941538975398, 0.6409821330674986, 0.5373053518514104) ,
+ rgb (0.7991624518501963, 0.6362837937202919, 0.5313449594256143) ,
+ rgb (0.7980444781513664, 0.6315725822508955, 0.5254510814483478) ,
+ rgb (0.7969385471995161, 0.626849056792967, 0.5196258425240281) ,
+ rgb (0.7958429237958377, 0.6221137880845115, 0.5138712409190979) ,
+ rgb (0.7947558597265404, 0.617367344002207, 0.5081892121310299) ,
+ rgb (0.7936755969866496, 0.6126102933407219, 0.5025816129126943) ,
+ rgb (0.7926003430423745, 0.6078432208703702, 0.4970502062153201) ,
+ rgb (0.7915283284347561, 0.603066705931472, 0.49159667021646397) ,
+ rgb (0.7904577684772788, 0.5982813427706246, 0.48622257801969754) ,
+ rgb (0.7893873776625194, 0.5934875421745599, 0.48092913815357724) ,
+ rgb (0.7883151404562396, 0.5886860017356244, 0.4757179187907608) ,
+ rgb (0.7872390410818835, 0.5838774374455721, 0.47059039582133383) ,
+ rgb (0.7861573713233296, 0.5790624629815756, 0.465547782819184) ,
+ rgb (0.7850684501960684, 0.5742417003617839, 0.46059116206904965) ,
+ rgb (0.7839706083641448, 0.5694157832671042, 0.4557215474289206) ,
+ rgb (0.7828622526444091, 0.5645853311116688, 0.45093985823706345) ,
+ rgb (0.7817418047898184, 0.5597509805259486, 0.44624687186865436) ,
+ rgb (0.7806077474948377, 0.5549133574489061, 0.4416433242636464) ,
+ rgb (0.7794586273150664, 0.5500730841397727, 0.4371297985644476) ,
+ rgb (0.7782934580763312, 0.545230594884266, 0.432706647838971) ,
+ rgb (0.7771103295521099, 0.5403867491056124, 0.4283745037125848) ,
+ rgb (0.775907907306857, 0.5355421788246119, 0.42413367909988375) ,
+ rgb (0.774684947460632, 0.5306974938477673, 0.4199844035696376) ,
+ rgb (0.7734402182988989, 0.5258533209345156, 0.41592679539764366) ,
+ rgb (0.7721725722960555, 0.5210102658711383, 0.4119608998712287) ,
+ rgb (0.7708809196230247, 0.516168926434691, 0.40808667584648967) ,
+ rgb (0.7695642334401418, 0.5113298901696085, 0.4043039806968248) ,
+ rgb (0.768221765997353, 0.5064936237128791, 0.40061257089416885) ,
+ rgb (0.7668522895064389, 0.5016608471009063, 0.39701221751773474) ,
+ rgb (0.7654549259333051, 0.4968321290972723, 0.3935025400011538) ,
+ rgb (0.7640288560928866, 0.49200802533379656, 0.39008308392311997) ,
+ rgb (0.7625733355405261, 0.48718906673415824, 0.38675335037837993) ,
+ rgb (0.7610876378057071, 0.48237579130289127, 0.3835127572385229) ,
+ rgb (0.7595711110534006, 0.4775687122205708, 0.380360657784311) ,
+ rgb (0.7580232553845584, 0.4727682731566229, 0.3772963553109668) ,
+ rgb (0.7564434157714071, 0.4679750143794846, 0.37431909037543515) ,
+ rgb (0.7548310506695954, 0.46318942799460555, 0.3714280448394211) ,
+ rgb (0.7531856636904657, 0.45841199172949604, 0.3686223664223477) ,
+ rgb (0.7515068504589166, 0.45364314496866825, 0.36590112443835765) ,
+ rgb (0.7497942054717047, 0.4488833348154881, 0.3632633755836028) ,
+ rgb (0.7480473927555956, 0.44413297780351974, 0.36070813602540136) ,
+ rgb (0.7462661578916344, 0.439392450449735, 0.3582343914230064) ,
+ rgb (0.7444501867657067, 0.4346621718461711, 0.35584108091122535) ,
+ rgb (0.7425992159973317, 0.42994254036133867, 0.3535270924537459) ,
+ rgb (0.7407130161950609, 0.4252339389526239, 0.35129130890802607) ,
+ rgb (0.7387914002459927, 0.4205367299231533, 0.34913260148542435) ,
+ rgb (0.7368342217358587, 0.4158512585029011, 0.347049785207584) ,
+ rgb (0.7348413359856494, 0.4111778700451951, 0.3450416947080907) ,
+ rgb (0.7328127050626875, 0.4065168468778026, 0.3431071517341082) ,
+ rgb (0.7307482075484517, 0.401868526884681, 0.3412449533046818) ,
+ rgb (0.7286477385671655, 0.39723324476747235, 0.33945384341064017) ,
+ rgb (0.7265112290022755, 0.3926113126792577, 0.3377325942005665) ,
+ rgb (0.7243386564778159, 0.38800301593162145, 0.3360799596569183) ,
+ rgb (0.7221299918421461, 0.3834086450896306, 0.33449469983585844) ,
+ rgb (0.7198852149054985, 0.37882848839337313, 0.332975552002454) ,
+ rgb (0.7176044490813385, 0.3742627271068619, 0.3315213862095893) ,
+ rgb (0.7152876061484729, 0.3697117022522345, 0.3301308728723546) ,
+ rgb (0.7129346683977347, 0.36517570519856757, 0.3288027427038317) ,
+ rgb (0.7105456546582587, 0.36065500290840113, 0.3275357416278876) ,
+ rgb (0.7081205956842048, 0.356149855233803, 0.32632861885644465) ,
+ rgb (0.7056595112261009, 0.3516605297812094, 0.32518014084085567) ,
+ rgb (0.7031624945881415, 0.34718723719598, 0.32408913679491225) ,
+ rgb (0.700629624772421, 0.34273019305341756, 0.32305449047765694) ,
+ rgb (0.6980608153581771, 0.3382897632604862, 0.3220747885521809) ,
+ rgb (0.6954560834689112, 0.33386622163232865, 0.3211488430698579) ,
+ rgb (0.6928154484676493, 0.32945984647042675, 0.3202754315314667) ,
+ rgb (0.6901389321505248, 0.32507091815606004, 0.319453323328983) ,
+ rgb (0.6874265643516962, 0.32069970535138104, 0.3186813762227769) ,
+ rgb (0.6846785094249453, 0.3163463482122221, 0.31795870784057567) ,
+ rgb (0.6818945715094452, 0.31201133280550686, 0.3172838048924495) ,
+ rgb (0.6790747402815734, 0.30769497879760166, 0.31665545668946665) ,
+ rgb (0.6762189792440975, 0.30339762792450425, 0.3160724937230589) ,
+ rgb (0.6733272556481733, 0.29911962764489264, 0.3155337232398221) ,
+ rgb (0.670399595476762, 0.29486126309253047, 0.3150381395687221) ,
+ rgb (0.6674360376636913, 0.29062280081258873, 0.31458483752056837) ,
+ rgb (0.6644363246987884, 0.2864048361425618, 0.31417223403606975) ,
+ rgb (0.6614003753260178, 0.28220778870555907, 0.3137991292649849) ,
+ rgb (0.6583280801134499, 0.2780321095766563, 0.3134643447952643) ,
+ rgb (0.6552193260932713, 0.2738782665241015, 0.3131666792687211) ,
+ rgb (0.652074172902773, 0.269746505252367, 0.3129056060581917) ,
+ rgb (0.6488923016945825, 0.2656375533620908, 0.3126794181957019) ,
+ rgb (0.6456734938264543, 0.2615520316161528, 0.31248673753935263) ,
+ rgb (0.642417577481186, 0.257490519876798, 0.31232631707560987) ,
+ rgb (0.6391243387840212, 0.2534536546198314, 0.3121968961206398) ,
+ rgb (0.6357937104834237, 0.24944185818822678, 0.3120979395330059) ,
+ rgb (0.6324253485421027, 0.24545598775548677, 0.3120276597462445) ,
+ rgb (0.6290189201698587, 0.24149689191922535, 0.3119844719564572) ,
+ rgb (0.6255741650043496, 0.23756535071152696, 0.3119669831491227) ,
+ rgb (0.6220907982108261, 0.2336621873300741, 0.3119738327362739) ,
+ rgb (0.6185686525887719, 0.2297879924917992, 0.3120046383872893) ,
+ rgb (0.6150072323639137, 0.22594402043981826, 0.3120568068576574) ,
+ rgb (0.6114062072731884, 0.22213124697023234, 0.3121288139643524) ,
+ rgb (0.6077652399481865, 0.21835070166659282, 0.312219032918702) ,
+ rgb (0.6040840169673274, 0.21460331490206347, 0.31232652641170694) ,
+ rgb (0.6003621301041158, 0.21089030138947745, 0.3124493441041469) ,
+ rgb (0.5965991810912237, 0.207212956082026, 0.3125852303112123) ,
+ rgb (0.5927948053652026, 0.20357251410079796, 0.3127323483930494) ,
+ rgb (0.5889486193554471, 0.19997020971775276, 0.31288922211590126) ,
+ rgb (0.5850602439646688, 0.19640737049066315, 0.3130540116373273) ,
+ rgb (0.5811293276158656, 0.19288548904692518, 0.3132239939418394) ,
+ rgb (0.5771555081299204, 0.18940601489760422, 0.3133970433357208) ,
+ rgb (0.5731384575410787, 0.18597036007065024, 0.3135712686852) ,
+ rgb (0.5690778478401143, 0.18258004462335425, 0.3137444095679653) ,
+ rgb (0.564973435290177, 0.17923664950367169, 0.3139136046337036) ,
+ rgb (0.5608249903911717, 0.17594170887918095, 0.31407639883970623) ,
+ rgb (0.5566322903496934, 0.17269677158182117, 0.31423043195101424) ,
+ rgb (0.5523952157271191, 0.16950338809328983, 0.3143729155461537) ,
+ rgb (0.5481137003346762, 0.1663630904279047, 0.3145010299091471) ,
+ rgb (0.5437877131360856, 0.16327738551419116, 0.31461204226295625) ,
+ rgb (0.5394173664919906, 0.16024769309971934, 0.31470295028655965) ,
+ rgb (0.5350027976174474, 0.15727540775107324, 0.3147708520739653) ,
+ rgb (0.5305442048985645, 0.15436183633886777, 0.3148129978918713) ,
+ rgb (0.5260418962547748, 0.15150818660835483, 0.31482653406646727) ,
+ rgb (0.5214965286322996, 0.14871544765633712, 0.3148076795453443) ,
+ rgb (0.5169084880054446, 0.14598463068714407, 0.3147540759228004) ,
+ rgb (0.5122783510532176, 0.14331656120063752, 0.3146630922831542) ,
+ rgb (0.5076068118105369, 0.14071192654913128, 0.3145320012008257) ,
+ rgb (0.5028952497497061, 0.13817086581280427, 0.3143566215383367) ,
+ rgb (0.4981443546207415, 0.13569380302451714, 0.314135190862664) ,
+ rgb (0.49335504375145617, 0.13328091630401023, 0.31386561956734976) ,
+ rgb (0.48852847371852987, 0.13093210934893723, 0.31354553695453014) ,
+ rgb (0.48366628618847957, 0.1286467902201389, 0.31317188565991266) ,
+ rgb (0.47877034239726296, 0.12642401401409453, 0.3127417273582196) ,
+ rgb (0.473841437035254, 0.12426354237989065, 0.31225470169927194) ,
+ rgb (0.46888111384598413, 0.12216445576414045, 0.31170911458932665) ,
+ rgb (0.46389102840284874, 0.12012561256850712, 0.31110343446582983) ,
+ rgb (0.45887288947308297, 0.11814571137706886, 0.3104363697903881) ,
+ rgb (0.4538300508699989, 0.11622183788331528, 0.3097044124984492) ,
+ rgb (0.4487629917317482, 0.1143535557462255, 0.30890905921943196) ,
+ rgb (0.44367358645071275, 0.11253912421257944, 0.3080497309546545) ,
+ rgb (0.4385637818793154, 0.11077667828375456, 0.30712600062348083) ,
+ rgb (0.4334355841041439, 0.1090642347484701, 0.3061376792828915) ,
+ rgb (0.4282910131578975, 0.1073997763055258, 0.30508479060294547) ,
+ rgb (0.42313214269556043, 0.10578120994917611, 0.3039675809469457) ,
+ rgb (0.41796105205173684, 0.10420644885760968, 0.3027865203963184) ,
+ rgb (0.41277985630360303, 0.1026734006932461, 0.3015422643746897) ,
+ rgb (0.4075912039268871, 0.10117945586419633, 0.300235195077286) ,
+ rgb (0.40239692379737496, 0.09972293031495055, 0.2988667436973397) ,
+ rgb (0.39719876876325577, 0.09830232096827862, 0.2974385647628578) ,
+ rgb (0.39199887556812907, 0.09691583650296684, 0.2959521200550908) ,
+ rgb (0.3867993907954417, 0.09556181960083443, 0.29440901248173756) ,
+ rgb (0.38160247377467543, 0.09423873126371218, 0.2928110750626949) ,
+ rgb (0.3764103053221462, 0.09294519809377791, 0.2911602415731392) ,
+ rgb (0.3712250843130934, 0.09167999748026273, 0.2894586539763317) ,
+ rgb (0.36605031412464006, 0.0904406854276979, 0.2877077458811747) ,
+ rgb (0.36088752387578377, 0.0892271943627452, 0.28591050458531014) ,
+ rgb (0.35573889947341125, 0.08803897435024335, 0.2840695897279818) ,
+ rgb (0.3506067824603248, 0.08687555176033529, 0.28218770540182386) ,
+ rgb (0.345493557138718, 0.08573665496512634, 0.28026769921081435) ,
+ rgb (0.34040164359597463, 0.08462223619170267, 0.27831254595259397) ,
+ rgb (0.3353335322445545, 0.08353243411900396, 0.2763253435679004) ,
+ rgb (0.3302917447118144, 0.08246763389003825, 0.27430929404579435) ,
+ rgb (0.3252788886040126, 0.08142839007654609, 0.27226772884656186) ,
+ rgb (0.3202998655799406, 0.08041299473755484, 0.2702032289303951) ,
+ rgb (0.3153587000920581, 0.07942099731524319, 0.2681190407694196) ,
+ rgb (0.31045520848595526, 0.07845687167618218, 0.2660200572779356) ,
+ rgb (0.30559226007249934, 0.07752196310753731, 0.2639100669211966) ,
+ rgb (0.3007727681291869, 0.07661782433616476, 0.2617929409781967) ,
+ rgb (0.2960004726065818, 0.07574533600095842, 0.25967245030364566) ,
+ rgb (0.29128515387578635, 0.0748990498474667, 0.25755101595750435) ,
+ rgb (0.28662309235899847, 0.07408846082680887, 0.2554347867371703) ,
+ rgb (0.2820174629736694, 0.07331569321404097, 0.25332800295084507) ,
+ rgb (0.277471508091428, 0.07258296989925478, 0.2512349399594277) ,
+ rgb (0.272997015188973, 0.07188355544616351, 0.2491584709323293) ,
+ rgb (0.2685909594817286, 0.07122671627792246, 0.24710443563450618) ,
+ rgb (0.2642551220706094, 0.07061659562299544, 0.24507758869355967) ,
+ rgb (0.25999463887892144, 0.07005385560386188, 0.24308218808684579) ,
+ rgb (0.2558213554748177, 0.06953231029187984, 0.24112190491594204) ,
+ rgb (0.25172899728289466, 0.0690646308260355, 0.23920260612763083) ,
+ rgb (0.247720929905011, 0.06865333790948652, 0.2373288009471749) ,
+ rgb (0.2438114972024792, 0.06828985152901187, 0.23550427698321885) ,
+ rgb (0.23999586188690308, 0.06798502996477995, 0.23373434258507808) ,
+ rgb (0.23627495835774248, 0.06774359820987802, 0.23202360805926608) ,
+ rgb (0.23266299920501882, 0.06755710438847978, 0.23037617493752832) ,
+ rgb (0.2291562027859284, 0.06743473087115257, 0.22879681433956656) ,
+ rgb (0.2257539681670791, 0.06738213230014747, 0.22728984778098055) ,
+ rgb (0.22247308588973624, 0.06738821405309284, 0.22585960379408354) ,
+ rgb (0.21930503925136402, 0.06746578636294004, 0.22451023616807558) ,
+ rgb (0.21625279838647882, 0.06761633027051639, 0.22324568672294431) ,
+ rgb (0.2133313859647627, 0.06783014842602667, 0.2220704321302429) ,
+ rgb (0.21052882914958676, 0.06812195249816172, 0.22098759107715404) ,
+ rgb (0.20785704662965598, 0.06848439879702528, 0.22000133917653536) ,
+ rgb (0.20531725273301316, 0.06891959226639757, 0.21911516689288835) ,
+ rgb (0.20290365333558247, 0.06943524858045896, 0.21833167885096033) ,
+ rgb (0.20058760685133747, 0.07006457614998421, 0.21762721310371608) ,
+ rgb (0.19819343656336558, 0.07097462525273879, 0.21690975060032436) ,
+ rgb (0.19571853588267552, 0.07215778103960274, 0.21617499187076789) ,
+ rgb (0.1931548636579131, 0.07360681904011795, 0.21542362939081539) ,
+ rgb (0.19049578401722037, 0.07531127841678764, 0.2146562337112265) ,
+ rgb (0.18774482037046955, 0.07725158846803931, 0.21387448578597812) ,
+ rgb (0.18488035509396164, 0.07942573027972388, 0.21307651648984993)
+ });
list_data viridis = list_data(new pen[] {
- rgb (0.267004, 0.004874, 0.329415) ,
- rgb (0.26851, 0.009605, 0.335427) ,
- rgb (0.269944, 0.014625, 0.341379) ,
- rgb (0.271305, 0.019942, 0.347269) ,
- rgb (0.272594, 0.025563, 0.353093) ,
- rgb (0.273809, 0.031497, 0.358853) ,
- rgb (0.274952, 0.037752, 0.364543) ,
- rgb (0.276022, 0.044167, 0.370164) ,
- rgb (0.277018, 0.050344, 0.375715) ,
- rgb (0.277941, 0.056324, 0.381191) ,
- rgb (0.278791, 0.062145, 0.386592) ,
- rgb (0.279566, 0.067836, 0.391917) ,
- rgb (0.280267, 0.073417, 0.397163) ,
- rgb (0.280894, 0.078907, 0.402329) ,
- rgb (0.281446, 0.08432, 0.407414) ,
- rgb (0.281924, 0.089666, 0.412415) ,
- rgb (0.282327, 0.094955, 0.417331) ,
- rgb (0.282656, 0.100196, 0.42216) ,
- rgb (0.28291, 0.105393, 0.426902) ,
- rgb (0.283091, 0.110553, 0.431554) ,
- rgb (0.283197, 0.11568, 0.436115) ,
- rgb (0.283229, 0.120777, 0.440584) ,
- rgb (0.283187, 0.125848, 0.44496) ,
- rgb (0.283072, 0.130895, 0.449241) ,
- rgb (0.282884, 0.13592, 0.453427) ,
- rgb (0.282623, 0.140926, 0.457517) ,
- rgb (0.28229, 0.145912, 0.46151) ,
- rgb (0.281887, 0.150881, 0.465405) ,
- rgb (0.281412, 0.155834, 0.469201) ,
- rgb (0.280868, 0.160771, 0.472899) ,
- rgb (0.280255, 0.165693, 0.476498) ,
- rgb (0.279574, 0.170599, 0.479997) ,
- rgb (0.278826, 0.17549, 0.483397) ,
- rgb (0.278012, 0.180367, 0.486697) ,
- rgb (0.277134, 0.185228, 0.489898) ,
- rgb (0.276194, 0.190074, 0.493001) ,
- rgb (0.275191, 0.194905, 0.496005) ,
- rgb (0.274128, 0.199721, 0.498911) ,
- rgb (0.273006, 0.20452, 0.501721) ,
- rgb (0.271828, 0.209303, 0.504434) ,
- rgb (0.270595, 0.214069, 0.507052) ,
- rgb (0.269308, 0.218818, 0.509577) ,
- rgb (0.267968, 0.223549, 0.512008) ,
- rgb (0.26658, 0.228262, 0.514349) ,
- rgb (0.265145, 0.232956, 0.516599) ,
- rgb (0.263663, 0.237631, 0.518762) ,
- rgb (0.262138, 0.242286, 0.520837) ,
- rgb (0.260571, 0.246922, 0.522828) ,
- rgb (0.258965, 0.251537, 0.524736) ,
- rgb (0.257322, 0.25613, 0.526563) ,
- rgb (0.255645, 0.260703, 0.528312) ,
- rgb (0.253935, 0.265254, 0.529983) ,
- rgb (0.252194, 0.269783, 0.531579) ,
- rgb (0.250425, 0.27429, 0.533103) ,
- rgb (0.248629, 0.278775, 0.534556) ,
- rgb (0.246811, 0.283237, 0.535941) ,
- rgb (0.244972, 0.287675, 0.53726) ,
- rgb (0.243113, 0.292092, 0.538516) ,
- rgb (0.241237, 0.296485, 0.539709) ,
- rgb (0.239346, 0.300855, 0.540844) ,
- rgb (0.237441, 0.305202, 0.541921) ,
- rgb (0.235526, 0.309527, 0.542944) ,
- rgb (0.233603, 0.313828, 0.543914) ,
- rgb (0.231674, 0.318106, 0.544834) ,
- rgb (0.229739, 0.322361, 0.545706) ,
- rgb (0.227802, 0.326594, 0.546532) ,
- rgb (0.225863, 0.330805, 0.547314) ,
- rgb (0.223925, 0.334994, 0.548053) ,
- rgb (0.221989, 0.339161, 0.548752) ,
- rgb (0.220057, 0.343307, 0.549413) ,
- rgb (0.21813, 0.347432, 0.550038) ,
- rgb (0.21621, 0.351535, 0.550627) ,
- rgb (0.214298, 0.355619, 0.551184) ,
- rgb (0.212395, 0.359683, 0.55171) ,
- rgb (0.210503, 0.363727, 0.552206) ,
- rgb (0.208623, 0.367752, 0.552675) ,
- rgb (0.206756, 0.371758, 0.553117) ,
- rgb (0.204903, 0.375746, 0.553533) ,
- rgb (0.203063, 0.379716, 0.553925) ,
- rgb (0.201239, 0.38367, 0.554294) ,
- rgb (0.19943, 0.387607, 0.554642) ,
- rgb (0.197636, 0.391528, 0.554969) ,
- rgb (0.19586, 0.395433, 0.555276) ,
- rgb (0.1941, 0.399323, 0.555565) ,
- rgb (0.192357, 0.403199, 0.555836) ,
- rgb (0.190631, 0.407061, 0.556089) ,
- rgb (0.188923, 0.41091, 0.556326) ,
- rgb (0.187231, 0.414746, 0.556547) ,
- rgb (0.185556, 0.41857, 0.556753) ,
- rgb (0.183898, 0.422383, 0.556944) ,
- rgb (0.182256, 0.426184, 0.55712) ,
- rgb (0.180629, 0.429975, 0.557282) ,
- rgb (0.179019, 0.433756, 0.55743) ,
- rgb (0.177423, 0.437527, 0.557565) ,
- rgb (0.175841, 0.44129, 0.557685) ,
- rgb (0.174274, 0.445044, 0.557792) ,
- rgb (0.172719, 0.448791, 0.557885) ,
- rgb (0.171176, 0.45253, 0.557965) ,
- rgb (0.169646, 0.456262, 0.55803) ,
- rgb (0.168126, 0.459988, 0.558082) ,
- rgb (0.166617, 0.463708, 0.558119) ,
- rgb (0.165117, 0.467423, 0.558141) ,
- rgb (0.163625, 0.471133, 0.558148) ,
- rgb (0.162142, 0.474838, 0.55814) ,
- rgb (0.160665, 0.47854, 0.558115) ,
- rgb (0.159194, 0.482237, 0.558073) ,
- rgb (0.157729, 0.485932, 0.558013) ,
- rgb (0.15627, 0.489624, 0.557936) ,
- rgb (0.154815, 0.493313, 0.55784) ,
- rgb (0.153364, 0.497, 0.557724) ,
- rgb (0.151918, 0.500685, 0.557587) ,
- rgb (0.150476, 0.504369, 0.55743) ,
- rgb (0.149039, 0.508051, 0.55725) ,
- rgb (0.147607, 0.511733, 0.557049) ,
- rgb (0.14618, 0.515413, 0.556823) ,
- rgb (0.144759, 0.519093, 0.556572) ,
- rgb (0.143343, 0.522773, 0.556295) ,
- rgb (0.141935, 0.526453, 0.555991) ,
- rgb (0.140536, 0.530132, 0.555659) ,
- rgb (0.139147, 0.533812, 0.555298) ,
- rgb (0.13777, 0.537492, 0.554906) ,
- rgb (0.136408, 0.541173, 0.554483) ,
- rgb (0.135066, 0.544853, 0.554029) ,
- rgb (0.133743, 0.548535, 0.553541) ,
- rgb (0.132444, 0.552216, 0.553018) ,
- rgb (0.131172, 0.555899, 0.552459) ,
- rgb (0.129933, 0.559582, 0.551864) ,
- rgb (0.128729, 0.563265, 0.551229) ,
- rgb (0.127568, 0.566949, 0.550556) ,
- rgb (0.126453, 0.570633, 0.549841) ,
- rgb (0.125394, 0.574318, 0.549086) ,
- rgb (0.124395, 0.578002, 0.548287) ,
- rgb (0.123463, 0.581687, 0.547445) ,
- rgb (0.122606, 0.585371, 0.546557) ,
- rgb (0.121831, 0.589055, 0.545623) ,
- rgb (0.121148, 0.592739, 0.544641) ,
- rgb (0.120565, 0.596422, 0.543611) ,
- rgb (0.120092, 0.600104, 0.54253) ,
- rgb (0.119738, 0.603785, 0.5414) ,
- rgb (0.119512, 0.607464, 0.540218) ,
- rgb (0.119423, 0.611141, 0.538982) ,
- rgb (0.119483, 0.614817, 0.537692) ,
- rgb (0.119699, 0.61849, 0.536347) ,
- rgb (0.120081, 0.622161, 0.534946) ,
- rgb (0.120638, 0.625828, 0.533488) ,
- rgb (0.12138, 0.629492, 0.531973) ,
- rgb (0.122312, 0.633153, 0.530398) ,
- rgb (0.123444, 0.636809, 0.528763) ,
- rgb (0.12478, 0.640461, 0.527068) ,
- rgb (0.126326, 0.644107, 0.525311) ,
- rgb (0.128087, 0.647749, 0.523491) ,
- rgb (0.130067, 0.651384, 0.521608) ,
- rgb (0.132268, 0.655014, 0.519661) ,
- rgb (0.134692, 0.658636, 0.517649) ,
- rgb (0.137339, 0.662252, 0.515571) ,
- rgb (0.14021, 0.665859, 0.513427) ,
- rgb (0.143303, 0.669459, 0.511215) ,
- rgb (0.146616, 0.67305, 0.508936) ,
- rgb (0.150148, 0.676631, 0.506589) ,
- rgb (0.153894, 0.680203, 0.504172) ,
- rgb (0.157851, 0.683765, 0.501686) ,
- rgb (0.162016, 0.687316, 0.499129) ,
- rgb (0.166383, 0.690856, 0.496502) ,
- rgb (0.170948, 0.694384, 0.493803) ,
- rgb (0.175707, 0.6979, 0.491033) ,
- rgb (0.180653, 0.701402, 0.488189) ,
- rgb (0.185783, 0.704891, 0.485273) ,
- rgb (0.19109, 0.708366, 0.482284) ,
- rgb (0.196571, 0.711827, 0.479221) ,
- rgb (0.202219, 0.715272, 0.476084) ,
- rgb (0.20803, 0.718701, 0.472873) ,
- rgb (0.214, 0.722114, 0.469588) ,
- rgb (0.220124, 0.725509, 0.466226) ,
- rgb (0.226397, 0.728888, 0.462789) ,
- rgb (0.232815, 0.732247, 0.459277) ,
- rgb (0.239374, 0.735588, 0.455688) ,
- rgb (0.24607, 0.73891, 0.452024) ,
- rgb (0.252899, 0.742211, 0.448284) ,
- rgb (0.259857, 0.745492, 0.444467) ,
- rgb (0.266941, 0.748751, 0.440573) ,
- rgb (0.274149, 0.751988, 0.436601) ,
- rgb (0.281477, 0.755203, 0.432552) ,
- rgb (0.288921, 0.758394, 0.428426) ,
- rgb (0.296479, 0.761561, 0.424223) ,
- rgb (0.304148, 0.764704, 0.419943) ,
- rgb (0.311925, 0.767822, 0.415586) ,
- rgb (0.319809, 0.770914, 0.411152) ,
- rgb (0.327796, 0.77398, 0.40664) ,
- rgb (0.335885, 0.777018, 0.402049) ,
- rgb (0.344074, 0.780029, 0.397381) ,
- rgb (0.35236, 0.783011, 0.392636) ,
- rgb (0.360741, 0.785964, 0.387814) ,
- rgb (0.369214, 0.788888, 0.382914) ,
- rgb (0.377779, 0.791781, 0.377939) ,
- rgb (0.386433, 0.794644, 0.372886) ,
- rgb (0.395174, 0.797475, 0.367757) ,
- rgb (0.404001, 0.800275, 0.362552) ,
- rgb (0.412913, 0.803041, 0.357269) ,
- rgb (0.421908, 0.805774, 0.35191) ,
- rgb (0.430983, 0.808473, 0.346476) ,
- rgb (0.440137, 0.811138, 0.340967) ,
- rgb (0.449368, 0.813768, 0.335384) ,
- rgb (0.458674, 0.816363, 0.329727) ,
- rgb (0.468053, 0.818921, 0.323998) ,
- rgb (0.477504, 0.821444, 0.318195) ,
- rgb (0.487026, 0.823929, 0.312321) ,
- rgb (0.496615, 0.826376, 0.306377) ,
- rgb (0.506271, 0.828786, 0.300362) ,
- rgb (0.515992, 0.831158, 0.294279) ,
- rgb (0.525776, 0.833491, 0.288127) ,
- rgb (0.535621, 0.835785, 0.281908) ,
- rgb (0.545524, 0.838039, 0.275626) ,
- rgb (0.555484, 0.840254, 0.269281) ,
- rgb (0.565498, 0.84243, 0.262877) ,
- rgb (0.575563, 0.844566, 0.256415) ,
- rgb (0.585678, 0.846661, 0.249897) ,
- rgb (0.595839, 0.848717, 0.243329) ,
- rgb (0.606045, 0.850733, 0.236712) ,
- rgb (0.616293, 0.852709, 0.230052) ,
- rgb (0.626579, 0.854645, 0.223353) ,
- rgb (0.636902, 0.856542, 0.21662) ,
- rgb (0.647257, 0.8584, 0.209861) ,
- rgb (0.657642, 0.860219, 0.203082) ,
- rgb (0.668054, 0.861999, 0.196293) ,
- rgb (0.678489, 0.863742, 0.189503) ,
- rgb (0.688944, 0.865448, 0.182725) ,
- rgb (0.699415, 0.867117, 0.175971) ,
- rgb (0.709898, 0.868751, 0.169257) ,
- rgb (0.720391, 0.87035, 0.162603) ,
- rgb (0.730889, 0.871916, 0.156029) ,
- rgb (0.741388, 0.873449, 0.149561) ,
- rgb (0.751884, 0.874951, 0.143228) ,
- rgb (0.762373, 0.876424, 0.137064) ,
- rgb (0.772852, 0.877868, 0.131109) ,
- rgb (0.783315, 0.879285, 0.125405) ,
- rgb (0.79376, 0.880678, 0.120005) ,
- rgb (0.804182, 0.882046, 0.114965) ,
- rgb (0.814576, 0.883393, 0.110347) ,
- rgb (0.82494, 0.88472, 0.106217) ,
- rgb (0.83527, 0.886029, 0.102646) ,
- rgb (0.845561, 0.887322, 0.099702) ,
- rgb (0.85581, 0.888601, 0.097452) ,
- rgb (0.866013, 0.889868, 0.095953) ,
- rgb (0.876168, 0.891125, 0.09525) ,
- rgb (0.886271, 0.892374, 0.095374) ,
- rgb (0.89632, 0.893616, 0.096335) ,
- rgb (0.906311, 0.894855, 0.098125) ,
- rgb (0.916242, 0.896091, 0.100717) ,
- rgb (0.926106, 0.89733, 0.104071) ,
- rgb (0.935904, 0.89857, 0.108131) ,
- rgb (0.945636, 0.899815, 0.112838) ,
- rgb (0.9553, 0.901065, 0.118128) ,
- rgb (0.964894, 0.902323, 0.123941) ,
- rgb (0.974417, 0.90359, 0.130215) ,
- rgb (0.983868, 0.904867, 0.136897) ,
- rgb (0.993248, 0.906157, 0.143936)
-});
+ rgb (0.267004, 0.004874, 0.329415) ,
+ rgb (0.26851, 0.009605, 0.335427) ,
+ rgb (0.269944, 0.014625, 0.341379) ,
+ rgb (0.271305, 0.019942, 0.347269) ,
+ rgb (0.272594, 0.025563, 0.353093) ,
+ rgb (0.273809, 0.031497, 0.358853) ,
+ rgb (0.274952, 0.037752, 0.364543) ,
+ rgb (0.276022, 0.044167, 0.370164) ,
+ rgb (0.277018, 0.050344, 0.375715) ,
+ rgb (0.277941, 0.056324, 0.381191) ,
+ rgb (0.278791, 0.062145, 0.386592) ,
+ rgb (0.279566, 0.067836, 0.391917) ,
+ rgb (0.280267, 0.073417, 0.397163) ,
+ rgb (0.280894, 0.078907, 0.402329) ,
+ rgb (0.281446, 0.08432, 0.407414) ,
+ rgb (0.281924, 0.089666, 0.412415) ,
+ rgb (0.282327, 0.094955, 0.417331) ,
+ rgb (0.282656, 0.100196, 0.42216) ,
+ rgb (0.28291, 0.105393, 0.426902) ,
+ rgb (0.283091, 0.110553, 0.431554) ,
+ rgb (0.283197, 0.11568, 0.436115) ,
+ rgb (0.283229, 0.120777, 0.440584) ,
+ rgb (0.283187, 0.125848, 0.44496) ,
+ rgb (0.283072, 0.130895, 0.449241) ,
+ rgb (0.282884, 0.13592, 0.453427) ,
+ rgb (0.282623, 0.140926, 0.457517) ,
+ rgb (0.28229, 0.145912, 0.46151) ,
+ rgb (0.281887, 0.150881, 0.465405) ,
+ rgb (0.281412, 0.155834, 0.469201) ,
+ rgb (0.280868, 0.160771, 0.472899) ,
+ rgb (0.280255, 0.165693, 0.476498) ,
+ rgb (0.279574, 0.170599, 0.479997) ,
+ rgb (0.278826, 0.17549, 0.483397) ,
+ rgb (0.278012, 0.180367, 0.486697) ,
+ rgb (0.277134, 0.185228, 0.489898) ,
+ rgb (0.276194, 0.190074, 0.493001) ,
+ rgb (0.275191, 0.194905, 0.496005) ,
+ rgb (0.274128, 0.199721, 0.498911) ,
+ rgb (0.273006, 0.20452, 0.501721) ,
+ rgb (0.271828, 0.209303, 0.504434) ,
+ rgb (0.270595, 0.214069, 0.507052) ,
+ rgb (0.269308, 0.218818, 0.509577) ,
+ rgb (0.267968, 0.223549, 0.512008) ,
+ rgb (0.26658, 0.228262, 0.514349) ,
+ rgb (0.265145, 0.232956, 0.516599) ,
+ rgb (0.263663, 0.237631, 0.518762) ,
+ rgb (0.262138, 0.242286, 0.520837) ,
+ rgb (0.260571, 0.246922, 0.522828) ,
+ rgb (0.258965, 0.251537, 0.524736) ,
+ rgb (0.257322, 0.25613, 0.526563) ,
+ rgb (0.255645, 0.260703, 0.528312) ,
+ rgb (0.253935, 0.265254, 0.529983) ,
+ rgb (0.252194, 0.269783, 0.531579) ,
+ rgb (0.250425, 0.27429, 0.533103) ,
+ rgb (0.248629, 0.278775, 0.534556) ,
+ rgb (0.246811, 0.283237, 0.535941) ,
+ rgb (0.244972, 0.287675, 0.53726) ,
+ rgb (0.243113, 0.292092, 0.538516) ,
+ rgb (0.241237, 0.296485, 0.539709) ,
+ rgb (0.239346, 0.300855, 0.540844) ,
+ rgb (0.237441, 0.305202, 0.541921) ,
+ rgb (0.235526, 0.309527, 0.542944) ,
+ rgb (0.233603, 0.313828, 0.543914) ,
+ rgb (0.231674, 0.318106, 0.544834) ,
+ rgb (0.229739, 0.322361, 0.545706) ,
+ rgb (0.227802, 0.326594, 0.546532) ,
+ rgb (0.225863, 0.330805, 0.547314) ,
+ rgb (0.223925, 0.334994, 0.548053) ,
+ rgb (0.221989, 0.339161, 0.548752) ,
+ rgb (0.220057, 0.343307, 0.549413) ,
+ rgb (0.21813, 0.347432, 0.550038) ,
+ rgb (0.21621, 0.351535, 0.550627) ,
+ rgb (0.214298, 0.355619, 0.551184) ,
+ rgb (0.212395, 0.359683, 0.55171) ,
+ rgb (0.210503, 0.363727, 0.552206) ,
+ rgb (0.208623, 0.367752, 0.552675) ,
+ rgb (0.206756, 0.371758, 0.553117) ,
+ rgb (0.204903, 0.375746, 0.553533) ,
+ rgb (0.203063, 0.379716, 0.553925) ,
+ rgb (0.201239, 0.38367, 0.554294) ,
+ rgb (0.19943, 0.387607, 0.554642) ,
+ rgb (0.197636, 0.391528, 0.554969) ,
+ rgb (0.19586, 0.395433, 0.555276) ,
+ rgb (0.1941, 0.399323, 0.555565) ,
+ rgb (0.192357, 0.403199, 0.555836) ,
+ rgb (0.190631, 0.407061, 0.556089) ,
+ rgb (0.188923, 0.41091, 0.556326) ,
+ rgb (0.187231, 0.414746, 0.556547) ,
+ rgb (0.185556, 0.41857, 0.556753) ,
+ rgb (0.183898, 0.422383, 0.556944) ,
+ rgb (0.182256, 0.426184, 0.55712) ,
+ rgb (0.180629, 0.429975, 0.557282) ,
+ rgb (0.179019, 0.433756, 0.55743) ,
+ rgb (0.177423, 0.437527, 0.557565) ,
+ rgb (0.175841, 0.44129, 0.557685) ,
+ rgb (0.174274, 0.445044, 0.557792) ,
+ rgb (0.172719, 0.448791, 0.557885) ,
+ rgb (0.171176, 0.45253, 0.557965) ,
+ rgb (0.169646, 0.456262, 0.55803) ,
+ rgb (0.168126, 0.459988, 0.558082) ,
+ rgb (0.166617, 0.463708, 0.558119) ,
+ rgb (0.165117, 0.467423, 0.558141) ,
+ rgb (0.163625, 0.471133, 0.558148) ,
+ rgb (0.162142, 0.474838, 0.55814) ,
+ rgb (0.160665, 0.47854, 0.558115) ,
+ rgb (0.159194, 0.482237, 0.558073) ,
+ rgb (0.157729, 0.485932, 0.558013) ,
+ rgb (0.15627, 0.489624, 0.557936) ,
+ rgb (0.154815, 0.493313, 0.55784) ,
+ rgb (0.153364, 0.497, 0.557724) ,
+ rgb (0.151918, 0.500685, 0.557587) ,
+ rgb (0.150476, 0.504369, 0.55743) ,
+ rgb (0.149039, 0.508051, 0.55725) ,
+ rgb (0.147607, 0.511733, 0.557049) ,
+ rgb (0.14618, 0.515413, 0.556823) ,
+ rgb (0.144759, 0.519093, 0.556572) ,
+ rgb (0.143343, 0.522773, 0.556295) ,
+ rgb (0.141935, 0.526453, 0.555991) ,
+ rgb (0.140536, 0.530132, 0.555659) ,
+ rgb (0.139147, 0.533812, 0.555298) ,
+ rgb (0.13777, 0.537492, 0.554906) ,
+ rgb (0.136408, 0.541173, 0.554483) ,
+ rgb (0.135066, 0.544853, 0.554029) ,
+ rgb (0.133743, 0.548535, 0.553541) ,
+ rgb (0.132444, 0.552216, 0.553018) ,
+ rgb (0.131172, 0.555899, 0.552459) ,
+ rgb (0.129933, 0.559582, 0.551864) ,
+ rgb (0.128729, 0.563265, 0.551229) ,
+ rgb (0.127568, 0.566949, 0.550556) ,
+ rgb (0.126453, 0.570633, 0.549841) ,
+ rgb (0.125394, 0.574318, 0.549086) ,
+ rgb (0.124395, 0.578002, 0.548287) ,
+ rgb (0.123463, 0.581687, 0.547445) ,
+ rgb (0.122606, 0.585371, 0.546557) ,
+ rgb (0.121831, 0.589055, 0.545623) ,
+ rgb (0.121148, 0.592739, 0.544641) ,
+ rgb (0.120565, 0.596422, 0.543611) ,
+ rgb (0.120092, 0.600104, 0.54253) ,
+ rgb (0.119738, 0.603785, 0.5414) ,
+ rgb (0.119512, 0.607464, 0.540218) ,
+ rgb (0.119423, 0.611141, 0.538982) ,
+ rgb (0.119483, 0.614817, 0.537692) ,
+ rgb (0.119699, 0.61849, 0.536347) ,
+ rgb (0.120081, 0.622161, 0.534946) ,
+ rgb (0.120638, 0.625828, 0.533488) ,
+ rgb (0.12138, 0.629492, 0.531973) ,
+ rgb (0.122312, 0.633153, 0.530398) ,
+ rgb (0.123444, 0.636809, 0.528763) ,
+ rgb (0.12478, 0.640461, 0.527068) ,
+ rgb (0.126326, 0.644107, 0.525311) ,
+ rgb (0.128087, 0.647749, 0.523491) ,
+ rgb (0.130067, 0.651384, 0.521608) ,
+ rgb (0.132268, 0.655014, 0.519661) ,
+ rgb (0.134692, 0.658636, 0.517649) ,
+ rgb (0.137339, 0.662252, 0.515571) ,
+ rgb (0.14021, 0.665859, 0.513427) ,
+ rgb (0.143303, 0.669459, 0.511215) ,
+ rgb (0.146616, 0.67305, 0.508936) ,
+ rgb (0.150148, 0.676631, 0.506589) ,
+ rgb (0.153894, 0.680203, 0.504172) ,
+ rgb (0.157851, 0.683765, 0.501686) ,
+ rgb (0.162016, 0.687316, 0.499129) ,
+ rgb (0.166383, 0.690856, 0.496502) ,
+ rgb (0.170948, 0.694384, 0.493803) ,
+ rgb (0.175707, 0.6979, 0.491033) ,
+ rgb (0.180653, 0.701402, 0.488189) ,
+ rgb (0.185783, 0.704891, 0.485273) ,
+ rgb (0.19109, 0.708366, 0.482284) ,
+ rgb (0.196571, 0.711827, 0.479221) ,
+ rgb (0.202219, 0.715272, 0.476084) ,
+ rgb (0.20803, 0.718701, 0.472873) ,
+ rgb (0.214, 0.722114, 0.469588) ,
+ rgb (0.220124, 0.725509, 0.466226) ,
+ rgb (0.226397, 0.728888, 0.462789) ,
+ rgb (0.232815, 0.732247, 0.459277) ,
+ rgb (0.239374, 0.735588, 0.455688) ,
+ rgb (0.24607, 0.73891, 0.452024) ,
+ rgb (0.252899, 0.742211, 0.448284) ,
+ rgb (0.259857, 0.745492, 0.444467) ,
+ rgb (0.266941, 0.748751, 0.440573) ,
+ rgb (0.274149, 0.751988, 0.436601) ,
+ rgb (0.281477, 0.755203, 0.432552) ,
+ rgb (0.288921, 0.758394, 0.428426) ,
+ rgb (0.296479, 0.761561, 0.424223) ,
+ rgb (0.304148, 0.764704, 0.419943) ,
+ rgb (0.311925, 0.767822, 0.415586) ,
+ rgb (0.319809, 0.770914, 0.411152) ,
+ rgb (0.327796, 0.77398, 0.40664) ,
+ rgb (0.335885, 0.777018, 0.402049) ,
+ rgb (0.344074, 0.780029, 0.397381) ,
+ rgb (0.35236, 0.783011, 0.392636) ,
+ rgb (0.360741, 0.785964, 0.387814) ,
+ rgb (0.369214, 0.788888, 0.382914) ,
+ rgb (0.377779, 0.791781, 0.377939) ,
+ rgb (0.386433, 0.794644, 0.372886) ,
+ rgb (0.395174, 0.797475, 0.367757) ,
+ rgb (0.404001, 0.800275, 0.362552) ,
+ rgb (0.412913, 0.803041, 0.357269) ,
+ rgb (0.421908, 0.805774, 0.35191) ,
+ rgb (0.430983, 0.808473, 0.346476) ,
+ rgb (0.440137, 0.811138, 0.340967) ,
+ rgb (0.449368, 0.813768, 0.335384) ,
+ rgb (0.458674, 0.816363, 0.329727) ,
+ rgb (0.468053, 0.818921, 0.323998) ,
+ rgb (0.477504, 0.821444, 0.318195) ,
+ rgb (0.487026, 0.823929, 0.312321) ,
+ rgb (0.496615, 0.826376, 0.306377) ,
+ rgb (0.506271, 0.828786, 0.300362) ,
+ rgb (0.515992, 0.831158, 0.294279) ,
+ rgb (0.525776, 0.833491, 0.288127) ,
+ rgb (0.535621, 0.835785, 0.281908) ,
+ rgb (0.545524, 0.838039, 0.275626) ,
+ rgb (0.555484, 0.840254, 0.269281) ,
+ rgb (0.565498, 0.84243, 0.262877) ,
+ rgb (0.575563, 0.844566, 0.256415) ,
+ rgb (0.585678, 0.846661, 0.249897) ,
+ rgb (0.595839, 0.848717, 0.243329) ,
+ rgb (0.606045, 0.850733, 0.236712) ,
+ rgb (0.616293, 0.852709, 0.230052) ,
+ rgb (0.626579, 0.854645, 0.223353) ,
+ rgb (0.636902, 0.856542, 0.21662) ,
+ rgb (0.647257, 0.8584, 0.209861) ,
+ rgb (0.657642, 0.860219, 0.203082) ,
+ rgb (0.668054, 0.861999, 0.196293) ,
+ rgb (0.678489, 0.863742, 0.189503) ,
+ rgb (0.688944, 0.865448, 0.182725) ,
+ rgb (0.699415, 0.867117, 0.175971) ,
+ rgb (0.709898, 0.868751, 0.169257) ,
+ rgb (0.720391, 0.87035, 0.162603) ,
+ rgb (0.730889, 0.871916, 0.156029) ,
+ rgb (0.741388, 0.873449, 0.149561) ,
+ rgb (0.751884, 0.874951, 0.143228) ,
+ rgb (0.762373, 0.876424, 0.137064) ,
+ rgb (0.772852, 0.877868, 0.131109) ,
+ rgb (0.783315, 0.879285, 0.125405) ,
+ rgb (0.79376, 0.880678, 0.120005) ,
+ rgb (0.804182, 0.882046, 0.114965) ,
+ rgb (0.814576, 0.883393, 0.110347) ,
+ rgb (0.82494, 0.88472, 0.106217) ,
+ rgb (0.83527, 0.886029, 0.102646) ,
+ rgb (0.845561, 0.887322, 0.099702) ,
+ rgb (0.85581, 0.888601, 0.097452) ,
+ rgb (0.866013, 0.889868, 0.095953) ,
+ rgb (0.876168, 0.891125, 0.09525) ,
+ rgb (0.886271, 0.892374, 0.095374) ,
+ rgb (0.89632, 0.893616, 0.096335) ,
+ rgb (0.906311, 0.894855, 0.098125) ,
+ rgb (0.916242, 0.896091, 0.100717) ,
+ rgb (0.926106, 0.89733, 0.104071) ,
+ rgb (0.935904, 0.89857, 0.108131) ,
+ rgb (0.945636, 0.899815, 0.112838) ,
+ rgb (0.9553, 0.901065, 0.118128) ,
+ rgb (0.964894, 0.902323, 0.123941) ,
+ rgb (0.974417, 0.90359, 0.130215) ,
+ rgb (0.983868, 0.904867, 0.136897) ,
+ rgb (0.993248, 0.906157, 0.143936)
+ });
diff --git a/Build/source/utils/asymptote/base/contour.asy b/Build/source/utils/asymptote/base/contour.asy
index fbb4cd1c71a..f2ee0e78fec 100644
--- a/Build/source/utils/asymptote/base/contour.asy
+++ b/Build/source/utils/asymptote/base/contour.asy
@@ -1,10 +1,10 @@
// Contour routines written by Radoslav Marinov and John Bowman.
-
+
import graph_settings;
real eps=10000*realEpsilon;
-// 1
+// 1
// 6 +-------------------+ 5
// | \ / |
// | \ / |
@@ -16,7 +16,7 @@ real eps=10000*realEpsilon;
// | / \ |
// | / \ |
// 7 +-------------------+ 4 or 8
-// 3
+// 3
private struct segment
{
@@ -76,11 +76,11 @@ private segment case3(pair p0, pair p1, pair p2,
private segment checktriangle(pair p0, pair p1, pair p2,
real v0, real v1, real v2, int edge=-1)
{
- // default null return
+ // default null return
static segment dflt;
real eps=eps*max(abs(v0),abs(v1),abs(v2));
-
+
if(v0 < -eps) {
if(v1 < -eps) {
if(v2 < -eps) return dflt; // nothing to do
@@ -92,10 +92,10 @@ private segment checktriangle(pair p0, pair p1, pair p2,
else return case2(p1,p0,p2,v1,v0,v2,5+edge);
} else {
if(v2 < -eps) return case3(p0,p1,p2,v0,v1,v2,edge);
- else if(v2 <= eps)
+ else if(v2 <= eps)
return case2(p2,p0,p1,v2,v0,v1,edge);
else return case3(p1,p0,p2,v1,v0,v2,edge);
- }
+ }
} else if(v0 <= eps) {
if(v1 < -eps) {
if(v2 < -eps) return dflt; // nothing to do
@@ -109,7 +109,7 @@ private segment checktriangle(pair p0, pair p1, pair p2,
if(v2 < -eps) return case2(p0,p1,p2,v0,v1,v2,4+edge);
else if(v2 <= eps) return case1(p0,p2,4+edge);
else return dflt; // nothing to do
- }
+ }
} else {
if(v1 < -eps) {
if(v2 < -eps) return case3(p1,p0,p2,v1,v0,v2,edge);
@@ -124,8 +124,8 @@ private segment checktriangle(pair p0, pair p1, pair p2,
if(v2 < -eps) return case3(p0,p2,p1,v0,v2,v1);
else if(v2 <= eps) return dflt; // nothing to do
else return dflt; // nothing to do
- }
- }
+ }
+ }
}
// Collect connecting path segments.
@@ -135,7 +135,7 @@ private void collect(pair[][][] points, real[] c)
int[] reverseF(int n) {return sequence(new int(int x){return n-1-x;},n-1);}
// use to reverse an array, omitting the last point
int[] reverseL(int n) {return sequence(new int(int x){return n-2-x;},n-1);}
-
+
for(int cnt=0; cnt < c.length; ++cnt) {
pair[][] gdscnt=points[cnt];
for(int i=0; i < gdscnt.length; ++i) {
@@ -144,11 +144,11 @@ private void collect(pair[][][] points, real[] c)
for(int j=i+1; j < gdscnt.length; ++j) {
pair[] gjg=gdscnt[j];
int Lj=gjg.length;
- if(abs(gig[0]-gjg[0]) < eps) {
+ if(abs(gig[0]-gjg[0]) < eps) {
gdscnt[j]=gjg[reverseF(Lj)];
gdscnt[j].append(gig);
- gdscnt.delete(i);
- --i;
+ gdscnt.delete(i);
+ --i;
break;
} else if(abs(gig[0]-gjg[Lj-1]) < eps) {
gig.delete(0);
@@ -169,7 +169,7 @@ private void collect(pair[][][] points, real[] c)
gdscnt.delete(i);
--i;
break;
- }
+ }
}
}
}
@@ -224,7 +224,7 @@ guide[][] contour(pair[][] z, real[][] f,
c=sort(c);
bool midpoints=midpoint.length > 0;
-
+
segment segments[][][]=new segment[nx][ny][];
// go over region a rectangle at a time
@@ -238,7 +238,7 @@ guide[][] contour(pair[][] z, real[][] f,
segment[][] segmentsi=segments[i];
for(int j=0; j < ny; ++j) {
segment[] segmentsij=segmentsi[j];
-
+
// define points
pair bleft=zi[j];
pair bright=zp[j];
@@ -264,26 +264,26 @@ guide[][] contour(pair[][] z, real[][] f,
int countm=0;
int countz=0;
int countp=0;
-
+
void check(real vertdat) {
if(vertdat < -eps) ++countm;
else {
- if(vertdat <= eps) ++countz;
+ if(vertdat <= eps) ++countz;
else ++countp;
}
}
-
+
check(vertdat0);
check(vertdat1);
check(vertdat2);
check(vertdat3);
- if(countm == 4) return 1; // nothing to do
- if(countp == 4) return -1; // nothing to do
+ if(countm == 4) return 1; // nothing to do
+ if(countp == 4) return -1; // nothing to do
if((countm == 3 || countp == 3) && countz == 1) return 0;
// go through the triangles
-
+
void addseg(segment seg) {
if(seg.active) {
seg.c=cnt;
@@ -301,7 +301,7 @@ guide[][] contour(pair[][] z, real[][] f,
vertdat0,vertdat1,vertdat4,3));
return 0;
}
-
+
void process(int l, int u) {
if(l >= u) return;
int i=quotient(l+u,2);
@@ -313,7 +313,7 @@ guide[][] contour(pair[][] z, real[][] f,
process(i+1,u);
}
}
-
+
process(0,c.length);
}
}
@@ -356,7 +356,7 @@ guide[][] contour(pair[][] z, real[][] f,
}
return -1;
}
-
+
int backward(int I, int J, bool first=true) {
if(I >= 0 && I < nx && J >= 0 && J < ny) {
segment[] segmentsIJ=segments[I][J];
@@ -380,7 +380,7 @@ guide[][] contour(pair[][] z, real[][] f,
}
return -1;
}
-
+
void follow(int f(int, int, bool first=true), int edge) {
int I=i;
int J=j;
@@ -489,7 +489,7 @@ guide[][] contour(real f(real, real), pair a, pair b,
// evaluate function at points and midpoints
real[][] dat=new real[nx+1][ny+1];
real[][] midpoint=new real[nx+1][ny+1];
-
+
for(int i=0; i <= nx; ++i) {
real x=interp(a.x,b.x,i/nx);
real x2=interp(a.x,b.x,(i+0.5)/nx);
@@ -503,7 +503,7 @@ guide[][] contour(real f(real, real), pair a, pair b,
return contour(dat,midpoint,a,b,c,join);
}
-
+
void draw(picture pic=currentpicture, Label[] L=new Label[],
guide[][] g, pen[] p)
{
@@ -576,7 +576,7 @@ pen[][] interior(picture pic=currentpicture, guide[][] g, pen[] palette)
index=i;
}
}
- }
+ }
fillpalettei[j]=palette[index];
}
fillpalette[i]=fillpalettei;
@@ -620,7 +620,7 @@ void fill(picture pic=currentpicture, guide[][] g, pen[][] palette)
// check existing guides and adds new segment to them if possible,
// or otherwise store segment as a new guide
private void addseg(pair[][] gds, segment seg)
-{
+{
if(!seg.active) return;
// search for a path to extend
for(int i=0; i < gds.length; ++i) {
@@ -629,22 +629,22 @@ private void addseg(pair[][] gds, segment seg)
gd.insert(0,seg.a);
return;
} else if(abs(gd[gd.length-1]-seg.b) < eps) {
- gd.push(seg.a);
+ gd.push(seg.a);
return;
} else if(abs(gd[0]-seg.a) < eps) {
gd.insert(0,seg.b);
return;
- } else if(abs(gd[gd.length-1]-seg.a) < eps) {
+ } else if(abs(gd[gd.length-1]-seg.a) < eps) {
gd.push(seg.b);
return;
}
}
-
+
// in case nothing is found
pair[] segm;
- segm=new pair[] {seg.a,seg.b};
+ segm=new pair[] {seg.a,seg.b};
gds.push(segm);
-
+
return;
}
@@ -664,7 +664,7 @@ guide[][] contour(pair[] z, real[] f, real[] c, interpolate join=operator --)
// array to store guides found so far
pair[][][] points=new pair[c.length][][];
-
+
for(int cnt=0; cnt < c.length; ++cnt) {
pair[][] pointscnt=points[cnt];
real C=c[cnt];
diff --git a/Build/source/utils/asymptote/base/contour3.asy b/Build/source/utils/asymptote/base/contour3.asy
index 4977a351bf2..a15a6663b23 100644
--- a/Build/source/utils/asymptote/base/contour3.asy
+++ b/Build/source/utils/asymptote/base/contour3.asy
@@ -81,7 +81,7 @@ vertex[][] contour3(triple[][][] v, real[][][] f,
int j2=2j;
int j2p1=j2+1;
int j2p2=j2+2;
-
+
for(int k=0; k < nz; ++k) {
// vertex values
real vdat0=fij[k];
@@ -108,21 +108,21 @@ vertex[][] contour3(triple[][][] v, real[][][] f,
triple m3=0.25*(p100+p000+p001+p101);
triple m4=0.25*(p000+p010+p011+p001);
triple m5=0.25*(p001+p011+p111+p101);
- triple mc=0.5*(m0+m5);
+ triple mc=0.5*(m0+m5);
// optimization: we make sure we don't work with empty rectangles
int countm=0;
int countz=0;
int countp=0;
-
+
void check(real vdat) {
if(vdat < -eps) ++countm;
else {
- if(vdat <= eps) ++countz;
+ if(vdat <= eps) ++countz;
else ++countp;
}
}
-
+
check(vdat0);
check(vdat1);
check(vdat2);
@@ -132,32 +132,32 @@ vertex[][] contour3(triple[][][] v, real[][][] f,
check(vdat6);
check(vdat7);
- if(countm == 8 || countp == 8 ||
+ if(countm == 8 || countp == 8 ||
((countm == 7 || countp == 7) && countz == 1)) continue;
int k2=2k;
int k2p1=k2+1;
int k2p2=k2+2;
-
+
// Evaluate midpoints of cube sides.
// Then evaluate midpoint of cube.
real vdat8=midpoints ? midpoint[i2p1][j2p1][k2] :
0.25*(vdat0+vdat2+vdat6+vdat4);
- real vdat9=midpoints ? midpoint[i2p1][j2p2][k2p1] :
+ real vdat9=midpoints ? midpoint[i2p1][j2p2][k2p1] :
0.25*(vdat2+vdat6+vdat7+vdat3);
- real vdat10=midpoints ? midpoint[i2p2][j2p1][k2p1] :
+ real vdat10=midpoints ? midpoint[i2p2][j2p1][k2p1] :
0.25*(vdat7+vdat6+vdat4+vdat5);
- real vdat11=midpoints ? midpoint[i2p1][j2][k2p1] :
+ real vdat11=midpoints ? midpoint[i2p1][j2][k2p1] :
0.25*(vdat0+vdat4+vdat5+vdat1);
- real vdat12=midpoints ? midpoint[i2][j2p1][k2p1] :
+ real vdat12=midpoints ? midpoint[i2][j2p1][k2p1] :
0.25*(vdat0+vdat2+vdat3+vdat1);
- real vdat13=midpoints ? midpoint[i2p1][j2p1][k2p2] :
+ real vdat13=midpoints ? midpoint[i2p1][j2p1][k2p2] :
0.25*(vdat1+vdat3+vdat7+vdat5);
- real vdat14=midpoints ? midpoint[i2p1][j2p1][k2p1] :
+ real vdat14=midpoints ? midpoint[i2p1][j2p1][k2p1] :
0.125*(vdat0+vdat1+vdat2+vdat3+vdat4+vdat5+vdat6+vdat7);
-
+
// Go through the 24 pyramids, 4 for each side.
-
+
void addval(int kp0, int kp1, int kp2, triple add, triple v) {
bucket[] cur=kps[kp0][kp1][kp2];
for(int q=0; q < cur.length; ++q) {
@@ -192,8 +192,14 @@ vertex[][] contour3(triple[][][] v, real[][][] f,
vec0=unit(vec0);
triple normal=cross(vec2,vec1);
normal *= sgn(dot(normal,dir));
- real angle0=acos(-dot(vec1,vec2));
- real angle1=acos(-dot(vec2,vec0));
+
+ real angle(triple u, triple v) {
+ real Dot=-dot(u,v);
+ return Dot > 1 ? 0 : Dot < -1 ? pi : acos(Dot);
+ }
+
+ real angle0=angle(vec1,vec2);
+ real angle1=angle(vec2,vec0);
pts[0].normal=normal*angle0;
pts[1].normal=normal*angle1;
pts[2].normal=normal*(pi-angle0-angle1);
@@ -206,7 +212,7 @@ vertex[][] contour3(triple[][][] v, real[][][] f,
weighted[] points=obj.pts;
object obj1;
object obj2;
- obj1.active=true;
+ obj1.active=true;
obj2.active=true;
obj1.pts=new weighted[] {points[0],points[1],points[2]};
obj2.pts=new weighted[] {points[1],points[2],points[3]};
@@ -220,7 +226,7 @@ vertex[][] contour3(triple[][][] v, real[][][] f,
}
}
- weighted setupweighted(triple va, triple vb, real da, real db,
+ weighted setupweighted(triple va, triple vb, real da, real db,
int[] kpa, int[] kpb) {
weighted w;
real ratio=abs(da/(db-da));
@@ -318,7 +324,7 @@ vertex[][] contour3(triple[][][] v, real[][][] f,
static int[] pm4={0,1,1};
static int[] pm5={1,1,2};
static int[] pmc={1,1,1};
-
+
check4pyr(p000,p010,p110,p100,mc,m0,
vdat0,vdat2,vdat6,vdat4,vdat14,vdat8,
pp000,pp010,pp110,pp100,pmc,pm0);
@@ -378,14 +384,14 @@ vertex[][] contour3(triple[][][] v, real[][][] f,
ret.normal=normal*2/count;
return ret;
}
-
+
// Prepare return value.
vertex[][] g;
-
+
for(int q=0; q < objects.length; ++q) {
object p=objects[q];
g.push(new vertex[] {preparevertex(p.pts[0]),preparevertex(p.pts[1]),
- preparevertex(p.pts[2])});
+ preparevertex(p.pts[2])});
}
return g;
}
@@ -454,7 +460,7 @@ vertex[][] contour3(real f(real, real, real), triple a, triple b,
datij[k]=f(x,y,z);
if(i == nx || j == ny || k == nz) continue;
int k2p1=2k+1;
- midpointi2p1j2p1[2k]=f(x2,y2,z);
+ midpointi2p1j2p1[2k]=f(x2,y2,z);
midpointi2p1j2p1[k2p1]=f(x2,y2,z2);
midpointi2p1j2[k2p1]=f(x2,y,z2);
midpointi2j2p1[k2p1]=f(x,y2,z2);
diff --git a/Build/source/utils/asymptote/base/embed.asy b/Build/source/utils/asymptote/base/embed.asy
index 88495f12128..30848c10f4c 100644
--- a/Build/source/utils/asymptote/base/embed.asy
+++ b/Build/source/utils/asymptote/base/embed.asy
@@ -7,23 +7,23 @@ if(latex()) {
// For documentation of the options see
// http://mirror.ctan.org/macros/latex/contrib/media9/doc/media9.pdf
-// Embed PRC or SWF content in pdf file
+// Embed PRC or SWF content in pdf file
string embedplayer(string name, string text="", string options="",
real width=0, real height=0)
{
- if(width != 0) options += ",width="+(string) (width/pt)+"pt";
- if(height != 0) options += ",height="+(string) (height/pt)+"pt";
+ if(width != 0) options += ",width="+(string) (width/pt)+"pt";
+ if(height != 0) options += ",height="+(string) (height/pt)+"pt";
return "%
\includemedia[noplaybutton,"+options+"]{"+text+"}{"+name+"}";
}
-// Embed media in pdf file
+// Embed media in pdf file
string embed(string name, string text="", string options="",
real width=0, real height=0)
{
return embedplayer("VPlayer.swf",text,"label="+name+
",activate=pageopen,addresource="+name+
- ",flashvars={source="+name+"&scaleMode=letterbox},"+
+ ",flashvars={source="+name+"&scaleMode=letterbox},"+
options,width,height);
}
diff --git a/Build/source/utils/asymptote/base/external.asy b/Build/source/utils/asymptote/base/external.asy
index f9ab5365aea..9e12610c4b2 100644
--- a/Build/source/utils/asymptote/base/external.asy
+++ b/Build/source/utils/asymptote/base/external.asy
@@ -20,8 +20,8 @@ string embed(string name, string text="", string options="",
atexit(exitfunction);
}
}
- if(width != 0) options += ", width="+(string) (width/pt)+"pt";
- if(height != 0) options +=", height="+(string) (height/pt)+"pt";
+ if(width != 0) options += ", width="+(string) (width/pt)+"pt";
+ if(height != 0) options +=", height="+(string) (height/pt)+"pt";
return "\href{run:"+name+"}{"+graphic(image,options)+"}";
}
diff --git a/Build/source/utils/asymptote/base/feynman.asy b/Build/source/utils/asymptote/base/feynman.asy
index 4360ee9f524..4182d989287 100644
--- a/Build/source/utils/asymptote/base/feynman.asy
+++ b/Build/source/utils/asymptote/base/feynman.asy
@@ -10,12 +10,12 @@
// default ratio of width (distance between two loops) to amplitude for a gluon
// line. The gluon function uses this ratio, if the width parameter is
-// negative.
+// negative.
real gluonratio;
// default ratio of width (distance between two crests) to amplitude for a
// photon line. The photon function uses this ratio, if the width parameter is
-// negative.
+// negative.
real photonratio;
// default gluon amplitude
@@ -337,7 +337,7 @@ void drawGhost(picture pic = currentpicture,
real vertexangle = minvertexangle,
real margin = linemargin)
{
- if(erasebg) do_overpaint(pic, p, bgpen,
+ if(erasebg) do_overpaint(pic, p, bgpen,
linewidth(fgpen)+margin, vertexangle);
draw(pic, p, fgpen, arrow);
}
@@ -358,7 +358,7 @@ void drawDoubleLine(picture pic = currentpicture,
real vertexangle = minvertexangle,
real margin = linemargin)
{
- if(erasebg) do_overpaint(pic, p, bgpen,
+ if(erasebg) do_overpaint(pic, p, bgpen,
linewidth(fgpen)+margin, vertexangle);
real htw = linewidth(fgpen)+dlspacing/2;
@@ -466,7 +466,7 @@ void drawVertexX(picture pic = currentpicture,
pen fgpen = vertexpen)
{
draw(pic, shift(xy)*scale(r)*((-1,-1)--(1,1)), fgpen);
- draw(pic, shift(xy)*scale(r)*((1,-1)--(-1,1)), fgpen);
+ draw(pic, shift(xy)*scale(r)*((1,-1)--(-1,1)), fgpen);
}
// draw a circle with an X in the middle on picture pic, at position xy with
@@ -508,7 +508,7 @@ void drawVertexBoxX(picture pic = currentpicture,
}
// draw a momentum arrow on picture pic, along path p, at position position
-// (use one of the predefined pairs left or right), with an offset offset
+// (use one of the predefined pairs left or right), with an offset offset
// from the path, a length length, a pen fgpen and an arrowhead arrow. Making
// adjust nonzero shifts the momentum arrow along the path. If erasebg is true,
// the background is erased inside a margin margin around the momentum arrow.
@@ -527,7 +527,7 @@ void drawMomArrow(picture pic = currentpicture,
real margin = momarrowmargin)
{
path momarrow = momArrowPath(p, align, pos, offset, length);
- if(erasebg) do_overpaint(pic, momarrow, bgpen,
+ if(erasebg) do_overpaint(pic, momarrow, bgpen,
linewidth(fgpen)+margin, 90);
draw(pic, momarrow, fgpen, arrow);
}
@@ -540,7 +540,7 @@ void drawMomArrow(picture pic = currentpicture,
// (essentially, currentpen, arrowfactor and dotfactor). After customising the
// default parameters of plain.asy, you may call fmdefaults to adjust the
// parameters of feynman.asy.
-void fmdefaults()
+void fmdefaults()
{
real arrowsize=arrowsize(currentpen);
real linewidth=linewidth(currentpen);
diff --git a/Build/source/utils/asymptote/base/flowchart.asy b/Build/source/utils/asymptote/base/flowchart.asy
index 3db66173755..d1d87b7887e 100644
--- a/Build/source/utils/asymptote/base/flowchart.asy
+++ b/Build/source/utils/asymptote/base/flowchart.asy
@@ -57,29 +57,29 @@ struct block {
// in absolute coordinates.
pair top(transform t=identity()) {
return shift(t)+f_top;
- }
+ }
pair bottom(transform t=identity()) {
return shift(t)+f_bottom;
- }
+ }
pair left(transform t=identity()) {
return shift(t)+f_left;
- }
+ }
pair right(transform t=identity()) {
return shift(t)+f_right;
- }
+ }
pair topleft(transform t=identity()) {
return shift(t)+f_topleft;
- }
+ }
pair topright(transform t=identity()) {
return shift(t)+f_topright;
- }
+ }
pair bottomleft(transform t=identity()) {
return shift(t)+f_bottomleft;
- }
+ }
pair bottomright(transform t=identity()) {
return shift(t)+f_bottomright;
- }
-
+ }
+
// Return a frame representing the block.
frame draw(pen p=currentpen);
@@ -118,25 +118,25 @@ block rectangle(object header, object body, pair center=(0,0),
block block;
block.draw=new frame(pen p) {
- frame block;
- filldraw(block,shift(0,z1.y)*box((0,0),z0),headerpen,drawpen);
- add(block,shift(-0.5*(Mheader+mheader))*fheader,(0,z1.y)+0.5z0);
- filldraw(block,box((0,0),z1),bodypen,drawpen);
- add(block,shift(-0.5*(Mbody+mbody))*fbody,0.5z1);
- return block;
+ frame block;
+ filldraw(block,shift(0,z1.y)*box((0,0),z0),headerpen,drawpen);
+ add(block,shift(-0.5*(Mheader+mheader))*fheader,(0,z1.y)+0.5z0);
+ filldraw(block,box((0,0),z1),bodypen,drawpen);
+ add(block,shift(-0.5*(Mbody+mbody))*fbody,0.5z1);
+ return block;
};
block.f_position=new pair(real x) {
- return point(shape,x);
+ return point(shape,x);
};
block.f_center=interp(point(shape,0),point(shape,3),0.5);
- block.f_bottomleft=point(shape,0);
- block.f_bottom=point(shape,5.5);
- block.f_bottomright=point(shape,5);
- block.f_right=point(shape,4.5);
- block.f_topright=point(shape,3);
- block.f_top=point(shape,2.5);
- block.f_topleft=point(shape,2);
- block.f_left=point(shape,0.5);
+ block.f_bottomleft=point(shape,0);
+ block.f_bottom=point(shape,5.5);
+ block.f_bottomright=point(shape,5);
+ block.f_right=point(shape,4.5);
+ block.f_topright=point(shape,3);
+ block.f_top=point(shape,2.5);
+ block.f_topleft=point(shape,2);
+ block.f_left=point(shape,0.5);
block.center=center;
block.size=point(shape,3);
return block;
@@ -156,25 +156,25 @@ block rectangle(object body, pair center=(0,0),
block block;
block.draw=new frame(pen p) {
- frame block;
- filldraw(block,shape,fillpen,drawpen);
- add(block,shift(-0.5*(M+m))*f,0.5z);
- return block;
+ frame block;
+ filldraw(block,shape,fillpen,drawpen);
+ add(block,shift(-0.5*(M+m))*f,0.5z);
+ return block;
};
block.f_position=new pair(real x) {
- return point(shape,x);
+ return point(shape,x);
};
block.f_center=0.5*z;
block.center=center;
block.size=z;
block.f_bottomleft=point(shape,0);
- block.f_bottom=point(shape,0.5);
- block.f_bottomright=point(shape,1);
- block.f_right=point(shape,1.5);
- block.f_topright=point(shape,2);
- block.f_top=point(shape,2.5);
- block.f_topleft=point(shape,3);
- block.f_left=point(shape,3.5);
+ block.f_bottom=point(shape,0.5);
+ block.f_bottomright=point(shape,1);
+ block.f_right=point(shape,1.5);
+ block.f_topright=point(shape,2);
+ block.f_top=point(shape,2.5);
+ block.f_topleft=point(shape,3);
+ block.f_left=point(shape,3.5);
return block;
}
@@ -197,13 +197,13 @@ block parallelogram(object body, pair center=(0,0),
block block;
block.draw=new frame(pen p) {
- frame block;
- filldraw(block,shape,fillpen,drawpen);
- add(block,shift(-0.5*(M+m))*f,((a+skew)/2,b/2));
- return block;
+ frame block;
+ filldraw(block,shape,fillpen,drawpen);
+ add(block,shift(-0.5*(M+m))*f,((a+skew)/2,b/2));
+ return block;
};
block.f_position=new pair(real x) {
- return point(shape,x);
+ return point(shape,x);
};
block.f_center=((a+skew)/2,b/2);
block.center=center;
@@ -229,7 +229,7 @@ block diamond(object body, pair center=(0,0),
pair m=min(f);
pair M=max(f);
pair bound=maxbound(M-m,(minwidth,minheight));
-
+
real e=ds;
real a=0.5bound.x-dw;
real b=0.5bound.y;
@@ -244,25 +244,25 @@ block diamond(object body, pair center=(0,0),
block block;
block.draw=new frame(pen p) {
- frame block;
- filldraw(block,shape,fillpen,drawpen);
- add(block,shift(-0.5*(M+m))*f,(d,c));
- return block;
+ frame block;
+ filldraw(block,shape,fillpen,drawpen);
+ add(block,shift(-0.5*(M+m))*f,(d,c));
+ return block;
};
block.f_position=new pair(real x) {
- return point(shape,x);
+ return point(shape,x);
};
block.f_center=(point(shape,1).x,point(shape,0).y);
block.center=center;
block.size=(point(shape,0).x,point(shape,1).y);
- block.f_bottomleft=point(shape,2.5);
- block.f_bottom=point(shape,3);
- block.f_bottomright=point(shape,3.5);
- block.f_right=point(shape,0);
- block.f_topright=point(shape,0.5);
- block.f_top=point(shape,1);
- block.f_topleft=point(shape,1.5);
- block.f_left=point(shape,2);
+ block.f_bottomleft=point(shape,2.5);
+ block.f_bottom=point(shape,3);
+ block.f_bottomright=point(shape,3.5);
+ block.f_right=point(shape,0);
+ block.f_topright=point(shape,0.5);
+ block.f_top=point(shape,1);
+ block.f_topleft=point(shape,1.5);
+ block.f_left=point(shape,2);
return block;
}
@@ -274,30 +274,30 @@ block circle(object body, pair center=(0,0), pen fillpen=invisible,
pair m=min(f);
pair M=max(f);
real r=max(0.5length(M-m)+dr,0.5mindiameter);
-
+
path shape=(0,r)..(r,2r)..(2r,r)..(r,0)..cycle;
-
+
block block;
block.draw=new frame(pen p) {
- frame block;
- filldraw(block,shape,fillpen,drawpen);
- add(block,shift(-0.5*(M+m))*f,(r,r));
- return block;
+ frame block;
+ filldraw(block,shape,fillpen,drawpen);
+ add(block,shift(-0.5*(M+m))*f,(r,r));
+ return block;
};
block.f_position=new pair(real x) {
- return point(shape,x);
+ return point(shape,x);
};
block.f_center=(r,r);
block.center=center;
block.size=(2r,2r);
block.f_left=point(shape,0);
- block.f_topleft=point(shape,0.5);
- block.f_top=point(shape,1);
- block.f_topright=point(shape,1.5);
- block.f_right=point(shape,2);
- block.f_bottomright=point(shape,2.5);
- block.f_bottom=point(shape,3);
- block.f_bottomleft=point(shape,3.5);
+ block.f_topleft=point(shape,0.5);
+ block.f_top=point(shape,1);
+ block.f_topright=point(shape,1.5);
+ block.f_right=point(shape,2);
+ block.f_bottomright=point(shape,2.5);
+ block.f_bottom=point(shape,3);
+ block.f_bottomleft=point(shape,3.5);
return block;
}
@@ -313,33 +313,33 @@ block roundrectangle(object body, pair center=(0,0),
real a=bound.x;
real b=bound.y;
-
+
path shape=(0,ds+dw)--(0,ds+b-dw){up}..{right}
(ds+dw,2ds+b)--(ds+a-dw,2ds+b){right}..{down}
(2ds+a,ds+b-dw)--(2ds+a,ds+dw){down}..{left}
(ds+a-dw,0)--(ds+dw,0){left}..{up}cycle;
-
+
block block;
block.draw=new frame(pen p) {
- frame block;
- filldraw(block,shape,fillpen,drawpen);
- add(block,shift(-0.5*(M+m))*f,(ds,ds)+0.5bound);
- return block;
+ frame block;
+ filldraw(block,shape,fillpen,drawpen);
+ add(block,shift(-0.5*(M+m))*f,(ds,ds)+0.5bound);
+ return block;
};
block.f_position=new pair(real x) {
- return point(shape,x);
+ return point(shape,x);
};
block.f_center=(ds+0.5a,ds+0.5b);
block.center=center;
block.size=(2ds+a,2ds+b);
- block.f_bottomleft=point(shape,7.5);
- block.f_bottom=point(shape,6.5);
- block.f_bottomright=point(shape,5.5);
- block.f_right=point(shape,4.5);
- block.f_topright=point(shape,3.5);
- block.f_top=point(shape,2.5);
- block.f_topleft=point(shape,1.5);
- block.f_left=point(shape,0.5);
+ block.f_bottomleft=point(shape,7.5);
+ block.f_bottom=point(shape,6.5);
+ block.f_bottomright=point(shape,5.5);
+ block.f_right=point(shape,4.5);
+ block.f_topright=point(shape,3.5);
+ block.f_top=point(shape,2.5);
+ block.f_topleft=point(shape,1.5);
+ block.f_left=point(shape,0.5);
return block;
}
@@ -359,25 +359,25 @@ block bevel(object body, pair center=(0,0), pen fillpen=invisible,
(dw+a,0)--cycle;
block block;
block.draw=new frame(pen p) {
- frame block;
- filldraw(block,shape,fillpen,drawpen);
- add(block,shift(-0.5*(M+m))*f,(0.5bound+(dw,dh)));
- return block;
+ frame block;
+ filldraw(block,shape,fillpen,drawpen);
+ add(block,shift(-0.5*(M+m))*f,(0.5bound+(dw,dh)));
+ return block;
};
block.f_position=new pair(real x) {
- return point(shape,x);
+ return point(shape,x);
};
block.f_center=(dw+0.5a,dh+b);
block.center=center;
block.size=(2dw+a,2dh+2b);
- block.f_bottomleft=point(shape,4);
- block.f_bottom=point(shape,4.5);
- block.f_bottomright=point(shape,5);
- block.f_right=point(shape,0);
- block.f_topright=point(shape,1);
- block.f_top=point(shape,1.5);
- block.f_topleft=point(shape,2);
- block.f_left=point(shape,3);
+ block.f_bottomleft=point(shape,4);
+ block.f_bottom=point(shape,4.5);
+ block.f_bottomright=point(shape,5);
+ block.f_right=point(shape,0);
+ block.f_topright=point(shape,1);
+ block.f_top=point(shape,1.5);
+ block.f_topleft=point(shape,2);
+ block.f_left=point(shape,3);
return block;
}
@@ -388,14 +388,14 @@ path path(pair point[] ... flowdir dir[])
for(int i=1; i < point.length; ++i) {
if(i-1 >= dir.length || dir[i-1] == Horizontal)
current=(point[i].x,point[i-1].y);
- else
+ else
current=(point[i-1].x,point[i].y);
-
+
if(current != prev) {
line=line--current;
prev=current;
}
-
+
current=point[i];
if(current != prev) {
line=line--current;
diff --git a/Build/source/utils/asymptote/base/geometry.asy b/Build/source/utils/asymptote/base/geometry.asy
index 1c8a95063f7..420d5bdc456 100644
--- a/Build/source/utils/asymptote/base/geometry.asy
+++ b/Build/source/utils/asymptote/base/geometry.asy
@@ -40,7 +40,7 @@ private transform rotate(explicit pair dir)
real angle=degrees(dir);
if(angle > 90 && angle < 270) angle -= 180;
return rotate(angle);
-}
+}
// *=======================================================*
// *........................HEADER.........................*
@@ -165,7 +165,7 @@ real rd(real x, real y, real z)
ed = ea - 6 * eb;
ee = ed + ec + ec;
return 3 * sum + fac * (1.0 + ed * (-C1 + C5 * ed - C6 * delz * ee)
- +delz * (C2 * ee + delz * (-C3 * ec + delz * C4 * ea)))/(ave * sqrt(ave));
+ +delz * (C2 * ee + delz * (-C3 * ec + delz * C4 * ea)))/(ave * sqrt(ave));
}
/*<asyxml><function type="real" signature="elle(real,real)"><code></asyxml>*/
@@ -258,10 +258,10 @@ struct coordsys
{/*<asyxml></code><documentation>This structure represents a coordinate system in the plane.</documentation></asyxml>*/
/*<asyxml><method type = "pair" signature="relativetodefault(pair)"><code></asyxml>*/
restricted convert relativetodefault = new pair(pair m){return m;};/*<asyxml></code><documentation>Convert a pair given relatively to this coordinate system to
- the pair relatively to the default coordinate system.</documentation></method></asyxml>*/
+ the pair relatively to the default coordinate system.</documentation></method></asyxml>*/
/*<asyxml><method type = "pair" signature="defaulttorelativet(pair)"><code></asyxml>*/
restricted convert defaulttorelative = new pair(pair m){return m;};/*<asyxml></code><documentation>Convert a pair given relatively to the default coordinate system to
- the pair relatively to this coordinate system.</documentation></method></asyxml>*/
+ the pair relatively to this coordinate system.</documentation></method></asyxml>*/
/*<asyxml><method type = "real" signature="dot(pair,pair)"><code></asyxml>*/
restricted dot dot = new real(pair m, pair n){return dot(m, n);};/*<asyxml></code><documentation>Return the dot product of this coordinate system.</documentation></method></asyxml>*/
/*<asyxml><method type = "real" signature="abs(pair)"><code></asyxml>*/
@@ -287,50 +287,50 @@ struct coordsys
/*<asyxml><operator type = "bool" signature="==(coordsys,coordsys)"><code></asyxml>*/
bool operator ==(coordsys c1, coordsys c2)
-{/*<asyxml></code><documentation>Return true iff the coordinate system have the same origin and units vector.</documentation></operator></asyxml>*/
- return c1.O == c2.O && c1.i == c2.i && c1.j == c2.j;
-}
+ {/*<asyxml></code><documentation>Return true iff the coordinate system have the same origin and units vector.</documentation></operator></asyxml>*/
+ return c1.O == c2.O && c1.i == c2.i && c1.j == c2.j;
+ }
/*<asyxml><function type="coordsys" signature="cartesiansystem(pair,pair,pair)"><code></asyxml>*/
coordsys cartesiansystem(pair O = (0, 0), pair i, pair j)
{/*<asyxml></code><documentation>Return the Cartesian coordinate system (O, i, j).</documentation></function></asyxml>*/
- coordsys R;
- real[][] P = {{0, 0}, {0, 0}};
- real[][] iP;
- P[0][0] = i.x;
- P[0][1] = j.x;
- P[1][0] = i.y;
- P[1][1] = j.y;
- iP = inverse(P);
- real ni = abs(i);
- real nj = abs(j);
- real ij = angle(j) - angle(i);
-
- pair rtd(pair m)
- {
- return O + (P[0][0] * m.x + P[0][1] * m.y, P[1][0] * m.x + P[1][1] * m.y);
- }
-
- pair dtr(pair m)
- {
- m-=O;
- return (iP[0][0] * m.x + iP[0][1] * m.y, iP[1][0] * m.x + iP[1][1] * m.y);
- }
-
- pair polar(real r, real a)
- {
- real ca = sin(ij - a)/(ni * sin(ij));
- real sa = sin(a)/(nj * sin(ij));
- return r * (ca, sa);
- }
-
- real tdot(pair m, pair n)
- {
- return m.x * n.x * ni^2 + m.y * n.y * nj^2 + (m.x * n.y + n.x * m.y) * dot(i, j);
- }
-
- R.init(rtd, dtr, polar, tdot);
- return R;
+ coordsys R;
+ real[][] P = {{0, 0}, {0, 0}};
+ real[][] iP;
+ P[0][0] = i.x;
+ P[0][1] = j.x;
+ P[1][0] = i.y;
+ P[1][1] = j.y;
+ iP = inverse(P);
+ real ni = abs(i);
+ real nj = abs(j);
+ real ij = angle(j) - angle(i);
+
+ pair rtd(pair m)
+ {
+ return O + (P[0][0] * m.x + P[0][1] * m.y, P[1][0] * m.x + P[1][1] * m.y);
+ }
+
+ pair dtr(pair m)
+ {
+ m-=O;
+ return (iP[0][0] * m.x + iP[0][1] * m.y, iP[1][0] * m.x + iP[1][1] * m.y);
+ }
+
+ pair polar(real r, real a)
+ {
+ real ca = sin(ij - a)/(ni * sin(ij));
+ real sa = sin(a)/(nj * sin(ij));
+ return r * (ca, sa);
+ }
+
+ real tdot(pair m, pair n)
+ {
+ return m.x * n.x * ni^2 + m.y * n.y * nj^2 + (m.x * n.y + n.x * m.y) * dot(i, j);
+ }
+
+ R.init(rtd, dtr, polar, tdot);
+ return R;
}
@@ -344,19 +344,19 @@ void show(picture pic = currentpicture, Label lo = "$O$",
pen jpen = ipen,
arrowbar arrow = Arrow)
{/*<asyxml></code><documentation>Draw the components (O, i, j, x - axis, y - axis) of 'R'.</documentation></function></asyxml>*/
- unravel R;
- dot(pic, O, dotpen);
- drawline(pic, O, O + i, xpen);
- drawline(pic, O, O + j, ypen);
- draw(pic, li, O--(O + i), ipen, arrow);
- Label lj = lj.copy();
- lj.align(lj.align, unit(I * j));
- draw(pic, lj, O--(O + j), jpen, arrow);
- draw(pic, lj, O--(O + j), jpen, arrow);
- Label lo = lo.copy();
- lo.align(lo.align, -2 * dir(O--O + i, O--O + j));
- lo.p(dotpen);
- label(pic, lo, O);
+ unravel R;
+ dot(pic, O, dotpen);
+ drawline(pic, O, O + i, xpen);
+ drawline(pic, O, O + j, ypen);
+ draw(pic, li, O--(O + i), ipen, arrow);
+ Label lj = lj.copy();
+ lj.align(lj.align, unit(I * j));
+ draw(pic, lj, O--(O + j), jpen, arrow);
+ draw(pic, lj, O--(O + j), jpen, arrow);
+ Label lo = lo.copy();
+ lo.align(lo.align, -2 * dir(O--O + i, O--O + j));
+ lo.p(dotpen);
+ label(pic, lo, O);
}
/*<asyxml><operator type = "pair" signature="/(pair,coordsys)"><code></asyxml>*/
@@ -364,7 +364,7 @@ pair operator /(pair p, coordsys R)
{/*<asyxml></code><documentation>Return the xy - coordinates of 'p' relatively to
the coordinate system 'R'.
For example, if R = cartesiansystem((1, 2), (1, 0), (0, 1)), (0, 0)/R is (-1, -2).</documentation></operator></asyxml>*/
- return R.defaulttorelative(p);
+ return R.defaulttorelative(p);
}
/*<asyxml><operator type = "pair" signature="*(coordsys,pair)"><code></asyxml>*/
@@ -372,34 +372,34 @@ pair operator *(coordsys R, pair p)
{/*<asyxml></code><documentation>Return the coordinates of 'p' given in the
xy - coordinates 'R'.
For example, if R = cartesiansystem((1, 2), (1, 0), (0, 1)), R * (0, 0) is (1, 2).</documentation></operator></asyxml>*/
- return R.relativetodefault(p);
+ return R.relativetodefault(p);
}
/*<asyxml><operator type = "path" signature="*(coordsys,path)"><code></asyxml>*/
path operator *(coordsys R, path g)
{/*<asyxml></code><documentation>Return the reconstructed path applying R * pair to each node, pre and post control point of 'g'.</documentation></operator></asyxml>*/
- guide og = R * point(g, 0);
- real l = length(g);
- for(int i = 1; i <= l; ++i)
- {
- pair P = R * point(g, i);
- pair post = R * postcontrol(g, i - 1);
- pair pre = R * precontrol(g, i);
- if(i == l && (cyclic(g)))
- og = og..controls post and pre..cycle;
- else
- og = og..controls post and pre..P;
- }
- return og;
+ guide og = R * point(g, 0);
+ real l = length(g);
+ for(int i = 1; i <= l; ++i)
+ {
+ pair P = R * point(g, i);
+ pair post = R * postcontrol(g, i - 1);
+ pair pre = R * precontrol(g, i);
+ if(i == l && (cyclic(g)))
+ og = og..controls post and pre..cycle;
+ else
+ og = og..controls post and pre..P;
+ }
+ return og;
}
/*<asyxml><operator type = "coordsys" signature="*(transform,coordsys)"><code></asyxml>*/
coordsys operator *(transform t,coordsys R)
{/*<asyxml></code><documentation>Provide transform * coordsys.
Note that shiftless(t) is applied to R.i and R.j.</documentation></operator></asyxml>*/
- coordsys oc;
- oc = cartesiansystem(t * R.O, shiftless(t) * R.i, shiftless(t) * R.j);
- return oc;
+ coordsys oc;
+ oc = cartesiansystem(t * R.O, shiftless(t) * R.i, shiftless(t) * R.j);
+ return oc;
}
/*<asyxml><constant type = "coordsys" signature="defaultcoordsys"><code></asyxml>*/
@@ -651,26 +651,26 @@ point operator *(explicit pair p1, explicit point p2)
/*<asyxml><operator type = "bool" signature="==(explicit point,explicit point)"><code></asyxml>*/
bool operator ==(explicit point M, explicit point N)
-{/*<asyxml></code><documentation>Provide the test 'M == N' wish returns true iff MN < EPS</documentation></operator></asyxml>*/
- return abs(locate(M) - locate(N)) < EPS;
-}
+ {/*<asyxml></code><documentation>Provide the test 'M == N' wish returns true iff MN < EPS</documentation></operator></asyxml>*/
+ return abs(locate(M) - locate(N)) < EPS;
+ }
/*<asyxml><operator type = "bool" signature="!=(explicit point,explicit point)"><code></asyxml>*/
bool operator !=(explicit point M, explicit point N)
{/*<asyxml></code><documentation>Provide the test 'M != N' wish return true iff MN >= EPS</documentation></operator></asyxml>*/
- return !(M == N);
+ return !(M == N);
}
/*<asyxml><operator type = "guide" signature="cast(point)"><code></asyxml>*/
guide operator cast(point p)
{/*<asyxml></code><documentation>Cast point to guide.</documentation></operator></asyxml>*/
- return locate(p);
+ return locate(p);
}
/*<asyxml><operator type = "path" signature="cast(point)"><code></asyxml>*/
path operator cast(point p)
{/*<asyxml></code><documentation>Cast point to path.</documentation></operator></asyxml>*/
- return locate(p);
+ return locate(p);
}
/*<asyxml><function type="void" signature="dot(picture,Label,explicit point,align,string,pen)"><code></asyxml>*/
@@ -678,103 +678,103 @@ void dot(picture pic = currentpicture, Label L, explicit point Z,
align align = NoAlign,
string format = defaultformat, pen p = currentpen)
{/*<asyxml></code><documentation></documentation></function></asyxml>*/
- Label L = L.copy();
- L.position(locate(Z));
- if(L.s == "") {
- if(format == "") format = defaultformat;
- L.s = "("+format(format, Z.x)+", "+format(format, Z.y)+")";
- }
- L.align(align, E);
- L.p(p);
- dot(pic, locate(Z), p);
- add(pic, L);
+ Label L = L.copy();
+ L.position(locate(Z));
+ if(L.s == "") {
+ if(format == "") format = defaultformat;
+ L.s = "("+format(format, Z.x)+", "+format(format, Z.y)+")";
+ }
+ L.align(align, E);
+ L.p(p);
+ dot(pic, locate(Z), p);
+ add(pic, L);
}
/*<asyxml><function type="real" signature="abs(coordsys,pair)"><code></asyxml>*/
real abs(coordsys R, pair m)
{/*<asyxml></code><documentation>Return the modulus |m| in the coordinate system 'R'.</documentation></function></asyxml>*/
- return R.abs(m);
+ return R.abs(m);
}
/*<asyxml><function type="real" signature="abs(explicit point)"><code></asyxml>*/
real abs(explicit point M)
{/*<asyxml></code><documentation>Return the modulus |M| in its coordinate system.</documentation></function></asyxml>*/
- return M.coordsys.abs(M.coordinates);
+ return M.coordsys.abs(M.coordinates);
}
/*<asyxml><function type="real" signature="length(explicit point)"><code></asyxml>*/
real length(explicit point M)
{/*<asyxml></code><documentation>Return the modulus |M| in its coordinate system (same as 'abs').</documentation></function></asyxml>*/
- return M.coordsys.abs(M.coordinates);
+ return M.coordsys.abs(M.coordinates);
}
/*<asyxml><function type="point" signature="conj(explicit point)"><code></asyxml>*/
point conj(explicit point M)
{/*<asyxml></code><documentation>Conjugate.</documentation></function></asyxml>*/
- return point(M.coordsys, conj(M.coordinates), M.m);
+ return point(M.coordsys, conj(M.coordinates), M.m);
}
/*<asyxml><function type="real" signature="degrees(explicit point,coordsys,bool)"><code></asyxml>*/
real degrees(explicit point M, coordsys R = M.coordsys, bool warn = true)
{/*<asyxml></code><documentation>Return the angle of M (in degrees) relatively to 'R'.</documentation></function></asyxml>*/
- return (degrees(locate(M) - R.O, warn) - degrees(R.i))%360;
+ return (degrees(locate(M) - R.O, warn) - degrees(R.i))%360;
}
/*<asyxml><function type="real" signature="angle(explicit point,coordsys,bool)"><code></asyxml>*/
real angle(explicit point M, coordsys R = M.coordsys, bool warn = true)
{/*<asyxml></code><documentation>Return the angle of M (in radians) relatively to 'R'.</documentation></function></asyxml>*/
- return radians(degrees(M, R, warn));
+ return radians(degrees(M, R, warn));
}
bool Finite(explicit point z)
{
- return abs(z.x) < Infinity && abs(z.y) < Infinity;
+ return abs(z.x) < Infinity && abs(z.y) < Infinity;
}
/*<asyxml><function type="bool" signature="finite(explicit point)"><code></asyxml>*/
bool finite(explicit point p)
{/*<asyxml></code><documentation>Avoid to compute 'finite((pair)(infinite_point))'.</documentation></function></asyxml>*/
- return finite(p.coordinates);
+ return finite(p.coordinates);
}
/*<asyxml><function type="real" signature="dot(point,point)"><code></asyxml>*/
real dot(point A, point B)
{/*<asyxml></code><documentation>Return the dot product in the coordinate system of 'A'.</documentation></function></asyxml>*/
- point[] P = standardizecoordsys(A.coordsys, A, B);
- return P[0].coordsys.dot(P[0].coordinates, P[1].coordinates);
+ point[] P = standardizecoordsys(A.coordsys, A, B);
+ return P[0].coordsys.dot(P[0].coordinates, P[1].coordinates);
}
/*<asyxml><function type="real" signature="dot(point,explicit pair)"><code></asyxml>*/
real dot(point A, explicit pair B)
{/*<asyxml></code><documentation>Return the dot product in the default coordinate system.
dot(explicit pair, point) is also defined.</documentation></function></asyxml>*/
- return dot(locate(A), B);
+ return dot(locate(A), B);
}
real dot(explicit pair A, point B)
{
- return dot(A, locate(B));
+ return dot(A, locate(B));
}
/*<asyxml><function type="transforms" signature="rotateO(real)"><code></asyxml>*/
transform rotateO(real a)
{/*<asyxml></code><documentation>Rotation around the origin of the current coordinate system.</documentation></function></asyxml>*/
- return rotate(a, currentcoordsys.O);
+ return rotate(a, currentcoordsys.O);
}
/*<asyxml><function type="transform" signature="projection(point,point)"><code></asyxml>*/
transform projection(point A, point B)
{/*<asyxml></code><documentation>Return the orthogonal projection on the line (AB).</documentation></function></asyxml>*/
- pair dir = unit(locate(A) - locate(B));
- pair a = locate(A);
- real cof = dir.x * a.x + dir.y * a.y;
- real tx = a.x - dir.x * cof;
- real txx = dir.x^2;
- real txy = dir.x * dir.y;
- real ty = a.y - dir.y * cof;
- real tyx = txy;
- real tyy = dir.y^2;
- transform t = (tx, ty, txx, txy, tyx, tyy);
- return t;
+ pair dir = unit(locate(A) - locate(B));
+ pair a = locate(A);
+ real cof = dir.x * a.x + dir.y * a.y;
+ real tx = a.x - dir.x * cof;
+ real txx = dir.x^2;
+ real txy = dir.x * dir.y;
+ real ty = a.y - dir.y * cof;
+ real tyx = txy;
+ real tyy = dir.y^2;
+ transform t = (tx, ty, txx, txy, tyx, tyy);
+ return t;
}
/*<asyxml><function type="transform" signature="projection(point,point,point,point,bool)"><code></asyxml>*/
@@ -782,45 +782,45 @@ transform projection(point A, point B, point C, point D, bool safe = false)
{/*<asyxml></code><documentation>Return the (CD) parallel projection on (AB).
If 'safe = true' and (AB)//(CD) return the identity.
If 'safe = false' and (AB)//(CD) return an infinity scaling.</documentation></function></asyxml>*/
- pair a = locate(A);
- pair u = unit(locate(B) - locate(A));
- pair v = unit(locate(D) - locate(C));
- real c = u.x * a.y - u.y * a.x;
- real d = (conj(u) * v).y;
- if (abs(d) < epsgeo) {
- return safe ? identity() : scale(infinity);
- }
- real tx = c * v.x/d;
- real ty = c * v.y/d;
- real txx = u.x * v.y/d;
- real txy = -u.x * v.x/d;
- real tyx = u.y * v.y/d;
- real tyy = -u.y * v.x/d;
- transform t = (tx, ty, txx, txy, tyx, tyy);
- return t;
+ pair a = locate(A);
+ pair u = unit(locate(B) - locate(A));
+ pair v = unit(locate(D) - locate(C));
+ real c = u.x * a.y - u.y * a.x;
+ real d = (conj(u) * v).y;
+ if (abs(d) < epsgeo) {
+ return safe ? identity() : scale(infinity);
+ }
+ real tx = c * v.x/d;
+ real ty = c * v.y/d;
+ real txx = u.x * v.y/d;
+ real txy = -u.x * v.x/d;
+ real tyx = u.y * v.y/d;
+ real tyy = -u.y * v.x/d;
+ transform t = (tx, ty, txx, txy, tyx, tyy);
+ return t;
}
/*<asyxml><function type="transform" signature="scale(real,point)"><code></asyxml>*/
transform scale(real k, point M)
{/*<asyxml></code><documentation>Homothety.</documentation></function></asyxml>*/
- pair P = locate(M);
- return shift(P) * scale(k) * shift(-P);
+ pair P = locate(M);
+ return shift(P) * scale(k) * shift(-P);
}
/*<asyxml><function type="transform" signature="xscale(real,point)"><code></asyxml>*/
transform xscale(real k, point M)
{/*<asyxml></code><documentation>xscale from 'M' relatively to the x - axis of the coordinate system of 'M'.</documentation></function></asyxml>*/
- pair P = locate(M);
- real a = degrees(M.coordsys.i);
- return (shift(P) * rotate(a)) * xscale(k) * (rotate(-a) * shift(-P));
+ pair P = locate(M);
+ real a = degrees(M.coordsys.i);
+ return (shift(P) * rotate(a)) * xscale(k) * (rotate(-a) * shift(-P));
}
/*<asyxml><function type="transform" signature="yscale(real,point)"><code></asyxml>*/
transform yscale(real k, point M)
{/*<asyxml></code><documentation>yscale from 'M' relatively to the y - axis of the coordinate system of 'M'.</documentation></function></asyxml>*/
- pair P = locate(M);
- real a = degrees(M.coordsys.j) - 90;
- return (shift(P) * rotate(a)) * yscale(k) * (rotate(-a) * shift(-P));
+ pair P = locate(M);
+ real a = degrees(M.coordsys.j) - 90;
+ return (shift(P) * rotate(a)) * yscale(k) * (rotate(-a) * shift(-P));
}
/*<asyxml><function type="transform" signature="scale(real,point,point,point,point,bool)"><code></asyxml>*/
@@ -829,41 +829,41 @@ transform scale(real k, point A, point B, point C, point D, bool safe = false)
(help me for English translation...)
If 'safe = true' and (AB)//(CD) return the identity.
If 'safe = false' and (AB)//(CD) return a infinity scaling.</documentation></function></asyxml>*/
- pair a = locate(A);
- pair u = unit(locate(B) - locate(A));
- pair v = unit(locate(D) - locate(C));
- real c = u.x * a.y - u.y * a.x;
- real d = (conj(u) * v).y;
- real d = (conj(u) * v).y;
- if (abs(d) < epsgeo) {
- return safe ? identity() : scale(infinity);
- }
- real tx = (1 - k) * c * v.x/d;
- real ty = (1 - k) * c * v.y/d;
- real txx = (1 - k) * u.x * v.y/d + k;
- real txy = (k - 1) * u.x * v.x/d;
- real tyx = (1 - k) * u.y * v.y/d;
- real tyy = (k - 1) * u.y * v.x/d + k;
- transform t = (tx, ty, txx, txy, tyx, tyy);
- return t;
+ pair a = locate(A);
+ pair u = unit(locate(B) - locate(A));
+ pair v = unit(locate(D) - locate(C));
+ real c = u.x * a.y - u.y * a.x;
+ real d = (conj(u) * v).y;
+ real d = (conj(u) * v).y;
+ if (abs(d) < epsgeo) {
+ return safe ? identity() : scale(infinity);
+ }
+ real tx = (1 - k) * c * v.x/d;
+ real ty = (1 - k) * c * v.y/d;
+ real txx = (1 - k) * u.x * v.y/d + k;
+ real txy = (k - 1) * u.x * v.x/d;
+ real tyx = (1 - k) * u.y * v.y/d;
+ real tyy = (k - 1) * u.y * v.x/d + k;
+ transform t = (tx, ty, txx, txy, tyx, tyy);
+ return t;
}
/*<asyxml><function type="transform" signature="scaleO(real)"><code></asyxml>*/
transform scaleO(real x)
{/*<asyxml></code><documentation>Homothety from the origin of the current coordinate system.</documentation></function></asyxml>*/
- return scale(x, (0, 0));
+ return scale(x, (0, 0));
}
/*<asyxml><function type="transform" signature="xscaleO(real)"><code></asyxml>*/
transform xscaleO(real x)
{/*<asyxml></code><documentation>xscale from the origin and relatively to the current coordinate system.</documentation></function></asyxml>*/
- return scale(x, (0, 0), (0, 1), (0, 0), (1, 0));
+ return scale(x, (0, 0), (0, 1), (0, 0), (1, 0));
}
/*<asyxml><function type="transform" signature="yscaleO(real)"><code></asyxml>*/
transform yscaleO(real x)
{/*<asyxml></code><documentation>yscale from the origin and relatively to the current coordinate system.</documentation></function></asyxml>*/
- return scale(x, (0, 0), (1, 0), (0, 0), (0, 1));
+ return scale(x, (0, 0), (1, 0), (0, 0), (0, 1));
}
/*<asyxml><struct signature="vector"><code></asyxml>*/
@@ -876,121 +876,121 @@ struct vector
/*<asyxml><operator type = "point" signature="cast(vector)"><code></asyxml>*/
point operator cast(vector v)
{/*<asyxml></code><documentation>Cast vector 'v' to point 'M' so that OM = v.</documentation></operator></asyxml>*/
- return v.v;
+ return v.v;
}
/*<asyxml><operator type = "vector" signature="cast(pair)"><code></asyxml>*/
vector operator cast(pair v)
{/*<asyxml></code><documentation>Cast pair to vector relatively to the current coordinate
system 'currentcoordsys'.</documentation></operator></asyxml>*/
- vector ov;
- ov.v = point(currentcoordsys, v);
- return ov;
+ vector ov;
+ ov.v = point(currentcoordsys, v);
+ return ov;
}
/*<asyxml><operator type = "vector" signature="cast(explicit point)"><code></asyxml>*/
vector operator cast(explicit point v)
{/*<asyxml></code><documentation>A point can be interpreted like a vector using the code
'(vector)a_point'.</documentation></operator></asyxml>*/
- vector ov;
- ov.v = v;
- return ov;
+ vector ov;
+ ov.v = v;
+ return ov;
}
/*<asyxml><operator type = "pair" signature="cast(explicit vector)"><code></asyxml>*/
pair operator cast(explicit vector v)
{/*<asyxml></code><documentation>Cast vector to pair (the coordinates of 'v' in the default coordinate system).</documentation></operator></asyxml>*/
- return locate(v.v) - v.v.coordsys.O;
+ return locate(v.v) - v.v.coordsys.O;
}
/*<asyxml><operator type = "align" signature="cast(vector)"><code></asyxml>*/
align operator cast(vector v)
{/*<asyxml></code><documentation>Cast vector to align.</documentation></operator></asyxml>*/
- return (pair)v;
+ return (pair)v;
}
/*<asyxml><function type="vector" signature="vector(coordsys, pair)"><code></asyxml>*/
vector vector(coordsys R = currentcoordsys, pair v)
{/*<asyxml></code><documentation>Return the vector of 'R' which has the coordinates 'v'.</documentation></function></asyxml>*/
- vector ov;
- ov.v = point(R, v);
- return ov;
+ vector ov;
+ ov.v = point(R, v);
+ return ov;
}
/*<asyxml><function type="vector" signature="vector(point)"><code></asyxml>*/
vector vector(point M)
{/*<asyxml></code><documentation>Return the vector OM, where O is the origin of the coordinate system of 'M'.
Useful to write 'vector(P - M);' instead of '(vector)(P - M)'.</documentation></function></asyxml>*/
- return M;
+ return M;
}
/*<asyxml><function type="point" signature="point(explicit vector)"><code></asyxml>*/
point point(explicit vector u)
{/*<asyxml></code><documentation>Return the point M so that OM = u, where O is the origin of the coordinate system of 'u'.</documentation></function></asyxml>*/
- return u.v;
+ return u.v;
}
/*<asyxml><function type="pair" signature="locate(explicit vector)"><code></asyxml>*/
pair locate(explicit vector v)
{/*<asyxml></code><documentation>Return the coordinates of 'v' in the default coordinate system (like casting vector to pair).</documentation></function></asyxml>*/
- return (pair)v;
+ return (pair)v;
}
/*<asyxml><function type="void" signature="show(Label,pen,arrowbar)"><code></asyxml>*/
void show(Label L, vector v, pen p = currentpen, arrowbar arrow = Arrow)
{/*<asyxml></code><documentation>Draw the vector v (from the origin of its coordinate system).</documentation></function></asyxml>*/
- coordsys R = v.v.coordsys;
- draw(L, R.O--v.v, p, arrow);
+ coordsys R = v.v.coordsys;
+ draw(L, R.O--v.v, p, arrow);
}
/*<asyxml><function type="vector" signature="changecoordsys(coordsys,vector)"><code></asyxml>*/
vector changecoordsys(coordsys R, vector v)
{/*<asyxml></code><documentation>Return the vector 'v' relatively to coordinate system 'R'.</documentation></function></asyxml>*/
- vector ov;
- ov.v = point(R, (locate(v) + R.O)/R);
- return ov;
+ vector ov;
+ ov.v = point(R, (locate(v) + R.O)/R);
+ return ov;
}
/*<asyxml><operator type = "vector" signature="*(real,explicit vector)"><code></asyxml>*/
vector operator *(real x, explicit vector v)
{/*<asyxml></code><documentation>Provide real * vector.</documentation></operator></asyxml>*/
- return x * v.v;
+ return x * v.v;
}
/*<asyxml><operator type = "vector" signature="/(explicit vector,real)"><code></asyxml>*/
vector operator /(explicit vector v, real x)
{/*<asyxml></code><documentation>Provide vector/real</documentation></operator></asyxml>*/
- return v.v/x;
+ return v.v/x;
}
/*<asyxml><operator type = "vector" signature="*(transform t,explicit vector)"><code></asyxml>*/
vector operator *(transform t, explicit vector v)
{/*<asyxml></code><documentation>Provide transform * vector.</documentation></operator></asyxml>*/
- return t * v.v;
+ return t * v.v;
}
/*<asyxml><operator type = "vector" signature="*(explicit point,explicit vector)"><code></asyxml>*/
vector operator *(explicit point M, explicit vector v)
{/*<asyxml></code><documentation>Provide point * vector</documentation></operator></asyxml>*/
- return M * v.v;
+ return M * v.v;
}
/*<asyxml><operator type = "point" signature="+(explicit point,explicit vector)"><code></asyxml>*/
point operator +(point M, explicit vector v)
{/*<asyxml></code><documentation>Return 'M' shifted by 'v'.</documentation></operator></asyxml>*/
- return shift(locate(v)) * M;
+ return shift(locate(v)) * M;
}
/*<asyxml><operator type = "point" signature="-(explicit point,explicit vector)"><code></asyxml>*/
point operator -(point M, explicit vector v)
{/*<asyxml></code><documentation>Return 'M' shifted by '-v'.</documentation></operator></asyxml>*/
- return shift(-locate(v)) * M;
+ return shift(-locate(v)) * M;
}
/*<asyxml><operator type = "vector" signature="-(explicit vector)"><code></asyxml>*/
vector operator -(explicit vector v)
{/*<asyxml></code><documentation>Provide -v.</documentation></operator></asyxml>*/
- return -v.v;
+ return -v.v;
}
/*<asyxml><operator type = "point" signature="+(explicit pair,explicit vector)"><code></asyxml>*/
@@ -998,7 +998,7 @@ point operator +(explicit pair m, explicit vector v)
{/*<asyxml></code><documentation>The pair 'm' is supposed to be the coordinates of
a point in the current coordinates system 'currentcoordsys'.
Return this point shifted by the vector 'v'.</documentation></operator></asyxml>*/
- return locate(m) + v;
+ return locate(m) + v;
}
/*<asyxml><operator type = "point" signature="-(explicit pair,explicit vector)"><code></asyxml>*/
@@ -1006,7 +1006,7 @@ point operator -(explicit pair m, explicit vector v)
{/*<asyxml></code><documentation>The pair 'm' is supposed to be the coordinates of
a point in the current coordinates system 'currentcoordsys'.
Return this point shifted by the vector '-v'.</documentation></operator></asyxml>*/
- return m + (-v);
+ return m + (-v);
}
/*<asyxml><operator type = "vector" signature="+(explicit vector,explicit vector)"><code></asyxml>*/
@@ -1014,9 +1014,9 @@ vector operator +(explicit vector v1, explicit vector v2)
{/*<asyxml></code><documentation>Provide vector + vector.
If the two vector haven't the same coordinate system, the returned
vector is relative to the default coordinate system (without warning).</documentation></operator></asyxml>*/
- coordsys R = v1.v.coordsys;
- if(samecoordsys(false, v1, v2)){R = defaultcoordsys;}
- return vector(R, (locate(v1) + locate(v2))/R);
+ coordsys R = v1.v.coordsys;
+ if(samecoordsys(false, v1, v2)){R = defaultcoordsys;}
+ return vector(R, (locate(v1) + locate(v2))/R);
}
/*<asyxml><operator type = "vector" signature="-(explicit vector, explicit vector)"><code></asyxml>*/
@@ -1024,31 +1024,31 @@ vector operator -(explicit vector v1, explicit vector v2)
{/*<asyxml></code><documentation>Provide vector - vector.
If the two vector haven't the same coordinate system, the returned
vector is relative to the default coordinate system (without warning).</documentation></operator></asyxml>*/
- return v1 + (-v2);
+ return v1 + (-v2);
}
/*<asyxml><operator type = "bool" signature="==(explicit vector,explicit vector)"><code></asyxml>*/
bool operator ==(explicit vector u, explicit vector v)
-{/*<asyxml></code><documentation>Return true iff |u - v|<EPS.</documentation></operator></asyxml>*/
- return abs(u - v) < EPS;
-}
+ {/*<asyxml></code><documentation>Return true iff |u - v|<EPS.</documentation></operator></asyxml>*/
+ return abs(u - v) < EPS;
+ }
/*<asyxml><function type="bool" signature="collinear(vector,vector)"><code></asyxml>*/
bool collinear(vector u, vector v)
{/*<asyxml></code><documentation>Return 'true' iff the vectors 'u' and 'v' are collinear.</documentation></function></asyxml>*/
- return abs(ypart((conj((pair)u) * (pair)v))) < EPS;
+ return abs(ypart((conj((pair)u) * (pair)v))) < EPS;
}
/*<asyxml><function type="vector" signature="unit(point)"><code></asyxml>*/
vector unit(point M)
{/*<asyxml></code><documentation>Return the unit vector according to the modulus of its coordinate system.</documentation></function></asyxml>*/
- return M/abs(M);
+ return M/abs(M);
}
/*<asyxml><function type="vector" signature="unit(vector)"><code></asyxml>*/
vector unit(vector u)
{/*<asyxml></code><documentation>Return the unit vector according to the modulus of its coordinate system.</documentation></function></asyxml>*/
- return u.v/abs(u.v);
+ return u.v/abs(u.v);
}
/*<asyxml><function type="real" signature="degrees(vector,coordsys,bool)"><code></asyxml>*/
@@ -1056,7 +1056,7 @@ real degrees(vector v,
coordsys R = v.v.coordsys,
bool warn = true)
{/*<asyxml></code><documentation>Return the angle of 'v' (in degrees) relatively to 'R'.</documentation></function></asyxml>*/
- return (degrees(locate(v), warn) - degrees(R.i))%360;
+ return (degrees(locate(v), warn) - degrees(R.i))%360;
}
/*<asyxml><function type="real" signature="angle(vector,coordsys,bool)"><code></asyxml>*/
@@ -1064,13 +1064,13 @@ real angle(explicit vector v,
coordsys R = v.v.coordsys,
bool warn = true)
{/*<asyxml></code><documentation>Return the angle of 'v' (in radians) relatively to 'R'.</documentation></function></asyxml>*/
- return radians(degrees(v, R, warn));
+ return radians(degrees(v, R, warn));
}
/*<asyxml><function type="vector" signature="conj(explicit vector)"><code></asyxml>*/
vector conj(explicit vector u)
{/*<asyxml></code><documentation>Conjugate.</documentation></function></asyxml>*/
- return conj(u.v);
+ return conj(u.v);
}
/*<asyxml><function type="transform" signature="rotate(explicit vector)"><code></asyxml>*/
@@ -1079,7 +1079,7 @@ transform rotate(explicit vector dir)
This is useful for rotating text along a line in the direction dir.
rotate(explicit point dir) is also defined.
</documentation></function></asyxml>*/
- return rotate(locate(dir));
+ return rotate(locate(dir));
}
transform rotate(explicit point dir){return rotate(locate(vector(dir)));}
// *......................COORDINATES......................*
@@ -1311,7 +1311,7 @@ void perpendicularmark(picture pic = currentpicture, point z,
g = margin(g, p).g;
draw(apic, g, p);
if(filltype != NoFill) filltype.fill(apic, (relpoint(g, 0) - relpoint(g, 0.5)+
- relpoint(g, 1))--g--cycle, p + solid);
+ relpoint(g, 1))--g--cycle, p + solid);
add(pic, apic, locate(z));
}
@@ -1360,7 +1360,7 @@ void markrightangle(picture pic = currentpicture, point A, point O,
pair Ap = A, Bp = B, Op = O;
pair dir = Ap - Op;
real a1 = degrees(dir);
- pair align = rotate(-a1) * unit(dir(Op--Ap, Op--Bp));
+ pair align = rotate(-a1) * dir(Op--Ap, Op--Bp);
perpendicularmark(pic = pic, z = O, align = align,
dir = dir, size = size, p = p,
margin = margin, filltype = filltype);
@@ -1700,80 +1700,80 @@ void write(explicit segment s)
/*<asyxml><operator type = "bool" signature="==(line,line)"><code></asyxml>*/
bool operator ==(line l1, line l2)
-{/*<asyxml></code><documentation>Provide the test 'line == line'.</documentation></operator></asyxml>*/
- return (collinear(l1.u, l2.u) &&
- abs(ypart((locate(l1.A) - locate(l1.B))/(locate(l1.A) - locate(l2.B)))) < epsgeo &&
- l1.extendA == l2.extendA && l1.extendB == l2.extendB);
-}
+ {/*<asyxml></code><documentation>Provide the test 'line == line'.</documentation></operator></asyxml>*/
+ return (collinear(l1.u, l2.u) &&
+ abs(ypart((locate(l1.A) - locate(l1.B))/(locate(l1.A) - locate(l2.B)))) < epsgeo &&
+ l1.extendA == l2.extendA && l1.extendB == l2.extendB);
+ }
/*<asyxml><operator type = "bool" signature="!=(line,line)"><code></asyxml>*/
bool operator !=(line l1, line l2)
{/*<asyxml></code><documentation>Provide the test 'line != line'.</documentation></operator></asyxml>*/
- return !(l1 == l2);
+ return !(l1 == l2);
}
/*<asyxml><operator type = "bool" signature="@(point,line)"><code></asyxml>*/
bool operator @(point m, line l)
{/*<asyxml></code><documentation>Provide the test 'point @ line'.
Return true iff 'm' is on the 'l'.</documentation></operator></asyxml>*/
- point M = changecoordsys(l.A.coordsys, m);
- if (abs(l.a * M.x + l.b * M.y + l.c) >= epsgeo) return false;
- if (l.extendA && l.extendB) return true;
- if (!l.extendA && !l.extendB) return between(l.A, M, l.B);
- if (l.extendA) return sameside(M, l.A, l.B);
- return sameside(M, l.B, l.A);
+ point M = changecoordsys(l.A.coordsys, m);
+ if (abs(l.a * M.x + l.b * M.y + l.c) >= epsgeo) return false;
+ if (l.extendA && l.extendB) return true;
+ if (!l.extendA && !l.extendB) return between(l.A, M, l.B);
+ if (l.extendA) return sameside(M, l.A, l.B);
+ return sameside(M, l.B, l.A);
}
/*<asyxml><function type="coordsys" signature="coordsys(line)"><code></asyxml>*/
coordsys coordsys(line l)
{/*<asyxml></code><documentation>Return the coordinate system in which 'l' is defined.</documentation></function></asyxml>*/
- return l.A.coordsys;
+ return l.A.coordsys;
}
/*<asyxml><function type="line" signature="reverse(line)"><code></asyxml>*/
line reverse(line l)
{/*<asyxml></code><documentation>Permute the points 'A' and 'B' of 'l' and so its orientation.</documentation></function></asyxml>*/
- return line(l.B, l.extendB, l.A, l.extendA);
+ return line(l.B, l.extendB, l.A, l.extendA);
}
/*<asyxml><function type="line" signature="extend(line)"><code></asyxml>*/
line extend(line l)
{/*<asyxml></code><documentation>Return the infinite line passing through 'l.A' and 'l.B'.</documentation></function></asyxml>*/
- line ol = l.copy();
- ol.extendA = true;
- ol.extendB = true;
- return ol;
+ line ol = l.copy();
+ ol.extendA = true;
+ ol.extendB = true;
+ return ol;
}
/*<asyxml><function type="line" signature="complementary(explicit line)"><code></asyxml>*/
line complementary(explicit line l)
{/*<asyxml></code><documentation>Return the complementary of a half-line with respect of
the full line 'l'.</documentation></function></asyxml>*/
- if (l.extendA && l.extendB)
- abort("complementary: the parameter is not a half-line.");
- point origin = l.extendA ? l.B : l.A;
- point ptdir = l.extendA ?
- rotate(180, l.B) * l.A : rotate(180, l.A) * l.B;
- return line(origin, false, ptdir);
+ if (l.extendA && l.extendB)
+ abort("complementary: the parameter is not a half-line.");
+ point origin = l.extendA ? l.B : l.A;
+ point ptdir = l.extendA ?
+ rotate(180, l.B) * l.A : rotate(180, l.A) * l.B;
+ return line(origin, false, ptdir);
}
/*<asyxml><function type="line[]" signature="complementary(explicit segment)"><code></asyxml>*/
line[] complementary(explicit segment s)
{/*<asyxml></code><documentation>Return the two half-lines of origin 's.A' and 's.B' respectively.</documentation></function></asyxml>*/
- line[] ol = new line[2];
- ol[0] = complementary(line(s.A, false, s.B));
- ol[1] = complementary(line(s.A, s.B, false));
- return ol;
+ line[] ol = new line[2];
+ ol[0] = complementary(line(s.A, false, s.B));
+ ol[1] = complementary(line(s.A, s.B, false));
+ return ol;
}
/*<asyxml><function type="line" signature="Ox(coordsys)"><code></asyxml>*/
line Ox(coordsys R = currentcoordsys)
{/*<asyxml></code><documentation>Return the x-axis of 'R'.</documentation></function></asyxml>*/
- return line(point(R, (0, 0)), point(R, E));
+ return line(point(R, (0, 0)), point(R, E));
}
/*<asyxml><constant type = "line" signature="Ox"><code></asyxml>*/
restricted line Ox = Ox();/*<asyxml></code><documentation>the x-axis of
- the default coordinate system.</documentation></constant></asyxml>*/
+ the default coordinate system.</documentation></constant></asyxml>*/
/*<asyxml><function type="line" signature="Oy(coordsys)"><code></asyxml>*/
line Oy(coordsys R = currentcoordsys)
@@ -1782,7 +1782,7 @@ line Oy(coordsys R = currentcoordsys)
}
/*<asyxml><constant type = "line" signature="Oy"><code></asyxml>*/
restricted line Oy = Oy();/*<asyxml></code><documentation>the y-axis of
- the default coordinate system.</documentation></constant></asyxml>*/
+ the default coordinate system.</documentation></constant></asyxml>*/
/*<asyxml><function type="line" signature="line(real,point)"><code></asyxml>*/
line line(real a, point A = point(currentcoordsys, (0, 0)))
@@ -1826,7 +1826,7 @@ line vline(coordsys R = currentcoordsys)
}
/*<asyxml><constant type = "line" signature="vline"><code></asyxml>*/
restricted line vline = vline();/*<asyxml></code><documentation>The vertical line in the current coordinate system passing
- through the origin of this system.</documentation></constant></asyxml>*/
+ through the origin of this system.</documentation></constant></asyxml>*/
/*<asyxml><function type="line" signature="hline(coordsys)"><code></asyxml>*/
line hline(coordsys R = currentcoordsys)
@@ -1837,7 +1837,7 @@ line hline(coordsys R = currentcoordsys)
}
/*<asyxml><constant type = "line" signature="hline"><code></asyxml>*/
line hline = hline();/*<asyxml></code><documentation>The horizontal line in the current coordinate system passing
- through the origin of this system.</documentation></constant></asyxml>*/
+ through the origin of this system.</documentation></constant></asyxml>*/
/*<asyxml><function type="line" signature="changecoordsys(coordsys,line)"><code></asyxml>*/
line changecoordsys(coordsys R, line l)
@@ -2358,11 +2358,11 @@ bqe bqe(coordsys R = currentcoordsys,
bqe changecoordsys(coordsys R, bqe bqe)
{/*<asyxml></code><documentation>Returns the bivariate quadratic equation relatively to 'R'.</documentation></function></asyxml>*/
pair i = coordinates(changecoordsys(R, vector(defaultcoordsys,
- bqe.coordsys.i)));
+ bqe.coordsys.i)));
pair j = coordinates(changecoordsys(R, vector(defaultcoordsys,
- bqe.coordsys.j)));
+ bqe.coordsys.j)));
pair O = coordinates(changecoordsys(R, point(defaultcoordsys,
- bqe.coordsys.O)));
+ bqe.coordsys.O)));
real a = bqe.a[0], b = bqe.a[1], c = bqe.a[2], d = bqe.a[3], f = bqe.a[4], g = bqe.a[5];
real ux = i.x, uy = i.y;
real vx = j.x, vy = j.y;
@@ -2372,14 +2372,14 @@ bqe changecoordsys(coordsys R, bqe bqe)
real bpp = (-2 * a * vx * vy + b * ux * vy + b * uy * vx - 2 * c * ux * uy)/D^2;
real cp = (a * vx^2 - b * ux * vx + c * ux^2)/D^2;
real dp = (-2a * ox * vy^2 + 2a * oy * vx * vy + 2b * ox * uy * vy-
- b * oy * ux * vy - b * oy * uy * vx - 2c * ox * uy^2 + 2c * oy * uy * ux)/D^2+
+ b * oy * ux * vy - b * oy * uy * vx - 2c * ox * uy^2 + 2c * oy * uy * ux)/D^2+
(d * vy - f * uy)/D;
real fp = (2a * ox * vx * vy - b * ox * ux * vy - 2a * oy * vx^2-
- b * ox * uy * vx + 2 * b * oy * ux * vx + 2c * ox * ux * uy - 2c * oy * ux^2)/D^2+
+ b * ox * uy * vx + 2 * b * oy * ux * vx + 2c * ox * ux * uy - 2c * oy * ux^2)/D^2+
(f * ux - d * vx)/D;
g = (a * ox^2 * vy^2 - 2a * ox * oy * vx * vy - b * ox^2 * uy * vy + b * ox * oy * ux * vy+
- a * oy^2 * vx^2 + b * ox * oy * uy * vx - b * oy^2 * ux * vx + c * ox^2 * uy^2-
- 2 * c * ox * oy * ux * uy + c * oy^2 * ux^2)/D^2+
+ a * oy^2 * vx^2 + b * ox * oy * uy * vx - b * oy^2 * ux * vx + c * ox^2 * uy^2-
+ 2 * c * ox * oy * ux * uy + c * oy^2 * ux^2)/D^2+
(d * oy * vx + f * ox * uy - d * ox * vy - f * oy * ux)/D + g;
bqe obqe;
obqe.a = approximate(new real[] {ap, bpp, cp, dp, fp, g});
@@ -2636,7 +2636,7 @@ struct hyperbola
this.b = a * sqrt(this.e^2 - 1);
this.p = a * (this.e^2 - 1);
point A = this.C + (a^2/this.c) * unit(P[0]-this.C);
- this.D1 = line(A, A + rotateO(90) * unit(A - this.C));
+ this.D1 = line(A, A + rotate(90,this.C.coordsys.O) * unit(A - this.C));
this.D2 = reverse(rotate(180, C) * D1);
this.V1 = C + a * unit(F1 - C);
this.V2 = C + a * unit(F2 - C);
@@ -3073,8 +3073,8 @@ parabola parabola(point M1, point M2, point M3, line l)
real gle = degrees(l);
coordsys Rp = cartesiansystem(R.O, rotate(gle) * R.i, rotate(gle) * R.j);
pts = new pair[] {coordinates(changecoordsys(Rp, M1)),
- coordinates(changecoordsys(Rp, M2)),
- coordinates(changecoordsys(Rp, M3))};
+ coordinates(changecoordsys(Rp, M2)),
+ coordinates(changecoordsys(Rp, M3))};
real[][] M;
real[] x;
for (int i = 0; i < 3; ++i) {
@@ -3560,10 +3560,10 @@ path arcfromcenter(explicit conic co, real angle1, real angle2,
path g;
if(co.e < 1)
g = arcfromcenter((ellipse)co, angle1,
- angle2, direction, n);
+ angle2, direction, n);
else if(co.e > 1)
g = arcfromcenter((hyperbola)co, angle1,
- angle2, n, direction);
+ angle2, n, direction);
else abort("arcfromcenter: does not exist for a parabola.");
return g;
}
@@ -3590,8 +3590,8 @@ bqe equation(ellipse el)
}
real[] coef = solve(M, x);
bqe bqe = changecoordsys(coordsys(el),
- bqe(defaultcoordsys,
- 1, coef[0], coef[1], coef[2], coef[3], coef[4]));
+ bqe(defaultcoordsys,
+ 1, coef[0], coef[1], coef[2], coef[3], coef[4]));
bqe.a = approximate(bqe.a);
return bqe;
}
@@ -4038,8 +4038,8 @@ real arclength(ellipse el, real angle1, real angle2,
// given form the center of the ellipse.
real gle = atan(el.a * tan(radians(a))/el.b)+
pi * (((a%90 == 0 && a != 0) ? floor(a/90) - 1 : floor(a/90)) -
- ((a%180 == 0) ? 0 : floor(a/180)) -
- (a%360 == 0 ? floor(a/(360)) : 0));
+ ((a%180 == 0) ? 0 : floor(a/180)) -
+ (a%360 == 0 ? floor(a/(360)) : 0));
/* // Uncomment to visualize the used branches
unitsize(2cm, 1cm);
import graph;
@@ -4076,7 +4076,7 @@ real arclength(parabola p, real angle)
{/*<asyxml></code><documentation>Return the arclength from 180 to 'angle' given from focus in the
canonical coordinate system of 'p'.</documentation></function></asyxml>*/
real a = p.a; /* In canonicalcartesiansystem(p) the equation of p
- is x = y^2/(4a) */
+ is x = y^2/(4a) */
// integrate(sqrt(1 + (x/(2 * a))^2), x);
real S(real t){return 0.5 * t * sqrt(1 + t^2/(4 * a^2)) + a * asinh(t/(2 * a));}
real R(real gle){return 2 * a/(1 - Cos(gle));}
@@ -4110,7 +4110,7 @@ struct abscissa
real x;/*<asyxml></code><documentation>The abscissa value.</documentation></property><property type = "int" signature="system"><code></asyxml>*/
int system;/*<asyxml></code><documentation>0 = relativesystem; 1 = curvilinearsystem; 2 = angularsystem; 3 = nodesystem</documentation></property><property type = "polarconicroutine" signature="polarconicroutine"><code></asyxml>*/
polarconicroutine polarconicroutine = fromCenter;/*<asyxml></code><documentation>The routine used with angular system and two foci conic section.
- Possible values are 'formCenter' and 'formFocus'.</documentation></property></asyxml>*/
+ Possible values are 'formCenter' and 'formFocus'.</documentation></property></asyxml>*/
/*<asyxml><method type = "abscissa" signature="copy()"><code></asyxml>*/
abscissa copy()
{/*<asyxml></code><documentation>Return a copy of this abscissa.</documentation></method></asyxml>*/
@@ -4800,7 +4800,7 @@ struct arc {
restricted real angle1, angle2;/*<asyxml></code><documentation>Values (in degrees) in ]-360, 360[.</documentation></property><property type = "bool" signature="direction"><code></asyxml>*/
bool direction = CCW;/*<asyxml></code><documentation>The arc will be drawn from 'angle1' to 'angle2' rotating in the direction 'direction'.</documentation></property><property type = "polarconicroutine" signature="polarconicroutine"><code></asyxml>*/
polarconicroutine polarconicroutine = currentpolarconicroutine;/*<asyxml></code><documentation>The routine to which the angles refer.
- If 'el' is a circle 'fromCenter' is always used.</documentation></property></asyxml>*/
+ If 'el' is a circle 'fromCenter' is always used.</documentation></property></asyxml>*/
/*<asyxml><method type = "void" signature="setangles(real,real,real)"><code></asyxml>*/
void setangles(real a0, real a1, real a2)
@@ -6478,7 +6478,7 @@ point[] intersectionpoints(line l, circle c)
coordsys Rc = cartesiansystem(c.C, (1, 0), (0, 1));
line ll = changecoordsys(Rc, l);
pair[] P = intersectionpoints(ll.A.coordinates, ll.B.coordinates,
- 1, 0, 1, 0, 0, -c.r^2);
+ 1, 0, 1, 0, 0, -c.r^2);
for (int i = 0; i < P.length; ++i) {
point inter = changecoordsys(R, point(Rc, P[i]));
if(inter @ l) op.push(inter);
@@ -6518,7 +6518,7 @@ point[] intersectionpoints(line l, ellipse el)
coordsys Rc = canonicalcartesiansystem(el);
line ll = changecoordsys(Rc, l);
pair[] P = intersectionpoints(ll.A.coordinates, ll.B.coordinates,
- 1/el.a^2, 0, 1/el.b^2, 0, 0, -1);
+ 1/el.a^2, 0, 1/el.b^2, 0, 0, -1);
for (int i = 0; i < P.length; ++i) {
point inter = changecoordsys(R, point(Rc, P[i]));
if(inter @ l) op.push(inter);
@@ -6575,7 +6575,7 @@ point[] intersectionpoints(line l, hyperbola h)
point[] op;
coordsys R = coordsys(h);
point A = intersectionpoint(l, h.A1), B = intersectionpoint(l, h.A2);
- point M = midpoint(segment(A, B));
+ point M = 0.5*(A + B);
bool tgt = Finite(M) ? M @ h : false;
if(tgt) {
if(M @ l) op.push(M);
@@ -6644,7 +6644,7 @@ point[] intersectionpoints(bqe bqe1, bqe bqe2)
if(abs(b[4]) > e) {
real D=b[4]^2;
c=new real[] {(a[0]*b[4]^2+a[2]*b[3]^2+
- (-2*a[2]*a[3])*b[3]+a[2]*a[3]^2)/D,
+ (-2*a[2]*a[3])*b[3]+a[2]*a[3]^2)/D,
-((-2*a[2]*b[3]+2*a[2]*a[3])*b[5]-a[3]*b[4]^2+
(2*a[2]*a[5])*b[3])/D,a[2]*(a[5]-b[5])^2/D+a[5]};
x=quadraticroots(c[0],c[1],c[2]);
diff --git a/Build/source/utils/asymptote/base/graph.asy b/Build/source/utils/asymptote/base/graph.asy
index 7498ce8bfdd..46a5d7d0647 100644
--- a/Build/source/utils/asymptote/base/graph.asy
+++ b/Build/source/utils/asymptote/base/graph.asy
@@ -42,14 +42,14 @@ scaleT Broken(real a, real b, bool automin=false, bool automax=automin)
return x-skip;
}
real Tinv(real x) {
- if(x <= a) return x;
- return x+skip;
+ if(x <= a) return x;
+ return x+skip;
}
return scaleT(T,Tinv,logarithmic=false,automin,automax);
}
// A "broken" logarithmic axis omitting the segment [a,b], where a and b are
-// automatically rounded to the nearest integral power of the base.
+// automatically rounded to the nearest integral power of the base.
scaleT BrokenLog(real a, real b, bool automin=false, bool automax=automin)
{
real A=round(Log.T(a));
@@ -92,7 +92,7 @@ void scale(picture pic=currentpicture, bool xautoscale=false,
Linear(zautoscale,zautoscale));
}
-struct scientific
+struct scientific
{
int sign;
real mantissa;
@@ -108,7 +108,7 @@ struct scientific
}
// Convert x to scientific notation
-scientific scientific(real x)
+scientific scientific(real x)
{
scientific s;
s.sign=sgn(x);
@@ -154,7 +154,7 @@ int[] divisors(int a, int b)
real upscale(real b, real a)
{
- if(b <= 5) b=5;
+ if(b <= 5) b=5;
else if (b > 10 && a >= 0 && b <= 12) b=12;
else if (b > 10 && (a >= 0 || 15 % -a == 0) && b <= 15) b=15;
else b=ceil(b/10)*10;
@@ -182,7 +182,7 @@ bounds autoscale(real Min, real Max, scaleT scale=Linear)
if(Min > 0) {Min=0; Max *= 2;}
else {Min *= 2; Max=0;}
}
-
+
int sign;
if(Min < 0 && Max <= 0) {real temp=-Min; Min=-Max; Max=temp; sign=-1;}
else sign=1;
@@ -203,7 +203,7 @@ bounds autoscale(real Min, real Max, scaleT scale=Linear)
while((b-a)*10.0^exp > 10*(Max-Min))
zoom();
-
+
real bsave=b;
if(b-a > (a >= 0 ? 8 : 6)) {
b=upscale(b,a);
@@ -211,11 +211,11 @@ bounds autoscale(real Min, real Max, scaleT scale=Linear)
if(a <= 5) a=0; else a=floor(a/10)*10;
} else a=-upscale(-a,-1);
}
-
+
// Redo b in case the value of a has changed
if(bsave-a > (a >= 0 ? 8 : 6))
b=upscale(bsave,a);
-
+
if(sign == -1) {real temp=-a; a=-b; b=temp;}
real Scale=10.0^exp;
m.min=scale.T(a*Scale);
@@ -266,7 +266,7 @@ ticklabel LogFormat(int base) {
ticklabel LogFormat=LogFormat(10);
ticklabel DefaultLogFormat=DefaultLogFormat(10);
-
+
// The default direction specifier.
pair zero(real) {return 0;}
@@ -275,7 +275,7 @@ struct ticklocate {
autoscaleT S; // Autoscaling transformation.
pair dir(real t); // Absolute 2D tick direction.
triple dir3(real t); // Absolute 3D tick direction.
- real time(real v); // Returns the time corresponding to the value v.
+ real time(real v); // Returns the time corresponding to the value v.
ticklocate copy() {
ticklocate T=new ticklocate;
T.a=a;
@@ -289,7 +289,7 @@ struct ticklocate {
}
autoscaleT defaultS;
-
+
typedef real valuetime(real);
valuetime linear(scalefcn S=identity, real Min, real Max)
@@ -300,7 +300,7 @@ valuetime linear(scalefcn S=identity, real Min, real Max)
ticklocate ticklocate(real a, real b, autoscaleT S=defaultS,
real tickmin=-infinity, real tickmax=infinity,
- real time(real)=null, pair dir(real)=zero)
+ real time(real)=null, pair dir(real)=zero)
{
if((valuetime) time == null) time=linear(S.T(),a,b);
ticklocate locate;
@@ -313,13 +313,13 @@ ticklocate ticklocate(real a, real b, autoscaleT S=defaultS,
locate.dir=dir;
return locate;
}
-
+
private struct locateT {
real t; // tick location time
pair Z; // tick location in frame coordinates
pair pathdir; // path direction in frame coordinates
pair dir; // tick direction in frame coordinates
-
+
void dir(transform T, path g, ticklocate locate, real t) {
pathdir=unit(shiftless(T)*dir(g,t));
pair Dir=locate.dir(t);
@@ -333,7 +333,7 @@ private struct locateT {
}
}
-pair ticklabelshift(pair align, pen p=currentpen)
+pair ticklabelshift(pair align, pen p=currentpen)
{
return 0.25*unit(align)*labelmargin(p);
}
@@ -347,7 +347,7 @@ void drawtick(frame f, transform T, path g, path g2, ticklocate locate,
locate2.calc(T,g2,locate,val);
draw(f,locate1.Z--locate2.Z,p);
} else
- if(sign == 0)
+ if(sign == 0)
draw(f,locate1.Z-Size*locate1.dir--locate1.Z+Size*locate1.dir,p);
else
draw(f,locate1.Z--locate1.Z+Size*sign*locate1.dir,p);
@@ -388,10 +388,10 @@ pair labeltick(frame d, transform T, path g, ticklocate locate, real val,
label(d,F.T*baseline(s,baselinetemplate),locate1.Z+shift,align,F.p,
F.filltype);
return locate1.pathdir;
-}
+}
// Add axis label L to frame f.
-void labelaxis(frame f, transform T, Label L, path g,
+void labelaxis(frame f, transform T, Label L, path g,
ticklocate locate=null, int sign=1, bool ticklabels=false)
{
Label L0=L.copy();
@@ -403,7 +403,7 @@ void labelaxis(frame f, transform T, Label L, path g,
locateT locate1;
locate1.dir(T,g,locate,t);
L0.align(L0.align,unit(-sgn(dot(sign*locate1.dir,perp))*perp));
- }
+ }
pair align=L0.align.dir;
if(L0.align.relative) align *= -perp;
pair alignperp=dot(align,perp)*perp;
@@ -477,7 +477,7 @@ bool axiscoverage(int N, transform T, path g, ticklocate locate, real Step,
// Check the tick coverage of a logarithmic axis.
bool logaxiscoverage(int N, transform T, path g, ticklocate locate, pair side,
- int sign, real Size, Label F, ticklabel ticklabel,
+ int sign, real Size, Label F, ticklabel ticklabel,
real limit, int first, int last)
{
bool loop=cyclic(g);
@@ -525,7 +525,7 @@ string autoformat(string format="", real norm ... real[] a)
int n=0;
bool Fixed=find(a >= 1e4-epsilon | (a > 0 & a <= 1e-4-epsilon)) < 0;
-
+
string Format=defaultformat(4,fixed=Fixed);
if(Fixed && n < 4) {
@@ -576,13 +576,13 @@ tickvalues generateticks(int sign, Label F="", ticklabel ticklabel=null,
if(size == 0) size=ticksize;
F=F.copy();
F.p(p);
-
+
if(F.align.dir != 0) side=F.align.dir;
else if(side == 0) side=((sign == 1) ? left : right);
-
+
bool ticklabels=false;
path G=T*g;
-
+
if(!locate.S.scale.logarithmic) {
real a=locate.S.Tinv(locate.a);
real b=locate.S.Tinv(locate.b);
@@ -594,15 +594,15 @@ tickvalues generateticks(int sign, Label F="", ticklabel ticklabel=null,
if(a > b) {real temp=a; a=b; b=temp;}
if(b-a < 100.0*epsilon*norm) b=a;
-
+
bool autotick=Step == 0 && N == 0;
-
- real tickmin=finite(locate.S.tickMin) && (autotick || locate.S.automin) ?
+
+ real tickmin=finite(locate.S.tickMin) && (autotick || locate.S.automin) ?
locate.S.Tinv(locate.S.tickMin) : a;
real tickmax=finite(locate.S.tickMax) && (autotick || locate.S.automax) ?
locate.S.Tinv(locate.S.tickMax) : b;
if(tickmin > tickmax) {real temp=tickmin; tickmin=tickmax; tickmax=temp;}
-
+
real inStep=Step;
bool calcStep=true;
@@ -630,7 +630,7 @@ tickvalues generateticks(int sign, Label F="", ticklabel ticklabel=null,
// Try using 2 ticks (otherwise 1);
int div=divisor[d+1];
Step=quotient(div,2)*len/div;
- calcStep=false;
+ calcStep=false;
if(axiscoverage(2,T,g,locate,Step,side,sign,Size,F,ticklabel,
norm,limit)) N=2;
else Step=len;
@@ -650,7 +650,7 @@ tickvalues generateticks(int sign, Label F="", ticklabel ticklabel=null,
}
}
}
-
+
if(inStep != 0 && !locate.S.automin) {
tickmin=floor(tickmin/Step)*Step;
len=tickmax-tickmin;
@@ -661,13 +661,13 @@ tickvalues generateticks(int sign, Label F="", ticklabel ticklabel=null,
if(N == 0) N=(int) (len/Step);
else Step=len/N;
}
-
+
if(n == 0) {
if(step != 0) n=ceil(Step/step);
} else step=Step/n;
-
+
b += epsilon*norm;
-
+
if(Size > 0) {
for(int i=0; i <= N; ++i) {
real val=tickmin+i*Step;
@@ -684,22 +684,22 @@ tickvalues generateticks(int sign, Label F="", ticklabel ticklabel=null,
}
}
}
-
+
} else { // Logarithmic
string format=F.s;
if(F.s == "%") F.s="";
int base=round(locate.S.scale.Tinv(1));
- if(ticklabel == null)
+ if(ticklabel == null)
ticklabel=format == "%" ? Format("") : DefaultLogFormat(base);
real a=locate.S.postscale.Tinv(locate.a);
real b=locate.S.postscale.Tinv(locate.b);
if(a > b) {real temp=a; a=b; b=temp;}
-
+
int first=floor(a-epsilon);
int last=ceil(b+epsilon);
-
+
if(N == 0) {
N=1;
while(N <= last-first) {
@@ -708,10 +708,10 @@ tickvalues generateticks(int sign, Label F="", ticklabel ticklabel=null,
++N;
}
}
-
+
if(N <= 2 && n == 0) n=base;
tickvalues.N=N;
-
+
if(N > 0) {
for(int i=first-1; i <= last+1; ++i) {
if(i >= a && i <= b)
@@ -725,14 +725,14 @@ tickvalues generateticks(int sign, Label F="", ticklabel ticklabel=null,
}
}
}
- }
+ }
return tickvalues;
}
// Signature of routines that draw labelled paths with ticks and tick labels.
typedef void ticks(frame, transform, Label, pair, path, path, pen,
arrowbar, margin, ticklocate, int[], bool opposite=false);
-
+
// Tick construction routine for a user-specified array of tick values.
ticks Ticks(int sign, Label F="", ticklabel ticklabel=null,
bool beginlabel=true, bool endlabel=true,
@@ -741,7 +741,7 @@ ticks Ticks(int sign, Label F="", ticklabel ticklabel=null,
real Size=0, real size=0, bool extend=false,
pen pTick=nullpen, pen ptick=nullpen)
{
- return new void(frame f, transform t, Label L, pair side, path g, path g2,
+ return new void(frame f, transform t, Label L, pair side, path g, path g2,
pen p, arrowbar arrow, margin margin, ticklocate locate,
int[] divisor, bool opposite) {
// Use local copy of context variables:
@@ -749,28 +749,28 @@ ticks Ticks(int sign, Label F="", ticklabel ticklabel=null,
pen pTick=pTick;
pen ptick=ptick;
ticklabel ticklabel=ticklabel;
-
+
real Size=Size;
real size=size;
if(Size == 0) Size=Ticksize;
if(size == 0) size=ticksize;
-
+
Label L=L.copy();
Label F=F.copy();
L.p(p);
F.p(p);
if(pTick == nullpen) pTick=p;
if(ptick == nullpen) ptick=pTick;
-
+
if(F.align.dir != 0) side=F.align.dir;
else if(side == 0) side=F.T*((sign == 1) ? left : right);
-
+
bool ticklabels=false;
path G=t*g;
path G2=t*g2;
-
+
scalefcn T;
-
+
real a,b;
if(locate.S.scale.logarithmic) {
a=locate.S.postscale.Tinv(locate.a);
@@ -781,11 +781,11 @@ ticks Ticks(int sign, Label F="", ticklabel ticklabel=null,
b=locate.S.Tinv(locate.b);
T=identity;
}
-
+
if(a > b) {real temp=a; a=b; b=temp;}
real norm=max(abs(a),abs(b));
-
+
string format=autoformat(F.s,norm...Ticks);
if(F.s == "%") F.s="";
if(ticklabel == null) {
@@ -809,7 +809,7 @@ ticks Ticks(int sign, Label F="", ticklabel ticklabel=null,
drawtick(f,t,g,g2,locate,val,size,sign,ptick,extend);
}
endgroup(f);
-
+
if(N == 0) N=1;
if(Size > 0 && !opposite) {
for(int i=(beginlabel ? 0 : 1);
@@ -821,7 +821,7 @@ ticks Ticks(int sign, Label F="", ticklabel ticklabel=null,
}
}
}
- if(L.s != "" && !opposite)
+ if(L.s != "" && !opposite)
labelaxis(f,t,L,G,locate,sign,ticklabels);
};
}
@@ -832,7 +832,7 @@ tickvalues None(tickvalues v) {return v;}
// Tickmodifier that removes all ticks in the intervals [a[i],b[i]].
tickmodifier OmitTickIntervals(real[] a, real[] b) {
- return new tickvalues(tickvalues v) {
+ return new tickvalues(tickvalues v) {
if(a.length != b.length) abort(differentlengths);
void omit(real[] A) {
if(A.length != 0) {
@@ -939,8 +939,8 @@ ticks Ticks(Label format="", ticklabel ticklabel=null,
begin,end,modify,Size,size,extend,pTick,ptick);
}
-ticks LeftTicks(Label format="", ticklabel ticklabel=null,
- bool beginlabel=true, bool endlabel=true,
+ticks LeftTicks(Label format="", ticklabel ticklabel=null,
+ bool beginlabel=true, bool endlabel=true,
real[] Ticks, real[] ticks=new real[],
real Size=0, real size=0, bool extend=false,
pen pTick=nullpen, pen ptick=nullpen)
@@ -949,8 +949,8 @@ ticks LeftTicks(Label format="", ticklabel ticklabel=null,
Ticks,ticks,Size,size,extend,pTick,ptick);
}
-ticks RightTicks(Label format="", ticklabel ticklabel=null,
- bool beginlabel=true, bool endlabel=true,
+ticks RightTicks(Label format="", ticklabel ticklabel=null,
+ bool beginlabel=true, bool endlabel=true,
real[] Ticks, real[] ticks=new real[],
real Size=0, real size=0, bool extend=false,
pen pTick=nullpen, pen ptick=nullpen)
@@ -959,8 +959,8 @@ ticks RightTicks(Label format="", ticklabel ticklabel=null,
Ticks,ticks,Size,size,extend,pTick,ptick);
}
-ticks Ticks(Label format="", ticklabel ticklabel=null,
- bool beginlabel=true, bool endlabel=true,
+ticks Ticks(Label format="", ticklabel ticklabel=null,
+ bool beginlabel=true, bool endlabel=true,
real[] Ticks, real[] ticks=new real[],
real Size=0, real size=0, bool extend=false,
pen pTick=nullpen, pen ptick=nullpen)
@@ -978,18 +978,18 @@ pair tickMin(picture pic)
{
return minbound(pic.userMin(),(pic.scale.x.tickMin,pic.scale.y.tickMin));
}
-
+
pair tickMax(picture pic)
{
return maxbound(pic.userMax(),(pic.scale.x.tickMax,pic.scale.y.tickMax));
}
-
+
int Min=-1;
int Value=0;
int Max=1;
int Both=2;
-// Structure used to communicate axis and autoscale settings to tick routines.
+// Structure used to communicate axis and autoscale settings to tick routines.
struct axisT {
int type; // -1 = min, 0 = given value, 1 = max, 2 = min/max
int type2; // for 3D axis
@@ -1062,7 +1062,7 @@ axis Right(bool extend=false)
};
}
-axis LeftRight(bool extend=false)
+axis LeftRight(bool extend=false)
{
return new void(picture pic, axisT axis) {
axis.type=Both;
@@ -1134,7 +1134,7 @@ YZero=YZero();
void axis(picture pic=currentpicture, Label L="", path g, path g2=nullpath,
pen p=currentpen, ticks ticks, ticklocate locate,
arrowbar arrow=None, margin margin=NoMargin,
- int[] divisor=new int[], bool above=false, bool opposite=false)
+ int[] divisor=new int[], bool above=false, bool opposite=false)
{
Label L=L.copy();
real t=reltime(g,0.5);
@@ -1146,9 +1146,9 @@ void axis(picture pic=currentpicture, Label L="", path g, path g2=nullpath,
ticks(d,t,L,0,g,g2,p,arrow,margin,locate,divisor,opposite);
(above ? add : prepend)(f,t*T*inverse(t)*d);
});
-
+
pic.addPath(g,p);
-
+
if(L.s != "") {
frame f;
Label L0=L.copy();
@@ -1195,7 +1195,7 @@ void xaxisAt(picture pic=currentpicture, Label L="", axis axis,
pic.scale.x.tickMax=mx.max;
divisor=mx.divisor;
}
-
+
real fuzz=epsilon*max(abs(a.x),abs(b.x));
a -= (fuzz,0);
b += (fuzz,0);
@@ -1211,8 +1211,8 @@ void xaxisAt(picture pic=currentpicture, Label L="", axis axis,
y2=pic.scale.y.automax() ? tickMax(pic).y : pic.userMax().y;
y=opposite ? y2 :
(pic.scale.y.automin() ? tickMin(pic).y : pic.userMin().y);
- }
- else if(type == Min)
+ }
+ else if(type == Min)
y=pic.scale.y.automin() ? tickMin(pic).y : pic.userMin().y;
else if(type == Max)
y=pic.scale.y.automax() ? tickMax(pic).y : pic.userMax().y;
@@ -1229,7 +1229,7 @@ void xaxisAt(picture pic=currentpicture, Label L="", axis axis,
pic.addPoint(a,min(p));
pic.addPoint(a,max(p));
}
-
+
if(finite(b)) {
pic.addPoint(b,min(p));
pic.addPoint(b,max(p));
@@ -1299,13 +1299,13 @@ void yaxisAt(picture pic=currentpicture, Label L="", axis axis,
ticklocate(a.y,b.y,pic.scale.y),divisor,opposite);
(above ? add : prepend)(f,t*T*tinv*d);
});
-
+
void bounds() {
if(type == Both) {
x2=pic.scale.x.automax() ? tickMax(pic).x : pic.userMax().x;
- x=opposite ? x2 :
+ x=opposite ? x2 :
(pic.scale.x.automin() ? tickMin(pic).x : pic.userMin().x);
- } else if(type == Min)
+ } else if(type == Min)
x=pic.scale.x.automin() ? tickMin(pic).x : pic.userMin().x;
else if(type == Max)
x=pic.scale.x.automax() ? tickMax(pic).x : pic.userMax().x;
@@ -1317,17 +1317,17 @@ void yaxisAt(picture pic=currentpicture, Label L="", axis axis,
pair b=(x,Ymax);
pair a2=(x2,Ymin);
pair b2=(x2,Ymax);
-
+
if(finite(a)) {
pic.addPoint(a,min(p));
pic.addPoint(a,max(p));
}
-
+
if(finite(b)) {
pic.addPoint(b,min(p));
pic.addPoint(b,max(p));
}
-
+
if(finite(a) && finite(b)) {
frame d;
ticks(d,pic.scaling(warn=false),L,side,
@@ -1361,32 +1361,32 @@ void xlimits(picture pic=currentpicture, real min=-infinity, real max=infinity,
bool crop=NoCrop)
{
if(min > max) return;
-
+
pic.scale.x.automin=min <= -infinity;
pic.scale.x.automax=max >= infinity;
-
+
bounds mx;
if(pic.scale.x.automin() || pic.scale.x.automax())
mx=autoscale(pic.userMin().x,pic.userMax().x,pic.scale.x.scale);
-
+
if(pic.scale.x.automin) {
if(pic.scale.x.automin()) pic.userMinx(mx.min);
} else pic.userMinx(min(pic.scale.x.T(min),pic.scale.x.T(max)));
-
+
if(pic.scale.x.automax) {
if(pic.scale.x.automax()) pic.userMaxx(mx.max);
} else pic.userMaxx(max(pic.scale.x.T(min),pic.scale.x.T(max)));
-
+
if(crop) {
pair userMin=pic.userMin();
pair userMax=pic.userMax();
pic.bounds.xclip(userMin.x,userMax.x);
pic.clip(userMin, userMax,
- new void (frame f, transform t, transform T, pair, pair) {
- frame Tinvf=T == identity() ? f : t*inverse(T)*inverse(t)*f;
- clip(f,T*box(((t*userMin).x,(min(Tinvf)).y),
- ((t*userMax).x,(max(Tinvf)).y)));
- });
+ new void (frame f, transform t, transform T, pair, pair) {
+ frame Tinvf=T == identity() ? f : t*inverse(T)*inverse(t)*f;
+ clip(f,T*box(((t*userMin).x,(min(Tinvf)).y),
+ ((t*userMax).x,(max(Tinvf)).y)));
+ });
}
}
@@ -1395,37 +1395,37 @@ void ylimits(picture pic=currentpicture, real min=-infinity, real max=infinity,
bool crop=NoCrop)
{
if(min > max) return;
-
+
pic.scale.y.automin=min <= -infinity;
pic.scale.y.automax=max >= infinity;
-
+
bounds my;
if(pic.scale.y.automin() || pic.scale.y.automax())
my=autoscale(pic.userMin().y,pic.userMax().y,pic.scale.y.scale);
-
+
if(pic.scale.y.automin) {
if(pic.scale.y.automin()) pic.userMiny(my.min);
} else pic.userMiny(min(pic.scale.y.T(min),pic.scale.y.T(max)));
-
+
if(pic.scale.y.automax) {
if(pic.scale.y.automax()) pic.userMaxy(my.max);
} else pic.userMaxy(max(pic.scale.y.T(min),pic.scale.y.T(max)));
-
+
if(crop) {
pair userMin=pic.userMin();
pair userMax=pic.userMax();
pic.bounds.yclip(userMin.y,userMax.y);
- pic.clip(userMin, userMax,
- new void (frame f, transform t, transform T, pair, pair) {
- frame Tinvf=T == identity() ? f : t*inverse(T)*inverse(t)*f;
- clip(f,T*box(((min(Tinvf)).x,(t*userMin).y),
- ((max(Tinvf)).x,(t*userMax).y)));
- });
+ pic.clip(userMin, userMax,
+ new void (frame f, transform t, transform T, pair, pair) {
+ frame Tinvf=T == identity() ? f : t*inverse(T)*inverse(t)*f;
+ clip(f,T*box(((min(Tinvf)).x,(t*userMin).y),
+ ((max(Tinvf)).x,(t*userMax).y)));
+ });
}
}
// Crop a picture to the current user-space picture limits.
-void crop(picture pic=currentpicture)
+void crop(picture pic=currentpicture)
{
xlimits(pic,false);
ylimits(pic,false);
@@ -1441,14 +1441,14 @@ void limits(picture pic=currentpicture, pair min, pair max, bool crop=NoCrop)
if(crop && pic.userSetx() && pic.userSety())
clip(pic,box(pic.userMin(),pic.userMax()));
}
-
+
// Internal routine to autoscale the user limits of a picture.
void autoscale(picture pic=currentpicture, axis axis)
{
if(!pic.scale.set) {
bounds mx,my;
pic.scale.set=true;
-
+
if(pic.userSetx()) {
mx=autoscale(pic.userMin().x,pic.userMax().x,pic.scale.x.scale);
if(pic.scale.x.scale.logarithmic &&
@@ -1459,7 +1459,7 @@ void autoscale(picture pic=currentpicture, axis axis)
pic.userMaxx2(ceil(pic.userMax().x));
}
} else {mx.min=mx.max=0; pic.scale.set=false;}
-
+
if(pic.userSety()) {
my=autoscale(pic.userMin().y,pic.userMax().y,pic.scale.y.scale);
if(pic.scale.y.scale.logarithmic &&
@@ -1470,7 +1470,7 @@ void autoscale(picture pic=currentpicture, axis axis)
pic.userMaxy2(ceil(pic.userMax().y));
}
} else {my.min=my.max=0; pic.scale.set=false;}
-
+
pic.scale.x.tickMin=mx.min;
pic.scale.x.tickMax=mx.max;
pic.scale.y.tickMin=my.min;
@@ -1487,7 +1487,7 @@ void xaxis(picture pic=currentpicture, Label L="", axis axis=YZero,
bool above=false)
{
if(xmin > xmax) return;
-
+
if(pic.scale.x.automin && xmin > -infinity) pic.scale.x.automin=false;
if(pic.scale.x.automax && xmax < infinity) pic.scale.x.automax=false;
@@ -1495,20 +1495,20 @@ void xaxis(picture pic=currentpicture, Label L="", axis axis=YZero,
axis(pic,axis);
autoscale(pic,axis);
}
-
+
Label L=L.copy();
bool newticks=false;
-
+
if(xmin != -infinity) {
xmin=pic.scale.x.T(xmin);
newticks=true;
}
-
+
if(xmax != infinity) {
xmax=pic.scale.x.T(xmax);
newticks=true;
}
-
+
if(newticks && pic.userSetx() && ticks != NoTicks) {
if(xmin == -infinity) xmin=pic.userMin().x;
if(xmax == infinity) xmax=pic.userMax().x;
@@ -1517,16 +1517,16 @@ void xaxis(picture pic=currentpicture, Label L="", axis axis=YZero,
pic.scale.x.tickMax=mx.max;
axis.xdivisor=mx.divisor;
}
-
+
axis(pic,axis);
-
+
if(xmin == -infinity && !axis.extend) {
if(pic.scale.set)
xmin=pic.scale.x.automin() ? pic.scale.x.tickMin :
max(pic.scale.x.tickMin,pic.userMin().x);
else xmin=pic.userMin().x;
}
-
+
if(xmax == infinity && !axis.extend) {
if(pic.scale.set)
xmax=pic.scale.x.automax() ? pic.scale.x.tickMax :
@@ -1536,7 +1536,7 @@ void xaxis(picture pic=currentpicture, Label L="", axis axis=YZero,
if(L.defaultposition) L.position(axis.position);
L.align(L.align,axis.align);
-
+
xaxisAt(pic,L,axis,xmin,xmax,p,ticks,arrow,margin,above);
if(axis.type == Both)
xaxisAt(pic,L,axis,xmin,xmax,p,ticks,arrow,margin,above,true);
@@ -1552,25 +1552,25 @@ void yaxis(picture pic=currentpicture, Label L="", axis axis=XZero,
if(pic.scale.y.automin && ymin > -infinity) pic.scale.y.automin=false;
if(pic.scale.y.automax && ymax < infinity) pic.scale.y.automax=false;
-
+
if(!pic.scale.set) {
axis(pic,axis);
autoscale(pic,axis);
}
-
+
Label L=L.copy();
bool newticks=false;
-
+
if(ymin != -infinity) {
ymin=pic.scale.y.T(ymin);
newticks=true;
}
-
+
if(ymax != infinity) {
ymax=pic.scale.y.T(ymax);
newticks=true;
}
-
+
if(newticks && pic.userSety() && ticks != NoTicks) {
if(ymin == -infinity) ymin=pic.userMin().y;
if(ymax == infinity) ymax=pic.userMax().y;
@@ -1579,17 +1579,17 @@ void yaxis(picture pic=currentpicture, Label L="", axis axis=XZero,
pic.scale.y.tickMax=my.max;
axis.ydivisor=my.divisor;
}
-
+
axis(pic,axis);
-
+
if(ymin == -infinity && !axis.extend) {
if(pic.scale.set)
ymin=pic.scale.y.automin() ? pic.scale.y.tickMin :
max(pic.scale.y.tickMin,pic.userMin().y);
else ymin=pic.userMin().y;
}
-
-
+
+
if(ymax == infinity && !axis.extend) {
if(pic.scale.set)
ymax=pic.scale.y.automax() ? pic.scale.y.tickMax :
@@ -1599,14 +1599,14 @@ void yaxis(picture pic=currentpicture, Label L="", axis axis=XZero,
if(L.defaultposition) L.position(axis.position);
L.align(L.align,axis.align);
-
+
if(autorotate && L.defaulttransform) {
frame f;
add(f,Label(L.s,(0,0),L.p));
- if(length(max(f)-min(f)) > ylabelwidth*fontsize(L.p))
+ if(length(max(f)-min(f)) > ylabelwidth*fontsize(L.p))
L.transform(rotate(90));
}
-
+
yaxisAt(pic,L,axis,ymin,ymax,p,ticks,arrow,margin,above);
if(axis.type == Both)
yaxisAt(pic,L,axis,ymin,ymax,p,ticks,arrow,margin,above,true);
@@ -1627,7 +1627,7 @@ void axes(picture pic=currentpicture, Label xlabel="", Label ylabel="",
void xequals(picture pic=currentpicture, Label L="", real x,
bool extend=false, real ymin=-infinity, real ymax=infinity,
pen p=currentpen, ticks ticks=NoTicks,
- arrowbar arrow=None, margin margin=NoMargin, bool above=true)
+ arrowbar arrow=None, margin margin=NoMargin, bool above=true)
{
yaxis(pic,L,XEquals(x,extend),ymin,ymax,p,ticks,arrow,margin,above);
}
@@ -1682,7 +1682,7 @@ void xtick(picture pic=currentpicture, real x, pair dir=N,
}
void ytick(picture pic=currentpicture, explicit pair z, pair dir=E,
- real size=Ticksize, pen p=currentpen)
+ real size=Ticksize, pen p=currentpen)
{
tick(pic,z,dir,size,p);
}
@@ -1799,7 +1799,7 @@ picture secondaryX(picture primary=currentpicture, void f(picture))
bounds a=autoscale(pic.userMin().x,pic.userMax().x,pic.scale.x.scale);
real bmin=pic.scale.x.automin() ? a.min : pic.userMin().x;
real bmax=pic.scale.x.automax() ? a.max : pic.userMax().x;
-
+
real denom=bmax-bmin;
if(denom != 0) {
pic.erase();
@@ -1849,7 +1849,7 @@ picture secondaryY(picture primary=currentpicture, void f(picture))
typedef guide graph(pair f(real), real, real, int);
typedef guide[] multigraph(pair f(real), real, real, int);
-
+
graph graph(interpolate join)
{
return new guide(pair f(real), real a, real b, int n) {
@@ -2055,7 +2055,7 @@ guide[] graph(picture pic=currentpicture, real[] x, real[] y, bool3[] cond,
}
// Connect points in z into segments corresponding to consecutive true elements
-// of b using interpolation operator join.
+// of b using interpolation operator join.
path[] segment(pair[] z, bool[] cond, interpolate join=operator --)
{
checkconditionlength(cond.length,z.length);
@@ -2102,7 +2102,7 @@ void errorbar(picture pic, pair z, pair dp, pair dm, pen p=currentpen,
if(dmy != dpy) draw(pic,Scale(pic,z+(0,dmy))--Scale(pic,z+(0,dpy)),p,
Bars(size));
}
-
+
void errorbars(picture pic=currentpicture, pair[] z, pair[] dp, pair[] dm={},
bool[] cond={}, pen p=currentpen, real size=0)
{
@@ -2157,13 +2157,13 @@ picture vectorfield(path vector(real), path g, int n, bool truesize=false,
real x=(n == 1) ? 0.5 : i/(n-1);
if(truesize)
draw(relpoint(g,x),pic,vector(x),p,arrow);
- else
+ else
draw(pic,shift(relpoint(g,x))*vector(x),p,arrow,margin);
}
return pic;
}
-real maxlength(pair a, pair b, int nx, int ny)
+real maxlength(pair a, pair b, int nx, int ny)
{
return min((b.x-a.x)/nx,(b.y-a.y)/ny);
}
diff --git a/Build/source/utils/asymptote/base/graph3.asy b/Build/source/utils/asymptote/base/graph3.asy
index 1fe63490c9b..f690c6a3c10 100644
--- a/Build/source/utils/asymptote/base/graph3.asy
+++ b/Build/source/utils/asymptote/base/graph3.asy
@@ -9,7 +9,7 @@ direction3 Dir(triple dir) {return new triple(real) {return dir;};}
ticklocate ticklocate(real a, real b, autoscaleT S=defaultS,
real tickmin=-infinity, real tickmax=infinity,
- real time(real)=null, direction3 dir)
+ real time(real)=null, direction3 dir)
{
if((valuetime) time == null) time=linear(S.T(),a,b);
ticklocate locate;
@@ -23,13 +23,13 @@ ticklocate ticklocate(real a, real b, autoscaleT S=defaultS,
locate.dir3=dir;
return locate;
}
-
+
private struct locateT {
real t; // tick location time
triple V; // tick location in frame coordinates
triple pathdir; // path direction in frame coordinates
triple dir; // tick direction in frame coordinates
-
+
void dir(transform3 T, path3 g, ticklocate locate, real t) {
pathdir=unit(shiftless(T)*dir(g,t));
triple Dir=locate.dir3(t);
@@ -60,7 +60,7 @@ void drawtick(picture pic, transform3 T, path3 g, path3 g2,
draw(pic,G,p,name="tick");
}
-triple ticklabelshift(triple align, pen p=currentpen)
+triple ticklabelshift(triple align, pen p=currentpen)
{
return 0.25*unit(align)*labelmargin(p);
}
@@ -100,10 +100,10 @@ void labeltick(picture pic, transform3 T, path3 g,
if(s != "")
label(pic,F.defaulttransform3 ? baseline(s,baselinetemplate) : F.T3*s,v,
align,F.p);
-}
+}
// Add axis label L to frame f.
-void labelaxis(picture pic, transform3 T, Label L, path3 g,
+void labelaxis(picture pic, transform3 T, Label L, path3 g,
ticklocate locate=null, int sign=1, bool ticklabels=false)
{
triple m=pic.min(identity4);
@@ -118,7 +118,7 @@ void labelaxis(picture pic, transform3 T, Label L, path3 g,
picture F;
if(L.align.dir3 == O)
align=unit(invert(L.align.dir,v,P))*abs(L.align.dir);
-
+
if(ticklabels && locate != null && piecewisestraight(g)) {
locateT locate1;
locate1.dir(T,g,locate,t);
@@ -171,25 +171,25 @@ ticks3 Ticks3(int sign, Label F="", ticklabel ticklabel=null,
pen pTick=pTick;
pen ptick=ptick;
ticklabel ticklabel=ticklabel;
-
+
real Size=Size;
real size=size;
if(Size == 0) Size=Ticksize;
if(size == 0) size=ticksize;
-
+
Label L=L.copy();
Label F=F.copy();
L.p(p);
F.p(p);
if(pTick == nullpen) pTick=p;
if(ptick == nullpen) ptick=pTick;
-
+
bool ticklabels=false;
path3 G=t*g;
path3 G2=t*g2;
-
+
scalefcn T;
-
+
real a,b;
if(locate.S.scale.logarithmic) {
a=locate.S.postscale.Tinv(locate.a);
@@ -200,11 +200,11 @@ ticks3 Ticks3(int sign, Label F="", ticklabel ticklabel=null,
b=locate.S.Tinv(locate.b);
T=identity;
}
-
+
if(a > b) {real temp=a; a=b; b=temp;}
real norm=max(abs(a),abs(b));
-
+
string format=autoformat(F.s,norm...Ticks);
if(F.s == "%") F.s="";
if(ticklabel == null) {
@@ -324,8 +324,8 @@ ticks3 InOutTicks(Label format="", ticklabel ticklabel=null,
begin,end,modify,Size,size,extend,pTick,ptick);
}
-ticks3 InTicks(Label format="", ticklabel ticklabel=null,
- bool beginlabel=true, bool endlabel=true,
+ticks3 InTicks(Label format="", ticklabel ticklabel=null,
+ bool beginlabel=true, bool endlabel=true,
real[] Ticks, real[] ticks=new real[],
real Size=0, real size=0, bool extend=false,
pen pTick=nullpen, pen ptick=nullpen)
@@ -334,8 +334,8 @@ ticks3 InTicks(Label format="", ticklabel ticklabel=null,
Ticks,ticks,Size,size,extend,pTick,ptick);
}
-ticks3 OutTicks(Label format="", ticklabel ticklabel=null,
- bool beginlabel=true, bool endlabel=true,
+ticks3 OutTicks(Label format="", ticklabel ticklabel=null,
+ bool beginlabel=true, bool endlabel=true,
real[] Ticks, real[] ticks=new real[],
real Size=0, real size=0, bool extend=false,
pen pTick=nullpen, pen ptick=nullpen)
@@ -344,8 +344,8 @@ ticks3 OutTicks(Label format="", ticklabel ticklabel=null,
Ticks,ticks,Size,size,extend,pTick,ptick);
}
-ticks3 InOutTicks(Label format="", ticklabel ticklabel=null,
- bool beginlabel=true, bool endlabel=true,
+ticks3 InOutTicks(Label format="", ticklabel ticklabel=null,
+ bool beginlabel=true, bool endlabel=true,
real[] Ticks, real[] ticks=new real[],
real Size=0, real size=0, bool extend=false,
pen pTick=nullpen, pen ptick=nullpen)
@@ -362,15 +362,15 @@ InOutTicks=InOutTicks();
triple tickMin3(picture pic)
{
return minbound(pic.userMin(),(pic.scale.x.tickMin,pic.scale.y.tickMin,
- pic.scale.z.tickMin));
+ pic.scale.z.tickMin));
}
-
+
triple tickMax3(picture pic)
{
return maxbound(pic.userMax(),(pic.scale.x.tickMax,pic.scale.y.tickMax,
- pic.scale.z.tickMax));
+ pic.scale.z.tickMax));
}
-
+
axis Bounds(int type=Both, int type2=Both, triple align=O, bool extend=false)
{
return new void(picture pic, axisT axis) {
@@ -470,22 +470,22 @@ XYZero=XYZero();
void axis(picture pic=currentpicture, Label L="", path3 g, path3 g2=nullpath3,
pen p=currentpen, ticks3 ticks, ticklocate locate,
arrowbar3 arrow=None, margin3 margin=NoMargin3,
- int[] divisor=new int[], bool above=false, bool opposite=false)
+ int[] divisor=new int[], bool above=false, bool opposite=false)
{
Label L=L.copy();
real t=reltime(g,0.5);
if(L.defaultposition) L.position(t);
divisor=copy(divisor);
locate=locate.copy();
-
+
pic.add(new void (picture f, transform3 t, transform3 T, triple, triple) {
picture d;
ticks(d,t,L,g,g2,p,arrow,margin,locate,divisor,opposite,true);
add(f,t*T*inverse(t)*d);
},above=above);
-
+
addPath(pic,g,p);
-
+
if(L.s != "") {
frame f;
Label L0=L.copy();
@@ -552,7 +552,7 @@ void xaxis3At(picture pic=currentpicture, Label L="", axis axis,
y0=y2;
z0=z;
}
-
+
triple a2=xmin == -infinity ? tinv*(lb.x-min3(p).x,ytrans(t,y0),
ztrans(t,z0)) : (xmin,y0,z0);
triple b2=xmax == infinity ? tinv*(rt.x-max3(p).x,ytrans(t,y0),
@@ -564,7 +564,7 @@ void xaxis3At(picture pic=currentpicture, Label L="", axis axis,
pic.scale.x.tickMax=mx.max;
divisor=mx.divisor;
}
-
+
triple fuzz=X*epsilon*max(abs(a.x),abs(b.x));
a -= fuzz;
b += fuzz;
@@ -584,7 +584,7 @@ void xaxis3At(picture pic=currentpicture, Label L="", axis axis,
y=pic.scale.y.automax() ? tickMax3(pic).y : pic.userMax().y;
else if(type == Both) {
y2=pic.scale.y.automax() ? tickMax3(pic).y : pic.userMax().y;
- y=opposite ? y2 :
+ y=opposite ? y2 :
(pic.scale.y.automin() ? tickMin3(pic).y : pic.userMin().y);
}
@@ -594,7 +594,7 @@ void xaxis3At(picture pic=currentpicture, Label L="", axis axis,
z=pic.scale.z.automax() ? tickMax3(pic).z : pic.userMax().z;
else if(type2 == Both) {
z2=pic.scale.z.automax() ? tickMax3(pic).z : pic.userMax().z;
- z=opposite2 ? z2 :
+ z=opposite2 ? z2 :
(pic.scale.z.automin() ? tickMin3(pic).z : pic.userMin().z);
}
@@ -610,7 +610,7 @@ void xaxis3At(picture pic=currentpicture, Label L="", axis axis,
pic.addPoint(a,min3(p));
pic.addPoint(a,max3(p));
}
-
+
if(finite(b)) {
pic.addPoint(b,min3(p));
pic.addPoint(b,max3(p));
@@ -650,7 +650,7 @@ void xaxis3At(picture pic=currentpicture, Label L="", axis axis,
pic.scale.x.bound.push(bounds);
}
-// An internal routine to draw an x axis at a particular y value.
+// An internal routine to draw a y axis at a particular value.
void yaxis3At(picture pic=currentpicture, Label L="", axis axis,
real ymin=-infinity, real ymax=infinity, pen p=currentpen,
ticks3 ticks=NoTicks3,
@@ -685,19 +685,19 @@ void yaxis3At(picture pic=currentpicture, Label L="", axis axis,
x0=x2;
z0=z;
}
-
+
triple a2=ymin == -infinity ? tinv*(xtrans(t,x0),lb.y-min3(p).y,
ztrans(t,z0)) : (x0,ymin,z0);
triple b2=ymax == infinity ? tinv*(xtrans(t,x0),rt.y-max3(p).y,
ztrans(t,z0)) : (x0,ymax,z0);
-
+
if(ymin == -infinity || ymax == infinity) {
bounds my=autoscale(a.y,b.y,pic.scale.y.scale);
pic.scale.y.tickMin=my.min;
pic.scale.y.tickMax=my.max;
divisor=my.divisor;
}
-
+
triple fuzz=Y*epsilon*max(abs(a.y),abs(b.y));
a -= fuzz;
b += fuzz;
@@ -717,7 +717,7 @@ void yaxis3At(picture pic=currentpicture, Label L="", axis axis,
x=pic.scale.x.automax() ? tickMax3(pic).x : pic.userMax().x;
else if(type == Both) {
x2=pic.scale.x.automax() ? tickMax3(pic).x : pic.userMax().x;
- x=opposite ? x2 :
+ x=opposite ? x2 :
(pic.scale.x.automin() ? tickMin3(pic).x : pic.userMin().x);
}
@@ -727,7 +727,7 @@ void yaxis3At(picture pic=currentpicture, Label L="", axis axis,
z=pic.scale.z.automax() ? tickMax3(pic).z : pic.userMax().z;
else if(type2 == Both) {
z2=pic.scale.z.automax() ? tickMax3(pic).z : pic.userMax().z;
- z=opposite2 ? z2 :
+ z=opposite2 ? z2 :
(pic.scale.z.automin() ? tickMin3(pic).z : pic.userMin().z);
}
@@ -743,7 +743,7 @@ void yaxis3At(picture pic=currentpicture, Label L="", axis axis,
pic.addPoint(a,min3(p));
pic.addPoint(a,max3(p));
}
-
+
if(finite(b)) {
pic.addPoint(b,min3(p));
pic.addPoint(b,max3(p));
@@ -783,7 +783,7 @@ void yaxis3At(picture pic=currentpicture, Label L="", axis axis,
pic.scale.y.bound.push(bounds);
}
-// An internal routine to draw an x axis at a particular y value.
+// An internal routine to draw a z axis at a particular value.
void zaxis3At(picture pic=currentpicture, Label L="", axis axis,
real zmin=-infinity, real zmax=infinity, pen p=currentpen,
ticks3 ticks=NoTicks3,
@@ -818,7 +818,7 @@ void zaxis3At(picture pic=currentpicture, Label L="", axis axis,
x0=x2;
y0=y;
}
-
+
triple a2=zmin == -infinity ? tinv*(xtrans(t,x0),ytrans(t,y0),
lb.z-min3(p).z) : (x0,y0,zmin);
triple b2=zmax == infinity ? tinv*(xtrans(t,x0),ytrans(t,y0),
@@ -830,7 +830,7 @@ void zaxis3At(picture pic=currentpicture, Label L="", axis axis,
pic.scale.z.tickMax=mz.max;
divisor=mz.divisor;
}
-
+
triple fuzz=Z*epsilon*max(abs(a.z),abs(b.z));
a -= fuzz;
b += fuzz;
@@ -850,7 +850,7 @@ void zaxis3At(picture pic=currentpicture, Label L="", axis axis,
x=pic.scale.x.automax() ? tickMax3(pic).x : pic.userMax().x;
else if(type == Both) {
x2=pic.scale.x.automax() ? tickMax3(pic).x : pic.userMax().x;
- x=opposite ? x2 :
+ x=opposite ? x2 :
(pic.scale.x.automin() ? tickMin3(pic).x : pic.userMin().x);
}
@@ -860,7 +860,7 @@ void zaxis3At(picture pic=currentpicture, Label L="", axis axis,
y=pic.scale.y.automax() ? tickMax3(pic).y : pic.userMax().y;
else if(type2 == Both) {
y2=pic.scale.y.automax() ? tickMax3(pic).y : pic.userMax().y;
- y=opposite2 ? y2 :
+ y=opposite2 ? y2 :
(pic.scale.y.automin() ? tickMin3(pic).y : pic.userMin().y);
}
@@ -876,7 +876,7 @@ void zaxis3At(picture pic=currentpicture, Label L="", axis axis,
pic.addPoint(a,min3(p));
pic.addPoint(a,max3(p));
}
-
+
if(finite(b)) {
pic.addPoint(b,min3(p));
pic.addPoint(b,max3(p));
@@ -934,7 +934,7 @@ void autoscale3(picture pic=currentpicture, axis axis)
pic.userMaxz3(ceil(pic.userMax().z));
}
} else {mz.min=mz.max=0; pic.scale.set=false;}
-
+
pic.scale.z.tickMin=mz.min;
pic.scale.z.tickMax=mz.max;
axis.zdivisor=mz.divisor;
@@ -948,7 +948,7 @@ void xaxis3(picture pic=currentpicture, Label L="", axis axis=YZZero,
arrowbar3 arrow=None, margin3 margin=NoMargin3, bool above=false)
{
if(xmin > xmax) return;
-
+
if(pic.scale.x.automin && xmin > -infinity) pic.scale.x.automin=false;
if(pic.scale.x.automax && xmax < infinity) pic.scale.x.automax=false;
@@ -956,19 +956,19 @@ void xaxis3(picture pic=currentpicture, Label L="", axis axis=YZZero,
axis(pic,axis);
autoscale3(pic,axis);
}
-
+
bool newticks=false;
-
+
if(xmin != -infinity) {
xmin=pic.scale.x.T(xmin);
newticks=true;
}
-
+
if(xmax != infinity) {
xmax=pic.scale.x.T(xmax);
newticks=true;
}
-
+
if(newticks && pic.userSetx() && ticks != NoTicks3) {
if(xmin == -infinity) xmin=pic.userMin().x;
if(xmax == infinity) xmax=pic.userMax().x;
@@ -977,16 +977,16 @@ void xaxis3(picture pic=currentpicture, Label L="", axis axis=YZZero,
pic.scale.x.tickMax=mx.max;
axis.xdivisor=mx.divisor;
}
-
+
axis(pic,axis);
-
+
if(xmin == -infinity && !axis.extend) {
if(pic.scale.set)
xmin=pic.scale.x.automin() ? pic.scale.x.tickMin :
max(pic.scale.x.tickMin,pic.userMin().x);
else xmin=pic.userMin().x;
}
-
+
if(xmax == infinity && !axis.extend) {
if(pic.scale.set)
xmax=pic.scale.x.automax() ? pic.scale.x.tickMax :
@@ -998,7 +998,7 @@ void xaxis3(picture pic=currentpicture, Label L="", axis axis=YZZero,
L=L.copy();
L.position(axis.position);
}
-
+
bool back=false;
if(axis.type == Both) {
triple v=currentprojection.normal;
@@ -1025,24 +1025,24 @@ void yaxis3(picture pic=currentpicture, Label L="", axis axis=XZZero,
if(pic.scale.y.automin && ymin > -infinity) pic.scale.y.automin=false;
if(pic.scale.y.automax && ymax < infinity) pic.scale.y.automax=false;
-
+
if(!pic.scale.set) {
axis(pic,axis);
autoscale3(pic,axis);
}
-
+
bool newticks=false;
-
+
if(ymin != -infinity) {
ymin=pic.scale.y.T(ymin);
newticks=true;
}
-
+
if(ymax != infinity) {
ymax=pic.scale.y.T(ymax);
newticks=true;
}
-
+
if(newticks && pic.userSety() && ticks != NoTicks3) {
if(ymin == -infinity) ymin=pic.userMin().y;
if(ymax == infinity) ymax=pic.userMax().y;
@@ -1051,17 +1051,17 @@ void yaxis3(picture pic=currentpicture, Label L="", axis axis=XZZero,
pic.scale.y.tickMax=my.max;
axis.ydivisor=my.divisor;
}
-
+
axis(pic,axis);
-
+
if(ymin == -infinity && !axis.extend) {
if(pic.scale.set)
ymin=pic.scale.y.automin() ? pic.scale.y.tickMin :
max(pic.scale.y.tickMin,pic.userMin().y);
else ymin=pic.userMin().y;
}
-
-
+
+
if(ymax == infinity && !axis.extend) {
if(pic.scale.set)
ymax=pic.scale.y.automax() ? pic.scale.y.tickMax :
@@ -1073,7 +1073,7 @@ void yaxis3(picture pic=currentpicture, Label L="", axis axis=XZZero,
L=L.copy();
L.position(axis.position);
}
-
+
bool back=false;
if(axis.type == Both) {
triple v=currentprojection.normal;
@@ -1100,24 +1100,24 @@ void zaxis3(picture pic=currentpicture, Label L="", axis axis=XYZero,
if(pic.scale.z.automin && zmin > -infinity) pic.scale.z.automin=false;
if(pic.scale.z.automax && zmax < infinity) pic.scale.z.automax=false;
-
+
if(!pic.scale.set) {
axis(pic,axis);
autoscale3(pic,axis);
}
-
+
bool newticks=false;
-
+
if(zmin != -infinity) {
zmin=pic.scale.z.T(zmin);
newticks=true;
}
-
+
if(zmax != infinity) {
zmax=pic.scale.z.T(zmax);
newticks=true;
}
-
+
if(newticks && pic.userSetz() && ticks != NoTicks3) {
if(zmin == -infinity) zmin=pic.userMin().z;
if(zmax == infinity) zmax=pic.userMax().z;
@@ -1126,16 +1126,16 @@ void zaxis3(picture pic=currentpicture, Label L="", axis axis=XYZero,
pic.scale.z.tickMax=mz.max;
axis.zdivisor=mz.divisor;
}
-
+
axis(pic,axis);
-
+
if(zmin == -infinity && !axis.extend) {
if(pic.scale.set)
zmin=pic.scale.z.automin() ? pic.scale.z.tickMin :
max(pic.scale.z.tickMin,pic.userMin().z);
else zmin=pic.userMin().z;
}
-
+
if(zmax == infinity && !axis.extend) {
if(pic.scale.set)
zmax=pic.scale.z.automax() ? pic.scale.z.tickMax :
@@ -1147,7 +1147,7 @@ void zaxis3(picture pic=currentpicture, Label L="", axis axis=XYZero,
L=L.copy();
L.position(axis.position);
}
-
+
bool back=false;
if(axis.type == Both) {
triple v=currentprojection.vector();
@@ -1169,18 +1169,18 @@ void zlimits(picture pic=currentpicture, real min=-infinity, real max=infinity,
bool crop=NoCrop)
{
if(min > max) return;
-
+
pic.scale.z.automin=min <= -infinity;
pic.scale.z.automax=max >= infinity;
-
+
bounds mz;
if(pic.scale.z.automin() || pic.scale.z.automax())
mz=autoscale(pic.userMin().z,pic.userMax().z,pic.scale.z.scale);
-
+
if(pic.scale.z.automin) {
if(pic.scale.z.automin()) pic.userMinz(mz.min);
} else pic.userMinz(min(pic.scale.z.T(min),pic.scale.z.T(max)));
-
+
if(pic.scale.z.automax) {
if(pic.scale.z.automax()) pic.userMaxz(mz.max);
} else pic.userMaxz(max(pic.scale.z.T(min),pic.scale.z.T(max)));
@@ -1193,10 +1193,10 @@ void limits(picture pic=currentpicture, triple min, triple max)
ylimits(pic,min.y,max.y);
zlimits(pic,min.z,max.z);
}
-
+
// Draw x, y and z axes.
void axes3(picture pic=currentpicture,
- Label xlabel="", Label ylabel="", Label zlabel="",
+ Label xlabel="", Label ylabel="", Label zlabel="",
bool extend=false,
triple min=(-infinity,-infinity,-infinity),
triple max=(infinity,infinity,infinity),
@@ -1212,11 +1212,50 @@ triple Scale(picture pic=currentpicture, triple v)
return (pic.scale.x.T(v.x),pic.scale.y.T(v.y),pic.scale.z.T(v.z));
}
+triple[][] Scale(picture pic=currentpicture, triple[][] P)
+{
+ triple[][] Q=new triple[P.length][];
+ for(int i=0; i < P.length; ++i) {
+ triple[] Pi=P[i];
+ Q[i]=new triple[Pi.length];
+ for(int j=0; j < Pi.length; ++j)
+ Q[i][j]=Scale(pic,Pi[j]);
+ }
+ return Q;
+}
+
+real ScaleX(picture pic=currentpicture, real x)
+{
+ return pic.scale.x.T(x);
+}
+
+real ScaleY(picture pic=currentpicture, real y)
+{
+ return pic.scale.y.T(y);
+}
+
real ScaleZ(picture pic=currentpicture, real z)
{
return pic.scale.z.T(z);
}
+real[][] ScaleZ(picture pic=currentpicture, real[][] P)
+{
+ real[][] Q=new real[P.length][];
+ for(int i=0; i < P.length; ++i) {
+ real[] Pi=P[i];
+ Q[i]=new real[Pi.length];
+ for(int j=0; j < Pi.length; ++j)
+ Q[i][j]=ScaleZ(pic,Pi[j]);
+ }
+ return Q;
+}
+
+real[] uniform(real T(real x), real Tinv(real x), real a, real b, int n)
+{
+ return map(Tinv,uniform(T(a),T(b),n));
+}
+
// Draw a tick of length size at triple v in direction dir using pen p.
void tick(picture pic=currentpicture, triple v, triple dir, real size=Ticksize,
pen p=currentpen)
@@ -1240,11 +1279,11 @@ void xtick3(picture pic=currentpicture, real x, triple dir=Y,
real size=Ticksize, pen p=currentpen)
{
tick(pic,(x,pic.scale.y.scale.logarithmic ? 1 : 0,
- pic.scale.z.scale.logarithmic ? 1 : 0),dir,size,p);
+ pic.scale.z.scale.logarithmic ? 1 : 0),dir,size,p);
}
void ytick(picture pic=currentpicture, triple v, triple dir=X,
- real size=Ticksize, pen p=currentpen)
+ real size=Ticksize, pen p=currentpen)
{
tick(pic,v,dir,size,p);
}
@@ -1257,7 +1296,7 @@ void ytick3(picture pic=currentpicture, real y, triple dir=X,
}
void ztick(picture pic=currentpicture, triple v, triple dir=X,
- real size=Ticksize, pen p=currentpen)
+ real size=Ticksize, pen p=currentpen)
{
xtick(pic,v,dir,size,p);
}
@@ -1294,7 +1333,7 @@ void xtick3(picture pic=currentpicture, Label L, real x, triple dir=Y,
string format="", real size=Ticksize, pen p=currentpen)
{
xtick(pic,L,(x,pic.scale.y.scale.logarithmic ? 1 : 0,
- pic.scale.z.scale.logarithmic ? 1 : 0),dir,size,p);
+ pic.scale.z.scale.logarithmic ? 1 : 0),dir,size,p);
}
void ytick(picture pic=currentpicture, Label L, triple v, triple dir=X,
@@ -1307,7 +1346,7 @@ void ytick3(picture pic=currentpicture, Label L, real y, triple dir=X,
string format="", real size=Ticksize, pen p=currentpen)
{
xtick(pic,L,(pic.scale.x.scale.logarithmic ? 1 : 0,y,
- pic.scale.z.scale.logarithmic ? 1 : 0),dir,format,size,p);
+ pic.scale.z.scale.logarithmic ? 1 : 0),dir,format,size,p);
}
void ztick(picture pic=currentpicture, Label L, triple v, triple dir=X,
@@ -1320,7 +1359,7 @@ void ztick3(picture pic=currentpicture, Label L, real z, triple dir=X,
string format="", real size=Ticksize, pen p=currentpen)
{
xtick(pic,L,(pic.scale.x.scale.logarithmic ? 1 : 0,
- pic.scale.z.scale.logarithmic ? 1 : 0,z),dir,format,size,p);
+ pic.scale.z.scale.logarithmic ? 1 : 0,z),dir,format,size,p);
}
private void label(picture pic, Label L, triple v, real x, align align,
@@ -1416,7 +1455,7 @@ multigraph graph(interpolate3 join, bool3 cond(real))
guide3 Straight(... guide3[])=operator --;
guide3 Spline(... guide3[])=operator ..;
-
+
guide3 graph(picture pic=currentpicture, real x(real), real y(real),
real z(real), real a, real b, int n=ngraph,
interpolate3 join=operator --)
@@ -1519,12 +1558,12 @@ guide3 graph(triple F(path, real), path p, int n=1,
guide3 graph(triple F(pair), path p, int n=1, interpolate3 join=operator --)
{
- return graph(new triple(path p, real position)
+ return graph(new triple(path p, real position)
{return F(point(p,position));},p,n,join);
}
guide3 graph(picture pic=currentpicture, real f(pair), path p, int n=1,
- interpolate3 join=operator --)
+ interpolate3 join=operator --)
{
return graph(new triple(pair z) {return Scale(pic,(z.x,z.y,f(z)));},p,n,
join);
@@ -1538,7 +1577,7 @@ guide3 graph(real f(pair), path p, int n=1, real T(pair),
}
// Connect points in v into segments corresponding to consecutive true elements
-// of b using interpolation operator join.
+// of b using interpolation operator join.
path3[] segment(triple[] v, bool[] cond, interpolate3 join=operator --)
{
checkconditionlength(cond.length,v.length);
@@ -1596,13 +1635,13 @@ bool vperiodic(triple[][] a) {
}
// return the surface described by a matrix f
-surface surface(triple[][] f, bool[][] cond={})
+surface surface(picture pic=currentpicture, triple[][] f, bool[][] cond={})
{
if(!rectangular(f)) abort("matrix is not rectangular");
-
+
int nx=f.length-1;
int ny=nx > 0 ? f[0].length-1 : 0;
-
+
bool all=cond.length == 0;
int count;
@@ -1632,7 +1671,11 @@ surface surface(triple[][] f, bool[][] cond={})
int[] indexi=s.index[i];
for(int j=0; j < ny; ++j) {
if(all || (condi[j] && condi[j+1] && condp[j] && condp[j+1]))
- s.s[++k]=patch(new triple[] {fi[j],fp[j],fp[j+1],fi[j+1]});
+ s.s[++k]=patch(new triple[] {
+ Scale(pic,fi[j]),
+ Scale(pic,fp[j]),
+ Scale(pic,fp[j+1]),
+ Scale(pic,fi[j+1])});
indexi[j]=k;
}
}
@@ -1708,14 +1751,15 @@ surface bispline(real[][] z, real[][] p, real[][] q, real[][] r,
real zppmppp=zpp-hx*pp[jp];
real zijqij=zij+hy*qi[j];
real zpjqpj=zpj+hy*qp[j];
-
+
s.s[k]=patch(new triple[][] {
- {(xi,yj,zij),(xi,y1,zijqij),(xi,y2,zip-qip),(xi,yp,zip)},
- {(x1,yj,zij+pij),(x1,y1,zijqij+pij+hxy*ri[j]),
- (x1,y2,zippip-qip-hxy*ri[jp]),(x1,yp,zippip)},
- {(x2,yj,zpj-ppj),(x2,y1,zpjqpj-ppj-hxy*rp[j]),
- (x2,y2,zppmppp-qpp+hxy*rp[jp]),(x2,yp,zppmppp)},
- {(xp,yj,zpj),(xp,y1,zpjqpj),(xp,y2,zpp-qpp),(xp,yp,zpp)}},copy=false);
+ {(xi,yj,zij),(xi,y1,zijqij),(xi,y2,zip-qip),(xi,yp,zip)},
+ {(x1,yj,zij+pij),(x1,y1,zijqij+pij+hxy*ri[j]),
+ (x1,y2,zippip-qip-hxy*ri[jp]),(x1,yp,zippip)},
+ {(x2,yj,zpj-ppj),(x2,y1,zpjqpj-ppj-hxy*rp[j]),
+ (x2,y2,zppmppp-qpp+hxy*rp[jp]),(x2,yp,zppmppp)},
+ {(xp,yj,zpj),(xp,y1,zpjqpj),(xp,y2,zpp-qpp),(xp,yp,zpp)}},
+ copy=false);
indexi[j]=k;
++k;
}
@@ -1787,11 +1831,11 @@ private real[][][] bispline0(real[][] z, real[][] p, real[][] q, real[][] r,
real zpjqpj=zpj+hy*qp[j];
s[k]=new real[][] {{zij,zijqij,zip-qip,zip},
- {zij+pij,zijqij+pij+hxy*ri[j],
- zippip-qip-hxy*ri[jp],zippip},
- {zpj-ppj,zpjqpj-ppj-hxy*rp[j],
- zppmppp-qpp+hxy*rp[jp],zppmppp},
- {zpj,zpjqpj,zpp-qpp,zpp}};
+ {zij+pij,zijqij+pij+hxy*ri[j],
+ zippip-qip-hxy*ri[jp],zippip},
+ {zpj-ppj,zpjqpj-ppj-hxy*rp[j],
+ zppmppp-qpp+hxy*rp[jp],zppmppp},
+ {zpj,zpjqpj,zpp-qpp,zpp}};
++k;
}
}
@@ -1831,10 +1875,15 @@ real[][][] bispline(real[][] f, real[] x, real[] y,
// return the surface described by a real matrix f, interpolated with
// xsplinetype and ysplinetype.
-surface surface(real[][] f, real[] x, real[] y,
- splinetype xsplinetype=null, splinetype ysplinetype=xsplinetype,
+surface surface(picture pic=currentpicture, real[][] f, real[] x, real[] y,
+ splinetype xsplinetype=null,
+ splinetype ysplinetype=xsplinetype,
bool[][] cond={})
{
+ real[][] f=ScaleZ(pic,f);
+ real[] x=map(pic.scale.x.T,x);
+ real[] y=map(pic.scale.y.T,y);
+
real epsilon=sqrtEpsilon*norm(y);
if(xsplinetype == null)
xsplinetype=(abs(x[0]-x[x.length-1]) <= epsilon) ? periodic : notaknot;
@@ -1863,8 +1912,9 @@ surface surface(real[][] f, real[] x, real[] y,
// return the surface described by a real matrix f, interpolated with
// xsplinetype and ysplinetype.
-surface surface(real[][] f, pair a, pair b, splinetype xsplinetype,
- splinetype ysplinetype=xsplinetype, bool[][] cond={})
+surface surface(picture pic=currentpicture, real[][] f, pair a, pair b,
+ splinetype xsplinetype, splinetype ysplinetype=xsplinetype,
+ bool[][] cond={})
{
if(!rectangular(f)) abort("matrix is not rectangular");
@@ -1873,13 +1923,14 @@ surface surface(real[][] f, pair a, pair b, splinetype xsplinetype,
if(nx == 0 || ny == 0) return nullsurface;
- real[] x=uniform(a.x,b.x,nx);
- real[] y=uniform(a.y,b.y,ny);
- return surface(f,x,y,xsplinetype,ysplinetype,cond);
+ real[] x=uniform(pic.scale.x.T,pic.scale.x.Tinv,a.x,b.x,nx);
+ real[] y=uniform(pic.scale.y.T,pic.scale.y.Tinv,a.y,b.y,ny);
+ return surface(pic,f,x,y,xsplinetype,ysplinetype,cond);
}
// return the surface described by a real matrix f, interpolated linearly.
-surface surface(real[][] f, pair a, pair b, bool[][] cond={})
+surface surface(picture pic=currentpicture, real[][] f, pair a, pair b,
+ bool[][] cond={})
{
if(!rectangular(f)) abort("matrix is not rectangular");
@@ -1891,22 +1942,25 @@ surface surface(real[][] f, pair a, pair b, bool[][] cond={})
bool all=cond.length == 0;
triple[][] v=new triple[nx+1][ny+1];
+
+ pair a=Scale(pic,a);
+ pair b=Scale(pic,b);
for(int i=0; i <= nx; ++i) {
- real x=interp(a.x,b.x,i/nx);
+ real x=pic.scale.x.Tinv(interp(a.x,b.x,i/nx));
bool[] condi=all ? null : cond[i];
triple[] vi=v[i];
real[] fi=f[i];
for(int j=0; j <= ny; ++j)
if(all || condi[j])
- vi[j]=(x,interp(a.y,b.y,j/ny),fi[j]);
+ vi[j]=(x,pic.scale.y.Tinv(interp(a.y,b.y,j/ny)),fi[j]);
}
- return surface(v,cond);
+ return surface(pic,v,cond);
}
// return the surface described by a parametric function f over box(a,b),
// interpolated linearly.
-surface surface(triple f(pair z), pair a, pair b, int nu=nmesh, int nv=nu,
- bool cond(pair z)=null)
+surface surface(picture pic=currentpicture, triple f(pair z), pair a, pair b,
+ int nu=nmesh, int nv=nu, bool cond(pair z)=null)
{
if(nu <= 0 || nv <= 0) return nullsurface;
@@ -1921,23 +1975,25 @@ surface surface(triple f(pair z), pair a, pair b, int nu=nmesh, int nv=nu,
triple[][] v=new triple[nu+1][nv+1];
+ pair a=Scale(pic,a);
+ pair b=Scale(pic,b);
for(int i=0; i <= nu; ++i) {
- real x=interp(a.x,b.x,i*du);
+ real x=pic.scale.x.Tinv(interp(a.x,b.x,i*du));
bool[] activei=all ? null : active[i];
triple[] vi=v[i];
for(int j=0; j <= nv; ++j) {
- pair z=(x,interp(a.y,b.y,j*dv));
+ pair z=(x,pic.scale.y.Tinv(interp(a.y,b.y,j*dv)));
if(all || (activei[j]=cond(z))) vi[j]=f(z);
}
}
- return surface(v,active);
+ return surface(pic,v,active);
}
-
+
// return the surface described by a parametric function f evaluated at u and v
// and interpolated with usplinetype and vsplinetype.
-surface surface(triple f(pair z), real[] u, real[] v,
- splinetype[] usplinetype, splinetype[] vsplinetype=Spline,
- bool cond(pair z)=null)
+surface surface(picture pic=currentpicture, triple f(pair z),
+ real[] u, real[] v, splinetype[] usplinetype,
+ splinetype[] vsplinetype=Spline, bool cond(pair z)=null)
{
int nu=u.length-1;
int nv=v.length-1;
@@ -1960,7 +2016,7 @@ surface surface(triple f(pair z), real[] u, real[] v,
for(int j=0; j <= nv; ++j) {
pair z=(ui,v[j]);
if(!all) activei[j]=cond(z);
- triple f=f(z);
+ triple f=Scale(pic,f(z));
fxi[j]=f.x;
fyi[j]=f.y;
fzi[j]=f.z;
@@ -2020,27 +2076,30 @@ surface surface(triple f(pair z), real[] u, real[] v,
// return the surface described by a parametric function f over box(a,b),
// interpolated with usplinetype and vsplinetype.
-surface surface(triple f(pair z), pair a, pair b, int nu=nmesh, int nv=nu,
+surface surface(picture pic=currentpicture, triple f(pair z), pair a, pair b,
+ int nu=nmesh, int nv=nu,
splinetype[] usplinetype, splinetype[] vsplinetype=Spline,
bool cond(pair z)=null)
{
- return surface(f,uniform(a.x,b.x,nu),uniform(a.y,b.y,nv),
- usplinetype,vsplinetype,cond);
+ real[] x=uniform(pic.scale.x.T,pic.scale.x.Tinv,a.x,b.x,nu);
+ real[] y=uniform(pic.scale.y.T,pic.scale.y.Tinv,a.y,b.y,nv);
+ return surface(pic,f,x,y,usplinetype,vsplinetype,cond);
}
// return the surface described by a real function f over box(a,b),
// interpolated linearly.
-surface surface(real f(pair z), pair a, pair b, int nx=nmesh, int ny=nx,
- bool cond(pair z)=null)
+surface surface(picture pic=currentpicture, real f(pair z), pair a, pair b,
+ int nx=nmesh, int ny=nx, bool cond(pair z)=null)
{
- return surface(new triple(pair z) {return (z.x,z.y,f(z));},a,b,nx,ny,cond);
+ return surface(pic,new triple(pair z) {return (z.x,z.y,f(z));},a,b,nx,ny,
+ cond);
}
// return the surface described by a real function f over box(a,b),
// interpolated with xsplinetype and ysplinetype.
-surface surface(real f(pair z), pair a, pair b, int nx=nmesh, int ny=nx,
- splinetype xsplinetype, splinetype ysplinetype=xsplinetype,
- bool cond(pair z)=null)
+surface surface(picture pic=currentpicture, real f(pair z), pair a, pair b,
+ int nx=nmesh, int ny=nx, splinetype xsplinetype,
+ splinetype ysplinetype=xsplinetype, bool cond(pair z)=null)
{
bool[][] active;
bool all=cond == null;
@@ -2052,8 +2111,8 @@ surface surface(real f(pair z), pair a, pair b, int nx=nmesh, int ny=nx,
pair dz=(dx,dy);
real[][] F=new real[nx+1][ny+1];
- real[] x=uniform(a.x,b.x,nx);
- real[] y=uniform(a.y,b.y,ny);
+ real[] x=uniform(pic.scale.x.T,pic.scale.x.Tinv,a.x,b.x,nx);
+ real[] y=uniform(pic.scale.y.T,pic.scale.y.Tinv,a.y,b.y,ny);
for(int i=0; i <= nx; ++i) {
bool[] activei=all ? null : active[i];
real[] Fi=F[i];
@@ -2064,7 +2123,7 @@ surface surface(real f(pair z), pair a, pair b, int nx=nmesh, int ny=nx,
if(!all) activei[j]=cond(z);
}
}
- return surface(F,x,y,xsplinetype,ysplinetype,active);
+ return surface(pic,F,x,y,xsplinetype,ysplinetype,active);
}
guide3[][] lift(real f(real x, real y), guide[][] g,
@@ -2128,7 +2187,7 @@ void draw(picture pic=currentpicture, Label[] L=new Label[],
render,interaction);
}
-real maxlength(triple f(pair z), pair a, pair b, int nu, int nv)
+real maxlength(triple f(pair z), pair a, pair b, int nu, int nv)
{
return min(abs(f((b.x,a.y))-f(a))/nu,abs(f((a.x,b.y))-f(a))/nv);
}
diff --git a/Build/source/utils/asymptote/base/graph_splinetype.asy b/Build/source/utils/asymptote/base/graph_splinetype.asy
index 02f780ca02e..77e459d47e2 100644
--- a/Build/source/utils/asymptote/base/graph_splinetype.asy
+++ b/Build/source/utils/asymptote/base/graph_splinetype.asy
@@ -13,7 +13,7 @@ void checklengths(int x, int y, string text=differentlengths)
abort(text+": "+string(x)+" != "+string(y));
}
-void checkincreasing(real[] x)
+void checkincreasing(real[] x)
{
if(!increasing(x,true))
abort("strictly increasing array expected");
@@ -114,7 +114,7 @@ real[] periodic(real[] x, real[] y)
// Standard cubic spline interpolation with the natural condition
// s''(a)=s''(b)=0.
// if n=2, linear interpolation is returned
-// Don't use the natural type unless the underlying function
+// Don't use the natural type unless the underlying function
// has zero second end points derivatives.
real[] natural(real[] x, real[] y)
{
@@ -186,25 +186,25 @@ splinetype clamped(real slopea, real slopeb)
// Piecewise Cubic Hermite Interpolating Polynomial (PCHIP)
// Modified MATLAB code
-// [1] Fritsch, F. N. and R. E. Carlson,
-// "Monotone Piecewise Cubic Interpolation,"
+// [1] Fritsch, F. N. and R. E. Carlson,
+// "Monotone Piecewise Cubic Interpolation,"
// SIAM J. Numerical Analysis, Vol. 17, 1980, pp.238-246.
-// [2] Kahaner, David, Cleve Moler, Stephen Nash,
+// [2] Kahaner, David, Cleve Moler, Stephen Nash,
// Numerical Methods and Software, Prentice Hall, 1988.
-real[] monotonic(real[] x, real[] y)
+real[] monotonic(real[] x, real[] y)
{
- int n=x.length;
+ int n=x.length;
checklengths(n,y.length);
checkincreasing(x);
- real[] d=new real[n];
+ real[] d=new real[n];
if(n > 2) {
real[] h=new real[n-1];
real[] del=new real[n-1];
for(int i=0; i < n-1; ++i) {
- h[i]=x[i+1]-x[i];
- del[i]=(y[i+1]-y[i])/h[i];
- }
- int j=0;
+ h[i]=x[i+1]-x[i];
+ del[i]=(y[i+1]-y[i])/h[i];
+ }
+ int j=0;
int k[]=new int[];
for(int i=0; i < n-2; ++i)
if((sgn(del[i])*sgn(del[i+1])) > 0) {k[j]=i; j=j+1;}
@@ -220,10 +220,10 @@ real[] monotonic(real[] x, real[] y)
w2[i]=(h[k[i]+1]+hs[i])/(3*hs[i]);
dmax[i]=max(abs(del[k[i]]),abs(del[k[i]+1]));
dmin[i]=min(abs(del[k[i]]),abs(del[k[i]+1]));
- }
+ }
for(int i=0; i < n; ++i) d[i]=0;
for(int i=0; i < j; ++i)
- d[k[i]+1]=dmin[i]/(w1[i]*(del[k[i]]/dmax[i])+w2[i]*(del[k[i]+1]/dmax[i]));
+ d[k[i]+1]=dmin[i]/(w1[i]*(del[k[i]]/dmax[i])+w2[i]*(del[k[i]+1]/dmax[i]));
d[0]=((2*h[0]+h[1])*del[0]-h[0]*del[1])/(h[0]+h[1]);
if(sgn(d[0]) != sgn(del[0])) {d[0]=0;}
else if((sgn(del[0]) != sgn(del[1])) && (abs(d[0]) > abs(3*del[0])))
@@ -238,7 +238,7 @@ real[] monotonic(real[] x, real[] y)
d[0]=d[1]=(y[1]-y[0])/(x[1]-x[0]);
} else abort(morepoints);
return d;
-}
+}
// Return standard cubic spline interpolation as a guide
guide hermite(real[] x, real[] y, splinetype splinetype=null)
diff --git a/Build/source/utils/asymptote/base/grid3.asy b/Build/source/utils/asymptote/base/grid3.asy
index 98e043a71d7..62807847ae6 100644
--- a/Build/source/utils/asymptote/base/grid3.asy
+++ b/Build/source/utils/asymptote/base/grid3.asy
@@ -259,7 +259,7 @@ ticksgrid InOutTicks(Label F="", ticklabel ticklabel=null,
N,n,Step,step,begin,end,
Size,size,false,pTick,ptick);
otg.grid3=new void(picture pic, bool above) {
- grid3(pic,gridroutine,N,n,Step,step,begin,end,pGrid,pgrid,above);
+ grid3(pic,gridroutine,N,n,Step,step,begin,end,pGrid,pgrid,above);
};
return otg;
};
@@ -280,7 +280,7 @@ ticksgrid InTicks(Label F="", ticklabel ticklabel=null,
otg.ticks=Ticks3(-1,F,ticklabel,beginlabel,endlabel,N,n,Step,step,
begin,end,Size,size,false,pTick,ptick);
otg.grid3=new void(picture pic, bool above) {
- grid3(pic,gridroutine,N,n,Step,step,begin,end,pGrid,pgrid,above);
+ grid3(pic,gridroutine,N,n,Step,step,begin,end,pGrid,pgrid,above);
};
return otg;
};
@@ -301,7 +301,7 @@ ticksgrid OutTicks(Label F="", ticklabel ticklabel=null,
otg.ticks=Ticks3(1,F,ticklabel,beginlabel,endlabel,N,n,Step,step,
begin,end,Size,size,false,pTick,ptick);
otg.grid3=new void(picture pic, bool above) {
- grid3(pic,gridroutine,N,n,Step,step,begin,end,pGrid,pgrid,above);
+ grid3(pic,gridroutine,N,n,Step,step,begin,end,pGrid,pgrid,above);
};
return otg;
};
diff --git a/Build/source/utils/asymptote/base/interpolate.asy b/Build/source/utils/asymptote/base/interpolate.asy
index a600c94c125..d66f227fcc3 100644
--- a/Build/source/utils/asymptote/base/interpolate.asy
+++ b/Build/source/utils/asymptote/base/interpolate.asy
@@ -7,8 +7,8 @@
// and values y_0,...,y_n in the array y,
// hdiffdiv(x,y,dyp) computes Newton's Divided Difference for
-// Hermite interpolation where dyp={dy_0,...,dy_n}.
-//
+// Hermite interpolation where dyp={dy_0,...,dy_n}.
+//
// fhorner(x,coeff) uses Horner's rule to compute the polynomial
// a_0+a_1(x-x_0)+a_2(x-x_0)(x-x_1)+...+a_n(x-x_0)..(x-x_{n-1}),
// where coeff={a_0,a_1,...,a_n}.
@@ -54,7 +54,7 @@ fhorner fhorner(horner sh)
return s;
};
}
-
+
// Newton's Divided Difference method: n(n-1)/2 divisions, n(n-1) additions.
horner diffdiv(real[] x, real[] y)
{
@@ -136,5 +136,5 @@ realfunction fspline(real[] x, real[] y, splinetype splinetype=notaknot)
real[] dy=splinetype(x,y);
return new real(real t) {
return pwhermite(x,y,dy)(t);
- };
+ };
}
diff --git a/Build/source/utils/asymptote/base/labelpath3.asy b/Build/source/utils/asymptote/base/labelpath3.asy
index 63b2290f1f2..2c9529dc7e8 100644
--- a/Build/source/utils/asymptote/base/labelpath3.asy
+++ b/Build/source/utils/asymptote/base/labelpath3.asy
@@ -21,7 +21,7 @@ triple[] firstframe(path3 p, triple optional=O)
}
// Modification of the bishop frame construction contained in
-// space_tube.asy (from Philippe Ivaldi's modules).
+// space_tube.asy (from Philippe Ivaldi's modules).
// For noncyclic path3s only
triple[] nextframe(path3 p, real reltimestart, triple[] start, real
reltimeend, int subdiv=20)
@@ -40,7 +40,7 @@ triple[] nextframe(path3 p, real reltimestart, triple[] start, real
}
return bf[subdiv];
}
-
+
surface labelpath(string s, path3 p, real angle=90, triple optional=O)
{
real Cos=Cos(angle);
@@ -48,10 +48,10 @@ surface labelpath(string s, path3 p, real angle=90, triple optional=O)
path[] text=texpath(Label(s,(0,0),Align,basealign));
text=scale(1/(max(text).x-min(text).x))*text;
path[][] decompose=containmentTree(text);
-
+
real[][] xpos=new real[decompose.length][2];
surface sf;
- for(int i=0; i < decompose.length; ++i) {// Identify positions along x-axis
+ for(int i=0; i < decompose.length; ++i) {// Identify positions along x-axis
xpos[i][1]=i;
real pos0=0.5(max(decompose[i]).x+min(decompose[i]).x);
xpos[i][0]=pos0;
diff --git a/Build/source/utils/asymptote/base/latin1.asy b/Build/source/utils/asymptote/base/latin1.asy
deleted file mode 100644
index 3d76925be24..00000000000
--- a/Build/source/utils/asymptote/base/latin1.asy
+++ /dev/null
@@ -1,2 +0,0 @@
-usepackage("fontenc","T1");
-usepackage("inputenc","latin1");
diff --git a/Build/source/utils/asymptote/base/lmfit.asy b/Build/source/utils/asymptote/base/lmfit.asy
index c3dfddce061..63e0d7e2386 100644
--- a/Build/source/utils/asymptote/base/lmfit.asy
+++ b/Build/source/utils/asymptote/base/lmfit.asy
@@ -58,31 +58,31 @@ private real LM_SQRT_GIANT = sqrt(realMax);
private real LM_USERTOL = 30 * LM_MACHEP;
restricted string lm_infmsg[] = {
- "improper input parameters",
- "the relative error in the sum of squares is at most tol",
- "the relative error between x and the solution is at most tol",
- "both errors are at most tol",
- "fvec is orthogonal to the columns of the jacobian to machine precision",
- "number of calls to fcn has reached or exceeded maxcall*(n+1)",
- "ftol is too small: no further reduction in the sum of squares is possible",
- "xtol too small: no further improvement in approximate solution x possible",
- "gtol too small: no further improvement in approximate solution x possible",
- "not enough memory",
- "break requested within function evaluation"
+ "improper input parameters",
+ "the relative error in the sum of squares is at most tol",
+ "the relative error between x and the solution is at most tol",
+ "both errors are at most tol",
+ "fvec is orthogonal to the columns of the jacobian to machine precision",
+ "number of calls to fcn has reached or exceeded maxcall*(n+1)",
+ "ftol is too small: no further reduction in the sum of squares is possible",
+ "xtol too small: no further improvement in approximate solution x possible",
+ "gtol too small: no further improvement in approximate solution x possible",
+ "not enough memory",
+ "break requested within function evaluation"
};
restricted string lm_shortmsg[] = {
- "invalid input",
- "success (f)",
- "success (p)",
- "success (f,p)",
- "degenerate",
- "call limit",
- "failed (f)",
- "failed (p)",
- "failed (o)",
- "no memory",
- "user break"
+ "invalid input",
+ "success (f)",
+ "success (p)",
+ "success (f,p)",
+ "degenerate",
+ "call limit",
+ "failed (f)",
+ "failed (p)",
+ "failed (o)",
+ "no memory",
+ "user break"
};
@@ -91,7 +91,7 @@ struct lm_data_type {
real[] user_t;
real[] user_y;
real[] user_w;
- real user_func(real user_t_point, real[] par);
+ real user_func(real user_t_point, real[] par);
};
@@ -99,7 +99,7 @@ struct lm_data_type {
// the int and real types
struct lm_int_type {
int val;
-
+
void operator init(int val) {
this.val = val;
}
@@ -108,7 +108,7 @@ struct lm_int_type {
struct lm_real_type {
real val;
-
+
void operator init(real val) {
this.val = val;
}
@@ -402,7 +402,7 @@ private void lm_qrsolv(int n, real[] r, int ldr, int[] ipvt, real[] diag, real[]
}
break;
}
-
+
sdiag[j] = r[j * ldr + j];
r[j * ldr + j] = x[j];
}
@@ -508,10 +508,10 @@ private void lm_lmpar(int n, real[] r, int ldr, int[] ipvt, real[] diag, real[]
dxnorm = lm_enorm(n, wa2);
fp_old = fp;
fp = dxnorm - delta;
-
+
if (fabs(fp) <= p1 * delta || (parl == 0.0 && fp <= fp_old && fp_old < 0.0) || iter == 10)
break;
-
+
for (j = 0; j < n; ++j)
wa1[j] = diag[ipvt[j]] * wa2[ipvt[j]] / dxnorm;
@@ -522,12 +522,12 @@ private void lm_lmpar(int n, real[] r, int ldr, int[] ipvt, real[] diag, real[]
}
temp = lm_enorm(n, wa1);
parc = fp / delta / temp / temp;
-
+
if (fp > 0)
parl = max(parl, par.val);
else if (fp < 0)
paru = min(paru, par.val);
-
+
par.val = max(parl, par.val + parc);
}
}
@@ -540,7 +540,7 @@ void lm_lmdif(int m, int n, real[] x, real[] fvec, real ftol, real xtol, real gt
static real p25 = 0.25;
static real p75 = 0.75;
static real p0001 = 1.0e-4;
-
+
nfev.val = 0;
int iter = 1;
lm_real_type par = lm_real_type(0);
@@ -563,7 +563,7 @@ void lm_lmdif(int m, int n, real[] x, real[] fvec, real ftol, real xtol, real gt
}
}
}
-
+
info.val = 0;
evaluate(x, m, fvec, data, info);
if(printout != null) printout(n, x, m, fvec, data, 0, 0, ++nfev.val);
@@ -587,7 +587,7 @@ void lm_lmdif(int m, int n, real[] x, real[] fvec, real ftol, real xtol, real gt
fjac[j * m + i] = (wa4[i] - fvec[i]) / (x[j] - temp);
x[j] = temp;
}
-
+
lm_qrfac(m, n, fjac, true, ipvt, wa1, wa2, wa3);
if (iter == 1) {
@@ -695,7 +695,7 @@ void lm_lmdif(int m, int n, real[] x, real[] fvec, real ftol, real xtol, real gt
delta = pnorm / p5;
par.val *= p5;
}
-
+
if (ratio >= p0001) {
for (j = 0; j < n; ++j) {
x[j] = wa2[j];
@@ -735,7 +735,7 @@ void lm_lmdif(int m, int n, real[] x, real[] fvec, real ftol, real xtol, real gt
void lm_minimize(int m_dat, int n_par, real[] par, lm_evaluate_ftype evaluate, lm_print_ftype printout, lm_data_type data, lm_control_type control) {
int n = n_par;
int m = m_dat;
-
+
real[] fvec = new real[m];
real[] diag = new real[n];
real[] qtf = new real[n];
@@ -838,13 +838,13 @@ FitResult fit(real[] xdata, real[] ydata, real[] errors, real function(real[], r
int n_par = parameters.length;
lm_evaluate_ftype evaluate = lm_evaluate_default;
lm_print_ftype printout = control.verbose ? lm_print_default : lm_print_quiet;
-
+
lm_data_type data;
data.user_t = xdata;
data.user_y = ydata;
data.user_w = 1 / errors;
data.user_func = new real(real x, real[] params) {
- return function(params, x);
+ return function(params, x);
};
lm_control_type ctrl;
@@ -856,7 +856,7 @@ FitResult fit(real[] xdata, real[] ydata, real[] errors, real function(real[], r
ctrl.maxcall = control.maxIterations;
lm_minimize(m_dat, n_par, parameters, evaluate, printout, data, ctrl);
-
+
return FitResult(ctrl.fnorm, ctrl.nfev.val, ctrl.info.val);
}
diff --git a/Build/source/utils/asymptote/base/map.asy b/Build/source/utils/asymptote/base/map.asy
new file mode 100644
index 00000000000..2b2277b9568
--- /dev/null
+++ b/Build/source/utils/asymptote/base/map.asy
@@ -0,0 +1,40 @@
+// Create a struct <name> parameterized by types <key> and <value>,
+// that maps keys to values, defaulting to the value in <default>.
+void mapTemplate(string name, string key, string value, string default)
+{
+ type(key,"Key");
+ type(value,"Value");
+ eval("Value default="+default,true);
+
+ eval("
+ struct keyValue {
+ Key key;
+ Value T;
+ void operator init(Key key) {
+ this.key=key;
+ }
+ void operator init(Key key, Value T) {
+ this.key=key;
+ this.T=T;
+ }
+ }
+
+ struct map {
+ keyValue[] M;
+ bool operator < (keyValue a, keyValue b) {return a.key < b.key;}
+
+ void add(Key key, Value T) {
+ keyValue m=keyValue(key,T);
+ M.insert(search(M,m,operator <)+1,m);
+ }
+ Value lookup(Key key) {
+ int i=search(M,keyValue(key),operator <);
+ if(i >= 0 && M[i].key == key) return M[i].T;
+ return default;
+ }
+ }
+",true);
+
+ type("map",name);
+}
+
diff --git a/Build/source/utils/asymptote/base/math.asy b/Build/source/utils/asymptote/base/math.asy
index 9d10e2b7794..3dde1b9dd4c 100644
--- a/Build/source/utils/asymptote/base/math.asy
+++ b/Build/source/utils/asymptote/base/math.asy
@@ -30,7 +30,7 @@ picture grid(int Nx, int Ny, pen p=currentpen)
picture pic;
for(int i=0; i <= Nx; ++i) draw(pic,(i,0)--(i,Ny),p);
for(int j=0; j <= Ny; ++j) draw(pic,(0,j)--(Nx,j),p);
- return pic;
+ return pic;
}
bool polygon(path p)
@@ -55,7 +55,7 @@ real intersect(triple P, triple Q, triple n, triple Z)
real denom=n.x*(Q.x-P.x)+n.y*(Q.y-P.y)+n.z*(Q.z-P.z);
return denom == 0 ? infinity : (d-n.x*P.x-n.y*P.y-n.z*P.z)/denom;
}
-
+
// Return any point on the intersection of the two planes with normals
// n0 and n1 passing through points P0 and P1, respectively.
// If the planes are parallel return (infinity,infinity,infinity).
@@ -293,7 +293,7 @@ void drawline(picture pic=currentpicture, pair P, pair Q, pen p=currentpen)
},true);
}
-real interpolate(real[] x, real[] y, real x0, int i)
+real interpolate(real[] x, real[] y, real x0, int i)
{
int n=x.length;
if(n == 0) abort("Zero data points in interpolate");
@@ -317,7 +317,7 @@ real interpolate(real[] x, real[] y, real x0, int i)
// real[] x are listed in ascending order and return y0. Values outside the
// available data range are linearly extrapolated using the first derivative
// at the nearest endpoint.
-real interpolate(real[] x, real[] y, real x0)
+real interpolate(real[] x, real[] y, real x0)
{
return interpolate(x,y,x0,search(x,x0));
}
@@ -378,7 +378,7 @@ pair[] quarticroots(real a, real b, real c, real d, real e)
// Remove roots at numerical infinity.
if(abs(a) <= Fuzz*(abs(b)+Fuzz*(abs(c)+Fuzz*(abs(d)+Fuzz*abs(e)))))
return cubicroots(b,c,d,e);
-
+
// Detect roots at numerical zero.
if(abs(e) <= Fuzz*(abs(d)+Fuzz*(abs(c)+Fuzz*(abs(b)+Fuzz*abs(a)))))
return cubicroots(a,b,c,d);
@@ -388,7 +388,7 @@ pair[] quarticroots(real a, real b, real c, real d, real e)
c *= ainv;
d *= ainv;
e *= ainv;
-
+
pair[] roots;
real[] T=cubicroots(1,-2c,c^2+b*d-4e,d^2+b^2*e-b*c*d);
if(T.length == 0) return roots;
@@ -434,13 +434,13 @@ real[] leastsquares(real[][] A, real[] b, bool warn=true)
real[] solution=solve(AtA(A),b*A,warn=false);
if (solution.length == 0 && warn)
abort("Cannot compute least-squares approximation for " +
- "a matrix with linearly dependent columns.");
+ "a matrix with linearly dependent columns.");
return solution;
}
// Namespace
struct rootfinder_settings {
- static real roottolerance = 1e-4;
+ static real roottolerance=1e-4;
}
real findroot(real f(real), real a, real b,
diff --git a/Build/source/utils/asymptote/base/metapost.asy b/Build/source/utils/asymptote/base/metapost.asy
index 525ffe755e1..6908fd750d2 100644
--- a/Build/source/utils/asymptote/base/metapost.asy
+++ b/Build/source/utils/asymptote/base/metapost.asy
@@ -2,14 +2,14 @@
path cuttings;
-path cutbefore(path p, path q)
+path cutbefore(path p, path q)
{
slice s=firstcut(p,q);
cuttings=s.before;
return s.after;
}
-path cutafter(path p, path q)
+path cutafter(path p, path q)
{
slice s=lastcut(p,q);
cuttings=s.after;
diff --git a/Build/source/utils/asymptote/base/obj.asy b/Build/source/utils/asymptote/base/obj.asy
index 8dde9341c42..5b6f14e90df 100644
--- a/Build/source/utils/asymptote/base/obj.asy
+++ b/Build/source/utils/asymptote/base/obj.asy
@@ -1,7 +1,7 @@
// A module for reading simple obj files with groups.
// Authors: Jens Schwaiger and John Bowman
//
-// Here simple means that :
+// Here simple means that :
//
// 1) all vertex statements should come before the face statements;
//
diff --git a/Build/source/utils/asymptote/base/ode.asy b/Build/source/utils/asymptote/base/ode.asy
index 7104a8d1532..99f8505cec2 100644
--- a/Build/source/utils/asymptote/base/ode.asy
+++ b/Build/source/utils/asymptote/base/ode.asy
@@ -14,7 +14,7 @@ struct RKTableau
int order;
coefficients a;
void stepDependence(real h, real c, coefficients a) {}
-
+
real pgrow;
real pshrink;
bool exponential;
@@ -54,7 +54,7 @@ real phi2(real x)
if(fabs(x) > 1) return (exp(x)-x-1)/x2;
real x3=x2*x;
real x5=x2*x3;
- if(fabs(x) < 0.1)
+ if(fabs(x) < 0.1)
return Coeff[1]+x*Coeff[2]+x2*Coeff[3]+x3*Coeff[4]+x2*x2*Coeff[5]
+x5*Coeff[6]+x3*x3*Coeff[7]+x5*x2*Coeff[8]+x5*x3*Coeff[9];
else {
@@ -73,7 +73,7 @@ real phi3(real x)
real x3=x2*x;
if(fabs(x) > 1.6) return (exp(x)-0.5*x2-x-1)/x3;
real x5=x2*x3;
- if(fabs(x) < 0.1)
+ if(fabs(x) < 0.1)
return Coeff[2]+x*Coeff[3]+x2*Coeff[4]+x3*Coeff[5]
+x2*x2*Coeff[6]+x5*Coeff[7]+x3*x3*Coeff[8]+x5*x2*Coeff[9]
+x5*x3*Coeff[10];
@@ -90,13 +90,13 @@ real phi3(real x)
}
}
-void expfactors(real x, coefficients a)
+void expfactors(real x, coefficients a)
{
for(int i=0; i < a.steps.length; ++i)
a.factors[i]=exp(x*a.steps[i]);
a.factors[a.steps.length]=exp(x);
}
-
+
// First-Order Euler
RKTableau Euler=RKTableau(1,new real[][], new real[] {1});
@@ -185,40 +185,40 @@ RKTableau RK4=RKTableau(4,new real[][] {{1/2},{0,1/2},{0,0,1}},
// Fifth-Order Cash-Karp Runge-Kutta
RKTableau RK5=RKTableau(5,new real[][] {{1/5},
- {3/40,9/40},
- {3/10,-9/10,6/5},
- {-11/54,5/2,-70/27,35/27},
- {1631/55296,175/512,575/13824,
- 44275/110592,253/4096}},
+ {3/40,9/40},
+ {3/10,-9/10,6/5},
+ {-11/54,5/2,-70/27,35/27},
+ {1631/55296,175/512,575/13824,
+ 44275/110592,253/4096}},
new real[] {37/378,0,250/621,125/594,
- 0,512/1771}, // 5th order
+ 0,512/1771}, // 5th order
new real[] {2825/27648,0,18575/48384,13525/55296,
- 277/14336,1/4}); // 4th order
+ 277/14336,1/4}); // 4th order
// Fifth-Order Fehlberg Runge-Kutta
RKTableau RK5F=RKTableau(5,new real[][] {{1/4},
- {3/32,9/32},
- {1932/2197,-7200/2197,7296/2197},
- {439/216,-8,3680/513,-845/4104},
- {-8/27,2,-3544/2565,1859/4104,
- -11/40}},
+ {3/32,9/32},
+ {1932/2197,-7200/2197,7296/2197},
+ {439/216,-8,3680/513,-845/4104},
+ {-8/27,2,-3544/2565,1859/4104,
+ -11/40}},
new real[] {16/135,0,6656/12825,28561/56430,-9/50,2/55}, // 5th order
new real[] {25/216,0,1408/2565,2197/4104,-1/5,0}); // 4th order
// Fifth-Order Dormand-Prince Runge-Kutta
RKTableau RK5DP=RKTableau(5,new real[][] {{1/5},
- {3/40,9/40},
- {44/45,-56/15,32/9},
- {19372/6561,-25360/2187,64448/6561,
- -212/729},
- {9017/3168,-355/33,46732/5247,49/176,
- -5103/18656}},
+ {3/40,9/40},
+ {44/45,-56/15,32/9},
+ {19372/6561,-25360/2187,64448/6561,
+ -212/729},
+ {9017/3168,-355/33,46732/5247,49/176,
+ -5103/18656}},
new real[] {35/384,0,500/1113,125/192,-2187/6784,
- 11/84}, // 5th order
+ 11/84}, // 5th order
new real[] {5179/57600,0,7571/16695,393/640,
- -92097/339200,187/2100,1/40}); // 4th order
+ -92097/339200,187/2100,1/40}); // 4th order
-real error(real error, real initial, real lowOrder, real norm, real diff)
+real error(real error, real initial, real lowOrder, real norm, real diff)
{
if(initial != 0 && lowOrder != initial) {
static real epsilon=realMin/realEpsilon;
@@ -249,7 +249,7 @@ struct solution
real[] y;
}
-void write(solution S)
+void write(solution S)
{
for(int i=0; i < S.t.length; ++i)
write(S.t[i],S.y[i]);
@@ -276,7 +276,7 @@ solution integrate(real y, real c=0, real f(real t, real y), real a, real b=a,
new real(real t, real y) {return f(t,y)-c*y;};
tableau.stepDependence(h,c,tableau.a);
-
+
real t=a;
real f0;
if(tableau.a.lowOrderWeights.length == 0) dynamic=false;
@@ -293,7 +293,7 @@ solution integrate(real y, real c=0, real f(real t, real y), real a, real b=a,
tableau.stepDependence(h,c,tableau.a);
dt=h;
}
-
+
real[] predictions={fsal ? f0 : F(t,y)};
for(int i=0; i < tableau.a.steps.length; ++i)
predictions.push(F(t+h*tableau.a.steps[i],
@@ -336,7 +336,7 @@ struct Solution
real[][] y;
}
-void write(Solution S)
+void write(Solution S)
{
for(int i=0; i < S.t.length; ++i) {
write(S.t[i],tab);
@@ -356,7 +356,7 @@ Solution integrate(real[] y, real[] f(real t, real[] y), real a, real b=a,
Solution S;
S.t=new real[] {a};
S.y=new real[][] {copy(y)};
-
+
if(h == 0) {
if(b == a) return S;
if(n == 0) abort("Either n or h must be specified");
diff --git a/Build/source/utils/asymptote/base/palette.asy b/Build/source/utils/asymptote/base/palette.asy
index e77fa946e6b..e3d62183120 100644
--- a/Build/source/utils/asymptote/base/palette.asy
+++ b/Build/source/utils/asymptote/base/palette.asy
@@ -5,7 +5,7 @@ private transform swap=(0,0,0,1,1,0);
typedef bounds range(picture pic, real min, real max);
range Range(bool automin=false, real min=-infinity,
- bool automax=false, real max=infinity)
+ bool automax=false, real max=infinity)
{
return new bounds(picture pic, real dmin, real dmax) {
// autoscale routine finds reasonable limits
@@ -45,7 +45,7 @@ void image(frame f, pen[][] data, pair initial, pair final,
// Reduce color palette to approximate range of data relative to "display"
// range => errors of 1/palette.length in resulting color space.
pen[] adjust(picture pic, real min, real max, real rmin, real rmax,
- pen[] palette)
+ pen[] palette)
{
real dmin=pic.scale.z.T(min);
real dmax=pic.scale.z.T(max);
@@ -100,7 +100,7 @@ bounds image(picture pic=currentpicture, real[][] f, range range=Full,
initial=T*initial;
final=T*final;
}
-
+
pic.add(new void(frame F, transform t) {
_image(F,f,initial,final,palette,t*T,copy=false,antialias=antialias);
},true);
@@ -146,7 +146,7 @@ void image(picture pic=currentpicture, pen[][] data, pair initial, pair final,
initial=T*initial;
final=T*final;
}
-
+
pic.add(new void(frame F, transform t) {
_image(F,data,initial,final,t*T,copy=false,antialias=antialias);
},true);
@@ -171,7 +171,7 @@ void image(picture pic=currentpicture, pen f(int, int), int width, int height,
initial=T*initial;
final=T*final;
}
-
+
pic.add(new void(frame F, transform t) {
_image(F,f,width,height,initial,final,t*T,antialias=antialias);
},true);
@@ -267,20 +267,20 @@ paletteticks PaletteTicks(Label format="", ticklabel ticklabel=null,
return Ticks(sign,format,ticklabel,beginlabel,endlabel,N,n,Step,step,
true,true,extend=true,pTick,ptick);
};
-}
+}
paletteticks PaletteTicks=PaletteTicks();
paletteticks NoTicks=new ticks(int sign=-1) {return NoTicks;};
-void palette(picture pic=currentpicture, Label L="", bounds bounds,
- pair initial, pair final, axis axis=Right, pen[] palette,
+void palette(picture pic=currentpicture, Label L="", bounds bounds,
+ pair initial, pair final, axis axis=Right, pen[] palette,
pen p=currentpen, paletteticks ticks=PaletteTicks,
bool copy=true, bool antialias=false)
{
real initialz=pic.scale.z.T(bounds.min);
real finalz=pic.scale.z.T(bounds.max);
bounds mz=autoscale(initialz,finalz,pic.scale.z.scale);
-
+
axisT axis;
axis(pic,axis);
real angle=degrees(axis.align.dir);
@@ -311,11 +311,11 @@ void palette(picture pic=currentpicture, Label L="", bounds bounds,
if(vertical && L.defaulttransform) {
frame f;
add(f,Label(L.s,(0,0),L.p));
- if(length(max(f)-min(f)) > ylabelwidth*fontsize(L.p))
+ if(length(max(f)-min(f)) > ylabelwidth*fontsize(L.p))
L.transform(rotate(90));
}
real[][] pdata={sequence(palette.length)};
-
+
transform T;
pair Tinitial,Tfinal;
if(vertical) {
@@ -326,12 +326,12 @@ void palette(picture pic=currentpicture, Label L="", bounds bounds,
Tinitial=initial;
Tfinal=final;
}
-
+
pic.add(new void(frame f, transform t) {
_image(f,pdata,Tinitial,Tfinal,palette,t*T,copy=false,
antialias=antialias);
},true);
-
+
ticklocate locate=ticklocate(initialz,finalz,pic.scale.z,mz.min,mz.max);
axis(pic,L,g,g2,p,ticks(sgn(axis.side.x*dot(lambda,par))),locate,mz.divisor,
true);
@@ -356,13 +356,13 @@ pen[] Grayscale(int NColors=256)
pen[] Wheel(int NColors=32766)
{
if(settings.gray) return Grayscale(NColors);
-
+
int nintervals=6;
if(NColors <= nintervals) NColors=nintervals+1;
int n=-quotient(NColors,-nintervals);
-
+
pen[] Palette;
-
+
Palette=new pen[n*nintervals];
real ninv=1.0/n;
@@ -373,7 +373,7 @@ pen[] Wheel(int NColors=32766)
Palette[n+i]=rgb(ininv1,0.0,1.0);
Palette[2n+i]=rgb(0.0,ininv,1.0);
Palette[3n+i]=rgb(0.0,1.0,ininv1);
- Palette[4n+i]=rgb(ininv,1.0,0.0);
+ Palette[4n+i]=rgb(ininv,1.0,0.0);
Palette[5n+i]=rgb(1.0,ininv1,0.0);
}
return Palette;
@@ -383,14 +383,14 @@ pen[] Wheel(int NColors=32766)
pen[] Rainbow(int NColors=32766)
{
if(settings.gray) return Grayscale(NColors);
-
+
int offset=1;
int nintervals=5;
if(NColors <= nintervals) NColors=nintervals+1;
int n=-quotient(NColors-1,-nintervals);
-
+
pen[] Palette;
-
+
Palette=new pen[n*nintervals+offset];
real ninv=1.0/n;
@@ -400,37 +400,37 @@ pen[] Rainbow(int NColors=32766)
Palette[i]=rgb(ininv1,0.0,1.0);
Palette[n+i]=rgb(0.0,ininv,1.0);
Palette[2n+i]=rgb(0.0,1.0,ininv1);
- Palette[3n+i]=rgb(ininv,1.0,0.0);
+ Palette[3n+i]=rgb(ininv,1.0,0.0);
Palette[4n+i]=rgb(1.0,ininv1,0.0);
}
Palette[4n+n]=rgb(1.0,0.0,0.0);
-
+
return Palette;
}
private pen[] BWRainbow(int NColors, bool two)
{
if(settings.gray) return Grayscale(NColors);
-
+
int offset=1;
int nintervals=6;
int divisor=3;
-
+
if(two) nintervals += 6;
-
+
int Nintervals=nintervals*divisor;
if(NColors <= Nintervals) NColors=Nintervals+1;
int num=NColors-offset;
int n=-quotient(num,-Nintervals)*divisor;
NColors=n*nintervals+offset;
-
+
pen[] Palette;
-
+
Palette=new pen[NColors];
real ninv=1.0/n;
int k=0;
-
+
if(two) {
for(int i=0; i < n; ++i) {
real ininv=i*ninv;
@@ -444,9 +444,9 @@ private pen[] BWRainbow(int NColors, bool two)
}
k += 6n;
}
-
+
if(two)
- for(int i=0; i < n; ++i)
+ for(int i=0; i < n; ++i)
Palette[k+i]=rgb(1.0-i*ninv,0.0,1.0);
else {
int n3=-quotient(n,-3);
@@ -467,12 +467,12 @@ private pen[] BWRainbow(int NColors, bool two)
real ininv1=1.0-ininv;
Palette[k+i]=rgb(0.0,ininv,1.0);
Palette[k+n+i]=rgb(0.0,1.0,ininv1);
- Palette[k+2n+i]=rgb(ininv,1.0,0.0);
+ Palette[k+2n+i]=rgb(ininv,1.0,0.0);
Palette[k+3n+i]=rgb(1.0,ininv1,0.0);
Palette[k+4n+i]=rgb(1.0,ininv,ininv);
}
Palette[k+5n]=rgb(1.0,1.0,1.0);
-
+
return Palette;
}
@@ -484,7 +484,7 @@ pen[] quantize(pen[] Palette, int n)
real step=(Palette.length-1)/(n-1);
return sequence(new pen(int i) {
return Palette[round(i*step)];
- },n);
+ },n);
}
// A rainbow palette tapering off to black/white at the spectrum ends,
@@ -507,7 +507,7 @@ pen[] BWRainbow2(int NColors=32761)
//A palette varying linearly over the specified array of pens, using
// NColors in each interpolation interval.
-pen[] Gradient(int NColors=256 ... pen[] p)
+pen[] Gradient(int NColors=256 ... pen[] p)
{
pen[] P;
if(p.length < 2) abort("at least 2 colors must be specified");
@@ -522,7 +522,7 @@ pen[] Gradient(int NColors=256 ... pen[] p)
return P;
}
-pen[] cmyk(pen[] Palette)
+pen[] cmyk(pen[] Palette)
{
int n=Palette.length;
for(int i=0; i < n; ++i)
diff --git a/Build/source/utils/asymptote/base/patterns.asy b/Build/source/utils/asymptote/base/patterns.asy
index 56fa3bf4a24..559e36cec11 100644
--- a/Build/source/utils/asymptote/base/patterns.asy
+++ b/Build/source/utils/asymptote/base/patterns.asy
@@ -7,7 +7,7 @@ frame tiling(string name, picture pic, pair lb=0, pair rt=0)
pair pmin=min(f)-lb;
pair pmax=max(f)+rt;
string s="%.6f";
- postscript(tiling,"<< /PaintType 1 /PatternType 1 /TilingType 1
+ postscript(tiling,"<< /PaintType 1 /PatternType 1 /TilingType 1
/BBox ["+format(s,pmin.x,"C")+" "+format(s,pmin.y,"C")+" "+
format(s,pmax.x,"C")+" "+format(s,pmax.y,"C")+"]
/XStep "+format(s,pmax.x-pmin.x,"C")+"
@@ -64,7 +64,7 @@ picture brick(real Hx=5mm, real Hy=0, pen p=currentpen)
}
real hatchepsilon=1e-4;
-picture hatch(real H=5mm, pair dir=NE, pen p=currentpen)
+picture hatch(real H=5mm, pair dir=NE, pen p=currentpen)
{
picture tiling;
real theta=angle(dir);
diff --git a/Build/source/utils/asymptote/base/plain.asy b/Build/source/utils/asymptote/base/plain.asy
index 480780c458a..365aad02c74 100644
--- a/Build/source/utils/asymptote/base/plain.asy
+++ b/Build/source/utils/asymptote/base/plain.asy
@@ -18,13 +18,13 @@ if(settings.command != "") {
include plain_constants;
-access version;
+access version;
if(version.VERSION != VERSION) {
warning("version","using possibly incompatible version "+
version.VERSION+" of plain.asy"+'\n');
nowarn("version");
}
-
+
include plain_strings;
include plain_pens;
include plain_paths;
@@ -32,13 +32,15 @@ include plain_filldraw;
include plain_margins;
include plain_picture;
include plain_Label;
-include plain_shipout;
include plain_arcs;
include plain_boxes;
+include plain_shipout;
include plain_markers;
include plain_arrows;
include plain_debugger;
+real RELEASE=(real) split(VERSION,"-")[0];
+
typedef void exitfcn();
void updatefunction()
@@ -106,7 +108,7 @@ addSaveFunction(new restoreThunk () {
});
// Save the current state, so that restore will put things back in that state.
-restoreThunk save()
+restoreThunk save()
{
return restore=buildRestoreThunk();
}
@@ -132,7 +134,7 @@ restoreThunk buildRestoreDefaults()
}
// Save the current state, so that restore will put things back in that state.
-restoreThunk savedefaults()
+restoreThunk savedefaults()
{
return restoredefaults=buildRestoreDefaults();
}
@@ -145,7 +147,7 @@ void initdefaults()
atexit(null);
}
-// Return the sequence n,...m
+// Return the sequence n,...,m
int[] sequence(int n, int m)
{
return sequence(new int(int x){return x;},m-n+1)+n;
@@ -180,13 +182,26 @@ void eval(code s, bool embedded=false)
if(!embedded) restoredefaults();
}
+// Associate a parametrized type with a name.
+void type(string type, string name)
+{
+ eval("typedef "+type+" "+name,true);
+}
+
+void mapArray(string From, string To)
+{
+ type(From,"From");
+ type(To,"To");
+ eval("To[] map(To f(From), From[] a) {return sequence(new To(int i) {return f(a[i]);},a.length);}",true);
+}
+
// Evaluate user command line option.
void usersetting()
{
eval(settings.user,true);
}
-string stripsuffix(string f, string suffix=".asy")
+string stripsuffix(string f, string suffix=".asy")
{
int n=rfind(f,suffix);
if(n != -1) f=erase(f,n,-1);
@@ -231,6 +246,7 @@ void beep()
struct processtime {
real user;
real system;
+ real clock;
}
struct cputime {
@@ -239,21 +255,26 @@ struct cputime {
processtime change;
}
-cputime cputime()
+cputime cputime()
{
static processtime last;
real [] a=_cputime();
cputime cputime;
+ real clock=a[4];
cputime.parent.user=a[0];
cputime.parent.system=a[1];
+ cputime.parent.clock=clock;
cputime.child.user=a[2];
cputime.child.system=a[3];
- real user=a[0]+a[2];
- real system=a[1]+a[3];
+ cputime.child.clock=0;
+ real user=cputime.parent.user+cputime.child.user;
+ real system=cputime.parent.system+cputime.child.system;
cputime.change.user=user-last.user;
cputime.change.system=system-last.system;
+ cputime.change.clock=clock-last.clock;
last.user=user;
last.system=system;
+ last.clock=clock;
return cputime;
}
@@ -285,23 +306,3 @@ if(settings.autoimport != "") {
}
cputime();
-
-void nosetpagesize()
-{
- static bool initialized=false;
- if(!initialized && latex()) {
- // Portably pass nosetpagesize option to graphicx package.
- texpreamble("\usepackage{ifluatex}\ifluatex
-\ifx\pdfpagewidth\undefined\let\pdfpagewidth\paperwidth\fi
-\ifx\pdfpageheight\undefined\let\pdfpageheight\paperheight\fi\else
-\let\paperwidthsave\paperwidth\let\paperwidth\undefined
-\usepackage{graphicx}
-\let\paperwidth\paperwidthsave\fi");
- initialized=true;
- }
-}
-
-nosetpagesize();
-
-if(settings.tex == "luatex")
- texpreamble("\input luatex85.sty");
diff --git a/Build/source/utils/asymptote/base/plain_Label.asy b/Build/source/utils/asymptote/base/plain_Label.asy
index c50ce003be0..0a2c270d689 100644
--- a/Build/source/utils/asymptote/base/plain_Label.asy
+++ b/Build/source/utils/asymptote/base/plain_Label.asy
@@ -15,10 +15,10 @@ transform scaleless(transform t)
real a=t.xx, b=t.xy, c=t.yx, d=t.yy;
real arg=(a-d)^2+4b*c;
pair delta=arg >= 0 ? sqrt(arg) : I*sqrt(-arg);
- real trace=a+d;
+ real trace=a+d;
pair l1=0.5(trace+delta);
pair l2=0.5(trace-delta);
-
+
if(abs(delta) < sqrtEpsilon*max(abs(l1),abs(l2))) {
real s=abs(0.5trace);
return (s != 0) ? scale(1/s)*t : t;
@@ -51,7 +51,7 @@ transform scaleless(transform t)
}
}
return c;
- }
+ }
pair[][] conj(pair[][] a) {
pair[][] c=new pair[2][2];
@@ -61,7 +61,7 @@ transform scaleless(transform t)
}
}
return c;
- }
+ }
A=conj(U)*A*U;
@@ -70,7 +70,7 @@ transform scaleless(transform t)
A[0][0] /= D;
A[0][1] /= D;
}
-
+
D=abs(A[1][1]);
if(D != 0) {
A[1][0] /= D;
@@ -155,13 +155,13 @@ side Relative(explicit pair align)
s.align=align;
return s;
}
-
+
restricted side NoSide;
restricted side LeftSide=Relative(W);
restricted side Center=Relative((0,0));
restricted side RightSide=Relative(E);
-side operator * (real x, side s)
+side operator * (real x, side s)
{
side S;
S.align=x*s.align;
@@ -190,7 +190,7 @@ position Relative(real position)
p.relative=true;
return p;
}
-
+
restricted position BeginPoint=Relative(0);
restricted position MidPoint=Relative(0.5);
restricted position EndPoint=Relative(1);
@@ -227,8 +227,8 @@ struct Label {
bool defaulttransform3=true;
embed embed=Rotate; // Shift, Rotate, Slant, or Scale with embedded picture
filltype filltype=NoFill;
-
- void init(string s="", string size="", position position=0,
+
+ void init(string s="", string size="", position position=0,
bool defaultposition=true, align align=NoAlign, pen p=nullpen,
transform T=identity(), transform3 T3=identity4,
bool defaulttransform=true, bool defaulttransform3=true,
@@ -246,17 +246,17 @@ struct Label {
this.embed=embed;
this.filltype=filltype;
}
-
+
void initalign(string s="", string size="", align align, pen p=nullpen,
embed embed=Rotate, filltype filltype=NoFill) {
init(s,size,align,p,embed,filltype);
}
-
+
void transform(transform T) {
this.T=T;
defaulttransform=false;
}
-
+
void transform3(transform3 T) {
this.T3=copy(T);
defaulttransform3=false;
@@ -268,27 +268,27 @@ struct Label {
defaulttransform3,embed,filltype);
return L;
}
-
+
void position(position pos) {
this.position=pos;
defaultposition=false;
}
-
+
void align(align a) {
align.align(a);
}
void align(align a, align default) {
align.align(a,default);
}
-
+
void p(pen p0) {
if(this.p == nullpen) this.p=p0;
}
-
+
void filltype(filltype filltype0) {
if(this.filltype == NoFill) this.filltype=filltype0;
}
-
+
void label(frame f, transform t=identity(), pair position, pair align) {
pen p0=p == nullpen ? currentpen : p;
align=length(align)*unit(rotation(t)*align);
@@ -309,7 +309,7 @@ struct Label {
add(f,d,filltype);
}
}
-
+
void label(picture pic=currentpicture, pair position, pair align) {
if(s == "") return;
pic.add(new void (frame f, transform t) {
@@ -324,7 +324,7 @@ struct Label {
void out(picture pic=currentpicture) {
label(pic,position.position,align.dir);
}
-
+
void out(picture pic=currentpicture, path g) {
bool relative=position.relative;
real position=position.position.x;
@@ -349,7 +349,7 @@ struct Label {
pair position=point(g,position);
pic.addBox(position,position,min(f),max(f));
}
-
+
void write(file file=stdout, suffix suffix=endl) {
write(file,"\""+s+"\"");
if(!defaultposition) write(file,", position=",position.position);
@@ -364,11 +364,11 @@ struct Label {
}
write(file,"",suffix);
}
-
+
real relative() {
return defaultposition ? 0.5 : position.position.x;
};
-
+
real relative(path g) {
return position.relative ? reltime(g,relative()) : relative();
};
@@ -380,12 +380,12 @@ void add(frame f, transform t=identity(), Label L)
{
L.out(f,t);
}
-
+
void add(picture pic=currentpicture, Label L)
{
L.out(pic);
}
-
+
Label operator * (transform t, Label L)
{
Label tL=L.copy();
@@ -466,20 +466,20 @@ void label(frame f, Label L, pair position, align align=NoAlign,
{
add(f,Label(L,position,align,p,filltype));
}
-
+
void label(frame f, Label L, align align=NoAlign,
pen p=currentpen, filltype filltype=NoFill)
{
add(f,Label(L,L.position,align,p,filltype));
}
-
+
void label(picture pic=currentpicture, Label L, pair position,
align align=NoAlign, pen p=currentpen, filltype filltype=NoFill)
{
Label L=Label(L,position,align,p,filltype);
add(pic,L);
}
-
+
void label(picture pic=currentpicture, Label L, align align=NoAlign,
pen p=currentpen, filltype filltype=NoFill)
{
@@ -494,7 +494,7 @@ void label(pair origin, picture pic=currentpicture, Label L, align align=NoAlign
label(opic,L,L.position,align,p,filltype);
add(pic,opic,origin);
}
-
+
void label(picture pic=currentpicture, Label L, explicit path g,
align align=NoAlign, pen p=currentpen, filltype filltype=NoFill)
{
@@ -532,12 +532,12 @@ object operator cast(frame f) {
return object(f);
}
-object operator cast(Label L)
+object operator cast(Label L)
{
return object(L);
}
-object operator cast(string s)
+object operator cast(string s)
{
return object(s);
}
@@ -562,7 +562,7 @@ object operator * (transform t, explicit object F)
}
// Returns a copy of object F aligned in the direction align
-object align(object F, pair align)
+object align(object F, pair align)
{
return shift(F.f,align)*F;
}
@@ -594,7 +594,7 @@ path[] texpath(Label L, bool tex=settings.tex != "none", bool bbox=false)
real fontsize;
string font;
- void operator init(Label L)
+ void operator init(Label L)
{
s=replace(L.s,'\n',' ');
fontsize=fontsize(L.p);
@@ -603,7 +603,7 @@ path[] texpath(Label L, bool tex=settings.tex != "none", bool bbox=false)
pen pen() {return fontsize(fontsize)+fontcommand(font);}
}
-
+
bool lexorder(stringfont a, stringfont b) {
return a.s < b.s || (a.s == b.s && (a.fontsize < b.fontsize ||
(a.fontsize == b.fontsize &&
@@ -615,7 +615,7 @@ path[] texpath(Label L, bool tex=settings.tex != "none", bool bbox=false)
static stringfont[] stringlist;
static bool adjust[];
-
+
path[] G;
stringfont s=stringfont(L);
@@ -649,7 +649,7 @@ path[] texpath(Label L, bool tex=settings.tex != "none", bool bbox=false)
label(f,L);
return transform(box(min(f),max(f)),L);
}
-
+
if(stringlist.length > 0) {
path[][] g;
int n=stringlist.length;
@@ -660,9 +660,9 @@ path[] texpath(Label L, bool tex=settings.tex != "none", bool bbox=false)
s[i]=adjust[i] ? "."+S.s : S.s;
p[i]=adjust[i] ? S.pen()+basealign : S.pen();
}
-
+
g=tex ? _texpath(s,p) : textpath(s,p);
-
+
if(tex)
for(int i=0; i < n; ++i)
if(adjust[i]) {
@@ -670,8 +670,8 @@ path[] texpath(Label L, bool tex=settings.tex != "none", bool bbox=false)
g[i].delete(0);
g[i]=shift(0,-y)*g[i];
}
-
-
+
+
for(int i=0; i < stringlist.length; ++i) {
stringfont s=stringlist[i];
int j=search(stringcache,s,lexorder)+1;
@@ -686,6 +686,6 @@ path[] texpath(Label L, bool tex=settings.tex != "none", bool bbox=false)
}
texpath=new path[](string s, pen p, bool tex=settings.tex != "none", bool bbox=false)
-{
- return texpath(Label(s,p));
-};
+ {
+ return texpath(Label(s,p));
+ };
diff --git a/Build/source/utils/asymptote/base/plain_arcs.asy b/Build/source/utils/asymptote/base/plain_arcs.asy
index 140bc3cff19..11c603b6152 100644
--- a/Build/source/utils/asymptote/base/plain_arcs.asy
+++ b/Build/source/utils/asymptote/base/plain_arcs.asy
@@ -1,5 +1,5 @@
bool CCW=true;
-bool CW=false;
+bool CW=false;
path circle(pair c, real r)
{
@@ -35,7 +35,7 @@ path arc(pair c, real r, real angle1, real angle2, bool direction)
{
return arc(c,c+r*dir(angle1),c+r*dir(angle2),direction);
}
-
+
// return an arc centered at c with radius r > 0 from angle1 to angle2 in
// degrees, drawing counterclockwise if angle2 >= angle1 (otherwise clockwise).
path arc(pair c, real r, real angle1, real angle2)
diff --git a/Build/source/utils/asymptote/base/plain_arrows.asy b/Build/source/utils/asymptote/base/plain_arrows.asy
index 96a33dd5a44..79ee403af3d 100644
--- a/Build/source/utils/asymptote/base/plain_arrows.asy
+++ b/Build/source/utils/asymptote/base/plain_arrows.asy
@@ -12,7 +12,7 @@ real arrowtexfactor=1;
real barfactor=arrowfactor;
-real arrowsize(pen p=currentpen)
+real arrowsize(pen p=currentpen)
{
return arrowfactor*linewidth(p);
}
@@ -53,39 +53,39 @@ path arrowbase(path r, pair y, real t, real size)
arrowhead DefaultHead;
DefaultHead.head=new path(path g, position position=EndPoint, pen p=currentpen,
real size=0, real angle=arrowangle) {
- if(size == 0) size=DefaultHead.size(p);
- bool relative=position.relative;
- real position=position.position.x;
- if(relative) position=reltime(g,position);
- path r=subpath(g,position,0);
- pair x=point(r,0);
- real t=arctime(r,size);
- pair y=point(r,t);
- path base=arrowbase(r,y,t,size);
- path left=rotate(-angle,x)*r;
- path right=rotate(angle,x)*r;
- real[] T=arrowbasepoints(base,left,right);
- pair denom=point(right,T[1])-y;
- real factor=denom != 0 ? length((point(left,T[0])-y)/denom) : 1;
- path left=rotate(-angle*factor,x)*r;
- path right=rotate(angle*factor,x)*r;
- real[] T=arrowbasepoints(base,left,right);
- return subpath(left,0,T[0])--subpath(right,T[1],0)&cycle;
+ if(size == 0) size=DefaultHead.size(p);
+ bool relative=position.relative;
+ real position=position.position.x;
+ if(relative) position=reltime(g,position);
+ path r=subpath(g,position,0);
+ pair x=point(r,0);
+ real t=arctime(r,size);
+ pair y=point(r,t);
+ path base=arrowbase(r,y,t,size);
+ path left=rotate(-angle,x)*r;
+ path right=rotate(angle,x)*r;
+ real[] T=arrowbasepoints(base,left,right);
+ pair denom=point(right,T[1])-y;
+ real factor=denom != 0 ? length((point(left,T[0])-y)/denom) : 1;
+ path left=rotate(-angle*factor,x)*r;
+ path right=rotate(angle*factor,x)*r;
+ real[] T=arrowbasepoints(base,left,right);
+ return subpath(left,0,T[0])--subpath(right,T[1],0)&cycle;
};
arrowhead SimpleHead;
SimpleHead.head=new path(path g, position position=EndPoint, pen p=currentpen,
real size=0, real angle=arrowangle) {
- if(size == 0) size=SimpleHead.size(p);
- bool relative=position.relative;
- real position=position.position.x;
- if(relative) position=reltime(g,position);
- path r=subpath(g,position,0);
- pair x=point(r,0);
- real t=arctime(r,size);
- path left=rotate(-angle,x)*r;
- path right=rotate(angle,x)*r;
- return subpath(left,t,0)--subpath(right,0,t);
+ if(size == 0) size=SimpleHead.size(p);
+ bool relative=position.relative;
+ real position=position.position.x;
+ if(relative) position=reltime(g,position);
+ path r=subpath(g,position,0);
+ pair x=point(r,0);
+ real t=arctime(r,size);
+ path left=rotate(-angle,x)*r;
+ path right=rotate(angle,x)*r;
+ return subpath(left,t,0)--subpath(right,0,t);
};
arrowhead HookHead(real dir=arrowdir, real barb=arrowbarb)
@@ -94,34 +94,34 @@ arrowhead HookHead(real dir=arrowdir, real barb=arrowbarb)
a.head=new path(path g, position position=EndPoint, pen p=currentpen,
real size=0, real angle=arrowangle)
{
- if(size == 0) size=a.size(p);
- angle=min(angle*arrowhookfactor,45);
- bool relative=position.relative;
- real position=position.position.x;
- if(relative) position=reltime(g,position);
- path r=subpath(g,position,0);
- pair x=point(r,0);
- real t=arctime(r,size);
- pair y=point(r,t);
- path base=arrowbase(r,y,t,size);
- path left=rotate(-angle,x)*r;
- path right=rotate(angle,x)*r;
- real[] T=arrowbasepoints(base,left,right,1);
- pair denom=point(right,T[1])-y;
- real factor=denom != 0 ? length((point(left,T[0])-y)/denom) : 1;
- path left=rotate(-angle*factor,x)*r;
- path right=rotate(angle*factor,x)*r;
- real[] T=arrowbasepoints(base,left,right,1);
- left=subpath(left,0,T[0]);
- right=subpath(right,T[1],0);
- pair pl0=point(left,0), pl1=relpoint(left,1);
- pair pr0=relpoint(right,0), pr1=relpoint(right,1);
- pair M=(pl1+pr0)/2;
- pair v=barb*unit(M-pl0);
- pl1=pl1+v; pr0=pr0+v;
- left=pl0{dir(-dir+degrees(M-pl0,false))}..pl1--M;
- right=M--pr0..pr1{dir(dir+degrees(pr1-M,false))};
- return left--right&cycle;
+ if(size == 0) size=a.size(p);
+ angle=min(angle*arrowhookfactor,45);
+ bool relative=position.relative;
+ real position=position.position.x;
+ if(relative) position=reltime(g,position);
+ path r=subpath(g,position,0);
+ pair x=point(r,0);
+ real t=arctime(r,size);
+ pair y=point(r,t);
+ path base=arrowbase(r,y,t,size);
+ path left=rotate(-angle,x)*r;
+ path right=rotate(angle,x)*r;
+ real[] T=arrowbasepoints(base,left,right,1);
+ pair denom=point(right,T[1])-y;
+ real factor=denom != 0 ? length((point(left,T[0])-y)/denom) : 1;
+ path left=rotate(-angle*factor,x)*r;
+ path right=rotate(angle*factor,x)*r;
+ real[] T=arrowbasepoints(base,left,right,1);
+ left=subpath(left,0,T[0]);
+ right=subpath(right,T[1],0);
+ pair pl0=point(left,0), pl1=relpoint(left,1);
+ pair pr0=relpoint(right,0), pr1=relpoint(right,1);
+ pair M=(pl1+pr0)/2;
+ pair v=barb*unit(M-pl0);
+ pl1=pl1+v; pr0=pr0+v;
+ left=pl0{dir(-dir+degrees(M-pl0,false))}..pl1--M;
+ right=M--pr0..pr1{dir(dir+degrees(pr1-M,false))};
+ return left--right&cycle;
};
return a;
}
@@ -129,35 +129,35 @@ arrowhead HookHead=HookHead();
arrowhead TeXHead;
TeXHead.size=new real(pen p)
-{
- static real hcoef=2.1; // 84/40=abs(base-hint)/base_height
- return hcoef*arrowtexfactor*linewidth(p);
-};
+ {
+ static real hcoef=2.1; // 84/40=abs(base-hint)/base_height
+ return hcoef*arrowtexfactor*linewidth(p);
+ };
TeXHead.arcsize=TeXHead.size;
TeXHead.head=new path(path g, position position=EndPoint, pen p=currentpen,
real size=0, real angle=arrowangle) {
- static real wcoef=1/84; // 1/abs(base-hint)
- static path texhead=scale(wcoef)*
- ((0,20) .. controls (-75,75) and (-108,158) ..
- (-108,166) .. controls (-108,175) and (-100,178) ..
- (-93,178) .. controls (-82,178) and (-80,173) ..
- (-77,168) .. controls (-62,134) and (-30,61) ..
- (70,14) .. controls (82,8) and (84,7) ..
- (84,0) .. controls (84,-7) and (82,-8) ..
- (70,-14) .. controls (-30,-61) and (-62,-134) ..
- (-77,-168) .. controls (-80,-173) and (-82,-178) ..
- (-93,-178) .. controls (-100,-178) and (-108,-175)..
- (-108,-166).. controls (-108,-158) and (-75,-75) ..
- (0,-20)--cycle);
- if(size == 0) size=TeXHead.size(p);
- path gp=scale(size)*texhead;
- bool relative=position.relative;
- real position=position.position.x;
- if(relative) position=reltime(g,position);
- path r=subpath(g,position,0);
- pair y=point(r,arctime(r,size));
- return shift(y)*rotate(degrees(-dir(r,arctime(r,0.5*size))))*gp;
+ static real wcoef=1/84; // 1/abs(base-hint)
+ static path texhead=scale(wcoef)*
+ ((0,20) .. controls (-75,75) and (-108,158) ..
+ (-108,166) .. controls (-108,175) and (-100,178) ..
+ (-93,178) .. controls (-82,178) and (-80,173) ..
+ (-77,168) .. controls (-62,134) and (-30,61) ..
+ (70,14) .. controls (82,8) and (84,7) ..
+ (84,0) .. controls (84,-7) and (82,-8) ..
+ (70,-14) .. controls (-30,-61) and (-62,-134) ..
+ (-77,-168) .. controls (-80,-173) and (-82,-178) ..
+ (-93,-178) .. controls (-100,-178) and (-108,-175)..
+ (-108,-166).. controls (-108,-158) and (-75,-75) ..
+ (0,-20)--cycle);
+ if(size == 0) size=TeXHead.size(p);
+ path gp=scale(size)*texhead;
+ bool relative=position.relative;
+ real position=position.position.x;
+ if(relative) position=reltime(g,position);
+ path r=subpath(g,position,0);
+ pair y=point(r,arctime(r,size));
+ return shift(y)*rotate(degrees(-dir(r,arctime(r,0.5*size))))*gp;
};
TeXHead.defaultfilltype=new filltype(pen p) {return Fill(p);};
@@ -169,7 +169,7 @@ private real position(position position, real size, path g, bool center)
position *= arclength(g);
if(center) position += 0.5*size;
position=arctime(g,position);
- } else if(center)
+ } else if(center)
position=arctime(g,arclength(subpath(g,0,position))+0.5*size);
return position;
}
@@ -251,7 +251,7 @@ picture arrow(arrowhead arrowhead=DefaultHead,
drawarrow(f,arrowhead,t*g,p,size,angle,filltype,position,forwards,margin,
center);
});
-
+
pic.addPath(g,p);
real position=position(position,size,g,center);
@@ -275,7 +275,7 @@ picture arrow2(arrowhead arrowhead=DefaultHead,
pic.add(new void(frame f, transform t) {
drawarrow2(f,arrowhead,t*g,p,size,angle,filltype,margin);
});
-
+
pic.addPath(g,p);
int L=length(g);
@@ -291,7 +291,7 @@ void bar(picture pic, pair a, pair d, pen p=currentpen)
Draw(opic,-0.5d--0.5d,p+solid);
add(pic,opic,a);
}
-
+
picture bar(pair a, pair d, pen p=currentpen)
{
picture pic;
@@ -345,7 +345,7 @@ arrowbar MidArrow(arrowhead arrowhead=DefaultHead,
return false;
};
}
-
+
arrowbar Arrows(arrowhead arrowhead=DefaultHead,
real size=0, real angle=arrowangle,
filltype filltype=null)
@@ -383,7 +383,7 @@ arrowbar EndArcArrow(arrowhead arrowhead=DefaultHead,
real size=0, real angle=arcarrowangle,
filltype filltype=null,
position position=EndPoint)=ArcArrow;
-
+
arrowbar MidArcArrow(arrowhead arrowhead=DefaultHead,
real size=0, real angle=arcarrowangle,
filltype filltype=null)
@@ -395,7 +395,7 @@ arrowbar MidArcArrow(arrowhead arrowhead=DefaultHead,
return false;
};
}
-
+
arrowbar ArcArrows(arrowhead arrowhead=DefaultHead,
real size=0, real angle=arcarrowangle,
filltype filltype=null)
@@ -406,8 +406,8 @@ arrowbar ArcArrows(arrowhead arrowhead=DefaultHead,
return false;
};
}
-
-arrowbar BeginBar(real size=0)
+
+arrowbar BeginBar(real size=0)
{
return new bool(picture pic, path g, pen p, margin margin) {
real size=size == 0 ? barsize(p) : size;
@@ -416,7 +416,7 @@ arrowbar BeginBar(real size=0)
};
}
-arrowbar Bar(real size=0)
+arrowbar Bar(real size=0)
{
return new bool(picture pic, path g, pen p, margin margin) {
int L=length(g);
@@ -426,9 +426,9 @@ arrowbar Bar(real size=0)
};
}
-arrowbar EndBar(real size=0)=Bar;
+arrowbar EndBar(real size=0)=Bar;
-arrowbar Bars(real size=0)
+arrowbar Bars(real size=0)
{
return new bool(picture pic, path g, pen p, margin margin) {
real size=size == 0 ? barsize(p) : size;
@@ -469,73 +469,73 @@ void draw(picture pic=currentpicture, Label L=null, path g,
// These if statements are ordered in such a way that the most common case
// (with just a path and a pen) executes the least bytecode.
if (marker == nomarker)
- {
- if (arrow == None && bar == None)
{
- if (margin == NoMargin && size(nib(p)) == 0)
- {
- pic.addExactAbove(
- new void(frame f, transform t, transform T, pair, pair) {
- _draw(f,t*T*g,p);
- });
- pic.addPath(g,p);
-
- // Jumping over else clauses takes time, so test if we can return
- // here.
- if (L == null && legend == null)
- return;
+ if (arrow == None && bar == None)
+ {
+ if (margin == NoMargin && size(nib(p)) == 0)
+ {
+ pic.addExactAbove(
+ new void(frame f, transform t, transform T, pair, pair) {
+ _draw(f,t*T*g,p);
+ });
+ pic.addPath(g,p);
+
+ // Jumping over else clauses takes time, so test if we can return
+ // here.
+ if (L == null && legend == null)
+ return;
+ }
+ else // With margin or polygonal pen.
+ {
+ _draw(pic, g, p, margin);
+ }
+ }
+ else /* arrow or bar */
+ {
+ // Note we are using & instead of && as both arrow and bar need to be
+ // called.
+ if (arrow(pic, g, p, margin) & bar(pic, g, p, margin))
+ _draw(pic, g, p, margin);
+ }
+
+ if(L != null && L.s != "") {
+ L=L.copy();
+ L.align(align);
+ L.p(p);
+ L.out(pic,g);
}
- else // With margin or polygonal pen.
- {
- _draw(pic, g, p, margin);
+
+ if(legend != null && legend.s != "") {
+ legend.p(p);
+ pic.legend.push(Legend(legend.s,legend.p,p,marker.f,marker.above));
}
}
- else /* arrow or bar */
+ else /* marker != nomarker */
{
+ if(marker != nomarker && !marker.above) marker.mark(pic,g);
+
// Note we are using & instead of && as both arrow and bar need to be
// called.
- if (arrow(pic, g, p, margin) & bar(pic, g, p, margin))
- _draw(pic, g, p, margin);
- }
-
- if(L != null && L.s != "") {
- L=L.copy();
- L.align(align);
- L.p(p);
- L.out(pic,g);
- }
-
- if(legend != null && legend.s != "") {
- legend.p(p);
- pic.legend.push(Legend(legend.s,legend.p,p,marker.f,marker.above));
- }
- }
- else /* marker != nomarker */
- {
- if(marker != nomarker && !marker.above) marker.mark(pic,g);
-
- // Note we are using & instead of && as both arrow and bar need to be
- // called.
- if ((arrow == None || arrow(pic, g, p, margin)) &
- (bar == None || bar(pic, g, p, margin)))
- {
- _draw(pic, g, p, margin);
+ if ((arrow == None || arrow(pic, g, p, margin)) &
+ (bar == None || bar(pic, g, p, margin)))
+ {
+ _draw(pic, g, p, margin);
+ }
+
+ if(L != null && L.s != "") {
+ L=L.copy();
+ L.align(align);
+ L.p(p);
+ L.out(pic,g);
}
- if(L != null && L.s != "") {
- L=L.copy();
- L.align(align);
- L.p(p);
- L.out(pic,g);
- }
+ if(legend != null && legend.s != "") {
+ legend.p(p);
+ pic.legend.push(Legend(legend.s,legend.p,p,marker.f,marker.above));
+ }
- if(legend != null && legend.s != "") {
- legend.p(p);
- pic.legend.push(Legend(legend.s,legend.p,p,marker.f,marker.above));
+ if(marker != nomarker && marker.above) marker.mark(pic,g);
}
-
- if(marker != nomarker && marker.above) marker.mark(pic,g);
- }
}
// Draw a fixed-size line about the user-coordinate 'origin'.
@@ -551,12 +551,12 @@ void draw(pair origin, picture pic=currentpicture, Label L=null, path g,
void draw(picture pic=currentpicture, explicit path[] g, pen p=currentpen,
Label legend=null, marker marker=nomarker)
-{
+{
// This could be optimized to size and draw the entire array as a batch.
- for(int i=0; i < g.length-1; ++i)
+ for(int i=0; i < g.length-1; ++i)
draw(pic,g[i],p,marker);
if(g.length > 0) draw(pic,g[g.length-1],p,legend,marker);
-}
+}
void draw(picture pic=currentpicture, guide[] g, pen p=currentpen,
Label legend=null, marker marker=nomarker)
@@ -621,7 +621,7 @@ frame[] fit(string prefix="", picture[] pictures, string format="",
{
if(pictures.length == 0)
return new frame[];
-
+
picture all;
size(all,pictures[0]);
for(picture pic : pictures)
diff --git a/Build/source/utils/asymptote/base/plain_bounds.asy b/Build/source/utils/asymptote/base/plain_bounds.asy
index b74a6ceee6a..c4e24721773 100644
--- a/Build/source/utils/asymptote/base/plain_bounds.asy
+++ b/Build/source/utils/asymptote/base/plain_bounds.asy
@@ -4,7 +4,7 @@ include plain_scaling;
// have been added, this is only an approximation since it takes the bounds of
// their transformed bounding box.
private void addTransformedCoords(coords2 dest, transform t,
- coords2 point, coords2 min, coords2 max)
+ coords2 point, coords2 min, coords2 max)
{
dest.push(t, point, point);
@@ -47,7 +47,7 @@ private void addIfMaximal(coord[] dest, coord[] src)
for (coord c : src)
addIfMaximal(dest, c.user, c.truesize);
}
-
+
// Same as addIfMaximal, but testing for minimal coords.
private void addIfMinimal(coord[] coords, real user, real truesize) {
for (coord c : coords)
@@ -130,7 +130,7 @@ private struct freezableBounds {
void operator init(coord[] left, coord[] bottom,
coord[] right, coord[] top) {
this.left = left;
- this.bottom = bottom;
+ this.bottom = bottom;
this.right = right;
this.top = top;
}
@@ -197,7 +197,7 @@ private struct freezableBounds {
void addBox(pair userMin, pair userMax, pair trueMin, pair trueMax) {
assert(!frozen);
- this.min.push(userMin, trueMin);
+ this.min.push(userMin, trueMin);
this.max.push(userMax, trueMax);
}
@@ -334,7 +334,7 @@ private struct freezableBounds {
addLocalsToExtremes(t, e);
}
-
+
private void addLocalsToExtremes(extremes e) {
addMinToExtremes(e, point);
addMaxToExtremes(e, point);
@@ -466,7 +466,7 @@ private struct freezableBounds {
acc.pushUserCoords(min, max);
if (pathBounds.length > 0)
acc.push(min(pathBounds), max(pathBounds));
- for (var pp : pathpenBounds)
+ for (var pp : pathpenBounds)
if(size(pp.g) > 0)
acc.push(min(pp.g), max(pp.g));
for (var link : links)
@@ -623,13 +623,13 @@ private struct freezableBounds {
// Get the extremal coordinates.
extremes e = extremes();
-
+
real sx;
if(xunitsize == 0) {
if(xsize != 0) sx=calculateScaling("x",e.left,e.right,xsize,warn);
} else sx=xunitsize;
- /* Possible alternative code :
+ /* Possible alternative code :
real sx = xunitsize != 0 ? xunitsize :
xsize != 0 ? calculateScaling("x", Coords.x, xsize, warn) :
0; */
@@ -697,7 +697,7 @@ struct bounds {
makeMutable();
base.append(b.base);
}
-
+
void append(transform t, bounds b) {
// makeMutable will be called by append.
if (t == identity())
@@ -760,7 +760,7 @@ struct bounds {
makeMutable();
base.yclip(Min,Max);
}
-
+
void clip(pair Min, pair Max) {
// TODO: If the user bounds have been manually altered, they may be
// incorrect after the clip.
diff --git a/Build/source/utils/asymptote/base/plain_margins.asy b/Build/source/utils/asymptote/base/plain_margins.asy
index c4522754481..fbd0163050c 100644
--- a/Build/source/utils/asymptote/base/plain_margins.asy
+++ b/Build/source/utils/asymptote/base/plain_margins.asy
@@ -5,7 +5,7 @@ struct marginT {
typedef marginT margin(path, pen);
-path trim(path g, real begin, real end) {
+path trim(path g, real begin, real end=begin) {
real a=arctime(g,begin);
real b=arctime(g,arclength(g)-end);
return a <= b ? subpath(g,a,b) : point(g,a);
@@ -36,7 +36,7 @@ margin NoMargin()
};
}
-margin Margin(real begin, real end)
+margin Margin(real begin, real end=begin)
{
return new marginT(path g, pen p) {
marginT margin;
@@ -48,7 +48,7 @@ margin Margin(real begin, real end)
};
}
-margin PenMargin(real begin, real end)
+margin PenMargin(real begin, real end=begin)
{
return new marginT(path g, pen p) {
marginT margin;
@@ -60,7 +60,7 @@ margin PenMargin(real begin, real end)
};
}
-margin DotMargin(real begin, real end)
+margin DotMargin(real begin, real end=begin)
{
return new marginT(path g, pen p) {
marginT margin;
@@ -73,7 +73,7 @@ margin DotMargin(real begin, real end)
};
}
-margin TrueMargin(real begin, real end)
+margin TrueMargin(real begin, real end=begin)
{
return new marginT(path g, pen p) {
marginT margin;
diff --git a/Build/source/utils/asymptote/base/plain_picture.asy b/Build/source/utils/asymptote/base/plain_picture.asy
index 025e6741cfd..c0c189ee691 100644
--- a/Build/source/utils/asymptote/base/plain_picture.asy
+++ b/Build/source/utils/asymptote/base/plain_picture.asy
@@ -1355,50 +1355,43 @@ void gouraudshade(picture pic=currentpicture, path[] g, bool stroke=false,
}
void tensorshade(picture pic=currentpicture, path[] g, bool stroke=false,
- pen fillrule=currentpen, pen[][] p, path[] b=g,
+ pen fillrule=currentpen, pen[][] p, path[] b=new path[],
pair[][] z=new pair[][], bool copy=true)
{
+ bool compact=b.length == 0 || b[0] == nullpath;
if(copy) {
g=copy(g);
p=copy(p);
- b=copy(b);
+ if(!compact) b=copy(b);
z=copy(z);
}
pic.add(new void(frame f, transform t) {
pair[][] Z=new pair[z.length][];
for(int i=0; i < z.length; ++i)
Z[i]=t*z[i];
- tensorshade(f,t*g,stroke,fillrule,p,t*b,Z,false);
+ path[] G=t*g;
+ if(compact)
+ tensorshade(f,G,stroke,fillrule,p,Z,false);
+ else
+ tensorshade(f,G,stroke,fillrule,p,t*b,Z,false);
},true);
pic.addPath(g);
}
void tensorshade(frame f, path[] g, bool stroke=false,
pen fillrule=currentpen, pen[] p,
- path b=g.length > 0 ? g[0] : nullpath)
+ path b=g.length > 0 ? g[0] : nullpath, pair[] z=new pair[])
{
- tensorshade(f,g,stroke,fillrule,new pen[][] {p},b);
-}
-
-void tensorshade(frame f, path[] g, bool stroke=false,
- pen fillrule=currentpen, pen[] p,
- path b=g.length > 0 ? g[0] : nullpath, pair[] z)
-{
- tensorshade(f,g,stroke,fillrule,new pen[][] {p},b,new pair[][] {z});
-}
-
-void tensorshade(picture pic=currentpicture, path[] g, bool stroke=false,
- pen fillrule=currentpen, pen[] p,
- path b=g.length > 0 ? g[0] : nullpath)
-{
- tensorshade(pic,g,stroke,fillrule,new pen[][] {p},b);
+ tensorshade(f,g,stroke,fillrule,new pen[][] {p},b,
+ z.length > 0 ? new pair[][] {z} : new pair[][]);
}
void tensorshade(picture pic=currentpicture, path[] g, bool stroke=false,
pen fillrule=currentpen, pen[] p,
- path b=g.length > 0 ? g[0] : nullpath, pair[] z)
+ path b=nullpath, pair[] z=new pair[])
{
- tensorshade(pic,g,stroke,fillrule,new pen[][] {p},b,new pair[][] {z});
+ tensorshade(pic,g,stroke,fillrule,new pen[][] {p},b,
+ z.length > 0 ? new pair[][] {z} : new pair[][]);
}
// Smoothly shade the regions between consecutive paths of a sequence using a
diff --git a/Build/source/utils/asymptote/base/plain_shipout.asy b/Build/source/utils/asymptote/base/plain_shipout.asy
index e062a775465..388a03a557b 100644
--- a/Build/source/utils/asymptote/base/plain_shipout.asy
+++ b/Build/source/utils/asymptote/base/plain_shipout.asy
@@ -86,14 +86,10 @@ void shipout(string prefix=defaultfilename, frame f,
}
}
- if(outformat(format) == "html") {
- warning("htmltosvg",
- "html output requested for 2D picture; generating svg image instead...");
- format="svg";
- }
-
- if(settings.xasy || (!implicitshipout && prefix == defaultfilename)) {
- if(prefix == defaultfilename) {
+ bool defaultprefix=prefix==defaultfilename;
+
+ if(settings.xasy || (!implicitshipout && defaultprefix)) {
+ if(defaultprefix) {
currentpicture.clear();
add(f,group=false);
}
@@ -132,8 +128,15 @@ void shipout(string prefix=defaultfilename, picture pic=currentpicture,
}
frame f;
transform t=pic.calculateTransform();
- if(currentpicture.fitter == null)
- f=pic.fit(t);
+ if(currentpicture.fitter == null) {
+ pen background=currentlight.background;
+ if(settings.outformat == "html" && background == nullpen)
+ background=white;
+ if(background != nullpen)
+ f=bbox(pic,nullpen,Fill(background));
+ else
+ f=pic.fit(t);
+ }
else
f=pic.fit(prefix,format,view=view,options,script,light,P);
diff --git a/Build/source/utils/asymptote/base/rationalSimplex.asy b/Build/source/utils/asymptote/base/rationalSimplex.asy
index 823d91c2d0b..6070c7cbdb9 100644
--- a/Build/source/utils/asymptote/base/rationalSimplex.asy
+++ b/Build/source/utils/asymptote/base/rationalSimplex.asy
@@ -1,8 +1,8 @@
// Rational simplex solver written by John C. Bowman and Pouria Ramazi, 2018.
import rational;
-void simplexStandard(rational[] c, rational[][] A, int[] s=new int[],
- rational[] b) {}
+void simplexInit(rational[] c, rational[][] A, int[] s=new int[],
+ rational[] b, int count) {}
void simplexTableau(rational[][] E, int[] Bindices, int I=-1, int J=-1) {}
void simplexPhase1(rational[] c, rational[][] A, rational[] b,
int[] Bindices) {}
@@ -35,7 +35,9 @@ struct simplex {
int case;
rational[] x;
+ rational[] xStandard;
rational cost;
+ rational[] d;
int m,n;
int J;
@@ -319,15 +321,26 @@ struct simplex {
case=(dual ? iterateDual : iterate)(D,n,Bindices);
simplexTableau(D,Bindices);
- if(case != OPTIMAL)
- return;
+ x=new rational[n];
for(int j=0; j < n; ++j)
x[j]=0;
for(int k=0; k < m; ++k)
x[Bindices[k]-1]=D[k][0];
+ if(case == UNBOUNDED) {
+ d=new rational[n];
+ for(int j=0; j < n; ++j)
+ d[j]=0;
+ d[J-1]=1;
+ for(int k=0; k < m; ++k)
+ d[Bindices[k]-1]=-D[k][J];
+ }
+
+ if(case != OPTIMAL)
+ return;
+
cost=-Dm[0];
}
@@ -391,10 +404,13 @@ struct simplex {
}
rational[] C=concat(c,array(count,rational(0)));
- if(count > 0) simplexStandard(C,a,b);
+ simplexInit(C,a,b,count);
operator init(C,a,b,phase1,dual);
- if(case == OPTIMAL && count > 0)
- x.delete(n,n+count-1);
+ if(case != INFEASIBLE) {
+ xStandard=copy(x);
+ if(count > 0)
+ x.delete(n,n+count-1);
+ }
}
}
diff --git a/Build/source/utils/asymptote/base/slide.asy b/Build/source/utils/asymptote/base/slide.asy
index 8a787c37a5b..9d26c680652 100644
--- a/Build/source/utils/asymptote/base/slide.asy
+++ b/Build/source/utils/asymptote/base/slide.asy
@@ -309,7 +309,7 @@ void remark(bool center=false, string s, pair align=0, pen p=itempen,
void center(string s, pen p=itempen)
{
- remark("\center "+s,p);
+ remark(center=true,"\center "+s,p);
}
void vbox(string s, pen p=itempen)
diff --git a/Build/source/utils/asymptote/base/slopefield.asy b/Build/source/utils/asymptote/base/slopefield.asy
index bdbb0252670..e87e2cd36f9 100644
--- a/Build/source/utils/asymptote/base/slopefield.asy
+++ b/Build/source/utils/asymptote/base/slopefield.asy
@@ -19,7 +19,6 @@ picture slopefield(real f(real,real), pair a, pair b,
draw(pic,(cp.x-mp,cp.y-mp*slope)--(cp.x+mp,cp.y+mp*slope),p,arrow);
}
}
- clip(pic,box(a,b));
return pic;
}
diff --git a/Build/source/utils/asymptote/base/three.asy b/Build/source/utils/asymptote/base/three.asy
index 75f758dd353..d7a20b516c4 100644
--- a/Build/source/utils/asymptote/base/three.asy
+++ b/Build/source/utils/asymptote/base/three.asy
@@ -1065,7 +1065,7 @@ triple dir(path3 p)
triple dir(path3 p, path3 h)
{
- return 0.5*(dir(p)+dir(h));
+ return unit(dir(p)+dir(h));
}
// return the point on path3 p at arclength L
@@ -1880,6 +1880,14 @@ transform3 align(triple u)
return c >= 0 ? identity(4) : diagonal(1,-1,-1,1);
}
+// Align Label with normal in direction dir.
+Label align(Label L, triple dir)
+{
+ Label L=L.copy();
+ L.transform3(align(unit(dir)));
+ return L;
+}
+
// return a rotation that maps X,Y to the projection plane.
transform3 transform3(projection P=currentprojection)
{
@@ -2554,25 +2562,6 @@ private string Format(transform3 t, string sep=" ")
Format(t[0][3])+sep+Format(t[1][3])+sep+Format(t[2][3]);
}
-void writeJavaScript(string name, string preamble, string script)
-{
- file out=output(name);
- write(out,preamble);
- if(script != "") {
- write(out,endl);
- file in=input(script);
- while(true) {
- string line=in;
- if(eof(in)) break;
- write(out,line,endl);
- }
- }
- close(out);
- if(settings.verbose > 1) write("Wrote "+name);
- if(!settings.inlinetex)
- file3.push(name);
-}
-
pair viewportmargin(pair lambda)
{
return maxbound(0.5*(viewportsize-lambda),viewportmargin);
@@ -2678,13 +2667,13 @@ struct scene
if(!P.absolute) {
this.P=t*P;
+ if(this.P.autoadjust || this.P.infinity)
+ adjusted=adjusted | this.P.adjust(m,M);
if(this.P.center && settings.render != 0) {
triple target=0.5*(m+M);
this.P.target=target;
this.P.calculate();
}
- if(this.P.autoadjust || this.P.infinity)
- adjusted=adjusted | this.P.adjust(m,M);
}
bool scale=xsize != 0 || ysize != 0;
diff --git a/Build/source/utils/asymptote/base/three_light.asy b/Build/source/utils/asymptote/base/three_light.asy
index 25db6ad6d27..46b0fef7d0e 100644
--- a/Build/source/utils/asymptote/base/three_light.asy
+++ b/Build/source/utils/asymptote/base/three_light.asy
@@ -125,7 +125,7 @@ light White=light(new pen[] {rgb(0.38,0.38,0.45),rgb(0.6,0.6,0.67),
rgb(0.5,0.5,0.57)},specularfactor=3,
new triple[] {(-2,-1.5,-0.5),(2,1.1,-2.5),(-0.5,0,2)});
-light Headlamp=light(gray(0.8),specular=gray(0.7),
+light Headlamp=light(white,specular=gray(0.7),
specularfactor=3,dir(42,48));
currentlight=Headlamp;
diff --git a/Build/source/utils/asymptote/base/three_surface.asy b/Build/source/utils/asymptote/base/three_surface.asy
index 8348d7ac3af..7d64ad22d72 100644
--- a/Build/source/utils/asymptote/base/three_surface.asy
+++ b/Build/source/utils/asymptote/base/three_surface.asy
@@ -1374,6 +1374,10 @@ void draw3D(frame f, patch s, triple center=O, material m,
bool primitive=false)
{
bool straight=s.straight && s.planar;
+
+ // Planar Bezier surfaces require extra precision in WebGL
+ int digits=s.planar && !straight ? 12 : settings.digits;
+
if(s.colors.length > 0) {
if(prc() && light.on())
straight=false; // PRC vertex colors (for quads only) ignore lighting
@@ -1383,7 +1387,7 @@ void draw3D(frame f, patch s, triple center=O, material m,
(s.triangular ? drawbeziertriangle : draw)
(f,s.P,center,straight,m.p,m.opacity,m.shininess,
- m.metallic,m.fresnel0,s.colors,interaction.type,primitive);
+ m.metallic,m.fresnel0,s.colors,interaction.type,digits,primitive);
}
void _draw(frame f, path3 g, triple center=O, material m,
@@ -1500,8 +1504,18 @@ void tensorshade(transform t=identity(), frame f, patch s,
p.push(p[0]);
s=tensor(s);
} else p=s.colors(m,light);
- tensorshade(f,box(t*s.min(P),t*s.max(P)),m.diffuse(),
- p,t*project(s.external(),P,1),t*project(s.internal(),P));
+ path g=t*project(s.external(),P,1);
+ pair[] internal=t*project(s.internal(),P);
+ pen fillrule=m.diffuse();
+ if(inside(g,internal[0],fillrule) && inside(g,internal[1],fillrule) &&
+ inside(g,internal[2],fillrule) && inside(g,internal[3],fillrule)) {
+ if(p[0] == p[1] && p[1] == p[2] && p[2] == p[3])
+ fill(f,g,fillrule+p[0]);
+ else
+ tensorshade(f,g,fillrule,p,internal);
+ } else {
+ tensorshade(f,box(t*s.min(P),t*s.max(P)),fillrule,p,g,internal);
+ }
}
restricted pen[] nullpens={nullpen};
diff --git a/Build/source/utils/asymptote/base/three_tube.asy b/Build/source/utils/asymptote/base/three_tube.asy
index 3a7902587e9..60085a7d512 100644
--- a/Build/source/utils/asymptote/base/three_tube.asy
+++ b/Build/source/utils/asymptote/base/three_tube.asy
@@ -159,10 +159,10 @@ struct tube
triple c0=postcontrol(g,0);
triple c1=precontrol(g,1);
triple z1=point(g,1);
- real norm=sqrtEpsilon*max(abs(z0),abs(c0),abs(c1),abs(z1));
+ real norm=sqrtEpsilon*max(abs(z0),abs(c0),abs(c1),abs(z1),r);
surface[] s;
void Split(triple z0, triple c0, triple c1, triple z1,
- real depth=mantissaBits) {
+ int depth=mantissaBits) {
if(depth > 0) {
pair threshold(triple z0, triple c0, triple c1) {
triple u=c1-z0;
diff --git a/Build/source/utils/asymptote/base/tube.asy b/Build/source/utils/asymptote/base/tube.asy
index cfaf458db42..756eeabdda8 100644
--- a/Build/source/utils/asymptote/base/tube.asy
+++ b/Build/source/utils/asymptote/base/tube.asy
@@ -14,10 +14,10 @@ real tubegranularity=1e-7;
void render(path3 s, real r, void f(path3, real))
{
void Split(triple z0, triple c0, triple c1, triple z1, real t0=0, real t1=1,
- real depth=mantissaBits) {
+ int depth=mantissaBits) {
if(depth > 0) {
real S=straightness(z0,c0,c1,z1);
- if(S > max(tubegranularity*max(abs(z0),abs(c0),abs(c1),abs(z1)))) {
+ if(S > max(tubegranularity*max(abs(z0),abs(c0),abs(c1),abs(z1),r))) {
--depth;
triple m0=0.5*(z0+c0);
triple m1=0.5*(c0+c1);
diff --git a/Build/source/utils/asymptote/base/unicode.asy b/Build/source/utils/asymptote/base/unicode.asy
deleted file mode 100644
index 33571e8341a..00000000000
--- a/Build/source/utils/asymptote/base/unicode.asy
+++ /dev/null
@@ -1,2 +0,0 @@
-usepackage("ucs");
-usepackage("inputenc","utf8x");
diff --git a/Build/source/utils/asymptote/base/webgl/asygl.js b/Build/source/utils/asymptote/base/webgl/asygl.js
index 619986d015f..db8810f260f 100644
--- a/Build/source/utils/asymptote/base/webgl/asygl.js
+++ b/Build/source/utils/asymptote/base/webgl/asygl.js
@@ -1,6 +1,6 @@
/*@license
AsyGL: Render Bezier patches and triangles via subdivision with WebGL.
- Copyright 2019: John C. Bowman and Supakorn "Jamie" Rassameemasmuang
+ Copyright 2019-2020: John C. Bowman and Supakorn "Jamie" Rassameemasmuang
University of Alberta
This program is free software; you can redistribute it and/or modify
@@ -36,4 +36,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.*/
-let vertex="\nattribute vec3 position;\n#ifdef WIDTH\nattribute float width;\n#endif\n#ifdef NORMAL\nattribute vec3 normal;\n#endif\nattribute float materialIndex;\n#ifdef COLOR\nattribute vec4 color;\n#endif\n\nuniform mat3 normMat;\nuniform mat4 viewMat;\nuniform mat4 projViewMat;\n\n#ifdef NORMAL\n#ifndef ORTHOGRAPHIC\nvarying vec3 ViewPosition;\n#endif\nvarying vec3 Normal;\n#endif\nvarying vec4 diffuse;\nvarying vec3 specular;\nvarying float roughness,metallic,fresnel0;\nvarying vec4 emissive;\n\nstruct Material {\n vec4 diffuse,emissive,specular;\n vec4 parameters;\n};\n\nuniform Material Materials[Nmaterials];\n\nvoid main(void)\n{\n vec4 v=vec4(position,1.0);\n gl_Position=projViewMat*v;\n#ifdef NORMAL\n#ifndef ORTHOGRAPHIC\n ViewPosition=(viewMat*v).xyz;\n#endif \n Normal=normalize(normal*normMat);\n \n Material m;\n#ifdef TRANSPARENT\n m=Materials[int(abs(materialIndex))-1];\n emissive=m.emissive;\n if(materialIndex >= 0.0) {\n diffuse=m.diffuse;\n } else {\n diffuse=color;\n#if nlights == 0\n emissive += color;\n#endif\n }\n#else\n m=Materials[int(materialIndex)];\n emissive=m.emissive;\n#ifdef COLOR\n diffuse=color;\n#if nlights == 0\n emissive += color;\n#endif\n#else\n diffuse=m.diffuse;\n#endif\n#endif\n specular=m.specular.rgb;\n vec4 parameters=m.parameters;\n roughness=1.0-parameters[0];\n metallic=parameters[1];\n fresnel0=parameters[2];\n#else\n emissive=Materials[int(materialIndex)].emissive;\n#endif\n#ifdef WIDTH\n gl_PointSize=width;\n#endif\n}\n",fragment="\n#ifdef NORMAL\n#ifndef ORTHOGRAPHIC\nvarying vec3 ViewPosition;\n#endif\nvarying vec3 Normal;\nvarying vec4 diffuse;\nvarying vec3 specular;\nvarying float roughness,metallic,fresnel0;\n\nfloat Roughness2;\nvec3 normal;\n\nstruct Light {\n vec3 direction;\n vec3 color;\n};\n\nuniform Light Lights[Nlights];\n\nfloat NDF_TRG(vec3 h)\n{\n float ndoth=max(dot(normal,h),0.0);\n float alpha2=Roughness2*Roughness2;\n float denom=ndoth*ndoth*(alpha2-1.0)+1.0;\n return denom != 0.0 ? alpha2/(denom*denom) : 0.0;\n}\n \nfloat GGX_Geom(vec3 v)\n{\n float ndotv=max(dot(v,normal),0.0);\n float ap=1.0+Roughness2;\n float k=0.125*ap*ap;\n return ndotv/((ndotv*(1.0-k))+k);\n}\n \nfloat Geom(vec3 v, vec3 l)\n{\n return GGX_Geom(v)*GGX_Geom(l);\n}\n \nfloat Fresnel(vec3 h, vec3 v, float fresnel0)\n{\n float a=1.0-max(dot(h,v),0.0);\n float b=a*a;\n return fresnel0+(1.0-fresnel0)*b*b*a;\n}\n \n// physical based shading using UE4 model.\nvec3 BRDF(vec3 viewDirection, vec3 lightDirection)\n{\n vec3 lambertian=diffuse.rgb;\n vec3 h=normalize(lightDirection+viewDirection);\n \n float omegain=max(dot(viewDirection,normal),0.0);\n float omegali=max(dot(lightDirection,normal),0.0);\n \n float D=NDF_TRG(h);\n float G=Geom(viewDirection,lightDirection);\n float F=Fresnel(h,viewDirection,fresnel0);\n \n float denom=4.0*omegain*omegali;\n float rawReflectance=denom > 0.0 ? (D*G)/denom : 0.0;\n \n vec3 dielectric=mix(lambertian,rawReflectance*specular,F);\n vec3 metal=rawReflectance*diffuse.rgb;\n \n return mix(dielectric,metal,metallic);\n}\n#endif\nvarying vec4 emissive;\n \nvoid main(void)\n{\n#if defined(NORMAL) && nlights > 0\n normal=normalize(Normal);\n normal=gl_FrontFacing ? normal : -normal;\n#ifdef ORTHOGRAPHIC\n vec3 viewDir=vec3(0.0,0.0,1.0);\n#else\n vec3 viewDir=-normalize(ViewPosition);\n#endif\n Roughness2=roughness*roughness;\n vec3 color=emissive.rgb;\n for(int i=0; i < nlights; ++i) {\n Light Li=Lights[i];\n vec3 L=Li.direction;\n float cosTheta=max(dot(normal,L),0.0);\n vec3 radiance=cosTheta*Li.color;\n color += BRDF(viewDir,L)*radiance;\n }\n gl_FragColor=vec4(color,diffuse.a);\n#else\n gl_FragColor=emissive;\n#endif\n}\n";!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var i=e();for(var a in i)("object"==typeof exports?exports:t)[a]=i[a]}}("undefined"!=typeof self?self:this,function(){return function(t){var e={};function i(a){if(e[a])return e[a].exports;var r=e[a]={i:a,l:!1,exports:{}};return t[a].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,a){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:a})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=1)}([function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setMatrixArrayType=function(t){e.ARRAY_TYPE=t},e.toRadian=function(t){return t*r},e.equals=function(t,e){return Math.abs(t-e)<=a*Math.max(1,Math.abs(t),Math.abs(e))};var a=e.EPSILON=1e-6;e.ARRAY_TYPE="undefined"!=typeof Float32Array?Float32Array:Array,e.RANDOM=Math.random;var r=Math.PI/180},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mat4=e.mat3=void 0;var a=n(i(2)),r=n(i(3));function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}e.mat3=a,e.mat4=r},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=function(){var t=new a.ARRAY_TYPE(9);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromMat4=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t},e.invert=function(t,e){var i=e[0],a=e[1],r=e[2],n=e[3],s=e[4],o=e[5],h=e[6],l=e[7],d=e[8],c=d*s-o*l,m=-d*n+o*h,f=l*n-s*h,u=i*c+a*m+r*f;if(!u)return null;return u=1/u,t[0]=c*u,t[1]=(-d*a+r*l)*u,t[2]=(o*a-r*s)*u,t[3]=m*u,t[4]=(d*i-r*h)*u,t[5]=(-o*i+r*n)*u,t[6]=f*u,t[7]=(-l*i+a*h)*u,t[8]=(s*i-a*n)*u,t};var a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}(i(0))},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=function(){var t=new a.ARRAY_TYPE(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},e.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},e.invert=function(t,e){var i=e[0],a=e[1],r=e[2],n=e[3],s=e[4],o=e[5],h=e[6],l=e[7],d=e[8],c=e[9],m=e[10],f=e[11],u=e[12],p=e[13],v=e[14],g=e[15],w=i*o-a*s,x=i*h-r*s,M=i*l-n*s,b=a*h-r*o,A=a*l-n*o,S=r*l-n*h,P=d*p-c*u,R=d*v-m*u,T=d*g-f*u,y=c*v-m*p,D=c*g-f*p,I=m*g-f*v,z=w*I-x*D+M*y+b*T-A*R+S*P;if(!z)return null;return z=1/z,t[0]=(o*I-h*D+l*y)*z,t[1]=(r*D-a*I-n*y)*z,t[2]=(p*S-v*A+g*b)*z,t[3]=(m*A-c*S-f*b)*z,t[4]=(h*T-s*I-l*R)*z,t[5]=(i*I-r*T+n*R)*z,t[6]=(v*M-u*S-g*x)*z,t[7]=(d*S-m*M+f*x)*z,t[8]=(s*D-o*T+l*P)*z,t[9]=(a*T-i*D-n*P)*z,t[10]=(u*A-p*M+g*w)*z,t[11]=(c*M-d*A-f*w)*z,t[12]=(o*R-s*y-h*P)*z,t[13]=(i*y-a*R+r*P)*z,t[14]=(p*x-u*b-v*w)*z,t[15]=(d*b-c*x+m*w)*z,t},e.multiply=r,e.translate=function(t,e,i){var a=i[0],r=i[1],n=i[2],s=void 0,o=void 0,h=void 0,l=void 0,d=void 0,c=void 0,m=void 0,f=void 0,u=void 0,p=void 0,v=void 0,g=void 0;e===t?(t[12]=e[0]*a+e[4]*r+e[8]*n+e[12],t[13]=e[1]*a+e[5]*r+e[9]*n+e[13],t[14]=e[2]*a+e[6]*r+e[10]*n+e[14],t[15]=e[3]*a+e[7]*r+e[11]*n+e[15]):(s=e[0],o=e[1],h=e[2],l=e[3],d=e[4],c=e[5],m=e[6],f=e[7],u=e[8],p=e[9],v=e[10],g=e[11],t[0]=s,t[1]=o,t[2]=h,t[3]=l,t[4]=d,t[5]=c,t[6]=m,t[7]=f,t[8]=u,t[9]=p,t[10]=v,t[11]=g,t[12]=s*a+d*r+u*n+e[12],t[13]=o*a+c*r+p*n+e[13],t[14]=h*a+m*r+v*n+e[14],t[15]=l*a+f*r+g*n+e[15]);return t},e.rotate=function(t,e,i,r){var n=r[0],s=r[1],o=r[2],h=Math.sqrt(n*n+s*s+o*o),l=void 0,d=void 0,c=void 0,m=void 0,f=void 0,u=void 0,p=void 0,v=void 0,g=void 0,w=void 0,x=void 0,M=void 0,b=void 0,A=void 0,S=void 0,P=void 0,R=void 0,T=void 0,y=void 0,D=void 0,I=void 0,z=void 0,E=void 0,O=void 0;if(Math.abs(h)<a.EPSILON)return null;n*=h=1/h,s*=h,o*=h,l=Math.sin(i),d=Math.cos(i),c=1-d,m=e[0],f=e[1],u=e[2],p=e[3],v=e[4],g=e[5],w=e[6],x=e[7],M=e[8],b=e[9],A=e[10],S=e[11],P=n*n*c+d,R=s*n*c+o*l,T=o*n*c-s*l,y=n*s*c-o*l,D=s*s*c+d,I=o*s*c+n*l,z=n*o*c+s*l,E=s*o*c-n*l,O=o*o*c+d,t[0]=m*P+v*R+M*T,t[1]=f*P+g*R+b*T,t[2]=u*P+w*R+A*T,t[3]=p*P+x*R+S*T,t[4]=m*y+v*D+M*I,t[5]=f*y+g*D+b*I,t[6]=u*y+w*D+A*I,t[7]=p*y+x*D+S*I,t[8]=m*z+v*E+M*O,t[9]=f*z+g*E+b*O,t[10]=u*z+w*E+A*O,t[11]=p*z+x*E+S*O,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);return t},e.fromTranslation=function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t},e.fromRotation=function(t,e,i){var r=i[0],n=i[1],s=i[2],o=Math.sqrt(r*r+n*n+s*s),h=void 0,l=void 0,d=void 0;if(Math.abs(o)<a.EPSILON)return null;return r*=o=1/o,n*=o,s*=o,h=Math.sin(e),l=Math.cos(e),d=1-l,t[0]=r*r*d+l,t[1]=n*r*d+s*h,t[2]=s*r*d-n*h,t[3]=0,t[4]=r*n*d-s*h,t[5]=n*n*d+l,t[6]=s*n*d+r*h,t[7]=0,t[8]=r*s*d+n*h,t[9]=n*s*d-r*h,t[10]=s*s*d+l,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},e.frustum=function(t,e,i,a,r,n,s){var o=1/(i-e),h=1/(r-a),l=1/(n-s);return t[0]=2*n*o,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*n*h,t[6]=0,t[7]=0,t[8]=(i+e)*o,t[9]=(r+a)*h,t[10]=(s+n)*l,t[11]=-1,t[12]=0,t[13]=0,t[14]=s*n*2*l,t[15]=0,t},e.ortho=function(t,e,i,a,r,n,s){var o=1/(e-i),h=1/(a-r),l=1/(n-s);return t[0]=-2*o,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*h,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*l,t[11]=0,t[12]=(e+i)*o,t[13]=(r+a)*h,t[14]=(s+n)*l,t[15]=1,t};var a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}(i(0));function r(t,e,i){var a=e[0],r=e[1],n=e[2],s=e[3],o=e[4],h=e[5],l=e[6],d=e[7],c=e[8],m=e[9],f=e[10],u=e[11],p=e[12],v=e[13],g=e[14],w=e[15],x=i[0],M=i[1],b=i[2],A=i[3];return t[0]=x*a+M*o+b*c+A*p,t[1]=x*r+M*h+b*m+A*v,t[2]=x*n+M*l+b*f+A*g,t[3]=x*s+M*d+b*u+A*w,x=i[4],M=i[5],b=i[6],A=i[7],t[4]=x*a+M*o+b*c+A*p,t[5]=x*r+M*h+b*m+A*v,t[6]=x*n+M*l+b*f+A*g,t[7]=x*s+M*d+b*u+A*w,x=i[8],M=i[9],b=i[10],A=i[11],t[8]=x*a+M*o+b*c+A*p,t[9]=x*r+M*h+b*m+A*v,t[10]=x*n+M*l+b*f+A*g,t[11]=x*s+M*d+b*u+A*w,x=i[12],M=i[13],b=i[14],A=i[15],t[12]=x*a+M*o+b*c+A*p,t[13]=x*r+M*h+b*m+A*v,t[14]=x*n+M*l+b*f+A*g,t[15]=x*s+M*d+b*u+A*w,t}}])});let canvasWidth,canvasHeight,b,B,angle,Zoom0,viewportmargin,zoomFactor,zoomPinchFactor,zoomPinchCap,zoomStep,shiftHoldDistance,shiftWaitTime,vibrateTime,embedded,canvas,gl,alpha,offscreen,context,maxMaterials,halfCanvasWidth,halfCanvasHeight,Zoom,P=[],Materials=[],Lights=[],Centers=[],Background=[1,1,1,1],absolute=!1,viewportshift=[0,0],nlights=0,Nmaterials=2,materials=[],pixel=.75,FillFactor=.1,maxViewportWidth=window.innerWidth,maxViewportHeight=window.innerHeight;const windowTrim=10;let lastzoom,H,zmin,zmax,size2,ArcballFactor,positionBuffer,materialBuffer,colorBuffer,indexBuffer,resizeStep=1.2,third=1/3,rotMat=mat4.create(),projMat=mat4.create(),viewMat=mat4.create(),projViewMat=mat4.create(),normMat=mat3.create(),viewMat3=mat3.create(),cjMatInv=mat4.create(),T=mat4.create(),center={x:0,y:0,z:0},shift={x:0,y:0},viewParam={xmin:0,xmax:0,ymin:0,ymax:0,zmin:0,zmax:0},remesh=!0,wireframe=0,mouseDownOrTouchActive=!1,lastMouseX=null,lastMouseY=null,touchID=null,Positions=[],Normals=[],Colors=[],Indices=[];class Material{constructor(t,e,i,a,r,n){this.diffuse=t,this.emissive=e,this.specular=i,this.shininess=a,this.metallic=r,this.fresnel0=n}setUniform(t,e){let i=i=>gl.getUniformLocation(t,"Materials["+e+"]."+i);gl.uniform4fv(i("diffuse"),new Float32Array(this.diffuse)),gl.uniform4fv(i("emissive"),new Float32Array(this.emissive)),gl.uniform4fv(i("specular"),new Float32Array(this.specular)),gl.uniform4f(i("parameters"),this.shininess,this.metallic,this.fresnel0,0)}}let indexExt,TRIANGLES,material0Data,material1Data,materialData,colorData,transparentData,triangleData,materialIndex,enumPointLight=1,enumDirectionalLight=2;class Light{constructor(t,e){this.direction=t,this.color=e}setUniform(t,e){let i=i=>gl.getUniformLocation(t,"Lights["+e+"]."+i);gl.uniform3fv(i("direction"),new Float32Array(this.direction)),gl.uniform3fv(i("color"),new Float32Array(this.color))}}function initShaders(){let t=gl.getParameter(gl.MAX_VERTEX_UNIFORM_VECTORS);maxMaterials=Math.floor((t-14)/4),Nmaterials=Math.min(Math.max(Nmaterials,Materials.length),maxMaterials),pixelShader=initShader(["WIDTH"]),materialShader=initShader(["NORMAL"]),colorShader=initShader(["NORMAL","COLOR"]),transparentShader=initShader(["NORMAL","COLOR","TRANSPARENT"])}function deleteShaders(){gl.deleteProgram(transparentShader),gl.deleteProgram(colorShader),gl.deleteProgram(materialShader),gl.deleteProgram(pixelShader)}function setBuffers(){positionBuffer=gl.createBuffer(),materialBuffer=gl.createBuffer(),colorBuffer=gl.createBuffer(),indexBuffer=gl.createBuffer()}function noGL(){gl||alert("Could not initialize WebGL")}function saveAttributes(){let t=window.top.document.asygl[alpha];t.gl=gl,t.nlights=Lights.length,t.Nmaterials=Nmaterials,t.maxMaterials=maxMaterials,t.pixelShader=pixelShader,t.materialShader=materialShader,t.colorShader=colorShader,t.transparentShader=transparentShader}function restoreAttributes(){let t=window.top.document.asygl[alpha];gl=t.gl,nlights=t.nlights,Nmaterials=t.Nmaterials,maxMaterials=t.maxMaterials,pixelShader=t.pixelShader,materialShader=t.materialShader,colorShader=t.colorShader,transparentShader=t.transparentShader}function initGL(){if(alpha=Background[3]<1,embedded){let t=window.top.document;null==t.asygl&&(t.asygl=Array(2)),context=canvas.getContext("2d"),(offscreen=t.offscreen)||(offscreen=t.createElement("canvas"),t.offscreen=offscreen),t.asygl[alpha]&&t.asygl[alpha].gl?(restoreAttributes(),(Lights.length!=nlights||Math.min(Materials.length,maxMaterials)>Nmaterials)&&(initShaders(),saveAttributes())):((gl=offscreen.getContext("webgl",{alpha:alpha}))||noGL(),initShaders(),t.asygl[alpha]={},saveAttributes())}else(gl=canvas.getContext("webgl",{alpha:alpha}))||noGL(),initShaders();setBuffers(),indexExt=gl.getExtension("OES_element_index_uint"),TRIANGLES=gl.TRIANGLES,material0Data=new vertexBuffer(gl.POINTS),material1Data=new vertexBuffer(gl.LINES),materialData=new vertexBuffer,colorData=new vertexBuffer,transparentData=new vertexBuffer,triangleData=new vertexBuffer}function getShader(t,e,i,a=[]){let r=`#version 100\n#ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n#else\n precision mediump float;\n#endif\n #define nlights ${0==wireframe?Lights.length:0}\n\n const int Nlights=${Math.max(Lights.length,1)};\n\n #define Nmaterials ${Nmaterials}\n`;orthographic&&(r+="#define ORTHOGRAPHIC\n"),a.forEach(t=>r+="#define "+t+"\n");let n=t.createShader(i);return t.shaderSource(n,r+e),t.compileShader(n),t.getShaderParameter(n,t.COMPILE_STATUS)?n:(alert(t.getShaderInfoLog(n)),null)}function drawBuffer(t,e,i=t.indices){if(0==t.indices.length)return;let a=e!=pixelShader;setUniforms(t,e),gl.bindBuffer(gl.ARRAY_BUFFER,positionBuffer),gl.bufferData(gl.ARRAY_BUFFER,new Float32Array(t.vertices),gl.STATIC_DRAW),gl.vertexAttribPointer(positionAttribute,3,gl.FLOAT,!1,a?24:16,0),a&&Lights.length>0?gl.vertexAttribPointer(normalAttribute,3,gl.FLOAT,!1,24,12):pixel&&gl.vertexAttribPointer(widthAttribute,1,gl.FLOAT,!1,16,12),gl.bindBuffer(gl.ARRAY_BUFFER,materialBuffer),gl.bufferData(gl.ARRAY_BUFFER,new Int16Array(t.materialIndices),gl.STATIC_DRAW),gl.vertexAttribPointer(materialAttribute,1,gl.SHORT,!1,2,0),e!=colorShader&&e!=transparentShader||(gl.bindBuffer(gl.ARRAY_BUFFER,colorBuffer),gl.bufferData(gl.ARRAY_BUFFER,new Uint8Array(t.colors),gl.STATIC_DRAW),gl.vertexAttribPointer(colorAttribute,4,gl.UNSIGNED_BYTE,!0,0,0)),gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER,indexBuffer),gl.bufferData(gl.ELEMENT_ARRAY_BUFFER,indexExt?new Uint32Array(i):new Uint16Array(i),gl.STATIC_DRAW),gl.drawElements(a?wireframe?gl.LINES:t.type:gl.POINTS,i.length,indexExt?gl.UNSIGNED_INT:gl.UNSIGNED_SHORT,0)}class vertexBuffer{constructor(t){this.type=t||TRIANGLES,this.clear()}clear(){this.vertices=[],this.materialIndices=[],this.colors=[],this.indices=[],this.nvertices=0,this.materials=[],this.materialTable=[]}vertex(t,e){return this.vertices.push(t[0]),this.vertices.push(t[1]),this.vertices.push(t[2]),this.vertices.push(e[0]),this.vertices.push(e[1]),this.vertices.push(e[2]),this.materialIndices.push(materialIndex),this.nvertices++}Vertex(t,e,i=[0,0,0,0]){return this.vertices.push(t[0]),this.vertices.push(t[1]),this.vertices.push(t[2]),this.vertices.push(e[0]),this.vertices.push(e[1]),this.vertices.push(e[2]),this.materialIndices.push(materialIndex),this.colors.push(i[0]),this.colors.push(i[1]),this.colors.push(i[2]),this.colors.push(i[3]),this.nvertices++}vertex0(t,e){return this.vertices.push(t[0]),this.vertices.push(t[1]),this.vertices.push(t[2]),this.vertices.push(e),this.materialIndices.push(materialIndex),this.nvertices++}iVertex(t,e,i,a=[0,0,0,0]){let r=6*t;this.vertices[r]=e[0],this.vertices[r+1]=e[1],this.vertices[r+2]=e[2],this.vertices[r+3]=i[0],this.vertices[r+4]=i[1],this.vertices[r+5]=i[2],this.materialIndices[t]=materialIndex;let n=4*t;this.colors[n]=a[0],this.colors[n+1]=a[1],this.colors[n+2]=a[2],this.colors[n+3]=a[3],this.indices.push(t)}append(t){append(this.vertices,t.vertices),append(this.materialIndices,t.materialIndices),append(this.colors,t.colors),appendOffset(this.indices,t.indices,this.nvertices),this.nvertices+=t.nvertices}}function append(t,e){let i=t.length,a=e.length;t.length+=a;for(let r=0;r<a;++r)t[i+r]=e[r]}function appendOffset(t,e,i){let a=t.length,r=e.length;t.length+=e.length;for(let n=0;n<r;++n)t[a+n]=e[n]+i}class Geometry{constructor(){this.data=new vertexBuffer,this.Onscreen=!1,this.m=[]}offscreen(t){let e=projViewMat,i=t[0],a=i[0],r=i[1],n=i[2],s=1/(e[3]*a+e[7]*r+e[11]*n+e[15]);this.x=this.X=(e[0]*a+e[4]*r+e[8]*n+e[12])*s,this.y=this.Y=(e[1]*a+e[5]*r+e[9]*n+e[13])*s;for(let i=1,a=t.length;i<a;++i){let a=t[i],r=a[0],n=a[1],s=a[2],o=1/(e[3]*r+e[7]*n+e[11]*s+e[15]),h=(e[0]*r+e[4]*n+e[8]*s+e[12])*o,l=(e[1]*r+e[5]*n+e[9]*s+e[13])*o;h<this.x?this.x=h:h>this.X&&(this.X=h),l<this.y?this.y=l:l>this.Y&&(this.Y=l)}return(this.X<-1.01||this.x>1.01||this.Y<-1.01||this.y>1.01)&&(this.Onscreen=!1,!0)}T(t){let e=this.c[0],i=this.c[1],a=this.c[2],r=t[0]-e,n=t[1]-i,s=t[2]-a;return[r*normMat[0]+n*normMat[3]+s*normMat[6]+e,r*normMat[1]+n*normMat[4]+s*normMat[7]+i,r*normMat[2]+n*normMat[5]+s*normMat[8]+a]}Tcorners(t,e){return[this.T(t),this.T([t[0],t[1],e[2]]),this.T([t[0],e[1],t[2]]),this.T([t[0],e[1],e[2]]),this.T([e[0],t[1],t[2]]),this.T([e[0],t[1],e[2]]),this.T([e[0],e[1],t[2]]),this.T(e)]}setMaterial(t,e){null==t.materialTable[this.MaterialIndex]&&(t.materials.length>=Nmaterials&&e(),t.materialTable[this.MaterialIndex]=t.materials.length,t.materials.push(Materials[this.MaterialIndex])),materialIndex=t.materialTable[this.MaterialIndex]}render(){let t;if(this.setMaterialIndex(),0==this.CenterIndex?t=corners(this.Min,this.Max):(this.c=Centers[this.CenterIndex-1],t=this.Tcorners(this.Min,this.Max)),this.offscreen(t))return void this.data.clear();let e,i=this.controlpoints;if(0==this.CenterIndex){if(!remesh&&this.Onscreen)return void this.append();e=i}else{let t=i.length;e=Array(t);for(let a=0;a<t;++a)e[a]=this.T(i[a])}let a=orthographic?1:this.Min[2]/B[2],r=pixel*Math.hypot(a*(viewParam.xmax-viewParam.xmin),a*(viewParam.ymax-viewParam.ymin))/size2;this.res2=r*r,this.Epsilon=FillFactor*r,this.data.clear(),this.Onscreen=!0,this.process(e)}}class BezierPatch extends Geometry{constructor(t,e,i,a,r,n){super(),this.controlpoints=t,this.Min=a,this.Max=r,this.color=n,this.CenterIndex=e;let s=t.length;if(n){let t=n[0][3]+n[1][3]+n[2][3];this.transparent=16==s||4==s?t+n[3][3]<1020:t<765}else this.transparent=Materials[i].diffuse[3]<1;this.MaterialIndex=i,this.vertex=this.transparent?this.data.Vertex.bind(this.data):this.data.vertex.bind(this.data),this.L2norm(this.controlpoints)}setMaterialIndex(){this.transparent?this.setMaterial(transparentData,drawTransparent):this.color?this.setMaterial(colorData,drawColor):this.setMaterial(materialData,drawMaterial)}L2norm(t){let e=t[0];this.epsilon=0;let i=t.length;for(let a=1;a<i;++a)this.epsilon=Math.max(this.epsilon,abs2([t[a][0]-e[0],t[a][1]-e[1],t[a][2]-e[2]]));this.epsilon*=Number.EPSILON}processTriangle(t){let e=t[0],i=t[1],a=t[2],r=unit(cross([i[0]-e[0],i[1]-e[1],i[2]-e[2]],[a[0]-e[0],a[1]-e[1],a[2]-e[2]]));if(!this.offscreen([e,i,a])){let t,n,s;this.color?(t=this.data.Vertex(e,r,this.color[0]),n=this.data.Vertex(i,r,this.color[1]),s=this.data.Vertex(a,r,this.color[2])):(t=this.vertex(e,r),n=this.vertex(i,r),s=this.vertex(a,r)),0==wireframe?(this.data.indices.push(t),this.data.indices.push(n),this.data.indices.push(s)):(this.data.indices.push(t),this.data.indices.push(n),this.data.indices.push(n),this.data.indices.push(s),this.data.indices.push(s),this.data.indices.push(t)),this.append()}}processQuad(t){let e=t[0],i=t[1],a=t[2],r=t[3],n=cross([i[0]-e[0],i[1]-e[1],i[2]-e[2]],[a[0]-i[0],a[1]-i[1],a[2]-i[2]]),s=cross([a[0]-r[0],a[1]-r[1],a[2]-r[2]],[r[0]-e[0],r[1]-e[1],r[2]-e[2]]),o=unit([n[0]+s[0],n[1]+s[1],n[2]+s[2]]);if(!this.offscreen([e,i,a,r])){let t,n,s,h;this.color?(t=this.data.Vertex(e,o,this.color[0]),n=this.data.Vertex(i,o,this.color[1]),s=this.data.Vertex(a,o,this.color[2]),h=this.data.Vertex(r,o,this.color[3])):(t=this.vertex(e,o),n=this.vertex(i,o),s=this.vertex(a,o),h=this.vertex(r,o)),0==wireframe?(this.data.indices.push(t),this.data.indices.push(n),this.data.indices.push(s),this.data.indices.push(t),this.data.indices.push(s),this.data.indices.push(h)):(this.data.indices.push(t),this.data.indices.push(n),this.data.indices.push(n),this.data.indices.push(s),this.data.indices.push(s),this.data.indices.push(h),this.data.indices.push(h),this.data.indices.push(t)),this.append()}}curve(t,e,i,a,r){new BezierCurve([t[e],t[i],t[a],t[r]],0,materialIndex,this.Min,this.Max).render()}process(t){if(this.transparent&&1!=wireframe&&(materialIndex=this.color?-1-materialIndex:1+materialIndex),10==t.length)return this.process3(t);if(3==t.length)return this.processTriangle(t);if(4==t.length)return this.processQuad(t);if(1==wireframe)return this.curve(t,0,4,8,12),this.curve(t,12,13,14,15),this.curve(t,15,11,7,3),void this.curve(t,3,2,1,0);let e=t[0],i=t[3],a=t[12],r=t[15],n=this.normal(i,t[2],t[1],e,t[4],t[8],a);abs2(n)<this.epsilon&&abs2(n=this.normal(i,t[2],t[1],e,t[13],t[14],r))<this.epsilon&&(n=this.normal(r,t[11],t[7],i,t[4],t[8],a));let s=this.normal(e,t[4],t[8],a,t[13],t[14],r);abs2(s)<this.epsilon&&abs2(s=this.normal(e,t[4],t[8],a,t[11],t[7],i))<this.epsilon&&(s=this.normal(i,t[2],t[1],e,t[13],t[14],r));let o=this.normal(a,t[13],t[14],r,t[11],t[7],i);abs2(o)<this.epsilon&&abs2(o=this.normal(a,t[13],t[14],r,t[2],t[1],e))<this.epsilon&&(o=this.normal(e,t[4],t[8],a,t[11],t[7],i));let h=this.normal(r,t[11],t[7],i,t[2],t[1],e);if(abs2(h)<this.epsilon&&abs2(h=this.normal(r,t[11],t[7],i,t[4],t[8],a))<this.epsilon&&(h=this.normal(a,t[13],t[14],r,t[2],t[1],e)),this.color){let l=this.color[0],d=this.color[1],c=this.color[2],m=this.color[3],f=this.data.Vertex(e,n,l),u=this.data.Vertex(a,s,d),p=this.data.Vertex(r,o,c),v=this.data.Vertex(i,h,m);this.Render(t,f,u,p,v,e,a,r,i,!1,!1,!1,!1,l,d,c,m)}else{let l=this.vertex(e,n),d=this.vertex(a,s),c=this.vertex(r,o),m=this.vertex(i,h);this.Render(t,l,d,c,m,e,a,r,i,!1,!1,!1,!1)}this.data.indices.length>0&&this.append()}append(){this.transparent?transparentData.append(this.data):this.color?colorData.append(this.data):materialData.append(this.data)}Render(t,e,i,a,r,n,s,o,h,l,d,c,m,f,u,p,v){let g=this.Distance(t);if(g[0]<this.res2&&g[1]<this.res2)this.offscreen([n,s,o])||(0==wireframe?(this.data.indices.push(e),this.data.indices.push(i),this.data.indices.push(a)):(this.data.indices.push(e),this.data.indices.push(i),this.data.indices.push(i),this.data.indices.push(a))),this.offscreen([n,o,h])||(0==wireframe?(this.data.indices.push(e),this.data.indices.push(a),this.data.indices.push(r)):(this.data.indices.push(a),this.data.indices.push(r),this.data.indices.push(r),this.data.indices.push(e)));else{if(this.offscreen(t))return;let w=t[0],x=t[3],M=t[12],b=t[15];if(g[0]<this.res2){let g=new Split3(w,t[1],t[2],x),A=new Split3(t[4],t[5],t[6],t[7]),S=new Split3(t[8],t[9],t[10],t[11]),P=new Split3(M,t[13],t[14],b),R=[w,g.m0,g.m3,g.m5,t[4],A.m0,A.m3,A.m5,t[8],S.m0,S.m3,S.m5,M,P.m0,P.m3,P.m5],T=[g.m5,g.m4,g.m2,x,A.m5,A.m4,A.m2,t[7],S.m5,S.m4,S.m2,t[11],P.m5,P.m4,P.m2,b],y=this.normal(R[12],R[13],R[14],R[15],R[11],R[7],R[3]);abs2(y)<=this.epsilon&&abs2(y=this.normal(R[12],R[13],R[14],R[15],R[2],R[1],R[0]))<=this.epsilon&&(y=this.normal(R[0],R[4],R[8],R[12],R[11],R[7],R[3]));let D=this.normal(T[3],T[2],T[1],T[0],T[4],T[8],T[12]);abs2(D)<=this.epsilon&&abs2(D=this.normal(T[3],T[2],T[1],T[0],T[13],T[14],T[15]))<=this.epsilon&&(D=this.normal(T[15],T[11],T[7],T[3],T[4],T[8],T[12]));let I=this.Epsilon,z=[.5*(s[0]+o[0]),.5*(s[1]+o[1]),.5*(s[2]+o[2])];if(!d)if(d=Straightness(M,t[13],t[14],b)<this.res2){let t=unit(this.differential(T[12],T[8],T[4],T[0]));z=[z[0]-I*t[0],z[1]-I*t[1],z[2]-I*t[2]]}else z=R[15];let E=[.5*(h[0]+n[0]),.5*(h[1]+n[1]),.5*(h[2]+n[2])];if(!m)if(m=Straightness(w,t[1],t[2],x)<this.res2){let t=unit(this.differential(R[3],R[7],R[11],R[15]));E=[E[0]-I*t[0],E[1]-I*t[1],E[2]-I*t[2]]}else E=T[0];if(f){let t=Array(4),g=Array(4);for(let e=0;e<4;++e)t[e]=.5*(u[e]+p[e]),g[e]=.5*(v[e]+f[e]);let w=this.data.Vertex(z,y,t),x=this.data.Vertex(E,D,g);this.Render(R,e,i,w,x,n,s,z,E,l,d,!1,m,f,u,t,g),this.Render(T,x,w,a,r,E,z,o,h,!1,d,c,m,g,t,p,v)}else{let t=this.vertex(z,y),f=this.vertex(E,D);this.Render(R,e,i,t,f,n,s,z,E,l,d,!1,m),this.Render(T,f,t,a,r,E,z,o,h,!1,d,c,m)}return}if(g[1]<this.res2){let g=new Split3(w,t[4],t[8],M),A=new Split3(t[1],t[5],t[9],t[13]),S=new Split3(t[2],t[6],t[10],t[14]),P=new Split3(x,t[7],t[11],b),R=[w,t[1],t[2],x,g.m0,A.m0,S.m0,P.m0,g.m3,A.m3,S.m3,P.m3,g.m5,A.m5,S.m5,P.m5],T=[g.m5,A.m5,S.m5,P.m5,g.m4,A.m4,S.m4,P.m4,g.m2,A.m2,S.m2,P.m2,M,t[13],t[14],b],y=this.normal(R[0],R[4],R[8],R[12],R[13],R[14],R[15]);abs2(y)<=this.epsilon&&abs2(y=this.normal(R[0],R[4],R[8],R[12],R[11],R[7],R[3]))<=this.epsilon&&(y=this.normal(R[3],R[2],R[1],R[0],R[13],R[14],R[15]));let D=this.normal(T[15],T[11],T[7],T[3],T[2],T[1],T[0]);abs2(D)<=this.epsilon&&abs2(D=this.normal(T[15],T[11],T[7],T[3],T[4],T[8],T[12]))<=this.epsilon&&(D=this.normal(T[12],T[13],T[14],T[15],T[2],T[1],T[0]));let I=this.Epsilon,z=[.5*(n[0]+s[0]),.5*(n[1]+s[1]),.5*(n[2]+s[2])];if(!l)if(l=Straightness(w,t[4],t[8],M)<this.res2){let t=unit(this.differential(T[0],T[1],T[2],T[3]));z=[z[0]-I*t[0],z[1]-I*t[1],z[2]-I*t[2]]}else z=R[12];let E=[.5*(o[0]+h[0]),.5*(o[1]+h[1]),.5*(o[2]+h[2])];if(!c)if(c=Straightness(b,t[11],t[7],x)<this.res2){let t=unit(this.differential(R[15],R[14],R[13],R[12]));E=[E[0]-I*t[0],E[1]-I*t[1],E[2]-I*t[2]]}else E=T[3];if(f){let t=Array(4),g=Array(4);for(let e=0;e<4;++e)t[e]=.5*(f[e]+u[e]),g[e]=.5*(p[e]+v[e]);let w=this.data.Vertex(z,y,t),x=this.data.Vertex(E,D,g);this.Render(R,e,w,x,r,n,z,E,h,l,!1,c,m,f,t,g,v),this.Render(T,w,i,a,x,z,s,o,E,l,d,c,!1,t,u,p,g)}else{let t=this.vertex(z,y),f=this.vertex(E,D);this.Render(R,e,t,f,r,n,z,E,h,l,!1,c,m),this.Render(T,t,i,a,f,z,s,o,E,l,d,c,!1)}return}let A=new Split3(w,t[1],t[2],x),S=new Split3(t[4],t[5],t[6],t[7]),P=new Split3(t[8],t[9],t[10],t[11]),R=new Split3(M,t[13],t[14],b),T=new Split3(w,t[4],t[8],M),y=new Split3(A.m0,S.m0,P.m0,R.m0),D=new Split3(A.m3,S.m3,P.m3,R.m3),I=new Split3(A.m5,S.m5,P.m5,R.m5),z=new Split3(A.m4,S.m4,P.m4,R.m4),E=new Split3(A.m2,S.m2,P.m2,R.m2),O=new Split3(x,t[7],t[11],b),L=[w,A.m0,A.m3,A.m5,T.m0,y.m0,D.m0,I.m0,T.m3,y.m3,D.m3,I.m3,T.m5,y.m5,D.m5,I.m5],N=[T.m5,y.m5,D.m5,I.m5,T.m4,y.m4,D.m4,I.m4,T.m2,y.m2,D.m2,I.m2,M,R.m0,R.m3,R.m5],_=[I.m5,z.m5,E.m5,O.m5,I.m4,z.m4,E.m4,O.m4,I.m2,z.m2,E.m2,O.m2,R.m5,R.m4,R.m2,b],B=[A.m5,A.m4,A.m2,x,I.m0,z.m0,E.m0,O.m0,I.m3,z.m3,E.m3,O.m3,I.m5,z.m5,E.m5,O.m5],V=L[15],C=this.normal(L[0],L[4],L[8],L[12],L[13],L[14],L[15]);abs2(C)<this.epsilon&&abs2(C=this.normal(L[0],L[4],L[8],L[12],L[11],L[7],L[3]))<this.epsilon&&(C=this.normal(L[3],L[2],L[1],L[0],L[13],L[14],L[15]));let F=this.normal(N[12],N[13],N[14],N[15],N[11],N[7],N[3]);abs2(F)<this.epsilon&&abs2(F=this.normal(N[12],N[13],N[14],N[15],N[2],N[1],N[0]))<this.epsilon&&(F=this.normal(N[0],N[4],N[8],N[12],N[11],N[7],N[3]));let H=this.normal(_[15],_[11],_[7],_[3],_[2],_[1],_[0]);abs2(H)<this.epsilon&&abs2(H=this.normal(_[15],_[11],_[7],_[3],_[4],_[8],_[12]))<this.epsilon&&(H=this.normal(_[12],_[13],_[14],_[15],_[2],_[1],_[0]));let G=this.normal(B[3],B[2],B[1],B[0],B[4],B[8],B[12]);abs2(G)<this.epsilon&&abs2(G=this.normal(B[3],B[2],B[1],B[0],B[13],B[14],B[15]))<this.epsilon&&(G=this.normal(B[15],B[11],B[7],B[3],B[4],B[8],B[12]));let U=this.normal(_[3],_[2],_[1],V,_[4],_[8],_[12]),W=this.Epsilon,Y=[.5*(n[0]+s[0]),.5*(n[1]+s[1]),.5*(n[2]+s[2])];if(!l)if(l=Straightness(w,t[4],t[8],M)<this.res2){let t=unit(this.differential(N[0],N[1],N[2],N[3]));Y=[Y[0]-W*t[0],Y[1]-W*t[1],Y[2]-W*t[2]]}else Y=L[12];let j=[.5*(s[0]+o[0]),.5*(s[1]+o[1]),.5*(s[2]+o[2])];if(!d)if(d=Straightness(M,t[13],t[14],b)<this.res2){let t=unit(this.differential(_[12],_[8],_[4],_[0]));j=[j[0]-W*t[0],j[1]-W*t[1],j[2]-W*t[2]]}else j=N[15];let k=[.5*(o[0]+h[0]),.5*(o[1]+h[1]),.5*(o[2]+h[2])];if(!c)if(c=Straightness(b,t[11],t[7],x)<this.res2){let t=unit(this.differential(B[15],B[14],B[13],B[12]));k=[k[0]-W*t[0],k[1]-W*t[1],k[2]-W*t[2]]}else k=_[3];let Z=[.5*(h[0]+n[0]),.5*(h[1]+n[1]),.5*(h[2]+n[2])];if(!m)if(m=Straightness(w,t[1],t[2],x)<this.res2){let t=unit(this.differential(L[3],L[7],L[11],L[15]));Z=[Z[0]-W*t[0],Z[1]-W*t[1],Z[2]-W*t[2]]}else Z=B[0];if(f){let t=Array(4),g=Array(4),w=Array(4),x=Array(4),M=Array(4);for(let e=0;e<4;++e)t[e]=.5*(f[e]+u[e]),g[e]=.5*(u[e]+p[e]),w[e]=.5*(p[e]+v[e]),x[e]=.5*(v[e]+f[e]),M[e]=.5*(t[e]+w[e]);let b=this.data.Vertex(Y,C,t),A=this.data.Vertex(j,F,g),S=this.data.Vertex(k,H,w),P=this.data.Vertex(Z,G,x),R=this.data.Vertex(V,U,M);this.Render(L,e,b,R,P,n,Y,V,Z,l,!1,!1,m,f,t,M,x),this.Render(N,b,i,A,R,Y,s,j,V,l,d,!1,!1,t,u,g,M),this.Render(_,R,A,a,S,V,j,o,k,!1,d,c,!1,M,g,p,w),this.Render(B,P,R,S,r,Z,V,k,h,!1,!1,c,m,x,M,w,v)}else{let t=this.vertex(Y,C),f=this.vertex(j,F),u=this.vertex(k,H),p=this.vertex(Z,G),v=this.vertex(V,U);this.Render(L,e,t,v,p,n,Y,V,Z,l,!1,!1,m),this.Render(N,t,i,f,v,Y,s,j,V,l,d,!1,!1),this.Render(_,v,f,a,u,V,j,o,k,!1,d,c,!1),this.Render(B,p,v,u,r,Z,V,k,h,!1,!1,c,m)}}}process3(t){if(1==wireframe)return this.curve(t,0,1,3,6),this.curve(t,6,7,8,9),void this.curve(t,9,5,2,0);let e=t[0],i=t[6],a=t[9],r=this.normal(a,t[5],t[2],e,t[1],t[3],i),n=this.normal(e,t[1],t[3],i,t[7],t[8],a),s=this.normal(i,t[7],t[8],a,t[5],t[2],e);if(this.color){let o=this.color[0],h=this.color[1],l=this.color[2],d=this.data.Vertex(e,r,o),c=this.data.Vertex(i,n,h),m=this.data.Vertex(a,s,l);this.Render3(t,d,c,m,e,i,a,!1,!1,!1,o,h,l)}else{let o=this.vertex(e,r),h=this.vertex(i,n),l=this.vertex(a,s);this.Render3(t,o,h,l,e,i,a,!1,!1,!1)}this.data.indices.length>0&&this.append()}Render3(t,e,i,a,r,n,s,o,h,l,d,c,m){if(this.Distance3(t)<this.res2)this.offscreen([r,n,s])||(0==wireframe?(this.data.indices.push(e),this.data.indices.push(i),this.data.indices.push(a)):(this.data.indices.push(e),this.data.indices.push(i),this.data.indices.push(i),this.data.indices.push(a),this.data.indices.push(a),this.data.indices.push(e)));else{if(this.offscreen(t))return;let f=t[0],u=t[1],p=t[2],v=t[3],g=t[4],w=t[5],x=t[6],M=t[7],b=t[8],A=t[9],S=[.5*(A[0]+w[0]),.5*(A[1]+w[1]),.5*(A[2]+w[2])],P=[.5*(A[0]+b[0]),.5*(A[1]+b[1]),.5*(A[2]+b[2])],R=[.5*(w[0]+p[0]),.5*(w[1]+p[1]),.5*(w[2]+p[2])],T=[.5*(b[0]+g[0]),.5*(b[1]+g[1]),.5*(b[2]+g[2])],y=[.5*(b[0]+M[0]),.5*(b[1]+M[1]),.5*(b[2]+M[2])],D=[.5*(p[0]+g[0]),.5*(p[1]+g[1]),.5*(p[2]+g[2])],I=[.5*(p[0]+f[0]),.5*(p[1]+f[1]),.5*(p[2]+f[2])],z=[.5*(g[0]+v[0]),.5*(g[1]+v[1]),.5*(g[2]+v[2])],E=[.5*(M[0]+x[0]),.5*(M[1]+x[1]),.5*(M[2]+x[2])],O=[.5*(f[0]+u[0]),.5*(f[1]+u[1]),.5*(f[2]+u[2])],L=[.5*(u[0]+v[0]),.5*(u[1]+v[1]),.5*(u[2]+v[2])],N=[.5*(v[0]+x[0]),.5*(v[1]+x[1]),.5*(v[2]+x[2])],_=[.5*(S[0]+R[0]),.5*(S[1]+R[1]),.5*(S[2]+R[2])],B=[.5*(P[0]+y[0]),.5*(P[1]+y[1]),.5*(P[2]+y[2])],V=[.5*(R[0]+I[0]),.5*(R[1]+I[1]),.5*(R[2]+I[2])],C=[.5*T[0]+.25*(g[0]+u[0]),.5*T[1]+.25*(g[1]+u[1]),.5*T[2]+.25*(g[2]+u[2])],F=[.5*(y[0]+E[0]),.5*(y[1]+E[1]),.5*(y[2]+E[2])],H=[.5*D[0]+.25*(g[0]+M[0]),.5*D[1]+.25*(g[1]+M[1]),.5*D[2]+.25*(g[2]+M[2])],G=[.25*(w[0]+g[0])+.5*z[0],.25*(w[1]+g[1])+.5*z[1],.25*(w[2]+g[2])+.5*z[2]],U=[.5*(O[0]+L[0]),.5*(O[1]+L[1]),.5*(O[2]+L[2])],W=[.5*(L[0]+N[0]),.5*(L[1]+N[1]),.5*(L[2]+N[2])],Y=[.5*(H[0]+U[0]),.5*(H[1]+U[1]),.5*(H[2]+U[2])],j=[.5*(H[0]+W[0]),.5*(H[1]+W[1]),.5*(H[2]+W[2])],k=[.5*(U[0]+W[0]),.5*(U[1]+W[1]),.5*(U[2]+W[2])],Z=[.5*(G[0]+F[0]),.5*(G[1]+F[1]),.5*(G[2]+F[2])],X=[.5*(B[0]+G[0]),.5*(B[1]+G[1]),.5*(B[2]+G[2])],q=[.5*(B[0]+F[0]),.5*(B[1]+F[1]),.5*(B[2]+F[2])],K=[.5*(_[0]+C[0]),.5*(_[1]+C[1]),.5*(_[2]+C[2])],$=[.5*(V[0]+C[0]),.5*(V[1]+C[1]),.5*(V[2]+C[2])],Q=[.5*(_[0]+V[0]),.5*(_[1]+V[1]),.5*(_[2]+V[2])],J=[f,O,I,U,[.5*(D[0]+O[0]),.5*(D[1]+O[1]),.5*(D[2]+O[2])],V,k,Y,$,Q],tt=[k,W,j,N,[.5*(z[0]+E[0]),.5*(z[1]+E[1]),.5*(z[2]+E[2])],Z,x,E,F,q],et=[Q,K,_,X,[.5*(S[0]+T[0]),.5*(S[1]+T[1]),.5*(S[2]+T[2])],S,q,B,P,A],it=[q,X,Z,K,[.25*(R[0]+y[0]+L[0]+g[0]),.25*(R[1]+y[1]+L[1]+g[1]),.25*(R[2]+y[2]+L[2]+g[2])],j,Q,$,Y,k],at=this.normal(k,j,Z,q,X,K,Q),rt=this.normal(q,X,K,Q,$,Y,k),nt=this.normal(Q,$,Y,k,j,Z,q),st=this.Epsilon,ot=[.5*(n[0]+s[0]),.5*(n[1]+s[1]),.5*(n[2]+s[2])];if(!o)if(o=Straightness(x,M,b,A)<this.res2){let t=unit(this.sumdifferential(it[0],it[2],it[5],it[9],it[1],it[3],it[6]));ot=[ot[0]-st*t[0],ot[1]-st*t[1],ot[2]-st*t[2]]}else ot=q;let ht=[.5*(s[0]+r[0]),.5*(s[1]+r[1]),.5*(s[2]+r[2])];if(!h)if(h=Straightness(f,p,w,A)<this.res2){let t=unit(this.sumdifferential(it[6],it[3],it[1],it[0],it[7],it[8],it[9]));ht=[ht[0]-st*t[0],ht[1]-st*t[1],ht[2]-st*t[2]]}else ht=Q;let lt=[.5*(r[0]+n[0]),.5*(r[1]+n[1]),.5*(r[2]+n[2])];if(!l)if(l=Straightness(f,u,v,x)<this.res2){let t=unit(this.sumdifferential(it[9],it[8],it[7],it[6],it[5],it[2],it[0]));lt=[lt[0]-st*t[0],lt[1]-st*t[1],lt[2]-st*t[2]]}else lt=k;if(d){let t=Array(4),f=Array(4),u=Array(4);for(let e=0;e<4;++e)t[e]=.5*(c[e]+m[e]),f[e]=.5*(m[e]+d[e]),u[e]=.5*(d[e]+c[e]);let p=this.data.Vertex(ot,at,t),v=this.data.Vertex(ht,rt,f),g=this.data.Vertex(lt,nt,u);this.Render3(J,e,g,v,r,lt,ht,!1,h,l,d,u,f),this.Render3(tt,g,i,p,lt,n,ot,o,!1,l,u,c,t),this.Render3(et,v,p,a,ht,ot,s,o,h,!1,f,t,m),this.Render3(it,p,v,g,ot,ht,lt,!1,!1,!1,t,f,u)}else{let t=this.vertex(ot,at),d=this.vertex(ht,rt),c=this.vertex(lt,nt);this.Render3(J,e,c,d,r,lt,ht,!1,h,l),this.Render3(tt,c,i,t,lt,n,ot,o,!1,l),this.Render3(et,d,t,a,ht,ot,s,o,h,!1),this.Render3(it,t,d,c,ot,ht,lt,!1,!1,!1)}}}Distance(t){let e=t[0],i=t[3],a=t[12],r=t[15],n=Flatness(e,a,i,r);n=Math.max(Straightness(e,t[4],t[8],a)),n=Math.max(n,Straightness(t[1],t[5],t[9],t[13])),n=Math.max(n,Straightness(i,t[7],t[11],r)),n=Math.max(n,Straightness(t[2],t[6],t[10],t[14]));let s=Flatness(e,i,a,r);return s=Math.max(s,Straightness(e,t[1],t[2],i)),s=Math.max(s,Straightness(t[4],t[5],t[6],t[7])),s=Math.max(s,Straightness(t[8],t[9],t[10],t[11])),[n,s=Math.max(s,Straightness(a,t[13],t[14],r))]}Distance3(t){let e=t[0],i=t[4],a=t[6],r=t[9],n=abs2([(e[0]+a[0]+r[0])*third-i[0],(e[1]+a[1]+r[1])*third-i[1],(e[2]+a[2]+r[2])*third-i[2]]);return n=Math.max(n,Straightness(e,t[1],t[3],a)),n=Math.max(n,Straightness(e,t[2],t[5],r)),Math.max(n,Straightness(a,t[7],t[8],r))}differential(t,e,i,a){let r=[3*(e[0]-t[0]),3*(e[1]-t[1]),3*(e[2]-t[2])];return abs2(r)>this.epsilon?r:abs2(r=bezierPP(t,e,i))>this.epsilon?r:bezierPPP(t,e,i,a)}sumdifferential(t,e,i,a,r,n,s){let o=this.differential(t,e,i,a),h=this.differential(t,r,n,s);return[o[0]+h[0],o[1]+h[1],o[2]+h[2]]}normal(t,e,i,a,r,n,s){let o=3*(r[0]-a[0]),h=3*(r[1]-a[1]),l=3*(r[2]-a[2]),d=3*(i[0]-a[0]),c=3*(i[1]-a[1]),m=3*(i[2]-a[2]),f=[h*m-l*c,l*d-o*m,o*c-h*d];if(abs2(f)>this.epsilon)return f;let u=[d,c,m],p=[o,h,l],v=bezierPP(a,i,e),g=bezierPP(a,r,n),w=cross(g,u),x=cross(p,v);if(abs2(f=[w[0]+x[0],w[1]+x[1],w[2]+x[2]])>this.epsilon)return f;let M=bezierPPP(a,i,e,t),b=bezierPPP(a,r,n,s);w=cross(p,M),x=cross(b,u);let A=cross(g,v);return abs2(f=[w[0]+x[0]+A[0],w[1]+x[1]+A[1],w[2]+x[2]+A[2]])>this.epsilon?f:(w=cross(b,v),x=cross(g,M),abs2(f=[w[0]+x[0],w[1]+x[1],w[2]+x[2]])>this.epsilon?f:cross(b,M))}}class BezierCurve extends Geometry{constructor(t,e,i,a,r){super(),this.controlpoints=t,this.Min=a,this.Max=r,this.CenterIndex=e,this.MaterialIndex=i}setMaterialIndex(){this.setMaterial(material1Data,drawMaterial1)}processLine(t){let e=t[0],i=t[1];if(!this.offscreen([e,i])){let t=[0,0,1];this.data.indices.push(this.data.vertex(e,t)),this.data.indices.push(this.data.vertex(i,t)),this.append()}}process(t){if(2==t.length)return this.processLine(t);let e=t[0],i=t[1],a=t[2],r=t[3],n=this.normal(bezierP(e,i),bezierPP(e,i,a)),s=this.normal(bezierP(a,r),bezierPP(r,a,i)),o=this.data.vertex(e,n),h=this.data.vertex(r,s);this.Render(t,o,h),this.data.indices.length>0&&this.append()}append(){material1Data.append(this.data)}Render(t,e,i){let a=t[0],r=t[1],n=t[2],s=t[3];if(Straightness(a,r,n,s)<this.res2)this.offscreen([a,s])||(this.data.indices.push(e),this.data.indices.push(i));else{if(this.offscreen(t))return;let o=[.5*(a[0]+r[0]),.5*(a[1]+r[1]),.5*(a[2]+r[2])],h=[.5*(r[0]+n[0]),.5*(r[1]+n[1]),.5*(r[2]+n[2])],l=[.5*(n[0]+s[0]),.5*(n[1]+s[1]),.5*(n[2]+s[2])],d=[.5*(o[0]+h[0]),.5*(o[1]+h[1]),.5*(o[2]+h[2])],c=[.5*(h[0]+l[0]),.5*(h[1]+l[1]),.5*(h[2]+l[2])],m=[.5*(d[0]+c[0]),.5*(d[1]+c[1]),.5*(d[2]+c[2])],f=[a,o,d,m],u=[m,c,l,s],p=this.normal(bezierPh(a,r,n,s),bezierPPh(a,r,n,s)),v=this.data.vertex(m,p);this.Render(f,e,v),this.Render(u,v,i)}}normal(t,e){let i=dot(t,t),a=dot(t,e);return[i*e[0]-a*t[0],i*e[1]-a*t[1],i*e[2]-a*t[2]]}}class Pixel extends Geometry{constructor(t,e,i,a,r){super(),this.controlpoint=t,this.width=e,this.CenterIndex=0,this.MaterialIndex=i,this.Min=a,this.Max=r}setMaterialIndex(){this.setMaterial(material0Data,drawMaterial0)}process(t){this.data.indices.push(this.data.vertex0(this.controlpoint,this.width)),this.append()}append(){material0Data.append(this.data)}}class Triangles extends Geometry{constructor(t,e,i){super(),this.CenterIndex=0,this.MaterialIndex=t,this.Min=e,this.Max=i,this.Positions=Positions,this.Normals=Normals,this.Colors=Colors,this.Indices=Indices,Positions=[],Normals=[],Colors=[],Indices=[],this.transparent=Materials[t].diffuse[3]<1}setMaterialIndex(){this.transparent?this.setMaterial(transparentData,drawTransparent):this.setMaterial(triangleData,drawTriangle)}process(t){materialIndex=this.Colors.length>0?-1-materialIndex:1+materialIndex;for(let t=0,e=this.Indices.length;t<e;++t){let e=this.Indices[t],i=e[0],a=this.Positions[i[0]],r=this.Positions[i[1]],n=this.Positions[i[2]];if(!this.offscreen([a,r,n])){let t=e.length>1?e[1]:i;if(t&&0!=t.length||(t=i),this.Colors.length>0){let s=e.length>2?e[2]:i;s&&0!=s.length||(s=i);let o=this.Colors[s[0]],h=this.Colors[s[1]],l=this.Colors[s[2]];this.transparent|=o[3]+h[3]+l[3]<765,0==wireframe?(this.data.iVertex(i[0],a,this.Normals[t[0]],o),this.data.iVertex(i[1],r,this.Normals[t[1]],h),this.data.iVertex(i[2],n,this.Normals[t[2]],l)):(this.data.iVertex(i[0],a,this.Normals[t[0]],o),this.data.iVertex(i[1],r,this.Normals[t[1]],h),this.data.iVertex(i[1],r,this.Normals[t[1]],h),this.data.iVertex(i[2],n,this.Normals[t[2]],l),this.data.iVertex(i[2],n,this.Normals[t[2]],l),this.data.iVertex(i[0],a,this.Normals[t[0]],o))}else 0==wireframe?(this.data.iVertex(i[0],a,this.Normals[t[0]]),this.data.iVertex(i[1],r,this.Normals[t[1]]),this.data.iVertex(i[2],n,this.Normals[t[2]])):(this.data.iVertex(i[0],a,this.Normals[t[0]]),this.data.iVertex(i[1],r,this.Normals[t[1]]),this.data.iVertex(i[1],r,this.Normals[t[1]]),this.data.iVertex(i[2],n,this.Normals[t[2]]),this.data.iVertex(i[2],n,this.Normals[t[2]]),this.data.iVertex(i[0],a,this.Normals[t[0]]))}}this.data.nvertices=this.Positions.length,this.data.indices.length>0&&this.append()}append(){this.transparent?transparentData.append(this.data):triangleData.append(this.data)}}function home(){mat4.identity(rotMat),initProjection(),setProjection(),remesh=!0,draw()}let positionAttribute=0,normalAttribute=1,materialAttribute=2,colorAttribute=3,widthAttribute=4;function initShader(t=[]){let e=getShader(gl,vertex,gl.VERTEX_SHADER,t),i=getShader(gl,fragment,gl.FRAGMENT_SHADER,t),a=gl.createProgram();return gl.attachShader(a,e),gl.attachShader(a,i),gl.bindAttribLocation(a,positionAttribute,"position"),gl.bindAttribLocation(a,normalAttribute,"normal"),gl.bindAttribLocation(a,materialAttribute,"materialIndex"),gl.bindAttribLocation(a,colorAttribute,"color"),gl.bindAttribLocation(a,widthAttribute,"width"),gl.linkProgram(a),gl.getProgramParameter(a,gl.LINK_STATUS)||alert("Could not initialize shaders"),a}class Split3{constructor(t,e,i,a){this.m0=[.5*(t[0]+e[0]),.5*(t[1]+e[1]),.5*(t[2]+e[2])];let r=.5*(e[0]+i[0]),n=.5*(e[1]+i[1]),s=.5*(e[2]+i[2]);this.m2=[.5*(i[0]+a[0]),.5*(i[1]+a[1]),.5*(i[2]+a[2])],this.m3=[.5*(this.m0[0]+r),.5*(this.m0[1]+n),.5*(this.m0[2]+s)],this.m4=[.5*(r+this.m2[0]),.5*(n+this.m2[1]),.5*(s+this.m2[2])],this.m5=[.5*(this.m3[0]+this.m4[0]),.5*(this.m3[1]+this.m4[1]),.5*(this.m3[2]+this.m4[2])]}}function unit(t){let e=1/(Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2])||1);return[t[0]*e,t[1]*e,t[2]*e]}function abs2(t){return t[0]*t[0]+t[1]*t[1]+t[2]*t[2]}function dot(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function cross(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function bezierP(t,e){return[e[0]-t[0],e[1]-t[1],e[2]-t[2]]}function bezierPP(t,e,i){return[3*(t[0]+i[0])-6*e[0],3*(t[1]+i[1])-6*e[1],3*(t[2]+i[2])-6*e[2]]}function bezierPPP(t,e,i,a){return[a[0]-t[0]+3*(e[0]-i[0]),a[1]-t[1]+3*(e[1]-i[1]),a[2]-t[2]+3*(e[2]-i[2])]}function bezierPh(t,e,i,a){return[i[0]+a[0]-t[0]-e[0],i[1]+a[1]-t[1]-e[1],i[2]+a[2]-t[2]-e[2]]}function bezierPPh(t,e,i,a){return[3*t[0]-5*e[0]+i[0]+a[0],3*t[1]-5*e[1]+i[1]+a[1],3*t[2]-5*e[2]+i[2]+a[2]]}function Straightness(t,e,i,a){let r=[third*(a[0]-t[0]),third*(a[1]-t[1]),third*(a[2]-t[2])];return Math.max(abs2([e[0]-r[0]-t[0],e[1]-r[1]-t[1],e[2]-r[2]-t[2]]),abs2([a[0]-r[0]-i[0],a[1]-r[1]-i[1],a[2]-r[2]-i[2]]))}function Flatness(t,e,i,a){let r=[e[0]-t[0],e[1]-t[1],e[2]-t[2]],n=[a[0]-i[0],a[1]-i[1],a[2]-i[2]];return Math.max(abs2(cross(r,unit(n))),abs2(cross(n,unit(r))))/9}function corners(t,e){return[t,[t[0],t[1],e[2]],[t[0],e[1],t[2]],[t[0],e[1],e[2]],[e[0],t[1],t[2]],[e[0],t[1],e[2]],[e[0],e[1],t[2]],e]}function minbound(t){return[Math.min(t[0][0],t[1][0],t[2][0],t[3][0],t[4][0],t[5][0],t[6][0],t[7][0]),Math.min(t[0][1],t[1][1],t[2][1],t[3][1],t[4][1],t[5][1],t[6][1],t[7][1]),Math.min(t[0][2],t[1][2],t[2][2],t[3][2],t[4][2],t[5][2],t[6][2],t[7][2])]}function maxbound(t){return[Math.max(t[0][0],t[1][0],t[2][0],t[3][0],t[4][0],t[5][0],t[6][0],t[7][0]),Math.max(t[0][1],t[1][1],t[2][1],t[3][1],t[4][1],t[5][1],t[6][1],t[7][1]),Math.max(t[0][2],t[1][2],t[2][2],t[3][2],t[4][2],t[5][2],t[6][2],t[7][2])]}function COBTarget(t,e){mat4.fromTranslation(T,[center.x,center.y,center.z]),mat4.invert(cjMatInv,T),mat4.multiply(t,e,cjMatInv),mat4.multiply(t,T,t)}function setUniforms(t,e){let i=e==pixelShader;gl.useProgram(e),gl.enableVertexAttribArray(positionAttribute),i&&gl.enableVertexAttribArray(widthAttribute);let a=!i&&Lights.length>0;if(a&&gl.enableVertexAttribArray(normalAttribute),gl.enableVertexAttribArray(materialAttribute),e.projViewMatUniform=gl.getUniformLocation(e,"projViewMat"),e.viewMatUniform=gl.getUniformLocation(e,"viewMat"),e.normMatUniform=gl.getUniformLocation(e,"normMat"),e!=colorShader&&e!=transparentShader||gl.enableVertexAttribArray(colorAttribute),a)for(let t=0;t<Lights.length;++t)Lights[t].setUniform(e,t);for(let i=0;i<t.materials.length;++i)t.materials[i].setUniform(e,i);gl.uniformMatrix4fv(e.projViewMatUniform,!1,projViewMat),gl.uniformMatrix4fv(e.viewMatUniform,!1,viewMat),gl.uniformMatrix3fv(e.normMatUniform,!1,normMat)}function handleMouseDown(t){zoomEnabled||enableZoom(),mouseDownOrTouchActive=!0,lastMouseX=t.clientX,lastMouseY=t.clientY}let pinchStart,touchStartTime,pinch=!1;function pinchDistance(t){return Math.hypot(t[0].pageX-t[1].pageX,t[0].pageY-t[1].pageY)}function handleTouchStart(t){t.preventDefault(),zoomEnabled||enableZoom();let e=t.targetTouches;swipe=rotate=pinch=!1,zooming||(1!=e.length||mouseDownOrTouchActive||(touchStartTime=(new Date).getTime(),touchId=e[0].identifier,lastMouseX=e[0].pageX,lastMouseY=e[0].pageY),2!=e.length||mouseDownOrTouchActive||(touchId=e[0].identifier,pinchStart=pinchDistance(e),pinch=!0))}function handleMouseUpOrTouchEnd(t){mouseDownOrTouchActive=!1}function rotateScene(t,e,i,a,r){if(t==i&&e==a)return;let[n,s]=arcball([t,-e],[i,-a]);mat4.fromRotation(T,2*r*ArcballFactor*n/lastzoom,s),mat4.multiply(rotMat,T,rotMat)}function shiftScene(t,e,i,a){let r=1/lastzoom;shift.x+=(i-t)*r*halfCanvasWidth,shift.y-=(a-e)*r*halfCanvasHeight}function panScene(t,e,i,a){orthographic?shiftScene(t,e,i,a):(center.x+=(i-t)*(viewParam.xmax-viewParam.xmin),center.y-=(a-e)*(viewParam.ymax-viewParam.ymin))}function updateViewMatrix(){COBTarget(viewMat,rotMat),mat4.translate(viewMat,viewMat,[center.x,center.y,0]),mat3.fromMat4(viewMat3,viewMat),mat3.invert(normMat,viewMat3),mat4.multiply(projViewMat,projMat,viewMat)}function capzoom(){let t=Math.sqrt(Number.MAX_VALUE),e=1/t;Zoom<=e&&(Zoom=e),Zoom>=t&&(Zoom=t),Zoom!=lastzoom&&(remesh=!0),lastzoom=Zoom}function zoomImage(t){let e=zoomStep*halfCanvasHeight*t;const i=Math.log(.1*Number.MAX_VALUE)/Math.log(zoomFactor);Math.abs(e)<i&&(Zoom*=zoomFactor**e,capzoom())}function normMouse(t){let e=t[0],i=t[1],a=Math.hypot(e,i);return a>1&&(denom=1/a,e*=denom,i*=denom),[e,i,Math.sqrt(Math.max(1-i*i-e*e,0))]}function arcball(t,e){let i=normMouse(t),a=normMouse(e),r=dot(i,a);return r>1?r=1:r<-1&&(r=-1),[Math.acos(r),unit(cross(i,a))]}function zoomScene(t,e,i,a){zoomImage(e-a)}const DRAGMODE_ROTATE=1,DRAGMODE_SHIFT=2,DRAGMODE_ZOOM=3,DRAGMODE_PAN=4;function processDrag(t,e,i,a=1){let r;switch(i){case DRAGMODE_ROTATE:r=rotateScene;break;case DRAGMODE_SHIFT:r=shiftScene;break;case DRAGMODE_ZOOM:r=zoomScene;break;case DRAGMODE_PAN:r=panScene;break;default:r=((t,e,i,a)=>{})}r((lastMouseX-halfCanvasWidth)/halfCanvasWidth,(lastMouseY-halfCanvasHeight)/halfCanvasHeight,(t-halfCanvasWidth)/halfCanvasWidth,(e-halfCanvasHeight)/halfCanvasHeight,a),lastMouseX=t,lastMouseY=e,setProjection(),draw()}let zoomEnabled=0;function enableZoom(){zoomEnabled=1,canvas.addEventListener("wheel",handleMouseWheel,!1)}function disableZoom(){zoomEnabled=0,canvas.removeEventListener("wheel",handleMouseWheel,!1)}function handleKey(t){if(zoomEnabled||enableZoom(),embedded&&zoomEnabled&&27==t.keyCode)return void disableZoom();let e=[];switch(t.key){case"x":e=[1,0,0];break;case"y":e=[0,1,0];break;case"z":e=[0,0,1];break;case"h":home();break;case"m":3==++wireframe&&(wireframe=0),2!=wireframe&&(embedded||deleteShaders(),initShaders()),remesh=!0,draw();break;case"+":case"=":case">":expand();break;case"-":case"_":case"<":shrink()}e.length>0&&(mat4.rotate(rotMat,rotMat,.1,e),updateViewMatrix(),draw())}function handleMouseWheel(t){t.preventDefault(),t.deltaY<0?Zoom*=zoomFactor:Zoom/=zoomFactor,capzoom(),setProjection(),draw()}function handleMouseMove(t){if(!mouseDownOrTouchActive)return;let e;processDrag(t.clientX,t.clientY,e=t.getModifierState("Control")?DRAGMODE_SHIFT:t.getModifierState("Shift")?DRAGMODE_ZOOM:t.getModifierState("Alt")?DRAGMODE_PAN:DRAGMODE_ROTATE)}let zooming=!1,swipe=!1,rotate=!1;function handleTouchMove(t){if(t.preventDefault(),zooming)return;let e=t.targetTouches;if(!pinch&&1==e.length&&touchId==e[0].identifier){let t=e[0].pageX,i=e[0].pageY,a=t-lastMouseX,r=i-lastMouseY,n=a*a+r*r<=shiftHoldDistance*shiftHoldDistance;if(n&&!swipe&&!rotate&&(new Date).getTime()-touchStartTime>shiftWaitTime&&(navigator.vibrate&&window.navigator.vibrate(vibrateTime),swipe=!0),swipe)processDrag(t,i,DRAGMODE_SHIFT);else if(!n){rotate=!0,processDrag(e[0].pageX,e[0].pageY,DRAGMODE_ROTATE,.5)}}if(pinch&&!swipe&&2==e.length&&touchId==e[0].identifier){let t=pinchDistance(e),i=t-pinchStart;zooming=!0,(i*=zoomPinchFactor)>zoomPinchCap&&(i=zoomPinchCap),i<-zoomPinchCap&&(i=-zoomPinchCap),zoomImage(i/size2),pinchStart=t,swipe=rotate=zooming=!1,setProjection(),draw()}}let pixelShader,materialShader,colorShader,transparentShader,zbuffer=[];function transformVertices(t){let e=viewMat[2],i=viewMat[6],a=viewMat[10];zbuffer.length=t.length;for(let r=0;r<t.length;++r){let n=6*r;zbuffer[r]=e*t[n]+i*t[n+1]+a*t[n+2]}}function drawMaterial0(){drawBuffer(material0Data,pixelShader),material0Data.clear()}function drawMaterial1(){drawBuffer(material1Data,materialShader),material1Data.clear()}function drawMaterial(){drawBuffer(materialData,materialShader),materialData.clear()}function drawColor(){drawBuffer(colorData,colorShader),colorData.clear()}function drawTriangle(){drawBuffer(triangleData,transparentShader),triangleData.clear()}function drawTransparent(){let t=transparentData.indices;if(wireframe>0)return drawBuffer(transparentData,transparentShader,t),void transparentData.clear();if(t.length>0){transformVertices(transparentData.vertices);let e=t.length/3,i=Array(e).fill().map((t,e)=>e);i.sort(function(e,i){let a=3*e;Ia=t[a],Ib=t[a+1],Ic=t[a+2];let r=3*i;return IA=t[r],IB=t[r+1],IC=t[r+2],zbuffer[Ia]+zbuffer[Ib]+zbuffer[Ic]<zbuffer[IA]+zbuffer[IB]+zbuffer[IC]?-1:1});let a=Array(t.length);for(let r=0;r<e;++r){let e=3*i[r];a[3*r]=t[e],a[3*r+1]=t[e+1],a[3*r+2]=t[e+2]}gl.depthMask(!1),drawBuffer(transparentData,transparentShader,a),gl.depthMask(!0)}transparentData.clear()}function drawBuffers(){drawMaterial0(),drawMaterial1(),drawMaterial(),drawColor(),drawTriangle(),drawTransparent()}function draw(){embedded&&(offscreen.width=canvas.width,offscreen.height=canvas.height,setViewport()),gl.clearColor(Background[0],Background[1],Background[2],Background[3]),gl.clear(gl.COLOR_BUFFER_BIT|gl.DEPTH_BUFFER_BIT);for(let t=0;t<P.length;++t)P[t].render();drawBuffers(),embedded&&(context.clearRect(0,0,canvas.width,canvas.height),context.drawImage(offscreen,0,0)),0==wireframe&&(remesh=!1)}function setDimensions(t,e,i,a){let r=t/e,n=1/lastzoom,s=(i/t+viewportshift[0])*lastzoom,o=(a/e+viewportshift[1])*lastzoom;if(orthographic){let t=B[0]-b[0],e=B[1]-b[1];if(t<e*r){let t=.5*e*r*n,i=2*t*s,a=e*n*o;viewParam.xmin=-t-i,viewParam.xmax=t-i,viewParam.ymin=b[1]*n-a,viewParam.ymax=B[1]*n-a}else{let e=.5*t/(r*Zoom),i=t*n*s,a=2*e*o;viewParam.xmin=b[0]*n-i,viewParam.xmax=B[0]*n-i,viewParam.ymin=-e-a,viewParam.ymax=e-a}}else{let t=H*n,e=t*r,i=2*e*s,a=2*t*o;viewParam.xmin=-e-i,viewParam.xmax=e-i,viewParam.ymin=-t-a,viewParam.ymax=t-a}}function setProjection(){setDimensions(canvasWidth,canvasHeight,shift.x,shift.y),(orthographic?mat4.ortho:mat4.frustum)(projMat,viewParam.xmin,viewParam.xmax,viewParam.ymin,viewParam.ymax,-viewParam.zmax,-viewParam.zmin),updateViewMatrix()}function initProjection(){H=-Math.tan(.5*angle)*B[2],center.x=center.y=0,center.z=.5*(b[2]+B[2]),lastzoom=Zoom=Zoom0,viewParam.zmin=b[2],viewParam.zmax=B[2],shift.x=shift.y=0}function setViewport(){gl.viewportWidth=canvasWidth,gl.viewportHeight=canvasHeight,gl.viewport(0,0,gl.viewportWidth,gl.viewportHeight),gl.scissor(0,0,gl.viewportWidth,gl.viewportHeight)}function setCanvas(){canvas.width=canvasWidth,canvas.height=canvasHeight,embedded&&(offscreen.width=canvasWidth,offscreen.height=canvasHeight),size2=Math.hypot(canvasWidth,canvasHeight),halfCanvasWidth=.5*canvasWidth,halfCanvasHeight=.5*canvasHeight}function setsize(t,e){t>maxViewportWidth&&(t=maxViewportWidth),e>maxViewportHeight&&(e=maxViewportHeight),shift.x*=t/canvasWidth,shift.y*=e/canvasHeight,canvasWidth=t,canvasHeight=e,setCanvas(),setViewport(),home()}function expand(){setsize(canvasWidth*resizeStep+.5,canvasHeight*resizeStep+.5)}function shrink(){setsize(Math.max(canvasWidth/resizeStep+.5,1),Math.max(canvasHeight/resizeStep+.5,1))}function webGLInit(){if(canvas=document.getElementById("Asymptote"),embedded=window.top.document!=document,initGL(),absolute&&!embedded)canvasWidth*=window.devicePixelRatio,canvasHeight*=window.devicePixelRatio;else{canvas.width=Math.max(window.innerWidth-windowTrim,windowTrim),canvas.height=Math.max(window.innerHeight-windowTrim,windowTrim);let t=canvasWidth/canvasHeight;canvas.width>canvas.height*t?canvas.width=Math.min(canvas.height*t,canvas.width):canvas.height=Math.min(canvas.width/t,canvas.height),canvas.width>0&&(canvasWidth=canvas.width),canvas.height>0&&(canvasHeight=canvas.height)}setCanvas(),ArcballFactor=1+8*Math.hypot(viewportmargin[0],viewportmargin[1])/size2,viewportshift[0]/=Zoom0,viewportshift[1]/=Zoom0,gl.enable(gl.BLEND),gl.blendFunc(gl.SRC_ALPHA,gl.ONE_MINUS_SRC_ALPHA),gl.enable(gl.DEPTH_TEST),gl.enable(gl.SCISSOR_TEST),setViewport(),home(),canvas.onmousedown=handleMouseDown,document.onmouseup=handleMouseUpOrTouchEnd,document.onmousemove=handleMouseMove,canvas.onkeydown=handleKey,embedded||enableZoom(),canvas.addEventListener("touchstart",handleTouchStart,!1),canvas.addEventListener("touchend",handleMouseUpOrTouchEnd,!1),canvas.addEventListener("touchcancel",handleMouseUpOrTouchEnd,!1),canvas.addEventListener("touchleave",handleMouseUpOrTouchEnd,!1),canvas.addEventListener("touchmove",handleTouchMove,!1),document.addEventListener("keydown",handleKey,!1)}let listen=!1;class Align{constructor(t,e){if(this.center=t,e){let t=e[0],i=e[1];this.ct=Math.cos(t),this.st=Math.sin(t),this.cp=Math.cos(i),this.sp=Math.sin(i)}}T0(t){return[t[0]+this.center[0],t[1]+this.center[1],t[2]+this.center[2]]}T(t){let e=t[0],i=t[1],a=t[2],r=e*this.ct+a*this.st;return[r*this.cp-i*this.sp+this.center[0],r*this.sp+i*this.cp+this.center[1],-e*this.st+a*this.ct+this.center[2]]}}function Tcorners(t,e,i){let a=[t(e),t([e[0],e[1],i[2]]),t([e[0],i[1],e[2]]),t([e[0],i[1],i[2]]),t([i[0],e[1],e[2]]),t([i[0],e[1],i[2]]),t([i[0],i[1],e[2]]),t(i)];return[minbound(a),maxbound(a)]}function sphere(t,e,i,r,n){let s,o,h,l,d,c,m=.524670512339254,f=.595936986722291,u=.954967051233925,p=.0820155480083437,v=.996685028842544,g=.0549670512339254,w=.998880711874577,x=.0405017186586849,M=[[[1,0,0],[1,0,m],[f,0,u],[p,0,v],[1,a,0],[1,a,m],[f,a*f,u],[p,a*p,v],[a,1,0],[a,1,m],[a*f,f,u],[a*p,p,v],[0,1,0],[0,1,m],[0,f,u],[0,p,v]],[[p,0,v],[p,a*p,v],[g,0,w],[a*p,p,v],[x,x,1],[.05*a,0,1],[0,p,v],[0,g,w],[0,.05*a,1],[0,0,1]]],b=new Align(t,n);function A(t){let e=Array(t.length);for(let i=0;i<t.length;++i){let a=t[i];e[i]=d([s*a[0],o*a[1],h*a[2]])}return e}n?(l=1,c=0,d=b.T.bind(b)):(l=-1,c=-e,d=b.T0.bind(b));let S=Tcorners(d,[-e,-e,c],[e,e,e]),R=S[0],T=S[1];for(let t=-1;t<=1;t+=2){s=t*e;for(let t=-1;t<=1;t+=2){o=t*e;for(let t=l;t<=1;t+=2){h=t*e;for(let t=0;t<2;++t)P.push(new BezierPatch(A(M[t]),i,r,R,T))}}}}let a=4/3*(Math.sqrt(2)-1);function disk(t,e,i,r,n){let s=1-2*a/3,o=[[1,0,0],[1,-a,0],[a,-1,0],[0,-1,0],[1,a,0],[s,0,0],[0,-s,0],[-a,-1,0],[a,1,0],[0,s,0],[-s,0,0],[-1,-a,0],[0,1,0],[-a,1,0],[-1,a,0],[-1,0,0]],h=new Align(t,n);let l=Tcorners(h.T.bind(h),[-e,-e,0],[e,e,0]);P.push(new BezierPatch(function(t){let i=Array(t.length);for(let a=0;a<t.length;++a){let r=t[a];i[a]=h.T([e*r[0],e*r[1],0])}return i}(o),i,r,l[0],l[1]))}function cylinder(t,e,i,r,n,s,o){let h,l,d=[[1,0,0],[1,0,1/3],[1,0,2/3],[1,0,1],[1,a,0],[1,a,1/3],[1,a,2/3],[1,a,1],[a,1,0],[a,1,1/3],[a,1,2/3],[a,1,1],[0,1,0],[0,1,1/3],[0,1,2/3],[0,1,1]],c=new Align(t,s);function m(t){let e=Array(t.length);for(let a=0;a<t.length;++a){let r=t[a];e[a]=c.T([h*r[0],l*r[1],i*r[2]])}return e}let f=Tcorners(c.T.bind(c),[-e,-e,0],[e,e,i]),u=f[0],p=f[1];for(let t=-1;t<=1;t+=2){h=t*e;for(let t=-1;t<=1;t+=2)l=t*e,P.push(new BezierPatch(m(d),r,n,u,p))}if(o){let e=c.T([0,0,i]);P.push(new BezierCurve([t,e],r,n,t,e))}}function rmf(t,e,i,a,r){class n{constructor(t,e,i){this.p=t,this.r=e,this.t=i,this.s=cross(i,e)}}let s=Number.EPSILON*Math.max(abs2(t),abs2(e),abs2(i),abs2(a));function o(r){if(1==r){let r=[a[0]-i[0],a[1]-i[1],a[2]-i[2]];return abs2(r)>s?unit(r):abs2(r=[2*i[0]-e[0]-a[0],2*i[1]-e[1]-a[1],2*i[2]-e[2]-a[2]])>s?unit(r):[a[0]-t[0]+3*(e[0]-i[0]),a[1]-t[1]+3*(e[1]-i[1]),a[2]-t[2]+3*(e[2]-i[2])]}let n=[a[0]-t[0]+3*(e[0]-i[0]),a[1]-t[1]+3*(e[1]-i[1]),a[2]-t[2]+3*(e[2]-i[2])],o=[2*(t[0]+i[0])-4*e[0],2*(t[1]+i[1])-4*e[1],2*(t[2]+i[2])-4*e[2]],h=[e[0]-t[0],e[1]-t[1],e[2]-t[2]],l=r*r,d=[n[0]*l+o[0]*r+h[0],n[1]*l+o[1]*r+h[1],n[2]*l+o[2]*r+h[2]];return abs2(d)>s?unit(d):abs2(d=[n[0]*(l=2*r)+o[0],n[1]*l+o[1],n[2]*l+o[2]])>s?unit(d):unit(n)}let h=Array(r.length),l=[e[0]-t[0],e[1]-t[1],e[2]-t[2]];abs2(l)<s&&abs2(l=[t[0]-2*e[0]+i[0],t[1]-2*e[1]+i[1],t[2]-2*e[2]+i[2]])<s&&(l=[a[0]-t[0]+3*(e[0]-i[0]),a[1]-t[1]+3*(e[1]-i[1]),a[2]-t[2]+3*(e[2]-i[2])]);let d=function(t){let e=cross(t,[0,1,0]),i=Number.EPSILON*abs2(t);return abs2(e)>i?unit(e):abs2(e=cross(t,[0,0,1]))>i?unit(e):[1,0,0]}(l=unit(l));h[0]=new n(t,d,l);for(let s=1;s<r.length;++s){let l=h[s-1],d=r[s],c=1-d,m=c*c,f=m*c,u=3*d;m*=u,c*=u*d;let p=d*d*d,v=[f*t[0]+m*e[0]+c*i[0]+p*a[0],f*t[1]+m*e[1]+c*i[1]+p*a[1],f*t[2]+m*e[2]+c*i[2]+p*a[2]],g=[v[0]-l.p[0],v[1]-l.p[1],v[2]-l.p[2]];if(0!=g[0]||0!=g[1]||0!=g[2]){let t=l.r,e=unit(g),i=l.t,a=dot(e,i),r=[i[0]-2*a*e[0],i[1]-2*a*e[1],i[2]-2*a*e[2]];i=o(d);let c=2*dot(e,t),m=[t[0]-c*e[0],t[1]-c*e[1],t[2]-c*e[2]],f=unit([i[0]-r[0],i[1]-r[1],i[2]-r[2]]),u=2*dot(f,m);m=[m[0]-u*f[0],m[1]-u*f[1],m[2]-u*f[2]],h[s]=new n(v,unit(m),unit(i))}else h[s]=h[s-1]}return h}function tube(t,e,i,r,n,s,o){let h=rmf(t[0],t[1],t[2],t[3],[0,1/3,2/3,1]),l=a*e,d=[[e,0],[e,l],[l,e],[0,e]];function c(e,a,o,l){let c=Array(16);for(let i=0;i<4;++i){let r=h[i],n=r.r[0],s=r.s[0],m=n*e+s*a,f=n*o+s*l,u=(n=r.r[1])*e+(s=r.s[1])*a,p=n*o+s*l,v=(n=r.r[2])*e+(s=r.s[2])*a,g=n*o+s*l,w=t[i],x=w[0];w1=w[1],w2=w[2];for(let t=0;t<4;++t){let e=d[t],a=e[0],r=e[1];c[4*i+t]=[m*a+f*r+x,u*a+p*r+w1,v*a+g*r+w2]}}P.push(new BezierPatch(c,i,r,n,s))}c(1,0,0,1),c(0,-1,1,0),c(-1,0,0,-1),c(0,1,-1,0),o&&P.push(new BezierCurve(t,i,r,n,s))}function webGLStart(){0==window.innerWidth||0==window.innerHeight?listen||(listen=!0,window.addEventListener("resize",webGLStart,!1)):(listen&&(window.removeEventListener("resize",webGLStart,!1),listen=!1),webGLInit())}
+let vertex="\nattribute vec3 position;\n#ifdef WIDTH\nattribute float width;\n#endif\n#ifdef NORMAL\nattribute vec3 normal;\n#endif\nattribute float materialIndex;\n#ifdef COLOR\nattribute vec4 color;\n#endif\n\nuniform mat3 normMat;\nuniform mat4 viewMat;\nuniform mat4 projViewMat;\n\n#ifdef NORMAL\n#ifndef ORTHOGRAPHIC\nvarying vec3 ViewPosition;\n#endif\nvarying vec3 Normal;\n#endif\nvarying vec4 diffuse;\nvarying vec3 specular;\nvarying float roughness,metallic,fresnel0;\nvarying vec4 emissive;\n\nstruct Material {\n vec4 diffuse,emissive,specular;\n vec4 parameters;\n};\n\nuniform Material Materials[Nmaterials];\n\nvoid main(void)\n{\n vec4 v=vec4(position,1.0);\n gl_Position=projViewMat*v;\n#ifdef NORMAL\n#ifndef ORTHOGRAPHIC\n ViewPosition=(viewMat*v).xyz;\n#endif \n Normal=normalize(normal*normMat);\n \n Material m;\n#ifdef TRANSPARENT\n m=Materials[int(abs(materialIndex))-1];\n emissive=m.emissive;\n if(materialIndex >= 0.0) {\n diffuse=m.diffuse;\n } else {\n diffuse=color;\n#if nlights == 0\n emissive += color;\n#endif\n }\n#else\n m=Materials[int(materialIndex)];\n emissive=m.emissive;\n#ifdef COLOR\n diffuse=color;\n#if nlights == 0\n emissive += color;\n#endif\n#else\n diffuse=m.diffuse;\n#endif\n#endif\n specular=m.specular.rgb;\n vec4 parameters=m.parameters;\n roughness=1.0-parameters[0];\n metallic=parameters[1];\n fresnel0=parameters[2];\n#else\n emissive=Materials[int(materialIndex)].emissive;\n#endif\n#ifdef WIDTH\n gl_PointSize=width;\n#endif\n}\n",fragment="\n#ifdef NORMAL\n#ifndef ORTHOGRAPHIC\nvarying vec3 ViewPosition;\n#endif\nvarying vec3 Normal;\nvarying vec4 diffuse;\nvarying vec3 specular;\nvarying float roughness,metallic,fresnel0;\n\nfloat Roughness2;\nvec3 normal;\n\nstruct Light {\n vec3 direction;\n vec3 color;\n};\n\nuniform Light Lights[Nlights];\n\nfloat NDF_TRG(vec3 h)\n{\n float ndoth=max(dot(normal,h),0.0);\n float alpha2=Roughness2*Roughness2;\n float denom=ndoth*ndoth*(alpha2-1.0)+1.0;\n return denom != 0.0 ? alpha2/(denom*denom) : 0.0;\n}\n \nfloat GGX_Geom(vec3 v)\n{\n float ndotv=max(dot(v,normal),0.0);\n float ap=1.0+Roughness2;\n float k=0.125*ap*ap;\n return ndotv/((ndotv*(1.0-k))+k);\n}\n \nfloat Geom(vec3 v, vec3 l)\n{\n return GGX_Geom(v)*GGX_Geom(l);\n}\n \nfloat Fresnel(vec3 h, vec3 v, float fresnel0)\n{\n float a=1.0-max(dot(h,v),0.0);\n float b=a*a;\n return fresnel0+(1.0-fresnel0)*b*b*a;\n}\n \n// physical based shading using UE4 model.\nvec3 BRDF(vec3 viewDirection, vec3 lightDirection)\n{\n vec3 lambertian=diffuse.rgb;\n vec3 h=normalize(lightDirection+viewDirection);\n \n float omegain=max(dot(viewDirection,normal),0.0);\n float omegali=max(dot(lightDirection,normal),0.0);\n \n float D=NDF_TRG(h);\n float G=Geom(viewDirection,lightDirection);\n float F=Fresnel(h,viewDirection,fresnel0);\n \n float denom=4.0*omegain*omegali;\n float rawReflectance=denom > 0.0 ? (D*G)/denom : 0.0;\n \n vec3 dielectric=mix(lambertian,rawReflectance*specular,F);\n vec3 metal=rawReflectance*diffuse.rgb;\n \n return mix(dielectric,metal,metallic);\n}\n#endif\nvarying vec4 emissive;\n \nvoid main(void)\n{\n#if defined(NORMAL) && nlights > 0\n normal=normalize(Normal);\n normal=gl_FrontFacing ? normal : -normal;\n#ifdef ORTHOGRAPHIC\n vec3 viewDir=vec3(0.0,0.0,1.0);\n#else\n vec3 viewDir=-normalize(ViewPosition);\n#endif\n Roughness2=roughness*roughness;\n vec3 color=emissive.rgb;\n for(int i=0; i < nlights; ++i) {\n Light Li=Lights[i];\n vec3 L=Li.direction;\n float cosTheta=max(dot(normal,L),0.0);\n vec3 radiance=cosTheta*Li.color;\n color += BRDF(viewDir,L)*radiance;\n }\n gl_FragColor=vec4(color,diffuse.a);\n#else\n gl_FragColor=emissive;\n#endif\n}\n";!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var i=e();for(var a in i)("object"==typeof exports?exports:t)[a]=i[a]}}("undefined"!=typeof self?self:this,(function(){return function(t){var e={};function i(a){if(e[a])return e[a].exports;var r=e[a]={i:a,l:!1,exports:{}};return t[a].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,a){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:a})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=1)}([function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setMatrixArrayType=function(t){e.ARRAY_TYPE=t},e.toRadian=function(t){return t*r},e.equals=function(t,e){return Math.abs(t-e)<=a*Math.max(1,Math.abs(t),Math.abs(e))};var a=e.EPSILON=1e-6;e.ARRAY_TYPE="undefined"!=typeof Float32Array?Float32Array:Array,e.RANDOM=Math.random;var r=Math.PI/180},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mat4=e.mat3=void 0;var a=n(i(2)),r=n(i(3));function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}e.mat3=a,e.mat4=r},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=function(){var t=new a.ARRAY_TYPE(9);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromMat4=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t},e.invert=function(t,e){var i=e[0],a=e[1],r=e[2],n=e[3],s=e[4],o=e[5],h=e[6],l=e[7],c=e[8],d=c*s-o*l,m=-c*n+o*h,f=l*n-s*h,u=i*d+a*m+r*f;if(!u)return null;return u=1/u,t[0]=d*u,t[1]=(-c*a+r*l)*u,t[2]=(o*a-r*s)*u,t[3]=m*u,t[4]=(c*i-r*h)*u,t[5]=(-o*i+r*n)*u,t[6]=f*u,t[7]=(-l*i+a*h)*u,t[8]=(s*i-a*n)*u,t};var a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}(i(0))},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=function(){var t=new a.ARRAY_TYPE(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},e.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},e.invert=function(t,e){var i=e[0],a=e[1],r=e[2],n=e[3],s=e[4],o=e[5],h=e[6],l=e[7],c=e[8],d=e[9],m=e[10],f=e[11],u=e[12],p=e[13],v=e[14],g=e[15],x=i*o-a*s,w=i*h-r*s,M=i*l-n*s,b=a*h-r*o,S=a*l-n*o,P=r*l-n*h,A=c*p-d*u,y=c*v-m*u,T=c*g-f*u,R=d*v-m*p,D=d*g-f*p,I=m*g-f*v,z=x*I-w*D+M*R+b*T-S*y+P*A;if(!z)return null;return z=1/z,t[0]=(o*I-h*D+l*R)*z,t[1]=(r*D-a*I-n*R)*z,t[2]=(p*P-v*S+g*b)*z,t[3]=(m*S-d*P-f*b)*z,t[4]=(h*T-s*I-l*y)*z,t[5]=(i*I-r*T+n*y)*z,t[6]=(v*M-u*P-g*w)*z,t[7]=(c*P-m*M+f*w)*z,t[8]=(s*D-o*T+l*A)*z,t[9]=(a*T-i*D-n*A)*z,t[10]=(u*S-p*M+g*x)*z,t[11]=(d*M-c*S-f*x)*z,t[12]=(o*y-s*R-h*A)*z,t[13]=(i*R-a*y+r*A)*z,t[14]=(p*w-u*b-v*x)*z,t[15]=(c*b-d*w+m*x)*z,t},e.multiply=r,e.translate=function(t,e,i){var a=i[0],r=i[1],n=i[2],s=void 0,o=void 0,h=void 0,l=void 0,c=void 0,d=void 0,m=void 0,f=void 0,u=void 0,p=void 0,v=void 0,g=void 0;e===t?(t[12]=e[0]*a+e[4]*r+e[8]*n+e[12],t[13]=e[1]*a+e[5]*r+e[9]*n+e[13],t[14]=e[2]*a+e[6]*r+e[10]*n+e[14],t[15]=e[3]*a+e[7]*r+e[11]*n+e[15]):(s=e[0],o=e[1],h=e[2],l=e[3],c=e[4],d=e[5],m=e[6],f=e[7],u=e[8],p=e[9],v=e[10],g=e[11],t[0]=s,t[1]=o,t[2]=h,t[3]=l,t[4]=c,t[5]=d,t[6]=m,t[7]=f,t[8]=u,t[9]=p,t[10]=v,t[11]=g,t[12]=s*a+c*r+u*n+e[12],t[13]=o*a+d*r+p*n+e[13],t[14]=h*a+m*r+v*n+e[14],t[15]=l*a+f*r+g*n+e[15]);return t},e.rotate=function(t,e,i,r){var n,s,o,h,l,c,d,m,f,u,p,v,g,x,w,M,b,S,P,A,y,T,R,D,I=r[0],z=r[1],L=r[2],N=Math.sqrt(I*I+z*z+L*L);if(Math.abs(N)<a.EPSILON)return null;I*=N=1/N,z*=N,L*=N,n=Math.sin(i),s=Math.cos(i),o=1-s,h=e[0],l=e[1],c=e[2],d=e[3],m=e[4],f=e[5],u=e[6],p=e[7],v=e[8],g=e[9],x=e[10],w=e[11],M=I*I*o+s,b=z*I*o+L*n,S=L*I*o-z*n,P=I*z*o-L*n,A=z*z*o+s,y=L*z*o+I*n,T=I*L*o+z*n,R=z*L*o-I*n,D=L*L*o+s,t[0]=h*M+m*b+v*S,t[1]=l*M+f*b+g*S,t[2]=c*M+u*b+x*S,t[3]=d*M+p*b+w*S,t[4]=h*P+m*A+v*y,t[5]=l*P+f*A+g*y,t[6]=c*P+u*A+x*y,t[7]=d*P+p*A+w*y,t[8]=h*T+m*R+v*D,t[9]=l*T+f*R+g*D,t[10]=c*T+u*R+x*D,t[11]=d*T+p*R+w*D,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);return t},e.fromTranslation=function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t},e.fromRotation=function(t,e,i){var r,n,s,o=i[0],h=i[1],l=i[2],c=Math.sqrt(o*o+h*h+l*l);if(Math.abs(c)<a.EPSILON)return null;return o*=c=1/c,h*=c,l*=c,r=Math.sin(e),n=Math.cos(e),s=1-n,t[0]=o*o*s+n,t[1]=h*o*s+l*r,t[2]=l*o*s-h*r,t[3]=0,t[4]=o*h*s-l*r,t[5]=h*h*s+n,t[6]=l*h*s+o*r,t[7]=0,t[8]=o*l*s+h*r,t[9]=h*l*s-o*r,t[10]=l*l*s+n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},e.frustum=function(t,e,i,a,r,n,s){var o=1/(i-e),h=1/(r-a),l=1/(n-s);return t[0]=2*n*o,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*n*h,t[6]=0,t[7]=0,t[8]=(i+e)*o,t[9]=(r+a)*h,t[10]=(s+n)*l,t[11]=-1,t[12]=0,t[13]=0,t[14]=s*n*2*l,t[15]=0,t},e.ortho=function(t,e,i,a,r,n,s){var o=1/(e-i),h=1/(a-r),l=1/(n-s);return t[0]=-2*o,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*h,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*l,t[11]=0,t[12]=(e+i)*o,t[13]=(r+a)*h,t[14]=(s+n)*l,t[15]=1,t};var a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}(i(0));function r(t,e,i){var a=e[0],r=e[1],n=e[2],s=e[3],o=e[4],h=e[5],l=e[6],c=e[7],d=e[8],m=e[9],f=e[10],u=e[11],p=e[12],v=e[13],g=e[14],x=e[15],w=i[0],M=i[1],b=i[2],S=i[3];return t[0]=w*a+M*o+b*d+S*p,t[1]=w*r+M*h+b*m+S*v,t[2]=w*n+M*l+b*f+S*g,t[3]=w*s+M*c+b*u+S*x,w=i[4],M=i[5],b=i[6],S=i[7],t[4]=w*a+M*o+b*d+S*p,t[5]=w*r+M*h+b*m+S*v,t[6]=w*n+M*l+b*f+S*g,t[7]=w*s+M*c+b*u+S*x,w=i[8],M=i[9],b=i[10],S=i[11],t[8]=w*a+M*o+b*d+S*p,t[9]=w*r+M*h+b*m+S*v,t[10]=w*n+M*l+b*f+S*g,t[11]=w*s+M*c+b*u+S*x,w=i[12],M=i[13],b=i[14],S=i[15],t[12]=w*a+M*o+b*d+S*p,t[13]=w*r+M*h+b*m+S*v,t[14]=w*n+M*l+b*f+S*g,t[15]=w*s+M*c+b*u+S*x,t}}])}));let canvasWidth,canvasHeight,canvasWidth0,canvasHeight0,b,B,angle,Zoom0,zoom0,viewportmargin,zoomFactor,zoomPinchFactor,zoomPinchCap,zoomStep,shiftHoldDistance,shiftWaitTime,vibrateTime,embedded,canvas,gl,alpha,offscreen,context,maxMaterials,halfCanvasWidth,halfCanvasHeight,Zoom,maxViewportWidth,maxViewportHeight,P=[],Materials=[],Lights=[],Centers=[],Background=[1,1,1,1],absolute=!1,viewportshift=[0,0],nlights=0,Nmaterials=2,materials=[],pixel=.75,zoomRemeshFactor=1.5,FillFactor=.1;const windowTrim=10;let lastZoom,H,zmin,zmax,size2,ArcballFactor,third=1/3,rotMat=mat4.create(),projMat=mat4.create(),viewMat=mat4.create(),projViewMat=mat4.create(),normMat=mat3.create(),viewMat3=mat3.create(),cjMatInv=mat4.create(),T=mat4.create(),center={x:0,y:0,z:0},shift={x:0,y:0},viewParam={xmin:0,xmax:0,ymin:0,ymax:0,zmin:0,zmax:0},remesh=!0,wireframe=0,mouseDownOrTouchActive=!1,lastMouseX=null,lastMouseY=null,touchID=null,Positions=[],Normals=[],Colors=[],Indices=[];class Material{constructor(t,e,i,a,r,n){this.diffuse=t,this.emissive=e,this.specular=i,this.shininess=a,this.metallic=r,this.fresnel0=n}setUniform(t,e){let i=i=>gl.getUniformLocation(t,"Materials["+e+"]."+i);gl.uniform4fv(i("diffuse"),new Float32Array(this.diffuse)),gl.uniform4fv(i("emissive"),new Float32Array(this.emissive)),gl.uniform4fv(i("specular"),new Float32Array(this.specular)),gl.uniform4f(i("parameters"),this.shininess,this.metallic,this.fresnel0,0)}}let indexExt,TRIANGLES,material0Data,material1Data,materialData,colorData,transparentData,triangleData,materialIndex,enumPointLight=1,enumDirectionalLight=2;class Light{constructor(t,e){this.direction=t,this.color=e}setUniform(t,e){let i=i=>gl.getUniformLocation(t,"Lights["+e+"]."+i);gl.uniform3fv(i("direction"),new Float32Array(this.direction)),gl.uniform3fv(i("color"),new Float32Array(this.color))}}function initShaders(){let t=gl.getParameter(gl.MAX_VERTEX_UNIFORM_VECTORS);maxMaterials=Math.floor((t-14)/4),Nmaterials=Math.min(Math.max(Nmaterials,Materials.length),maxMaterials),pixelShader=initShader(["WIDTH"]),materialShader=initShader(["NORMAL"]),colorShader=initShader(["NORMAL","COLOR"]),transparentShader=initShader(["NORMAL","COLOR","TRANSPARENT"])}function deleteShaders(){gl.deleteProgram(transparentShader),gl.deleteProgram(colorShader),gl.deleteProgram(materialShader),gl.deleteProgram(pixelShader)}function noGL(){gl||alert("Could not initialize WebGL")}function saveAttributes(){let t=window.top.document.asygl[alpha];t.gl=gl,t.nlights=Lights.length,t.Nmaterials=Nmaterials,t.maxMaterials=maxMaterials,t.pixelShader=pixelShader,t.materialShader=materialShader,t.colorShader=colorShader,t.transparentShader=transparentShader}function restoreAttributes(){let t=window.top.document.asygl[alpha];gl=t.gl,nlights=t.nlights,Nmaterials=t.Nmaterials,maxMaterials=t.maxMaterials,pixelShader=t.pixelShader,materialShader=t.materialShader,colorShader=t.colorShader,transparentShader=t.transparentShader}function initGL(){if(alpha=Background[3]<1,embedded){let t=window.top.document;null==t.asygl&&(t.asygl=Array(2)),context=canvas.getContext("2d"),offscreen=t.offscreen,offscreen||(offscreen=t.createElement("canvas"),t.offscreen=offscreen),t.asygl[alpha]&&t.asygl[alpha].gl?(restoreAttributes(),(Lights.length!=nlights||Math.min(Materials.length,maxMaterials)>Nmaterials)&&(initShaders(),saveAttributes())):(gl=offscreen.getContext("webgl",{alpha:alpha}),gl||noGL(),initShaders(),t.asygl[alpha]={},saveAttributes())}else gl=canvas.getContext("webgl",{alpha:alpha}),gl||noGL(),initShaders();indexExt=gl.getExtension("OES_element_index_uint"),TRIANGLES=gl.TRIANGLES,material0Data=new vertexBuffer(gl.POINTS),material1Data=new vertexBuffer(gl.LINES),materialData=new vertexBuffer,colorData=new vertexBuffer,transparentData=new vertexBuffer,triangleData=new vertexBuffer}function getShader(t,e,i,a=[]){let r=`#version 100\n#ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n#else\n precision mediump float;\n#endif\n #define nlights ${0==wireframe?Lights.length:0}\n\n const int Nlights=${Math.max(Lights.length,1)};\n\n #define Nmaterials ${Nmaterials}\n`;orthographic&&(r+="#define ORTHOGRAPHIC\n"),a.forEach(t=>r+="#define "+t+"\n");let n=t.createShader(i);return t.shaderSource(n,r+e),t.compileShader(n),t.getShaderParameter(n,t.COMPILE_STATUS)?n:(alert(t.getShaderInfoLog(n)),null)}function registerBuffer(t,e,i,a=gl.ARRAY_BUFFER){return t.length>0&&(0==e&&(e=gl.createBuffer(),i=!0),gl.bindBuffer(a,e),i&&gl.bufferData(a,t,gl.STATIC_DRAW)),e}function drawBuffer(t,e,i=t.indices){if(0==t.indices.length)return;let a=e!=pixelShader;setUniforms(t,e);let r=remesh||t.partial||!t.rendered;t.verticesBuffer=registerBuffer(new Float32Array(t.vertices),t.verticesBuffer,r),gl.vertexAttribPointer(positionAttribute,3,gl.FLOAT,!1,a?24:16,0),a&&Lights.length>0?gl.vertexAttribPointer(normalAttribute,3,gl.FLOAT,!1,24,12):pixel&&gl.vertexAttribPointer(widthAttribute,1,gl.FLOAT,!1,16,12),t.materialsBuffer=registerBuffer(new Int16Array(t.materialIndices),t.materialsBuffer,r),gl.vertexAttribPointer(materialAttribute,1,gl.SHORT,!1,2,0),e!=colorShader&&e!=transparentShader||(t.colorsBuffer=registerBuffer(new Uint8Array(t.colors),t.colorsBuffer,r),gl.vertexAttribPointer(colorAttribute,4,gl.UNSIGNED_BYTE,!0,0,0)),t.indicesBuffer=registerBuffer(indexExt?new Uint32Array(i):new Uint16Array(i),t.indicesBuffer,r,gl.ELEMENT_ARRAY_BUFFER),t.rendered=!0,gl.drawElements(a?wireframe?gl.LINES:t.type:gl.POINTS,i.length,indexExt?gl.UNSIGNED_INT:gl.UNSIGNED_SHORT,0)}class vertexBuffer{constructor(t){this.type=t||TRIANGLES,this.verticesBuffer=0,this.materialsBuffer=0,this.colorsBuffer=0,this.indicesBuffer=0,this.rendered=!1,this.partial=!1,this.clear()}clear(){this.vertices=[],this.materialIndices=[],this.colors=[],this.indices=[],this.nvertices=0,this.materials=[],this.materialTable=[]}vertex(t,e){return this.vertices.push(t[0]),this.vertices.push(t[1]),this.vertices.push(t[2]),this.vertices.push(e[0]),this.vertices.push(e[1]),this.vertices.push(e[2]),this.materialIndices.push(materialIndex),this.nvertices++}Vertex(t,e,i=[0,0,0,0]){return this.vertices.push(t[0]),this.vertices.push(t[1]),this.vertices.push(t[2]),this.vertices.push(e[0]),this.vertices.push(e[1]),this.vertices.push(e[2]),this.materialIndices.push(materialIndex),this.colors.push(i[0]),this.colors.push(i[1]),this.colors.push(i[2]),this.colors.push(i[3]),this.nvertices++}vertex0(t,e){return this.vertices.push(t[0]),this.vertices.push(t[1]),this.vertices.push(t[2]),this.vertices.push(e),this.materialIndices.push(materialIndex),this.nvertices++}iVertex(t,e,i,a=[0,0,0,0]){let r=6*t;this.vertices[r]=e[0],this.vertices[r+1]=e[1],this.vertices[r+2]=e[2],this.vertices[r+3]=i[0],this.vertices[r+4]=i[1],this.vertices[r+5]=i[2],this.materialIndices[t]=materialIndex;let n=4*t;this.colors[n]=a[0],this.colors[n+1]=a[1],this.colors[n+2]=a[2],this.colors[n+3]=a[3],this.indices.push(t)}append(t){append(this.vertices,t.vertices),append(this.materialIndices,t.materialIndices),append(this.colors,t.colors),appendOffset(this.indices,t.indices,this.nvertices),this.nvertices+=t.nvertices}}function append(t,e){let i=t.length,a=e.length;t.length+=a;for(let r=0;r<a;++r)t[i+r]=e[r]}function appendOffset(t,e,i){let a=t.length,r=e.length;t.length+=e.length;for(let n=0;n<r;++n)t[a+n]=e[n]+i}class Geometry{constructor(){this.data=new vertexBuffer,this.Onscreen=!1,this.m=[]}offscreen(t){let e=projViewMat,i=t[0],a=i[0],r=i[1],n=i[2],s=1/(e[3]*a+e[7]*r+e[11]*n+e[15]);this.x=this.X=(e[0]*a+e[4]*r+e[8]*n+e[12])*s,this.y=this.Y=(e[1]*a+e[5]*r+e[9]*n+e[13])*s;for(let i=1,a=t.length;i<a;++i){let a=t[i],r=a[0],n=a[1],s=a[2],o=1/(e[3]*r+e[7]*n+e[11]*s+e[15]),h=(e[0]*r+e[4]*n+e[8]*s+e[12])*o,l=(e[1]*r+e[5]*n+e[9]*s+e[13])*o;h<this.x?this.x=h:h>this.X&&(this.X=h),l<this.y?this.y=l:l>this.Y&&(this.Y=l)}return(this.X<-1.01||this.x>1.01||this.Y<-1.01||this.y>1.01)&&(this.Onscreen=!1,!0)}T(t){let e=this.c[0],i=this.c[1],a=this.c[2],r=t[0]-e,n=t[1]-i,s=t[2]-a;return[r*normMat[0]+n*normMat[3]+s*normMat[6]+e,r*normMat[1]+n*normMat[4]+s*normMat[7]+i,r*normMat[2]+n*normMat[5]+s*normMat[8]+a]}Tcorners(t,e){return[this.T(t),this.T([t[0],t[1],e[2]]),this.T([t[0],e[1],t[2]]),this.T([t[0],e[1],e[2]]),this.T([e[0],t[1],t[2]]),this.T([e[0],t[1],e[2]]),this.T([e[0],e[1],t[2]]),this.T(e)]}setMaterial(t,e){null==t.materialTable[this.MaterialIndex]&&(t.materials.length>=Nmaterials&&(t.partial=!0,e()),t.materialTable[this.MaterialIndex]=t.materials.length,t.materials.push(Materials[this.MaterialIndex])),materialIndex=t.materialTable[this.MaterialIndex]}render(){let t;if(this.setMaterialIndex(),0==this.CenterIndex?t=corners(this.Min,this.Max):(this.c=Centers[this.CenterIndex-1],t=this.Tcorners(this.Min,this.Max)),this.offscreen(t))return this.data.clear(),void this.notRendered();let e,i=this.controlpoints;if(0==this.CenterIndex){if(!remesh&&this.Onscreen)return void this.append();e=i}else{let t=i.length;e=Array(t);for(let a=0;a<t;++a)e[a]=this.T(i[a])}let a=orthographic?1:this.Min[2]/B[2],r=pixel*Math.hypot(a*(viewParam.xmax-viewParam.xmin),a*(viewParam.ymax-viewParam.ymin))/size2;this.res2=r*r,this.Epsilon=FillFactor*r,this.data.clear(),this.notRendered(),this.Onscreen=!0,this.process(e)}}class BezierPatch extends Geometry{constructor(t,e,i,a,r,n){super(),this.controlpoints=t,this.Min=a,this.Max=r,this.color=n,this.CenterIndex=e;let s=t.length;if(n){let t=n[0][3]+n[1][3]+n[2][3];this.transparent=16==s||4==s?t+n[3][3]<1020:t<765}else this.transparent=Materials[i].diffuse[3]<1;this.MaterialIndex=i,this.vertex=this.transparent?this.data.Vertex.bind(this.data):this.data.vertex.bind(this.data),this.L2norm(this.controlpoints)}setMaterialIndex(){this.transparent?this.setMaterial(transparentData,drawTransparent):this.color?this.setMaterial(colorData,drawColor):this.setMaterial(materialData,drawMaterial)}L2norm(t){let e=t[0];this.epsilon=0;let i=t.length;for(let a=1;a<i;++a)this.epsilon=Math.max(this.epsilon,abs2([t[a][0]-e[0],t[a][1]-e[1],t[a][2]-e[2]]));this.epsilon*=Number.EPSILON}processTriangle(t){let e=t[0],i=t[1],a=t[2],r=unit(cross([i[0]-e[0],i[1]-e[1],i[2]-e[2]],[a[0]-e[0],a[1]-e[1],a[2]-e[2]]));if(!this.offscreen([e,i,a])){let t,n,s;this.color?(t=this.data.Vertex(e,r,this.color[0]),n=this.data.Vertex(i,r,this.color[1]),s=this.data.Vertex(a,r,this.color[2])):(t=this.vertex(e,r),n=this.vertex(i,r),s=this.vertex(a,r)),0==wireframe?(this.data.indices.push(t),this.data.indices.push(n),this.data.indices.push(s)):(this.data.indices.push(t),this.data.indices.push(n),this.data.indices.push(n),this.data.indices.push(s),this.data.indices.push(s),this.data.indices.push(t)),this.append()}}processQuad(t){let e=t[0],i=t[1],a=t[2],r=t[3],n=cross([i[0]-e[0],i[1]-e[1],i[2]-e[2]],[a[0]-i[0],a[1]-i[1],a[2]-i[2]]),s=cross([a[0]-r[0],a[1]-r[1],a[2]-r[2]],[r[0]-e[0],r[1]-e[1],r[2]-e[2]]),o=unit([n[0]+s[0],n[1]+s[1],n[2]+s[2]]);if(!this.offscreen([e,i,a,r])){let t,n,s,h;this.color?(t=this.data.Vertex(e,o,this.color[0]),n=this.data.Vertex(i,o,this.color[1]),s=this.data.Vertex(a,o,this.color[2]),h=this.data.Vertex(r,o,this.color[3])):(t=this.vertex(e,o),n=this.vertex(i,o),s=this.vertex(a,o),h=this.vertex(r,o)),0==wireframe?(this.data.indices.push(t),this.data.indices.push(n),this.data.indices.push(s),this.data.indices.push(t),this.data.indices.push(s),this.data.indices.push(h)):(this.data.indices.push(t),this.data.indices.push(n),this.data.indices.push(n),this.data.indices.push(s),this.data.indices.push(s),this.data.indices.push(h),this.data.indices.push(h),this.data.indices.push(t)),this.append()}}curve(t,e,i,a,r){new BezierCurve([t[e],t[i],t[a],t[r]],0,materialIndex,this.Min,this.Max).render()}process(t){if(this.transparent&&1!=wireframe&&(materialIndex=this.color?-1-materialIndex:1+materialIndex),10==t.length)return this.process3(t);if(3==t.length)return this.processTriangle(t);if(4==t.length)return this.processQuad(t);if(1==wireframe)return this.curve(t,0,4,8,12),this.curve(t,12,13,14,15),this.curve(t,15,11,7,3),void this.curve(t,3,2,1,0);let e=t[0],i=t[3],a=t[12],r=t[15],n=this.normal(i,t[2],t[1],e,t[4],t[8],a);abs2(n)<this.epsilon&&(n=this.normal(i,t[2],t[1],e,t[13],t[14],r),abs2(n)<this.epsilon&&(n=this.normal(r,t[11],t[7],i,t[4],t[8],a)));let s=this.normal(e,t[4],t[8],a,t[13],t[14],r);abs2(s)<this.epsilon&&(s=this.normal(e,t[4],t[8],a,t[11],t[7],i),abs2(s)<this.epsilon&&(s=this.normal(i,t[2],t[1],e,t[13],t[14],r)));let o=this.normal(a,t[13],t[14],r,t[11],t[7],i);abs2(o)<this.epsilon&&(o=this.normal(a,t[13],t[14],r,t[2],t[1],e),abs2(o)<this.epsilon&&(o=this.normal(e,t[4],t[8],a,t[11],t[7],i)));let h=this.normal(r,t[11],t[7],i,t[2],t[1],e);if(abs2(h)<this.epsilon&&(h=this.normal(r,t[11],t[7],i,t[4],t[8],a),abs2(h)<this.epsilon&&(h=this.normal(a,t[13],t[14],r,t[2],t[1],e))),this.color){let l=this.color[0],c=this.color[1],d=this.color[2],m=this.color[3],f=this.data.Vertex(e,n,l),u=this.data.Vertex(a,s,c),p=this.data.Vertex(r,o,d),v=this.data.Vertex(i,h,m);this.Render(t,f,u,p,v,e,a,r,i,!1,!1,!1,!1,l,c,d,m)}else{let l=this.vertex(e,n),c=this.vertex(a,s),d=this.vertex(r,o),m=this.vertex(i,h);this.Render(t,l,c,d,m,e,a,r,i,!1,!1,!1,!1)}this.data.indices.length>0&&this.append()}append(){this.transparent?transparentData.append(this.data):this.color?colorData.append(this.data):materialData.append(this.data)}notRendered(){this.transparent?transparentData.rendered=!1:this.color?colorData.rendered=!1:materialData.rendered=!1}Render(t,e,i,a,r,n,s,o,h,l,c,d,m,f,u,p,v){let g=this.Distance(t);if(g[0]<this.res2&&g[1]<this.res2)this.offscreen([n,s,o])||(0==wireframe?(this.data.indices.push(e),this.data.indices.push(i),this.data.indices.push(a)):(this.data.indices.push(e),this.data.indices.push(i),this.data.indices.push(i),this.data.indices.push(a))),this.offscreen([n,o,h])||(0==wireframe?(this.data.indices.push(e),this.data.indices.push(a),this.data.indices.push(r)):(this.data.indices.push(a),this.data.indices.push(r),this.data.indices.push(r),this.data.indices.push(e)));else{if(this.offscreen(t))return;let x=t[0],w=t[3],M=t[12],b=t[15];if(g[0]<this.res2){let g=new Split3(x,t[1],t[2],w),S=new Split3(t[4],t[5],t[6],t[7]),P=new Split3(t[8],t[9],t[10],t[11]),A=new Split3(M,t[13],t[14],b),y=[x,g.m0,g.m3,g.m5,t[4],S.m0,S.m3,S.m5,t[8],P.m0,P.m3,P.m5,M,A.m0,A.m3,A.m5],T=[g.m5,g.m4,g.m2,w,S.m5,S.m4,S.m2,t[7],P.m5,P.m4,P.m2,t[11],A.m5,A.m4,A.m2,b],R=this.normal(y[12],y[13],y[14],y[15],y[11],y[7],y[3]);abs2(R)<=this.epsilon&&(R=this.normal(y[12],y[13],y[14],y[15],y[2],y[1],y[0]),abs2(R)<=this.epsilon&&(R=this.normal(y[0],y[4],y[8],y[12],y[11],y[7],y[3])));let D=this.normal(T[3],T[2],T[1],T[0],T[4],T[8],T[12]);abs2(D)<=this.epsilon&&(D=this.normal(T[3],T[2],T[1],T[0],T[13],T[14],T[15]),abs2(D)<=this.epsilon&&(D=this.normal(T[15],T[11],T[7],T[3],T[4],T[8],T[12])));let I=this.Epsilon,z=[.5*(s[0]+o[0]),.5*(s[1]+o[1]),.5*(s[2]+o[2])];if(!c)if(c=Straightness(M,t[13],t[14],b)<this.res2){let t=unit(this.differential(T[12],T[8],T[4],T[0]));z=[z[0]-I*t[0],z[1]-I*t[1],z[2]-I*t[2]]}else z=y[15];let L=[.5*(h[0]+n[0]),.5*(h[1]+n[1]),.5*(h[2]+n[2])];if(!m)if(m=Straightness(x,t[1],t[2],w)<this.res2){let t=unit(this.differential(y[3],y[7],y[11],y[15]));L=[L[0]-I*t[0],L[1]-I*t[1],L[2]-I*t[2]]}else L=T[0];if(f){let t=Array(4),g=Array(4);for(let e=0;e<4;++e)t[e]=.5*(u[e]+p[e]),g[e]=.5*(v[e]+f[e]);let x=this.data.Vertex(z,R,t),w=this.data.Vertex(L,D,g);this.Render(y,e,i,x,w,n,s,z,L,l,c,!1,m,f,u,t,g),this.Render(T,w,x,a,r,L,z,o,h,!1,c,d,m,g,t,p,v)}else{let t=this.vertex(z,R),f=this.vertex(L,D);this.Render(y,e,i,t,f,n,s,z,L,l,c,!1,m),this.Render(T,f,t,a,r,L,z,o,h,!1,c,d,m)}return}if(g[1]<this.res2){let g=new Split3(x,t[4],t[8],M),S=new Split3(t[1],t[5],t[9],t[13]),P=new Split3(t[2],t[6],t[10],t[14]),A=new Split3(w,t[7],t[11],b),y=[x,t[1],t[2],w,g.m0,S.m0,P.m0,A.m0,g.m3,S.m3,P.m3,A.m3,g.m5,S.m5,P.m5,A.m5],T=[g.m5,S.m5,P.m5,A.m5,g.m4,S.m4,P.m4,A.m4,g.m2,S.m2,P.m2,A.m2,M,t[13],t[14],b],R=this.normal(y[0],y[4],y[8],y[12],y[13],y[14],y[15]);abs2(R)<=this.epsilon&&(R=this.normal(y[0],y[4],y[8],y[12],y[11],y[7],y[3]),abs2(R)<=this.epsilon&&(R=this.normal(y[3],y[2],y[1],y[0],y[13],y[14],y[15])));let D=this.normal(T[15],T[11],T[7],T[3],T[2],T[1],T[0]);abs2(D)<=this.epsilon&&(D=this.normal(T[15],T[11],T[7],T[3],T[4],T[8],T[12]),abs2(D)<=this.epsilon&&(D=this.normal(T[12],T[13],T[14],T[15],T[2],T[1],T[0])));let I=this.Epsilon,z=[.5*(n[0]+s[0]),.5*(n[1]+s[1]),.5*(n[2]+s[2])];if(!l)if(l=Straightness(x,t[4],t[8],M)<this.res2){let t=unit(this.differential(T[0],T[1],T[2],T[3]));z=[z[0]-I*t[0],z[1]-I*t[1],z[2]-I*t[2]]}else z=y[12];let L=[.5*(o[0]+h[0]),.5*(o[1]+h[1]),.5*(o[2]+h[2])];if(!d)if(d=Straightness(b,t[11],t[7],w)<this.res2){let t=unit(this.differential(y[15],y[14],y[13],y[12]));L=[L[0]-I*t[0],L[1]-I*t[1],L[2]-I*t[2]]}else L=T[3];if(f){let t=Array(4),g=Array(4);for(let e=0;e<4;++e)t[e]=.5*(f[e]+u[e]),g[e]=.5*(p[e]+v[e]);let x=this.data.Vertex(z,R,t),w=this.data.Vertex(L,D,g);this.Render(y,e,x,w,r,n,z,L,h,l,!1,d,m,f,t,g,v),this.Render(T,x,i,a,w,z,s,o,L,l,c,d,!1,t,u,p,g)}else{let t=this.vertex(z,R),f=this.vertex(L,D);this.Render(y,e,t,f,r,n,z,L,h,l,!1,d,m),this.Render(T,t,i,a,f,z,s,o,L,l,c,d,!1)}return}let S=new Split3(x,t[1],t[2],w),P=new Split3(t[4],t[5],t[6],t[7]),A=new Split3(t[8],t[9],t[10],t[11]),y=new Split3(M,t[13],t[14],b),T=new Split3(x,t[4],t[8],M),R=new Split3(S.m0,P.m0,A.m0,y.m0),D=new Split3(S.m3,P.m3,A.m3,y.m3),I=new Split3(S.m5,P.m5,A.m5,y.m5),z=new Split3(S.m4,P.m4,A.m4,y.m4),L=new Split3(S.m2,P.m2,A.m2,y.m2),N=new Split3(w,t[7],t[11],b),E=[x,S.m0,S.m3,S.m5,T.m0,R.m0,D.m0,I.m0,T.m3,R.m3,D.m3,I.m3,T.m5,R.m5,D.m5,I.m5],O=[T.m5,R.m5,D.m5,I.m5,T.m4,R.m4,D.m4,I.m4,T.m2,R.m2,D.m2,I.m2,M,y.m0,y.m3,y.m5],V=[I.m5,z.m5,L.m5,N.m5,I.m4,z.m4,L.m4,N.m4,I.m2,z.m2,L.m2,N.m2,y.m5,y.m4,y.m2,b],C=[S.m5,S.m4,S.m2,w,I.m0,z.m0,L.m0,N.m0,I.m3,z.m3,L.m3,N.m3,I.m5,z.m5,L.m5,N.m5],B=E[15],H=this.normal(E[0],E[4],E[8],E[12],E[13],E[14],E[15]);abs2(H)<this.epsilon&&(H=this.normal(E[0],E[4],E[8],E[12],E[11],E[7],E[3]),abs2(H)<this.epsilon&&(H=this.normal(E[3],E[2],E[1],E[0],E[13],E[14],E[15])));let _=this.normal(O[12],O[13],O[14],O[15],O[11],O[7],O[3]);abs2(_)<this.epsilon&&(_=this.normal(O[12],O[13],O[14],O[15],O[2],O[1],O[0]),abs2(_)<this.epsilon&&(_=this.normal(O[0],O[4],O[8],O[12],O[11],O[7],O[3])));let F=this.normal(V[15],V[11],V[7],V[3],V[2],V[1],V[0]);abs2(F)<this.epsilon&&(F=this.normal(V[15],V[11],V[7],V[3],V[4],V[8],V[12]),abs2(F)<this.epsilon&&(F=this.normal(V[12],V[13],V[14],V[15],V[2],V[1],V[0])));let G=this.normal(C[3],C[2],C[1],C[0],C[4],C[8],C[12]);abs2(G)<this.epsilon&&(G=this.normal(C[3],C[2],C[1],C[0],C[13],C[14],C[15]),abs2(G)<this.epsilon&&(G=this.normal(C[15],C[11],C[7],C[3],C[4],C[8],C[12])));let W=this.normal(V[3],V[2],V[1],B,V[4],V[8],V[12]),U=this.Epsilon,Z=[.5*(n[0]+s[0]),.5*(n[1]+s[1]),.5*(n[2]+s[2])];if(!l)if(l=Straightness(x,t[4],t[8],M)<this.res2){let t=unit(this.differential(O[0],O[1],O[2],O[3]));Z=[Z[0]-U*t[0],Z[1]-U*t[1],Z[2]-U*t[2]]}else Z=E[12];let j=[.5*(s[0]+o[0]),.5*(s[1]+o[1]),.5*(s[2]+o[2])];if(!c)if(c=Straightness(M,t[13],t[14],b)<this.res2){let t=unit(this.differential(V[12],V[8],V[4],V[0]));j=[j[0]-U*t[0],j[1]-U*t[1],j[2]-U*t[2]]}else j=O[15];let k=[.5*(o[0]+h[0]),.5*(o[1]+h[1]),.5*(o[2]+h[2])];if(!d)if(d=Straightness(b,t[11],t[7],w)<this.res2){let t=unit(this.differential(C[15],C[14],C[13],C[12]));k=[k[0]-U*t[0],k[1]-U*t[1],k[2]-U*t[2]]}else k=V[3];let Y=[.5*(h[0]+n[0]),.5*(h[1]+n[1]),.5*(h[2]+n[2])];if(!m)if(m=Straightness(x,t[1],t[2],w)<this.res2){let t=unit(this.differential(E[3],E[7],E[11],E[15]));Y=[Y[0]-U*t[0],Y[1]-U*t[1],Y[2]-U*t[2]]}else Y=C[0];if(f){let t=Array(4),g=Array(4),x=Array(4),w=Array(4),M=Array(4);for(let e=0;e<4;++e)t[e]=.5*(f[e]+u[e]),g[e]=.5*(u[e]+p[e]),x[e]=.5*(p[e]+v[e]),w[e]=.5*(v[e]+f[e]),M[e]=.5*(t[e]+x[e]);let b=this.data.Vertex(Z,H,t),S=this.data.Vertex(j,_,g),P=this.data.Vertex(k,F,x),A=this.data.Vertex(Y,G,w),y=this.data.Vertex(B,W,M);this.Render(E,e,b,y,A,n,Z,B,Y,l,!1,!1,m,f,t,M,w),this.Render(O,b,i,S,y,Z,s,j,B,l,c,!1,!1,t,u,g,M),this.Render(V,y,S,a,P,B,j,o,k,!1,c,d,!1,M,g,p,x),this.Render(C,A,y,P,r,Y,B,k,h,!1,!1,d,m,w,M,x,v)}else{let t=this.vertex(Z,H),f=this.vertex(j,_),u=this.vertex(k,F),p=this.vertex(Y,G),v=this.vertex(B,W);this.Render(E,e,t,v,p,n,Z,B,Y,l,!1,!1,m),this.Render(O,t,i,f,v,Z,s,j,B,l,c,!1,!1),this.Render(V,v,f,a,u,B,j,o,k,!1,c,d,!1),this.Render(C,p,v,u,r,Y,B,k,h,!1,!1,d,m)}}}process3(t){if(1==wireframe)return this.curve(t,0,1,3,6),this.curve(t,6,7,8,9),void this.curve(t,9,5,2,0);let e=t[0],i=t[6],a=t[9],r=this.normal(a,t[5],t[2],e,t[1],t[3],i),n=this.normal(e,t[1],t[3],i,t[7],t[8],a),s=this.normal(i,t[7],t[8],a,t[5],t[2],e);if(this.color){let o=this.color[0],h=this.color[1],l=this.color[2],c=this.data.Vertex(e,r,o),d=this.data.Vertex(i,n,h),m=this.data.Vertex(a,s,l);this.Render3(t,c,d,m,e,i,a,!1,!1,!1,o,h,l)}else{let o=this.vertex(e,r),h=this.vertex(i,n),l=this.vertex(a,s);this.Render3(t,o,h,l,e,i,a,!1,!1,!1)}this.data.indices.length>0&&this.append()}Render3(t,e,i,a,r,n,s,o,h,l,c,d,m){if(this.Distance3(t)<this.res2)this.offscreen([r,n,s])||(0==wireframe?(this.data.indices.push(e),this.data.indices.push(i),this.data.indices.push(a)):(this.data.indices.push(e),this.data.indices.push(i),this.data.indices.push(i),this.data.indices.push(a),this.data.indices.push(a),this.data.indices.push(e)));else{if(this.offscreen(t))return;let f=t[0],u=t[1],p=t[2],v=t[3],g=t[4],x=t[5],w=t[6],M=t[7],b=t[8],S=t[9],P=[.5*(S[0]+x[0]),.5*(S[1]+x[1]),.5*(S[2]+x[2])],A=[.5*(S[0]+b[0]),.5*(S[1]+b[1]),.5*(S[2]+b[2])],y=[.5*(x[0]+p[0]),.5*(x[1]+p[1]),.5*(x[2]+p[2])],T=[.5*(b[0]+g[0]),.5*(b[1]+g[1]),.5*(b[2]+g[2])],R=[.5*(b[0]+M[0]),.5*(b[1]+M[1]),.5*(b[2]+M[2])],D=[.5*(p[0]+g[0]),.5*(p[1]+g[1]),.5*(p[2]+g[2])],I=[.5*(p[0]+f[0]),.5*(p[1]+f[1]),.5*(p[2]+f[2])],z=[.5*(g[0]+v[0]),.5*(g[1]+v[1]),.5*(g[2]+v[2])],L=[.5*(M[0]+w[0]),.5*(M[1]+w[1]),.5*(M[2]+w[2])],N=[.5*(f[0]+u[0]),.5*(f[1]+u[1]),.5*(f[2]+u[2])],E=[.5*(u[0]+v[0]),.5*(u[1]+v[1]),.5*(u[2]+v[2])],O=[.5*(v[0]+w[0]),.5*(v[1]+w[1]),.5*(v[2]+w[2])],V=[.5*(P[0]+y[0]),.5*(P[1]+y[1]),.5*(P[2]+y[2])],C=[.5*(A[0]+R[0]),.5*(A[1]+R[1]),.5*(A[2]+R[2])],B=[.5*(y[0]+I[0]),.5*(y[1]+I[1]),.5*(y[2]+I[2])],H=[.5*T[0]+.25*(g[0]+u[0]),.5*T[1]+.25*(g[1]+u[1]),.5*T[2]+.25*(g[2]+u[2])],_=[.5*(R[0]+L[0]),.5*(R[1]+L[1]),.5*(R[2]+L[2])],F=[.5*D[0]+.25*(g[0]+M[0]),.5*D[1]+.25*(g[1]+M[1]),.5*D[2]+.25*(g[2]+M[2])],G=[.25*(x[0]+g[0])+.5*z[0],.25*(x[1]+g[1])+.5*z[1],.25*(x[2]+g[2])+.5*z[2]],W=[.5*(N[0]+E[0]),.5*(N[1]+E[1]),.5*(N[2]+E[2])],U=[.5*(E[0]+O[0]),.5*(E[1]+O[1]),.5*(E[2]+O[2])],Z=[.5*(F[0]+W[0]),.5*(F[1]+W[1]),.5*(F[2]+W[2])],j=[.5*(F[0]+U[0]),.5*(F[1]+U[1]),.5*(F[2]+U[2])],k=[.5*(W[0]+U[0]),.5*(W[1]+U[1]),.5*(W[2]+U[2])],Y=[.5*(G[0]+_[0]),.5*(G[1]+_[1]),.5*(G[2]+_[2])],X=[.5*(C[0]+G[0]),.5*(C[1]+G[1]),.5*(C[2]+G[2])],q=[.5*(C[0]+_[0]),.5*(C[1]+_[1]),.5*(C[2]+_[2])],K=[.5*(V[0]+H[0]),.5*(V[1]+H[1]),.5*(V[2]+H[2])],$=[.5*(B[0]+H[0]),.5*(B[1]+H[1]),.5*(B[2]+H[2])],Q=[.5*(V[0]+B[0]),.5*(V[1]+B[1]),.5*(V[2]+B[2])],J=[f,N,I,W,[.5*(D[0]+N[0]),.5*(D[1]+N[1]),.5*(D[2]+N[2])],B,k,Z,$,Q],tt=[k,U,j,O,[.5*(z[0]+L[0]),.5*(z[1]+L[1]),.5*(z[2]+L[2])],Y,w,L,_,q],et=[Q,K,V,X,[.5*(P[0]+T[0]),.5*(P[1]+T[1]),.5*(P[2]+T[2])],P,q,C,A,S],it=[q,X,Y,K,[.25*(y[0]+R[0]+E[0]+g[0]),.25*(y[1]+R[1]+E[1]+g[1]),.25*(y[2]+R[2]+E[2]+g[2])],j,Q,$,Z,k],at=this.normal(k,j,Y,q,X,K,Q),rt=this.normal(q,X,K,Q,$,Z,k),nt=this.normal(Q,$,Z,k,j,Y,q),st=this.Epsilon,ot=[.5*(n[0]+s[0]),.5*(n[1]+s[1]),.5*(n[2]+s[2])];if(!o)if(o=Straightness(w,M,b,S)<this.res2){let t=unit(this.sumdifferential(it[0],it[2],it[5],it[9],it[1],it[3],it[6]));ot=[ot[0]-st*t[0],ot[1]-st*t[1],ot[2]-st*t[2]]}else ot=q;let ht=[.5*(s[0]+r[0]),.5*(s[1]+r[1]),.5*(s[2]+r[2])];if(!h)if(h=Straightness(f,p,x,S)<this.res2){let t=unit(this.sumdifferential(it[6],it[3],it[1],it[0],it[7],it[8],it[9]));ht=[ht[0]-st*t[0],ht[1]-st*t[1],ht[2]-st*t[2]]}else ht=Q;let lt=[.5*(r[0]+n[0]),.5*(r[1]+n[1]),.5*(r[2]+n[2])];if(!l)if(l=Straightness(f,u,v,w)<this.res2){let t=unit(this.sumdifferential(it[9],it[8],it[7],it[6],it[5],it[2],it[0]));lt=[lt[0]-st*t[0],lt[1]-st*t[1],lt[2]-st*t[2]]}else lt=k;if(c){let t=Array(4),f=Array(4),u=Array(4);for(let e=0;e<4;++e)t[e]=.5*(d[e]+m[e]),f[e]=.5*(m[e]+c[e]),u[e]=.5*(c[e]+d[e]);let p=this.data.Vertex(ot,at,t),v=this.data.Vertex(ht,rt,f),g=this.data.Vertex(lt,nt,u);this.Render3(J,e,g,v,r,lt,ht,!1,h,l,c,u,f),this.Render3(tt,g,i,p,lt,n,ot,o,!1,l,u,d,t),this.Render3(et,v,p,a,ht,ot,s,o,h,!1,f,t,m),this.Render3(it,p,v,g,ot,ht,lt,!1,!1,!1,t,f,u)}else{let t=this.vertex(ot,at),c=this.vertex(ht,rt),d=this.vertex(lt,nt);this.Render3(J,e,d,c,r,lt,ht,!1,h,l),this.Render3(tt,d,i,t,lt,n,ot,o,!1,l),this.Render3(et,c,t,a,ht,ot,s,o,h,!1),this.Render3(it,t,c,d,ot,ht,lt,!1,!1,!1)}}}Distance(t){let e=t[0],i=t[3],a=t[12],r=t[15],n=Flatness(e,a,i,r);n=Math.max(Straightness(e,t[4],t[8],a)),n=Math.max(n,Straightness(t[1],t[5],t[9],t[13])),n=Math.max(n,Straightness(i,t[7],t[11],r)),n=Math.max(n,Straightness(t[2],t[6],t[10],t[14]));let s=Flatness(e,i,a,r);return s=Math.max(s,Straightness(e,t[1],t[2],i)),s=Math.max(s,Straightness(t[4],t[5],t[6],t[7])),s=Math.max(s,Straightness(t[8],t[9],t[10],t[11])),s=Math.max(s,Straightness(a,t[13],t[14],r)),[n,s]}Distance3(t){let e=t[0],i=t[4],a=t[6],r=t[9],n=abs2([(e[0]+a[0]+r[0])*third-i[0],(e[1]+a[1]+r[1])*third-i[1],(e[2]+a[2]+r[2])*third-i[2]]);return n=Math.max(n,Straightness(e,t[1],t[3],a)),n=Math.max(n,Straightness(e,t[2],t[5],r)),Math.max(n,Straightness(a,t[7],t[8],r))}differential(t,e,i,a){let r=[3*(e[0]-t[0]),3*(e[1]-t[1]),3*(e[2]-t[2])];return abs2(r)>this.epsilon?r:(r=bezierPP(t,e,i),abs2(r)>this.epsilon?r:bezierPPP(t,e,i,a))}sumdifferential(t,e,i,a,r,n,s){let o=this.differential(t,e,i,a),h=this.differential(t,r,n,s);return[o[0]+h[0],o[1]+h[1],o[2]+h[2]]}normal(t,e,i,a,r,n,s){let o=3*(r[0]-a[0]),h=3*(r[1]-a[1]),l=3*(r[2]-a[2]),c=3*(i[0]-a[0]),d=3*(i[1]-a[1]),m=3*(i[2]-a[2]),f=[h*m-l*d,l*c-o*m,o*d-h*c];if(abs2(f)>this.epsilon)return f;let u=[c,d,m],p=[o,h,l],v=bezierPP(a,i,e),g=bezierPP(a,r,n),x=cross(g,u),w=cross(p,v);if(f=[x[0]+w[0],x[1]+w[1],x[2]+w[2]],abs2(f)>this.epsilon)return f;let M=bezierPPP(a,i,e,t),b=bezierPPP(a,r,n,s);x=cross(p,M),w=cross(b,u);let S=cross(g,v);return f=[x[0]+w[0]+S[0],x[1]+w[1]+S[1],x[2]+w[2]+S[2]],abs2(f)>this.epsilon?f:(x=cross(b,v),w=cross(g,M),f=[x[0]+w[0],x[1]+w[1],x[2]+w[2]],abs2(f)>this.epsilon?f:cross(b,M))}}class BezierCurve extends Geometry{constructor(t,e,i,a,r){super(),this.controlpoints=t,this.Min=a,this.Max=r,this.CenterIndex=e,this.MaterialIndex=i}setMaterialIndex(){this.setMaterial(material1Data,drawMaterial1)}processLine(t){let e=t[0],i=t[1];if(!this.offscreen([e,i])){let t=[0,0,1];this.data.indices.push(this.data.vertex(e,t)),this.data.indices.push(this.data.vertex(i,t)),this.append()}}process(t){if(2==t.length)return this.processLine(t);let e=t[0],i=t[1],a=t[2],r=t[3],n=this.normal(bezierP(e,i),bezierPP(e,i,a)),s=this.normal(bezierP(a,r),bezierPP(r,a,i)),o=this.data.vertex(e,n),h=this.data.vertex(r,s);this.Render(t,o,h),this.data.indices.length>0&&this.append()}append(){material1Data.append(this.data)}notRendered(){material1Data.rendered=!1}Render(t,e,i){let a=t[0],r=t[1],n=t[2],s=t[3];if(Straightness(a,r,n,s)<this.res2)this.offscreen([a,s])||(this.data.indices.push(e),this.data.indices.push(i));else{if(this.offscreen(t))return;let o=[.5*(a[0]+r[0]),.5*(a[1]+r[1]),.5*(a[2]+r[2])],h=[.5*(r[0]+n[0]),.5*(r[1]+n[1]),.5*(r[2]+n[2])],l=[.5*(n[0]+s[0]),.5*(n[1]+s[1]),.5*(n[2]+s[2])],c=[.5*(o[0]+h[0]),.5*(o[1]+h[1]),.5*(o[2]+h[2])],d=[.5*(h[0]+l[0]),.5*(h[1]+l[1]),.5*(h[2]+l[2])],m=[.5*(c[0]+d[0]),.5*(c[1]+d[1]),.5*(c[2]+d[2])],f=[a,o,c,m],u=[m,d,l,s],p=this.normal(bezierPh(a,r,n,s),bezierPPh(a,r,n,s)),v=this.data.vertex(m,p);this.Render(f,e,v),this.Render(u,v,i)}}normal(t,e){let i=dot(t,t),a=dot(t,e);return[i*e[0]-a*t[0],i*e[1]-a*t[1],i*e[2]-a*t[2]]}}class Pixel extends Geometry{constructor(t,e,i,a,r){super(),this.controlpoint=t,this.width=e,this.CenterIndex=0,this.MaterialIndex=i,this.Min=a,this.Max=r}setMaterialIndex(){this.setMaterial(material0Data,drawMaterial0)}process(t){this.data.indices.push(this.data.vertex0(this.controlpoint,this.width)),this.append()}append(){material0Data.append(this.data)}notRendered(){material0Data.rendered=!1}}class Triangles extends Geometry{constructor(t,e,i){super(),this.CenterIndex=0,this.MaterialIndex=t,this.Min=e,this.Max=i,this.Positions=Positions,this.Normals=Normals,this.Colors=Colors,this.Indices=Indices,Positions=[],Normals=[],Colors=[],Indices=[],this.transparent=Materials[t].diffuse[3]<1}setMaterialIndex(){this.transparent?this.setMaterial(transparentData,drawTransparent):this.setMaterial(triangleData,drawTriangle)}process(t){materialIndex=this.Colors.length>0?-1-materialIndex:1+materialIndex;for(let t=0,e=this.Indices.length;t<e;++t){let e=this.Indices[t],i=e[0],a=this.Positions[i[0]],r=this.Positions[i[1]],n=this.Positions[i[2]];if(!this.offscreen([a,r,n])){let t=e.length>1?e[1]:i;if(t&&0!=t.length||(t=i),this.Colors.length>0){let s=e.length>2?e[2]:i;s&&0!=s.length||(s=i);let o=this.Colors[s[0]],h=this.Colors[s[1]],l=this.Colors[s[2]];this.transparent|=o[3]+h[3]+l[3]<765,0==wireframe?(this.data.iVertex(i[0],a,this.Normals[t[0]],o),this.data.iVertex(i[1],r,this.Normals[t[1]],h),this.data.iVertex(i[2],n,this.Normals[t[2]],l)):(this.data.iVertex(i[0],a,this.Normals[t[0]],o),this.data.iVertex(i[1],r,this.Normals[t[1]],h),this.data.iVertex(i[1],r,this.Normals[t[1]],h),this.data.iVertex(i[2],n,this.Normals[t[2]],l),this.data.iVertex(i[2],n,this.Normals[t[2]],l),this.data.iVertex(i[0],a,this.Normals[t[0]],o))}else 0==wireframe?(this.data.iVertex(i[0],a,this.Normals[t[0]]),this.data.iVertex(i[1],r,this.Normals[t[1]]),this.data.iVertex(i[2],n,this.Normals[t[2]])):(this.data.iVertex(i[0],a,this.Normals[t[0]]),this.data.iVertex(i[1],r,this.Normals[t[1]]),this.data.iVertex(i[1],r,this.Normals[t[1]]),this.data.iVertex(i[2],n,this.Normals[t[2]]),this.data.iVertex(i[2],n,this.Normals[t[2]]),this.data.iVertex(i[0],a,this.Normals[t[0]]))}}this.data.nvertices=this.Positions.length,this.data.indices.length>0&&this.append()}append(){this.transparent?transparentData.append(this.data):triangleData.append(this.data)}notRendered(){this.transparent?transparentData.rendered=!1:triangleData.rendered=!1}}function redraw(){initProjection(),setProjection(),remesh=!0,draw()}function home(){mat4.identity(rotMat),redraw()}let positionAttribute=0,normalAttribute=1,materialAttribute=2,colorAttribute=3,widthAttribute=4;function initShader(t=[]){let e=getShader(gl,vertex,gl.VERTEX_SHADER,t),i=getShader(gl,fragment,gl.FRAGMENT_SHADER,t),a=gl.createProgram();return gl.attachShader(a,e),gl.attachShader(a,i),gl.bindAttribLocation(a,positionAttribute,"position"),gl.bindAttribLocation(a,normalAttribute,"normal"),gl.bindAttribLocation(a,materialAttribute,"materialIndex"),gl.bindAttribLocation(a,colorAttribute,"color"),gl.bindAttribLocation(a,widthAttribute,"width"),gl.linkProgram(a),gl.getProgramParameter(a,gl.LINK_STATUS)||alert("Could not initialize shaders"),a}class Split3{constructor(t,e,i,a){this.m0=[.5*(t[0]+e[0]),.5*(t[1]+e[1]),.5*(t[2]+e[2])];let r=.5*(e[0]+i[0]),n=.5*(e[1]+i[1]),s=.5*(e[2]+i[2]);this.m2=[.5*(i[0]+a[0]),.5*(i[1]+a[1]),.5*(i[2]+a[2])],this.m3=[.5*(this.m0[0]+r),.5*(this.m0[1]+n),.5*(this.m0[2]+s)],this.m4=[.5*(r+this.m2[0]),.5*(n+this.m2[1]),.5*(s+this.m2[2])],this.m5=[.5*(this.m3[0]+this.m4[0]),.5*(this.m3[1]+this.m4[1]),.5*(this.m3[2]+this.m4[2])]}}function unit(t){let e=1/(Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2])||1);return[t[0]*e,t[1]*e,t[2]*e]}function abs2(t){return t[0]*t[0]+t[1]*t[1]+t[2]*t[2]}function dot(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function cross(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function bezierP(t,e){return[e[0]-t[0],e[1]-t[1],e[2]-t[2]]}function bezierPP(t,e,i){return[3*(t[0]+i[0])-6*e[0],3*(t[1]+i[1])-6*e[1],3*(t[2]+i[2])-6*e[2]]}function bezierPPP(t,e,i,a){return[a[0]-t[0]+3*(e[0]-i[0]),a[1]-t[1]+3*(e[1]-i[1]),a[2]-t[2]+3*(e[2]-i[2])]}function bezierPh(t,e,i,a){return[i[0]+a[0]-t[0]-e[0],i[1]+a[1]-t[1]-e[1],i[2]+a[2]-t[2]-e[2]]}function bezierPPh(t,e,i,a){return[3*t[0]-5*e[0]+i[0]+a[0],3*t[1]-5*e[1]+i[1]+a[1],3*t[2]-5*e[2]+i[2]+a[2]]}function Straightness(t,e,i,a){let r=[third*(a[0]-t[0]),third*(a[1]-t[1]),third*(a[2]-t[2])];return Math.max(abs2([e[0]-r[0]-t[0],e[1]-r[1]-t[1],e[2]-r[2]-t[2]]),abs2([a[0]-r[0]-i[0],a[1]-r[1]-i[1],a[2]-r[2]-i[2]]))}function Flatness(t,e,i,a){let r=[e[0]-t[0],e[1]-t[1],e[2]-t[2]],n=[a[0]-i[0],a[1]-i[1],a[2]-i[2]];return Math.max(abs2(cross(r,unit(n))),abs2(cross(n,unit(r))))/9}function corners(t,e){return[t,[t[0],t[1],e[2]],[t[0],e[1],t[2]],[t[0],e[1],e[2]],[e[0],t[1],t[2]],[e[0],t[1],e[2]],[e[0],e[1],t[2]],e]}function minbound(t){return[Math.min(t[0][0],t[1][0],t[2][0],t[3][0],t[4][0],t[5][0],t[6][0],t[7][0]),Math.min(t[0][1],t[1][1],t[2][1],t[3][1],t[4][1],t[5][1],t[6][1],t[7][1]),Math.min(t[0][2],t[1][2],t[2][2],t[3][2],t[4][2],t[5][2],t[6][2],t[7][2])]}function maxbound(t){return[Math.max(t[0][0],t[1][0],t[2][0],t[3][0],t[4][0],t[5][0],t[6][0],t[7][0]),Math.max(t[0][1],t[1][1],t[2][1],t[3][1],t[4][1],t[5][1],t[6][1],t[7][1]),Math.max(t[0][2],t[1][2],t[2][2],t[3][2],t[4][2],t[5][2],t[6][2],t[7][2])]}function COBTarget(t,e){mat4.fromTranslation(T,[center.x,center.y,center.z]),mat4.invert(cjMatInv,T),mat4.multiply(t,e,cjMatInv),mat4.multiply(t,T,t)}function setUniforms(t,e){let i=e==pixelShader;gl.useProgram(e),gl.enableVertexAttribArray(positionAttribute),i&&gl.enableVertexAttribArray(widthAttribute);let a=!i&&Lights.length>0;if(a&&gl.enableVertexAttribArray(normalAttribute),gl.enableVertexAttribArray(materialAttribute),e.projViewMatUniform=gl.getUniformLocation(e,"projViewMat"),e.viewMatUniform=gl.getUniformLocation(e,"viewMat"),e.normMatUniform=gl.getUniformLocation(e,"normMat"),e!=colorShader&&e!=transparentShader||gl.enableVertexAttribArray(colorAttribute),a)for(let t=0;t<Lights.length;++t)Lights[t].setUniform(e,t);for(let i=0;i<t.materials.length;++i)t.materials[i].setUniform(e,i);gl.uniformMatrix4fv(e.projViewMatUniform,!1,projViewMat),gl.uniformMatrix4fv(e.viewMatUniform,!1,viewMat),gl.uniformMatrix3fv(e.normMatUniform,!1,normMat)}function handleMouseDown(t){zoomEnabled||enableZoom(),mouseDownOrTouchActive=!0,lastMouseX=t.clientX,lastMouseY=t.clientY}let pinchStart,touchStartTime,pinch=!1;function pinchDistance(t){return Math.hypot(t[0].pageX-t[1].pageX,t[0].pageY-t[1].pageY)}function handleTouchStart(t){t.preventDefault(),zoomEnabled||enableZoom();let e=t.targetTouches;swipe=rotate=pinch=!1,zooming||(1!=e.length||mouseDownOrTouchActive||(touchStartTime=(new Date).getTime(),touchId=e[0].identifier,lastMouseX=e[0].pageX,lastMouseY=e[0].pageY),2!=e.length||mouseDownOrTouchActive||(touchId=e[0].identifier,pinchStart=pinchDistance(e),pinch=!0))}function handleMouseUpOrTouchEnd(t){mouseDownOrTouchActive=!1}function rotateScene(t,e,i,a,r){if(t==i&&e==a)return;let[n,s]=arcball([t,-e],[i,-a]);mat4.fromRotation(T,2*r*ArcballFactor*n/Zoom,s),mat4.multiply(rotMat,T,rotMat)}function shiftScene(t,e,i,a){let r=1/Zoom;shift.x+=(i-t)*r*halfCanvasWidth,shift.y-=(a-e)*r*halfCanvasHeight}function panScene(t,e,i,a){orthographic?shiftScene(t,e,i,a):(center.x+=(i-t)*(viewParam.xmax-viewParam.xmin),center.y-=(a-e)*(viewParam.ymax-viewParam.ymin))}function updateViewMatrix(){COBTarget(viewMat,rotMat),mat4.translate(viewMat,viewMat,[center.x,center.y,0]),mat3.fromMat4(viewMat3,viewMat),mat3.invert(normMat,viewMat3),mat4.multiply(projViewMat,projMat,viewMat)}function capzoom(){let t=Math.sqrt(Number.MAX_VALUE),e=1/t;Zoom<=e&&(Zoom=e),Zoom>=t&&(Zoom=t),(zoomRemeshFactor*Zoom<lastZoom||Zoom>zoomRemeshFactor*lastZoom)&&(remesh=!0,lastZoom=Zoom)}function zoomImage(t){let e=zoomStep*halfCanvasHeight*t;const i=Math.log(.1*Number.MAX_VALUE)/Math.log(zoomFactor);Math.abs(e)<i&&(Zoom*=zoomFactor**e,capzoom())}function normMouse(t){let e=t[0],i=t[1],a=Math.hypot(e,i);return a>1&&(denom=1/a,e*=denom,i*=denom),[e,i,Math.sqrt(Math.max(1-i*i-e*e,0))]}function arcball(t,e){let i=normMouse(t),a=normMouse(e),r=dot(i,a);return[r>1?0:r<-1?pi:Math.acos(r),unit(cross(i,a))]}function zoomScene(t,e,i,a){zoomImage(e-a)}const DRAGMODE_ROTATE=1,DRAGMODE_SHIFT=2,DRAGMODE_ZOOM=3,DRAGMODE_PAN=4;function processDrag(t,e,i,a=1){let r;switch(i){case 1:r=rotateScene;break;case 2:r=shiftScene;break;case 3:r=zoomScene;break;case 4:r=panScene;break;default:r=(t,e,i,a)=>{}}r((lastMouseX-halfCanvasWidth)/halfCanvasWidth,(lastMouseY-halfCanvasHeight)/halfCanvasHeight,(t-halfCanvasWidth)/halfCanvasWidth,(e-halfCanvasHeight)/halfCanvasHeight,a),lastMouseX=t,lastMouseY=e,setProjection(),draw()}let zoomEnabled=0;function enableZoom(){zoomEnabled=1,canvas.addEventListener("wheel",handleMouseWheel,!1)}function disableZoom(){zoomEnabled=0,canvas.removeEventListener("wheel",handleMouseWheel,!1)}function handleKey(t){if(zoomEnabled||enableZoom(),embedded&&zoomEnabled&&27==t.keyCode)return void disableZoom();let e=[];switch(t.key){case"x":e=[1,0,0];break;case"y":e=[0,1,0];break;case"z":e=[0,0,1];break;case"h":home();break;case"m":++wireframe,3==wireframe&&(wireframe=0),2!=wireframe&&(embedded||deleteShaders(),initShaders()),remesh=!0,draw();break;case"+":case"=":case">":expand();break;case"-":case"_":case"<":shrink()}e.length>0&&(mat4.rotate(rotMat,rotMat,.1,e),updateViewMatrix(),draw())}function setZoom(){capzoom(),setProjection(),draw()}function handleMouseWheel(t){t.preventDefault(),t.deltaY<0?Zoom*=zoomFactor:Zoom/=zoomFactor,setZoom()}function handleMouseMove(t){if(!mouseDownOrTouchActive)return;let e,i=t.clientX,a=t.clientY;e=t.getModifierState("Control")?2:t.getModifierState("Shift")?3:t.getModifierState("Alt")?4:1,processDrag(i,a,e)}let zooming=!1,swipe=!1,rotate=!1;function handleTouchMove(t){if(t.preventDefault(),zooming)return;let e=t.targetTouches;if(!pinch&&1==e.length&&touchId==e[0].identifier){let t=e[0].pageX,i=e[0].pageY,a=t-lastMouseX,r=i-lastMouseY,n=a*a+r*r<=shiftHoldDistance*shiftHoldDistance;if(n&&!swipe&&!rotate&&(new Date).getTime()-touchStartTime>shiftWaitTime&&(navigator.vibrate&&window.navigator.vibrate(vibrateTime),swipe=!0),swipe)processDrag(t,i,2);else if(!n){rotate=!0,processDrag(e[0].pageX,e[0].pageY,1,.5)}}if(pinch&&!swipe&&2==e.length&&touchId==e[0].identifier){let t=pinchDistance(e),i=t-pinchStart;zooming=!0,i*=zoomPinchFactor,i>zoomPinchCap&&(i=zoomPinchCap),i<-zoomPinchCap&&(i=-zoomPinchCap),zoomImage(i/size2),pinchStart=t,swipe=rotate=zooming=!1,setProjection(),draw()}}let pixelShader,materialShader,colorShader,transparentShader,zbuffer=[];function transformVertices(t){let e=viewMat[2],i=viewMat[6],a=viewMat[10];zbuffer.length=t.length;for(let r=0;r<t.length;++r){let n=6*r;zbuffer[r]=e*t[n]+i*t[n+1]+a*t[n+2]}}function drawMaterial0(){drawBuffer(material0Data,pixelShader),material0Data.clear()}function drawMaterial1(){drawBuffer(material1Data,materialShader),material1Data.clear()}function drawMaterial(){drawBuffer(materialData,materialShader),materialData.clear()}function drawColor(){drawBuffer(colorData,colorShader),colorData.clear()}function drawTriangle(){drawBuffer(triangleData,transparentShader),triangleData.rendered=!1,triangleData.clear()}function drawTransparent(){let t=transparentData.indices;if(wireframe>0)return drawBuffer(transparentData,transparentShader,t),void transparentData.clear();if(t.length>0){transformVertices(transparentData.vertices);let e=t.length/3,i=Array(e).fill().map((t,e)=>e);i.sort((function(e,i){let a=3*e;Ia=t[a],Ib=t[a+1],Ic=t[a+2];let r=3*i;return IA=t[r],IB=t[r+1],IC=t[r+2],zbuffer[Ia]+zbuffer[Ib]+zbuffer[Ic]<zbuffer[IA]+zbuffer[IB]+zbuffer[IC]?-1:1}));let a=Array(t.length);for(let r=0;r<e;++r){let e=3*i[r];a[3*r]=t[e],a[3*r+1]=t[e+1],a[3*r+2]=t[e+2]}gl.depthMask(!1),drawBuffer(transparentData,transparentShader,a),transparentData.rendered=!1,gl.depthMask(!0)}transparentData.clear()}function drawBuffers(){drawMaterial0(),drawMaterial1(),drawMaterial(),drawColor(),drawTriangle(),drawTransparent()}function draw(){embedded&&(offscreen.width=canvasWidth,offscreen.height=canvasHeight,setViewport()),gl.clearColor(Background[0],Background[1],Background[2],Background[3]),gl.clear(gl.COLOR_BUFFER_BIT|gl.DEPTH_BUFFER_BIT);for(let t=0;t<P.length;++t)P[t].render();drawBuffers(),embedded&&(context.clearRect(0,0,canvasWidth,canvasHeight),context.drawImage(offscreen,0,0)),0==wireframe&&(remesh=!1)}function setDimensions(t,e,i,a){let r=t/e,n=1/Zoom,s=(i/t+viewportshift[0])*Zoom,o=(a/e+viewportshift[1])*Zoom;if(orthographic){let t=B[0]-b[0],e=B[1]-b[1];if(t<e*r){let t=.5*e*r*n,i=2*t*s,a=e*n*o;viewParam.xmin=-t-i,viewParam.xmax=t-i,viewParam.ymin=b[1]*n-a,viewParam.ymax=B[1]*n-a}else{let e=.5*t/(r*Zoom),i=t*n*s,a=2*e*o;viewParam.xmin=b[0]*n-i,viewParam.xmax=B[0]*n-i,viewParam.ymin=-e-a,viewParam.ymax=e-a}}else{let t=H*n,e=t*r,i=2*e*s,a=2*t*o;viewParam.xmin=-e-i,viewParam.xmax=e-i,viewParam.ymin=-t-a,viewParam.ymax=t-a}}function setProjection(){setDimensions(canvasWidth,canvasHeight,shift.x,shift.y),(orthographic?mat4.ortho:mat4.frustum)(projMat,viewParam.xmin,viewParam.xmax,viewParam.ymin,viewParam.ymax,-viewParam.zmax,-viewParam.zmin),updateViewMatrix()}function initProjection(){H=-Math.tan(.5*angle)*B[2],center.x=center.y=0,center.z=.5*(b[2]+B[2]),lastZoom=Zoom=zoom0,viewParam.zmin=b[2],viewParam.zmax=B[2],shift.x=shift.y=0}function setViewport(){gl.viewportWidth=canvasWidth,gl.viewportHeight=canvasHeight,gl.viewport(.5*(canvas.width-canvasWidth),.5*(canvas.height-canvasHeight),canvasWidth,canvasHeight),gl.scissor(0,0,canvas.width,canvas.height)}function setCanvas(){embedded&&(canvas.width=offscreen.width=canvasWidth,canvas.height=offscreen.height=canvasHeight),size2=Math.hypot(canvasWidth,canvasHeight),halfCanvasWidth=.5*canvas.width,halfCanvasHeight=.5*canvas.height,ArcballFactor=1+8*Math.hypot(viewportmargin[0],viewportmargin[1])/size2}function setsize(t,e){t>maxViewportWidth&&(t=maxViewportWidth),e>maxViewportHeight&&(e=maxViewportHeight),shift.x*=t/canvasWidth,shift.y*=e/canvasHeight,canvasWidth=t,canvasHeight=e,setCanvas(),setViewport(),setProjection(),remesh=!0}function resize(){if(zoom0=Zoom0,absolute&&!embedded)canvasWidth=canvasWidth0*window.devicePixelRatio,canvasHeight=canvasHeight0*window.devicePixelRatio;else{let t=canvasWidth0/canvasHeight0;canvasWidth=Math.max(window.innerWidth-10,10),canvasHeight=Math.max(window.innerHeight-10,10),!orthographic&&canvasWidth<canvasHeight*t&&(zoom0*=canvasWidth/(canvasHeight*t))}canvas.width=canvasWidth,canvas.height=canvasHeight;window.innerWidth,window.innerHeight;viewportshift[0]/=zoom0,viewportshift[1]/=zoom0,setsize(canvasWidth,canvasHeight),redraw()}function expand(){Zoom*=zoomFactor,setZoom()}function shrink(){Zoom/=zoomFactor,setZoom()}class Align{constructor(t,e){if(this.center=t,e){let t=e[0],i=e[1];this.ct=Math.cos(t),this.st=Math.sin(t),this.cp=Math.cos(i),this.sp=Math.sin(i)}}T0(t){return[t[0]+this.center[0],t[1]+this.center[1],t[2]+this.center[2]]}T(t){let e=t[0],i=t[1],a=t[2],r=e*this.ct+a*this.st;return[r*this.cp-i*this.sp+this.center[0],r*this.sp+i*this.cp+this.center[1],-e*this.st+a*this.ct+this.center[2]]}}function Tcorners(t,e,i){let a=[t(e),t([e[0],e[1],i[2]]),t([e[0],i[1],e[2]]),t([e[0],i[1],i[2]]),t([i[0],e[1],e[2]]),t([i[0],e[1],i[2]]),t([i[0],i[1],e[2]]),t(i)];return[minbound(a),maxbound(a)]}function sphere(t,e,i,r,n){let s,o,h,l,c,d,m=.524670512339254,f=.595936986722291,u=.954967051233925,p=.0820155480083437,v=.996685028842544,g=.0549670512339254,x=.998880711874577,w=.0405017186586849,M=[[[1,0,0],[1,0,m],[f,0,u],[p,0,v],[1,a,0],[1,a,m],[f,a*f,u],[p,a*p,v],[a,1,0],[a,1,m],[a*f,f,u],[a*p,p,v],[0,1,0],[0,1,m],[0,f,u],[0,p,v]],[[p,0,v],[p,a*p,v],[g,0,x],[a*p,p,v],[w,w,1],[.05*a,0,1],[0,p,v],[0,g,x],[0,.05*a,1],[0,0,1]]],b=new Align(t,n);function S(t){let e=Array(t.length);for(let i=0;i<t.length;++i){let a=t[i];e[i]=c([s*a[0],o*a[1],h*a[2]])}return e}n?(l=1,d=0,c=b.T.bind(b)):(l=-1,d=-e,c=b.T0.bind(b));let A=Tcorners(c,[-e,-e,d],[e,e,e]),y=A[0],T=A[1];for(let t=-1;t<=1;t+=2){s=t*e;for(let t=-1;t<=1;t+=2){o=t*e;for(let t=l;t<=1;t+=2){h=t*e;for(let t=0;t<2;++t)P.push(new BezierPatch(S(M[t]),i,r,y,T))}}}}let a=4/3*(Math.sqrt(2)-1);function disk(t,e,i,r,n){let s=1-2*a/3,o=[[1,0,0],[1,-a,0],[a,-1,0],[0,-1,0],[1,a,0],[s,0,0],[0,-s,0],[-a,-1,0],[a,1,0],[0,s,0],[-s,0,0],[-1,-a,0],[0,1,0],[-a,1,0],[-1,a,0],[-1,0,0]],h=new Align(t,n);let l=Tcorners(h.T.bind(h),[-e,-e,0],[e,e,0]);P.push(new BezierPatch(function(t){let i=Array(t.length);for(let a=0;a<t.length;++a){let r=t[a];i[a]=h.T([e*r[0],e*r[1],0])}return i}(o),i,r,l[0],l[1]))}function cylinder(t,e,i,r,n,s,o){let h,l,c=[[1,0,0],[1,0,1/3],[1,0,2/3],[1,0,1],[1,a,0],[1,a,1/3],[1,a,2/3],[1,a,1],[a,1,0],[a,1,1/3],[a,1,2/3],[a,1,1],[0,1,0],[0,1,1/3],[0,1,2/3],[0,1,1]],d=new Align(t,s);function m(t){let e=Array(t.length);for(let a=0;a<t.length;++a){let r=t[a];e[a]=d.T([h*r[0],l*r[1],i*r[2]])}return e}let f=Tcorners(d.T.bind(d),[-e,-e,0],[e,e,i]),u=f[0],p=f[1];for(let t=-1;t<=1;t+=2){h=t*e;for(let t=-1;t<=1;t+=2)l=t*e,P.push(new BezierPatch(m(c),r,n,u,p))}if(o){let e=d.T([0,0,i]);P.push(new BezierCurve([t,e],r,n,t,e))}}function rmf(t,e,i,a,r){class n{constructor(t,e,i){this.p=t,this.r=e,this.t=i,this.s=cross(i,e)}}let s=Number.EPSILON*Math.max(abs2(t),abs2(e),abs2(i),abs2(a));function o(r){if(1==r){let r=[a[0]-i[0],a[1]-i[1],a[2]-i[2]];return abs2(r)>s?unit(r):(r=[2*i[0]-e[0]-a[0],2*i[1]-e[1]-a[1],2*i[2]-e[2]-a[2]],abs2(r)>s?unit(r):[a[0]-t[0]+3*(e[0]-i[0]),a[1]-t[1]+3*(e[1]-i[1]),a[2]-t[2]+3*(e[2]-i[2])])}let n=[a[0]-t[0]+3*(e[0]-i[0]),a[1]-t[1]+3*(e[1]-i[1]),a[2]-t[2]+3*(e[2]-i[2])],o=[2*(t[0]+i[0])-4*e[0],2*(t[1]+i[1])-4*e[1],2*(t[2]+i[2])-4*e[2]],h=[e[0]-t[0],e[1]-t[1],e[2]-t[2]],l=r*r,c=[n[0]*l+o[0]*r+h[0],n[1]*l+o[1]*r+h[1],n[2]*l+o[2]*r+h[2]];return abs2(c)>s?unit(c):(l=2*r,c=[n[0]*l+o[0],n[1]*l+o[1],n[2]*l+o[2]],abs2(c)>s?unit(c):unit(n))}let h=Array(r.length),l=[e[0]-t[0],e[1]-t[1],e[2]-t[2]];abs2(l)<s&&(l=[t[0]-2*e[0]+i[0],t[1]-2*e[1]+i[1],t[2]-2*e[2]+i[2]],abs2(l)<s&&(l=[a[0]-t[0]+3*(e[0]-i[0]),a[1]-t[1]+3*(e[1]-i[1]),a[2]-t[2]+3*(e[2]-i[2])])),l=unit(l);let c=function(t){let e=cross(t,[0,1,0]),i=Number.EPSILON*abs2(t);return abs2(e)>i?unit(e):(e=cross(t,[0,0,1]),abs2(e)>i?unit(e):[1,0,0])}(l);h[0]=new n(t,c,l);for(let s=1;s<r.length;++s){let l=h[s-1],c=r[s],d=1-c,m=d*d,f=m*d,u=3*c;m*=u,d*=u*c;let p=c*c*c,v=[f*t[0]+m*e[0]+d*i[0]+p*a[0],f*t[1]+m*e[1]+d*i[1]+p*a[1],f*t[2]+m*e[2]+d*i[2]+p*a[2]],g=[v[0]-l.p[0],v[1]-l.p[1],v[2]-l.p[2]];if(0!=g[0]||0!=g[1]||0!=g[2]){let t=l.r,e=unit(g),i=l.t,a=dot(e,i),r=[i[0]-2*a*e[0],i[1]-2*a*e[1],i[2]-2*a*e[2]];i=o(c);let d=2*dot(e,t),m=[t[0]-d*e[0],t[1]-d*e[1],t[2]-d*e[2]],f=unit([i[0]-r[0],i[1]-r[1],i[2]-r[2]]),u=2*dot(f,m);m=[m[0]-u*f[0],m[1]-u*f[1],m[2]-u*f[2]],h[s]=new n(v,unit(m),unit(i))}else h[s]=h[s-1]}return h}function tube(t,e,i,r,n,s,o){let h=rmf(t[0],t[1],t[2],t[3],[0,1/3,2/3,1]),l=a*e,c=[[e,0],[e,l],[l,e],[0,e]];function d(e,a,o,l){let d=Array(16);for(let i=0;i<4;++i){let r=h[i],n=r.r[0],s=r.s[0],m=n*e+s*a,f=n*o+s*l;n=r.r[1],s=r.s[1];let u=n*e+s*a,p=n*o+s*l;n=r.r[2],s=r.s[2];let v=n*e+s*a,g=n*o+s*l,x=t[i],w=x[0];w1=x[1],w2=x[2];for(let t=0;t<4;++t){let e=c[t],a=e[0],r=e[1];d[4*i+t]=[m*a+f*r+w,u*a+p*r+w1,v*a+g*r+w2]}}P.push(new BezierPatch(d,i,r,n,s))}d(1,0,0,1),d(0,-1,1,0),d(-1,0,0,-1),d(0,1,-1,0),o&&P.push(new BezierCurve(t,i,r,n,s))}function webGLStart(){canvas=document.getElementById("Asymptote"),embedded=window.top.document!=document,initGL(),gl.enable(gl.BLEND),gl.blendFunc(gl.SRC_ALPHA,gl.ONE_MINUS_SRC_ALPHA),gl.enable(gl.DEPTH_TEST),gl.enable(gl.SCISSOR_TEST),canvas.onmousedown=handleMouseDown,document.onmouseup=handleMouseUpOrTouchEnd,document.onmousemove=handleMouseMove,canvas.onkeydown=handleKey,embedded||enableZoom(),canvas.addEventListener("touchstart",handleTouchStart,!1),canvas.addEventListener("touchend",handleMouseUpOrTouchEnd,!1),canvas.addEventListener("touchcancel",handleMouseUpOrTouchEnd,!1),canvas.addEventListener("touchleave",handleMouseUpOrTouchEnd,!1),canvas.addEventListener("touchmove",handleTouchMove,!1),document.addEventListener("keydown",handleKey,!1),canvasWidth0=canvasWidth,canvasHeight0=canvasHeight,mat4.identity(rotMat),0!=window.innerWidth&&0!=window.innerHeight&&resize(),window.addEventListener("resize",resize,!1)}
diff --git a/Build/source/utils/asymptote/bbox.h b/Build/source/utils/asymptote/bbox.h
index dcb4d98b758..3edbe45d7e2 100644
--- a/Build/source/utils/asymptote/bbox.h
+++ b/Build/source/utils/asymptote/bbox.h
@@ -19,7 +19,7 @@ inline T min(T a, T b)
return (a < b) ? a : b;
}
-template<class T>
+template<class T>
inline T max(T a, T b)
{
return (a > b) ? a : b;
@@ -32,7 +32,7 @@ struct bbox {
double bottom;
double right;
double top;
-
+
// Start bbox about the origin
bbox()
: empty(true), left(0.0), bottom(0.0), right(0.0), top(0.0)
@@ -54,7 +54,7 @@ struct bbox {
bool nonempty() const {
return !empty;
}
-
+
// Add a point to a bbox
bbox add(const pair& z)
{
@@ -67,9 +67,9 @@ struct bbox {
}
else {
if (x < left)
- left = x;
+ left = x;
else if (x > right)
- right = x;
+ right = x;
if (y < bottom)
bottom = y;
else if (y > top)
@@ -84,9 +84,9 @@ struct bbox {
{
double x = z.getx(), y = z.gety();
if (x < left)
- left = x;
+ left = x;
else if (x > right)
- right = x;
+ right = x;
if (y < bottom)
bottom = y;
else if (y > top)
@@ -99,11 +99,11 @@ struct bbox {
double x = z.getx(), y = z.gety();
if (x < left) {
- left = x;
+ left = x;
times.left = t;
}
else if (x > right) {
- right = x;
+ right = x;
times.right = t;
}
if (y < bottom) {
@@ -170,34 +170,34 @@ struct bbox {
right = min(right, b.right);
bottom = max(bottom, b.bottom);
top = min(top, b.top);
- if(left > right || bottom > top)
+ if(left > right || bottom > top)
*this=bbox();
}
-
+
void shift(const pair& p) {
left += p.getx();
right += p.getx();
bottom += p.gety();
top += p.gety();
}
-
+
pair Min() const {
return pair(left,bottom);
}
-
+
pair Max() const {
return pair(right,top);
}
-
+
double diameter() {
return (Max()-Min()).length();
}
-
+
bbox LowRes() const
{
return bbox(floor(left),floor(bottom),ceil(right),ceil(top));
}
-
+
friend ostream& operator<< (ostream& out, const bbox& b)
{
out << b.left << " " << b.bottom << " " << b.right << " " << b.top;
diff --git a/Build/source/utils/asymptote/bbox3.h b/Build/source/utils/asymptote/bbox3.h
index aa502516377..e2428f8c001 100644
--- a/Build/source/utils/asymptote/bbox3.h
+++ b/Build/source/utils/asymptote/bbox3.h
@@ -25,7 +25,7 @@ struct bbox3 {
double right;
double top;
double far;
-
+
// Start bbox3 about the origin
bbox3()
: empty(true), left(0.0), bottom(0.0), near(0.0),
@@ -60,7 +60,7 @@ struct bbox3 {
right(M.getx()), top(M.gety()), far(M.getz())
{
}
-
+
// Add a point to a bbox3
void add(const triple& v)
{
@@ -77,9 +77,9 @@ struct bbox3 {
}
else {
if(x < left)
- left = x;
+ left = x;
else if(x > right)
- right = x;
+ right = x;
if(y < bottom)
bottom = y;
else if(y > top)
@@ -95,9 +95,9 @@ struct bbox3 {
void addnonempty(double x, double y, double z)
{
if(x < left)
- left = x;
+ left = x;
else if(x > right)
- right = x;
+ right = x;
if(y < bottom)
bottom = y;
else if(y > top)
@@ -113,9 +113,9 @@ struct bbox3 {
{
double x=v.getx();
if(x < left)
- left = x;
+ left = x;
else if(x > right)
- right = x;
+ right = x;
double y=v.gety();
if(y < bottom)
bottom = y;
@@ -135,11 +135,11 @@ struct bbox3 {
double x = v.getx(), y = v.gety(), z = v.getz();
if(x < left) {
- left = x;
+ left = x;
times.left = t;
}
else if(x > right) {
- right = x;
+ right = x;
times.right = t;
}
if(y < bottom) {
@@ -169,25 +169,25 @@ struct bbox3 {
triple Min() const {
return triple(left,bottom,near);
}
-
+
triple Max() const {
return triple(right,top,far);
}
-
+
pair Min2() const {
return pair(left,bottom);
}
-
+
pair Max2() const {
return pair(right,top);
}
-
+
friend ostream& operator << (ostream& out, const bbox3& b)
{
out << "Min " << b.Min() << " Max " << b.Max();
return out;
}
-
+
};
} // namespace camp
diff --git a/Build/source/utils/asymptote/beziercurve.cc b/Build/source/utils/asymptote/beziercurve.cc
index 9a5eee79f23..f3a675ce9ca 100644
--- a/Build/source/utils/asymptote/beziercurve.cc
+++ b/Build/source/utils/asymptote/beziercurve.cc
@@ -16,7 +16,7 @@ void BezierCurve::init(double res)
{
this->res=res;
res2=res*res;
-
+
MaterialIndex=materialIndex;
}
@@ -25,7 +25,7 @@ inline triple normal(triple bP, triple bPP)
return dot(bP,bP)*bPP-dot(bP,bPP)*bP;
}
-void BezierCurve::render(const triple *p, bool straight)
+void BezierCurve::render(const triple *p, bool straight)
{
triple p0=p[0];
triple p3=p[3];
@@ -52,7 +52,7 @@ void BezierCurve::render(const triple *p, bool straight)
render(p,i0,i3);
append();
}
-
+
// Use a uniform partition to draw a Bezier curve.
// p is an array of 4 triples representing the control points.
// Ii are the vertex indices.
@@ -77,13 +77,13 @@ void BezierCurve::render(const triple *p, GLuint I0, GLuint I1)
triple m3=0.5*(m0+m1);
triple m4=0.5*(m1+m2);
triple m5=0.5*(m3+m4);
-
+
triple s0[]={p0,m0,m3,m5};
triple s1[]={m5,m4,m2,p3};
-
+
triple n0=normal(bezierPh(p0,p1,p2,p3),bezierPPh(p0,p1,p2,p3));
GLuint i0=data.vertex(m5,n0);
-
+
render(s0,I0,i0);
render(s1,i0,I1);
}
diff --git a/Build/source/utils/asymptote/beziercurve.h b/Build/source/utils/asymptote/beziercurve.h
index 0ac07653e7b..833da4db277 100644
--- a/Build/source/utils/asymptote/beziercurve.h
+++ b/Build/source/utils/asymptote/beziercurve.h
@@ -22,9 +22,9 @@ struct BezierCurve
vertexBuffer data;
double res,res2;
bool Onscreen;
-
+
void init(double res);
-
+
// Approximate bounds by bounding box of control polyhedron.
bool offscreen(size_t n, const triple *v) {
if(bbox2(n,v).offscreen()) {
@@ -36,35 +36,40 @@ struct BezierCurve
void render(const triple *p, bool straight);
void render(const triple *p, GLuint I0, GLuint I1);
-
+
void append() {
material1Data.append(data);
}
-
+
+ void notRendered() {
+ material1Data.rendered=false;
+ }
+
void queue(const triple *g, bool straight, double ratio) {
data.clear();
+ notRendered();
Onscreen=true;
init(pixel*ratio);
render(g,straight);
}
-
+
};
struct Pixel
{
vertexBuffer data;
-
+
void append() {
material0Data.append0(data);
}
-
+
void queue(const triple& p, double width) {
data.clear();
MaterialIndex=materialIndex;
data.indices.push_back(data.vertex0(p,width));
append();
}
-
+
void draw();
};
diff --git a/Build/source/utils/asymptote/bezierpatch.cc b/Build/source/utils/asymptote/bezierpatch.cc
index bcdd238cca3..314ac948093 100644
--- a/Build/source/utils/asymptote/bezierpatch.cc
+++ b/Build/source/utils/asymptote/bezierpatch.cc
@@ -54,12 +54,12 @@ std::vector<iz> IZ;
const double FillFactor=0.1;
-inline int sgn1(double x)
+inline int sgn1(double x)
{
return x >= 0.0 ? 1 : -1;
}
-inline int sgn(double x)
+inline int sgn(double x)
{
return (x > 0.0 ? 1 : (x < 0.0 ? -1 : 0));
}
@@ -94,7 +94,7 @@ bool pierce(const double *a, const double *b, const double *c, const double *A,
int sa=sgn(orient3d(A,b,c,B));
int sb=sgn(orient3d(A,c,a,B));
int sc=sgn(orient3d(A,a,b,B));
- return sa == sb && sb == sc;
+ return sa == sb && sb == sc;
}
// returns true iff triangle abc is pierced by an edge of triangle ABC
@@ -114,7 +114,7 @@ bool intersect0(const double *a, const double *b, const double *c,
if(pierce(a,b,c,C,A)) return true;
}
return false;
-}
+}
// returns true iff triangle abc intersects triangle ABC
bool intersect3D(const double *a, const double *b, const double *c,
@@ -142,7 +142,7 @@ inline double intersect(const double *P, const double *Q, const double *n,
double denom=n[0]*(Q[0]-P[0])+n[1]*(Q[1]-P[1])+n[2]*(Q[2]-P[2]);
return denom == 0 ? DBL_MAX : (d-n[0]*P[0]-n[1]*P[1]-n[2]*P[2])/denom;
}
-
+
inline triple interp(const double *a, const double *b, double t)
{
return triple(a[0]+t*(b[0]-a[0]),a[1]+t*(b[1]-a[1]),a[2]+t*(b[2]-a[2]));
@@ -163,7 +163,7 @@ inline triple interp(const triple& a, const triple& b, double t)
unsigned n;
unsigned int count;
-
+
// Sort nonintersecting triangles by depth.
int compare(const void *p, const void *P)
{
@@ -174,29 +174,29 @@ int compare(const void *p, const void *P)
unsigned IA=((GLuint *) P)[0];
unsigned IB=((GLuint *) P)[1];
unsigned IC=((GLuint *) P)[2];
-
- return zbuffer[Ia]+zbuffer[Ib]+zbuffer[Ic] <
+
+ return zbuffer[Ia]+zbuffer[Ib]+zbuffer[Ic] <
zbuffer[IA]+zbuffer[IB]+zbuffer[IC] ? -1 : 1;
-
+
/*
- double a[]={xbuffer[Ia],ybuffer[Ia],zbuffer[Ia]};
- double b[]={xbuffer[Ib],ybuffer[Ib],zbuffer[Ib]};
- double c[]={xbuffer[Ic],ybuffer[Ic],zbuffer[Ic]};
-
- double A[]={xbuffer[IA],ybuffer[IA],zbuffer[IA]};
- double B[]={xbuffer[IB],ybuffer[IB],zbuffer[IB]};
- double C[]={xbuffer[IC],ybuffer[IC],zbuffer[IC]};
-
- double viewpoint[]={0,0,100000};
-
- double sa=-orient3d(A,B,C,a);
- double sb=-orient3d(A,B,C,b);
- double sc=-orient3d(A,B,C,c);
- double s=min(sa,sb,sc);
- double S=max(sa,sb,sc);
- double eps=1000;
-
- if(s < -eps && S > eps) { //swap
+ double a[]={xbuffer[Ia],ybuffer[Ia],zbuffer[Ia]};
+ double b[]={xbuffer[Ib],ybuffer[Ib],zbuffer[Ib]};
+ double c[]={xbuffer[Ic],ybuffer[Ic],zbuffer[Ic]};
+
+ double A[]={xbuffer[IA],ybuffer[IA],zbuffer[IA]};
+ double B[]={xbuffer[IB],ybuffer[IB],zbuffer[IB]};
+ double C[]={xbuffer[IC],ybuffer[IC],zbuffer[IC]};
+
+ double viewpoint[]={0,0,100000};
+
+ double sa=-orient3d(A,B,C,a);
+ double sb=-orient3d(A,B,C,b);
+ double sc=-orient3d(A,B,C,c);
+ double s=min(sa,sb,sc);
+ double S=max(sa,sb,sc);
+ double eps=1000;
+
+ if(s < -eps && S > eps) { //swap
double sA=-orient3d(a,b,c,A);
double sB=-orient3d(a,b,c,B);
double sC=-orient3d(a,b,c,C);
@@ -206,12 +206,12 @@ int compare(const void *p, const void *P)
int sz=sgn1(orient3d(a,b,c,viewpoint));
if(S < -eps) return -sz;
if(S > eps) return sz;
- }
- if(S < -s) S=s;
- int sz=sgn1(orient3d(A,B,C,viewpoint));
- if(S < -eps) return sz;
- if(S > eps) return -sz;
- return a[2]+b[2]+c[2] < A[2]+B[2]+C[2] ? -1 : 1;
+ }
+ if(S < -s) S=s;
+ int sz=sgn1(orient3d(A,B,C,viewpoint));
+ if(S < -eps) return sz;
+ if(S > eps) return -sz;
+ return a[2]+b[2]+c[2] < A[2]+B[2]+C[2] ? -1 : 1;
*/
}
@@ -220,47 +220,47 @@ void split(unsigned i3, GLuint ia, GLuint ib, GLuint ic,
double *a, double *b, double *c, double *N, double *A) {
double td=intersect(a,b,N,A);
double te=intersect(a,c,N,A);
-
+
triple d=interp(a,b,td);
triple e=interp(a,c,te);
-
+
GLuint Ia=tstride*ia;
GLuint Ib=tstride*ib;
GLuint Ic=tstride*ic;
-
+
triple na=triple(V[Ia+3],V[Ia+4],V[Ia+5]);
triple nb=triple(V[Ib+3],V[Ib+4],V[Ib+5]);
triple nc=triple(V[Ic+3],V[Ic+4],V[Ic+5]);
-
+
triple nd=interp(na,nb,td);
triple ne=interp(na,nc,te);
-
+
GLuint id,ie;
-
+
if(colors) {
GLfloat *ca=&V[Ia+6];
GLfloat *cb=&V[Ib+6];
GLfloat *cc=&V[Ic+6];
-
+
GLfloat cd[4],ce[4];
interp(cd,ca,cb,td);
interp(ce,ca,cc,te);
-
+
id=data.Vertex(d,nd,cd);
ie=data.Vertex(e,ne,ce);
} else {
id=data.Vertex(d,nd);
ie=data.Vertex(e,ne);
}
-
+
I[i3]=ia;
I[i3+1]=id;
I[i3+2]=ie;
-
+
I.push_back(id);
I.push_back(ib);
I.push_back(ie);
-
+
I.push_back(ie);
I.push_back(ib);
I.push_back(ic);
@@ -274,10 +274,10 @@ void BezierPatch::init(double res)
MaterialIndex=transparent ?
(color ? -1-materialIndex : 1+materialIndex) : materialIndex;
-
+
pvertex=transparent ? &vertexBuffer::tvertex : &vertexBuffer::vertex;
}
-
+
void BezierPatch::render(const triple *p, bool straight, GLfloat *c0)
{
triple p0=p[0];
@@ -285,7 +285,7 @@ void BezierPatch::render(const triple *p, bool straight, GLfloat *c0)
for(unsigned i=1; i < 16; ++i)
epsilon=max(epsilon,abs2(p[i]-p0));
epsilon *= DBL_EPSILON;
-
+
triple p3=p[3];
triple p12=p[12];
triple p15=p[15];
@@ -295,36 +295,36 @@ void BezierPatch::render(const triple *p, bool straight, GLfloat *c0)
n0=normal(p3,p[2],p[1],p0,p[13],p[14],p15);
if(abs2(n0) <= epsilon) n0=normal(p15,p[11],p[7],p3,p[4],p[8],p12);
}
-
+
triple n1=normal(p0,p[4],p[8],p12,p[13],p[14],p15);
if(abs2(n1) <= epsilon) {
n1=normal(p0,p[4],p[8],p12,p[11],p[7],p3);
if(abs2(n1) <= epsilon) n1=normal(p3,p[2],p[1],p0,p[13],p[14],p15);
}
-
+
triple n2=normal(p12,p[13],p[14],p15,p[11],p[7],p3);
if(abs2(n2) <= epsilon) {
n2=normal(p12,p[13],p[14],p15,p[2],p[1],p0);
if(abs2(n2) <= epsilon) n2=normal(p0,p[4],p[8],p12,p[11],p[7],p3);
}
-
+
triple n3=normal(p15,p[11],p[7],p3,p[2],p[1],p0);
if(abs2(n3) <= epsilon) {
n3=normal(p15,p[11],p[7],p3,p[4],p[8],p12);
if(abs2(n3) <= epsilon) n3=normal(p12,p[13],p[14],p15,p[2],p[1],p0);
}
-
+
GLuint i0,i1,i2,i3;
if(color) {
GLfloat *c1=c0+4;
GLfloat *c2=c0+8;
GLfloat *c3=c0+12;
-
+
i0=data.Vertex(p0,n0,c0);
i1=data.Vertex(p12,n1,c1);
i2=data.Vertex(p15,n2,c2);
i3=data.Vertex(p3,n3,c3);
-
+
if(!straight)
render(p,i0,i1,i2,i3,p0,p12,p15,p3,false,false,false,false,
c0,c1,c2,c3);
@@ -333,11 +333,11 @@ void BezierPatch::render(const triple *p, bool straight, GLfloat *c0)
i1=(data.*pvertex)(p12,n1);
i2=(data.*pvertex)(p15,n2);
i3=(data.*pvertex)(p3,n3);
-
+
if(!straight)
render(p,i0,i1,i2,i3,p0,p12,p15,p3,false,false,false,false);
}
-
+
if(straight) {
std::vector<GLuint> &q=data.indices;
triple Pa[]={p0,p12,p15};
@@ -382,14 +382,14 @@ void BezierPatch::render(const triple *p,
q.push_back(I3);
}
} else { // Patch is not flat
- if(offscreen(16,p)) return;
+ if(offscreen(16,p)) return;
- /* Control points are indexed as follows:
+ /* Control points are indexed as follows:
- Coordinate
+ Coordinate
+-----
Index
-
+
03 13 23 33
+-----+-----+-----+
|3 |7 |11 |15
@@ -406,216 +406,215 @@ void BezierPatch::render(const triple *p,
+-----+-----+-----+
0 4 8 12
- */
+ */
triple p0=p[0];
triple p3=p[3];
triple p12=p[12];
triple p15=p[15];
- if(d.getx() < res2) { // flat in horizontal direction; split vertically
- /*
- P refers to a corner
- m refers to a midpoint
- s refers to a subpatch
-
- +--------+--------+
- |P3 P2|
- | |
- | s1 |
- | |
- | |
- m1 +-----------------+ m0
- | |
- | |
- | s0 |
- | |
- |P0 P1|
- +-----------------+
-
- */
-
- Split3 c0(p0,p[1],p[2],p3);
- Split3 c1(p[4],p[5],p[6],p[7]);
- Split3 c2(p[8],p[9],p[10],p[11]);
- Split3 c3(p12,p[13],p[14],p15);
-
- triple s0[]={p0 ,c0.m0,c0.m3,c0.m5,
- p[4],c1.m0,c1.m3,c1.m5,
- p[8],c2.m0,c2.m3,c2.m5,
- p12 ,c3.m0,c3.m3,c3.m5};
-
- triple s1[]={c0.m5,c0.m4,c0.m2,p3,
- c1.m5,c1.m4,c1.m2,p[7],
- c2.m5,c2.m4,c2.m2,p[11],
- c3.m5,c3.m4,c3.m2,p15};
-
- triple n0=normal(s0[12],s0[13],s0[14],s0[15],s0[11],s0[7],s0[3]);
- if(abs2(n0) <= epsilon) {
- n0=normal(s0[12],s0[13],s0[14],s0[15],s0[2],s0[1],s0[0]);
- if(abs2(n0) <= epsilon)
- n0=normal(s0[0],s0[4],s0[8],s0[12],s0[11],s0[7],s0[3]);
- }
-
- triple n1=normal(s1[3],s1[2],s1[1],s1[0],s1[4],s1[8],s1[12]);
- if(abs2(n1) <= epsilon) {
- n1=normal(s1[3],s1[2],s1[1],s1[0],s1[13],s1[14],s1[15]);
- if(abs2(n1) <= epsilon)
- n1=normal(s1[15],s1[11],s1[7],s1[3],s1[4],s1[8],s1[12]);
- }
-
- // A kludge to remove subdivision cracks, only applied the first time
- // an edge is found to be flat before the rest of the subpatch is.
-
- triple m0=0.5*(P1+P2);
- if(!flat1) {
- if((flat1=Straightness(p12,p[13],p[14],p15) < res2))
- m0 -= Epsilon*unit(differential(s1[12],s1[8],s1[4],s1[0]));
- else m0=s0[15];
- }
-
- triple m1=0.5*(P3+P0);
- if(!flat3) {
- if((flat3=Straightness(p0,p[1],p[2],p3) < res2))
- m1 -= Epsilon*unit(differential(s0[3],s0[7],s0[11],s0[15]));
- else m1=s1[0];
- }
-
- if(color) {
- GLfloat c0[4],c1[4];
- for(size_t i=0; i < 4; ++i) {
- c0[i]=0.5*(C1[i]+C2[i]);
- c1[i]=0.5*(C3[i]+C0[i]);
- }
-
- GLuint i0=data.Vertex(m0,n0,c0);
- GLuint i1=data.Vertex(m1,n1,c1);
-
- render(s0,I0,I1,i0,i1,P0,P1,m0,m1,flat0,flat1,false,flat3,C0,C1,c0,c1);
- render(s1,i1,i0,I2,I3,m1,m0,P2,P3,false,flat1,flat2,flat3,c1,c0,C2,C3);
- } else {
- GLuint i0=(data.*pvertex)(m0,n0);
- GLuint i1=(data.*pvertex)(m1,n1);
-
- render(s0,I0,I1,i0,i1,P0,P1,m0,m1,flat0,flat1,false,flat3);
- render(s1,i1,i0,I2,I3,m1,m0,P2,P3,false,flat1,flat2,flat3);
- }
- return;
- }
- if(d.gety() < res2) { // flat in vertical direction; split horizontally
- /*
- P refers to a corner
- m refers to a midpoint
- s refers to a subpatch
-
- m1
- +--------+--------+
- |P3 | P2|
- | | |
- | | |
- | | |
- | | |
- | s0 | s1 |
- | | |
- | | |
- | | |
- | | |
- |P0 | P1|
- +--------+--------+
- m0
-
- */
-
- Split3 c0(p0,p[4],p[8],p12);
- Split3 c1(p[1],p[5],p[9],p[13]);
- Split3 c2(p[2],p[6],p[10],p[14]);
- Split3 c3(p3,p[7],p[11],p15);
-
- triple s0[]={p0,p[1],p[2],p3,
- c0.m0,c1.m0,c2.m0,c3.m0,
- c0.m3,c1.m3,c2.m3,c3.m3,
- c0.m5,c1.m5,c2.m5,c3.m5};
-
- triple s1[]={c0.m5,c1.m5,c2.m5,c3.m5,
- c0.m4,c1.m4,c2.m4,c3.m4,
- c0.m2,c1.m2,c2.m2,c3.m2,
- p12,p[13],p[14],p15};
-
- triple n0=normal(s0[0],s0[4],s0[8],s0[12],s0[13],s0[14],s0[15]);
- if(abs2(n0) <= epsilon) {
- n0=normal(s0[0],s0[4],s0[8],s0[12],s0[11],s0[7],s0[3]);
- if(abs2(n0) <= epsilon)
- n0=normal(s0[3],s0[2],s0[1],s0[0],s0[13],s0[14],s0[15]);
- }
-
- triple n1=normal(s1[15],s1[11],s1[7],s1[3],s1[2],s1[1],s1[0]);
- if(abs2(n1) <= epsilon) {
- n1=normal(s1[15],s1[11],s1[7],s1[3],s1[4],s1[8],s1[12]);
- if(abs2(n1) <= epsilon)
- n1=normal(s1[12],s1[13],s1[14],s1[15],s1[2],s1[1],s1[0]);
- }
-
- // A kludge to remove subdivision cracks, only applied the first time
- // an edge is found to be flat before the rest of the subpatch is.
-
- triple m0=0.5*(P0+P1);
- if(!flat0) {
- if((flat0=Straightness(p0,p[4],p[8],p12) < res2))
- m0 -= Epsilon*unit(differential(s1[0],s1[1],s1[2],s1[3]));
- else m0=s0[12];
- }
-
- triple m1=0.5*(P2+P3);
- if(!flat2) {
- if((flat2=Straightness(p15,p[11],p[7],p3) < res2))
- m1 -= Epsilon*unit(differential(s0[15],s0[14],s0[13],s0[12]));
- else m1=s1[3];
- }
-
- if(color) {
- GLfloat c0[4],c1[4];
- for(size_t i=0; i < 4; ++i) {
- c0[i]=0.5*(C0[i]+C1[i]);
- c1[i]=0.5*(C2[i]+C3[i]);
- }
-
- GLuint i0=data.Vertex(m0,n0,c0);
- GLuint i1=data.Vertex(m1,n1,c1);
-
- render(s0,I0,i0,i1,I3,P0,m0,m1,P3,flat0,false,flat2,flat3,C0,c0,c1,C3);
- render(s1,i0,I1,I2,i1,m0,P1,P2,m1,flat0,flat1,flat2,false,c0,C1,C2,c1);
- } else {
- GLuint i0=(data.*pvertex)(m0,n0);
- GLuint i1=(data.*pvertex)(m1,n1);
-
- render(s0,I0,i0,i1,I3,P0,m0,m1,P3,flat0,false,flat2,flat3);
- render(s1,i0,I1,I2,i1,m0,P1,P2,m1,flat0,flat1,flat2,false);
- }
- return;
- }
- /*
- Horizontal and vertical subdivision:
- P refers to a corner
- m refers to a midpoint
- s refers to a subpatch
-
- m2
- +--------+--------+
- |P3 | P2|
- | | |
- | s3 | s2 |
- | | |
- | | m4 |
- m3 +--------+--------+ m1
- | | |
- | | |
- | s0 | s1 |
- | | |
- |P0 | P1|
- +--------+--------+
- m0
+ if(d.getx() < res2) { // flat in horizontal direction; split vertically
+ /*
+ P refers to a corner
+ m refers to a midpoint
+ s refers to a subpatch
+
+ +--------+--------+
+ |P3 P2|
+ | |
+ | s1 |
+ | |
+ | |
+ m1 +-----------------+ m0
+ | |
+ | |
+ | s0 |
+ | |
+ |P0 P1|
+ +-----------------+
+
+ */
+
+ Split3 c0(p0,p[1],p[2],p3);
+ Split3 c1(p[4],p[5],p[6],p[7]);
+ Split3 c2(p[8],p[9],p[10],p[11]);
+ Split3 c3(p12,p[13],p[14],p15);
+
+ triple s0[]={p0 ,c0.m0,c0.m3,c0.m5,
+ p[4],c1.m0,c1.m3,c1.m5,
+ p[8],c2.m0,c2.m3,c2.m5,
+ p12 ,c3.m0,c3.m3,c3.m5};
+
+ triple s1[]={c0.m5,c0.m4,c0.m2,p3,
+ c1.m5,c1.m4,c1.m2,p[7],
+ c2.m5,c2.m4,c2.m2,p[11],
+ c3.m5,c3.m4,c3.m2,p15};
+
+ triple n0=normal(s0[12],s0[13],s0[14],s0[15],s0[11],s0[7],s0[3]);
+ if(abs2(n0) <= epsilon) {
+ n0=normal(s0[12],s0[13],s0[14],s0[15],s0[2],s0[1],s0[0]);
+ if(abs2(n0) <= epsilon)
+ n0=normal(s0[0],s0[4],s0[8],s0[12],s0[11],s0[7],s0[3]);
+ }
+
+ triple n1=normal(s1[3],s1[2],s1[1],s1[0],s1[4],s1[8],s1[12]);
+ if(abs2(n1) <= epsilon) {
+ n1=normal(s1[3],s1[2],s1[1],s1[0],s1[13],s1[14],s1[15]);
+ if(abs2(n1) <= epsilon)
+ n1=normal(s1[15],s1[11],s1[7],s1[3],s1[4],s1[8],s1[12]);
+ }
+
+ // A kludge to remove subdivision cracks, only applied the first time
+ // an edge is found to be flat before the rest of the subpatch is.
+
+ triple m0=0.5*(P1+P2);
+ if(!flat1) {
+ if((flat1=Straightness(p12,p[13],p[14],p15) < res2))
+ m0 -= Epsilon*unit(differential(s1[12],s1[8],s1[4],s1[0]));
+ else m0=s0[15];
+ }
+
+ triple m1=0.5*(P3+P0);
+ if(!flat3) {
+ if((flat3=Straightness(p0,p[1],p[2],p3) < res2))
+ m1 -= Epsilon*unit(differential(s0[3],s0[7],s0[11],s0[15]));
+ else m1=s1[0];
+ }
+
+ if(color) {
+ GLfloat c0[4],c1[4];
+ for(size_t i=0; i < 4; ++i) {
+ c0[i]=0.5*(C1[i]+C2[i]);
+ c1[i]=0.5*(C3[i]+C0[i]);
+ }
+
+ GLuint i0=data.Vertex(m0,n0,c0);
+ GLuint i1=data.Vertex(m1,n1,c1);
+
+ render(s0,I0,I1,i0,i1,P0,P1,m0,m1,flat0,flat1,false,flat3,C0,C1,c0,c1);
+ render(s1,i1,i0,I2,I3,m1,m0,P2,P3,false,flat1,flat2,flat3,c1,c0,C2,C3);
+ } else {
+ GLuint i0=(data.*pvertex)(m0,n0);
+ GLuint i1=(data.*pvertex)(m1,n1);
+
+ render(s0,I0,I1,i0,i1,P0,P1,m0,m1,flat0,flat1,false,flat3);
+ render(s1,i1,i0,I2,I3,m1,m0,P2,P3,false,flat1,flat2,flat3);
+ }
+ return;
+ }
+ if(d.gety() < res2) { // flat in vertical direction; split horizontally
+ /*
+ P refers to a corner
+ m refers to a midpoint
+ s refers to a subpatch
+
+ m1
+ +--------+--------+
+ |P3 | P2|
+ | | |
+ | | |
+ | | |
+ | | |
+ | s0 | s1 |
+ | | |
+ | | |
+ | | |
+ | | |
+ |P0 | P1|
+ +--------+--------+
+ m0
+ */
+
+ Split3 c0(p0,p[4],p[8],p12);
+ Split3 c1(p[1],p[5],p[9],p[13]);
+ Split3 c2(p[2],p[6],p[10],p[14]);
+ Split3 c3(p3,p[7],p[11],p15);
+
+ triple s0[]={p0,p[1],p[2],p3,
+ c0.m0,c1.m0,c2.m0,c3.m0,
+ c0.m3,c1.m3,c2.m3,c3.m3,
+ c0.m5,c1.m5,c2.m5,c3.m5};
+
+ triple s1[]={c0.m5,c1.m5,c2.m5,c3.m5,
+ c0.m4,c1.m4,c2.m4,c3.m4,
+ c0.m2,c1.m2,c2.m2,c3.m2,
+ p12,p[13],p[14],p15};
+
+ triple n0=normal(s0[0],s0[4],s0[8],s0[12],s0[13],s0[14],s0[15]);
+ if(abs2(n0) <= epsilon) {
+ n0=normal(s0[0],s0[4],s0[8],s0[12],s0[11],s0[7],s0[3]);
+ if(abs2(n0) <= epsilon)
+ n0=normal(s0[3],s0[2],s0[1],s0[0],s0[13],s0[14],s0[15]);
+ }
+
+ triple n1=normal(s1[15],s1[11],s1[7],s1[3],s1[2],s1[1],s1[0]);
+ if(abs2(n1) <= epsilon) {
+ n1=normal(s1[15],s1[11],s1[7],s1[3],s1[4],s1[8],s1[12]);
+ if(abs2(n1) <= epsilon)
+ n1=normal(s1[12],s1[13],s1[14],s1[15],s1[2],s1[1],s1[0]);
+ }
+
+ // A kludge to remove subdivision cracks, only applied the first time
+ // an edge is found to be flat before the rest of the subpatch is.
+
+ triple m0=0.5*(P0+P1);
+ if(!flat0) {
+ if((flat0=Straightness(p0,p[4],p[8],p12) < res2))
+ m0 -= Epsilon*unit(differential(s1[0],s1[1],s1[2],s1[3]));
+ else m0=s0[12];
+ }
+
+ triple m1=0.5*(P2+P3);
+ if(!flat2) {
+ if((flat2=Straightness(p15,p[11],p[7],p3) < res2))
+ m1 -= Epsilon*unit(differential(s0[15],s0[14],s0[13],s0[12]));
+ else m1=s1[3];
+ }
+
+ if(color) {
+ GLfloat c0[4],c1[4];
+ for(size_t i=0; i < 4; ++i) {
+ c0[i]=0.5*(C0[i]+C1[i]);
+ c1[i]=0.5*(C2[i]+C3[i]);
+ }
+
+ GLuint i0=data.Vertex(m0,n0,c0);
+ GLuint i1=data.Vertex(m1,n1,c1);
+
+ render(s0,I0,i0,i1,I3,P0,m0,m1,P3,flat0,false,flat2,flat3,C0,c0,c1,C3);
+ render(s1,i0,I1,I2,i1,m0,P1,P2,m1,flat0,flat1,flat2,false,c0,C1,C2,c1);
+ } else {
+ GLuint i0=(data.*pvertex)(m0,n0);
+ GLuint i1=(data.*pvertex)(m1,n1);
+
+ render(s0,I0,i0,i1,I3,P0,m0,m1,P3,flat0,false,flat2,flat3);
+ render(s1,i0,I1,I2,i1,m0,P1,P2,m1,flat0,flat1,flat2,false);
+ }
+ return;
+ }
+ /*
+ Horizontal and vertical subdivision:
+ P refers to a corner
+ m refers to a midpoint
+ s refers to a subpatch
+
+ m2
+ +--------+--------+
+ |P3 | P2|
+ | | |
+ | s3 | s2 |
+ | | |
+ | | m4 |
+ m3 +--------+--------+ m1
+ | | |
+ | | |
+ | s0 | s1 |
+ | | |
+ |P0 | P1|
+ +--------+--------+
+ m0
*/
-
+
// Subdivide patch:
Split3 c0(p0,p[1],p[2],p3);
Split3 c1(p[4],p[5],p[6],p[7]);
@@ -638,70 +637,70 @@ void BezierPatch::render(const triple *p,
c7.m2,c8.m2,c9.m2,c10.m2,c3.m5,c3.m4,c3.m2,p15};
triple s3[]={c0.m5,c0.m4,c0.m2,p3,c7.m0,c8.m0,c9.m0,c10.m0,
c7.m3,c8.m3,c9.m3,c10.m3,c7.m5,c8.m5,c9.m5,c10.m5};
-
+
triple m4=s0[15];
-
+
triple n0=normal(s0[0],s0[4],s0[8],s0[12],s0[13],s0[14],s0[15]);
if(abs2(n0) <= epsilon) {
n0=normal(s0[0],s0[4],s0[8],s0[12],s0[11],s0[7],s0[3]);
if(abs2(n0) <= epsilon)
n0=normal(s0[3],s0[2],s0[1],s0[0],s0[13],s0[14],s0[15]);
}
-
+
triple n1=normal(s1[12],s1[13],s1[14],s1[15],s1[11],s1[7],s1[3]);
if(abs2(n1) <= epsilon) {
n1=normal(s1[12],s1[13],s1[14],s1[15],s1[2],s1[1],s1[0]);
if(abs2(n1) <= epsilon)
n1=normal(s1[0],s1[4],s1[8],s1[12],s1[11],s1[7],s1[3]);
}
-
+
triple n2=normal(s2[15],s2[11],s2[7],s2[3],s2[2],s2[1],s2[0]);
if(abs2(n2) <= epsilon) {
n2=normal(s2[15],s2[11],s2[7],s2[3],s2[4],s2[8],s2[12]);
if(abs2(n2) <= epsilon)
n2=normal(s2[12],s2[13],s2[14],s2[15],s2[2],s2[1],s2[0]);
}
-
+
triple n3=normal(s3[3],s3[2],s3[1],s3[0],s3[4],s3[8],s3[12]);
if(abs2(n3) <= epsilon) {
n3=normal(s3[3],s3[2],s3[1],s3[0],s3[13],s3[14],s3[15]);
if(abs2(n3) <= epsilon)
n3=normal(s3[15],s3[11],s3[7],s3[3],s3[4],s3[8],s3[12]);
}
-
+
triple n4=normal(s2[3],s2[2],s2[1],m4,s2[4],s2[8],s2[12]);
-
+
// A kludge to remove subdivision cracks, only applied the first time
// an edge is found to be flat before the rest of the subpatch is.
-
+
triple m0=0.5*(P0+P1);
if(!flat0) {
if((flat0=Straightness(p0,p[4],p[8],p12) < res2))
m0 -= Epsilon*unit(differential(s1[0],s1[1],s1[2],s1[3]));
else m0=s0[12];
}
-
+
triple m1=0.5*(P1+P2);
if(!flat1) {
if((flat1=Straightness(p12,p[13],p[14],p15) < res2))
m1 -= Epsilon*unit(differential(s2[12],s2[8],s2[4],s2[0]));
else m1=s1[15];
}
-
+
triple m2=0.5*(P2+P3);
if(!flat2) {
if((flat2=Straightness(p15,p[11],p[7],p3) < res2))
m2 -= Epsilon*unit(differential(s3[15],s3[14],s3[13],s3[12]));
else m2=s2[3];
}
-
+
triple m3=0.5*(P3+P0);
if(!flat3) {
if((flat3=Straightness(p0,p[1],p[2],p3) < res2))
m3 -= Epsilon*unit(differential(s0[3],s0[7],s0[11],s0[15]));
else m3=s3[0];
}
-
+
if(color) {
GLfloat c0[4],c1[4],c2[4],c3[4],c4[4];
for(size_t i=0; i < 4; ++i) {
@@ -711,13 +710,13 @@ void BezierPatch::render(const triple *p,
c3[i]=0.5*(C3[i]+C0[i]);
c4[i]=0.5*(c0[i]+c2[i]);
}
-
+
GLuint i0=data.Vertex(m0,n0,c0);
GLuint i1=data.Vertex(m1,n1,c1);
GLuint i2=data.Vertex(m2,n2,c2);
GLuint i3=data.Vertex(m3,n3,c3);
GLuint i4=data.Vertex(m4,n4,c4);
-
+
render(s0,I0,i0,i4,i3,P0,m0,m4,m3,flat0,false,false,flat3,C0,c0,c4,c3);
render(s1,i0,I1,i1,i4,m0,P1,m1,m4,flat0,flat1,false,false,c0,C1,c1,c4);
render(s2,i4,i1,I2,i2,m4,m1,P2,m2,false,flat1,flat2,false,c4,c1,C2,c2);
@@ -728,7 +727,7 @@ void BezierPatch::render(const triple *p,
GLuint i2=(data.*pvertex)(m2,n2);
GLuint i3=(data.*pvertex)(m3,n3);
GLuint i4=(data.*pvertex)(m4,n4);
-
+
render(s0,I0,i0,i4,i3,P0,m0,m4,m3,flat0,false,false,flat3);
render(s1,i0,I1,i1,i4,m0,P1,m1,m4,flat0,flat1,false,false);
render(s2,i4,i1,I2,i2,m4,m1,P2,m2,false,flat1,flat2,false);
@@ -743,36 +742,36 @@ void BezierTriangle::render(const triple *p, bool straight, GLfloat *c0)
epsilon=0;
for(int i=1; i < 10; ++i)
epsilon=max(epsilon,abs2(p[i]-p0));
-
+
epsilon *= DBL_EPSILON;
-
+
triple p6=p[6];
triple p9=p[9];
-
+
triple n0=normal(p9,p[5],p[2],p0,p[1],p[3],p6);
- triple n1=normal(p0,p[1],p[3],p6,p[7],p[8],p9);
+ triple n1=normal(p0,p[1],p[3],p6,p[7],p[8],p9);
triple n2=normal(p6,p[7],p[8],p9,p[5],p[2],p0);
-
+
GLuint i0,i1,i2;
if(color) {
GLfloat *c1=c0+4;
GLfloat *c2=c0+8;
-
+
i0=data.Vertex(p0,n0,c0);
i1=data.Vertex(p6,n1,c1);
i2=data.Vertex(p9,n2,c2);
-
+
if(!straight)
render(p,i0,i1,i2,p0,p6,p9,false,false,false,c0,c1,c2);
} else {
i0=(data.*pvertex)(p0,n0);
i1=(data.*pvertex)(p6,n1);
i2=(data.*pvertex)(p9,n2);
-
+
if(!straight)
render(p,i0,i1,i2,p0,p6,p9,false,false,false);
}
-
+
if(straight) {
triple P[]={p0,p6,p9};
if(!offscreen(3,P)) {
@@ -923,10 +922,10 @@ void BezierTriangle::render(const triple *p,
triple n0=normal(l300,r012,r021,r030,u201,u102,l030);
triple n1=normal(r030,u201,u102,l030,l120,l210,l300);
triple n2=normal(l030,l120,l210,l300,r012,r021,r030);
-
+
// A kludge to remove subdivision cracks, only applied the first time
// an edge is found to be flat before the rest of the subpatch is.
-
+
triple m0=0.5*(P1+P2);
if(!flat0) {
if((flat0=Straightness(r300,p210,p120,u030) < res2))
@@ -958,11 +957,11 @@ void BezierTriangle::render(const triple *p,
c1[i]=0.5*(C2[i]+C0[i]);
c2[i]=0.5*(C0[i]+C1[i]);
}
-
+
GLuint i0=data.Vertex(m0,n0,c0);
GLuint i1=data.Vertex(m1,n1,c1);
GLuint i2=data.Vertex(m2,n2,c2);
-
+
render(l,I0,i2,i1,P0,m2,m1,false,flat1,flat2,C0,c2,c1);
render(r,i2,I1,i0,m2,P1,m0,flat0,false,flat2,c2,C1,c0);
render(u,i1,i0,I2,m1,m0,P2,flat0,flat1,false,c1,c0,C2);
@@ -971,7 +970,7 @@ void BezierTriangle::render(const triple *p,
GLuint i0=(data.*pvertex)(m0,n0);
GLuint i1=(data.*pvertex)(m1,n1);
GLuint i2=(data.*pvertex)(m2,n2);
-
+
render(l,I0,i2,i1,P0,m2,m1,false,flat1,flat2);
render(r,i2,I1,i0,m2,P1,m0,flat0,false,flat2);
render(u,i1,i0,I2,m1,m0,P2,flat0,flat1,false);
@@ -986,7 +985,7 @@ void transform(const std::vector<VertexData>& b)
// xbuffer.resize(n);
// ybuffer.resize(n);
zbuffer.resize(n);
-
+
double Tz0=gl::dView[2];
double Tz1=gl::dView[6];
double Tz2=gl::dView[10];
@@ -1001,51 +1000,51 @@ void transform(const std::vector<VertexData>& b)
void bounds(const std::vector<GLuint>& I)
{
unsigned n=I.size()/3;
-/*
+/*
xmin.resize(n);
xmax.resize(n);
ymin.resize(n);
ymax.resize(n);
*/
-
+
zmin.resize(n);
zmax.resize(n);
-
+
for(unsigned i=0; i < n; ++i) {
unsigned i3=3*i;
unsigned Ia=I[i3];
unsigned Ib=I[i3+1];
unsigned Ic=I[i3+2];
-
-
+
+
/*
- double xa=xbuffer[Ia];
- double xb=xbuffer[Ib];
- double xc=xbuffer[Ic];
-
- double ya=ybuffer[Ia];
- double yb=ybuffer[Ib];
- double yc=ybuffer[Ic];
+ double xa=xbuffer[Ia];
+ double xb=xbuffer[Ib];
+ double xc=xbuffer[Ic];
+
+ double ya=ybuffer[Ia];
+ double yb=ybuffer[Ib];
+ double yc=ybuffer[Ic];
*/
-
+
double za=zbuffer[Ia];
double zb=zbuffer[Ib];
double zc=zbuffer[Ic];
-
+
/*
- xmin[i]=min(xa,xb,xc);
- xmax[i]=max(xa,xb,xc);
-
- ymin[i]=min(ya,yb,yc);
- ymax[i]=max(ya,yb,yc);
+ xmin[i]=min(xa,xb,xc);
+ xmax[i]=max(xa,xb,xc);
+
+ ymin[i]=min(ya,yb,yc);
+ ymax[i]=max(ya,yb,yc);
*/
-
+
zmin[i]=min(za,zb,zc);
zmax[i]=max(za,zb,zc);
}
}
#endif
-
+
void sortTriangles()
{
if(!transparentData.indices.empty()) {
@@ -1062,16 +1061,17 @@ void Triangles::queue(size_t nP, const triple* P, size_t nN, const triple* N,
const uint32_t (*CC)[3], bool Transparent)
{
if(!nN) return;
-
+
data.clear();
Onscreen=true;
transparent=Transparent;
-
+ notRendered();
+
data.Vertices.resize(nP);
data.indices.resize(3*nI);
-
- MaterialIndex=nC ? -1-materialIndex : 1+materialIndex;
-
+
+ MaterialIndex=nC ? -1-materialIndex : 1+materialIndex;
+
for(size_t i=0; i < nI; ++i) {
const uint32_t *PI=PP[i];
uint32_t PI0=PI[0];
@@ -1111,7 +1111,7 @@ void Triangles::queue(size_t nP, const triple* P, size_t nN, const triple* N,
}
append();
}
-
+
#endif
} //namespace camp
diff --git a/Build/source/utils/asymptote/bezierpatch.h b/Build/source/utils/asymptote/bezierpatch.h
index 344df7e81af..b4159fe3ac7 100644
--- a/Build/source/utils/asymptote/bezierpatch.h
+++ b/Build/source/utils/asymptote/bezierpatch.h
@@ -30,7 +30,7 @@ struct BezierPatch
bool Onscreen;
void init(double res);
-
+
triple normal(triple left3, triple left2, triple left1, triple middle,
triple right1, triple right2, triple right3) {
triple lp=3.0*(left1-middle);
@@ -66,11 +66,11 @@ struct BezierPatch
triple p=p1-p0;
if(abs2(p) > epsilon)
return p;
-
+
p=bezierPP(p0,p1,p2);
if(abs2(p) > epsilon)
return p;
-
+
return bezierPPP(p0,p1,p2,p3);
}
@@ -96,10 +96,10 @@ struct BezierPatch
v=max(v,Straightness(p[4],p[5],p[6],p[7]));
v=max(v,Straightness(p[8],p[9],p[10],p[11]));
v=max(v,Straightness(p12,p[13],p[14],p15));
-
+
return pair(h,v);
}
-
+
struct Split3 {
triple m0,m2,m3,m4,m5;
Split3() {}
@@ -112,7 +112,7 @@ struct BezierPatch
m5=0.5*(m3+m4);
}
};
-
+
// Approximate bounds by bounding box of control polyhedron.
bool offscreen(size_t n, const triple *v) {
if(bbox2(n,v).offscreen()) {
@@ -129,7 +129,7 @@ struct BezierPatch
bool flat0, bool flat1, bool flat2, bool flat3,
GLfloat *C0=NULL, GLfloat *C1=NULL, GLfloat *C2=NULL,
GLfloat *C3=NULL);
-
+
void append() {
if(transparent)
transparentData.Append(data);
@@ -140,28 +140,40 @@ struct BezierPatch
materialData.append(data);
}
}
-
+
+ virtual void notRendered() {
+ if(transparent)
+ transparentData.rendered=false;
+ else {
+ if(color)
+ colorData.rendered=false;
+ else
+ materialData.rendered=false;
+ }
+ }
+
void queue(const triple *g, bool straight, double ratio, bool Transparent,
GLfloat *colors=NULL) {
data.clear();
Onscreen=true;
transparent=Transparent;
color=colors;
+ notRendered();
init(pixel*ratio);
render(g,straight,colors);
}
-
+
};
struct BezierTriangle : public BezierPatch {
public:
BezierTriangle() : BezierPatch() {}
-
+
double Distance(const triple *p) {
triple p0=p[0];
triple p6=p[6];
triple p9=p[9];
-
+
// Check how far the internal point is from the centroid of the vertices.
double d=abs2((p0+p6+p9)*third-p[4]);
@@ -170,7 +182,7 @@ public:
d=max(d,Straightness(p0,p[2],p[5],p9));
return max(d,Straightness(p6,p[7],p[8],p9));
}
-
+
void render(const triple *p, bool straight, GLfloat *c0=NULL);
void render(const triple *p,
GLuint I0, GLuint I1, GLuint I2,
@@ -187,7 +199,7 @@ public:
size_t nC, const prc::RGBAColour* C, size_t nI,
const uint32_t (*PI)[3], const uint32_t (*NI)[3],
const uint32_t (*CI)[3], bool transparent);
-
+
void append() {
if(transparent)
transparentData.Append(data);
@@ -195,6 +207,13 @@ public:
triangleData.Append(data);
}
+ void notRendered() {
+ if(transparent)
+ transparentData.rendered=false;
+ else
+ triangleData.rendered=false;
+ }
+
};
extern void sortTriangles();
diff --git a/Build/source/utils/asymptote/build-scripts/HOWTO-MSWindows b/Build/source/utils/asymptote/build-scripts/HOWTO-MSWindows
index 977501d6582..9a39e4b1746 100644
--- a/Build/source/utils/asymptote/build-scripts/HOWTO-MSWindows
+++ b/Build/source/utils/asymptote/build-scripts/HOWTO-MSWindows
@@ -8,9 +8,11 @@ Install TeXLive and required Cygwin packages:
setup-x86_64.exe -q -P git,wget,make,patch,gcc-g++,autoconf2.5,bison,flex,w32api-headers,w32api-runtime,zlib-devel,glm-devel,automake1.15,libtool
-setup-x86_64.exe -q -I -P libtirpc-devel,libreadline-devel,libfftw3-devel,libgsl-devel
+setup-x86_64.exe -q -I -P libtirpc-devel,libreadline-devel,libfftw3-devel,libgsl-devel,libcurl-devel
-Build and install static libraries from /usr/local/src:
+Download wolfssl GPLV3 source code from www.wolfssl.com
+
+Build and install static libraries from /usr/src:
gsl-devel:
./configure --prefix=/usr
@@ -21,7 +23,7 @@ readline-devel:
make install
fftw3-devel:
-./configure --prefix=/usr --enable-shared
+./configure --prefix=/usr --disable-shared
make install
tirpc-devel:
@@ -35,6 +37,14 @@ termcap-1.3.1:
./configure --prefix=/usr
make install
+wolfssl-4.4.0-gplv3-fips-ready:
+./configure --prefix=/usr --enable-static
+make install
+
+curl-7.71.1:
+./configure --prefix=/usr --disable-shared --without-brotli --without-ssl --with-wolfssl
+make install
+
git clone http://github.com/vectorgraphics/asymptote
freeglut-3.0.0:
@@ -62,4 +72,4 @@ cd gc-$GCVERSION
./configure --disable-shared
make check
-~/asymptote/build-scripts/build-asymptote.dos 2.48
+~/asymptote/build-scripts/build-asymptote.dos <VERSION>
diff --git a/Build/source/utils/asymptote/build-scripts/README-binaries b/Build/source/utils/asymptote/build-scripts/README-binaries
index 8e4192121d9..41576b36f49 100644
--- a/Build/source/utils/asymptote/build-scripts/README-binaries
+++ b/Build/source/utils/asymptote/build-scripts/README-binaries
@@ -1,5 +1,5 @@
The Asymptote executable for MSWindows can only be released under the GNU
General Public License (GPL) as it is linked against the GNU Scientific
-Library, GNU Readline library, and other GPL libraries. The Asymptote
+Library, GNU Readline library, WolfSSL, and other GPL libraries. The Asymptote
source itself is released under the GNU Lesser General Public License.
diff --git a/Build/source/utils/asymptote/build-scripts/asy-format.el b/Build/source/utils/asymptote/build-scripts/asy-format.el
new file mode 100644
index 00000000000..fc66032653b
--- /dev/null
+++ b/Build/source/utils/asymptote/build-scripts/asy-format.el
@@ -0,0 +1,52 @@
+(defun change (old-pat new-pat) "Replace all occurences of old-pat to new-pat in current buffer."
+(interactive "r")
+(goto-char (point-min))
+(replace-string old-pat new-pat))
+
+(defun changereg (old-regexp new-regexp) "Replace all occurences of old-regexp to new-regexp in current buffer."
+(interactive "r")
+(goto-char (point-min))
+(replace-regexp old-regexp new-regexp))
+
+(defun querychangereg (old-regexp new-regexp) "Replace all occurences of old-regexp to new-regexp in current buffer, with query."
+(interactive "r")
+(goto-char (point-min))
+(query-replace-regexp old-regexp new-regexp))
+
+(set-variable 'case-fold-search nil)
+(change " + " "+")
+(change " - " "-")
+;;(change " * " "*")
+(change " / " "/")
+(change " = " "=")
+(change " --" "--")
+(change "-- " "--")
+(change " ++" "++")
+(change "++ " "++")
+(change " .. " "..")
+(change " ^^ " "^^")
+(change " & " "&")
+(change " :: " "::")
+(change ";--" "; --")
+(change " (" "(")
+(change " )" ")")
+(change " }" "}")
+(changereg "( \\([^/]\\)" "(\\1")
+(changereg "{ \\([^/]\\)" "{\\1")
+(changereg "\\([^ ]\\)\\?" "\\1 ?")
+(changereg "\\?\\([^ ]\\)" "? \\1")
+(changereg ";\\([^ \\}
+]\\)" "; \\1")
+;;(changereg "\\([^ ]\\):" "\\1 :")
+(changereg ":\\([^ ]\\)" ": \\1")
+(changereg "\\([+-*/=!<>]\\)=\\([^ ]\\)" "\\1= \\2")
+(changereg "\\([^ ]\\)\\([+-*/=!<>]\\)=" "\\1 \\2=")
+(changereg "\\([<>]\\)\\([^ =]\\)" "\\1 \\2")
+(changereg "\\([^ ]\\)\\([<>]\\)" "\\1 \\2")
+(changereg "&&\\([^ ]\\)" "&& \\1")
+(changereg "||\\([^ ]\\)" "|| \\1")
+(changereg "\\[\\]\\([^ []\\)" "[] \\1")
+(indent-region (point-min) (point-max))
+
+(querychangereg ", " ",")
+
diff --git a/Build/source/utils/asymptote/build-scripts/asy-indent.el b/Build/source/utils/asymptote/build-scripts/asy-indent.el
new file mode 100644
index 00000000000..06189e5e60a
--- /dev/null
+++ b/Build/source/utils/asymptote/build-scripts/asy-indent.el
@@ -0,0 +1,6 @@
+(load-file "/usr/local/share/asymptote/asy-mode.el")
+(asy-mode)
+(indent-region (point-min) (point-max) nil)
+(untabify (point-min) (point-max))
+(delete-trailing-whitespace (point-min) (point-max))
+(save-buffer)
diff --git a/Build/source/utils/asymptote/build-scripts/build-asygl b/Build/source/utils/asymptote/build-scripts/build-asygl
index f1d75a6f803..559b08c08b4 100755
--- a/Build/source/utils/asymptote/build-scripts/build-asygl
+++ b/Build/source/utils/asymptote/build-scripts/build-asygl
@@ -7,7 +7,7 @@ if [ $# -eq 1 ]; then \
UGLIFY=cat; \
UGLIFYOPT=""; \
else \
-UGLIFY=uglifyjs; \
+UGLIFY=terser; \
UGLIFYOPTIONS="-m -c --comments"; \
fi
diff --git a/Build/source/utils/asymptote/build-scripts/build-asymptote.dos b/Build/source/utils/asymptote/build-scripts/build-asymptote.dos
index b8755c7591c..5bb6777cc2f 100755
--- a/Build/source/utils/asymptote/build-scripts/build-asymptote.dos
+++ b/Build/source/utils/asymptote/build-scripts/build-asymptote.dos
@@ -35,6 +35,7 @@ make -n MSDOS=1 >& /dev/null || ./configure OSTYPE=msdos --enable-gc=$GC --with-
rm -rf $BUILD
mkdir -p $BUILD
cp -a $HOME/dll/cygwin/*.dll $BUILD
+cp /etc/pki/tls/certs/ca-bundle.crt $BUILD
chmod 0644 $BUILD/*.dll
cp -a $BUILD/*.dll ~/CTAN/asymptote-$VERSION/binaries/$BINDIR/
make MSDOS=1 DESTDIR="$BUILD/" docdir="$BUILD/"
@@ -55,6 +56,7 @@ ls -p1 $BUILD \
| awk '{ if(index($0,"/")==length($0)) print "RMDir /r $INSTDIR\\" substr($0,0,length($0)-1); else print "Delete $INSTDIR\\" $0 }' \
> AsymptoteUninstallList.nsi
+rm $BUILD/xasy
if [ $MACHINE == i686 ]; then
sed asymptote.nsi -e 's/$PROGRAMFILES64/$PROGRAMFILES/g' > asymptote32.nsi
/cygdrive/c/Program\ Files\ \(x86\)/NSIS/makensis.exe asymptote32.nsi
diff --git a/Build/source/utils/asymptote/build-scripts/cc-format.el b/Build/source/utils/asymptote/build-scripts/cc-format.el
new file mode 100644
index 00000000000..fa36f6dd6a1
--- /dev/null
+++ b/Build/source/utils/asymptote/build-scripts/cc-format.el
@@ -0,0 +1,52 @@
+(defun change (old-pat new-pat) "Replace all occurences of old-pat to new-pat in current buffer."
+(interactive "r")
+(goto-char (point-min))
+(replace-string old-pat new-pat))
+
+(defun changereg (old-regexp new-regexp) "Replace all occurences of old-regexp to new-regexp in current buffer."
+(interactive "r")
+(goto-char (point-min))
+(replace-regexp old-regexp new-regexp))
+
+(defun querychangereg (old-regexp new-regexp) "Replace all occurences of old-regexp to new-regexp in current buffer, with query."
+(interactive "r")
+(goto-char (point-min))
+(query-replace-regexp old-regexp new-regexp))
+
+(set-variable 'case-fold-search nil)
+(change " + " "+")
+(change " - " "-")
+(change " * " "*")
+(change " / " "/")
+(change " = " "=")
+(change " --" "--")
+(change "-- " "--")
+(change " ++" "++")
+(change "++ " "++")
+(change " .. " "..")
+(change " ^^ " "^^")
+(change " & " "&")
+(change " :: " "::")
+(change ";--" "; --")
+(change " (" "(")
+(change " )" ")")
+(change " }" "}")
+(changereg "( \\([^/]\\)" "(\\1")
+(changereg "{ \\([^/]\\)" "{\\1")
+(changereg "\\([^ ]\\)\\?" "\\1 ?")
+(changereg "\\?\\([^ ]\\)" "? \\1")
+(changereg ";\\([^ \\}
+]\\)" "; \\1")
+;;(changereg "\\([^ ]\\):" "\\1 :")
+(changereg ":\\([^ ]\\)" ": \\1")
+(changereg "\\([+-*/=!]\\)=\\([^ ]\\)" "\\1= \\2")
+(changereg "\\([^ ]\\)\\([+-*/=!]\\)=" "\\1 \\2=")
+(changereg "\\([]\\)\\([^ =]\\)" "\\1 \\2")
+(changereg "\\([^ ]\\)\\([]\\)" "\\1 \\2")
+(changereg "&&\\([^ ]\\)" "&& \\1")
+(changereg "||\\([^ ]\\)" "|| \\1")
+(changereg "\\[\\]\\([^ []\\)" "[] \\1")
+(indent-region (point-min) (point-max))
+
+(querychangereg ", " ",")
+
diff --git a/Build/source/utils/asymptote/build-scripts/cc-indent.el b/Build/source/utils/asymptote/build-scripts/cc-indent.el
new file mode 100644
index 00000000000..58c1ac9ea85
--- /dev/null
+++ b/Build/source/utils/asymptote/build-scripts/cc-indent.el
@@ -0,0 +1,6 @@
+(load-file "cc-mode2.el")
+(c++-mode)
+(indent-region (point-min) (point-max) nil)
+(untabify (point-min) (point-max))
+(delete-trailing-whitespace (point-min) (point-max))
+(save-buffer)
diff --git a/Build/source/utils/asymptote/build-scripts/run-in-indent.el b/Build/source/utils/asymptote/build-scripts/run-in-indent.el
new file mode 100644
index 00000000000..9a4567dcb86
--- /dev/null
+++ b/Build/source/utils/asymptote/build-scripts/run-in-indent.el
@@ -0,0 +1,6 @@
+(load-file "cc-mode2.el")
+(c++-mode)
+(indent-region (search-forward " " nil nil 2) (point-max) nil)
+(untabify (point-min) (point-max))
+(delete-trailing-whitespace (point-min) (point-max))
+(save-buffer)
diff --git a/Build/source/utils/asymptote/builtin.cc b/Build/source/utils/asymptote/builtin.cc
index ee0c3238941..36af37d4d5e 100644
--- a/Build/source/utils/asymptote/builtin.cc
+++ b/Build/source/utils/asymptote/builtin.cc
@@ -43,13 +43,13 @@
#endif
namespace vm {
- // Defined in stack.cc
- extern vm::frame *make_dummyframe(string name);
+// Defined in stack.cc
+extern vm::frame *make_dummyframe(string name);
}
using namespace types;
using namespace camp;
-using namespace vm;
+using namespace vm;
namespace trans {
using camp::transform;
@@ -61,8 +61,8 @@ using run::greater;
using run::plus;
using run::minus;
-using namespace run;
-
+using namespace run;
+
void gen_runtime_venv(venv &ve);
void gen_runbacktrace_venv(venv &ve);
void gen_runpicture_venv(venv &ve);
@@ -87,21 +87,21 @@ void addType(tenv &te, symbol name, ty *t)
// The base environments for built-in types and functions
void base_tenv(tenv &te)
{
-#define PRIMITIVE(name,Name,asyName) \
- addType(te, symbol::trans(#asyName), prim##Name());
+#define PRIMITIVE(name,Name,asyName) \
+ addType(te, symbol::trans(#asyName), prim##Name());
#include "primitives.h"
#undef PRIMITIVE
}
-const formal noformal(0);
+const formal noformal(0);
function *functionFromFormals(ty *result,
- formal f1=noformal, formal f2=noformal, formal f3=noformal,
- formal f4=noformal, formal f5=noformal, formal f6=noformal,
- formal f7=noformal, formal f8=noformal, formal f9=noformal,
- formal fA=noformal, formal fB=noformal, formal fC=noformal,
- formal fD=noformal, formal fE=noformal, formal fF=noformal,
- formal fG=noformal, formal fH=noformal, formal fI=noformal)
+ formal f1=noformal, formal f2=noformal, formal f3=noformal,
+ formal f4=noformal, formal f5=noformal, formal f6=noformal,
+ formal f7=noformal, formal f8=noformal, formal f9=noformal,
+ formal fA=noformal, formal fB=noformal, formal fC=noformal,
+ formal fD=noformal, formal fE=noformal, formal fF=noformal,
+ formal fG=noformal, formal fH=noformal, formal fI=noformal)
{
function *fun = new function(result);
@@ -136,17 +136,17 @@ void addFunc(venv &ve, access *a, ty *result, symbol id,
formal fG=noformal, formal fH=noformal, formal fI=noformal)
{
function *fun = functionFromFormals(result,f1,f2,f3,f4,f5,f6,f7,f8,f9,
- fA,fB,fC,fD,fE,fF,fG,fH,fI);
+ fA,fB,fC,fD,fE,fF,fG,fH,fI);
// NOTE: If the function is a field, we should encode the defining record in
// the entry
varEntry *ent = new varEntry(fun, a, 0, position());
-
+
ve.enter(id, ent);
}
// Add a function with one or more default arguments.
-void addFunc(venv &ve, bltin f, ty *result, symbol name,
+void addFunc(venv &ve, bltin f, ty *result, symbol name,
formal f1, formal f2, formal f3, formal f4, formal f5, formal f6,
formal f7, formal f8, formal f9, formal fA, formal fB, formal fC,
formal fD, formal fE, formal fF, formal fG, formal fH, formal fI)
@@ -157,14 +157,14 @@ void addFunc(venv &ve, bltin f, ty *result, symbol name,
// overloaded, so we check for them too. Many builtin functions have so
// many arguments that it is noise to print out their full signatures.
string s = name;
- if (s.find("operator ", 0) == 0 || s == "min" || s == "max")
- {
- function *fun = functionFromFormals(result,f1,f2,f3,f4,f5,f6,f7,f8,f9,
- fA,fB,fC,fD,fE,fF,fG,fH,fI);
- ostringstream out;
- fun->printVar(out, name);
- REGISTER_BLTIN(f, out.str());
- }
+ if (s.find("operator ", 0) == 0 || s == "min" || s == "max")
+ {
+ function *fun = functionFromFormals(result,f1,f2,f3,f4,f5,f6,f7,f8,f9,
+ fA,fB,fC,fD,fE,fF,fG,fH,fI);
+ ostringstream out;
+ fun->printVar(out, name);
+ REGISTER_BLTIN(f, out.str());
+ }
else {
REGISTER_BLTIN(f, name);
}
@@ -172,7 +172,7 @@ void addFunc(venv &ve, bltin f, ty *result, symbol name,
access *a = new bltinAccess(f);
addFunc(ve,a,result,name,f1,f2,f3,f4,f5,f6,f7,f8,f9,
- fA,fB,fC,fD,fE,fF,fG,fH,fI);
+ fA,fB,fC,fD,fE,fF,fG,fH,fI);
}
void addOpenFunc(venv &ve, bltin f, ty *result, symbol name)
@@ -183,7 +183,7 @@ void addOpenFunc(venv &ve, bltin f, ty *result, symbol name)
access *a= new bltinAccess(f);
varEntry *ent = new varEntry(fun, a, 0, position());
-
+
ve.enter(name, ent);
}
@@ -229,7 +229,7 @@ void addRealFunc(venv &ve, symbol name)
}
#define addRealFunc(fcn, sym) addRealFunc<fcn>(ve, sym);
-
+
void addRealFunc2(venv &ve, bltin fcn, symbol name)
{
addFunc(ve,fcn,primReal(),name,formal(primReal(),SYM(a)),
@@ -249,7 +249,7 @@ void addRealIntFunc(venv& ve, symbol name, symbol arg1,
addFunc(ve, realRealInt<fcn>, primReal(), name, formal(primReal(), arg1),
formal(primInt(), arg2));
}
-
+
void addInitializer(venv &ve, ty *t, access *a)
{
addFunc(ve, a, t, symbol::initsym);
@@ -375,21 +375,21 @@ void addCasts(venv &ve)
addCast(ve, primReal(), primInt(), cast<Int,double>);
addCast(ve, primPair(), primInt(), cast<Int,pair>);
addCast(ve, primPair(), primReal(), cast<double,pair>);
-
+
addCast(ve, primPath(), primPair(), cast<pair,path>);
addCast(ve, primGuide(), primPair(), pairToGuide);
addCast(ve, primGuide(), primPath(), pathToGuide);
addCast(ve, primPath(), primGuide(), guideToPath);
addCast(ve, primFile(), primNull(), nullFile);
-
+
// Vectorized casts.
addExplicitCast(ve, IntArray(), realArray(), arrayToArray<double,Int>);
-
+
addCast(ve, realArray(), IntArray(), arrayToArray<Int,double>);
addCast(ve, pairArray(), IntArray(), arrayToArray<Int,pair>);
addCast(ve, pairArray(), realArray(), arrayToArray<double,pair>);
-
+
addCast(ve, realArray2(), IntArray2(), array2ToArray2<Int,double>);
addCast(ve, pairArray2(), IntArray2(), array2ToArray2<Int,pair>);
addCast(ve, pairArray2(), realArray2(), array2ToArray2<double,pair>);
@@ -463,9 +463,9 @@ void addBooleanOps(venv &ve, ty *t1, symbol name, ty *t2)
{
addBooleanOperator(ve,binaryOp<T,op>,t1,name);
addFunc(ve,opArray<T,T,op>,
- booleanArray(),name,formal(t1,SYM(a)),formal(t2,SYM(b)));
+ booleanArray(),name,formal(t1,SYM(a)),formal(t2,SYM(b)));
addFunc(ve,arrayOp<T,T,op>,
- booleanArray(),name,formal(t2,SYM(a)),formal(t1,SYM(b)));
+ booleanArray(),name,formal(t2,SYM(a)),formal(t1,SYM(b)));
addFunc(ve,arrayArrayOp<T,op>,booleanArray(),name,formal(t2,SYM(a)),
formal(t2,SYM(b)));
}
@@ -483,18 +483,18 @@ void addUnorderedOps(venv &ve, ty *t1, ty *t2, ty *t3, ty *t4)
{
addBooleanOps<T,equals>(ve,t1,SYM_EQ,t2);
addBooleanOps<T,notequals>(ve,t1,SYM_NEQ,t2);
-
+
addFunc(ve, run::array2Equals<T>, primBoolean(), SYM_EQ, formal(t3, SYM(a)),
formal(t3, SYM(b)));
addFunc(ve, run::array2NotEquals<T>, primBoolean(),
SYM_NEQ, formal(t3, SYM(a)),
formal(t3, SYM(b)));
-
+
addCast(ve,t1,primFile(),read<T>);
addCast(ve,t2,primFile(),readArray1<T>);
addCast(ve,t3,primFile(),readArray2<T>);
addCast(ve,t4,primFile(),readArray3<T>);
-
+
addWrite(ve,write<T>,t1,t2);
addRestFunc(ve,writeArray<T>,primVoid(),SYM(write),t3,
formal(primFile(),SYM(file),true),
@@ -538,15 +538,15 @@ void addOrderedOps(venv &ve, ty *t1, ty *t2, ty *t3, ty *t4)
addBooleanOps<T,lessequals>(ve,t1,SYM_LE,t2);
addBooleanOps<T,greaterequals>(ve,t1,SYM_GE,t2);
addBooleanOps<T,greater>(ve,t1,SYM_GT,t2);
-
+
addOps<T,run::min>(ve,t1,SYM(min),t2);
addOps<T,run::max>(ve,t1,SYM(max),t2);
addBinOps<T,run::min>(ve,t1,t2,t3,t4,SYM(min));
addBinOps<T,run::max>(ve,t1,t2,t3,t4,SYM(max));
-
+
addFunc(ve,sortArray<T>,t2,SYM(sort),formal(t2,SYM(a)));
addFunc(ve,sortArray2<T>,t3,SYM(sort),formal(t3,SYM(a)));
-
+
addFunc(ve,searchArray<T>,primInt(),SYM(search),formal(t2,SYM(a)),
formal(t1,SYM(key)));
}
@@ -558,7 +558,7 @@ void addBasicOps(venv &ve, ty *t1, ty *t2, ty *t3, ty *t4, bool integer=false,
addOps<T,plus>(ve,t1,SYM_PLUS,t2);
addOps<T,minus>(ve,t1,SYM_MINUS,t2);
addFunc(ve,initialized,primBoolean(),SYM(initialized),formal(t1,SYM(a)));
-
+
addArray2Array2Op<T,plus>(ve,t3,SYM_PLUS);
addArray2Array2Op<T,minus>(ve,t3,SYM_MINUS);
@@ -571,7 +571,7 @@ void addBasicOps(venv &ve, ty *t1, ty *t2, ty *t3, ty *t4, bool integer=false,
formal(t1,SYM(a),false,Explicit),
formal(t1,SYM(b),false,Explicit),
formal(primReal(),SYM(t)));
-
+
addFunc(ve,sumArray<T>,t1,SYM(sum),formal(t2,SYM(a)));
addUnorderedOps<T>(ve,t1,t2,t3,t4);
}
@@ -581,16 +581,16 @@ void addOps(venv &ve, ty *t1, ty *t2, ty *t3, ty *t4, bool integer=false,
bool Explicit=false)
{
addBasicOps<T>(ve,t1,t2,t3,t4,integer,Explicit);
-
+
addOps<T,times>(ve,t1,SYM_TIMES,t2);
addOpArray2<T,times>(ve,t1,SYM_TIMES,t3);
addArray2Op<T,times>(ve,t1,SYM_TIMES,t3);
-
+
if(!integer) {
addOps<T,run::divide>(ve,t1,SYM_DIVIDE,t2);
addArray2Op<T,run::divide>(ve,t1,SYM_DIVIDE,t3);
}
-
+
addOps<T,power>(ve,t1,SYM_CARET,t2);
}
@@ -608,7 +608,7 @@ void addArrayOps(venv &ve, types::array *t)
if (ve.lookByType(SYM(alias), &aliasType))
return;
-
+
addFunc(ve, run::arrayAlias,
primBoolean(), SYM(alias), formal(t, SYM(a)), formal(t, SYM(b)));
@@ -623,23 +623,23 @@ void addArrayOps(venv &ve, types::array *t)
t, SYM(array), formal(primInt(), SYM(n)),
formal(ct, SYM(value)),
formal(primInt(), SYM(depth), true));
-
+
callable *copyFunc = new thunk(new vm::bfunc(run::copyArray),(Int) depth);
addFunc(ve, new callableAccess(copyFunc),
t, SYM(copy), formal(t, SYM(a)), formal(primInt(), SYM(depth), true));
addFunc(ve, run::arrayFunction,
t, SYM(map), formal(new function(ct, ct), SYM(f)), formal(t, SYM(a)));
-
+
addFunc(ve, run::arraySequence,
t, SYM(sequence), formal(new function(ct, primInt()), SYM(f)),
formal(primInt(), SYM(n)));
-
+
addFunc(ve, run::arraySort,
t, SYM(sort), formal(t, SYM(a)),
formal(new function(primBoolean(), ct, ct), SYM(less)),
formal(primBoolean(), SYM(stable), true));
-
+
switch (depth) {
case 1:
addRestFunc(ve, run::arrayConcat, t, SYM(concat), new types::array(t));
@@ -675,14 +675,14 @@ void addFunctionOps(venv &ve, function *f)
}
-void addOperators(venv &ve)
+void addOperators(venv &ve)
{
addSimpleOperator(ve,binaryOp<string,plus>,primString(),SYM_PLUS);
-
+
addBooleanOps<bool,And>(ve,primBoolean(),SYM_AMPERSAND,booleanArray());
addBooleanOps<bool,Or>(ve,primBoolean(),SYM_BAR,booleanArray());
addBooleanOps<bool,Xor>(ve,primBoolean(),SYM_CARET,booleanArray());
-
+
addUnorderedOps<bool>(ve,primBoolean(),booleanArray(),booleanArray2(),
booleanArray3());
addOps<Int>(ve,primInt(),IntArray(),IntArray2(),IntArray3(),true);
@@ -703,7 +703,7 @@ void addOperators(venv &ve)
addUnorderedOps<string>(ve,primString(),stringArray(),stringArray2(),
stringArray3());
-
+
addSimpleOperator(ve,binaryOp<pair,minbound>,primPair(),SYM(minbound));
addSimpleOperator(ve,binaryOp<pair,maxbound>,primPair(),SYM(maxbound));
addSimpleOperator(ve,binaryOp<triple,minbound>,primTriple(),SYM(minbound));
@@ -716,17 +716,17 @@ void addOperators(venv &ve)
tripleArray3(),SYM(minbound));
addBinOps<triple,maxbound>(ve,primTriple(),tripleArray(),tripleArray2(),
tripleArray3(),SYM(maxbound));
-
+
addFunc(ve,arrayFunc<double,pair,abs>,realArray(),SYM(abs),
formal(pairArray(),SYM(a)));
addFunc(ve,arrayFunc<double,triple,abs>,realArray(),SYM(abs),
formal(tripleArray(),SYM(a)));
-
+
addFunc(ve,arrayFunc<pair,pair,conjugate>,pairArray(),SYM(conj),
formal(pairArray(),SYM(a)));
addFunc(ve,arrayFunc2<pair,pair,conjugate>,pairArray2(),SYM(conj),
formal(pairArray2(),SYM(a)));
-
+
addFunc(ve,binaryOp<Int,divide>,primReal(),SYM_DIVIDE,
formal(primInt(),SYM(a)),formal(primInt(),SYM(b)));
addFunc(ve,arrayOp<Int,Int,divide>,realArray(),SYM_DIVIDE,
@@ -735,16 +735,16 @@ void addOperators(venv &ve)
formal(primInt(),SYM(a)),formal(IntArray(),SYM(b)));
addFunc(ve,arrayArrayOp<Int,divide>,realArray(),SYM_DIVIDE,
formal(IntArray(),SYM(a)),formal(IntArray(),SYM(b)));
-
+
addOrderedOps<Int>(ve,primInt(),IntArray(),IntArray2(),IntArray3());
addOrderedOps<double>(ve,primReal(),realArray(),realArray2(),realArray3());
addOrderedOps<string>(ve,primString(),stringArray(),stringArray2(),
stringArray3());
-
+
addOps<Int,mod>(ve,primInt(),SYM_MOD,IntArray());
addOps<Int,quotient>(ve,primInt(),SYM_QUOTIENT,IntArray());
addOps<double,mod>(ve,primReal(),SYM_MOD,realArray());
-
+
addRestFunc(ve,diagonal<Int>,IntArray2(),SYM(diagonal),IntArray());
addRestFunc(ve,diagonal<double>,realArray2(),SYM(diagonal),realArray());
addRestFunc(ve,diagonal<pair>,pairArray2(),SYM(diagonal),pairArray());
@@ -770,7 +770,7 @@ void openFunc(stack *Stack)
size_t numArgs=checkArray(a);
for (size_t k=0; k<numArgs; ++k)
cout << k << ": " << (*a)[k];
-
+
Stack->push<Int>((Int)numArgs);
}
#endif
@@ -779,7 +779,7 @@ void openFunc(stack *Stack)
void printBytecode(stack *Stack)
{
// As arbitrary addresses can be sent to printBytecode, it should not be run
- // in safe mode.
+ // in safe mode.
if (settings::safe) {
cerr << "use -nosafe flag to enable printBytecode" << endl;
return;
@@ -815,7 +815,7 @@ void base_venv(venv &ve)
addOperators(ve);
addTupleOperators(ve);
addGuideOperators(ve);
-
+
addRealFunc(sin,SYM(sin));
addRealFunc(cos,SYM(cos));
addRealFunc(tan,SYM(tan));
@@ -841,18 +841,18 @@ void base_venv(venv &ve)
addRealFunc(pow10,SYM(pow10));
addRealFunc(identity,SYM(identity));
-
+
#ifdef STRUCTEXAMPLE
dummyRecord *fun=createDummyRecord(ve, SYM(test));
addFunc(fun->e.ve,realReal<sin>,primReal(),SYM(f),formal(primReal(),SYM(x)));
addVariable<Int>(fun->e.ve,1,primInt(),SYM(x));
#endif
-
+
addFunc(ve,writestring,primVoid(),SYM(write),
formal(primFile(),SYM(file),true),
formal(primString(),SYM(s)),
formal(voidFileFunction(),SYM(suffix),true));
-
+
addWrite(ve,write<transform>,primTransform(),transformArray());
addWrite(ve,write<guide *>,primGuide(),guideArray());
addWrite(ve,write<pen>,primPen(),penArray());
@@ -867,7 +867,7 @@ void base_venv(venv &ve)
addFunc(ve,arrayFunction,IntArray(),SYM(map),
formal(IntRealFunction(),SYM(f)),
formal(realArray(),SYM(a)));
-
+
addConstant<Int>(ve, Int_MAX, primInt(), SYM(intMax));
addConstant<Int>(ve, Int_MIN, primInt(), SYM(intMin));
addConstant<double>(ve, HUGE_VAL, primReal(), SYM(inf));
@@ -903,7 +903,7 @@ void base_venv(venv &ve)
gen_runpath_venv(ve);
gen_runpath3d_venv(ve);
gen_runmath_venv(ve);
-
+
#ifdef HAVE_LIBGSL
gen_rungsl_venv(ve);
#endif
@@ -924,8 +924,8 @@ void arrayDeleteHelper(stack *Stack)
Int i,j;
if(isdefault(iti)) {
if(jdefault) {
- (*a).clear();
- return;
+ (*a).clear();
+ return;
} else i=j=get<Int>(itj);
} else {
i=get<Int>(iti);
@@ -940,7 +940,7 @@ void arrayDeleteHelper(stack *Stack)
}
i=imod(i,asize);
j=imod(j,asize);
- if(j >= i)
+ if(j >= i)
(*a).erase((*a).begin()+i,(*a).begin()+j+1);
else {
(*a).erase((*a).begin()+i,(*a).end());
@@ -948,10 +948,10 @@ void arrayDeleteHelper(stack *Stack)
}
return;
}
-
+
if(i < 0 || i >= (Int) asize || i > j || j >= (Int) asize) {
ostringstream buf;
- buf << "delete called on array of length " << (Int) asize
+ buf << "delete called on array of length " << (Int) asize
<< " with out-of-bounds index range [" << i << "," << j << "]";
error(buf);
}
diff --git a/Build/source/utils/asymptote/builtin.h b/Build/source/utils/asymptote/builtin.h
index f29a97ccd40..d59c5aa8c89 100644
--- a/Build/source/utils/asymptote/builtin.h
+++ b/Build/source/utils/asymptote/builtin.h
@@ -21,9 +21,9 @@ void base_tenv(tenv &);
void base_venv(venv &);
extern const types::formal noformal;
-
+
// Add a function with one or more default arguments.
-void addFunc(venv &ve, vm::bltin f, types::ty *result, symbol name,
+void addFunc(venv &ve, vm::bltin f, types::ty *result, symbol name,
types::formal f1=noformal, types::formal f2=noformal,
types::formal f3=noformal, types::formal f4=noformal,
types::formal f5=noformal, types::formal f6=noformal,
@@ -33,7 +33,7 @@ void addFunc(venv &ve, vm::bltin f, types::ty *result, symbol name,
types::formal fD=noformal, types::formal fE=noformal,
types::formal fF=noformal, types::formal fG=noformal,
types::formal fH=noformal, types::formal fI=noformal);
-
+
// Adds standard functions for a newly added types.
void addArrayOps(venv &ve, types::array *t);
void addRecordOps(venv &ve, types::record *r);
@@ -43,7 +43,7 @@ void addFunctionOps(venv &ve, types::function *f);
types::record *getGSLModule();
void GSLrngFree();
#endif
-
+
} //namespace trans
namespace run {
diff --git a/Build/source/utils/asymptote/callable.h b/Build/source/utils/asymptote/callable.h
index 851ccb4623d..f870d48d97b 100644
--- a/Build/source/utils/asymptote/callable.h
+++ b/Build/source/utils/asymptote/callable.h
@@ -1,7 +1,7 @@
/*****
* callable.h
* Tom Prince 2005/06/19
- *
+ *
* Runtime representation of functions.
*****/
@@ -51,7 +51,7 @@ struct func : public callable {
void print(ostream& out);
};
-class bfunc : public callable
+class bfunc : public callable
{
public:
bfunc(bltin b) : func(b) {}
diff --git a/Build/source/utils/asymptote/camperror.cc b/Build/source/utils/asymptote/camperror.cc
index 8fb782b4154..8b36310a47f 100644
--- a/Build/source/utils/asymptote/camperror.cc
+++ b/Build/source/utils/asymptote/camperror.cc
@@ -23,7 +23,7 @@ void reportError(const string& desc)
em.runtime(vm::getPos());
em << desc;
em.sync();
- throw handled_error();
+ throw handled_error();
}
// Used internally to report a warning in an operation.
@@ -41,7 +41,7 @@ void reportFatal(const string& desc)
em.sync();
em.statusError();
try {
- throw quit();
+ throw quit();
} catch(handled_error) {
}
}
@@ -50,15 +50,15 @@ void reportError(const ostringstream& desc)
{
reportError(desc.str());
}
-
+
void reportWarning(const ostringstream& desc)
{
reportWarning(desc.str());
}
-
+
void reportFatal(const ostringstream& desc)
{
reportFatal(desc.str());
}
-
+
} // namespace camp
diff --git a/Build/source/utils/asymptote/camperror.h b/Build/source/utils/asymptote/camperror.h
index b6adaaf63fe..cf00d56e0bf 100644
--- a/Build/source/utils/asymptote/camperror.h
+++ b/Build/source/utils/asymptote/camperror.h
@@ -20,10 +20,10 @@ namespace camp {
// Used internally to report an error in an operation.
void reportError(const string& desc);
void reportError(const ostringstream& desc);
-
+
void reportWarning(const string& desc);
void reportWarning(const ostringstream& desc);
-
+
void reportFatal(const string& desc);
void reportFatal(const ostringstream& desc);
diff --git a/Build/source/utils/asymptote/castop.h b/Build/source/utils/asymptote/castop.h
index 1c788687abb..cfabf94eedb 100644
--- a/Build/source/utils/asymptote/castop.h
+++ b/Build/source/utils/asymptote/castop.h
@@ -48,15 +48,10 @@ template<class T>
void castString(vm::stack *s)
{
string *S=pop<string*>(s);
- if(S->empty()) {
- T x=0;
- s->push(x);
- } else {
- try {
- s->push(lexical::cast<T>(*S));
- } catch (lexical::bad_cast&) {
- s->push(vm::Default);
- }
+ try {
+ s->push(lexical::cast<T>(*S));
+ } catch (lexical::bad_cast&) {
+ s->push(vm::Default);
}
}
@@ -107,7 +102,7 @@ void read(vm::stack *s)
}
inline Int Limit(Int nx) {return nx == 0 ? Int_MAX : nx;}
-inline void reportEof(camp::file *f, Int count)
+inline void reportEof(camp::file *f, Int count)
{
if(count > 0) {
ostringstream buf;
@@ -195,19 +190,19 @@ void readArray(vm::stack *s, Int nx=-1, Int ny=-1, Int nz=-1)
template<class T>
void readArray1(vm::stack *s)
{
- readArray<T>(s,0);
+ readArray<T>(s,0);
}
template<class T>
void readArray2(vm::stack *s)
{
- readArray<T>(s,0,0);
+ readArray<T>(s,0,0);
}
template<class T>
void readArray3(vm::stack *s)
{
- readArray<T>(s,0,0,0);
+ readArray<T>(s,0,0,0);
}
} // namespace run
diff --git a/Build/source/utils/asymptote/cc-mode2.el b/Build/source/utils/asymptote/cc-mode2.el
new file mode 100644
index 00000000000..e3eb041d6ab
--- /dev/null
+++ b/Build/source/utils/asymptote/cc-mode2.el
@@ -0,0 +1,38 @@
+(when (require 'cc-mode nil t)
+ (require 'asy-mode nil t)
+
+ (defvar my-c-style '((c-basic-offset . 2)
+ (c-tab-always-indent . nil)
+ (c-offsets-alist . ((innamespace nil)
+ (inline-open nil)
+ (case-label +)
+ ))
+ (c-cleanup-list . (brace-else-brace
+ brace-else-if-brace
+ brace-catch-brace
+ empty-defun-braces
+ defun-close-semi))
+ (c-hanging-braces-alist . ((brace-list-open)
+ (brace-entry-open)
+ (statement-cont)
+ (substatement-open after)
+ (block-close . c-snug-do-while)
+ (extern-lang-open after)
+ (inline-open)
+ (inline-close)
+ (namespace-open after)))
+ (c-hanging-semi&comma-criteria . (c-semi&comma-no-newlines-for-oneline-inliners
+ c-semi&comma-no-newlines-before-nonblanks
+ c-semi&comma-inside-parenlist))
+ ))
+
+ (setq c-mode-hook 'c++-mode)
+
+ (defun c-mode-common-addn() "Additions to c-and-c++-mode."
+ (c-add-style "jcb" my-c-style t)
+;; (c-toggle-auto-hungry-state 1)
+ (auto-fill-mode)
+ )
+
+ (setq c-mode-common-hook 'c-mode-common-addn)
+ )
diff --git a/Build/source/utils/asymptote/coder.cc b/Build/source/utils/asymptote/coder.cc
index 02bb27599ff..1beb3b58606 100644
--- a/Build/source/utils/asymptote/coder.cc
+++ b/Build/source/utils/asymptote/coder.cc
@@ -41,7 +41,7 @@ coder::coder(position pos, string name, modifier sord)
#if SIMPLE_FRAME
: level(frame::indirect_frame(name)),
#else
- : level(new frame(name, 0, 0)),
+ : level(new frame(name, 0, 0)),
#endif
recordLevel(0),
recordType(0),
@@ -63,7 +63,7 @@ coder::coder(position pos, string name, function *t, coder *parent,
: level(reframe ? new frame(name,
parent->getFrame(),
t->sig.getNumFormals()) :
- parent->getFrame()),
+ parent->getFrame()),
recordLevel(parent->recordLevel),
recordType(parent->recordType),
isCodelet(!reframe),
@@ -112,7 +112,7 @@ record *coder::newRecord(symbol id)
frame *underlevel = getFrame();
frame *level = new frame(id, underlevel, 0);
-
+
record *r = new record(id, level);
return r;
@@ -165,7 +165,7 @@ void coder::encodePop()
bool coder::encode(frame *f)
{
frame *toplevel = getFrame();
-
+
if (f == 0) {
encode(inst::constpush,(item)0);
return true;
@@ -225,7 +225,7 @@ label coder::defNewLabel()
{
if (isStatic())
return parent->defNewLabel();
-
+
label l = new label_t();
assert(!l->location.defined());
assert(!l->firstUse.defined());
@@ -266,7 +266,7 @@ void coder::useLabel(inst::opcode op, label label)
{
if (isStatic())
return parent->useLabel(op,label);
-
+
if (label->location.defined()) {
encode(op, label->location);
} else {
@@ -287,7 +287,7 @@ label coder::fwdLabel()
{
if (isStatic())
return parent->fwdLabel();
-
+
// Create a new label without specifying its position.
label l = new label_t();
assert(!l->location.defined());
diff --git a/Build/source/utils/asymptote/coder.h b/Build/source/utils/asymptote/coder.h
index df44b0310ea..e07aa11e639 100644
--- a/Build/source/utils/asymptote/coder.h
+++ b/Build/source/utils/asymptote/coder.h
@@ -62,12 +62,12 @@ class coder {
frame *level;
// The frame of the enclosing record that the "this" expression yields. ie.
- // the highest frame that is a record, not a function.
+ // the highest frame that is a record, not a function.
frame *recordLevel;
// The type of the enclosing record. Also needed for the "this" expression.
record *recordType;
-
+
// Are we translating a codelet?
bool isCodelet;
@@ -94,7 +94,7 @@ class coder {
// TODO: Ensure private fields don't show up calling lookup for a
// record.
permission perm;
-
+
// The function code as its being written. Code points to next place in
// array to write.
vm::program *program;
@@ -139,9 +139,9 @@ public:
coder(position pos,
string name, modifier sord = DEFAULT_DYNAMIC);
-
+
coder(const coder&);
-
+
/* Add a static or dynamic modifier. */
void pushModifier(modifier s)
{
@@ -195,7 +195,7 @@ public:
{
perm = DEFAULT_PERM;
}
-
+
// Says what the return type of the function is.
ty *getReturnType() {
@@ -203,7 +203,7 @@ public:
}
bool isRecord();
-
+
// Creates a new coder to handle the translation of a new function.
coder newFunction(position pos,
string name, function *t, modifier sord=DEFAULT_DYNAMIC);
@@ -345,7 +345,7 @@ public:
// If an address has to be used for a jump instruction before it is
// actually encoded, a handle can be given to it by this function.
// When that handle's label is later defined, the proper address will
- // be inserted into the code where the handle was used.
+ // be inserted into the code where the handle was used.
label fwdLabel();
void pushLoop(label c, label b) {
diff --git a/Build/source/utils/asymptote/common.h b/Build/source/utils/asymptote/common.h
index 8b45967d1f9..80dfef8ac31 100644
--- a/Build/source/utils/asymptote/common.h
+++ b/Build/source/utils/asymptote/common.h
@@ -16,7 +16,7 @@
#include "config.h"
#endif
-#if !defined(FOR_SHARED) && \
+#if !defined(FOR_SHARED) && \
((defined(HAVE_LIBGL) && defined(HAVE_LIBGLUT) && defined(HAVE_LIBGLM)) || \
defined(HAVE_LIBOSMESA))
#define HAVE_GL
@@ -88,4 +88,13 @@ using mem::istringstream;
using mem::ostringstream;
using mem::stringbuf;
-#endif
+static const struct ws_t {} ws={};
+
+// Portable way of skipping whitespace
+inline std::istream &operator >> (std::istream & s, const ws_t &ws) {
+ if(!s.eof())
+ s >> std::ws;
+ return s;
+}
+
+#endif
diff --git a/Build/source/utils/asymptote/config.guess b/Build/source/utils/asymptote/config.guess
index 7f748177972..5fbea7acedd 100755
--- a/Build/source/utils/asymptote/config.guess
+++ b/Build/source/utils/asymptote/config.guess
@@ -1,8 +1,8 @@
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright 1992-2020 Free Software Foundation, Inc.
+# Copyright 1992-2018 Free Software Foundation, Inc.
-timestamp='2020-12-22'
+timestamp='2018-03-08'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -27,12 +27,12 @@ timestamp='2020-12-22'
# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
#
# You can get the latest version of this script from:
-# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
+# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
#
# Please send patches to <config-patches@gnu.org>.
-me=$(echo "$0" | sed -e 's,.*/,,')
+me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
Usage: $0 [OPTION]
@@ -50,7 +50,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright 1992-2020 Free Software Foundation, Inc.
+Copyright 1992-2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -84,6 +84,8 @@ if test $# != 0; then
exit 1
fi
+trap 'exit 1' 1 2 15
+
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
# compiler to aid in system detection is discouraged as it requires
# temporary files to be created and, as you can see below, it is a
@@ -94,82 +96,66 @@ fi
# Portable tmp directory creation inspired by the Autoconf team.
-tmp=
-# shellcheck disable=SC2172
-trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
-
-set_cc_for_build() {
- # prevent multiple calls if $tmp is already set
- test "$tmp" && return 0
- : "${TMPDIR=/tmp}"
- # shellcheck disable=SC2039
- { tmp=$( (umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null) && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
- dummy=$tmp/dummy
- case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
- ,,) echo "int x;" > "$dummy.c"
- for driver in cc gcc c89 c99 ; do
- if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
- CC_FOR_BUILD="$driver"
- break
- fi
- done
- if test x"$CC_FOR_BUILD" = x ; then
- CC_FOR_BUILD=no_compiler_found
- fi
- ;;
- ,,*) CC_FOR_BUILD=$CC ;;
- ,*,*) CC_FOR_BUILD=$HOST_CC ;;
- esac
-}
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > "$dummy.c" ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 1994-08-24)
-if test -f /.attbin/uname ; then
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
PATH=$PATH:/.attbin ; export PATH
fi
-UNAME_MACHINE=$( (uname -m) 2>/dev/null) || UNAME_MACHINE=unknown
-UNAME_RELEASE=$( (uname -r) 2>/dev/null) || UNAME_RELEASE=unknown
-UNAME_SYSTEM=$( (uname -s) 2>/dev/null) || UNAME_SYSTEM=unknown
-UNAME_VERSION=$( (uname -v) 2>/dev/null) || UNAME_VERSION=unknown
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
case "$UNAME_SYSTEM" in
Linux|GNU|GNU/*)
- LIBC=unknown
+ # If the system lacks a compiler, then just pick glibc.
+ # We could probably try harder.
+ LIBC=gnu
- set_cc_for_build
+ eval "$set_cc_for_build"
cat <<-EOF > "$dummy.c"
#include <features.h>
#if defined(__UCLIBC__)
LIBC=uclibc
#elif defined(__dietlibc__)
LIBC=dietlibc
- #elif defined(__GLIBC__)
- LIBC=gnu
#else
- #include <stdarg.h>
- /* First heuristic to detect musl libc. */
- #ifdef __DEFINED_va_list
- LIBC=musl
- #endif
+ LIBC=gnu
#endif
EOF
- eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g')"
+ eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
- # Second heuristic to detect musl libc.
- if [ "$LIBC" = unknown ] &&
- command -v ldd >/dev/null &&
- ldd --version 2>&1 | grep -q ^musl; then
- LIBC=musl
- fi
-
- # If the system lacks a compiler, then just pick glibc.
- # We could probably try harder.
- if [ "$LIBC" = unknown ]; then
- LIBC=gnu
+ # If ldd exists, use it to detect musl libc.
+ if command -v ldd >/dev/null && \
+ ldd --version 2>&1 | grep -q ^musl
+ then
+ LIBC=musl
fi
;;
esac
@@ -189,20 +175,19 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
# Note: NetBSD doesn't particularly care about the vendor
# portion of the name. We always set it to "unknown".
sysctl="sysctl -n hw.machine_arch"
- UNAME_MACHINE_ARCH=$( (uname -p 2>/dev/null || \
+ UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
"/sbin/$sysctl" 2>/dev/null || \
"/usr/sbin/$sysctl" 2>/dev/null || \
- echo unknown))
+ echo unknown)`
case "$UNAME_MACHINE_ARCH" in
- aarch64eb) machine=aarch64_be-unknown ;;
armeb) machine=armeb-unknown ;;
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
sh5el) machine=sh5le-unknown ;;
earmv*)
- arch=$(echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,')
- endian=$(echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p')
+ arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+ endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
machine="${arch}${endian}"-unknown
;;
*) machine="$UNAME_MACHINE_ARCH"-unknown ;;
@@ -214,7 +199,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
os=netbsdelf
;;
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
- set_cc_for_build
+ eval "$set_cc_for_build"
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ELF__
then
@@ -233,7 +218,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
case "$UNAME_MACHINE_ARCH" in
earm*)
expr='s/^earmv[0-9]/-eabi/;s/eb$//'
- abi=$(echo "$UNAME_MACHINE_ARCH" | sed -e "$expr")
+ abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
;;
esac
# The OS release
@@ -246,24 +231,24 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
release='-gnu'
;;
*)
- release=$(echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2)
+ release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
;;
esac
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
- echo "$machine-${os}${release}${abi-}"
+ echo "$machine-${os}${release}${abi}"
exit ;;
*:Bitrig:*:*)
- UNAME_MACHINE_ARCH=$(arch | sed 's/Bitrig.//')
+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
exit ;;
*:OpenBSD:*:*)
- UNAME_MACHINE_ARCH=$(arch | sed 's/OpenBSD.//')
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
exit ;;
*:LibertyBSD:*:*)
- UNAME_MACHINE_ARCH=$(arch | sed 's/^.*BSD\.//')
+ UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
exit ;;
*:MidnightBSD:*:*)
@@ -275,9 +260,6 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
*:SolidBSD:*:*)
echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
exit ;;
- *:OS108:*:*)
- echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE"
- exit ;;
macppc:MirBSD:*:*)
echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
exit ;;
@@ -287,29 +269,26 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
*:Sortix:*:*)
echo "$UNAME_MACHINE"-unknown-sortix
exit ;;
- *:Twizzler:*:*)
- echo "$UNAME_MACHINE"-unknown-twizzler
- exit ;;
*:Redox:*:*)
echo "$UNAME_MACHINE"-unknown-redox
exit ;;
mips:OSF1:*.*)
- echo mips-dec-osf1
- exit ;;
+ echo mips-dec-osf1
+ exit ;;
alpha:OSF1:*:*)
case $UNAME_RELEASE in
*4.0)
- UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $3}')
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
;;
*5.*)
- UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $4}')
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
;;
esac
# According to Compaq, /usr/sbin/psrinfo has been available on
# OSF/1 and Tru64 systems produced since 1995. I hope that
# covers most systems running today. This code pipes the CPU
# types through head -n 1, so we only detect the type of CPU 0.
- ALPHA_CPU_TYPE=$(/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1)
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
case "$ALPHA_CPU_TYPE" in
"EV4 (21064)")
UNAME_MACHINE=alpha ;;
@@ -347,7 +326,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
- echo "$UNAME_MACHINE"-dec-osf"$(echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz)"
+ echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
exitcode=$?
trap '' 0
@@ -381,7 +360,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
exit ;;
Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
- if test "$( (/bin/universe) 2>/dev/null)" = att ; then
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
echo pyramid-pyramid-sysv3
else
echo pyramid-pyramid-bsd
@@ -394,28 +373,28 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
echo sparc-icl-nx6
exit ;;
DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
- case $(/usr/bin/uname -p) in
+ case `/usr/bin/uname -p` in
sparc) echo sparc-icl-nx7; exit ;;
esac ;;
s390x:SunOS:*:*)
- echo "$UNAME_MACHINE"-ibm-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')"
+ echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
exit ;;
sun4H:SunOS:5.*:*)
- echo sparc-hal-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')"
+ echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
exit ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
- echo sparc-sun-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')"
+ echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
exit ;;
i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
echo i386-pc-auroraux"$UNAME_RELEASE"
exit ;;
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
- set_cc_for_build
+ eval "$set_cc_for_build"
SUN_ARCH=i386
# If there is a compiler, see if it is configured for 64-bit objects.
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
# This test works for both compilers.
- if test "$CC_FOR_BUILD" != no_compiler_found; then
+ if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
@@ -423,30 +402,30 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
SUN_ARCH=x86_64
fi
fi
- echo "$SUN_ARCH"-pc-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')"
+ echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
exit ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
# it's likely to be more like Solaris than SunOS4.
- echo sparc-sun-solaris3"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')"
+ echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
exit ;;
sun4*:SunOS:*:*)
- case "$(/usr/bin/arch -k)" in
+ case "`/usr/bin/arch -k`" in
Series*|S4*)
- UNAME_RELEASE=$(uname -v)
+ UNAME_RELEASE=`uname -v`
;;
esac
# Japanese Language versions have a version number like `4.1.3-JL'.
- echo sparc-sun-sunos"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/')"
+ echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
exit ;;
sun3*:SunOS:*:*)
echo m68k-sun-sunos"$UNAME_RELEASE"
exit ;;
sun*:*:4.2BSD:*)
- UNAME_RELEASE=$( (sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
- case "$(/bin/arch)" in
+ case "`/bin/arch`" in
sun3)
echo m68k-sun-sunos"$UNAME_RELEASE"
;;
@@ -503,7 +482,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
echo clipper-intergraph-clix"$UNAME_RELEASE"
exit ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
- set_cc_for_build
+ eval "$set_cc_for_build"
sed 's/^ //' << EOF > "$dummy.c"
#ifdef __cplusplus
#include <stdio.h> /* for printf() prototype */
@@ -526,8 +505,8 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
}
EOF
$CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
- dummyarg=$(echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p') &&
- SYSTEM_NAME=$("$dummy" "$dummyarg") &&
+ dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
{ echo "$SYSTEM_NAME"; exit; }
echo mips-mips-riscos"$UNAME_RELEASE"
exit ;;
@@ -554,11 +533,11 @@ EOF
exit ;;
AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures
- UNAME_PROCESSOR=$(/usr/bin/uname -p)
- if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
then
- if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \
- test "$TARGET_BINARY_INTERFACE"x = x
+ if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
+ [ "$TARGET_BINARY_INTERFACE"x = x ]
then
echo m88k-dg-dgux"$UNAME_RELEASE"
else
@@ -582,17 +561,17 @@ EOF
echo m68k-tektronix-bsd
exit ;;
*:IRIX*:*:*)
- echo mips-sgi-irix"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/g')"
+ echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
exit ;;
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
- exit ;; # Note that: echo "'$(uname -s)'" gives 'AIX '
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
i*86:AIX:*:*)
echo i386-ibm-aix
exit ;;
ia64:AIX:*:*)
- if test -x /usr/bin/oslevel ; then
- IBM_REV=$(/usr/bin/oslevel)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
else
IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
fi
@@ -600,7 +579,7 @@ EOF
exit ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
- set_cc_for_build
+ eval "$set_cc_for_build"
sed 's/^ //' << EOF > "$dummy.c"
#include <sys/systemcfg.h>
@@ -612,7 +591,7 @@ EOF
exit(0);
}
EOF
- if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=$("$dummy")
+ if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
then
echo "$SYSTEM_NAME"
else
@@ -625,15 +604,15 @@ EOF
fi
exit ;;
*:AIX:*:[4567])
- IBM_CPU_ID=$(/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }')
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
else
IBM_ARCH=powerpc
fi
- if test -x /usr/bin/lslpp ; then
- IBM_REV=$(/usr/bin/lslpp -Lqc bos.rte.libc |
- awk -F: '{ print $3 }' | sed s/[0-9]*$/0/)
+ if [ -x /usr/bin/lslpp ] ; then
+ IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
+ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
else
IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
fi
@@ -661,14 +640,14 @@ EOF
echo m68k-hp-bsd4.4
exit ;;
9000/[34678]??:HP-UX:*:*)
- HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//')
+ HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
case "$UNAME_MACHINE" in
9000/31?) HP_ARCH=m68000 ;;
9000/[34]??) HP_ARCH=m68k ;;
9000/[678][0-9][0-9])
- if test -x /usr/bin/getconf; then
- sc_cpu_version=$(/usr/bin/getconf SC_CPU_VERSION 2>/dev/null)
- sc_kernel_bits=$(/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null)
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
case "$sc_cpu_version" in
523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
@@ -680,8 +659,8 @@ EOF
esac ;;
esac
fi
- if test "$HP_ARCH" = ""; then
- set_cc_for_build
+ if [ "$HP_ARCH" = "" ]; then
+ eval "$set_cc_for_build"
sed 's/^ //' << EOF > "$dummy.c"
#define _HPUX_SOURCE
@@ -715,13 +694,13 @@ EOF
exit (0);
}
EOF
- (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=$("$dummy")
+ (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
test -z "$HP_ARCH" && HP_ARCH=hppa
fi ;;
esac
- if test "$HP_ARCH" = hppa2.0w
+ if [ "$HP_ARCH" = hppa2.0w ]
then
- set_cc_for_build
+ eval "$set_cc_for_build"
# hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
# 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
@@ -743,11 +722,11 @@ EOF
echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
exit ;;
ia64:HP-UX:*:*)
- HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//')
+ HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
echo ia64-hp-hpux"$HPUX_REV"
exit ;;
3050*:HI-UX:*:*)
- set_cc_for_build
+ eval "$set_cc_for_build"
sed 's/^ //' << EOF > "$dummy.c"
#include <unistd.h>
int
@@ -773,7 +752,7 @@ EOF
exit (0);
}
EOF
- $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=$("$dummy") &&
+ $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
{ echo "$SYSTEM_NAME"; exit; }
echo unknown-hitachi-hiuxwe2
exit ;;
@@ -793,7 +772,7 @@ EOF
echo hppa1.0-hp-osf
exit ;;
i*86:OSF1:*:*)
- if test -x /usr/sbin/sysversion ; then
+ if [ -x /usr/sbin/sysversion ] ; then
echo "$UNAME_MACHINE"-unknown-osf1mk
else
echo "$UNAME_MACHINE"-unknown-osf1
@@ -842,14 +821,14 @@ EOF
echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
exit ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
- FUJITSU_PROC=$(uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz)
- FUJITSU_SYS=$(uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///')
- FUJITSU_REL=$(echo "$UNAME_RELEASE" | sed -e 's/ /_/')
+ FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+ FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
5000:UNIX_System_V:4.*:*)
- FUJITSU_SYS=$(uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///')
- FUJITSU_REL=$(echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/')
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+ FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
@@ -861,26 +840,15 @@ EOF
*:BSD/OS:*:*)
echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
exit ;;
- arm:FreeBSD:*:*)
- UNAME_PROCESSOR=$(uname -p)
- set_cc_for_build
- if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ARM_PCS_VFP
- then
- echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|sed -e 's/[-(].*//')"-gnueabi
- else
- echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|sed -e 's/[-(].*//')"-gnueabihf
- fi
- exit ;;
*:FreeBSD:*:*)
- UNAME_PROCESSOR=$(/usr/bin/uname -p)
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
case "$UNAME_PROCESSOR" in
amd64)
UNAME_PROCESSOR=x86_64 ;;
i386)
UNAME_PROCESSOR=i586 ;;
esac
- echo "$UNAME_PROCESSOR"-unknown-freebsd"$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')"
+ echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
exit ;;
i*:CYGWIN*:*)
echo "$UNAME_MACHINE"-pc-cygwin
@@ -913,21 +881,21 @@ EOF
echo "$UNAME_MACHINE"-pc-uwin
exit ;;
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
- echo x86_64-pc-cygwin
+ echo x86_64-unknown-cygwin
exit ;;
prep*:SunOS:5.*:*)
- echo powerpcle-unknown-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')"
+ echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
exit ;;
*:GNU:*:*)
# the GNU system
- echo "$(echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,')-unknown-$LIBC$(echo "$UNAME_RELEASE"|sed -e 's,/.*$,,')"
+ echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
- echo "$UNAME_MACHINE-unknown-$(echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]")$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')-$LIBC"
+ echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
exit ;;
- *:Minix:*:*)
- echo "$UNAME_MACHINE"-unknown-minix
+ i*86:Minix:*:*)
+ echo "$UNAME_MACHINE"-pc-minix
exit ;;
aarch64:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
@@ -937,7 +905,7 @@ EOF
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
alpha:Linux:*:*)
- case $(sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null) in
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
EV56) UNAME_MACHINE=alphaev56 ;;
PCA56) UNAME_MACHINE=alphapca56 ;;
@@ -954,7 +922,7 @@ EOF
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
arm*:Linux:*:*)
- set_cc_for_build
+ eval "$set_cc_for_build"
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
@@ -996,9 +964,6 @@ EOF
k1om:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
- loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
- echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
- exit ;;
m32r*:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
@@ -1006,51 +971,23 @@ EOF
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
mips:Linux:*:* | mips64:Linux:*:*)
- set_cc_for_build
- IS_GLIBC=0
- test x"${LIBC}" = xgnu && IS_GLIBC=1
+ eval "$set_cc_for_build"
sed 's/^ //' << EOF > "$dummy.c"
#undef CPU
- #undef mips
- #undef mipsel
- #undef mips64
- #undef mips64el
- #if ${IS_GLIBC} && defined(_ABI64)
- LIBCABI=gnuabi64
- #else
- #if ${IS_GLIBC} && defined(_ABIN32)
- LIBCABI=gnuabin32
- #else
- LIBCABI=${LIBC}
- #endif
- #endif
-
- #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
- CPU=mipsisa64r6
- #else
- #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
- CPU=mipsisa32r6
- #else
- #if defined(__mips64)
- CPU=mips64
- #else
- CPU=mips
- #endif
- #endif
- #endif
-
+ #undef ${UNAME_MACHINE}
+ #undef ${UNAME_MACHINE}el
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- MIPS_ENDIAN=el
+ CPU=${UNAME_MACHINE}el
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- MIPS_ENDIAN=
+ CPU=${UNAME_MACHINE}
#else
- MIPS_ENDIAN=
+ CPU=
#endif
#endif
EOF
- eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI')"
- test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
+ eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
+ test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
;;
mips64el:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
@@ -1069,7 +1006,7 @@ EOF
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
- case $(grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2) in
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
*) echo hppa-unknown-linux-"$LIBC" ;;
@@ -1109,17 +1046,7 @@ EOF
echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
exit ;;
x86_64:Linux:*:*)
- set_cc_for_build
- LIBCABI=$LIBC
- if test "$CC_FOR_BUILD" != no_compiler_found; then
- if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
- (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_X32 >/dev/null
- then
- LIBCABI="$LIBC"x32
- fi
- fi
- echo "$UNAME_MACHINE"-pc-linux-"$LIBCABI"
+ echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
exit ;;
xtensa*:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
@@ -1159,7 +1086,7 @@ EOF
echo "$UNAME_MACHINE"-pc-msdosdjgpp
exit ;;
i*86:*:4.*:*)
- UNAME_REL=$(echo "$UNAME_RELEASE" | sed 's/\/MP$//')
+ UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
else
@@ -1168,19 +1095,19 @@ EOF
exit ;;
i*86:*:5:[678]*)
# UnixWare 7.x, OpenUNIX and OpenServer 6.
- case $(/bin/uname -X | grep "^Machine") in
+ case `/bin/uname -X | grep "^Machine"` in
*486*) UNAME_MACHINE=i486 ;;
*Pentium) UNAME_MACHINE=i586 ;;
*Pent*|*Celeron) UNAME_MACHINE=i686 ;;
esac
- echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}"
+ echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
exit ;;
i*86:*:3.2:*)
if test -f /usr/options/cb.name; then
- UNAME_REL=$(sed -n 's/.*Version //p' </usr/options/cb.name)
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL"
elif /bin/uname -X 2>/dev/null >/dev/null ; then
- UNAME_REL=$( (/bin/uname -X|grep Release|sed -e 's/.*= //'))
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
&& UNAME_MACHINE=i586
@@ -1230,7 +1157,7 @@ EOF
3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
- && OS_REL=.$(sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid)
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
@@ -1241,7 +1168,7 @@ EOF
NCR*:*:4.2:* | MPRAS*:*:4.2:*)
OS_REL='.3'
test -r /etc/.relid \
- && OS_REL=.$(sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid)
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
@@ -1274,7 +1201,7 @@ EOF
exit ;;
*:SINIX-*:*:*)
if uname -p 2>/dev/null >/dev/null ; then
- UNAME_MACHINE=$( (uname -p) 2>/dev/null)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
echo "$UNAME_MACHINE"-sni-sysv4
else
echo ns32k-sni-sysv
@@ -1308,7 +1235,7 @@ EOF
echo mips-sony-newsos6
exit ;;
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
- if test -d /usr/nec; then
+ if [ -d /usr/nec ]; then
echo mips-nec-sysv"$UNAME_RELEASE"
else
echo mips-unknown-sysv"$UNAME_RELEASE"
@@ -1356,48 +1283,44 @@ EOF
*:Rhapsody:*:*)
echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
exit ;;
- arm64:Darwin:*:*)
- echo aarch64-apple-darwin"$UNAME_RELEASE"
- exit ;;
*:Darwin:*:*)
- UNAME_PROCESSOR=$(uname -p)
- case $UNAME_PROCESSOR in
- unknown) UNAME_PROCESSOR=powerpc ;;
- esac
- if command -v xcode-select > /dev/null 2> /dev/null && \
- ! xcode-select --print-path > /dev/null 2> /dev/null ; then
- # Avoid executing cc if there is no toolchain installed as
- # cc will be a stub that puts up a graphical alert
- # prompting the user to install developer tools.
- CC_FOR_BUILD=no_compiler_found
- else
- set_cc_for_build
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ eval "$set_cc_for_build"
+ if test "$UNAME_PROCESSOR" = unknown ; then
+ UNAME_PROCESSOR=powerpc
fi
- if test "$CC_FOR_BUILD" != no_compiler_found; then
- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- case $UNAME_PROCESSOR in
- i386) UNAME_PROCESSOR=x86_64 ;;
- powerpc) UNAME_PROCESSOR=powerpc64 ;;
- esac
- fi
- # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
- if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
- (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_PPC >/dev/null
- then
- UNAME_PROCESSOR=powerpc
+ if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
+ if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ case $UNAME_PROCESSOR in
+ i386) UNAME_PROCESSOR=x86_64 ;;
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
+ esac
+ fi
+ # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
+ if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_PPC >/dev/null
+ then
+ UNAME_PROCESSOR=powerpc
+ fi
fi
elif test "$UNAME_PROCESSOR" = i386 ; then
- # uname -m returns i386 or x86_64
- UNAME_PROCESSOR=$UNAME_MACHINE
+ # Avoid executing cc on OS X 10.9, as it ships with a stub
+ # that puts up a graphical alert prompting to install
+ # developer tools. Any system running Mac OS X 10.7 or
+ # later (Darwin 11 and later) is required to have a 64-bit
+ # processor. This is not true of the ARM version of Darwin
+ # that Apple uses in portable devices.
+ UNAME_PROCESSOR=x86_64
fi
echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
- UNAME_PROCESSOR=$(uname -p)
+ UNAME_PROCESSOR=`uname -p`
if test "$UNAME_PROCESSOR" = x86; then
UNAME_PROCESSOR=i386
UNAME_MACHINE=pc
@@ -1435,7 +1358,6 @@ EOF
# "uname -m" is not consistent, so use $cputype instead. 386
# is converted to i386 for consistency with other x86
# operating systems.
- # shellcheck disable=SC2154
if test "$cputype" = 386; then
UNAME_MACHINE=i386
else
@@ -1465,10 +1387,10 @@ EOF
echo mips-sei-seiux"$UNAME_RELEASE"
exit ;;
*:DragonFly:*:*)
- echo "$UNAME_MACHINE"-unknown-dragonfly"$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')"
+ echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
exit ;;
*:*VMS:*:*)
- UNAME_MACHINE=$( (uname -p) 2>/dev/null)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
case "$UNAME_MACHINE" in
A*) echo alpha-dec-vms ; exit ;;
I*) echo ia64-dec-vms ; exit ;;
@@ -1478,7 +1400,7 @@ EOF
echo i386-pc-xenix
exit ;;
i*86:skyos:*:*)
- echo "$UNAME_MACHINE"-pc-skyos"$(echo "$UNAME_RELEASE" | sed -e 's/ .*$//')"
+ echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`"
exit ;;
i*86:rdos:*:*)
echo "$UNAME_MACHINE"-pc-rdos
@@ -1492,51 +1414,71 @@ EOF
amd64:Isilon\ OneFS:*:*)
echo x86_64-unknown-onefs
exit ;;
- *:Unleashed:*:*)
- echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE"
- exit ;;
esac
-# No uname command or uname output not recognized.
-set_cc_for_build
-cat > "$dummy.c" <<EOF
-#ifdef _SEQUENT_
-#include <sys/types.h>
-#include <sys/utsname.h>
-#endif
-#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
-#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
-#include <signal.h>
-#if defined(_SIZE_T_) || defined(SIGLOST)
-#include <sys/utsname.h>
-#endif
-#endif
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
- /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
- I don't know.... */
- printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
- printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
- "4"
-#else
- ""
-#endif
- ); exit (0);
-#endif
-#endif
+echo "$0: unable to guess system type" >&2
+
+case "$UNAME_MACHINE:$UNAME_SYSTEM" in
+ mips:Linux | mips64:Linux)
+ # If we got here on MIPS GNU/Linux, output extra information.
+ cat >&2 <<EOF
+
+NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
+the system type. Please install a C compiler and try again.
+EOF
+ ;;
+esac
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
+cat >&2 <<EOF
+
+This script (version $timestamp), has failed to recognize the
+operating system you are using. If your script is old, overwrite *all*
+copies of config.guess and config.sub with the latest versions from:
+
+ https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+and
+ https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+
+If $0 has already been updated, send the following data and any
+information you think might be pertinent to config-patches@gnu.org to
+provide the necessary information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = "$UNAME_MACHINE"
+UNAME_RELEASE = "$UNAME_RELEASE"
+UNAME_SYSTEM = "$UNAME_SYSTEM"
+UNAME_VERSION = "$UNAME_VERSION"
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
+CTURE__)
#define __ARCHITECTURE__ "m68k"
#endif
int version;
- version=$( (hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null);
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
if (version < 4)
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
else
@@ -1628,7 +1570,7 @@ main ()
}
EOF
-$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=$($dummy) &&
+$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`$dummy` &&
{ echo "$SYSTEM_NAME"; exit; }
# Apollos put the system type in the environment.
@@ -1653,15 +1595,9 @@ This script (version $timestamp), has failed to recognize the
operating system you are using. If your script is old, overwrite *all*
copies of config.guess and config.sub with the latest versions from:
- https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
+ https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
and
- https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
-EOF
-
-year=$(echo $timestamp | sed 's,-.*,,')
-# shellcheck disable=SC2003
-if test "$(expr "$(date +%Y)" - "$year")" -lt 3 ; then
- cat >&2 <<EOF
+ https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
If $0 has already been updated, send the following data and any
information you think might be pertinent to config-patches@gnu.org to
@@ -1669,27 +1605,26 @@ provide the necessary information to handle your system.
config.guess timestamp = $timestamp
-uname -m = $( (uname -m) 2>/dev/null || echo unknown)
-uname -r = $( (uname -r) 2>/dev/null || echo unknown)
-uname -s = $( (uname -s) 2>/dev/null || echo unknown)
-uname -v = $( (uname -v) 2>/dev/null || echo unknown)
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
-/usr/bin/uname -p = $( (/usr/bin/uname -p) 2>/dev/null)
-/bin/uname -X = $( (/bin/uname -X) 2>/dev/null)
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
-hostinfo = $( (hostinfo) 2>/dev/null)
-/bin/universe = $( (/bin/universe) 2>/dev/null)
-/usr/bin/arch -k = $( (/usr/bin/arch -k) 2>/dev/null)
-/bin/arch = $( (/bin/arch) 2>/dev/null)
-/usr/bin/oslevel = $( (/usr/bin/oslevel) 2>/dev/null)
-/usr/convex/getsysinfo = $( (/usr/convex/getsysinfo) 2>/dev/null)
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
UNAME_MACHINE = "$UNAME_MACHINE"
UNAME_RELEASE = "$UNAME_RELEASE"
UNAME_SYSTEM = "$UNAME_SYSTEM"
UNAME_VERSION = "$UNAME_VERSION"
EOF
-fi
exit 1
diff --git a/Build/source/utils/asymptote/config.h.in b/Build/source/utils/asymptote/config.h.in
index 1bc91cc1cee..c6b6c524e7c 100644
--- a/Build/source/utils/asymptote/config.h.in
+++ b/Build/source/utils/asymptote/config.h.in
@@ -45,6 +45,9 @@
/* Define to 1 if you have the `lgamma' function. */
#undef HAVE_LGAMMA
+/* Define to 1 if you have the `curl' library (-lcurl). */
+#undef HAVE_LIBCURL
+
/* Define to 1 if you have the `ncurses' library (-lncurses). */
#undef HAVE_LIBCURSES
diff --git a/Build/source/utils/asymptote/config.sub b/Build/source/utils/asymptote/config.sub
index 90bb8aeda63..f02d43ad500 100755
--- a/Build/source/utils/asymptote/config.sub
+++ b/Build/source/utils/asymptote/config.sub
@@ -2,7 +2,7 @@
# Configuration validation subroutine script.
# Copyright 1992-2020 Free Software Foundation, Inc.
-timestamp='2020-12-22'
+timestamp='2020-01-01'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -33,7 +33,7 @@ timestamp='2020-12-22'
# Otherwise, we print the canonical config type on stdout and succeed.
# You can get the latest version of this script from:
-# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
+# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
@@ -50,7 +50,7 @@ timestamp='2020-12-22'
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
# It is wrong to echo any other type of specification.
-me=$(echo "$0" | sed -e 's,.*/,,')
+me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
@@ -124,27 +124,28 @@ case $1 in
;;
*-*-*-*)
basic_machine=$field1-$field2
- basic_os=$field3-$field4
+ os=$field3-$field4
;;
*-*-*)
# Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
# parts
maybe_os=$field2-$field3
case $maybe_os in
- nto-qnx* | linux-* | uclinux-uclibc* \
+ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \
+ | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \
| uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
| netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
| storm-chaos* | os2-emx* | rtmk-nova*)
basic_machine=$field1
- basic_os=$maybe_os
+ os=$maybe_os
;;
android-linux)
basic_machine=$field1-unknown
- basic_os=linux-android
+ os=linux-android
;;
*)
basic_machine=$field1-$field2
- basic_os=$field3
+ os=$field3
;;
esac
;;
@@ -153,7 +154,7 @@ case $1 in
case $field1-$field2 in
decstation-3100)
basic_machine=mips-dec
- basic_os=
+ os=
;;
*-*)
# Second component is usually, but not always the OS
@@ -161,7 +162,7 @@ case $1 in
# Prevent following clause from handling this valid os
sun*os*)
basic_machine=$field1
- basic_os=$field2
+ os=$field2
;;
# Manufacturers
dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
@@ -174,11 +175,11 @@ case $1 in
| microblaze* | sim | cisco \
| oki | wec | wrs | winbond)
basic_machine=$field1-$field2
- basic_os=
+ os=
;;
*)
basic_machine=$field1
- basic_os=$field2
+ os=$field2
;;
esac
;;
@@ -190,451 +191,447 @@ case $1 in
case $field1 in
386bsd)
basic_machine=i386-pc
- basic_os=bsd
+ os=bsd
;;
a29khif)
basic_machine=a29k-amd
- basic_os=udi
+ os=udi
;;
adobe68k)
basic_machine=m68010-adobe
- basic_os=scout
+ os=scout
;;
alliant)
basic_machine=fx80-alliant
- basic_os=
+ os=
;;
altos | altos3068)
basic_machine=m68k-altos
- basic_os=
+ os=
;;
am29k)
basic_machine=a29k-none
- basic_os=bsd
+ os=bsd
;;
amdahl)
basic_machine=580-amdahl
- basic_os=sysv
+ os=sysv
;;
amiga)
basic_machine=m68k-unknown
- basic_os=
+ os=
;;
amigaos | amigados)
basic_machine=m68k-unknown
- basic_os=amigaos
+ os=amigaos
;;
amigaunix | amix)
basic_machine=m68k-unknown
- basic_os=sysv4
+ os=sysv4
;;
apollo68)
basic_machine=m68k-apollo
- basic_os=sysv
+ os=sysv
;;
apollo68bsd)
basic_machine=m68k-apollo
- basic_os=bsd
+ os=bsd
;;
aros)
basic_machine=i386-pc
- basic_os=aros
+ os=aros
;;
aux)
basic_machine=m68k-apple
- basic_os=aux
+ os=aux
;;
balance)
basic_machine=ns32k-sequent
- basic_os=dynix
+ os=dynix
;;
blackfin)
basic_machine=bfin-unknown
- basic_os=linux
+ os=linux
;;
cegcc)
basic_machine=arm-unknown
- basic_os=cegcc
+ os=cegcc
;;
convex-c1)
basic_machine=c1-convex
- basic_os=bsd
+ os=bsd
;;
convex-c2)
basic_machine=c2-convex
- basic_os=bsd
+ os=bsd
;;
convex-c32)
basic_machine=c32-convex
- basic_os=bsd
+ os=bsd
;;
convex-c34)
basic_machine=c34-convex
- basic_os=bsd
+ os=bsd
;;
convex-c38)
basic_machine=c38-convex
- basic_os=bsd
+ os=bsd
;;
cray)
basic_machine=j90-cray
- basic_os=unicos
+ os=unicos
;;
crds | unos)
basic_machine=m68k-crds
- basic_os=
+ os=
;;
da30)
basic_machine=m68k-da30
- basic_os=
+ os=
;;
decstation | pmax | pmin | dec3100 | decstatn)
basic_machine=mips-dec
- basic_os=
+ os=
;;
delta88)
basic_machine=m88k-motorola
- basic_os=sysv3
+ os=sysv3
;;
dicos)
basic_machine=i686-pc
- basic_os=dicos
+ os=dicos
;;
djgpp)
basic_machine=i586-pc
- basic_os=msdosdjgpp
+ os=msdosdjgpp
;;
ebmon29k)
basic_machine=a29k-amd
- basic_os=ebmon
+ os=ebmon
;;
es1800 | OSE68k | ose68k | ose | OSE)
basic_machine=m68k-ericsson
- basic_os=ose
+ os=ose
;;
gmicro)
basic_machine=tron-gmicro
- basic_os=sysv
+ os=sysv
;;
go32)
basic_machine=i386-pc
- basic_os=go32
+ os=go32
;;
h8300hms)
basic_machine=h8300-hitachi
- basic_os=hms
+ os=hms
;;
h8300xray)
basic_machine=h8300-hitachi
- basic_os=xray
+ os=xray
;;
h8500hms)
basic_machine=h8500-hitachi
- basic_os=hms
+ os=hms
;;
harris)
basic_machine=m88k-harris
- basic_os=sysv3
+ os=sysv3
;;
hp300 | hp300hpux)
basic_machine=m68k-hp
- basic_os=hpux
+ os=hpux
;;
hp300bsd)
basic_machine=m68k-hp
- basic_os=bsd
+ os=bsd
;;
hppaosf)
basic_machine=hppa1.1-hp
- basic_os=osf
+ os=osf
;;
hppro)
basic_machine=hppa1.1-hp
- basic_os=proelf
+ os=proelf
;;
i386mach)
basic_machine=i386-mach
- basic_os=mach
+ os=mach
;;
isi68 | isi)
basic_machine=m68k-isi
- basic_os=sysv
+ os=sysv
;;
m68knommu)
basic_machine=m68k-unknown
- basic_os=linux
+ os=linux
;;
magnum | m3230)
basic_machine=mips-mips
- basic_os=sysv
+ os=sysv
;;
merlin)
basic_machine=ns32k-utek
- basic_os=sysv
+ os=sysv
;;
mingw64)
basic_machine=x86_64-pc
- basic_os=mingw64
+ os=mingw64
;;
mingw32)
basic_machine=i686-pc
- basic_os=mingw32
+ os=mingw32
;;
mingw32ce)
basic_machine=arm-unknown
- basic_os=mingw32ce
+ os=mingw32ce
;;
monitor)
basic_machine=m68k-rom68k
- basic_os=coff
+ os=coff
;;
morphos)
basic_machine=powerpc-unknown
- basic_os=morphos
+ os=morphos
;;
moxiebox)
basic_machine=moxie-unknown
- basic_os=moxiebox
+ os=moxiebox
;;
msdos)
basic_machine=i386-pc
- basic_os=msdos
+ os=msdos
;;
msys)
basic_machine=i686-pc
- basic_os=msys
+ os=msys
;;
mvs)
basic_machine=i370-ibm
- basic_os=mvs
+ os=mvs
;;
nacl)
basic_machine=le32-unknown
- basic_os=nacl
+ os=nacl
;;
ncr3000)
basic_machine=i486-ncr
- basic_os=sysv4
+ os=sysv4
;;
netbsd386)
basic_machine=i386-pc
- basic_os=netbsd
+ os=netbsd
;;
netwinder)
basic_machine=armv4l-rebel
- basic_os=linux
+ os=linux
;;
news | news700 | news800 | news900)
basic_machine=m68k-sony
- basic_os=newsos
+ os=newsos
;;
news1000)
basic_machine=m68030-sony
- basic_os=newsos
+ os=newsos
;;
necv70)
basic_machine=v70-nec
- basic_os=sysv
+ os=sysv
;;
nh3000)
basic_machine=m68k-harris
- basic_os=cxux
+ os=cxux
;;
nh[45]000)
basic_machine=m88k-harris
- basic_os=cxux
+ os=cxux
;;
nindy960)
basic_machine=i960-intel
- basic_os=nindy
+ os=nindy
;;
mon960)
basic_machine=i960-intel
- basic_os=mon960
+ os=mon960
;;
nonstopux)
basic_machine=mips-compaq
- basic_os=nonstopux
+ os=nonstopux
;;
os400)
basic_machine=powerpc-ibm
- basic_os=os400
+ os=os400
;;
OSE68000 | ose68000)
basic_machine=m68000-ericsson
- basic_os=ose
+ os=ose
;;
os68k)
basic_machine=m68k-none
- basic_os=os68k
+ os=os68k
;;
paragon)
basic_machine=i860-intel
- basic_os=osf
+ os=osf
;;
parisc)
basic_machine=hppa-unknown
- basic_os=linux
- ;;
- psp)
- basic_machine=mipsallegrexel-sony
- basic_os=psp
+ os=linux
;;
pw32)
basic_machine=i586-unknown
- basic_os=pw32
+ os=pw32
;;
rdos | rdos64)
basic_machine=x86_64-pc
- basic_os=rdos
+ os=rdos
;;
rdos32)
basic_machine=i386-pc
- basic_os=rdos
+ os=rdos
;;
rom68k)
basic_machine=m68k-rom68k
- basic_os=coff
+ os=coff
;;
sa29200)
basic_machine=a29k-amd
- basic_os=udi
+ os=udi
;;
sei)
basic_machine=mips-sei
- basic_os=seiux
+ os=seiux
;;
sequent)
basic_machine=i386-sequent
- basic_os=
+ os=
;;
sps7)
basic_machine=m68k-bull
- basic_os=sysv2
+ os=sysv2
;;
st2000)
basic_machine=m68k-tandem
- basic_os=
+ os=
;;
stratus)
basic_machine=i860-stratus
- basic_os=sysv4
+ os=sysv4
;;
sun2)
basic_machine=m68000-sun
- basic_os=
+ os=
;;
sun2os3)
basic_machine=m68000-sun
- basic_os=sunos3
+ os=sunos3
;;
sun2os4)
basic_machine=m68000-sun
- basic_os=sunos4
+ os=sunos4
;;
sun3)
basic_machine=m68k-sun
- basic_os=
+ os=
;;
sun3os3)
basic_machine=m68k-sun
- basic_os=sunos3
+ os=sunos3
;;
sun3os4)
basic_machine=m68k-sun
- basic_os=sunos4
+ os=sunos4
;;
sun4)
basic_machine=sparc-sun
- basic_os=
+ os=
;;
sun4os3)
basic_machine=sparc-sun
- basic_os=sunos3
+ os=sunos3
;;
sun4os4)
basic_machine=sparc-sun
- basic_os=sunos4
+ os=sunos4
;;
sun4sol2)
basic_machine=sparc-sun
- basic_os=solaris2
+ os=solaris2
;;
sun386 | sun386i | roadrunner)
basic_machine=i386-sun
- basic_os=
+ os=
;;
sv1)
basic_machine=sv1-cray
- basic_os=unicos
+ os=unicos
;;
symmetry)
basic_machine=i386-sequent
- basic_os=dynix
+ os=dynix
;;
t3e)
basic_machine=alphaev5-cray
- basic_os=unicos
+ os=unicos
;;
t90)
basic_machine=t90-cray
- basic_os=unicos
+ os=unicos
;;
toad1)
basic_machine=pdp10-xkl
- basic_os=tops20
+ os=tops20
;;
tpf)
basic_machine=s390x-ibm
- basic_os=tpf
+ os=tpf
;;
udi29k)
basic_machine=a29k-amd
- basic_os=udi
+ os=udi
;;
ultra3)
basic_machine=a29k-nyu
- basic_os=sym1
+ os=sym1
;;
v810 | necv810)
basic_machine=v810-nec
- basic_os=none
+ os=none
;;
vaxv)
basic_machine=vax-dec
- basic_os=sysv
+ os=sysv
;;
vms)
basic_machine=vax-dec
- basic_os=vms
+ os=vms
;;
vsta)
basic_machine=i386-pc
- basic_os=vsta
+ os=vsta
;;
vxworks960)
basic_machine=i960-wrs
- basic_os=vxworks
+ os=vxworks
;;
vxworks68)
basic_machine=m68k-wrs
- basic_os=vxworks
+ os=vxworks
;;
vxworks29k)
basic_machine=a29k-wrs
- basic_os=vxworks
+ os=vxworks
;;
xbox)
basic_machine=i686-pc
- basic_os=mingw32
+ os=mingw32
;;
ymp)
basic_machine=ymp-cray
- basic_os=unicos
+ os=unicos
;;
*)
basic_machine=$1
- basic_os=
+ os=
;;
esac
;;
@@ -686,17 +683,17 @@ case $basic_machine in
bluegene*)
cpu=powerpc
vendor=ibm
- basic_os=cnk
+ os=cnk
;;
decsystem10* | dec10*)
cpu=pdp10
vendor=dec
- basic_os=tops10
+ os=tops10
;;
decsystem20* | dec20*)
cpu=pdp10
vendor=dec
- basic_os=tops20
+ os=tops20
;;
delta | 3300 | motorola-3300 | motorola-delta \
| 3300-motorola | delta-motorola)
@@ -706,7 +703,7 @@ case $basic_machine in
dpx2*)
cpu=m68k
vendor=bull
- basic_os=sysv3
+ os=sysv3
;;
encore | umax | mmax)
cpu=ns32k
@@ -715,7 +712,7 @@ case $basic_machine in
elxsi)
cpu=elxsi
vendor=elxsi
- basic_os=${basic_os:-bsd}
+ os=${os:-bsd}
;;
fx2800)
cpu=i860
@@ -728,7 +725,7 @@ case $basic_machine in
h3050r* | hiux*)
cpu=hppa1.1
vendor=hitachi
- basic_os=hiuxwe2
+ os=hiuxwe2
;;
hp3k9[0-9][0-9] | hp9[0-9][0-9])
cpu=hppa1.0
@@ -769,38 +766,38 @@ case $basic_machine in
vendor=hp
;;
i*86v32)
- cpu=$(echo "$1" | sed -e 's/86.*/86/')
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
vendor=pc
- basic_os=sysv32
+ os=sysv32
;;
i*86v4*)
- cpu=$(echo "$1" | sed -e 's/86.*/86/')
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
vendor=pc
- basic_os=sysv4
+ os=sysv4
;;
i*86v)
- cpu=$(echo "$1" | sed -e 's/86.*/86/')
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
vendor=pc
- basic_os=sysv
+ os=sysv
;;
i*86sol2)
- cpu=$(echo "$1" | sed -e 's/86.*/86/')
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
vendor=pc
- basic_os=solaris2
+ os=solaris2
;;
j90 | j90-cray)
cpu=j90
vendor=cray
- basic_os=${basic_os:-unicos}
+ os=${os:-unicos}
;;
iris | iris4d)
cpu=mips
vendor=sgi
- case $basic_os in
+ case $os in
irix*)
;;
*)
- basic_os=irix4
+ os=irix4
;;
esac
;;
@@ -811,26 +808,26 @@ case $basic_machine in
*mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
cpu=m68k
vendor=atari
- basic_os=mint
+ os=mint
;;
news-3600 | risc-news)
cpu=mips
vendor=sony
- basic_os=newsos
+ os=newsos
;;
next | m*-next)
cpu=m68k
vendor=next
- case $basic_os in
+ case $os in
openstep*)
;;
nextstep*)
;;
ns2*)
- basic_os=nextstep2
+ os=nextstep2
;;
*)
- basic_os=nextstep3
+ os=nextstep3
;;
esac
;;
@@ -841,12 +838,12 @@ case $basic_machine in
op50n-* | op60c-*)
cpu=hppa1.1
vendor=oki
- basic_os=proelf
+ os=proelf
;;
pa-hitachi)
cpu=hppa1.1
vendor=hitachi
- basic_os=hiuxwe2
+ os=hiuxwe2
;;
pbd)
cpu=sparc
@@ -883,12 +880,12 @@ case $basic_machine in
sde)
cpu=mipsisa32
vendor=sde
- basic_os=${basic_os:-elf}
+ os=${os:-elf}
;;
simso-wrs)
cpu=sparclite
vendor=wrs
- basic_os=vxworks
+ os=vxworks
;;
tower | tower-32)
cpu=m68k
@@ -905,7 +902,7 @@ case $basic_machine in
w89k-*)
cpu=hppa1.1
vendor=winbond
- basic_os=proelf
+ os=proelf
;;
none)
cpu=none
@@ -917,7 +914,7 @@ case $basic_machine in
;;
leon-*|leon[3-9]-*)
cpu=sparc
- vendor=$(echo "$basic_machine" | sed 's/-.*//')
+ vendor=`echo "$basic_machine" | sed 's/-.*//'`
;;
*-*)
@@ -958,11 +955,11 @@ case $cpu-$vendor in
# some cases the only manufacturer, in others, it is the most popular.
craynv-unknown)
vendor=cray
- basic_os=${basic_os:-unicosmp}
+ os=${os:-unicosmp}
;;
c90-unknown | c90-cray)
vendor=cray
- basic_os=${Basic_os:-unicos}
+ os=${os:-unicos}
;;
fx80-unknown)
vendor=alliant
@@ -1006,7 +1003,7 @@ case $cpu-$vendor in
dpx20-unknown | dpx20-bull)
cpu=rs6000
vendor=bull
- basic_os=${basic_os:-bosx}
+ os=${os:-bosx}
;;
# Here we normalize CPU types irrespective of the vendor
@@ -1015,7 +1012,7 @@ case $cpu-$vendor in
;;
blackfin-*)
cpu=bfin
- basic_os=linux
+ os=linux
;;
c54x-*)
cpu=tic54x
@@ -1028,7 +1025,7 @@ case $cpu-$vendor in
;;
e500v[12]-*)
cpu=powerpc
- basic_os=${basic_os}"spe"
+ os=$os"spe"
;;
mips3*-*)
cpu=mips64
@@ -1038,7 +1035,7 @@ case $cpu-$vendor in
;;
m68knommu-*)
cpu=m68k
- basic_os=linux
+ os=linux
;;
m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
cpu=s12z
@@ -1048,7 +1045,7 @@ case $cpu-$vendor in
;;
parisc-*)
cpu=hppa
- basic_os=linux
+ os=linux
;;
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
cpu=i586
@@ -1084,7 +1081,7 @@ case $cpu-$vendor in
cpu=mipsisa64sb1el
;;
sh5e[lb]-*)
- cpu=$(echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/')
+ cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'`
;;
spur-*)
cpu=spur
@@ -1102,16 +1099,13 @@ case $cpu-$vendor in
cpu=x86_64
;;
xscale-* | xscalee[bl]-*)
- cpu=$(echo "$cpu" | sed 's/^xscale/arm/')
- ;;
- arm64-*)
- cpu=aarch64
+ cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
;;
# Recognize the canonical CPU Types that limit and/or modify the
# company names they are paired with.
cr16-*)
- basic_os=${basic_os:-elf}
+ os=${os:-elf}
;;
crisv32-* | etraxfs*-*)
cpu=crisv32
@@ -1122,7 +1116,7 @@ case $cpu-$vendor in
vendor=axis
;;
crx-*)
- basic_os=${basic_os:-elf}
+ os=${os:-elf}
;;
neo-tandem)
cpu=neo
@@ -1144,12 +1138,16 @@ case $cpu-$vendor in
cpu=nsx
vendor=tandem
;;
- mipsallegrexel-sony)
- cpu=mipsallegrexel
- vendor=sony
+ s390-*)
+ cpu=s390
+ vendor=ibm
+ ;;
+ s390x-*)
+ cpu=s390x
+ vendor=ibm
;;
tile*-*)
- basic_os=${basic_os:-linux-gnu}
+ os=${os:-linux-gnu}
;;
*)
@@ -1166,7 +1164,7 @@ case $cpu-$vendor in
| am33_2.0 \
| amdgcn \
| arc | arceb \
- | arm | arm[lb]e | arme[lb] | armv* \
+ | arm | arm[lb]e | arme[lb] | armv* \
| avr | avr32 \
| asmjs \
| ba \
@@ -1185,7 +1183,6 @@ case $cpu-$vendor in
| k1om \
| le32 | le64 \
| lm32 \
- | loongarch32 | loongarch64 | loongarchx32 \
| m32c | m32r | m32rle \
| m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
| m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
@@ -1232,7 +1229,6 @@ case $cpu-$vendor in
| pyramid \
| riscv | riscv32 | riscv64 \
| rl78 | romp | rs6000 | rx \
- | s390 | s390x \
| score \
| sh | shl \
| sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
@@ -1242,7 +1238,6 @@ case $cpu-$vendor in
| sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
| spu \
| tahoe \
- | thumbv7* \
| tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
| tron \
| ubicom32 \
@@ -1280,47 +1275,8 @@ esac
# Decode manufacturer-specific aliases for certain operating systems.
-if test x$basic_os != x
+if [ x$os != x ]
then
-
-# First recognize some ad-hoc caes, or perhaps split kernel-os, or else just
-# set os.
-case $basic_os in
- gnu/linux*)
- kernel=linux
- os=$(echo $basic_os | sed -e 's|gnu/linux|gnu|')
- ;;
- os2-emx)
- kernel=os2
- os=$(echo $basic_os | sed -e 's|os2-emx|emx|')
- ;;
- nto-qnx*)
- kernel=nto
- os=$(echo $basic_os | sed -e 's|nto-qnx|qnx|')
- ;;
- *-*)
- # shellcheck disable=SC2162
- IFS="-" read kernel os <<EOF
-$basic_os
-EOF
- ;;
- # Default OS when just kernel was specified
- nto*)
- kernel=nto
- os=$(echo $basic_os | sed -e 's|nto|qnx|')
- ;;
- linux*)
- kernel=linux
- os=$(echo $basic_os | sed -e 's|linux|gnu|')
- ;;
- *)
- kernel=
- os=$basic_os
- ;;
-esac
-
-# Now, normalize the OS (knowing we just have one component, it's not a kernel,
-# etc.)
case $os in
# First match some system type aliases that might get confused
# with valid system types.
@@ -1332,7 +1288,7 @@ case $os in
os=cnk
;;
solaris1 | solaris1.*)
- os=$(echo $os | sed -e 's|solaris1|sunos4|')
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
;;
solaris)
os=solaris2
@@ -1340,6 +1296,9 @@ case $os in
unixware*)
os=sysv4.2uw
;;
+ gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
# es1800 is here to avoid being matched by es* (a different OS)
es1800*)
os=ose
@@ -1361,9 +1320,12 @@ case $os in
os=sco3.2v4
;;
sco3.2.[4-9]*)
- os=$(echo $os | sed -e 's/sco3.2./sco3.2v/')
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ ;;
+ sco3.2v[4-9]* | sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
;;
- sco*v* | scout)
+ scout)
# Don't match below
;;
sco*)
@@ -1372,26 +1334,79 @@ case $os in
psos*)
os=psos
;;
+ # Now accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST end in a * to match a version number.
+ # sysv* is not here because it comes later, after sysvr4.
+ gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
+ | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\
+ | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
+ | sym* | kopensolaris* | plan9* \
+ | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
+ | aos* | aros* | cloudabi* | sortix* | twizzler* \
+ | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
+ | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
+ | knetbsd* | mirbsd* | netbsd* \
+ | bitrig* | openbsd* | solidbsd* | libertybsd* | os108* \
+ | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \
+ | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
+ | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
+ | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \
+ | chorusrdb* | cegcc* | glidix* \
+ | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
+ | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \
+ | linux-newlib* | linux-musl* | linux-uclibc* \
+ | uxpv* | beos* | mpeix* | udk* | moxiebox* \
+ | interix* | uwin* | mks* | rhapsody* | darwin* \
+ | openstep* | oskit* | conix* | pw32* | nonstopux* \
+ | storm-chaos* | tops10* | tenex* | tops20* | its* \
+ | os2* | vos* | palmos* | uclinux* | nucleus* \
+ | morphos* | superux* | rtmk* | windiss* \
+ | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
+ | skyos* | haiku* | rdos* | toppers* | drops* | es* \
+ | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
+ | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
+ | nsk* | powerunix)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
qnx*)
- os=qnx
+ case $cpu in
+ x86 | i*86)
+ ;;
+ *)
+ os=nto-$os
+ ;;
+ esac
;;
hiux*)
os=hiuxwe2
;;
+ nto-qnx*)
+ ;;
+ nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ sim | xray | os68k* | v88r* \
+ | windows* | osx | abug | netware* | os9* \
+ | macos* | mpw* | magic* | mmixware* | mon960* | lnews*)
+ ;;
+ linux-dietlibc)
+ os=linux-dietlibc
+ ;;
+ linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
lynx*178)
os=lynxos178
;;
lynx*5)
os=lynxos5
;;
- lynxos*)
- # don't get caught up in next wildcard
- ;;
lynx*)
os=lynxos
;;
- mac[0-9]*)
- os=$(echo "$os" | sed -e 's|mac|macos|')
+ mac*)
+ os=`echo "$os" | sed -e 's|mac|macos|'`
;;
opened*)
os=openedition
@@ -1400,10 +1415,10 @@ case $os in
os=os400
;;
sunos5*)
- os=$(echo "$os" | sed -e 's|sunos5|solaris2|')
+ os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
;;
sunos6*)
- os=$(echo "$os" | sed -e 's|sunos6|solaris3|')
+ os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
;;
wince*)
os=wince
@@ -1437,7 +1452,7 @@ case $os in
;;
# Preserve the version number of sinix5.
sinix5.*)
- os=$(echo $os | sed -e 's|sinix|sysv|')
+ os=`echo $os | sed -e 's|sinix|sysv|'`
;;
sinix*)
os=sysv4
@@ -1460,12 +1475,18 @@ case $os in
sysvr4)
os=sysv4
;;
+ # This must come after sysvr4.
+ sysv*)
+ ;;
ose*)
os=ose
;;
*mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
os=mint
;;
+ zvmoe)
+ os=zvmoe
+ ;;
dicos*)
os=dicos
;;
@@ -1482,11 +1503,19 @@ case $os in
;;
esac
;;
+ nacl*)
+ ;;
+ ios)
+ ;;
+ none)
+ ;;
+ *-eabi)
+ ;;
*)
- # No normalization, but not necessarily accepted, that comes below.
+ echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
+ exit 1
;;
esac
-
else
# Here we handle the default operating systems that come with various machines.
@@ -1499,7 +1528,6 @@ else
# will signal an error saying that MANUFACTURER isn't an operating
# system, and we'll never get to this point.
-kernel=
case $cpu-$vendor in
score-*)
os=elf
@@ -1511,8 +1539,7 @@ case $cpu-$vendor in
os=riscix1.2
;;
arm*-rebel)
- kernel=linux
- os=gnu
+ os=linux
;;
arm*-semi)
os=aout
@@ -1678,173 +1705,84 @@ case $cpu-$vendor in
os=none
;;
esac
-
fi
-# Now, validate our (potentially fixed-up) OS.
-case $os in
- # Sometimes we do "kernel-abi", so those need to count as OSes.
- musl* | newlib* | uclibc*)
- ;;
- # Likewise for "kernel-libc"
- eabi | eabihf | gnueabi | gnueabihf)
- ;;
- # Now accept the basic system types.
- # The portable systems comes first.
- # Each alternative MUST end in a * to match a version number.
- gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
- | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
- | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
- | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
- | hiux* | abug | nacl* | netware* | windows* \
- | os9* | macos* | osx* | ios* \
- | mpw* | magic* | mmixware* | mon960* | lnews* \
- | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
- | aos* | aros* | cloudabi* | sortix* | twizzler* \
- | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
- | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
- | mirbsd* | netbsd* | dicos* | openedition* | ose* \
- | bitrig* | openbsd* | solidbsd* | libertybsd* | os108* \
- | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \
- | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
- | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
- | udi* | lites* | ieee* | go32* | aux* | hcos* \
- | chorusrdb* | cegcc* | glidix* \
- | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
- | midipix* | mingw32* | mingw64* | mint* \
- | uxpv* | beos* | mpeix* | udk* | moxiebox* \
- | interix* | uwin* | mks* | rhapsody* | darwin* \
- | openstep* | oskit* | conix* | pw32* | nonstopux* \
- | storm-chaos* | tops10* | tenex* | tops20* | its* \
- | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \
- | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \
- | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
- | skyos* | haiku* | rdos* | toppers* | drops* | es* \
- | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
- | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
- | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx*)
- ;;
- # This one is extra strict with allowed versions
- sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
- # Don't forget version if it is 3.2v4 or newer.
- ;;
- none)
- ;;
- *)
- echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2
- exit 1
- ;;
-esac
-
-# As a final step for OS-related things, validate the OS-kernel combination
-# (given a valid OS), if there is a kernel.
-case $kernel-$os in
- linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* | linux-musl* | linux-uclibc* )
- ;;
- uclinux-uclibc* )
- ;;
- -dietlibc* | -newlib* | -musl* | -uclibc* )
- # These are just libc implementations, not actual OSes, and thus
- # require a kernel.
- echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2
- exit 1
- ;;
- kfreebsd*-gnu* | kopensolaris*-gnu*)
- ;;
- nto-qnx*)
- ;;
- os2-emx)
- ;;
- *-eabi* | *-gnueabi*)
- ;;
- -*)
- # Blank kernel with real OS is always fine.
- ;;
- *-*)
- echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2
- exit 1
- ;;
-esac
-
# Here we handle the case where we know the os, and the CPU type, but not the
# manufacturer. We pick the logical manufacturer.
case $vendor in
unknown)
- case $cpu-$os in
- *-riscix*)
+ case $os in
+ riscix*)
vendor=acorn
;;
- *-sunos*)
+ sunos*)
vendor=sun
;;
- *-cnk* | *-aix*)
+ cnk*|-aix*)
vendor=ibm
;;
- *-beos*)
+ beos*)
vendor=be
;;
- *-hpux*)
+ hpux*)
vendor=hp
;;
- *-mpeix*)
+ mpeix*)
vendor=hp
;;
- *-hiux*)
+ hiux*)
vendor=hitachi
;;
- *-unos*)
+ unos*)
vendor=crds
;;
- *-dgux*)
+ dgux*)
vendor=dg
;;
- *-luna*)
+ luna*)
vendor=omron
;;
- *-genix*)
+ genix*)
vendor=ns
;;
- *-clix*)
+ clix*)
vendor=intergraph
;;
- *-mvs* | *-opened*)
- vendor=ibm
- ;;
- *-os400*)
+ mvs* | opened*)
vendor=ibm
;;
- s390-* | s390x-*)
+ os400*)
vendor=ibm
;;
- *-ptx*)
+ ptx*)
vendor=sequent
;;
- *-tpf*)
+ tpf*)
vendor=ibm
;;
- *-vxsim* | *-vxworks* | *-windiss*)
+ vxsim* | vxworks* | windiss*)
vendor=wrs
;;
- *-aux*)
+ aux*)
vendor=apple
;;
- *-hms*)
+ hms*)
vendor=hitachi
;;
- *-mpw* | *-macos*)
+ mpw* | macos*)
vendor=apple
;;
- *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*)
+ *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
vendor=atari
;;
- *-vos*)
+ vos*)
vendor=stratus
;;
esac
;;
esac
-echo "$cpu-$vendor-${kernel:+$kernel-}$os"
+echo "$cpu-$vendor-$os"
exit
# Local variables:
diff --git a/Build/source/utils/asymptote/configure b/Build/source/utils/asymptote/configure
index f9c5fcdaf44..4cf88d7eab7 100755
--- a/Build/source/utils/asymptote/configure
+++ b/Build/source/utils/asymptote/configure
@@ -1,8 +1,8 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for Asymptote 2.65.
+# Generated by GNU Autoconf 2.69 for Asymptote 2.68.
#
-# Report bugs to <http://sourceforge.net/projects/asymptote>.
+# Report bugs to <https://sourceforge.net/projects/asymptote>.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -267,7 +267,7 @@ fi
$as_echo "$0: be upgraded to zsh 4.3.4 or later."
else
$as_echo "$0: Please tell bug-autoconf@gnu.org and
-$0: http://sourceforge.net/projects/asymptote about your
+$0: https://sourceforge.net/projects/asymptote about your
$0: system, including any error possibly output before this
$0: message. Then install a modern shell, or manually run
$0: the script under such a shell if you do have one."
@@ -580,9 +580,9 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='Asymptote'
PACKAGE_TARNAME='asymptote'
-PACKAGE_VERSION='2.65'
-PACKAGE_STRING='Asymptote 2.65'
-PACKAGE_BUGREPORT='http://sourceforge.net/projects/asymptote'
+PACKAGE_VERSION='2.68'
+PACKAGE_STRING='Asymptote 2.68'
+PACKAGE_BUGREPORT='https://sourceforge.net/projects/asymptote'
PACKAGE_URL=''
# Factoring default headers for most tests.
@@ -724,6 +724,7 @@ enable_gc
enable_gc_debug
enable_gc_full_debug
enable_sigsegv
+enable_curl
enable_readline
enable_static
enable_fftw
@@ -1287,7 +1288,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 2.65 to adapt to many kinds of systems.
+\`configure' configures Asymptote 2.68 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1352,7 +1353,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of Asymptote 2.65:";;
+ short | recursive ) echo "Configuration of Asymptote 2.68:";;
esac
cat <<\_ACEOF
@@ -1367,13 +1368,13 @@ Optional Features:
--enable-gc-debug enable (slow) garbage collector debugging
--enable-gc-full-debug enable (very slow) garbage collector backtrace
--enable-sigsegv[=yes] enable GNU Stack Overflow Handler
+ --enable-curl[=yes] enable libcurl and compile with optional URL support
--enable-readline[=yes] enable GNU Readline Library
--enable-static[=no] link against static libraries
--enable-fftw[=yes] enable FFTW Library
--enable-gsl[=yes] enable GNU Scientific Library
--enable-gl[=yes] enable OpenGL Library
- --enable-offscreen[=no] enable experimental offscreen rendering using OSMesa
- library
+ --enable-offscreen[=no] use OSMesa library to implement offscreen rendering
--enable-openimageio[=no]
enable experimental OpenImageIO Library
@@ -1406,7 +1407,7 @@ Some influential environment variables:
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
-Report bugs to <http://sourceforge.net/projects/asymptote>.
+Report bugs to <https://sourceforge.net/projects/asymptote>.
_ACEOF
ac_status=$?
fi
@@ -1469,7 +1470,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-Asymptote configure 2.65
+Asymptote configure 2.68
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1822,9 +1823,9 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-( $as_echo "## -------------------------------------------------------- ##
-## Report this to http://sourceforge.net/projects/asymptote ##
-## -------------------------------------------------------- ##"
+( $as_echo "## --------------------------------------------------------- ##
+## Report this to https://sourceforge.net/projects/asymptote ##
+## --------------------------------------------------------- ##"
) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
@@ -2055,7 +2056,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 2.65, which was
+It was created by Asymptote $as_me 2.68, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -4229,7 +4230,7 @@ fi
test -n "$TEXI2DVI" && break
done
-test -n "$TEXI2DVI" || TEXI2DVI="@echo \*\*\*\*\*\*\*\*\*\* Please install texi2dvi or put http://asymptote.sourceforge.net/asymptote.pdf in the doc directory: cannot execute texi2dvi"
+test -n "$TEXI2DVI" || TEXI2DVI="@echo \*\*\*\*\*\*\*\*\*\* Please install texi2dvi or put https://asymptote.sourceforge.io/asymptote.pdf in the doc directory: cannot execute texi2dvi"
@@ -6662,6 +6663,65 @@ _ACEOF
fi
+# Check whether --enable-curl was given.
+if test "${enable_curl+set}" = set; then :
+ enableval=$enable_curl;
+fi
+
+if test "x$enable_curl" != "xno"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for curl_easy_init in -lcurl" >&5
+$as_echo_n "checking for curl_easy_init in -lcurl... " >&6; }
+if ${ac_cv_lib_curl_curl_easy_init+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcurl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char curl_easy_init ();
+int
+main ()
+{
+return curl_easy_init ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ ac_cv_lib_curl_curl_easy_init=yes
+else
+ ac_cv_lib_curl_curl_easy_init=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_curl_easy_init" >&5
+$as_echo "$ac_cv_lib_curl_curl_easy_init" >&6; }
+if test "x$ac_cv_lib_curl_curl_easy_init" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBCURL 1
+_ACEOF
+
+ LIBS="-lcurl $LIBS"
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: *** Could not find libcurl: will compile without optional URL support. ***" >&5
+$as_echo "$as_me: *** Could not find libcurl: will compile without optional URL support. ***" >&6;}
+fi
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: *** libcurl support disabled by configure flag: will compile without optional URL support. ***" >&5
+$as_echo "$as_me: *** libcurl support disabled by configure flag: will compile without optional URL support. ***" >&6;}
+fi
+
# Check whether --enable-readline was given.
if test "${enable_readline+set}" = set; then :
enableval=$enable_readline;
@@ -9267,7 +9327,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=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 2.65, which was
+This file was extended by Asymptote $as_me 2.68, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -9323,13 +9383,13 @@ $config_files
Configuration headers:
$config_headers
-Report bugs to <http://sourceforge.net/projects/asymptote>."
+Report bugs to <https://sourceforge.net/projects/asymptote>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-Asymptote config.status 2.65
+Asymptote config.status 2.68
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/Build/source/utils/asymptote/configure.ac b/Build/source/utils/asymptote/configure.ac
index 1de9e84f876..4abd151a9d4 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],[2.65],[http://sourceforge.net/projects/asymptote])
+AC_INIT([Asymptote],[2.68],[https://sourceforge.net/projects/asymptote])
VERSION=$PACKAGE_VERSION
AC_SUBST(VERSION)
m4_include([ax_pthread.m4])
@@ -55,7 +55,7 @@ fi
])
AC_CHECK_PROGS(TEXI2DVI,[texi2dvi],
-[@echo \*\*\*\*\*\*\*\*\*\* Please install texi2dvi or put http://asymptote.sourceforge.net/asymptote.pdf in the doc directory: cannot execute texi2dvi])
+[@echo \*\*\*\*\*\*\*\*\*\* Please install texi2dvi or put https://asymptote.sourceforge.io/asymptote.pdf in the doc directory: cannot execute texi2dvi])
AC_SUBST(TEXI2DVI)
@@ -265,6 +265,15 @@ fi
AC_CHECK_LIB([rt], [sched_yield])
+AC_ARG_ENABLE(curl,
+[AS_HELP_STRING(--enable-curl[[[=yes]]],enable libcurl and compile with optional URL support)])
+if test "x$enable_curl" != "xno"; then
+ AC_CHECK_LIB([curl],[curl_easy_init],,
+ AC_MSG_NOTICE([*** Could not find libcurl: will compile without optional URL support. ***]))
+else
+ AC_MSG_NOTICE([*** libcurl support disabled by configure flag: will compile without optional URL support. ***])
+fi
+
AC_ARG_ENABLE(readline,
[AS_HELP_STRING(--enable-readline[[[=yes]]],enable GNU Readline Library)])
@@ -368,7 +377,7 @@ AC_ARG_ENABLE(gl,
[AS_HELP_STRING(--enable-gl[[[=yes]]],enable OpenGL Library)])
AC_ARG_ENABLE(offscreen,
-[AS_HELP_STRING(--enable-offscreen[[[=no]]],enable experimental offscreen rendering using OSMesa library)])
+[AS_HELP_STRING(--enable-offscreen[[[=no]]],use OSMesa library to implement offscreen rendering)])
AC_ARG_ENABLE(OpenImageIO,
[AS_HELP_STRING(--enable-openimageio[[[=no]]],enable experimental OpenImageIO Library)])
diff --git a/Build/source/utils/asymptote/constructor.cc b/Build/source/utils/asymptote/constructor.cc
index 87960f18424..68e9b803d55 100644
--- a/Build/source/utils/asymptote/constructor.cc
+++ b/Build/source/utils/asymptote/constructor.cc
@@ -46,7 +46,7 @@ bool definesImplicitConstructor(coenv &e, record *r, varEntry *v, symbol id)
if (ft->getResult()->kind == ty_void)
return true;
}
-
+
return false;
}
@@ -91,7 +91,7 @@ varEntry *constructorFromInitializer(position pos, coenv &e, record *r,
assert(r);
types::function *ft=new types::function(r, init->getSignature());
-
+
ostringstream out;
ft->printVar(out, symbol::trans("<constructor>"));
@@ -101,7 +101,7 @@ varEntry *constructorFromInitializer(position pos, coenv &e, record *r,
// Translate the function.
fe.e.beginScope();
-
+
transConstructorBody(pos, fe, r, init);
fe.e.endScope();
diff --git a/Build/source/utils/asymptote/dec.cc b/Build/source/utils/asymptote/dec.cc
index c2b691a2584..bcf842b40dc 100644
--- a/Build/source/utils/asymptote/dec.cc
+++ b/Build/source/utils/asymptote/dec.cc
@@ -94,7 +94,7 @@ void arrayTy::addOps(coenv &e, record *r)
r->e.addArrayOps(at);
}
}
-
+
types::ty *arrayTy::trans(coenv &e, bool tacit)
{
types::ty *ct = cell->trans(e, tacit);
@@ -106,7 +106,7 @@ types::ty *arrayTy::trans(coenv &e, bool tacit)
types::array *t = dims->truetype(ct);
assert(t);
-
+
return t;
}
@@ -188,7 +188,7 @@ record *block::transAsFile(genv& ge, symbol id)
}
transAsRecordBody(ce, r);
em.sync();
-
+
return r;
}
@@ -208,22 +208,22 @@ vardec *block::asVardec()
for (list<runnable *>::iterator p=stms.begin();
p != stms.end();
++p)
- {
- vardec *v = dynamic_cast<vardec *>(*p);
- if (v) {
- if (var)
- // Multiple vardecs.
+ {
+ vardec *v = dynamic_cast<vardec *>(*p);
+ if (v) {
+ if (var)
+ // Multiple vardecs.
+ return 0;
+ var = v;
+ }
+ else if (!dynamic_cast<emptyStm *>(*p))
+ // Failure due to another runnable in the block.
return 0;
- var = v;
}
- else if (!dynamic_cast<emptyStm *>(*p))
- // Failure due to another runnable in the block.
- return 0;
- }
return var;
}
-
+
void dec::prettyprint(ostream &out, Int indent)
{
@@ -235,7 +235,7 @@ void modifierList::prettyprint(ostream &out, Int indent)
{
prettyindent(out,indent);
out << "modifierList (";
-
+
for (list<modifier>::iterator p = mods.begin(); p != mods.end(); ++p) {
if (p != mods.begin())
out << ", ";
@@ -243,16 +243,16 @@ void modifierList::prettyprint(ostream &out, Int indent)
case EXPLICIT_STATIC:
out << "static";
break;
-#if 0
+#if 0
case EXPLICIT_DYNAMIC:
out << "dynamic";
break;
-#endif
+#endif
default:
out << "invalid code";
}
}
-
+
for (list<permission>::iterator p = perms.begin(); p != perms.end(); ++p) {
if (p != perms.begin() || !mods.empty())
out << ", ";
@@ -317,12 +317,12 @@ void modifiedRunnable::transAsField(coenv &e, record *r)
}
permission p = mods->getPermission();
-#if 0 // This is innocuous
+#if 0 // This is innocuous
if (p != DEFAULT_PERM && (!r || !body->allowPermissions())) {
em.warning(pos);
em << "permission modifier is meaningless";
}
-#endif
+#endif
e.c.setPermission(p);
body->transAsField(e,r);
@@ -464,7 +464,7 @@ void initializeVar(position pos, coenv &e, varEntry *v, varinit *init)
definit d(pos);
d.transToType(e, t);
}
-
+
v->getLocation()->encode(WRITE, pos, e.c);
e.c.encodePop();
}
@@ -550,7 +550,7 @@ void decid::transAsTypedefField(coenv &e, trans::tyEntry *base, record *r)
em.error(getPos());
em << "type definition cannot have initializer";
}
-
+
start->addOps(base->t, e, r);
addTypeWithPermission(e, r, ent, start->getName());
@@ -872,7 +872,7 @@ void recorddec::transAsField(coenv &e, record *parent)
{
record *r = parent ? parent->newRecord(id, e.c.isStatic()) :
e.c.newRecord(id);
-
+
addTypeWithPermission(e, parent, new trans::tyEntry(r,0,parent,getPos()), id);
e.e.addRecordOps(r);
if (parent)
@@ -881,7 +881,7 @@ void recorddec::transAsField(coenv &e, record *parent)
// Start translating the initializer.
coder c=e.c.newRecordInit(getPos(), r);
coenv re(c,e.e);
-
+
body->transAsRecordBody(re, r);
// After the record is translated, add a default initializer so that a
@@ -893,7 +893,7 @@ void recorddec::transAsField(coenv &e, record *parent)
// the enclosing environment. These are the implicit constructors defined by
// "operator init".
addPostRecordEnvironment(e, r, parent);
-}
+}
runnable *autoplainRunnable() {
// Abstract syntax for the code:
diff --git a/Build/source/utils/asymptote/dec.h b/Build/source/utils/asymptote/dec.h
index 5b7f0756cc7..1aae5a8fb62 100644
--- a/Build/source/utils/asymptote/dec.h
+++ b/Build/source/utils/asymptote/dec.h
@@ -53,7 +53,7 @@ public:
virtual void prettyprint(ostream &out, Int indent) = 0;
// If we introduced a new type, automatically add corresponding functions for
- // that type.
+ // that type.
virtual void addOps(coenv &, record *) {}
// Returns the internal representation of the type. This method can
@@ -90,7 +90,7 @@ public:
void increase()
{ depth++; }
-
+
size_t size() {
return depth;
}
@@ -142,13 +142,13 @@ public:
: absyn(pos) {}
virtual void prettyprint(ostream &out, Int indent) = 0;
-
+
void markTrans(coenv &e)
{
markPos(e);
trans(e);
}
-
+
/* Translates the stm or dec as if it were in a function definition. */
virtual void trans(coenv &e) {
transAsField(e, 0);
@@ -182,10 +182,10 @@ public:
{ return false; }
// Returns true if it is syntatically allowable to modify this
- // runnable by a PUBLIC or PRIVATE modifier.
+ // runnable by a PUBLIC or PRIVATE modifier.
virtual bool allowPermissions()
{ return false; }
-};
+};
class block : public runnable {
public:
@@ -356,7 +356,7 @@ public:
virtual void transAsField(coenv &e, record *r, types::ty *base);
- // Translate, but add the names in as types rather than variables.
+ // Translate, but add the names in as types rather than variables.
virtual void transAsTypedefField(coenv &e, trans::tyEntry *base, record *r);
decidstart *getStart() { return start; }
@@ -370,7 +370,7 @@ public:
: absyn(pos) {}
virtual ~decidlist() {}
-
+
void add(decid *p) {
decs.push_back(p);
}
@@ -379,9 +379,9 @@ public:
virtual void transAsField(coenv &e, record *r, types::ty *base);
- // Translate, but add the names in as types rather than variables.
+ // Translate, but add the names in as types rather than variables.
virtual void transAsTypedefField(coenv &e, trans::tyEntry *base, record *r);
-
+
// If the list consists of a single entry, return it.
decid *singleEntry()
{
@@ -428,7 +428,7 @@ public:
decs->transAsField(e, r, base->trans(e));
}
- // Translate, but add the names in as types rather than variables.
+ // Translate, but add the names in as types rather than variables.
virtual void transAsTypedefField(coenv &e, record *r);
// If the vardec encodes a single declaration, return the name of that
@@ -466,7 +466,7 @@ struct idpair : public absyn {
// Translates as: access src as dest;
void transAsAccess(coenv &e, record *r);
-
+
// Translates as: from _ unravel src as dest;
// where _ is the qualifier record with source as its fields and types.
void transAsUnravel(coenv &e, record *r,
@@ -594,7 +594,7 @@ public:
void transAsField(coenv &e, record *r) {
base.transAsField(e, r);
}
-
+
void prettyprint(ostream &out, Int indent);
};
@@ -655,7 +655,7 @@ public:
runnable *autoplainRunnable();
void addVar(coenv &e, record *r, varEntry *v, symbol id);
-
+
} // namespace absyntax
#endif
diff --git a/Build/source/utils/asymptote/doc/CAD.pdf b/Build/source/utils/asymptote/doc/CAD.pdf
index 2838bc85730..cf9d1373768 100644
--- a/Build/source/utils/asymptote/doc/CAD.pdf
+++ b/Build/source/utils/asymptote/doc/CAD.pdf
Binary files differ
diff --git a/Build/source/utils/asymptote/doc/CDlabel.asy b/Build/source/utils/asymptote/doc/CDlabel.asy
index 2ac1272c9f9..70c8e50a404 100644
--- a/Build/source/utils/asymptote/doc/CDlabel.asy
+++ b/Build/source/utils/asymptote/doc/CDlabel.asy
@@ -5,12 +5,12 @@ asy(nativeformat(),"logo");
fill(unitcircle^^(scale(2/11.7)*unitcircle),
evenodd+rgb(124/255,205/255,124/255));
label(scale(1.1)*minipage(
-"\centering\scriptsize \textbf{\LARGE {\tt Asymptote}\\
+ "\centering\scriptsize \textbf{\LARGE {\tt Asymptote}\\
\smallskip
\small The Vector Graphics Language}\\
\smallskip
\textsc{Andy Hammerlindl, John Bowman, and Tom Prince}
-http://asymptote.sourceforge.net\\
+https://asymptote.sourceforge.io\\
",8cm),(0,0.6));
label(graphic("logo","height=7cm"),(0,-0.22));
clip(unitcircle^^(scale(2/11.7)*unitcircle),evenodd);
diff --git a/Build/source/utils/asymptote/doc/FAQ/asy-faq.bfnn b/Build/source/utils/asymptote/doc/FAQ/asy-faq.bfnn
index 2d3955af078..a4dc8a0965c 100644
--- a/Build/source/utils/asymptote/doc/FAQ/asy-faq.bfnn
+++ b/Build/source/utils/asymptote/doc/FAQ/asy-faq.bfnn
@@ -5,11 +5,11 @@
\comment The format and scripts come from the Linux FAQ, by
\comment Ian Jackson.
\set brieftitle Asymptote FAQ
-\set author <A href="http://asymptote.sourceforge.net">Asymptote</A>
+\set author <A href="https://asymptote.sourceforge.io">Asymptote</A>
\set title Asymptote Frequently Asked Questions
\copyto ASCII
ASYMPTOTE FREQUENTLY ASKED QUESTIONS
- `date '+%d %h %Y'`
+ `%perl use POSIX; POSIX::strftime("%Y-%m-%d", gmtime($ENV{SOURCE_DATE_EPOCH} || time))`
\endcopy
\copyto INFO
@@ -22,7 +22,7 @@ END-INFO-DIR-ENTRY
File: asy-faq.info, Node: Top, Next: Question 1.1, Up: (dir)
ASYMPTOTE FREQUENTLY ASKED QUESTIONS
- `date '+%d %h %Y'`
+ `%perl use POSIX; POSIX::strftime("%Y-%m-%d", gmtime($ENV{SOURCE_DATE_EPOCH} || time))`
\endcopy
@@ -49,7 +49,7 @@ C++-like syntax. Unlike MetaPost, it natively supports multiple-segment paths
Binary releases are available for Linux, MacOS X, and Microsoft Windows
platforms, in addition to full source code, from the website
-\docref{http://asymptote.sourceforge.net/\}. Many Linux distributions
+\docref{https://asymptote.sourceforge.io/\}. Many Linux distributions
(such as RedHat and Debian) now include an Asymptote package (check your
distribution's documentation for further information about this).
@@ -57,7 +57,7 @@ distribution's documentation for further information about this).
If you have a question, please try to find an answer in this FAQ, in the
extensive Asymptote documentation at
-\docref{http://asymptote.sourceforge.net/doc/\}, or search the forum:
+\docref{https://asymptote.sourceforge.io/doc/\}, or search the forum:
\docref{http://sourceforge.net/forum/forum.php?forum_id=409349\}.
\question 02sep:whyasy Why was the name Asymptote chosen?
@@ -97,7 +97,7 @@ official source:
\question 04nov:brokenpdftex What do I do if I get the error: \courier{Error: pdfetex (file pdftex.cfg): cannot open config file...texinfo.tex appears to be broken\}?
-Simply put \docref{http://asymptote.sourceforge.net/asymptote.pdf\}
+Simply put \docref{https://asymptote.sourceforge.io/asymptote.pdf\}
in the directory \courier{doc\} and repeat the command \courier{make all\}.
Or, if you don't want to build a local copy of the documentation, simply
proceed with \courier{make install-asy\}.
@@ -113,7 +113,7 @@ guide on the topic. You can download it from
\docref{http://dario.dse.nl/projects/asylatex/\}.
Philippe Ivaldi has contributed an Asymptote mode for Emacs users
-\docref{http://asymptote.sourceforge.net/doc/Editing-modes.html\},
+\docref{https://asymptote.sourceforge.io/doc/Editing-modes.html\},
which includes a \courier{lasy-mode\} that allows one to compile and view
the output of one \\begin{asy}...\\end{asy} section at a time.
@@ -279,7 +279,7 @@ defaultpen(TimesRoman());
\question 28jun:internatfonts How can I use international fonts in Asymptote labels?
-See \docref{http://asymptote.sourceforge.net/doc/unicode.html\}.
+See \docref{https://asymptote.sourceforge.io/doc/Pens.html\}.
\question 10jul:Fourier How can I use Fourier fonts?
@@ -321,7 +321,7 @@ draw(rotate(90,project(Z))*"A",O--X);
\question 02sep:fixedsize How can I draw some squares and circles of a fixed size and put a label in the middle of them?
Fixed-size objects should be drawn on a separate picture and then added to
-currentpicture. Here is one way (see also \docref{http://asymptote.sourceforge.net/gallery/subpictures.asy\} and \docref{http://asymptote.sourceforge.net/gallery/mosquito.asy\}):
+currentpicture. Here is one way (see also \docref{https://asymptote.sourceforge.io/gallery/subpictures.asy\} and \docref{https://asymptote.sourceforge.io/gallery/mosquito.asy\}):
\verbatim
real u=2cm;
@@ -594,7 +594,7 @@ label. Other possible overwrite arguments are Allow (allows overlapping
labels; the default), Suppress (an overlapping label will not be written at
all), SuppressQuiet, and MoveQuiet. The last two achieve the same result as
the non-quiet types, but will not notify you which labels are overlapping. See:
-\docref{http://asymptote.sourceforge.net/doc/Pens.html\}.
+\docref{https://asymptote.sourceforge.io/doc/Pens.html\}.
In the case of a user-specified tick array, you can change which labels get
suppressed/moved by changing the order of array entries.
@@ -645,7 +645,7 @@ have the same scaling and same resulting figure size (just ensure the two
coordinates given to \courier{fixedscaling()\} leaves room for any labels).
See also
-\docref{http://asymptote.sourceforge.net/doc/Frames-and-pictures.html\}.
+\docref{https://asymptote.sourceforge.io/doc/Frames-and-pictures.html\}.
\question 26jun:graphlimits How can I plot a function f(x) within [0,1]x[0,2] without explicitly calculating the x values for which f(x) hits the boundary?
@@ -663,7 +663,7 @@ xaxis("$x$",BottomTop,LeftTicks);
yaxis("$y$",LeftRight,RightTicks);
\endverbatim
-See also \docref{http://asymptote.sourceforge.net/doc/graph.html\}.
+See also \docref{https://asymptote.sourceforge.io/doc/graph.html\}.
\question 26jun:custompalettes Is it possible to define customized palettes?
@@ -745,12 +745,12 @@ distance(A,B,"$\ell$",1);
\question 26jun:log2 How can I make the y axis display base-2 logarithmic values?
-See the example \docref{http://asymptote.sourceforge.net/gallery/2D graphs/log2graph.asy\}.
+See the example \docref{https://asymptote.sourceforge.io/gallery/2D graphs/log2graph.asy\}.
\question 27jun:align How can I align the x axes of two graphs on the same figure?
An easy way to do this, if the axes to be aligned have the same scaling
-and size, is illustrated in the example \docref{http://asymptote.sourceforge.net/gallery/2D graphs/alignedaxis.asy\}.
+and size, is illustrated in the example \docref{https://asymptote.sourceforge.io/gallery/2D graphs/alignedaxis.asy\}.
Here is a more general solution to the problem of aligning two arbitrary axes.
One fits the second picture to a frame based on the horizontal scaling for
@@ -813,7 +813,7 @@ add(shift(0,-height)*(shift(shift)*pic2).fit(T));
\question 27jun:changeaxis How can I change the direction of the y-axis, such that negatives values are on the upper y-axis?
-Here is a simple example (see also the example \docref{http://asymptote.sourceforge.net/gallery/2D graphs/diatom.asy\} or the discussion
+Here is a simple example (see also the example \docref{https://asymptote.sourceforge.io/gallery/2D graphs/diatom.asy\} or the discussion
of Linear(-1) in the documentation):
\verbatim
@@ -847,7 +847,7 @@ y=t
x=(t-2)^2+1
\endverbatim
-See the example \docref{http://asymptote.sourceforge.net/gallery/2D graphs/parametricgraph.asy\}.
+See the example \docref{https://asymptote.sourceforge.io/gallery/2D graphs/parametricgraph.asy\}.
\question 27jun:scalesecondaryaxis Is it possible to reverse or stretch an axis?
@@ -1037,7 +1037,7 @@ at least until the end of the file or prompt's run.
Yes, Asymptote includes a line-based debugger:
-\docref{http://asymptote.sourceforge.net/doc/Debugger.html\}
+\docref{https://asymptote.sourceforge.io/doc/Debugger.html\}
\question 27jun:patches Do you accept patches for Asymptote?
@@ -1065,7 +1065,7 @@ distinguishes between true-size objects and objects that should scale with
the picture size. The resulting linear programming problem is solved via
the Simplex method.
-See the \docref{http://asymptote.sourceforge.net/gallery/dimension.asy\} example for an example of how deferred drawing is
+See the \docref{https://asymptote.sourceforge.io/gallery/dimension.asy\} example for an example of how deferred drawing is
used to accomodate both user and true-size (PostScript) coordinates.
\question 02sep:manualscaling How can I avoid automatic scaling of a picture?
@@ -1116,7 +1116,7 @@ this returns the intersection point of the extensions of the line segments
could be persuaded to add something similar if someone can justify the
need. In the meantime, one can always use the explicit built-in linear
solver \courier{solve\} (see
-\docref{http://asymptote.sourceforge.net/doc/solve.html\}), which uses LU
+\docref{https://asymptote.sourceforge.io/doc/solve.html\}), which uses LU
decomposition.
\question 23jun:lray What is the equivalent for the MetaPost command for \courier{lray - horiz*v - verti*u = whatever*(LightSource - R)\}, a system of three linear equations for three unknowns: \courier{horiz, verti, whatever\}?
@@ -1212,7 +1212,7 @@ clip(100,100);
\endverbatim
See also the discussion of tilings in the documentation:
-\docref{http://asymptote.sourceforge.net/doc/Pens.html\}.
+\docref{https://asymptote.sourceforge.io/doc/Pens.html\}.
\comment ######################################################################
@@ -1232,7 +1232,7 @@ batchView=false;
\endverbatim
in their \courier{config.asy\} file. See
-\docref{http://asymptote.sourceforge.net/doc/Options.html\}.
+\docref{https://asymptote.sourceforge.io/doc/Options.html\}.
\question 26jun:jpeg How do I output jpeg images?
@@ -1251,8 +1251,8 @@ Label:
label(graphic("file"),(0,0));
\endverbatim
-See the example \docref{http://asymptote.sourceforge.net/gallery/orthocenter.asy\} and
-\docref{http://asymptote.sourceforge.net/doc/label.html\}.
+See the example \docref{https://asymptote.sourceforge.io/gallery/orthocenter.asy\} and
+\docref{https://asymptote.sourceforge.io/doc/label.html\}.
\question 28jun:directpdf Does Asymptote support direct PDF output?
diff --git a/Build/source/utils/asymptote/doc/FAQ/asy-faq.info b/Build/source/utils/asymptote/doc/FAQ/asy-faq.info
index 94a02e1e38a..bef48f5f9bc 100644
--- a/Build/source/utils/asymptote/doc/FAQ/asy-faq.info
+++ b/Build/source/utils/asymptote/doc/FAQ/asy-faq.info
@@ -10,7 +10,7 @@ END-INFO-DIR-ENTRY
File: asy-faq.info, Node: Top, Next: Question 1.1, Up: (dir)
ASYMPTOTE FREQUENTLY ASKED QUESTIONS
- 25 Mar 2020
+ 2020-11-23
This is the list of Frequently Asked Questions about Asymptote (asy).
@@ -223,7 +223,7 @@ Question 1.2. How do I obtain Asymptote?
Binary releases are available for Linux, MacOS X, and Microsoft Windows
platforms, in addition to full source code, from the website
-http://asymptote.sourceforge.net/. Many Linux distributions (such as
+https://asymptote.sourceforge.io/. Many Linux distributions (such as
RedHat and Debian) now include an Asymptote package (check your
distribution's documentation for further information about this).
@@ -234,7 +234,7 @@ Question 1.3. Where can I ask questions about Asymptote?
If you have a question, please try to find an answer in this FAQ, in the
extensive Asymptote documentation at
-http://asymptote.sourceforge.net/doc/, or search the forum:
+https://asymptote.sourceforge.io/doc/, or search the forum:
http://sourceforge.net/forum/forum.php?forum_id=409349.

@@ -316,7 +316,7 @@ File: asy-faq.info, Node: Question 2.3, Next: Question 2.4, Previous: Question 2
Question 2.3. What do I do if I get the error: Error: pdfetex (file pdftex.cfg): cannot open config file...texinfo.tex appears to be broken?
-Simply put http://asymptote.sourceforge.net/asymptote.pdf in the directory
+Simply put https://asymptote.sourceforge.io/asymptote.pdf in the directory
doc and repeat the command make all. Or, if you don't want to build a
local copy of the documentation, simply proceed with make install-asy.
@@ -340,7 +340,7 @@ detailed guide on the topic. You can download it from
http://dario.dse.nl/projects/asylatex/.
Philippe Ivaldi has contributed an Asymptote mode for Emacs users
-http://asymptote.sourceforge.net/doc/Editing-modes.html, which includes a
+https://asymptote.sourceforge.io/doc/Editing-modes.html, which includes a
lasy-mode that allows one to compile and view the output of one
\begin{asy}...\end{asy} section at a time.
@@ -541,7 +541,7 @@ File: asy-faq.info, Node: Question 4.4, Next: Question 4.5, Previous: Question 4
Question 4.4. How can I use international fonts in Asymptote labels?
-See http://asymptote.sourceforge.net/doc/unicode.html.
+See https://asymptote.sourceforge.io/doc/Pens.html.

File: asy-faq.info, Node: Question 4.5, Next: Question 4.6, Previous: Question 4.4, Up: Section 4
@@ -586,8 +586,8 @@ Question 4.9. How can I draw some squares and circles of a fixed size and put a
Fixed-size objects should be drawn on a separate picture and then added to
currentpicture. Here is one way (see also
-http://asymptote.sourceforge.net/gallery/subpictures.asy and
-http://asymptote.sourceforge.net/gallery/mosquito.asy):
+https://asymptote.sourceforge.io/gallery/subpictures.asy and
+https://asymptote.sourceforge.io/gallery/mosquito.asy):
real u=2cm;
@@ -904,7 +904,7 @@ label. Other possible overwrite arguments are Allow (allows overlapping
labels; the default), Suppress (an overlapping label will not be written
at all), SuppressQuiet, and MoveQuiet. The last two achieve the same
result as the non-quiet types, but will not notify you which labels are
-overlapping. See: http://asymptote.sourceforge.net/doc/Pens.html.
+overlapping. See: https://asymptote.sourceforge.io/doc/Pens.html.
In the case of a user-specified tick array, you can change which labels
get suppressed/moved by changing the order of array entries.
@@ -948,7 +948,7 @@ corner. You can use this option to ensure multiple figures have the same
scaling and same resulting figure size (just ensure the two coordinates
given to fixedscaling() leaves room for any labels).
-See also http://asymptote.sourceforge.net/doc/Frames-and-pictures.html.
+See also https://asymptote.sourceforge.io/doc/Frames-and-pictures.html.

File: asy-faq.info, Node: Question 6.9, Next: Question 6.10, Previous: Question 6.8, Up: Section 6
@@ -966,7 +966,7 @@ limits((0,0),(1,2),Crop);
xaxis("$x$",BottomTop,LeftTicks);
yaxis("$y$",LeftRight,RightTicks);
-See also http://asymptote.sourceforge.net/doc/graph.html.
+See also https://asymptote.sourceforge.io/doc/graph.html.

File: asy-faq.info, Node: Question 6.10, Next: Question 6.11, Previous: Question 6.9, Up: Section 6
@@ -1051,7 +1051,7 @@ File: asy-faq.info, Node: Question 6.13, Next: Question 6.14, Previous: Question
Question 6.13. How can I make the y axis display base-2 logarithmic values?
-See the example http://asymptote.sourceforge.net/gallery/2D
+See the example https://asymptote.sourceforge.io/gallery/2D
graphs/log2graph.asy.

@@ -1061,7 +1061,7 @@ Question 6.14. How can I align the x axes of two graphs on the same figure?
An easy way to do this, if the axes to be aligned have the same scaling
and size, is illustrated in the example
-http://asymptote.sourceforge.net/gallery/2D graphs/alignedaxis.asy.
+https://asymptote.sourceforge.io/gallery/2D graphs/alignedaxis.asy.
Here is a more general solution to the problem of aligning two arbitrary
axes. One fits the second picture to a frame based on the horizontal
@@ -1125,7 +1125,7 @@ File: asy-faq.info, Node: Question 6.15, Next: Question 6.16, Previous: Question
Question 6.15. How can I change the direction of the y-axis, such that negatives values are on the upper y-axis?
Here is a simple example (see also the example
-http://asymptote.sourceforge.net/gallery/2D graphs/diatom.asy or the
+https://asymptote.sourceforge.io/gallery/2D graphs/diatom.asy or the
discussion of Linear(-1) in the documentation):
import graph;
@@ -1159,7 +1159,7 @@ Yes, use the parametric form
y=t
x=(t-2)^2+1
-See the example http://asymptote.sourceforge.net/gallery/2D
+See the example https://asymptote.sourceforge.io/gallery/2D
graphs/parametricgraph.asy.

@@ -1382,7 +1382,7 @@ Question 7.8. Is there a debugger for asy?
Yes, Asymptote includes a line-based debugger:
-http://asymptote.sourceforge.net/doc/Debugger.html
+https://asymptote.sourceforge.io/doc/Debugger.html

File: asy-faq.info, Node: Question 7.9, Next: Question 8.1, Previous: Question 7.8, Up: Section 7
@@ -1441,7 +1441,7 @@ pictures and distinguishes between true-size objects and objects that
should scale with the picture size. The resulting linear programming
problem is solved via the Simplex method.
-See the http://asymptote.sourceforge.net/gallery/dimension.asy example for
+See the https://asymptote.sourceforge.io/gallery/dimension.asy example for
an example of how deferred drawing is used to accomodate both user and
true-size (PostScript) coordinates.
@@ -1495,7 +1495,7 @@ PQ and pq. We find using routines like extension more explicit and less
confusing to new users. But we could be persuaded to add something similar
if someone can justify the need. In the meantime, one can always use the
explicit built-in linear solver solve (see
-http://asymptote.sourceforge.net/doc/solve.html), which uses LU
+https://asymptote.sourceforge.io/doc/solve.html), which uses LU
decomposition.

@@ -1578,7 +1578,7 @@ void clip(picture pic=currentpicture, real width, real height)
clip(100,100);
See also the discussion of tilings in the documentation:
-http://asymptote.sourceforge.net/doc/Pens.html.
+https://asymptote.sourceforge.io/doc/Pens.html.

File: asy-faq.info, Node: Section 9, Previous: Section 8, Up: Top
@@ -1612,7 +1612,7 @@ import settings;
interactiveView=false;
batchView=false;
in their config.asy file. See
-http://asymptote.sourceforge.net/doc/Options.html.
+https://asymptote.sourceforge.io/doc/Options.html.

File: asy-faq.info, Node: Question 9.2, Next: Question 9.3, Previous: Question 9.1, Up: Section 9
@@ -1631,8 +1631,8 @@ Convert them to eps format and use the graphic(string) function just like
a Label:
label(graphic("file"),(0,0));
-See the example http://asymptote.sourceforge.net/gallery/orthocenter.asy
-and http://asymptote.sourceforge.net/doc/label.html.
+See the example https://asymptote.sourceforge.io/gallery/orthocenter.asy
+and https://asymptote.sourceforge.io/doc/label.html.

File: asy-faq.info, Node: Question 9.4, Next: Question 9.5, Previous: Question 9.3, Up: Section 9
diff --git a/Build/source/utils/asymptote/doc/FAQ/bfnnconv.pl b/Build/source/utils/asymptote/doc/FAQ/bfnnconv.pl
index 0a705e2c68f..35a636b55e5 100755
--- a/Build/source/utils/asymptote/doc/FAQ/bfnnconv.pl
+++ b/Build/source/utils/asymptote/doc/FAQ/bfnnconv.pl
@@ -135,7 +135,11 @@ while (<>) {
m/([^\\])\`/ || warn "`$_'";
$_= $';
$cmd= $`.$1;
- $it= `$cmd`; chop $it;
+ if($cmd =~ s/^%perl //) {
+ $it= eval($cmd);
+ } else {
+ $it= `$cmd`; chop $it;
+ }
print $fh $it;
}
print $fh $_;
diff --git a/Build/source/utils/asymptote/doc/FAQ/install-sh b/Build/source/utils/asymptote/doc/FAQ/install-sh
index ec298b53740..6781b987bdb 100755
--- a/Build/source/utils/asymptote/doc/FAQ/install-sh
+++ b/Build/source/utils/asymptote/doc/FAQ/install-sh
@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2020-11-14.01; # UTC
+scriptversion=2009-04-28.21; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -35,21 +35,25 @@ scriptversion=2020-11-14.01; # UTC
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
-# 'make' implicit rules from creating a file called install from it
+# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.
-tab=' '
nl='
'
-IFS=" $tab$nl"
+IFS=" "" $nl"
-# Set DOITPROG to "echo" to test this script.
+# set DOITPROG to echo to test this script
+# Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-}
-doit_exec=${doit:-exec}
+if test -z "$doit"; then
+ doit_exec=exec
+else
+ doit_exec=$doit
+fi
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
@@ -64,16 +68,22 @@ mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
+posix_glob='?'
+initialize_posix_glob='
+ test "$posix_glob" != "?" || {
+ if (set -f) 2>/dev/null; then
+ posix_glob=
+ else
+ posix_glob=:
+ fi
+ }
+'
+
posix_mkdir=
# Desired mode of installed file.
mode=0755
-# Create dirs (including intermediate dirs) using mode 755.
-# This is like GNU 'install' as of coreutils 8.32 (2020).
-mkdir_umask=22
-
-backupsuffix=
chgrpcmd=
chmodcmd=$chmodprog
chowncmd=
@@ -87,7 +97,7 @@ dir_arg=
dst_arg=
copy_on_change=false
-is_target_a_directory=possibly
+no_target_directory=
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
@@ -104,28 +114,18 @@ Options:
--version display version info and exit.
-c (ignored)
- -C install only if different (preserve data modification time)
+ -C install only if different (preserve the last data modification time)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
- -p pass -p to $cpprog.
-s $stripprog installed files.
- -S SUFFIX attempt to back up existing files, with suffix SUFFIX.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG
-
-By default, rm is invoked with -f; when overridden with RMPROG,
-it's up to you to specify -f if you want it.
-
-If -S is not specified, no backups are attempted.
-
-Email bug reports to bug-automake@gnu.org.
-Automake home page: https://www.gnu.org/software/automake/
"
while test $# -ne 0; do
@@ -137,62 +137,42 @@ while test $# -ne 0; do
-d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
- shift;;
+ shift;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
- case $mode in
- *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
- echo "$0: invalid mode: $mode" >&2
- exit 1;;
- esac
- shift;;
+ case $mode in
+ *' '* | *' '* | *'
+'* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ shift;;
-o) chowncmd="$chownprog $2"
- shift;;
-
- -p) cpprog="$cpprog -p";;
+ shift;;
-s) stripcmd=$stripprog;;
- -S) backupsuffix="$2"
- shift;;
-
- -t)
- is_target_a_directory=always
- dst_arg=$2
- # Protect names problematic for 'test' and other utilities.
- case $dst_arg in
- -* | [=\(\)!]) dst_arg=./$dst_arg;;
- esac
- shift;;
+ -t) dst_arg=$2
+ shift;;
- -T) is_target_a_directory=never;;
+ -T) no_target_directory=true;;
--version) echo "$0 $scriptversion"; exit $?;;
- --) shift
- break;;
+ --) shift
+ break;;
- -*) echo "$0: invalid option: $1" >&2
- exit 1;;
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
*) break;;
esac
shift
done
-# We allow the use of options -d and -T together, by making -d
-# take the precedence; this is for compatibility with GNU install.
-
-if test -n "$dir_arg"; then
- if test -n "$dst_arg"; then
- echo "$0: target directory not allowed when installing a directory." >&2
- exit 1
- fi
-fi
-
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
@@ -206,10 +186,6 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
fi
shift # arg
dst_arg=$arg
- # Protect names problematic for 'test' and other utilities.
- case $dst_arg in
- -* | [=\(\)!]) dst_arg=./$dst_arg;;
- esac
done
fi
@@ -218,26 +194,13 @@ if test $# -eq 0; then
echo "$0: no input file specified." >&2
exit 1
fi
- # It's OK to call 'install-sh -d' without argument.
+ # It's OK to call `install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
if test -z "$dir_arg"; then
- if test $# -gt 1 || test "$is_target_a_directory" = always; then
- if test ! -d "$dst_arg"; then
- echo "$0: $dst_arg: Is not a directory." >&2
- exit 1
- fi
- fi
-fi
-
-if test -z "$dir_arg"; then
- do_exit='(exit $ret); exit $ret'
- trap "ret=129; $do_exit" 1
- trap "ret=130; $do_exit" 2
- trap "ret=141; $do_exit" 13
- trap "ret=143; $do_exit" 15
+ trap '(exit $?); exit' 1 2 13 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
@@ -248,16 +211,16 @@ if test -z "$dir_arg"; then
*[0-7])
if test -z "$stripcmd"; then
- u_plus_rw=
+ u_plus_rw=
else
- u_plus_rw='% 200'
+ u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
- u_plus_rw=
+ u_plus_rw=
else
- u_plus_rw=,u+rw
+ u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
@@ -265,9 +228,9 @@ fi
for src
do
- # Protect names problematic for 'test' and other utilities.
+ # Protect names starting with `-'.
case $src in
- -* | [=\(\)!]) src=./$src;;
+ -*) src=./$src;;
esac
if test -n "$dir_arg"; then
@@ -275,10 +238,6 @@ do
dstdir=$dst
test -d "$dstdir"
dstdir_status=$?
- # Don't chown directories that already exist.
- if test $dstdir_status = 0; then
- chowncmd=""
- fi
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
@@ -293,150 +252,185 @@ do
echo "$0: no destination specified." >&2
exit 1
fi
+
dst=$dst_arg
+ # Protect names starting with `-'.
+ case $dst in
+ -*) dst=./$dst;;
+ esac
- # If destination is a directory, append the input filename.
+ # If destination is a directory, append the input filename; won't work
+ # if double slashes aren't ignored.
if test -d "$dst"; then
- if test "$is_target_a_directory" = never; then
- echo "$0: $dst_arg: Is a directory" >&2
- exit 1
+ if test -n "$no_target_directory"; then
+ echo "$0: $dst_arg: Is a directory" >&2
+ exit 1
fi
dstdir=$dst
- dstbase=`basename "$src"`
- case $dst in
- */) dst=$dst$dstbase;;
- *) dst=$dst/$dstbase;;
- esac
+ dst=$dstdir/`basename "$src"`
dstdir_status=0
else
- dstdir=`dirname "$dst"`
+ # Prefer dirname, but fall back on a substitute if dirname fails.
+ dstdir=`
+ (dirname "$dst") 2>/dev/null ||
+ expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$dst" : 'X\(//\)[^/]' \| \
+ X"$dst" : 'X\(//\)$' \| \
+ X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+ echo X"$dst" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'
+ `
+
test -d "$dstdir"
dstdir_status=$?
fi
fi
- case $dstdir in
- */) dstdirslash=$dstdir;;
- *) dstdirslash=$dstdir/;;
- esac
-
obsolete_mkdir_used=false
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
- # With -d, create the new directory with the user-specified mode.
- # Otherwise, rely on $mkdir_umask.
- if test -n "$dir_arg"; then
- mkdir_mode=-m$mode
- else
- mkdir_mode=
- fi
-
- posix_mkdir=false
- # The $RANDOM variable is not portable (e.g., dash). Use it
- # here however when possible just to lower collision chance.
- tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
-
- trap '
- ret=$?
- rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
- exit $ret
- ' 0
-
- # Because "mkdir -p" follows existing symlinks and we likely work
- # directly in world-writeable /tmp, make sure that the '$tmpdir'
- # directory is successfully created first before we actually test
- # 'mkdir -p'.
- if (umask $mkdir_umask &&
- $mkdirprog $mkdir_mode "$tmpdir" &&
- exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
- then
- if test -z "$dir_arg" || {
- # Check for POSIX incompatibilities with -m.
- # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
- # other-writable bit of parent directory when it shouldn't.
- # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
- test_tmpdir="$tmpdir/a"
- ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
- case $ls_ld_tmpdir in
- d????-?r-*) different_mode=700;;
- d????-?--*) different_mode=755;;
- *) false;;
- esac &&
- $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
- ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
- test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
- }
- }
- then posix_mkdir=:
- fi
- rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
+ # Create intermediate dirs using mode 755 as modified by the umask.
+ # This is like FreeBSD 'install' as of 1997-10-28.
+ umask=`umask`
+ case $stripcmd.$umask in
+ # Optimize common cases.
+ *[2367][2367]) mkdir_umask=$umask;;
+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+ *[0-7])
+ mkdir_umask=`expr $umask + 22 \
+ - $umask % 100 % 40 + $umask % 20 \
+ - $umask % 10 % 4 + $umask % 2
+ `;;
+ *) mkdir_umask=$umask,go-w;;
+ esac
+
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
else
- # Remove any dirs left behind by ancient mkdir implementations.
- rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
+ mkdir_mode=
fi
- trap '' 0;;
+
+ posix_mkdir=false
+ case $umask in
+ *[123567][0-7][0-7])
+ # POSIX mkdir -p sets u+wx bits regardless of umask, which
+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+ ;;
+ *)
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+ if (umask $mkdir_umask &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writeable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ ls_ld_tmpdir=`ls -ld "$tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/d" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+ fi
+ trap '' 0;;
+ esac;;
esac
if
$posix_mkdir && (
- umask $mkdir_umask &&
- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
- # mkdir does not conform to POSIX,
+ # The umask is ridiculous, or mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
- /*) prefix='/';;
- [-=\(\)!]*) prefix='./';;
- *) prefix='';;
+ /*) prefix='/';;
+ -*) prefix='./';;
+ *) prefix='';;
esac
+ eval "$initialize_posix_glob"
+
oIFS=$IFS
IFS=/
- set -f
+ $posix_glob set -f
set fnord $dstdir
shift
- set +f
+ $posix_glob set +f
IFS=$oIFS
prefixes=
for d
do
- test X"$d" = X && continue
-
- prefix=$prefix$d
- if test -d "$prefix"; then
- prefixes=
- else
- if $posix_mkdir; then
- (umask $mkdir_umask &&
- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
- # Don't fail if two instances are running concurrently.
- test -d "$prefix" || exit 1
- else
- case $prefix in
- *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
- *) qprefix=$prefix;;
- esac
- prefixes="$prefixes '$qprefix'"
- fi
- fi
- prefix=$prefix/
+ test -z "$d" && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask=$mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
done
if test -n "$prefixes"; then
- # Don't fail if two instances are running concurrently.
- (umask $mkdir_umask &&
- eval "\$doit_exec \$mkdirprog $prefixes") ||
- test -d "$dstdir" || exit 1
- obsolete_mkdir_used=true
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
fi
fi
fi
@@ -449,25 +443,14 @@ do
else
# Make a couple of temp file names in the proper directory.
- dsttmp=${dstdirslash}_inst.$$_
- rmtmp=${dstdirslash}_rm.$$_
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name.
- (umask $cp_umask &&
- { test -z "$stripcmd" || {
- # Create $dsttmp read-write so that cp doesn't create it read-only,
- # which would cause strip to fail.
- if test -z "$doit"; then
- : >"$dsttmp" # No need to fork-exec 'touch'.
- else
- $doit touch "$dsttmp"
- fi
- }
- } &&
- $doit_exec $cpprog "$src" "$dsttmp") &&
+ (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits.
#
@@ -482,24 +465,20 @@ do
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
- old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
- new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
- set -f &&
+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+
+ eval "$initialize_posix_glob" &&
+ $posix_glob set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
- set +f &&
+ $posix_glob set +f &&
+
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
rm -f "$dsttmp"
else
- # If $backupsuffix is set, and the file being installed
- # already exists, attempt a backup. Don't worry if it fails,
- # e.g., if mv doesn't support -f.
- if test -n "$backupsuffix" && test -f "$dst"; then
- $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
- fi
-
# Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
@@ -507,24 +486,24 @@ do
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
- # Now remove or move aside any old file at destination location.
- # We try this two ways since rm can't unlink itself on some
- # systems and the destination file might be busy for other
- # reasons. In this case, the final cleanup might fail but the new
- # file should still install successfully.
- {
- test ! -f "$dst" ||
- $doit $rmcmd "$dst" 2>/dev/null ||
- { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
- { $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
- } ||
- { echo "$0: cannot unlink or rename $dst" >&2
- (exit 1); exit 1
- }
- } &&
-
- # Now rename the file to the real destination.
- $doit $mvcmd "$dsttmp" "$dst"
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ test ! -f "$dst" ||
+ $doit $rmcmd -f "$dst" 2>/dev/null ||
+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+ { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+ } ||
+ { echo "$0: cannot unlink or rename $dst" >&2
+ (exit 1); exit 1
+ }
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1
@@ -533,9 +512,9 @@ do
done
# Local variables:
-# eval: (add-hook 'before-save-hook 'time-stamp)
+# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC0"
+# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:
diff --git a/Build/source/utils/asymptote/doc/FAQ/m-html.pl b/Build/source/utils/asymptote/doc/FAQ/m-html.pl
index 75b8ccc38f7..77cc2575040 100644
--- a/Build/source/utils/asymptote/doc/FAQ/m-html.pl
+++ b/Build/source/utils/asymptote/doc/FAQ/m-html.pl
@@ -22,6 +22,8 @@
# by the GPL. However, I would appreciate it if you credited me if
# appropriate in any documents you format using BFNN.)
+use POSIX;
+
%saniarray= ('<','lt', '>','gt', '&','amp', '"','quot');
sub html_init {
@@ -34,8 +36,9 @@ sub html_init {
print HTML "<html>\n";
$html_needpara= -1;
$html_end='';
- chop($html_date=`date '+%d %B %Y'`);
- chop($html_year=`date '+%Y'`);
+ my $epoch=$ENV{SOURCE_DATE_EPOCH} || time;
+ $html_date=POSIX::strftime("%Y-%m-%d", gmtime($epoch));
+ $html_year=POSIX::strftime("%Y", gmtime($epoch));
}
sub html_startup {
@@ -50,9 +53,9 @@ $user_title
content="Frequently asked questions and answers (FAQ) for Asymptote.">
<link rel="Bookmark" title="Asymptote FAQ" href="index.html">
<LINK rel="Bookmark" title="Asymptote Home Page"
- href="http://asymptote.sourceforge.net">
+ href="https://asymptote.sourceforge.io">
<LINK rel="Bookmark" title="Asymptote Manual"
- href="http://asymptote.sourceforge.net/doc/">
+ href="https://asymptote.sourceforge.io/doc/">
</head><body text="#000000" bgcolor="#FFFFFF"><h1>
$user_title
</h1>
diff --git a/Build/source/utils/asymptote/doc/HermiteSpline.asy b/Build/source/utils/asymptote/doc/HermiteSpline.asy
index 7f4cbbebb24..86e66f9edd2 100644
--- a/Build/source/utils/asymptote/doc/HermiteSpline.asy
+++ b/Build/source/utils/asymptote/doc/HermiteSpline.asy
@@ -1,14 +1,14 @@
import graph;
-size(140mm,70mm,IgnoreAspect);
-scale(false);
+size(140mm,70mm,IgnoreAspect);
+scale(false);
real[] x={1,3,4,5,6};
-real[] y={1,5,2,0,4};
+real[] y={1,5,2,0,4};
-marker mark=marker(scale(1mm)*cross(6,false,r=0.35),red,Fill);
+marker mark=marker(scale(1mm)*cross(6,false,r=0.35),red,Fill);
draw(graph(x,y,Hermite),"Hermite Spline",mark);
-xaxis("$x$",Bottom,LeftTicks(x));
-yaxis("$y$",Left,LeftTicks);
+xaxis("$x$",Bottom,LeftTicks(x));
+yaxis("$y$",Left,LeftTicks);
attach(legend(),point(NW),40S+30E,UnFill);
diff --git a/Build/source/utils/asymptote/doc/TeXShopAndAsymptote.pdf b/Build/source/utils/asymptote/doc/TeXShopAndAsymptote.pdf
index 69297b6f4f7..01a57ca157a 100644
--- a/Build/source/utils/asymptote/doc/TeXShopAndAsymptote.pdf
+++ b/Build/source/utils/asymptote/doc/TeXShopAndAsymptote.pdf
Binary files differ
diff --git a/Build/source/utils/asymptote/doc/asy-latex.pdf b/Build/source/utils/asymptote/doc/asy-latex.pdf
index 9a1ceaac57c..923215ef269 100644
--- a/Build/source/utils/asymptote/doc/asy-latex.pdf
+++ b/Build/source/utils/asymptote/doc/asy-latex.pdf
Binary files differ
diff --git a/Build/source/utils/asymptote/doc/asy.1 b/Build/source/utils/asymptote/doc/asy.1
index bd81c767421..4ad758ce371 100644
--- a/Build/source/utils/asymptote/doc/asy.1
+++ b/Build/source/utils/asymptote/doc/asy.1
@@ -88,9 +88,15 @@ Command to autoexecute.
.B \-compact
Conserve memory at the expense of speed [false].
.TP
+.B \-compress
+Compress images in PDF output [true].
+.TP
.B \-d,\-debug
Enable debugging messages [false].
.TP
+.B \-devicepixelratio n
+Ratio of physical to logical pixels [1].
+.TP
.B \-digits n
Default output file precision [7].
.TP
@@ -115,6 +121,9 @@ Additional frame delay [0].
.B \-framerate frames/s
Animation speed [30].
.TP
+.B \-globalread
+Allow read from other directory [true].
+.TP
.B \-globalwrite
Allow write to other directory [false].
.TP
@@ -170,7 +179,7 @@ Mask fpu exceptions; command-line only.
Maximum rendering tile size [(1024,768)].
.TP
.B \-maxviewport pair
-Maximum viewport size [(2048,2048)].
+Maximum viewport size [(0,0)].
.TP
.B \-multiline
Input code over multiple lines at the prompt [false].
@@ -184,9 +193,6 @@ Multisampling width for screen images [4].
.B \-offline
Produce offline html files [false].
.TP
-.B \-offscreen
-Use offscreen rendering [false].
-.TP
.B \-O,\-offset pair
PostScript offset [(0,0)].
.TP
@@ -248,7 +254,7 @@ WebGL touch screen shift mode delay [200].
Spin speed [60].
.TP
.B \-svgemulation
-Emulate unimplemented SVG shading [false].
+Emulate unimplemented SVG shading [true].
.TP
.B \-tabcompletion
Interactive prompt auto-completion [true].
diff --git a/Build/source/utils/asymptote/doc/asyRefCard.pdf b/Build/source/utils/asymptote/doc/asyRefCard.pdf
index 4ece2fff639..966b19c9398 100644
--- a/Build/source/utils/asymptote/doc/asyRefCard.pdf
+++ b/Build/source/utils/asymptote/doc/asyRefCard.pdf
Binary files differ
diff --git a/Build/source/utils/asymptote/doc/asymptote.pdf b/Build/source/utils/asymptote/doc/asymptote.pdf
index 55c056d4050..d03ce3c779f 100644
--- a/Build/source/utils/asymptote/doc/asymptote.pdf
+++ b/Build/source/utils/asymptote/doc/asymptote.pdf
Binary files differ
diff --git a/Build/source/utils/asymptote/doc/asymptote.texi b/Build/source/utils/asymptote/doc/asymptote.texi
index ae0df15bec4..aec78a639e3 100644
--- a/Build/source/utils/asymptote/doc/asymptote.texi
+++ b/Build/source/utils/asymptote/doc/asymptote.texi
@@ -11,7 +11,7 @@ This file documents @code{Asymptote}, version @value{VERSION}.
@url{https://asymptote.sourceforge.io}
-Copyright @copyright{} 2004-19 Andy Hammerlindl, John Bowman, and Tom Prince.
+Copyright @copyright{} 2004-20 Andy Hammerlindl, John Bowman, and Tom Prince.
@quotation
Permission is granted to copy, distribute and/or modify this document
@@ -142,6 +142,7 @@ Base modules
* stats:: Statistics routines and histograms
* patterns:: Custom fill and draw patterns
* markers:: Custom path marker routines
+* map:: Map keys to values
* tree:: Dynamic binary search tree
* binarytree:: Binary tree drawing module
* drawtree:: Tree drawing module
@@ -152,8 +153,6 @@ Base modules
* embed:: Embedding movies, sounds, and 3D objects
* slide:: Making presentations with @code{Asymptote}
* MetaPost:: @code{MetaPost} compatibility routines
-* unicode:: Accept @code{unicode} (UTF-8) characters
-* latin1:: Accept @code{ISO 8859-1} characters
* babel:: Interface to @code{LaTeX} @code{babel} package
* labelpath:: Drawing curved labels
* labelpath3:: Drawing curved labels in 3D
@@ -186,13 +185,19 @@ Graphical User Interface
@chapter Description
@cindex description
+@cindex @code{Asymptote Web Application}
@code{Asymptote} is a powerful descriptive vector graphics language that
provides a mathematical coordinate-based framework for technical drawing.
Labels and equations are typeset with @code{LaTeX}, for overall document
consistency, yielding the same high-quality level of typesetting that
@code{LaTeX} provides for scientific text. By default it produces
-@code{PostScript} output, but it can also generate any format that the
-@code{ImageMagick} package can produce.
+@code{PostScript} output, but it can also generate @code{PDF},
+@code{SVG}, @code{WebGL}, @code{PRC}, and any format that the
+@code{ImageMagick} package can produce. You can even try it out in your
+Web browser without installing it, using the @code{Asymptote Web
+Application}:
+
+@url{http://asymptote.ualberta.ca}
A major advantage of @code{Asymptote} over other graphics packages is
that it is a high-level programming language, as opposed to just a graphics
@@ -328,11 +333,11 @@ texhash
@noindent
The @code{texhash} command, which installs LaTeX style files, is optional.
The executable file will be @code{/usr/local/bin/asy}) and example code
-will be installed by default in @code{@value{Datadir}/doc/asymptote/examples}.
+will be installed by default in @code{@value{Docdir}/examples}.
@noindent
@cindex Fedora
-Fedora users can easily install the most recent version of @code{Asymptote}
+Fedora users can easily install a recent version of @code{Asymptote}
with the command
@verbatim
dnf --enablerepo=rawhide install asymptote
@@ -374,7 +379,7 @@ where @code{x.xx} denotes the latest version.
A working @TeX{} implementation (we recommend
@url{https://www.tug.org/texlive} or
@url{http://www.miktex.org}) will be required to typeset labels.
-You will also need to install @code{GPL Ghostscript} version 9.14 or
+You will also need to install @code{GPL Ghostscript} version 9.52 or
later from @url{http://downloads.ghostscript.com/public}.
To view @code{PostScript} output, you can install the
@@ -387,8 +392,8 @@ The @code{ImageMagick} package from
@noindent
is required to support output formats other than @acronym{HTML},
@acronym{PDF}, @acronym{SVG}, and @acronym{PNG} (@pxref{convert}).
-The @code{Python 3} interpreter from @url{https://www.python.org} is only required
-if you wish to try out the graphical user interface (@pxref{GUI}).
+The @code{Python 3} interpreter from @url{https://www.python.org} is only
+required if you wish to try out the graphical user interface (@pxref{GUI}).
@noindent
Example code will be installed by default in the @code{examples}
@@ -411,7 +416,7 @@ signal). Version @code{gv-3.6.3} or later (from
@url{https://ftp.gnu.org/gnu/gv/}) is required for interactive mode to
work properly.
Users of @code{ggv} will need to enable @code{Watch file} under
-@code{Edit/Postscript Viewer Preferences}.
+@code{Edit/PostScript Viewer Preferences}.
Users of @code{gsview} will need to enable @code{Options/Auto Redisplay}
(however, under @code{MSDOS} it is still necessary to click on the
@code{gsview} window; under @code{UNIX} one must manually redisplay by
@@ -458,13 +463,17 @@ Windows} registry. The @code{gs} setting specifies the location of the
@noindent
@cindex @code{htmlviewer}
+@cindex @code{absolute}
The configuration variable @code{htmlviewer} specifies the
browser to use to display 3D @code{WebGL} output.
The default setting is @code{google-chrome} under @code{UNIX} and
@code{cmd} under @code{Microsoft Windows}. Note that @code{Internet Explorer}
does not support @code{WebGL}; @code{Microsoft Windows} users should set their
default html browser to @code{chrome} or @code{microsoft-edge}.
-
+By default, 2D and 3D @code{HTML} images expand to the enclosing canvas;
+this can be disabled by setting the configuation variable @code{absolute}
+to @code{true}.
+
On @code{UNIX} systems, to support automatic document
reloading of @code{PDF} files in @code{Adobe Reader}, we recommend
copying the file @code{reload.js} from the @code{Asymptote} system
@@ -557,8 +566,8 @@ under @code{Microsoft Windows XP}:
@section Search paths
@cindex search paths
-In looking for @code{Asymptote} system
-files, @code{asy} will search the following paths, in the order listed:
+In looking for @code{Asymptote} files, @code{asy} will search the
+following paths, in the order listed:
@enumerate
@item
The current directory;
@@ -578,6 +587,10 @@ the directory @code{.asy} in the user's home directory
The @code{Asymptote} system directory (by default,
@code{@value{Datadir}/asymptote} under @code{UNIX} and
@code{C:\Program Files\Asymptote} under @code{MSDOS}).
+@item
+The @code{Asymptote} examples directory (by default,
+@code{@value{Docdir}/examples} under @code{UNIX} and
+@code{C:\Program Files\Asymptote\examples} under @code{MSDOS}).
@end enumerate
@node Compiling from UNIX source, Editing modes, Search paths, Installation
@@ -603,24 +616,22 @@ used; if it is old we recommend first putting
in the @code{Asymptote} source directory.
On @code{UNIX} platforms (other than @code{MacOS X}), we recommend
-using version @code{3.0.0} of the @code{freeglut} library. To compile
+using version @code{3.2.1} of the @code{freeglut} library. To compile
@code{freeglut}, download
@quotation
-@url{https://prdownloads.sourceforge.net/freeglut/freeglut-3.0.0.tar.gz}
+@url{https://prdownloads.sourceforge.net/freeglut/freeglut-3.2.1.tar.gz}
@end quotation
@noindent
and type (as the root user):
@verbatim
-gunzip freeglut-3.0.0.tar.gz
-tar -xf freeglut-3.0.0.tar
-cd freeglut-3.0.0
-./configure --prefix=/usr
-cmake .
+gunzip freeglut-3.2.1.tar.gz
+tar -xf freeglut-3.2.1.tar
+cd freeglut-3.2.1
+cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_C_FLAGS=-fcommon .
make
make install
-cd ..
@end verbatim
-@noindent
+@noindent
Then compile @code{Asymptote} with the commands
@verbatim
@@ -647,12 +658,15 @@ done as the root user. To install without root privileges, change the
@verbatim
./configure --prefix=$HOME/asymptote
@end verbatim
+@cindex @code{MacOS X} configuration
+@cindex @code{clang}
One can disable use of the Boehm garbage collector by configuring
with @code{./configure --disable-gc}. For a list of other configuration
-options, say @code{./configure --help}. For example, one can tell
-configure to look for header files and libraries in nonstandard locations:
+options, say @code{./configure --help}. For example, under
+@code{MacOS X}, one can tell configure to use the @code{clang} compilers and
+look for header files and libraries in nonstandard locations:
@verbatim
-./configure CPPFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib
+./configure CC=clang CXX=clang++ CPPFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib
@end verbatim
If you are compiling @code{Asymptote} with @code{gcc}, you will need a
@@ -766,6 +780,12 @@ make install
@noindent
To compile without optimization, use the command @code{make CFLAGS=-g}.
+On @code{Ubuntu} systems, you may need to first install the required
+dependencies:
+@verbatim
+apt-get build-dep asymptote
+@end verbatim
+@noindent
@node Uninstall, , Git, Installation
@section Uninstall
@@ -800,7 +820,7 @@ A concise introduction to @code{Asymptote} is given here.
For a more thorough introduction, see the excellent @code{Asymptote}
tutorial written by Charles Staats:
-@url{https://math.uchicago.edu/~cstaats/Charles_Staats_III/Notes_and_papers_files/asymptote_tutorial.pdf}
+@url{https://asymptote.sourceforge.io/asymptote_tutorial.pdf}
Another @code{Asymptote} tutorial is available as a wiki,
with images rendered by an online Asymptote engine:
@@ -986,7 +1006,7 @@ path unitcircle=E..N..W..S..cycle;
@cindex superpath
@noindent
An @code{Asymptote} path, being connected, is equivalent to a
-@code{Postscript subpath}. The @code{^^} binary operator, which
+@code{PostScript subpath}. The @code{^^} binary operator, which
requests that the pen be moved (without drawing or affecting
endpoint curvatures) from the final point of the left-hand path to the
initial point of the right-hand path, may be used to group several
@@ -1009,7 +1029,7 @@ filldraw(unitcircle^^reverse(g),yellow,black);
@cindex @code{unitbox}
The @code{^^} operator is used by the @code{box(triple, triple)} function in
-the module @code{three.asy} to construct the edges of a
+the module @code{three} to construct the edges of a
cube @code{unitbox} without retracing steps (@pxref{three}):
@verbatiminclude cube.asy
@sp 1
@@ -1052,6 +1072,12 @@ layer appearing on top. Within each layer, labels, images, and
verbatim @code{tex} commands are always drawn after the
@code{PostScript} objects in that layer.
+@cindex @code{newpage}
+A page break can be generated with the command
+@verbatim
+void newpage(picture pic=currentpicture);
+@end verbatim
+
While some of these drawing commands take many options, they all have sensible
default values (for example, the picture argument defaults to
currentpicture).
@@ -1164,21 +1190,22 @@ Margins can be used to shrink the visible portion of a path by
Typical values of @code{margin}
are @code{NoMargin}, @code{BeginMargin}, @code{EndMargin} (or
equivalently @code{Margin}), and @code{Margins} (which leaves a margin
-at both ends of the path). One may use @code{Margin(real begin, real end)}
+at both ends of the path). One may use
+@code{Margin(real begin, real end=begin)}
to specify the size of the beginning and ending margin, respectively,
in multiples of the units @code{labelmargin(p)} used for aligning labels.
Alternatively, @code{BeginPenMargin}, @code{EndPenMargin}
(or equivalently @code{PenMargin}), @code{PenMargins},
-@code{PenMargin(real begin, real end)} specify a margin in units of
+@code{PenMargin(real begin, real end=begin)} specify a margin in units of
the pen line width, taking account of the pen line width when drawing
the path or arrow. For example, use @code{DotMargin}, an
abbreviation for @code{PenMargin(-0.5*dotfactor,0.5*dotfactor)},
to draw from the usual beginning point just up to the boundary of an
end dot of width @code{dotfactor*linewidth(p)}. The qualifiers
@code{BeginDotMargin}, @code{EndDotMargin}, and @code{DotMargins} work
-similarly. The qualifier @code{TrueMargin(real begin, real end)} allows one to
-specify a margin directly in @code{PostScript} units, independent of
-the pen line width.
+similarly. The qualifier @code{TrueMargin(real begin, real end=begin)}
+allows one to specify a margin directly in @code{PostScript} units,
+independent of the pen line width.
The use of arrows, bars, and margins is illustrated by the examples
@code{@uref{https://asymptote.sourceforge.io/gallery/Pythagoras.svg,,Pythagoras}@uref{https://asymptote.sourceforge.io/gallery/Pythagoras.asy,,.asy}} and
@@ -1332,7 +1359,8 @@ void axialshade(picture pic=currentpicture, path g, bool stroke=false,
@noindent
The boolean parameters @code{extenda} and @code{extendb} indicate
whether the shading should extend beyond the axis endpoints @code{a}
-and @code{b}.
+and @code{b}. An example of axial shading is provided in the example file
+@code{@uref{https://asymptote.sourceforge.io/gallery/axialshade.svg,,axialshade}@uref{https://asymptote.sourceforge.io/gallery/axialshade.asy,,.asy}}.
@cindex @code{radialshade}
Radial gradient shading varying smoothly from
@@ -1374,11 +1402,11 @@ The edge flags used in Gouraud shading are documented here:
@cindex Coons shading
@cindex tensor product shading
@cindex @code{tensorshade}
-Tensor product shading using fill rule @code{fillrule} on patches
-bounded by the @math{n} cyclic paths of length 4 in path array @code{b},
-using the vertex colors specified in the @math{n \times 4} pen array
-@code{p} and internal control points in the @math{n \times 4}
-array @code{z}, is implemented with
+Tensor product shading using clipping path @code{g}, fill rule
+@code{fillrule} on patches bounded by the @math{n} cyclic paths of
+length 4 in path array @code{b}, using the vertex colors specified in
+the @math{n \times 4} pen array @code{p} and internal control points
+in the @math{n \times 4} array @code{z}, is implemented with
@verbatim
void tensorshade(picture pic=currentpicture, path[] g, bool stroke=false,
pen fillrule=currentpen, pen[][] p, path[] b=g,
@@ -1443,8 +1471,10 @@ Clip the current contents of picture @code{pic} to the region bounded
by the path @code{g}, using fill rule @code{fillrule} (@pxref{fillrule}).
If @code{stroke=true}, the clipped portion is the same as the region
that would be drawn with @code{draw(pic,g,zerowinding)}; in
-this case the path @code{g} need not be cyclic. For an illustration of
-picture clipping, see the first example in @ref{LaTeX usage}.
+this case the path @code{g} need not be cyclic. While clipping has no notion
+of depth (it transcends layers and even pages), one can localize clipping
+to a temporary picture, which can then be added to @code{pic}.
+For an illustration of picture clipping, see the first example in @ref{LaTeX usage}.
@node label, , clip, Drawing commands
@section label
@@ -1897,13 +1927,15 @@ returns the conjugate of @code{z};
@item real length(pair z)
@cindex @code{length}
@cindex @code{abs}
-returns the complex modulus @code{|z|} of its argument @code{z}.
+@cindex @code{abs2}
+returns the complex modulus @math{|@code{z}|} of its argument @code{z}.
For example,
@example
pair z=(3,4);
length(z);
@end example
-returns the result 5. A synonym for @code{length(pair)} is @code{abs(pair)};
+returns the result 5. A synonym for @code{length(pair)} is @code{abs(pair)}.
+The function @code{abs2(pair z)} returns @math{|@code{z}|^2};
@item real angle(pair z, bool warn=true)
@cindex @code{angle}
@@ -1998,8 +2030,11 @@ Here are the built-in functions for triples:
@table @code
@item real length(triple v)
@cindex @code{length}
-returns the length @code{|v|} of the vector @code{v}.
-A synonym for @code{length(triple)} is @code{abs(triple)};
+@cindex @code{abs}
+@cindex @code{abs2}
+returns the length @math{|@code{v}|} of its argument @code{v}.
+A synonym for @code{length(triple)} is @code{abs(triple)}.
+The function @code{abs2(triple v)} returns @math{|@code{v}|^2};
@item real polar(triple v, bool warn=true)
@cindex @code{polar}
@@ -2216,7 +2251,7 @@ current locale;
@item string time(string format="%a %b %d %T %Z %Y")
@cindex @code{time}
-@cindex @code{date}
+@cindex date
@cindex @code{strftime}
returns the current time formatted by the ANSI C routine
@code{strftime} according to the string @code{format} using the current
@@ -3066,7 +3101,7 @@ The default setting, @code{nobasealign},which may be changed with
full label bounding box for alignment. In contrast, @code{basealign}
requests that the @TeX{} baseline be respected.
The base align setting of a pen is returned by
-@code{int basealigin(pen p=currentpen)}.
+@code{int basealign(pen p=currentpen)}.
@cindex @code{fontsize}
@cindex @code{lineskip}
@@ -3089,21 +3124,18 @@ skip of a pen can be examined with the routines
@code{real fontsize(pen p=currentpen)} and
@code{real lineskip(pen p=currentpen)}, respectively.
+@cindex font
+@cindex @LaTeX{} NFSS fonts
@cindex @code{font}
-@cindex @code{LaTeX fonts}
-@cindex @code{NFSS}
-@cindex @code{font command}
-@item A pen using a specific @code{LaTeX} @code{NFSS} font is returned
+@item A pen using a specific @LaTeX{} NFSS font is returned
by calling the function @code{pen font(string encoding, string family,
string series, string shape)}. The default setting,
@code{font("OT1","cmr","m","n")}, corresponds to 12pt Computer Modern Roman;
this may be changed with @code{defaultpen(pen)}.
The font setting of a pen is returned by
@code{string font(pen p=currentpen)}.
-Support for standardized international characters is provided by the
-@code{unicode} package (@pxref{unicode}).
-@cindex @code{TeX fonts}
+@cindex @TeX{} fonts
Alternatively, one may select a fixed-size @TeX{} font (on which
@code{fontsize} has no effect) like @code{"cmr12"} (12pt Computer Modern
Roman) or @code{"pcrr"} (Courier) using the function @code{pen font(string
@@ -3114,7 +3146,7 @@ to the requested size: @code{pen font(string name, real size)}.
A nonstandard font command can be generated with
@code{pen fontcommand(string)}.
-@cindex @code{PostScript fonts}
+@cindex @code{PostScript} fonts
A convenient interface to the following standard @code{PostScript}
fonts is also provided:
@verbatim
@@ -3130,6 +3162,45 @@ pen Symbol(string series="m", string shape="n");
pen ZapfDingbats(string series="m", string shape="n");
@end verbatim
+@cindex font
+@cindex font encoding
+@cindex input encoding
+@cindex language context
+@item Starting with the 2018/04/01 release, @LaTeX{} takes UTF-8 as
+the new default input encoding. However, you can still set different input
+encoding (so as the font, font encoding or even language context).
+@noindent
+@cindex Cyrillic
+@cindex Russian
+Here is an example for @code{cp1251} and Russian language in Cyrillic script
+(font encoding @code{T2A}):
+@verbatim
+texpreamble("\usepackage[math]{anttor}");
+texpreamble("\usepackage[T2A]{fontenc}");
+texpreamble("\usepackage[cp1251]{inputenc}");
+texpreamble("\usepackage[russian]{babel}");
+@end verbatim
+@noindent
+@cindex Chinese
+@cindex Japanese
+@cindex Korean
+@cindex CJK
+Support for Chinese, Japanese, and Korean fonts is provided by the
+CJK package:
+@quotation
+@url{https://ctan.org/pkg/cjk}
+@end quotation
+@noindent
+The following commands enable the CJK song family (within a label, you
+can also temporarily switch to another family, say kai, by prepending
+@code{"\CJKfamily@{kai@}"} to the label string):
+@verbatim
+texpreamble("\usepackage{CJK}
+\AtBeginDocument{\begin{CJK*}{GBK}{song}}
+\AtEndDocument{\clearpage\end{CJK*}}");
+@end verbatim
+
+
@anchor{transparency}
@cindex transparency
@cindex @code{opacity}
@@ -3325,6 +3396,8 @@ The implicit initializer for transforms is @code{identity()}.
The routines @code{shift(transform t)} and @code{shiftless(transform t)}
return the transforms @code{(t.x,t.y,0,0,0,0)} and
@code{(0,0,t.xx,t.xy,t.yx,t.yy)} respectively.
+The function bool @code{isometry(transform t)} can be used to test if @code{t}
+is an isometry (preserves distance).
@node Frames and pictures, Files, Transforms, Programming
@@ -3777,7 +3850,7 @@ value) files and portable @acronym{XDR} (External Data Representation)
binary files.
@cindex @code{input}
-An input file must first be opened with
+An input file can be opened with
@verbatim
input(string name="", bool check=true, string comment="#", string mode="");
@end verbatim
@@ -3799,12 +3872,16 @@ The first character of the string @code{comment} specifies a
comment character. If this character is encountered in a data file,
the remainder of the line is ignored. When reading strings, a comment
character followed immediately by another comment character is treated
-as a single literal comment character.
+as a single literal comment character. If @code{Asymptote} is compiled with
+support for @code{libcurl}, @code{name} can be a @acronym{URL}.
+
@anchor{cd}
@cindex @code{cd}
+@cindex @code{noglobalread}
@cindex directory
-One can change the current working directory for read operations to
+Unless the @code{-noglobalread} command-line option is specified,
+one can change the current working directory for read operations to
the contents of the string @code{s} with the function @code{string
cd(string s)}, which returns the new working directory. If
@code{string s} is empty, the path is reset to the value it had at
@@ -3825,6 +3902,8 @@ A file named @code{name} can be open for output with
file output(string name="", bool update=false, string comment="#", string mode="");
@end verbatim
@noindent
+@cindex @code{noglobalread}
+@cindex @code{globalwrite}
If @code{update=false}, any existing data in the file will be erased
and only write operations can be used on the file.
If @code{update=true}, any existing data will be preserved, the position
@@ -3832,6 +3911,8 @@ will be set to the end-of-file, and both reading and writing operations
will be enabled. For security reasons, writing to files in directories
other than the current directory is allowed only if the @code{-globalwrite}
(or @code{-nosafe}) command-line option is specified.
+Reading from files in other directories is allowed unless the
+@code{-noglobalread} command-line option is specified.
@cindex @code{mktemp}
The function @code{string mktemp(string s)} may be used to create and
return the name of a unique temporary file in the current directory
@@ -3899,7 +3980,8 @@ Data Representation) portable binary format (available on all
@code{UNIX} platforms).
Alternatively, a file may also be opened with @code{mode="binary"}
to read or write double precision reals and single
-precision integers in the native (nonportable) machine binary format.
+precision integers in the native (nonportable) machine binary format,
+or to read the entire file into a string.
The virtual member functions
@code{file singlereal(bool b=true)} and @code{file singleint(bool b=true)}
be used to change the precision of real and integer I/O
@@ -4006,6 +4088,7 @@ write(output("transcript.asy"),history());
outputs the interactive history to the file @code{transcript.asy}.
@cindex @code{delete}
+@cindex @code{globalwrite}
The function @code{int delete(string s)} deletes the file named by the
string @code{s}. Unless the @code{-globalwrite} (or @code{-nosafe})
option is enabled, the file must reside in the current directory.
@@ -4318,10 +4401,12 @@ while in the second, it must be the (non-@code{void}) type of the variable.
The function @code{cputime()}
returns a structure @code{cputime} with cumulative @acronym{CPU} times
broken down into the fields @code{parent.user}, @code{parent.system},
-@code{child.user}, and @code{child.system}. For convenience, the
-incremental fields @code{change.user} and @code{change.system} indicate
-the change in the corresponding total parent and child @acronym{CPU}
-times since the last call to @code{cputime()}. The function
+@code{child.user}, and @code{child.system}, along with the cumulative
+wall clock time in @code{parent.clock}, all measured in seconds.
+For convenience, the incremental fields @code{change.user},
+@code{change.system}, and @code{change.clock} indicate the change in
+the corresponding fields since the last call to @code{cputime()}. The
+function
@verbatim
void write(file file=stdout, string s="", cputime c,
string format=cputimeformat, suffix suffix=none);
@@ -5275,19 +5360,19 @@ returns a new empty array of type @code{T[]};
@cindex @code{new}
@item new T[] @{list@}
returns a new array of type @code{T[]} initialized with @code{list} (a comma
-delimited list of elements).
+delimited list of elements);
@item new T[n]
returns a new array of @code{n} elements of type @code{T[]}.
These @code{n} array elements are not initialized unless they are arrays
-themselves (in which case they are each initialized to empty arrays).
+themselves (in which case they are each initialized to empty arrays);
@cindex @code{array}
@item T[] array(int n, T value, int depth=intMax)
returns an array consisting of @code{n} copies of @code{value}.
If @code{value} is itself an array, a deep copy of @code{value} is made
for each entry. If @code{depth} is specified, this deep copying only
-recurses to the specified number of levels.
+recurses to the specified number of levels;
@cindex @code{sequence}
@item int[] sequence(int n)
@@ -5307,7 +5392,13 @@ null array);
@item T[] map(T f(T), T[] a)
returns the array obtained by applying the function @code{f} to each
element of the array @code{a}. This is equivalent to
-@code{sequence(new T(int i) @{return f(a[i]);@},a.length)}.
+@code{sequence(new T(int i) @{return f(a[i]);@},a.length)};
+
+@cindex @code{map}
+@item T2[] map(T2 f(T1), T1[] a)
+constructed by calling @code{mapArray("T1","T2")}, returns the array
+obtained by applying the function @code{f} to each element of the
+array @code{a};
@cindex @code{reverse}
@item int[] reverse(int n)
@@ -5318,7 +5409,7 @@ returns a null array);
@item int[] complement(int[] a, int n)
returns the complement of the integer array @code{a} in
@code{@{0,1,2,...,n-1@}}, so that @code{b[complement(a,b.length)]} yields the
-complement of @code{b[a]}.
+complement of @code{b[a]};
@cindex @code{uniform}
@item real[] uniform(real a, real b, int n)
@@ -5333,7 +5424,7 @@ from the end of the array for the @code{-n}th value;
@cindex @code{findall}
@item int[] findall(bool[] a)
-returns the indices of all @code{true} values in the boolean array @code{a}.
+returns the indices of all @code{true} values in the boolean array @code{a};
@cindex @code{search}
@item int search(T[] a, T key)
@@ -5341,7 +5432,7 @@ For built-in ordered types @code{T}, searches a sorted array
@code{a} of @code{n} elements for k, returning the index @code{i}
if @code{a[i] <= key < a[i+1]}, @code{-1} if @code{key} is
less than all elements of @code{a}, or @code{n-1} if @code{key} is
-greater than or equal to the last element of @code{a}.
+greater than or equal to the last element of @code{a};
@cindex @code{search}
@item int search(T[] a, T key, bool less(T i, T j))
@@ -5393,51 +5484,51 @@ returns a copy of @code{a} sorted in ascending order such that
element @code{i} precedes element @code{j} if @code{less(i,j)} is
true, subject to (if @code{stable} is @code{true}) the stability constraint
that the original order of elements @code{i} and @code{j} is preserved if
-@code{less(i,j)} and @code{less(j,i)} are both @code{false}.
+@code{less(i,j)} and @code{less(j,i)} are both @code{false};
@cindex @code{transpose}
@item T[][] transpose(T[][] a)
-returns the transpose of @code{a}.
+returns the transpose of @code{a};
@cindex @code{transpose}
@item T[][][] transpose(T[][][] a, int[] perm)
returns the 3D transpose of @code{a} obtained by applying the permutation
-@code{perm} of @code{new int[]@{0,1,2@}} to the indices of each entry.
+@code{perm} of @code{new int[]@{0,1,2@}} to the indices of each entry;
@cindex @code{sum}
@item T sum(T[] a)
-For arithmetic types @code{T}, returns the sum of @code{a}.
+for arithmetic types @code{T}, returns the sum of @code{a}.
In the case where @code{T} is @code{bool}, the number of true elements in
-@code{a} is returned.
+@code{a} is returned;
@cindex @code{min}
@item T min(T[] a)
@item T min(T[][] a)
@item T min(T[][][] a)
-For built-in ordered types @code{T}, returns the minimum element of @code{a}.
+for built-in ordered types @code{T}, returns the minimum element of @code{a};
@cindex @code{max}
@item T max(T[] a)
@item T max(T[][] a)
@item T max(T[][][] a)
-For built-in ordered types @code{T}, returns the maximum element of @code{a}.
+for built-in ordered types @code{T}, returns the maximum element of @code{a};
@cindex @code{min}
@item T[] min(T[] a, T[] b)
-For built-in ordered types @code{T}, and arrays @code{a} and @code{b}
+for built-in ordered types @code{T}, and arrays @code{a} and @code{b}
of the same length, returns an array composed of the minimum of the
-corresponding elements of @code{a} and @code{b}.
+corresponding elements of @code{a} and @code{b};
@cindex @code{max}
@item T[] max(T[] a, T[] b)
-For built-in ordered types @code{T}, and arrays @code{a} and @code{b}
+for built-in ordered types @code{T}, and arrays @code{a} and @code{b}
of the same length, returns an array composed of the maximum of the
-corresponding elements of @code{a} and @code{b}.
+corresponding elements of @code{a} and @code{b};
@cindex @code{pairs}
@item pair[] pairs(real[] x, real[] y);
-For arrays @code{x} and @code{y} of the same length, returns the pair array
-@code{sequence(new pair(int i) @{return (x[i],y[i]);@},x.length)}.
+for arrays @code{x} and @code{y} of the same length, returns the pair array
+@code{sequence(new pair(int i) @{return (x[i],y[i]);@},x.length)};
@cindex @code{fft}
@item pair[] fft(pair[] a, int sign=1)
@@ -5459,21 +5550,21 @@ write(f/n);
@cindex @code{fft}
@item pair[][] fft(pair[][] a, int sign=1)
returns the unnormalized two-dimensional Fourier transform of @code{a}
-using the given @code{sign}.
+using the given @code{sign};
@cindex @code{fft}
@item pair[][][] fft(pair[][][] a, int sign=1)
returns the unnormalized three-dimensional Fourier transform of
-@code{a} using the given @code{sign}.
+@code{a} using the given @code{sign};
@cindex @code{dot}
@item real dot(real[] a, real[] b)
-returns the dot product of the vectors @code{a} and @code{b}.
+returns the dot product of the vectors @code{a} and @code{b};
@cindex @code{dot}
@item pair dot(pair[] a, pair[] b)
returns the complex dot product @code{sum(a*conj(b))} of the vectors
-@code{a} and @code{b}.
+@code{a} and @code{b};
@anchor{tridiagonal}
@cindex @code{tridiagonal}
@@ -5490,7 +5581,7 @@ is an @math{n} vector and @math{L} is the @math{n \times n} matrix
@end verbatim
For Dirichlet boundary conditions (denoted here by @code{u[-1]} and
@code{u[n]}), replace @code{f[0]} by @code{f[0]-a[0]u[-1]} and
-@code{f[n-1]-c[n-1]u[n]}; then set @code{a[0]=c[n-1]=0}.
+@code{f[n-1]-c[n-1]u[n]}; then set @code{a[0]=c[n-1]=0};
@cindex @code{solve}
@item real[] solve(real[][] a, real[] b, bool warn=true)
@@ -5511,7 +5602,7 @@ write(a*x);
If @code{a} is a singular matrix and @code{warn} is @code{false}, return an
empty array.
If the matrix @code{a} is tridiagonal, the routine @code{tridiagonal} provides
-a more efficient algorithm (@pxref{tridiagonal}).
+a more efficient algorithm (@pxref{tridiagonal});
@anchor{solve}
@cindex @code{solve}
@@ -5519,30 +5610,30 @@ a more efficient algorithm (@pxref{tridiagonal}).
Solve the linear equation @math{@code{a}x=@code{b}} and return the
solution @math{x}, where @code{a} is an @math{n \times n} matrix and
@code{b} is an @math{n \times m} matrix. If @code{a} is a singular
-matrix and @code{warn} is @code{false}, return an empty matrix.
+matrix and @code{warn} is @code{false}, return an empty matrix;
@cindex @code{identity}
@item real[][] identity(int n);
-returns the @math{n \times n} identity matrix.
+returns the @math{n \times n} identity matrix;
@cindex @code{diagonal}
@item real[][] diagonal(... real[] a)
-returns the diagonal matrix with diagonal entries given by a.
+returns the diagonal matrix with diagonal entries given by a;
@cindex @code{inverse}
@item real[][] inverse(real[][] a)
-returns the inverse of a square matrix @code{a}.
+returns the inverse of a square matrix @code{a};
@cindex @code{quadraticroots}
@item @code{real[] quadraticroots(real a, real b, real c);}
This numerically robust solver returns the real roots of the
quadratic equation @math{ax^2+bx+c=0}, in ascending order. Multiple
-roots are listed separately.
+roots are listed separately;
@cindex @code{quadraticroots}
@item @code{pair[] quadraticroots(explicit pair a, explicit pair b, explicit pair c);}
This numerically robust solver returns the complex roots of the
-quadratic equation @math{ax^2+bx+c=0}.
+quadratic equation @math{ax^2+bx+c=0};
@cindex @code{cubicroots}
@item @code{real[] cubicroots(real a, real b, real c, real d);}
@@ -5893,6 +5984,7 @@ real det(matrix m) {
@end verbatim
@cindex @code{import}
+@cindex @code{access}
The command
@verbatim
import graph;
@@ -5956,6 +6048,13 @@ nonalphanumeric characters, enclose it with quotation marks:
@noindent
@code{import "@value{Datadir}/asymptote/graph.asy" as graph;}
+@cindex @acronym{URL}
+@cindex @acronym{libcurl}
+If @code{Asymptote} is compiled with support for @code{libcurl},
+the file name can even be a @acronym{URL}:
+@noindent
+@code{import "https://raw.githubusercontent.com/vectorgraphics/asymptote/HEAD/doc/axis3.asy" as axis3;}
+
It is an error if modules import themselves (or each other in a cycle).
The module name to be imported must be known at compile time.
@@ -6004,6 +6103,9 @@ code s=quote {
eval(s,true); // Outputs 1
@end verbatim
+One application of @code{eval} is the creation of parametrized Asymptote
+code, such as a map from one type to another (@pxref{map}).
+
@cindex @code{include}
To include the contents of an existing file @code{graph} verbatim (as if the
contents of the file were inserted at that point), use one of the forms:
@@ -6105,7 +6207,7 @@ void f();
for(int i=0; i < 10; ++i) {
int x=i;
if(x==5) {
- f=new void () { write(x); }
+ f=new void() {write(x);};
}
}
f();
@@ -6125,7 +6227,7 @@ void f() {
@end verbatim
@noindent
both @code{x} and @code{y} will be allocated in the same place, which is
-also where @code{f} is also allocated.
+also where @code{f} is allocated.
Statements may also be declared static, in which case they are run at the place
where the enclosing function or structure is defined.
@@ -6276,6 +6378,7 @@ Here now is @code{latexusage.tex}:
* stats:: Statistics routines and histograms
* patterns:: Custom fill and draw patterns
* markers:: Custom path marker routines
+* map:: Map keys to values
* tree:: Dynamic binary search tree
* binarytree:: Binary tree drawing module
* drawtree:: Tree drawing module
@@ -6286,8 +6389,6 @@ Here now is @code{latexusage.tex}:
* embed:: Embedding movies, sounds, and 3D objects
* slide:: Making presentations with @code{Asymptote}
* MetaPost:: @code{MetaPost} compatibility routines
-* unicode:: Accept @code{unicode} (UTF-8) characters
-* latin1:: Accept @code{ISO 8859-1} characters
* babel:: Interface to @code{LaTeX} @code{babel} package
* labelpath:: Drawing curved labels
* labelpath3:: Drawing curved labels in 3D
@@ -6328,14 +6429,14 @@ option to disable this feature.
@section @code{simplex}
@cindex @code{simplex}
@cindex @code{deferred drawing}
-This package solves the two-variable linear programming problem using the
+This module solves the two-variable linear programming problem using the
simplex method. It is used by the module @code{plain} for automatic
sizing of pictures.
@node math, interpolate, simplex, Base modules
@section @code{math}
@cindex @code{math}
-This package extends @code{Asymptote}'s mathematical capabilities with
+This module extends @code{Asymptote}'s mathematical capabilities with
useful functions such as
@table @code
@@ -6455,21 +6556,21 @@ hand.
@section @code{stats}
@cindex @code{stats}
@cindex @code{leastsquares}
-This package implements a Gaussian random number generator
+This module implements a Gaussian random number generator
and a collection of statistics routines, including @code{histogram}
and @code{leastsquares}.
@node patterns, markers, stats, Base modules
@section @code{patterns}
@cindex @code{patterns}
-This package implements @code{Postscript} tiling patterns and includes
+This module implements @code{PostScript} tiling patterns and includes
several convenient pattern generation routines.
@node markers, tree, patterns, Base modules
@section @code{markers}
@cindex @code{markers}
-This package implements specialized routines for marking paths and angles.
-The principal mark routine provided by this package is
+This module implements specialized routines for marking paths and angles.
+The principal mark routine provided by this module is
@verbatim
markroutine markinterval(int n=1, frame f, bool rotated=false);
@end verbatim
@@ -6513,7 +6614,7 @@ use of these markers:
@sp 1
@center @image{./markers1}
-This package also provides a routine for marking an angle @math{AOB}:
+This module also provides a routine for marking an angle @math{AOB}:
@cindex @code{markangle}
@verbatim
void markangle(picture pic=currentpicture, Label L="",
@@ -6528,10 +6629,30 @@ as illustrated in the example @code{@uref{https://asymptote.sourceforge.io/galle
@sp 1
@center @image{./markers2}
+@node map, tree, markers, Base modules
+@section @code{map}
+@cindex @code{map}
+This module creates a struct parameterized by the types specified in
+strings @code{key} and @code{value}, mapping keys to values with a
+specified default:
+@verbatim
+import map;
+
+mapTemplate(name="map",key="string",value="int",default="-1");
+
+map M;
+
+M.add("z",2);
+M.add("a",3);
+M.add("d",4);
+write(M.lookup("a"));
+write(M.lookup("y"));
+@end verbatim
+
@node tree, binarytree, markers, Base modules
@section @code{tree}
@cindex @code{tree}
-This package implements an example of a dynamic binary search tree.
+This module implements an example of a dynamic binary search tree.
@node binarytree, drawtree, tree, Base modules
@section @code{binarytree}
@@ -6558,14 +6679,14 @@ along with the corresponding equations, as illustrated in the example
@node feynman, roundedpath, syzygy, Base modules
@section @code{feynman}
@cindex @code{feynman}
-This package, contributed by Martin Wiebusch, is useful for drawing
+This module, contributed by Martin Wiebusch, is useful for drawing
Feynman diagrams, as illustrated by the examples @code{@uref{https://asymptote.sourceforge.io/gallery/eetomumu.svg,,eetomumu}@uref{https://asymptote.sourceforge.io/gallery/eetomumu.asy,,.asy}}
and @code{@uref{https://asymptote.sourceforge.io/gallery/fermi.svg,,fermi}@uref{https://asymptote.sourceforge.io/gallery/fermi.asy,,.asy}}.
@node roundedpath, animation, feynman, Base modules
@section @code{roundedpath}
@cindex @code{roundedpath}
-This package, contributed by Stefan Knorr, is useful for rounding the
+This module, contributed by Stefan Knorr, is useful for rounding the
sharp corners of paths, as illustrated in the example file @code{@uref{https://asymptote.sourceforge.io/gallery/roundpath.svg,,roundpath}@uref{https://asymptote.sourceforge.io/gallery/roundpath.asy,,.asy}}.
@node animation, embed, roundedpath, Base modules
@@ -6585,7 +6706,7 @@ movie.
@anchor{animate}
The related @code{animate} module, derived from the @code{animation}
module, generates higher-quality portable clickable @acronym{PDF} movies, with
-optional controls. This requires installing the package
+optional controls. This requires installing the module
@quotation
@url{http://mirror.ctan.org/macros/latex/contrib/animate/animate.sty}
@noindent
@@ -6646,15 +6767,15 @@ An example of embedding @code{U3D} code is provided in the file
@node slide, MetaPost, embed, Base modules
@section @code{slide}
@cindex @code{slide}
-This package provides a simple yet high-quality facility for making
+This module provides a simple yet high-quality facility for making
presentation slides, including portable embedded @acronym{PDF} animations (see
the file @code{@uref{https://asymptote.sourceforge.io/gallery/animations/slidemovies.pdf,,slidemovies}@uref{https://asymptote.sourceforge.io/gallery/animations/slidemovies.asy,,.asy}}). A simple example is provided in
@code{slidedemo.asy}.
-@node MetaPost, unicode, slide, Base modules
+@node MetaPost, babel, slide, Base modules
@section @code{MetaPost}
@cindex @code{MetaPost}
-This package provides some useful routines to help @code{MetaPost} users
+This module provides some useful routines to help @code{MetaPost} users
migrate old @code{MetaPost} code to @code{Asymptote}. Further
contributions here are welcome.
@@ -6669,51 +6790,7 @@ intersection point of the lines through @code{P}, @code{Q} and
@code{p}, @code{q}. For less common occurrences of @code{whatever}, one
can use the built-in explicit linear equation solver @code{solve} instead.
-@node unicode, latin1, MetaPost, Base modules
-@section @code{unicode}
-@cindex @code{unicode}
-@cindex international characters
-Import this package at the beginning of the file to instruct
-@code{LaTeX} to accept @code{unicode} (UTF-8) standardized international
-characters.
-@noindent
-@cindex Cyrillic
-@cindex Russian
-To use Cyrillic fonts, you will need to change the font encoding:
-@verbatim
-import unicode;
-texpreamble("\usepackage{mathtext}\usepackage[russian]{babel}");
-defaultpen(font("T2A","cmr","m","n"));
-@end verbatim
-@noindent
-@cindex Chinese
-@cindex Japanese
-@cindex Korean
-@cindex CJK
-Support for Chinese, Japanese, and Korean fonts is provided by the
-CJK package:
-@quotation
-@url{http://mirror.ctan.org/languages/chinese/CJK/}
-@end quotation
-@noindent
-The following commands enable the CJK song family (within a label, you
-can also temporarily switch to another family, say kai, by prepending
-@code{"\CJKfamily@{kai@}"} to the label string):
-@verbatim
-texpreamble("\usepackage{CJK}
-\AtBeginDocument{\begin{CJK*}{GBK}{song}}
-\AtEndDocument{\clearpage\end{CJK*}}");
-@end verbatim
-
-@node latin1, babel, unicode, Base modules
-@section @code{latin1}
-@cindex @code{latin1}
-If you don't have @code{LaTeX} support for @code{unicode} installed,
-you can enable support for Western European languages (ISO 8859-1) by
-importing the module @code{latin1}. This module can be used as a
-template for providing support for other ISO 8859 alphabets.
-
-@node babel, labelpath, latin1, Base modules
+@node babel, labelpath, MetaPost, Base modules
@section @code{babel}
@cindex @code{babel}
This module implements the @code{LaTeX} @code{babel} package in
@@ -6738,7 +6815,7 @@ Here @code{justify} is one of @code{LeftJustified}, @code{Centered}, or
@code{RightJustified}. The @math{x} component of a shift transform
applied to the Label is interpreted as a shift along the curve, whereas
the @math{y} component is interpreted as a shift away from the curve.
-All other Label transforms are ignored. This package requires the
+All other Label transforms are ignored. This module requires the
@code{latex} tex engine and inherits the limitations of the
@code{PSTricks} @code{\pstextpath} macro.
@@ -6766,7 +6843,7 @@ Currently, annotations are only implemented for the @code{latex}
@node CAD, graph, annotate, Base modules
@section @code{CAD}
@cindex @code{CAD}
-This package, contributed by Mark Henning, provides basic pen
+This module, contributed by Mark Henning, provides basic pen
definitions and measurement functions for simple 2D CAD drawings
according to DIN 15. It is documented separately, in the file
@code{CAD.pdf}.
@@ -6775,7 +6852,7 @@ according to DIN 15. It is documented separately, in the file
@section @code{graph}
@cindex @code{graph}
@cindex 2D graphs
-This package implements two-dimensional linear and logarithmic graphs,
+This module implements two-dimensional linear and logarithmic graphs,
including automatic scale and tick selection (with the ability to
override manually). A graph is a @code{guide} (that can be drawn with
the draw command, with an optional legend) constructed with one of
@@ -7851,7 +7928,7 @@ and @code{three_light.asy}:
struct light {
real[][] diffuse;
real[][] specular;
- pen background=nullpen; // Background color of the 3D canvas.
+ pen background=nullpen; // Background color of the canvas.
real specularfactor;
triple[] position; // Only directional lights are currently implemented.
}
@@ -7871,9 +7948,12 @@ light nolight;
@end verbatim
@cindex @code{background}
@cindex @code{transparent}
-The @code{background} pen can be use to set the 3D @code{OpenGL}
-background colour (the default is white). In the case of
-3D @code{WebGL} images one can request a completely transparent background with
+The @code{currentlight.background} (or @code{background} member of the
+specified @code{light}) can be used
+to set the background colour for 2D (or 3D) images. The default
+background is white for @code{HTML} images and transparent for all
+other formats. One can request a completely transparent background for
+3D @code{WebGL} images with
@code{currentlight.background=black+opacity(0.0);}
Sample Bezier surfaces are
@@ -7986,14 +8066,16 @@ There are five choices for viewing 3D @code{Asymptote} output:
@cindex @code{render}
@cindex @code{outformat}
@cindex @code{multisample}
+@cindex @code{devicepixelratio}
+@cindex @code{position}
@item Use the native @code{Asymptote} adaptive @code{OpenGL}-based
renderer (with the command-line option @code{-V} and the default settings
@code{outformat=""} and @code{render=-1}). On @code{UNIX} systems with
graphics support for multisampling, the sample width can be
-controlled with the setting @code{multisample}. An initial screen
-position can be specified with the pair setting @code{position}, where
-negative values are interpreted as relative to the corresponding
-maximum screen dimension. The default settings
+controlled with the setting @code{multisample}. The ratio of physical to
+logical screen pixels can be specified with the setting @code{devicepixelratio}. An initial screen position can be specified with the pair setting
+@code{position}, where negative values are interpreted as relative to the
+corresponding maximum screen dimension. The default settings
@cindex mouse bindings
@verbatim
import settings;
@@ -8686,7 +8768,7 @@ nonrendered @code{PostScript}) is available with the setting
@code{render=0}. This currently only works for piecewise planar
surfaces, such as those produced by the parametric @code{surface}
routines in the @code{graph3} module. Surfaces produced by the
-@code{solids} package will also be properly rendered if the parameter
+@code{solids} module will also be properly rendered if the parameter
@code{nslices} is sufficiently large.
@cindex hidden surface removal
@@ -8880,7 +8962,7 @@ This module, contributed by Philippe Ivaldi, can be used for drawing
@node solids, tube, grid3, Base modules
@section @code{solids}
@cindex @code{solids}
-This solid geometry package defines a structure @code{revolution} that
+This solid geometry module defines a structure @code{revolution} that
can be used to fill and draw surfaces of revolution. The following example
uses it to display the outline of a circular cylinder of radius 1
with axis @code{O--1.5unit(Y+Z)} with perspective projection:
@@ -8909,7 +8991,7 @@ struct skeleton {
@node tube, flowchart, solids, Base modules
@section @code{tube}
@cindex @code{tube}
-This package extends the @code{tube} surfaces constructed in
+This module extends the @code{tube} surfaces constructed in
@code{@uref{https://asymptote.sourceforge.io/gallery/3Dwebgl/three_arrows.html,,three_arrows}@uref{https://asymptote.sourceforge.io/gallery/3Dwebgl/three_arrows.asy,,.asy}} to arbitrary cross sections, colors, and spine
transformations. The routine
@verbatim
@@ -8970,7 +9052,7 @@ An example of @code{tube} is provided in the file
@node flowchart, contour, tube, Base modules
@section @code{flowchart}
@cindex @code{flowchart}
-This package provides routines for drawing flowcharts. The primary
+This module provides routines for drawing flowcharts. The primary
structure is a @code{block}, which represents a single block on the
flowchart. The following eight functions return a position on the appropriate
edge of the block, given picture transform @code{t}:
@@ -9105,7 +9187,7 @@ Here is a simple flowchart example (see also the example
@node contour, contour3, flowchart, Base modules
@section @code{contour}
@cindex @code{contour}
-This package draws contour lines.
+This module draws contour lines.
To construct contours corresponding to the values in a real array @code{c}
for a function @code{f} on @code{box(a,b)}, use the routine
@verbatim
@@ -9200,7 +9282,7 @@ Jonathan Shewchuk.
@node contour3, smoothcontour3, contour, Base modules
@section @code{contour3}
@cindex @code{contour3}
-This package draws surfaces described as the null space of real-valued
+This module draws surfaces described as the null space of real-valued
functions of @math{(x,y,z)} or @code{real[][][]} matrices.
Its usage is illustrated in the example file @code{@uref{https://asymptote.sourceforge.io/gallery/3Dgraphs/magnetic.html,,magnetic}@uref{https://asymptote.sourceforge.io/gallery/3Dgraphs/magnetic.asy,,.asy}}.
@@ -9398,11 +9480,10 @@ To produce @acronym{SVG} output, you will need @code{dvisvgm} (version
You might need to adjust the configuration variable @code{libgs} to
point to the location of your @code{Ghostscript} library
@code{libgs.so} (or to an empty string, depending on how
-@code{dvisvgm} was configured). The 2.8 version of @code{dvisvgm} can
-display SVG output (used by the @code{xasy} editor) for external
-vector @acronym{EPS} and @acronym{PDF} images included with the
-@code{graphic()} function, in addition to (using the @code{latex}
-@TeX{} engine) @acronym{PNG} and @acronym{JPEG} embedded raster images.
+@code{dvisvgm} was configured). The 2.9.1 version of @code{dvisvgm} can
+display @acronym{SVG} output (used by the @code{xasy} editor) for embedded
+@acronym{EPS}, @acronym{PDF}, @acronym{PNG}, and @acronym{JPEG} images
+included with the @code{graphic()} function.
@code{Asymptote} can also produce any output format supported
by the @code{ImageMagick} @code{convert} program (version 6.3.5 or
@@ -9634,7 +9715,7 @@ Pictures are deconstructed into the @acronym{SVG} image format.
Since @code{Qt5} does not support @code{SVG} clipping, you will need
the @code{rsvg-convert} utility, which is part of the
@code{librsvg2-tools} package on @code{UNIX} systems
-and the @code{librsvg} package on @code{MacOS}; under
+and the @code{librsvg} package on @code{MacOS X}; under
@code{Microsoft Windows}, it is available as
@url{https://sourceforge.net/projects/tumagcc/files/rsvg-convert-2.40.20.7z}
@@ -9863,6 +9944,9 @@ contributors include Orest Shardt, Jesse Frohlich, Michail Vidiassov,
Charles Staats, Philippe Ivaldi, Olivier Guib@'e, Radoslav Marinov,
Jeff Samuelson, Chris Savage, Jacques Pienaar, Mark Henning, Steve Melenchuk,
Martin Wiebusch, Stefan Knorr, and Supakorn ``Jamie'' Rassameemasmuang.
+Pedram Emami developed the @code{Asymptote Web Application} at
+@url{http://asymptote.ualberta.ca}.
+
@node Index, , Credits, Top
@unnumbered Index
@@ -9896,7 +9980,7 @@ Martin Wiebusch, Stefan Knorr, and Supakorn ``Jamie'' Rassameemasmuang.
@c LocalWords: RightTicks BottomTop LeftRight Ticksize UTF BufNewFile BufRead
@c LocalWords: ticksize subintervals xlimits filetype plugin setlocal makeprg
@c LocalWords: ylimits uncommented automin automax cp uninstall reals ecast
-@c LocalWords: scaleT unicode RightSide yx yy NoAlign legendmargin opic CCW
+@c LocalWords: scaleT RightSide yx yy NoAlign legendmargin opic CCW
@c LocalWords: arrowbar LeftSide EndBar BeginArrow lly feynman isi showtarget
@c LocalWords: EndArrow BeginArcArrow EndArcArrow ArcArrow ArcArrows NoFill
@c LocalWords: filldraw fillpen drawpen errorformat bigsquare bezier darkblue
@@ -9994,7 +10078,7 @@ Martin Wiebusch, Stefan Knorr, and Supakorn ``Jamie'' Rassameemasmuang.
@c LocalWords: nonoverlapping texengine maxtimes maxheight pdb TEXMFCONFIG Jn
@c LocalWords: piecewisestraight unitrand graphmarkers antialias nolight newl
@c LocalWords: Delaunay Shewchuk convertOptions APPDATA pdfreload tempFile Yn
-@c LocalWords: pdfreloadOptions deferred OpenGL renderer unitbox
+@c LocalWords: pdfreloadOptions deferred OpenGL renderer unitbox 's
@c LocalWords: bezulate Shardt's rasterized viewport unitdisk unitplane devel
@c LocalWords: unitcylinder unitcone solidcone unitfrustum unitsphere nslices
@c LocalWords: DPostScript YZZero externalprc nonrendered nosafe KDE
@@ -10002,7 +10086,7 @@ Martin Wiebusch, Stefan Knorr, and Supakorn ``Jamie'' Rassameemasmuang.
@c LocalWords: XZEquals XYEquals XZZero XYZero InTicks OutTicks InOutTicks
@c LocalWords: fitscreen planeproject strokepath meshlight nullpens arrowdir
@c LocalWords: diffusepen emissivepen specularpen arrowbarb keyval
-@c LocalWords: hstretch vstretch roundbox nonconvex miterlimit basealigin cmd
+@c LocalWords: hstretch vstretch roundbox nonconvex miterlimit basealign cmd
@c LocalWords: maxviewport maxtile antialiased sphericalharmonic attachfile
@c LocalWords: vertexshading smoothelevation glOptions iconified iconify kate
@c LocalWords: psviewerOptions pdfviewerOptions viewportmargin asyattach SVG
@@ -10029,13 +10113,13 @@ Martin Wiebusch, Stefan Knorr, and Supakorn ``Jamie'' Rassameemasmuang.
@c LocalWords: ascii piecewise arcpoint spacings tilings sncndn resizing
@c LocalWords: differentiable vectorization vectorized asydir normals quartic
@c LocalWords: wavepacket kerned parametrized specular hyperboloid Bourke's
-@c LocalWords: Michail 0pt 1filll 's 3D latin1 labelpath3 2D graph3
+@c LocalWords: Michail 0pt 1filll 's 3D labelpath3 2D graph3 0pt 3D
@c LocalWords: grid3 contour3 x86_64 psv a4 gsview32 freeglut 'load '
@c LocalWords: 'asy 'lasy 'auto 5bp 1cm sqrtx01 4g extenda extendb
@c LocalWords: bb llx 2S 100pt 3t bezier2 bool3 x0 angle1 angle2 z1
@c LocalWords: z2 before' struct X11 x11colors type1cm 12pt OT1 5mm
@c LocalWords: cmr12 x' y' xsize ysize 25cm s1 s2 neighbourhood u''
-@c LocalWords: s'' 3x 5x 3y 602e 2x 2y 3sin 10cm 204e addby7 10x Ai
+@c LocalWords: s'' 3x 5x 3y 602e 2x 2y 3sin 10cm 204e addby7 10x
@c LocalWords: only'' pow10 log10 expm1 log1p atan2 0pt 1filll 's '
@c LocalWords: x1 x2 graph2d attachfile2 n0 P0 n1 P1 markers1 3D 2D
@c LocalWords: interpolate1 markers2 inlinemovie3 media9 U3D T2A 5E
@@ -10058,31 +10142,39 @@ Martin Wiebusch, Stefan Knorr, and Supakorn ``Jamie'' Rassameemasmuang.
@c LocalWords: slopefield1 144x144 1filll 'load 'asy 'lasy 'auto 4g
@c LocalWords: libgs 'load 'asy 'lasy 'auto 5bp 1cm 2S 100pt 3t 5mm
@c LocalWords: bracedefaultratio incircle 12pt 25cm 3x 5x 3y 602e '
-@c LocalWords: 2x 2y 3sin 10cm 204e 10x Ai 5E offaxis 'load 'lasy '
+@c LocalWords: 2x 2y 3sin 10cm 204e 10x 5E offaxis 'load 'lasy '
@c LocalWords: 5cm 2N 2E 2n 100d 5z 5y 5unit dvisvgmOptions 144x144
@c LocalWords: 4g texengines coplanar 0pt 1filll 's 3D 2D 'load 5bp
@c LocalWords: insphere cospherical 5unit luatex lualatex 'asy 1cm
@c LocalWords: 'lasy 'auto 4g 2S 100pt 3t 12pt 5mm 25cm 3x 5x 3y 2x
-@c LocalWords: 602e 2y 3sin 10cm 204e 10x Ai Ai Ai Ai Ai Ai Ai Ai '
-@c LocalWords: unnormalized 5E 5cm 2N 2E 2n 100d 5z 5y 0pt 1filll '
+@c LocalWords: 602e 2y 3sin 10cm 204e 10x
+@c LocalWords: unnormalized 5E 5cm 2N 2E 2n 100d 5z 5y 0pt 1filll
@c LocalWords: 5unit 144x144 aligndir smoothcontour3 's 3D 2D cmake
@c LocalWords: 'load 'asy 'lasy 'auto 5bp 1cm 4g 2S 100pt 3t nan 3x
-@c LocalWords: 12pt 5mm 25cm 5x 3y 602e 2x 2y 3sin 10cm 204e 10x Ai
-@c LocalWords: Ai Ai Ai Ai Ai Ai Ai 5E 5cm 2N 2E 2n 100d 5z 5y nz '
-@c LocalWords: 5unit Staats implicitsurface overlapedges maxdepth
+@c LocalWords: 12pt 5mm 25cm 5x 3y 602e 2x 2y 3sin 10cm 204e 10x
+@c LocalWords: 5E 5cm 2N 2E 2n 100d 5z 5y nz
+@c LocalWords: 5unit Staats implicitsurface overlapedges maxdepth '
@c LocalWords: through'' genustwo 144x144 0pt 1filll 's 3D 2D 'load
@c LocalWords: 'asy 'lasy 'auto 5bp 1cm 4g 2S 100pt 3t 12pt 5mm 3x
-@c LocalWords: 25cm 5x 3y 602e 2x 2y 3sin 10cm 204e 10x Ai Ai Ai Ai
-@c LocalWords: Ai Ai Ai Ai 5E 5cm 2N 2E 2n 100d 5z 5y 5unit 144x144
+@c LocalWords: 25cm 5x 3y 602e 2x 2y 3sin 10cm 204e 10x
+@c LocalWords: 5E 5cm 2N 2E 2n 100d 5z 5y 5unit 144x144
@c LocalWords: Frohlich codequoteundirected center 0pt 1filll 's 3D
@c LocalWords: acknowledgments Colors 2D Color WebGL uref x86 dnf
@c LocalWords: htmlviewer asygl CPPFLAGS 'load 'asy 'lasy 'auto 5bp
@c LocalWords: 1cm labeling dotfilltype 4g color colors centered 2S
@c LocalWords: 100pt 3t forcemath gray colorless miter 12pt 5mm 3x
@c LocalWords: zeroTransform 25cm Python3 popcount bitreverse 5x 3y
-@c LocalWords: 602e 2x 2y 3sin 10cm 204e 10x Ai Ai Ai Ai Ai Ai Ai
-@c LocalWords: Ai findall ax 5a centers 5E 5cm 2N 2E 2n HTML5 html
+@c LocalWords: 602e 2x 2y 3sin 10cm 204e 10x
+@c LocalWords: findall ax 5a centers 5E 5cm 2N 2E 2n HTML5 html
@c LocalWords: logo3 remeshed css 42kB 100d 5z 5y 5unit colored Qt5
@c LocalWords: behavior beveled usetriangles htmlviewerOptions cson
-@c LocalWords: 144x144 pyqt5 numpy pip3 PyQt5 rsvg librsvg2
-@c LocalWords: librsvg Supakorn Jamie'' Rassameemasmuang
+@c LocalWords: 144x144 pyqt5 numpy pip3 PyQt5 rsvg librsvg2 1filll
+@c LocalWords: librsvg Supakorn Jamie'' Rassameemasmuang 2D Docdir
+@c LocalWords: microsoft configuation 'load 'asy 'lasy 'auto dep 4g
+@c LocalWords: 5bp 1cm BezierPatch 2S 100pt 3t abs2 12pt cp1251 5mm
+@c LocalWords: anttor fontenc inputenc 25cm noglobalread 3x
+@c LocalWords: 5x 3y 602e 2x 2y 3sin 10cm 204e 10x
+@c LocalWords: mapArray 5a parameterized mapTemplate 5E 2N
+@c LocalWords: 5cm freshnel0 fresnel0 PBR prethree specularfactor
+@c LocalWords: renderers 2E ESC AsyGL 48kB 2n 100d 5z 5y 5unit
+@c LocalWords: unicode 144x144 Pedram Emami
diff --git a/Build/source/utils/asymptote/doc/diatom.asy b/Build/source/utils/asymptote/doc/diatom.asy
index 23673dcadf5..0d571e2c9c6 100644
--- a/Build/source/utils/asymptote/doc/diatom.asy
+++ b/Build/source/utils/asymptote/doc/diatom.asy
@@ -40,7 +40,7 @@ for(int taxon=0; taxon < n; ++taxon) {
real[] P=percentage[taxon];
if(max(P) < ignorebelow) continue;
final=taxon;
-}
+}
real angle=45;
real L=3cm;
@@ -100,10 +100,10 @@ for(int taxon=0; taxon < n; ++taxon) {
pair z1=t*z+v;
pair w1=z1+Ldir;
draw[i]=new void(frame f) {
- path g=z0--(z0.x+(ymax-z0.y)/Tan(angle),ymax)--
- (z1.x+(ymax-z1.y)/Tan(angle),ymax)--z1;
- draw(f,g);
- label(f,group[i],point(g,1.5),align);
+ path g=z0--(z0.x+(ymax-z0.y)/Tan(angle),ymax)--
+ (z1.x+(ymax-z1.y)/Tan(angle),ymax)--z1;
+ draw(f,g);
+ label(f,group[i],point(g,1.5),align);
};
});
}
@@ -113,7 +113,7 @@ for(int taxon=0; taxon < n; ++taxon) {
if(taxon == 0) yaxis(pic,depthlabel,Left,RightTicks(0,10),above=true);
if(taxon == final) yaxis(pic,Right,LeftTicks("%",0,10),above=true);
-
+
add(shift(location,0)*pic);
location += pic.userMax().x;
}
diff --git a/Build/source/utils/asymptote/doc/elliptic.asy b/Build/source/utils/asymptote/doc/elliptic.asy
index 728508f0110..71fb80db6d5 100644
--- a/Build/source/utils/asymptote/doc/elliptic.asy
+++ b/Build/source/utils/asymptote/doc/elliptic.asy
@@ -74,7 +74,7 @@ size(0,200);
curve c; c.a=-1; c.b=4;
-pair oncurve(real x)
+pair oncurve(real x)
{
return (x,sqrt(c.y2(x)));
}
@@ -111,5 +111,5 @@ dot("$2P$", PP, SW);
add(output,currentpicture.fit(),(0.5cm,0),E);
shipout(output);
-
+
restore();
diff --git a/Build/source/utils/asymptote/doc/exp.asy b/Build/source/utils/asymptote/doc/exp.asy
index 2c4eed90d4e..3558a2759bd 100644
--- a/Build/source/utils/asymptote/doc/exp.asy
+++ b/Build/source/utils/asymptote/doc/exp.asy
@@ -4,11 +4,11 @@ size(150,0);
real f(real x) {return exp(x);}
pair F(real x) {return (x,f(x));}
+draw(graph(f,-4,2,operator ..),red);
+
xaxis("$x$");
yaxis("$y$",0);
-draw(graph(f,-4,2,operator ..),red);
-
labely(1,E);
label("$e^x$",F(1),SE);
diff --git a/Build/source/utils/asymptote/doc/extra/intro.asy b/Build/source/utils/asymptote/doc/extra/intro.asy
index 68aa7e0347f..8fe021e0ec0 100644
--- a/Build/source/utils/asymptote/doc/extra/intro.asy
+++ b/Build/source/utils/asymptote/doc/extra/intro.asy
@@ -32,7 +32,7 @@ titlepage(long ? "Asymptote: The Vector Graphics Language" :
%and Instituto Nacional de Matem\'atica Pura e Aplicada (IMPA)
\medskip\Green{Collaborators: Orest Shardt, Michail Vidiassov}",
"June 30, 2010",
-"http://asymptote.sf.net/intro.pdf");
+"https://asymptote.sourceforge.io/intro.pdf");
title("History");
item("1979: \TeX\ and \MF\ (Knuth)");
@@ -48,7 +48,7 @@ subitem("2010: 3D PDF enhancements (Vidiassov \& Bowman)");
title("Statistics (as of June, 2010)");
item("Runs under Linux/UNIX, Mac OS X, Microsoft Windows.");
item("4000 downloads/month from primary\hfill\\
- {\tt asymptote.sourceforge.net} site alone.");
+ {\tt asymptote.sourceforge.io} site alone.");
item("80\ 000 lines of low-level C++ code.");
item("36\ 000 lines of high-level Asymptote code.");
@@ -941,7 +941,7 @@ defaultpen(0.5);
title("\mbox{Asymptote: 2D \& 3D Vector Graphics Language}");
asyinclude("../examples/logo3");
skip();
-center("\tt http://asymptote.sf.net");
+center("\tt https://asymptote.sourceforge.io");
center("(freely available under the LGPL license)");
// LocalWords: pdflatex mflogo viewportsize pagewidth pagemargin goysr bibtex
diff --git a/Build/source/utils/asymptote/doc/flowchartdemo.asy b/Build/source/utils/asymptote/doc/flowchartdemo.asy
index 796e357a5ff..77c78c0e2ce 100644
--- a/Build/source/utils/asymptote/doc/flowchartdemo.asy
+++ b/Build/source/utils/asymptote/doc/flowchartdemo.asy
@@ -3,8 +3,8 @@ size(0,300);
import flowchart;
block block1=rectangle(Label("Example",magenta),
- pack(Label("Start:",heavygreen),"",Label("$A:=0$",blue),
- "$B:=1$"),(-0.5,3),palegreen,paleblue,red);
+ pack(Label("Start:",heavygreen),"",Label("$A:=0$",blue),
+ "$B:=1$"),(-0.5,3),palegreen,paleblue,red);
block block2=diamond(Label("Choice?",blue),(0,2),palegreen,red);
block block3=roundrectangle("Do something",(-1,1));
block block4=bevel("Don't do something",(1,1));
diff --git a/Build/source/utils/asymptote/doc/icon.asy b/Build/source/utils/asymptote/doc/icon.asy
index 1701fe0f32e..0170f2605ce 100644
--- a/Build/source/utils/asymptote/doc/icon.asy
+++ b/Build/source/utils/asymptote/doc/icon.asy
@@ -4,7 +4,7 @@ size(30,30,IgnoreAspect);
real f(real t) {return t < 0 ? -1/t : -0.5/t;}
-picture logo(pair s=0, pen q)
+picture logo(pair s=0, pen q)
{
picture pic;
pen p=linewidth(3)+q;
@@ -17,6 +17,6 @@ picture logo(pair s=0, pen q)
draw(pic,z+c+eps--z,p);
yaxis(pic,p);
return shift(s)*pic;
-}
+}
add(logo(red));
diff --git a/Build/source/utils/asymptote/doc/imagecontour.asy b/Build/source/utils/asymptote/doc/imagecontour.asy
index 6b5eb455cad..d61b6148c53 100644
--- a/Build/source/utils/asymptote/doc/imagecontour.asy
+++ b/Build/source/utils/asymptote/doc/imagecontour.asy
@@ -19,7 +19,7 @@ pen tickpen=gray+0.5*linewidth(currentpen);
pen[] Palette=BWRainbow();
bounds range=image(f,Automatic,a,b,N,Palette);
-
+
// Major contours
real[] Cvals=uniform(range.min,range.max,Divs);
diff --git a/Build/source/utils/asymptote/doc/install-sh b/Build/source/utils/asymptote/doc/install-sh
index ec298b53740..6781b987bdb 100755
--- a/Build/source/utils/asymptote/doc/install-sh
+++ b/Build/source/utils/asymptote/doc/install-sh
@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2020-11-14.01; # UTC
+scriptversion=2009-04-28.21; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -35,21 +35,25 @@ scriptversion=2020-11-14.01; # UTC
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
-# 'make' implicit rules from creating a file called install from it
+# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.
-tab=' '
nl='
'
-IFS=" $tab$nl"
+IFS=" "" $nl"
-# Set DOITPROG to "echo" to test this script.
+# set DOITPROG to echo to test this script
+# Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-}
-doit_exec=${doit:-exec}
+if test -z "$doit"; then
+ doit_exec=exec
+else
+ doit_exec=$doit
+fi
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
@@ -64,16 +68,22 @@ mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
+posix_glob='?'
+initialize_posix_glob='
+ test "$posix_glob" != "?" || {
+ if (set -f) 2>/dev/null; then
+ posix_glob=
+ else
+ posix_glob=:
+ fi
+ }
+'
+
posix_mkdir=
# Desired mode of installed file.
mode=0755
-# Create dirs (including intermediate dirs) using mode 755.
-# This is like GNU 'install' as of coreutils 8.32 (2020).
-mkdir_umask=22
-
-backupsuffix=
chgrpcmd=
chmodcmd=$chmodprog
chowncmd=
@@ -87,7 +97,7 @@ dir_arg=
dst_arg=
copy_on_change=false
-is_target_a_directory=possibly
+no_target_directory=
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
@@ -104,28 +114,18 @@ Options:
--version display version info and exit.
-c (ignored)
- -C install only if different (preserve data modification time)
+ -C install only if different (preserve the last data modification time)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
- -p pass -p to $cpprog.
-s $stripprog installed files.
- -S SUFFIX attempt to back up existing files, with suffix SUFFIX.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG
-
-By default, rm is invoked with -f; when overridden with RMPROG,
-it's up to you to specify -f if you want it.
-
-If -S is not specified, no backups are attempted.
-
-Email bug reports to bug-automake@gnu.org.
-Automake home page: https://www.gnu.org/software/automake/
"
while test $# -ne 0; do
@@ -137,62 +137,42 @@ while test $# -ne 0; do
-d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
- shift;;
+ shift;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
- case $mode in
- *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
- echo "$0: invalid mode: $mode" >&2
- exit 1;;
- esac
- shift;;
+ case $mode in
+ *' '* | *' '* | *'
+'* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ shift;;
-o) chowncmd="$chownprog $2"
- shift;;
-
- -p) cpprog="$cpprog -p";;
+ shift;;
-s) stripcmd=$stripprog;;
- -S) backupsuffix="$2"
- shift;;
-
- -t)
- is_target_a_directory=always
- dst_arg=$2
- # Protect names problematic for 'test' and other utilities.
- case $dst_arg in
- -* | [=\(\)!]) dst_arg=./$dst_arg;;
- esac
- shift;;
+ -t) dst_arg=$2
+ shift;;
- -T) is_target_a_directory=never;;
+ -T) no_target_directory=true;;
--version) echo "$0 $scriptversion"; exit $?;;
- --) shift
- break;;
+ --) shift
+ break;;
- -*) echo "$0: invalid option: $1" >&2
- exit 1;;
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
*) break;;
esac
shift
done
-# We allow the use of options -d and -T together, by making -d
-# take the precedence; this is for compatibility with GNU install.
-
-if test -n "$dir_arg"; then
- if test -n "$dst_arg"; then
- echo "$0: target directory not allowed when installing a directory." >&2
- exit 1
- fi
-fi
-
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
@@ -206,10 +186,6 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
fi
shift # arg
dst_arg=$arg
- # Protect names problematic for 'test' and other utilities.
- case $dst_arg in
- -* | [=\(\)!]) dst_arg=./$dst_arg;;
- esac
done
fi
@@ -218,26 +194,13 @@ if test $# -eq 0; then
echo "$0: no input file specified." >&2
exit 1
fi
- # It's OK to call 'install-sh -d' without argument.
+ # It's OK to call `install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
if test -z "$dir_arg"; then
- if test $# -gt 1 || test "$is_target_a_directory" = always; then
- if test ! -d "$dst_arg"; then
- echo "$0: $dst_arg: Is not a directory." >&2
- exit 1
- fi
- fi
-fi
-
-if test -z "$dir_arg"; then
- do_exit='(exit $ret); exit $ret'
- trap "ret=129; $do_exit" 1
- trap "ret=130; $do_exit" 2
- trap "ret=141; $do_exit" 13
- trap "ret=143; $do_exit" 15
+ trap '(exit $?); exit' 1 2 13 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
@@ -248,16 +211,16 @@ if test -z "$dir_arg"; then
*[0-7])
if test -z "$stripcmd"; then
- u_plus_rw=
+ u_plus_rw=
else
- u_plus_rw='% 200'
+ u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
- u_plus_rw=
+ u_plus_rw=
else
- u_plus_rw=,u+rw
+ u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
@@ -265,9 +228,9 @@ fi
for src
do
- # Protect names problematic for 'test' and other utilities.
+ # Protect names starting with `-'.
case $src in
- -* | [=\(\)!]) src=./$src;;
+ -*) src=./$src;;
esac
if test -n "$dir_arg"; then
@@ -275,10 +238,6 @@ do
dstdir=$dst
test -d "$dstdir"
dstdir_status=$?
- # Don't chown directories that already exist.
- if test $dstdir_status = 0; then
- chowncmd=""
- fi
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
@@ -293,150 +252,185 @@ do
echo "$0: no destination specified." >&2
exit 1
fi
+
dst=$dst_arg
+ # Protect names starting with `-'.
+ case $dst in
+ -*) dst=./$dst;;
+ esac
- # If destination is a directory, append the input filename.
+ # If destination is a directory, append the input filename; won't work
+ # if double slashes aren't ignored.
if test -d "$dst"; then
- if test "$is_target_a_directory" = never; then
- echo "$0: $dst_arg: Is a directory" >&2
- exit 1
+ if test -n "$no_target_directory"; then
+ echo "$0: $dst_arg: Is a directory" >&2
+ exit 1
fi
dstdir=$dst
- dstbase=`basename "$src"`
- case $dst in
- */) dst=$dst$dstbase;;
- *) dst=$dst/$dstbase;;
- esac
+ dst=$dstdir/`basename "$src"`
dstdir_status=0
else
- dstdir=`dirname "$dst"`
+ # Prefer dirname, but fall back on a substitute if dirname fails.
+ dstdir=`
+ (dirname "$dst") 2>/dev/null ||
+ expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$dst" : 'X\(//\)[^/]' \| \
+ X"$dst" : 'X\(//\)$' \| \
+ X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+ echo X"$dst" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'
+ `
+
test -d "$dstdir"
dstdir_status=$?
fi
fi
- case $dstdir in
- */) dstdirslash=$dstdir;;
- *) dstdirslash=$dstdir/;;
- esac
-
obsolete_mkdir_used=false
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
- # With -d, create the new directory with the user-specified mode.
- # Otherwise, rely on $mkdir_umask.
- if test -n "$dir_arg"; then
- mkdir_mode=-m$mode
- else
- mkdir_mode=
- fi
-
- posix_mkdir=false
- # The $RANDOM variable is not portable (e.g., dash). Use it
- # here however when possible just to lower collision chance.
- tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
-
- trap '
- ret=$?
- rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
- exit $ret
- ' 0
-
- # Because "mkdir -p" follows existing symlinks and we likely work
- # directly in world-writeable /tmp, make sure that the '$tmpdir'
- # directory is successfully created first before we actually test
- # 'mkdir -p'.
- if (umask $mkdir_umask &&
- $mkdirprog $mkdir_mode "$tmpdir" &&
- exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
- then
- if test -z "$dir_arg" || {
- # Check for POSIX incompatibilities with -m.
- # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
- # other-writable bit of parent directory when it shouldn't.
- # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
- test_tmpdir="$tmpdir/a"
- ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
- case $ls_ld_tmpdir in
- d????-?r-*) different_mode=700;;
- d????-?--*) different_mode=755;;
- *) false;;
- esac &&
- $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
- ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
- test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
- }
- }
- then posix_mkdir=:
- fi
- rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
+ # Create intermediate dirs using mode 755 as modified by the umask.
+ # This is like FreeBSD 'install' as of 1997-10-28.
+ umask=`umask`
+ case $stripcmd.$umask in
+ # Optimize common cases.
+ *[2367][2367]) mkdir_umask=$umask;;
+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+ *[0-7])
+ mkdir_umask=`expr $umask + 22 \
+ - $umask % 100 % 40 + $umask % 20 \
+ - $umask % 10 % 4 + $umask % 2
+ `;;
+ *) mkdir_umask=$umask,go-w;;
+ esac
+
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
else
- # Remove any dirs left behind by ancient mkdir implementations.
- rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
+ mkdir_mode=
fi
- trap '' 0;;
+
+ posix_mkdir=false
+ case $umask in
+ *[123567][0-7][0-7])
+ # POSIX mkdir -p sets u+wx bits regardless of umask, which
+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+ ;;
+ *)
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+ if (umask $mkdir_umask &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writeable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ ls_ld_tmpdir=`ls -ld "$tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/d" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+ fi
+ trap '' 0;;
+ esac;;
esac
if
$posix_mkdir && (
- umask $mkdir_umask &&
- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
- # mkdir does not conform to POSIX,
+ # The umask is ridiculous, or mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
- /*) prefix='/';;
- [-=\(\)!]*) prefix='./';;
- *) prefix='';;
+ /*) prefix='/';;
+ -*) prefix='./';;
+ *) prefix='';;
esac
+ eval "$initialize_posix_glob"
+
oIFS=$IFS
IFS=/
- set -f
+ $posix_glob set -f
set fnord $dstdir
shift
- set +f
+ $posix_glob set +f
IFS=$oIFS
prefixes=
for d
do
- test X"$d" = X && continue
-
- prefix=$prefix$d
- if test -d "$prefix"; then
- prefixes=
- else
- if $posix_mkdir; then
- (umask $mkdir_umask &&
- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
- # Don't fail if two instances are running concurrently.
- test -d "$prefix" || exit 1
- else
- case $prefix in
- *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
- *) qprefix=$prefix;;
- esac
- prefixes="$prefixes '$qprefix'"
- fi
- fi
- prefix=$prefix/
+ test -z "$d" && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask=$mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
done
if test -n "$prefixes"; then
- # Don't fail if two instances are running concurrently.
- (umask $mkdir_umask &&
- eval "\$doit_exec \$mkdirprog $prefixes") ||
- test -d "$dstdir" || exit 1
- obsolete_mkdir_used=true
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
fi
fi
fi
@@ -449,25 +443,14 @@ do
else
# Make a couple of temp file names in the proper directory.
- dsttmp=${dstdirslash}_inst.$$_
- rmtmp=${dstdirslash}_rm.$$_
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name.
- (umask $cp_umask &&
- { test -z "$stripcmd" || {
- # Create $dsttmp read-write so that cp doesn't create it read-only,
- # which would cause strip to fail.
- if test -z "$doit"; then
- : >"$dsttmp" # No need to fork-exec 'touch'.
- else
- $doit touch "$dsttmp"
- fi
- }
- } &&
- $doit_exec $cpprog "$src" "$dsttmp") &&
+ (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits.
#
@@ -482,24 +465,20 @@ do
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
- old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
- new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
- set -f &&
+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+
+ eval "$initialize_posix_glob" &&
+ $posix_glob set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
- set +f &&
+ $posix_glob set +f &&
+
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
rm -f "$dsttmp"
else
- # If $backupsuffix is set, and the file being installed
- # already exists, attempt a backup. Don't worry if it fails,
- # e.g., if mv doesn't support -f.
- if test -n "$backupsuffix" && test -f "$dst"; then
- $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
- fi
-
# Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
@@ -507,24 +486,24 @@ do
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
- # Now remove or move aside any old file at destination location.
- # We try this two ways since rm can't unlink itself on some
- # systems and the destination file might be busy for other
- # reasons. In this case, the final cleanup might fail but the new
- # file should still install successfully.
- {
- test ! -f "$dst" ||
- $doit $rmcmd "$dst" 2>/dev/null ||
- { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
- { $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
- } ||
- { echo "$0: cannot unlink or rename $dst" >&2
- (exit 1); exit 1
- }
- } &&
-
- # Now rename the file to the real destination.
- $doit $mvcmd "$dsttmp" "$dst"
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ test ! -f "$dst" ||
+ $doit $rmcmd -f "$dst" 2>/dev/null ||
+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+ { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+ } ||
+ { echo "$0: cannot unlink or rename $dst" >&2
+ (exit 1); exit 1
+ }
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1
@@ -533,9 +512,9 @@ do
done
# Local variables:
-# eval: (add-hook 'before-save-hook 'time-stamp)
+# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC0"
+# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:
diff --git a/Build/source/utils/asymptote/doc/leastsquares.asy b/Build/source/utils/asymptote/doc/leastsquares.asy
index 37477d58858..6362e8323ef 100644
--- a/Build/source/utils/asymptote/doc/leastsquares.asy
+++ b/Build/source/utils/asymptote/doc/leastsquares.asy
@@ -22,7 +22,7 @@ real last=700;
// Remove negative or zero values of rho:
t=rho > 0 ? t : null;
rho=rho > 0 ? rho : null;
-
+
scale(Log(true),Linear(true));
int n=step > 0 ? ceil((last-first)/step) : 0;
@@ -33,17 +33,17 @@ for(int i=0; i <= n; ++i) {
real first=first+i*step;
real[] logrho=(t >= first & t <= last) ? log(rho) : null;
real[] logt=(t >= first & t <= last) ? -log(t) : null;
-
+
if(logt.length < 2) break;
-
+
// Fit to the line logt=L.m*logrho+L.b:
linefit L=leastsquares(logt,logrho);
-
+
T.push(first);
xi.push(L.m);
dxi.push(L.dm);
-}
-
+}
+
draw(graph(T,xi),blue);
errorbars(T,xi,dxi,red);
diff --git a/Build/source/utils/asymptote/doc/legend.asy b/Build/source/utils/asymptote/doc/legend.asy
index 09a31868ae4..b00cdd14e6b 100644
--- a/Build/source/utils/asymptote/doc/legend.asy
+++ b/Build/source/utils/asymptote/doc/legend.asy
@@ -1,15 +1,15 @@
-import graph;
-size(8cm,6cm,IgnoreAspect);
-
-typedef real realfcn(real);
-realfcn F(real p) {
- return new real(real x) {return sin(p*x);};
-};
-
+import graph;
+size(8cm,6cm,IgnoreAspect);
+
+typedef real realfcn(real);
+realfcn F(real p) {
+ return new real(real x) {return sin(p*x);};
+};
+
for(int i=1; i < 5; ++i)
draw(graph(F(i*pi),0,1),Pen(i),
- "$\sin("+(i == 1 ? "" : (string) i)+"\pi x)$");
-xaxis("$x$",BottomTop,LeftTicks);
-yaxis("$y$",LeftRight,RightTicks(trailingzero));
-
-attach(legend(2),(point(S).x,truepoint(S).y),10S,UnFill);
+ "$\sin("+(i == 1 ? "" : (string) i)+"\pi x)$");
+xaxis("$x$",BottomTop,LeftTicks);
+yaxis("$y$",LeftRight,RightTicks(trailingzero));
+
+attach(legend(2),(point(S).x,truepoint(S).y),10S,UnFill);
diff --git a/Build/source/utils/asymptote/doc/linetype.asy b/Build/source/utils/asymptote/doc/linetype.asy
index dc4762c2478..477ada1e14d 100644
--- a/Build/source/utils/asymptote/doc/linetype.asy
+++ b/Build/source/utils/asymptote/doc/linetype.asy
@@ -6,7 +6,7 @@ void testline(real y) {
draw((0,y-40)--(100,y-40),currentpen+dashdotted);
draw((0,y-50)--(100,y-50),currentpen+longdashdotted);
draw((0,y-60)--(100,y-60),currentpen+Dotted);
-}
+}
currentpen=linewidth(0.5);
testline(100);
diff --git a/Build/source/utils/asymptote/doc/logo.asy b/Build/source/utils/asymptote/doc/logo.asy
index d180558ad34..3cd42079ede 100644
--- a/Build/source/utils/asymptote/doc/logo.asy
+++ b/Build/source/utils/asymptote/doc/logo.asy
@@ -1,6 +1,6 @@
size(140,80,IgnoreAspect);
-picture logo(pair s=0, pen q)
+picture logo(pair s=0, pen q)
{
picture pic;
pen p=linewidth(2)+fontsize(24pt)+q;
@@ -19,7 +19,7 @@ picture logo(pair s=0, pen q)
draw(pic,(0,y1)--(0,y2),p);
draw(pic,(a,0)--(b,0),p);
return shift(s)*pic;
-}
+}
pair z=(-0.015,0.08);
for(int x=0; x < 10; ++x)
diff --git a/Build/source/utils/asymptote/doc/markers1.asy b/Build/source/utils/asymptote/doc/markers1.asy
index a3af424616d..7db56315f91 100644
--- a/Build/source/utils/asymptote/doc/markers1.asy
+++ b/Build/source/utils/asymptote/doc/markers1.asy
@@ -64,7 +64,7 @@ label("$10$",point(p,0),3W);
p=T*p;
draw(p,CircleBarIntervalMarker(n=3,angle=30,barsize=8mm,radius=2mm,
FillDraw(.8red),circleabove=true,dotframe,
- above=false));
+ above=false));
label("$11$",point(p,0),3W);
//line 12 **********
diff --git a/Build/source/utils/asymptote/doc/png/asymptote.info b/Build/source/utils/asymptote/doc/png/asymptote.info
index a1ca6774244..de9dea4f358 100644
--- a/Build/source/utils/asymptote/doc/png/asymptote.info
+++ b/Build/source/utils/asymptote/doc/png/asymptote.info
@@ -1,11 +1,11 @@
This is asymptote.info, produced by makeinfo version 6.6 from
asymptote.texi.
-This file documents 'Asymptote', version 2.65.
+This file documents 'Asymptote', version 2.68.
<https://asymptote.sourceforge.io>
- Copyright (C) 2004-19 Andy Hammerlindl, John Bowman, and Tom Prince.
+ Copyright (C) 2004-20 Andy Hammerlindl, John Bowman, and Tom Prince.
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Lesser General Public License
@@ -22,11 +22,11 @@ File: asymptote.info, Node: Top, Next: Description, Prev: (dir), Up: (dir)
Asymptote
*********
-This file documents 'Asymptote', version 2.65.
+This file documents 'Asymptote', version 2.68.
<https://asymptote.sourceforge.io>
- Copyright (C) 2004-19 Andy Hammerlindl, John Bowman, and Tom Prince.
+ Copyright (C) 2004-20 Andy Hammerlindl, John Bowman, and Tom Prince.
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Lesser General Public License
@@ -126,6 +126,7 @@ Base modules
* stats:: Statistics routines and histograms
* patterns:: Custom fill and draw patterns
* markers:: Custom path marker routines
+* map:: Map keys to values
* tree:: Dynamic binary search tree
* binarytree:: Binary tree drawing module
* drawtree:: Tree drawing module
@@ -136,8 +137,6 @@ Base modules
* embed:: Embedding movies, sounds, and 3D objects
* slide:: Making presentations with 'Asymptote'
* MetaPost:: 'MetaPost' compatibility routines
-* unicode:: Accept 'unicode' (UTF-8) characters
-* latin1:: Accept 'ISO 8859-1' characters
* babel:: Interface to 'LaTeX' 'babel' package
* labelpath:: Drawing curved labels
* labelpath3:: Drawing curved labels in 3D
@@ -175,8 +174,12 @@ provides a mathematical coordinate-based framework for technical
drawing. Labels and equations are typeset with 'LaTeX', for overall
document consistency, yielding the same high-quality level of
typesetting that 'LaTeX' provides for scientific text. By default it
-produces 'PostScript' output, but it can also generate any format that
-the 'ImageMagick' package can produce.
+produces 'PostScript' output, but it can also generate 'PDF', 'SVG',
+'WebGL', 'PRC', and any format that the 'ImageMagick' package can
+produce. You can even try it out in your Web browser without installing
+it, using the 'Asymptote Web Application':
+
+ <http://asymptote.ualberta.ca>
A major advantage of 'Asymptote' over other graphics packages is that
it is a high-level programming language, as opposed to just a graphics
@@ -292,8 +295,8 @@ The 'texhash' command, which installs LaTeX style files, is optional.
The executable file will be '/usr/local/bin/asy') and example code will
be installed by default in '/usr/local/share/doc/asymptote/examples'.
-Fedora users can easily install the most recent version of 'Asymptote'
-with the command
+Fedora users can easily install a recent version of 'Asymptote' with the
+command
dnf --enablerepo=rawhide install asymptote
To install the latest version of 'Asymptote' on a Debian-based
@@ -332,7 +335,7 @@ self-extracting 'Asymptote' executable 'asymptote-x.xx-setup.exe', where
A working TeX implementation (we recommend
<https://www.tug.org/texlive> or <http://www.miktex.org>) will be
required to typeset labels. You will also need to install 'GPL
-Ghostscript' version 9.14 or later from
+Ghostscript' version 9.52 or later from
<http://downloads.ghostscript.com/public>.
To view 'PostScript' output, you can install the program 'gsview'
@@ -365,7 +368,7 @@ file is updated. The default 'UNIX' 'PostScript' viewer 'gv' supports
this (via a 'SIGHUP' signal). Version 'gv-3.6.3' or later (from
<https://ftp.gnu.org/gnu/gv/>) is required for interactive mode to work
properly. Users of 'ggv' will need to enable 'Watch file' under
-'Edit/Postscript Viewer Preferences'. Users of 'gsview' will need to
+'Edit/PostScript Viewer Preferences'. Users of 'gsview' will need to
enable 'Options/Auto Redisplay' (however, under 'MSDOS' it is still
necessary to click on the 'gsview' window; under 'UNIX' one must
manually redisplay by pressing the 'r' key).
@@ -397,7 +400,9 @@ The configuration variable 'htmlviewer' specifies the browser to use to
display 3D 'WebGL' output. The default setting is 'google-chrome' under
'UNIX' and 'cmd' under 'Microsoft Windows'. Note that 'Internet
Explorer' does not support 'WebGL'; 'Microsoft Windows' users should set
-their default html browser to 'chrome' or 'microsoft-edge'.
+their default html browser to 'chrome' or 'microsoft-edge'. By default,
+2D and 3D 'HTML' images expand to the enclosing canvas; this can be
+disabled by setting the configuation variable 'absolute' to 'true'.
On 'UNIX' systems, to support automatic document reloading of 'PDF'
files in 'Adobe Reader', we recommend copying the file 'reload.js' from
@@ -462,8 +467,8 @@ File: asymptote.info, Node: Search paths, Next: Compiling from UNIX source, P
2.5 Search paths
================
-In looking for 'Asymptote' system files, 'asy' will search the following
-paths, in the order listed:
+In looking for 'Asymptote' files, 'asy' will search the following paths,
+in the order listed:
1. The current directory;
2. A list of one or more directories specified by the configuration
variable 'dir' or environment variable 'ASYMPTOTE_DIR' (separated
@@ -475,6 +480,9 @@ paths, in the order listed:
4. The 'Asymptote' system directory (by default,
'/usr/local/share/asymptote' under 'UNIX' and 'C:\Program
Files\Asymptote' under 'MSDOS').
+ 5. The 'Asymptote' examples directory (by default,
+ '/usr/local/share/doc/asymptote/examples' under 'UNIX' and
+ 'C:\Program Files\Asymptote\examples' under 'MSDOS').

File: asymptote.info, Node: Compiling from UNIX source, Next: Editing modes, Prev: Search paths, Up: Installation
@@ -498,18 +506,16 @@ used; if it is old we recommend first putting
in the 'Asymptote' source directory.
On 'UNIX' platforms (other than 'MacOS X'), we recommend using
-version '3.0.0' of the 'freeglut' library. To compile 'freeglut',
+version '3.2.1' of the 'freeglut' library. To compile 'freeglut',
download
- <https://prdownloads.sourceforge.net/freeglut/freeglut-3.0.0.tar.gz>
+ <https://prdownloads.sourceforge.net/freeglut/freeglut-3.2.1.tar.gz>
and type (as the root user):
-gunzip freeglut-3.0.0.tar.gz
-tar -xf freeglut-3.0.0.tar
-cd freeglut-3.0.0
-./configure --prefix=/usr
-cmake .
+gunzip freeglut-3.2.1.tar.gz
+tar -xf freeglut-3.2.1.tar
+cd freeglut-3.2.1
+cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_C_FLAGS=-fcommon .
make
make install
-cd ..
Then compile 'Asymptote' with the commands
./configure
@@ -528,9 +534,10 @@ done as the root user. To install without root privileges, change the
./configure --prefix=$HOME/asymptote
One can disable use of the Boehm garbage collector by configuring
with './configure --disable-gc'. For a list of other configuration
-options, say './configure --help'. For example, one can tell configure
-to look for header files and libraries in nonstandard locations:
-./configure CPPFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib
+options, say './configure --help'. For example, under 'MacOS X', one
+can tell configure to use the 'clang' compilers and look for header
+files and libraries in nonstandard locations:
+./configure CC=clang CXX=clang++ CPPFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib
If you are compiling 'Asymptote' with 'gcc', you will need a
relatively recent version (e.g. 3.4.4 or later). For full interactive
@@ -618,7 +625,10 @@ cd asymptote
make all
make install
-To compile without optimization, use the command 'make CFLAGS=-g'.
+To compile without optimization, use the command 'make CFLAGS=-g'. On
+'Ubuntu' systems, you may need to first install the required
+dependencies:
+apt-get build-dep asymptote

File: asymptote.info, Node: Uninstall, Prev: Git, Up: Installation
@@ -652,7 +662,7 @@ A concise introduction to 'Asymptote' is given here. For a more
thorough introduction, see the excellent 'Asymptote' tutorial written by
Charles Staats:
- <https://math.uchicago.edu/~cstaats/Charles_Staats_III/Notes_and_papers_files/asymptote_tutorial.pdf>
+ <https://asymptote.sourceforge.io/asymptote_tutorial.pdf>
Another 'Asymptote' tutorial is available as a wiki, with images
rendered by an online Asymptote engine:
@@ -798,7 +808,7 @@ 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
+An 'Asymptote' path, being connected, is equivalent to a 'PostScript
subpath'. The '^^' binary operator, which requests that the pen be
moved (without drawing or affecting endpoint curvatures) from the final
point of the left-hand path to the initial point of the right-hand path,
@@ -820,8 +830,8 @@ of the paths:
filldraw(unitcircle^^reverse(g),yellow,black);
The '^^' operator is used by the 'box(triple, triple)' function in
-the module 'three.asy' to construct the edges of a cube 'unitbox'
-without retracing steps (*note three::):
+the module 'three' to construct the edges of a cube 'unitbox' without
+retracing steps (*note three::):
import three;
currentprojection=orthographic(5,4,2,center=true);
@@ -873,6 +883,9 @@ layer appearing on top. Within each layer, labels, images, and verbatim
'tex' commands are always drawn after the 'PostScript' objects in that
layer.
+ A page break can be generated with the command
+void newpage(picture pic=currentpicture);
+
While some of these drawing commands take many options, they all have
sensible default values (for example, the picture argument defaults to
currentpicture).
@@ -930,18 +943,19 @@ equivalently 'ArcArrow'), 'MidArcArrow', and 'ArcArrows'.
'labelmargin(p)' to avoid overlap with other drawn objects. Typical
values of 'margin' are 'NoMargin', 'BeginMargin', 'EndMargin' (or
equivalently 'Margin'), and 'Margins' (which leaves a margin at both
-ends of the path). One may use 'Margin(real begin, real end)' to
+ends of the path). One may use 'Margin(real begin, real end=begin)' to
specify the size of the beginning and ending margin, respectively, in
multiples of the units 'labelmargin(p)' used for aligning labels.
Alternatively, 'BeginPenMargin', 'EndPenMargin' (or equivalently
-'PenMargin'), 'PenMargins', 'PenMargin(real begin, real end)' specify a
-margin in units of the pen line width, taking account of the pen line
-width when drawing the path or arrow. For example, use 'DotMargin', an
-abbreviation for 'PenMargin(-0.5*dotfactor,0.5*dotfactor)', to draw from
-the usual beginning point just up to the boundary of an end dot of width
+'PenMargin'), 'PenMargins', 'PenMargin(real begin, real end=begin)'
+specify a margin in units of the pen line width, taking account of the
+pen line width when drawing the path or arrow. For example, use
+'DotMargin', an abbreviation for
+'PenMargin(-0.5*dotfactor,0.5*dotfactor)', to draw from the usual
+beginning point just up to the boundary of an end dot of width
'dotfactor*linewidth(p)'. The qualifiers 'BeginDotMargin',
'EndDotMargin', and 'DotMargins' work similarly. The qualifier
-'TrueMargin(real begin, real end)' allows one to specify a margin
+'TrueMargin(real begin, real end=begin)' allows one to specify a margin
directly in 'PostScript' units, independent of the pen line width.
The use of arrows, bars, and margins is illustrated by the examples
@@ -1051,7 +1065,8 @@ void axialshade(picture pic=currentpicture, path g, bool stroke=false,
pen pena, pair a, bool extenda=true,
pen penb, pair b, bool extendb=true);
The boolean parameters 'extenda' and 'extendb' indicate whether the
-shading should extend beyond the axis endpoints 'a' and 'b'.
+shading should extend beyond the axis endpoints 'a' and 'b'. An example
+of axial shading is provided in the example file 'axialshade.asy'.
Radial gradient shading varying smoothly from 'pena' on the circle
with center 'a' and radius 'ra' to 'penb' on the circle with center 'b'
@@ -1079,10 +1094,10 @@ Illustrations of Gouraud shading are provided in the example file
here:
<https://www.adobe.com/content/dam/acom/en/devnet/postscript/pdfs/TN5600.SmoothShading.pdf>
- Tensor product shading using fill rule 'fillrule' on patches bounded
-by the n cyclic paths of length 4 in path array 'b', using the vertex
-colors specified in the n \times 4 pen array 'p' and internal control
-points in the n \times 4 array 'z', is implemented with
+ Tensor product shading using clipping path 'g', fill rule 'fillrule'
+on patches bounded by the n cyclic paths of length 4 in path array 'b',
+using the vertex colors specified in the n \times 4 pen array 'p' and
+internal control points in the n \times 4 array 'z', is implemented with
void tensorshade(picture pic=currentpicture, path[] g, bool stroke=false,
pen fillrule=currentpen, pen[][] p, path[] b=g,
pair[][] z=new pair[][]);
@@ -1129,8 +1144,10 @@ void clip(picture pic=currentpicture, path g, stroke=false,
the path 'g', using fill rule 'fillrule' (*note fillrule::). If
'stroke=true', the clipped portion is the same as the region that would
be drawn with 'draw(pic,g,zerowinding)'; in this case the path 'g' need
-not be cyclic. For an illustration of picture clipping, see the first
-example in *note LaTeX usage::.
+not be cyclic. While clipping has no notion of depth (it transcends
+layers and even pages), one can localize clipping to a temporary
+picture, which can then be added to 'pic'. For an illustration of
+picture clipping, see the first example in *note LaTeX usage::.

File: asymptote.info, Node: label, Prev: clip, Up: Drawing commands
@@ -1260,12 +1277,12 @@ asy(nativeformat(),"logo");
fill(unitcircle^^(scale(2/11.7)*unitcircle),
evenodd+rgb(124/255,205/255,124/255));
label(scale(1.1)*minipage(
-"\centering\scriptsize \textbf{\LARGE {\tt Asymptote}\\
+ "\centering\scriptsize \textbf{\LARGE {\tt Asymptote}\\
\smallskip
\small The Vector Graphics Language}\\
\smallskip
\textsc{Andy Hammerlindl, John Bowman, and Tom Prince}
-http://asymptote.sourceforge.net\\
+https://asymptote.sourceforge.io\\
",8cm),(0,0.6));
label(graphic("logo","height=7cm"),(0,-0.22));
clip(unitcircle^^(scale(2/11.7)*unitcircle),evenodd);
@@ -1484,12 +1501,12 @@ user-defined types):
returns the conjugate of 'z';
'real length(pair z)'
- returns the complex modulus '|z|' of its argument 'z'. For
+ returns the complex modulus |'z'| of its argument 'z'. For
example,
pair z=(3,4);
length(z);
returns the result 5. A synonym for 'length(pair)' is
- 'abs(pair)';
+ 'abs(pair)'. The function 'abs2(pair z)' returns |'z'|^2;
'real angle(pair z, bool warn=true)'
returns the angle of 'z' in radians in the interval
@@ -1563,8 +1580,9 @@ user-defined types):
Here are the built-in functions for triples:
'real length(triple v)'
- returns the length '|v|' of the vector 'v'. A synonym for
- 'length(triple)' is 'abs(triple)';
+ returns the length |'v'| of its argument 'v'. A synonym for
+ 'length(triple)' is 'abs(triple)'. The function 'abs2(triple
+ v)' returns |'v'|^2;
'real polar(triple v, bool warn=true)'
returns the colatitude of 'v' measured from the z axis in
@@ -2419,7 +2437,7 @@ with one or more color components equal to 1.
'defaultpen(pen)', causes the label alignment routines to use the
full label bounding box for alignment. In contrast, 'basealign'
requests that the TeX baseline be respected. The base align
- setting of a pen is returned by 'int basealigin(pen p=currentpen)'.
+ setting of a pen is returned by 'int basealign(pen p=currentpen)'.
* The font size is specified in TeX points (1 pt = 1/72.27 inches)
with the function 'pen fontsize(real size, real
@@ -2435,14 +2453,12 @@ with one or more color components equal to 1.
fontsize(pen p=currentpen)' and 'real lineskip(pen p=currentpen)',
respectively.
- * A pen using a specific 'LaTeX' 'NFSS' font is returned by calling
- the function 'pen font(string encoding, string family, string
- series, string shape)'. The default setting,
- 'font("OT1","cmr","m","n")', corresponds to 12pt Computer Modern
- Roman; this may be changed with 'defaultpen(pen)'. The font
- setting of a pen is returned by 'string font(pen p=currentpen)'.
- Support for standardized international characters is provided by
- the 'unicode' package (*note unicode::).
+ * A pen using a specific LaTeX NFSS font is returned by calling the
+ function 'pen font(string encoding, string family, string series,
+ string shape)'. The default setting, 'font("OT1","cmr","m","n")',
+ corresponds to 12pt Computer Modern Roman; this may be changed with
+ 'defaultpen(pen)'. The font setting of a pen is returned by
+ 'string font(pen p=currentpen)'.
Alternatively, one may select a fixed-size TeX font (on which
'fontsize' has no effect) like '"cmr12"' (12pt Computer Modern
@@ -2466,6 +2482,25 @@ with one or more color components equal to 1.
pen Symbol(string series="m", string shape="n");
pen ZapfDingbats(string series="m", string shape="n");
+ * Starting with the 2018/04/01 release, LaTeX takes UTF-8 as the new
+ default input encoding. However, you can still set different input
+ encoding (so as the font, font encoding or even language context).
+ Here is an example for 'cp1251' and Russian language in Cyrillic
+ script (font encoding 'T2A'):
+ texpreamble("\usepackage[math]{anttor}");
+ texpreamble("\usepackage[T2A]{fontenc}");
+ texpreamble("\usepackage[cp1251]{inputenc}");
+ texpreamble("\usepackage[russian]{babel}");
+ Support for Chinese, Japanese, and Korean fonts is provided by the
+ CJK package:
+ <https://ctan.org/pkg/cjk>
+ The following commands enable the CJK song family (within a label,
+ you can also temporarily switch to another family, say kai, by
+ prepending '"\CJKfamily{kai}"' to the label string):
+ texpreamble("\usepackage{CJK}
+ \AtBeginDocument{\begin{CJK*}{GBK}{song}}
+ \AtEndDocument{\clearpage\end{CJK*}}");
+
* The transparency of a pen can be changed with the command:
pen opacity(real opacity=1, string blend="Compatible");
The opacity can be varied from '0' (fully transparent) to the
@@ -2652,7 +2687,8 @@ power with the '^' operator.
The implicit initializer for transforms is 'identity()'. The
routines 'shift(transform t)' and 'shiftless(transform t)' return the
transforms '(t.x,t.y,0,0,0,0)' and '(0,0,t.xx,t.xy,t.yx,t.yy)'
-respectively.
+respectively. The function bool 'isometry(transform t)' can be used to
+test if 't' is an isometry (preserves distance).

File: asymptote.info, Node: Frames and pictures, Next: Files, Prev: Transforms, Up: Programming
@@ -2991,7 +3027,7 @@ File: asymptote.info, Node: Files, Next: Variable initializers, Prev: Frames
value) files and portable XDR (External Data Representation) binary
files.
- An input file must first be opened with
+ An input file can be opened with
input(string name="", bool check=true, string comment="#", string mode="");
reading is then done by assignment:
file fin=input("test.txt");
@@ -3004,12 +3040,14 @@ character of the string 'comment' specifies a comment character. If
this character is encountered in a data file, the remainder of the line
is ignored. When reading strings, a comment character followed
immediately by another comment character is treated as a single literal
-comment character.
+comment character. If 'Asymptote' is compiled with support for
+'libcurl', 'name' can be a URL.
- One can change the current working directory for read operations to
-the contents of the string 's' with the function 'string cd(string s)',
-which returns the new working directory. If 'string s' is empty, the
-path is reset to the value it had at program startup.
+ Unless the '-noglobalread' command-line option is specified, one can
+change the current working directory for read operations to the contents
+of the string 's' with the function 'string cd(string s)', which returns
+the new working directory. If 'string s' is empty, the path is reset to
+the value it had at program startup.
When reading pairs, the enclosing parenthesis are optional. Strings
are also read by assignment, by reading characters up to but not
@@ -3025,9 +3063,11 @@ existing data will be preserved, the position will be set to the
end-of-file, and both reading and writing operations will be enabled.
For security reasons, writing to files in directories other than the
current directory is allowed only if the '-globalwrite' (or '-nosafe')
-command-line option is specified. The function 'string mktemp(string
-s)' may be used to create and return the name of a unique temporary file
-in the current directory based on the string 's'.
+command-line option is specified. Reading from files in other
+directories is allowed unless the '-noglobalread' command-line option is
+specified. The function 'string mktemp(string s)' may be used to create
+and return the name of a unique temporary file in the current directory
+based on the string 's'.
There are two special files: 'stdin', which reads from the keyboard,
and 'stdout', which writes to the terminal. The implicit initializer
@@ -3063,12 +3103,12 @@ Microsystem's XDR (External Data Representation) portable binary format
(available on all 'UNIX' platforms). Alternatively, a file may also be
opened with 'mode="binary"' to read or write double precision reals and
single precision integers in the native (nonportable) machine binary
-format. The virtual member functions 'file singlereal(bool b=true)' and
-'file singleint(bool b=true)' be used to change the precision of real
-and integer I/O operations, respectively, for an XDR or binary file 'f'.
-Similarly, the function 'file signedint(bool b=true)' can be used to
-modify the signedness of integer reads and writes for an XDR or binary
-file 'f'.
+format, or to read the entire file into a string. The virtual member
+functions 'file singlereal(bool b=true)' and 'file singleint(bool
+b=true)' be used to change the precision of real and integer I/O
+operations, respectively, for an XDR or binary file 'f'. Similarly, the
+function 'file signedint(bool b=true)' can be used to modify the
+signedness of integer reads and writes for an XDR or binary file 'f'.
The virtual members 'name', 'mode', 'singlereal', 'singleint', and
'signedint' may be used to query the respective parameters for a given
@@ -3386,10 +3426,11 @@ be the (non-'void') type of the variable.
The function 'cputime()' returns a structure 'cputime' with
cumulative CPU times broken down into the fields 'parent.user',
-'parent.system', 'child.user', and 'child.system'. For convenience, the
-incremental fields 'change.user' and 'change.system' indicate the change
-in the corresponding total parent and child CPU times since the last
-call to 'cputime()'. The function
+'parent.system', 'child.user', and 'child.system', along with the
+cumulative wall clock time in 'parent.clock', all measured in seconds.
+For convenience, the incremental fields 'change.user', 'change.system',
+and 'change.clock' indicate the change in the corresponding fields since
+the last call to 'cputime()'. The function
void write(file file=stdout, string s="", cputime c,
string format=cputimeformat, suffix suffix=none);
displays the incremental user cputime followed by "u", the incremental
@@ -4079,18 +4120,18 @@ of type 'T[]'.
'new T[] {list}'
returns a new array of type 'T[]' initialized with 'list' (a comma
- delimited list of elements).
+ delimited list of elements);
'new T[n]'
returns a new array of 'n' elements of type 'T[]'. These 'n' array
elements are not initialized unless they are arrays themselves (in
- which case they are each initialized to empty arrays).
+ which case they are each initialized to empty arrays);
'T[] array(int n, T value, int depth=intMax)'
returns an array consisting of 'n' copies of 'value'. If 'value'
is itself an array, a deep copy of 'value' is made for each entry.
If 'depth' is specified, this deep copying only recurses to the
- specified number of levels.
+ specified number of levels;
'int[] sequence(int n)'
if 'n >= 1' returns the array '{0,1,...,n-1}' (otherwise returns a
@@ -4108,7 +4149,12 @@ of type 'T[]'.
'T[] map(T f(T), T[] a)'
returns the array obtained by applying the function 'f' to each
element of the array 'a'. This is equivalent to 'sequence(new
- T(int i) {return f(a[i]);},a.length)'.
+ T(int i) {return f(a[i]);},a.length)';
+
+'T2[] map(T2 f(T1), T1[] a)'
+ constructed by calling 'mapArray("T1","T2")', returns the array
+ obtained by applying the function 'f' to each element of the array
+ 'a';
'int[] reverse(int n)'
if 'n >= 1' returns the array '{n-1,n-2,...,0}' (otherwise returns
@@ -4117,7 +4163,7 @@ of type 'T[]'.
'int[] complement(int[] a, int n)'
returns the complement of the integer array 'a' in
'{0,1,2,...,n-1}', so that 'b[complement(a,b.length)]' yields the
- complement of 'b[a]'.
+ complement of 'b[a]';
'real[] uniform(real a, real b, int n)'
if 'n >= 1' returns a uniform partition of '[a,b]' into 'n'
@@ -4129,13 +4175,13 @@ of type 'T[]'.
the end of the array for the '-n'th value;
'int[] findall(bool[] a)'
- returns the indices of all 'true' values in the boolean array 'a'.
+ returns the indices of all 'true' values in the boolean array 'a';
'int search(T[] a, T key)'
For built-in ordered types 'T', searches a sorted array 'a' of 'n'
elements for k, returning the index 'i' if 'a[i] <= key < a[i+1]',
'-1' if 'key' is less than all elements of 'a', or 'n-1' if 'key'
- is greater than or equal to the last element of 'a'.
+ is greater than or equal to the last element of 'a';
'int search(T[] a, T key, bool less(T i, T j))'
searches an array 'a' sorted in ascending order such that element
@@ -4175,44 +4221,44 @@ of type 'T[]'.
'i' precedes element 'j' if 'less(i,j)' is true, subject to (if
'stable' is 'true') the stability constraint that the original
order of elements 'i' and 'j' is preserved if 'less(i,j)' and
- 'less(j,i)' are both 'false'.
+ 'less(j,i)' are both 'false';
'T[][] transpose(T[][] a)'
- returns the transpose of 'a'.
+ returns the transpose of 'a';
'T[][][] transpose(T[][][] a, int[] perm)'
returns the 3D transpose of 'a' obtained by applying the
permutation 'perm' of 'new int[]{0,1,2}' to the indices of each
- entry.
+ entry;
'T sum(T[] a)'
- For arithmetic types 'T', returns the sum of 'a'. In the case
+ for arithmetic types 'T', returns the sum of 'a'. In the case
where 'T' is 'bool', the number of true elements in 'a' is
- returned.
+ returned;
'T min(T[] a)'
'T min(T[][] a)'
'T min(T[][][] a)'
- For built-in ordered types 'T', returns the minimum element of 'a'.
+ for built-in ordered types 'T', returns the minimum element of 'a';
'T max(T[] a)'
'T max(T[][] a)'
'T max(T[][][] a)'
- For built-in ordered types 'T', returns the maximum element of 'a'.
+ for built-in ordered types 'T', returns the maximum element of 'a';
'T[] min(T[] a, T[] b)'
- For built-in ordered types 'T', and arrays 'a' and 'b' of the same
+ for built-in ordered types 'T', and arrays 'a' and 'b' of the same
length, returns an array composed of the minimum of the
- corresponding elements of 'a' and 'b'.
+ corresponding elements of 'a' and 'b';
'T[] max(T[] a, T[] b)'
- For built-in ordered types 'T', and arrays 'a' and 'b' of the same
+ for built-in ordered types 'T', and arrays 'a' and 'b' of the same
length, returns an array composed of the maximum of the
- corresponding elements of 'a' and 'b'.
+ corresponding elements of 'a' and 'b';
'pair[] pairs(real[] x, real[] y);'
- For arrays 'x' and 'y' of the same length, returns the pair array
- 'sequence(new pair(int i) {return (x[i],y[i]);},x.length)'.
+ for arrays 'x' and 'y' of the same length, returns the pair array
+ 'sequence(new pair(int i) {return (x[i],y[i]);},x.length)';
'pair[] fft(pair[] a, int sign=1)'
returns the unnormalized Fast Fourier Transform of 'a' (if the
@@ -4230,18 +4276,18 @@ of type 'T[]'.
'pair[][] fft(pair[][] a, int sign=1)'
returns the unnormalized two-dimensional Fourier transform of 'a'
- using the given 'sign'.
+ using the given 'sign';
'pair[][][] fft(pair[][][] a, int sign=1)'
returns the unnormalized three-dimensional Fourier transform of 'a'
- using the given 'sign'.
+ using the given 'sign';
'real dot(real[] a, real[] b)'
- returns the dot product of the vectors 'a' and 'b'.
+ returns the dot product of the vectors 'a' and 'b';
'pair dot(pair[] a, pair[] b)'
returns the complex dot product 'sum(a*conj(b))' of the vectors 'a'
- and 'b'.
+ and 'b';
'real[] tridiagonal(real[] a, real[] b, real[] c, real[] f);'
Solve the periodic tridiagonal problem L'x'='f' and return the
@@ -4254,7 +4300,7 @@ of type 'T[]'.
[ c[n-1] a[n-1] b[n-1] ]
For Dirichlet boundary conditions (denoted here by 'u[-1]' and
'u[n]'), replace 'f[0]' by 'f[0]-a[0]u[-1]' and
- 'f[n-1]-c[n-1]u[n]'; then set 'a[0]=c[n-1]=0'.
+ 'f[n-1]-c[n-1]u[n]'; then set 'a[0]=c[n-1]=0';
'real[] solve(real[][] a, real[] b, bool warn=true)'
Solve the linear equation 'a'x='b' by LU decomposition and return
@@ -4270,31 +4316,31 @@ of type 'T[]'.
write(a*x);
If 'a' is a singular matrix and 'warn' is 'false', return an empty
array. If the matrix 'a' is tridiagonal, the routine 'tridiagonal'
- provides a more efficient algorithm (*note tridiagonal::).
+ provides a more efficient algorithm (*note tridiagonal::);
'real[][] solve(real[][] a, real[][] b, bool warn=true)'
Solve the linear equation 'a'x='b' and return the solution x, where
'a' is an n \times n matrix and 'b' is an n \times m matrix. If
'a' is a singular matrix and 'warn' is 'false', return an empty
- matrix.
+ matrix;
'real[][] identity(int n);'
- returns the n \times n identity matrix.
+ returns the n \times n identity matrix;
'real[][] diagonal(... real[] a)'
- returns the diagonal matrix with diagonal entries given by a.
+ returns the diagonal matrix with diagonal entries given by a;
'real[][] inverse(real[][] a)'
- returns the inverse of a square matrix 'a'.
+ returns the inverse of a square matrix 'a';
'real[] quadraticroots(real a, real b, real c);'
This numerically robust solver returns the real roots of the
quadratic equation ax^2+bx+c=0, in ascending order. Multiple roots
- are listed separately.
+ are listed separately;
'pair[] quadraticroots(explicit pair a, explicit pair b, explicit pair c);'
This numerically robust solver returns the complex roots of the
- quadratic equation ax^2+bx+c=0.
+ quadratic equation ax^2+bx+c=0;
'real[] cubicroots(real a, real b, real c, real d);'
This numerically robust solver returns the real roots of the cubic
@@ -4619,6 +4665,11 @@ quotation marks:
'import "/usr/local/share/asymptote/graph.asy" as graph;'
+ If 'Asymptote' is compiled with support for 'libcurl', the file name
+can even be a URL: 'import
+"https://raw.githubusercontent.com/vectorgraphics/asymptote/HEAD/doc/axis3.asy"
+as axis3;'
+
It is an error if modules import themselves (or each other in a
cycle). The module name to be imported must be known at compile time.
@@ -4651,6 +4702,9 @@ code s=quote {
};
eval(s,true); // Outputs 1
+ One application of 'eval' is the creation of parametrized Asymptote
+code, such as a map from one type to another (*note map::).
+
To include the contents of an existing file 'graph' verbatim (as if
the contents of the file were inserted at that point), use one of the
forms:
@@ -4735,7 +4789,7 @@ void f();
for(int i=0; i < 10; ++i) {
int x=i;
if(x==5) {
- f=new void () { write(x); }
+ f=new void() {write(x);};
}
}
f();
@@ -4751,7 +4805,7 @@ void f() {
}
}
both 'x' and 'y' will be allocated in the same place, which is also
-where 'f' is also allocated.
+where 'f' is allocated.
Statements may also be declared static, in which case they are run at
the place where the enclosing function or structure is defined.
@@ -4985,6 +5039,7 @@ File: asymptote.info, Node: Base modules, Next: Options, Prev: LaTeX usage,
* stats:: Statistics routines and histograms
* patterns:: Custom fill and draw patterns
* markers:: Custom path marker routines
+* map:: Map keys to values
* tree:: Dynamic binary search tree
* binarytree:: Binary tree drawing module
* drawtree:: Tree drawing module
@@ -4995,8 +5050,6 @@ File: asymptote.info, Node: Base modules, Next: Options, Prev: LaTeX usage,
* embed:: Embedding movies, sounds, and 3D objects
* slide:: Making presentations with 'Asymptote'
* MetaPost:: 'MetaPost' compatibility routines
-* unicode:: Accept 'unicode' (UTF-8) characters
-* latin1:: Accept 'ISO 8859-1' characters
* babel:: Interface to 'LaTeX' 'babel' package
* labelpath:: Drawing curved labels
* labelpath3:: Drawing curved labels in 3D
@@ -5040,9 +5093,9 @@ File: asymptote.info, Node: simplex, Next: math, Prev: plain, Up: Base modul
8.2 'simplex'
=============
-This package solves the two-variable linear programming problem using
-the simplex method. It is used by the module 'plain' for automatic
-sizing of pictures.
+This module solves the two-variable linear programming problem using the
+simplex method. It is used by the module 'plain' for automatic sizing
+of pictures.

File: asymptote.info, Node: math, Next: interpolate, Prev: simplex, Up: Base modules
@@ -5050,7 +5103,7 @@ File: asymptote.info, Node: math, Next: interpolate, Prev: simplex, Up: Base
8.3 'math'
==========
-This package extends 'Asymptote''s mathematical capabilities with useful
+This module extends 'Asymptote''s mathematical capabilities with useful
functions such as
'void drawline(picture pic=currentpicture, pair P, pair Q, pen p=currentpen);'
@@ -5152,7 +5205,7 @@ File: asymptote.info, Node: stats, Next: patterns, Prev: trembling, Up: Base
8.7 'stats'
===========
-This package implements a Gaussian random number generator and a
+This module implements a Gaussian random number generator and a
collection of statistics routines, including 'histogram' and
'leastsquares'.
@@ -5162,8 +5215,8 @@ File: asymptote.info, Node: patterns, Next: markers, Prev: stats, Up: Base m
8.8 'patterns'
==============
-This package implements 'Postscript' tiling patterns and includes
-several convenient pattern generation routines.
+This module implements 'PostScript' tiling patterns and includes several
+convenient pattern generation routines.

File: asymptote.info, Node: markers, Next: tree, Prev: patterns, Up: Base modules
@@ -5171,8 +5224,8 @@ File: asymptote.info, Node: markers, Next: tree, Prev: patterns, Up: Base mo
8.9 'markers'
=============
-This package implements specialized routines for marking paths and
-angles. The principal mark routine provided by this package is
+This module implements specialized routines for marking paths and
+angles. The principal mark routine provided by this module is
markroutine markinterval(int n=1, frame f, bool rotated=false);
which centers 'n' copies of frame 'f' within uniformly space intervals
in arclength along the path, optionally rotated by the angle of the
@@ -5200,7 +5253,7 @@ and 'TildeIntervalMarker' from the above frames. The example
[./markers1]
- This package also provides a routine for marking an angle AOB:
+ This module also provides a routine for marking an angle AOB:
void markangle(picture pic=currentpicture, Label L="",
int n=1, real radius=0, real space=0,
pair A, pair O, pair B, arrowbar arrow=None,
@@ -5212,17 +5265,38 @@ as illustrated in the example 'markers2.asy'.
[./markers2]

+File: asymptote.info, Node: map, Next: tree, Prev: markers, Up: Base modules
+
+8.10 'map'
+==========
+
+This module creates a struct parameterized by the types specified in
+strings 'key' and 'value', mapping keys to values with a specified
+default:
+import map;
+
+mapTemplate(name="map",key="string",value="int",default="-1");
+
+map M;
+
+M.add("z",2);
+M.add("a",3);
+M.add("d",4);
+write(M.lookup("a"));
+write(M.lookup("y"));
+
+
File: asymptote.info, Node: tree, Next: binarytree, Prev: markers, Up: Base modules
-8.10 'tree'
+8.11 'tree'
===========
-This package implements an example of a dynamic binary search tree.
+This module implements an example of a dynamic binary search tree.

File: asymptote.info, Node: binarytree, Next: drawtree, Prev: tree, Up: Base modules
-8.11 'binarytree'
+8.12 'binarytree'
=================
This module can be used to draw an arbitrary binary tree and includes an
@@ -5247,7 +5321,7 @@ add(pic2.fit(),(0,0),10S);

File: asymptote.info, Node: drawtree, Next: syzygy, Prev: binarytree, Up: Base modules
-8.12 'drawtree'
+8.13 'drawtree'
===============
This is a simple tree drawing module used by the example 'treetest.asy'.
@@ -5255,7 +5329,7 @@ This is a simple tree drawing module used by the example 'treetest.asy'.

File: asymptote.info, Node: syzygy, Next: feynman, Prev: drawtree, Up: Base modules
-8.13 'syzygy'
+8.14 'syzygy'
=============
This module automates the drawing of braids, relations, and syzygies,
@@ -5265,27 +5339,27 @@ along with the corresponding equations, as illustrated in the example

File: asymptote.info, Node: feynman, Next: roundedpath, Prev: syzygy, Up: Base modules
-8.14 'feynman'
+8.15 'feynman'
==============
-This package, contributed by Martin Wiebusch, is useful for drawing
+This module, contributed by Martin Wiebusch, is useful for drawing
Feynman diagrams, as illustrated by the examples 'eetomumu.asy' and
'fermi.asy'.

File: asymptote.info, Node: roundedpath, Next: animation, Prev: feynman, Up: Base modules
-8.15 'roundedpath'
+8.16 'roundedpath'
==================
-This package, contributed by Stefan Knorr, is useful for rounding the
+This module, contributed by Stefan Knorr, is useful for rounding the
sharp corners of paths, as illustrated in the example file
'roundpath.asy'.

File: asymptote.info, Node: animation, Next: embed, Prev: roundedpath, Up: Base modules
-8.16 'animation'
+8.17 'animation'
================
This module allows one to generate animations, as illustrated by the
@@ -5296,7 +5370,7 @@ MPEG movie.
The related 'animate' module, derived from the 'animation' module,
generates higher-quality portable clickable PDF movies, with optional
-controls. This requires installing the package
+controls. This requires installing the module
<http://mirror.ctan.org/macros/latex/contrib/animate/animate.sty>
(version 2007/11/30 or later) in a new directory 'animate' in the local
'LaTeX' directory (for example, in
@@ -5317,7 +5391,7 @@ described here:

File: asymptote.info, Node: embed, Next: slide, Prev: animation, Up: Base modules
-8.17 'embed'
+8.18 'embed'
============
This module provides an interface to the 'LaTeX' package (included with
@@ -5342,21 +5416,21 @@ animate::).

File: asymptote.info, Node: slide, Next: MetaPost, Prev: embed, Up: Base modules
-8.18 'slide'
+8.19 'slide'
============
-This package provides a simple yet high-quality facility for making
+This module provides a simple yet high-quality facility for making
presentation slides, including portable embedded PDF animations (see the
file 'slidemovies.asy'). A simple example is provided in
'slidedemo.asy'.

-File: asymptote.info, Node: MetaPost, Next: unicode, Prev: slide, Up: Base modules
+File: asymptote.info, Node: MetaPost, Next: babel, Prev: slide, Up: Base modules
-8.19 'MetaPost'
+8.20 'MetaPost'
===============
-This package provides some useful routines to help 'MetaPost' users
+This module provides some useful routines to help 'MetaPost' users
migrate old 'MetaPost' code to 'Asymptote'. Further contributions here
are welcome.
@@ -5369,42 +5443,9 @@ occurrences of 'whatever', one can use the built-in explicit linear
equation solver 'solve' instead.

-File: asymptote.info, Node: unicode, Next: latin1, Prev: MetaPost, Up: Base modules
-
-8.20 'unicode'
-==============
-
-Import this package at the beginning of the file to instruct 'LaTeX' to
-accept 'unicode' (UTF-8) standardized international characters. To use
-Cyrillic fonts, you will need to change the font encoding:
-import unicode;
-texpreamble("\usepackage{mathtext}\usepackage[russian]{babel}");
-defaultpen(font("T2A","cmr","m","n"));
-Support for Chinese, Japanese, and Korean fonts is provided by the CJK
-package:
- <http://mirror.ctan.org/languages/chinese/CJK/>
-The following commands enable the CJK song family (within a label, you
-can also temporarily switch to another family, say kai, by prepending
-'"\CJKfamily{kai}"' to the label string):
-texpreamble("\usepackage{CJK}
-\AtBeginDocument{\begin{CJK*}{GBK}{song}}
-\AtEndDocument{\clearpage\end{CJK*}}");
+File: asymptote.info, Node: babel, Next: labelpath, Prev: MetaPost, Up: Base modules
-
-File: asymptote.info, Node: latin1, Next: babel, Prev: unicode, Up: Base modules
-
-8.21 'latin1'
-=============
-
-If you don't have 'LaTeX' support for 'unicode' installed, you can
-enable support for Western European languages (ISO 8859-1) by importing
-the module 'latin1'. This module can be used as a template for
-providing support for other ISO 8859 alphabets.
-
-
-File: asymptote.info, Node: babel, Next: labelpath, Prev: latin1, Up: Base modules
-
-8.22 'babel'
+8.21 'babel'
============
This module implements the 'LaTeX' 'babel' package in 'Asymptote'. For
@@ -5415,7 +5456,7 @@ babel("german");

File: asymptote.info, Node: labelpath, Next: labelpath3, Prev: babel, Up: Base modules
-8.23 'labelpath'
+8.22 'labelpath'
================
This module uses the 'PSTricks' 'pstextpath' macro to fit labels along a
@@ -5427,13 +5468,13 @@ Here 'justify' is one of 'LeftJustified', 'Centered', or
'RightJustified'. The x component of a shift transform applied to the
Label is interpreted as a shift along the curve, whereas the y component
is interpreted as a shift away from the curve. All other Label
-transforms are ignored. This package requires the 'latex' tex engine
-and inherits the limitations of the 'PSTricks' '\pstextpath' macro.
+transforms are ignored. This module requires the 'latex' tex engine and
+inherits the limitations of the 'PSTricks' '\pstextpath' macro.

File: asymptote.info, Node: labelpath3, Next: annotate, Prev: labelpath, Up: Base modules
-8.24 'labelpath3'
+8.23 'labelpath3'
=================
This module, contributed by Jens Schwaiger, implements a 3D version of
@@ -5443,7 +5484,7 @@ provided in 'curvedlabel3.asy'.

File: asymptote.info, Node: annotate, Next: CAD, Prev: labelpath3, Up: Base modules
-8.25 'annotate'
+8.24 'annotate'
===============
This module supports PDF annotations for viewing with 'Adobe Reader',
@@ -5457,21 +5498,20 @@ and 'tex' TeX engines.

File: asymptote.info, Node: CAD, Next: graph, Prev: annotate, Up: Base modules
-8.26 'CAD'
+8.25 'CAD'
==========
-This package, contributed by Mark Henning, provides basic pen
-definitions and measurement functions for simple 2D CAD drawings
-according to DIN 15. It is documented separately, in the file
-'CAD.pdf'.
+This module, contributed by Mark Henning, provides basic pen definitions
+and measurement functions for simple 2D CAD drawings according to DIN
+15. It is documented separately, in the file 'CAD.pdf'.

File: asymptote.info, Node: graph, Next: palette, Prev: CAD, Up: Base modules
-8.27 'graph'
+8.26 'graph'
============
-This package implements two-dimensional linear and logarithmic graphs,
+This module implements two-dimensional linear and logarithmic graphs,
including automatic scale and tick selection (with the ability to
override manually). A graph is a 'guide' (that can be drawn with the
draw command, with an optional legend) constructed with one of the
@@ -5833,11 +5873,11 @@ following routines:
real f(real x) {return exp(x);}
pair F(real x) {return (x,f(x));}
+ draw(graph(f,-4,2,operator ..),red);
+
xaxis("$x$");
yaxis("$y$",0);
- draw(graph(f,-4,2,operator ..),red);
-
labely(1,E);
label("$e^x$",F(1),SE);
@@ -5890,21 +5930,21 @@ following routines:
attach(legend(),truepoint(E),20E,UnFill);
A legend can have multiple entries per line:
- import graph;
- size(8cm,6cm,IgnoreAspect);
-
- typedef real realfcn(real);
- realfcn F(real p) {
- return new real(real x) {return sin(p*x);};
- };
-
+ import graph;
+ size(8cm,6cm,IgnoreAspect);
+
+ typedef real realfcn(real);
+ realfcn F(real p) {
+ return new real(real x) {return sin(p*x);};
+ };
+
for(int i=1; i < 5; ++i)
draw(graph(F(i*pi),0,1),Pen(i),
- "$\sin("+(i == 1 ? "" : (string) i)+"\pi x)$");
- xaxis("$x$",BottomTop,LeftTicks);
- yaxis("$y$",LeftRight,RightTicks(trailingzero));
-
- attach(legend(2),(point(S).x,truepoint(S).y),10S,UnFill);
+ "$\sin("+(i == 1 ? "" : (string) i)+"\pi x)$");
+ xaxis("$x$",BottomTop,LeftTicks);
+ yaxis("$y$",LeftRight,RightTicks(trailingzero));
+
+ attach(legend(2),(point(S).x,truepoint(S).y),10S,UnFill);
[./legend]
@@ -6363,7 +6403,7 @@ following routines:
draw(pic,graph(pic,t,infectious,t >= 10 & t <= 15),red);
yaxis(pic,Right,red,LeftTicks(begin=false,end=false));
});
-
+
add(secondary);
label(shift(5mm*N)*"Proportion of crows",point(NW),E);
@@ -6419,7 +6459,7 @@ following routines:
// Remove negative or zero values of rho:
t=rho > 0 ? t : null;
rho=rho > 0 ? rho : null;
-
+
scale(Log(true),Linear(true));
int n=step > 0 ? ceil((last-first)/step) : 0;
@@ -6430,17 +6470,17 @@ following routines:
real first=first+i*step;
real[] logrho=(t >= first & t <= last) ? log(rho) : null;
real[] logt=(t >= first & t <= last) ? -log(t) : null;
-
+
if(logt.length < 2) break;
-
+
// Fit to the line logt=L.m*logrho+L.b:
linefit L=leastsquares(logt,logrho);
-
+
T.push(first);
xi.push(L.m);
dxi.push(L.dm);
- }
-
+ }
+
draw(graph(T,xi),blue);
errorbars(T,xi,dxi,red);
@@ -6540,7 +6580,7 @@ following routines:

File: asymptote.info, Node: palette, Next: three, Prev: graph, Up: Base modules
-8.28 'palette'
+8.27 'palette'
==============
'Asymptote' can also generate color density images and palettes. The
@@ -6750,7 +6790,7 @@ pen[][] palette(real[][] f, pen[] palette);

File: asymptote.info, Node: three, Next: obj, Prev: palette, Up: Base modules
-8.29 'three'
+8.28 'three'
============
This module fully extends the notion of guides and paths in 'Asymptote'
@@ -6827,7 +6867,7 @@ and 'three_light.asy':
struct light {
real[][] diffuse;
real[][] specular;
- pen background=nullpen; // Background color of the 3D canvas.
+ pen background=nullpen; // Background color of the canvas.
real specularfactor;
triple[] position; // Only directional lights are currently implemented.
}
@@ -6844,9 +6884,11 @@ light Headlamp=light(gray(0.8),specular=gray(0.7),
currentlight=Headlamp;
light nolight;
- The 'background' pen can be use to set the 3D 'OpenGL' background
-colour (the default is white). In the case of 3D 'WebGL' images one can
-request a completely transparent background with
+ The 'currentlight.background' (or 'background' member of the
+specified 'light') can be used to set the background colour for 2D (or
+3D) images. The default background is white for 'HTML' images and
+transparent for all other formats. One can request a completely
+transparent background for 3D 'WebGL' images with
'currentlight.background=black+opacity(0.0);'
Sample Bezier surfaces are contained in the example files
@@ -6923,10 +6965,11 @@ There are five choices for viewing 3D 'Asymptote' output:
the command-line option '-V' and the default settings
'outformat=""' and 'render=-1'). On 'UNIX' systems with graphics
support for multisampling, the sample width can be controlled with
- the setting 'multisample'. An initial screen position can be
- specified with the pair setting 'position', where negative values
- are interpreted as relative to the corresponding maximum screen
- dimension. The default settings
+ the setting 'multisample'. The ratio of physical to logical screen
+ pixels can be specified with the setting 'devicepixelratio'. An
+ initial screen position can be specified with the pair setting
+ 'position', where negative values are interpreted as relative to
+ the corresponding maximum screen dimension. The default settings
import settings;
leftbutton=new string[] {"rotate","zoom","shift","pan"};
middlebutton=new string[] {""};
@@ -7387,9 +7430,8 @@ position 'v' using pen 'p'.
three-dimensional nonrendered 'PostScript') is available with the
setting 'render=0'. This currently only works for piecewise planar
surfaces, such as those produced by the parametric 'surface' routines in
-the 'graph3' module. Surfaces produced by the 'solids' package will
-also be properly rendered if the parameter 'nslices' is sufficiently
-large.
+the 'graph3' module. Surfaces produced by the 'solids' module will also
+be properly rendered if the parameter 'nslices' is sufficiently large.
In the module 'bsp', hidden surface removal of planar pictures is
implemented using a binary space partition and picture clipping. A
@@ -7432,7 +7474,7 @@ add(faces);

File: asymptote.info, Node: obj, Next: graph3, Prev: three, Up: Base modules
-8.30 'obj'
+8.29 'obj'
==========
This module allows one to construct surfaces from simple obj files, as
@@ -7441,7 +7483,7 @@ illustrated in the example files 'galleon.asy' and 'triceratops.asy'.

File: asymptote.info, Node: graph3, Next: grid3, Prev: obj, Up: Base modules
-8.31 'graph3'
+8.30 'graph3'
=============
This module implements three-dimensional versions of the functions in
@@ -7607,7 +7649,7 @@ picture vectorfield(path3 vector(pair v), triple f(pair z), pair a, pair b,

File: asymptote.info, Node: grid3, Next: solids, Prev: graph3, Up: Base modules
-8.32 'grid3'
+8.31 'grid3'
============
This module, contributed by Philippe Ivaldi, can be used for drawing 3D
@@ -7636,10 +7678,10 @@ zaxis3(Label("$z$",position=EndPoint,align=(-1,0.5)),Bounds(Min,Min),

File: asymptote.info, Node: solids, Next: tube, Prev: grid3, Up: Base modules
-8.33 'solids'
+8.32 'solids'
=============
-This solid geometry package defines a structure 'revolution' that can be
+This solid geometry module defines a structure 'revolution' that can be
used to fill and draw surfaces of revolution. The following example
uses it to display the outline of a circular cylinder of radius 1 with
axis 'O--1.5unit(Y+Z)' with perspective projection:
@@ -7671,10 +7713,10 @@ struct skeleton {

File: asymptote.info, Node: tube, Next: flowchart, Prev: solids, Up: Base modules
-8.34 'tube'
+8.33 'tube'
===========
-This package extends the 'tube' surfaces constructed in
+This module extends the 'tube' surfaces constructed in
'three_arrows.asy' to arbitrary cross sections, colors, and spine
transformations. The routine
surface tube(path3 g, coloredpath section,
@@ -7722,10 +7764,10 @@ Further examples can be found at

File: asymptote.info, Node: flowchart, Next: contour, Prev: tube, Up: Base modules
-8.35 'flowchart'
+8.34 'flowchart'
================
-This package provides routines for drawing flowcharts. The primary
+This module provides routines for drawing flowcharts. The primary
structure is a 'block', which represents a single block on the
flowchart. The following eight functions return a position on the
appropriate edge of the block, given picture transform 't':
@@ -7810,8 +7852,8 @@ size(0,300);
import flowchart;
block block1=rectangle(Label("Example",magenta),
- pack(Label("Start:",heavygreen),"",Label("$A:=0$",blue),
- "$B:=1$"),(-0.5,3),palegreen,paleblue,red);
+ pack(Label("Start:",heavygreen),"",Label("$A:=0$",blue),
+ "$B:=1$"),(-0.5,3),palegreen,paleblue,red);
block block2=diamond(Label("Choice?",blue),(0,2),palegreen,red);
block block3=roundrectangle("Do something",(-1,1));
block block4=bevel("Don't do something",(1,1));
@@ -7838,12 +7880,12 @@ add(new void(picture pic, transform t) {

File: asymptote.info, Node: contour, Next: contour3, Prev: flowchart, Up: Base modules
-8.36 'contour'
+8.35 'contour'
==============
-This package draws contour lines. To construct contours corresponding
-to the values in a real array 'c' for a function 'f' on 'box(a,b)', use
-the routine
+This module draws contour lines. To construct contours corresponding to
+the values in a real array 'c' for a function 'f' on 'box(a,b)', use the
+routine
guide[][] contour(real f(real, real), pair a, pair b,
real[] c, int nx=ngraph, int ny=nx,
interpolate join=operator --, int subsample=1);
@@ -7934,7 +7976,7 @@ pen tickpen=gray+0.5*linewidth(currentpen);
pen[] Palette=BWRainbow();
bounds range=image(f,Automatic,a,b,N,Palette);
-
+
// Major contours
real[] Cvals=uniform(range.min,range.max,Divs);
@@ -8017,17 +8059,17 @@ Shewchuk.

File: asymptote.info, Node: contour3, Next: smoothcontour3, Prev: contour, Up: Base modules
-8.37 'contour3'
+8.36 'contour3'
===============
-This package draws surfaces described as the null space of real-valued
+This module draws surfaces described as the null space of real-valued
functions of (x,y,z) or 'real[][][]' matrices. Its usage is illustrated
in the example file 'magnetic.asy'.

File: asymptote.info, Node: smoothcontour3, Next: slopefield, Prev: contour3, Up: Base modules
-8.38 'smoothcontour3'
+8.37 'smoothcontour3'
=====================
This module, written by Charles Staats, draws implicitly defined
@@ -8063,7 +8105,7 @@ explanation of the module's usage and pitfalls, are available at

File: asymptote.info, Node: slopefield, Next: ode, Prev: smoothcontour3, Up: Base modules
-8.39 'slopefield'
+8.38 'slopefield'
=================
To draw a slope field for the differential equation dy/dx=f(x,y) (or
@@ -8105,7 +8147,7 @@ draw(curve((0,0),func,(-3,-3),(3,3)),red);

File: asymptote.info, Node: ode, Prev: slopefield, Up: Base modules
-8.40 'ode'
+8.39 'ode'
==========
The 'ode' module, illustrated in the example 'odetest.asy', implements a
@@ -8143,7 +8185,9 @@ Options (negate by replacing - with -no):
-cmyk Convert rgb colors to cmyk [false]
-c,-command string Command to autoexecute
-compact Conserve memory at the expense of speed [false]
+-compress Compress images in PDF output [true]
-d,-debug Enable debugging messages [false]
+-devicepixelratio n Ratio of physical to logical pixels [1]
-digits n Default output file precision [7]
-divisor n Garbage collect using purge(divisor=n) [2]
-embed Embed rendered preview image [true]
@@ -8152,6 +8196,7 @@ Options (negate by replacing - with -no):
-fitscreen Fit rendered image to screen [true]
-framedelay ms Additional frame delay [0]
-framerate frames/s Animation speed [30]
+-globalread Allow read from other directory [true]
-globalwrite Allow write to other directory [false]
-gray Convert all colors to grayscale [false]
-h,-help Show summary of options; command-line only
@@ -8170,12 +8215,11 @@ Options (negate by replacing - with -no):
-loop Loop 3D animations [false]
-m,-mask Mask fpu exceptions; command-line only
-maxtile pair Maximum rendering tile size [(1024,768)]
--maxviewport pair Maximum viewport size [(2048,2048)]
+-maxviewport pair Maximum viewport size [(0,0)]
-multiline Input code over multiple lines at the prompt [false]
-multipleView View output from multiple batch-mode files [false]
-multisample n Multisampling width for screen images [4]
-offline Produce offline html files [false]
--offscreen Use offscreen rendering [false]
-O,-offset pair PostScript offset [(0,0)]
-f,-outformat format Convert each output file to specified format
-o,-outname name Alternative output directory/filename
@@ -8196,7 +8240,7 @@ Options (negate by replacing - with -no):
-shiftHoldDistance n WebGL touch screen distance limit for shift mode [20]
-shiftWaitTime ms WebGL touch screen shift mode delay [200]
-spinstep deg/s Spin speed [60]
--svgemulation Emulate unimplemented SVG shading [false]
+-svgemulation Emulate unimplemented SVG shading [true]
-tabcompletion Interactive prompt auto-completion [true]
-tex engine latex|pdflatex|xelatex|lualatex|tex|pdftex|luatex|context|none [latex]
-thick Render thick 3D lines [true]
@@ -8276,10 +8320,9 @@ using the '-f' option (or 'outformat' setting).
later) from <https://dvisvgm.de>. You might need to adjust the
configuration variable 'libgs' to point to the location of your
'Ghostscript' library 'libgs.so' (or to an empty string, depending on
-how 'dvisvgm' was configured). The 2.8 version of 'dvisvgm' can display
-SVG output (used by the 'xasy' editor) for external vector EPS and PDF
-images included with the 'graphic()' function, in addition to (using the
-'latex' TeX engine) PNG and JPEG embedded raster images.
+how 'dvisvgm' was configured). The 2.9.1 version of 'dvisvgm' can
+display SVG output (used by the 'xasy' editor) for embedded EPS, PDF,
+PNG, and JPEG images included with the 'graphic()' function.
'Asymptote' can also produce any output format supported by the
'ImageMagick' 'convert' program (version 6.3.5 or later recommended; an
@@ -8459,7 +8502,7 @@ pip3 install cson numpy pyqt5 PyQt5.sip
Pictures are deconstructed into the SVG image format. Since 'Qt5'
does not support 'SVG' clipping, you will need the 'rsvg-convert'
utility, which is part of the 'librsvg2-tools' package on 'UNIX' systems
-and the 'librsvg' package on 'MacOS'; under 'Microsoft Windows', it is
+and the 'librsvg' package on 'MacOS X'; under 'Microsoft Windows', it is
available as
<https://sourceforge.net/projects/tumagcc/files/rsvg-convert-2.40.20.7z>
@@ -8628,7 +8671,9 @@ Prince. Sean Healy designed the 'Asymptote' logo. Other contributors
include Orest Shardt, Jesse Frohlich, Michail Vidiassov, Charles Staats,
Philippe Ivaldi, Olivier Guibe', Radoslav Marinov, Jeff Samuelson, Chris
Savage, Jacques Pienaar, Mark Henning, Steve Melenchuk, Martin Wiebusch,
-Stefan Knorr, and Supakorn "Jamie" Rassameemasmuang.
+Stefan Knorr, and Supakorn "Jamie" Rassameemasmuang. Pedram Emami
+developed the 'Asymptote Web Application' at
+<http://asymptote.ualberta.ca>.

File: asymptote.info, Node: Index, Prev: Credits, Up: Top
@@ -8678,9 +8723,9 @@ Index
* ---: Bezier curves. (line 84)
* -=: Self & prefix operators.
(line 6)
-* -c: Options. (line 194)
-* -l: Options. (line 213)
-* -u: Options. (line 204)
+* -c: Options. (line 195)
+* -l: Options. (line 214)
+* -u: Options. (line 205)
* -V: Configuring. (line 6)
* -V <1>: Drawing in batch mode.
(line 16)
@@ -8693,7 +8738,7 @@ Index
* 2D graphs: graph. (line 6)
* 3D graphs: graph3. (line 6)
* 3D grids: grid3. (line 6)
-* 3D PostScript: three. (line 636)
+* 3D PostScript: three. (line 639)
* :: Arithmetic & logical.
(line 61)
* ::: Bezier curves. (line 70)
@@ -8721,15 +8766,20 @@ Index
(line 53)
* ||: Arithmetic & logical.
(line 51)
-* a4: Configuring. (line 66)
-* abort: Data types. (line 363)
+* a4: Configuring. (line 68)
+* abort: Data types. (line 364)
* abs: Data types. (line 65)
-* abs <1>: Mathematical functions.
+* abs <1>: Data types. (line 144)
+* abs <2>: Mathematical functions.
(line 35)
+* abs2: Data types. (line 65)
+* abs2 <1>: Data types. (line 144)
+* absolute: Configuring. (line 43)
* accel: Paths and guides. (line 126)
* accel <1>: Paths and guides. (line 132)
-* accel <2>: three. (line 537)
+* accel <2>: three. (line 540)
* access: Import. (line 6)
+* access <1>: Import. (line 45)
* acknowledgments: Credits. (line 6)
* acos: Mathematical functions.
(line 6)
@@ -8741,8 +8791,8 @@ Index
(line 217)
* add <1>: Frames and pictures.
(line 231)
-* add <2>: three. (line 309)
-* addViews: three. (line 430)
+* add <2>: three. (line 312)
+* addViews: three. (line 433)
* adjust: Pens. (line 123)
* Ai: Mathematical functions.
(line 48)
@@ -8751,57 +8801,57 @@ Index
* Ai_deriv: Mathematical functions.
(line 48)
* alias: Structures. (line 62)
-* alias <1>: Arrays. (line 174)
+* alias <1>: Arrays. (line 179)
* Align: label. (line 12)
-* aligndir: Options. (line 186)
-* all: Arrays. (line 333)
-* Allow: Pens. (line 346)
+* aligndir: Options. (line 187)
+* all: Arrays. (line 338)
+* Allow: Pens. (line 363)
* and: Bezier curves. (line 56)
* AND: Arithmetic & logical.
(line 68)
* angle: Data types. (line 73)
* animate: Configuring. (line 20)
-* animate <1>: Files. (line 155)
+* animate <1>: Files. (line 159)
* animate <2>: animation. (line 12)
* animation: animation. (line 6)
* animation <1>: animation. (line 6)
* annotate: annotate. (line 6)
-* antialias: three. (line 251)
-* antialias <1>: Options. (line 155)
-* append: Files. (line 36)
+* antialias: three. (line 254)
+* antialias <1>: Options. (line 157)
+* append: Files. (line 38)
* append <1>: Arrays. (line 39)
* arc: Paths and guides. (line 24)
* Arc: Paths and guides. (line 37)
-* arc <1>: three. (line 320)
+* arc <1>: three. (line 323)
* ArcArrow: draw. (line 26)
-* ArcArrow3: three. (line 603)
+* ArcArrow3: three. (line 606)
* ArcArrows: draw. (line 26)
-* ArcArrows3: three. (line 603)
+* ArcArrows3: three. (line 606)
* arclength: Paths and guides. (line 153)
-* arclength <1>: three. (line 537)
+* arclength <1>: three. (line 540)
* arcpoint: Paths and guides. (line 163)
* arctime: Paths and guides. (line 157)
-* arctime <1>: three. (line 537)
+* arctime <1>: three. (line 540)
* arguments: Default arguments. (line 6)
* arithmetic operators: Arithmetic & logical.
(line 6)
-* array: Data types. (line 283)
+* array: Data types. (line 284)
* array <1>: Arrays. (line 112)
* array iteration: Programming. (line 52)
* arrays: Arrays. (line 6)
-* arrow: Drawing commands. (line 31)
+* arrow: Drawing commands. (line 34)
* Arrow: draw. (line 26)
* arrow <1>: label. (line 70)
* arrow keys: Drawing in interactive mode.
(line 11)
* arrow keys <1>: GUI usage. (line 6)
-* Arrow3: three. (line 603)
+* Arrow3: three. (line 606)
* arrows: draw. (line 26)
* Arrows: draw. (line 26)
-* Arrows3: three. (line 603)
+* Arrows3: three. (line 606)
* as: Import. (line 67)
-* ascii: Data types. (line 308)
-* ascii <1>: Data types. (line 308)
+* ascii: Data types. (line 309)
+* ascii <1>: Data types. (line 309)
* asin: Mathematical functions.
(line 6)
* aSin: Mathematical functions.
@@ -8810,17 +8860,18 @@ Index
(line 6)
* Aspect: Frames and pictures.
(line 59)
-* assert: Data types. (line 368)
+* assert: Data types. (line 369)
* assignment: Programming. (line 26)
-* asy: Data types. (line 358)
-* asy <1>: Import. (line 101)
+* asy: Data types. (line 359)
+* asy <1>: Import. (line 106)
* asy-mode: Editing modes. (line 6)
* asy.vim: Editing modes. (line 32)
-* asygl: Configuring. (line 72)
+* asygl: Configuring. (line 74)
* asyinclude: LaTeX usage. (line 45)
+* Asymptote Web Application: Description. (line 6)
* asymptote.sty: LaTeX usage. (line 6)
* asymptote.xml: Editing modes. (line 48)
-* ASYMPTOTE_CONFIG: Options. (line 126)
+* ASYMPTOTE_CONFIG: Options. (line 128)
* atan: Mathematical functions.
(line 6)
* aTan: Mathematical functions.
@@ -8834,8 +8885,8 @@ Index
(line 276)
* attach <1>: LaTeX usage. (line 50)
* attach <2>: graph. (line 406)
-* autoadjust: three. (line 395)
-* autoimport: Options. (line 122)
+* autoadjust: three. (line 398)
+* autoimport: Options. (line 124)
* automatic scaling: graph. (line 690)
* automatic scaling <1>: graph. (line 690)
* axialshade: fill. (line 43)
@@ -8843,57 +8894,57 @@ Index
* axis <1>: graph. (line 988)
* axis <2>: graph3. (line 66)
* axis <3>: graph3. (line 82)
-* azimuth: Data types. (line 153)
+* azimuth: Data types. (line 154)
* babel: babel. (line 6)
* background: three. (line 76)
* background <1>: three. (line 97)
* background color: Frames and pictures.
(line 180)
-* BackView: three. (line 423)
+* BackView: three. (line 426)
* Bar: draw. (line 19)
-* Bar3: three. (line 603)
+* Bar3: three. (line 606)
* Bars: draw. (line 19)
-* Bars3: three. (line 603)
+* Bars3: three. (line 606)
* barsize: draw. (line 19)
* base modules: Base modules. (line 6)
* basealign: Pens. (line 181)
* baseline: label. (line 90)
* batch mode: Drawing in batch mode.
(line 6)
-* beep: Data types. (line 381)
+* beep: Data types. (line 382)
* BeginArcArrow: draw. (line 26)
-* BeginArcArrow3: three. (line 603)
+* BeginArcArrow3: three. (line 606)
* BeginArrow: draw. (line 26)
-* BeginArrow3: three. (line 603)
+* BeginArrow3: three. (line 606)
* BeginBar: draw. (line 19)
-* BeginBar3: three. (line 603)
+* BeginBar3: three. (line 606)
* BeginDotMargin: draw. (line 42)
-* BeginDotMargin3: three. (line 619)
+* BeginDotMargin3: three. (line 622)
* BeginMargin: draw. (line 42)
-* BeginMargin3: three. (line 619)
+* BeginMargin3: three. (line 622)
* BeginPenMargin: draw. (line 42)
-* BeginPenMargin2: three. (line 619)
-* BeginPenMargin3: three. (line 619)
+* BeginPenMargin2: three. (line 622)
+* BeginPenMargin3: three. (line 622)
* BeginPoint: label. (line 55)
* Bessel: Mathematical functions.
(line 48)
* bevel: flowchart. (line 72)
* beveljoin: Pens. (line 149)
* Bezier curves: Bezier curves. (line 6)
-* Bezier patch: three. (line 116)
-* Bezier triangle: three. (line 116)
-* bezulate: three. (line 134)
+* Bezier patch: three. (line 118)
+* Bezier triangle: three. (line 118)
+* bezulate: three. (line 136)
* Bi: Mathematical functions.
(line 48)
-* Billboard: three. (line 507)
-* binary: Files. (line 76)
-* binary format: Files. (line 76)
+* Billboard: three. (line 510)
+* binary: Files. (line 80)
+* binary format: Files. (line 80)
* binary operators: Arithmetic & logical.
(line 6)
* binarytree: binarytree. (line 6)
* Bi_deriv: Mathematical functions.
(line 48)
-* black stripes: three. (line 251)
+* black stripes: three. (line 254)
* Blank: draw. (line 26)
* block.bottom: flowchart. (line 19)
* block.bottomleft: flowchart. (line 19)
@@ -8912,7 +8963,7 @@ Index
(line 6)
* Bottom: graph. (line 132)
* BottomTop: graph. (line 138)
-* BottomView: three. (line 423)
+* BottomView: three. (line 426)
* bounding box: Frames and pictures.
(line 180)
* Bounds: graph3. (line 21)
@@ -8920,14 +8971,14 @@ Index
(line 25)
* box <1>: Frames and pictures.
(line 130)
-* box <2>: three. (line 342)
-* box <3>: three. (line 344)
+* box <2>: three. (line 345)
+* box <3>: three. (line 347)
* bp: Drawing in batch mode.
(line 23)
* brace: Paths and guides. (line 51)
* break: Programming. (line 48)
* breakpoints: Debugger. (line 21)
-* brick: Pens. (line 268)
+* brick: Pens. (line 285)
* broken axis: graph. (line 801)
* bug reports: Help. (line 19)
* buildcycle: Paths and guides. (line 270)
@@ -8935,33 +8986,35 @@ Index
* Button-2: GUI. (line 6)
* BWRainbow: palette. (line 15)
* BWRainbow2: palette. (line 18)
-* C string: Data types. (line 216)
+* C string: Data types. (line 217)
* CAD: CAD. (line 6)
* calculateTransform: Frames and pictures.
(line 118)
-* camera: three. (line 389)
+* camera: three. (line 392)
* casts: Casts. (line 6)
* cbrt: Mathematical functions.
(line 6)
-* cd: Files. (line 25)
+* cd: Files. (line 26)
* ceil: Mathematical functions.
(line 26)
* Center: label. (line 60)
-* center: three. (line 372)
-* checker: Pens. (line 268)
-* Chinese: unicode. (line 12)
+* center: three. (line 375)
+* checker: Pens. (line 285)
+* Chinese: Pens. (line 244)
* choose: Mathematical functions.
(line 39)
* Ci: Mathematical functions.
(line 48)
* circle: Paths and guides. (line 10)
* Circle: Paths and guides. (line 18)
-* circle <1>: three. (line 316)
+* circle <1>: three. (line 319)
* circle <2>: flowchart. (line 61)
* circlebarframe: markers. (line 18)
-* CJK: unicode. (line 12)
+* CJK: Pens. (line 244)
* clamped: graph. (line 36)
-* clear: Files. (line 93)
+* clang: Compiling from UNIX source.
+ (line 48)
+* clear: Files. (line 97)
* clear <1>: Debugger. (line 23)
* clip: clip. (line 6)
* CLZ: Arithmetic & logical.
@@ -8969,34 +9022,34 @@ Index
* cm: Figure size. (line 18)
* cmd: Configuring. (line 35)
* cmyk: Pens. (line 38)
-* colatitude: Data types. (line 158)
+* colatitude: Data types. (line 159)
* color: Pens. (line 23)
* coloredNodes: tube. (line 25)
* coloredpath: tube. (line 18)
* coloredSegments: tube. (line 25)
* colorless: Pens. (line 57)
* colors: Pens. (line 54)
-* comma: Files. (line 61)
-* comma-separated-value mode: Arrays. (line 365)
-* command-line options: Configuring. (line 89)
+* comma: Files. (line 65)
+* comma-separated-value mode: Arrays. (line 370)
+* command-line options: Configuring. (line 91)
* command-line options <1>: Options. (line 6)
* comment character: Files. (line 16)
* compass directions: Labels. (line 18)
* Compiling from UNIX source: Compiling from UNIX source.
(line 6)
-* complement: Arrays. (line 140)
-* concat: Arrays. (line 170)
+* complement: Arrays. (line 145)
+* concat: Arrays. (line 175)
* conditional: Programming. (line 26)
* conditional <1>: Arithmetic & logical.
(line 61)
-* config: Configuring. (line 72)
-* config <1>: Options. (line 126)
+* config: Configuring. (line 74)
+* config <1>: Options. (line 128)
* configuration file: Configuring. (line 20)
-* configuration file <1>: Options. (line 126)
+* configuration file <1>: Options. (line 128)
* configuring: Configuring. (line 6)
* conj: Data types. (line 62)
* constructors: Structures. (line 91)
-* context: Options. (line 155)
+* context: Options. (line 157)
* continue: Programming. (line 48)
* continue <1>: Debugger. (line 31)
* contour: contour. (line 6)
@@ -9004,13 +9057,13 @@ Index
* controls: Bezier curves. (line 45)
* controls <1>: three. (line 6)
* controlSpecifier: Paths and guides. (line 396)
-* convert: Configuring. (line 72)
-* convert <1>: Files. (line 155)
+* convert: Configuring. (line 74)
+* convert <1>: Files. (line 159)
* convert <2>: animation. (line 6)
-* convert <3>: Options. (line 155)
-* convertOptions: Options. (line 141)
-* Coons shading: fill. (line 77)
-* copy: Arrays. (line 167)
+* convert <3>: Options. (line 157)
+* convertOptions: Options. (line 143)
+* Coons shading: fill. (line 78)
+* copy: Arrays. (line 172)
* cos: Mathematical functions.
(line 6)
* Cos: Mathematical functions.
@@ -9021,20 +9074,20 @@ Index
* crop: graph. (line 639)
* cropping graphs: graph. (line 639)
* cross: Data types. (line 106)
-* cross <1>: Data types. (line 196)
+* cross <1>: Data types. (line 197)
* cross <2>: graph. (line 480)
* crossframe: markers. (line 22)
-* crosshatch: Pens. (line 285)
-* csv: Arrays. (line 365)
+* crosshatch: Pens. (line 302)
+* csv: Arrays. (line 370)
* CTZ: Arithmetic & logical.
(line 68)
-* cubicroots: Arrays. (line 322)
+* cubicroots: Arrays. (line 327)
* curl: Bezier curves. (line 66)
* curl <1>: three. (line 6)
* curlSpecifier: Paths and guides. (line 408)
* currentlight: three. (line 76)
* currentpen: Pens. (line 6)
-* currentprojection: three. (line 420)
+* currentprojection: three. (line 423)
* curve: slopefield. (line 20)
* custom axis types: graph. (line 141)
* custom mark routine: graph. (line 577)
@@ -9046,12 +9099,12 @@ Index
* cyclic: Paths and guides. (line 85)
* cyclic <1>: Paths and guides. (line 376)
* cyclic <2>: Arrays. (line 39)
-* cyclic <3>: three. (line 537)
-* Cyrillic: unicode. (line 7)
+* cyclic <3>: three. (line 540)
+* Cyrillic: Pens. (line 237)
* dashdotted: Pens. (line 102)
* dashed: Pens. (line 102)
* data types: Data types. (line 6)
-* date: Data types. (line 320)
+* date: Data types. (line 321)
* Debian: UNIX binary distributions.
(line 19)
* debugger: Debugger. (line 6)
@@ -9060,14 +9113,14 @@ Index
* default arguments: Default arguments. (line 6)
* defaultformat: graph. (line 175)
* DefaultHead: draw. (line 26)
-* DefaultHead3: three. (line 603)
+* DefaultHead3: three. (line 606)
* defaultpen: Pens. (line 49)
* defaultpen <1>: Pens. (line 122)
* defaultpen <2>: Pens. (line 127)
* defaultpen <3>: Pens. (line 139)
* defaultpen <4>: Pens. (line 192)
-* defaultpen <5>: Pens. (line 346)
-* defaultpen <6>: Pens. (line 370)
+* defaultpen <5>: Pens. (line 363)
+* defaultpen <6>: Pens. (line 387)
* defaultrender: three. (line 46)
* deferred drawing: simplex. (line 6)
* degrees: Data types. (line 78)
@@ -9075,54 +9128,55 @@ Index
(line 17)
* Degrees: Mathematical functions.
(line 17)
-* delete: Files. (line 150)
+* delete: Files. (line 154)
* delete <1>: Arrays. (line 39)
* description: Description. (line 6)
-* diagonal: Arrays. (line 307)
+* devicepixelratio: three. (line 174)
+* diagonal: Arrays. (line 312)
* diamond: flowchart. (line 54)
* diffuse: three. (line 76)
* diffusepen: three. (line 66)
-* dimension: Arrays. (line 370)
+* dimension: Arrays. (line 375)
* dir: Search paths. (line 9)
* dir <1>: Data types. (line 90)
-* dir <2>: Data types. (line 180)
+* dir <2>: Data types. (line 181)
* dir <3>: Paths and guides. (line 109)
-* dir <4>: three. (line 537)
+* dir <4>: three. (line 540)
* direction specifier: Bezier curves. (line 6)
-* directory: Files. (line 25)
+* directory: Files. (line 26)
* dirSpecifier: Paths and guides. (line 390)
* dirtime: Paths and guides. (line 166)
* display: Configuring. (line 20)
* do: Programming. (line 48)
-* DOSendl: Files. (line 61)
-* DOSnewl: Files. (line 61)
-* dot: draw. (line 82)
+* DOSendl: Files. (line 65)
+* DOSnewl: Files. (line 65)
+* dot: draw. (line 83)
* dot <1>: Data types. (line 103)
-* dot <2>: Data types. (line 193)
-* dot <3>: Arrays. (line 262)
-* dot <4>: Arrays. (line 265)
+* dot <2>: Data types. (line 194)
+* dot <3>: Arrays. (line 267)
+* dot <4>: Arrays. (line 270)
* DotMargin: draw. (line 42)
-* DotMargin3: three. (line 619)
+* DotMargin3: three. (line 622)
* DotMargins: draw. (line 42)
-* DotMargins3: three. (line 619)
+* DotMargins3: three. (line 622)
* dotted: Pens. (line 102)
-* double deferred drawing: three. (line 294)
-* double precision: Files. (line 76)
-* draw: Drawing commands. (line 31)
+* double deferred drawing: three. (line 297)
+* double precision: Files. (line 80)
+* draw: Drawing commands. (line 34)
* draw <1>: draw. (line 6)
* Draw: draw. (line 26)
-* draw <2>: draw. (line 112)
+* draw <2>: draw. (line 113)
* Draw <1>: Frames and pictures.
(line 160)
-* draw <3>: three. (line 142)
+* draw <3>: three. (line 144)
* drawing commands: Drawing commands. (line 6)
* drawline: math. (line 9)
* drawtree: drawtree. (line 6)
-* dvips: Configuring. (line 72)
-* dvipsOptions: Options. (line 141)
-* dvisvgm: Configuring. (line 72)
-* dvisvgm <1>: Options. (line 160)
-* dvisvgmOptions: Options. (line 141)
+* dvips: Configuring. (line 74)
+* dvipsOptions: Options. (line 143)
+* dvisvgm: Configuring. (line 74)
+* dvisvgm <1>: Options. (line 162)
+* dvisvgmOptions: Options. (line 143)
* E: Labels. (line 18)
* E <1>: Mathematical functions.
(line 48)
@@ -9137,37 +9191,37 @@ Index
* else: Programming. (line 26)
* emacs: Editing modes. (line 6)
* embed: embed. (line 6)
-* Embedded: three. (line 507)
+* Embedded: three. (line 510)
* emissivepen: three. (line 66)
* empty: Frames and pictures.
(line 7)
* EndArcArrow: draw. (line 26)
-* EndArcArrow3: three. (line 603)
+* EndArcArrow3: three. (line 606)
* EndArrow: draw. (line 26)
-* EndArrow3: three. (line 603)
+* EndArrow3: three. (line 606)
* EndBar: draw. (line 19)
-* EndBar3: three. (line 603)
+* EndBar3: three. (line 606)
* EndDotMargin: draw. (line 42)
-* EndDotMargin3: three. (line 619)
-* endl: Files. (line 61)
+* EndDotMargin3: three. (line 622)
+* endl: Files. (line 65)
* EndMargin: draw. (line 42)
-* EndMargin3: three. (line 619)
+* EndMargin3: three. (line 622)
* EndPenMargin: draw. (line 42)
-* EndPenMargin2: three. (line 619)
-* EndPenMargin3: three. (line 619)
+* EndPenMargin2: three. (line 622)
+* EndPenMargin3: three. (line 622)
* EndPoint: label. (line 55)
* envelope: Frames and pictures.
(line 25)
-* environment variables: Configuring. (line 93)
-* eof: Files. (line 93)
-* eof <1>: Arrays. (line 347)
-* eol: Files. (line 93)
-* eol <1>: Arrays. (line 347)
+* environment variables: Configuring. (line 95)
+* eof: Files. (line 97)
+* eof <1>: Arrays. (line 352)
+* eol: Files. (line 97)
+* eol <1>: Arrays. (line 352)
* EPS: label. (line 78)
-* EPS <1>: Options. (line 155)
+* EPS <1>: Options. (line 157)
* erase: Drawing in interactive mode.
(line 11)
-* erase <1>: Data types. (line 256)
+* erase <1>: Data types. (line 257)
* erase <2>: Frames and pictures.
(line 7)
* erase <3>: Frames and pictures.
@@ -9177,20 +9231,20 @@ Index
* erfc: Mathematical functions.
(line 6)
* error: Files. (line 16)
-* error <1>: Files. (line 93)
+* error <1>: Files. (line 97)
* error bars: graph. (line 531)
* errorbars: graph. (line 480)
-* eval: Import. (line 97)
-* eval <1>: Import. (line 107)
+* eval: Import. (line 102)
+* eval <1>: Import. (line 112)
* evenodd: Paths. (line 37)
* evenodd <1>: Pens. (line 164)
-* exit: Data types. (line 372)
+* exit: Data types. (line 373)
* exit <1>: Interactive mode. (line 54)
* exit <2>: Debugger. (line 56)
* exp: Mathematical functions.
(line 6)
* expi: Data types. (line 86)
-* expi <1>: Data types. (line 176)
+* expi <1>: Data types. (line 177)
* explicit: Casts. (line 6)
* explicit casts: Casts. (line 21)
* expm1: Mathematical functions.
@@ -9201,26 +9255,26 @@ Index
* extension: Paths and guides. (line 246)
* extension <1>: MetaPost. (line 10)
* external: embed. (line 11)
-* extrude: three. (line 531)
+* extrude: three. (line 534)
* F: Mathematical functions.
(line 48)
* fabs: Mathematical functions.
(line 6)
-* face: three. (line 644)
+* face: three. (line 646)
* factorial: Mathematical functions.
(line 39)
* Fedora: UNIX binary distributions.
(line 15)
* feynman: feynman. (line 6)
-* fft: Arrays. (line 240)
-* fft <1>: Arrays. (line 254)
-* fft <2>: Arrays. (line 258)
+* fft: Arrays. (line 245)
+* fft <1>: Arrays. (line 259)
+* fft <2>: Arrays. (line 263)
* FFTW: Compiling from UNIX source.
- (line 63)
+ (line 62)
* file: Files. (line 6)
* file <1>: Debugger. (line 44)
* Fill: draw. (line 26)
-* fill: draw. (line 117)
+* fill: draw. (line 118)
* fill <1>: fill. (line 6)
* fill <2>: fill. (line 17)
* Fill <1>: Frames and pictures.
@@ -9231,83 +9285,87 @@ Index
(line 136)
* filloutside: fill. (line 27)
* fillrule: Pens. (line 164)
-* find: Data types. (line 241)
-* find <1>: Arrays. (line 149)
-* findall: Arrays. (line 154)
+* find: Data types. (line 242)
+* find <1>: Arrays. (line 154)
+* findall: Arrays. (line 159)
* firstcut: Paths and guides. (line 262)
* fit: Frames and pictures.
(line 113)
-* fit3: three. (line 307)
+* fit3: three. (line 310)
* fixedscaling: Frames and pictures.
(line 81)
* floor: Mathematical functions.
(line 26)
* flowchart: flowchart. (line 6)
-* flush: Files. (line 61)
-* flush <1>: Files. (line 93)
+* flush: Files. (line 65)
+* flush <1>: Files. (line 97)
* fmod: Mathematical functions.
(line 6)
* font: Pens. (line 206)
-* font command: Pens. (line 206)
-* fontcommand: Pens. (line 221)
+* font <1>: Pens. (line 206)
+* font <2>: Pens. (line 235)
+* font encoding: Pens. (line 235)
+* fontcommand: Pens. (line 219)
* fontsize: Pens. (line 192)
* for: Programming. (line 26)
-* format: Data types. (line 289)
-* format <1>: Options. (line 155)
+* format: Data types. (line 290)
+* format <1>: Options. (line 157)
* forum: Help. (line 6)
* frame: Frames and pictures.
(line 7)
* freshnel0: three. (line 66)
* from: Import. (line 16)
-* FrontView: three. (line 423)
+* FrontView: three. (line 426)
* function declarations: Functions. (line 79)
-* Function shading: fill. (line 99)
-* function shading: fill. (line 99)
+* Function shading: fill. (line 100)
+* function shading: fill. (line 100)
* functions: Functions. (line 6)
* functions <1>: Mathematical functions.
(line 6)
-* functionshade: fill. (line 99)
+* functionshade: fill. (line 100)
* gamma: Mathematical functions.
(line 6)
* Gaussrand: Mathematical functions.
(line 39)
* geometry: geometry. (line 6)
-* getc: Files. (line 30)
-* getpair: Files. (line 118)
-* getreal: Files. (line 118)
-* getstring: Files. (line 118)
-* gettriple: Files. (line 118)
+* getc: Files. (line 32)
+* getpair: Files. (line 122)
+* getreal: Files. (line 122)
+* getstring: Files. (line 122)
+* gettriple: Files. (line 122)
* git: Git. (line 6)
-* glOptions: three. (line 251)
-* glOptions <1>: Options. (line 141)
+* globalwrite: Files. (line 40)
+* globalwrite <1>: Files. (line 154)
+* glOptions: three. (line 254)
+* glOptions <1>: Options. (line 143)
* GNU Scientific Library: Mathematical functions.
(line 48)
-* gouraudshade: fill. (line 62)
+* gouraudshade: fill. (line 63)
* Gradient: palette. (line 25)
* gradient shading: fill. (line 32)
* graph: graph. (line 6)
* graph3: graph3. (line 6)
* graphic: label. (line 78)
-* graphic <1>: Options. (line 160)
+* graphic <1>: Options. (line 162)
* graphical user interface: GUI. (line 6)
* gray: Pens. (line 25)
* grayscale: Pens. (line 25)
* Grayscale: palette. (line 9)
-* grid: Pens. (line 268)
+* grid: Pens. (line 285)
* grid <1>: graph. (line 746)
* grid3: grid3. (line 6)
* gs: Configuring. (line 20)
* GSL: Compiling from UNIX source.
- (line 63)
+ (line 62)
* gsl: Mathematical functions.
(line 48)
-* gsOptions: Options. (line 141)
+* gsOptions: Options. (line 143)
* GUI: GUI. (line 6)
* GUI installation: GUI installation. (line 6)
* GUI usage: GUI usage. (line 6)
* guide: Paths and guides. (line 314)
* guide3: three. (line 6)
-* hatch: Pens. (line 285)
+* hatch: Pens. (line 302)
* Headlamp: three. (line 76)
* height: LaTeX usage. (line 50)
* help: Interactive mode. (line 42)
@@ -9315,42 +9373,42 @@ Index
* help <2>: Debugger. (line 30)
* Hermite: graph. (line 36)
* Hermite(splinetype splinetype: graph. (line 36)
-* hex: Data types. (line 305)
+* hex: Data types. (line 306)
* hex <1>: Pens. (line 64)
-* hexadecimal: Data types. (line 305)
+* hexadecimal: Data types. (line 306)
* hexadecimal <1>: Pens. (line 62)
-* hidden surface removal: three. (line 644)
+* hidden surface removal: three. (line 646)
* histogram: Mathematical functions.
(line 39)
-* history: Files. (line 143)
+* history: Files. (line 147)
* history <1>: Interactive mode. (line 54)
* historylines: Interactive mode. (line 57)
* HookHead: draw. (line 26)
-* HookHead3: three. (line 603)
+* HookHead3: three. (line 606)
* Horizontal: flowchart. (line 77)
-* HTML5: three. (line 220)
+* HTML5: three. (line 223)
* htmlviewer: Configuring. (line 20)
* htmlviewer <1>: Configuring. (line 43)
-* htmlviewerOptions: Options. (line 141)
-* hyperrefOptions: Options. (line 141)
+* htmlviewerOptions: Options. (line 143)
+* hyperrefOptions: Options. (line 143)
* hypot: Mathematical functions.
(line 6)
* I: Mathematical functions.
(line 48)
-* iconify: three. (line 251)
+* iconify: three. (line 254)
* identity: Transforms. (line 24)
* identity <1>: Mathematical functions.
(line 6)
-* identity <2>: Arrays. (line 304)
-* identity4: three. (line 475)
+* identity <2>: Arrays. (line 309)
+* identity4: three. (line 478)
* if: Programming. (line 26)
* IgnoreAspect: Frames and pictures.
(line 63)
* image: palette. (line 33)
* image <1>: palette. (line 58)
-* ImageMagick: Configuring. (line 72)
+* ImageMagick: Configuring. (line 74)
* ImageMagick <1>: animation. (line 6)
-* ImageMagick <2>: Options. (line 155)
+* ImageMagick <2>: Options. (line 157)
* images: palette. (line 6)
* implicit casts: Casts. (line 6)
* implicit linear solver: MetaPost. (line 10)
@@ -9359,11 +9417,11 @@ Index
* import: Import. (line 45)
* inches: Figure size. (line 18)
* incircle: Data types. (line 120)
-* include: Import. (line 126)
+* include: Import. (line 134)
* including images: label. (line 78)
* increasing: math. (line 55)
* inf: Data types. (line 35)
-* inheritance: Structures. (line 181)
+* inheritance: Structures. (line 182)
* initialized: Arrays. (line 39)
* initializers: Variable initializers.
(line 6)
@@ -9373,12 +9431,13 @@ Index
* input <1>: Files. (line 12)
* input <2>: Interactive mode. (line 45)
* input <3>: Interactive mode. (line 49)
-* insert: Data types. (line 252)
+* input encoding: Pens. (line 235)
+* insert: Data types. (line 253)
* insert <1>: Arrays. (line 39)
* inside: Paths and guides. (line 294)
* inside <1>: Paths and guides. (line 299)
* inside <2>: Paths and guides. (line 305)
-* insphere: three. (line 566)
+* insphere: three. (line 569)
* inst: Debugger. (line 35)
* installation: Installation. (line 6)
* int: Data types. (line 30)
@@ -9392,29 +9451,28 @@ Index
(line 6)
* interactive mode <1>: Interactive mode. (line 6)
* interior: Paths and guides. (line 290)
-* international characters: unicode. (line 6)
* interp: Arithmetic & logical.
(line 64)
* interpolate: interpolate. (line 6)
* intersect: Paths and guides. (line 195)
* intersect <1>: math. (line 13)
-* intersect <2>: three. (line 537)
+* intersect <2>: three. (line 540)
* intersectionpoint: Paths and guides. (line 238)
* intersectionpoint <1>: math. (line 17)
-* intersectionpoint <2>: three. (line 537)
+* intersectionpoint <2>: three. (line 540)
* intersectionpoints: Paths and guides. (line 242)
-* intersectionpoints <1>: three. (line 537)
-* intersectionpoints <2>: three. (line 550)
+* intersectionpoints <1>: three. (line 540)
+* intersectionpoints <2>: three. (line 553)
* intersections: Paths and guides. (line 206)
* intersections <1>: Paths and guides. (line 213)
-* intersections <2>: three. (line 537)
-* intersections <3>: three. (line 543)
+* intersections <2>: three. (line 540)
+* intersections <3>: three. (line 546)
* InTicks: graph3. (line 35)
* intMax: Data types. (line 30)
* intMin: Data types. (line 30)
* inverse: Transforms. (line 16)
-* inverse <1>: Arrays. (line 310)
-* invert: three. (line 465)
+* inverse <1>: Arrays. (line 315)
+* invert: three. (line 468)
* invisible: Pens. (line 43)
* isnan: Data types. (line 35)
* i_scaled: Mathematical functions.
@@ -9423,7 +9481,7 @@ Index
(line 6)
* J <1>: Mathematical functions.
(line 48)
-* Japanese: unicode. (line 12)
+* Japanese: Pens. (line 244)
* K: Mathematical functions.
(line 48)
* Kate: Editing modes. (line 48)
@@ -9433,34 +9491,34 @@ Index
* keepAspect <1>: Frames and pictures.
(line 63)
* keepAspect <2>: LaTeX usage. (line 50)
-* keyboard bindings:: three. (line 198)
+* keyboard bindings:: three. (line 201)
* keys: Arrays. (line 39)
* keyword: Named arguments. (line 37)
* keyword-only: Named arguments. (line 37)
* keywords: Named arguments. (line 6)
-* Korean: unicode. (line 12)
+* Korean: Pens. (line 244)
* k_scaled: Mathematical functions.
(line 48)
* label: Labels. (line 6)
-* Label: draw. (line 100)
+* Label: draw. (line 101)
* label <1>: label. (line 6)
* Label <1>: label. (line 14)
* Label <2>: graph. (line 330)
-* label <2>: three. (line 501)
+* label <2>: three. (line 504)
* labelpath: labelpath. (line 6)
* labelpath3: labelpath3. (line 6)
* labelx: graph. (line 330)
* labely: graph. (line 330)
* Landscape: Frames and pictures.
(line 104)
+* language context: Pens. (line 235)
* lastcut: Paths and guides. (line 266)
* lasy-mode: Editing modes. (line 6)
-* latex: Options. (line 155)
-* LaTeX fonts: Pens. (line 206)
+* latex: Options. (line 157)
+* LaTeX NFSS fonts: Pens. (line 206)
* LaTeX usage: LaTeX usage. (line 6)
* latexmk: LaTeX usage. (line 30)
-* latin1: latin1. (line 6)
-* latitude: Data types. (line 163)
+* latitude: Data types. (line 164)
* latticeshade: fill. (line 32)
* layer: Drawing commands. (line 16)
* leastsquares: stats. (line 6)
@@ -9470,39 +9528,40 @@ Index
* LeftSide: label. (line 60)
* LeftTicks: graph. (line 160)
* LeftTicks <1>: graph. (line 233)
-* LeftView: three. (line 423)
-* legend: Drawing commands. (line 31)
-* legend <1>: draw. (line 64)
+* LeftView: three. (line 426)
+* legend: Drawing commands. (line 34)
+* legend <1>: draw. (line 65)
* legend <2>: graph. (line 424)
* Legendre: Mathematical functions.
(line 48)
* length: Data types. (line 65)
* length <1>: Data types. (line 144)
-* length <2>: Data types. (line 238)
+* length <2>: Data types. (line 239)
* length <3>: Paths and guides. (line 76)
* length <4>: Paths and guides. (line 373)
* length <5>: Arrays. (line 39)
-* length <6>: three. (line 537)
-* letter: Configuring. (line 66)
+* length <6>: three. (line 540)
+* letter: Configuring. (line 68)
* lexorder: math. (line 63)
* lexorder <1>: math. (line 66)
-* libgs: Options. (line 160)
+* libcurl: Import. (line 94)
+* libgs: Options. (line 162)
* libm routines: Mathematical functions.
(line 6)
* libsigsegv: Functions. (line 100)
* libsigsegv <1>: Help. (line 27)
* light: three. (line 76)
* limits: graph. (line 639)
-* line: Arrays. (line 347)
-* line <1>: Arrays. (line 351)
-* line mode: Arrays. (line 347)
+* line: Arrays. (line 352)
+* line <1>: Arrays. (line 356)
+* line mode: Arrays. (line 352)
* Linear: graph. (line 690)
* linecap: Pens. (line 139)
* linejoin: Pens. (line 149)
* lineskip: Pens. (line 192)
* linetype: Pens. (line 123)
* linewidth: Pens. (line 127)
-* locale: Data types. (line 315)
+* locale: Data types. (line 316)
* log: Mathematical functions.
(line 6)
* Log: graph. (line 690)
@@ -9517,21 +9576,25 @@ Index
(line 6)
* longdashdotted: Pens. (line 102)
* longdashed: Pens. (line 102)
-* longitude: Data types. (line 168)
+* longitude: Data types. (line 169)
* loop: Programming. (line 26)
-* lualatex: Options. (line 155)
-* luatex: Options. (line 155)
+* lualatex: Options. (line 157)
+* luatex: Options. (line 157)
* MacOS X binary distributions: MacOS X binary distributions.
(line 6)
-* makepen: Pens. (line 321)
+* MacOS X configuration: Compiling from UNIX source.
+ (line 48)
+* makepen: Pens. (line 338)
* map: Arrays. (line 131)
+* map <1>: Arrays. (line 136)
+* map <2>: map. (line 6)
* Margin: draw. (line 42)
* Margin <1>: draw. (line 42)
-* Margin3: three. (line 619)
-* Margin3 <1>: three. (line 619)
+* Margin3: three. (line 622)
+* Margin3 <1>: three. (line 622)
* Margins: draw. (line 42)
-* margins: three. (line 300)
-* Margins3: three. (line 619)
+* margins: three. (line 303)
+* Margins3: three. (line 622)
* mark: graph. (line 480)
* markangle: markers. (line 35)
* marker: graph. (line 480)
@@ -9546,14 +9609,14 @@ Index
* max: Paths and guides. (line 279)
* max <1>: Frames and pictures.
(line 7)
-* max <2>: Arrays. (line 221)
-* max <3>: Arrays. (line 231)
-* max <4>: three. (line 537)
+* max <2>: Arrays. (line 226)
+* max <3>: Arrays. (line 236)
+* max <4>: three. (line 540)
* maxbound: Data types. (line 134)
-* maxbound <1>: Data types. (line 204)
-* maxtile: three. (line 251)
+* maxbound <1>: Data types. (line 205)
+* maxtile: three. (line 254)
* maxtimes: Paths and guides. (line 233)
-* maxviewport: three. (line 251)
+* maxviewport: three. (line 254)
* metallic: three. (line 66)
* MetaPost: MetaPost. (line 6)
* MetaPost ... : Bezier curves. (line 70)
@@ -9563,37 +9626,37 @@ Index
* MetaPost whatever: MetaPost. (line 10)
* Microsoft Windows: Microsoft Windows. (line 6)
* MidArcArrow: draw. (line 26)
-* MidArcArrow3: three. (line 603)
+* MidArcArrow3: three. (line 606)
* MidArrow: draw. (line 26)
-* MidArrow3: three. (line 603)
+* MidArrow3: three. (line 606)
* MidPoint: label. (line 55)
* midpoint: Paths and guides. (line 180)
* min: Paths and guides. (line 275)
* min <1>: Frames and pictures.
(line 7)
-* min <2>: Arrays. (line 216)
-* min <3>: Arrays. (line 226)
-* min <4>: three. (line 537)
+* min <2>: Arrays. (line 221)
+* min <3>: Arrays. (line 231)
+* min <4>: three. (line 540)
* minbound: Data types. (line 131)
-* minbound <1>: Data types. (line 201)
+* minbound <1>: Data types. (line 202)
* minipage: label. (line 116)
* mintimes: Paths and guides. (line 228)
* miterjoin: Pens. (line 149)
* miterlimit: Pens. (line 159)
-* mktemp: Files. (line 44)
+* mktemp: Files. (line 48)
* mm: Figure size. (line 18)
-* mobile browser: three. (line 220)
-* mode: Files. (line 76)
-* mode <1>: Files. (line 89)
+* mobile browser: three. (line 223)
+* mode: Files. (line 80)
+* mode <1>: Files. (line 93)
* monotonic: graph. (line 36)
* mouse: GUI. (line 6)
-* mouse bindings: three. (line 179)
+* mouse bindings: three. (line 182)
* mouse wheel: GUI usage. (line 6)
-* Move: Pens. (line 358)
-* MoveQuiet: Pens. (line 364)
-* multisample: three. (line 172)
+* Move: Pens. (line 375)
+* MoveQuiet: Pens. (line 381)
+* multisample: three. (line 174)
* N: Labels. (line 18)
-* name: Files. (line 89)
+* name: Files. (line 93)
* named arguments: Named arguments. (line 6)
* nan: Data types. (line 35)
* natural: graph. (line 36)
@@ -9602,25 +9665,27 @@ Index
* new <2>: Arrays. (line 103)
* newframe: Frames and pictures.
(line 7)
-* newl: Files. (line 61)
+* newl: Files. (line 65)
+* newpage: Drawing commands. (line 27)
* newton: Mathematical functions.
(line 66)
* newton <1>: Mathematical functions.
(line 73)
* next: Debugger. (line 41)
-* NFSS: Pens. (line 206)
* nobasealign: Pens. (line 181)
* NoFill: draw. (line 26)
* NoFill <1>: Frames and pictures.
(line 154)
+* noglobalread: Files. (line 26)
+* noglobalread <1>: Files. (line 40)
* nolight: three. (line 76)
* NoMargin: draw. (line 42)
-* NoMargin3: three. (line 619)
+* NoMargin3: three. (line 622)
* None: draw. (line 19)
* None <1>: draw. (line 26)
-* none: Files. (line 61)
-* normal: three. (line 523)
-* nosafe: Options. (line 181)
+* none: Files. (line 65)
+* normal: three. (line 526)
+* nosafe: Options. (line 182)
* NOT: Arithmetic & logical.
(line 68)
* notaknot: graph. (line 36)
@@ -9632,26 +9697,26 @@ Index
(line 140)
* nullpen <2>: Frames and pictures.
(line 149)
-* NURBS: three. (line 399)
-* O: three. (line 312)
+* NURBS: three. (line 402)
+* O: three. (line 315)
* obj: obj. (line 6)
-* oblique: three. (line 355)
-* obliqueX: three. (line 362)
-* obliqueY: three. (line 368)
-* obliqueZ: three. (line 355)
+* oblique: three. (line 358)
+* obliqueX: three. (line 365)
+* obliqueY: three. (line 371)
+* obliqueZ: three. (line 358)
* ode: ode. (line 6)
* offset: Pens. (line 123)
-* offset <1>: Options. (line 186)
+* offset <1>: Options. (line 187)
* OmitTick: graph. (line 223)
* OmitTickInterval: graph. (line 223)
* OmitTickIntervals: graph. (line 223)
-* opacity: Pens. (line 237)
+* opacity: Pens. (line 254)
* opacity <1>: three. (line 66)
* open: Files. (line 12)
-* OpenGL: three. (line 172)
+* OpenGL: three. (line 174)
* operator: User-defined operators.
(line 6)
-* operator +(...string[] a).: Data types. (line 283)
+* operator +(...string[] a).: Data types. (line 284)
* operator --: graph. (line 30)
* operator ..: graph. (line 33)
* operator answer: Interactive mode. (line 35)
@@ -9665,18 +9730,18 @@ Index
* OR: Arithmetic & logical.
(line 68)
* orient: Data types. (line 108)
-* orient <1>: three. (line 554)
+* orient <1>: three. (line 557)
* orientation: Frames and pictures.
(line 104)
-* orthographic: three. (line 372)
-* outformat: three. (line 172)
+* orthographic: three. (line 375)
+* outformat: three. (line 174)
* outprefix: Frames and pictures.
(line 91)
-* output: Files. (line 36)
-* output <1>: Options. (line 155)
+* output: Files. (line 38)
+* output <1>: Options. (line 157)
* OutTicks: graph3. (line 35)
* overloading functions: Functions. (line 55)
-* overwrite: Pens. (line 343)
+* overwrite: Pens. (line 360)
* P: Mathematical functions.
(line 48)
* pack: label. (line 100)
@@ -9685,16 +9750,16 @@ Index
(line 186)
* pair: Figure size. (line 6)
* pair <1>: Data types. (line 46)
-* pairs: Arrays. (line 236)
-* paperheight: Configuring. (line 66)
-* papertype: Configuring. (line 66)
-* paperwidth: Configuring. (line 66)
+* pairs: Arrays. (line 241)
+* paperheight: Configuring. (line 68)
+* papertype: Configuring. (line 68)
+* paperwidth: Configuring. (line 68)
* parallelogram: flowchart. (line 47)
* parametric surface: graph3. (line 99)
* parametrized curve: graph. (line 639)
* partialsum: math. (line 49)
* partialsum <1>: math. (line 52)
-* patch-dependent colors: three. (line 107)
+* patch-dependent colors: three. (line 109)
* path: Paths. (line 6)
* path <1>: Paths and guides. (line 7)
* path <2>: three. (line 42)
@@ -9703,62 +9768,63 @@ Index
* path3: three. (line 6)
* path3 <1>: three. (line 42)
* path[]: Paths. (line 23)
-* patterns: Pens. (line 254)
+* patterns: Pens. (line 271)
* patterns <1>: patterns. (line 6)
* PBR: three. (line 74)
-* PDF: Options. (line 155)
-* pdflatex: Options. (line 155)
-* pdfreloadOptions: Options. (line 141)
+* PDF: Options. (line 157)
+* pdflatex: Options. (line 157)
+* pdfreloadOptions: Options. (line 143)
* pdfviewer: Configuring. (line 20)
-* pdfviewerOptions: Options. (line 141)
+* pdfviewerOptions: Options. (line 143)
* pen: Pens. (line 6)
* PenMargin: draw. (line 42)
-* PenMargin2: three. (line 619)
-* PenMargin3: three. (line 619)
+* PenMargin2: three. (line 622)
+* PenMargin3: three. (line 622)
* PenMargins: draw. (line 42)
-* PenMargins2: three. (line 619)
-* PenMargins3: three. (line 619)
+* PenMargins2: three. (line 622)
+* PenMargins3: three. (line 622)
* periodic: graph. (line 36)
* perl: LaTeX usage. (line 30)
* perpendicular: geometry. (line 6)
-* perspective: three. (line 399)
+* perspective: three. (line 402)
* physically based rendering: three. (line 74)
* picture: Frames and pictures.
(line 39)
* picture alignment: Frames and pictures.
(line 231)
* piecewisestraight: Paths and guides. (line 92)
-* pixel: three. (line 626)
+* pixel: three. (line 629)
* Pl: Mathematical functions.
(line 48)
* plain: plain. (line 6)
-* planar: three. (line 116)
-* plane: three. (line 338)
-* planeproject: three. (line 520)
+* planar: three. (line 118)
+* plane: three. (line 341)
+* planeproject: three. (line 523)
* point: Paths and guides. (line 95)
* point <1>: Paths and guides. (line 379)
-* point <2>: three. (line 537)
-* polar: Data types. (line 148)
+* point <2>: three. (line 540)
+* polar: Data types. (line 149)
* polargraph: graph. (line 88)
* polygon: graph. (line 480)
* pop: Arrays. (line 39)
* Portrait: Frames and pictures.
(line 104)
* position: three. (line 76)
+* position <1>: three. (line 174)
* postcontrol: Paths and guides. (line 146)
-* postcontrol <1>: three. (line 537)
+* postcontrol <1>: three. (line 540)
* postfix operators: Self & prefix operators.
(line 19)
* postscript: Frames and pictures.
(line 297)
-* PostScript fonts: Pens. (line 224)
+* PostScript fonts: Pens. (line 222)
* PostScript subpath: Paths. (line 23)
* pow10: Mathematical functions.
(line 6)
-* prc: three. (line 269)
-* precision: Files. (line 93)
+* prc: three. (line 272)
+* precision: Files. (line 97)
* precontrol: Paths and guides. (line 139)
-* precontrol <1>: three. (line 537)
+* precontrol <1>: three. (line 540)
* prefix operators: Self & prefix operators.
(line 6)
* private: Structures. (line 6)
@@ -9766,23 +9832,23 @@ Index
* pstoedit: PostScript to Asymptote.
(line 6)
* psviewer: Configuring. (line 20)
-* psviewerOptions: Options. (line 141)
+* psviewerOptions: Options. (line 143)
* pt: Figure size. (line 18)
* public: Structures. (line 6)
* push: Arrays. (line 39)
* Python usage: Interactive mode. (line 72)
-* quadraticroots: Arrays. (line 313)
-* quadraticroots <1>: Arrays. (line 318)
+* quadraticroots: Arrays. (line 318)
+* quadraticroots <1>: Arrays. (line 323)
* quarticroots: math. (line 22)
-* quick reference: Description. (line 84)
+* quick reference: Description. (line 88)
* quit: Drawing in interactive mode.
(line 11)
* quit <1>: Interactive mode. (line 54)
* quit <2>: Debugger. (line 53)
-* quote: Import. (line 115)
+* quote: Import. (line 120)
* quotient: Arithmetic & logical.
(line 6)
-* radialshade: fill. (line 51)
+* radialshade: fill. (line 52)
* RadialShade: Frames and pictures.
(line 172)
* RadialShadeDraw: Frames and pictures.
@@ -9790,16 +9856,16 @@ Index
* radians: Mathematical functions.
(line 17)
* radius: Paths and guides. (line 135)
-* radius <1>: three. (line 537)
+* radius <1>: three. (line 540)
* Rainbow: palette. (line 12)
* rand: Mathematical functions.
(line 39)
* randMax: Mathematical functions.
(line 39)
-* read: Arrays. (line 387)
+* read: Arrays. (line 392)
* reading: Files. (line 12)
-* reading string arrays: Arrays. (line 357)
-* readline: Files. (line 135)
+* reading string arrays: Arrays. (line 362)
+* readline: Files. (line 139)
* real: Data types. (line 35)
* realDigits: Data types. (line 35)
* realEpsilon: Data types. (line 35)
@@ -9808,7 +9874,7 @@ Index
* realmult: Data types. (line 100)
* rectangle: flowchart. (line 34)
* recursion: Functions. (line 100)
-* reference: Description. (line 84)
+* reference: Description. (line 88)
* reflect: Transforms. (line 42)
* Relative: label. (line 50)
* Relative <1>: label. (line 60)
@@ -9816,24 +9882,24 @@ Index
* reltime: Paths and guides. (line 172)
* remainder: Mathematical functions.
(line 6)
-* rename: Files. (line 152)
+* rename: Files. (line 156)
* render: three. (line 46)
-* render <1>: three. (line 172)
-* render <2>: Options. (line 155)
-* replace: Data types. (line 269)
-* resetdefaultpen: Pens. (line 370)
+* render <1>: three. (line 174)
+* render <2>: Options. (line 157)
+* replace: Data types. (line 270)
+* resetdefaultpen: Pens. (line 387)
* rest arguments: Rest arguments. (line 6)
* restore: Frames and pictures.
(line 291)
* restricted: Structures. (line 6)
* return: Debugger. (line 47)
-* reverse: Data types. (line 265)
+* reverse: Data types. (line 266)
* reverse <1>: Paths and guides. (line 183)
* reverse <2>: Paths and guides. (line 382)
-* reverse <3>: Arrays. (line 136)
-* reverse <4>: three. (line 537)
-* rewind: Files. (line 93)
-* rfind: Data types. (line 246)
+* reverse <3>: Arrays. (line 141)
+* reverse <4>: three. (line 540)
+* rewind: Files. (line 97)
+* rfind: Data types. (line 247)
* rgb: Pens. (line 30)
* rgb <1>: Pens. (line 34)
* rgb <2>: Pens. (line 62)
@@ -9843,9 +9909,9 @@ Index
* RightSide: label. (line 60)
* RightTicks: graph. (line 160)
* RightTicks <1>: graph. (line 233)
-* RightView: three. (line 423)
+* RightView: three. (line 426)
* Rotate: label. (line 36)
-* rotate: three. (line 491)
+* rotate: three. (line 494)
* Rotate(pair z): label. (line 39)
* round: Mathematical functions.
(line 26)
@@ -9855,42 +9921,42 @@ Index
* roundrectangle: flowchart. (line 66)
* RPM: UNIX binary distributions.
(line 6)
-* runtime imports: Import. (line 97)
-* Russian: unicode. (line 7)
+* runtime imports: Import. (line 102)
+* Russian: Pens. (line 237)
* S: Labels. (line 18)
-* safe: Options. (line 181)
+* safe: Options. (line 182)
* save: Frames and pictures.
(line 288)
-* saveline: Files. (line 135)
+* saveline: Files. (line 139)
* Scale: label. (line 45)
* scale: Pens. (line 123)
* scale <1>: Transforms. (line 34)
* scale <2>: Transforms. (line 36)
* scale <3>: graph. (line 690)
* Scale <1>: graph. (line 707)
-* scale <4>: three. (line 490)
-* scale3: three. (line 488)
+* scale <4>: three. (line 493)
+* scale3: three. (line 491)
* scaled graph: graph. (line 670)
* scientific graph: graph. (line 387)
-* scroll: Files. (line 109)
-* search: Arrays. (line 157)
-* search <1>: Arrays. (line 163)
+* scroll: Files. (line 113)
+* search: Arrays. (line 162)
+* search <1>: Arrays. (line 168)
* search paths: Search paths. (line 6)
* Seascape: Frames and pictures.
(line 110)
* secondary axis: graph. (line 833)
* secondaryX: graph. (line 833)
* secondaryY: graph. (line 833)
-* seconds: Data types. (line 329)
-* seek: Files. (line 93)
-* seekeof: Files. (line 93)
+* seconds: Data types. (line 330)
+* seek: Files. (line 97)
+* seekeof: Files. (line 97)
* segment: math. (line 46)
* segmentation fault: Help. (line 27)
* self operators: Self & prefix operators.
(line 6)
* sequence: Arrays. (line 118)
* settings: Configuring. (line 20)
-* settings <1>: Options. (line 126)
+* settings <1>: Options. (line 128)
* sgn: Mathematical functions.
(line 26)
* shading: fill. (line 32)
@@ -9898,16 +9964,16 @@ Index
* shift: Transforms. (line 26)
* shift <1>: Transforms. (line 28)
* shift <2>: Transforms. (line 46)
-* shift <3>: three. (line 480)
+* shift <3>: three. (line 483)
* shiftless: Transforms. (line 46)
* shininess: three. (line 66)
* shipout: Frames and pictures.
(line 91)
-* showtarget: three. (line 372)
+* showtarget: three. (line 375)
* Si: Mathematical functions.
(line 48)
-* signedint: Files. (line 76)
-* signedint <1>: Files. (line 89)
+* signedint: Files. (line 80)
+* signedint <1>: Files. (line 93)
* SimpleHead: draw. (line 26)
* simplex: simplex. (line 6)
* simpson: Mathematical functions.
@@ -9916,16 +9982,16 @@ Index
(line 6)
* Sin: Mathematical functions.
(line 20)
-* single precision: Files. (line 76)
-* singleint: Files. (line 76)
-* singleint <1>: Files. (line 89)
-* singlereal: Files. (line 76)
-* singlereal <1>: Files. (line 89)
+* single precision: Files. (line 80)
+* singleint: Files. (line 80)
+* singleint <1>: Files. (line 93)
+* singlereal: Files. (line 80)
+* singlereal <1>: Files. (line 93)
* sinh: Mathematical functions.
(line 6)
-* SixViews: three. (line 438)
-* SixViewsFR: three. (line 438)
-* SixViewsUS: three. (line 438)
+* SixViews: three. (line 441)
+* SixViewsFR: three. (line 441)
+* SixViewsUS: three. (line 441)
* size: Figure size. (line 6)
* size <1>: Paths and guides. (line 81)
* size <2>: Paths and guides. (line 370)
@@ -9933,12 +9999,12 @@ Index
(line 48)
* size <4>: Frames and pictures.
(line 74)
-* size <5>: three. (line 537)
-* size <6>: Options. (line 155)
-* size3: three. (line 297)
+* size <5>: three. (line 540)
+* size <6>: Options. (line 157)
+* size3: three. (line 300)
* Slant: label. (line 42)
* slant: Transforms. (line 38)
-* sleep: Data types. (line 375)
+* sleep: Data types. (line 376)
* slice: Paths and guides. (line 251)
* slice <1>: Paths and guides. (line 262)
* slices: Slices. (line 6)
@@ -9951,17 +10017,17 @@ Index
(line 48)
* solid: Pens. (line 102)
* solids: solids. (line 6)
-* solve: Arrays. (line 282)
-* solve <1>: Arrays. (line 298)
-* sort: Arrays. (line 177)
-* sort <1>: Arrays. (line 181)
-* sort <2>: Arrays. (line 196)
+* solve: Arrays. (line 287)
+* solve <1>: Arrays. (line 303)
+* sort: Arrays. (line 182)
+* sort <1>: Arrays. (line 186)
+* sort <2>: Arrays. (line 201)
* specular: three. (line 76)
* specularfactor: three. (line 76)
* specularpen: three. (line 66)
* Spline: graph. (line 33)
* Spline <1>: graph3. (line 99)
-* split: Data types. (line 278)
+* split: Data types. (line 279)
* sqrt: Mathematical functions.
(line 6)
* squarecap: Pens. (line 139)
@@ -9972,42 +10038,42 @@ Index
* stack overflow <2>: Help. (line 27)
* static: Static. (line 6)
* stats: stats. (line 6)
-* stdin: Files. (line 48)
-* stdout: Files. (line 48)
+* stdin: Files. (line 52)
+* stdout: Files. (line 52)
* step: Debugger. (line 38)
* stickframe: markers. (line 16)
* stop: Debugger. (line 10)
* straight: Paths and guides. (line 88)
* Straight: graph. (line 30)
-* straight <1>: three. (line 537)
-* strftime: Data types. (line 320)
-* strftime <1>: Data types. (line 345)
-* string: Data types. (line 207)
-* string <1>: Data types. (line 311)
+* straight <1>: three. (line 540)
+* strftime: Data types. (line 321)
+* strftime <1>: Data types. (line 346)
+* string: Data types. (line 208)
+* string <1>: Data types. (line 312)
* stroke: fill. (line 36)
* stroke <1>: clip. (line 6)
* strokepath: Paths and guides. (line 309)
-* strptime: Data types. (line 329)
+* strptime: Data types. (line 330)
* struct: Structures. (line 6)
* structures: Structures. (line 6)
* subpath: Paths and guides. (line 186)
-* subpath <1>: three. (line 537)
+* subpath <1>: three. (line 540)
* subpictures: Frames and pictures.
(line 113)
-* substr: Data types. (line 261)
-* sum: Arrays. (line 211)
+* substr: Data types. (line 262)
+* sum: Arrays. (line 216)
* superpath: Paths. (line 23)
-* Suppress: Pens. (line 350)
-* SuppressQuiet: Pens. (line 354)
+* Suppress: Pens. (line 367)
+* SuppressQuiet: Pens. (line 371)
* surface: three. (line 46)
-* surface <1>: three. (line 116)
-* surface <2>: three. (line 130)
+* surface <1>: three. (line 118)
+* surface <2>: three. (line 132)
* surface <3>: graph3. (line 99)
-* SVG: Options. (line 160)
-* system: Data types. (line 353)
-* system <1>: Options. (line 181)
+* SVG: Options. (line 162)
+* system: Data types. (line 354)
+* system <1>: Options. (line 182)
* syzygy: syzygy. (line 6)
-* tab: Files. (line 61)
+* tab: Files. (line 65)
* tab completion: Drawing in interactive mode.
(line 11)
* tan: Mathematical functions.
@@ -10016,23 +10082,23 @@ Index
(line 20)
* tanh: Mathematical functions.
(line 6)
-* target: three. (line 372)
-* tell: Files. (line 93)
+* target: three. (line 375)
+* tell: Files. (line 97)
* tension: Bezier curves. (line 56)
* tension <1>: three. (line 6)
* tensionSpecifier: Paths and guides. (line 402)
-* tensor product shading: fill. (line 77)
-* tensorshade: fill. (line 77)
-* tessellation: three. (line 142)
+* tensor product shading: fill. (line 78)
+* tensorshade: fill. (line 78)
+* tessellation: three. (line 144)
* tex: Frames and pictures.
(line 305)
-* tex <1>: Options. (line 155)
-* TeX fonts: Pens. (line 215)
-* TeX string: Data types. (line 207)
-* texcommand: Configuring. (line 72)
+* tex <1>: Options. (line 157)
+* TeX fonts: Pens. (line 213)
+* TeX string: Data types. (line 208)
+* texcommand: Configuring. (line 74)
* TeXHead: draw. (line 26)
-* TeXHead3: three. (line 603)
-* texpath: Configuring. (line 72)
+* TeXHead3: three. (line 606)
+* texpath: Configuring. (line 74)
* texpath <1>: label. (line 113)
* texpreamble: Frames and pictures.
(line 314)
@@ -10041,73 +10107,72 @@ Index
* textbook graph: graph. (line 360)
* tgz: UNIX binary distributions.
(line 6)
-* thick: three. (line 154)
-* thin: three. (line 154)
+* thick: three. (line 156)
+* thin: three. (line 156)
* this: Structures. (line 6)
* three: three. (line 6)
-* ThreeViews: three. (line 438)
-* ThreeViewsFR: three. (line 438)
-* ThreeViewsUS: three. (line 438)
+* ThreeViews: three. (line 441)
+* ThreeViewsFR: three. (line 441)
+* ThreeViewsUS: three. (line 441)
* tick: graph. (line 330)
* ticks: graph. (line 160)
* Ticks: graph. (line 160)
* Ticks <1>: graph. (line 233)
* tildeframe: markers. (line 24)
-* tile: Pens. (line 268)
-* tilings: Pens. (line 254)
-* time: Data types. (line 320)
-* time <1>: Data types. (line 345)
+* tile: Pens. (line 285)
+* tilings: Pens. (line 271)
+* time: Data types. (line 321)
+* time <1>: Data types. (line 346)
* time <2>: math. (line 26)
* time <3>: math. (line 30)
* times: Paths and guides. (line 220)
* times <1>: Paths and guides. (line 224)
* Top: graph. (line 135)
-* TopView: three. (line 423)
+* TopView: three. (line 426)
* trace: Debugger. (line 50)
* trailingzero: graph. (line 175)
* transform: Transforms. (line 6)
-* transform <1>: three. (line 512)
-* transform3: three. (line 475)
-* transparency: Pens. (line 237)
+* transform <1>: three. (line 515)
+* transform3: three. (line 478)
+* transparency: Pens. (line 254)
* transparent: three. (line 97)
-* transpose: Arrays. (line 203)
-* transpose <1>: Arrays. (line 206)
+* transpose: Arrays. (line 208)
+* transpose <1>: Arrays. (line 211)
* tree: tree. (line 6)
* trembling: trembling. (line 6)
* triangle: geometry. (line 6)
-* triangles: three. (line 142)
+* triangles: three. (line 144)
* triangulate: contour. (line 149)
-* tridiagonal: Arrays. (line 269)
+* tridiagonal: Arrays. (line 274)
* trigonometric integrals: Mathematical functions.
(line 48)
* triple: Data types. (line 137)
* TrueMargin: draw. (line 42)
-* TrueMargin3: three. (line 619)
-* tube: three. (line 154)
+* TrueMargin3: three. (line 622)
+* tube: three. (line 156)
* tube <1>: tube. (line 6)
* tutorial: Tutorial. (line 6)
* type1cm: Pens. (line 192)
-* typedef: Data types. (line 384)
+* typedef: Data types. (line 385)
* typedef <1>: Functions. (line 46)
* U3D: embed. (line 22)
* undefined: Paths and guides. (line 283)
* UnFill: draw. (line 26)
-* unfill: fill. (line 109)
+* unfill: fill. (line 110)
* UnFill <1>: Frames and pictures.
(line 165)
* UnFill <2>: Frames and pictures.
(line 168)
-* unicode: unicode. (line 6)
-* uniform: Arrays. (line 145)
+* uniform: Arrays. (line 150)
* uninstall: Uninstall. (line 6)
* unique: math. (line 59)
* unit: Data types. (line 83)
-* unit <1>: Data types. (line 173)
+* unit <1>: Data types. (line 174)
* unitbox: Paths. (line 44)
-* unitbox <1>: three. (line 344)
+* unitbox <1>: three. (line 347)
* unitcircle: Paths. (line 17)
* unitcircle <1>: Paths. (line 17)
-* unitcircle <2>: three. (line 312)
+* unitcircle <2>: three. (line 315)
* unitrand: Mathematical functions.
(line 39)
* unitsize: Figure size. (line 39)
@@ -10117,18 +10182,19 @@ Index
(line 6)
* unpacking: Rest arguments. (line 39)
* unravel: Import. (line 29)
-* up: three. (line 372)
-* update: Files. (line 36)
+* up: three. (line 375)
+* update: Files. (line 38)
* UpsideDown: Frames and pictures.
(line 104)
* UpsideDown <1>: Frames and pictures.
(line 110)
+* URL: Import. (line 94)
* usepackage: Frames and pictures.
(line 321)
* user coordinates: Figure size. (line 39)
* user-defined operators: User-defined operators.
(line 6)
-* usleep: Data types. (line 378)
+* usleep: Data types. (line 379)
* value: math. (line 34)
* value <1>: math. (line 37)
* var: Variable initializers.
@@ -10138,50 +10204,50 @@ Index
* vectorfield: graph. (line 1004)
* vectorfield <1>: graph. (line 1043)
* vectorfield3: graph3. (line 157)
-* vectorization: Arrays. (line 326)
+* vectorization: Arrays. (line 331)
* verbatim: Frames and pictures.
(line 297)
-* vertex-dependent colors: three. (line 107)
+* vertex-dependent colors: three. (line 109)
* Vertical: flowchart. (line 77)
* Viewport: three. (line 76)
* viewportheight: LaTeX usage. (line 50)
-* viewportmargin: three. (line 300)
-* viewportsize: three. (line 300)
+* viewportmargin: three. (line 303)
+* viewportsize: three. (line 303)
* viewportwidth: LaTeX usage. (line 50)
-* views: three. (line 269)
+* views: three. (line 272)
* vim: Editing modes. (line 32)
-* virtual functions: Structures. (line 181)
+* virtual functions: Structures. (line 182)
* void: Data types. (line 10)
* W: Labels. (line 18)
-* WebGL: three. (line 220)
+* WebGL: three. (line 223)
* whatever: Paths and guides. (line 246)
* Wheel: palette. (line 22)
* wheel mouse: GUI. (line 6)
* while: Programming. (line 48)
* White: three. (line 76)
-* white-space string delimiter mode: Arrays. (line 357)
+* white-space string delimiter mode: Arrays. (line 362)
* width: LaTeX usage. (line 50)
* windingnumber: Paths and guides. (line 283)
-* word: Arrays. (line 357)
-* write: Files. (line 53)
-* write <1>: Arrays. (line 396)
-* X: three. (line 312)
+* word: Arrays. (line 362)
+* write: Files. (line 57)
+* write <1>: Arrays. (line 401)
+* X: three. (line 315)
* xasy: GUI. (line 6)
* xaxis3: graph3. (line 7)
-* xdr: Files. (line 76)
-* xelatex: Options. (line 155)
+* xdr: Files. (line 80)
+* xelatex: Options. (line 157)
* XEquals: graph. (line 265)
* xequals: graph. (line 278)
* xlimits: graph. (line 639)
* XOR: Arithmetic & logical.
(line 68)
* xpart: Data types. (line 94)
-* xpart <1>: Data types. (line 184)
+* xpart <1>: Data types. (line 185)
* xscale: Transforms. (line 30)
-* xscale3: three. (line 482)
+* xscale3: three. (line 485)
* xtick: graph. (line 330)
-* XY: three. (line 497)
-* XY <1>: three. (line 512)
+* XY: three. (line 500)
+* XY <1>: three. (line 515)
* XYEquals: graph3. (line 21)
* XYZero: graph3. (line 21)
* XZEquals: graph3. (line 21)
@@ -10191,22 +10257,22 @@ Index
(line 6)
* Y <1>: Mathematical functions.
(line 48)
-* Y <2>: three. (line 312)
+* Y <2>: three. (line 315)
* yaxis3: graph3. (line 7)
* YEquals: graph. (line 128)
* yequals: graph. (line 278)
* ylimits: graph. (line 639)
* ypart: Data types. (line 97)
-* ypart <1>: Data types. (line 187)
+* ypart <1>: Data types. (line 188)
* yscale: Transforms. (line 32)
-* yscale3: three. (line 484)
+* yscale3: three. (line 487)
* ytick: graph. (line 330)
-* YX: three. (line 512)
-* YZ: three. (line 512)
+* YX: three. (line 515)
+* YZ: three. (line 515)
* YZEquals: graph3. (line 21)
* YZero: graph. (line 123)
* YZZero: graph3. (line 21)
-* Z: three. (line 312)
+* Z: three. (line 315)
* zaxis3: graph3. (line 7)
* zeroTransform: Transforms. (line 44)
* zerowinding: Pens. (line 164)
@@ -10222,160 +10288,159 @@ Index
(line 48)
* zeta: Mathematical functions.
(line 48)
-* zpart: Data types. (line 190)
-* zscale3: three. (line 486)
-* ZX: three. (line 512)
-* ZX <1>: three. (line 512)
-* ZY: three. (line 512)
+* zpart: Data types. (line 191)
+* zscale3: three. (line 489)
+* ZX: three. (line 515)
+* ZX <1>: three. (line 515)
+* ZY: three. (line 515)

Tag Table:
Node: Top570
-Node: Description7280
-Node: Installation11190
-Node: UNIX binary distributions12236
-Node: MacOS X binary distributions13366
-Node: Microsoft Windows13921
-Node: Configuring15128
-Node: Search paths19591
-Node: Compiling from UNIX source20430
-Node: Editing modes23492
-Node: Git25914
-Node: Uninstall26314
-Node: Tutorial26660
-Node: Drawing in batch mode27551
-Node: Drawing in interactive mode28427
-Node: Figure size29459
-Node: Labels31054
-Node: Paths31882
-Ref: unitcircle32498
-Node: Drawing commands34400
-Node: draw36115
-Ref: arrows37297
-Node: fill42795
-Ref: gradient shading43841
-Node: clip48357
-Node: label48944
-Ref: Label49544
-Node: Bezier curves55376
-Node: Programming59276
-Ref: array iteration61029
-Node: Data types61196
-Ref: format71858
-Node: Paths and guides76304
-Ref: circle76558
-Ref: extension86258
-Node: Pens93068
-Ref: fillrule100759
-Ref: basealign101663
-Ref: transparency104497
-Ref: makepen108091
-Ref: overwrite108975
-Node: Transforms110189
-Node: Frames and pictures112021
-Ref: envelope113179
-Ref: size114272
-Ref: unitsize115259
-Ref: shipout116332
-Ref: filltype118683
-Ref: add122096
-Ref: add about123038
-Ref: tex126068
-Node: Files126964
-Ref: cd127951
-Ref: scroll132636
-Node: Variable initializers135554
-Node: Structures138271
-Node: Operators145773
-Node: Arithmetic & logical146087
-Node: Self & prefix operators148457
-Node: User-defined operators149251
-Node: Implicit scaling150164
-Node: Functions150727
-Ref: stack overflow153869
-Node: Default arguments154151
-Node: Named arguments154907
-Node: Rest arguments157477
-Node: Mathematical functions160599
-Node: Arrays165256
-Ref: sort172364
-Ref: tridiagonal175275
-Ref: solve176506
-Node: Slices180646
-Node: Casts184554
-Node: Import186824
-Node: Static192082
-Node: LaTeX usage194975
-Node: Base modules201470
-Node: plain204027
-Node: simplex204701
-Node: math204975
-Node: interpolate207559
-Node: geometry207838
-Node: trembling208432
-Node: stats208701
-Node: patterns208961
-Node: markers209197
-Node: tree211059
-Node: binarytree211244
-Node: drawtree211911
-Node: syzygy212112
-Node: feynman212386
-Node: roundedpath212661
-Node: animation212944
-Ref: animate213365
-Node: embed214478
-Node: slide215432
-Node: MetaPost215764
-Node: unicode216483
-Node: latin1217357
-Node: babel217726
-Node: labelpath217956
-Node: labelpath3218777
-Node: annotate219088
-Node: CAD219558
-Node: graph219869
-Ref: ticks227030
-Ref: pathmarkers240768
-Ref: marker241239
-Ref: markuniform241593
-Ref: errorbars243401
-Ref: automatic scaling247880
-Node: palette259641
-Ref: images259759
-Ref: image263933
-Ref: logimage264454
-Ref: penimage265560
-Ref: penfunctionimage265823
-Node: three266595
-Ref: PostScript3D295892
-Node: obj297631
-Node: graph3297880
-Ref: GaussianSurface303163
-Node: grid3304313
-Node: solids305098
-Node: tube306091
-Node: flowchart308322
-Node: contour312931
-Node: contour3318251
-Node: smoothcontour3318564
-Node: slopefield320285
-Node: ode321775
-Node: Options322032
-Ref: configuration file328817
-Ref: settings328817
-Ref: texengines330081
-Ref: convert330081
-Node: Interactive mode333591
-Ref: history335741
-Node: GUI337044
-Node: GUI installation337595
-Node: GUI usage338326
-Node: PostScript to Asymptote339389
-Node: Help340148
-Node: Debugger341822
-Node: Credits343578
-Node: Index344595
+Node: Description7200
+Node: Installation11286
+Node: UNIX binary distributions12332
+Node: MacOS X binary distributions13455
+Node: Microsoft Windows14010
+Node: Configuring15217
+Node: Search paths19829
+Node: Compiling from UNIX source20837
+Node: Editing modes23988
+Node: Git26410
+Node: Uninstall26917
+Node: Tutorial27263
+Node: Drawing in batch mode28110
+Node: Drawing in interactive mode28986
+Node: Figure size30018
+Node: Labels31613
+Node: Paths32441
+Ref: unitcircle33057
+Node: Drawing commands34955
+Node: draw36763
+Ref: arrows37945
+Node: fill43461
+Ref: gradient shading44507
+Node: clip49121
+Node: label49870
+Ref: Label50470
+Node: Bezier curves56328
+Node: Programming60228
+Ref: array iteration61981
+Node: Data types62148
+Ref: format72916
+Node: Paths and guides77362
+Ref: circle77616
+Ref: extension87316
+Node: Pens94126
+Ref: fillrule101817
+Ref: basealign102721
+Ref: transparency106403
+Ref: makepen109997
+Ref: overwrite110881
+Node: Transforms112095
+Node: Frames and pictures114034
+Ref: envelope115192
+Ref: size116285
+Ref: unitsize117272
+Ref: shipout118345
+Ref: filltype120696
+Ref: add124109
+Ref: add about125051
+Ref: tex128081
+Node: Files128977
+Ref: cd130034
+Ref: scroll134936
+Node: Variable initializers137854
+Node: Structures140571
+Node: Operators148149
+Node: Arithmetic & logical148463
+Node: Self & prefix operators150833
+Node: User-defined operators151627
+Node: Implicit scaling152540
+Node: Functions153103
+Ref: stack overflow156245
+Node: Default arguments156527
+Node: Named arguments157283
+Node: Rest arguments159853
+Node: Mathematical functions162975
+Node: Arrays167632
+Ref: sort174921
+Ref: tridiagonal177832
+Ref: solve179063
+Node: Slices183203
+Node: Casts187111
+Node: Import189381
+Node: Static194962
+Node: LaTeX usage197848
+Node: Base modules204343
+Node: plain206820
+Node: simplex207494
+Node: math207767
+Node: interpolate210350
+Node: geometry210629
+Node: trembling211223
+Node: stats211492
+Node: patterns211751
+Node: markers211986
+Node: map213845
+Node: tree214269
+Node: binarytree214453
+Node: drawtree215120
+Node: syzygy215321
+Node: feynman215595
+Node: roundedpath215869
+Node: animation216151
+Ref: animate216572
+Node: embed217684
+Node: slide218638
+Node: MetaPost218969
+Node: babel219685
+Node: labelpath219917
+Node: labelpath3220737
+Node: annotate221048
+Node: CAD221518
+Node: graph221828
+Ref: ticks228988
+Ref: pathmarkers242713
+Ref: marker243184
+Ref: markuniform243538
+Ref: errorbars245346
+Ref: automatic scaling249825
+Node: palette261540
+Ref: images261658
+Ref: image265832
+Ref: logimage266353
+Ref: penimage267459
+Ref: penfunctionimage267722
+Node: three268494
+Ref: PostScript3D298021
+Node: obj299759
+Node: graph3300008
+Ref: GaussianSurface305291
+Node: grid3306441
+Node: solids307226
+Node: tube308218
+Node: flowchart310448
+Node: contour315091
+Node: contour3320406
+Node: smoothcontour3320718
+Node: slopefield322439
+Node: ode323929
+Node: Options324186
+Ref: configuration file331094
+Ref: settings331094
+Ref: texengines332358
+Ref: convert332358
+Node: Interactive mode335792
+Ref: history337942
+Node: GUI339245
+Node: GUI installation339796
+Node: GUI usage340529
+Node: PostScript to Asymptote341592
+Node: Help342351
+Node: Debugger344025
+Node: Credits345781
+Node: Index346889

End Tag Table
diff --git a/Build/source/utils/asymptote/doc/secondaryaxis.asy b/Build/source/utils/asymptote/doc/secondaryaxis.asy
index 27b89b9c384..85143f7acec 100644
--- a/Build/source/utils/asymptote/doc/secondaryaxis.asy
+++ b/Build/source/utils/asymptote/doc/secondaryaxis.asy
@@ -26,7 +26,7 @@ picture secondary=secondaryY(new void(picture pic) {
draw(pic,graph(pic,t,infectious,t >= 10 & t <= 15),red);
yaxis(pic,Right,red,LeftTicks(begin=false,end=false));
});
-
+
add(secondary);
label(shift(5mm*N)*"Proportion of crows",point(NW),E);
diff --git a/Build/source/utils/asymptote/drawclipbegin.h b/Build/source/utils/asymptote/drawclipbegin.h
index 58b4ac57949..8bf8e30ffc4 100644
--- a/Build/source/utils/asymptote/drawclipbegin.h
+++ b/Build/source/utils/asymptote/drawclipbegin.h
@@ -21,7 +21,7 @@ public:
void noncyclic() {
reportError("cannot clip to non-cyclic path");
}
-
+
drawClipBegin(const vm::array& src, bool stroke, pen pentype,
bool gsave=true, const string& key="") :
drawElement(key), drawSuperPathPenBase(src,pentype), gsave(gsave),
@@ -32,7 +32,7 @@ public:
virtual ~drawClipBegin() {}
bool beginclip() {return true;}
-
+
void bounds(bbox& b, iopipestream& iopipe, boxvector& vbox,
bboxlist& bboxstack) {
bboxstack.push_back(b);
@@ -43,13 +43,13 @@ public:
}
bool begingroup() {return true;}
-
+
bool svg() {return true;}
-
+
void save(bool b) {
gsave=b;
}
-
+
bool draw(psfile *out) {
if(gsave) out->gsave();
if(empty()) return true;
@@ -63,10 +63,10 @@ public:
bool write(texfile *out, const bbox& bpath) {
if(gsave) out->gsave();
if(empty()) return true;
-
- if(out->toplevel())
+
+ if(out->toplevel())
out->beginpicture(bpath);
-
+
out->begingroup();
out->beginspecial();
@@ -76,10 +76,10 @@ public:
out->endclip(pentype);
out->endraw();
out->endspecial();
-
+
return true;
}
-
+
drawElement *transformed(const transform& t)
{
return new drawClipBegin(transpath(t),stroke,transpen(t),gsave,KEY);
diff --git a/Build/source/utils/asymptote/drawclipend.h b/Build/source/utils/asymptote/drawclipend.h
index e86842d3d11..48c8d2de5a7 100644
--- a/Build/source/utils/asymptote/drawclipend.h
+++ b/Build/source/utils/asymptote/drawclipend.h
@@ -14,16 +14,16 @@
namespace camp {
class drawClipEnd : public drawElement {
- bool grestore;
+ bool grestore;
drawClipBegin *partner;
public:
- drawClipEnd(bool grestore=true, drawClipBegin *partner=NULL) :
+ drawClipEnd(bool grestore=true, drawClipBegin *partner=NULL) :
grestore(grestore), partner(partner) {}
virtual ~drawClipEnd() {}
bool endclip() {return true;}
-
+
void bounds(bbox& b, iopipestream&, boxvector&, bboxlist& bboxstack) {
if(bboxstack.size() < 2)
reportError("endclip without matching beginclip");
@@ -34,14 +34,14 @@ public:
}
bool endgroup() {return true;}
-
+
bool svg() {return true;}
-
+
void save(bool b) {
grestore=b;
if(partner) partner->save(b);
}
-
+
bool draw(psfile *out) {
if(grestore) out->grestore();
return true;
@@ -49,8 +49,8 @@ public:
bool write(texfile *out, const bbox& bpath) {
out->endgroup();
-
- if(out->toplevel())
+
+ if(out->toplevel())
out->endpicture(bpath);
if(grestore) out->grestore();
diff --git a/Build/source/utils/asymptote/drawelement.h b/Build/source/utils/asymptote/drawelement.h
index 7dbd1c42b01..f561d2786d2 100644
--- a/Build/source/utils/asymptote/drawelement.h
+++ b/Build/source/utils/asymptote/drawelement.h
@@ -29,16 +29,16 @@ static const double pixel=1.0; // Adaptive rendering constant.
enum Interaction {EMBEDDED=0,BILLBOARD};
void copyArray4x4C(double*& dest, const vm::array *a);
-
+
class box {
pair p[4];
public:
-
+
box() {}
box(const pair& a, const pair& b, const pair& c, const pair& d) {
p[0]=a; p[1]=b; p[2]=c; p[3]=d;
}
-
+
// Returns true if the line a--b intersects box b.
bool intersect(const pair& a, const pair& b) const
{
@@ -55,9 +55,9 @@ public:
}
return false;
}
-
+
pair operator [] (Int i) const {return p[i];}
-
+
bool intersect(const box& b) const {
for(Int i=0; i < 4; ++i) {
pair A=b[i];
@@ -66,25 +66,25 @@ public:
}
return false;
}
-
+
double xmax() {
return max(max(max(p[0].x,p[1].x),p[2].x),p[3].x);
}
-
+
double ymax() {
return max(max(max(p[0].y,p[1].y),p[2].y),p[3].y);
}
-
+
double xmin() {
return min(min(min(p[0].x,p[1].x),p[2].x),p[3].x);
}
-
+
double ymin() {
return min(min(min(p[0].y,p[1].y),p[2].y),p[3].y);
}
-
+
};
-
+
class bbox2 {
public:
double x,y,X,Y;
@@ -93,7 +93,7 @@ public:
for(size_t i=1; i < n; ++i)
bounds(v[i]);
}
-
+
bbox2(const triple& m, const triple& M) {
Bounds(m);
bounds(triple(m.getx(),m.gety(),M.getz()));
@@ -104,7 +104,7 @@ public:
bounds(triple(M.getx(),M.gety(),m.getz()));
bounds(M);
}
-
+
bbox2(const triple& m, const triple& M, const Billboard& BB) {
Bounds(BB.transform(m));
bounds(BB.transform(triple(m.getx(),m.gety(),M.getz())));
@@ -115,7 +115,7 @@ public:
bounds(BB.transform(triple(M.getx(),M.gety(),m.getz())));
bounds(BB.transform(M));
}
-
+
// Is 2D bounding box formed by projecting 3d points in vector v offscreen?
bool offscreen() {
double eps=1.0e-2;
@@ -123,13 +123,13 @@ public:
double max=1.0+eps;
return X < min || x > max || Y < min || y > max;
}
-
+
void Bounds(const triple& v) {
pair V=Transform2T(gl::dprojView,v);
x=X=V.getx();
y=Y=V.gety();
}
-
+
void bounds(const triple& v) {
pair V=Transform2T(gl::dprojView,v);
double a=V.getx();
@@ -142,9 +142,9 @@ public:
};
typedef mem::vector<box> boxvector;
-
+
typedef mem::list<bbox> bboxlist;
-
+
typedef mem::map<CONST string,unsigned> groupmap;
typedef mem::vector<groupmap> groupsmap;
@@ -152,20 +152,20 @@ class drawElement : public gc
{
public:
string KEY;
-
+
drawElement(const string& key="") : KEY(key == "" ? processData().KEY : key)
- {}
-
+ {}
+
virtual ~drawElement() {}
-
+
static mem::vector<triple> center;
static size_t centerIndex;
static triple lastcenter;
static size_t lastcenterIndex;
-
- static pen lastpen;
+
+ static pen lastpen;
static const triple zero;
-
+
// Adjust the bbox of the picture based on the addition of this
// element. The iopipestream is needed for determining label sizes.
virtual void bounds(bbox&, iopipestream&, boxvector&, bboxlist&) {}
@@ -175,15 +175,15 @@ public:
// Compute bounds on ratio (x,y)/z for 3d picture (not cached).
virtual void ratio(const double *t, pair &b, double (*m)(double, double),
double fuzz, bool &first) {}
-
+
virtual void minratio(const double *t, pair &b, double fuzz, bool &first) {
ratio(t,b,camp::min,fuzz,first);
}
-
+
virtual void maxratio(const double *t,pair &b, double fuzz, bool &first) {
ratio(t,b,camp::max,fuzz,first);
}
-
+
virtual void ratio(pair &b, double (*m)(double, double), double fuzz,
bool &first) {
ratio(NULL,b,m,fuzz,first);
@@ -200,20 +200,20 @@ public:
virtual bool islabel() {return false;}
virtual bool isnewpage() {return false;}
-
+
virtual bool islayer() {return false;}
virtual bool is3D() {return false;}
// Implement element as raw SVG code?
virtual bool svg() {return false;}
-
+
// Implement SVG element as png image?
virtual bool svgpng() {return false;}
-
+
virtual bool beginclip() {return false;}
virtual bool endclip() {return false;}
-
+
virtual bool begingroup() {return false;}
virtual bool begingroup3() {return false;}
@@ -223,7 +223,7 @@ public:
virtual const double* transf3() {return NULL;}
virtual void save(bool b) {}
-
+
// Output to a PostScript file
virtual bool draw(psfile *) {
return false;
@@ -239,22 +239,22 @@ public:
groupsmap& groups) {
return false;
}
-
+
// Output to a JS file
virtual bool write(jsfile *out) {
return false;
}
-
+
// Used to compute deviation of a surface from a quadrilateral.
virtual void displacement() {}
// Render with OpenGL
virtual void render(double size2, const triple& Min, const triple& Max,
- double perspective, bool remesh)
+ double perspective, bool remesh)
{}
virtual void meshinit() {}
-
+
size_t centerindex(const triple& center) {
if(drawElement::center.empty() || center != drawElement::lastcenter) {
drawElement::lastcenter=center;
@@ -268,7 +268,7 @@ public:
virtual drawElement *transformed(const transform&) {
return this;
}
-
+
virtual drawElement *transformed(const double* t) {
return this;
}
@@ -279,9 +279,9 @@ public:
class drawElementLC : public virtual drawElement {
public:
double *T; // Keep track of accumulative picture transform
-
+
drawElementLC() : T(NULL) {}
-
+
drawElementLC(const double *t) : T(NULL) {
copyTransform3(T,t);
}
@@ -290,7 +290,7 @@ public:
copyArray4x4C(T,&t);
}
- drawElementLC(const double* t, const drawElementLC *s) :
+ drawElementLC(const double* t, const drawElementLC *s) :
drawElement(s->KEY), T(NULL) {
multiplyTransform3(T,t,s->T);
}
@@ -324,19 +324,19 @@ public:
virtual void bounds(bbox& b, iopipestream&, boxvector&, bboxlist&) {
b += p.bounds();
}
-
+
virtual void writepath(psfile *out,bool) {
out->write(p);
}
-
+
virtual void writeclippath(psfile *out, bool newpath=true) {
out->writeclip(p,newpath);
}
-
+
virtual void writeshiftedpath(texfile *out) {
out->writeshifted(p);
}
-};
+};
// Base class for drawElements that involve paths and pens.
class drawPathPenBase : public drawPathBase {
@@ -348,28 +348,28 @@ protected:
}
public:
- drawPathPenBase(path p, pen pentype) :
+ drawPathPenBase(path p, pen pentype) :
drawPathBase(p), pentype(pentype) {}
-
+
drawPathPenBase(pen pentype) :
pentype(pentype) {}
-
+
virtual bool empty() {
return p.empty();
}
-
+
virtual bool cyclic() {
return p.cyclic();
}
-
+
void strokebounds(bbox& b, const path& p);
-
+
virtual void penSave(psfile *out)
{
if (!pentype.getTransform().isIdentity())
out->gsave();
}
-
+
virtual void penTranslate(psfile *out)
{
out->translate(shiftpair(pentype.getTransform()));
@@ -386,7 +386,7 @@ public:
out->grestore();
}
};
-
+
// Base class for drawElements that involve superpaths and pens.
class drawSuperPathPenBase : public drawPathPenBase {
protected:
@@ -400,57 +400,57 @@ protected:
(*Pt)[i]=vm::read<path>(P,i).transformed(t);
return *Pt;
}
-
+
public:
drawSuperPathPenBase(const vm::array& P, pen pentype) :
drawPathPenBase(pentype), P(P), size(P.size()) {}
bool empty() {
- for(size_t i=0; i < size; i++)
+ for(size_t i=0; i < size; i++)
if(vm::read<path>(P,i).size() != 0) return false;
return true;
}
-
+
bool cyclic() {
- for(size_t i=0; i < size; i++)
+ for(size_t i=0; i < size; i++)
if(!vm::read<path>(P,i).cyclic()) return false;
return true;
}
-
+
void bounds(bbox& b, iopipestream&, boxvector&, bboxlist&) {
for(size_t i=0; i < size; i++)
bpath += vm::read<path>(P,i).bounds();
b += bpath;
}
-
+
void strokepath(psfile *out) {
out->strokepath();
}
-
+
void strokebounds(bbox& b) {
for(size_t i=0; i < size; i++)
drawPathPenBase::strokebounds(bpath,vm::read<path>(P,i));
b += bpath;
}
-
+
void writepath(psfile *out, bool newpath=true) {
if(size > 0) out->write(vm::read<path>(P,0),newpath);
for(size_t i=1; i < size; i++)
out->write(vm::read<path>(P,i),false);
}
-
+
void writeclippath(psfile *out, bool newpath=true) {
if(size > 0) out->writeclip(vm::read<path>(P,0),newpath);
for(size_t i=1; i < size; i++)
out->writeclip(vm::read<path>(P,i),false);
}
-
+
void writeshiftedpath(texfile *out) {
- for(size_t i=0; i < size; i++)
+ for(size_t i=0; i < size; i++)
out->writeshifted(vm::read<path>(P,i),i == 0);
}
};
-
+
#ifdef HAVE_LIBGLM
void setcolors(bool colors,
const prc::RGBAColour& diffuse,
@@ -459,7 +459,7 @@ void setcolors(bool colors,
double metallic, double fresnel0, jsfile *out=NULL);
#endif
-
+
}
diff --git a/Build/source/utils/asymptote/drawfill.cc b/Build/source/utils/asymptote/drawfill.cc
index 443a7775d49..551b75cb0de 100644
--- a/Build/source/utils/asymptote/drawfill.cc
+++ b/Build/source/utils/asymptote/drawfill.cc
@@ -16,9 +16,9 @@ void drawAxialShade::palette(psfile *out)
{
pentype.convert();
penb.convert();
-
+
colorspace=(ColorSpace) max(pentype.colorspace(),penb.colorspace());
-
+
switch(colorspace) {
case RGB:
{
@@ -26,12 +26,12 @@ void drawAxialShade::palette(psfile *out)
else if (penb.grayscale()) penb.greytorgb();
break;
}
-
+
case CMYK:
{
if (pentype.grayscale()) pentype.greytocmyk();
else if (penb.grayscale()) penb.greytocmyk();
-
+
if (pentype.rgb()) pentype.rgbtocmyk();
else if (penb.rgb()) penb.rgbtocmyk();
break;
@@ -39,25 +39,25 @@ void drawAxialShade::palette(psfile *out)
default:
break;
}
-
+
out->gsave();
-}
-
+}
+
bool drawFill::draw(psfile *out)
{
if(pentype.invisible() || empty()) return true;
-
+
palette(out);
writepath(out);
fill(out);
return true;
}
-
+
drawElement *drawFill::transformed(const transform& t)
{
return new drawFill(transpath(t),stroke,transpen(t),KEY);
}
-
+
drawElement *drawLatticeShade::transformed(const transform& t)
{
return new drawLatticeShade(transpath(t),stroke,pentype,pens,t*T,KEY);
@@ -69,7 +69,7 @@ drawElement *drawAxialShade::transformed(const transform& t)
return new drawAxialShade(transpath(t),stroke,pentype,A,extenda,penb,B,
extendb,KEY);
}
-
+
drawElement *drawRadialShade::transformed(const transform& t)
{
pair A=t*a, B=t*b;
@@ -96,10 +96,10 @@ drawElement *drawTensorShade::transformed(const transform& t)
size_t zsize=z.size();
vm::array *Boundaries=new vm::array(size);
vm::array *Z=new vm::array(zsize);
-
+
for(size_t i=0; i < size; i++)
(*Boundaries)[i]=vm::read<path>(boundaries,i).transformed(t);
-
+
for(size_t i=0; i < zsize; i++) {
vm::array *zi=vm::read<vm::array *>(z,i);
size_t zisize=checkArray(zi);
@@ -110,16 +110,16 @@ drawElement *drawTensorShade::transformed(const transform& t)
}
return new drawTensorShade(transpath(t),stroke,pentype,pens,*Boundaries,*Z,
- KEY);
+ KEY);
}
bool drawFunctionShade::write(texfile *out, const bbox& box)
{
if(empty()) return true;
-
+
ColorSpace colorspace=pentype.colorspace();
size_t ncomponents=ColorComponents[colorspace];
-
+
out->verbatim("\\pdfobj stream attr {/FunctionType 4");
out->verbatim("/Domain [0 1 0 1]");
out->verbatim("/Range [");
@@ -129,7 +129,7 @@ bool drawFunctionShade::write(texfile *out, const bbox& box)
out->verbatimline(shader);
out->verbatimline("}}%");
out->verbatimline("\\edef\\lastobj{\\the\\pdflastobj}\\pdfrefobj\\lastobj");
-
+
out->verbatim("\\setbox\\ASYbox=\\hbox to ");
double Hoffset=out->hoffset();
double hoffset=(bpath.Max().getx()-Hoffset)*ps2tex;
@@ -149,7 +149,7 @@ bool drawFunctionShade::write(texfile *out, const bbox& box)
out->endspecial();
out->grestore();
out->verbatimline("}\\hfil}%");
-
+
out->verbatimline("\\pdfxform resources {");
out->verbatimline("/Shading << /Sh << /ShadingType 1");
out->verbatim("/Matrix [");
@@ -160,7 +160,7 @@ bool drawFunctionShade::write(texfile *out, const bbox& box)
out->verbatim("/ColorSpace /Device");
out->verbatimline(ColorDeviceSuffix[colorspace]);
out->verbatimline("/Function \\lastobj\\space 0 R >> >>}\\ASYbox");
-
+
out->verbatimline("\\pdfrefxform\\the\\pdflastxform");
out->verbatim("\\kern");
out->write(-hoffset);
diff --git a/Build/source/utils/asymptote/drawfill.h b/Build/source/utils/asymptote/drawfill.h
index 4f7df49f967..360959d08fa 100644
--- a/Build/source/utils/asymptote/drawfill.h
+++ b/Build/source/utils/asymptote/drawfill.h
@@ -14,28 +14,28 @@
namespace camp {
class drawFill : public drawSuperPathPenBase {
-protected:
+protected:
bool stroke;
public:
void noncyclic() {
reportError("non-cyclic path cannot be filled");
}
-
+
drawFill(const vm::array& src, bool stroke, pen pentype,
- const string& key="") :
+ const string& key="") :
drawElement(key), drawSuperPathPenBase(src,pentype), stroke(stroke) {
if(!stroke && !cyclic()) noncyclic();
}
bool svg() {return true;}
-
+
// dvisvgm doesn't yet support SVG patterns.
bool svgpng() {return pentype.fillpattern() != "";}
-
+
virtual ~drawFill() {}
virtual bool draw(psfile *out);
-
+
virtual void palette(psfile *out) {
penSave(out);
penTranslate(out);
@@ -49,7 +49,7 @@ public:
drawElement *transformed(const transform& t);
};
-
+
class drawShade : public drawFill {
public:
drawShade(const vm::array& src, bool stroke, pen pentype,
@@ -61,16 +61,20 @@ public:
if(stroke) strokebounds(b);
else drawSuperPathPenBase::bounds(b,iopipe,vbox,bboxstack);
}
-
- // Shading in SVG is incomplete and not supported at all by dvisvgm.
+
+ bool pdf() {
+ return settings::pdf(settings::getSetting<string>("tex"));
+ }
+
+ // Shading in SVG is incomplete and not supported at all by dvisvgm --pdf.
bool svgpng() {return true;}
-
+
virtual void beginshade(psfile *out)=0;
virtual void shade(psfile *out)=0;
-
+
bool draw(psfile *out) {
if(pentype.invisible() || empty()) return true;
-
+
palette(out);
beginshade(out);
writeclippath(out);
@@ -81,40 +85,40 @@ public:
return true;
}
};
-
+
class drawLatticeShade : public drawShade {
protected:
vm::array pens;
const transform T;
-public:
+public:
drawLatticeShade(const vm::array& src, bool stroke,
pen pentype, const vm::array& pens,
const camp::transform& T=identity, const string& key="")
: drawShade(src,stroke,pentype,key), pens(pens), T(T) {}
-
+
void palette(psfile *out) {
out->gsave();
}
-
+
void beginshade(psfile *out) {
out->beginlatticeshade(pens,bpath);
}
-
+
void shade(psfile *out) {
bbox b;
for(size_t i=0; i < size; i++) {
path p=vm::read<path>(P,i).transformed(inverse(T));
if(stroke)
drawPathPenBase::strokebounds(b,p);
- else
+ else
b += p.bounds();
}
out->latticeshade(pens,T*matrix(b.Min(),b.Max()));
}
-
+
drawElement *transformed(const transform& t);
};
-
+
class drawAxialShade : public drawShade {
protected:
pair a;
@@ -123,28 +127,28 @@ protected:
pair b;
bool extendb;
ColorSpace colorspace;
-public:
+public:
drawAxialShade(const vm::array& src, bool stroke,
pen pentype, pair a, bool extenda, pen penb, pair b,
- bool extendb, const string& key="")
+ bool extendb, const string& key="")
: drawShade(src,stroke,pentype,key), a(a), extenda(extenda),
penb(penb), b(b), extendb(extendb) {}
-
- bool svgpng() {return false;}
-
+
+ bool svgpng() {return !extenda || !extendb || pdf();}
+
void palette(psfile *out);
-
+
void beginshade(psfile *out) {
out->begingradientshade(true,colorspace,pentype,a,0,penb,b,0);
}
-
+
void shade(psfile *out) {
out->gradientshade(true,colorspace,pentype,a,0,extenda,penb,b,0,extendb);
}
-
+
drawElement *transformed(const transform& t);
};
-
+
class drawRadialShade : public drawAxialShade {
protected:
double ra;
@@ -155,80 +159,75 @@ public:
pair b, double rb, bool extendb, const string& key="")
: drawAxialShade(src,stroke,pentype,a,extenda,penb,b,
extendb,key), ra(ra), rb(rb) {}
-
- bool svgpng() {return ra > 0.0;}
-
+
+ bool svgpng() {return a != b || ra > 0.0 || !extenda || !extendb || pdf();}
+
void beginshade(psfile *out) {
out->begingradientshade(false,colorspace,pentype,a,ra,penb,b,rb);
}
-
+
void shade(psfile *out) {
out->gradientshade(false,colorspace,pentype,a,ra,extenda,penb,b,rb,extendb);
}
-
+
drawElement *transformed(const transform& t);
};
-
+
class drawGouraudShade : public drawShade {
protected:
vm::array pens,vertices,edges;
-public:
+public:
drawGouraudShade(const vm::array& src, bool stroke,
pen pentype, const vm::array& pens,
const vm::array& vertices, const vm::array& edges,
const string& key="")
: drawElement(key), drawShade(src,stroke,pentype,key), pens(pens),
vertices(vertices), edges(edges) {}
-
- bool svgpng() {return !settings::getSetting<bool>("svgemulation");}
-
+
+ bool svgpng() {return settings::getSetting<bool>("xasy") || !settings::getSetting<bool>("svgemulation") || pdf();}
+
void palette(psfile *out) {
out->gsave();
}
-
+
void beginshade(psfile *out) {
out->begingouraudshade(pens,vertices,edges);
}
-
+
void shade(psfile *out) {
out->gouraudshade(pentype,pens,vertices,edges);
}
-
+
drawElement *transformed(const transform& t);
};
-
+
class drawTensorShade : public drawShade {
protected:
vm::array pens,boundaries,z;
-public:
+public:
drawTensorShade(const vm::array& src, bool stroke,
pen pentype, const vm::array& pens,
const vm::array& boundaries, const vm::array& z,
- const string& key="") :
+ const string& key="") :
drawShade(src,stroke,pentype,key), pens(pens), boundaries(boundaries),
- z(z) {}
-
- bool svgpng() {
- return pens.size() > 1 || !settings::getSetting<bool>("svgemulation");
+ z(z) {
}
-
+
void palette(psfile *out) {
out->gsave();
}
-
- void beginshade(psfile *out) {
- out->begintensorshade(pens,boundaries,z);
- }
-
+
+ void beginshade(psfile *out) {}
+
void shade(psfile *out) {
out->tensorshade(pentype,pens,boundaries,z);
}
-
+
drawElement *transformed(const transform& t);
};
-
+
class drawFunctionShade : public drawFill {
-protected:
+protected:
string shader;
public:
drawFunctionShade(const vm::array& src, bool stroke,
@@ -243,14 +242,14 @@ public:
virtual ~drawFunctionShade() {}
bool draw(psfile *out) {return false;}
-
+
bool write(texfile *, const bbox&);
-
+
bool islabel() {return true;}
-
+
drawElement *transformed(const transform& t);
};
-
+
}
#endif
diff --git a/Build/source/utils/asymptote/drawgrestore.h b/Build/source/utils/asymptote/drawgrestore.h
index 7f1b62fe630..b1b80a80819 100644
--- a/Build/source/utils/asymptote/drawgrestore.h
+++ b/Build/source/utils/asymptote/drawgrestore.h
@@ -21,7 +21,7 @@ public:
out->grestore();
return true;
}
-
+
bool write(texfile *out, const bbox&) {
out->grestore();
return true;
diff --git a/Build/source/utils/asymptote/drawgroup.h b/Build/source/utils/asymptote/drawgroup.h
index e8149f118bb..22aa858a962 100644
--- a/Build/source/utils/asymptote/drawgroup.h
+++ b/Build/source/utils/asymptote/drawgroup.h
@@ -15,16 +15,16 @@ namespace camp {
class drawBegin : public drawElement {
public:
drawBegin() {}
-
+
virtual ~drawBegin() {}
bool begingroup() {return true;}
};
-
+
class drawEnd : public drawElement {
public:
drawEnd() {}
-
+
virtual ~drawEnd() {}
bool endgroup() {return true;}
@@ -34,11 +34,11 @@ class drawBegin3 : public drawElementLC {
string name;
double compression;
double granularity;
- bool closed; // render the surface as one-sided; may yield faster rendering
+ bool closed; // render the surface as one-sided; may yield faster rendering
bool tessellate; // use tessellated mesh to store straight patches
bool dobreak; // force breaking
bool nobreak; // force grouping for transparent patches
-
+
triple center;
int interaction;
public:
@@ -48,45 +48,45 @@ public:
name(name), compression(compression), granularity(granularity),
closed(closed), tessellate(tessellate), dobreak(dobreak), nobreak(nobreak),
center(center), interaction(interaction) {}
-
+
virtual ~drawBegin3() {}
bool begingroup() {return true;}
bool begingroup3() {return true;}
-
+
bool write(prcfile *out, unsigned int *count, double compressionlimit,
groupsmap& groups) {
groupmap& group=groups.back();
if(name.empty()) name="group";
groupmap::const_iterator p=group.find(name);
-
+
unsigned c=(p != group.end()) ? p->second+1 : 0;
group[name]=c;
-
+
ostringstream buf;
buf << name;
if(c > 0) buf << "-" << (c+1);
-
+
if(interaction == BILLBOARD)
buf << "-" << (*count)++ << "\001";
-
- prc::PRCoptions options(compression > 0.0 ?
+
+ prc::PRCoptions options(compression > 0.0 ?
max(compression,compressionlimit) : 0.0,
granularity,closed,tessellate,dobreak,nobreak);
-
+
groups.push_back(groupmap());
const string& s=buf.str();
out->begingroup(s.c_str(),&options,T);
return true;
}
-
+
drawBegin3(const double* t, const drawBegin3 *s) :
drawElementLC(t, s), name(s->name), compression(s->compression),
granularity(s->granularity), closed(s->closed), tessellate(s->tessellate),
dobreak(s->dobreak), nobreak(s->nobreak), interaction(s->interaction) {
center=t*s->center;
}
-
+
drawElement *transformed(const double* t) {
return new drawBegin3(t,this);
}
@@ -95,12 +95,12 @@ public:
class drawEnd3 : public drawElement {
public:
drawEnd3() {}
-
+
virtual ~drawEnd3() {}
bool endgroup() {return true;}
bool endgroup3() {return true;}
-
+
bool write(prcfile *out, unsigned int *, double, groupsmap& groups) {
groups.pop_back();
out->endgroup();
diff --git a/Build/source/utils/asymptote/drawgsave.h b/Build/source/utils/asymptote/drawgsave.h
index bddc3a1dba0..58ef9715b54 100644
--- a/Build/source/utils/asymptote/drawgsave.h
+++ b/Build/source/utils/asymptote/drawgsave.h
@@ -21,7 +21,7 @@ public:
out->gsave();
return true;
}
-
+
bool write(texfile *out, const bbox&) {
out->gsave();
return true;
diff --git a/Build/source/utils/asymptote/drawimage.h b/Build/source/utils/asymptote/drawimage.h
index a3c5971dc4a..97c15a7c850 100644
--- a/Build/source/utils/asymptote/drawimage.h
+++ b/Build/source/utils/asymptote/drawimage.h
@@ -20,7 +20,7 @@ protected:
public:
drawImage(const transform& t, bool antialias, const string& key="")
: drawElement(key), t(t), antialias(antialias) {}
-
+
virtual ~drawImage() {}
void bounds(bbox& b, iopipestream&, boxvector&, bboxlist&) {
@@ -39,16 +39,16 @@ public:
drawPaletteImage(const vm::array& image, const vm::array& palette,
const transform& t, bool antialias, const string& key="")
: drawImage(t,antialias,key), image(image), palette(palette) {}
-
+
virtual ~drawPaletteImage() {}
bool draw(psfile *out) {
out->gsave();
out->concat(t);
out->image(image,palette,antialias);
-
+
out->grestore();
-
+
return true;
}
@@ -63,7 +63,7 @@ public:
drawNoPaletteImage(const vm::array& image, const transform& t,
bool antialias, const string& key="")
: drawImage(t,antialias,key), image(image) {}
-
+
virtual ~drawNoPaletteImage() {}
bool draw(psfile *out) {
@@ -88,7 +88,7 @@ public:
const transform& t, bool antialias, const string& key="")
: drawImage(t,antialias,key), Stack(Stack), f(f),
width(width), height(height) {}
-
+
virtual ~drawFunctionImage() {}
bool draw(psfile *out) {
@@ -111,7 +111,7 @@ public:
drawRawImage(unsigned char *raw, size_t width, size_t height,
const transform& t, bool antialias, const string& key="")
: drawImage(t,antialias,key), raw(raw), width(width), height(height) {}
-
+
virtual ~drawRawImage() {}
bool draw(psfile *out) {
diff --git a/Build/source/utils/asymptote/drawlabel.cc b/Build/source/utils/asymptote/drawlabel.cc
index 7f749989c48..afeeeb56737 100644
--- a/Build/source/utils/asymptote/drawlabel.cc
+++ b/Build/source/utils/asymptote/drawlabel.cc
@@ -15,15 +15,15 @@
using namespace settings;
namespace camp {
-
+
string texready=string("(Please type a command or say `\\end')\n*");
-void drawLabel::labelwarning(const char *action)
+void drawLabel::labelwarning(const char *action)
{
- cerr << "warning: label \"" << label
+ cerr << "warning: label \"" << label
<< "\" " << action << " to avoid overwriting" << endl;
}
-
+
// Reads one of the dimensions from the pipe.
void texdim(iopipestream& tex, double& dest, const string command,
const string name)
@@ -62,18 +62,18 @@ void texbounds(double& width, double& height, double& depth,
texdim(tex,width,"wd","width");
texdim(tex,height,"ht","height");
texdim(tex,depth,"dp","depth");
-}
+}
inline double urand()
-{
+{
static const double factor=2.0/RANDOM_MAX;
return random()*factor-1.0;
}
-void setpen(iopipestream& tex, const string& texengine, const pen& pentype)
+void setpen(iopipestream& tex, const string& texengine, const pen& pentype)
{
bool Latex=latex(texengine);
-
+
if(Latex && setlatexfont(tex,pentype,drawElement::lastpen)) {
tex << "\n";
tex.wait(texready.c_str());
@@ -82,7 +82,7 @@ void setpen(iopipestream& tex, const string& texengine, const pen& pentype)
tex << "\n";
tex.wait(texready.c_str());
}
-
+
drawElement::lastpen=pentype;
}
@@ -90,20 +90,20 @@ void drawLabel::getbounds(iopipestream& tex, const string& texengine)
{
if(havebounds) return;
havebounds=true;
-
+
setpen(tex,texengine,pentype);
texbounds(width,height,depth,tex,label);
-
+
if(width == 0.0 && height == 0.0 && depth == 0.0 && !size.empty())
texbounds(width,height,depth,tex,size);
enabled=true;
-
+
Align=inverse(T)*align;
double scale0=max(fabs(Align.getx()),fabs(Align.gety()));
if(scale0) Align *= 0.5/scale0;
Align -= pair(0.5,0.5);
- double Depth=(pentype.Baseline() == NOBASEALIGN) ? depth :
+ double Depth=(pentype.Baseline() == NOBASEALIGN) ? depth :
-depth*Align.gety();
texAlign=Align;
const double vertical=height+depth;
@@ -118,9 +118,9 @@ void drawLabel::bounds(bbox& b, iopipestream& tex, boxvector& labelbounds,
{
string texengine=getSetting<string>("tex");
if(texengine == "none") {b += position; return;}
-
+
getbounds(tex,texengine);
-
+
// alignment point
pair p=position+Align;
const double vertical=height+depth;
@@ -129,7 +129,7 @@ void drawLabel::bounds(bbox& b, iopipestream& tex, boxvector& labelbounds,
pair B=p+T*pair(-fuzz,vertical+fuzz);
pair C=p+T*pair(width+fuzz,vertical+fuzz);
pair D=p+T*pair(width+fuzz,-fuzz);
-
+
if(pentype.Overwrite() != ALLOW && label != "") {
size_t n=labelbounds.size();
box Box=box(A,B,C,D);
@@ -139,7 +139,7 @@ void drawLabel::bounds(bbox& b, iopipestream& tex, boxvector& labelbounds,
case SUPPRESS:
labelwarning("suppressed");
case SUPPRESSQUIET:
- suppress=true;
+ suppress=true;
return;
case MOVE:
labelwarning("moved");
@@ -168,13 +168,13 @@ void drawLabel::bounds(bbox& b, iopipestream& tex, boxvector& labelbounds,
labelbounds.resize(n+1);
labelbounds[n]=Box;
}
-
+
Box=bbox();
Box += A;
Box += B;
Box += C;
Box += D;
-
+
b += Box;
}
@@ -203,10 +203,10 @@ void drawLabelPath::bounds(bbox& b, iopipestream& tex, boxvector&, bboxlist&)
{
string texengine=getSetting<string>("tex");
if(texengine == "none") {b += position; return;}
-
+
getbounds(tex,texengine);
double L=p.arclength();
-
+
double s1,s2;
if(justify == "l") {
s1=0.0;
@@ -220,30 +220,30 @@ void drawLabelPath::bounds(bbox& b, iopipestream& tex, boxvector&, bboxlist&)
s1=s-h;
s2=s+h;
}
-
+
double Sx=shift.getx();
double Sy=shift.gety();
s1 += Sx;
s2 += Sx;
-
+
if(width > L || (!p.cyclic() && (s1 < 0 || s2 > L))) {
ostringstream buf;
buf << "Cannot fit label \"" << label << "\" to path";
reportError(buf);
}
-
+
path q=p.subpath(p.arctime(s1),p.arctime(s2));
-
+
b += q.bounds(Sy,Sy+height);
Box=b;
}
-
+
bool drawLabelPath::write(texfile *out, const bbox&)
{
bbox b=Box;
double Hoffset=getSetting<bool>("inlinetex") ? b.right : b.left;
b.shift(pair(-Hoffset,-b.bottom));
-
+
checkbounds();
if(drawLabel::pentype.invisible()) return true;
out->setpen(drawLabel::pentype);
diff --git a/Build/source/utils/asymptote/drawlabel.h b/Build/source/utils/asymptote/drawlabel.h
index c16209bc51e..e631f04a55a 100644
--- a/Build/source/utils/asymptote/drawlabel.h
+++ b/Build/source/utils/asymptote/drawlabel.h
@@ -14,7 +14,7 @@
#include "transform.h"
namespace camp {
-
+
class drawLabel : public virtual drawElement {
protected:
string label,size;
@@ -30,23 +30,23 @@ protected:
pair texAlign;
bbox Box;
bool enabled;
-
+
public:
drawLabel(string label, string size, transform T, pair position,
pair align, pen pentype, const string& key="")
: drawElement(key), label(label), size(size), T(shiftless(T)),
position(position), align(align), pentype(pentype), width(0.0),
height(0.0), depth(0.0), havebounds(false), suppress(false),
- enabled(false) {}
-
+ enabled(false) {}
+
virtual ~drawLabel() {}
void getbounds(iopipestream& tex, const string& texengine);
-
+
void checkbounds();
-
+
void bounds(bbox& b, iopipestream&, boxvector&, bboxlist&);
-
+
bool islabel() {
return true;
}
@@ -54,30 +54,30 @@ public:
bool write(texfile *out, const bbox&);
drawElement *transformed(const transform& t);
-
- void labelwarning(const char *action);
+
+ void labelwarning(const char *action);
};
class drawLabelPath : public drawLabel, public drawPathPenBase {
-private:
+private:
string justify;
pair shift;
public:
drawLabelPath(string label, string size, path src,
string justify, pair shift, pen pentype,
- const string& key="") :
+ const string& key="") :
drawLabel(label,size,identity,pair(0.0,0.0),pair(0.0,0.0),pentype,key),
drawPathPenBase(src,pentype), justify(justify), shift(shift) {}
-
+
virtual ~drawLabelPath() {}
bool svg() {return true;}
bool svgpng() {return true;}
-
+
void bounds(bbox& b, iopipestream& tex, boxvector&, bboxlist&);
-
+
bool write(texfile *out, const bbox&);
-
+
drawElement *transformed(const transform& t);
};
diff --git a/Build/source/utils/asymptote/drawlayer.h b/Build/source/utils/asymptote/drawlayer.h
index 1f4500dac2c..3b5b3ddeb28 100644
--- a/Build/source/utils/asymptote/drawlayer.h
+++ b/Build/source/utils/asymptote/drawlayer.h
@@ -29,9 +29,9 @@ public:
bool islabel() {return true;}
bool isnewpage() {return true;}
-
+
bool write(texfile *out, const bbox&) {
- out->verbatimline(settings::latex(out->texengine) ? "\\newpage" :
+ out->verbatimline(settings::latex(out->texengine) ? "\\newpage" :
settings::context(out->texengine) ? "}\\page\\hbox{%" :
"\\eject");
return true;
diff --git a/Build/source/utils/asymptote/drawpath.cc b/Build/source/utils/asymptote/drawpath.cc
index bb6dc393bd9..02e7d11a286 100644
--- a/Build/source/utils/asymptote/drawpath.cc
+++ b/Build/source/utils/asymptote/drawpath.cc
@@ -22,24 +22,24 @@ double PatternLength(double arclength, const array& pat,
bool cyclic, double penwidth)
{
double sum=0.0;
-
+
size_t n=pat.size();
for(unsigned i=0; i < n; i ++)
sum += read<double>(pat,i)*penwidth;
-
+
if(sum == 0.0) return 0.0;
-
+
if(n % 2 == 1) sum *= 2.0; // On/off pattern repeats after 2 cycles.
-
+
double pat0=read<double>(pat,0);
// Fix bounding box resolution problem. Example:
// asy -f pdf testlinetype; gv -scale -2 testlinetype.pdf
if(!cyclic && pat0 == 0) sum += 1.0e-3*penwidth;
-
+
double terminator=(cyclic && arclength >= 0.5*sum) ? 0.0 : pat0*penwidth;
int ncycle=(int)((arclength-terminator)/sum+0.5);
- return (ncycle >= 1 || terminator >= 0.75*arclength) ?
+ return (ncycle >= 1 || terminator >= 0.75*arclength) ?
ncycle*sum+terminator : 0.0;
}
@@ -55,26 +55,26 @@ pen adjustdash(pen& p, double arclength, bool cyclic)
// Adjust dash sizes to fit arclength; also compensate for linewidth.
const LineType *linetype=q.linetype();
size_t n=linetype->pattern.size();
-
+
if(n > 0) {
double penwidth=linetype->scale ? q.width() : 1.0;
double factor=penwidth;
-
+
if(linetype->adjust && arclength) {
double denom=PatternLength(arclength,linetype->pattern,cyclic,penwidth);
if(denom != 0.0) factor *= arclength/denom;
}
-
+
if(factor != 1.0)
q.adjust(max(factor,0.1));
}
return q;
}
-
+
// Account for square or extended pen cap contributions to bounding box.
void cap(bbox& b, double t, path p, pen pentype) {
- transform T=pentype.getTransform();
-
+ transform T=pentype.getTransform();
+
double h=0.5*pentype.width();
pair v=p.dir(t);
transform S=rotate(conj(v))*shiftless(T);
@@ -85,7 +85,7 @@ void cap(bbox& b, double t, path p, pen pentype) {
double numer=xx*yx+xy*yy;
double x=numer/y;
pair z=shift(T)*p.point(t);
-
+
switch(pentype.cap()) {
case 0:
{
@@ -113,16 +113,16 @@ void drawPathPenBase::strokebounds(bbox& b, const path& p)
{
Int l=p.length();
if(l < 0) return;
-
+
bbox penbounds=pentype.bounds();
-
+
if(cyclic() || pentype.cap() == 1) {
b += pad(p.bounds(),penbounds);
return;
}
-
+
b += p.internalbounds(penbounds);
-
+
cap(b,0,p,pentype);
cap(b,l,p,pentype);
}
@@ -147,17 +147,17 @@ bool drawPath::draw(psfile *out)
out->dot(p,q);
penConcat(out);
-
+
out->setpen(q);
-
+
out->stroke(q,n == 1);
-
+
penRestore(out);
return true;
}
-drawElement *drawPath::transformed(const transform& t)
+drawElement *drawPath::transformed(const transform& t)
{
return new drawPath(transpath(t),transpen(t),KEY);
}
diff --git a/Build/source/utils/asymptote/drawpath.h b/Build/source/utils/asymptote/drawpath.h
index 93ec38eb69e..2903bdcc3b8 100644
--- a/Build/source/utils/asymptote/drawpath.h
+++ b/Build/source/utils/asymptote/drawpath.h
@@ -15,9 +15,9 @@ namespace camp {
class drawPath : public drawPathPenBase {
public:
- drawPath(path src, pen pentype, const string& key="") :
+ drawPath(path src, pen pentype, const string& key="") :
drawElement(key), drawPathPenBase(src,pentype) {}
-
+
virtual ~drawPath() {}
void bounds(bbox& b, iopipestream&, boxvector&, bboxlist&) {
@@ -25,7 +25,7 @@ public:
}
bool svg() {return true;}
-
+
bool draw(psfile *out);
drawElement *transformed(const transform& t);
diff --git a/Build/source/utils/asymptote/drawpath3.cc b/Build/source/utils/asymptote/drawpath3.cc
index 07c64ef1a9f..088d2705db9 100644
--- a/Build/source/utils/asymptote/drawpath3.cc
+++ b/Build/source/utils/asymptote/drawpath3.cc
@@ -18,60 +18,43 @@ namespace camp {
using vm::array;
using namespace prc;
-
+
bool drawPath3::write(prcfile *out, unsigned int *, double, groupsmap&)
{
- Int n=g.length();
- if(n == 0 || invisible)
+ if(invisible)
return true;
if(straight) {
- triple *controls=new(UseGC) triple[n+1];
- for(Int i=0; i <= n; ++i)
- controls[i]=g.point(i);
-
- out->addLine(n+1,controls,diffuse);
+ triple controls[]={g.point((Int) 0),g.point((Int) 1)};
+ out->addLine(2,controls,diffuse);
} else {
- int m=3*n+1;
- triple *controls=new(UseGC) triple[m];
- controls[0]=g.point((Int) 0);
- controls[1]=g.postcontrol((Int) 0);
- size_t k=1;
- for(Int i=1; i < n; ++i) {
- controls[++k]=g.precontrol(i);
- controls[++k]=g.point(i);
- controls[++k]=g.postcontrol(i);
- }
- controls[++k]=g.precontrol(n);
- controls[++k]=g.point(n);
- out->addBezierCurve(m,controls,diffuse);
+ triple controls[]={g.point((Int) 0),g.postcontrol((Int) 0),
+ g.precontrol((Int) 1),g.point((Int) 1)};
+ out->addBezierCurve(4,controls,diffuse);
}
-
+
return true;
}
bool drawPath3::write(jsfile *out)
{
#ifdef HAVE_LIBGLM
- Int n=g.length();
- if(n == 0 || invisible)
+ if(invisible)
return true;
if(billboard) {
meshinit();
drawElement::centerIndex=centerIndex;
} else drawElement::centerIndex=0;
-
+
setcolors(false,diffuse,emissive,specular,shininess,metallic,fresnel0,out);
-
- for(Int i=0; i < n; ++i) {
- if(g.straight(i)) {
- out->addCurve(g.point(i),g.point(i+1),Min,Max);
- } else
- out->addCurve(g.point(i),g.postcontrol(i),
- g.precontrol(i+1),g.point(i+1),Min,Max);
- }
-#endif
+
+ if(straight)
+ out->addCurve(g.point((Int) 0),g.point((Int) 1),Min,Max);
+ else
+ out->addCurve(g.point((Int) 0),g.postcontrol((Int) 0),
+ g.precontrol((Int) 1),g.point((Int) 1),Min,Max);
+#endif
return true;
}
@@ -79,49 +62,48 @@ void drawPath3::render(double size2, const triple& b, const triple& B,
double perspective, bool remesh)
{
#ifdef HAVE_GL
- Int n=g.length();
- if(n == 0 || invisible) return;
+ if(invisible) return;
setcolors(false,diffuse,emissive,specular,shininess,metallic,fresnel0);
setMaterial(material1Data,drawMaterial1);
-
+
bool offscreen;
- if(gl::exporting)
- offscreen=false;
- else if(billboard) {
+ if(billboard) {
drawElement::centerIndex=centerIndex;
BB.init(center);
offscreen=bbox2(Min,Max,BB).offscreen();
} else
offscreen=bbox2(Min,Max).offscreen();
-
+
if(offscreen) { // Fully offscreen
R.Onscreen=false;
R.data.clear();
+ R.notRendered();
return;
}
- for(Int i=0; i < n; ++i) {
- triple controls[]={g.point(i),g.postcontrol(i),g.precontrol(i+1),
- g.point(i+1)};
- triple *Controls;
- triple Controls0[4];
- if(billboard) {
- Controls=Controls0;
- for(size_t i=0; i < 4; i++) {
- Controls[i]=BB.transform(controls[i]);
- }
- } else
- Controls=controls;
-
- double s=perspective ? Min.getz()*perspective : 1.0; // Move to glrender
-
- const pair size3(s*(B.getx()-b.getx()),s*(B.gety()-b.gety()));
-
- R.queue(controls,g.straight(i),size3.length()/size2);
+ triple controls[]={g.point((Int) 0),g.postcontrol((Int) 0),
+ g.precontrol((Int) 1),g.point((Int) 1)};
+ triple *Controls;
+ triple Controls0[4];
+ if(billboard) {
+ Controls=Controls0;
+ for(size_t i=0; i < 4; i++)
+ Controls[i]=BB.transform(controls[i]);
+ } else {
+ Controls=controls;
+ if(!remesh && R.Onscreen) { // Fully onscreen; no need to re-render
+ R.append();
+ return;
+ }
}
-
+
+ double s=perspective ? Min.getz()*perspective : 1.0; // Move to glrender
+
+ const pair size3(s*(B.getx()-b.getx()),s*(B.gety()-b.gety()));
+
+ R.queue(controls,straight,size3.length()/size2);
#endif
}
@@ -129,14 +111,14 @@ drawElement *drawPath3::transformed(const double* t)
{
return new drawPath3(t,this);
}
-
+
bool drawNurbsPath3::write(prcfile *out, unsigned int *, double, groupsmap&)
{
if(invisible)
return true;
out->addCurve(degree,n,controls,knots,color,weights);
-
+
return true;
}
@@ -145,7 +127,7 @@ void drawNurbsPath3::bounds(const double* t, bbox3& b)
{
double x,y,z;
double X,Y,Z;
-
+
triple* Controls;
if(t == NULL) Controls=controls;
else {
@@ -153,12 +135,12 @@ void drawNurbsPath3::bounds(const double* t, bbox3& b)
for(size_t i=0; i < n; i++)
Controls[i]=t*controls[i];
}
-
+
boundstriples(x,y,z,X,Y,Z,n,Controls);
-
+
b.add(x,y,z);
b.add(X,Y,Z);
-
+
if(t == NULL) {
Min=triple(x,y,z);
Max=triple(X,Y,Z);
@@ -180,13 +162,13 @@ void drawNurbsPath3::ratio(const double* t, pair &b, double (*m)(double, double)
for(size_t i=0; i < n; i++)
Controls[i]=t*controls[i];
}
-
+
if(first) {
first=false;
triple v=Controls[0];
b=pair(xratio(v),yratio(v));
}
-
+
double x=b.getx();
double y=b.gety();
for(size_t i=0; i < n; ++i) {
@@ -195,7 +177,7 @@ void drawNurbsPath3::ratio(const double* t, pair &b, double (*m)(double, double)
y=m(y,yratio(v));
}
b=pair(x,y);
-
+
if(t != NULL)
delete[] Controls;
}
@@ -214,10 +196,10 @@ void drawNurbsPath3::displacement()
else
for(size_t i=0; i < n; ++i)
store(Controls+3*i,controls[i]);
-
+
for(size_t i=0; i < nknots; ++i)
Knots[i]=knots[i];
-#endif
+#endif
}
void drawNurbsPath3::render(double, const triple&, const triple&,
@@ -225,7 +207,7 @@ void drawNurbsPath3::render(double, const triple&, const triple&,
{
#ifdef HAVE_GL
if(invisible) return;
-
+
// TODO: implement NURBS renderer
#endif
}
@@ -236,10 +218,10 @@ bool drawPixel::write(prcfile *out, unsigned int *, double, groupsmap&)
return true;
out->addPoint(v,color,width);
-
+
return true;
}
-
+
bool drawPixel::write(jsfile *out)
{
#ifdef HAVE_LIBGLM
@@ -248,24 +230,24 @@ bool drawPixel::write(jsfile *out)
RGBAColour Black(0.0,0.0,0.0,color.A);
setcolors(false,color,color,Black,1.0,0.0,0.04,out);
-
+
out->addPixel(v,width,Min,Max);
-#endif
+#endif
return true;
}
void drawPixel::render(double size2, const triple& b, const triple& B,
- double perspective, bool remesh)
+ double perspective, bool remesh)
{
#ifdef HAVE_GL
if(invisible) return;
-
+
RGBAColour Black(0.0,0.0,0.0,color.A);
setcolors(false,color,color,Black,1.0,0.0,0.04);
setMaterial(material0Data,drawMaterial0);
- if(!gl::exporting && bbox2(Min,Max).offscreen()) { // Fully offscreen
+ if(bbox2(Min,Max).offscreen()) { // Fully offscreen
R.data.clear();
return;
}
@@ -278,5 +260,5 @@ drawElement *drawPixel::transformed(const double* t)
{
return new drawPixel(t*v,p,width,KEY);
}
-
+
} //namespace camp
diff --git a/Build/source/utils/asymptote/drawpath3.h b/Build/source/utils/asymptote/drawpath3.h
index a4b6a945239..3209493bf2a 100644
--- a/Build/source/utils/asymptote/drawpath3.h
+++ b/Build/source/utils/asymptote/drawpath3.h
@@ -29,17 +29,20 @@ protected:
Interaction interaction;
triple Min,Max;
bool billboard;
- size_t centerIndex;
+ size_t centerIndex;
public:
#ifdef HAVE_GL
BezierCurve R;
-#endif
+#endif
void init() {
- billboard=interaction == BILLBOARD &&
- !settings::getSetting<bool>("offscreen");
+#ifdef HAVE_LIBOSMESA
+ billboard=false;
+#else
+ billboard=interaction == BILLBOARD;
+#endif
centerIndex=0;
}
-
+
drawPath3(path3 g, triple center, const vm::array& p, double opacity,
double shininess, double metallic, double fresnel0,
Interaction interaction, const string& key="") :
@@ -55,7 +58,7 @@ public:
emissive=rgba(vm::read<camp::pen>(p,1));
specular=rgba(vm::read<camp::pen>(p,2));
}
-
+
drawPath3(const double* t, const drawPath3 *s) :
drawElement(s->KEY), g(camp::transformed(t,s->g)), straight(s->straight),
diffuse(s->diffuse), emissive(s->emissive), specular(s->specular),
@@ -66,11 +69,11 @@ public:
init();
center=t*s->center;
}
-
+
virtual ~drawPath3() {}
bool is3D() {return true;}
-
+
void bounds(const double* t, bbox3& B) {
if(t != NULL) {
const path3 tg(camp::transformed(t,g));
@@ -81,7 +84,7 @@ public:
B.add(Max);
}
}
-
+
void ratio(const double* t, pair &b, double (*m)(double, double), double,
bool &first) {
pair z;
@@ -95,15 +98,15 @@ public:
first=false;
} else b=pair(m(b.getx(),z.getx()),m(b.gety(),z.gety()));
}
-
+
void meshinit() {
if(billboard)
centerIndex=centerindex(center);
}
-
+
bool write(prcfile *out, unsigned int *, double, groupsmap&);
bool write(jsfile *out);
-
+
void render(double, const triple&, const triple&, double,
bool remesh);
@@ -120,78 +123,78 @@ protected:
prc::RGBAColour color;
bool invisible;
triple Min,Max;
-
+
#ifdef HAVE_LIBGLM
GLfloat *Controls;
GLfloat *Knots;
-#endif
-
+#endif
+
public:
drawNurbsPath3(const vm::array& g, const vm::array* knot,
const vm::array* weight, const pen& p, const string& key="") :
drawElement(key), color(rgba(p)), invisible(p.invisible()) {
size_t weightsize=checkArray(weight);
-
+
string wrongsize="Inconsistent NURBS data";
n=checkArray(&g);
-
+
if(n == 0 || (weightsize != 0 && weightsize != n))
reportError(wrongsize);
-
+
controls=new(UseGC) triple[n];
-
+
size_t k=0;
for(size_t i=0; i < n; ++i)
controls[k++]=vm::read<triple>(g,i);
-
+
if(weightsize > 0) {
size_t k=0;
weights=new(UseGC) double[n];
for(size_t i=0; i < n; ++i)
weights[k++]=vm::read<double>(weight,i);
} else weights=NULL;
-
+
size_t nknots=checkArray(knot);
-
+
if(nknots <= n+1 || nknots > 2*n)
reportError(wrongsize);
degree=nknots-n-1;
-
+
run::copyArrayC(knots,knot,0,NoGC);
-
+
#ifdef HAVE_LIBGLM
Controls=NULL;
-#endif
+#endif
}
-
+
drawNurbsPath3(const double* t, const drawNurbsPath3 *s) :
drawElement(s->KEY), degree(s->degree), n(s->n), weights(s->weights),
knots(s->knots), color(s->color), invisible(s->invisible) {
controls=new(UseGC) triple[n];
for(unsigned int i=0; i < n; ++i)
controls[i]=t*s->controls[i];
-
+
#ifdef HAVE_LIBGLM
Controls=NULL;
-#endif
+#endif
}
-
+
bool is3D() {return true;}
-
+
void bounds(const double* t, bbox3& b);
-
+
virtual ~drawNurbsPath3() {}
bool write(prcfile *out, unsigned int *, double, groupsmap&);
-
+
void displacement();
void ratio(const double* t, pair &b, double (*m)(double, double), double fuzz,
bool &first);
-
+
void render(double size2, const triple& Min, const triple& Max,
double perspective, bool remesh);
-
+
drawElement *transformed(const double* t);
};
@@ -206,7 +209,7 @@ class drawPixel : public drawElement {
public:
#ifdef HAVE_GL
Pixel R;
-#endif
+#endif
drawPixel(const triple& v, const pen& p, double width, const string& key="")
: drawElement(key), v(v), p(p), color(rgba(p)), width(width),
invisible(p.invisible()) {}
@@ -215,24 +218,24 @@ public:
Min=Max=(t != NULL) ? t*v : v;
B.add(Min);
}
-
+
void ratio(const double* t, pair &b, double (*m)(double, double), double,
bool &first) {
triple V=(t != NULL) ? t*v : v;
pair z=pair(xratio(V),yratio(V));
-
+
if(first) {
b=z;
first=false;
} else b=pair(m(b.getx(),z.getx()),m(b.gety(),z.gety()));
}
-
+
void render(double size2, const triple& b, const triple& B,
double perspective, bool remesh);
-
+
bool write(prcfile *out, unsigned int *, double, groupsmap&);
bool write(jsfile *out);
-
+
drawElement *transformed(const double* t);
};
diff --git a/Build/source/utils/asymptote/drawsurface.cc b/Build/source/utils/asymptote/drawsurface.cc
index 34ea0a4aa40..b491f20b0d5 100644
--- a/Build/source/utils/asymptote/drawsurface.cc
+++ b/Build/source/utils/asymptote/drawsurface.cc
@@ -31,6 +31,7 @@ size_t drawElement::lastcenterIndex=0;
const triple drawElement::zero;
using vm::array;
+using settings::getSetting;
#ifdef HAVE_LIBGLM
@@ -62,7 +63,7 @@ void setcolors(bool colors,
glm::vec4(emissive.R,emissive.G,emissive.B,emissive.A),
glm::vec4(specular.R,specular.G,specular.B,specular.A),
shininess,metallic,fresnel0);
-
+
MaterialMap::iterator p=materialMap.find(m);
if(p != materialMap.end()) materialIndex=p->second;
else {
@@ -76,7 +77,7 @@ void setcolors(bool colors,
}
}
-#endif
+#endif
void drawBezierPatch::bounds(const double* t, bbox3& b)
{
@@ -104,14 +105,14 @@ void drawBezierPatch::bounds(const double* t, bbox3& b)
double cz[16];
if(t == NULL) {
- for(int i=0; i < 16; ++i) {
+ for(unsigned int i=0; i < 16; ++i) {
triple v=controls[i];
cx[i]=v.getx();
cy[i]=v.gety();
cz[i]=v.getz();
}
} else {
- for(int i=0; i < 16; ++i) {
+ for(unsigned int i=0; i < 16; ++i) {
triple v=t*controls[i];
cx[i]=v.getx();
cy[i]=v.gety();
@@ -127,7 +128,7 @@ void drawBezierPatch::bounds(const double* t, bbox3& b)
c0=cy[0];
fuzz=Fuzz*run::norm(cy,16);
y=bound(cy,min,b.empty ? c0 : min(c0,b.bottom),fuzz,maxdepth);
- Y=boundtri(cy,max,b.empty ? c0 : max(c0,b.top),fuzz,maxdepth);
+ Y=bound(cy,max,b.empty ? c0 : max(c0,b.top),fuzz,maxdepth);
c0=cz[0];
fuzz=Fuzz*run::norm(cz,16);
@@ -145,7 +146,7 @@ void drawBezierPatch::bounds(const double* t, bbox3& b)
}
void drawBezierPatch::ratio(const double* t, pair &b, double (*m)(double, double),
- double fuzz, bool &first)
+ double fuzz, bool &first)
{
triple buf[16];
triple* Controls;
@@ -158,7 +159,7 @@ void drawBezierPatch::ratio(const double* t, pair &b, double (*m)(double, double
Controls[12]=t*controls[12];
Controls[15]=t*controls[15];
}
-
+
triple v=Controls[0];
double x=xratio(v);
double y=yratio(v);
@@ -192,7 +193,7 @@ void drawBezierPatch::ratio(const double* t, pair &b, double (*m)(double, double
b=pair(xratio(v),yratio(v));
first=false;
}
-
+
b=pair(bound(Controls,m,xratio,b.getx(),fuzz,maxdepth),
bound(Controls,m,yratio,b.gety(),fuzz,maxdepth));
}
@@ -215,7 +216,7 @@ bool drawBezierPatch::write(prcfile *out, unsigned int *, double, groupsmap&)
out->addRectangle(vertices,m);
} else
out->addPatch(controls,m);
-
+
return true;
}
@@ -229,16 +230,18 @@ bool drawBezierPatch::write(jsfile *out)
meshinit();
drawElement::centerIndex=centerIndex;
} else drawElement::centerIndex=0;
-
+
setcolors(colors,diffuse,emissive,specular,shininess,metallic,fresnel0,out);
-
+
+ out->precision(digits);
if(straight) {
triple Controls[]={controls[0],controls[12],controls[15],controls[3]};
out->addPatch(Controls,4,Min,Max,colors,4);
} else
out->addPatch(controls,16,Min,Max,colors,4);
-
-#endif
+ out->precision(getSetting<Int>("digits"));
+
+#endif
return true;
}
@@ -246,12 +249,12 @@ void drawBezierPatch::render(double size2, const triple& b, const triple& B,
double perspective, bool remesh)
{
#ifdef HAVE_GL
- if(invisible) return;
+ if(invisible) return;
transparent=colors ? colors[0].A+colors[1].A+colors[2].A+colors[3].A < 4.0 :
diffuse.A < 1.0;
-
+
setcolors(colors,diffuse,emissive,specular,shininess,metallic,fresnel0);
-
+
if(transparent)
setMaterial(transparentData,drawTransparent);
else {
@@ -260,11 +263,9 @@ void drawBezierPatch::render(double size2, const triple& b, const triple& B,
else
setMaterial(materialData,drawMaterial);
}
-
+
bool offscreen;
- if(gl::exporting)
- offscreen=false;
- else if(billboard) {
+ if(billboard) {
drawElement::centerIndex=centerIndex;
BB.init(center);
offscreen=bbox2(Min,Max,BB).offscreen();
@@ -274,6 +275,9 @@ void drawBezierPatch::render(double size2, const triple& b, const triple& B,
if(offscreen) { // Fully offscreen
S.Onscreen=false;
S.data.clear();
+ S.transparent=transparent;
+ S.color=colors;
+ S.notRendered();
return;
}
@@ -282,7 +286,7 @@ void drawBezierPatch::render(double size2, const triple& b, const triple& B,
if(billboard) {
Controls=Controls0;
for(size_t i=0; i < 16; i++) {
- Controls[i]=BB.transform(controls[i]);
+ Controls[i]=BB.transform(controls[i]);
}
} else {
Controls=controls;
@@ -293,7 +297,7 @@ void drawBezierPatch::render(double size2, const triple& b, const triple& B,
}
double s=perspective ? Min.getz()*perspective : 1.0; // Move to glrender
-
+
const pair size3(s*(B.getx()-b.getx()),s*(B.gety()-b.gety()));
if(gl::outlinemode) {
@@ -322,7 +326,7 @@ drawElement *drawBezierPatch::transformed(const double* t)
{
return new drawBezierPatch(t,this);
}
-
+
void drawBezierTriangle::bounds(const double* t, bbox3& b)
{
double x,y,z;
@@ -339,13 +343,13 @@ void drawBezierTriangle::bounds(const double* t, bbox3& b)
Vertices[1]=t*controls[6];
Vertices[2]=t*controls[9];
}
-
+
boundstriples(x,y,z,X,Y,Z,3,Vertices);
- } else {
+ } else {
double cx[10];
double cy[10];
double cz[10];
-
+
if(t == NULL) {
for(unsigned int i=0; i < 10; ++i) {
triple v=controls[i];
@@ -361,23 +365,23 @@ void drawBezierTriangle::bounds(const double* t, bbox3& b)
cz[i]=v.getz();
}
}
-
+
double c0=cx[0];
double fuzz=Fuzz*run::norm(cx,10);
x=boundtri(cx,min,b.empty ? c0 : min(c0,b.left),fuzz,maxdepth);
X=boundtri(cx,max,b.empty ? c0 : max(c0,b.right),fuzz,maxdepth);
-
+
c0=cy[0];
fuzz=Fuzz*run::norm(cy,10);
y=boundtri(cy,min,b.empty ? c0 : min(c0,b.bottom),fuzz,maxdepth);
Y=boundtri(cy,max,b.empty ? c0 : max(c0,b.top),fuzz,maxdepth);
-
+
c0=cz[0];
fuzz=Fuzz*run::norm(cz,10);
z=boundtri(cz,min,b.empty ? c0 : min(c0,b.near),fuzz,maxdepth);
Z=boundtri(cz,max,b.empty ? c0 : max(c0,b.far),fuzz,maxdepth);
}
-
+
b.add(x,y,z);
b.add(X,Y,Z);
@@ -401,7 +405,7 @@ void drawBezierTriangle::ratio(const double* t, pair &b,
Controls[6]=t*controls[6];
Controls[9]=t*controls[9];
}
-
+
triple v=Controls[0];
double x=xratio(v);
double y=yratio(v);
@@ -432,13 +436,13 @@ void drawBezierTriangle::ratio(const double* t, pair &b,
b=pair(xratio(v),yratio(v));
first=false;
}
-
+
b=pair(boundtri(Controls,m,xratio,b.getx(),fuzz,maxdepth),
boundtri(Controls,m,yratio,b.gety(),fuzz,maxdepth));
}
}
-bool drawBezierTriangle::write(prcfile *out, unsigned int *, double,
+bool drawBezierTriangle::write(prcfile *out, unsigned int *, double,
groupsmap&)
{
if(invisible || primitive)
@@ -446,7 +450,7 @@ bool drawBezierTriangle::write(prcfile *out, unsigned int *, double,
RGBAColour Black(0.0,0.0,0.0,diffuse.A);
PRCmaterial m(Black,diffuse,emissive,specular,opacity,shininess);
-
+
static const double third=1.0/3.0;
static const double third2=2.0/3.0;
triple Controls[]={controls[0],controls[0],controls[0],controls[0],
@@ -458,7 +462,7 @@ bool drawBezierTriangle::write(prcfile *out, unsigned int *, double,
controls[5],controls[6],controls[7],
controls[8],controls[9]};
out->addPatch(Controls,m);
-
+
return true;
}
@@ -472,16 +476,18 @@ bool drawBezierTriangle::write(jsfile *out)
meshinit();
drawElement::centerIndex=centerIndex;
} else drawElement::centerIndex=0;
-
+
setcolors(colors,diffuse,emissive,specular,shininess,metallic,fresnel0,out);
-
+
+ out->precision(digits);
if(straight) {
triple Controls[]={controls[0],controls[6],controls[9]};
out->addPatch(Controls,3,Min,Max,colors,3);
} else
out->addPatch(controls,10,Min,Max,colors,3);
-
-#endif
+ out->precision(getSetting<Int>("digits"));
+
+#endif
return true;
}
@@ -492,9 +498,9 @@ void drawBezierTriangle::render(double size2, const triple& b, const triple& B,
if(invisible) return;
transparent=colors ? colors[0].A+colors[1].A+colors[2].A < 3.0 :
diffuse.A < 1.0;
-
+
setcolors(colors,diffuse,emissive,specular,shininess,metallic,fresnel0);
-
+
if(transparent)
setMaterial(transparentData,drawTransparent);
else {
@@ -505,18 +511,19 @@ void drawBezierTriangle::render(double size2, const triple& b, const triple& B,
}
bool offscreen;
- if(gl::exporting)
- offscreen=false;
- else if(billboard) {
+ if(billboard) {
drawElement::centerIndex=centerIndex;
BB.init(center);
offscreen=bbox2(Min,Max,BB).offscreen();
} else
offscreen=bbox2(Min,Max).offscreen();
-
+
if(offscreen) { // Fully offscreen
S.Onscreen=false;
S.data.clear();
+ S.transparent=transparent;
+ S.color=colors;
+ S.notRendered();
return;
}
@@ -525,7 +532,7 @@ void drawBezierTriangle::render(double size2, const triple& b, const triple& B,
if(billboard) {
Controls=Controls0;
for(size_t i=0; i < 10; i++) {
- Controls[i]=BB.transform(controls[i]);
+ Controls[i]=BB.transform(controls[i]);
}
} else {
Controls=controls;
@@ -536,7 +543,7 @@ void drawBezierTriangle::render(double size2, const triple& b, const triple& B,
}
double s=perspective ? Min.getz()*perspective : 1.0; // Move to glrender
-
+
const pair size3(s*(B.getx()-b.getx()),s*(B.gety()-b.gety()));
if(gl::outlinemode) {
@@ -563,7 +570,7 @@ drawElement *drawBezierTriangle::transformed(const double* t)
{
return new drawBezierTriangle(t,this);
}
-
+
bool drawNurbs::write(prcfile *out, unsigned int *, double, groupsmap&)
{
if(invisible)
@@ -572,7 +579,7 @@ bool drawNurbs::write(prcfile *out, unsigned int *, double, groupsmap&)
RGBAColour Black(0.0,0.0,0.0,diffuse.A);
PRCmaterial m(Black,diffuse,emissive,specular,opacity,shininess);
out->addSurface(udegree,vdegree,nu,nv,controls,uknots,vknots,m,weights);
-
+
return true;
}
@@ -581,7 +588,7 @@ void drawNurbs::bounds(const double* t, bbox3& b)
{
double x,y,z;
double X,Y,Z;
-
+
const size_t n=nu*nv;
triple* Controls;
if(t == NULL) Controls=controls;
@@ -592,10 +599,10 @@ void drawNurbs::bounds(const double* t, bbox3& b)
}
boundstriples(x,y,z,X,Y,Z,n,Controls);
-
+
b.add(x,y,z);
b.add(X,Y,Z);
-
+
if(t == NULL) {
Min=triple(x,y,z);
Max=triple(X,Y,Z);
@@ -611,7 +618,7 @@ void drawNurbs::ratio(const double *t, pair &b, double (*m)(double, double),
double, bool &first)
{
const size_t n=nu*nv;
-
+
triple* Controls;
if(t == NULL) Controls=controls;
else {
@@ -625,7 +632,7 @@ void drawNurbs::ratio(const double *t, pair &b, double (*m)(double, double),
triple v=Controls[0];
b=pair(xratio(v),yratio(v));
}
-
+
double x=b.getx();
double y=b.gety();
for(size_t i=0; i < n; ++i) {
@@ -634,7 +641,7 @@ void drawNurbs::ratio(const double *t, pair &b, double (*m)(double, double),
y=m(y,yratio(v));
}
b=pair(x,y);
-
+
if(t != NULL)
delete[] Controls;
}
@@ -646,25 +653,25 @@ void drawNurbs::displacement()
size_t n=nu*nv;
size_t nuknots=udegree+nu+1;
size_t nvknots=vdegree+nv+1;
-
+
if(Controls == NULL) {
Controls=new(UseGC) GLfloat[(weights ? 4 : 3)*n];
uKnots=new(UseGC) GLfloat[nuknots];
vKnots=new(UseGC) GLfloat[nvknots];
}
-
+
if(weights)
for(size_t i=0; i < n; ++i)
store(Controls+4*i,controls[i],weights[i]);
else
for(size_t i=0; i < n; ++i)
store(Controls+3*i,controls[i]);
-
+
for(size_t i=0; i < nuknots; ++i)
uKnots[i]=uknots[i];
for(size_t i=0; i < nvknots; ++i)
vKnots[i]=vknots[i];
-#endif
+#endif
}
void drawNurbs::render(double size2, const triple& b, const triple& B,
@@ -683,7 +690,7 @@ void drawPRC::P(triple& t, double x, double y, double z)
double f=T[12]*x+T[13]*y+T[14]*z+T[15];
if(f == 0.0) run::dividebyzero();
f=1.0/f;
-
+
t=triple((T[0]*x+T[1]*y+T[2]*z+T[3])*f,(T[4]*x+T[5]*y+T[6]*z+T[7])*f,
(T[8]*x+T[9]*y+T[10]*z+T[11])*f);
}
@@ -703,11 +710,11 @@ bool drawSphere::write(prcfile *out, unsigned int *, double, groupsmap&)
RGBAColour Black(0.0,0.0,0.0,diffuse.A);
PRCmaterial m(Black,diffuse,emissive,specular,opacity,shininess);
-
+
switch(type) {
case 0: // PRCsphere
{
- if(half)
+ if(half)
out->addHemisphere(1.0,m,NULL,NULL,NULL,1.0,T);
else
out->addSphere(1.0,m,NULL,NULL,NULL,1.0,T);
@@ -723,9 +730,9 @@ bool drawSphere::write(prcfile *out, unsigned int *, double, groupsmap&)
// NURBS representation of a sphere using 10 distinct control points
// K. Qin, J. Comp. Sci. and Tech. 12, 210-216 (1997).
-
+
triple N,S,P1,P2,P3,P4,P5,P6,P7,P8;
-
+
P(N,0.0,0.0,1.0);
P(P1,-2.0,-2.0,1.0);
P(P2,-2.0,-2.0,-1.0);
@@ -736,27 +743,27 @@ bool drawSphere::write(prcfile *out, unsigned int *, double, groupsmap&)
P(P6,2.0,2.0,-1.0);
P(P7,-2.0,2.0,1.0);
P(P8,-2.0,2.0,-1.0);
-
+
triple p0[]={N,P1,P2,S,
N,P3,P4,S,
N,P5,P6,S,
N,P7,P8,S,
N,P1,P2,S,
N,P3,P4,S};
-
+
out->addSurface(2,3,3,4,p0,uknot,vknot,m,Weights);
out->addSurface(2,3,3,4,p0+4,uknot,vknot,m,Weights);
if(!half) {
out->addSurface(2,3,3,4,p0+8,uknot,vknot,m,Weights);
out->addSurface(2,3,3,4,p0+12,uknot,vknot,m,Weights);
}
-
+
break;
}
default:
reportError("Invalid sphere type");
}
-
+
return true;
}
@@ -781,7 +788,7 @@ bool drawSphere::write(jsfile *out)
else
out->addSphere(O,r);
-#endif
+#endif
return true;
}
@@ -792,12 +799,12 @@ bool drawCylinder::write(prcfile *out, unsigned int *, double, groupsmap&)
RGBAColour Black(0.0,0.0,0.0,diffuse.A);
PRCmaterial m(Black,diffuse,emissive,specular,opacity,shininess);
-
+
out->addCylinder(1.0,1.0,m,NULL,NULL,NULL,1.0,T);
-
+
return true;
}
-
+
bool drawCylinder::write(jsfile *out)
{
#ifdef HAVE_LIBGLM
@@ -805,7 +812,7 @@ bool drawCylinder::write(jsfile *out)
return true;
drawElement::centerIndex=0;
-
+
setcolors(false,diffuse,emissive,specular,shininess,metallic,fresnel0,out);
triple E,H,O;
@@ -816,13 +823,13 @@ bool drawCylinder::write(jsfile *out)
triple Z=H-O;
double r=length(X);
double h=length(Z);
-
+
out->addCylinder(O,r,h,Z.polar(false),Z.azimuth(false),core);
-#endif
+#endif
return true;
}
-
+
bool drawDisk::write(prcfile *out, unsigned int *, double, groupsmap&)
{
if(invisible)
@@ -830,12 +837,12 @@ bool drawDisk::write(prcfile *out, unsigned int *, double, groupsmap&)
RGBAColour Black(0.0,0.0,0.0,diffuse.A);
PRCmaterial m(Black,diffuse,emissive,specular,opacity,shininess);
-
+
out->addDisk(1.0,m,NULL,NULL,NULL,1.0,T);
-
+
return true;
}
-
+
bool drawDisk::write(jsfile *out)
{
#ifdef HAVE_LIBGLM
@@ -843,9 +850,9 @@ bool drawDisk::write(jsfile *out)
return true;
drawElement::centerIndex=0;
-
+
setcolors(false,diffuse,emissive,specular,shininess,metallic,fresnel0,out);
-
+
triple E,H,O;
P(E,1.0,0.0,0.0);
P(H,0.0,0.0,1.0);
@@ -853,13 +860,13 @@ bool drawDisk::write(jsfile *out)
triple X=E-O;
triple Z=H-O;
double r=length(X);
-
+
out->addDisk(O,r,Z.polar(false),Z.azimuth(false));
#endif
return true;
}
-
+
bool drawTube::write(jsfile *out)
{
#ifdef HAVE_LIBGLM
@@ -928,7 +935,7 @@ void drawBaseTriangles::ratio(const double* t, pair &b,
}
ratiotriples(b,m,first,nP,tP);
-
+
if(t != NULL)
delete[] tP;
}
@@ -937,7 +944,7 @@ bool drawTriangles::write(prcfile *out, unsigned int *, double, groupsmap&)
{
if(invisible)
return true;
-
+
if(nC) {
const RGBAColour white(1,1,1,opacity);
const RGBAColour black(0,0,0,opacity);
@@ -957,11 +964,11 @@ bool drawTriangles::write(jsfile *out)
#ifdef HAVE_LIBGLM
if(invisible)
return true;
-
+
setcolors(nC,diffuse,emissive,specular,shininess,metallic,fresnel0,out);
-
+
out->addTriangles(nP,P,nN,N,nC,C,nI,PI,NI,CI,Min,Max);
-#endif
+#endif
return true;
}
@@ -971,12 +978,14 @@ void drawTriangles::render(double size2, const triple& b,
{
#ifdef HAVE_GL
if(invisible) return;
-
+
transparent=diffuse.A < 1.0;
- if(!gl::exporting && bbox2(Min,Max).offscreen()) { // Fully offscreen
+ if(bbox2(Min,Max).offscreen()) { // Fully offscreen
R.Onscreen=false;
R.data.clear();
+ R.transparent=transparent;
+ R.notRendered();
return;
}
@@ -991,7 +1000,7 @@ void drawTriangles::render(double size2, const triple& b,
R.append();
return;
}
-
+
R.queue(nP,P,nN,N,nC,C,nI,PI,NI,CI,transparent);
#endif
}
diff --git a/Build/source/utils/asymptote/drawsurface.h b/Build/source/utils/asymptote/drawsurface.h
index 607c9f0701e..9a8010a8d07 100644
--- a/Build/source/utils/asymptote/drawsurface.h
+++ b/Build/source/utils/asymptote/drawsurface.h
@@ -23,7 +23,7 @@ namespace camp {
#ifdef HAVE_LIBGLM
void storecolor(GLfloat *colors, int i, const vm::array &pens, int j);
-#endif
+#endif
class drawSurface : public drawElement {
protected:
@@ -42,40 +42,45 @@ protected:
bool invisible;
Interaction interaction;
bool billboard;
- size_t centerIndex;
-
+ size_t centerIndex;
+
triple Min,Max;
+ int digits;
bool primitive;
-
+
public:
#ifdef HAVE_GL
BezierCurve C;
bool transparent;
-#endif
-
+#endif
+
string wrongsize() {
return (ncontrols == 16 ? "4x4" : "triangular")+
string(" array of triples and array of 4 pens required");
}
-
+
void init() {
- billboard=interaction == BILLBOARD &&
- !settings::getSetting<bool>("offscreen");
+#ifdef HAVE_LIBOSMESA
+ billboard=false;
+#else
+ billboard=interaction == BILLBOARD;
+#endif
centerIndex=0;
}
-
+
drawSurface(const vm::array& g, size_t ncontrols, triple center,
bool straight, const vm::array&p, double opacity,
double shininess, double metallic, double fresnel0,
- const vm::array &pens, Interaction interaction,
+ const vm::array &pens, Interaction interaction, int digits,
bool primitive=true, const string& key="") :
drawElement(key), ncontrols(ncontrols), center(center), straight(straight),
opacity(opacity), shininess(shininess), metallic(metallic),
- fresnel0(fresnel0), interaction(interaction), primitive(primitive) {
+ fresnel0(fresnel0), interaction(interaction), digits(digits),
+ primitive(primitive) {
init();
if(checkArray(&g) != 4 || checkArray(&p) != 3)
reportError(wrongsize());
-
+
size_t k=0;
controls=new(UseGC) triple[ncontrols];
for(unsigned int i=0; i < 4; ++i) {
@@ -86,113 +91,113 @@ public:
for(unsigned int j=0; j < n; ++j)
controls[k++]=vm::read<triple>(gi,j);
}
-
+
pen surfacepen=vm::read<camp::pen>(p,0);
invisible=surfacepen.invisible();
-
+
diffuse=rgba(surfacepen);
emissive=rgba(vm::read<camp::pen>(p,1));
specular=rgba(vm::read<camp::pen>(p,2));
-
+
size_t nodes=(ncontrols == 16 ? 4 : 3);
size_t size=checkArray(&pens);
if(size > 0) {
if(size != nodes) reportError("one vertex pen required per node");
colors=new(UseGC) prc::RGBAColour[nodes];
for(size_t i=0; i < nodes; ++i)
- colors[i]=rgba(vm::read<camp::pen>(pens,i));
+ colors[i]=rgba(vm::read<camp::pen>(pens,i));
} else colors=NULL;
}
-
+
drawSurface(const double* t, const drawSurface *s) :
drawElement(s->KEY), ncontrols(s->ncontrols), straight(s->straight),
diffuse(s->diffuse), emissive(s->emissive), specular(s->specular),
colors(s->colors), opacity(s->opacity), shininess(s->shininess),
metallic(s->metallic), fresnel0(s->fresnel0), invisible(s->invisible),
- interaction(s->interaction), primitive(s->primitive) {
+ interaction(s->interaction), digits(s->digits), primitive(s->primitive) {
init();
if(s->controls) {
controls=new(UseGC) triple[ncontrols];
for(unsigned int i=0; i < ncontrols; ++i)
controls[i]=t*s->controls[i];
} else controls=NULL;
-
+
center=t*s->center;
}
-
+
virtual ~drawSurface() {}
bool is3D() {return true;}
};
-
+
class drawBezierPatch : public drawSurface {
-public:
+public:
#ifdef HAVE_GL
BezierPatch S;
-#endif
-
+#endif
+
drawBezierPatch(const vm::array& g, triple center, bool straight,
- const vm::array&p, double opacity, double shininess,
- double metallic, double fresnel0, const vm::array &pens,
- Interaction interaction, bool primitive) :
+ const vm::array&p, double opacity, double shininess,
+ double metallic, double fresnel0, const vm::array &pens,
+ Interaction interaction, int digits, bool primitive) :
drawSurface(g,16,center,straight,p,opacity,shininess,metallic,fresnel0,
- pens,interaction,primitive) {}
+ pens,interaction,digits,primitive) {}
drawBezierPatch(const double* t, const drawBezierPatch *s) :
drawSurface(t,s) {}
-
+
void bounds(const double* t, bbox3& b);
-
+
void ratio(const double* t, pair &b, double (*m)(double, double),
double fuzz, bool &first);
-
+
void meshinit() {
if(billboard)
centerIndex=centerindex(center);
}
-
+
bool write(prcfile *out, unsigned int *, double, groupsmap&);
bool write(jsfile *out);
-
+
void render(double, const triple& b, const triple& B,
double perspective, bool remesh);
drawElement *transformed(const double* t);
};
-
+
class drawBezierTriangle : public drawSurface {
public:
#ifdef HAVE_GL
BezierTriangle S;
-#endif
-
+#endif
+
drawBezierTriangle(const vm::array& g, triple center, bool straight,
const vm::array&p, double opacity, double shininess,
double metallic, double fresnel0, const vm::array &pens,
- Interaction interaction, bool primitive) :
+ Interaction interaction, int digits, bool primitive) :
drawSurface(g,10,center,straight,p,opacity,shininess,metallic,fresnel0,
- pens,interaction,primitive) {}
-
+ pens,interaction,digits,primitive) {}
+
drawBezierTriangle(const double* t, const drawBezierTriangle *s) :
drawSurface(t,s) {}
-
+
void bounds(const double* t, bbox3& b);
-
+
void ratio(const double* t, pair &b, double (*m)(double, double),
double fuzz, bool &first);
-
+
void meshinit() {
if(billboard)
centerIndex=centerindex(center);
}
-
+
bool write(prcfile *out, unsigned int *, double, groupsmap&);
bool write(jsfile *out);
-
+
void render(double, const triple& b, const triple& B,
double perspective, bool remesh);
drawElement *transformed(const double* t);
};
-
+
class drawNurbs : public drawElement {
protected:
size_t udegree,vdegree;
@@ -209,16 +214,16 @@ protected:
double fresnel0;
triple normal;
bool invisible;
-
+
triple Min,Max;
-
+
#ifdef HAVE_LIBGLM
GLfloat *colors;
GLfloat *Controls;
GLfloat *uKnots;
GLfloat *vKnots;
-#endif
-
+#endif
+
public:
drawNurbs(const vm::array& g, const vm::array* uknot, const vm::array* vknot,
const vm::array* weight, const vm::array&p, double opacity,
@@ -227,59 +232,59 @@ public:
: drawElement(key), opacity(opacity), shininess(shininess),
metallic(metallic), fresnel0(fresnel0) {
size_t weightsize=checkArray(weight);
-
+
const string wrongsize="Inconsistent NURBS data";
nu=checkArray(&g);
-
+
if(nu == 0 || (weightsize != 0 && weightsize != nu) || checkArray(&p) != 3)
reportError(wrongsize);
-
+
vm::array *g0=vm::read<vm::array*>(g,0);
nv=checkArray(g0);
-
+
size_t n=nu*nv;
controls=new(UseGC) triple[n];
-
+
size_t k=0;
for(size_t i=0; i < nu; ++i) {
vm::array *gi=vm::read<vm::array*>(g,i);
- if(checkArray(gi) != nv)
+ if(checkArray(gi) != nv)
reportError(wrongsize);
for(size_t j=0; j < nv; ++j)
controls[k++]=vm::read<triple>(gi,j);
}
-
+
if(weightsize > 0) {
size_t k=0;
weights=new(UseGC) double[n];
for(size_t i=0; i < nu; ++i) {
vm::array *weighti=vm::read<vm::array*>(weight,i);
- if(checkArray(weighti) != nv)
+ if(checkArray(weighti) != nv)
reportError(wrongsize);
for(size_t j=0; j < nv; ++j)
weights[k++]=vm::read<double>(weighti,j);
}
} else weights=NULL;
-
+
size_t nuknots=checkArray(uknot);
size_t nvknots=checkArray(vknot);
-
+
if(nuknots <= nu+1 || nuknots > 2*nu || nvknots <= nv+1 || nvknots > 2*nv)
reportError(wrongsize);
udegree=nuknots-nu-1;
vdegree=nvknots-nv-1;
-
+
run::copyArrayC(uknots,uknot,0,UseGC);
run::copyArrayC(vknots,vknot,0,UseGC);
-
+
pen surfacepen=vm::read<camp::pen>(p,0);
invisible=surfacepen.invisible();
-
+
diffuse=rgba(surfacepen);
emissive=rgba(vm::read<camp::pen>(p,1));
specular=rgba(vm::read<camp::pen>(p,2));
-
+
#ifdef HAVE_LIBGLM
Controls=NULL;
int size=checkArray(&pens);
@@ -291,45 +296,45 @@ public:
storecolor(colors,12,pens,2);
storecolor(colors,4,pens,3);
} else colors=NULL;
-#endif
+#endif
}
-
+
drawNurbs(const double* t, const drawNurbs *s) :
drawElement(s->KEY), udegree(s->udegree), vdegree(s->vdegree), nu(s->nu),
nv(s->nv), weights(s->weights), uknots(s->uknots), vknots(s->vknots),
diffuse(s->diffuse),
emissive(s->emissive), specular(s->specular), opacity(s->opacity),
shininess(s->shininess), invisible(s->invisible) {
-
+
const size_t n=nu*nv;
controls=new(UseGC) triple[n];
for(unsigned int i=0; i < n; ++i)
controls[i]=t*s->controls[i];
-
+
#ifdef HAVE_LIBGLM
Controls=NULL;
colors=s->colors;
-#endif
+#endif
}
-
+
bool is3D() {return true;}
-
+
void bounds(const double* t, bbox3& b);
-
+
virtual ~drawNurbs() {}
bool write(prcfile *out, unsigned int *, double, groupsmap&);
-
+
void displacement();
void ratio(const double* t, pair &b, double (*m)(double, double), double,
bool &first);
void render(double size2, const triple& b, const triple& B,
double perspective, bool remesh);
-
+
drawElement *transformed(const double* t);
};
-
+
// Draw a transformed PRC object.
class drawPRC : public drawElementLC {
protected:
@@ -345,36 +350,36 @@ public:
void init(const vm::array&p) {
if(checkArray(&p) != 3)
reportError(need3pens);
-
+
pen surfacepen=vm::read<camp::pen>(p,0);
invisible=surfacepen.invisible();
-
+
diffuse=rgba(surfacepen);
emissive=rgba(vm::read<camp::pen>(p,1));
specular=rgba(vm::read<camp::pen>(p,2));
}
-
+
drawPRC(const vm::array& t, const vm::array&p, double opacity,
double shininess, double metallic, double fresnel0) :
drawElementLC(t), opacity(opacity), shininess(shininess),
metallic(metallic), fresnel0(fresnel0) {
init(p);
}
-
+
drawPRC(const vm::array&p, double opacity,
double shininess, double metallic, double fresnel0) :
drawElementLC(NULL), opacity(opacity), shininess(shininess),
metallic(metallic), fresnel0(fresnel0) {
init(p);
}
-
+
drawPRC(const double* t, const drawPRC *s) :
drawElementLC(t,s), diffuse(s->diffuse),
emissive(s->emissive), specular(s->specular), opacity(s->opacity),
shininess(s->shininess), metallic(s->metallic), fresnel0(s->fresnel0),
invisible(s->invisible) {
}
-
+
virtual void P(triple& t, double x, double y, double z);
virtual bool write(prcfile *out, unsigned int *, double, groupsmap&) {
@@ -388,7 +393,7 @@ public:
double (*)(double, double), double, bool&) {}
};
-
+
// Output a unit sphere primitive.
class drawSphere : public drawPRC {
bool half;
@@ -400,17 +405,17 @@ public:
drawSphere(const double* t, const drawSphere *s) :
drawElement(s->KEY), drawPRC(t,s), half(s->half), type(s->type) {}
-
+
void P(triple& t, double x, double y, double z);
-
+
bool write(prcfile *out, unsigned int *, double, groupsmap&);
bool write(jsfile *out);
-
+
drawElement *transformed(const double* t) {
return new drawSphere(t,this);
}
};
-
+
// Output a unit cylinder primitive.
class drawCylinder : public drawPRC {
bool core;
@@ -422,15 +427,15 @@ public:
drawCylinder(const double* t, const drawCylinder *s) :
drawPRC(t,s), core(s->core) {}
-
+
bool write(prcfile *out, unsigned int *, double, groupsmap&);
bool write(jsfile *out);
-
+
drawElement *transformed(const double* t) {
return new drawCylinder(t,this);
}
};
-
+
// Draw a unit disk.
class drawDisk : public drawPRC {
public:
@@ -440,15 +445,15 @@ public:
drawDisk(const double* t, const drawDisk *s) :
drawPRC(t,s) {}
-
+
bool write(prcfile *out, unsigned int *, double, groupsmap&);
bool write(jsfile *out);
-
+
drawElement *transformed(const double* t) {
return new drawDisk(t,this);
}
};
-
+
// Draw a tube.
class drawTube : public drawPRC {
protected:
@@ -469,7 +474,7 @@ public:
for(size_t i=0; i < 4; ++i)
g[i]=vm::read<triple>(G,i);
}
-
+
drawTube(const double* t, const drawTube *s) :
drawElement(s->KEY), drawPRC(t,s), width(s->width), m(s->m), M(s->M),
core(s->core) {
@@ -477,7 +482,7 @@ public:
for(size_t i=0; i < 4; ++i)
g[i]=t*s->g[i];
}
-
+
bool write(jsfile *out);
drawElement *transformed(const double* t) {
@@ -485,14 +490,14 @@ public:
}
};
-
+
class drawBaseTriangles : public drawElement {
protected:
#ifdef HAVE_GL
Triangles R;
bool transparent;
-#endif
-
+#endif
+
size_t nP;
triple* P;
size_t nN;
@@ -501,12 +506,12 @@ protected:
size_t Ni;
uint32_t (*PI)[3];
uint32_t (*NI)[3];
-
+
triple Min,Max;
static const string wrongsize;
static const string outofrange;
-
+
public:
drawBaseTriangles(const vm::array& v, const vm::array& vi,
const vm::array& n, const vm::array& ni) {
@@ -514,7 +519,7 @@ public:
P=new(UseGC) triple[nP];
for(size_t i=0; i < nP; ++i)
P[i]=vm::read<triple>(v,i);
-
+
nI=checkArray(&vi);
PI=new(UseGC) uint32_t[nI][3];
for(size_t i=0; i < nI; ++i) {
@@ -527,13 +532,13 @@ public:
PIi[j]=index;
}
}
-
+
nN=checkArray(&n);
if(nN) {
N=new(UseGC) triple[nN];
for(size_t i=0; i < nN; ++i)
N[i]=vm::read<triple>(n,i);
-
+
Ni=checkArray(&ni);
if(Ni == 0 && nN == nP)
NI=PI;
@@ -560,7 +565,7 @@ public:
P=new(UseGC) triple[nP];
for(size_t i=0; i < nP; i++)
P[i]=t*s->P[i];
-
+
PI=new(UseGC) uint32_t[nI][3];
for(size_t i=0; i < nI; ++i) {
uint32_t *PIi=PI[i];
@@ -596,27 +601,27 @@ public:
}
}
}
-
+
bool is3D() {return true;}
-
+
void bounds(const double* t, bbox3& b);
-
+
void ratio(const double* t, pair &b, double (*m)(double, double),
double fuzz, bool &first);
-
+
virtual ~drawBaseTriangles() {}
-
+
drawElement *transformed(const double* t) {
return new drawBaseTriangles(t,this);
}
};
-
+
class drawTriangles : public drawBaseTriangles {
size_t nC;
prc::RGBAColour*C;
uint32_t (*CI)[3];
size_t Ci;
-
+
// Asymptote material data
prc::RGBAColour diffuse;
prc::RGBAColour emissive;
@@ -626,7 +631,7 @@ class drawTriangles : public drawBaseTriangles {
double metallic;
double fresnel0;
bool invisible;
-
+
public:
drawTriangles(const vm::array& v, const vm::array& vi,
const vm::array& n, const vm::array& ni,
@@ -638,19 +643,19 @@ public:
if(checkArray(&p) != 3)
reportError(need3pens);
-
+
const pen surfacepen=vm::read<camp::pen>(p,0);
invisible=surfacepen.invisible();
diffuse=rgba(surfacepen);
-
+
nC=checkArray(&c);
if(nC) {
C=new(UseGC) prc::RGBAColour[nC];
for(size_t i=0; i < nC; ++i)
C[i]=rgba(vm::read<camp::pen>(c,i));
-
+
size_t nI=checkArray(&vi);
-
+
Ci=checkArray(&ci);
if(Ci == 0 && nC == nP)
CI=PI;
@@ -674,18 +679,18 @@ public:
}
specular=rgba(vm::read<camp::pen>(p,2));
}
-
+
drawTriangles(const double* t, const drawTriangles *s) :
drawBaseTriangles(t,s), nC(s->nC),
diffuse(s->diffuse), emissive(s->emissive),
- specular(s->specular), opacity(s->opacity), shininess(s->shininess),
+ specular(s->specular), opacity(s->opacity), shininess(s->shininess),
metallic(s->metallic), fresnel0(s->fresnel0), invisible(s->invisible) {
-
+
if(nC) {
C=new(UseGC) prc::RGBAColour[nC];
for(size_t i=0; i < nC; ++i)
C[i]=s->C[i];
-
+
CI=new(UseGC) uint32_t[nI][3];
for(size_t i=0; i < nI; ++i) {
uint32_t *CIi=CI[i];
@@ -695,15 +700,15 @@ public:
}
}
}
-
+
virtual ~drawTriangles() {}
-
+
void render(double size2, const triple& b, const triple& B,
double perspective, bool remesh);
-
+
bool write(prcfile *out, unsigned int *, double, groupsmap&);
bool write(jsfile *out);
-
+
drawElement *transformed(const double* t) {
return new drawTriangles(t,this);
}
diff --git a/Build/source/utils/asymptote/drawverbatim.h b/Build/source/utils/asymptote/drawverbatim.h
index 186dc544422..454d22a3003 100644
--- a/Build/source/utils/asymptote/drawverbatim.h
+++ b/Build/source/utils/asymptote/drawverbatim.h
@@ -13,7 +13,7 @@
namespace camp {
enum Language {PostScript,TeX};
-
+
class drawVerbatim : public drawElement {
private:
Language language;
@@ -22,31 +22,31 @@ private:
pair min,max;
bool havebounds;
public:
- drawVerbatim(Language language, const string& text) :
+ drawVerbatim(Language language, const string& text) :
language(language), text(text), userbounds(false), havebounds(false) {}
-
+
drawVerbatim(Language language, const string& text, pair min,
- pair max) :
+ pair max) :
language(language), text(text), userbounds(true), min(min), max(max),
havebounds(false) {}
-
+
virtual ~drawVerbatim() {}
void bounds(bbox& b, iopipestream& tex, boxvector&, bboxlist&) {
if(havebounds) return;
havebounds=true;
- if(language == TeX)
+ if(language == TeX)
tex << text << "%" << newl;
if(userbounds) {
b += min;
b += max;
}
}
-
+
bool islabel() {
return language == TeX;
}
-
+
bool draw(psfile *out) {
if(language == PostScript) out->verbatimline(text);
return true;
diff --git a/Build/source/utils/asymptote/entry.cc b/Build/source/utils/asymptote/entry.cc
index e2c27681c39..7a780fdd56b 100644
--- a/Build/source/utils/asymptote/entry.cc
+++ b/Build/source/utils/asymptote/entry.cc
@@ -123,90 +123,6 @@ bool tenv::add(symbol src, symbol dest,
return false;
}
-#if 0 //{{{
-/*NOHASH*/ void venv::add(venv& source, varEntry *qualifier, coder &c)
-/*NOHASH*/ {
-/*NOHASH*/ // Enter each distinct (unshadowed) name,type pair.
-/*NOHASH*/ for(names_t::iterator p = source.names.begin();
-/*NOHASH*/ p != source.names.end();
-/*NOHASH*/ ++p)
-/*NOHASH*/ add(p->first, p->first, source, qualifier, c);
-/*NOHASH*/ }
-/*NOHASH*/
-/*NOHASH*/ bool venv::add(symbol src, symbol dest,
-/*NOHASH*/ venv& source, varEntry *qualifier, coder &c)
-/*NOHASH*/ {
-/*NOHASH*/ bool added=false;
-/*NOHASH*/ name_t &list=source.names[src];
-/*NOHASH*/ types::overloaded set; // To keep track of what is shadowed.
-/*NOHASH*/ bool special = src.special();
-/*NOHASH*/
-/*NOHASH*/ for(name_iterator p = list.begin();
-/*NOHASH*/ p != list.end();
-/*NOHASH*/ ++p) {
-/*NOHASH*/ varEntry *v=*p;
-/*NOHASH*/ if (!equivalent(v->getType(), &set)) {
-/*NOHASH*/ set.addDistinct(v->getType(), special);
-/*NOHASH*/ if (v->checkPerm(READ, c)) {
-/*NOHASH*/ enter(dest, qualifyVarEntry(qualifier, v));
-/*NOHASH*/ added=true;
-/*NOHASH*/ }
-/*NOHASH*/ }
-/*NOHASH*/ }
-/*NOHASH*/
-/*NOHASH*/ return added;
-/*NOHASH*/ }
-/*NOHASH*/
-/*NOHASH*/ varEntry *venv::lookByType(symbol name, ty *t)
-/*NOHASH*/ {
-/*NOHASH*/ // Find first applicable function.
-/*NOHASH*/ name_t &list = names[name];
-/*NOHASH*/ for(name_iterator p = list.begin();
-/*NOHASH*/ p != list.end();
-/*NOHASH*/ ++p) {
-/*NOHASH*/ if (equivalent((*p)->getType(), t))
-/*NOHASH*/ return *p;
-/*NOHASH*/ }
-/*NOHASH*/ return 0;
-/*NOHASH*/ }
-/*NOHASH*/
-/*NOHASH*/ void venv::list(record *module)
-/*NOHASH*/ {
-/*NOHASH*/ bool where=settings::getSetting<bool>("where");
-/*NOHASH*/ // List all functions and variables.
-/*NOHASH*/ for(names_t::iterator N = names.begin(); N != names.end(); ++N) {
-/*NOHASH*/ symbol s=N->first;
-/*NOHASH*/ name_t &list=names[s];
-/*NOHASH*/ for(name_iterator p = list.begin(); p != list.end(); ++p) {
-/*NOHASH*/ if(!module || (*p)->whereDefined() == module) {
-/*NOHASH*/ if(where) cout << (*p)->getPos();
-/*NOHASH*/ (*p)->getType()->printVar(cout, s);
-/*NOHASH*/ cout << ";\n";
-/*NOHASH*/ }
-/*NOHASH*/ }
-/*NOHASH*/ }
-/*NOHASH*/ flush(cout);
-/*NOHASH*/ }
-/*NOHASH*/
-/*NOHASH*/ ty *venv::getType(symbol name)
-/*NOHASH*/ {
-/*NOHASH*/ types::overloaded set;
-/*NOHASH*/
-/*NOHASH*/ // Find all applicable functions in scope.
-/*NOHASH*/ name_t &list = names[name];
-/*NOHASH*/ bool special = name.special();
-/*NOHASH*/
-/*NOHASH*/ for(name_iterator p = list.begin();
-/*NOHASH*/ p != list.end();
-/*NOHASH*/ ++p) {
-/*NOHASH*/ set.addDistinct((*p)->getType(), special);
-/*NOHASH*/ }
-/*NOHASH*/
-/*NOHASH*/ return set.simplify();
-/*NOHASH*/ }
-// }}}
-#else
-
// To avoid writing qualifiers everywhere.
typedef core_venv::cell cell;
@@ -304,15 +220,15 @@ varEntry *core_venv::storeNonSpecialAfterTomb(size_t tombIndex,
signature *sig = ent->getSignature();
for (size_t i = tombIndex+1; ; ++i)
- {
- cell& b = cellByIndex(i);
+ {
+ cell& b = cellByIndex(i);
- if (b.empty())
- return storeNew(cellByIndex(tombIndex), name, ent);
+ if (b.empty())
+ return storeNew(cellByIndex(tombIndex), name, ent);
- if (b.matches(name, sig))
- return b.replaceWith(name, ent);
- }
+ if (b.matches(name, sig))
+ return b.replaceWith(name, ent);
+ }
}
varEntry *core_venv::storeSpecialAfterTomb(size_t tombIndex,
@@ -324,15 +240,15 @@ varEntry *core_venv::storeSpecialAfterTomb(size_t tombIndex,
ty *t = ent->getType();
for (size_t i = tombIndex+1; ; ++i)
- {
- cell& b = cellByIndex(i);
+ {
+ cell& b = cellByIndex(i);
- if (b.empty())
- return storeNew(cellByIndex(tombIndex), name, ent);
+ if (b.empty())
+ return storeNew(cellByIndex(tombIndex), name, ent);
- if (b.matches(name, t))
- return b.replaceWith(name, ent);
- }
+ if (b.matches(name, t))
+ return b.replaceWith(name, ent);
+ }
}
size_t hashSig(const signature *sig) {
@@ -358,18 +274,18 @@ varEntry *core_venv::storeNonSpecial(symbol name, varEntry *ent) {
signature *sig = ent->getSignature();
for (size_t i = nonSpecialHash(name, sig); ; ++i)
- {
- cell& b = cellByIndex(i);
+ {
+ cell& b = cellByIndex(i);
- if (b.empty())
- return storeNew(b, name, ent);
+ if (b.empty())
+ return storeNew(b, name, ent);
- if (b.matches(name, sig))
- return b.replaceWith(name, ent);
+ if (b.matches(name, sig))
+ return b.replaceWith(name, ent);
- if (b.isATomb())
- return storeNonSpecialAfterTomb(i, name, ent);
- }
+ if (b.isATomb())
+ return storeNonSpecialAfterTomb(i, name, ent);
+ }
}
varEntry *core_venv::storeSpecial(symbol name, varEntry *ent) {
@@ -380,18 +296,18 @@ varEntry *core_venv::storeSpecial(symbol name, varEntry *ent) {
ty *t = ent->getType();
for (size_t i = specialHash(name, t); ; ++i)
- {
- cell& b = cellByIndex(i);
+ {
+ cell& b = cellByIndex(i);
- if (b.empty())
- return storeNew(b, name, ent);
+ if (b.empty())
+ return storeNew(b, name, ent);
- if (b.matches(name, t))
- return b.replaceWith(name, ent);
+ if (b.matches(name, t))
+ return b.replaceWith(name, ent);
- if (b.isATomb())
- return storeSpecialAfterTomb(i, name, ent);
- }
+ if (b.isATomb())
+ return storeSpecialAfterTomb(i, name, ent);
+ }
}
varEntry *core_venv::store(symbol name, varEntry *ent) {
@@ -399,7 +315,7 @@ varEntry *core_venv::store(symbol name, varEntry *ent) {
DEBUG_CACHE_ASSERT(ent->getType());
return name.special() ? storeSpecial(name, ent) :
- storeNonSpecial(name, ent);
+ storeNonSpecial(name, ent);
}
varEntry *core_venv::lookupSpecial(symbol name, const ty *t) {
@@ -407,54 +323,54 @@ varEntry *core_venv::lookupSpecial(symbol name, const ty *t) {
DEBUG_CACHE_ASSERT(t);
for (size_t i = specialHash(name, t); ; ++i)
- {
- cell& b = cellByIndex(i);
+ {
+ cell& b = cellByIndex(i);
- if (b.matches(name, t))
- return b.ent;
+ if (b.matches(name, t))
+ return b.ent;
- if (b.empty())
- return 0;
- }
+ if (b.empty())
+ return 0;
+ }
}
varEntry *core_venv::lookupNonSpecial(symbol name, const signature *sig) {
DEBUG_CACHE_ASSERT(name.notSpecial());
for (size_t i = nonSpecialHash(name, sig); ; ++i)
- {
- cell& b = cellByIndex(i);
+ {
+ cell& b = cellByIndex(i);
- if (b.matches(name, sig))
- return b.ent;
+ if (b.matches(name, sig))
+ return b.ent;
- if (b.empty())
- return 0;
- }
+ if (b.empty())
+ return 0;
+ }
}
varEntry *core_venv::lookup(symbol name, const ty *t) {
DEBUG_CACHE_ASSERT(t);
return name.special() ? lookupSpecial(name, t) :
- lookupNonSpecial(name, t->getSignature());
+ lookupNonSpecial(name, t->getSignature());
}
void core_venv::removeNonSpecial(symbol name, const signature *sig) {
DEBUG_CACHE_ASSERT(name.notSpecial());
for (size_t i = nonSpecialHash(name, sig); ; ++i)
- {
- cell& b = cellByIndex(i);
+ {
+ cell& b = cellByIndex(i);
- if (b.matches(name, sig)) {
- b.remove();
- --size;
- return;
- }
+ if (b.matches(name, sig)) {
+ b.remove();
+ --size;
+ return;
+ }
- DEBUG_CACHE_ASSERT(!b.empty());
- }
+ DEBUG_CACHE_ASSERT(!b.empty());
+ }
}
void core_venv::removeSpecial(symbol name, const ty *t) {
@@ -462,17 +378,17 @@ void core_venv::removeSpecial(symbol name, const ty *t) {
DEBUG_CACHE_ASSERT(t);
for (size_t i = specialHash(name, t); ; ++i)
- {
- cell& b = cellByIndex(i);
+ {
+ cell& b = cellByIndex(i);
- if (b.matches(name, t)) {
- b.remove();
- --size;
- return;
- }
+ if (b.matches(name, t)) {
+ b.remove();
+ --size;
+ return;
+ }
- DEBUG_CACHE_ASSERT(!b.empty());
- }
+ DEBUG_CACHE_ASSERT(!b.empty());
+ }
}
void core_venv::remove(symbol name, const ty *t) {
@@ -532,7 +448,7 @@ void venv::checkName(symbol name)
}
assert(matches == size);
}
-
+
void rightKind(ty *t) {
if (t && t->isOverloaded()) {
ty_vector& set=((overloaded *)t)->sub;
@@ -584,7 +500,7 @@ void venv::namevalue::replaceType(ty *new_t, ty *old_t) {
#endif
// TODO: Test for equivalence.
-
+
if (t->isOverloaded()) {
for (ty_iterator i = t->begin(); i != t->end(); ++i) {
if (equivalent(old_t, *i)) {
@@ -612,7 +528,7 @@ void venv::namevalue::replaceType(ty *new_t, ty *old_t) {
#ifdef DEBUG_CACHE
void venv::namevalue::popType(ty *s)
#else
-void venv::namevalue::popType()
+ void venv::namevalue::popType()
#endif
{
#ifdef DEBUG_CACHE
@@ -645,7 +561,7 @@ void venv::namevalue::popType()
RIGHTKIND(t);
// Don't try to reduce numFormals as I doubt it is worth the cost of
- // recalculating.
+ // recalculating.
}
void venv::remove(const addition& a) {
@@ -764,7 +680,7 @@ varEntry *venv::lookBySignature(symbol name, signature *sig) {
// See if this exactly matches a function in the table.
varEntry *ve = core.lookupNonSpecial(name, sig);
-
+
if (!ve)
return 0;
@@ -782,14 +698,14 @@ void venv::add(venv& source, varEntry *qualifier, coder &c)
{
core_venv::const_iterator end = source.core.end();
for (core_venv::const_iterator p = source.core.begin(); p != end; ++p)
- {
- DEBUG_CACHE_ASSERT(p->filled());
+ {
+ DEBUG_CACHE_ASSERT(p->filled());
- varEntry *v=p->ent;
- if (v->checkPerm(READ, c)) {
- enter(p->name, qualifyVarEntry(qualifier, v));
+ varEntry *v=p->ent;
+ if (v->checkPerm(READ, c)) {
+ enter(p->name, qualifyVarEntry(qualifier, v));
+ }
}
- }
}
bool venv::add(symbol src, symbol dest,
@@ -803,13 +719,13 @@ bool venv::add(symbol src, symbol dest,
if (t->isOverloaded()) {
bool added=false;
for (ty_iterator i = t->begin(); i != t->end(); ++i)
- {
- varEntry *v=source.lookByType(src, *i);
- if (v->checkPerm(READ, c)) {
- enter(dest, qualifyVarEntry(qualifier, v));
- added=true;
+ {
+ varEntry *v=source.lookByType(src, *i);
+ if (v->checkPerm(READ, c)) {
+ enter(dest, qualifyVarEntry(qualifier, v));
+ added=true;
+ }
}
- }
return added;
}
else {
@@ -831,14 +747,14 @@ ty *venv::getType(symbol name)
void listValue(symbol name, varEntry *v, record *module)
{
if (!module || v->whereDefined() == module)
- {
- if (settings::getSetting<bool>("where"))
- cout << v->getPos();
+ {
+ if (settings::getSetting<bool>("where"))
+ cout << v->getPos();
- v->getType()->printVar(cout, name);
+ v->getType()->printVar(cout, name);
- cout << ";\n";
- }
+ cout << ";\n";
+ }
}
void venv::listValues(symbol name, record *module)
@@ -868,6 +784,4 @@ void venv::completions(mem::list<symbol >& l, string start)
l.push_back(N->first);
}
-#endif /* not NOHASH */
-
} // namespace trans
diff --git a/Build/source/utils/asymptote/entry.h b/Build/source/utils/asymptote/entry.h
index 0c1441c6a09..e11ad59940e 100644
--- a/Build/source/utils/asymptote/entry.h
+++ b/Build/source/utils/asymptote/entry.h
@@ -47,7 +47,7 @@ class entry : public gc {
// Reports an error if permission is not allowed.
void report(action act, position pos, coder &c);
};
-
+
mem::list<pr> perms;
void addPerm(permission perm, record *r) {
@@ -62,7 +62,7 @@ class entry : public gc {
// The location (file and line number) where the entry was defined.
position pos;
-
+
public:
entry(record *where, position pos) : where(where), pos(pos) {}
entry(permission perm, record *r, record *where, position pos)
@@ -73,7 +73,7 @@ public:
// (Non-destructively) merges two entries, appending permission lists.
// The 'where' member is taken from the second entry.
entry(entry &e1, entry &e2);
-
+
// Create an entry with one more permission in the list.
entry(entry &base, permission perm, record *r);
@@ -83,12 +83,12 @@ public:
record *whereDefined() {
return where;
}
-
+
position getPos() {
return pos;
}
};
-
+
class varEntry : public entry {
ty *t;
access *location;
@@ -179,40 +179,6 @@ public:
tenv& source, varEntry *qualifier, coder &c);
};
-#if 0 //{{{
- /* This version of venv is provided for compiling on systems which do not
- * have some form of STL hash table. It will eventually be removed.
- * See the hash version below for documentation on the functions.
- */
-/*NOHASH*/ class venv : public sym::table<varEntry*> {
-/*NOHASH*/ public:
-/*NOHASH*/ venv() {}
-/*NOHASH*/
-/*NOHASH*/ struct file_env_tag {};
-/*NOHASH*/ venv(file_env_tag) {}
-/*NOHASH*/
-/*NOHASH*/ void add(venv& source, varEntry *qualifier, coder &c);
-/*NOHASH*/
-/*NOHASH*/ bool add(symbol src, symbol dest,
-/*NOHASH*/ venv& source, varEntry *qualifier, coder &c);
-/*NOHASH*/
-/*NOHASH*/ varEntry *lookByType(symbol name, ty *t);
-/*NOHASH*/
-/*NOHASH*/ varEntry *lookBySignature(symbol name, signature *sig) {
-/*NOHASH*/ // This optimization is not implemented for the NOHASH version.
-/*NOHASH*/ return 0;
-/*NOHASH*/ }
-/*NOHASH*/
-/*NOHASH*/ ty *getType(symbol name);
-/*NOHASH*/
-/*NOHASH*/ friend std::ostream& operator<< (std::ostream& out,
-/*NOHASH*/ const venv& ve);
-/*NOHASH*/
-/*NOHASH*/ void list(record *module=0);
-/*NOHASH*/ };
-
-//}}}
-#else
// For speed reasons, many asserts are only tested when DEBUG_CACHE is set.
#ifdef DEBUG_CACHE
@@ -425,7 +391,7 @@ class venv {
namevalue() : maxFormals(0), t(0) {}
void addType(ty *s);
-
+
void replaceType(ty *new_t, ty *old_t);
#if DEBUG_CACHE
@@ -475,9 +441,9 @@ public:
venv(file_env_tag)
: core(fileCoreSize),
#ifndef NOHASH
- names(fileNamesSize),
+ names(fileNamesSize),
#endif
- empty_scopes(0) {}
+ empty_scopes(0) {}
// Add a new variable definition.
void enter(symbol name, varEntry *v);
@@ -518,7 +484,7 @@ public:
void beginScope();
void endScope();
-
+
// Merges the top-level scope with the level immediately underneath it.
void collapseScope();
@@ -528,7 +494,6 @@ public:
// Adds to l, all names prefixed by start.
void completions(mem::list<symbol>& l, string start);
};
-#endif
} // namespace trans
diff --git a/Build/source/utils/asymptote/env.cc b/Build/source/utils/asymptote/env.cc
index 09d16f21a04..3b0a59b7a32 100644
--- a/Build/source/utils/asymptote/env.cc
+++ b/Build/source/utils/asymptote/env.cc
@@ -32,7 +32,7 @@ public:
return e.castable(target, source, name);
}
};
-
+
access *protoenv::baseLookupCast(ty *target, ty *source, symbol name) {
static identAccess id;
@@ -159,10 +159,10 @@ ty *protoenv::castTarget(ty *target, ty *source, symbol name) {
return e.castable(target, source, name) ? target : 0;
}
};
-
+
resolver r(*this, name);
return r.collect(target, source);
-}
+}
ty *protoenv::castSource(ty *target, ty *source, symbol name) {
struct resolver : public collector {
@@ -176,10 +176,10 @@ ty *protoenv::castSource(ty *target, ty *source, symbol name) {
return e.castable(target, source, name) ? source : 0;
}
};
-
+
resolver r(*this, name);
return r.collect(target, source);
-}
+}
void protoenv::addArrayOps(array *a)
{
diff --git a/Build/source/utils/asymptote/env.h b/Build/source/utils/asymptote/env.h
index 7fd7a003e51..0f979026206 100644
--- a/Build/source/utils/asymptote/env.h
+++ b/Build/source/utils/asymptote/env.h
@@ -47,7 +47,7 @@ public:
: ve(tag) {}
protoenv(const protoenv&);
-
+
void beginScope()
{
te.beginScope(); ve.beginScope();
@@ -120,7 +120,7 @@ public:
{
te.enter(name, desc);
}
-
+
void addVar(symbol name, varEntry *desc)
{
// Don't check for multiple variables, as this makes adding casts
@@ -140,7 +140,7 @@ public:
bool add(symbol src, symbol dest,
protoenv &source, varEntry *qualifier, coder &c)
{
- return te.add(src, dest, source.te, qualifier, c) |
+ return te.add(src, dest, source.te, qualifier, c) |
ve.add(src, dest, source.ve, qualifier, c);
}
diff --git a/Build/source/utils/asymptote/errormsg.cc b/Build/source/utils/asymptote/errormsg.cc
index a2b62c7fadd..afa307283b9 100644
--- a/Build/source/utils/asymptote/errormsg.cc
+++ b/Build/source/utils/asymptote/errormsg.cc
@@ -9,6 +9,8 @@
#include <cstdlib>
#include "errormsg.h"
+#include "interact.h"
+#include "fileio.h"
errorstream em;
@@ -22,8 +24,30 @@ ostream& operator<< (ostream& out, const position& pos)
if (!pos)
return out;
- out << pos.file->name() << ": ";
+ string filename=pos.file->name();
+
+ if(filename != "-" && !settings::getSetting<bool>("quiet")) {
+ std::ifstream fin(pos.file->name().c_str());
+ string s;
+ size_t count=pos.line;
+ while(count > 0 && getline(fin,s)) {
+ count--;
+ }
+ out << s << endl;
+ for(size_t i=1; i < pos.column; ++i)
+ out << " ";
+ out << "^" << endl;
+ }
+
+ out << filename << ": ";
out << pos.line << "." << pos.column << ": ";
+
+ if(settings::getSetting<bool>("xasy")) {
+ camp::openpipeout();
+ fprintf(camp::pipeout,"Error\n");
+ fflush(camp::pipeout);
+ }
+
return out;
}
@@ -85,7 +109,7 @@ void errorstream::fatal(position pos)
void errorstream::trace(position pos)
{
static position lastpos;
- if(!pos || (pos.match(lastpos.filename()) && pos.match(lastpos.Line())))
+ if(!pos || (pos.match(lastpos.filename()) && pos.match(lastpos.Line())))
return;
lastpos=pos;
message(pos,"");
@@ -103,7 +127,7 @@ void errorstream::sync()
floating = false;
}
-void outOfMemory()
+void outOfMemory()
{
cerr << "error: out of memory" << endl;
exit(1);
diff --git a/Build/source/utils/asymptote/errormsg.h b/Build/source/utils/asymptote/errormsg.h
index 22e7f79f1fe..180c2309f7d 100644
--- a/Build/source/utils/asymptote/errormsg.h
+++ b/Build/source/utils/asymptote/errormsg.h
@@ -31,7 +31,7 @@ public:
{
return lineNum;
}
-
+
string name() const {
return filename;
}
@@ -52,12 +52,12 @@ public:
return filename.substr(start, end-start);
}
-
+
// Specifies a newline symbol at the character position given.
void newline() {
++lineNum;
}
-
+
};
inline bool operator == (const fileinfo& a, const fileinfo& b)
@@ -85,17 +85,17 @@ public:
{
return file ? file->name() : "";
}
-
+
size_t Line() const
{
return line;
}
-
+
size_t Column() const
{
return column;
}
-
+
std::pair<size_t,size_t>LineColumn() const {
return std::pair<size_t,size_t>(line,column);
}
@@ -103,20 +103,20 @@ public:
bool match(const string& s) {
return file && file->name() == s;
}
-
+
bool match(size_t l) {
return line == l;
}
-
+
bool matchColumn(size_t c) {
return column == c;
}
-
+
bool operator! () const
{
return (file == 0);
}
-
+
friend ostream& operator << (ostream& out, const position& pos);
// Write out just the module name and line number.
@@ -133,27 +133,27 @@ extern position nullPos;
struct nullPosInitializer {
nullPosInitializer() {nullPos.init(NULL,0);}
};
-
+
inline bool operator == (const position& a, const position& b)
{
- return a.Line() == b.Line() && a.Column() == b.Column() &&
- a.filename() == b.filename();
+ return a.Line() == b.Line() && a.Column() == b.Column() &&
+ a.filename() == b.filename();
}
string warning(string s);
-
+
class errorstream {
ostream& out;
bool anyErrors;
bool anyWarnings;
bool floating; // Was a message output without a terminating newline?
-
+
// Is there an error that warrants the asy process to return 1 instead of 0?
bool anyStatusErrors;
public:
static bool interrupt; // Is there a pending interrupt?
-
+
errorstream(ostream& out = cerr)
: out(out), anyErrors(false), anyWarnings(false), floating(false),
anyStatusErrors(false) {}
@@ -162,11 +162,11 @@ public:
void clear();
void message(position pos, const string& s);
-
+
void Interrupt(bool b) {
interrupt=b;
}
-
+
// An error is encountered, not in the user's code, but in the way the
// compiler works! This may be augmented in the future with a message
// to contact the compiler writers.
@@ -184,13 +184,13 @@ public:
// Indicate potential problems in the code, but the code is still usable.
void warning(position pos);
void warning(position pos, string s);
-
+
// Single a fatal error and execute the main process.
void fatal(position pos);
-
+
// Print out position in code to aid debugging.
void trace(position pos);
-
+
// Sends stuff to out to print.
// NOTE: May later make it do automatic line breaking for long messages.
template<class T>
@@ -205,11 +205,11 @@ public:
void sync();
void cont();
-
+
bool errors() const {
return anyErrors;
}
-
+
bool warnings() const {
return anyWarnings || errors();
}
diff --git a/Build/source/utils/asymptote/examples/100d.pdb1 b/Build/source/utils/asymptote/examples/100d.pdb1
new file mode 100644
index 00000000000..d9143c1173b
--- /dev/null
+++ b/Build/source/utils/asymptote/examples/100d.pdb1
@@ -0,0 +1,535 @@
+HEADER DNA/RNA 05-DEC-94 XXXX
+TITLE CRYSTAL STRUCTURE OF THE HIGHLY DISTORTED CHIMERIC DECAMER
+TITLE 2 R(C)D(CGGCGCCG)R(G)-SPERMINE COMPLEX-SPERMINE BINDING TO
+TITLE 3 PHOSPHATE ONLY AND MINOR GROOVE TERTIARY BASE-PAIRING
+COMPND 5'-R(*CP*)-D(*CP*GP*GP*CP*GP*CP*CP*GP*)-R(*G)-3'
+KEYWDS A-DNA/RNA, DOUBLE HELIX
+EXPDTA X-RAY DIFFRACTION
+AUTHOR C.BAN, B.RAMAKRISHNAN, M.SUNDARALINGAM
+JRNL AUTH C.BAN, B.RAMAKRISHNAN, M.SUNDARALINGAM
+JRNL TITL CRYSTAL STRUCTURE OF THE HIGHLY DISTORTED CHIMERIC
+JRNL TITL 2 DECAMER R(C)D(CGGCGCCG)R(G).SPERMINE
+JRNL TITL 3 COMPLEX--SPERMINE BINDING TO PHOSPHATE ONLY AND
+JRNL TITL 4 MINOR GROOVE TERTIARY BASE-PAIRING.
+JRNL REF NUCLEIC ACIDS RES. V. 22 5466 1994
+JRNL REFN ASTM NARHAD UK ISSN 0305-1048
+REMARK 1
+SEQRES 1 A 10 C DC DG DG DC DG DC DC DG G
+SEQRES 1 B 10 C DC DG DG DC DG DC DC DG G
+HETNAM SPM SPERMINE
+FORMUL 3 SPM C10 H26 N4
+FORMUL 4 HOH *67(H2 O)
+CRYST1 23.980 40.770 44.840 90.00 90.00 90.00 P 21 21 21 8
+ORIGX1 1.000000 0.000000 0.000000 0.00000
+ORIGX2 0.000000 1.000000 0.000000 0.00000
+ORIGX3 0.000000 0.000000 1.000000 0.00000
+SCALE1 0.041701 0.000000 0.000000 0.00000
+SCALE2 0.000000 0.024528 0.000000 0.00000
+SCALE3 0.000000 0.000000 0.022302 0.00000
+ATOM 1 N1 C A 1 -4.931 6.902 7.826 1.00 19.25 N
+ATOM 2 C2 C A 1 -4.838 7.263 9.158 1.00 16.72 C
+ATOM 3 O2 C A 1 -4.287 8.308 9.505 1.00 15.49 O
+ATOM 4 N3 C A 1 -5.367 6.448 10.085 1.00 15.96 N
+ATOM 5 C4 C A 1 -5.978 5.310 9.736 1.00 16.84 C
+ATOM 6 N4 C A 1 -6.592 4.588 10.676 1.00 19.14 N
+ATOM 7 C5 C A 1 -6.059 4.907 8.376 1.00 17.68 C
+ATOM 8 C6 C A 1 -5.522 5.732 7.461 1.00 17.68 C
+ATOM 9 O5' C A 1 -4.549 5.095 4.262 1.00 28.71 O
+ATOM 10 C5' C A 1 -4.176 6.323 3.646 1.00 27.35 C
+ATOM 11 C4' C A 1 -3.853 7.410 4.672 1.00 24.41 C
+ATOM 12 O4' C A 1 -4.992 7.650 5.512 1.00 22.53 O
+ATOM 13 C3' C A 1 -2.713 7.010 5.605 1.00 23.56 C
+ATOM 14 O3' C A 1 -1.379 7.127 5.060 1.00 21.02 O
+ATOM 15 C2' C A 1 -2.950 7.949 6.756 1.00 23.73 C
+ATOM 16 O2' C A 1 -2.407 9.267 6.554 1.00 23.93 O
+ATOM 17 C1' C A 1 -4.489 7.917 6.825 1.00 20.60 C
+ATOM 18 P DC A 2 -0.178 6.220 5.647 1.00 24.85 P
+ATOM 19 N1 DC A 2 -1.070 6.635 10.823 1.00 14.48 N
+ATOM 20 C2 DC A 2 -1.417 6.355 12.130 1.00 13.03 C
+ATOM 21 O2 DC A 2 -1.007 7.022 13.094 1.00 11.15 O
+ATOM 22 N3 DC A 2 -2.233 5.297 12.333 1.00 11.95 N
+ATOM 23 C4 DC A 2 -2.681 4.542 11.344 1.00 11.37 C
+ATOM 24 N4 DC A 2 -3.532 3.569 11.652 1.00 11.93 N
+ATOM 25 C5 DC A 2 -2.314 4.796 9.986 1.00 11.95 C
+ATOM 26 C6 DC A 2 -1.510 5.853 9.776 1.00 11.94 C
+ATOM 27 OP1 DC A 2 0.915 6.451 4.671 1.00 25.96 O
+ATOM 28 OP2 DC A 2 -0.948 4.954 5.664 1.00 24.57 O
+ATOM 29 O5' DC A 2 0.435 6.502 7.097 1.00 24.10 O
+ATOM 30 C5' DC A 2 1.020 7.793 7.281 1.00 19.66 C
+ATOM 31 C4' DC A 2 1.034 8.184 8.738 1.00 17.99 C
+ATOM 32 O4' DC A 2 -0.290 8.244 9.222 1.00 17.23 O
+ATOM 33 C3' DC A 2 1.724 7.167 9.617 1.00 18.98 C
+ATOM 34 O3' DC A 2 3.130 7.395 9.564 1.00 18.39 O
+ATOM 35 C2' DC A 2 1.152 7.607 10.934 1.00 17.33 C
+ATOM 36 C1' DC A 2 -0.273 7.853 10.599 1.00 15.44 C
+ATOM 37 P DG A 3 4.177 6.440 10.285 1.00 21.10 P
+ATOM 38 N9 DG A 3 1.615 4.437 14.168 1.00 11.63 N
+ATOM 39 C8 DG A 3 1.389 4.110 12.865 1.00 10.83 C
+ATOM 40 N7 DG A 3 0.474 3.204 12.690 1.00 12.03 N
+ATOM 41 C5 DG A 3 0.093 2.891 13.972 1.00 9.28 C
+ATOM 42 C6 DG A 3 -0.792 1.917 14.408 1.00 6.67 C
+ATOM 43 O6 DG A 3 -1.528 1.253 13.693 1.00 11.90 O
+ATOM 44 N1 DG A 3 -0.833 1.822 15.808 1.00 7.48 N
+ATOM 45 C2 DG A 3 -0.098 2.583 16.686 1.00 7.12 C
+ATOM 46 N2 DG A 3 -0.228 2.346 17.999 1.00 2.92 N
+ATOM 47 N3 DG A 3 0.745 3.531 16.259 1.00 7.08 N
+ATOM 48 C4 DG A 3 0.788 3.626 14.894 1.00 12.36 C
+ATOM 49 OP1 DG A 3 5.469 7.004 9.830 1.00 21.52 O
+ATOM 50 OP2 DG A 3 3.681 5.183 9.686 1.00 14.50 O
+ATOM 51 O5' DG A 3 4.378 6.142 11.832 1.00 19.95 O
+ATOM 52 C5' DG A 3 4.654 7.213 12.730 1.00 17.61 C
+ATOM 53 C4' DG A 3 4.016 6.885 14.035 1.00 17.62 C
+ATOM 54 O4' DG A 3 2.614 6.626 13.799 1.00 16.77 O
+ATOM 55 C3' DG A 3 4.595 5.586 14.598 1.00 16.31 C
+ATOM 56 O3' DG A 3 5.774 5.836 15.353 1.00 18.86 O
+ATOM 57 C2' DG A 3 3.484 5.274 15.528 1.00 17.71 C
+ATOM 58 C1' DG A 3 2.243 5.627 14.740 1.00 16.27 C
+ATOM 59 P DG A 4 6.647 4.633 15.976 1.00 19.10 P
+ATOM 60 N9 DG A 4 3.496 1.232 18.319 1.00 11.82 N
+ATOM 61 C8 DG A 4 3.617 1.742 17.054 1.00 8.09 C
+ATOM 62 N7 DG A 4 2.902 1.118 16.167 1.00 11.07 N
+ATOM 63 C5 DG A 4 2.252 0.091 16.894 1.00 11.16 C
+ATOM 64 C6 DG A 4 1.310 -0.920 16.456 1.00 9.75 C
+ATOM 65 O6 DG A 4 0.888 -1.151 15.321 1.00 9.97 O
+ATOM 66 N1 DG A 4 0.906 -1.749 17.502 1.00 8.27 N
+ATOM 67 C2 DG A 4 1.340 -1.630 18.818 1.00 8.31 C
+ATOM 68 N2 DG A 4 0.852 -2.494 19.717 1.00 6.42 N
+ATOM 69 N3 DG A 4 2.218 -0.681 19.223 1.00 9.10 N
+ATOM 70 C4 DG A 4 2.629 0.144 18.209 1.00 10.34 C
+ATOM 71 OP1 DG A 4 7.834 5.387 16.410 1.00 21.78 O
+ATOM 72 OP2 DG A 4 6.811 3.466 15.083 1.00 20.41 O
+ATOM 73 O5' DG A 4 5.837 4.160 17.304 1.00 19.69 O
+ATOM 74 C5' DG A 4 5.832 4.777 18.613 1.00 14.70 C
+ATOM 75 C4' DG A 4 5.349 3.746 19.615 1.00 15.74 C
+ATOM 76 O4' DG A 4 4.014 3.339 19.320 1.00 15.71 O
+ATOM 77 C3' DG A 4 6.144 2.446 19.549 1.00 14.86 C
+ATOM 78 O3' DG A 4 7.442 2.553 20.185 1.00 20.22 O
+ATOM 79 C2' DG A 4 5.194 1.467 20.191 1.00 13.42 C
+ATOM 80 C1' DG A 4 3.886 1.904 19.582 1.00 13.10 C
+ATOM 81 P DC A 5 8.623 1.481 19.918 1.00 16.11 P
+ATOM 82 N1 DC A 5 5.142 -2.576 17.527 1.00 12.08 N
+ATOM 83 C2 DC A 5 4.179 -3.389 16.962 1.00 12.60 C
+ATOM 84 O2 DC A 5 3.695 -4.327 17.591 1.00 10.69 O
+ATOM 85 N3 DC A 5 3.792 -3.162 15.680 1.00 10.73 N
+ATOM 86 C4 DC A 5 4.335 -2.176 14.967 1.00 10.86 C
+ATOM 87 N4 DC A 5 3.833 -1.904 13.765 1.00 7.57 N
+ATOM 88 C5 DC A 5 5.346 -1.339 15.528 1.00 12.31 C
+ATOM 89 C6 DC A 5 5.709 -1.571 16.800 1.00 10.26 C
+ATOM 90 OP1 DC A 5 9.474 2.225 20.879 1.00 21.84 O
+ATOM 91 OP2 DC A 5 8.908 1.639 18.468 1.00 19.79 O
+ATOM 92 O5' DC A 5 8.728 -0.072 20.325 1.00 19.47 O
+ATOM 93 C5' DC A 5 8.554 -1.158 19.407 1.00 15.29 C
+ATOM 94 C4' DC A 5 7.470 -2.178 19.802 1.00 12.49 C
+ATOM 95 O4' DC A 5 6.161 -1.717 19.496 1.00 12.55 O
+ATOM 96 C3' DC A 5 7.697 -3.468 19.046 1.00 11.96 C
+ATOM 97 O3' DC A 5 8.775 -4.194 19.666 1.00 14.17 O
+ATOM 98 C2' DC A 5 6.342 -4.056 19.192 1.00 10.58 C
+ATOM 99 C1' DC A 5 5.464 -2.822 18.946 1.00 10.97 C
+ATOM 100 P DG A 6 9.797 -5.058 18.800 1.00 14.87 P
+ATOM 101 N9 DG A 6 5.801 -7.550 16.290 1.00 13.78 N
+ATOM 102 C8 DG A 6 6.477 -6.339 16.189 1.00 11.32 C
+ATOM 103 N7 DG A 6 6.114 -5.628 15.161 1.00 11.53 N
+ATOM 104 C5 DG A 6 5.137 -6.431 14.528 1.00 15.14 C
+ATOM 105 C6 DG A 6 4.442 -6.239 13.291 1.00 14.51 C
+ATOM 106 O6 DG A 6 4.382 -5.224 12.595 1.00 15.52 O
+ATOM 107 N1 DG A 6 3.678 -7.348 12.942 1.00 15.78 N
+ATOM 108 C2 DG A 6 3.558 -8.503 13.679 1.00 16.04 C
+ATOM 109 N2 DG A 6 2.732 -9.421 13.210 1.00 15.11 N
+ATOM 110 N3 DG A 6 4.187 -8.691 14.842 1.00 14.81 N
+ATOM 111 C4 DG A 6 4.959 -7.617 15.206 1.00 13.90 C
+ATOM 112 OP1 DG A 6 10.851 -5.532 19.718 1.00 14.32 O
+ATOM 113 OP2 DG A 6 10.144 -4.575 17.432 1.00 10.67 O
+ATOM 114 O5' DG A 6 8.762 -6.277 18.626 1.00 15.18 O
+ATOM 115 C5' DG A 6 8.679 -7.438 19.428 1.00 15.40 C
+ATOM 116 C4' DG A 6 7.717 -8.446 18.789 1.00 15.34 C
+ATOM 117 O4' DG A 6 6.431 -7.834 18.520 1.00 16.46 O
+ATOM 118 C3' DG A 6 8.150 -9.052 17.449 1.00 16.54 C
+ATOM 119 O3' DG A 6 9.172 -10.043 17.595 1.00 18.58 O
+ATOM 120 C2' DG A 6 6.796 -9.650 17.066 1.00 17.79 C
+ATOM 121 C1' DG A 6 5.804 -8.517 17.397 1.00 13.96 C
+ATOM 122 P DC A 7 10.498 -10.100 16.665 1.00 17.81 P
+ATOM 123 N1 DC A 7 7.217 -9.334 12.285 1.00 7.65 N
+ATOM 124 C2 DC A 7 6.458 -8.793 11.230 1.00 10.22 C
+ATOM 125 O2 DC A 7 5.771 -9.507 10.500 1.00 15.05 O
+ATOM 126 N3 DC A 7 6.567 -7.461 10.942 1.00 6.65 N
+ATOM 127 C4 DC A 7 7.403 -6.694 11.658 1.00 5.07 C
+ATOM 128 N4 DC A 7 7.447 -5.391 11.420 1.00 4.65 N
+ATOM 129 C5 DC A 7 8.188 -7.242 12.730 1.00 4.20 C
+ATOM 130 C6 DC A 7 8.053 -8.558 13.000 1.00 6.45 C
+ATOM 131 OP1 DC A 7 11.307 -11.102 17.394 1.00 17.82 O
+ATOM 132 OP2 DC A 7 11.084 -8.759 16.374 1.00 20.08 O
+ATOM 133 O5' DC A 7 9.986 -10.722 15.264 1.00 17.30 O
+ATOM 134 C5' DC A 7 9.312 -11.986 15.170 1.00 16.36 C
+ATOM 135 C4' DC A 7 8.436 -12.095 13.916 1.00 15.85 C
+ATOM 136 O4' DC A 7 7.361 -11.148 13.955 1.00 16.34 O
+ATOM 137 C3' DC A 7 9.165 -11.823 12.595 1.00 14.83 C
+ATOM 138 O3' DC A 7 10.003 -12.907 12.161 1.00 16.25 O
+ATOM 139 C2' DC A 7 7.973 -11.600 11.717 1.00 11.20 C
+ATOM 140 C1' DC A 7 7.076 -10.772 12.582 1.00 10.61 C
+ATOM 141 P DC A 8 11.175 -12.651 11.083 1.00 18.77 P
+ATOM 142 N1 DC A 8 8.297 -9.310 7.883 1.00 6.87 N
+ATOM 143 C2 DC A 8 7.867 -8.224 7.123 1.00 9.10 C
+ATOM 144 O2 DC A 8 7.226 -8.387 6.080 1.00 7.86 O
+ATOM 145 N3 DC A 8 8.296 -6.966 7.459 1.00 7.75 N
+ATOM 146 C4 DC A 8 9.147 -6.784 8.485 1.00 9.21 C
+ATOM 147 N4 DC A 8 9.589 -5.560 8.779 1.00 7.67 N
+ATOM 148 C5 DC A 8 9.609 -7.891 9.258 1.00 7.40 C
+ATOM 149 C6 DC A 8 9.156 -9.121 8.923 1.00 9.24 C
+ATOM 150 OP1 DC A 8 11.871 -13.952 10.908 1.00 20.04 O
+ATOM 151 OP2 DC A 8 12.020 -11.472 11.376 1.00 20.24 O
+ATOM 152 O5' DC A 8 10.469 -12.357 9.649 1.00 18.79 O
+ATOM 153 C5' DC A 8 9.733 -13.334 8.924 1.00 12.85 C
+ATOM 154 C4' DC A 8 8.867 -12.647 7.941 1.00 14.40 C
+ATOM 155 O4' DC A 8 8.156 -11.587 8.589 1.00 10.91 O
+ATOM 156 C3' DC A 8 9.598 -11.936 6.845 1.00 14.90 C
+ATOM 157 O3' DC A 8 10.249 -12.831 5.936 1.00 15.23 O
+ATOM 158 C2' DC A 8 8.377 -11.232 6.304 1.00 9.34 C
+ATOM 159 C1' DC A 8 7.789 -10.648 7.568 1.00 8.80 C
+ATOM 160 P DG A 9 11.518 -12.329 5.128 1.00 14.64 P
+ATOM 161 N9 DG A 9 9.338 -8.006 2.891 1.00 5.76 N
+ATOM 162 C8 DG A 9 10.079 -8.162 4.036 1.00 7.27 C
+ATOM 163 N7 DG A 9 10.578 -7.077 4.541 1.00 5.05 N
+ATOM 164 C5 DG A 9 10.143 -6.100 3.664 1.00 6.30 C
+ATOM 165 C6 DG A 9 10.387 -4.694 3.690 1.00 6.32 C
+ATOM 166 O6 DG A 9 10.988 -4.056 4.538 1.00 8.77 O
+ATOM 167 N1 DG A 9 9.805 -4.022 2.632 1.00 5.02 N
+ATOM 168 C2 DG A 9 9.072 -4.651 1.658 1.00 7.22 C
+ATOM 169 N2 DG A 9 8.590 -3.921 0.680 1.00 5.13 N
+ATOM 170 N3 DG A 9 8.837 -5.970 1.631 1.00 8.90 N
+ATOM 171 C4 DG A 9 9.395 -6.649 2.656 1.00 5.39 C
+ATOM 172 OP1 DG A 9 11.889 -13.707 4.763 1.00 17.77 O
+ATOM 173 OP2 DG A 9 12.558 -11.435 5.714 1.00 16.33 O
+ATOM 174 O5' DG A 9 10.890 -11.645 3.793 1.00 13.73 O
+ATOM 175 C5' DG A 9 10.098 -12.334 2.826 1.00 10.04 C
+ATOM 176 C4' DG A 9 9.322 -11.365 2.036 1.00 8.60 C
+ATOM 177 O4' DG A 9 8.636 -10.420 2.864 1.00 9.95 O
+ATOM 178 C3' DG A 9 10.183 -10.481 1.201 1.00 11.49 C
+ATOM 179 O3' DG A 9 10.786 -11.138 0.073 1.00 12.29 O
+ATOM 180 C2' DG A 9 9.103 -9.503 0.858 1.00 7.88 C
+ATOM 181 C1' DG A 9 8.570 -9.111 2.181 1.00 8.58 C
+ATOM 182 P G A 10 12.244 -10.723 -0.414 1.00 18.00 P
+ATOM 183 N9 G A 10 11.582 -5.303 -1.017 1.00 15.40 N
+ATOM 184 C8 G A 10 12.179 -6.115 -0.061 1.00 15.00 C
+ATOM 185 N7 G A 10 12.826 -5.480 0.870 1.00 12.61 N
+ATOM 186 C5 G A 10 12.635 -4.148 0.522 1.00 13.15 C
+ATOM 187 C6 G A 10 13.133 -2.991 1.159 1.00 11.89 C
+ATOM 188 O6 G A 10 13.713 -2.965 2.241 1.00 12.64 O
+ATOM 189 N1 G A 10 12.806 -1.814 0.462 1.00 9.10 N
+ATOM 190 C2 G A 10 12.079 -1.777 -0.689 1.00 10.96 C
+ATOM 191 N2 G A 10 11.851 -0.582 -1.197 1.00 11.87 N
+ATOM 192 N3 G A 10 11.588 -2.874 -1.294 1.00 12.41 N
+ATOM 193 C4 G A 10 11.899 -4.020 -0.633 1.00 13.44 C
+ATOM 194 OP1 G A 10 12.221 -11.870 -1.354 1.00 19.65 O
+ATOM 195 OP2 G A 10 13.525 -10.237 0.168 1.00 21.55 O
+ATOM 196 O5' G A 10 11.507 -9.424 -1.092 1.00 18.23 O
+ATOM 197 C5' G A 10 10.721 -9.357 -2.288 1.00 18.20 C
+ATOM 198 C4' G A 10 10.589 -7.934 -2.878 1.00 17.37 C
+ATOM 199 O4' G A 10 10.102 -6.968 -1.936 1.00 15.12 O
+ATOM 200 C3' G A 10 11.859 -7.317 -3.471 1.00 17.88 C
+ATOM 201 O3' G A 10 12.164 -7.754 -4.846 1.00 16.65 O
+ATOM 202 C2' G A 10 11.470 -5.841 -3.464 1.00 16.83 C
+ATOM 203 O2' G A 10 10.607 -5.618 -4.583 1.00 18.75 O
+ATOM 204 C1' G A 10 10.721 -5.691 -2.168 1.00 15.79 C
+TER 205 G A 10
+ATOM 206 N1 C B 11 13.988 2.735 1.589 1.00 16.99 N
+ATOM 207 C2 C B 11 13.552 1.541 1.023 1.00 15.65 C
+ATOM 208 O2 C B 11 12.869 1.532 0.006 1.00 14.94 O
+ATOM 209 N3 C B 11 13.773 0.359 1.678 1.00 16.15 N
+ATOM 210 C4 C B 11 14.386 0.347 2.865 1.00 16.53 C
+ATOM 211 N4 C B 11 14.619 -0.822 3.476 1.00 18.43 N
+ATOM 212 C5 C B 11 14.816 1.571 3.473 1.00 16.78 C
+ATOM 213 C6 C B 11 14.597 2.724 2.804 1.00 15.01 C
+ATOM 214 O5' C B 11 14.526 5.793 4.007 1.00 18.48 O
+ATOM 215 C5' C B 11 14.531 6.777 2.948 1.00 17.64 C
+ATOM 216 C4' C B 11 14.028 6.161 1.616 1.00 17.23 C
+ATOM 217 O4' C B 11 14.808 4.991 1.256 1.00 16.55 O
+ATOM 218 C3' C B 11 12.611 5.611 1.737 1.00 17.97 C
+ATOM 219 O3' C B 11 11.508 6.538 1.711 1.00 18.76 O
+ATOM 220 C2' C B 11 12.546 4.594 0.654 1.00 14.10 C
+ATOM 221 O2' C B 11 12.366 5.290 -0.579 1.00 13.63 O
+ATOM 222 C1' C B 11 13.918 3.977 0.766 1.00 14.14 C
+ATOM 223 P DC B 12 10.233 6.143 2.644 1.00 21.42 P
+ATOM 224 N1 DC B 12 9.527 0.825 1.326 1.00 15.29 N
+ATOM 225 C2 DC B 12 9.472 -0.563 1.382 1.00 14.49 C
+ATOM 226 O2 DC B 12 8.922 -1.257 0.518 1.00 17.30 O
+ATOM 227 N3 DC B 12 10.055 -1.190 2.418 1.00 11.60 N
+ATOM 228 C4 DC B 12 10.676 -0.500 3.383 1.00 15.58 C
+ATOM 229 N4 DC B 12 11.164 -1.186 4.430 1.00 14.28 N
+ATOM 230 C5 DC B 12 10.760 0.927 3.341 1.00 15.60 C
+ATOM 231 C6 DC B 12 10.166 1.544 2.298 1.00 15.73 C
+ATOM 232 OP1 DC B 12 9.634 7.406 2.139 1.00 21.29 O
+ATOM 233 OP2 DC B 12 10.077 5.869 4.079 1.00 22.13 O
+ATOM 234 O5' DC B 12 9.636 4.841 1.804 1.00 20.84 O
+ATOM 235 C5' DC B 12 8.999 5.040 0.519 1.00 19.83 C
+ATOM 236 C4' DC B 12 8.512 3.757 -0.108 1.00 18.55 C
+ATOM 237 O4' DC B 12 9.529 2.733 -0.171 1.00 19.79 O
+ATOM 238 C3' DC B 12 7.498 3.211 0.801 1.00 18.00 C
+ATOM 239 O3' DC B 12 6.305 3.969 0.629 1.00 19.14 O
+ATOM 240 C2' DC B 12 7.475 1.788 0.344 1.00 15.87 C
+ATOM 241 C1' DC B 12 8.913 1.473 0.156 1.00 15.45 C
+ATOM 242 P DG B 13 4.970 3.543 1.371 1.00 21.52 P
+ATOM 243 N9 DG B 13 6.185 -2.069 3.050 1.00 9.23 N
+ATOM 244 C8 DG B 13 6.745 -1.032 3.745 1.00 8.94 C
+ATOM 245 N7 DG B 13 7.370 -1.389 4.833 1.00 7.30 N
+ATOM 246 C5 DG B 13 7.209 -2.767 4.877 1.00 8.43 C
+ATOM 247 C6 DG B 13 7.692 -3.719 5.823 1.00 9.75 C
+ATOM 248 O6 DG B 13 8.258 -3.536 6.903 1.00 14.29 O
+ATOM 249 N1 DG B 13 7.361 -5.014 5.443 1.00 5.73 N
+ATOM 250 C2 DG B 13 6.655 -5.359 4.323 1.00 2.65 C
+ATOM 251 N2 DG B 13 6.506 -6.654 4.079 1.00 2.15 N
+ATOM 252 N3 DG B 13 6.190 -4.477 3.470 1.00 2.55 N
+ATOM 253 C4 DG B 13 6.497 -3.198 3.793 1.00 6.08 C
+ATOM 254 OP1 DG B 13 4.172 4.637 0.743 1.00 22.41 O
+ATOM 255 OP2 DG B 13 5.322 3.646 2.816 1.00 21.67 O
+ATOM 256 O5' DG B 13 4.263 2.118 1.102 1.00 18.28 O
+ATOM 257 C5' DG B 13 3.977 1.214 2.153 1.00 12.90 C
+ATOM 258 C4' DG B 13 3.997 -0.166 1.554 1.00 15.74 C
+ATOM 259 O4' DG B 13 5.326 -0.638 1.288 1.00 15.41 O
+ATOM 260 C3' DG B 13 3.328 -1.110 2.479 1.00 14.99 C
+ATOM 261 O3' DG B 13 1.948 -0.901 2.181 1.00 18.56 O
+ATOM 262 C2' DG B 13 3.943 -2.416 1.990 1.00 14.49 C
+ATOM 263 C1' DG B 13 5.414 -2.020 1.777 1.00 12.61 C
+ATOM 264 P DG B 14 0.784 -1.093 3.255 1.00 15.78 P
+ATOM 265 N9 DG B 14 3.152 -5.336 5.518 1.00 6.83 N
+ATOM 266 C8 DG B 14 3.420 -4.010 5.692 1.00 4.36 C
+ATOM 267 N7 DG B 14 4.172 -3.751 6.719 1.00 5.76 N
+ATOM 268 C5 DG B 14 4.412 -5.012 7.281 1.00 8.36 C
+ATOM 269 C6 DG B 14 5.175 -5.383 8.425 1.00 10.81 C
+ATOM 270 O6 DG B 14 5.939 -4.687 9.102 1.00 10.46 O
+ATOM 271 N1 DG B 14 5.100 -6.738 8.655 1.00 7.70 N
+ATOM 272 C2 DG B 14 4.415 -7.650 7.890 1.00 6.88 C
+ATOM 273 N2 DG B 14 4.444 -8.925 8.254 1.00 4.21 N
+ATOM 274 N3 DG B 14 3.730 -7.316 6.805 1.00 7.97 N
+ATOM 275 C4 DG B 14 3.774 -5.982 6.566 1.00 7.79 C
+ATOM 276 OP1 DG B 14 -0.388 -0.771 2.418 1.00 12.44 O
+ATOM 277 OP2 DG B 14 0.951 -0.425 4.562 1.00 16.99 O
+ATOM 278 O5' DG B 14 0.825 -2.666 3.590 1.00 12.34 O
+ATOM 279 C5' DG B 14 0.518 -3.657 2.618 1.00 15.26 C
+ATOM 280 C4' DG B 14 0.962 -5.042 3.026 1.00 11.81 C
+ATOM 281 O4' DG B 14 2.388 -5.092 3.261 1.00 14.56 O
+ATOM 282 C3' DG B 14 0.298 -5.494 4.281 1.00 10.90 C
+ATOM 283 O3' DG B 14 -1.014 -5.933 3.977 1.00 16.35 O
+ATOM 284 C2' DG B 14 1.223 -6.607 4.600 1.00 8.75 C
+ATOM 285 C1' DG B 14 2.583 -6.029 4.341 1.00 8.31 C
+ATOM 286 P DC B 15 -2.108 -5.846 5.127 1.00 18.17 P
+ATOM 287 N1 DC B 15 0.594 -8.193 8.784 1.00 10.36 N
+ATOM 288 C2 DC B 15 1.420 -8.271 9.913 1.00 13.07 C
+ATOM 289 O2 DC B 15 1.626 -9.323 10.519 1.00 11.62 O
+ATOM 290 N3 DC B 15 1.985 -7.143 10.391 1.00 9.60 N
+ATOM 291 C4 DC B 15 1.755 -5.962 9.810 1.00 9.75 C
+ATOM 292 N4 DC B 15 2.507 -4.945 10.242 1.00 10.36 N
+ATOM 293 C5 DC B 15 0.883 -5.835 8.681 1.00 8.80 C
+ATOM 294 C6 DC B 15 0.336 -6.973 8.201 1.00 11.04 C
+ATOM 295 OP1 DC B 15 -3.198 -6.237 4.195 1.00 23.53 O
+ATOM 296 OP2 DC B 15 -2.242 -4.630 5.951 1.00 23.09 O
+ATOM 297 O5' DC B 15 -1.783 -7.100 6.053 1.00 20.88 O
+ATOM 298 C5' DC B 15 -2.023 -8.439 5.585 1.00 16.99 C
+ATOM 299 C4' DC B 15 -1.560 -9.527 6.542 1.00 16.47 C
+ATOM 300 O4' DC B 15 -0.145 -9.414 6.793 1.00 14.34 O
+ATOM 301 C3' DC B 15 -2.235 -9.419 7.903 1.00 17.63 C
+ATOM 302 O3' DC B 15 -3.580 -9.983 8.004 1.00 16.81 O
+ATOM 303 C2' DC B 15 -1.174 -10.022 8.803 1.00 12.88 C
+ATOM 304 C1' DC B 15 0.116 -9.496 8.210 1.00 14.19 C
+ATOM 305 P DG B 16 -4.447 -9.204 9.118 1.00 23.27 P
+ATOM 306 N9 DG B 16 -0.792 -7.342 13.150 1.00 14.23 N
+ATOM 307 C8 DG B 16 -1.064 -6.617 12.000 1.00 13.86 C
+ATOM 308 N7 DG B 16 -0.426 -5.487 11.941 1.00 10.67 N
+ATOM 309 C5 DG B 16 0.313 -5.477 13.124 1.00 13.65 C
+ATOM 310 C6 DG B 16 1.184 -4.501 13.652 1.00 10.61 C
+ATOM 311 O6 DG B 16 1.552 -3.475 13.129 1.00 10.52 O
+ATOM 312 N1 DG B 16 1.683 -4.846 14.894 1.00 14.28 N
+ATOM 313 C2 DG B 16 1.388 -6.009 15.567 1.00 12.13 C
+ATOM 314 N2 DG B 16 1.910 -6.217 16.766 1.00 10.28 N
+ATOM 315 N3 DG B 16 0.578 -6.929 15.063 1.00 15.53 N
+ATOM 316 C4 DG B 16 0.082 -6.603 13.853 1.00 12.03 C
+ATOM 317 OP1 DG B 16 -5.486 -10.240 8.913 1.00 22.76 O
+ATOM 318 OP2 DG B 16 -4.614 -7.887 8.455 1.00 24.12 O
+ATOM 319 O5' DG B 16 -4.232 -8.798 10.672 1.00 18.16 O
+ATOM 320 C5' DG B 16 -4.091 -9.850 11.581 1.00 18.35 C
+ATOM 321 C4' DG B 16 -3.224 -9.555 12.771 1.00 17.50 C
+ATOM 322 O4' DG B 16 -1.873 -9.267 12.423 1.00 15.59 O
+ATOM 323 C3' DG B 16 -3.673 -8.498 13.727 1.00 17.67 C
+ATOM 324 O3' DG B 16 -4.857 -8.945 14.432 1.00 23.53 O
+ATOM 325 C2' DG B 16 -2.423 -8.573 14.568 1.00 16.53 C
+ATOM 326 C1' DG B 16 -1.278 -8.659 13.568 1.00 15.43 C
+ATOM 327 P DC B 17 -6.006 -7.956 15.048 1.00 19.94 P
+ATOM 328 N1 DC B 17 -2.194 -5.587 17.570 1.00 12.74 N
+ATOM 329 C2 DC B 17 -1.248 -4.622 17.829 1.00 13.09 C
+ATOM 330 O2 DC B 17 -0.698 -4.517 18.933 1.00 12.24 O
+ATOM 331 N3 DC B 17 -0.984 -3.712 16.852 1.00 14.35 N
+ATOM 332 C4 DC B 17 -1.639 -3.762 15.686 1.00 13.79 C
+ATOM 333 N4 DC B 17 -1.297 -2.921 14.711 1.00 16.68 N
+ATOM 334 C5 DC B 17 -2.631 -4.748 15.430 1.00 11.59 C
+ATOM 335 C6 DC B 17 -2.858 -5.633 16.400 1.00 8.53 C
+ATOM 336 OP1 DC B 17 -6.749 -9.243 15.142 1.00 18.85 O
+ATOM 337 OP2 DC B 17 -6.441 -6.892 14.132 1.00 21.49 O
+ATOM 338 O5' DC B 17 -5.598 -7.385 16.536 1.00 17.70 O
+ATOM 339 C5' DC B 17 -5.483 -8.267 17.659 1.00 17.29 C
+ATOM 340 C4' DC B 17 -4.462 -7.850 18.701 1.00 19.19 C
+ATOM 341 O4' DC B 17 -3.142 -7.783 18.121 1.00 20.08 O
+ATOM 342 C3' DC B 17 -4.754 -6.460 19.204 1.00 21.26 C
+ATOM 343 O3' DC B 17 -5.866 -6.375 20.121 1.00 23.03 O
+ATOM 344 C2' DC B 17 -3.399 -6.104 19.736 1.00 18.88 C
+ATOM 345 C1' DC B 17 -2.472 -6.604 18.629 1.00 18.39 C
+ATOM 346 P DC B 18 -7.007 -5.260 19.781 1.00 28.77 P
+ATOM 347 N1 DC B 18 -3.297 -1.380 18.786 1.00 18.17 N
+ATOM 348 C2 DC B 18 -2.446 -0.458 18.171 1.00 16.98 C
+ATOM 349 O2 DC B 18 -1.573 0.166 18.774 1.00 20.32 O
+ATOM 350 N3 DC B 18 -2.583 -0.258 16.848 1.00 16.82 N
+ATOM 351 C4 DC B 18 -3.505 -0.931 16.149 1.00 15.76 C
+ATOM 352 N4 DC B 18 -3.636 -0.665 14.860 1.00 13.34 N
+ATOM 353 C5 DC B 18 -4.372 -1.893 16.748 1.00 12.67 C
+ATOM 354 C6 DC B 18 -4.237 -2.080 18.066 1.00 14.81 C
+ATOM 355 OP1 DC B 18 -8.010 -5.697 20.796 1.00 27.91 O
+ATOM 356 OP2 DC B 18 -7.417 -4.926 18.375 1.00 24.48 O
+ATOM 357 O5' DC B 18 -6.346 -3.878 20.355 1.00 26.69 O
+ATOM 358 C5' DC B 18 -5.876 -3.663 21.675 1.00 22.45 C
+ATOM 359 C4' DC B 18 -4.868 -2.527 21.660 1.00 20.14 C
+ATOM 360 O4' DC B 18 -3.898 -2.791 20.621 1.00 17.95 O
+ATOM 361 C3' DC B 18 -5.383 -1.139 21.350 1.00 20.46 C
+ATOM 362 O3' DC B 18 -6.122 -0.495 22.422 1.00 22.52 O
+ATOM 363 C2' DC B 18 -4.069 -0.456 20.977 1.00 18.70 C
+ATOM 364 C1' DC B 18 -3.245 -1.549 20.252 1.00 18.68 C
+ATOM 365 P DG B 19 -7.015 0.794 21.992 1.00 18.68 P
+ATOM 366 N9 DG B 19 -3.670 3.314 18.697 1.00 8.91 N
+ATOM 367 C8 DG B 19 -4.569 2.317 18.417 1.00 7.23 C
+ATOM 368 N7 DG B 19 -4.814 2.192 17.179 1.00 8.80 N
+ATOM 369 C5 DG B 19 -4.038 3.182 16.585 1.00 8.99 C
+ATOM 370 C6 DG B 19 -3.831 3.450 15.217 1.00 9.86 C
+ATOM 371 O6 DG B 19 -4.361 2.871 14.270 1.00 14.98 O
+ATOM 372 N1 DG B 19 -2.868 4.446 14.998 1.00 8.65 N
+ATOM 373 C2 DG B 19 -2.192 5.116 15.998 1.00 8.58 C
+ATOM 374 N2 DG B 19 -1.417 6.149 15.640 1.00 8.82 N
+ATOM 375 N3 DG B 19 -2.387 4.836 17.299 1.00 9.44 N
+ATOM 376 C4 DG B 19 -3.324 3.871 17.515 1.00 8.64 C
+ATOM 377 OP1 DG B 19 -7.592 0.740 23.355 1.00 20.58 O
+ATOM 378 OP2 DG B 19 -7.881 0.644 20.808 1.00 18.98 O
+ATOM 379 O5' DG B 19 -6.137 2.085 21.765 1.00 14.67 O
+ATOM 380 C5' DG B 19 -5.282 2.635 22.743 1.00 14.92 C
+ATOM 381 C4' DG B 19 -4.265 3.471 22.044 1.00 11.67 C
+ATOM 382 O4' DG B 19 -3.668 2.725 20.993 1.00 13.34 O
+ATOM 383 C3' DG B 19 -4.831 4.632 21.315 1.00 12.46 C
+ATOM 384 O3' DG B 19 -5.233 5.692 22.194 1.00 12.97 O
+ATOM 385 C2' DG B 19 -3.646 4.994 20.460 1.00 10.60 C
+ATOM 386 C1' DG B 19 -3.149 3.663 20.010 1.00 11.00 C
+ATOM 387 P G B 20 -6.156 6.845 21.578 1.00 16.17 P
+ATOM 388 N9 G B 20 -4.621 7.966 16.781 1.00 8.70 N
+ATOM 389 C8 G B 20 -5.409 6.982 17.305 1.00 8.15 C
+ATOM 390 N7 G B 20 -5.951 6.226 16.408 1.00 9.88 N
+ATOM 391 C5 G B 20 -5.496 6.753 15.190 1.00 10.42 C
+ATOM 392 C6 G B 20 -5.780 6.342 13.855 1.00 11.50 C
+ATOM 393 O6 G B 20 -6.476 5.399 13.485 1.00 13.46 O
+ATOM 394 N1 G B 20 -5.138 7.125 12.924 1.00 8.26 N
+ATOM 395 C2 G B 20 -4.310 8.187 13.214 1.00 7.88 C
+ATOM 396 N2 G B 20 -3.735 8.801 12.170 1.00 6.62 N
+ATOM 397 N3 G B 20 -4.043 8.594 14.477 1.00 8.59 N
+ATOM 398 C4 G B 20 -4.676 7.821 15.410 1.00 7.98 C
+ATOM 399 OP1 G B 20 -6.346 7.569 22.839 1.00 11.59 O
+ATOM 400 OP2 G B 20 -7.348 6.334 20.882 1.00 19.70 O
+ATOM 401 O5' G B 20 -5.304 7.716 20.550 1.00 15.64 O
+ATOM 402 C5' G B 20 -4.166 8.497 20.960 1.00 13.60 C
+ATOM 403 C4' G B 20 -3.731 9.295 19.780 1.00 11.64 C
+ATOM 404 O4' G B 20 -3.346 8.405 18.762 1.00 12.78 O
+ATOM 405 C3' G B 20 -4.937 10.017 19.154 1.00 9.26 C
+ATOM 406 O3' G B 20 -5.162 11.232 19.849 1.00 8.82 O
+ATOM 407 C2' G B 20 -4.515 10.231 17.738 1.00 10.28 C
+ATOM 408 O2' G B 20 -3.496 11.210 17.640 1.00 14.06 O
+ATOM 409 C1' G B 20 -3.782 8.924 17.491 1.00 11.06 C
+TER 410 G B 20
+HETATM 411 N1 SPM 21 10.683 -8.783 22.839 1.00 40.13 N
+HETATM 412 C2 SPM 21 11.531 -7.621 23.379 1.00 38.06 C
+HETATM 413 C3 SPM 21 10.826 -6.312 23.033 1.00 36.69 C
+HETATM 414 C4 SPM 21 11.754 -5.116 22.994 1.00 35.02 C
+HETATM 415 N5 SPM 21 10.958 -3.909 22.549 1.00 32.86 N
+HETATM 416 C6 SPM 21 12.018 -2.878 22.231 1.00 32.94 C
+HETATM 417 C7 SPM 21 11.419 -1.515 22.220 1.00 31.05 C
+HETATM 418 C8 SPM 21 12.460 -0.586 21.671 1.00 30.79 C
+HETATM 419 C9 SPM 21 12.057 0.847 21.888 1.00 28.48 C
+HETATM 420 N10 SPM 21 13.064 1.749 21.221 1.00 28.45 N
+HETATM 421 C11 SPM 21 13.493 2.749 22.270 1.00 30.71 C
+HETATM 422 C12 SPM 21 14.237 3.946 21.699 1.00 31.37 C
+HETATM 423 C13 SPM 21 14.691 4.712 22.920 1.00 32.44 C
+HETATM 424 N14 SPM 21 14.460 6.175 22.642 1.00 34.72 N
+HETATM 425 O HOH 22 -2.974 -2.437 11.925 1.00 16.09 O
+HETATM 426 O HOH 23 4.908 -5.520 0.996 1.00 18.38 O
+HETATM 427 O HOH 24 -7.781 4.610 18.814 1.00 18.46 O
+HETATM 428 O HOH 25 -0.410 11.047 5.984 1.00 21.92 O
+HETATM 429 O HOH 26 -8.768 2.303 25.439 1.00 63.34 O
+HETATM 430 O HOH 27 2.982 -6.730 19.716 1.00 59.88 O
+HETATM 431 O HOH 28 14.965 -12.628 -1.536 1.00 20.30 O
+HETATM 432 O HOH 29 11.946 -14.326 0.320 1.00 19.82 O
+HETATM 433 O HOH 30 10.067 -5.986 15.026 1.00 53.92 O
+HETATM 434 O HOH 31 12.687 -7.091 6.513 1.00 22.27 O
+HETATM 435 O HOH 32 12.609 -9.474 8.227 1.00 37.71 O
+HETATM 436 O HOH 33 -2.941 -7.858 2.063 1.00 27.19 O
+HETATM 437 O HOH 34 7.529 -3.577 14.088 1.00 21.79 O
+HETATM 438 O HOH 35 1.254 -0.882 12.378 1.00 24.27 O
+HETATM 439 O HOH 36 3.423 0.963 13.195 1.00 29.99 O
+HETATM 440 O HOH 37 7.112 -6.175 -0.485 1.00 27.77 O
+HETATM 441 O HOH 38 -0.686 -3.219 10.199 1.00 34.51 O
+HETATM 442 O HOH 39 9.580 7.535 14.458 1.00 36.42 O
+HETATM 443 O HOH 40 13.715 -4.726 5.032 1.00 69.56 O
+HETATM 444 O HOH 41 5.720 -2.345 11.434 1.00 31.09 O
+HETATM 445 O HOH 42 3.591 6.788 4.471 1.00 54.80 O
+HETATM 446 O HOH 43 10.402 4.780 14.504 1.00 68.31 O
+HETATM 447 O HOH 44 14.574 -10.275 18.466 1.00 49.77 O
+HETATM 448 O HOH 45 9.740 9.480 0.051 1.00 32.13 O
+HETATM 449 O HOH 46 0.657 2.761 2.939 1.00 32.50 O
+HETATM 450 O HOH 47 -4.337 -5.705 11.632 1.00 61.29 O
+HETATM 451 O HOH 48 8.511 0.032 6.773 1.00 19.39 O
+HETATM 452 O HOH 49 4.696 -1.081 7.336 1.00 33.58 O
+HETATM 453 O HOH 50 15.251 -12.102 2.108 1.00 32.25 O
+HETATM 454 O HOH 51 -6.031 -4.587 15.810 1.00 44.75 O
+HETATM 455 O HOH 52 3.985 7.860 0.750 1.00 43.33 O
+HETATM 456 O HOH 53 -9.947 -8.411 16.066 1.00 42.79 O
+HETATM 457 O HOH 54 14.022 -9.173 2.574 1.00 61.84 O
+HETATM 458 O HOH 55 8.927 4.925 21.552 1.00 21.30 O
+HETATM 459 O HOH 56 12.080 -9.656 20.565 1.00 39.11 O
+HETATM 460 O HOH 57 10.264 3.453 5.213 1.00 32.36 O
+HETATM 461 O HOH 58 7.585 8.903 10.458 1.00 55.81 O
+HETATM 462 O HOH 59 -6.958 -12.129 15.577 1.00 25.61 O
+HETATM 463 O HOH 60 7.487 1.041 16.040 1.00 46.35 O
+HETATM 464 O HOH 61 -0.194 -3.247 7.396 1.00 35.93 O
+HETATM 465 O HOH 62 8.225 6.727 12.206 1.00 60.91 O
+HETATM 466 O HOH 63 -7.060 4.463 4.604 1.00 46.27 O
+HETATM 467 O HOH 64 7.946 3.533 12.709 1.00 28.03 O
+HETATM 468 O HOH 65 6.779 -1.926 8.904 1.00 41.06 O
+HETATM 469 O HOH 66 -4.616 1.948 8.938 1.00 36.90 O
+HETATM 470 O HOH 67 2.587 3.984 4.922 1.00 71.03 O
+HETATM 471 O HOH 68 -2.870 3.373 6.568 1.00 35.34 O
+HETATM 472 O HOH 69 -2.641 -4.676 8.852 1.00 65.95 O
+HETATM 473 O HOH 70 7.896 2.158 5.060 1.00 37.59 O
+HETATM 474 O HOH 71 -10.031 -4.027 18.622 1.00 67.65 O
+HETATM 475 O HOH 72 -8.176 -1.645 24.639 1.00 49.61 O
+HETATM 476 O HOH 73 17.116 0.579 15.466 1.00 47.99 O
+HETATM 477 O HOH 74 -2.555 0.759 5.884 1.00 40.81 O
+HETATM 478 O HOH 75 5.250 1.995 7.543 1.00 70.98 O
+HETATM 479 O HOH 76 -10.113 -6.723 18.202 1.00 59.20 O
+HETATM 480 O HOH 77 1.829 -2.266 9.724 1.00 75.20 O
+HETATM 481 O HOH 78 -8.873 -3.504 22.680 1.00 79.41 O
+HETATM 482 O HOH 79 -9.310 -1.446 19.391 1.00 71.79 O
+HETATM 483 O HOH 80 -6.613 0.677 10.598 1.00 80.35 O
+HETATM 484 O HOH 81 -7.134 2.452 7.202 1.00 72.90 O
+HETATM 485 O HOH 82 13.359 4.222 15.085 1.00 55.82 O
+HETATM 486 O HOH 83 -1.981 3.230 3.724 1.00 91.06 O
+HETATM 487 O HOH 84 8.014 -16.765 6.352 1.00 97.71 O
+HETATM 488 O HOH 85 13.277 -1.574 6.340 1.00 80.86 O
+HETATM 489 O HOH 86 4.216 1.820 10.481 1.00 76.69 O
+HETATM 490 O HOH 87 10.662 -11.389 23.778 1.00 49.18 O
+HETATM 491 O HOH 88 -2.029 -10.316 17.858 1.00 83.02 O
+CONECT 411 412
+CONECT 412 411 413
+CONECT 413 412 414
+CONECT 414 413 415
+CONECT 415 414 416
+CONECT 416 415 417
+CONECT 417 416 418
+CONECT 418 417 419
+CONECT 419 418 420
+CONECT 420 419 421
+CONECT 421 420 422
+CONECT 422 421 423
+CONECT 423 422 424
+CONECT 424 423
+MASTER 0 0 0 0 0 0 0 6 489 2 14 2
+END
diff --git a/Build/source/utils/asymptote/examples/1overx.asy b/Build/source/utils/asymptote/examples/1overx.asy
index 5d9775d44dc..9bbbf282aca 100644
--- a/Build/source/utils/asymptote/examples/1overx.asy
+++ b/Build/source/utils/asymptote/examples/1overx.asy
@@ -8,7 +8,7 @@ bool3 branch(real x)
static int lastsign=0;
if(x == 0) return false;
int sign=sgn(x);
- bool b=lastsign == 0 || sign == lastsign;
+ bool b=lastsign == 0 || sign == lastsign;
lastsign=sign;
return b ? true : default;
}
diff --git a/Build/source/utils/asymptote/examples/BezierPatch.asy b/Build/source/utils/asymptote/examples/BezierPatch.asy
index 4e3e55cb40e..1091ae22504 100644
--- a/Build/source/utils/asymptote/examples/BezierPatch.asy
+++ b/Build/source/utils/asymptote/examples/BezierPatch.asy
@@ -5,9 +5,9 @@ currentlight=Headlamp;
surface s=surface(patch(new triple[][] {
{(0,0,0),(1,0,0),(1,0,0),(2,0,0)},
- {(0,1,0),(1,0,1),(1,0,1),(2,1,0)},
- {(0,1,0),(1,0,-1),(1,0,-1),(2,1,0)},
- {(0,2,0),(1,2,0),(1,2,0),(2,2,0)}}));
+ {(0,1,0),(1,0,1),(1,0,1),(2,1,0)},
+ {(0,1,0),(1,0,-1),(1,0,-1),(2,1,0)},
+ {(0,2,0),(1,2,0),(1,2,0),(2,2,0)}}));
draw(s,yellow);
draw(s.s[0].vequals(0.5),squarecap+2bp+blue,currentlight);
diff --git a/Build/source/utils/asymptote/examples/BezierSurface.asy b/Build/source/utils/asymptote/examples/BezierSurface.asy
index 62c01a55717..1055fbb1513 100644
--- a/Build/source/utils/asymptote/examples/BezierSurface.asy
+++ b/Build/source/utils/asymptote/examples/BezierSurface.asy
@@ -10,29 +10,33 @@ ROLL=17.39344555165265
// viewpoint=getstring("viewpoint",viewpoint);
currentprojection=perspective(viewpoint);
-triple[][][] P={
+triple[][][] P=
{
+ {
{(-1.6,0,1.875),(-2.3,0,1.875),(-2.7,0,1.875),(-2.7,0,1.65),},
{(-1.6,-0.3,1.875),(-2.3,-0.3,1.875),(-2.7,-0.3,1.875),(-2.7,-0.3,1.65),},
{(-1.5,-0.3,2.1),(-2.5,-0.3,2.1),(-3,-0.3,2.1),(-3,-0.3,1.65),},
{(-1.5,0,2.1),(-2.5,0,2.1),(-3,0,2.1),(-3,0,1.65),}
- },{
+ },
+ {
{(-2.7,0,1.65),(-2.7,0,1.425),(-2.5,0,0.975),(-2,0,0.75),},
{(-2.7,-0.3,1.65),(-2.7,-0.3,1.425),(-2.5,-0.3,0.975),(-2,-0.3,0.75),},
{(-3,-0.3,1.65),(-3,-0.3,1.2),(-2.65,-0.3,0.7275),(-1.9,-0.3,0.45),},
{(-3,0,1.65),(-3,0,1.2),(-2.65,0,0.7275),(-1.9,0,0.45),}
- },{
+ },
+ {
{(-2.7,0,1.65),(-2.7,0,1.875),(-2.3,0,1.875),(-1.6,0,1.875),},
{(-2.7,0.3,1.65),(-2.7,0.3,1.875),(-2.3,0.3,1.875),(-1.6,0.3,1.875),},
{(-3,0.3,1.65),(-3,0.3,2.1),(-2.5,0.3,2.1),(-1.5,0.3,2.1),},
{(-3,0,1.65),(-3,0,2.1),(-2.5,0,2.1),(-1.5,0,2.1),}
- },{
+ },
+ {
{(-2,0,0.75),(-2.5,0,0.975),(-2.7,0,1.425),(-2.7,0,1.65),},
{(-2,0.3,0.75),(-2.5,0.3,0.975),(-2.7,0.3,1.425),(-2.7,0.3,1.65),},
{(-1.9,0.3,0.45),(-2.65,0.3,0.7275),(-3,0.3,1.2),(-3,0.3,1.65),},
{(-1.9,0,0.45),(-2.65,0,0.7275),(-3,0,1.2),(-3,0,1.65),}
- }
-};
+ }
+ };
picture pic;
size(pic,15cm);
diff --git a/Build/source/utils/asymptote/examples/Gouraud.asy b/Build/source/utils/asymptote/examples/Gouraud.asy
index d49813e5e66..7df039e04c5 100644
--- a/Build/source/utils/asymptote/examples/Gouraud.asy
+++ b/Build/source/utils/asymptote/examples/Gouraud.asy
@@ -1,6 +1,6 @@
size(200);
-pen[] p={red,green,blue,magenta};
+pen[] p={red,green,blue,yellow};
pair[] z={(-1,0),(0,0),(0,1),(1,0)};
int[] edges={0,0,0,1};
gouraudshade(z[0]--z[2]--z[3]--cycle,p,z,edges);
diff --git a/Build/source/utils/asymptote/examples/Klein.asy b/Build/source/utils/asymptote/examples/Klein.asy
index a5e7418fe6f..ae46b1b2a19 100644
--- a/Build/source/utils/asymptote/examples/Klein.asy
+++ b/Build/source/utils/asymptote/examples/Klein.asy
@@ -2,12 +2,11 @@ import graph3;
size(469pt);
-currentprojection=perspective(
-camera=(25.0851928432063,-30.3337528952473,19.3728775115443),
-up=Z,
-target=(-0.590622314050054,0.692357205025578,-0.627122488455679),
-zoom=1,
-autoadjust=false);
+currentprojection=
+ perspective(camera=(25.0851928432063,-30.3337528952473,19.3728775115443),
+ up=Z,
+ target=(-0.590622314050054,0.692357205025578,-0.627122488455679),
+ zoom=1,autoadjust=false);
triple f(pair t) {
real u=t.x;
diff --git a/Build/source/utils/asymptote/examples/NURBScurve.asy b/Build/source/utils/asymptote/examples/NURBScurve.asy
index c4da5c2ff5f..9ad121ecc65 100644
--- a/Build/source/utils/asymptote/examples/NURBScurve.asy
+++ b/Build/source/utils/asymptote/examples/NURBScurve.asy
@@ -8,13 +8,14 @@ currentprojection=perspective(50,80,50);
// udegree=3, nu=6;
real[] knot={0,0,0,0,0.4,0.6,1,1,1,1};
-triple[] P={
- (-31.2061,12.001,6.45082),
- (-31.3952,14.7353,6.53707),
- (-31.5909,21.277,6.70051),
- (-31.4284,25.4933,6.76745),
- (-31.5413,30.3485,6.68777),
- (-31.4896,32.2839,6.58385)
+triple[] P=
+ {
+ (-31.2061,12.001,6.45082),
+ (-31.3952,14.7353,6.53707),
+ (-31.5909,21.277,6.70051),
+ (-31.4284,25.4933,6.76745),
+ (-31.5413,30.3485,6.68777),
+ (-31.4896,32.2839,6.58385)
};
draw(P,knot,green);
diff --git a/Build/source/utils/asymptote/examples/NURBSsphere.asy b/Build/source/utils/asymptote/examples/NURBSsphere.asy
index 5258c9986de..484e8c4cd15 100644
--- a/Build/source/utils/asymptote/examples/NURBSsphere.asy
+++ b/Build/source/utils/asymptote/examples/NURBSsphere.asy
@@ -1,16 +1,16 @@
import three;
/* Reference:
-@article{Qin97,
- title={{Representing quadric surfaces using NURBS surfaces}},
- author={Qin, K.},
- journal={Journal of Computer Science and Technology},
- volume={12},
- number={3},
- pages={210--216},
- year={1997},
- publisher={Springer}
-}
+ @article{Qin97,
+ title={{Representing quadric surfaces using NURBS surfaces}},
+ author={Qin, K.},
+ journal={Journal of Computer Science and Technology},
+ volume={12},
+ number={3},
+ pages={210--216},
+ year={1997},
+ publisher={Springer}
+ }
*/
size(10cm);
@@ -31,8 +31,8 @@ P.cyclic=true;
real[][] weights=new real[3][4];
for(int i=0; i < 3; ++i)
-for(int j=0; j < 4; ++j)
- weights[i][j]=W[i]*w[j];
+ for(int j=0; j < 4; ++j)
+ weights[i][j]=W[i]*w[j];
real[] uknot={0,0,1/3,1/2,1,1};
real[] vknot={0,0,0,0,1,1,1,1};
@@ -40,7 +40,7 @@ real[] vknot={0,0,0,0,1,1,1,1};
int N=1;
for(int k=0; k < N; ++k)
-for(int i=0; i < 4; ++i)
- draw(shift(k*Z)*P[i:i+3],uknot,vknot,weights,blue);
+ for(int i=0; i < 4; ++i)
+ draw(shift(k*Z)*P[i:i+3],uknot,vknot,weights,blue);
// draw(unitsphere,red+opacity(0.1));
diff --git a/Build/source/utils/asymptote/examples/NURBSsurface.asy b/Build/source/utils/asymptote/examples/NURBSsurface.asy
index 32df6ff98ea..4bfafefbc33 100644
--- a/Build/source/utils/asymptote/examples/NURBSsurface.asy
+++ b/Build/source/utils/asymptote/examples/NURBSsurface.asy
@@ -9,43 +9,49 @@ currentprojection=perspective(50,80,50);
real[] uknot={0,0,0,0,0.5,1,1,1,1};
real[] vknot={0,0,0,0,0.4,0.6,1,1,1,1};
-triple[][] P={{
- (-31.2061,12.001,6.45082),
- (-31.3952,14.7353,6.53707),
- (-31.5909,21.277,6.70051),
- (-31.4284,25.4933,6.76745),
- (-31.5413,30.3485,6.68777),
- (-31.4896,32.2839,6.58385)
- },{
- (-28.279,12.001,7.89625),
- (-28.4187,14.7353,8.00954),
- (-28.5633,21.277,8.22422),
- (-28.4433,25.4933,8.31214),
- (-28.5266,30.3485,8.20749),
- (-28.4885,32.2839,8.07099)
- },{
- (-20,12.001,10.0379),
- (-20,14.7353,10.2001),
- (-20,21.277,10.5076),
- (-20,25.4933,10.6335),
- (-20,30.3485,10.4836),
- (-20,32.2839,10.2881)
- },{
- (-11.721,12.001,7.84024),
- (-11.5813,14.7353,7.95269),
- (-11.4367,21.277,8.16575),
- (-11.5567,25.4933,8.25302),
- (-11.4734,30.3485,8.14915),
- (-11.5115,32.2839,8.01367)
- },{
- (-8.79391,12.001,6.39481),
- (-8.60483,14.7353,6.48022),
- (-8.40905,21.277,6.64204),
- (-8.57158,25.4933,6.70832),
- (-8.45874,30.3485,6.62943),
- (-8.51041,32.2839,6.52653)
- }
-};
+triple[][] P=
+ {
+ {
+ (-31.2061,12.001,6.45082),
+ (-31.3952,14.7353,6.53707),
+ (-31.5909,21.277,6.70051),
+ (-31.4284,25.4933,6.76745),
+ (-31.5413,30.3485,6.68777),
+ (-31.4896,32.2839,6.58385)
+ },
+ {
+ (-28.279,12.001,7.89625),
+ (-28.4187,14.7353,8.00954),
+ (-28.5633,21.277,8.22422),
+ (-28.4433,25.4933,8.31214),
+ (-28.5266,30.3485,8.20749),
+ (-28.4885,32.2839,8.07099)
+ },
+ {
+ (-20,12.001,10.0379),
+ (-20,14.7353,10.2001),
+ (-20,21.277,10.5076),
+ (-20,25.4933,10.6335),
+ (-20,30.3485,10.4836),
+ (-20,32.2839,10.2881)
+ },
+ {
+ (-11.721,12.001,7.84024),
+ (-11.5813,14.7353,7.95269),
+ (-11.4367,21.277,8.16575),
+ (-11.5567,25.4933,8.25302),
+ (-11.4734,30.3485,8.14915),
+ (-11.5115,32.2839,8.01367)
+ },
+ {
+ (-8.79391,12.001,6.39481),
+ (-8.60483,14.7353,6.48022),
+ (-8.40905,21.277,6.64204),
+ (-8.57158,25.4933,6.70832),
+ (-8.45874,30.3485,6.62943),
+ (-8.51041,32.2839,6.52653)
+ }
+ };
draw(P,uknot,vknot,new pen[] {red,green,blue,magenta});
diff --git a/Build/source/utils/asymptote/examples/RiemannSphere.asy b/Build/source/utils/asymptote/examples/RiemannSphere.asy
index ec1ab7586a9..40f9d065a30 100644
--- a/Build/source/utils/asymptote/examples/RiemannSphere.asy
+++ b/Build/source/utils/asymptote/examples/RiemannSphere.asy
@@ -33,9 +33,9 @@ draw(p,1bp+heavyred);
draw(q,1bp+heavyblue);
triple
- A=(0,0,1),
- B=(u(40),v(40),w(40)),
- C=(x(40),y(40),z(40));
+A=(0,0,1),
+B=(u(40),v(40),w(40)),
+C=(x(40),y(40),z(40));
path3 L=A--C;
draw(L,1bp+black);
diff --git a/Build/source/utils/asymptote/examples/RiemannSurface.asy b/Build/source/utils/asymptote/examples/RiemannSurface.asy
index a1f1b665089..92f94bdc721 100644
--- a/Build/source/utils/asymptote/examples/RiemannSurface.asy
+++ b/Build/source/utils/asymptote/examples/RiemannSurface.asy
@@ -1,13 +1,13 @@
import graph3;
import palette;
-
+
size(200,300,keepAspect=false);
//settings.nothin=true;
-
+
currentprojection=orthographic(10,10,30);
currentlight=(10,10,5);
triple f(pair t) {return (exp(t.x)*cos(t.y),exp(t.x)*sin(t.y),t.y);}
-
+
surface s=surface(f,(-4,-2pi),(0,4pi),8,16,Spline);
s.colors(palette(s.map(zpart),Rainbow()));
draw(s,render(merge=true));
diff --git a/Build/source/utils/asymptote/examples/RiemannSurfaceRoot.asy b/Build/source/utils/asymptote/examples/RiemannSurfaceRoot.asy
index 8cb3af2cfa9..65098ac9359 100644
--- a/Build/source/utils/asymptote/examples/RiemannSurfaceRoot.asy
+++ b/Build/source/utils/asymptote/examples/RiemannSurfaceRoot.asy
@@ -5,11 +5,11 @@ import palette;
int n=3;
size(200,300,keepAspect=false);
-
+
currentprojection=orthographic(10,10,30);
currentlight=(10,10,5);
triple f(pair t) {return (t.x*cos(t.y),t.x*sin(t.y),t.x^(1/n)*sin(t.y/n));}
-
+
surface s=surface(f,(0,0),(1,2pi*n),8,16,Spline);
s.colors(palette(s.map(zpart),Rainbow()));
diff --git a/Build/source/utils/asymptote/examples/SierpinskiGasket.asy b/Build/source/utils/asymptote/examples/SierpinskiGasket.asy
index 2e0d4facd64..5936000fd3f 100644
--- a/Build/source/utils/asymptote/examples/SierpinskiGasket.asy
+++ b/Build/source/utils/asymptote/examples/SierpinskiGasket.asy
@@ -2,15 +2,15 @@ size(200);
import palette;
import three;
currentprojection=perspective(8,2,1);
-
+
triple[] M={(0,0,1),1/3*(sqrt(8),0,-1),
1/3*((sqrt(8))*Cos(120),(sqrt(8))*Sin(120),-1),
1/3*((sqrt(8))*Cos(240),(sqrt(8))*Sin(240),-1)};
-
+
int level=5;
-
+
surface s;
-
+
void recur(triple p, real u, int l) {
if(l < level)
for(triple V : M)
@@ -23,9 +23,9 @@ void recur(triple p, real u, int l) {
s.append(surface((p+u*(V+M[3]))--(p+u*(V+M[2]))--(p+u*(V+M[1]))--cycle));
}
}
-
+
recur(O,0.5,1);
-
+
s.colors(palette(s.map(zpart),Rainbow()));
-
+
draw(s,render(merge=true));
diff --git a/Build/source/utils/asymptote/examples/SierpinskiSponge.asy b/Build/source/utils/asymptote/examples/SierpinskiSponge.asy
index deaf7c1dec3..f26db20ff6b 100644
--- a/Build/source/utils/asymptote/examples/SierpinskiSponge.asy
+++ b/Build/source/utils/asymptote/examples/SierpinskiSponge.asy
@@ -4,36 +4,40 @@ import three;
currentprojection=orthographic(1,1,1);
-triple[] M={
- (-1,-1,-1),(0,-1,-1),(1,-1,-1),(1,0,-1),
- (1,1,-1),(0,1,-1),(-1,1,-1),(-1,0,-1),
- (-1,-1,0),(1,-1,0),(1,1,0),(-1,1,0),
- (-1,-1,1),(0,-1,1),(1,-1,1),(1,0,1),(1,1,1),(0,1,1),(-1,1,1),(-1,0,1)
-};
+triple[] M=
+ {
+ (-1,-1,-1),(0,-1,-1),(1,-1,-1),(1,0,-1),
+ (1,1,-1),(0,1,-1),(-1,1,-1),(-1,0,-1),
+ (-1,-1,0),(1,-1,0),(1,1,0),(-1,1,0),
+ (-1,-1,1),(0,-1,1),(1,-1,1),(1,0,1),(1,1,1),(0,1,1),(-1,1,1),(-1,0,1)
+ };
-surface[] Squares={
- surface((1,-1,-1)--(1,1,-1)--(1,1,1)--(1,-1,1)--cycle),
- surface((-1,-1,-1)--(-1,1,-1)--(-1,1,1)--(-1,-1,1)--cycle),
- surface((1,1,-1)--(-1,1,-1)--(-1,1,1)--(1,1,1)--cycle),
- surface((1,-1,-1)--(-1,-1,-1)--(-1,-1,1)--(1,-1,1)--cycle),
- surface((1,-1,1)--(1,1,1)--(-1,1,1)--(-1,-1,1)--cycle),
- surface((1,-1,-1)--(1,1,-1)--(-1,1,-1)--(-1,-1,-1)--cycle),
+surface[] Squares=
+ {
+ surface((1,-1,-1)--(1,1,-1)--(1,1,1)--(1,-1,1)--cycle),
+ surface((-1,-1,-1)--(-1,1,-1)--(-1,1,1)--(-1,-1,1)--cycle),
+ surface((1,1,-1)--(-1,1,-1)--(-1,1,1)--(1,1,1)--cycle),
+ surface((1,-1,-1)--(-1,-1,-1)--(-1,-1,1)--(1,-1,1)--cycle),
+ surface((1,-1,1)--(1,1,1)--(-1,1,1)--(-1,-1,1)--cycle),
+ surface((1,-1,-1)--(1,1,-1)--(-1,1,-1)--(-1,-1,-1)--cycle),
};
-int[][] SquaresPoints={
- {2,3,4,10,16,15,14,9},
- {0,7,6,11,18,19,12,8},
- {4,5,6,11,18,17,16,10},
- {2,1,0,8,12,13,14,9},
- {12,13,14,15,16,17,18,19},
- {0,1,2,3,4,5,6,7}
-};
+int[][] SquaresPoints=
+ {
+ {2,3,4,10,16,15,14,9},
+ {0,7,6,11,18,19,12,8},
+ {4,5,6,11,18,17,16,10},
+ {2,1,0,8,12,13,14,9},
+ {12,13,14,15,16,17,18,19},
+ {0,1,2,3,4,5,6,7}
+ };
-int[][] index={
- {0,2,4},{0,1},{1,2,4},{2,3},{1,3,4},{0,1},{0,3,4},{2,3},
- {4,5},{4,5},{4,5},{4,5},
- {0,2,5},{0,1},{1,2,5},{2,3},{1,3,5},{0,1},{0,3,5},{2,3}
-};
+int[][] index=
+ {
+ {0,2,4},{0,1},{1,2,4},{2,3},{1,3,4},{0,1},{0,3,4},{2,3},
+ {4,5},{4,5},{4,5},{4,5},
+ {0,2,5},{0,1},{1,2,5},{2,3},{1,3,5},{0,1},{0,3,5},{2,3}
+ };
int[] Sponge0=array(n=6,value=1);
diff --git a/Build/source/utils/asymptote/examples/animations/slidemovies.asy b/Build/source/utils/asymptote/examples/animations/slidemovies.asy
index bbfdd21eaba..22bd4e2f3cb 100644
--- a/Build/source/utils/asymptote/examples/animations/slidemovies.asy
+++ b/Build/source/utils/asymptote/examples/animations/slidemovies.asy
@@ -16,7 +16,7 @@ access embed; // For non-portable embedded movies
usersetting();
titlepage("Slides with {\tt Asymptote}: Animations","John C. Bowman",
- "University of Alberta","\today","http://asymptote.sf.net");
+ "University of Alberta","\today","https://asymptote.sourceforge.io");
title("Embedded PDF movies (portable)");
animation a=animation("A");
diff --git a/Build/source/utils/asymptote/examples/axialshade.asy b/Build/source/utils/asymptote/examples/axialshade.asy
new file mode 100644
index 00000000000..97977b2aeaa
--- /dev/null
+++ b/Build/source/utils/asymptote/examples/axialshade.asy
@@ -0,0 +1,5 @@
+size(0,100);
+
+axialshade(unitsquare,red,(0,0),blue,(1,1));
+
+
diff --git a/Build/source/utils/asymptote/examples/bars3.asy b/Build/source/utils/asymptote/examples/bars3.asy
index 4205d46f37c..58adcfb99f8 100644
--- a/Build/source/utils/asymptote/examples/bars3.asy
+++ b/Build/source/utils/asymptote/examples/bars3.asy
@@ -1,5 +1,5 @@
import three;
-import palette;
+import palette;
import graph3;
size(300);
diff --git a/Build/source/utils/asymptote/examples/centroidfg.asy b/Build/source/utils/asymptote/examples/centroidfg.asy
index 2e26454cdbe..278274fb404 100644
--- a/Build/source/utils/asymptote/examples/centroidfg.asy
+++ b/Build/source/utils/asymptote/examples/centroidfg.asy
@@ -8,8 +8,8 @@ real g(real x) {return x^2;}
draw(graph(f,a,b,operator ..),red);
draw(graph(g,a,b,operator ..),blue);
-
-xaxis();
+
+xaxis();
int n=5;
@@ -18,7 +18,7 @@ for(int i=0; i <= n; ++i) {
real x=a+width*i;
draw((x,g(x))--(x,f(x)));
}
-
+
labelx("$a$",a);
labelx("$b$",b);
draw((a,0)--(a,g(a)),dotted);
diff --git a/Build/source/utils/asymptote/examples/colorpatch.asy b/Build/source/utils/asymptote/examples/colorpatch.asy
index e0f6b5b4272..fccb03f8c6b 100644
--- a/Build/source/utils/asymptote/examples/colorpatch.asy
+++ b/Build/source/utils/asymptote/examples/colorpatch.asy
@@ -5,9 +5,9 @@ size(10cm);
surface s=surface(patch(new triple[][] {
{(0,0,0),(1,0,0),(1,0,0),(2,0,0)},
- {(0,1,0),(1,0,1),(1,0,1),(2,1,0)},
- {(0,1,0),(1,0,-1),(1,0,-1),(2,1,0)},
- {(0,2,0),(1,2,0),(1,2,0),(2,2,0)}}));
+ {(0,1,0),(1,0,1),(1,0,1),(2,1,0)},
+ {(0,1,0),(1,0,-1),(1,0,-1),(2,1,0)},
+ {(0,2,0),(1,2,0),(1,2,0),(2,2,0)}}));
s.s[0].colors=new pen[] {red,green,blue,black};
draw(s,nolight);
diff --git a/Build/source/utils/asymptote/examples/colorplanes.asy b/Build/source/utils/asymptote/examples/colorplanes.asy
index 16bef25b545..805b0819931 100644
--- a/Build/source/utils/asymptote/examples/colorplanes.asy
+++ b/Build/source/utils/asymptote/examples/colorplanes.asy
@@ -16,7 +16,7 @@ int[] edges={0,0,0,2};
gouraudshade(faces.push(y),project(y),p,edges);
gouraudshade(faces.push(l),project(l),p,edges);
gouraudshade(faces.push(g),project(g),new pen[]{cyan,magenta,yellow,black},
- edges);
+ edges);
add(faces);
diff --git a/Build/source/utils/asymptote/examples/conicurv.asy b/Build/source/utils/asymptote/examples/conicurv.asy
index cb678710c11..8170bb1b7cb 100644
--- a/Build/source/utils/asymptote/examples/conicurv.asy
+++ b/Build/source/utils/asymptote/examples/conicurv.asy
@@ -1,4 +1,4 @@
-// Original name : conicurv.mp
+// Original name : conicurv.mp
// Author : L. Nobre G.
// Translators : J. Pienaar (2004) and John Bowman (2005)
@@ -7,7 +7,7 @@ texpreamble("\usepackage{bm}");
size(300,0);
-currentprojection=perspective(10,-5,5.44);
+currentprojection=perspective(10,-5,5.44);
real theta=30, width=3, shortradius=2, bord=2, refsize=1, vecsize=2;
real height=0.3, anglar=1.75, totup=3;
diff --git a/Build/source/utils/asymptote/examples/contextfonts.asy b/Build/source/utils/asymptote/examples/contextfonts.asy
index 39177abdba3..9e7811d9601 100644
--- a/Build/source/utils/asymptote/examples/contextfonts.asy
+++ b/Build/source/utils/asymptote/examples/contextfonts.asy
@@ -1,6 +1,6 @@
settings.tex="context";
// Work around ConTeXT bug for font sizes less than 12pt:
-texpreamble("\setupbodyfont[8pt]");
+texpreamble("\setupbodyfont[8pt]");
usetypescript("iwona");
usetypescript("antykwa-torunska");
diff --git a/Build/source/utils/asymptote/examples/controlsystem.asy b/Build/source/utils/asymptote/examples/controlsystem.asy
index bfd8336f1f6..af7906ecad3 100644
--- a/Build/source/utils/asymptote/examples/controlsystem.asy
+++ b/Build/source/utils/asymptote/examples/controlsystem.asy
@@ -4,7 +4,7 @@ import flowchart;
block delay=roundrectangle("$e^{-sT_t}$",(0.33,0));
block system=roundrectangle("$\frac{s+3}{s^2+0.3s+1}$",(0.6,0));
block controller=roundrectangle("$0.06\left( 1 + \frac{1}{s}\right)$",
- (0.45,-0.25));
+ (0.45,-0.25));
block sum1=circle("",(0.15,0),mindiameter=0.3cm);
block junction1=circle("",(0.75,0),fillpen=currentpen);
@@ -16,7 +16,7 @@ draw(junction1);
add(new void(picture pic, transform t) {
blockconnector operator --=blockconnector(pic,t);
-
+
block(0,0)--Label("$u$",align=N)--Arrow--sum1--Arrow--delay--Arrow--
system--junction1--Label("$y$",align=N)--Arrow--block(1,0);
diff --git a/Build/source/utils/asymptote/examples/cosaddition.asy b/Build/source/utils/asymptote/examples/cosaddition.asy
index f6ce8de62a4..c996367d1c2 100644
--- a/Build/source/utils/asymptote/examples/cosaddition.asy
+++ b/Build/source/utils/asymptote/examples/cosaddition.asy
@@ -4,7 +4,7 @@ import geometry;
real A=130;
real B=40;
-pair O=(0,0);
+pair O=(0,0);
pair R=(1,0);
pair P=dir(A);
pair Q=dir(B);
diff --git a/Build/source/utils/asymptote/examples/cpkcolors.asy b/Build/source/utils/asymptote/examples/cpkcolors.asy
index ddc7e286d58..8487449c992 100644
--- a/Build/source/utils/asymptote/examples/cpkcolors.asy
+++ b/Build/source/utils/asymptote/examples/cpkcolors.asy
@@ -17,243 +17,245 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-string[] Element={
- "Xx", // 0
- "H", // 1
- "He", // 2
- "Li", // 3
- "Be", // 4
- "B", // 5
- "C", // 6
- "N", // 7
- "O", // 8
- "F", // 9
- "Ne", // 10
- "Na", // 11
- "Mg", // 12
- "Al", // 13
- "Si", // 14
- "P", // 15
- "S", // 16
- "Cl", // 17
- "Ar", // 18
- "K", // 19
- "Ca", // 20
- "Sc", // 21
- "Ti", // 22
- "V", // 23
- "Cr", // 24
- "Mn", // 25
- "Fe", // 26
- "Co", // 27
- "Ni", // 28
- "Cu", // 29
- "Zn", // 30
- "Ga", // 31
- "Ge", // 32
- "As", // 33
- "Se", // 34
- "Br", // 35
- "Kr", // 36
- "Rb", // 37
- "Sr", // 38
- "Y", // 39
- "Zr", // 40
- "Nb", // 41
- "Mo", // 42
- "Tc", // 43
- "Ru", // 44
- "Rh", // 45
- "Pd", // 46
- "Ag", // 47
- "Cd", // 48
- "In", // 49
- "Sn", // 50
- "Sb", // 51
- "Te", // 52
- "I", // 53
- "Xe", // 54
- "Cs", // 55
- "Ba", // 56
- "La", // 57
- "Ce", // 58
- "Pr", // 59
- "Nd", // 60
- "Pm", // 61
- "Sm", // 62
- "Eu", // 63
- "Gd", // 64
- "Tb", // 65
- "Dy", // 66
- "Ho", // 67
- "Er", // 68
- "Tm", // 69
- "Yb", // 70
- "Lu", // 71
- "Hf", // 72
- "Ta", // 73
- "W", // 74
- "Re", // 75
- "Os", // 76
- "Ir", // 77
- "Pt", // 78
- "Au", // 79
- "Hg", // 80
- "Tl", // 81
- "Pb", // 82
- "Bi", // 83
- "Po", // 84
- "At", // 85
- "Rn", // 86
- "Fr", // 87
- "Ra", // 88
- "Ac", // 89
- "Th", // 90
- "Pa", // 91
- "U", // 92
- "Np", // 93
- "Pu", // 94
- "Am", // 95
- "Cm", // 96
- "Bk", // 97
- "Cf", // 98
- "Es", // 99
- "Fm", // 100
- "Md", // 101
- "No", // 102
- "Lr", // 103
- "Rf", // 104
- "Db", // 105
- "Sg", // 106
- "Bh", // 107
- "Hs", // 108
- "Mt", // 109
- /*
- "Ds", // 110
- "Uuu",// 111
- "Uub",// 112
- "Uut",// 113
- "Uuq",// 114
- "Uup",// 115
- "Uuh",// 116
- "Uus",// 117
- "Uuo",// 118
- */
-};
+string[] Element=
+ {
+ "Xx", // 0
+ "H", // 1
+ "He", // 2
+ "Li", // 3
+ "Be", // 4
+ "B", // 5
+ "C", // 6
+ "N", // 7
+ "O", // 8
+ "F", // 9
+ "Ne", // 10
+ "Na", // 11
+ "Mg", // 12
+ "Al", // 13
+ "Si", // 14
+ "P", // 15
+ "S", // 16
+ "Cl", // 17
+ "Ar", // 18
+ "K", // 19
+ "Ca", // 20
+ "Sc", // 21
+ "Ti", // 22
+ "V", // 23
+ "Cr", // 24
+ "Mn", // 25
+ "Fe", // 26
+ "Co", // 27
+ "Ni", // 28
+ "Cu", // 29
+ "Zn", // 30
+ "Ga", // 31
+ "Ge", // 32
+ "As", // 33
+ "Se", // 34
+ "Br", // 35
+ "Kr", // 36
+ "Rb", // 37
+ "Sr", // 38
+ "Y", // 39
+ "Zr", // 40
+ "Nb", // 41
+ "Mo", // 42
+ "Tc", // 43
+ "Ru", // 44
+ "Rh", // 45
+ "Pd", // 46
+ "Ag", // 47
+ "Cd", // 48
+ "In", // 49
+ "Sn", // 50
+ "Sb", // 51
+ "Te", // 52
+ "I", // 53
+ "Xe", // 54
+ "Cs", // 55
+ "Ba", // 56
+ "La", // 57
+ "Ce", // 58
+ "Pr", // 59
+ "Nd", // 60
+ "Pm", // 61
+ "Sm", // 62
+ "Eu", // 63
+ "Gd", // 64
+ "Tb", // 65
+ "Dy", // 66
+ "Ho", // 67
+ "Er", // 68
+ "Tm", // 69
+ "Yb", // 70
+ "Lu", // 71
+ "Hf", // 72
+ "Ta", // 73
+ "W", // 74
+ "Re", // 75
+ "Os", // 76
+ "Ir", // 77
+ "Pt", // 78
+ "Au", // 79
+ "Hg", // 80
+ "Tl", // 81
+ "Pb", // 82
+ "Bi", // 83
+ "Po", // 84
+ "At", // 85
+ "Rn", // 86
+ "Fr", // 87
+ "Ra", // 88
+ "Ac", // 89
+ "Th", // 90
+ "Pa", // 91
+ "U", // 92
+ "Np", // 93
+ "Pu", // 94
+ "Am", // 95
+ "Cm", // 96
+ "Bk", // 97
+ "Cf", // 98
+ "Es", // 99
+ "Fm", // 100
+ "Md", // 101
+ "No", // 102
+ "Lr", // 103
+ "Rf", // 104
+ "Db", // 105
+ "Sg", // 106
+ "Bh", // 107
+ "Hs", // 108
+ "Mt", // 109
+ /*
+ "Ds", // 110
+ "Uuu",// 111
+ "Uub",// 112
+ "Uut",// 113
+ "Uuq",// 114
+ "Uup",// 115
+ "Uuh",// 116
+ "Uus",// 117
+ "Uuo",// 118
+ */
+ };
// Default table of CPK atom colors
// (ghemical colors with a few proposed modifications).
-string[] Hexcolor={
- "FF1493", // Xx 0
- "FFFFFF", // H 1
- "D9FFFF", // He 2
- "CC80FF", // Li 3
- "C2FF00", // Be 4
- "FFB5B5", // B 5
- "909090", // C 6 - changed from ghemical
- "3050F8", // N 7 - changed from ghemical
- "FF0D0D", // O 8
- "90E050", // F 9 - changed from ghemical
- "B3E3F5", // Ne 10
- "AB5CF2", // Na 11
- "8AFF00", // Mg 12
- "BFA6A6", // Al 13
- "F0C8A0", // Si 14 - changed from ghemical
- "FF8000", // P 15
- "FFFF30", // S 16
- "1FF01F", // Cl 17
- "80D1E3", // Ar 18
- "8F40D4", // K 19
- "3DFF00", // Ca 20
- "E6E6E6", // Sc 21
- "BFC2C7", // Ti 22
- "A6A6AB", // V 23
- "8A99C7", // Cr 24
- "9C7AC7", // Mn 25
- "E06633", // Fe 26 - changed from ghemical
- "F090A0", // Co 27 - changed from ghemical
- "50D050", // Ni 28 - changed from ghemical
- "C88033", // Cu 29 - changed from ghemical
- "7D80B0", // Zn 30
- "C28F8F", // Ga 31
- "668F8F", // Ge 32
- "BD80E3", // As 33
- "FFA100", // Se 34
- "A62929", // Br 35
- "5CB8D1", // Kr 36
- "702EB0", // Rb 37
- "00FF00", // Sr 38
- "94FFFF", // Y 39
- "94E0E0", // Zr 40
- "73C2C9", // Nb 41
- "54B5B5", // Mo 42
- "3B9E9E", // Tc 43
- "248F8F", // Ru 44
- "0A7D8C", // Rh 45
- "006985", // Pd 46
- "C0C0C0", // Ag 47 - changed from ghemical
- "FFD98F", // Cd 48
- "A67573", // In 49
- "668080", // Sn 50
- "9E63B5", // Sb 51
- "D47A00", // Te 52
- "940094", // I 53
- "429EB0", // Xe 54
- "57178F", // Cs 55
- "00C900", // Ba 56
- "70D4FF", // La 57
- "FFFFC7", // Ce 58
- "D9FFC7", // Pr 59
- "C7FFC7", // Nd 60
- "A3FFC7", // Pm 61
- "8FFFC7", // Sm 62
- "61FFC7", // Eu 63
- "45FFC7", // Gd 64
- "30FFC7", // Tb 65
- "1FFFC7", // Dy 66
- "00FF9C", // Ho 67
- "00E675", // Er 68
- "00D452", // Tm 69
- "00BF38", // Yb 70
- "00AB24", // Lu 71
- "4DC2FF", // Hf 72
- "4DA6FF", // Ta 73
- "2194D6", // W 74
- "267DAB", // Re 75
- "266696", // Os 76
- "175487", // Ir 77
- "D0D0E0", // Pt 78 - changed from ghemical
- "FFD123", // Au 79 - changed from ghemical
- "B8B8D0", // Hg 80 - changed from ghemical
- "A6544D", // Tl 81
- "575961", // Pb 82
- "9E4FB5", // Bi 83
- "AB5C00", // Po 84
- "754F45", // At 85
- "428296", // Rn 86
- "420066", // Fr 87
- "007D00", // Ra 88
- "70ABFA", // Ac 89
- "00BAFF", // Th 90
- "00A1FF", // Pa 91
- "008FFF", // U 92
- "0080FF", // Np 93
- "006BFF", // Pu 94
- "545CF2", // Am 95
- "785CE3", // Cm 96
- "8A4FE3", // Bk 97
- "A136D4", // Cf 98
- "B31FD4", // Es 99
- "B31FBA", // Fm 100
- "B30DA6", // Md 101
- "BD0D87", // No 102
- "C70066", // Lr 103
- "CC0059", // Rf 104
- "D1004F", // Db 105
- "D90045", // Sg 106
- "E00038", // Bh 107
- "E6002E", // Hs 108
- "EB0026" // Mt 109
-};
+string[] Hexcolor=
+ {
+ "FF1493", // Xx 0
+ "FFFFFF", // H 1
+ "D9FFFF", // He 2
+ "CC80FF", // Li 3
+ "C2FF00", // Be 4
+ "FFB5B5", // B 5
+ "909090", // C 6 - changed from ghemical
+ "3050F8", // N 7 - changed from ghemical
+ "FF0D0D", // O 8
+ "90E050", // F 9 - changed from ghemical
+ "B3E3F5", // Ne 10
+ "AB5CF2", // Na 11
+ "8AFF00", // Mg 12
+ "BFA6A6", // Al 13
+ "F0C8A0", // Si 14 - changed from ghemical
+ "FF8000", // P 15
+ "FFFF30", // S 16
+ "1FF01F", // Cl 17
+ "80D1E3", // Ar 18
+ "8F40D4", // K 19
+ "3DFF00", // Ca 20
+ "E6E6E6", // Sc 21
+ "BFC2C7", // Ti 22
+ "A6A6AB", // V 23
+ "8A99C7", // Cr 24
+ "9C7AC7", // Mn 25
+ "E06633", // Fe 26 - changed from ghemical
+ "F090A0", // Co 27 - changed from ghemical
+ "50D050", // Ni 28 - changed from ghemical
+ "C88033", // Cu 29 - changed from ghemical
+ "7D80B0", // Zn 30
+ "C28F8F", // Ga 31
+ "668F8F", // Ge 32
+ "BD80E3", // As 33
+ "FFA100", // Se 34
+ "A62929", // Br 35
+ "5CB8D1", // Kr 36
+ "702EB0", // Rb 37
+ "00FF00", // Sr 38
+ "94FFFF", // Y 39
+ "94E0E0", // Zr 40
+ "73C2C9", // Nb 41
+ "54B5B5", // Mo 42
+ "3B9E9E", // Tc 43
+ "248F8F", // Ru 44
+ "0A7D8C", // Rh 45
+ "006985", // Pd 46
+ "C0C0C0", // Ag 47 - changed from ghemical
+ "FFD98F", // Cd 48
+ "A67573", // In 49
+ "668080", // Sn 50
+ "9E63B5", // Sb 51
+ "D47A00", // Te 52
+ "940094", // I 53
+ "429EB0", // Xe 54
+ "57178F", // Cs 55
+ "00C900", // Ba 56
+ "70D4FF", // La 57
+ "FFFFC7", // Ce 58
+ "D9FFC7", // Pr 59
+ "C7FFC7", // Nd 60
+ "A3FFC7", // Pm 61
+ "8FFFC7", // Sm 62
+ "61FFC7", // Eu 63
+ "45FFC7", // Gd 64
+ "30FFC7", // Tb 65
+ "1FFFC7", // Dy 66
+ "00FF9C", // Ho 67
+ "00E675", // Er 68
+ "00D452", // Tm 69
+ "00BF38", // Yb 70
+ "00AB24", // Lu 71
+ "4DC2FF", // Hf 72
+ "4DA6FF", // Ta 73
+ "2194D6", // W 74
+ "267DAB", // Re 75
+ "266696", // Os 76
+ "175487", // Ir 77
+ "D0D0E0", // Pt 78 - changed from ghemical
+ "FFD123", // Au 79 - changed from ghemical
+ "B8B8D0", // Hg 80 - changed from ghemical
+ "A6544D", // Tl 81
+ "575961", // Pb 82
+ "9E4FB5", // Bi 83
+ "AB5C00", // Po 84
+ "754F45", // At 85
+ "428296", // Rn 86
+ "420066", // Fr 87
+ "007D00", // Ra 88
+ "70ABFA", // Ac 89
+ "00BAFF", // Th 90
+ "00A1FF", // Pa 91
+ "008FFF", // U 92
+ "0080FF", // Np 93
+ "006BFF", // Pu 94
+ "545CF2", // Am 95
+ "785CE3", // Cm 96
+ "8A4FE3", // Bk 97
+ "A136D4", // Cf 98
+ "B31FD4", // Es 99
+ "B31FBA", // Fm 100
+ "B30DA6", // Md 101
+ "BD0D87", // No 102
+ "C70066", // Lr 103
+ "CC0059", // Rf 104
+ "D1004F", // Db 105
+ "D90045", // Sg 106
+ "E00038", // Bh 107
+ "E6002E", // Hs 108
+ "EB0026" // Mt 109
+ };
diff --git a/Build/source/utils/asymptote/examples/curvedlabel3.asy b/Build/source/utils/asymptote/examples/curvedlabel3.asy
index 5bee2342d83..bdb0566d568 100644
--- a/Build/source/utils/asymptote/examples/curvedlabel3.asy
+++ b/Build/source/utils/asymptote/examples/curvedlabel3.asy
@@ -8,7 +8,7 @@ string txt1="\hbox{This is a test of \emph{curved} 3D labels in
\textbf{Asymptote} (implemented with {\tt texpath}).}";
string txt2="This is a test of curved labels in Asymptote\\(implemented
-without the {\tt PSTricks pstextpath} macro).";
+without the {\tt PSTricks pstextpath} macro).";
draw(surface(g),paleblue+opacity(0.5));
draw(labelpath(txt1,subpath(g,0,reltime(g,0.95)),angle=-90),orange);
diff --git a/Build/source/utils/asymptote/examples/dimension.asy b/Build/source/utils/asymptote/examples/dimension.asy
index 1244ba84e68..c22110aa5e9 100644
--- a/Build/source/utils/asymptote/examples/dimension.asy
+++ b/Build/source/utils/asymptote/examples/dimension.asy
@@ -1,7 +1,7 @@
-size(12cm,0);
-
+size(12cm,0);
+
void distance(picture pic=currentpicture, pair A, pair B, Label L="", real n=0,
- pen p=currentpen)
+ pen p=currentpen)
{
real d=3mm;
path g=A--B;
@@ -9,15 +9,15 @@ void distance(picture pic=currentpicture, pair A, pair B, Label L="", real n=0,
pic.add(new void(frame f, transform t) {
picture opic;
path G=T*t*g;
- draw(opic,Label(L,Center,UnFill(1)),G,p,Arrows(NoFill),Bars,PenMargins);
+ draw(opic,Label(L,Center,UnFill(1)),G,p,Arrows(NoFill),Bars,PenMargins);
add(f,opic.fit());
});
pic.addBox(min(g),max(g),T*min(p),T*max(p));
-}
-
-pair A=(0,0), B=(3,3);
-
-dot(A);
-dot(B);
-
-distance(A,B,"$\ell$",1);
+}
+
+pair A=(0,0), B=(3,3);
+
+dot(A);
+dot(B);
+
+distance(A,B,"$\ell$",1);
diff --git a/Build/source/utils/asymptote/examples/electromagnetic.asy b/Build/source/utils/asymptote/examples/electromagnetic.asy
index d229f76b748..d6484ada99a 100644
--- a/Build/source/utils/asymptote/examples/electromagnetic.asy
+++ b/Build/source/utils/asymptote/examples/electromagnetic.asy
@@ -1,47 +1,47 @@
-import graph;
+import graph;
import palette;
-texpreamble("\usepackage[amssymb,thinqspace,thinspace]{SIunits}");
-
-size(800,200);
-
+texpreamble("\usepackage[amssymb,thinqspace,thinspace]{SIunits}");
+
+size(800,200);
+
real c=3e8;
real nm=1e-9;
-real freq(real lambda) {return c/(lambda*nm);}
-real lambda(real f) {return c/(f*nm);}
-
-real fmin=10;
-real fmax=1e23;
-
-scale(Log(true),Linear(true));
-xlimits(fmin,fmax);
-ylimits(0,1);
-
+real freq(real lambda) {return c/(lambda*nm);}
+real lambda(real f) {return c/(f*nm);}
+
+real fmin=10;
+real fmax=1e23;
+
+scale(Log(true),Linear(true));
+xlimits(fmin,fmax);
+ylimits(0,1);
+
real uv=freq(400);
real ir=freq(700);
-
+
bounds visible=bounds(Scale(uv).x,Scale(ir).x);
palette(visible,uv,ir+(0,2),Bottom,Rainbow(),invisible);
-xaxis(Label("\hertz",1),Bottom,RightTicks,above=true);
-
+xaxis(Label("\hertz",1),Bottom,RightTicks,above=true);
+
real log10Left(real x) {return -log10(x);}
real pow10Left(real x) {return pow10(-x);}
scaleT LogLeft=scaleT(log10Left,pow10Left,logarithmic=true);
-picture q=secondaryX(new void(picture p) {
- scale(p,LogLeft,Linear);
+picture q=secondaryX(new void(picture p) {
+ scale(p,LogLeft,Linear);
xlimits(p,lambda(fmax),lambda(fmin));
- ylimits(p,0,1);
- xaxis(p,Label("\nano\metre",1,0.01N),Top,LeftTicks(DefaultLogFormat,n=10));
- });
-
-add(q,above=true);
+ ylimits(p,0,1);
+ xaxis(p,Label("\nano\metre",1,0.01N),Top,LeftTicks(DefaultLogFormat,n=10));
+ });
+
+add(q,above=true);
margin margin=PenMargin(0,0);
-draw("radio",Scale((10,1))--Scale((5e12,1)),S,Arrow);
+draw("radio",Scale((10,1))--Scale((5e12,1)),S,Arrow);
draw("infrared",Scale((1e12,1.75))--Scale(shift(0,1.75)*ir),LeftSide,Arrows,margin);
draw("UV",Scale(shift(0,1.75)*uv)--Scale((1e17,1.76)),LeftSide,Arrows,margin);
-draw("x-rays",Scale((1e16,1))--Scale((1e21,1)),RightSide,Arrows);
-draw("$\gamma$-rays",Scale((fmax,1.75))--Scale((2e18,1.75)),Arrow);
+draw("x-rays",Scale((1e16,1))--Scale((1e21,1)),RightSide,Arrows);
+draw("$\gamma$-rays",Scale((fmax,1.75))--Scale((2e18,1.75)),Arrow);
diff --git a/Build/source/utils/asymptote/examples/equilchord.asy b/Build/source/utils/asymptote/examples/equilchord.asy
index b93da942d08..b7ed365d3ba 100644
--- a/Build/source/utils/asymptote/examples/equilchord.asy
+++ b/Build/source/utils/asymptote/examples/equilchord.asy
@@ -6,7 +6,7 @@ currentlight=(-1,-1,2);
real t=0.5;
real F(pair z) {
- return (z.x^2+z.y^2 <= 1) ? sqrt(3)*(sqrt(1-z.x^2)-abs(z.y)) : 0;
+ return (z.x^2+z.y^2 <= 1) ? sqrt(3)*(sqrt(1-z.x^2)-abs(z.y)) : 0;
}
real a=1.5;
diff --git a/Build/source/utils/asymptote/examples/fequlogo.asy b/Build/source/utils/asymptote/examples/fequlogo.asy
index 0f9fb0212d1..e896911994c 100644
--- a/Build/source/utils/asymptote/examples/fequlogo.asy
+++ b/Build/source/utils/asymptote/examples/fequlogo.asy
@@ -4,7 +4,7 @@ import obj;
size(200,0);
size3(200);
-if(settings.render < 0) settings.render=8;
+if(settings.render < 0) settings.render=8;
texpreamble("\usepackage[T1]{fontenc}");
texpreamble("\usepackage{ccfonts,eulervm}");
@@ -34,4 +34,4 @@ 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}+opacity(0.9)));
}
-);
+ );
diff --git a/Build/source/utils/asymptote/examples/filesurface.asy b/Build/source/utils/asymptote/examples/filesurface.asy
index b4817a05863..2202554876f 100644
--- a/Build/source/utils/asymptote/examples/filesurface.asy
+++ b/Build/source/utils/asymptote/examples/filesurface.asy
@@ -19,7 +19,7 @@ surface s=surface(f,(0,0),(x.length-1,y.length-1),x.length-1,y.length-1);
real[] level=uniform(min(f)*(1-sqrtEpsilon),max(f)*(1+sqrtEpsilon),4);
s.colors(palette(s.map(new real(triple v) {return find(level >= v.z);}),
- Rainbow()));
+ Rainbow()));
draw(s,meshpen=thick(),render(merge=true));
@@ -32,11 +32,11 @@ yaxis3("$y$",Bounds,InTicks(Step=1,step=0.1));
zaxis3("$z$",Bounds,InTicks);
/*
-picture palette;
-size3(palette,1cm);
-draw(palette,unitcube,red);
-frame F=palette.fit3();
-add(F,(M.x,m.y,m.z));
+ picture palette;
+ size3(palette,1cm);
+ draw(palette,unitcube,red);
+ frame F=palette.fit3();
+ add(F,(M.x,m.y,m.z));
*/
currentprojection=perspective(camera=target+realmult(dir(68,225),M-m),
diff --git a/Build/source/utils/asymptote/examples/fillcontour.asy b/Build/source/utils/asymptote/examples/fillcontour.asy
index 311192fb7f8..0197386670f 100644
--- a/Build/source/utils/asymptote/examples/fillcontour.asy
+++ b/Build/source/utils/asymptote/examples/fillcontour.asy
@@ -15,7 +15,7 @@ int Divs=10;
defaultpen(1bp);
bounds range=bounds(-1,1);
-
+
real[] Cvals=uniform(range.min,range.max,Divs);
guide[][] g=contour(f,a,b,Cvals,N,operator --);
diff --git a/Build/source/utils/asymptote/examples/fin.asy b/Build/source/utils/asymptote/examples/fin.asy
index 8fe88f3dc0e..f1b7e20182a 100644
--- a/Build/source/utils/asymptote/examples/fin.asy
+++ b/Build/source/utils/asymptote/examples/fin.asy
@@ -2,7 +2,7 @@ import three;
import palette;
int N = 26;
-real[] C = array(N,0);
+real[] C = array(N,0);
real[][] A = new real[N][N];
for(int i = 0; i < N; ++i)
for(int j = 0; j < N; ++j)
@@ -46,23 +46,23 @@ A[i][indexof(1,2)] = 1; C[i] = Tb;
// interior nodes
for(int m = 2; m<13; ++m)
-{
- A[i][indexof(m,2)] = -4;
- A[i][indexof(m-1,2)] = A[i][indexof(m+1,2)] = 1;
- A[i][indexof(m,1)] = 2;
- C[i] = 0;
- ++i;
-}
+ {
+ A[i][indexof(m,2)] = -4;
+ A[i][indexof(m-1,2)] = A[i][indexof(m+1,2)] = 1;
+ A[i][indexof(m,1)] = 2;
+ C[i] = 0;
+ ++i;
+ }
// convective bottom side nodes
for(int m = 2; m<13; ++m)
-{
- A[i][indexof(m,1)] = -(2+h*delta/k);
- A[i][indexof(m-1,1)] = A[i][indexof(m+1,1)] = 0.5;
- A[i][indexof(m,2)] = 1;
- C[i] = -h*delta*Tinf/k;
- ++i;
-}
+ {
+ A[i][indexof(m,1)] = -(2+h*delta/k);
+ A[i][indexof(m-1,1)] = A[i][indexof(m+1,1)] = 0.5;
+ A[i][indexof(m,2)] = 1;
+ C[i] = -h*delta*Tinf/k;
+ ++i;
+ }
// convective bottom right corner node
A[i][indexof(13,2)] = A[i][indexof(12,1)] = 0.5;
@@ -115,18 +115,18 @@ material lookupColour(int m,int n)
draw(shift(0,1,0)*rightsquare,lookupColour(1,2));
for(int i = 2; i < 13; ++i)
-{
- draw(shift(i-1,1,0)*square,lookupColour(i,2));
-}
+ {
+ draw(shift(i-1,1,0)*square,lookupColour(i,2));
+ }
draw(shift(12,1,0)*leftsquare,lookupColour(13,2));
draw(shift(0,2,0)*SEcorner,lookupColour(1,3));
draw(shift(0,0,0)*NEcorner,lookupColour(1,1));
for(int i = 2; i < 13; ++i)
-{
- draw(shift(i-1,0,0)*topsquare,lookupColour(i,1));
- draw(shift(i-1,2,0)*bottomsquare,lookupColour(i,3));
-}
+ {
+ draw(shift(i-1,0,0)*topsquare,lookupColour(i,1));
+ draw(shift(i-1,2,0)*bottomsquare,lookupColour(i,3));
+ }
draw(shift(12,2,0)*SWcorner,lookupColour(13,3));
draw(shift(12,0,0)*NWcorner,lookupColour(13,1));
diff --git a/Build/source/utils/asymptote/examples/floatingdisk.asy b/Build/source/utils/asymptote/examples/floatingdisk.asy
index 88eae565a34..68c49440428 100644
--- a/Build/source/utils/asymptote/examples/floatingdisk.asy
+++ b/Build/source/utils/asymptote/examples/floatingdisk.asy
@@ -1,28 +1,28 @@
-import trembling;
-if(settings.outformat == "")
- settings.outformat="pdf";
-
-size(6cm,0);
-
-real R=1/5;
-real h=0.5;
-real d=1/12;
-real l=.7;
-
-pair pA=(-l,0);
-pair pB=(l,0);
+import trembling;
+if(settings.outformat == "")
+ settings.outformat="pdf";
+
+size(6cm,0);
+
+real R=1/5;
+real h=0.5;
+real d=1/12;
+real l=.7;
+
+pair pA=(-l,0);
+pair pB=(l,0);
tremble tr=tremble(angle=10,frequency=0.1,random=50,fuzz=1);
-path waterline=tr.deform(pA..pB);
-
-path disk=shift(0,-d)*scale(R)*unitcircle;
-path water=waterline--(l,-h)--(-l,-h)--(-l,0)--cycle;
-path container=(l,1/7)--(l,-h)--(-l,-h)--(-l,1/7);
-
-filldraw(disk,red,linewidth(.3));
-fill(water,mediumgrey+opacity(0.5));
-draw(waterline);
-
-draw(container,linewidth(1.5));
-
+path waterline=tr.deform(pA..pB);
+
+path disk=shift(0,-d)*scale(R)*unitcircle;
+path water=waterline--(l,-h)--(-l,-h)--(-l,0)--cycle;
+path container=(l,1/7)--(l,-h)--(-l,-h)--(-l,1/7);
+
+filldraw(disk,red,linewidth(.3));
+fill(water,mediumgrey+opacity(0.5));
+draw(waterline);
+
+draw(container,linewidth(1.5));
+
shipout(bbox(2mm));
diff --git a/Build/source/utils/asymptote/examples/floor.asy b/Build/source/utils/asymptote/examples/floor.asy
index 02c2446abe8..ed61c0e8730 100644
--- a/Build/source/utils/asymptote/examples/floor.asy
+++ b/Build/source/utils/asymptote/examples/floor.asy
@@ -10,7 +10,7 @@ bool3 branch(real x) {
static real lasty;
static bool first=true;
real y=floor(x);
- bool samebranch=first || lasty == y;
+ bool samebranch=first || lasty == y;
first=false;
if(samebranch) lasty=x;
else {
@@ -21,7 +21,7 @@ bool3 branch(real x) {
return samebranch ? true : default;
};
-draw(graph(Floor,-5.5,5.5,500,branch));
+draw(graph(Floor,-5.5,5.5,500,branch));
axes("$x$",rotate(0)*"$\lfloor x\rfloor$",red);
dot(Close);
diff --git a/Build/source/utils/asymptote/examples/gamma.asy b/Build/source/utils/asymptote/examples/gamma.asy
index f92dd775abb..136ec01401f 100644
--- a/Build/source/utils/asymptote/examples/gamma.asy
+++ b/Build/source/utils/asymptote/examples/gamma.asy
@@ -12,7 +12,7 @@ bool3 branch(real x)
}
draw(graph(gamma,-4,4,n=2000,branch),red);
-
+
scale(false);
xlimits(-4,4);
ylimits(-6,6);
diff --git a/Build/source/utils/asymptote/examples/gamma3.asy b/Build/source/utils/asymptote/examples/gamma3.asy
index e522dad4e70..6fc56065cb2 100644
--- a/Build/source/utils/asymptote/examples/gamma3.asy
+++ b/Build/source/utils/asymptote/examples/gamma3.asy
@@ -7,7 +7,7 @@ currentprojection=orthographic(1,-2,1);
real X=4.5;
real M=abs(gamma((X,0)));
-pair Gamma(pair z)
+pair Gamma(pair z)
{
return (z.x > 0 || z != floor(z.x)) ? gamma(z) : M;
}
diff --git a/Build/source/utils/asymptote/examples/genustwo.asy b/Build/source/utils/asymptote/examples/genustwo.asy
index 0d346481d04..79e07e22684 100644
--- a/Build/source/utils/asymptote/examples/genustwo.asy
+++ b/Build/source/utils/asymptote/examples/genustwo.asy
@@ -12,9 +12,9 @@ real toruscontour(real x, real y, real z) {
return (r-2)^2 + z^2 - tuberadius^2;
}
-// Take the union of the two tangent tori (by taking
+// Take the union of the two tangent tori (by taking
// the product of the functions defining them). Then
-// add (or subtract) a bit of noise to smooth things
+// add (or subtract) a bit of noise to smooth things
// out.
real f(real x, real y, real z) {
real f1 = toruscontour(x - 2 - tuberadius, y, z);
@@ -22,15 +22,15 @@ real f(real x, real y, real z) {
return f1 * f2 - 0.1;
}
-// The noisy function extends a bit farther than the union of
+// The noisy function extends a bit farther than the union of
// the two tori, so include a bit of extra space in the box.
triple max = (2*(2+tuberadius), 2+tuberadius, tuberadius)
- + (0.1, 0.1, 0.1);
+ + (0.1, 0.1, 0.1);
triple min = -max;
// Draw the implicit surface.
-draw(implicitsurface(f, min, max, overlapedges=true,
+draw(implicitsurface(f, min, max, overlapedges=true,
nx=20, nz=5),
surfacepen=material(diffusepen=gray(0.6),
- emissivepen=gray(0.3),
- specularpen=gray(0.1)));
+ emissivepen=gray(0.3),
+ specularpen=gray(0.1)));
diff --git a/Build/source/utils/asymptote/examples/imagehistogram.asy b/Build/source/utils/asymptote/examples/imagehistogram.asy
index d3bdc783757..302d69194d9 100644
--- a/Build/source/utils/asymptote/examples/imagehistogram.asy
+++ b/Build/source/utils/asymptote/examples/imagehistogram.asy
@@ -1,47 +1,47 @@
import stats;
-import graph;
-import palette;
-import contour;
-
+import graph;
+import palette;
+import contour;
+
size(20cm);
scale(false);
pair[] data=new pair[50000];
for(int i=0; i < data.length; ++i)
- data[i]=Gaussrandpair();
-
-// Histogram limits and number of bins
-pair datamin=(-0.15,-0.15);
-pair datamax=(0.15,0.15);
-int Nx=30;
-int Ny=30;
+ data[i]=Gaussrandpair();
+
+// Histogram limits and number of bins
+pair datamin=(-0.15,-0.15);
+pair datamax=(0.15,0.15);
+int Nx=30;
+int Ny=30;
int[][] bins=frequency(data,datamin,datamax,Nx,Ny);
-
-real[] values=new real[Nx*Ny];
+
+real[] values=new real[Nx*Ny];
pair[] points=new pair[Nx*Ny];
-int k=0;
+int k=0;
real dx=(datamax.x-datamin.x)/Nx;
real dy=(datamax.y-datamin.y)/Ny;
for(int i=0; i < Nx; ++i) {
for(int j=0; j < Ny; ++j) {
- values[k]=bins[i][j];
- points[k]=(datamin.x+(i+0.5)*dx,datamin.y+(j+0.5)*dy);
- ++k;
+ values[k]=bins[i][j];
+ points[k]=(datamin.x+(i+0.5)*dx,datamin.y+(j+0.5)*dy);
+ ++k;
}
-}
-
-// Create a color palette
+}
+
+// Create a color palette
pen[] InvGrayscale(int NColors=256) {
- real ninv=1.0/(NColors-1.0);
- return sequence(new pen(int i) {return gray(1-17*i*ninv);},NColors);
-}
-
-// Draw the histogram, with axes
-bounds range=image(points,values,Range(0,40),InvGrayscale());
+ real ninv=1.0/(NColors-1.0);
+ return sequence(new pen(int i) {return gray(1-17*i*ninv);},NColors);
+}
+
+// Draw the histogram, with axes
+bounds range=image(points,values,Range(0,40),InvGrayscale());
draw(contour(points,values,new real[] {1,2,3,4,8,12,16,20,24,28,32,36,40},
- operator--),blue);
-xaxis("$x$",BottomTop,LeftTicks,above=true);
-yaxis("$y$",LeftRight,RightTicks,above=true);
+ operator--),blue);
+xaxis("$x$",BottomTop,LeftTicks,above=true);
+yaxis("$y$",LeftRight,RightTicks,above=true);
diff --git a/Build/source/utils/asymptote/examples/integraltest.asy b/Build/source/utils/asymptote/examples/integraltest.asy
index c45b1eb8f17..4bcd3737d0d 100644
--- a/Build/source/utils/asymptote/examples/integraltest.asy
+++ b/Build/source/utils/asymptote/examples/integraltest.asy
@@ -9,17 +9,17 @@ dotfactor=7;
void subinterval(real a, real b)
{
path g=box((a,0),(b,f(b)));
- filldraw(g,lightgray);
+ filldraw(g,lightgray);
draw(box((a,f(a)),(b,0)));
}
int a=1, b=9;
-
-xaxis("$x$",0,b);
-yaxis("$y$",0);
-
+
+xaxis("$x$",0,b);
+yaxis("$y$",0);
+
draw(graph(f,a,b,operator ..),red);
-
+
int n=2;
for(int i=a; i <= b; ++i) {
diff --git a/Build/source/utils/asymptote/examples/interpolate1.asy b/Build/source/utils/asymptote/examples/interpolate1.asy
index 8845c8dd2f8..19d77449abd 100644
--- a/Build/source/utils/asymptote/examples/interpolate1.asy
+++ b/Build/source/utils/asymptote/examples/interpolate1.asy
@@ -127,9 +127,9 @@ attach(legend(),point(10S),30S);
shipout("runge4");
-erase();
+erase();
-// Test 5: The situation is much better using Tchebychev points.
+// Test 5: The situation is much better using Tchebychev points.
unitsize(2cm);
@@ -194,7 +194,7 @@ attach(legend(),point(10S),30S);
shipout("runge6");
-erase();
+erase();
// Test 7: Another Tchebychev example.
diff --git a/Build/source/utils/asymptote/examples/jump.asy b/Build/source/utils/asymptote/examples/jump.asy
index 7ae19be3886..d2fdb41c643 100644
--- a/Build/source/utils/asymptote/examples/jump.asy
+++ b/Build/source/utils/asymptote/examples/jump.asy
@@ -1,13 +1,13 @@
import graph;
size(4inches,0);
-real f1(real x) {return (1+x^2);}
+real f1(real x) {return (1+x^2);}
real f2(real x) {return (4-x);}
xaxis("$x$",LeftTicks,Arrow);
yaxis("$y$",RightTicks,Arrow);
-draw("$y=1+x^2$",graph(f1,-2,1));
+draw("$y=1+x^2$",graph(f1,-2,1));
dot((1,f1(1)),UnFill);
draw("$y=4-x$",graph(f2,1,5),LeftSide,red,Arrow);
diff --git a/Build/source/utils/asymptote/examples/label3zoom.asy b/Build/source/utils/asymptote/examples/label3zoom.asy
index cba4f98cb54..022a09a32d9 100644
--- a/Build/source/utils/asymptote/examples/label3zoom.asy
+++ b/Build/source/utils/asymptote/examples/label3zoom.asy
@@ -3,14 +3,14 @@ import three;
currentlight=Headlamp;
size(469.75499pt,0);
-currentprojection=perspective(
-camera=(160.119024441391,136.348802919248,253.822628496226),
-up=(-0.188035408976828,0.910392236102215,-0.368549401594584),
-target=(25.5462739598034,1.77605243766079,-9.93996244768584),
-zoom=5.59734733413271,
-angle=5.14449021168139,
-viewportshift=(0.813449720559684,-0.604674743165144),
-autoadjust=false);
+currentprojection=
+ perspective(camera=(160.119024441391,136.348802919248,253.822628496226),
+ up=(-0.188035408976828,0.910392236102215,-0.368549401594584),
+ target=(25.5462739598034,1.77605243766079,-9.93996244768584),
+ zoom=5.59734733413271,
+ angle=5.14449021168139,
+ viewportshift=(0.813449720559684,-0.604674743165144),
+ autoadjust=false);
draw(scale3(4)*extrude("$\displaystyle\int\limits_{-\infty}^{+\infty}\!\! e^{-\alpha x^2}\!\!=\sqrt{\frac{\pi}{\alpha}}$",2Z),
material(blue));
diff --git a/Build/source/utils/asymptote/examples/linearregression.asy b/Build/source/utils/asymptote/examples/linearregression.asy
index a1cc6ff6bcb..7ec50d8fb0c 100644
--- a/Build/source/utils/asymptote/examples/linearregression.asy
+++ b/Build/source/utils/asymptote/examples/linearregression.asy
@@ -28,13 +28,13 @@ while (!eof(duncan)) {
real[] coeffs = leastsquares(independentvars, dependentvars, warn=false);
if (coeffs.length == 0) {
abort("Unable to find regression: independent variables are "
- + "linearly dependent.");
+ + "linearly dependent.");
}
real f(pair xy) {
return coeffs[0] * xy.x // income
- + coeffs[1] * xy.y // education
- + coeffs[2]; // residue
+ + coeffs[1] * xy.y // education
+ + coeffs[2]; // residue
}
real xmin = infinity, xmax = -infinity, ymin = infinity, ymax = -infinity;
@@ -52,7 +52,7 @@ draw(surface(f, (xmin, ymin), (xmax, ymax)),
for (int ii = 0; ii < independentvars.length; ++ii) {
triple pt = (independentvars[ii][0], independentvars[ii][1],
- dependentvars[ii]);
+ dependentvars[ii]);
draw(shift(pt) * unitsphere, material(yellow, emissivepen=0.2*yellow));
real z = f((pt.x, pt.y));
if (pt.z > z) draw (pt -- (pt.x, pt.y, z), green);
diff --git a/Build/source/utils/asymptote/examples/lmfit1.asy b/Build/source/utils/asymptote/examples/lmfit1.asy
index c25a7c4b4be..36ac3f173f6 100644
--- a/Build/source/utils/asymptote/examples/lmfit1.asy
+++ b/Build/source/utils/asymptote/examples/lmfit1.asy
@@ -4,10 +4,10 @@ import graph;
size(10cm, 7cm, IgnoreAspect);
real[] date = { 1790, 1800, 1810, 1820, 1830, 1840, 1850, 1860, 1870, 1880,
-1890, 1900, 1910, 1920, 1930, 1940, 1950, 1960, 1970, 1980, 1990 };
+ 1890, 1900, 1910, 1920, 1930, 1940, 1950, 1960, 1970, 1980, 1990 };
real[] population = { 3.929, 5.308, 7.240, 9.638, 12.866, 17.069, 23.192, 31.443,
-38.558, 50.156, 62.948, 75.996, 91.972, 105.711, 122.775, 131.669, 150.697,
-179.323, 203.185, 226.546, 248.710 };
+ 38.558, 50.156, 62.948, 75.996, 91.972, 105.711, 122.775, 131.669, 150.697,
+ 179.323, 203.185, 226.546, 248.710 };
real t0 = 1776;
diff --git a/Build/source/utils/asymptote/examples/logo3.asy b/Build/source/utils/asymptote/examples/logo3.asy
index c7947f1c41c..363305ede5c 100644
--- a/Build/source/utils/asymptote/examples/logo3.asy
+++ b/Build/source/utils/asymptote/examples/logo3.asy
@@ -1,11 +1,15 @@
import three;
-//size(105,50,IgnoreAspect);
-size(560,320,IgnoreAspect); // Fullsize
+size(560,320,IgnoreAspect);
size3(140,80,15);
-currentprojection=perspective(-2,20,10,up=Y);
-currentlight=White;
-viewportmargin=(0,10);
+
+currentprojection=
+ perspective(camera=(-0.7387428806982,-50.4754947040394,10.1433958227456),
+ up=(0.0023,0.158056646909439,0.000753078712035578),
+ target=(0.275794537878997,1.26294757366264,-0.0498743055531516),
+ zoom=1,
+ angle=3.26228798100531,
+ autoadjust=false);
real a=-0.4;
real b=0.95;
@@ -32,12 +36,11 @@ g.push(point(A,0)--shift(-f*hy,f*h)*A--point(A,1)--shift(f*hy,-f*h)*reverse(A)--
g.push(point(B,0)--shift(f*hy,-f*h)*B--point(B,1)--shift(-f*hy,f*h)*reverse(B)--cycle);
triple H=-0.1Z;
-material m=material(lightgray,shininess=1.0);
+material m=material(0.5*red+0.125*purple,shininess=1.0);
for(path p : g)
- draw(extrude(p,H),m);
+ draw(extrude(p,H),m,nolight);
surface s=surface(g);
draw(s,red,nolight);
-draw(shift(H)*s,m);
-
+draw(shift(H)*s,m,nolight);
diff --git a/Build/source/utils/asymptote/examples/lowupint.asy b/Build/source/utils/asymptote/examples/lowupint.asy
index 3a14cd91104..1c3a0cd9488 100644
--- a/Build/source/utils/asymptote/examples/lowupint.asy
+++ b/Build/source/utils/asymptote/examples/lowupint.asy
@@ -8,8 +8,8 @@ void rectangle(real a, real b, real c, real h(real,real))
real height=(a < c && c < b) ? f(c) : h(f(a),f(b));
pair p=(a,0), q=(b,height);
path g=box(p,q);
- fill(g,lightgray);
- draw(g);
+ fill(g,lightgray);
+ draw(g);
}
void partition(real a, real b, real c, real h(real,real))
diff --git a/Build/source/utils/asymptote/examples/markregular.asy b/Build/source/utils/asymptote/examples/markregular.asy
index 716599fbcf1..ea08b952238 100644
--- a/Build/source/utils/asymptote/examples/markregular.asy
+++ b/Build/source/utils/asymptote/examples/markregular.asy
@@ -8,8 +8,8 @@ real ymin=-2,ymax=10;
real f(real x) {return x^2;}
marker cross=marker(scale(4)*rotate(45)*cross(4),
- markuniform(new pair(real t) {return Scale((t,f(t)));},
- xmin,xmax,round(2*(xmax-xmin))),1bp+red);
+ markuniform(new pair(real t) {return Scale((t,f(t)));},
+ xmin,xmax,round(2*(xmax-xmin))),1bp+red);
draw(graph(f,xmin,xmax,n=400),linewidth(1bp),cross);
@@ -17,10 +17,10 @@ ylimits(-2.5,10,Crop);
xaxis(Label("$x$",position=EndPoint, align=NE),xmin=xmin,xmax=xmax,
Ticks(scale(.7)*Label(align=E),NoZero,begin=false,beginlabel=false,
- end=false,endlabel=false,Step=1,step=.25,
- Size=1mm, size=.5mm,pTick=black,ptick=gray),Arrow);
+ end=false,endlabel=false,Step=1,step=.25,
+ Size=1mm, size=.5mm,pTick=black,ptick=gray),Arrow);
yaxis(Label("$y$",position=EndPoint, align=NE),ymin=ymin,ymax=ymax,
Ticks(scale(.7)*Label(),NoZero,begin=false,beginlabel=false,
- end=false,endlabel=false,Step=1,step=.25,Size=1mm,size=.5mm,
+ end=false,endlabel=false,Step=1,step=.25,Size=1mm,size=.5mm,
pTick=black,ptick=gray),Arrow);
diff --git a/Build/source/utils/asymptote/examples/mergeExample.asy b/Build/source/utils/asymptote/examples/mergeExample.asy
index e0fdcd0f6c7..9f331c7a130 100644
--- a/Build/source/utils/asymptote/examples/mergeExample.asy
+++ b/Build/source/utils/asymptote/examples/mergeExample.asy
@@ -20,11 +20,11 @@ draw(p);
path l = point(p[1],2)--point(p[0],4);
draw(l,red);
for(int i = 0; i < p.length; ++i)
-{
- real[][] ts = intersections(l,p[i]);
- for(real[] t:ts)
- dot(point(l,t[0]));
-}
+ {
+ real[][] ts = intersections(l,p[i]);
+ for(real[] t:ts)
+ dot(point(l,t[0]));
+ }
path l2 = point(l,intersections(l,p[0])[0][0])--point(l,intersections(l,p[2])[1][0]);
real to = intersections(l,p[0])[0][1];
real ti = intersections(l,p[2])[1][1];
@@ -71,7 +71,7 @@ filldraw(shift(w)*q,lightgrey);
real x = min(p).x - 4.5w;
string l = "abcdef";
for(int i = 0; i < 6; ++i)
-{
- label("("+substr(l,i,1)+")",(x,min(p).y),3S,fontsize(10pt));
- x += w;
-}
+ {
+ label("("+substr(l,i,1)+")",(x,min(p).y),3S,fontsize(10pt));
+ x += w;
+ }
diff --git a/Build/source/utils/asymptote/examples/mosaic.asy b/Build/source/utils/asymptote/examples/mosaic.asy
index 0f19117c4b3..0a59ca56918 100644
--- a/Build/source/utils/asymptote/examples/mosaic.asy
+++ b/Build/source/utils/asymptote/examples/mosaic.asy
@@ -19,7 +19,7 @@ path c_line(path p) {
// returns the path obtained by adding to p a copy rotated
// around the endpoint of p by 180 degrees
// works only if the initial point and the endpoint of p are different
- // a c_line is symetric with respect to the center of
+ // a c_line is symetric with respect to the center of
// the straight line between its endpoints
//
return p..rotate(180,point(p,length(p)))*reverse(p);
@@ -41,7 +41,7 @@ path tounitcircle(path p, int n=300) {
}
void centershade(picture pic=currentpicture, path p, pen in, pen out,
- pen drawpen=currentpen) {
+ pen drawpen=currentpen) {
pair center=0.5(max(p)+min(p));
real radius=0.5abs(max(p)-min(p));
radialshade(pic,p,in,center,0,out,center,radius);
@@ -86,7 +86,7 @@ for(int i=0; i < entry.length; ++i) {
}
for(int j=0; j < 7; ++j) {
- tage[j]=shift((j,yc)+diff)*kasten;
+ tage[j]=shift((j,yc)+diff)*kasten;
filldraw(tage[j],farbe(j),black+2bp);
label(wochentag[j],zentrum(tage[j]),Palatino());
for(int i=0; i < 6; ++i) {bx[i][j]=shift((j,-yc*i)+diff)*kasten;
@@ -94,10 +94,10 @@ for(int j=0; j < 7; ++j) {
if(holiday[i][j]) {filldraw(bx[i][j],farbe(6),black+2bp);};
};
};
-filldraw(Gkasten,0.3white,black+2bp);
+filldraw(Gkasten,0.3white,black+2bp);
for(int j=0; j < 7; ++j)
for(int i=0; i < 6 ; ++i) {label(entry[i][j],zentrum(bx[i][j]),Palatino());}
-label("\Huge Februar 2006",zentrum(Gkasten),Palatino()+white);
+label("\Huge Februar 2006",zentrum(Gkasten),Palatino()+white);
// Zentrum=center; Februar=february
add(kalender,currentpicture);
erase();
@@ -139,9 +139,9 @@ for(int j=-4; j < 4; ++j)
(1-i/10)*chartreuse,black+2bp);
}
}
-
-// Now we produce the bijective images inside
-// a suitably scaled unitcircle
+
+// Now we produce the bijective images inside
+// a suitably scaled unitcircle
for(int k=-1; k < 2; ++k)
for(int l=-1; l < 2; ++l) {
transform tr=shift(k*tri+l*trii);
@@ -149,11 +149,11 @@ for(int k=-1; k < 2; ++k)
centershade(temppic,scale(2.5)*tounitcircle(tr*kontur[i],380),
(1-i/10)*white,(1-i/10)*orange,black+2bp);
}
- }
-
-add(temppic);
+ }
+
+add(temppic);
-// We clip the picture to a suitable box
+// We clip the picture to a suitable box
pair piccenter=0.5*(temppic.min()+temppic.max());
pair picbox=temppic.max()-temppic.min();
real picwidth=picbox.x;
@@ -162,4 +162,4 @@ transform trialtrans=shift(0,-1.5)*shift(piccenter)*yscale(scalefactor)*
clip(trialtrans*unitsquare);
// add the calendar at a suitable position
-add(kalender.fit(0.75*outputwidth),interp(point(S),point(N),1/13));
+add(kalender.fit(0.75*outputwidth),interp(point(S),point(N),1/13));
diff --git a/Build/source/utils/asymptote/examples/mosquito.asy b/Build/source/utils/asymptote/examples/mosquito.asy
index 7e299d264d3..7b113eabb7c 100644
--- a/Build/source/utils/asymptote/examples/mosquito.asy
+++ b/Build/source/utils/asymptote/examples/mosquito.asy
@@ -49,7 +49,7 @@ draw(minipage("\flushright{viral incubation rate ($k$)}",40pt),ei,
RightSide,Arrow,PenMargin);
path ise=point(infectious,E)--point(se,0.5);
-
+
draw("$(ac)$",ise,LeftSide,dashed,Arrow,PenMargin);
label(minipage("\flushleft{biting rate $\times$ transmission
probability}",50pt),point(infectious,SE),dir(-60)+S);
@@ -58,7 +58,7 @@ path isi=point(infectiousM,W)--point(si,2.0/3);
draw("$(ab)$",isi,LeftSide,dashed,Arrow,PenMargin);
draw(se,LeftSide,Arrow,PenMargin);
-
+
real t=2.0;
draw("$\beta_M$",
point(susceptibleM,E){right}..tension t..{left}point(larval,E),
diff --git a/Build/source/utils/asymptote/examples/near_earth.asy b/Build/source/utils/asymptote/examples/near_earth.asy
index afdf64c6b5c..faff0120305 100644
--- a/Build/source/utils/asymptote/examples/near_earth.asy
+++ b/Build/source/utils/asymptote/examples/near_earth.asy
@@ -7,7 +7,7 @@ size(300,0);
pen thickp=linewidth(0.5mm);
real radius=0.8, lambda=37, aux=60;
-currentprojection=perspective(4,1,2);
+currentprojection=perspective(4,1,2);
// Planes
pen bg=gray(0.9)+opacity(0.5);
@@ -21,7 +21,7 @@ draw(Label("$x$",1),O--r*X,p,Arrow3);
draw(Label("$y$",1),O--r*Y,p,Arrow3);
draw(Label("$z$",1),O--r*Z,p,Arrow3);
label("$\rm O$",(0,0,0),W);
-
+
// Point Q
triple pQ=radius*dir(lambda,aux);
draw(O--radius*dir(90,aux),dashed);
diff --git a/Build/source/utils/asymptote/examples/oneoverx.asy b/Build/source/utils/asymptote/examples/oneoverx.asy
index 5d9775d44dc..9bbbf282aca 100644
--- a/Build/source/utils/asymptote/examples/oneoverx.asy
+++ b/Build/source/utils/asymptote/examples/oneoverx.asy
@@ -8,7 +8,7 @@ bool3 branch(real x)
static int lastsign=0;
if(x == 0) return false;
int sign=sgn(x);
- bool b=lastsign == 0 || sign == lastsign;
+ bool b=lastsign == 0 || sign == lastsign;
lastsign=sign;
return b ? true : default;
}
diff --git a/Build/source/utils/asymptote/examples/p-orbital.asy b/Build/source/utils/asymptote/examples/pOrbital.asy
index 4638aa21a22..fc8e96e7fe0 100644
--- a/Build/source/utils/asymptote/examples/p-orbital.asy
+++ b/Build/source/utils/asymptote/examples/pOrbital.asy
@@ -3,7 +3,7 @@ import palette;
size(200);
currentprojection=orthographic(6,8,2);
viewportmargin=(1cm,0);
-
+
real c0=0.1;
real f(real r) {return r*(1-r/6)*exp(-r/3);}
@@ -27,5 +27,5 @@ s.colors(palette(s.map(abs),Gradient(palegreen,heavyblue)));
render render=render(compression=Low,merge=true);
draw(s,render);
draw(zscale3(-1)*s);
-
+
axes3("$x$","$y$","$z$",Arrow3);
diff --git a/Build/source/utils/asymptote/examples/pathintersectsurface.asy b/Build/source/utils/asymptote/examples/pathintersectsurface.asy
index 73a78460e04..ef8cf94b893 100644
--- a/Build/source/utils/asymptote/examples/pathintersectsurface.asy
+++ b/Build/source/utils/asymptote/examples/pathintersectsurface.asy
@@ -7,11 +7,12 @@ path3 g=randompath3(10);
draw(g,red);
-triple[][] P={
- {(0,0,0),(1,0,0),(1,0,0),(2,0,0)},
- {(0,4/3,0),(2/3,4/3,2),(4/3,4/3,2),(2,4/3,0)},
- {(0,2/3,0),(2/3,2/3,0),(4/3,2/3,0),(2,2/3,0)},
- {(0,2,0),(2/3,2,0),(4/3,2,0),(2,2,0)}};
+triple[][] P=
+ {
+ {(0,0,0),(1,0,0),(1,0,0),(2,0,0)},
+ {(0,4/3,0),(2/3,4/3,2),(4/3,4/3,2),(2,4/3,0)},
+ {(0,2/3,0),(2/3,2/3,0),(4/3,2/3,0),(2,2/3,0)},
+ {(0,2,0),(2/3,2,0),(4/3,2,0),(2,2,0)}};
surface s=surface(patch(P));
s.append(unitplane);
diff --git a/Build/source/utils/asymptote/examples/pdb.asy b/Build/source/utils/asymptote/examples/pdb.asy
index 43b771fdd0d..68cec9e3671 100644
--- a/Build/source/utils/asymptote/examples/pdb.asy
+++ b/Build/source/utils/asymptote/examples/pdb.asy
@@ -24,7 +24,7 @@ string filename="100d.pdb1";
string prefix=stripextension(filename);
file data=input(filename);
-pen color(string e)
+pen color(string e)
{
e=replace(e," ","");
int n=length(e);
@@ -33,7 +33,7 @@ pen color(string e)
int index=find(Element == e);
if(index < 0) return currentpen;
return rgb(Hexcolor[index]);
-}
+}
// ATOM
string[] name,altLoc,resName,chainID,iCode,element,charge;
@@ -42,7 +42,7 @@ real[][] occupancy,tempFactor;
bool newchain=true;
-struct bond
+struct bond
{
int i,j;
void operator init(int i, int j) {
@@ -53,7 +53,7 @@ struct bond
bond[] bonds;
-struct atom
+struct atom
{
string name;
triple v;
@@ -87,8 +87,8 @@ while(true) {
serial=(int) substr(line,6,5);
a.name=substr(line,76,2);
a.v=((real) substr(line,30,8),
- (real) substr(line,38,8),
- (real) substr(line,46,8));
+ (real) substr(line,38,8),
+ (real) substr(line,46,8));
}
if(ATOM) {
if(newchain) {
@@ -109,12 +109,12 @@ while(true) {
int i=(int) substr(line,6,5);
while(true) {
string s=replace(substr(line,11+k,5)," ","");
- if(s == "") break;
+ if(s == "") break;
k += 5;
int j=(int) s;
if(j <= i) continue;
bonds.push(bond(i,j));
- }
+ }
}
}
@@ -158,7 +158,6 @@ string options;
string viewfilename=prefix+".views";
if(!error(input(viewfilename,check=false)))
- options="3Dviews="+viewfilename;
+ options="3Dviews="+locatefile(viewfilename);
-shipout(prefix,options=options);
-currentpicture.erase();
+shipout(options=options);
diff --git a/Build/source/utils/asymptote/examples/pipes.asy b/Build/source/utils/asymptote/examples/pipes.asy
index 383fda80fd5..83c9ec609d4 100644
--- a/Build/source/utils/asymptote/examples/pipes.asy
+++ b/Build/source/utils/asymptote/examples/pipes.asy
@@ -4,14 +4,14 @@ import graph3;
import palette;
size(8cm);
-currentprojection=perspective(
-camera=(13.3596389245356,8.01038090435314,14.4864483364785),
-up=(-0.0207054323419367,-0.00472438375047319,0.0236460907598947),
-target=(-1.06042550499095,2.68154529985845,0.795007562120261));
+currentprojection=
+ perspective(camera=(13.3596389245356,8.01038090435314,14.4864483364785),
+ up=(-0.0207054323419367,-0.00472438375047319,0.0236460907598947),
+ target=(-1.06042550499095,2.68154529985845,0.795007562120261));
defaultpen(fontsize(6pt));
-// draw coordinates and frames
+// draw coordinates and frames
// axis1 is defined by z axis of TBase
// axis2 is defined by z axis of TEnd
void DrawFrame(transform3 TBase, transform3 TEnd, string s)
@@ -25,57 +25,57 @@ void DrawFrame(transform3 TBase, transform3 TEnd, string s)
real[][] A=
{
- {v1.x,-v2.x,-n.x},
- {v1.y,-v2.y,-n.y},
- {v1.z,-v2.z,-n.z}
+ {v1.x,-v2.x,-n.x},
+ {v1.y,-v2.y,-n.y},
+ {v1.z,-v2.z,-n.z}
};
triple vb=p2-p1;
real[] b={vb.x,vb.y,vb.z};
-
- // Get the extention along vector v1 and v2,
+
+ // Get the extention along vector v1 and v2,
// so, we can get the common normal between two axis
real[] x=solve(A,b);
real s1=x[0];
real s2=x[1];
-
+
// get foot of a perpendicular on both axies
triple foot1=p1+s1*v1;
triple foot2=p2+s2*v2;
-
+
// draw two axis
triple axis_a,axis_b;
axis_a=p1+s1*v1*1.5;
axis_b=p1-s1*v1*1.5;
draw(axis_a--axis_b);
-
+
axis_a=p2+s2*v2*1.5;
axis_b=p2-s2*v2*1.5;
draw(axis_a--axis_b);
-
- // draw "a"(common normal)
- draw(Label("$a_{"+s+"}$"),foot1--foot2,linewidth(1pt));
+
+ // draw "a"(common normal)
+ draw(Label("$a_{"+s+"}$"),foot1--foot2,linewidth(1pt));
// draw the coordinates frame
triple dx,dy,dz,org;
real length=0.8;
-
+
org=foot1;
dx =length*unit(foot2-foot1); // define the x axis of the frame on "a"
dz =length*unit(v1); // define the z axis which is along axis1
dy =length*unit(cross(dz,dx));
-
+
draw(Label("$X_{"+s+"}$",1,align=-dy-dz),org--(org+dx),red+linewidth(1.5pt),
Arrow3(8));
- draw(Label("$Y_{"+s+"}$",1,align=2dy-dz-dx),org--(org+dy),
- green+linewidth(1.5pt), Arrow3(8));
+ draw(Label("$Y_{"+s+"}$",1,align=2dy-dz-dx),org--(org+dy),
+ green+linewidth(1.5pt), Arrow3(8));
draw(Label("$Z_{"+s+"}$",1,align=-2dx-dy),org--(org+dz),
- blue+linewidth(1.5pt), Arrow3(8));
-
+ blue+linewidth(1.5pt), Arrow3(8));
+
dot(Label("$O_{"+s+"}$",align =-dx-dz,black),org,black); // origin
-
+
}
void DrawLink(transform3 TBase, transform3 TEnd, pen objStyle,string s)
@@ -85,27 +85,27 @@ void DrawLink(transform3 TBase, transform3 TEnd, pen objStyle,string s)
path3 generator=(0.5*r,0,h)--(r,0,h)--(r,0,0)--(0.5*r,0,0);
revolution vase=revolution(O,generator,0,360);
surface objSurface=surface(vase);
-
+
render render=render(merge=true);
// draw two cylinders
draw(TBase*objSurface,objStyle,render);
draw(TEnd*shift((0,0,-h+1e-5))*objSurface,objStyle,render);
-
+
// draw the link between two cylinders
triple pStart=TBase*(0.5*h*Z);
triple pEnd =TEnd*(-0.5*h*Z);
triple pControl1=0.25*(pEnd-pStart)+TBase*(0,0,h);
triple pControl2=-0.25*(pEnd-pStart)+TEnd*(0,0,-h);
path3 p=pStart..controls pControl1 and pControl2..pEnd;
- draw(tube(p,scale(0.2)*unitsquare),objStyle,render);
+ draw(tube(p,scale(0.2)*unitsquare),objStyle,render);
}
// t1 and t2 define the starting frame and ending frame of the first link(i-1)
transform3 t1=shift((0,0,1));
transform3 t2=shift((0,0,-1))*rotate(-20,Y)*shift((0,3,2));
// as, the two links were connected, so t2 is also the starting frame of link(i)
-// t3 defines the ending frame of link(i)
+// t3 defines the ending frame of link(i)
transform3 t3=t2*rotate(40,Z)*shift((0,3,1.5))*rotate(-15,Y)*shift(-1.5*Z);
// draw link(i-1)
@@ -137,4 +137,4 @@ draw("$\theta_{i}$",arc(p0,p1a,p2),ArcArrow3(3));
// draw d_{i-1}
triple org_i =t2*shift((0,0,1.5))*O;
-draw(Label("$d_{i}$",0.13),p0--org_i,linewidth(1pt));
+draw(Label("$d_{i}$",0.13),p0--org_i,linewidth(1pt));
diff --git a/Build/source/utils/asymptote/examples/poster.asy b/Build/source/utils/asymptote/examples/poster.asy
index cbcefc4bf69..b49d064d84e 100644
--- a/Build/source/utils/asymptote/examples/poster.asy
+++ b/Build/source/utils/asymptote/examples/poster.asy
@@ -16,7 +16,7 @@ label(background,"$x\sin\frac{1}{x}$",F(0.92/pi),3SE,grey+fontsize(14pt));
frame f=background.fit();
box(f,RadialShade(yellow,0.6*yellow+red),above=false);
background.erase();
-add(background,f);
+add(background,f);
title("Young Researchers' Conference",align=3S,fontsize(48pt));
center("University of Alberta, Edmonton, April 1--2, 2006");
diff --git a/Build/source/utils/asymptote/examples/projectrevolution.asy b/Build/source/utils/asymptote/examples/projectrevolution.asy
index 8bbe7f38c3d..a6755af2098 100644
--- a/Build/source/utils/asymptote/examples/projectrevolution.asy
+++ b/Build/source/utils/asymptote/examples/projectrevolution.asy
@@ -1,17 +1,17 @@
-import solids;
-import palette;
-
-currentprojection=orthographic(20,0,3);
-
-size(400,300,IgnoreAspect);
-
+import solids;
+import palette;
+
+currentprojection=orthographic(20,0,3);
+
+size(400,300,IgnoreAspect);
+
revolution r=revolution(graph(new triple(real x) {
- return (x,0,sin(x)*exp(-x/2));},0,2pi,operator ..),axis=Z);
-surface s=surface(r);
-
+ return (x,0,sin(x)*exp(-x/2));},0,2pi,operator ..),axis=Z);
+surface s=surface(r);
+
surface S=planeproject(shift(-Z)*unitsquare3)*s;
S.colors(palette(s.map(zpart),Rainbow()));
render render=render(compression=Low,merge=true);
draw(S,render);
-draw(s,lightgray,render);
+draw(s,lightgray,render);
diff --git a/Build/source/utils/asymptote/examples/rainbow.asy b/Build/source/utils/asymptote/examples/rainbow.asy
index c85282a87b1..1da0e07ae7c 100644
--- a/Build/source/utils/asymptote/examples/rainbow.asy
+++ b/Build/source/utils/asymptote/examples/rainbow.asy
@@ -4,7 +4,7 @@ pen indigo=rgb(102/255,0,238/255);
void rainbow(path g) {
draw(new path[] {scale(1.3)*g,scale(1.2)*g,scale(1.1)*g,g,
- scale(0.9)*g,scale(0.8)*g,scale(0.7)*g},
+ scale(0.9)*g,scale(0.8)*g,scale(0.7)*g},
new pen[] {red,orange,yellow,green,blue,indigo,purple});
}
diff --git a/Build/source/utils/asymptote/examples/roll.asy b/Build/source/utils/asymptote/examples/roll.asy
index 4d15ac0febe..52b34b0ca26 100644
--- a/Build/source/utils/asymptote/examples/roll.asy
+++ b/Build/source/utils/asymptote/examples/roll.asy
@@ -3,7 +3,7 @@ import graph3;
size(200,0);
triple f(pair t) {
-return(t.x+t.y/4+sin(t.y),cos(t.y),sin(t.y));
+ return(t.x+t.y/4+sin(t.y),cos(t.y),sin(t.y));
}
surface s=surface(f,(0,0),(2pi,2pi),7,20,Spline);
diff --git a/Build/source/utils/asymptote/examples/roundpath.asy b/Build/source/utils/asymptote/examples/roundpath.asy
index e6d31c6bc9c..58fa17e8267 100644
--- a/Build/source/utils/asymptote/examples/roundpath.asy
+++ b/Build/source/utils/asymptote/examples/roundpath.asy
@@ -22,7 +22,7 @@ draw(shift(-30,-30)*roundedpath(B,1), red);
for (int i = 1; i < 20; ++i) // only round edges
draw(shift(0,-30)*roundedpath(B,i/4), rgb(0.5, i*0.049,0) + linewidth(0.5));
-for (int i = 1; i < 20; ++i) // round edged and scale
+for (int i = 1; i < 20; ++i) // round edged and scale
draw(shift(0,-60)*roundedpath(B,i/4,1-i/50), rgb(1, 1 - i*0.049,i*0.049) + linewidth(0.5));
for (int i = 1; i < 50; ++i) // shift (round edged und scaled shifted version)
diff --git a/Build/source/utils/asymptote/examples/shadestroke.asy b/Build/source/utils/asymptote/examples/shadestroke.asy
index 44f0b6e8a3f..b4ee872aa15 100644
--- a/Build/source/utils/asymptote/examples/shadestroke.asy
+++ b/Build/source/utils/asymptote/examples/shadestroke.asy
@@ -1,5 +1,5 @@
size(100);
radialshade(W..N..E--(0,0),stroke=true,
- red+linewidth(30),(0,0),0.25,yellow,(0,0),1);
+ red+linewidth(30),(0,0),0.25,yellow,(0,0),1);
diff --git a/Build/source/utils/asymptote/examples/sinxlex.asy b/Build/source/utils/asymptote/examples/sinxlex.asy
index 912fa3c889b..051411699f1 100644
--- a/Build/source/utils/asymptote/examples/sinxlex.asy
+++ b/Build/source/utils/asymptote/examples/sinxlex.asy
@@ -3,7 +3,7 @@ import geometry;
size(0,100);
real theta=30;
-pair A=(0,0);
+pair A=(0,0);
pair B=dir(theta);
pair C=(1,0);
pair D=(1,Tan(theta));
@@ -21,4 +21,4 @@ dot("$C$",C);
dot("$D$",D);
dot(("$E$"),E,S);
label("$1$",A--B,LeftSide);
-
+
diff --git a/Build/source/utils/asymptote/examples/slidedemo.asy b/Build/source/utils/asymptote/examples/slidedemo.asy
index 0cbd15af741..107564601fb 100644
--- a/Build/source/utils/asymptote/examples/slidedemo.asy
+++ b/Build/source/utils/asymptote/examples/slidedemo.asy
@@ -31,7 +31,7 @@ titlepage(title="Slides with {\tt Asymptote}: A Demo",
author="John C. Bowman",
institution="University of Alberta",
date="\today",
- url="http://asymptote.sf.net");
+ url="https://asymptote.sourceforge.io");
outline("Basic Commands");
item("item");
@@ -112,7 +112,7 @@ add(pic.fit(0,14cm));
title("\mbox{Asymptote: 2D \& 3D Vector Graphics Language}");
asyinclude("logo3");
-center("\tt http://asymptote.sf.net");
+center("\tt https://asymptote.sourceforge.io");
center("(freely available under the LGPL license)");
bibliography("refs");
diff --git a/Build/source/utils/asymptote/examples/slope.asy b/Build/source/utils/asymptote/examples/slope.asy
index ae7fb45daf9..832f8c13fc7 100644
--- a/Build/source/utils/asymptote/examples/slope.asy
+++ b/Build/source/utils/asymptote/examples/slope.asy
@@ -20,8 +20,8 @@ real Y0[]=new real[] {-1,2};
real[] F(real t, real[] y) {
return sequence(new real(int m) {return f(t,y[M-m-1]);},M);
- // return new real[] {exp((L[1]-1)*t)*y[1],
- // -exp(-(L[1]-1)*t)*y[0]};
+ // return new real[] {exp((L[1]-1)*t)*y[1],
+ // -exp(-(L[1]-1)*t)*y[0]};
// return new real[]{-y[0]^2};
}
@@ -46,23 +46,23 @@ for(int i=0; i < n-1; ++i) {
// real[] exact=new real[] {exp(-b)*sin(b),exp(-L[1]*b)*cos(b)};
for(int m=0; m < M; ++m)
maxnorm=max(maxnorm,abs(S.y[S.y.length-1][m]-exact[m]));
- if(maxnorm != 0) {
- tau.push(dt);
- // error.push(dt^-(order+1)*maxnorm);
- error.push(maxnorm);
- }
+ if(maxnorm != 0) {
+ tau.push(dt);
+ // error.push(dt^-(order+1)*maxnorm);
+ error.push(maxnorm);
+ }
}
/*
-for(int i=0; i < n-1; ++i) {
+ for(int i=0; i < n-1; ++i) {
real dt=(b-a)*lambda^(n-i);
real maxnorm=0;
for(int m=0; m < M; ++m) {
- solution S=integrate(Y0[m],L[m],f,a,b,dt,dynamic=false,0.000,1000,RK4_375,verbose=false);
- maxnorm=max(maxnorm,abs(S.y[S.y.length-1]-exact[m]));
+ solution S=integrate(Y0[m],L[m],f,a,b,dt,dynamic=false,0.000,1000,RK4_375,verbose=false);
+ maxnorm=max(maxnorm,abs(S.y[S.y.length-1]-exact[m]));
}
error2.push(dt^-order*maxnorm);
-}
+ }
*/
//scale(Log,Log);
diff --git a/Build/source/utils/asymptote/examples/soccerball.asy b/Build/source/utils/asymptote/examples/soccerball.asy
index 5cf0f015055..68a95edbdca 100644
--- a/Build/source/utils/asymptote/examples/soccerball.asy
+++ b/Build/source/utils/asymptote/examples/soccerball.asy
@@ -1,43 +1,45 @@
import graph3;
size(400);
currentlight.background=palegreen;
+settings.digits=15;
defaultrender=render(compression=Zero,merge=true);
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={
- {z[0],y[1],x[3],x[0],y[0],z[3]},
- {z[1],x[0],x[3],y[2],z[2],y[3]},
- {z[2],z[1],y[2],x[2],x[1],y[3]},
- {z[3],z[0],y[0],x[1],x[2],y[1]},
- {x[0],x[3],z[1],y[3],y[0],z[0]},
- {x[1],x[2],z[2],y[3],y[0],z[3]},
- {x[2],x[1],z[3],y[1],y[2],z[2]},
- {x[3],x[0],z[0],y[1],y[2],z[1]},
- {y[0],y[3],x[1],z[3],z[0],x[0]},
- {y[1],y[2],x[2],z[3],z[0],x[3]},
- {y[2],y[1],x[3],z[1],z[2],x[2]},
- {y[3],y[0],x[0],z[1],z[2],x[1]}
-};
-
+
+triple[][] Q=
+ {
+ {z[0],y[1],x[3],x[0],y[0],z[3]},
+ {z[1],x[0],x[3],y[2],z[2],y[3]},
+ {z[2],z[1],y[2],x[2],x[1],y[3]},
+ {z[3],z[0],y[0],x[1],x[2],y[1]},
+ {x[0],x[3],z[1],y[3],y[0],z[0]},
+ {x[1],x[2],z[2],y[3],y[0],z[3]},
+ {x[2],x[1],z[3],y[1],y[2],z[2]},
+ {x[3],x[0],z[0],y[1],y[2],z[1]},
+ {y[0],y[3],x[1],z[3],z[0],x[0]},
+ {y[1],y[2],x[2],z[3],z[0],x[3]},
+ {y[2],y[1],x[3],z[1],z[2],x[2]},
+ {y[3],y[0],x[0],z[1],z[2],x[1]}
+ };
+
int nArc=4;
path3 p=Arc(O,Q[0][0],Q[0][1],nArc);
real R=abs(point(p,reltime(p,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;
- }
-}
-
+ }
+}
+
// FIXME: Use a baryicentric coordinate mesh
surface sphericaltriangle(triple center, triple A, triple B, triple C,
int nu=3, int nv=nu) {
@@ -48,10 +50,10 @@ surface sphericaltriangle(triple center, triple A, triple B, triple C,
path3 cr=Arc(O,relpoint(tri2,p.x),relpoint(tri3,p.x),nArc);
return relpoint(cr,p.y);
};
-
+
return surface(tri,(0,0),(1-sqrtEpsilon,1),nu,nv,Spline);
-}
-
+}
+
for(int i=0;i < P.length;++i){
triple[] pentagon=sequence(new triple(int k) {
path3 p=Arc(O,P[i][0],P[i][k+1],nArc);
@@ -64,8 +66,8 @@ for(int i=0;i < P.length;++i){
for(int i=0;i < 5;++i){
surface sf=sphericaltriangle(O,pentagon[i],M,pentagon[i+1]);
draw(sf,black);
- }
-}
+ }
+}
for(int i=0;i < P.length;++i) {
for(int j=1;j <= 5;++j) {
@@ -85,6 +87,6 @@ for(int i=0;i < P.length;++i) {
for(int i=0;i < 6;++i) {
surface sf=sphericaltriangle(O,hexagon[i],M,hexagon[i+1]);
draw(sf,white);
- }
- }
+ }
+ }
}
diff --git a/Build/source/utils/asymptote/examples/spectrum.asy b/Build/source/utils/asymptote/examples/spectrum.asy
index a5d576921cf..95c5f8a0d1b 100644
--- a/Build/source/utils/asymptote/examples/spectrum.asy
+++ b/Build/source/utils/asymptote/examples/spectrum.asy
@@ -11,7 +11,7 @@ pen nm2rgb(real wl, real gamma=0.8, bool intensity=true) {
if(wl > 510 && wl <= 580) {rgb=((wl-510)/70,1,0);}
if(wl > 580 && wl <= 645) {rgb=(1,(645-wl)/65,0);}
if(wl > 645 && wl <= 780) {rgb=(1,0,0);}
-
+
real Intensity=1;
if(intensity) {
if(wl >= 700) {Intensity=0.3+0.7*(780-wl)/80;}
diff --git a/Build/source/utils/asymptote/examples/sphereskeleton.asy b/Build/source/utils/asymptote/examples/sphereskeleton.asy
index ca8b8c3d584..6585f7c2036 100644
--- a/Build/source/utils/asymptote/examples/sphereskeleton.asy
+++ b/Build/source/utils/asymptote/examples/sphereskeleton.asy
@@ -1,9 +1,9 @@
-size(100);
-import solids;
+size(100);
+import solids;
currentprojection=orthographic(5,4,2);
-revolution sphere=sphere(1);
+revolution sphere=sphere(1);
draw(surface(sphere),green+opacity(0.2));
draw(sphere,m=7,blue);
diff --git a/Build/source/utils/asymptote/examples/spiral3.asy b/Build/source/utils/asymptote/examples/spiral3.asy
index 727ca3f6d3a..79a15a52c41 100644
--- a/Build/source/utils/asymptote/examples/spiral3.asy
+++ b/Build/source/utils/asymptote/examples/spiral3.asy
@@ -1,8 +1,8 @@
import graph3;
import palette;
-
+
size3(10cm);
-
+
currentprojection=orthographic(5,4,2);
viewportmargin=(2cm,0);
diff --git a/Build/source/utils/asymptote/examples/spline.asy b/Build/source/utils/asymptote/examples/spline.asy
index 9d79ef3a962..f01ba3306e6 100644
--- a/Build/source/utils/asymptote/examples/spline.asy
+++ b/Build/source/utils/asymptote/examples/spline.asy
@@ -1,15 +1,15 @@
-import graph;
-import interpolate;
-
-size(15cm,15cm,IgnoreAspect);
-
-real a=1997, b=2002;
-int n=5;
-real[] xpt=a+sequence(n+1)*(b-a)/n;
-real[] ypt={31,36,26,22,21,24};
+import graph;
+import interpolate;
+
+size(15cm,15cm,IgnoreAspect);
+
+real a=1997, b=2002;
+int n=5;
+real[] xpt=a+sequence(n+1)*(b-a)/n;
+real[] ypt={31,36,26,22,21,24};
horner h=diffdiv(xpt,ypt);
fhorner L=fhorner(h);
-
+
scale(false,true);
pen p=linewidth(1);
diff --git a/Build/source/utils/asymptote/examples/splitpatch.asy b/Build/source/utils/asymptote/examples/splitpatch.asy
index f8578bbbcc9..1fa9325f4ce 100644
--- a/Build/source/utils/asymptote/examples/splitpatch.asy
+++ b/Build/source/utils/asymptote/examples/splitpatch.asy
@@ -33,10 +33,10 @@ struct split
if(depth > 0)
write(pt.tree[i],qt.tree[j],Pi,Qj,depth);
}
- }
+ }
}
}
-
+
// Output the subpatches of p from subdivision.
void read(surface[] S, tree t, triple[][] p, int depth=n) {
--depth;
@@ -44,7 +44,7 @@ struct split
triple[][][] P=Split(p);
for(int i=0; i < 2; ++i) {
- if(t.tree.initialized(i))
+ if(t.tree.initialized(i))
read(S,t.tree[i],P[i],depth);
else {
S[0].push(patch(P[i]));
@@ -62,19 +62,21 @@ struct split
currentprojection=orthographic(0,0,1);
-triple[][] A={
- {(0,0,0),(1,0,0),(1,0,0),(2,0,0)},
- {(0,4/3,0),(2/3,4/3,2),(4/3,4/3,2),(2,4/3,0)},
- {(0,2/3,0),(2/3,2/3,0),(4/3,2/3,0),(2,2/3,0)},
- {(0,2,0),(2/3,2,0),(4/3,2,0),(2,2,0)}
-};
+triple[][] A=
+ {
+ {(0,0,0),(1,0,0),(1,0,0),(2,0,0)},
+ {(0,4/3,0),(2/3,4/3,2),(4/3,4/3,2),(2,4/3,0)},
+ {(0,2/3,0),(2/3,2/3,0),(4/3,2/3,0),(2,2/3,0)},
+ {(0,2,0),(2/3,2,0),(4/3,2,0),(2,2,0)}
+ };
-triple[][] B={
- {(0.5,0,-1),(0.5,1,-1),(0.5,2,-1),(0.5,3,-1)},
- {(0.5,0,0),(0.5,1,0),(0.5,2,0),(0.5,3,0)},
- {(0.5,0,1),(0.5,1,1),(0.5,2,1),(0.5,3,1)},
- {(0.5,0,2),(0.5,1,2),(0.5,2,2),(0.5,3,2)}
-};
+triple[][] B=
+ {
+ {(0.5,0,-1),(0.5,1,-1),(0.5,2,-1),(0.5,3,-1)},
+ {(0.5,0,0),(0.5,1,0),(0.5,2,0),(0.5,3,0)},
+ {(0.5,0,1),(0.5,1,1),(0.5,2,1),(0.5,3,1)},
+ {(0.5,0,2),(0.5,1,2),(0.5,2,2),(0.5,3,2)}
+ };
split S=split(B,A);
diff --git a/Build/source/utils/asymptote/examples/spring.asy b/Build/source/utils/asymptote/examples/spring.asy
index cbfb256eee4..4427d3a0f8c 100644
--- a/Build/source/utils/asymptote/examples/spring.asy
+++ b/Build/source/utils/asymptote/examples/spring.asy
@@ -2,7 +2,7 @@ pair coilpoint(real lambda, real r, real t)
{
return (2.0*lambda*t+r*cos(t),r*sin(t));
}
-
+
guide coil(guide g=nullpath, real lambda, real r, real a, real b, int n)
{
real width=(b-a)/n;
@@ -15,14 +15,14 @@ guide coil(guide g=nullpath, real lambda, real r, real a, real b, int n)
void drawspring(real x, string label) {
real r=8;
- real t1=-pi;
+ real t1=-pi;
real t2=10*pi;
real lambda=(t2-t1+x)/(t2-t1);
pair b=coilpoint(lambda,r,t1);
pair c=coilpoint(lambda,r,t2);
pair a=b-20;
pair d=c+20;
-
+
draw(a--b,BeginBar(2*barsize()));
draw(c--d);
draw(coil(lambda,r,t1,t2,100));
diff --git a/Build/source/utils/asymptote/examples/stereoscopic.asy b/Build/source/utils/asymptote/examples/stereoscopic.asy
index 639333ec476..6cf847e9c06 100644
--- a/Build/source/utils/asymptote/examples/stereoscopic.asy
+++ b/Build/source/utils/asymptote/examples/stereoscopic.asy
@@ -1,11 +1,11 @@
import three;
-
+
currentprojection=perspective(50*dir(70,15));
picture pic;
unitsize(pic,1cm);
draw(pic,xscale3(10)*unitcube,yellow,blue);
-
+
addStereoViews(pic);
diff --git a/Build/source/utils/asymptote/examples/strokeshade.asy b/Build/source/utils/asymptote/examples/strokeshade.asy
index f9413091d1c..2e0a3b0f4d4 100644
--- a/Build/source/utils/asymptote/examples/strokeshade.asy
+++ b/Build/source/utils/asymptote/examples/strokeshade.asy
@@ -1,4 +1,4 @@
size(100);
guide g=(0,0)..controls(70,30) and (-40,30)..(30,0);
latticeshade(g,stroke=true,linewidth(10),
- new pen[][] {{red,orange,yellow},{green,blue,purple}});
+ new pen[][] {{red,orange,yellow},{green,blue,purple}});
diff --git a/Build/source/utils/asymptote/examples/teapot.asy b/Build/source/utils/asymptote/examples/teapot.asy
index bff93ace194..f3328151fde 100644
--- a/Build/source/utils/asymptote/examples/teapot.asy
+++ b/Build/source/utils/asymptote/examples/teapot.asy
@@ -5,168 +5,200 @@ size(20cm);
currentprojection=perspective(250,-250,250);
currentlight=Viewport;
-triple[][][] Q={
+triple[][][] Q=
{
+ {
{(39.68504,0,68.0315),(37.91339,0,71.75197),(40.74803,0,71.75197),(42.51969,0,68.0315)},
{(39.68504,-22.22362,68.0315),(37.91339,-21.2315,71.75197),(40.74803,-22.8189,71.75197),(42.51969,-23.81102,68.0315)},
{(22.22362,-39.68504,68.0315),(21.2315,-37.91339,71.75197),(22.8189,-40.74803,71.75197),(23.81102,-42.51969,68.0315)},
{(0,-39.68504,68.0315),(0,-37.91339,71.75197),(0,-40.74803,71.75197),(0,-42.51969,68.0315)}
- },{
+ },
+ {
{(0,-39.68504,68.0315),(0,-37.91339,71.75197),(0,-40.74803,71.75197),(0,-42.51969,68.0315)},
{(-22.22362,-39.68504,68.0315),(-21.2315,-37.91339,71.75197),(-22.8189,-40.74803,71.75197),(-23.81102,-42.51969,68.0315)},
{(-39.68504,-22.22362,68.0315),(-37.91339,-21.2315,71.75197),(-40.74803,-22.8189,71.75197),(-42.51969,-23.81102,68.0315)},
{(-39.68504,0,68.0315),(-37.91339,0,71.75197),(-40.74803,0,71.75197),(-42.51969,0,68.0315)}
- },{
+ },
+ {
{(-39.68504,0,68.0315),(-37.91339,0,71.75197),(-40.74803,0,71.75197),(-42.51969,0,68.0315)},
{(-39.68504,22.22362,68.0315),(-37.91339,21.2315,71.75197),(-40.74803,22.8189,71.75197),(-42.51969,23.81102,68.0315)},
{(-22.22362,39.68504,68.0315),(-21.2315,37.91339,71.75197),(-22.8189,40.74803,71.75197),(-23.81102,42.51969,68.0315)},
{(0,39.68504,68.0315),(0,37.91339,71.75197),(0,40.74803,71.75197),(0,42.51969,68.0315)}
- },{
+ },
+ {
{(0,39.68504,68.0315),(0,37.91339,71.75197),(0,40.74803,71.75197),(0,42.51969,68.0315)},
{(22.22362,39.68504,68.0315),(21.2315,37.91339,71.75197),(22.8189,40.74803,71.75197),(23.81102,42.51969,68.0315)},
{(39.68504,22.22362,68.0315),(37.91339,21.2315,71.75197),(40.74803,22.8189,71.75197),(42.51969,23.81102,68.0315)},
{(39.68504,0,68.0315),(37.91339,0,71.75197),(40.74803,0,71.75197),(42.51969,0,68.0315)}
- },{
+ },
+ {
{(42.51969,0,68.0315),(49.60629,0,53.1496),(56.69291,0,38.26771),(56.69291,0,25.51181)},
{(42.51969,-23.81102,68.0315),(49.60629,-27.77952,53.1496),(56.69291,-31.74803,38.26771),(56.69291,-31.74803,25.51181)},
{(23.81102,-42.51969,68.0315),(27.77952,-49.60629,53.1496),(31.74803,-56.69291,38.26771),(31.74803,-56.69291,25.51181)},
{(0,-42.51969,68.0315),(0,-49.60629,53.1496),(0,-56.69291,38.26771),(0,-56.69291,25.51181)}
- },{
+ },
+ {
{(0,-42.51969,68.0315),(0,-49.60629,53.1496),(0,-56.69291,38.26771),(0,-56.69291,25.51181)},
{(-23.81102,-42.51969,68.0315),(-27.77952,-49.60629,53.1496),(-31.74803,-56.69291,38.26771),(-31.74803,-56.69291,25.51181)},
{(-42.51969,-23.81102,68.0315),(-49.60629,-27.77952,53.1496),(-56.69291,-31.74803,38.26771),(-56.69291,-31.74803,25.51181)},
{(-42.51969,0,68.0315),(-49.60629,0,53.1496),(-56.69291,0,38.26771),(-56.69291,0,25.51181)}
- },{
+ },
+ {
{(-42.51969,0,68.0315),(-49.60629,0,53.1496),(-56.69291,0,38.26771),(-56.69291,0,25.51181)},
{(-42.51969,23.81102,68.0315),(-49.60629,27.77952,53.1496),(-56.69291,31.74803,38.26771),(-56.69291,31.74803,25.51181)},
{(-23.81102,42.51969,68.0315),(-27.77952,49.60629,53.1496),(-31.74803,56.69291,38.26771),(-31.74803,56.69291,25.51181)},
{(0,42.51969,68.0315),(0,49.60629,53.1496),(0,56.69291,38.26771),(0,56.69291,25.51181)}
- },{
+ },
+ {
{(0,42.51969,68.0315),(0,49.60629,53.1496),(0,56.69291,38.26771),(0,56.69291,25.51181)},
{(23.81102,42.51969,68.0315),(27.77952,49.60629,53.1496),(31.74803,56.69291,38.26771),(31.74803,56.69291,25.51181)},
{(42.51969,23.81102,68.0315),(49.60629,27.77952,53.1496),(56.69291,31.74803,38.26771),(56.69291,31.74803,25.51181)},
{(42.51969,0,68.0315),(49.60629,0,53.1496),(56.69291,0,38.26771),(56.69291,0,25.51181)}
- },{
+ },
+ {
{(56.69291,0,25.51181),(56.69291,0,12.7559),(42.51969,0,6.377957),(42.51969,0,4.251961)},
{(56.69291,-31.74803,25.51181),(56.69291,-31.74803,12.7559),(42.51969,-23.81102,6.377957),(42.51969,-23.81102,4.251961)},
{(31.74803,-56.69291,25.51181),(31.74803,-56.69291,12.7559),(23.81102,-42.51969,6.377957),(23.81102,-42.51969,4.251961)},
{(0,-56.69291,25.51181),(0,-56.69291,12.7559),(0,-42.51969,6.377957),(0,-42.51969,4.251961)}
- },{
+ },
+ {
{(0,-56.69291,25.51181),(0,-56.69291,12.7559),(0,-42.51969,6.377957),(0,-42.51969,4.251961)},
{(-31.74803,-56.69291,25.51181),(-31.74803,-56.69291,12.7559),(-23.81102,-42.51969,6.377957),(-23.81102,-42.51969,4.251961)},
{(-56.69291,-31.74803,25.51181),(-56.69291,-31.74803,12.7559),(-42.51969,-23.81102,6.377957),(-42.51969,-23.81102,4.251961)},
{(-56.69291,0,25.51181),(-56.69291,0,12.7559),(-42.51969,0,6.377957),(-42.51969,0,4.251961)}
- },{
+ },
+ {
{(-56.69291,0,25.51181),(-56.69291,0,12.7559),(-42.51969,0,6.377957),(-42.51969,0,4.251961)},
{(-56.69291,31.74803,25.51181),(-56.69291,31.74803,12.7559),(-42.51969,23.81102,6.377957),(-42.51969,23.81102,4.251961)},
{(-31.74803,56.69291,25.51181),(-31.74803,56.69291,12.7559),(-23.81102,42.51969,6.377957),(-23.81102,42.51969,4.251961)},
{(0,56.69291,25.51181),(0,56.69291,12.7559),(0,42.51969,6.377957),(0,42.51969,4.251961)}
- },{
+ },
+ {
{(0,56.69291,25.51181),(0,56.69291,12.7559),(0,42.51969,6.377957),(0,42.51969,4.251961)},
{(31.74803,56.69291,25.51181),(31.74803,56.69291,12.7559),(23.81102,42.51969,6.377957),(23.81102,42.51969,4.251961)},
{(56.69291,31.74803,25.51181),(56.69291,31.74803,12.7559),(42.51969,23.81102,6.377957),(42.51969,23.81102,4.251961)},
{(56.69291,0,25.51181),(56.69291,0,12.7559),(42.51969,0,6.377957),(42.51969,0,4.251961)}
- },{
+ },
+ {
{(-45.35433,0,57.40157),(-65.19685,0,57.40157),(-76.53543,0,57.40157),(-76.53543,0,51.02362)},
{(-45.35433,-8.503932,57.40157),(-65.19685,-8.503932,57.40157),(-76.53543,-8.503932,57.40157),(-76.53543,-8.503932,51.02362)},
{(-42.51969,-8.503932,63.77952),(-70.86614,-8.503932,63.77952),(-85.03937,-8.503932,63.77952),(-85.03937,-8.503932,51.02362)},
{(-42.51969,0,63.77952),(-70.86614,0,63.77952),(-85.03937,0,63.77952),(-85.03937,0,51.02362)}
- },{
+ },
+ {
{(-42.51969,0,63.77952),(-70.86614,0,63.77952),(-85.03937,0,63.77952),(-85.03937,0,51.02362)},
{(-42.51969,8.503932,63.77952),(-70.86614,8.503932,63.77952),(-85.03937,8.503932,63.77952),(-85.03937,8.503932,51.02362)},
{(-45.35433,8.503932,57.40157),(-65.19685,8.503932,57.40157),(-76.53543,8.503932,57.40157),(-76.53543,8.503932,51.02362)},
{(-45.35433,0,57.40157),(-65.19685,0,57.40157),(-76.53543,0,57.40157),(-76.53543,0,51.02362)}
- },{
+ },
+ {
{(-76.53543,0,51.02362),(-76.53543,0,44.64566),(-70.86614,0,31.88976),(-56.69291,0,25.51181)},
{(-76.53543,-8.503932,51.02362),(-76.53543,-8.503932,44.64566),(-70.86614,-8.503932,31.88976),(-56.69291,-8.503932,25.51181)},
{(-85.03937,-8.503932,51.02362),(-85.03937,-8.503932,38.26771),(-75.11811,-8.503932,26.5748),(-53.85826,-8.503932,17.00787)},
{(-85.03937,0,51.02362),(-85.03937,0,38.26771),(-75.11811,0,26.5748),(-53.85826,0,17.00787)}
- },{
+ },
+ {
{(-85.03937,0,51.02362),(-85.03937,0,38.26771),(-75.11811,0,26.5748),(-53.85826,0,17.00787)},
{(-85.03937,8.503932,51.02362),(-85.03937,8.503932,38.26771),(-75.11811,8.503932,26.5748),(-53.85826,8.503932,17.00787)},
{(-76.53543,8.503932,51.02362),(-76.53543,8.503932,44.64566),(-70.86614,8.503932,31.88976),(-56.69291,8.503932,25.51181)},
{(-76.53543,0,51.02362),(-76.53543,0,44.64566),(-70.86614,0,31.88976),(-56.69291,0,25.51181)}
- },{
+ },
+ {
{(48.18897,0,40.3937),(73.70078,0,40.3937),(65.19685,0,59.52755),(76.53543,0,68.0315)},
{(48.18897,-18.70866,40.3937),(73.70078,-18.70866,40.3937),(65.19685,-7.086619,59.52755),(76.53543,-7.086619,68.0315)},
{(48.18897,-18.70866,17.00787),(87.87401,-18.70866,23.38582),(68.0315,-7.086619,57.40157),(93.5433,-7.086619,68.0315)},
{(48.18897,0,17.00787),(87.87401,0,23.38582),(68.0315,0,57.40157),(93.5433,0,68.0315)}
- },{
+ },
+ {
{(48.18897,0,17.00787),(87.87401,0,23.38582),(68.0315,0,57.40157),(93.5433,0,68.0315)},
{(48.18897,18.70866,17.00787),(87.87401,18.70866,23.38582),(68.0315,7.086619,57.40157),(93.5433,7.086619,68.0315)},
{(48.18897,18.70866,40.3937),(73.70078,18.70866,40.3937),(65.19685,7.086619,59.52755),(76.53543,7.086619,68.0315)},
{(48.18897,0,40.3937),(73.70078,0,40.3937),(65.19685,0,59.52755),(76.53543,0,68.0315)}
- },{
+ },
+ {
{(76.53543,0,68.0315),(79.37007,0,70.15748),(82.20472,0,70.15748),(79.37007,0,68.0315)},
{(76.53543,-7.086619,68.0315),(79.37007,-7.086619,70.15748),(82.20472,-4.251961,70.15748),(79.37007,-4.251961,68.0315)},
{(93.5433,-7.086619,68.0315),(99.92125,-7.086619,70.68897),(97.79527,-4.251961,71.22047),(90.70866,-4.251961,68.0315)},
{(93.5433,0,68.0315),(99.92125,0,70.68897),(97.79527,0,71.22047),(90.70866,0,68.0315)}
- },{
+ },
+ {
{(93.5433,0,68.0315),(99.92125,0,70.68897),(97.79527,0,71.22047),(90.70866,0,68.0315)},
{(93.5433,7.086619,68.0315),(99.92125,7.086619,70.68897),(97.79527,4.251961,71.22047),(90.70866,4.251961,68.0315)},
{(76.53543,7.086619,68.0315),(79.37007,7.086619,70.15748),(82.20472,4.251961,70.15748),(79.37007,4.251961,68.0315)},
{(76.53543,0,68.0315),(79.37007,0,70.15748),(82.20472,0,70.15748),(79.37007,0,68.0315)}
- },{
+ },
+ {
{(0,0,89.29133),(22.67716,0,89.29133),(0,0,80.7874),(5.669294,0,76.53543)},
{(0,0,89.29133),(22.67716,-12.7559,89.29133),(0,0,80.7874),(5.669294,-3.174809,76.53543)},
{(0,0,89.29133),(12.7559,-22.67716,89.29133),(0,0,80.7874),(3.174809,-5.669294,76.53543)},
{(0,0,89.29133),(0,-22.67716,89.29133),(0,0,80.7874),(0,-5.669294,76.53543)}
- },{
+ },
+ {
{(0,0,89.29133),(0,-22.67716,89.29133),(0,0,80.7874),(0,-5.669294,76.53543)},
{(0,0,89.29133),(-12.7559,-22.67716,89.29133),(0,0,80.7874),(-3.174809,-5.669294,76.53543)},
{(0,0,89.29133),(-22.67716,-12.7559,89.29133),(0,0,80.7874),(-5.669294,-3.174809,76.53543)},
{(0,0,89.29133),(-22.67716,0,89.29133),(0,0,80.7874),(-5.669294,0,76.53543)}
- },{
+ },
+ {
{(0,0,89.29133),(-22.67716,0,89.29133),(0,0,80.7874),(-5.669294,0,76.53543)},
{(0,0,89.29133),(-22.67716,12.7559,89.29133),(0,0,80.7874),(-5.669294,3.174809,76.53543)},
{(0,0,89.29133),(-12.7559,22.67716,89.29133),(0,0,80.7874),(-3.174809,5.669294,76.53543)},
{(0,0,89.29133),(0,22.67716,89.29133),(0,0,80.7874),(0,5.669294,76.53543)}
- },{
+ },
+ {
{(0,0,89.29133),(0,22.67716,89.29133),(0,0,80.7874),(0,5.669294,76.53543)},
{(0,0,89.29133),(12.7559,22.67716,89.29133),(0,0,80.7874),(3.174809,5.669294,76.53543)},
{(0,0,89.29133),(22.67716,12.7559,89.29133),(0,0,80.7874),(5.669294,3.174809,76.53543)},
{(0,0,89.29133),(22.67716,0,89.29133),(0,0,80.7874),(5.669294,0,76.53543)}
- },{
+ },
+ {
{(5.669294,0,76.53543),(11.33858,0,72.28346),(36.85039,0,72.28346),(36.85039,0,68.0315)},
{(5.669294,-3.174809,76.53543),(11.33858,-6.349609,72.28346),(36.85039,-20.63622,72.28346),(36.85039,-20.63622,68.0315)},
{(3.174809,-5.669294,76.53543),(6.349609,-11.33858,72.28346),(20.63622,-36.85039,72.28346),(20.63622,-36.85039,68.0315)},
{(0,-5.669294,76.53543),(0,-11.33858,72.28346),(0,-36.85039,72.28346),(0,-36.85039,68.0315)}
- },{
+ },
+ {
{(0,-5.669294,76.53543),(0,-11.33858,72.28346),(0,-36.85039,72.28346),(0,-36.85039,68.0315)},
{(-3.174809,-5.669294,76.53543),(-6.349609,-11.33858,72.28346),(-20.63622,-36.85039,72.28346),(-20.63622,-36.85039,68.0315)},
{(-5.669294,-3.174809,76.53543),(-11.33858,-6.349609,72.28346),(-36.85039,-20.63622,72.28346),(-36.85039,-20.63622,68.0315)},
{(-5.669294,0,76.53543),(-11.33858,0,72.28346),(-36.85039,0,72.28346),(-36.85039,0,68.0315)},
- },{
+ },
+ {
{(-5.669294,0,76.53543),(-11.33858,0,72.28346),(-36.85039,0,72.28346),(-36.85039,0,68.0315)},
{(-5.669294,3.174809,76.53543),(-11.33858,6.349609,72.28346),(-36.85039,20.63622,72.28346),(-36.85039,20.63622,68.0315)},
{(-3.174809,5.669294,76.53543),(-6.349609,11.33858,72.28346),(-20.63622,36.85039,72.28346),(-20.63622,36.85039,68.0315)},
{(0,5.669294,76.53543),(0,11.33858,72.28346),(0,36.85039,72.28346),(0,36.85039,68.0315)}
- },{
+ },
+ {
{(0,5.669294,76.53543),(0,11.33858,72.28346),(0,36.85039,72.28346),(0,36.85039,68.0315)},
{(3.174809,5.669294,76.53543),(6.349609,11.33858,72.28346),(20.63622,36.85039,72.28346),(20.63622,36.85039,68.0315)},
{(5.669294,3.174809,76.53543),(11.33858,6.349609,72.28346),(36.85039,20.63622,72.28346),(36.85039,20.63622,68.0315)},
{(5.669294,0,76.53543),(11.33858,0,72.28346),(36.85039,0,72.28346),(36.85039,0,68.0315)},
- },{
+ },
+ {
{(0,0,0),(40.3937,0,0),(42.51969,0,2.12598),(42.51969,0,4.251961)},
{(0,0,0),(40.3937,22.62047,0),(42.51969,23.81102,2.12598),(42.51969,23.81102,4.251961)},
{(0,0,0),(22.62047,40.3937,0),(23.81102,42.51969,2.12598),(23.81102,42.51969,4.251961)},
{(0,0,0),(0,40.3937,0),(0,42.51969,2.12598),(0,42.51969,4.251961)}
- },{
+ },
+ {
{(0,0,0),(0,40.3937,0),(0,42.51969,2.12598),(0,42.51969,4.251961)},
{(0,0,0),(-22.62047,40.3937,0),(-23.81102,42.51969,2.12598),(-23.81102,42.51969,4.251961)},
{(0,0,0),(-40.3937,22.62047,0),(-42.51969,23.81102,2.12598),(-42.51969,23.81102,4.251961)},
{(0,0,0),(-40.3937,0,0),(-42.51969,0,2.12598),(-42.51969,0,4.251961)}
- },{
+ },
+ {
{(0,0,0),(-40.3937,0,0),(-42.51969,0,2.12598),(-42.51969,0,4.251961)},
{(0,0,0),(-40.3937,-22.62047,0),(-42.51969,-23.81102,2.12598),(-42.51969,-23.81102,4.251961)},
{(0,0,0),(-22.62047,-40.3937,0),(-23.81102,-42.51969,2.12598),(-23.81102,-42.51969,4.251961)},
{(0,0,0),(0,-40.3937,0),(0,-42.51969,2.12598),(0,-42.51969,4.251961)}
- },{
+ },
+ {
{(0,0,0),(0,-40.3937,0),(0,-42.51969,2.12598),(0,-42.51969,4.251961)},
{(0,0,0),(22.62047,-40.3937,0),(23.81102,-42.51969,2.12598),(23.81102,-42.51969,4.251961)},
{(0,0,0),(40.3937,-22.62047,0),(42.51969,-23.81102,2.12598),(42.51969,-23.81102,4.251961)},
{(0,0,0),(40.3937,0,0),(42.51969,0,2.12598),(42.51969,0,4.251961)}
- }
-};
+ }
+ };
draw(surface(Q),material(blue, shininess=0.85, metallic=0),render(compression=Low));
diff --git a/Build/source/utils/asymptote/examples/thermodynamics.asy b/Build/source/utils/asymptote/examples/thermodynamics.asy
index cfcc3d0e98e..e0965028975 100644
--- a/Build/source/utils/asymptote/examples/thermodynamics.asy
+++ b/Build/source/utils/asymptote/examples/thermodynamics.asy
@@ -14,7 +14,7 @@ picture CreateKOOS(real Scale, string legend) // draw labeled coor
draw(ReturnPic, ((0,-S)--(0,S)), bar = EndArrow); // y axis
label(ReturnPic, "$\varepsilon$", (S,0), SW); // x axis label
label(ReturnPic, "$\sigma$", (0,S), SW); // y axis label
- label(ReturnPic, legend, (0.7S, -S), NW); // add label 'legend'
+ label(ReturnPic, legend, (0.7S, -S), NW); // add label 'legend'
return ReturnPic; // return picture
}
@@ -32,69 +32,69 @@ picture T[]; // vector of all four diagrams
real inc = 2.8; // increment-offset for combining pictures
//////////////////////////////////////// 1st diagram
-T[1] = CreateKOOS(S, "$T_1$"); // initialise T[1] as empty diagram with label $T_1$
-graph = A; // # pointwise definition of current path 'graph'
-graph = graph -- (A.x + grad*1.6, A.y + 1.6); // #
-graph = graph -- (E.x - grad*0.4, E.y - 0.4); // #
+T[1] = CreateKOOS(S, "$T_1$"); // initialise T[1] as empty diagram with label $T_1$
+graph = A; // # pointwise definition of current path 'graph'
+graph = graph -- (A.x + grad*1.6, A.y + 1.6); // #
+graph = graph -- (E.x - grad*0.4, E.y - 0.4); // #
graph = graph -- E; // #
-graph = roundedpath(graph, radius, S); // round edges of 'graph' using roundedpath() in roundedpath.asy
-ActPen = rgb(0,0,0.6) + linewidth(lw); // define pen for drawing in 1st diagram
-draw(T[1], graph, ActPen); // draw 'graph' with 'ActPen' into 'T[1]' (1st hysteresis branch)
-draw(T[1], rotate(180,(0,0))*graph, ActPen); // draw rotated 'graph' (2nd hysteresis branch)
+graph = roundedpath(graph, radius, S); // round edges of 'graph' using roundedpath() in roundedpath.asy
+ActPen = rgb(0,0,0.6) + linewidth(lw); // define pen for drawing in 1st diagram
+draw(T[1], graph, ActPen); // draw 'graph' with 'ActPen' into 'T[1]' (1st hysteresis branch)
+draw(T[1], rotate(180,(0,0))*graph, ActPen); // draw rotated 'graph' (2nd hysteresis branch)
graph = (0,0) -- (grad*0.6, 0.6) -- ( (grad*0.6, 0.6) + (0.1, 0) ); // define branch from origin to hysteresis
-graph = roundedpath(graph, radius, S); // round this path
-draw(T[1], graph, ActPen); // draw this path into 'T[1]'
+graph = roundedpath(graph, radius, S); // round this path
+draw(T[1], graph, ActPen); // draw this path into 'T[1]'
//////////////////////////////////////// 2nd diagram
-T[2] = CreateKOOS(S, "$T_2$"); // initialise T[2] as empty diagram with label $T_2$
-graph = A; // # pointwise definition of current path 'graph'
-graph = graph -- (A.x + grad*1.3, A.y + 1.3); // #
-graph = graph -- (E.x - grad*0.7 , E.y - 0.7); // #
+T[2] = CreateKOOS(S, "$T_2$"); // initialise T[2] as empty diagram with label $T_2$
+graph = A; // # pointwise definition of current path 'graph'
+graph = graph -- (A.x + grad*1.3, A.y + 1.3); // #
+graph = graph -- (E.x - grad*0.7 , E.y - 0.7); // #
graph = graph -- E; // #
-
-graph = roundedpath(graph, radius, S); // round edges of 'graph' using roundedpath() in roundedpath.asy
-ActPen = rgb(0.2,0,0.4) + linewidth(lw); // define pen for drawing in 2nd diagram
-draw(T[2], graph, ActPen); // draw 'graph' with 'ActPen' into 'T[2]' (1st hysteresis branch)
-draw(T[2], rotate(180,(0,0))*graph, ActPen); // draw rotated 'graph' (2nd hysteresis branch)
+
+graph = roundedpath(graph, radius, S); // round edges of 'graph' using roundedpath() in roundedpath.asy
+ActPen = rgb(0.2,0,0.4) + linewidth(lw); // define pen for drawing in 2nd diagram
+draw(T[2], graph, ActPen); // draw 'graph' with 'ActPen' into 'T[2]' (1st hysteresis branch)
+draw(T[2], rotate(180,(0,0))*graph, ActPen); // draw rotated 'graph' (2nd hysteresis branch)
graph = (0,0) -- (grad*0.3, 0.3) -- ( (grad*0.3, 0.3) + (0.1, 0) ); // define branch from origin to hysteresis
-graph = roundedpath(graph, radius, S); // round this path
-draw(T[2], graph, ActPen); // draw this path into 'T[2]'
+graph = roundedpath(graph, radius, S); // round this path
+draw(T[2], graph, ActPen); // draw this path into 'T[2]'
//////////////////////////////////////// 3rd diagram
-T[3] = CreateKOOS(S, "$T_3$"); // initialise T[3] as empty diagram with label $T_3$
-graph = A; // # pointwise definition of current path 'graph'
-graph = graph -- (A.x + grad*0.7, A.y + 0.7); // #
-graph = graph -- ( - grad*0.3 , - 0.3); // #
-graph = graph -- (0,0); // #
-graph = graph -- (grad*0.6, 0.6); // #
-graph = graph -- (E.x - grad*0.4, E.y - 0.4); // #
-graph = graph -- E; // #
-
-graph = roundedpath(graph, radius, S); // round edges of 'graph' using roundedpath() in roundedpath.asy
-ActPen = rgb(0.6,0,0.2) + linewidth(lw); // define pen for drawing in 3rd diagram
-draw(T[3], graph, ActPen); // draw 'graph' with 'ActPen' into 'T[3]' (1st hysteresis branch)
-draw(T[3], rotate(180,(0,0))*graph, ActPen); // draw rotated 'graph' (2nd hysteresis branch)
+T[3] = CreateKOOS(S, "$T_3$"); // initialise T[3] as empty diagram with label $T_3$
+graph = A; // # pointwise definition of current path 'graph'
+graph = graph -- (A.x + grad*0.7, A.y + 0.7); // #
+graph = graph -- ( - grad*0.3 , - 0.3); // #
+graph = graph -- (0,0); // #
+graph = graph -- (grad*0.6, 0.6); // #
+graph = graph -- (E.x - grad*0.4, E.y - 0.4); // #
+graph = graph -- E; // #
+
+graph = roundedpath(graph, radius, S); // round edges of 'graph' using roundedpath() in roundedpath.asy
+ActPen = rgb(0.6,0,0.2) + linewidth(lw); // define pen for drawing in 3rd diagram
+draw(T[3], graph, ActPen); // draw 'graph' with 'ActPen' into 'T[3]' (1st hysteresis branch)
+draw(T[3], rotate(180,(0,0))*graph, ActPen); // draw rotated 'graph' (2nd hysteresis branch)
//////////////////////////////////////// 4th diagram
-T[4] = CreateKOOS(S, "$T_4$"); // initialise T[4] as empty diagram with label $T_4$
-graph = A; // # pointwise definition of current path 'graph'
-graph = graph -- (A.x + grad*0.4, A.y + 0.4); // #
-graph = graph -- ( - grad*0.6 , - 0.6); // #
-graph = graph -- (0,0); // #
-graph = graph -- (grad*0.9, 0.9); // #
-graph = graph -- (E.x - grad*0.1, E.y - 0.1); // #
-graph = graph -- E; // #
-
-graph = roundedpath(graph, radius, S); // round edges of 'graph' using roundedpath() in roundedpath.asy
-ActPen = rgb(0.6,0,0) + linewidth(lw); // define pen for drawing in 4th diagram
-draw(T[4], graph, ActPen); // draw 'graph' with 'ActPen' into 'T[4]' (1st hysteresis branch)
-draw(T[4], rotate(180,(0,0))*graph, ActPen); // draw rotated 'graph' (3nd hysteresis branch)
+T[4] = CreateKOOS(S, "$T_4$"); // initialise T[4] as empty diagram with label $T_4$
+graph = A; // # pointwise definition of current path 'graph'
+graph = graph -- (A.x + grad*0.4, A.y + 0.4); // #
+graph = graph -- ( - grad*0.6 , - 0.6); // #
+graph = graph -- (0,0); // #
+graph = graph -- (grad*0.9, 0.9); // #
+graph = graph -- (E.x - grad*0.1, E.y - 0.1); // #
+graph = graph -- E; // #
+
+graph = roundedpath(graph, radius, S); // round edges of 'graph' using roundedpath() in roundedpath.asy
+ActPen = rgb(0.6,0,0) + linewidth(lw); // define pen for drawing in 4th diagram
+draw(T[4], graph, ActPen); // draw 'graph' with 'ActPen' into 'T[4]' (1st hysteresis branch)
+draw(T[4], rotate(180,(0,0))*graph, ActPen); // draw rotated 'graph' (3nd hysteresis branch)
// add some labels and black dots to the first two pictures
@@ -126,6 +126,6 @@ ActPen = linewidth(1) + gray(0.5); // define
draw(shift(( 1 - grad*0.55 + 0*inc)*S, 0.45*S)*mark, ActPen); // # draw all intersections
draw(shift((-1 + grad*1.45 + 0*inc)*S, 0.45*S)*mark, ActPen); // #
draw(shift(( 1 - grad*0.55 + 1*inc)*S, 0.45*S)*mark, ActPen); // #
-draw(shift(( 1 - grad*0.55 + 2*inc)*S, 0.45*S)*mark, ActPen); // #
-draw(shift(( grad*0.45 + 2*inc)*S, 0.45*S)*mark, ActPen); // #
+draw(shift(( 1 - grad*0.55 + 2*inc)*S, 0.45*S)*mark, ActPen); // #
+draw(shift(( grad*0.45 + 2*inc)*S, 0.45*S)*mark, ActPen); // #
draw(shift(( grad*0.45 + 3*inc)*S, 0.45*S)*mark, ActPen); // #
diff --git a/Build/source/utils/asymptote/examples/torus.asy b/Build/source/utils/asymptote/examples/torus.asy
index d0b8673d737..c5bda1e6871 100644
--- a/Build/source/utils/asymptote/examples/torus.asy
+++ b/Build/source/utils/asymptote/examples/torus.asy
@@ -7,9 +7,9 @@ real R=3;
real a=1;
/*
-import solids;
-revolution torus=revolution(reverse(Circle(R*X,a,Y,32)),Z,90,345);
-surface s=surface(torus);
+ import solids;
+ revolution torus=revolution(reverse(Circle(R*X,a,Y,32)),Z,90,345);
+ surface s=surface(torus);
*/
triple f(pair t) {
diff --git a/Build/source/utils/asymptote/examples/triads.asy b/Build/source/utils/asymptote/examples/triads.asy
index 77806b1ad4b..6cecc55fa46 100644
--- a/Build/source/utils/asymptote/examples/triads.asy
+++ b/Build/source/utils/asymptote/examples/triads.asy
@@ -12,18 +12,18 @@ pair o=(m.x,0.5(m.x+l.y));
pen d=c+darkgreen;
void drawarrow(string s="", pair p, pair q, side side=RightSide,
- bool upscale=false, pen c)
+ bool upscale=false, pen c)
{
path g=p{dir(-5)}..{dir(-85)}q;
- if(upscale) g=reverse(g);
+ if(upscale) g=reverse(g);
draw(s,g,side,c,Arrow(Fill,0.65));
-}
+}
void spectrum(pair l,pair m, pair s) {
draw(p,c);
-
+
d += 4.0;
- dot("$p$",l,SW,d);
+ dot("$p$",l,SW,d);
dot("$q$",m,SW,d);
dot("$k$",s,SW,d);
diff --git a/Build/source/utils/asymptote/examples/triangle.asy b/Build/source/utils/asymptote/examples/triangle.asy
index 60388a78515..e3f9c1f5889 100644
--- a/Build/source/utils/asymptote/examples/triangle.asy
+++ b/Build/source/utils/asymptote/examples/triangle.asy
@@ -2,7 +2,7 @@ size(0,100);
import geometry;
triangle t=triangle(b=3,alpha=90,c=4);
-
+
dot((0,0));
draw(t);
diff --git a/Build/source/utils/asymptote/examples/truncatedIcosahedron.asy b/Build/source/utils/asymptote/examples/truncatedIcosahedron.asy
index e4d07a49e5b..092f96a4e6c 100644
--- a/Build/source/utils/asymptote/examples/truncatedIcosahedron.asy
+++ b/Build/source/utils/asymptote/examples/truncatedIcosahedron.asy
@@ -10,20 +10,21 @@ 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)}
-};
+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));
diff --git a/Build/source/utils/asymptote/examples/tvgen.asy b/Build/source/utils/asymptote/examples/tvgen.asy
index c7898fe7129..0ea7ce3eb6d 100644
--- a/Build/source/utils/asymptote/examples/tvgen.asy
+++ b/Build/source/utils/asymptote/examples/tvgen.asy
@@ -17,40 +17,40 @@
* Boston, MA 02110-1301, USA.
*
* tvgen-1.2/tvgen.asy http://picaros.org/ftp/soft/tvgen-1.2.tgz
- * This asy script generates pm5544-like television test cards. The image
- * parameters were derived from a 1990 recording. The basic parameters
- * conform to itu-r bt.470, bt.601, and bt.709. There is no unique image
- * since local variants exist and parameters have varied over time.
+ * This asy script generates pm5544-like television test cards. The image
+ * parameters were derived from a 1990 recording. The basic parameters
+ * conform to itu-r bt.470, bt.601, and bt.709. There is no unique image
+ * since local variants exist and parameters have varied over time.
*/
//papertype="a4";
import plain;
int verbose=settings.verbose/*+2*/; /* uncomment for debug info */
/* tv dot coordinates --> PS points */
-pair tvps(real col, real row, real xd, real yd, int Nv) {
- real psx, psy;
- psx=col*xd; psy=(Nv-row)*yd;
- return (psx,psy);
+pair tvps(real col, real row, real xd, real yd, int Nv) {
+ real psx, psy;
+ psx=col*xd; psy=(Nv-row)*yd;
+ return (psx,psy);
}
path tvrect(int lc, int tr, int rc, int br, real xd, real yd, int Nv) {
- real lx, ty, rx, by;
- pair[] z;
-
- lx=lc*xd; ty=(Nv-tr)*yd;
- rx=rc*xd; by=(Nv-br)*yd;
+ real lx, ty, rx, by;
+ pair[] z;
+
+ lx=lc*xd; ty=(Nv-tr)*yd;
+ rx=rc*xd; by=(Nv-br)*yd;
/* bl br tr tl */
z[0]=(lx, by);
- z[1]=(rx, by);
- z[2]=(rx, ty);
- z[3]=(lx, ty);
-
- return z[0]--z[1]--z[2]--z[3]--cycle;
+ z[1]=(rx, by);
+ z[2]=(rx, ty);
+ z[3]=(lx, ty);
+
+ return z[0]--z[1]--z[2]--z[3]--cycle;
}
/********************* horizontal castellations ********************/
/* Draw a horizontal red line in the top left and the bottom right
* castellation. These testlines disappear if the monitor is not set
- * in a dot-exact mode. An example is image crop due to overscan.
+ * in a dot-exact mode. An example is image crop due to overscan.
*
* For 625 line systems any analog-compatible processing removes
* these red testlines since the first halfline of the odd field and
@@ -58,8 +58,8 @@ path tvrect(int lc, int tr, int rc, int br, real xd, real yd, int Nv) {
* visible line frame often results via a final copy paste operation.
*/
void castelhor(int colortv, int[] rccoll, int[] rccolr, int cmaxi, int Nh,
- int topdist, int botdist,
- pen pdef, real xd, real yd, int Nv) {
+ int topdist, int botdist,
+ pen pdef, real xd, real yd, int Nv) {
pen pblack, pwhite, pred;
int i;
@@ -113,26 +113,26 @@ void castelhor(int colortv, int[] rccoll, int[] rccolr, int cmaxi, int Nh,
zzc = tvrect(lc,botdist, rc,br, xd,yd,Nv);
fill(zzc, p=pcast);
}
-
+
return;
}
/********************* vertical castellations ********************/
-/* The bottom right red rectangle tests for a non causal color FIR
- * filter in the receiver. The last 2..4 dots then typically appear
- * colorless, green, or cyan.
+/* The bottom right red rectangle tests for a non causal color FIR
+ * filter in the receiver. The last 2..4 dots then typically appear
+ * colorless, green, or cyan.
*
- * This stems from the fact that the chroma subcarrier is of lower
- * bandwidth than luma and thus continues after the last active sample.
- * These trailing (y,u,v) samples result from an abrupt signal to zero
- * transition and depend on the transmit and receive filters. Samples
- * from VHS, system B/G/D/K, system I, or a DVD player output are
- * different. Nevertheless, a sharpening filter uses this data and so
- * adds false color to the last dots.
+ * This stems from the fact that the chroma subcarrier is of lower
+ * bandwidth than luma and thus continues after the last active sample.
+ * These trailing (y,u,v) samples result from an abrupt signal to zero
+ * transition and depend on the transmit and receive filters. Samples
+ * from VHS, system B/G/D/K, system I, or a DVD player output are
+ * different. Nevertheless, a sharpening filter uses this data and so
+ * adds false color to the last dots.
*/
void castelver(int colortv, int leftdist, int rightdist, int Nh,
- int[] rcrowb, int[] rcrowt, int rmaxi,
- pen pdef, real xd, real yd, int Nv) {
+ int[] rcrowb, int[] rcrowt, int rmaxi,
+ pen pdef, real xd, real yd, int Nv) {
pen pblack, pwhite;
int i;
@@ -144,7 +144,7 @@ void castelver(int colortv, int leftdist, int rightdist, int Nh,
pen pcastl, pcastr;
int tr, br;
path zzc;
-
+
if (inext%2 == 0) {
pcastl = pwhite;
} else {
@@ -157,17 +157,17 @@ void castelver(int colortv, int leftdist, int rightdist, int Nh,
}
tr=rcrowb[i];
- br=rcrowt[i+1];
+ br=rcrowt[i+1];
zzc=tvrect( 0,tr, leftdist,br, xd,yd,Nv);
fill(zzc, p=pcastl);
- zzc=tvrect(rightdist,tr, Nh,br, xd,yd,Nv);
+ zzc=tvrect(rightdist,tr, Nh,br, xd,yd,Nv);
fill(zzc, p=pcastr);
}
return;
}
/********************* image aspect ratio markers ********************/
void rimarkers(real rimage, int Nh, int Nhc, int os, int Nvc, int Nsy,
- pen pdef, real xd, real yd, int Nv) {
+ pen pdef, real xd, real yd, int Nv) {
int[] ridefN={ 4, 16 };
int[] ridefD={ 3, 9 };
int i;
@@ -187,11 +187,11 @@ void rimarkers(real rimage, int Nh, int Nhc, int os, int Nvc, int Nsy,
if (2*offa<Nh) {
int hy, tr, br;
path zz;
-
- hy=floor(Nsy/3);
- tr=Nvc-hy;
- br=Nvc+hy;
-
+
+ hy=floor(Nsy/3);
+ tr=Nvc-hy;
+ br=Nvc+hy;
+
zz=tvrect(Nhc+offb, tr, Nhc+offa, br, xd,yd,Nv);
//dot(zz);
fill(zz, p=pdef);
@@ -206,7 +206,7 @@ void rimarkers(real rimage, int Nh, int Nhc, int os, int Nvc, int Nsy,
/************* crosshatch: line pairing, center interlace test *************/
/* There are 2 coordinate systems in use:
* 1. integer number based for the gridlines
- *
+ *
* coff, Nhc, rccoll[], rccolc[], rccolr[] : vertical gridlines,
* rcrowc, Nvc : horizontal gridlines,
*
@@ -215,15 +215,15 @@ void rimarkers(real rimage, int Nh, int Nhc, int os, int Nvc, int Nsy,
* ccenter={ cx=Nh/2, cy=Nv/2} : the true image center,
* rcoff rcright rcleft : offset to ccenter and points on the circle.
*
- * Both centers coincide if Nh and Nv are even.
+ * Both centers coincide if Nh and Nv are even.
*/
void centerline(int colortv,
- int[] rccoll, int[] rccolc, int[] rccolr, int divsx,
- int Nhc, int os,
- int[] rcrowt, int[] rcrowc, int[] rcrowb, int divsy,
- int Nvc,
- pair ccenter, real[] rcoff, pair[] rcright, pair[] rcleft,
- pen pdef, real xd, real yd, int Nv) {
+ int[] rccoll, int[] rccolc, int[] rccolr, int divsx,
+ int Nhc, int os,
+ int[] rcrowt, int[] rcrowc, int[] rcrowb, int divsy,
+ int Nvc,
+ pair ccenter, real[] rcoff, pair[] rcright, pair[] rcleft,
+ pen pdef, real xd, real yd, int Nv) {
pen pblack, pwhite;
int cmaxi, maxoff, mincol, maxcol;
int rows, tr, br;
@@ -239,7 +239,7 @@ void centerline(int colortv,
/* black, vertical gridlines redrawn below */
pair[] z;
int col;
-
+
z[0]=rcright[divsy];
col = rccolc[divsx+1];
@@ -249,21 +249,21 @@ void centerline(int colortv,
z[3]=tvps(col,rcrowc[divsy-1], xd,yd,Nv);
z[4]=tvps(col,rcrowc[divsy], xd,yd,Nv);
- z[5]=rcleft[divsy];
+ z[5]=rcleft[divsy];
z[6]=rcleft[divsy+1];
-
+
z[7]=tvps(col,rcrowc[divsy+1], xd,yd,Nv);
z[8]=tvps(col,rcrowc[divsy+2], xd,yd,Nv);
col = rccolc[divsx+1];
z[9]=tvps(col,rcrowc[divsy+2], xd,yd,Nv);
z[10]=tvps(col,rcrowc[divsy+1], xd,yd,Nv);
- z[11]=rcright[divsy+1];
+ z[11]=rcright[divsy+1];
fill(z[1]--z[2]--z[3]--z[4] //--z[5]--z[6]
- --arc(ccenter, z[5], z[6])
- --z[7]--z[8]--z[9]--z[10] //--z[11]--z[0]
- --arc(ccenter,z[11], z[0])
- --cycle, p=pblack);
+ --arc(ccenter, z[5], z[6])
+ --z[7]--z[8]--z[9]--z[10] //--z[11]--z[0]
+ --arc(ccenter,z[11], z[0])
+ --cycle, p=pblack);
} else {
/* 3 rows of black squares inside the gratings */
int i, imax = divsy+1;
@@ -277,28 +277,28 @@ void centerline(int colortv,
lmaxoff = min(floor(rcoff[i]), floor(rcoff[inext]));
lmincol = Nhc-lmaxoff;
lmaxcol = Nhc+lmaxoff;
-
+
/* square top and bottom */
tr = rcrowb[i];
br = rcrowt[inext];
for (j=0; j<cmaxi; ++j) { /* column j */
- int jnext = j+1;
-
- if (lmincol<=rccolc[j] && rccolc[jnext]<=lmaxcol) {
- /* square is inside circle */
- int lc, rc;
- path zzsq;
-
- lc = rccolr[j];
- rc = rccoll[jnext];
- zzsq = tvrect(lc, tr, rc, br, xd,yd,Nv);
- fill(zzsq, p=pblack); /* draw black squares */
- }
+ int jnext = j+1;
+
+ if (lmincol<=rccolc[j] && rccolc[jnext]<=lmaxcol) {
+ /* square is inside circle */
+ int lc, rc;
+ path zzsq;
+
+ lc = rccolr[j];
+ rc = rccoll[jnext];
+ zzsq = tvrect(lc, tr, rc, br, xd,yd,Nv);
+ fill(zzsq, p=pblack); /* draw black squares */
+ }
} /* for col j */
} /* for row i */
}
-
+
/* center cross: vertical and horizontal centerline */
maxoff = floor(rcoff[divsy]); /* XXX rcoff is relative to ccenter */
mincol = Nhc-maxoff;
@@ -327,24 +327,24 @@ void centerline(int colortv,
int i;
for (i=0; i<=cmaxi; ++i) {
int coll, colr;
-
+
coll=rccoll[i];
colr=rccolr[i];
if (mincol<=coll && colr<=maxcol) {
- path zzv;
- zzv=tvrect(coll, tr, colr, br, xd,yd,Nv);
- fill(zzv, p=pwhite);
+ path zzv;
+ zzv=tvrect(coll, tr, colr, br, xd,yd,Nv);
+ fill(zzv, p=pwhite);
}
}
}
return;
}
-
+
/************************ topbw **************************************/
-void topbw(int[] coff, int Nhc, int os, int urow, int trow, int brow,
- pair ccenter, pair rclt, pair rclb, pair rcrt, pair rcrb,
- pen pdef, real xd, real yd, int Nv) {
+void topbw(int[] coff, int Nhc, int os, int urow, int trow, int brow,
+ pair ccenter, pair rclt, pair rclb, pair rcrt, pair rcrb,
+ pen pdef, real xd, real yd, int Nv) {
pen pblack=pdef+gray(0.0), pwhite=pdef+gray(1.0);
pair[] ze;
path zext, zref, zint;
@@ -371,7 +371,7 @@ void topbw(int[] coff, int Nhc, int os, int urow, int trow, int brow,
--ze[3]--ze[4]--ze[5]--ze[6]--ze[7]--ze[8]--ze[9]--cycle;
off=ceil((coff[1]+coff[2])/2);
- zint=tvrect(Nhc-off,urow, Nhc+off,trow, xd,yd,Nv);
+ zint=tvrect(Nhc-off,urow, Nhc+off,trow, xd,yd,Nv);
/* paths are completely resolved; no free endpoint conditions */
fill(zext^^reverse(zint), p=pwhite);
@@ -384,7 +384,7 @@ void topbw(int[] coff, int Nhc, int os, int urow, int trow, int brow,
}
/************************ testtone **************************************/
-/* x on circle -> return y>=0
+/* x on circle -> return y>=0
* in:
* x x-coordinate relative to origin
* crad circle radius in y units, true size=crad*yd
@@ -418,9 +418,9 @@ real testcircy(real y, real crad, real xd, real yd) {
}
/* brow>trow && xb>xt */
-void testtone(real Tt, int trow, int brow,
- real ccol, real crow, real crad,
- pen pdef, real xd, real yd, int Nv) {
+void testtone(real Tt, int trow, int brow,
+ real ccol, real crow, real crad,
+ pen pdef, real xd, real yd, int Nv) {
int blocks, i;
real yt, xt, yb, xb, Ttt=Tt/2;
pair ccenter;
@@ -488,7 +488,7 @@ void testtone(real Tt, int trow, int brow,
z[2]=tvps(ccol+tl,brow, xd,yd,Nv);
z[3]=tvps(ccol+tr,brow, xd,yd,Nv);
zz=z[0]--z[1]--z[2]--z[3]--cycle;
- }
+ }
if (tl<tr) {
if (i%2 == 0) {
@@ -502,9 +502,9 @@ void testtone(real Tt, int trow, int brow,
}
/************************ color bars *************************************/
-void colorbars(int[] coff, int Nhc, int trow, int crow, int brow,
- pair ccenter, pair rclt, pair rclb, pair rcrt, pair rcrb,
- pen pdef, real xd, real yd, int Nv) {
+void colorbars(int[] coff, int Nhc, int trow, int crow, int brow,
+ pair ccenter, pair rclt, pair rclb, pair rcrt, pair rcrb,
+ pen pdef, real xd, real yd, int Nv) {
real cI=0.75;
real[] cR={ cI, 0, 0, cI, cI, 0 };
real[] cG={ cI, cI, cI, 0, 0, 0 };
@@ -517,11 +517,11 @@ void colorbars(int[] coff, int Nhc, int trow, int crow, int brow,
int off;
int ii=2*i, il=cmax-i, ir=i+cmax+1;
path zzl, zzr;
-
+
off=ceil((coff[1+ii]+coff[2+ii])/2);
if (i!=0 && i<cmax) {
- zzr=tvrect(Nhc+poff,trow, Nhc+off,brow, xd,yd,Nv);
- zzl=tvrect(Nhc-off,trow, Nhc-poff,brow, xd,yd,Nv);
+ zzr=tvrect(Nhc+poff,trow, Nhc+off,brow, xd,yd,Nv);
+ zzl=tvrect(Nhc-off,trow, Nhc-poff,brow, xd,yd,Nv);
} else {
if(i==0) {
int col, pcol;
@@ -586,7 +586,7 @@ real addphase(real theta, real freq, real step) {
int coverflow;
cycles=freq*step;
- coverflow=floor(abs(cycles));
+ coverflow=floor(abs(cycles));
if (coverflow>1) {
thetaret=0;
} else {
@@ -595,10 +595,10 @@ real addphase(real theta, real freq, real step) {
cycles-=coverflow*sgn(cycles);
thetaret=theta+cycles*dpi; /* cycles=(-1 .. 1) */
- if (thetaret>pi) {
- thetaret-=dpi;
- } else if (thetaret<-pi) {
- thetaret-=dpi;
+ if (thetaret>pi) {
+ thetaret-=dpi;
+ } else if (thetaret<-pi) {
+ thetaret-=dpi;
}
}
@@ -606,9 +606,9 @@ real addphase(real theta, real freq, real step) {
return thetaret;
}
-void testfreqs(real[] ftones, int[] coff, int Nhc, int trow,int crow,int brow,
- pair ccenter, pair rclt, pair rclb, pair rcrt, pair rcrb,
- pen pdef, real xd, real yd, int Nv) {
+void testfreqs(real[] ftones, int[] coff, int Nhc, int trow,int crow,int brow,
+ pair ccenter, pair rclt, pair rclb, pair rcrt, pair rcrb,
+ pen pdef, real xd, real yd, int Nv) {
int[] divc;
real[] divfl, divfr;
int i, divs, coffmax, off, divnext;
@@ -649,7 +649,7 @@ void testfreqs(real[] ftones, int[] coff, int Nhc, int trow,int crow,int brow,
tr=trow;
}
- if (off == divc[divnext]) {
+ if (off == divc[divnext]) {
/* switch frequency: cycles=0.5*fcur+0.5*fnext */
thl=addphase(thl, fl, -0.5);
thr=addphase(thr, fr, 0.5);
@@ -672,10 +672,10 @@ void testfreqs(real[] ftones, int[] coff, int Nhc, int trow,int crow,int brow,
//write(off, thr, ampr);
col=Nhc-off-1;
- zz=tvrect(col,tr, col+1,brow, xd,yd,Nv);
+ zz=tvrect(col,tr, col+1,brow, xd,yd,Nv);
fill(zz, p=pdef+gray(ampl));
col=Nhc+off;
- zz=tvrect(col,tr, col+1,brow, xd,yd,Nv);
+ zz=tvrect(col,tr, col+1,brow, xd,yd,Nv);
fill(zz, p=pdef+gray(ampr));
}
@@ -690,9 +690,9 @@ void testfreqs(real[] ftones, int[] coff, int Nhc, int trow,int crow,int brow,
}
/************************ gray bars **************************************/
-void graybars(int[] coff, int Nhc, int trow, int brow,
- pair ccenter, pair rclt, pair rclb, pair rcrt, pair rcrb,
- pen pdef, real xd, real yd, int Nv) {
+void graybars(int[] coff, int Nhc, int trow, int brow,
+ pair ccenter, pair rclt, pair rclb, pair rcrt, pair rcrb,
+ pen pdef, real xd, real yd, int Nv) {
int[] gs={0, 20, 40, 60, 80, 100};
int cmax=2, poff, i;
@@ -701,11 +701,11 @@ void graybars(int[] coff, int Nhc, int trow, int brow,
int off;
int ii=2*i, il=cmax-i, ir=i+cmax+1;
path zzl, zzr;
-
+
off=ceil((coff[1+ii]+coff[2+ii])/2);
if (i<cmax) {
- zzl=tvrect(Nhc-off,trow, Nhc-poff,brow, xd,yd,Nv);
- zzr=tvrect(Nhc+poff,trow, Nhc+off,brow, xd,yd,Nv);
+ zzl=tvrect(Nhc-off,trow, Nhc-poff,brow, xd,yd,Nv);
+ zzr=tvrect(Nhc+poff,trow, Nhc+off,brow, xd,yd,Nv);
} else {
int pcol;
pair zlt, zlb, zrt, zrb;
@@ -729,15 +729,15 @@ void graybars(int[] coff, int Nhc, int trow, int brow,
}
/************************ bottom bw **************************************/
-void bottombw(int off, int Nhc, int trow, int brow,
- pair ccenter, pair rclt, pair rclb, pair rcrt, pair rcrb,
- pen pdef, real xd, real yd, int Nv) {
+void bottombw(int off, int Nhc, int trow, int brow,
+ pair ccenter, pair rclt, pair rclb, pair rcrt, pair rcrb,
+ pen pdef, real xd, real yd, int Nv) {
int rows;
pair zt, zb;
path zz;
rows=brow-trow;
- zz=tvrect(Nhc-off,trow, Nhc+off,brow, xd,yd,Nv);
+ zz=tvrect(Nhc-off,trow, Nhc+off,brow, xd,yd,Nv);
fill(zz, p=pdef+gray(0.0));
zt=tvps(Nhc-off,trow, xd,yd,Nv);
@@ -751,9 +751,9 @@ void bottombw(int off, int Nhc, int trow, int brow,
}
/************************ bottom circle **************************************/
-void bottomcirc(int off, int Nhc, int trow, real cx, real cy, real crad,
- pair ccenter, pair rclt, pair rcrt,
- pen pdef, real xd, real yd, int Nv) {
+void bottomcirc(int off, int Nhc, int trow, real cx, real cy, real crad,
+ pair ccenter, pair rclt, pair rcrt,
+ pen pdef, real xd, real yd, int Nv) {
real cI=0.75;
real xl, yl, xr, yr, phil, phir;
pair ccleft, ccright;
@@ -767,7 +767,7 @@ void bottomcirc(int off, int Nhc, int trow, real cx, real cy, real crad,
xr=Nhc+off-cx;
phir=acos(xr*xd/yd/crad);
- yr=crad*sin(phir);
+ yr=crad*sin(phir);
ccright=tvps(cx+xr,cy+yr, xd,yd,Nv);
//dot(ccright); dot(ccleft);
@@ -793,7 +793,7 @@ void bottomcirc(int off, int Nhc, int trow, real cx, real cy, real crad,
/****************************** PAL ears ***********************************/
/* values pro mille
- * left y R G B
+ * left y R G B
* 550 306 674 550
* 500 363 500 859
* 500 637 500 141
@@ -804,12 +804,12 @@ void bottomcirc(int off, int Nhc, int trow, real cx, real cy, real crad,
*
* in: dright= -1 left ear, +1 right ear
*/
-void palears(int[] coff, int[] coffa, int[] coffb, int Nhc,
- int[] rcrowt, int[] rcrowb, int Nvc, int divsy, int dright,
- pen pdef, real xd, real yd, int Nv) {
- /* the amplitude of (u,v) as seen on a vectorscope,
+void palears(int[] coff, int[] coffa, int[] coffb, int Nhc,
+ int[] rcrowt, int[] rcrowb, int Nvc, int divsy, int dright,
+ pen pdef, real xd, real yd, int Nv) {
+ /* the amplitude of (u,v) as seen on a vectorscope,
* max 0.296 Vn for 100% saturation in W and V ears.
- * cvbs: 0.7*( y +/- |u+jv| ) = -0.24 .. 0.93 V
+ * cvbs: 0.7*( y +/- |u+jv| ) = -0.24 .. 0.93 V
* maxima: ebu 75/0 bars 0.70, bbc 100/25 0.88, 100/0 bars 0.93
* burst: 0.150 Vcvbs, 21.4 IRE or 0.214 V normalized.
* luma: modulated for monochrome compatibility, 1990 version.
@@ -890,10 +890,10 @@ void palears(int[] coff, int[] coffa, int[] coffb, int Nhc,
ph= (u!=0 || v!=0) ? atan2(v,u) : 0.0;
if (v>=0) {
if (ph<0)
- ph=ph+pi;
+ ph=ph+pi;
} else {
if (ph>0)
- ph=ph-pi;
+ ph=ph-pi;
}
if (A>0) {
u=u/A*cI;
@@ -918,14 +918,14 @@ void palears(int[] coff, int[] coffa, int[] coffb, int Nhc,
/****************************** NTSC bars ***********************************/
/* amplitude equals color burst smpte (pm: -V +U)
- * y campl sat R G B
+ * y campl sat R G B
* left 0.5 0.21 70% -I?
* right 0.5 0.17 60% +Q?
*/
-void ntscbars(int[] rccoll, int[] rccolr, int divsx,
- int[] rcrowt, int[] rcrowb, int divsy, int dright,
- pen pdef, real xd, real yd, int Nv) {
- /* The amplitude of (i,q) as seen on a vectorscope,
+void ntscbars(int[] rccoll, int[] rccolr, int divsx,
+ int[] rcrowt, int[] rcrowb, int divsy, int dright,
+ pen pdef, real xd, real yd, int Nv) {
+ /* The amplitude of (i,q) as seen on a vectorscope,
* max 0.292 Vn for 100% saturation in I==0 ears.
* burst: 0.143 Vcvbs, 20 IRE or 0.200 V normalized.
* pedestal: (yp,up,vp)=(p,0,0)+(1-p)*(y,u,v), p=0.075.
@@ -943,7 +943,7 @@ void ntscbars(int[] rccoll, int[] rccolr, int divsx,
real[] cil={ 0, 0, 0, -1, 1 };
real[] cql={ -1, 1, 0, 0, 0 };
int[] indl={ -7, -8, 0, 8, 7 };
-
+
real cy, ci, cq;
int rmaxi, dri, ind, ibase, lcol, rcol, i;
@@ -979,17 +979,17 @@ void ntscbars(int[] rccoll, int[] rccolr, int divsx,
B=By+cy;
if (verbose > 1)
write(ind, cy*1000, round(ci*1000), round(cq*1000),
- round(R*1000), round(G*1000), round(B*1000));
+ round(R*1000), round(G*1000), round(B*1000));
for (i=0; i<rmaxi; ++i) {
path zz;
int brow, trow, inext=i+1;
-
+
if (i>0) {
trow=rcrowb[i];
} else {
trow=floor((rcrowb[i]+rcrowt[inext])/2);
- }
+ }
if (inext<rmaxi) {
brow=rcrowt[inext];
@@ -1000,7 +1000,7 @@ void ntscbars(int[] rccoll, int[] rccolr, int divsx,
zz=tvrect(lcol,trow, rcol,brow, xd,yd,Nv);
fill(zz, p=pdef+rgb(R,G,B));
}
-
+
return;
}
@@ -1019,21 +1019,21 @@ int bsys=2, colortv=1, os=1;
* 0 4/3 704 guaranteed analog broadcast itu-r bt.470
* 1 4/3 720 new broadcast, most TV station logos and animations
* 2 15/11 720 total aperture analog 4/3, 1.37 film DVDs
- * 3 20/11 720 total aperture analog 16/9, 1.85 film DVDs
- * 4 4/3 768 bsys=0, square dot analog broadcast
+ * 3 20/11 720 total aperture analog 16/9, 1.85 film DVDs
+ * 4 4/3 768 bsys=0, square dot analog broadcast
* 5 4/3 768 bsys=1, square dot cable TV info channel
- * 6 131/96 786 bsys=2, total square dot broadcast camera
+ * 6 131/96 786 bsys=2, total square dot broadcast camera
* 7 16/9 720 new broadcast 16/9, SD from HD-1440 or itu-r bt.709
* 8 4/3 704 525 analog broadcast itu-r bt.470 711x485
* 9 4/3 720 525 new broadcast
* 10 15/11 720 525 total aperture analog broadcast
* 11 16/9 1920 1250, 1080 square dot at 12.5 frames/second
* 12 4/3 1600 1250, 1200 square dot at 12.5 frames/second
- *
+ *
* colortv:
* 0 monochrome crosshatch,
* 1 pal ears,
- * 2 ntsc bars,
+ * 2 ntsc bars,
* 3 neither ears nor bars.
*
* os: horizontal oversampling, typical values for 13.5MHz:
@@ -1068,9 +1068,9 @@ int[] bNsh=
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
/* active lines for a 625 line frame
- * The number of active video lines decreased around 1997.
+ * The number of active video lines decreased around 1997.
* old: 3 run in + 575 visible + 3 run out = 581 lines
- * new: 6 teletext and WSS + 575 visible
+ * new: 6 teletext and WSS + 575 visible
* Hence the image center shifted down by 3 lines. Thus
* old TV + new testcard = bottom is cut off,
* new TV + old testcard = top is cut off.
@@ -1083,7 +1083,7 @@ int[] bNsh=
* Nv=576 lines
* rd=ri*Nv/Nh=4/3*9/11=12/11
*
- * Nv: 480=2^5*3*5 576=2^6*3^2
+ * Nv: 480=2^5*3*5 576=2^6*3^2
* Nh: 704=2^6*11 720=2^4*3^2*5
*
* horizontal line distance for pre 1997 test pattern
@@ -1096,7 +1096,7 @@ int[] bNsh=
* x line width 230 ns -> 3 dots
* bottom 2.9us red -> 39.15 dots
*
- * resolution DPI from image aspect ratio
+ * resolution DPI from image aspect ratio
* Rv=Nv/ly, ly=4in
* ri=Ni/Di, Ni={ 4, 15, 16} Di={ 3, 11, 9}
* lx=ri*ly
@@ -1107,7 +1107,7 @@ int[] bNsh=
* Ni=15 ri=15/Di => Nh=k*60
* Ni=16 ri=16/Di => Nh=k*64
*
- * resolution DPI from dot aspect ratio, general algorithm,
+ * resolution DPI from dot aspect ratio, general algorithm,
*
* rd=Nd/Dd=ldx/ldy
*
@@ -1119,7 +1119,7 @@ int[] bNsh=
*
* ldx=1/(m*Dd), ldy=1/(m*Nd), Rh=m*Dd, Rv=m*Nd
*
- * and
+ * and
*
* lx=Nh*ldx=Nh/(m*Dd), ly=Nv*ldy=Nv/(m*Nd)
*
@@ -1154,8 +1154,8 @@ if (verbose > 1) {
//size(xsize, ysize, Aspect); // should not have any effect
Nsy=bNsy[bsys]; // grating size in lines 42,43 or 34,35
-Nshift=bNsh[bsys]; // shift image up: pre 1997 =3, 2007 =0
-fs=1e6*bfs[bsys]*os;
+Nshift=bNsh[bsys]; // shift image up: pre 1997 =3, 2007 =0
+fs=1e6*bfs[bsys]*os;
Na=0; // add 1,0,-1 to height of hor center squares for even Na+Nsy
Ttone=fs/250e3; // period of ft=250 kHz, fs/ft=54
@@ -1185,8 +1185,8 @@ if (verbose > 1) {
}
rmaxi=2*divsy+1;
-/* Nsyc: center square height
- * line pairing test: verify distance of center to top and bot
+/* Nsyc: center square height
+ * line pairing test: verify distance of center to top and bot
* distance is odd ==> top=even/odd, cent=odd/even, bot=even/odd
*
* Nsyc odd: not possible
@@ -1215,7 +1215,7 @@ if (Nsyc%2 != 0) {
} else if (Nsyc%4 == 0) {
Nyst=1; /* stagger */
}
-for (i=0; i<=divsy; ++i) {
+for (i=0; i<=divsy; ++i) {
int iu, id, ou, od, ru, rd;
iu=divsy-i;
@@ -1228,7 +1228,7 @@ for (i=0; i<=divsy; ++i) {
}
rcrowc[iu]=Nvc-ou;
rcrowc[id]=Nvc-od;
-
+
ru=Nvc-(ou+Nyst);
rd=Nvc-(od+Nyst);
@@ -1253,7 +1253,7 @@ int divsx, Nhc, Nl, Nr, cmaxi;
lsq=Nsy*yd;
Nsx=lsq/xd; /* floating point */
-divsx=floor(((Nh-10*os)/Nsx-1)/2);
+divsx=floor(((Nh-10*os)/Nsx-1)/2);
Nhc=round(Nh/2);
rdistx=(1+2*divsx)*Nsx;
Nl=Nhc-round(rdistx/2);
@@ -1264,10 +1264,10 @@ cmaxi=2*divsx+1;
int[] coff, coffl, coffr;
int[] rccoll, rccolc, rccolr;
-for (i=0; i<=divsx; ++i) {
+for (i=0; i<=divsx; ++i) {
int off, offl, offr, il, ir;
real cdist;
-
+
cdist=Nsx*(1+2*i); /* horizontal distance 2 symmetrical vert lines */
off=round(cdist/2);
// write(cdist, off);
@@ -1277,7 +1277,7 @@ for (i=0; i<=divsx; ++i) {
coff[i]=off;
coffl[i]=offl;
coffr[i]=offr;
-
+
if (verbose > 1) {
write(cdist, off);
}
@@ -1290,7 +1290,7 @@ for (i=0; i<=divsx; ++i) {
rccoll[ir]=Nhc+offl;
rccolc[ir]=Nhc+off;
- rccolr[ir]=Nhc+offr;
+ rccolr[ir]=Nhc+offr;
}
Nl=rccolc[0];
Nr=Nh-rccolc[cmaxi];
@@ -1299,9 +1299,9 @@ if (verbose > 1) {
}
/**** draw gray background ****/
-{
+{
path zz;
-
+
//zz=tvrect(0,0, Nh,Nv, xd,yd,Nv);
/* keep white canvas for castellations */
zz=tvrect(rccoll[0],rcrowt[0], rccolr[cmaxi],rcrowb[rmaxi], xd,yd,Nv);
@@ -1355,16 +1355,16 @@ for (i=0; i<=rmaxi; ++i) {
/**** draw 2*divsx+2 vertical gridlines ****/
for (i=0; i<=cmaxi; ++i) {
path zzv;
- zzv=tvrect(rccoll[i],0, rccolr[i],Nv, xd,yd,Nv);
- fill(zzv, p=pwhite);
+ zzv=tvrect(rccoll[i],0, rccolr[i],Nv, xd,yd,Nv);
+ fill(zzv, p=pwhite);
}
/**** castellations ****/
castelhor(colortv, rccoll, rccolr, cmaxi, Nh, rcrowt[0], rcrowb[rmaxi],
- pdefault, xd, yd, Nv);
+ pdefault, xd, yd, Nv);
castelver(colortv, rccoll[0], rccolr[cmaxi], Nh, rcrowb, rcrowt, rmaxi,
- pdefault, xd, yd, Nv);
+ pdefault, xd, yd, Nv);
/****** markers for 4/3 aspect ratio ******/
if (rimage>4/3) {
@@ -1373,59 +1373,59 @@ if (rimage>4/3) {
/****** line pairing center ******/
centerline(colortv, rccoll, rccolc, rccolr, divsx, Nhc, os,
- rcrowt, rcrowc, rcrowb, divsy, Nvc,
- ccenter, rcoff, rcright, rcleft, pdefault, xd, yd, Nv);
+ rcrowt, rcrowc, rcrowb, divsy, Nvc,
+ ccenter, rcoff, rcright, rcleft, pdefault, xd, yd, Nv);
if (colortv>0) {
/* topbw structure */
- topbw(coff, Nhc, os, rcrowc[divsy-5], rcrowc[divsy-4], rcrowc[divsy-3],
- ccenter, rcleft[divsy-4], rcleft[divsy-3], rcright[divsy-4],
- rcright[divsy-3], pdefault, xd, yd, Nv);
+ topbw(coff, Nhc, os, rcrowc[divsy-5], rcrowc[divsy-4], rcrowc[divsy-3],
+ ccenter, rcleft[divsy-4], rcleft[divsy-3], rcright[divsy-4],
+ rcright[divsy-3], pdefault, xd, yd, Nv);
/* 250 kHz */
- testtone(Ttone, rcrowc[divsy-3], rcrowc[divsy-2],
+ testtone(Ttone, rcrowc[divsy-3], rcrowc[divsy-2],
cx, cy, crad, pdefault, xd, yd, Nv);
- /* color bars */
- colorbars(coff, Nhc, rcrowc[divsy-2], rcrowc[divsy-1], rcrowc[divsy],
- ccenter, rcleft[divsy-2], rcleft[divsy], rcright[divsy-2],
- rcright[divsy], pdefault, xd, yd, Nv);
+ /* color bars */
+ colorbars(coff, Nhc, rcrowc[divsy-2], rcrowc[divsy-1], rcrowc[divsy],
+ ccenter, rcleft[divsy-2], rcleft[divsy], rcright[divsy-2],
+ rcright[divsy], pdefault, xd, yd, Nv);
/* test frequencies */
testfreqs(ftones, coff, Nhc, rcrowc[divsy+1], rcrowc[divsy+2],
- rcrowc[divsy+3], ccenter, rcleft[divsy+1], rcleft[divsy+3],
- rcright[divsy+1],rcright[divsy+3], pdefault, xd, yd, Nv);
+ rcrowc[divsy+3], ccenter, rcleft[divsy+1], rcleft[divsy+3],
+ rcright[divsy+1],rcright[divsy+3], pdefault, xd, yd, Nv);
/* gray bars */
graybars(coff, Nhc, rcrowc[divsy+3], rcrowc[divsy+4], ccenter,
- rcleft[divsy+3], rcleft[divsy+4],
- rcright[divsy+3], rcright[divsy+4], pdefault, xd,yd,Nv);
+ rcleft[divsy+3], rcleft[divsy+4],
+ rcright[divsy+3], rcright[divsy+4], pdefault, xd,yd,Nv);
/* PAL ears */
if (colortv == 1) {
- palears(coff,coffr,coffl, Nhc, rcrowt, rcrowb, Nvc, divsy, -1,
+ palears(coff,coffr,coffl, Nhc, rcrowt, rcrowb, Nvc, divsy, -1,
pdefault, xd, yd, Nv);
- palears(coff,coffr,coffl, Nhc, rcrowt, rcrowb, Nvc, divsy, 1,
+ palears(coff,coffr,coffl, Nhc, rcrowt, rcrowb, Nvc, divsy, 1,
pdefault, xd, yd, Nv);
} else if (colortv == 2) {
- ntscbars(rccoll, rccolr, divsx, rcrowt, rcrowb, divsy, -1,
+ ntscbars(rccoll, rccolr, divsx, rcrowt, rcrowb, divsy, -1,
pdefault, xd, yd, Nv);
- ntscbars(rccoll, rccolr, divsx, rcrowt, rcrowb, divsy, 1,
+ ntscbars(rccoll, rccolr, divsx, rcrowt, rcrowb, divsy, 1,
pdefault, xd, yd, Nv);
- ntscbars(rccoll, rccolr, divsx, rcrowt, rcrowb, divsy, -2,
+ ntscbars(rccoll, rccolr, divsx, rcrowt, rcrowb, divsy, -2,
pdefault, xd, yd, Nv);
- ntscbars(rccoll, rccolr, divsx, rcrowt, rcrowb, divsy, 2,
+ ntscbars(rccoll, rccolr, divsx, rcrowt, rcrowb, divsy, 2,
pdefault, xd, yd, Nv);
}
/* bottom wh - black - wh */
- bottombw(round((coff[2]+coff[3])/2), Nhc, rcrowc[divsy+4], rcrowc[divsy+5],
- ccenter, rcleft[divsy+4], rcleft[divsy+5],
- rcright[divsy+4], rcright[divsy+5], pdefault, xd, yd, Nv);
+ bottombw(round((coff[2]+coff[3])/2), Nhc, rcrowc[divsy+4], rcrowc[divsy+5],
+ ccenter, rcleft[divsy+4], rcleft[divsy+5],
+ rcright[divsy+4], rcright[divsy+5], pdefault, xd, yd, Nv);
/* bottom yellow red circle */
- bottomcirc(coff[0], Nhc, rcrowc[divsy+5], cx, cy, crad,
- ccenter, rcleft[divsy+5], rcright[divsy+5], pdefault, xd, yd, Nv);
+ bottomcirc(coff[0], Nhc, rcrowc[divsy+5], cx, cy, crad,
+ ccenter, rcleft[divsy+5], rcright[divsy+5], pdefault, xd, yd, Nv);
}
/********************** set id *********************/
@@ -1466,10 +1466,10 @@ if (colortv>0) {
colNsy = round((rccolc[divsx+5]+rccolc[divsx+6])/2);
Npos = tvps(colNsy,rowNsy, xd,yd,Nv);
iNsy = format("%i", Nsy);
-
- if (colortv>0) {
+
+ if (colortv>0) {
pbw=pdefault+gray(1.0);
- } else {
+ } else {
pbw=pdefault+gray(0.0);
}
label(ires, rpos, p=pbw);
diff --git a/Build/source/utils/asymptote/examples/twistedtubes.asy b/Build/source/utils/asymptote/examples/twistedtubes.asy
index 9121ad6444d..ee25cd0bd3a 100644
--- a/Build/source/utils/asymptote/examples/twistedtubes.asy
+++ b/Build/source/utils/asymptote/examples/twistedtubes.asy
@@ -1,30 +1,30 @@
-import graph3;
-import palette;
-
-size(300,300,keepAspect=true);
-
+import graph3;
+import palette;
+
+size(300,300,keepAspect=true);
+
real w=0.4;
-real f(triple t) {return sin(t.x);}
+real f(triple t) {return sin(t.x);}
triple f1(pair t) {return (cos(t.x)-2cos(w*t.y),sin(t.x)-2sin(w*t.y),t.y);}
triple f2(pair t) {return (cos(t.x)+2cos(w*t.y),sin(t.x)+2sin(w*t.y),t.y);}
triple f3(pair t) {return (cos(t.x)+2sin(w*t.y),sin(t.x)-2cos(w*t.y),t.y);}
triple f4(pair t) {return (cos(t.x)-2sin(w*t.y),sin(t.x)+2cos(w*t.y),t.y);}
-surface s1=surface(f1,(0,0),(2pi,10),8,8,Spline);
-surface s2=surface(f2,(0,0),(2pi,10),8,8,Spline);
-surface s3=surface(f3,(0,0),(2pi,10),8,8,Spline);
-surface s4=surface(f4,(0,0),(2pi,10),8,8,Spline);
+surface s1=surface(f1,(0,0),(2pi,10),8,8,Spline);
+surface s2=surface(f2,(0,0),(2pi,10),8,8,Spline);
+surface s3=surface(f3,(0,0),(2pi,10),8,8,Spline);
+surface s4=surface(f4,(0,0),(2pi,10),8,8,Spline);
pen[] Rainbow=Rainbow();
-s1.colors(palette(s1.map(f),Rainbow));
-s2.colors(palette(s2.map(f),Rainbow));
-s3.colors(palette(s3.map(f),Rainbow));
-s4.colors(palette(s4.map(f),Rainbow));
+s1.colors(palette(s1.map(f),Rainbow));
+s2.colors(palette(s2.map(f),Rainbow));
+s3.colors(palette(s3.map(f),Rainbow));
+s4.colors(palette(s4.map(f),Rainbow));
defaultrender.merge=true;
-draw(s1);
+draw(s1);
draw(s2);
draw(s3);
draw(s4);
diff --git a/Build/source/utils/asymptote/examples/unitoctant.asy b/Build/source/utils/asymptote/examples/unitoctant.asy
index e84fdd537c3..967f1a6123d 100644
--- a/Build/source/utils/asymptote/examples/unitoctant.asy
+++ b/Build/source/utils/asymptote/examples/unitoctant.asy
@@ -1,35 +1,24 @@
import graph3;
-currentprojection=orthographic(5,4,2);
+currentprojection=orthographic(5,5,8);
size(0,150);
-patch s=octant1x;
-draw(surface(s),green+opacity(0.5));
-draw(s.external(),blue);
+patch s0=octant1.s[0];
+patch s1=octant1.s[1];
+draw(surface(s0),green+opacity(0.5));
+draw(surface(s1),green+opacity(0.5));
+draw(s0.external(),blue);
+draw(s1.external(),blue);
-triple[][] P=s.P;
+triple[][] P0=s0.P;
+triple[][] P1=s1.P;
for(int i=0; i < 4; ++i)
- dot(P[i],red);
+ dot(P0[i],red+0.75mm);
+
+for(int i=0; i < 4; ++i)
+ dot(P1[i],red+0.65mm);
axes3("$x$","$y$",Label("$z$",align=Z));
-triple P00=P[0][0];
-triple P10=P[1][0];
-triple P01=P[0][1];
-triple P02=P[0][2];
-triple P11=P[1][1];
-triple P12=P[1][2];
-triple Q11=XYplane(xypart(P11));
-triple Q12=XYplane(xypart(P12));
-
-draw(P11--Q11,dashed);
-draw(P12--Q12,dashed);
-draw(O--Q12--Q11--(Q11.x,0,0));
-draw(Q12--(Q12.x,0,0));
-
-label("$(1,0,0)$",P00,-2Y);
-label("$(1,a,0)$",P10,-Z);
-label("$(1,0,a)$",P01,-2Y);
-label("$(a,0,1)$",P02,Z+X-Y);
-label("$(1,a,a)$",P11,3X);
-label("$(a,a^2,1)$",P12,7X+Y);
+
+
diff --git a/Build/source/utils/asymptote/examples/unitoctantx.asy b/Build/source/utils/asymptote/examples/unitoctantx.asy
new file mode 100644
index 00000000000..e84fdd537c3
--- /dev/null
+++ b/Build/source/utils/asymptote/examples/unitoctantx.asy
@@ -0,0 +1,35 @@
+import graph3;
+
+currentprojection=orthographic(5,4,2);
+
+size(0,150);
+patch s=octant1x;
+draw(surface(s),green+opacity(0.5));
+draw(s.external(),blue);
+
+triple[][] P=s.P;
+
+for(int i=0; i < 4; ++i)
+ dot(P[i],red);
+
+axes3("$x$","$y$",Label("$z$",align=Z));
+triple P00=P[0][0];
+triple P10=P[1][0];
+triple P01=P[0][1];
+triple P02=P[0][2];
+triple P11=P[1][1];
+triple P12=P[1][2];
+triple Q11=XYplane(xypart(P11));
+triple Q12=XYplane(xypart(P12));
+
+draw(P11--Q11,dashed);
+draw(P12--Q12,dashed);
+draw(O--Q12--Q11--(Q11.x,0,0));
+draw(Q12--(Q12.x,0,0));
+
+label("$(1,0,0)$",P00,-2Y);
+label("$(1,a,0)$",P10,-Z);
+label("$(1,0,a)$",P01,-2Y);
+label("$(a,0,1)$",P02,Z+X-Y);
+label("$(1,a,a)$",P11,3X);
+label("$(a,a^2,1)$",P12,7X+Y);
diff --git a/Build/source/utils/asymptote/examples/vertexshading.asy b/Build/source/utils/asymptote/examples/vertexshading.asy
index 4a35e09559b..00baab085e6 100644
--- a/Build/source/utils/asymptote/examples/vertexshading.asy
+++ b/Build/source/utils/asymptote/examples/vertexshading.asy
@@ -14,7 +14,7 @@ draw(surface(shift(Z)*unitsquare3,
new pen[] {red,green+opacity(0.5),blue,black}),
prc() ? nolight : currentlight);
draw(surface(shift(X)*((0,0,0)..controls (1,0,0) and (2,0,0)..(3,0,0)..
- controls (2.5,sqrt(3)/2,0) and (2,sqrt(3),0)..
- (1.5,3*sqrt(3)/2,0)..
- controls (1,sqrt(3),0) and (0.5,sqrt(3)/2,0)..cycle),
+ controls (2.5,sqrt(3)/2,0) and (2,sqrt(3),0)..
+ (1.5,3*sqrt(3)/2,0)..
+ controls (1,sqrt(3),0) and (0.5,sqrt(3)/2,0)..cycle),
new triple[] {(1.5,sqrt(3)/2,2)},new pen[] {red,green,blue}));
diff --git a/Build/source/utils/asymptote/examples/worldmap.asy b/Build/source/utils/asymptote/examples/worldmap.asy
index 23a80c69be6..4d03587b31e 100644
--- a/Build/source/utils/asymptote/examples/worldmap.asy
+++ b/Build/source/utils/asymptote/examples/worldmap.asy
@@ -3,7 +3,7 @@ size(20cm);
// The required data file is available here:
// http://www.uni-graz.at/~schwaige/asymptote/worldmap.dat
// This data was originally obtained from
-// http://www.ngdc.noaa.gov/mgg_coastline/mapit.jsp
+// http://www.ngdc.noaa.gov/mgg_coastline/mapit.jsp
real findtheta(real phi, real epsilon=realEpsilon) {
// Determine for given phi the unique solution -pi/2 <= theta <= pi/2 off
@@ -23,12 +23,12 @@ real findtheta(real phi, real epsilon=realEpsilon) {
pair mollweide(real lambda, real phi, real lambda0=0){
// calculate the Mollweide projection centered at lambda0 for the point
- // with coordinates(phi,lambda)
+ // with coordinates(phi,lambda)
static real c1=2*sqrt(2)/pi;
static real c2=sqrt(2);
real theta=findtheta(phi);
return(c1*(lambda-lambda0)*cos(theta), c2*sin(theta));
-}
+}
guide gfrompairs(pair[] data){
guide gtmp;
@@ -54,7 +54,7 @@ while(true) {
if(spstr[0] == "#") {++cnt; arrarrpair[cnt]=new pair[] ; newseg=true;}
if(spstr[0] != "#" && newseg) {
string[] spstr1=split(str,'\t'); // separator is TAB not SPACE
- pair tmp=((real) spstr1[1],(real) spstr1[0]);
+ pair tmp=((real) spstr1[1],(real) spstr1[0]);
arrarrpair[cnt].push(tmp);
}
}
@@ -78,7 +78,7 @@ pair[] constlat(real phi, int np=100) {
for(int j=1; j <= 5; ++j) draw(gfrompairs(constlong(-180+j/6*360)),white);
draw(gfrompairs(constlong(-180)),1.5bp+white);
draw(gfrompairs(constlong(180)),1.5bp+white);
-for(int j=0; j <= 12; ++j) draw(gfrompairs(constlat(-90+j/6*180)),white);
+for(int j=0; j <= 12; ++j) draw(gfrompairs(constlat(-90+j/6*180)),white);
//draw(gfrompairs(constlong(10)),dotted);
close(in);
diff --git a/Build/source/utils/asymptote/examples/xstitch.asy b/Build/source/utils/asymptote/examples/xstitch.asy
index 5f332881733..b2300ee9ea4 100644
--- a/Build/source/utils/asymptote/examples/xstitch.asy
+++ b/Build/source/utils/asymptote/examples/xstitch.asy
@@ -42,22 +42,22 @@ write(histogram);
pen linepen(int i, int max) {
- real w=i == -1 || i == max+1 ? 2.0 :
- i % 10 == 0 || i == max ? 1.0 :
- i % 5 == 0 ? 0.8 :
+ real w=i == -1 || i == max+1 ? 2.0 :
+ i % 10 == 0 || i == max ? 1.0 :
+ i % 5 == 0 ? 0.8 :
0.25;
return linewidth(w);
}
pen xpen(int i) {
- return linepen(i,width)+(i == width/2 ? red :
- i == 75 || i == width-75 ? dashed :
+ return linepen(i,width)+(i == width/2 ? red :
+ i == 75 || i == width-75 ? dashed :
black);
}
pen ypen(int i) {
- return linepen(i,height)+(i == height/2 ? red :
- i == 75 || i == height-75 ? dashed :
+ return linepen(i,height)+(i == height/2 ? red :
+ i == 75 || i == height-75 ? dashed :
black);
}
diff --git a/Build/source/utils/asymptote/examples/xxsq01x-1.asy b/Build/source/utils/asymptote/examples/xxsq01x-1.asy
index 6d645a49664..eac387247ed 100644
--- a/Build/source/utils/asymptote/examples/xxsq01x-1.asy
+++ b/Build/source/utils/asymptote/examples/xxsq01x-1.asy
@@ -28,8 +28,8 @@ xaxis3(Label("$x$",1),Arrow3);
yaxis3(Label("$y$",1),Arrow3);
dot(Label("$(1,1)$"),(1,1,0));
dot(Label("$(-1,1)$"),(-1,1,0),W);
-arrow("$y=x^{2}$",F3(0.7),X,1cm,red);
-arrow("$y=x$",(0.3,0.3,0),X,1.5cm,red);
+arrow("$y=x^{2}$",F3(0.7),X,1cm,red);
+arrow("$y=x$",(0.3,0.3,0),X,1.5cm,red);
draw(circle((-1,1,0),2,Y),dashed);
draw((-1,1,0)--(1,1,0),dashed);
draw(shift(-X)*arc(0.02Y,0.3,90,0,0,0,CW),Arrow3);
diff --git a/Build/source/utils/asymptote/examples/xxsq01y.asy b/Build/source/utils/asymptote/examples/xxsq01y.asy
index 770f4fc22cf..9424a1b47dc 100644
--- a/Build/source/utils/asymptote/examples/xxsq01y.asy
+++ b/Build/source/utils/asymptote/examples/xxsq01y.asy
@@ -25,8 +25,8 @@ xaxis3(Label("$x$",1),Arrow3);
yaxis3(Label("$y$",1),ymax=1.25,dashed,Arrow3);
dot("$(1,1)$",(1,1,0),X);
-arrow("$y=x^{2}$",F3(0.7),X,0.75cm,red);
-arrow("$y=x$",(0.8,0.8,0),Y,1cm,red);
+arrow("$y=x^{2}$",F3(0.7),X,0.75cm,red);
+arrow("$y=x$",(0.8,0.8,0),Y,1cm,red);
real r=0.4;
draw((r,f(r),0)--(r,r,0),red);
diff --git a/Build/source/utils/asymptote/examples/yingyang.asy b/Build/source/utils/asymptote/examples/yingyang.asy
index 68b0d0eea74..10a08ec98d8 100644
--- a/Build/source/utils/asymptote/examples/yingyang.asy
+++ b/Build/source/utils/asymptote/examples/yingyang.asy
@@ -1,5 +1,5 @@
size(0,25cm);
-guide center=(0,1){W}..tension 0.8..(0,0){(1,-.5)}..tension 0.8..{W}(0,-1);
+guide center=(0,1){W}..tension 0.8..(0,0){(1,-.5)}..tension 0.8..{W}(0,-1);
draw((0,1)..(-1,0)..(0,-1));
filldraw(center{E}..{N}(1,0)..{W}cycle);
diff --git a/Build/source/utils/asymptote/exp.cc b/Build/source/utils/asymptote/exp.cc
index 4dacff72ec1..dbf6886ecb5 100644
--- a/Build/source/utils/asymptote/exp.cc
+++ b/Build/source/utils/asymptote/exp.cc
@@ -25,7 +25,7 @@
#include "process.h"
//void runCode(absyntax::block *code);
-
+
namespace absyntax {
using namespace types;
@@ -100,7 +100,7 @@ void exp::testCachedType(coenv &e) {
types::ty *t = getType(e);
if (!equivalent(t, ct)) {
em.compiler(getPos());
- em << "cached type '" << *ct
+ em << "cached type '" << *ct
<< "' doesn't match actual type '" << *t << "'";
em.sync();
}
@@ -305,7 +305,7 @@ types::ty *subscriptExp::getType(coenv &e)
return a ? (isAnArray(e, index) ? a : a->celltype) :
primError();
}
-
+
void subscriptExp::transWrite(coenv &e, types::ty *t, exp *value)
{
// Put array, index, and value on the stack in that order, then call
@@ -315,14 +315,14 @@ void subscriptExp::transWrite(coenv &e, types::ty *t, exp *value)
return;
if (!equivalent(a->celltype, t))
- {
- em.error(getPos());
- em << "array expression cannot be used as an address";
+ {
+ em.error(getPos());
+ em << "array expression cannot be used as an address";
- // Translate the value for errors.
- value->transToType(e, t);
- return;
- }
+ // Translate the value for errors.
+ value->transToType(e, t);
+ return;
+ }
index->transToType(e, types::primInt());
@@ -447,17 +447,17 @@ types::ty *uniqueFunction(types::ty *t) {
if (t->isOverloaded()) {
types::ty *ft = 0;
for (ty_iterator i = t->begin(); i != t->end(); ++i)
- {
- if ((*i)->kind != types::ty_function)
- continue;
+ {
+ if ((*i)->kind != types::ty_function)
+ continue;
- if (ft) {
- // Multiple function types.
- return 0;
- }
+ if (ft) {
+ // Multiple function types.
+ return 0;
+ }
- ft = *i;
- }
+ ft = *i;
+ }
return ft;
}
@@ -475,20 +475,20 @@ types::ty *uniqueFunction(types::ty *t1, types::ty *t2) {
if (t1->isOverloaded()) {
types::ty *ft = 0;
for (ty_iterator i = t1->begin(); i != t1->end(); ++i)
- {
- if ((*i)->kind != types::ty_function)
- continue;
+ {
+ if ((*i)->kind != types::ty_function)
+ continue;
- if (!equivalent(*i, t2))
- continue;
+ if (!equivalent(*i, t2))
+ continue;
- if (ft) {
- // Multiple function types.
- return 0;
- }
+ if (ft) {
+ // Multiple function types.
+ return 0;
+ }
- ft = *i;
- }
+ ft = *i;
+ }
return ft;
}
@@ -588,8 +588,8 @@ void intExp::prettyprint(ostream &out, Int indent)
types::ty *intExp::trans(coenv &e)
{
e.c.encode(inst::intpush,value);
-
- return types::primInt();
+
+ return types::primInt();
}
@@ -602,8 +602,8 @@ void realExp::prettyprint(ostream &out, Int indent)
types::ty *realExp::trans(coenv &e)
{
e.c.encode(inst::constpush,(item)value);
-
- return types::primReal();
+
+ return types::primReal();
}
void stringExp::prettyprint(ostream &out, Int indent)
@@ -615,8 +615,8 @@ void stringExp::prettyprint(ostream &out, Int indent)
types::ty *stringExp::trans(coenv &e)
{
e.c.encode(inst::constpush,(item) string(str));
-
- return types::primString();
+
+ return types::primString();
}
@@ -629,8 +629,8 @@ void booleanExp::prettyprint(ostream &out, Int indent)
types::ty *booleanExp::trans(coenv &e)
{
e.c.encode(inst::constpush,(item)value);
-
- return types::primBoolean();
+
+ return types::primBoolean();
}
void newPictureExp::prettyprint(ostream &out, Int indent)
@@ -641,8 +641,8 @@ void newPictureExp::prettyprint(ostream &out, Int indent)
types::ty *newPictureExp::trans(coenv &e)
{
e.c.encode(inst::builtin, run::newPicture);
-
- return types::primPicture();
+
+ return types::primPicture();
}
void cycleExp::prettyprint(ostream &out, Int indent)
@@ -653,8 +653,8 @@ void cycleExp::prettyprint(ostream &out, Int indent)
types::ty *cycleExp::trans(coenv &e)
{
e.c.encode(inst::builtin, run::newCycleToken);
-
- return types::primCycleToken();
+
+ return types::primCycleToken();
}
void nullPathExp::prettyprint(ostream &out, Int indent)
@@ -665,8 +665,8 @@ void nullPathExp::prettyprint(ostream &out, Int indent)
types::ty *nullPathExp::trans(coenv &e)
{
e.c.encode(inst::builtin, run::nullPath);
-
- return types::primPath();
+
+ return types::primPath();
}
void nullExp::prettyprint(ostream &out, Int indent)
@@ -678,7 +678,7 @@ types::ty *nullExp::trans(coenv &)
{
// Things get put on the stack when ty_null
// is cast to an appropriate type
- return types::primNull();
+ return types::primNull();
}
@@ -691,8 +691,8 @@ void quoteExp::prettyprint(ostream &out, Int indent)
types::ty *quoteExp::trans(coenv &e)
{
e.c.encode(inst::constpush,(item)value);
-
- return types::primCode();
+
+ return types::primCode();
}
void explist::prettyprint(ostream &out, Int indent)
@@ -740,7 +740,7 @@ signature *callExp::argTypes(coenv &e, bool *searchable)
*searchable = true;
size_t n = args->size();
-
+
for (size_t i = 0; i < n; i++) {
if(string(args->args[i].name) == "KEY") {
stringExp *s=dynamic_cast<stringExp*>(args->args[i].val);
@@ -851,7 +851,7 @@ void callExp::reportMismatch(function *ft, signature *source)
void callExp::reportArgErrors(coenv &e)
{
// Cycle through the parameters to report all errors.
- // NOTE: This may report inappropriate ambiguity errors.
+ // NOTE: This may report inappropriate ambiguity errors.
for (size_t i = 0; i < args->size(); i++) {
(*args)[i].val->trans(e);
}
@@ -860,12 +860,12 @@ void callExp::reportArgErrors(coenv &e)
}
void callExp::reportNonFunction() {
- em.error(getPos());
- symbol s = callee->getName();
- if (s)
- em << "\'" << s << "\' is not a function";
- else
- em << "called expression is not a function";
+ em.error(getPos());
+ symbol s = callee->getName();
+ if (s)
+ em << "\'" << s << "\' is not a function";
+ else
+ em << "called expression is not a function";
}
types::ty *callExp::cacheAppOrVarEntry(coenv &e, bool tacit)
@@ -880,7 +880,7 @@ types::ty *callExp::cacheAppOrVarEntry(coenv &e, bool tacit)
cout << "getApp for ";
if (callee->getName())
cout << *callee->getName();
- else
+ else
cout << "unnamed";
cout << " at " << getPos() << endl;
cout << "searchable: " << searchable << endl;
@@ -916,7 +916,7 @@ types::ty *callExp::cacheAppOrVarEntry(coenv &e, bool tacit)
#ifdef DEBUG_GETAPP
string name = callee->getName() ? string(*callee->getName()) :
- string("unnamed");
+ string("unnamed");
if (!callee->getName())
cout << getPos() << endl;
#endif
@@ -1035,8 +1035,8 @@ bool callExp::resolved(coenv &e) {
cacheAppOrVarEntry(e, true);
return cachedApp || cachedVarEntry;
}
-
-
+
+
void pairExp::prettyprint(ostream &out, Int indent)
{
prettyname(out, "pairExp",indent);
@@ -1217,7 +1217,7 @@ types::ty *promote(coenv &e, types::ty *x, types::ty *y)
bool castToFirst=e.castable(x, y, symbol::castsym);
bool castToSecond=e.castable(y, x, symbol::castsym);
- return (castToFirst && castToSecond) ? both(x,y) :
+ return (castToFirst && castToSecond) ? both(x,y) :
castToFirst ? x :
castToSecond ? y :
0;
@@ -1265,7 +1265,7 @@ types::ty *conditionalExp::getType(coenv &e)
types::ty *t = promote(e, tt, ft);
return t ? t : primError();
}
-
+
void orExp::prettyprint(ostream &out, Int indent)
{
@@ -1350,7 +1350,7 @@ void joinExp::prettyprint(ostream &out, Int indent)
void specExp::prettyprint(ostream &out, Int indent)
{
prettyindent(out,indent);
- out << "specExp '" << op << "' "
+ out << "specExp '" << op << "' "
<< (s==camp::OUT ? "out" :
s==camp::IN ? "in" :
"invalid side") << '\n';
@@ -1453,7 +1453,7 @@ void prefixExp::prettyprint(ostream &out, Int indent)
{
prettyindent(out, indent);
out << "prefixExp '" << op << "'\n";
-
+
dest->prettyprint(out, indent+1);
}
diff --git a/Build/source/utils/asymptote/exp.h b/Build/source/utils/asymptote/exp.h
index af24523b6df..562e2299657 100644
--- a/Build/source/utils/asymptote/exp.h
+++ b/Build/source/utils/asymptote/exp.h
@@ -60,7 +60,7 @@ public:
// expression. ie. 3sin(x)
// If a "non-scalable" expression is scaled a warning is issued.
virtual bool scalable() { return true; }
-
+
// Specifies if the value of the expression should be written to interactive
// prompt if typed as a stand-alone expression. For example:
// > 2+3;
@@ -177,7 +177,7 @@ public:
// be called with the same target type as the original call to evaluate.
// When evaluate() is called during the translation of a function, that
// function must still be in translation when the evaluation is translated.
- //
+ //
// The base implementation uses a tempExp (see below). This is
// sufficient for most expressions.
virtual exp *evaluate(coenv &e, types::ty *target);
@@ -207,7 +207,7 @@ public:
class varEntryExp : public exp {
trans::varEntry *v;
public:
- varEntryExp(position pos, trans::varEntry *v)
+ varEntryExp(position pos, trans::varEntry *v)
: exp(pos), v(v) {}
varEntryExp(position pos, types::ty *t, access *a);
varEntryExp(position pos, types::ty *t, vm::bltin f);
@@ -217,7 +217,7 @@ public:
types::ty *getType(coenv &);
types::ty *trans(coenv &e);
trans::varEntry *getCallee(coenv &e, types::signature *sig);
-
+
void transAct(action act, coenv &e, types::ty *target);
void transAsType(coenv &e, types::ty *target);
void transWrite(coenv &e, types::ty *t, exp *value);
@@ -246,7 +246,7 @@ public:
void transAsType(coenv &e, types::ty *target) {
value->varTrans(trans::READ, e, target);
-
+
// After translation, the cached type is no longer needed and should be
// garbage collected. This could presumably be done in every class derived
// from exp, but here it is most important as nameExp can have heavily
@@ -290,7 +290,7 @@ public:
ct=0; // See note in transAsType.
}
-
+
void transCall(coenv &e, types::ty *target) {
value->varTrans(trans::CALL, e, target);
@@ -401,7 +401,7 @@ protected:
array *transArray(coenv &e);
public:
- arrayExp(position pos, exp *set)
+ arrayExp(position pos, exp *set)
: exp(pos), set(set) {}
};
@@ -629,7 +629,7 @@ public:
: absyn(pos) {}
virtual ~explist() {}
-
+
virtual void add(exp *e) {
exps.push_back(e);
}
@@ -639,7 +639,7 @@ public:
virtual size_t size() {
return exps.size();
}
-
+
virtual exp * operator[] (size_t index) {
return exps[index];
}
@@ -675,7 +675,7 @@ public:
: args(), rest(), restPosition(DUMMY_REST_POSITION) {}
virtual ~arglist() {}
-
+
virtual void addFront(argument a) {
args.insert(args.begin(), a);
}
@@ -717,7 +717,7 @@ public:
virtual size_t size() {
return args.size();
}
-
+
virtual argument& operator[] (size_t index) {
return args[index];
}
@@ -943,9 +943,9 @@ public:
void transToType(coenv &e, types::ty *target);
types::ty *trans(coenv &e);
types::ty *getType(coenv &e);
-
+
};
-
+
class andOrExp : public exp {
protected:
exp *left;
@@ -1095,7 +1095,7 @@ public:
types::ty *trans(coenv &e);
types::ty *getType(coenv &) { return types::primError(); }
};
-
+
} // namespace absyntax
#endif
diff --git a/Build/source/utils/asymptote/fftw++.h b/Build/source/utils/asymptote/fftw++.h
index 01e1f55152e..467387d34f4 100644
--- a/Build/source/utils/asymptote/fftw++.h
+++ b/Build/source/utils/asymptote/fftw++.h
@@ -2,7 +2,7 @@
Copyright (C) 2004-16
John C. Bowman, University of Alberta
Malcolm Roberts, University of Strasbourg
-
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 3 of the License, or
@@ -39,22 +39,22 @@
#include <omp.h>
#endif
-inline int get_thread_num()
+inline int get_thread_num()
{
#ifdef FFTWPP_SINGLE_THREAD
return 0;
#else
return omp_get_thread_num();
-#endif
+#endif
}
-inline int get_max_threads()
+inline int get_max_threads()
{
#ifdef FFTWPP_SINGLE_THREAD
return 1;
#else
return omp_get_max_threads();
-#endif
+#endif
}
#ifndef FFTWPP_SINGLE_THREAD
@@ -69,7 +69,7 @@ inline int get_max_threads()
#define PARALLEL(code) \
{ \
code \
- }
+ }
#endif
#ifndef __Complex_h__
@@ -117,12 +117,12 @@ class ThreadBase
protected:
unsigned int threads;
unsigned int innerthreads;
-public:
+public:
ThreadBase();
ThreadBase(unsigned int threads) : threads(threads) {}
void Threads(unsigned int nthreads) {threads=nthreads;}
unsigned int Threads() {return threads;}
-
+
void multithread(unsigned int nx) {
if(nx >= threads) {
innerthreads=1;
@@ -137,17 +137,17 @@ inline unsigned int realsize(unsigned int n, Complex *in, Complex *out=NULL)
{
return (!out || in == out) ? 2*(n/2+1) : n;
}
-
+
inline unsigned int realsize(unsigned int n, Complex *in, double *out)
{
- return realsize(n,in,(Complex *) out);
+ return realsize(n,in,(Complex *) out);
}
-
+
inline unsigned int realsize(unsigned int n, double *in, Complex *out)
{
- return realsize(n,(Complex *) in,out);
+ return realsize(n,(Complex *) in,out);
}
-
+
// Base clase for fft routines
//
class fftw : public ThreadBase {
@@ -159,24 +159,24 @@ protected:
fftw_plan plan;
bool inplace;
-
+
unsigned int Dist(unsigned int n, size_t stride, size_t dist) {
return dist ? dist : ((stride == 1) ? n : 1);
}
-
+
static const double twopi;
-
+
public:
static unsigned int effort;
static unsigned int maxthreads;
static double testseconds;
static const char *WisdomName;
static fftw_plan (*planner)(fftw *f, Complex *in, Complex *out);
-
+
virtual unsigned int Threads() {return threads;}
-
+
static const char *oddshift;
-
+
// Inplace shift of Fourier origin to (nx/2,0) for even nx.
static void Shift(Complex *data, unsigned int nx, unsigned int ny,
unsigned int threads) {
@@ -260,41 +260,41 @@ public:
exit(1);
}
}
-
+
fftw() : plan(NULL) {}
fftw(unsigned int doubles, int sign, unsigned int threads,
unsigned int n=0) :
- doubles(doubles), sign(sign), threads(threads),
+ doubles(doubles), sign(sign), threads(threads),
norm(1.0/(n ? n : doubles/2)), plan(NULL) {
#ifndef FFTWPP_SINGLE_THREAD
fftw_init_threads();
-#endif
+#endif
}
-
+
virtual ~fftw() {
if(plan) fftw_destroy_plan(plan);
}
-
+
virtual fftw_plan Plan(Complex *in, Complex *out) {return NULL;};
-
+
inline void CheckAlign(Complex *p, const char *s) {
if((size_t) p % sizeof(Complex) == 0) return;
- std::cerr << "WARNING: " << s << " array is not " << sizeof(Complex)
+ std::cerr << "WARNING: " << s << " array is not " << sizeof(Complex)
<< "-byte aligned: address " << p << std::endl;
}
-
+
void noplan() {
std::cerr << "Unable to construct FFTW plan" << std::endl;
exit(1);
}
-
+
static void planThreads(unsigned int threads) {
#ifndef FFTWPP_SINGLE_THREAD
omp_set_num_threads(threads);
fftw_plan_with_nthreads(threads);
-#endif
+#endif
}
-
+
threaddata time(fftw_plan plan1, fftw_plan planT, Complex *in, Complex *out,
unsigned int Threads) {
utils::statistics S,ST;
@@ -339,30 +339,30 @@ public:
}
return threaddata(threads,S.mean(),S.stdev());
}
-
+
virtual threaddata lookup(bool inplace, unsigned int threads) {
return threaddata();
}
virtual void store(bool inplace, const threaddata& data) {}
-
+
inline Complex *CheckAlign(Complex *in, Complex *out, bool constructor=true)
{
-#ifndef NO_CHECK_ALIGN
+#ifndef NO_CHECK_ALIGN
CheckAlign(in,constructor ? "constructor input" : "input");
if(out) CheckAlign(out,constructor ? "constructor output" : "output");
else out=in;
#else
if(!out) out=in;
-#endif
+#endif
return out;
}
-
+
threaddata Setup(Complex *in, Complex *out=NULL) {
bool alloc=!in;
if(alloc) in=utils::ComplexAlign((doubles+1)/2);
out=CheckAlign(in,out);
inplace=(out==in);
-
+
threaddata data;
unsigned int Threads=threads;
if(threads > 1) data=lookup(inplace,threads);
@@ -370,13 +370,13 @@ public:
planThreads(threads);
plan=(*planner)(this,in,out);
if(!plan) noplan();
-
+
fftw_plan planT;
if(fftw::maxthreads > 1) {
threads=Threads;
planThreads(threads);
planT=(*planner)(this,in,out);
-
+
if(data.threads == 0) {
if(planT)
data=time(plan,planT,in,out,threads);
@@ -384,11 +384,11 @@ public:
store(inplace,threaddata(threads,data.mean,data.stdev));
}
}
-
+
if(alloc) Array::deleteAlign(in,(doubles+1)/2);
return data;
}
-
+
threaddata Setup(Complex *in, double *out) {
return Setup(in,(Complex *) out);
}
@@ -396,11 +396,11 @@ public:
threaddata Setup(double *in, Complex *out=NULL) {
return Setup((Complex *) in,out);
}
-
+
virtual void Execute(Complex *in, Complex *out, bool=false) {
fftw_execute_dft(plan,(fftw_complex *) in,(fftw_complex *) out);
}
-
+
Complex *Setout(Complex *in, Complex *out) {
out=CheckAlign(in,out,false);
if(inplace ^ (out == in)) {
@@ -409,33 +409,33 @@ public:
}
return out;
}
-
+
void fft(Complex *in, Complex *out=NULL) {
out=Setout(in,out);
Execute(in,out);
}
-
+
void fft(double *in, Complex *out=NULL) {
fft((Complex *) in,out);
}
-
+
void fft(Complex *in, double *out) {
fft(in,(Complex *) out);
}
-
+
void fft0(Complex *in, Complex *out=NULL) {
out=Setout(in,out);
Execute(in,out,true);
}
-
+
void fft0(double *in, Complex *out=NULL) {
fft0((Complex *) in,out);
}
-
+
void fft0(Complex *in, double *out) {
fft0(in,(Complex *) out);
}
-
+
void Normalize(Complex *out) {
unsigned int stop=doubles/2;
#ifndef FFTWPP_SINGLE_THREAD
@@ -450,29 +450,29 @@ public:
#endif
for(unsigned int i=0; i < doubles; i++) out[i] *= norm;
}
-
- virtual void fftNormalized(Complex *in, Complex *out=NULL, bool shift=false)
+
+ virtual void fftNormalized(Complex *in, Complex *out=NULL, bool shift=false)
{
out=Setout(in,out);
Execute(in,out,shift);
Normalize(out);
}
-
+
virtual void fftNormalized(Complex *in, double *out, bool shift=false) {
out=(double *) Setout(in,(Complex *) out);
Execute(in,(Complex *) out,shift);
Normalize(out);
}
-
+
virtual void fftNormalized(double *in, Complex *out, bool shift=false) {
fftNormalized((Complex *) in,out,shift);
}
-
+
template<class I, class O>
void fft0Normalized(I in, O out) {
fftNormalized(in,out,true);
}
-
+
template<class O>
void Normalize(unsigned int nx, unsigned int M, size_t ostride,
size_t odist, O *out) {
@@ -488,7 +488,7 @@ public:
}
}
}
-
+
template<class I, class O>
void fftNormalized(unsigned int nx, unsigned int M, size_t ostride,
size_t odist, I *in, O *out=NULL, bool shift=false) {
@@ -508,7 +508,7 @@ public:
T *in, T *out=NULL, unsigned int threads=fftw::maxthreads) {
unsigned int size=sizeof(T);
if(size % sizeof(double) != 0) {
- std::cerr << "ERROR: Transpose is not implemented for type of size "
+ std::cerr << "ERROR: Transpose is not implemented for type of size "
<< size;
exit(1);
}
@@ -520,14 +520,14 @@ public:
if(!out) out=in;
inplace=(out==in);
fftw::planThreads(threads);
-
+
fftw_iodim dims[3];
- dims[0].n=rows;
+ dims[0].n=rows;
dims[0].is=cols*length;
dims[0].os=length;
-
- dims[1].n=cols;
+
+ dims[1].n=cols;
dims[1].is=length;
dims[1].os=rows*length;
@@ -543,7 +543,7 @@ public:
~Transpose() {
if(plan) fftw_destroy_plan(plan);
}
-
+
template<class T>
void transpose(T *in, T *out=NULL) {
if(!plan) return;
@@ -565,7 +565,7 @@ public:
typename Table::iterator p=table.find(key);
return p == table.end() ? threaddata() : p->second;
}
-
+
void Store(Table& threadtable, T key, const threaddata& data) {
threadtable[key]=data;
}
@@ -575,10 +575,10 @@ struct keytype1 {
unsigned int nx;
unsigned int threads;
bool inplace;
- keytype1(unsigned int nx, unsigned int threads, bool inplace) :
+ keytype1(unsigned int nx, unsigned int threads, bool inplace) :
nx(nx), threads(threads), inplace(inplace) {}
};
-
+
struct keyless1 {
bool operator()(const keytype1& a, const keytype1& b) const {
return a.nx < b.nx || (a.nx == b.nx &&
@@ -593,10 +593,10 @@ struct keytype2 {
unsigned int threads;
bool inplace;
keytype2(unsigned int nx, unsigned int ny, unsigned int threads,
- bool inplace) :
+ bool inplace) :
nx(nx), ny(ny), threads(threads), inplace(inplace) {}
};
-
+
struct keyless2 {
bool operator()(const keytype2& a, const keytype2& b) const {
return a.nx < b.nx || (a.nx == b.nx &&
@@ -614,13 +614,13 @@ struct keytype3 {
unsigned int threads;
bool inplace;
keytype3(unsigned int nx, unsigned int ny, unsigned int nz,
- unsigned int threads, bool inplace) :
+ unsigned int threads, bool inplace) :
nx(nx), ny(ny), nz(nz), threads(threads), inplace(inplace) {}
};
-
+
struct keyless3 {
bool operator()(const keytype3& a, const keytype3& b) const {
- return a.nx < b.nx || (a.nx == b.nx &&
+ return a.nx < b.nx || (a.nx == b.nx &&
(a.ny < b.ny || (a.ny == b.ny &&
(a.nz < b.nz ||
(a.nz == b.nz &&
@@ -634,7 +634,7 @@ struct keyless3 {
// Before calling fft(), the arrays in and out (which may coincide) must be
// allocated as Complex[n].
//
-// Out-of-place usage:
+// Out-of-place usage:
//
// fft1d Forward(n,-1,in,out);
// Forward.fft(in,out);
@@ -656,31 +656,31 @@ struct keyless3 {
class fft1d : public fftw, public Threadtable<keytype1,keyless1> {
unsigned int nx;
static Table threadtable;
-public:
+public:
fft1d(unsigned int nx, int sign, Complex *in=NULL, Complex *out=NULL,
unsigned int threads=maxthreads)
- : fftw(2*nx,sign,threads), nx(nx) {Setup(in,out);}
-
+ : fftw(2*nx,sign,threads), nx(nx) {Setup(in,out);}
+
#ifdef __Array_h__
fft1d(int sign, const Array::array1<Complex>& in,
const Array::array1<Complex>& out=Array::NULL1,
- unsigned int threads=maxthreads)
- : fftw(2*in.Nx(),sign,threads), nx(in.Nx()) {Setup(in,out);}
-#endif
-
+ unsigned int threads=maxthreads)
+ : fftw(2*in.Nx(),sign,threads), nx(in.Nx()) {Setup(in,out);}
+#endif
+
threaddata lookup(bool inplace, unsigned int threads) {
return this->Lookup(threadtable,keytype1(nx,threads,inplace));
}
void store(bool inplace, const threaddata& data) {
this->Store(threadtable,keytype1(nx,data.threads,inplace),data);
}
-
+
fftw_plan Plan(Complex *in, Complex *out) {
return fftw_plan_dft_1d(nx,(fftw_complex *) in,(fftw_complex *) out,
sign,effort);
}
};
-
+
template<class I, class O>
class fftwblock : public virtual fftw {
public:
@@ -699,19 +699,19 @@ public:
T=1;
Q=M;
R=0;
-
+
threaddata S1=Setup(in,out);
fftw_plan planT1=plan;
-
+
if(fftw::maxthreads > 1) {
if(Threads > 1) {
T=std::min(M,Threads);
Q=T > 0 ? M/T : 0;
R=M-Q*T;
-
+
threads=Threads;
threaddata ST=Setup(in,out);
-
+
if(R > 0 && threads == 1 && plan1 != plan2) {
fftw_destroy_plan(plan2);
plan2=plan1;
@@ -735,23 +735,23 @@ public:
} else
Setup(in,out); // Synchronize wisdom
}
- }
-
+ }
+
fftw_plan Plan(int Q, fftw_complex *in, fftw_complex *out) {
return fftw_plan_many_dft(1,&nx,Q,in,NULL,istride,idist,
out,NULL,ostride,odist,sign,effort);
}
-
+
fftw_plan Plan(int Q, double *in, fftw_complex *out) {
return fftw_plan_many_dft_r2c(1,&nx,Q,in,NULL,istride,idist,
out,NULL,ostride,odist,effort);
}
-
+
fftw_plan Plan(int Q, fftw_complex *in, double *out) {
return fftw_plan_many_dft_c2r(1,&nx,Q,in,NULL,istride,idist,
out,NULL,ostride,odist,effort);
}
-
+
fftw_plan Plan(Complex *in, Complex *out) {
if(R > 0) {
plan2=Plan(Q+1,(I *) in,(O *) out);
@@ -760,11 +760,11 @@ public:
}
return Plan(Q,(I *) in,(O *) out);
}
-
+
void Execute(fftw_plan plan, fftw_complex *in, fftw_complex *out) {
fftw_execute_dft(plan,in,out);
}
-
+
void Execute(fftw_plan plan, double *in, fftw_complex *out) {
fftw_execute_dft_r2c(plan,in,out);
}
@@ -792,20 +792,20 @@ public:
}
}
}
-
+
unsigned int Threads() {return std::max(T,threads);}
-
+
~fftwblock() {
if(plan2) fftw_destroy_plan(plan2);
}
};
-
+
// Compute the complex Fourier transform of M complex vectors, each of
// length n.
// Before calling fft(), the arrays in and out (which may coincide) must be
// allocated as Complex[M*n].
//
-// Out-of-place usage:
+// Out-of-place usage:
//
// mfft1d Forward(n,-1,M,stride,dist,in,out);
// Forward.fft(in,out);
@@ -823,14 +823,14 @@ public:
class mfft1d : public fftwblock<fftw_complex,fftw_complex>,
public Threadtable<keytype3,keyless3> {
static Table threadtable;
-public:
+public:
mfft1d(unsigned int nx, int sign, unsigned int M=1, size_t stride=1,
size_t dist=0, Complex *in=NULL, Complex *out=NULL,
unsigned int threads=maxthreads) :
fftw(2*((nx-1)*stride+(M-1)*Dist(nx,stride,dist)+1),sign,threads,nx),
fftwblock<fftw_complex,fftw_complex>
- (nx,M,stride,stride,dist,dist,in,out,threads) {}
-
+ (nx,M,stride,stride,dist,dist,in,out,threads) {}
+
mfft1d(unsigned int nx, int sign, unsigned int M,
size_t istride, size_t ostride, size_t idist, size_t odist,
Complex *in=NULL, Complex *out=NULL, unsigned int threads=maxthreads):
@@ -838,8 +838,8 @@ public:
2*((nx-1)*ostride+(M-1)*Dist(nx,ostride,odist)+1)),sign,
threads, nx),
fftwblock<fftw_complex,fftw_complex>(nx,M,istride,ostride,idist,odist,in,
- out,threads) {}
-
+ out,threads) {}
+
threaddata lookup(bool inplace, unsigned int threads) {
return Lookup(threadtable,keytype3(nx,Q,R,threads,inplace));
}
@@ -847,13 +847,13 @@ public:
Store(threadtable,keytype3(nx,Q,R,data.threads,inplace),data);
}
};
-
+
// Compute the complex Fourier transform of n real values, using phase sign -1.
// Before calling fft(), the array in must be allocated as double[n] and
// the array out must be allocated as Complex[n/2+1]. The arrays in and out
// may coincide, allocated as Complex[n/2+1].
//
-// Out-of-place usage:
+// Out-of-place usage:
//
// rcfft1d Forward(n,in,out);
// Forward.fft(in,out);
@@ -862,7 +862,7 @@ public:
//
// rcfft1d Forward(n);
// Forward.fft(out);
-//
+//
// Notes:
// in contains the n real values stored as a Complex array;
// out contains the first n/2+1 Complex Fourier values.
@@ -870,36 +870,36 @@ public:
class rcfft1d : public fftw, public Threadtable<keytype1,keyless1> {
unsigned int nx;
static Table threadtable;
-public:
- rcfft1d(unsigned int nx, Complex *out=NULL, unsigned int threads=maxthreads)
+public:
+ rcfft1d(unsigned int nx, Complex *out=NULL, unsigned int threads=maxthreads)
: fftw(2*(nx/2+1),-1,threads,nx), nx(nx) {Setup(out,(double*) NULL);}
-
+
rcfft1d(unsigned int nx, double *in, Complex *out=NULL,
- unsigned int threads=maxthreads)
+ unsigned int threads=maxthreads)
: fftw(2*(nx/2+1),-1,threads,nx), nx(nx) {Setup(in,out);}
-
+
threaddata lookup(bool inplace, unsigned int threads) {
return Lookup(threadtable,keytype1(nx,threads,inplace));
}
void store(bool inplace, const threaddata& data) {
Store(threadtable,keytype1(nx,data.threads,inplace),data);
}
-
+
fftw_plan Plan(Complex *in, Complex *out) {
return fftw_plan_dft_r2c_1d(nx,(double *) in,(fftw_complex *) out, effort);
}
-
+
void Execute(Complex *in, Complex *out, bool=false) {
fftw_execute_dft_r2c(plan,(double *) in,(fftw_complex *) out);
}
};
-
+
// Compute the real inverse Fourier transform of the n/2+1 Complex values
// corresponding to the non-negative part of the frequency spectrum, using
// phase sign +1.
// Before calling fft(), the array in must be allocated as Complex[n/2+1]
// and the array out must be allocated as double[n]. The arrays in and out
-// may coincide, allocated as Complex[n/2+1].
+// may coincide, allocated as Complex[n/2+1].
//
// Out-of-place usage (input destroyed):
//
@@ -910,7 +910,7 @@ public:
//
// crfft1d Backward(n);
// Backward.fft(in);
-//
+//
// Notes:
// in contains the first n/2+1 Complex Fourier values.
// out contains the n real values stored as a Complex array;
@@ -918,25 +918,25 @@ public:
class crfft1d : public fftw, public Threadtable<keytype1,keyless1> {
unsigned int nx;
static Table threadtable;
-public:
- crfft1d(unsigned int nx, double *out=NULL, unsigned int threads=maxthreads)
- : fftw(2*(nx/2+1),1,threads,nx), nx(nx) {Setup(out);}
-
- crfft1d(unsigned int nx, Complex *in, double *out=NULL,
+public:
+ crfft1d(unsigned int nx, double *out=NULL, unsigned int threads=maxthreads)
+ : fftw(2*(nx/2+1),1,threads,nx), nx(nx) {Setup(out);}
+
+ crfft1d(unsigned int nx, Complex *in, double *out=NULL,
unsigned int threads=maxthreads)
- : fftw(realsize(nx,in,out),1,threads,nx), nx(nx) {Setup(in,out);}
-
+ : fftw(realsize(nx,in,out),1,threads,nx), nx(nx) {Setup(in,out);}
+
threaddata lookup(bool inplace, unsigned int threads) {
return Lookup(threadtable,keytype1(nx,threads,inplace));
}
void store(bool inplace, const threaddata& data) {
Store(threadtable,keytype1(nx,data.threads,inplace),data);
}
-
+
fftw_plan Plan(Complex *in, Complex *out) {
return fftw_plan_dft_c2r_1d(nx,(fftw_complex *) in,(double *) out,effort);
}
-
+
void Execute(Complex *in, Complex *out, bool=false) {
fftw_execute_dft_c2r(plan,(fftw_complex *) in,(double *) out);
}
@@ -948,7 +948,7 @@ public:
// Complex[M*(n/2+1)]. The arrays in and out may coincide,
// allocated as Complex[M*(n/2+1)].
//
-// Out-of-place usage:
+// Out-of-place usage:
//
// mrcfft1d Forward(n,M,istride,ostride,idist,odist,in,out);
// Forward.fft(in,out);
@@ -957,7 +957,7 @@ public:
//
// mrcfft1d Forward(n,M,istride,ostride,idist,odist);
// Forward.fft(out);
-//
+//
// Notes:
// istride is the spacing between the elements of each real vector;
// ostride is the spacing between the elements of each Complex vector;
@@ -974,28 +974,28 @@ public:
size_t istride, size_t ostride,
size_t idist, size_t odist,
double *in=NULL, Complex *out=NULL,
- unsigned int threads=maxthreads)
+ unsigned int threads=maxthreads)
: fftw(std::max((realsize(nx,in,out)-2)*istride+(M-1)*idist+2,
2*(nx/2*ostride+(M-1)*odist+1)),-1,threads,nx),
fftwblock<double,fftw_complex>
(nx,M,istride,ostride,idist,odist,(Complex *) in,out,threads) {}
-
+
threaddata lookup(bool inplace, unsigned int threads) {
return Lookup(threadtable,keytype3(nx,Q,R,threads,inplace));
}
-
+
void store(bool inplace, const threaddata& data) {
Store(threadtable,keytype3(nx,Q,R,data.threads,inplace),data);
}
-
+
void Normalize(Complex *out) {
fftw::Normalize<Complex>(nx/2+1,M,ostride,odist,out);
}
-
+
void fftNormalized(double *in, Complex *out=NULL, bool shift=false) {
fftw::fftNormalized<double,Complex>(nx/2+1,M,ostride,odist,in,out,false);
}
-
+
void fft0Normalized(double *in, Complex *out=NULL) {
fftw::fftNormalized<double,Complex>(nx/2+1,M,ostride,odist,in,out,true);
}
@@ -1006,7 +1006,7 @@ public:
// spectra, using phase sign +1. Before calling fft(), the array in must be
// allocated as Complex[M*(n/2+1)] and the array out must be allocated as
// double[M*n]. The arrays in and out may coincide,
-// allocated as Complex[M*(n/2+1)].
+// allocated as Complex[M*(n/2+1)].
//
// Out-of-place usage (input destroyed):
//
@@ -1017,7 +1017,7 @@ public:
//
// mcrfft1d Backward(n,M,istride,ostride,idist,odist);
// Backward.fft(out);
-//
+//
// Notes:
// stride is the spacing between the elements of each Complex vector;
// dist is the spacing between the first elements of the vectors;
@@ -1030,38 +1030,38 @@ class mcrfft1d : public fftwblock<fftw_complex,double>,
public:
mcrfft1d(unsigned int nx, unsigned int M, size_t istride, size_t ostride,
size_t idist, size_t odist, Complex *in=NULL, double *out=NULL,
- unsigned int threads=maxthreads)
+ unsigned int threads=maxthreads)
: fftw(std::max(2*(nx/2*istride+(M-1)*idist+1),
(realsize(nx,in,out)-2)*ostride+(M-1)*odist+2),1,threads,nx),
fftwblock<fftw_complex,double>
(nx,M,istride,ostride,idist,odist,in,(Complex *) out,threads) {}
-
+
threaddata lookup(bool inplace, unsigned int threads) {
return Lookup(threadtable,keytype3(nx,Q,R,threads,inplace));
}
-
+
void store(bool inplace, const threaddata& data) {
Store(threadtable,keytype3(nx,Q,R,data.threads,inplace),data);
}
-
+
void Normalize(double *out) {
fftw::Normalize<double>(nx,M,ostride,odist,out);
}
-
+
void fftNormalized(Complex *in, double *out=NULL, bool shift=false) {
fftw::fftNormalized<Complex,double>(nx,M,ostride,odist,in,out,false);
}
-
+
void fft0Normalized(Complex *in, double *out=NULL) {
fftw::fftNormalized<Complex,double>(nx,M,ostride,odist,in,out,true);
}
};
-
+
// Compute the complex two-dimensional Fourier transform of nx times ny
// complex values. Before calling fft(), the arrays in and out (which may
// coincide) must be allocated as Complex[nx*ny].
//
-// Out-of-place usage:
+// Out-of-place usage:
//
// fft2d Forward(nx,ny,-1,in,out);
// Forward.fft(in,out);
@@ -1087,32 +1087,32 @@ class fft2d : public fftw, public Threadtable<keytype2,keyless2> {
unsigned int nx;
unsigned int ny;
static Table threadtable;
-public:
+public:
fft2d(unsigned int nx, unsigned int ny, int sign, Complex *in=NULL,
- Complex *out=NULL, unsigned int threads=maxthreads)
- : fftw(2*nx*ny,sign,threads), nx(nx), ny(ny) {Setup(in,out);}
-
+ Complex *out=NULL, unsigned int threads=maxthreads)
+ : fftw(2*nx*ny,sign,threads), nx(nx), ny(ny) {Setup(in,out);}
+
#ifdef __Array_h__
fft2d(int sign, const Array::array2<Complex>& in,
- const Array::array2<Complex>& out=Array::NULL2,
- unsigned int threads=maxthreads)
+ const Array::array2<Complex>& out=Array::NULL2,
+ unsigned int threads=maxthreads)
: fftw(2*in.Size(),sign,threads), nx(in.Nx()), ny(in.Ny()) {
Setup(in,out);
}
-#endif
-
+#endif
+
threaddata lookup(bool inplace, unsigned int threads) {
return this->Lookup(threadtable,keytype2(nx,ny,threads,inplace));
}
void store(bool inplace, const threaddata& data) {
this->Store(threadtable,keytype2(nx,ny,data.threads,inplace),data);
}
-
+
fftw_plan Plan(Complex *in, Complex *out) {
return fftw_plan_dft_2d(nx,ny,(fftw_complex *) in,(fftw_complex *) out,
sign,effort);
}
-
+
void Execute(Complex *in, Complex *out, bool=false) {
fftw_execute_dft(plan,(fftw_complex *) in,(fftw_complex *) out);
}
@@ -1122,9 +1122,9 @@ public:
// values, using phase sign -1.
// Before calling fft(), the array in must be allocated as double[nx*ny] and
// the array out must be allocated as Complex[nx*(ny/2+1)]. The arrays in
-// and out may coincide, allocated as Complex[nx*(ny/2+1)].
+// and out may coincide, allocated as Complex[nx*(ny/2+1)].
//
-// Out-of-place usage:
+// Out-of-place usage:
//
// rcfft2d Forward(nx,ny,in,out);
// Forward.fft(in,out); // Origin of Fourier domain at (0,0)
@@ -1136,7 +1136,7 @@ public:
// rcfft2d Forward(nx,ny);
// Forward.fft(in); // Origin of Fourier domain at (0,0)
// Forward.fft0(in); // Origin of Fourier domain at (nx/2,0)
-//
+//
// Notes:
// in contains the nx*ny real values stored as a Complex array;
// out contains the upper-half portion (ky >= 0) of the Complex transform.
@@ -1144,22 +1144,22 @@ public:
class rcfft2d : public fftw {
unsigned int nx;
unsigned int ny;
-public:
+public:
rcfft2d(unsigned int nx, unsigned int ny, Complex *out=NULL,
- unsigned int threads=maxthreads)
- : fftw(2*nx*(ny/2+1),-1,threads,nx*ny), nx(nx), ny(ny) {Setup(out);}
-
+ unsigned int threads=maxthreads)
+ : fftw(2*nx*(ny/2+1),-1,threads,nx*ny), nx(nx), ny(ny) {Setup(out);}
+
rcfft2d(unsigned int nx, unsigned int ny, double *in, Complex *out=NULL,
- unsigned int threads=maxthreads)
+ unsigned int threads=maxthreads)
: fftw(2*nx*(ny/2+1),-1,threads,nx*ny), nx(nx), ny(ny) {
Setup(in,out);
- }
-
+ }
+
fftw_plan Plan(Complex *in, Complex *out) {
return fftw_plan_dft_r2c_2d(nx,ny,(double *) in,(fftw_complex *) out,
effort);
}
-
+
void Execute(Complex *in, Complex *out, bool shift=false) {
if(shift) {
if(inplace) Shift(in,nx,ny,threads);
@@ -1167,7 +1167,7 @@ public:
}
fftw_execute_dft_r2c(plan,(double *) in,(fftw_complex *) out);
}
-
+
// Set Nyquist modes of even shifted transforms to zero.
void deNyquist(Complex *f) {
unsigned int nyp=ny/2+1;
@@ -1185,14 +1185,14 @@ public:
f[(i+1)*nyp-1]=0.0;
}
};
-
+
// Compute the real two-dimensional inverse Fourier transform of the
// nx*(ny/2+1) Complex values corresponding to the spectral values in the
// half-plane ky >= 0, using phase sign +1.
// Before calling fft(), the array in must be allocated as
// Complex[nx*(ny/2+1)] and the array out must be allocated as
// double[nx*ny]. The arrays in and out may coincide,
-// allocated as Complex[nx*(ny/2+1)].
+// allocated as Complex[nx*(ny/2+1)].
//
// Out-of-place usage (input destroyed):
//
@@ -1205,7 +1205,7 @@ public:
// crfft2d Backward(nx,ny);
// Backward.fft(in); // Origin of Fourier domain at (0,0)
// Backward.fft0(in); // Origin of Fourier domain at (nx/2,0)
-//
+//
// Notes:
// in contains the upper-half portion (ky >= 0) of the Complex transform;
// out contains the nx*ny real values stored as a Complex array.
@@ -1213,22 +1213,22 @@ public:
class crfft2d : public fftw {
unsigned int nx;
unsigned int ny;
-public:
+public:
crfft2d(unsigned int nx, unsigned int ny, double *out=NULL,
unsigned int threads=maxthreads) :
- fftw(2*nx*(ny/2+1),1,threads,nx*ny), nx(nx), ny(ny) {Setup(out);}
-
+ fftw(2*nx*(ny/2+1),1,threads,nx*ny), nx(nx), ny(ny) {Setup(out);}
+
crfft2d(unsigned int nx, unsigned int ny, Complex *in, double *out=NULL,
unsigned int threads=maxthreads)
: fftw(nx*realsize(ny,in,out),1,threads,nx*ny), nx(nx), ny(ny) {
Setup(in,out);
- }
-
+ }
+
fftw_plan Plan(Complex *in, Complex *out) {
return fftw_plan_dft_c2r_2d(nx,ny,(fftw_complex *) in,(double *) out,
effort);
}
-
+
void Execute(Complex *in, Complex *out, bool shift=false) {
fftw_execute_dft_c2r(plan,(fftw_complex *) in,(double *) out);
if(shift) {
@@ -1236,7 +1236,7 @@ public:
else Shift((double *) out,nx,ny,threads);
}
}
-
+
// Set Nyquist modes of even shifted transforms to zero.
void deNyquist(Complex *f) {
unsigned int nyp=ny/2+1;
@@ -1255,11 +1255,11 @@ public:
}
};
-// Compute the complex three-dimensional Fourier transform of
+// Compute the complex three-dimensional Fourier transform of
// nx times ny times nz complex values. Before calling fft(), the arrays in
// and out (which may coincide) must be allocated as Complex[nx*ny*nz].
//
-// Out-of-place usage:
+// Out-of-place usage:
//
// fft3d Forward(nx,ny,nz,-1,in,out);
// Forward.fft(in,out);
@@ -1286,20 +1286,20 @@ class fft3d : public fftw {
unsigned int nx;
unsigned int ny;
unsigned int nz;
-public:
+public:
fft3d(unsigned int nx, unsigned int ny, unsigned int nz,
int sign, Complex *in=NULL, Complex *out=NULL,
- unsigned int threads=maxthreads)
- : fftw(2*nx*ny*nz,sign,threads), nx(nx), ny(ny), nz(nz) {Setup(in,out);}
-
+ unsigned int threads=maxthreads)
+ : fftw(2*nx*ny*nz,sign,threads), nx(nx), ny(ny), nz(nz) {Setup(in,out);}
+
#ifdef __Array_h__
fft3d(int sign, const Array::array3<Complex>& in,
const Array::array3<Complex>& out=Array::NULL3,
- unsigned int threads=maxthreads)
- : fftw(2*in.Size(),sign,threads), nx(in.Nx()), ny(in.Ny()), nz(in.Nz())
+ unsigned int threads=maxthreads)
+ : fftw(2*in.Size(),sign,threads), nx(in.Nx()), ny(in.Ny()), nz(in.Nz())
{Setup(in,out);}
-#endif
-
+#endif
+
fftw_plan Plan(Complex *in, Complex *out) {
return fftw_plan_dft_3d(nx,ny,nz,(fftw_complex *) in,
(fftw_complex *) out, sign, effort);
@@ -1310,9 +1310,9 @@ public:
// nx times ny times nz real values, using phase sign -1.
// Before calling fft(), the array in must be allocated as double[nx*ny*nz]
// and the array out must be allocated as Complex[nx*ny*(nz/2+1)]. The
-// arrays in and out may coincide, allocated as Complex[nx*ny*(nz/2+1)].
+// arrays in and out may coincide, allocated as Complex[nx*ny*(nz/2+1)].
//
-// Out-of-place usage:
+// Out-of-place usage:
//
// rcfft3d Forward(nx,ny,nz,in,out);
// Forward.fft(in,out); // Origin of Fourier domain at (0,0)
@@ -1323,7 +1323,7 @@ public:
// rcfft3d Forward(nx,ny,nz);
// Forward.fft(in); // Origin of Fourier domain at (0,0)
// Forward.fft0(in); // Origin of Fourier domain at (nx/2,ny/2,0)
-//
+//
// Notes:
// in contains the nx*ny*nz real values stored as a Complex array;
// out contains the upper-half portion (kz >= 0) of the Complex transform.
@@ -1332,23 +1332,23 @@ class rcfft3d : public fftw {
unsigned int nx;
unsigned int ny;
unsigned int nz;
-public:
+public:
rcfft3d(unsigned int nx, unsigned int ny, unsigned int nz, Complex *out=NULL,
unsigned int threads=maxthreads)
: fftw(2*nx*ny*(nz/2+1),-1,threads,nx*ny*nz), nx(nx), ny(ny), nz(nz) {
Setup(out);
- }
-
+ }
+
rcfft3d(unsigned int nx, unsigned int ny, unsigned int nz, double *in,
- Complex *out=NULL, unsigned int threads=maxthreads)
+ Complex *out=NULL, unsigned int threads=maxthreads)
: fftw(2*nx*ny*(nz/2+1),-1,threads,nx*ny*nz),
- nx(nx), ny(ny), nz(nz) {Setup(in,out);}
-
+ nx(nx), ny(ny), nz(nz) {Setup(in,out);}
+
fftw_plan Plan(Complex *in, Complex *out) {
return fftw_plan_dft_r2c_3d(nx,ny,nz,(double *) in,(fftw_complex *) out,
effort);
}
-
+
void Execute(Complex *in, Complex *out, bool shift=false) {
if(shift) {
if(inplace) Shift(in,nx,ny,nz,threads);
@@ -1356,7 +1356,7 @@ public:
}
fftw_execute_dft_r2c(plan,(double *) in,(fftw_complex *) out);
}
-
+
// Set Nyquist modes of even shifted transforms to zero.
void deNyquist(Complex *f) {
unsigned int nzp=nz/2+1;
@@ -1368,7 +1368,7 @@ public:
for(unsigned int k=0; k < yz; ++k)
f[k]=0.0;
}
-
+
if(ny % 2 == 0) {
#ifndef FFTWPP_SINGLE_THREAD
#pragma omp parallel for num_threads(threads)
@@ -1379,7 +1379,7 @@ public:
f[iyz+k]=0.0;
}
}
-
+
if(nz % 2 == 0)
#ifndef FFTWPP_SINGLE_THREAD
#pragma omp parallel for num_threads(threads)
@@ -1389,14 +1389,14 @@ public:
f[i*yz+(j+1)*nzp-1]=0.0;
}
};
-
+
// Compute the real two-dimensional inverse Fourier transform of the
// nx*ny*(nz/2+1) Complex values corresponding to the spectral values in the
// half-plane kz >= 0, using phase sign +1.
// Before calling fft(), the array in must be allocated as
// Complex[nx*ny*(nz+1)/2] and the array out must be allocated as
// double[nx*ny*nz]. The arrays in and out may coincide,
-// allocated as Complex[nx*ny*(nz/2+1)].
+// allocated as Complex[nx*ny*(nz/2+1)].
//
// Out-of-place usage (input destroyed):
//
@@ -1409,7 +1409,7 @@ public:
// crfft3d Backward(nx,ny,nz);
// Backward.fft(in); // Origin of Fourier domain at (0,0)
// Backward.fft0(in); // Origin of Fourier domain at (nx/2,ny/2,0)
-//
+//
// Notes:
// in contains the upper-half portion (kz >= 0) of the Complex transform;
// out contains the nx*ny*nz real values stored as a Complex array.
@@ -1418,22 +1418,22 @@ class crfft3d : public fftw {
unsigned int nx;
unsigned int ny;
unsigned int nz;
-public:
+public:
crfft3d(unsigned int nx, unsigned int ny, unsigned int nz, double *out=NULL,
- unsigned int threads=maxthreads)
+ unsigned int threads=maxthreads)
: fftw(2*nx*ny*(nz/2+1),1,threads,nx*ny*nz), nx(nx), ny(ny), nz(nz)
- {Setup(out);}
-
+ {Setup(out);}
+
crfft3d(unsigned int nx, unsigned int ny, unsigned int nz, Complex *in,
- double *out=NULL, unsigned int threads=maxthreads)
+ double *out=NULL, unsigned int threads=maxthreads)
: fftw(nx*ny*(realsize(nz,in,out)),1,threads,nx*ny*nz), nx(nx), ny(ny),
- nz(nz) {Setup(in,out);}
-
+ nz(nz) {Setup(in,out);}
+
fftw_plan Plan(Complex *in, Complex *out) {
return fftw_plan_dft_c2r_3d(nx,ny,nz,(fftw_complex *) in,(double *) out,
effort);
}
-
+
void Execute(Complex *in, Complex *out, bool shift=false) {
fftw_execute_dft_c2r(plan,(fftw_complex *) in,(double *) out);
if(shift) {
@@ -1441,7 +1441,7 @@ public:
else Shift((double *) out,nx,ny,nz,threads);
}
}
-
+
// Set Nyquist modes of even shifted transforms to zero.
void deNyquist(Complex *f) {
unsigned int nzp=nz/2+1;
@@ -1453,7 +1453,7 @@ public:
for(unsigned int k=0; k < yz; ++k)
f[k]=0.0;
}
-
+
if(ny % 2 == 0) {
#ifndef FFTWPP_SINGLE_THREAD
#pragma omp parallel for num_threads(threads)
@@ -1464,7 +1464,7 @@ public:
f[iyz+k]=0.0;
}
}
-
+
if(nz % 2 == 0)
#ifndef FFTWPP_SINGLE_THREAD
#pragma omp parallel for num_threads(threads)
diff --git a/Build/source/utils/asymptote/fileio.cc b/Build/source/utils/asymptote/fileio.cc
index d738438820e..29752e95245 100644
--- a/Build/source/utils/asymptote/fileio.cc
+++ b/Build/source/utils/asymptote/fileio.cc
@@ -18,12 +18,48 @@ string newline="\n";
ofile Stdout("");
file nullfile("",false,NOMODE,false,true);
+void ifile::open()
+{
+ if(standard) {
+ if(mode & std::ios::binary)
+ reportError("Cannot open standard input in binary mode");
+ stream=&cin;
+ } else {
+ if(mode & std::ios::out)
+ name=outpath(name);
+ else {
+#ifdef HAVE_LIBCURL
+ if(parser::isURL(name)) {
+ parser::readURL(buf,name);
+ stream=&buf;
+ } else
+#endif
+ {
+ name=locatefile(inpath(name));
+ stream=fstream=new std::fstream(name.c_str(),mode);
+ }
+ }
+
+ if(mode & std::ios::out) {
+ if(error()) {
+ delete fstream;
+ std::ofstream f(name.c_str());
+ f.close();
+ stream=fstream=new std::fstream(name.c_str(),mode);
+ }
+ }
+ index=processData().ifile.add(fstream);
+ if(check) Check();
+ }
+}
+
void ifile::ignoreComment()
{
if(comment == 0) return;
- int c;
- bool eol=(stream->peek() == '\n');
- if(eol && csvmode && nullfield) return;
+ int c=stream->peek();
+ bool eol=c == '\n';
+ if((csvmode || linemode) && eol) {nullfield=true; return;}
+ if(csvmode && c == ',') nullfield=true;
for(;;) {
while(isspace(c=stream->peek())) {
stream->ignore();
@@ -38,7 +74,7 @@ void ifile::ignoreComment()
} else {if(c != EOF && eol) stream->unget(); return;}
}
}
-
+
bool ifile::eol()
{
int c;
@@ -51,7 +87,7 @@ bool ifile::eol()
}
return false;
}
-
+
bool ifile::nexteol()
{
int c;
@@ -59,7 +95,7 @@ bool ifile::nexteol()
nullfield=false;
return true;
}
-
+
while(isspace(c=stream->peek())) {
if(c == '\n' && comma) {
nullfield=true;
@@ -80,7 +116,7 @@ bool ifile::nexteol()
}
return false;
}
-
+
void ifile::csv()
{
comma=false;
@@ -96,7 +132,7 @@ void ifile::csv()
} else stream->clear(rdstate);
if(c == ',') comma=true;
}
-
+
void ifile::Read(string& val)
{
string s;
@@ -132,7 +168,7 @@ void ifile::Read(string& val)
}
} else
getline(*stream,s);
-
+
if(comment) {
size_t p=0;
while((p=s.find(comment,p)) < string::npos) {
@@ -140,7 +176,7 @@ void ifile::Read(string& val)
s.erase(p,1);
++p;
} else {
- s.erase(p);
+ s.erase(p);
break;
}
}
@@ -152,8 +188,8 @@ void ifile::Read(string& val)
}
val=whitespace+s;
}
-
-void ofile::writeline()
+
+void ofile::writeline()
{
if(standard && interact::query && !vm::indebugger) {
Int scroll=settings::getScroll();
@@ -176,5 +212,5 @@ void ofile::writeline()
} else *stream << newline;
if(errorstream::interrupt) {interact::lines=0; throw interrupted();}
}
-
+
} // namespace camp
diff --git a/Build/source/utils/asymptote/fileio.h b/Build/source/utils/asymptote/fileio.h
index 1341d66b2dd..0e04088a9fd 100644
--- a/Build/source/utils/asymptote/fileio.h
+++ b/Build/source/utils/asymptote/fileio.h
@@ -28,16 +28,18 @@
#include "errormsg.h"
#include "util.h"
#include "process.h"
+#include "locate.h"
+#include "parser.h"
namespace vm {
-extern bool indebugger;
+extern bool indebugger;
}
namespace camp {
extern string tab;
extern string newline;
-
+
enum Mode {NOMODE,INPUT,OUTPUT,UPDATE,BINPUT,BOUTPUT,BUPDATE,XINPUT,XOUTPUT,
XUPDATE,OPIPE};
@@ -48,7 +50,7 @@ static const string FileModes[]=
extern FILE *pipeout;
-inline void openpipeout()
+inline void openpipeout()
{
int fd=intcast(settings::getSetting<Int>("outpipe"));
if(!pipeout && fd >= 0) pipeout=fdopen(fd,"w");
@@ -59,12 +61,17 @@ inline void openpipeout()
}
}
+inline string locatefile(string name) {
+ string s=settings::locateFile(name,false,"");
+ return s.empty() ? name : s;
+}
+
class file : public gc {
-protected:
+protected:
string name;
bool check; // Check whether input file exists.
Mode type;
-
+
Int nx,ny,nz; // Array dimensions
bool linemode; // Array reads will stop at eol instead of eof.
bool csvmode; // Read comma-separated values.
@@ -72,25 +79,25 @@ protected:
bool singlereal; // Read/write single-precision XDR/binary reals.
bool singleint; // Read/write single-precision XDR/binary ints.
bool signedint; // Read/write signed XDR/binary ints.
-
+
bool closed; // File has been closed.
bool standard; // Standard input/output
bool binary; // Read in binary mode.
-
- bool nullfield; // Used to detect a final null field in csv+line mode.
+
+ bool nullfield; // Used to detect null fields in line mode and cvs mode.
string whitespace;
size_t index; // Terminator index.
-public:
+public:
bool Standard() {return standard;}
-
+
void standardEOF() {
#if defined(HAVE_LIBREADLINE) && defined(HAVE_LIBCURSES)
cout << endl;
-#endif
+#endif
}
-
+
template<class T>
void purgeStandard(T&) {
if(standard) {
@@ -106,23 +113,31 @@ public:
}
}
}
-
+
void purgeStandard(string&) {
if(cin.eof())
standardEOF();
}
-
- void dimension(Int Nx=-1, Int Ny=-1, Int Nz=-1) {nx=Nx; ny=Ny; nz=Nz;}
-
- file(const string& name, bool check=true, Mode type=NOMODE, bool binary=false,
- bool closed=false) :
+
+ void dimension(Int Nx=-1, Int Ny=-1, Int Nz=-1) {
+ if(Nx < -2 || Ny < -2 || Nz < -2) {
+ ostringstream buf;
+ buf << "Invalid array dimensions: " << Nx << ", " << Ny << ", " << Nz;
+ reportError(buf);
+ }
+
+ nx=Nx; ny=Ny; nz=Nz;
+ }
+
+ file(const string& name, bool check=true, Mode type=NOMODE,
+ bool binary=false, bool closed=false) :
name(name), check(check), type(type), linemode(false), csvmode(false),
wordmode(false), singlereal(false), singleint(true), signedint(true),
- closed(closed), standard(name.empty()),
- binary(binary), nullfield(false), whitespace("") {dimension();}
-
+ closed(closed), standard(name.empty()), binary(binary), nullfield(false),
+ whitespace("") {dimension();}
+
virtual void open() {}
-
+
void Check() {
if(error()) {
ostringstream buf;
@@ -130,7 +145,7 @@ public:
reportError(buf);
}
}
-
+
virtual ~file() {}
bool isOpen() {
@@ -143,7 +158,7 @@ public:
}
return true;
}
-
+
string filename() {return name;}
virtual bool eol() {return false;}
virtual bool nexteol() {return false;}
@@ -156,19 +171,19 @@ public:
virtual void flush() {}
virtual size_t tell() {return 0;}
virtual void seek(Int, bool=true) {}
-
+
string FileMode() {return FileModes[type];}
-
+
void unsupported(const char *rw, const char *type) {
ostringstream buf;
buf << rw << " of type " << type << " not supported in " << FileMode()
<< " mode";
reportError(buf);
}
-
+
void noread(const char *type) {unsupported("Read",type);}
void nowrite(const char *type) {unsupported("Write",type);}
-
+
virtual void Read(bool&) {noread("bool");}
virtual void Read(Int&) {noread("int");}
virtual void Read(double&) {noread("real");}
@@ -178,7 +193,7 @@ public:
virtual void Read(char&) {noread("char");}
virtual void Read(string&) {noread("string");}
virtual void readwhite(string&) {noread("string");}
-
+
virtual void write(bool) {nowrite("bool");}
virtual void write(Int) {nowrite("int");}
virtual void write(double) {nowrite("real");}
@@ -189,18 +204,18 @@ public:
virtual void write(guide *) {nowrite("guide");}
virtual void write(const transform&) {nowrite("transform");}
virtual void writeline() {nowrite("string");}
-
+
virtual void ignoreComment() {};
virtual void csv() {};
-
+
template<class T>
void ignoreComment(T&) {
ignoreComment();
}
-
+
void ignoreComment(string&) {}
void ignoreComment(char&) {}
-
+
template<class T>
void read(T& val) {
if(binary) Read(val);
@@ -209,7 +224,7 @@ public:
if(errorstream::interrupt) throw interrupted();
else {
ignoreComment(val);
- val=T();
+ val=vm::Undefined;
if(!nullfield)
Read(val);
csv();
@@ -217,30 +232,30 @@ public:
}
}
}
-
+
Int Nx() {return nx;}
Int Ny() {return ny;}
Int Nz() {return nz;}
-
+
void Nx(Int n) {nx=n;}
void Ny(Int n) {ny=n;}
void Nz(Int n) {nz=n;}
-
+
void LineMode(bool b) {linemode=b;}
bool LineMode() {return linemode;}
-
+
void CSVMode(bool b) {csvmode=b; if(b) wordmode=false;}
bool CSVMode() {return csvmode;}
-
+
void WordMode(bool b) {wordmode=b; if(b) csvmode=false;}
bool WordMode() {return wordmode;}
-
+
void SingleReal(bool b) {singlereal=b;}
bool SingleReal() {return singlereal;}
-
+
void SingleInt(bool b) {singleint=b;}
bool SingleInt() {return singleint;}
-
+
void SignedInt(bool b) {signedint=b;}
bool SignedInt() {return signedint;}
};
@@ -252,34 +267,34 @@ public:
void open() {
openpipeout();
}
-
+
bool text() {return true;}
bool eof() {return pipeout ? feof(pipeout) : true;}
bool error() {return pipeout ? ferror(pipeout) : true;}
void clear() {if(pipeout) clearerr(pipeout);}
void flush() {if(pipeout) fflush(pipeout);}
-
+
void seek(Int pos, bool begin=true) {
if(!standard && pipeout) {
clear();
fseek(pipeout,pos,begin ? SEEK_SET : SEEK_END);
}
}
-
+
size_t tell() {
return pipeout ? ftell(pipeout) : 0;
}
-
+
void write(const string& val) {
fprintf(pipeout,"%s",val.c_str());
}
-
+
void write(bool val) {
ostringstream s;
s << val;
write(s.str());
}
-
+
void write(Int val) {
ostringstream s;
s << val;
@@ -306,19 +321,19 @@ public:
s << val;
write(s.str());
}
-
+
void write(guide *val) {
ostringstream s;
s << *val;
write(s.str());
}
-
+
void write(const transform& val) {
ostringstream s;
s << val;
write(s.str());
}
-
+
void writeline() {
fprintf(pipeout,"\n");
if(errorstream::interrupt) throw interrupted();
@@ -326,55 +341,35 @@ public:
};
class ifile : public file {
-protected:
+protected:
istream *stream;
std::fstream *fstream;
+ stringstream buf;
char comment;
std::ios::openmode mode;
bool comma;
-
+
public:
- ifile(const string& name, char comment, bool check=true, Mode type=INPUT,
+ ifile(const string& name, char comment, bool check=true, Mode type=INPUT,
std::ios::openmode mode=std::ios::in) :
- file(name,check,type), stream(&cin), fstream(NULL), comment(comment),
- mode(mode), comma(false) {}
-
+ file(name,check,type), stream(&cin), fstream(NULL),
+ comment(comment), mode(mode), comma(false) {}
+
// Binary file
ifile(const string& name, bool check=true, Mode type=BINPUT,
std::ios::openmode mode=std::ios::in) :
file(name,check,type,true), mode(mode) {}
-
+
~ifile() {close();}
-
- void open() {
- if(standard) {
- if(mode & std::ios::binary)
- reportError("Cannot open standard input in binary mode");
- stream=&cin;
- } else {
- if(mode & std::ios::out)
- name=outpath(name);
- stream=fstream=new std::fstream(name.c_str(),mode);
- if(mode & std::ios::out) {
- if(error()) {
- delete fstream;
- std::ofstream f(name.c_str());
- f.close();
- stream=fstream=new std::fstream(name.c_str(),mode);
- }
- }
- index=processData().ifile.add(fstream);
- if(check) Check();
- }
- }
-
+
+ void open();
bool eol();
bool nexteol();
-
+
bool text() {return true;}
bool eof() {return stream->eof();}
bool error() {return stream->fail();}
-
+
void close() {
if(!standard && fstream) {
fstream->close();
@@ -384,30 +379,30 @@ public:
processData().ifile.remove(index);
}
}
-
+
void clear() {stream->clear();}
-
+
void seek(Int pos, bool begin=true) {
if(!standard && fstream) {
clear();
fstream->seekg(pos,begin ? std::ios::beg : std::ios::end);
}
}
-
+
size_t tell() {
- if(fstream)
+ if(fstream)
return fstream->tellg();
else
return 0;
}
-
+
void csv();
-
+
virtual void ignoreComment();
-
+
// Skip over white space
void readwhite(string& val) {val=string(); *stream >> val;}
-
+
void Read(bool &val) {string t; readwhite(t); val=(t == "true");}
void Read(Int& val) {*stream >> val;}
void Read(double& val) {*stream >> val;}
@@ -416,10 +411,10 @@ public:
void Read(char& val) {stream->get(val);}
void Read(string& val);
};
-
+
class iofile : public ifile {
public:
- iofile(const string& name, char comment=0) :
+ iofile(const string& name, char comment=0) :
ifile(name,comment,true,UPDATE,std::ios::in | std::ios::out) {}
Int precision(Int p) {
@@ -427,7 +422,7 @@ public:
stream->precision(p);
}
void flush() {if(fstream) fstream->flush();}
-
+
void write(bool val) {*fstream << (val ? "true " : "false ");}
void write(Int val) {*fstream << val;}
void write(double val) {*fstream << val;}
@@ -437,13 +432,13 @@ public:
void write(const pen& val) {*fstream << val;}
void write(guide *val) {*fstream << *val;}
void write(const transform& val) {*fstream << val;}
-
+
void writeline() {
*fstream << newline;
if(errorstream::interrupt) throw interrupted();
}
};
-
+
class ofile : public file {
protected:
ostream *stream;
@@ -451,14 +446,14 @@ protected:
std::ios::openmode mode;
public:
ofile(const string& name, Mode type=OUTPUT,
- std::ios::openmode mode=std::ios::trunc) :
+ std::ios::openmode mode=std::ios::trunc) :
file(name,true,type), stream(&cout), fstream(NULL), mode(mode) {}
-
+
~ofile() {close();}
-
+
void open() {
if(standard) {
- if(mode & std::ios::binary)
+ if(mode & std::ios::binary)
reportError("Cannot open standard output in binary mode");
stream=&cout;
} else {
@@ -469,11 +464,11 @@ public:
Check();
}
}
-
+
bool text() {return true;}
bool eof() {return stream->eof();}
bool error() {return stream->fail();}
-
+
void close() {
if(!standard && fstream) {
fstream->close();
@@ -489,24 +484,24 @@ public:
stream->precision(p);
}
void flush() {stream->flush();}
-
+
void seek(Int pos, bool begin=true) {
if(!standard && fstream) {
clear();
fstream->seekp(pos,begin ? std::ios::beg : std::ios::end);
}
}
-
+
size_t tell() {
- if(fstream)
+ if(fstream)
return fstream->tellp();
else
return 0;
}
-
- bool enabled() {return !standard || settings::verbose > 1 ||
+
+ bool enabled() {return !standard || settings::verbose > 1 ||
interact::interactive || !settings::getSetting<bool>("quiet");}
-
+
void write(bool val) {*stream << (val ? "true " : "false ");}
void write(Int val) {*stream << val;}
void write(double val) {*stream << val;}
@@ -516,21 +511,21 @@ public:
void write(const pen& val) {*stream << val;}
void write(guide *val) {*stream << *val;}
void write(const transform& val) {*stream << val;}
-
+
void writeline();
};
class ibfile : public ifile {
public:
ibfile(const string& name, bool check=true, Mode type=BINPUT,
- std::ios::openmode mode=std::ios::in) :
+ std::ios::openmode mode=std::ios::in) :
ifile(name,check,type,mode | std::ios::binary) {}
template<class T>
void iread(T& val) {
val=T();
if(fstream) fstream->read((char *) &val,sizeof(T));
}
-
+
void Read(bool& val) {iread(val);}
void Read(Int& val) {
if(signedint) {
@@ -542,26 +537,30 @@ public:
}
}
void Read(char& val) {iread(val);}
- void Read(string& val) {char c; iread(c); val=c;}
-
+ void Read(string& val) {
+ ostringstream buf;
+ buf << fstream->rdbuf();
+ val=buf.str();
+ }
+
void Read(double& val) {
if(singlereal) {float fval; iread(fval); val=fval;}
else iread(val);
}
};
-
+
class iobfile : public ibfile {
public:
- iobfile(const string& name) :
+ iobfile(const string& name) :
ibfile(name,true,BUPDATE,std::ios::in | std::ios::out) {}
void flush() {if(fstream) fstream->flush();}
-
+
template<class T>
void iwrite(T val) {
if(fstream) fstream->write((char *) &val,sizeof(T));
}
-
+
void write(bool val) {iwrite(val);}
void write(Int val) {
if(signedint) {
@@ -591,7 +590,7 @@ public:
}
void writeline() {}
};
-
+
class obfile : public ofile {
public:
obfile(const string& name) : ofile(name,BOUTPUT,std::ios::binary) {}
@@ -600,7 +599,7 @@ public:
void iwrite(T val) {
if(fstream) fstream->write((char *) &val,sizeof(T));
}
-
+
void write(bool val) {iwrite(val);}
void write(Int val) {
if(signedint) {
@@ -628,14 +627,14 @@ public:
write(val.gety());
write(val.getz());
}
-
+
void writeline() {}
};
-
+
#ifdef HAVE_RPC_RPC_H
class ixfile : public file {
-protected:
+protected:
xdr::ioxstream *fstream;
xdr::xios::open_mode mode;
public:
@@ -644,11 +643,12 @@ public:
file(name,check,type,true), fstream(NULL), mode(mode) {}
void open() {
+ name=locatefile(inpath(name));
fstream=new xdr::ioxstream(name.c_str(),mode);
index=processData().ixfile.add(fstream);
if(check) Check();
}
-
+
void close() {
if(fstream) {
fstream->close();
@@ -658,28 +658,28 @@ public:
processData().ixfile.remove(index);
}
}
-
+
~ixfile() {close();}
-
+
bool eof() {return fstream ? fstream->eof() : true;}
bool error() {return fstream ? fstream->fail() : true;}
void clear() {if(fstream) fstream->clear();}
-
+
void seek(Int pos, bool begin=true) {
if(!standard && fstream) {
clear();
fstream->seek(pos,begin ? xdr::xios::beg : xdr::xios::end);
}
}
-
+
size_t tell() {
- if(fstream)
+ if(fstream)
return fstream->tell();
else
return 0;
}
-
+
void Read(Int& val) {
if(signedint) {
if(singleint) {int ival=0; *fstream >> ival; val=ival;}
@@ -713,10 +713,11 @@ public:
class ioxfile : public ixfile {
public:
- ioxfile(const string& name) : ixfile(name,true,XUPDATE,xdr::xios::out) {}
+ ioxfile(const string& name) : ixfile(outpath(name),true,XUPDATE,
+ xdr::xios::out) {}
void flush() {if(fstream) fstream->flush();}
-
+
void write(Int val) {
if(signedint) {
if(singleint) *fstream << intcast(val);
@@ -740,7 +741,7 @@ public:
write(val.getz());
}
};
-
+
class oxfile : public file {
xdr::oxstream *fstream;
public:
@@ -751,7 +752,7 @@ public:
index=processData().oxfile.add(fstream);
Check();
}
-
+
void close() {
if(fstream) {
fstream->close();
@@ -761,28 +762,28 @@ public:
processData().oxfile.remove(index);
}
}
-
+
~oxfile() {close();}
-
+
bool eof() {return fstream ? fstream->eof() : true;}
bool error() {return fstream ? fstream->fail() : true;}
void clear() {if(fstream) fstream->clear();}
void flush() {if(fstream) fstream->flush();}
-
+
void seek(Int pos, bool begin=true) {
if(!standard && fstream) {
clear();
fstream->seek(pos,begin ? xdr::xios::beg : xdr::xios::end);
}
}
-
+
size_t tell() {
- if(fstream)
+ if(fstream)
return fstream->tell();
else
return 0;
}
-
+
void write(Int val) {
if(signedint) {
if(singleint) *fstream << intcast(val);
diff --git a/Build/source/utils/asymptote/flatguide.h b/Build/source/utils/asymptote/flatguide.h
index c4d5c9bce67..e960f1f8683 100644
--- a/Build/source/utils/asymptote/flatguide.h
+++ b/Build/source/utils/asymptote/flatguide.h
@@ -26,11 +26,11 @@ class flatguide
// into a path again. In the (usual) case that a cycle ends a path, the
// cached path avoids this second pass.
bool solved;
-
+
// Used by reverse(guide) to indicate the presence of an unresolved
// interior cycle.
bool precycle;
-
+
path p;
cvector<knot> nodes;
@@ -97,7 +97,7 @@ class flatguide
clearPath();
}
}
-
+
public:
flatguide()
: solved(true), precycle(false), p(), out(&open), in(&open) {}
@@ -105,11 +105,11 @@ public:
Int size() const {
return (Int) nodes.size();
}
-
+
knot Nodes(Int i) const {
return nodes[i];
}
-
+
void setTension(tension t, side s) {
update();
tref(s)=t;
@@ -152,20 +152,20 @@ public:
nodes.front().tin=tin;
}
}
-
+
void resolvecycle() {
if(!nodes.empty())
nodes.push_back(nodes.front());
}
-
+
void precyclic(bool b) {
precycle=b;
}
-
+
bool precyclic() {
return precycle;
}
-
+
// Once all information has been added, release the flat result.
simpleknotlist list(bool cycles=false) {
if(cycles && !nodes.empty()) close();
diff --git a/Build/source/utils/asymptote/fpu.h b/Build/source/utils/asymptote/fpu.h
index bf60a21dacd..7ca8df0c344 100644
--- a/Build/source/utils/asymptote/fpu.h
+++ b/Build/source/utils/asymptote/fpu.h
@@ -13,15 +13,15 @@
inline int fpu_exceptions() {
int excepts=0;
-#ifdef FE_INVALID
+#ifdef FE_INVALID
excepts |= FE_INVALID;
-#endif
+#endif
#ifdef FE_DIVBYZERO
excepts |= FE_DIVBYZERO;
-#endif
+#endif
#ifdef FE_OVERFLOW
excepts |= FE_OVERFLOW;
-#endif
+#endif
return excepts;
}
diff --git a/Build/source/utils/asymptote/frame.h b/Build/source/utils/asymptote/frame.h
index 804e89baeae..9afa4c51ec4 100644
--- a/Build/source/utils/asymptote/frame.h
+++ b/Build/source/utils/asymptote/frame.h
@@ -37,7 +37,7 @@ class frame : public gc {
: parent(new frame("<subframe of " + name + ">", 0, 0)),
numFormals(0), numLocals(1), style(INDIRECT_FRAME)
#ifdef DEBUG_FRAME
- , name(name)
+ , name(name)
#endif
{}
@@ -46,7 +46,7 @@ public:
: parent(parent), numFormals(numFormals), numLocals(0),
style(DIRECT_FRAME)
#ifdef DEBUG_FRAME
- , name(name)
+ , name(name)
#endif
{}
@@ -95,4 +95,4 @@ inline void print(ostream& out, frame *f) {
} // namespace trans
#endif
-
+
diff --git a/Build/source/utils/asymptote/fundec.cc b/Build/source/utils/asymptote/fundec.cc
index c83dd4b2345..706e83c48ef 100644
--- a/Build/source/utils/asymptote/fundec.cc
+++ b/Build/source/utils/asymptote/fundec.cc
@@ -19,11 +19,11 @@ using namespace types;
using mem::list;
varinit *Default=new definit(nullPos);
-
+
void formal::prettyprint(ostream &out, Int indent)
{
prettyname(out, keywordOnly ? "formal (keyword only)" : "formal", indent);
-
+
base->prettyprint(out, indent+1);
if (start) start->prettyprint(out, indent+1);
if (defval) defval->prettyprint(out, indent+1);
@@ -47,12 +47,12 @@ types::ty *formal::getType(coenv &e, bool tacit) {
return t;
}
-
+
void formal::addOps(coenv &e, record *r) {
base->addOps(e, r);
if (start)
start->addOps(base->trans(e, true), e, r);
-}
+}
void formals::prettyprint(ostream &out, Int indent)
{
@@ -121,7 +121,7 @@ class basicAssignExp : public exp {
varEntry *dest;
varinit *value;
public:
- basicAssignExp(position pos, varEntry *dest, varinit *value)
+ basicAssignExp(position pos, varEntry *dest, varinit *value)
: exp(pos), dest(dest), value(value) {}
void prettyprint(ostream &out, Int indent) {
@@ -139,7 +139,7 @@ public:
return getType(e);
}
};
-
+
void transDefault(coenv &e, position pos, varEntry *v, varinit *init) {
// This roughly translates into the statement
// if (isDefault(x))
@@ -250,7 +250,7 @@ void fundef::baseTrans(coenv &e, types::function *ft)
// Translate the function.
fe.e.beginScope();
params->trans(fe);
-
+
body->trans(fe);
types::ty *rt = ft->result;
@@ -279,7 +279,7 @@ types::ty *fundef::trans(coenv &e) {
// operator cannot be added before translation. (getType() is not allowed to
// manipulate the environment.)
// A new function expression is assigned to a variable, given as a return
- // value, or used as an argument to a function. In any of these
+ // value, or used as an argument to a function. In any of these
//
// We must still addOps though, for the return type and formals. ex:
//
@@ -288,7 +288,7 @@ types::ty *fundef::trans(coenv &e) {
// };
function *ft=transTypeAndAddOps(e, (record *)0, false);
assert(ft);
-
+
baseTrans(e, ft);
return ft;
@@ -313,6 +313,6 @@ void fundec::transAsField(coenv &e, record *r)
assert(ft);
createVar(getPos(), e, r, id, ft, fun.makeVarInit(ft));
-}
+}
} // namespace absyntax
diff --git a/Build/source/utils/asymptote/fundec.h b/Build/source/utils/asymptote/fundec.h
index 5dd0dab85be..ab6e3fec506 100644
--- a/Build/source/utils/asymptote/fundec.h
+++ b/Build/source/utils/asymptote/fundec.h
@@ -31,7 +31,7 @@ public:
// Build the corresponding types::formal to put into a signature.
types::formal trans(coenv &e, bool encodeDefVal, bool tacit=false);
-
+
// Add the formal parameter to the environment to prepare for the
// function body's translation.
virtual void transAsVar(coenv &e, Int index);
@@ -134,7 +134,7 @@ class fundef : public exp {
symbol id;
friend class fundec;
-
+
public:
fundef(position pos, ty *result, formals *params, stm *body)
: exp(pos), result(result), params(params), body(body), id() {}
@@ -167,7 +167,7 @@ public:
void transAsField(coenv &e, record *r);
};
-
+
} // namespace absyntax
#endif
diff --git a/Build/source/utils/asymptote/genv.cc b/Build/source/utils/asymptote/genv.cc
index 2f3a030822d..a191d525db9 100644
--- a/Build/source/utils/asymptote/genv.cc
+++ b/Build/source/utils/asymptote/genv.cc
@@ -54,9 +54,9 @@ genv::genv()
Setting("autoplain")=true;
}
-#ifdef HAVE_LIBGSL
+#ifdef HAVE_LIBGSL
imap["gsl"]=trans::getGSLModule();
-#endif
+#endif
}
bool endswith(string suffix, string str)
@@ -80,7 +80,7 @@ record *genv::loadModule(symbol id, string filename) {
em.sync();
record *r=ast->transAsFile(*this, id);
-
+
inTranslation.remove(filename);
return r;
@@ -127,7 +127,7 @@ importInitMap *genv::getInitMap()
return r ? r->getInit() : 0;
}
};
-
+
return new initMap(*this);
}
diff --git a/Build/source/utils/asymptote/glew.c b/Build/source/utils/asymptote/glew.c
index 4bdea46b606..f6b50465b9a 100644
--- a/Build/source/utils/asymptote/glew.c
+++ b/Build/source/utils/asymptote/glew.c
@@ -7,5 +7,9 @@
#endif
#ifdef HAVE_LIBGL
+#ifdef HAVE_LIBOSMESA
+#define GLEW_OSMESA
+#endif
+
#include "GL/glew.c"
#endif /* HAVE_LIBGL */
diff --git a/Build/source/utils/asymptote/glrender.cc b/Build/source/utils/asymptote/glrender.cc
index e86df78c55b..822039d934f 100644
--- a/Build/source/utils/asymptote/glrender.cc
+++ b/Build/source/utils/asymptote/glrender.cc
@@ -24,6 +24,7 @@
#include "bbox3.h"
#include "drawimage.h"
#include "interact.h"
+#include "fpu.h"
namespace gl {
#ifdef HAVE_PTHREAD
@@ -79,9 +80,6 @@ vertexBuffer triangleData;
const size_t Nbuffer=10000;
const size_t nbuffer=1000;
-
-GLuint attributeBuffer;
-GLuint indicesBuffer;
}
#endif /* HAVE_GL */
@@ -103,12 +101,15 @@ size_t Nmaterials=1;
size_t nmaterials=48;
}
+extern void exitHandler(int);
+
namespace gl {
-
+
bool outlinemode=false;
bool glthread=false;
+bool glupdate=false;
+bool glexit=false;
bool initialize=true;
-bool exporting=false;
using camp::picture;
using camp::drawRawImage;
@@ -123,7 +124,8 @@ using settings::Setting;
bool Iconify=false;
bool ignorezoom;
-int Fitscreen;
+int Fitscreen=1;
+bool firstFit;
bool queueExport=false;
bool readyAfterExport=false;
@@ -141,8 +143,6 @@ int fullWidth,fullHeight;
int Width,Height;
double oWidth,oHeight;
int screenWidth,screenHeight;
-int maxWidth;
-int maxHeight;
int maxTileWidth;
int maxTileHeight;
@@ -172,7 +172,7 @@ double *Background;
size_t Nlights=1; // Maximum number of lights compiled in shader
size_t nlights; // Actual number of lights
size_t nlights0;
-triple *Lights;
+triple *Lights;
double *Diffuse;
double *Specular;
bool antialias;
@@ -200,14 +200,12 @@ mat4 viewMat;
dmat4 dprojMat;
dmat4 dprojViewMat;
dmat4 dviewMat;
-dmat4 drotateMat;
+dmat4 drotateMat;
const double *dprojView;
const double *dView;
double BBT[9];
-GLuint ubo;
-
unsigned int framecount;
template<class T>
@@ -313,28 +311,31 @@ bool Animate;
bool Step;
#ifdef HAVE_GL
-void idle()
+
+void idle()
{
glutIdleFunc(NULL);
Xspin=Yspin=Zspin=Animate=Step=false;
}
#endif
-void home(bool webgl=false)
+void home(bool webgl=false)
{
X=Y=cx=cy=0.0;
-#ifdef HAVE_GL
+#ifdef HAVE_GL
#ifdef HAVE_LIBGLUT
- if(!webgl && !getSetting<bool>("offscreen"))
+#ifndef HAVE_LIBOSMESA
+ if(!webgl)
idle();
#endif
#endif
+#endif
dviewMat=dmat4(1.0);
dView=value_ptr(dviewMat);
viewMat=mat4(dviewMat);
-
- drotateMat=dmat4(1.0);
-
+
+ drotateMat=dmat4(1.0);
+
updateModelViewData();
remesh=true;
@@ -382,8 +383,8 @@ GLuint initHDR() {
std::vector<float> pixels(imspec.width*imspec.height*3);
imagein->read_image(pixels.data());
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, imspec.width, imspec.height, 0,
- GL_RGB, GL_FLOAT, pixels.data());
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, imspec.width, imspec.height, 0,
+ GL_RGB, GL_FLOAT, pixels.data());
glGenerateMipmap(GL_TEXTURE_2D);
imagein->close();
@@ -392,7 +393,7 @@ GLuint initHDR() {
return tex;
}
-#endif
+#endif
GLint shaderProg,shaderProgColor;
void *glrenderWrapper(void *a);
@@ -429,7 +430,7 @@ void initShaders()
{
Nlights=nlights == 0 ? 0 : max(Nlights,nlights);
Nmaterials=max(Nmaterials,nmaterials);
-
+
shaderProg=glCreateProgram();
string vs=locateFile("shaders/vertex.glsl");
string fs=locateFile("shaders/fragment.glsl");
@@ -452,7 +453,7 @@ void initShaders()
shaders.push_back(ShaderfileModePair(fs.c_str(),GL_FRAGMENT_SHADER));
if(orthographic)
shaderParams.push_back("ORTHOGRAPHIC");
-
+
shaderParams.push_back("WIDTH");
camp::pixelShader=compileAndLinkShader(shaders,Nlights,Nmaterials,
shaderParams);
@@ -469,7 +470,7 @@ void initShaders()
shaderParams);
}
-void deleteShaders()
+void deleteShaders()
{
glDeleteProgram(camp::transparentShader);
glDeleteProgram(camp::colorShader);
@@ -479,10 +480,6 @@ void deleteShaders()
void setBuffers()
{
- glGenBuffers(1,&camp::attributeBuffer);
- glGenBuffers(1,&camp::indicesBuffer);
- glGenBuffers(1,&ubo);
-
GLuint vao;
glGenVertexArrays(1,&vao);
glBindVertexArray(vao);
@@ -498,14 +495,14 @@ void drawscene(int Width, int Height)
{
#ifdef HAVE_PTHREAD
static bool first=true;
- if(glthread && first && !getSetting<bool>("offscreen")) {
+ if(glthread && first) {
wait(initSignal,initLock);
endwait(initSignal,initLock);
first=false;
}
#endif
- if((nlights == 0 && Nlights > 0) || nlights > Nlights ||
+ if((nlights == 0 && Nlights > 0) || nlights > Nlights ||
nmaterials > Nmaterials) {
deleteShaders();
initShaders();
@@ -517,19 +514,19 @@ void drawscene(int Width, int Height)
triple m(xmin,ymin,zmin);
triple M(xmax,ymax,zmax);
double perspective=orthographic ? 0.0 : 1.0/zmax;
-
+
double size2=hypot(Width,Height);
-
+
if(remesh)
camp::drawElement::center.clear();
-
+
Picture->render(size2,m,M,perspective,remesh);
-
+
if(!outlinemode) remesh=false;
}
// Return x divided by y rounded up to the nearest integer.
-int Quotient(int x, int y)
+int Quotient(int x, int y)
{
return (x+y-1)/y;
}
@@ -547,8 +544,8 @@ void Export()
int width=Quotient(fullWidth,Quotient(fullWidth,min(maxTileWidth,Width)));
int height=Quotient(fullHeight,Quotient(fullHeight,
min(maxTileHeight,Height)));
- if(settings::verbose > 1)
- cout << "Exporting " << Prefix << " as " << fullWidth << "x"
+ if(settings::verbose > 1)
+ cout << "Exporting " << Prefix << " as " << fullWidth << "x"
<< fullHeight << " image" << " using tiles of size "
<< width << "x" << height << endl;
@@ -559,19 +556,16 @@ void Export()
setDimensions(fullWidth,fullHeight,X/Width*fullWidth,Y/Width*fullWidth);
(orthographic ? trOrtho : trFrustum)(tr,xmin,xmax,ymin,ymax,-zmax,-zmin);
-
+
size_t count=0;
- exporting=true;
do {
trBeginTile(tr);
+ remesh=true;
drawscene(fullWidth,fullHeight);
++count;
} while (trEndTile(tr));
- exporting=false;
-
if(settings::verbose > 1)
- cout << count << " tile" << (count != 1 ? "s" : "") << " drawn"
- << endl;
+ cout << count << " tile" << (count != 1 ? "s" : "") << " drawn" << endl;
trDelete(tr);
picture pic;
@@ -588,24 +582,26 @@ void Export()
pic.shipout(NULL,Prefix,Format,false,View);
delete Image;
delete[] data;
- }
+ }
} catch(handled_error) {
} catch(std::bad_alloc&) {
outOfMemory();
}
+ remesh=true;
setProjection();
- bool offscreen=getSetting<bool>("offscreen");
+
+#ifndef HAVE_LIBOSMESA
#ifdef HAVE_LIBGLUT
- if(!offscreen)
- glutPostRedisplay();
+ glutPostRedisplay();
#endif
#ifdef HAVE_PTHREAD
- if(glthread && readyAfterExport && !offscreen) {
- readyAfterExport=false;
+ if(glthread && readyAfterExport) {
+ readyAfterExport=false;
endwait(readySignal,readyLock);
}
#endif
+#endif
}
void nodisplay()
@@ -628,14 +624,12 @@ inline unsigned int floorpow2(unsigned int n)
return n-(n >> 1);
}
-void quit()
+void quit()
{
#ifdef HAVE_LIBOSMESA
- if(getSetting<bool>("offscreen")) {
- if(osmesa_buffer) delete[] osmesa_buffer;
- if(ctx) OSMesaDestroyContext(ctx);
- exit(0);
- }
+ if(osmesa_buffer) delete[] osmesa_buffer;
+ if(ctx) OSMesaDestroyContext(ctx);
+ exit(0);
#endif
#ifdef HAVE_LIBGLUT
if(glthread) {
@@ -650,7 +644,7 @@ void quit()
glutDisplayFunc(nodisplay);
endwait(readySignal,readyLock);
}
-#endif
+#endif
if(interact::interactive)
glutHideWindow();
} else {
@@ -659,8 +653,8 @@ void quit()
}
#endif
}
-
-void mode()
+
+void mode()
{
remesh=true;
switch(Mode) {
@@ -683,22 +677,23 @@ void mode()
break;
}
#ifdef HAVE_LIBGLUT
- if(!getSetting<bool>("offscreen"))
- glutPostRedisplay();
+#ifndef HAVE_LIBOSMESA
+ glutPostRedisplay();
+#endif
#endif
}
// GUI-related functions
#ifdef HAVE_LIBGLUT
-bool capsize(int& width, int& height)
+bool capsize(int& width, int& height)
{
bool resize=false;
- if(width > maxWidth) {
- width=maxWidth;
+ if(width > screenWidth) {
+ width=screenWidth;
resize=true;
}
- if(height > maxHeight) {
- height=maxHeight;
+ if(height > screenHeight) {
+ height=screenHeight;
resize=true;
}
return resize;
@@ -708,14 +703,14 @@ void reshape0(int width, int height)
{
X=(X/Width)*width;
Y=(Y/Height)*height;
-
+
Width=width;
Height=height;
-
+
setProjection();
glViewport(0,0,Width,Height);
}
-
+
void windowposition(int& x, int& y, int width=Width, int height=Height)
{
pair z=getSetting<pair>("position");
@@ -734,21 +729,44 @@ void windowposition(int& x, int& y, int width=Width, int height=Height)
void setsize(int w, int h, bool reposition=true)
{
int x,y;
-
+
capsize(w,h);
if(reposition) {
windowposition(x,y,w,h);
glutPositionWindow(x,y);
- }
+ } else
+ glutPositionWindow(max(glutGet(GLUT_WINDOW_X)-2,0),
+ max(glutGet(GLUT_WINDOW_Y)-2,0));
+
glutReshapeWindow(w,h);
reshape0(w,h);
glutPostRedisplay();
}
-void fullscreen(bool reposition=true)
+void capzoom()
+{
+ static double maxzoom=sqrt(DBL_MAX);
+ static double minzoom=1.0/maxzoom;
+ if(Zoom <= minzoom) Zoom=minzoom;
+ if(Zoom >= maxzoom) Zoom=maxzoom;
+
+ if(Zoom != lastzoom) remesh=true;
+ lastzoom=Zoom;
+}
+
+void fullscreen(bool reposition=true)
{
Width=screenWidth;
Height=screenHeight;
+ if(firstFit) {
+ if(Width < Height*Aspect)
+ Zoom *= Width/(Height*Aspect);
+ capzoom();
+ setProjection();
+ firstFit=false;
+ }
+ Xfactor=((double) screenHeight)/Height;
+ Yfactor=((double) screenWidth)/Width;
reshape0(Width,Height);
if(reposition)
glutPositionWindow(0,0);
@@ -756,45 +774,46 @@ void fullscreen(bool reposition=true)
glutPostRedisplay();
}
-void fitscreen(bool reposition=true)
+void fitscreen(bool reposition=true)
{
if(Animate && Fitscreen == 2) Fitscreen=0;
switch(Fitscreen) {
case 0: // Original size
{
Xfactor=Yfactor=1.0;
- setsize(oldWidth,oldHeight,reposition);
+ double pixelRatio=getSetting<double>("devicepixelratio");
+ setsize(oldWidth*pixelRatio,oldHeight*pixelRatio,reposition);
break;
}
case 1: // Fit to screen in one dimension
- {
+ {
oldWidth=Width;
oldHeight=Height;
int w=screenWidth;
int h=screenHeight;
- if(w >= h*Aspect) w=(int) (h*Aspect+0.5);
- else h=(int) (w/Aspect+0.5);
+ if(w > h*Aspect)
+ w=min((int) ceil(h*Aspect),w);
+ else
+ h=min((int) ceil(w/Aspect),h);
setsize(w,h,reposition);
break;
}
case 2: // Full screen
{
- Xfactor=((double) screenHeight)/Height;
- Yfactor=((double) screenWidth)/Width;
fullscreen(reposition);
break;
}
}
}
-void togglefitscreen()
+void togglefitscreen()
{
++Fitscreen;
if(Fitscreen > 2) Fitscreen=0;
fitscreen();
}
-void initTimer()
+void initTimer()
{
gettimeofday(&lasttime,NULL);
gettimeofday(&lastframetime,NULL);
@@ -812,11 +831,11 @@ void screen()
fitscreen(false);
}
-void nextframe(int)
+void nextframe(int)
{
#ifdef HAVE_PTHREAD
endwait(readySignal,readyLock);
-#endif
+#endif
double framedelay=getSetting<double>("framedelay");
if(framedelay > 0)
usleep((unsigned int) (1000.0*framedelay+0.5));
@@ -830,7 +849,7 @@ void display()
queueScreen=false;
}
- bool fps=settings::verbose > 2;
+ bool fps=settings::verbose > 2;
drawscene(Width,Height);
if(fps) {
if(framecount < 10) // Measure steady-state framerate
@@ -840,7 +859,7 @@ void display()
if(s > 0.0) {
double rate=1.0/s;
S.add(rate);
- cout << "FPS=" << rate << "\t" << S.mean() << " +/- " << S.stdev()
+ cout << "FPS=" << rate << "\t" << S.mean() << " +/- " << S.stdev()
<< endl;
}
}
@@ -868,7 +887,7 @@ void display()
if(queueExport) {
Export();
queueExport=false;
- }
+ }
if(!glthread) {
if(Oldpid != 0 && waitpid(Oldpid,NULL,WNOHANG) != Oldpid) {
kill(Oldpid,SIGHUP);
@@ -877,7 +896,7 @@ void display()
}
}
-void update()
+void update()
{
glutDisplayFunc(display);
Animate=getSetting<bool>("autoplay");
@@ -886,7 +905,7 @@ void update()
lastzoom=Zoom;
double cz=0.5*(zmin+zmax);
-
+
dviewMat=translate(translate(dmat4(1.0),dvec3(cx,cy,cz))*drotateMat,
dvec3(0,0,-cz));
dView=value_ptr(dviewMat);
@@ -894,20 +913,34 @@ void update()
setProjection();
updateModelViewData();
-
+
glutPostRedisplay();
}
void updateHandler(int)
{
queueScreen=true;
+ remesh=true;
update();
if(interact::interactive || !Animate) {
glutShowWindow();
}
}
-void animate()
+void poll(int)
+{
+ if(glupdate) {
+ updateHandler(0);
+ glupdate=false;
+ }
+ if(glexit) {
+ exitHandler(0);
+ glexit=false;
+ }
+ glutTimerFunc(100.0,poll,0);
+}
+
+void animate()
{
Animate=!Animate;
if(Animate) {
@@ -928,14 +961,14 @@ void reshape(int width, int height)
Signal(SIGUSR1,updateHandler);
}
}
-
+
if(capsize(width,height))
glutReshapeWindow(width,height);
-
+
reshape0(width,height);
remesh=true;
}
-
+
void shift(int x, int y)
{
double Zoominv=1.0/Zoom;
@@ -944,7 +977,7 @@ void shift(int x, int y)
x0=x; y0=y;
update();
}
-
+
void pan(int x, int y)
{
if(orthographic) {
@@ -958,17 +991,6 @@ void pan(int x, int y)
x0=x; y0=y;
update();
}
-
-void capzoom()
-{
- static double maxzoom=sqrt(DBL_MAX);
- static double minzoom=1.0/maxzoom;
- if(Zoom <= minzoom) Zoom=minzoom;
- if(Zoom >= maxzoom) Zoom=maxzoom;
-
- if(Zoom != lastzoom) remesh=true;
- lastzoom=Zoom;
-}
void zoom(int x, int y)
{
@@ -987,8 +1009,8 @@ void zoom(int x, int y)
}
}
}
-
-void mousewheel(int wheel, int direction, int x, int y)
+
+void mousewheel(int wheel, int direction, int x, int y)
{
double zoomFactor=getSetting<double>("zoomfactor");
if(zoomFactor > 0.0) {
@@ -1005,17 +1027,15 @@ void mousewheel(int wheel, int direction, int x, int y)
struct arcball {
double angle;
triple axis;
-
+
arcball(double x0, double y0, double x, double y) {
triple v0=norm(x0,y0);
triple v1=norm(x,y);
double Dot=dot(v0,v1);
- if(Dot > 1.0) Dot=1.0;
- else if(Dot < -1.0) Dot=-1.0;
- angle=acos(Dot);
+ angle=Dot > 1.0 ? 0.0 : Dot < -1.0 ? pi : acos(Dot);
axis=unit(cross(v0,v1));
}
-
+
triple norm(double x, double y) {
double norm=hypot(x,y);
if(norm > 1.0) {
@@ -1047,13 +1067,13 @@ void rotate(int x, int y)
update();
}
}
-
-double Degrees(int x, int y)
+
+double Degrees(int x, int y)
{
return atan2(0.5*Height-y-Y,x-0.5*Width-X)*degrees;
}
-void rotateX(double step)
+void rotateX(double step)
{
dmat4 tmpRot(1.0);
tmpRot=glm::rotate(tmpRot,glm::radians(step),dvec3(1,0,0));
@@ -1061,7 +1081,7 @@ void rotateX(double step)
update();
}
-void rotateY(double step)
+void rotateY(double step)
{
dmat4 tmpRot(1.0);
tmpRot=glm::rotate(tmpRot,glm::radians(step),dvec3(0,1,0));
@@ -1069,7 +1089,7 @@ void rotateY(double step)
update();
}
-void rotateZ(double step)
+void rotateZ(double step)
{
dmat4 tmpRot(1.0);
tmpRot=glm::rotate(tmpRot,glm::radians(step),dvec3(0,0,1));
@@ -1106,7 +1126,7 @@ void rotateZ(int x, int y)
#define GLUT_WHEEL_DOWN 4
#endif
-string action(int button, int mod)
+string action(int button, int mod)
{
size_t Button;
size_t nButtons=5;
@@ -1129,7 +1149,7 @@ string action(int button, int mod)
default:
Button=nButtons;
}
-
+
size_t Mod;
size_t nMods=4;
switch(mod) {
@@ -1148,7 +1168,7 @@ string action(int button, int mod)
default:
Mod=nMods;
}
-
+
if(Button < nButtons) {
array *left=getSetting<array *>("leftbutton");
array *middle=getSetting<array *>("middlebutton");
@@ -1177,13 +1197,13 @@ void mouse(int button, int state, int x, int y)
glutMotionFunc(NULL);
mousewheel(0,1,x,y);
return;
- }
+ }
if(Action == "zoomout") {
glutMotionFunc(NULL);
mousewheel(0,-1,x,y);
return;
- }
-
+ }
+
if(state == GLUT_DOWN) {
if(Action == "rotate") {
x0=x; y0=y;
@@ -1208,11 +1228,11 @@ void mouse(int button, int state, int x, int y)
glutMotionFunc(rotateZ);
}
} else {
- glutMotionFunc(NULL);
+ glutMotionFunc(NULL);
}
}
-double spinstep()
+double spinstep()
{
timeval tv;
gettimeofday(&tv,NULL);
@@ -1238,14 +1258,14 @@ void zspin()
rotateZ(spinstep());
}
-void expand()
+void expand()
{
double resizeStep=getSetting<double>("resizestep");
if(resizeStep > 0.0)
setsize((int) (Width*resizeStep+0.5),(int) (Height*resizeStep+0.5));
}
-void shrink()
+void shrink()
{
double resizeStep=getSetting<double>("resizestep");
if(resizeStep > 0.0)
@@ -1253,7 +1273,7 @@ void shrink()
max((int) (Height/resizeStep+0.5),1));
}
-void spinx()
+void spinx()
{
if(Xspin)
idle();
@@ -1289,19 +1309,20 @@ void spinz()
void showCamera()
{
projection P=camera();
+ string projection=P.orthographic ? "orthographic(" : "perspective(";
+ string indent(2+projection.length(),' ');
cout << endl
- << "currentprojection="
- << (P.orthographic ? "orthographic(" : "perspective(") << endl
- << "camera=" << P.camera << "," << endl
- << "up=" << P.up << "," << endl
- << "target=" << P.target << "," << endl
- << "zoom=" << P.zoom;
+ << "currentprojection=" << endl << " "
+ << projection << "camera=" << P.camera << "," << endl
+ << indent << "up=" << P.up << "," << endl
+ << indent << "target=" << P.target << "," << endl
+ << indent << "zoom=" << P.zoom;
if(!orthographic)
- cout << "," << endl << "angle=" << P.angle;
+ cout << "," << endl << indent << "angle=" << P.angle;
if(P.viewportshift != pair(0.0,0.0))
- cout << "," << endl << "viewportshift=" << P.viewportshift*Zoom;
+ cout << "," << endl << indent << "viewportshift=" << P.viewportshift*Zoom;
if(!orthographic)
- cout << "," << endl << "autoadjust=false";
+ cout << "," << endl << indent << "autoadjust=false";
cout << ");" << endl;
}
@@ -1368,7 +1389,7 @@ void keyboard(unsigned char key, int x, int y)
break;
}
}
-
+
void setosize()
{
oldWidth=(int) ceil(oWidth);
@@ -1379,18 +1400,22 @@ void setosize()
void exportHandler(int=0)
{
-#ifdef HAVE_LIBGLUT
- bool offscreen=getSetting<bool>("offscreen");
- if(!Iconify && !offscreen)
+#ifdef HAVE_LIBGLUT
+#ifndef HAVE_LIBOSMESA
+ if(!Iconify)
glutShowWindow();
-#endif
+#endif
+#endif
readyAfterExport=true;
Export();
-#ifdef HAVE_LIBGLUT
- if(!Iconify && !offscreen)
+
+#ifdef HAVE_LIBGLUT
+#ifndef HAVE_LIBOSMESA
+ if(!Iconify)
glutHideWindow();
-#endif
glutDisplayFunc(nodisplay);
+#endif
+#endif
}
static bool glinitialize=true;
@@ -1398,9 +1423,9 @@ static bool glinitialize=true;
projection camera(bool user)
{
if(glinitialize) return projection();
-
+
camp::Triple vCamera,vUp,vTarget;
-
+
double cz=0.5*(zmin+zmax);
double *Rotate=value_ptr(drotateMat);
@@ -1436,14 +1461,14 @@ projection camera(bool user)
vTarget[i]=R3-cx*R0-cy*R1;
}
}
-
+
return projection(orthographic,vCamera,vUp,vTarget,Zoom,
2.0*atan(tan(0.5*Angle)/Zoom)/radians,
pair(X/Width+Shift.getx(),
Y/Height+Shift.gety()));
}
-void init()
+void init()
{
#ifdef HAVE_LIBGLUT
mem::vector<string> cmd;
@@ -1456,9 +1481,12 @@ void init()
#ifndef __APPLE__
glutInitContextProfile(GLUT_CORE_PROFILE);
-#endif
+#endif
+ fpu_trap(false); // Work around FE_INVALID
glutInit(&argc,argv);
+ fpu_trap(settings::trap());
+
screenWidth=glutGet(GLUT_SCREEN_WIDTH);
screenHeight=glutGet(GLUT_SCREEN_HEIGHT);
#endif
@@ -1468,7 +1496,7 @@ void init_osmesa()
{
#ifdef HAVE_LIBOSMESA
// create context and buffer
- if(settings::verbose > 1)
+ if(settings::verbose > 1)
cout << "Allocating osmesa_buffer of size " << screenWidth << "x"
<< screenHeight << "x4x" << sizeof(GLubyte) << endl;
osmesa_buffer=new unsigned char[screenWidth*screenHeight*4*sizeof(GLubyte)];
@@ -1482,7 +1510,7 @@ void init_osmesa()
cerr << "OSMesaCreateContext failed." << endl;
exit(-1);
}
-
+
if(!OSMesaMakeCurrent(ctx,osmesa_buffer,GL_UNSIGNED_BYTE,
screenWidth,screenHeight )) {
cerr << "OSMesaMakeCurrent failed." << endl;
@@ -1493,10 +1521,10 @@ void init_osmesa()
glGetIntegerv(GL_DEPTH_BITS,&z);
glGetIntegerv(GL_STENCIL_BITS,&s);
glGetIntegerv(GL_ACCUM_RED_BITS,&a);
- if(settings::verbose > 1)
- cout << "Offscreen context settings: Depth=" << z << " Stencil=" << s
+ if(settings::verbose > 1)
+ cout << "Offscreen context settings: Depth=" << z << " Stencil=" << s
<< " Accum=" << a << endl;
-
+
if(z <= 0) {
cerr << "Error initializing offscreen context: Depth=" << z << endl;
exit(-1);
@@ -1516,17 +1544,14 @@ void glrender(const string& prefix, const picture *pic, const string& format,
{
Iconify=getSetting<bool>("iconify");
- width=max(width,1.0);
- height=max(height,1.0);
-
if(zoom == 0.0) zoom=1.0;
-
+
Prefix=prefix;
Picture=pic;
Format=format;
-
+
nlights0=nlights=nlightsin;
-
+
Lights=lights;
Diffuse=diffuse;
Specular=specular;
@@ -1537,21 +1562,21 @@ void glrender(const string& prefix, const picture *pic, const string& format,
Shift=shift/zoom;
Margin=margin;
Background=background;
-
+
Xmin=m.getx();
Xmax=M.getx();
Ymin=m.gety();
Ymax=M.gety();
zmin=m.getz();
zmax=M.getz();
-
+
orthographic=Angle == 0.0;
H=orthographic ? 0.0 : -tan(0.5*Angle)*zmax;
-
+
ignorezoom=false;
Mode=0;
Xfactor=Yfactor=1.0;
-
+
pair maxtile=getSetting<pair>("maxtile");
maxTileWidth=(int) maxtile.getx();
maxTileHeight=(int) maxtile.gety();
@@ -1559,33 +1584,38 @@ void glrender(const string& prefix, const picture *pic, const string& format,
if(maxTileHeight <= 0) maxTileHeight=768;
bool webgl=Format == "html";
-
-#ifdef HAVE_GL
+
+#ifdef HAVE_GL
#ifdef HAVE_PTHREAD
+#ifndef HAVE_LIBOSMESA
static bool initializedView=false;
-#endif
-
- bool offscreen=getSetting<bool>("offscreen");
- if(offscreen && !webgl) {
+#endif
+#endif
+
+#ifdef HAVE_LIBOSMESA
+ if(!webgl) {
screenWidth=maxTileWidth;
screenHeight=maxTileHeight;
static bool osmesa_initialized=false;
if(!osmesa_initialized) {
osmesa_initialized=true;
+ fpu_trap(false); // Work around FE_INVALID.
init_osmesa();
+ fpu_trap(settings::trap());
}
}
-
+#else
if(glinitialize) {
if(!webgl) init();
Fitscreen=1;
}
#endif
+#endif
static bool initialized=false;
- if(!(initialized && (interact::interactive ||
+ if(!(initialized && (interact::interactive ||
getSetting<bool>("animating")))) {
antialias=getSetting<Int>("antialias") > 1;
double expand;
@@ -1597,148 +1627,161 @@ void glrender(const string& prefix, const picture *pic, const string& format,
expand *= (Format.empty() || Format == "eps" || Format == "pdf") ? -2.0 : -1.0;
if(antialias) expand *= 2.0;
}
-
+
oWidth=width;
oHeight=height;
Aspect=width/height;
-
+
// Force a hard viewport limit to work around direct rendering bugs.
// Alternatively, one can use -glOptions=-indirect (with a performance
// penalty).
pair maxViewport=getSetting<pair>("maxviewport");
- maxWidth=(int) ceil(maxViewport.getx());
- maxHeight=(int) ceil(maxViewport.gety());
+ int maxWidth=maxViewport.getx() > 0 ? (int) ceil(maxViewport.getx()) :
+ screenWidth;
+ int maxHeight=maxViewport.gety() > 0 ? (int) ceil(maxViewport.gety()) :
+ screenHeight;
if(maxWidth <= 0) maxWidth=max(maxHeight,2);
if(maxHeight <= 0) maxHeight=max(maxWidth,2);
-
+
+ if(screenWidth <= 0) screenWidth=maxWidth;
+ else screenWidth=min(screenWidth,maxWidth);
+ if(screenHeight <= 0) screenHeight=maxHeight;
+ else screenHeight=min(screenHeight,maxHeight);
+
fullWidth=(int) ceil(expand*width);
fullHeight=(int) ceil(expand*height);
-
+
if(webgl) {
Width=fullWidth;
Height=fullHeight;
} else {
- if(screenWidth <= 0) screenWidth=maxWidth;
- else screenWidth=min(screenWidth,maxWidth);
- if(screenHeight <= 0) screenHeight=maxHeight;
- else screenHeight=min(screenHeight,maxHeight);
-
Width=min(fullWidth,screenWidth);
Height=min(fullHeight,screenHeight);
-
- if(Width > Height*Aspect)
+
+ if(Width > Height*Aspect)
Width=min((int) (ceil(Height*Aspect)),screenWidth);
- else
+ else
Height=min((int) (ceil(Width/Aspect)),screenHeight);
}
-
+
home(webgl);
setProjection();
if(webgl) return;
-
+
ArcballFactor=1+8.0*hypot(Margin.getx(),Margin.gety())/hypot(Width,Height);
-#ifdef HAVE_GL
+#ifdef HAVE_GL
for(int i=0; i < 16; ++i)
T[i]=t[i];
-
- remesh=true;
+
Aspect=((double) Width)/Height;
if(maxTileWidth <= 0) maxTileWidth=screenWidth;
if(maxTileHeight <= 0) maxTileHeight=screenHeight;
-#ifdef HAVE_LIBGLUT
+#ifdef HAVE_LIBGLUT
setosize();
#endif
-
+
if(View && settings::verbose > 1)
cout << "Rendering " << stripDir(prefix) << " as "
<< Width << "x" << Height << " image" << endl;
-#endif
+#endif
}
-#ifdef HAVE_GL
- bool havewindow=initialized && glthread && !offscreen;
-
-#ifdef HAVE_LIBGLUT
+#ifdef HAVE_GL
+ bool havewindow=initialized && glthread;
+
+#ifndef HAVE_LIBOSMESA
+#ifdef HAVE_LIBGLUT
unsigned int displaymode=GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH;
-#endif
-
+#endif
+
#ifdef __APPLE__
displaymode |= GLUT_3_2_CORE_PROFILE;
-#endif
-
+#endif
+#endif
+
camp::clearMaterialBuffer();
-
+
+#ifndef HAVE_LIBOSMESA
+
#ifdef HAVE_PTHREAD
- if(glthread && initializedView && !offscreen) {
- if(!View)
- readyAfterExport=queueExport=true;
- pthread_kill(mainthread,SIGUSR1);
+ if(glthread && initializedView) {
+ if(View) {
+#ifdef __MSDOS__ // Signals are unreliable in MSWindows
+ glupdate=true;
+#else
+ pthread_kill(mainthread,SIGUSR1);
+#endif
+ } else readyAfterExport=queueExport=true;
return;
}
-#endif
-
+#endif
+
#ifdef HAVE_LIBGLUT
- if(!offscreen) {
- if(View) {
- int x,y;
- if(havewindow)
- glutDestroyWindow(window);
-
- windowposition(x,y);
- glutInitWindowPosition(x,y);
- glutInitWindowSize(1,1);
- Int multisample=getSetting<Int>("multisample");
- if(multisample <= 1) multisample=0;
- if(multisample)
- displaymode |= GLUT_MULTISAMPLE;
- glutInitDisplayMode(displaymode);
-
- int samples;
+ if(View) {
+ int x,y;
+ if(havewindow)
+ glutDestroyWindow(window);
+
+ windowposition(x,y);
+ glutInitWindowPosition(x,y);
+ glutInitWindowSize(1,1);
+ Int multisample=getSetting<Int>("multisample");
+ if(multisample <= 1) multisample=0;
+ if(multisample)
+ displaymode |= GLUT_MULTISAMPLE;
+ glutInitDisplayMode(displaymode);
+
+ int samples;
#ifdef FREEGLUT
#ifdef GLUT_INIT_MAJOR_VERSION
- while(true) {
- if(multisample > 0)
- glutSetOption(GLUT_MULTISAMPLE,multisample);
-#endif
-#endif
- string title=string(settings::PROGRAM)+": "+prefix;
- window=glutCreateWindow(title.c_str());
-
- GLint samplebuf[1];
- glGetIntegerv(GL_SAMPLES,samplebuf);
- samples=samplebuf[0];
+ while(true) {
+ if(multisample > 0)
+ glutSetOption(GLUT_MULTISAMPLE,multisample);
+#endif
+#endif
+ string title=string(settings::PROGRAM)+": "+prefix;
+ fpu_trap(false); // Work around FE_INVALID
+ window=glutCreateWindow(title.c_str());
+ fpu_trap(settings::trap());
+
+ GLint samplebuf[1];
+ glGetIntegerv(GL_SAMPLES,samplebuf);
+ samples=samplebuf[0];
#ifdef FREEGLUT
#ifdef GLUT_INIT_MAJOR_VERSION
- if(samples < multisample) {
- multisample=floorpow2(multisample-1);
- if(multisample > 1) {
- glutReshapeWindow(1,1);
- glutDisplayFunc(destroywindow);
- glutShowWindow();
- glutMainLoopEvent();
- continue;
- }
+ if(samples < multisample) {
+ multisample=floorpow2(multisample-1);
+ if(multisample > 1) {
+ glutReshapeWindow(1,1);
+ glutDisplayFunc(destroywindow);
+ glutShowWindow();
+ glutMainLoopEvent();
+ continue;
}
- break;
}
-#endif
-#endif
- if(settings::verbose > 1 && samples > 1)
- cout << "Multisampling enabled with sample width " << samples
- << endl;
- glutDisplayFunc(display);
- glutShowWindow();
- } else if(!havewindow) {
- glutInitWindowSize(maxTileWidth,maxTileHeight);
- glutInitDisplayMode(displaymode);
- window=glutCreateWindow("");
- glutHideWindow();
+ break;
}
+#endif
+#endif
+ if(settings::verbose > 1 && samples > 1)
+ cout << "Multisampling enabled with sample width " << samples
+ << endl;
+ glutDisplayFunc(display);
+ glutShowWindow();
+ } else if(!havewindow) {
+ glutInitWindowSize(maxTileWidth,maxTileHeight);
+ glutInitDisplayMode(displaymode);
+ fpu_trap(false); // Work around FE_INVALID
+ window=glutCreateWindow("");
+ fpu_trap(settings::trap());
+ glutHideWindow();
}
#endif // HAVE_LIBGLUT
+#endif // HAVE_LIBOSMESA
+
initialized=true;
GLint val;
@@ -1754,25 +1797,26 @@ void glrender(const string& prefix, const picture *pic, const string& format,
cerr << "GLEW initialization error." << endl;
exit(-1);
}
-
+
initShaders();
setBuffers();
}
-
+
glClearColor(Background[0],Background[1],Background[2],Background[3]);
-
+
#ifdef HAVE_LIBGLUT
- if(!offscreen) {
- Animate=getSetting<bool>("autoplay") && glthread;
-
- if(View) {
- if(!getSetting<bool>("fitscreen"))
- Fitscreen=0;
- fitscreen();
- setosize();
- }
+#ifndef HAVE_LIBOSMESA
+ Animate=getSetting<bool>("autoplay") && glthread;
+
+ if(View) {
+ if(!getSetting<bool>("fitscreen"))
+ Fitscreen=0;
+ firstFit=true;
+ fitscreen();
+ setosize();
}
#endif
+#endif
glEnable(GL_BLEND);
glEnable(GL_DEPTH_TEST);
@@ -1780,26 +1824,37 @@ void glrender(const string& prefix, const picture *pic, const string& format,
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
mode();
-
- if(View && !offscreen) {
+
+#ifdef HAVE_LIBOSMESA
+ View=false;
+#endif
+
+ if(View) {
#ifdef HAVE_LIBGLUT
#ifdef HAVE_PTHREAD
+#ifndef HAVE_LIBOSMESA
initializedView=true;
-#endif
+#endif
+#endif
glutReshapeFunc(reshape);
glutKeyboardFunc(keyboard);
glutMouseFunc(mouse);
glutDisplayFunc(display);
+#ifdef __MSDOS__
+ if(glthread && interact::interactive)
+ poll(0);
+#endif
+
glutMainLoop();
#endif // HAVE_LIBGLUT
} else {
- if(glthread && !offscreen) {
+ if(glthread) {
if(havewindow) {
readyAfterExport=true;
#ifdef HAVE_PTHREAD
pthread_kill(mainthread,SIGUSR1);
-#endif
+#endif
} else {
initialized=true;
readyAfterExport=true;
@@ -1811,8 +1866,8 @@ void glrender(const string& prefix, const picture *pic, const string& format,
quit();
}
}
-
-#endif /* HAVE_GL */
+
+#endif /* HAVE_GL */
}
} // namespace gl
@@ -1827,34 +1882,39 @@ string getLightIndex(size_t const& index, string const& fieldName) {
ostringstream buf;
buf << "lights[" << index << "]." << fieldName;
return Strdup(buf.str());
-}
+}
string getCenterIndex(size_t const& index) {
ostringstream buf;
buf << "Centers[" << index << "]";
return Strdup(buf.str());
-}
+}
template<class T>
-void registerBuffer(const std::vector<T>& buffervector, GLuint bufferIndex,
- GLint type=GL_ARRAY_BUFFER) {
+void registerBuffer(const std::vector<T>& buffervector, GLuint& bufferIndex,
+ bool copy, GLenum type=GL_ARRAY_BUFFER) {
if(!buffervector.empty()) {
+ if(bufferIndex == 0) {
+ glGenBuffers(1,&bufferIndex);
+ copy=true;
+ }
glBindBuffer(type,bufferIndex);
- glBufferData(type,buffervector.size()*sizeof(T),
- buffervector.data(),GL_STATIC_DRAW);
+ if(copy)
+ glBufferData(type,buffervector.size()*sizeof(T),
+ buffervector.data(),GL_STATIC_DRAW);
}
}
-void setUniforms(const vertexBuffer& data, GLint shader)
+void setUniforms(vertexBuffer& data, GLint shader)
{
bool normal=shader != pixelShader;
-
+
if(shader != gl::lastshader) {
glUseProgram(shader);
gl::lastshader=shader;
-
+
glUniform1i(glGetUniformLocation(shader,"nlights"),gl::nlights);
-
+
for(size_t i=0; i < gl::nlights; ++i) {
triple Lighti=gl::Lights[i];
size_t i4=4*i;
@@ -1871,7 +1931,7 @@ void setUniforms(const vertexBuffer& data, GLint shader)
#if HAVE_LIBOPENIMAGEIO
// textures
- if (settings::getSetting<bool>("envmap")) {
+ if (settings::getSetting<bool>("envmap")) {
glActiveTexture(GL_TEXTURE1);
glBindBuffer(GL_TEXTURE_2D, gl::envMapBuf);
glUniform1i(glGetUniformLocation(shader, "environmentMap"), 1);
@@ -1879,16 +1939,17 @@ void setUniforms(const vertexBuffer& data, GLint shader)
}
#endif
}
-
+
GLuint binding=0;
GLint blockindex=glGetUniformBlockIndex(shader,"MaterialBuffer");
glUniformBlockBinding(shader,blockindex,binding);
- registerBuffer(data.materials,gl::ubo,GL_UNIFORM_BUFFER);
- glBindBufferBase(GL_UNIFORM_BUFFER,binding,gl::ubo);
-
+ bool copy=gl::remesh || data.partial || !data.rendered;
+ registerBuffer(data.materials,data.materialsBuffer,copy,GL_UNIFORM_BUFFER);
+ glBindBufferBase(GL_UNIFORM_BUFFER,binding,data.materialsBuffer);
+
glUniformMatrix4fv(glGetUniformLocation(shader,"projViewMat"),1,GL_FALSE,
value_ptr(gl::projViewMat));
-
+
glUniformMatrix4fv(glGetUniformLocation(shader,"viewMat"),1,GL_FALSE,
value_ptr(gl::viewMat));
if(normal)
@@ -1899,30 +1960,30 @@ void setUniforms(const vertexBuffer& data, GLint shader)
void drawBuffer(vertexBuffer& data, GLint shader)
{
if(data.indices.empty()) return;
-
+
bool normal=shader != pixelShader;
bool color=shader == colorShader || shader == transparentShader;
-
+
const size_t size=sizeof(GLfloat);
const size_t intsize=sizeof(GLint);
const size_t bytestride=color ? sizeof(VertexData) :
(normal ? sizeof(vertexData) : sizeof(vertexData0));
- if(color) registerBuffer(data.Vertices,attributeBuffer);
- else if(normal) registerBuffer(data.vertices,attributeBuffer);
- else registerBuffer(data.vertices0,attributeBuffer);
-
- registerBuffer(data.indices,indicesBuffer,GL_ELEMENT_ARRAY_BUFFER);
-
- glBindBuffer(GL_ARRAY_BUFFER,attributeBuffer);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,indicesBuffer);
+ bool copy=gl::remesh || data.partial || !data.rendered;
+ if(color) registerBuffer(data.Vertices,data.VerticesBuffer,copy);
+ else if(normal) registerBuffer(data.vertices,data.verticesBuffer,copy);
+ else registerBuffer(data.vertices0,data.vertices0Buffer,copy);
+
+ registerBuffer(data.indices,data.indicesBuffer,copy,GL_ELEMENT_ARRAY_BUFFER);
camp::setUniforms(data,shader);
+ data.rendered=true;
+
glVertexAttribPointer(positionAttrib,3,GL_FLOAT,GL_FALSE,bytestride,
(void *) 0);
glEnableVertexAttribArray(positionAttrib);
-
+
if(normal && gl::Nlights > 0) {
glVertexAttribPointer(normalAttrib,3,GL_FLOAT,GL_FALSE,bytestride,
(void *) (3*size));
@@ -1932,8 +1993,8 @@ void drawBuffer(vertexBuffer& data, GLint shader)
(void *) (3*size));
glEnableVertexAttribArray(widthAttrib);
}
-
- glVertexAttribIPointer(materialAttrib,1,GL_INT,bytestride,
+
+ glVertexAttribIPointer(materialAttrib,1,GL_INT,bytestride,
(void *) ((normal ? 6 : 4)*size));
glEnableVertexAttribArray(materialAttrib);
@@ -1942,20 +2003,22 @@ void drawBuffer(vertexBuffer& data, GLint shader)
(void *) (6*size+intsize));
glEnableVertexAttribArray(colorAttrib);
}
-
+
+ fpu_trap(false); // Work around FE_INVALID
glDrawElements(data.type,data.indices.size(),GL_UNSIGNED_INT,(void *) 0);
+ fpu_trap(settings::trap());
glDisableVertexAttribArray(positionAttrib);
if(normal && gl::Nlights > 0)
glDisableVertexAttribArray(normalAttrib);
if(!normal)
- glDisableVertexAttribArray(widthAttrib);
+ glDisableVertexAttribArray(widthAttrib);
glDisableVertexAttribArray(materialAttrib);
if(color)
glDisableVertexAttribArray(colorAttrib);
-
+
glBindBuffer(GL_UNIFORM_BUFFER,0);
-
+
glBindBuffer(GL_ARRAY_BUFFER,0);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,0);
}
@@ -1987,6 +2050,7 @@ void drawColor()
void drawTriangle()
{
drawBuffer(triangleData,transparentShader);
+ triangleData.rendered=false; // Force copying of sorted triangles to GPU.
triangleData.clear();
}
@@ -1995,6 +2059,7 @@ void drawTransparent()
sortTriangles();
glDepthMask(GL_FALSE); // Enable transparency
drawBuffer(transparentData,transparentShader);
+ transparentData.rendered=false; // Force copying of sorted triangles to GPU.
glDepthMask(GL_TRUE); // Disable transparency
transparentData.clear();
}
@@ -2015,14 +2080,23 @@ void clearMaterialBuffer()
material.reserve(nmaterials);
materialMap.clear();
materialIndex=0;
+
+ material0Data.partial=false;
+ material1Data.partial=false;
+ materialData.partial=false;
+ colorData.partial=false;
+ triangleData.partial=false;
+ transparentData.partial=false;
}
void setMaterial(vertexBuffer& data, draw_t *draw)
{
if(materialIndex >= data.materialTable.size() ||
data.materialTable[materialIndex] == -1) {
- if(data.materials.size() >= Maxmaterials)
+ if(data.materials.size() >= Maxmaterials) {
+ data.partial=true;
(*draw)();
+ }
size_t size0=data.materialTable.size();
data.materialTable.resize(materialIndex+1);
for(size_t i=size0; i < materialIndex; ++i)
diff --git a/Build/source/utils/asymptote/glrender.h b/Build/source/utils/asymptote/glrender.h
index dff344b6c5b..44da4fe6123 100644
--- a/Build/source/utils/asymptote/glrender.h
+++ b/Build/source/utils/asymptote/glrender.h
@@ -23,7 +23,6 @@
#include <csignal>
#define GLEW_NO_GLU
-//#define GLEW_OSMESA
#ifdef __MSDOS__
#define GLEW_STATIC
@@ -109,7 +108,6 @@ namespace gl {
extern bool outlinemode;
extern bool wireframeMode;
-extern bool exporting;
extern bool orthographic;
extern double xmin,xmax;
@@ -121,12 +119,12 @@ extern double Angle;
extern camp::pair Shift;
extern camp::pair Margin;
-extern camp::triple *Lights;
+extern camp::triple *Lights;
extern size_t nlights;
extern double *Diffuse;
extern double *Background;
-struct projection
+struct projection
{
public:
bool orthographic;
@@ -136,11 +134,11 @@ public:
double zoom;
double angle;
camp::pair viewportshift;
-
+
projection(bool orthographic=false, camp::triple camera=0.0,
camp::triple up=0.0, camp::triple target=0.0,
double zoom=0.0, double angle=0.0,
- camp::pair viewportshift=0.0) :
+ camp::pair viewportshift=0.0) :
orthographic(orthographic), camera(camera), up(up), target(target),
zoom(zoom), angle(angle), viewportshift(viewportshift) {}
};
@@ -170,18 +168,18 @@ namespace camp {
struct Billboard {
double cx,cy,cz;
-
+
void init(const triple& center) {
cx=center.getx();
cy=center.gety();
cz=center.getz();
}
-
+
triple transform(const triple& v) const {
double x=v.getx()-cx;
double y=v.gety()-cy;
double z=v.getz()-cz;
-
+
return triple(x*gl::BBT[0]+y*gl::BBT[3]+z*gl::BBT[6]+cx,
x*gl::BBT[1]+y*gl::BBT[4]+z*gl::BBT[7]+cy,
x*gl::BBT[2]+y*gl::BBT[5]+z*gl::BBT[8]+cz);
@@ -204,7 +202,7 @@ extern int MaterialIndex;
extern const size_t Nbuffer; // Initial size of 2D dynamic buffers
extern const size_t nbuffer; // Initial size of 0D & 1D dynamic buffers
-class vertexData
+class vertexData
{
public:
GLfloat position[3];
@@ -269,8 +267,15 @@ public:
};
class vertexBuffer {
-public:
- GLint type;
+public:
+ GLenum type;
+
+ GLuint verticesBuffer;
+ GLuint VerticesBuffer;
+ GLuint vertices0Buffer;
+ GLuint indicesBuffer;
+ GLuint materialsBuffer;
+
std::vector<vertexData> vertices;
std::vector<VertexData> Vertices;
std::vector<vertexData0> vertices0;
@@ -279,7 +284,18 @@ public:
std::vector<Material> materials;
std::vector<GLint> materialTable;
- vertexBuffer(GLint type=GL_TRIANGLES) : type(type) {}
+ bool rendered; // Are all patches in this buffer fully rendered?
+ bool partial; // Does buffer contain incomplete data?
+
+ vertexBuffer(GLint type=GL_TRIANGLES) : type(type),
+ verticesBuffer(0),
+ VerticesBuffer(0),
+ vertices0Buffer(0),
+ indicesBuffer(0),
+ materialsBuffer(0),
+ rendered(false),
+ partial(false)
+ {}
void clear() {
vertices.clear();
@@ -294,22 +310,22 @@ public:
vertices0.reserve(nbuffer);
}
- void reserve() {
+ void reserve() {
vertices.reserve(Nbuffer);
indices.reserve(Nbuffer);
- }
+ }
- void Reserve() {
+ void Reserve() {
Vertices.reserve(Nbuffer);
indices.reserve(Nbuffer);
- }
-
+ }
+
// Store the vertex v and its normal vector n.
GLuint vertex(const triple &v, const triple& n) {
size_t nvertices=vertices.size();
vertices.push_back(vertexData(v,n));
return nvertices;
- }
+ }
// Store the vertex v and its normal vector n, without an explicit color.
GLuint tvertex(const triple &v, const triple& n) {
@@ -323,14 +339,14 @@ public:
size_t nvertices=Vertices.size();
Vertices.push_back(VertexData(v,n,c));
return nvertices;
- }
+ }
// Store the pixel v and its width.
GLuint vertex0(const triple &v, double width) {
size_t nvertices=vertices0.size();
vertices0.push_back(vertexData0(v,width));
return nvertices;
- }
+ }
// append array b onto array a with offset
void appendOffset(std::vector<GLuint>& a,
@@ -342,7 +358,6 @@ public:
a[n+i]=b[i]+offset;
}
- // append array b onto array a
void append(const vertexBuffer& b) {
appendOffset(indices,b.indices,vertices.size());
vertices.insert(vertices.end(),b.vertices.begin(),b.vertices.end());
diff --git a/Build/source/utils/asymptote/gsl.cc b/Build/source/utils/asymptote/gsl.cc
index 0f81dc60345..f0587736244 100644
--- a/Build/source/utils/asymptote/gsl.cc
+++ b/Build/source/utils/asymptote/gsl.cc
@@ -708,14 +708,14 @@ void addGSLrngRealUIntFuncInt(symbol name, symbol arg1, symbol arg2)
template<unsigned int (*func)(const gsl_rng*, unsigned int, unsigned int,
unsigned int)>
void intUIntUIntUIntGSLrng(stack *s)
- {
- unsigned int t = unsignedcast(pop<Int>(s));
- unsigned int n2 = unsignedcast(pop<Int>(s));
- unsigned int n1 = unsignedcast(pop<Int>(s));
- checkGSLrng();
- s->push<Int>(func(GSLrng,n1,n2,t));
- checkGSLerror();
- }
+{
+ unsigned int t = unsignedcast(pop<Int>(s));
+ unsigned int n2 = unsignedcast(pop<Int>(s));
+ unsigned int n1 = unsignedcast(pop<Int>(s));
+ checkGSLrng();
+ s->push<Int>(func(GSLrng,n1,n2,t));
+ checkGSLerror();
+}
template<unsigned int (*fcn)(const gsl_rng*, unsigned int, unsigned int,
unsigned int)>
@@ -1091,9 +1091,9 @@ void gen_rungsl_venv(venv &ve)
addGSLDOUBLE3Func<gsl_sf_ellint_P>(SYM(P),SYM(phi),SYM(k),SYM(n));
#if GSL_MAJOR_VERSION >= 2
addGSLDOUBLE2Func<gsl_sf_ellint_D>(SYM(D),SYM(phi),SYM(k));
-#else
+#else
addGSLDOUBLE3Func<gsl_sf_ellint_D>(SYM(D),SYM(phi),SYM(k),SYM(n));
-#endif
+#endif
addGSLDOUBLE2Func<gsl_sf_ellint_RC>(SYM(RC),SYM(x),SYM(y));
addGSLDOUBLE3Func<gsl_sf_ellint_RD>(SYM(RD),SYM(x),SYM(y),SYM(z));
addGSLDOUBLE3Func<gsl_sf_ellint_RF>(SYM(RF),SYM(x),SYM(y),SYM(z));
@@ -1325,7 +1325,7 @@ void gen_rungsl_venv(venv &ve)
(SYM(cdf_##NAME##_Pinv),SYM(P),SYM(ARG)); \
addGSLRealRealFunc<gsl_cdf_##NAME##_Qinv> \
(SYM(cdf_##NAME##_Qinv),SYM(Q),SYM(ARG))
-
+
// Exponential, Laplace, Cauchy, Rayleigh, Chi-squared, t,
// and Logistic distribution
addGSLrealdist1param(exponential,mu);
@@ -1350,7 +1350,7 @@ void gen_rungsl_venv(venv &ve)
(SYM(cdf_##NAME##_Pinv),SYM(P),SYM(ARG1),SYM(ARG2)); \
addGSLRealRealRealFunc<gsl_cdf_##NAME##_Qinv> \
(SYM(cdf_##NAME##_Qinv),SYM(Q),SYM(ARG1),SYM(ARG2))
-
+
// Uniform, log-normal, F, Beta, Pareto, Weibull, Type-1 Gumbel,
// and Type-2 Gumbel distribution
addGSLrealdist2param(flat,a,b);
@@ -1362,7 +1362,7 @@ void gen_rungsl_venv(venv &ve)
addGSLrealdist2param(gumbel1,a,b);
addGSLrealdist2param(gumbel2,a,b);
#undef addGSLrealdist2param
-
+
// Exponential power distribution
addGSLrngRealRealFunc<gsl_ran_exppow>
(SYM(rng_exppow),SYM(a),SYM(b));
@@ -1411,7 +1411,7 @@ void gen_rungsl_venv(venv &ve)
addFunc(GSLModule->e.ve,GSLrng_dir3d,primTriple(),SYM(rng_dir3d));
addFunc(GSLModule->e.ve,GSLrng_dir,realArray(),SYM(rng_dir),
formal(primInt(),SYM(n)));
-
+
// Elliptic functions (Jacobi)
addFunc(GSLModule->e.ve,GSLsf_elljac_e,realArray(),SYM(sncndn),
formal(primReal(),SYM(u)),formal(primReal(),SYM(m)));
@@ -1435,7 +1435,7 @@ void gen_rungsl_venv(venv &ve)
(SYM(cdf_##NAME##_P),SYM(k),SYM(ARG)); \
addGSLUInt##TYPE##Func<gsl_cdf_##NAME##_Q> \
(SYM(cdf_##NAME##_Q),SYM(k),SYM(ARG))
-
+
// Poisson, geometric distributions
addGSLdiscdist1param(poisson,mu,Real);
addGSLdiscdist1param(geometric,p,Real);
@@ -1450,7 +1450,7 @@ void gen_rungsl_venv(venv &ve)
(SYM(cdf_##NAME##_P),SYM(k),SYM(ARG1),SYM(ARG2)); \
addGSLUInt##TYPE1##TYPE2##Func<gsl_cdf_##NAME##_Q> \
(SYM(cdf_##NAME##_Q),SYM(k),SYM(ARG1),SYM(ARG2))
-
+
// Binomial, negative binomial distributions
addGSLdiscdist2param(binomial,p,Real,n,UInt);
addGSLdiscdist2param(negative_binomial,p,Real,n,Real);
diff --git a/Build/source/utils/asymptote/guide.cc b/Build/source/utils/asymptote/guide.cc
index 6479a00ba56..7c01da75e3f 100644
--- a/Build/source/utils/asymptote/guide.cc
+++ b/Build/source/utils/asymptote/guide.cc
@@ -10,17 +10,17 @@ namespace camp {
multiguide::multiguide(guidevector& v)
{
- // This constructor tests if the first subguide is also a multiguide and,
- // if possible, uses the same base, extending it beyond what is used.
- multiguide *rg = v.empty() ? 0 : dynamic_cast<multiguide *>(v[0]);
- if (rg && rg->base->size() == rg->length) {
- base = rg->base;
- base->insert(base->end(), v.begin()+1, v.end());
- }
- else
- base = new guidevector(v);
+ // This constructor tests if the first subguide is also a multiguide and,
+ // if possible, uses the same base, extending it beyond what is used.
+ multiguide *rg = v.empty() ? 0 : dynamic_cast<multiguide *>(v[0]);
+ if (rg && rg->base->size() == rg->length) {
+ base = rg->base;
+ base->insert(base->end(), v.begin()+1, v.end());
+ }
+ else
+ base = new guidevector(v);
- length = base->size();
+ length = base->size();
}
void multiguide::flatten(flatguide& g, bool allowsolve)
diff --git a/Build/source/utils/asymptote/guide.h b/Build/source/utils/asymptote/guide.h
index a25e7ffa9e7..64115930f17 100644
--- a/Build/source/utils/asymptote/guide.h
+++ b/Build/source/utils/asymptote/guide.h
@@ -19,7 +19,7 @@ class guide : public gc {
protected:
public:
virtual ~guide() {}
-
+
// Returns the path that the guide represents.
virtual path solve() {
return path();
@@ -27,20 +27,20 @@ public:
// Add the information in the guide to the flatguide, so that it can be
// solved via the knotlist solving routines.
- // Returns true if guide has an interior cycle token.
+ // Returns true if guide has an interior cycle token.
virtual void flatten(flatguide&, bool allowsolve=true)=0;
-
+
virtual bool cyclic() {return false;}
-
+
virtual void print(ostream& out) const {
out << "nullpath";
}
-
+
// Needed so that multiguide can know where to put in ".." symbols.
virtual side printLocation() const {
return END;
}
-
+
};
inline ostream& operator<< (ostream& out, const guide& g)
@@ -78,7 +78,7 @@ public:
void print(ostream& out) const {
out << z;
}
-
+
side printLocation() const {
return END;
}
@@ -106,7 +106,7 @@ public:
void print(ostream& out) const {
out << p;
}
-
+
side printLocation() const {
return END;
}
@@ -148,7 +148,7 @@ public:
out << (tout.atleast ? ".. tension atleast " : ".. tension ")
<< tout.val << " and " << tin.val << " ..";
}
-
+
side printLocation() const {
return JOIN;
}
@@ -177,7 +177,7 @@ public:
void flatten(flatguide& g, bool=true) {
g.setSpec(p,s);
}
-
+
specguide(spec *p, side s)
: p(p), s(s) {}
@@ -187,7 +187,7 @@ public:
void print(ostream& out) const {
out << *p;
}
-
+
side printLocation() const {
return s;
}
@@ -213,7 +213,7 @@ public:
out << ".. controls "
<< zout << " and " << zin << " ..";
}
-
+
side printLocation() const {
return JOIN;
}
@@ -224,39 +224,39 @@ public:
// tensions in between.
typedef mem::vector<guide *> guidevector;
-// A multiguide represents a guide given by the first "length" items of
+// A multiguide represents a guide given by the first "length" items of
// the vector pointed to by "base".
// The constructor, if given another multiguide as a first argument,
// will try to avoid allocating a new "base" array.
class multiguide : public guide {
- guidevector *base;
- size_t length;
-
- guide *subguide(size_t i) const
- {
- assert(i < length);
- assert(length <= base->size());
- return (*base)[i];
- }
+ guidevector *base;
+ size_t length;
+
+ guide *subguide(size_t i) const
+ {
+ assert(i < length);
+ assert(length <= base->size());
+ return (*base)[i];
+ }
public:
multiguide(guidevector& v);
void flatten(flatguide&, bool=true);
-
+
bool cyclic() {
size_t n=length;
if(n < 1) return false;
return subguide(n-1)->cyclic();
}
-
+
path solve() {
if (settings::verbose>3) {
cerr << "solving guide:\n";
print(cerr); cerr << "\n\n";
}
-
+
flatguide g;
this->flatten(g);
path p=g.solve(false);
@@ -268,7 +268,7 @@ public:
}
void print(ostream& out) const;
-
+
side printLocation() const {
int n = length;
return subguide(n-1)->printLocation();
@@ -291,7 +291,7 @@ public:
}
bool cyclic() {return true;}
-
+
path solve() {
// Just a cycle on it's own makes an empty guide.
return path();
diff --git a/Build/source/utils/asymptote/guideflags.h b/Build/source/utils/asymptote/guideflags.h
index dae2b7cc47a..80c6cfc1c59 100644
--- a/Build/source/utils/asymptote/guideflags.h
+++ b/Build/source/utils/asymptote/guideflags.h
@@ -12,9 +12,9 @@ namespace camp {
#undef OUT
#undef IN
-
+
enum side { OUT, IN, END, JOIN };
-
+
}
#endif //GUIDEFLAGS_H
diff --git a/Build/source/utils/asymptote/impdatum.cc b/Build/source/utils/asymptote/impdatum.cc
index 9d0be54f156..af074c85403 100644
--- a/Build/source/utils/asymptote/impdatum.cc
+++ b/Build/source/utils/asymptote/impdatum.cc
@@ -47,7 +47,7 @@ public:
types::ty *getType(coenv &) { return types::primError(); }
types::ty *trans(coenv &e) { complain(); return getType(e); }
-
+
void transAsType(coenv &e, types::ty *target) { complain(); }
};
@@ -58,7 +58,7 @@ public:
virtual int_typ toInt() {
datumError("cannot convert to integer");
-
+
// Return a weird value that will hopefully be noticed.
return -777777;
}
@@ -268,7 +268,7 @@ public:
return new fieldExp(nullPos, parent->getExp(), id);
}
};
-
+
ImpDatum *ImpDatum::getField(const char *name)
{
coenv &e = coenvInOngoingProcess();
@@ -387,7 +387,7 @@ void imp_releaseArguments(arguments_typ args)
}
void imp_addArgument(arguments_typ args, const char *name, handle_typ handle,
- arg_rest_option isRest)
+ arg_rest_option isRest)
{
unwrapArgs(args)->add(name, unwrap(handle), isRest);
}
@@ -406,7 +406,7 @@ ImpDatum *callDatum(ImpDatum *callee, ImpArguments *args)
}
assert(t->isNotOverloaded()); // Calls are never overloaded.
-
+
if (t->kind == types::ty_void) {
// Execute the call and return 0 to indicate void.
runExp(&callex);
@@ -451,7 +451,7 @@ public:
int_typ numParams() {
/*if (params)
return params->val.size();
- else */ {
+ else */ {
datumError("parameters accessed outside of function");
return 0;
}
@@ -459,12 +459,12 @@ public:
ImpDatum *getParam(int_typ index) {
/*if (params) {
- if (index >= 0 && index < static_cast<int_typ>(params->val.size()))
- return params->val[index];
+ if (index >= 0 && index < static_cast<int_typ>(params->val.size()))
+ return params->val[index];
else
- return datumError("invalid index for parameter");
- }
- else */ {
+ return datumError("invalid index for parameter");
+ }
+ else */ {
return datumError("parameters accessed outside of function");
}
}
@@ -473,11 +473,11 @@ public:
{
/*if (params) {
if (this->retval)
- datumError("return value set more than once");
+ datumError("return value set more than once");
else
- this->retval = retval;
- }
- else */ {
+ this->retval = retval;
+ }
+ else */ {
datumError("return value set outside of function");
}
}
@@ -547,7 +547,7 @@ public:
#endif
handle_typ imp_handleFromFunction(const char *signature,
- function_typ f, void *data)
+ function_typ f, void *data)
{
// TODO: Re-implement.
return 0; //wrap(new FunctionDatum(f, data));
@@ -592,24 +592,24 @@ void init(bool resetpath=true);
extern "C" {
-policy_typ *_asy_getPolicy()
-{
- return &imp_policy;
-}
+ policy_typ *_asy_getPolicy()
+ {
+ return &imp_policy;
+ }
-state_typ _asy_getState()
-{
- static state_typ state = cheatState();
+ state_typ _asy_getState()
+ {
+ static state_typ state = cheatState();
- // TODO: Make sure this runs once.
- char buf[] = "asymptote.so";
- char *argv [] = { buf };
- settings::setOptions(1,argv);
+ // TODO: Make sure this runs once.
+ char buf[] = "asymptote.so";
+ char *argv [] = { buf };
+ settings::setOptions(1,argv);
- // Ensures uptodate is not used.
- init();
+ // Ensures uptodate is not used.
+ init();
- return state;
-}
+ return state;
+ }
}
diff --git a/Build/source/utils/asymptote/inst.h b/Build/source/utils/asymptote/inst.h
index fbbe6d873d8..54879a6d776 100644
--- a/Build/source/utils/asymptote/inst.h
+++ b/Build/source/utils/asymptote/inst.h
@@ -1,7 +1,7 @@
/*****
* inst.h
* Andy Hammerlindl 2002/06/27
- *
+ *
* Descibes the items and instructions that are used by the virtual machine.
*****/
@@ -19,7 +19,7 @@ namespace vm {
// Forward declarations
struct inst; class stack; class program;
-
+
// A function "lambda," that is, the code that runs a function.
// It also needs the closure of the enclosing module or function to run.
struct lambda : public gc {
@@ -75,4 +75,4 @@ inline T get(const inst& it)
} // namespace vm
#endif
-
+
diff --git a/Build/source/utils/asymptote/install-sh b/Build/source/utils/asymptote/install-sh
index ec298b53740..5222b344c8e 100755
--- a/Build/source/utils/asymptote/install-sh
+++ b/Build/source/utils/asymptote/install-sh
@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2020-11-14.01; # UTC
+scriptversion=2009-04-28.21; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -35,21 +35,25 @@ scriptversion=2020-11-14.01; # UTC
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
-# 'make' implicit rules from creating a file called install from it
+# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.
-tab=' '
nl='
'
-IFS=" $tab$nl"
+IFS=" "" $nl"
-# Set DOITPROG to "echo" to test this script.
+# set DOITPROG to echo to test this script
+# Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-}
-doit_exec=${doit:-exec}
+if test -z "$doit"; then
+ doit_exec=exec
+else
+ doit_exec=$doit
+fi
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
@@ -64,16 +68,22 @@ mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
+posix_glob='?'
+initialize_posix_glob='
+ test "$posix_glob" != "?" || {
+ if (set -f) 2>/dev/null; then
+ posix_glob=
+ else
+ posix_glob=:
+ fi
+ }
+'
+
posix_mkdir=
# Desired mode of installed file.
mode=0755
-# Create dirs (including intermediate dirs) using mode 755.
-# This is like GNU 'install' as of coreutils 8.32 (2020).
-mkdir_umask=22
-
-backupsuffix=
chgrpcmd=
chmodcmd=$chmodprog
chowncmd=
@@ -87,7 +97,7 @@ dir_arg=
dst_arg=
copy_on_change=false
-is_target_a_directory=possibly
+no_target_directory=
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
@@ -104,28 +114,18 @@ Options:
--version display version info and exit.
-c (ignored)
- -C install only if different (preserve data modification time)
+ -C install only if different (preserve the last data modification time)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
- -p pass -p to $cpprog.
-s $stripprog installed files.
- -S SUFFIX attempt to back up existing files, with suffix SUFFIX.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG
-
-By default, rm is invoked with -f; when overridden with RMPROG,
-it's up to you to specify -f if you want it.
-
-If -S is not specified, no backups are attempted.
-
-Email bug reports to bug-automake@gnu.org.
-Automake home page: https://www.gnu.org/software/automake/
"
while test $# -ne 0; do
@@ -137,62 +137,42 @@ while test $# -ne 0; do
-d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
- shift;;
+ shift;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
- case $mode in
- *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
- echo "$0: invalid mode: $mode" >&2
- exit 1;;
- esac
- shift;;
+ case $mode in
+ *' '* | *' '* | *'
+'* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ shift;;
-o) chowncmd="$chownprog $2"
- shift;;
-
- -p) cpprog="$cpprog -p";;
+ shift;;
-s) stripcmd=$stripprog;;
- -S) backupsuffix="$2"
- shift;;
+ -t) dst_arg=$2
+ shift;;
- -t)
- is_target_a_directory=always
- dst_arg=$2
- # Protect names problematic for 'test' and other utilities.
- case $dst_arg in
- -* | [=\(\)!]) dst_arg=./$dst_arg;;
- esac
- shift;;
-
- -T) is_target_a_directory=never;;
+ -T) no_target_directory=true;;
--version) echo "$0 $scriptversion"; exit $?;;
- --) shift
- break;;
+ --) shift
+ break;;
- -*) echo "$0: invalid option: $1" >&2
- exit 1;;
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
*) break;;
esac
shift
done
-# We allow the use of options -d and -T together, by making -d
-# take the precedence; this is for compatibility with GNU install.
-
-if test -n "$dir_arg"; then
- if test -n "$dst_arg"; then
- echo "$0: target directory not allowed when installing a directory." >&2
- exit 1
- fi
-fi
-
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
@@ -206,10 +186,6 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
fi
shift # arg
dst_arg=$arg
- # Protect names problematic for 'test' and other utilities.
- case $dst_arg in
- -* | [=\(\)!]) dst_arg=./$dst_arg;;
- esac
done
fi
@@ -218,26 +194,13 @@ if test $# -eq 0; then
echo "$0: no input file specified." >&2
exit 1
fi
- # It's OK to call 'install-sh -d' without argument.
+ # It's OK to call `install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
if test -z "$dir_arg"; then
- if test $# -gt 1 || test "$is_target_a_directory" = always; then
- if test ! -d "$dst_arg"; then
- echo "$0: $dst_arg: Is not a directory." >&2
- exit 1
- fi
- fi
-fi
-
-if test -z "$dir_arg"; then
- do_exit='(exit $ret); exit $ret'
- trap "ret=129; $do_exit" 1
- trap "ret=130; $do_exit" 2
- trap "ret=141; $do_exit" 13
- trap "ret=143; $do_exit" 15
+ trap '(exit $?); exit' 1 2 13 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
@@ -248,16 +211,16 @@ if test -z "$dir_arg"; then
*[0-7])
if test -z "$stripcmd"; then
- u_plus_rw=
+ u_plus_rw=
else
- u_plus_rw='% 200'
+ u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
- u_plus_rw=
+ u_plus_rw=
else
- u_plus_rw=,u+rw
+ u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
@@ -265,9 +228,9 @@ fi
for src
do
- # Protect names problematic for 'test' and other utilities.
+ # Protect names starting with `-'.
case $src in
- -* | [=\(\)!]) src=./$src;;
+ -*) src=./$src;;
esac
if test -n "$dir_arg"; then
@@ -275,10 +238,6 @@ do
dstdir=$dst
test -d "$dstdir"
dstdir_status=$?
- # Don't chown directories that already exist.
- if test $dstdir_status = 0; then
- chowncmd=""
- fi
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
@@ -293,150 +252,185 @@ do
echo "$0: no destination specified." >&2
exit 1
fi
+
dst=$dst_arg
+ # Protect names starting with `-'.
+ case $dst in
+ -*) dst=./$dst;;
+ esac
- # If destination is a directory, append the input filename.
+ # If destination is a directory, append the input filename; won't work
+ # if double slashes aren't ignored.
if test -d "$dst"; then
- if test "$is_target_a_directory" = never; then
- echo "$0: $dst_arg: Is a directory" >&2
- exit 1
+ if test -n "$no_target_directory"; then
+ echo "$0: $dst_arg: Is a directory" >&2
+ exit 1
fi
dstdir=$dst
- dstbase=`basename "$src"`
- case $dst in
- */) dst=$dst$dstbase;;
- *) dst=$dst/$dstbase;;
- esac
+ dst=$dstdir/`basename "$src"`
dstdir_status=0
else
- dstdir=`dirname "$dst"`
+ # Prefer dirname, but fall back on a substitute if dirname fails.
+ dstdir=`
+ (dirname "$dst") 2>/dev/null ||
+ expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$dst" : 'X\(//\)[^/]' \| \
+ X"$dst" : 'X\(//\)$' \| \
+ X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+ echo X"$dst" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'
+ `
+
test -d "$dstdir"
dstdir_status=$?
fi
fi
- case $dstdir in
- */) dstdirslash=$dstdir;;
- *) dstdirslash=$dstdir/;;
- esac
-
obsolete_mkdir_used=false
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
- # With -d, create the new directory with the user-specified mode.
- # Otherwise, rely on $mkdir_umask.
- if test -n "$dir_arg"; then
- mkdir_mode=-m$mode
- else
- mkdir_mode=
- fi
-
- posix_mkdir=false
- # The $RANDOM variable is not portable (e.g., dash). Use it
- # here however when possible just to lower collision chance.
- tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
-
- trap '
- ret=$?
- rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
- exit $ret
- ' 0
-
- # Because "mkdir -p" follows existing symlinks and we likely work
- # directly in world-writeable /tmp, make sure that the '$tmpdir'
- # directory is successfully created first before we actually test
- # 'mkdir -p'.
- if (umask $mkdir_umask &&
- $mkdirprog $mkdir_mode "$tmpdir" &&
- exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
- then
- if test -z "$dir_arg" || {
- # Check for POSIX incompatibilities with -m.
- # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
- # other-writable bit of parent directory when it shouldn't.
- # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
- test_tmpdir="$tmpdir/a"
- ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
- case $ls_ld_tmpdir in
- d????-?r-*) different_mode=700;;
- d????-?--*) different_mode=755;;
- *) false;;
- esac &&
- $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
- ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
- test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
- }
- }
- then posix_mkdir=:
- fi
- rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
+ # Create intermediate dirs using mode 755 as modified by the umask.
+ # This is like FreeBSD 'install' as of 1997-10-28.
+ umask=`umask`
+ case $stripcmd.$umask in
+ # Optimize common cases.
+ *[2367][2367]) mkdir_umask=$umask;;
+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+ *[0-7])
+ mkdir_umask=`expr $umask + 22 \
+ - $umask % 100 % 40 + $umask % 20 \
+ - $umask % 10 % 4 + $umask % 2
+ `;;
+ *) mkdir_umask=$umask,go-w;;
+ esac
+
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
else
- # Remove any dirs left behind by ancient mkdir implementations.
- rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
+ mkdir_mode=
fi
- trap '' 0;;
+
+ posix_mkdir=false
+ case $umask in
+ *[123567][0-7][0-7])
+ # POSIX mkdir -p sets u+wx bits regardless of umask, which
+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+ ;;
+ *)
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+ if (umask $mkdir_umask &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writeable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ ls_ld_tmpdir=`ls -ld "$tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/d" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+ fi
+ trap '' 0;;
+ esac;;
esac
if
$posix_mkdir && (
- umask $mkdir_umask &&
- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
- # mkdir does not conform to POSIX,
+ # The umask is ridiculous, or mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
- /*) prefix='/';;
- [-=\(\)!]*) prefix='./';;
- *) prefix='';;
+ /*) prefix='/';;
+ -*) prefix='./';;
+ *) prefix='';;
esac
+ eval "$initialize_posix_glob"
+
oIFS=$IFS
IFS=/
- set -f
+ $posix_glob set -f
set fnord $dstdir
shift
- set +f
+ $posix_glob set +f
IFS=$oIFS
prefixes=
for d
do
- test X"$d" = X && continue
-
- prefix=$prefix$d
- if test -d "$prefix"; then
- prefixes=
- else
- if $posix_mkdir; then
- (umask $mkdir_umask &&
- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
- # Don't fail if two instances are running concurrently.
- test -d "$prefix" || exit 1
- else
- case $prefix in
- *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
- *) qprefix=$prefix;;
- esac
- prefixes="$prefixes '$qprefix'"
- fi
- fi
- prefix=$prefix/
+ test -z "$d" && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask=$mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
done
if test -n "$prefixes"; then
- # Don't fail if two instances are running concurrently.
- (umask $mkdir_umask &&
- eval "\$doit_exec \$mkdirprog $prefixes") ||
- test -d "$dstdir" || exit 1
- obsolete_mkdir_used=true
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
fi
fi
fi
@@ -449,25 +443,14 @@ do
else
# Make a couple of temp file names in the proper directory.
- dsttmp=${dstdirslash}_inst.$$_
- rmtmp=${dstdirslash}_rm.$$_
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name.
- (umask $cp_umask &&
- { test -z "$stripcmd" || {
- # Create $dsttmp read-write so that cp doesn't create it read-only,
- # which would cause strip to fail.
- if test -z "$doit"; then
- : >"$dsttmp" # No need to fork-exec 'touch'.
- else
- $doit touch "$dsttmp"
- fi
- }
- } &&
- $doit_exec $cpprog "$src" "$dsttmp") &&
+ (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits.
#
@@ -482,6 +465,66 @@ do
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+
+ eval "$initialize_posix_glob" &&
+ $posix_glob set -f &&
+ set X $old && old=:$2:$4:$5:$6 &&
+ set X $new && new=:$2:$4:$5:$6 &&
+ $posix_glob set +f &&
+
+ test "$old" = "$new" &&
+ $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+ then
+ rm -f "$dsttmp"
+ else
+ # Rename the file to the real destination.
+ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+ # The rename failed, perhaps because mv can't rename something else
+ # to itself, or perhaps because mv is so ancient that it does not
+ # support -f.
+ {
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ test ! -f "$dst" ||
+ $doit $rmcmd -f "$dst" 2>/dev/null ||
+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+ { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+ } ||
+ { echo "$0: cannot unlink or rename $dst" >&2
+ (exit 1); exit 1
+ }
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dst"
+ }
+ fi || exit 1
+
+ trap '' 0
+ fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
+est -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+ { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+ { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+ # If -C, don't bother to copy if it wouldn't change the file.
+ if $copy_on_change &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
set -f &&
@@ -493,13 +536,6 @@ do
then
rm -f "$dsttmp"
else
- # If $backupsuffix is set, and the file being installed
- # already exists, attempt a backup. Don't worry if it fails,
- # e.g., if mv doesn't support -f.
- if test -n "$backupsuffix" && test -f "$dst"; then
- $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
- fi
-
# Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
@@ -514,9 +550,9 @@ do
# file should still install successfully.
{
test ! -f "$dst" ||
- $doit $rmcmd "$dst" 2>/dev/null ||
+ $doit $rmcmd -f "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
- { $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
+ { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
} ||
{ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
diff --git a/Build/source/utils/asymptote/interact.cc b/Build/source/utils/asymptote/interact.cc
index e7551fd72f6..ad472942d5a 100644
--- a/Build/source/utils/asymptote/interact.cc
+++ b/Build/source/utils/asymptote/interact.cc
@@ -50,10 +50,10 @@ namespace interact {
bool interactive=false;
bool uptodate=true;
-int lines=0;
+int lines=0;
bool query=false;
-bool tty=isatty(STDIN_FILENO);
+bool tty=isatty(STDIN_FILENO);
completer *currentCompleter=0;
void setCompleter(completer *c) {
@@ -77,15 +77,15 @@ void init_completion() {
static char break_characters[128];
Int j=0;
for (unsigned char c=9; c < 128; ++c)
- if (!isalnum(c) && c != '_') {
- break_characters[j]=c;
- ++j;
- }
+ if (!isalnum(c) && c != '_') {
+ break_characters[j]=c;
+ ++j;
+ }
break_characters[j]='\0';
rl_completer_word_break_characters=break_characters;
*/
}
-#endif
+#endif
char *(*Readline)(const char *prompt);
@@ -97,7 +97,7 @@ char *readverbatimline(const char *prompt)
getline(cin,s);
return StrdupMalloc(s);
}
-
+
FILE *fin=NULL;
char *readpipeline(const char *prompt)
@@ -117,7 +117,7 @@ char *readpipeline(const char *prompt)
return StrdupMalloc(s.str());
#endif
}
-
+
void pre_readline()
{
int fd=intcast(settings::getSetting<Int>("inpipe"));
@@ -152,11 +152,11 @@ void init_interactive()
}
#endif
}
-
+
string simpleline(string prompt) {
// Rebind tab key, as the setting tabcompletion may be changed at runtime.
pre_readline();
-
+
Signal(SIGINT,SIG_IGN);
// Get a line from the user.
char *line=Readline(prompt.c_str());
@@ -165,7 +165,7 @@ string simpleline(string prompt) {
// Reset scroll count.
interact::lines=0;
interact::query=tty;
-
+
// Ignore keyboard interrupts while taking input.
errorstream::interrupt=false;
@@ -187,7 +187,7 @@ void addToHistory(string line) {
if(tty && line.find_first_not_of('\n') != string::npos) {
add_history(line.c_str());
}
-#endif
+#endif
}
string getLastHistoryLine() {
@@ -198,7 +198,7 @@ string getLastHistoryLine() {
em.compiler();
em << "cannot access last history line";
return "";
- } else
+ } else
return entry->line;
} else
#endif
diff --git a/Build/source/utils/asymptote/interact.h b/Build/source/utils/asymptote/interact.h
index a6845ad75cb..4b7550986e9 100644
--- a/Build/source/utils/asymptote/interact.h
+++ b/Build/source/utils/asymptote/interact.h
@@ -19,7 +19,7 @@ extern int lines; // Interactive scroll count
extern bool query; // Enable interactive scrolling;
void init_interactive();
-
+
// Read a line from the input, without any processing.
string simpleline(string prompt);
@@ -48,7 +48,7 @@ public:
void setCompleter(completer *c);
#define YY_READ_BUF_SIZE YY_BUF_SIZE
-
+
void init_readline(bool tabcompletion);
}
diff --git a/Build/source/utils/asymptote/item.h b/Build/source/utils/asymptote/item.h
index 60fb89fe6ef..70d4923445e 100644
--- a/Build/source/utils/asymptote/item.h
+++ b/Build/source/utils/asymptote/item.h
@@ -29,7 +29,7 @@ T get(const item&);
#if COMPACT
// Identify a default argument.
extern const Int DefaultValue;
-
+
// Identify an undefined item.
extern const Int Undefined;
@@ -41,16 +41,16 @@ inline Int valueFromBool(bool b) {
return b ? BoolTruthValue : BoolFalseValue;
}
#endif
-
+
extern const item Default;
class item : public gc {
private:
-
+
#if !COMPACT
const std::type_info *kind;
#endif
-
+
union {
Int i;
double x;
@@ -61,12 +61,12 @@ private:
};
public:
-#if COMPACT
+#if COMPACT
bool empty() const
{return i >= Undefined;}
-
+
item() : i(Undefined) {}
-
+
item(Int i)
: i(i) {}
item(int i)
@@ -75,7 +75,7 @@ public:
: x(x) {}
item(bool b)
: i(valueFromBool(b)) {}
-
+
item& operator= (int a)
{ i=a; return *this; }
item& operator= (unsigned int a)
@@ -86,33 +86,33 @@ public:
{ x=a; return *this; }
item& operator= (bool b)
{ i=valueFromBool(b); return *this; }
-
+
template<class T>
item(T *p)
: p((void *) p) {
assert(!empty());
}
-
+
template<class T>
item(const T &p)
: p(new(UseGC) T(p)) {
assert(!empty());
}
-
+
template<class T>
item& operator= (T *a)
{ p=(void *) a; return *this; }
-
+
template<class T>
item& operator= (const T &it)
{ p=new(UseGC) T(it); return *this; }
-#else
+#else
bool empty() const
{return *kind == typeid(void);}
-
+
item()
: kind(&typeid(void)) {}
-
+
item(Int i)
: kind(&typeid(Int)), i(i) {}
item(int i)
@@ -121,7 +121,7 @@ public:
: kind(&typeid(double)), x(x) {}
item(bool b)
: kind(&typeid(bool)), b(b) {}
-
+
item& operator= (int a)
{ kind=&typeid(Int); i=a; return *this; }
item& operator= (unsigned int a)
@@ -132,69 +132,69 @@ public:
{ kind=&typeid(double); x=a; return *this; }
item& operator= (bool a)
{ kind=&typeid(bool); b=a; return *this; }
-
+
template<class T>
item(T *p)
: kind(&typeid(T)), p((void *) p) {}
-
+
template<class T>
item(const T &p)
: kind(&typeid(T)), p(new(UseGC) T(p)) {}
-
+
template<class T>
item& operator= (T *a)
{ kind=&typeid(T); p=(void *) a; return *this; }
-
+
template<class T>
item& operator= (const T &it)
{ kind=&typeid(T); p=new(UseGC) T(it); return *this; }
-
+
const std::type_info &type() const
{ return *kind; }
-#endif
-
+#endif
+
template<typename T>
friend inline T get(const item&);
friend inline bool isdefault(const item&);
-
+
friend ostream& operator<< (ostream& out, const item& i);
private:
template <typename T>
struct help;
-
+
template <typename T>
struct help<T*> {
static T* unwrap(const item& it)
{
-#if COMPACT
+#if COMPACT
if(!it.empty())
return (T*) it.p;
-#else
+#else
if(*it.kind == typeid(T))
return (T*) it.p;
-#endif
+#endif
throw vm::bad_item_value();
}
};
-
+
template <typename T>
struct help {
static T& unwrap(const item& it)
{
-#if COMPACT
+#if COMPACT
if(!it.empty())
return *(T*) it.p;
-#else
+#else
if(*it.kind == typeid(T))
return *(T*) it.p;
-#endif
+#endif
throw vm::bad_item_value();
}
};
};
-
+
#ifdef SIMPLE_FRAME
// In the simple implementation, a frame is just an array of items.
typedef item frame;
@@ -231,7 +231,7 @@ public:
size_t size()
{ return vars.size(); }
-
+
// Extends vars to ensure it has a place for any variable indexed up to n.
void extend(size_t n) {
if(vars.size() < n)
@@ -245,31 +245,31 @@ template<typename T>
inline T get(const item& it)
{
return item::help<T>::unwrap(it);
-}
+}
template <>
inline int get<int>(const item&)
{
throw vm::bad_item_value();
}
-
+
template <>
inline Int get<Int>(const item& it)
{
-#if COMPACT
+#if COMPACT
if(!it.empty())
return it.i;
#else
if(*it.kind == typeid(Int))
return it.i;
-#endif
+#endif
throw vm::bad_item_value();
}
-
+
template <>
inline double get<double>(const item& it)
{
-#if COMPACT
+#if COMPACT
if(!it.empty())
return it.x;
#else
@@ -282,15 +282,15 @@ inline double get<double>(const item& it)
template <>
inline bool get<bool>(const item& it)
{
-#if COMPACT
+#if COMPACT
if(it.i == BoolTruthValue)
return true;
if(it.i == BoolFalseValue)
return false;
-#else
+#else
if(*it.kind == typeid(bool))
return it.b;
-#endif
+#endif
throw vm::bad_item_value();
}
@@ -301,12 +301,12 @@ struct default_t : public gc {};
inline bool isdefault(const item& it)
{
-#if COMPACT
+#if COMPACT
return it.i == DefaultValue;
-#else
+#else
return *it.kind == typeid(default_t);
-#endif
-}
+#endif
+}
ostream& operator<< (ostream& out, const item& i);
diff --git a/Build/source/utils/asymptote/jsfile.cc b/Build/source/utils/asymptote/jsfile.cc
index 93451b0f0da..605d2108b48 100644
--- a/Build/source/utils/asymptote/jsfile.cc
+++ b/Build/source/utils/asymptote/jsfile.cc
@@ -4,23 +4,76 @@
#include "glrender.h"
#include "drawelement.h"
-#ifdef HAVE_LIBGLM
-
using namespace settings;
namespace camp {
-void jsfile::copy(string name) {
+void jsfile::copy(string name, bool header)
+{
std::ifstream fin(locateFile(name).c_str());
string s;
+ if(header) getline(fin,s);
while(getline(fin,s))
out << s << newl;
}
-void jsfile::open(string name) {
+void jsfile::header(string name)
+{
out.open(name);
out << "<!DOCTYPE html>" << newl << newl;
-
+}
+
+void jsfile::meta(string name, bool svg)
+{
+ out << "<html lang=\"\">" << newl
+ << newl
+ << "<head>" << newl
+ << "<title>" << stripExt(name) << "</title>" << newl
+ << newl
+ << "<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\"/>" << newl;
+ if(svg)
+ out << "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"/>";
+ else
+ out << "<meta name=\"viewport\" content=\"user-scalable=no\"/>";
+ out << newl << "<style>" << newl;
+ if(svg && !getSetting<bool>("absolute"))
+ out << "svg, #container {" << newl
+ << "display: block;" << newl
+ << "width: 100vw;" << newl
+ << "height: 100vh;" << newl
+ << "}" << newl;
+ out << "body {margin: 0;}" << newl
+ << "</style>" << newl;
+ if(svg)
+ out << "</head>" << newl;
+ out << newl;
+}
+
+void jsfile::footer(string name)
+{
+ out << newl << "</body>"
+ << newl << newl << "</html>"
+ << newl;
+ out.flush();
+ if(verbose > 0)
+ cout << "Wrote " << name << endl;
+}
+
+void jsfile::svgtohtml(string prefix)
+{
+ string name=buildname(prefix,"html");
+ header(name);
+ meta(name);
+
+ out << "<body>" << newl << newl;
+ copy(locateFile(auxname(prefix,"svg")),true);
+ footer(name);
+}
+
+#ifdef HAVE_LIBGLM
+
+void jsfile::comment(string name)
+{
out << "<!-- Use the following line to embed this file within another web page:" << newl
<< newl
<< "<iframe src=\"" << name
@@ -29,17 +82,16 @@ void jsfile::open(string name) {
<< "\" frameborder=\"0\"></iframe>" << newl
<< newl
<< "-->" << newl << newl;
+}
+
+void jsfile::open(string name)
+{
+ header(name);
+ comment(name);
+ meta(name,false);
out.precision(getSetting<Int>("digits"));
- out << "<html lang=\"\">" << newl
- << newl
- << "<head>" << newl
- << "<title>" << stripExt(name) << "</title>" << newl
- << newl
- << "<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\"/>" << newl
- << "<meta name=\"viewport\" content=\"user-scalable=no\"/>" << newl
- << newl;
-
+
if(getSetting<bool>("offline")) {
out << "<script>" << newl;
copy(locateFile(AsyGL));
@@ -48,15 +100,15 @@ void jsfile::open(string name) {
out << "<script" << newl << "src=\""
<< getSetting<string>("asygl") << "\">" << newl << "</script>" << newl;
}
- out << "<script>" << newl;
+ out << newl << "<script>" << newl;
out << newl
<< "canvasWidth=" << gl::fullWidth << ";" << newl
<< "canvasHeight=" << gl::fullHeight << ";" << newl
<< "absolute=" << std::boolalpha << getSetting<bool>("absolute") << ";"
<< newl << newl
- << "b=[" << gl::xmin << "," << gl::ymin << "," << gl::zmin << "];"
+ << "b=[" << gl::xmin << "," << gl::ymin << "," << gl::zmin << "];"
<< newl
- << "B=[" << gl::xmax << "," << gl::ymax << "," << gl::zmax << "];"
+ << "B=[" << gl::xmax << "," << gl::ymax << "," << gl::zmax << "];"
<< newl
<< "orthographic=" << gl::orthographic << ";"
<< newl
@@ -99,7 +151,8 @@ void jsfile::open(string name) {
out << "];" << newl << newl;
}
-jsfile::~jsfile() {
+void jsfile::finish(string name)
+{
size_t ncenters=drawElement::center.size();
if(ncenters > 0) {
out << "Centers=[";
@@ -108,29 +161,27 @@ jsfile::~jsfile() {
out << newl << "];" << newl;
}
out << "</script>"
- << newl << newl << "</head>"
+ << newl << "</head>"
<< newl << newl << "<body style=\"overflow: hidden;\" onload=\"webGLStart();\">"
<< newl << "<canvas id=\"Asymptote\" width=\""
<< gl::fullWidth << "\" height=\"" << gl::fullHeight
<< "\" style=\"border: none;\">"
- << newl << "</canvas>"
- << newl << "</body>"
- << newl << newl << "</html>"
- << newl;
+ << newl << "</canvas>";
+ footer(name);
}
-void jsfile::addColor(const prc::RGBAColour& c)
+void jsfile::addColor(const prc::RGBAColour& c)
{
out << "[" << byte(c.R) << "," << byte(c.G) << "," << byte(c.B)
<< "," << byte(c.A) << "]";
}
-void jsfile::addIndices(const uint32_t *I)
+void jsfile::addIndices(const uint32_t *I)
{
out << "[" << I[0] << "," << I[1] << "," << I[2] << "]";
}
-bool distinct(const uint32_t *I, const uint32_t *J)
+bool distinct(const uint32_t *I, const uint32_t *J)
{
return I[0] != J[0] || I[1] != J[1] || I[2] != J[2];
}
@@ -143,7 +194,7 @@ void jsfile::addPatch(triple const* controls, size_t n,
size_t last=n-1;
for(size_t i=0; i < last; ++i)
out << controls[i] << "," << newl;
- out << controls[last] << newl << "],"
+ out << controls[last] << newl << "],"
<< drawElement::centerIndex << "," << materialIndex << ","
<< Min << "," << Max;
if(c) {
@@ -191,7 +242,7 @@ void jsfile::addPixel(const triple& z0, double width,
void jsfile::addMaterial(size_t index)
{
out << "Materials.push(new Material(" << newl
- << material[index]
+ << material[index]
<< "));" << newl << newl;
}
@@ -203,18 +254,18 @@ void jsfile::addTriangles(size_t nP, const triple* P, size_t nN,
{
for(size_t i=0; i < nP; ++i)
out << "Positions.push(" << P[i] << ");" << newl;
-
+
for(size_t i=0; i < nN; ++i)
out << "Normals.push(" << N[i] << ");" << newl;
-
+
for(size_t i=0; i < nC; ++i) {
out << "Colors.push(";
addColor(C[i]);
out << ");" << newl;
}
-
+
for(size_t i=0; i < nI; ++i) {
- out << "Indices.push([";
+ out << "Indices.push([";
const uint32_t *PIi=PI[i];
const uint32_t *NIi=NI[i];
bool keepNI=distinct(NIi,PIi);
@@ -275,10 +326,10 @@ void jsfile::addTube(const triple *g, double width,
<< g[1] << "," << newl
<< g[2] << "," << newl
<< g[3] << newl << "],"
- << width << ","
+ << width << ","
<< drawElement::centerIndex << "," << materialIndex << ","
<< Min << "," << Max << "," << core <<");" << newl << newl;
}
+#endif
}
-#endif
diff --git a/Build/source/utils/asymptote/jsfile.h b/Build/source/utils/asymptote/jsfile.h
index b0b70972af0..af547213614 100644
--- a/Build/source/utils/asymptote/jsfile.h
+++ b/Build/source/utils/asymptote/jsfile.h
@@ -11,32 +11,44 @@ namespace camp {
class jsfile {
jsofstream out;
-
-public:
+
+public:
jsfile() {}
- ~jsfile();
-
+ ~jsfile() {}
+
+ void copy(string name, bool header=false);
+
+ void header(string name);
+ void meta(string name, bool scalable=true);
+ void finish(string name);
+ void footer(string name);
+
+ void svgtohtml(string name);
+
+#ifdef HAVE_LIBGLM
+ void precision(int digits) {out.precision(digits);}
+
void open(string name);
- void copy(string name);
-
- void addColor(const prc::RGBAColour& c);
- void addIndices(const uint32_t *I);
-
+ void comment(string name);
+
+ void addColor(const prc::RGBAColour& c);
+ void addIndices(const uint32_t *I);
+
void addPatch(const triple* controls, size_t n, const triple& Min,
const triple& Max, const prc::RGBAColour *colors, size_t nc);
-
+
void addCurve(const triple& z0, const triple& c0,
const triple& c1, const triple& z1,
const triple& Min, const triple& Max);
-
+
void addCurve(const triple& z0, const triple& z1,
const triple& Min, const triple& Max);
-
+
void addPixel(const triple& z0, double width,
const triple& Min, const triple& Max);
-
+
void addMaterial(size_t index);
-
+
void addTriangles(size_t nP, const triple* P, size_t nN, const triple* N,
size_t nC, const prc::RGBAColour* C, size_t nI,
const uint32_t (*PI)[3], const uint32_t (*NI)[3],
@@ -51,6 +63,7 @@ public:
const double& polar=0.0, const double& azimuth=0.0);
void addTube(const triple *g, double width,
const triple& Min, const triple& Max, bool core=false);
+#endif
};
} //namespace camp
diff --git a/Build/source/utils/asymptote/knot.cc b/Build/source/utils/asymptote/knot.cc
index 199be8249bf..09ea2fe3b21 100644
--- a/Build/source/utils/asymptote/knot.cc
+++ b/Build/source/utils/asymptote/knot.cc
@@ -71,7 +71,7 @@ double velocity(double theta, double phi, tension t)
double denom = t.val * (3.0 + c*ct + d*cf);
- double r = denom != 0.0 ? (2.0 + a*(st - b*sf)*(sf - b*st)*(ct-cf)) / denom
+ double r = denom != 0.0 ? (2.0 + a*(st - b*sf)*(sf - b*st)*(ct-cf)) / denom
: VELOCITY_BOUND;
//cerr << " velocity(" << theta << "," << phi <<")= " << r << endl;
@@ -282,7 +282,7 @@ struct eqnprop : public knotprop<eqn> {
// Ax=0), there is no need to solve for theta; we can just use zeros for the
// thetas. In fact, our general solving method may not work in this case.
// A common example of this is
-//
+//
// a{curl 1}..{curl 1}b
//
// which arises when solving a one-length path a..b or in a larger path a
@@ -320,7 +320,7 @@ weqn scale(weqn q) {
/* Recalculate the equations in the form:
* theta[j] + post * theta[j+1] = aug + w * theta[0]
- *
+ *
* Used as the first step in solve cyclic equations.
*/
cvector<weqn> recalc(cvector<eqn>& e)
@@ -375,7 +375,7 @@ double solveForTheta0(cvector<weqn>& we)
}
// After the iteration we have
- //
+ //
// theta[n] = a + b*theta[0] + c*theta[n]
//
// where theta[n]=theta[0], so
@@ -601,7 +601,7 @@ void encodeStraight(protopath& p, Int k, knotlist& l)
pair b=l.back().z;
double bt=l.back().tin.val;
pair step=(b-a)/3.0;
-
+
if (at==1.0 && bt==1.0) {
p.straight(k)=true;
p.post(k)=a+step;
@@ -804,7 +804,7 @@ path solveSimple(cvector<pair>& z)
{
// The two specifiers used: an open spec and a curl spec for the ends.
spec open;
-
+
// curlSpec curl;
// curlSpec curly(2.0);
// dirSpec E(0);
diff --git a/Build/source/utils/asymptote/knot.h b/Build/source/utils/asymptote/knot.h
index aaf49a4c036..e087f271e61 100644
--- a/Build/source/utils/asymptote/knot.h
+++ b/Build/source/utils/asymptote/knot.h
@@ -37,7 +37,7 @@ public:
cvector(size_t n) : vector<T>(n) {}
cvector(size_t n, const T& t) : vector<T>(n,t) {}
cvector(const vector<T>& v) : vector<T>(v) {}
-
+
T& operator[](Int j) {
return vector<T>::operator[](imod(j,(Int) this->size()));
}
@@ -51,9 +51,9 @@ class knotlist;
/* A linear equation (one of a set of equations to solve for direction through
knots in a path). The i-th equation is:
-
+
pre*theta[i-1] + piv*theta[i] + post*theta[i+1] = aug
-
+
where indices are taken mod n.
*/
struct eqn {
@@ -64,7 +64,7 @@ struct eqn {
friend ostream& operator<< (ostream& out, const eqn& e)
{
return out << e.pre << " * pre + "
- << e.piv << " * piv + "
+ << e.piv << " * piv + "
<< e.post << " * post = "
<< e.aug;
}
@@ -76,7 +76,7 @@ struct eqn {
class spec : public gc {
public:
virtual ~spec() {}
-
+
// If the knot is open, it gives no restriction on the behavior of the
// path.
virtual bool open() { return true; }
@@ -126,7 +126,7 @@ public:
: given(niceAngle(z)) {}
pair dir() { return expi(given); }
-
+
eqn eqnOut(Int j, knotlist& l, cvector<double>& d, cvector<double>& psi);
eqn eqnIn (Int j, knotlist& l, cvector<double>& d, cvector<double>& psi);
@@ -146,7 +146,7 @@ public:
if(gamma < 0)
reportError("curl cannot be less than 0");
}
-
+
double curl() { return gamma; }
eqn eqnOut(Int j, knotlist& l, cvector<double>& d, cvector<double>& psi);
@@ -165,9 +165,9 @@ public:
pair cz;
bool straight;
- controlSpec(pair cz, bool straight=false)
+ controlSpec(pair cz, bool straight=false)
: cz(cz), straight(straight) {}
-
+
bool open() { return false; }
bool controlled() { return true; }
pair control() { return cz; }
@@ -226,7 +226,7 @@ ostream& operator<<(ostream& out, const knot& k);
class knotlist {
public:
virtual ~knotlist() {}
-
+
virtual Int length() = 0;
virtual bool cyclic() = 0;
@@ -278,7 +278,7 @@ struct simpleknotlist : public knotlist {
bool cyclic() { return cycles; }
knot& cell(Int j) { return nodes[j]; }
};
-
+
// A protopath is a path being made.
struct protopath {
bool cycles;
@@ -361,7 +361,7 @@ protected:
}
return v;
}
-
+
virtual cvector<T> cyclicCompute()
{
Int n=l.length();
@@ -385,7 +385,7 @@ protected:
}
return v;
}
-
+
virtual cvector<T> cyclicBackCompute()
{
Int n=l.length();
@@ -397,7 +397,7 @@ protected:
public:
virtual ~knotprop() {}
-
+
virtual cvector<T> compute() {
return l.cyclic() ? cyclicCompute() : linearCompute();
}
@@ -429,7 +429,7 @@ protected:
public:
virtual ~knottrans() {}
-
+
knottrans(knotlist& l)
: knotprop<knot>(l) {}
@@ -470,7 +470,7 @@ protected:
end(n);
}
}
-
+
virtual void cyclicExec()
{
Int n=l.length();
@@ -490,7 +490,7 @@ protected:
start(0);
}
}
-
+
virtual void cyclicBackExec()
{
Int n=l.length();
@@ -500,7 +500,7 @@ protected:
public:
virtual ~knoteffect() {}
-
+
virtual void exec() {
if (l.cyclic())
cyclicExec();
@@ -524,7 +524,7 @@ path solve(knotlist& l);
path solveSimple(cvector<pair>& z);
double velocity(double theta, double phi, tension t);
-
+
} // namespace camp
GC_DECLARE_PTRFREE(camp::eqn);
diff --git a/Build/source/utils/asymptote/lexical.h b/Build/source/utils/asymptote/lexical.h
index fc3879961d6..89f3edb37ab 100644
--- a/Build/source/utils/asymptote/lexical.h
+++ b/Build/source/utils/asymptote/lexical.h
@@ -9,14 +9,14 @@ namespace lexical {
class bad_cast {};
-template <typename T>
-T cast(const string& s, bool tolerant=false)
+template <typename T>
+T cast(const string& s, bool tolerant=false)
{
istringstream is(s);
T value;
if(is && is >> value && ((is >> std::ws).eof() || tolerant)) return value;
throw bad_cast();
-}
+}
}
diff --git a/Build/source/utils/asymptote/locate.cc b/Build/source/utils/asymptote/locate.cc
index 52967d9fbdb..d1c11a1f270 100644
--- a/Build/source/utils/asymptote/locate.cc
+++ b/Build/source/utils/asymptote/locate.cc
@@ -12,7 +12,7 @@
#include "locate.h"
-
+
namespace settings {
namespace fs {
@@ -28,7 +28,7 @@ string extension(string name)
bool exists(string filename)
{
- return ::access(filename.c_str(), R_OK) == 0;
+ return ::access(filename.c_str(), R_OK) == 0;
}
} // namespace fs
@@ -37,15 +37,15 @@ bool exists(string filename)
file_list_t searchPath;
// Returns list of possible filenames, accounting for extensions.
-file_list_t mungeFileName(string id)
+file_list_t mungeFileName(string id, string suffix)
{
string ext = fs::extension(id);
file_list_t files;
- if (ext == "."+settings::suffix) {
+ if (ext == "."+suffix) {
files.push_back(id);
- files.push_back(id+"."+settings::suffix);
+ files.push_back(id+"."+suffix);
} else {
- files.push_back(id+"."+settings::suffix);
+ files.push_back(id+"."+suffix);
files.push_back(id);
}
return files;
@@ -62,10 +62,10 @@ string join(string dir, string file, bool full)
// Find the appropriate file, first looking in the local directory, then the
// directory given in settings, and finally the global system directory.
-string locateFile(string id, bool full)
+string locateFile(string id, bool full, string suffix)
{
if(id.empty()) return "";
- file_list_t filenames = mungeFileName(id);
+ file_list_t filenames = mungeFileName(id,suffix);
for (file_list_t::iterator leaf = filenames.begin();
leaf != filenames.end();
++leaf) {
@@ -77,7 +77,7 @@ string locateFile(string id, bool full)
(*leaf)[p]='/';
leaf->insert(0,"/cygdrive/");
}
-#endif
+#endif
if ((*leaf)[0] == '/') {
string file = *leaf;
@@ -91,11 +91,11 @@ string locateFile(string id, bool full)
if (fs::exists(file))
return file;
}
- }
+ }
}
return string();
}
} // namespace settings
-
+
diff --git a/Build/source/utils/asymptote/locate.h b/Build/source/utils/asymptote/locate.h
index 338057b805f..458d0885dfe 100644
--- a/Build/source/utils/asymptote/locate.h
+++ b/Build/source/utils/asymptote/locate.h
@@ -9,6 +9,7 @@
#define LOCATE_H
#include "common.h"
+#include "settings.h"
namespace settings {
@@ -17,7 +18,7 @@ extern file_list_t searchPath;
// Find the appropriate file, first looking in the local directory, then the
// directory given in settings, and finally the global system directory.
-string locateFile(string id, bool full=false);
+string locateFile(string id, bool full=false, string suffix=settings::suffix);
namespace fs {
diff --git a/Build/source/utils/asymptote/main.cc b/Build/source/utils/asymptote/main.cc
index 486e84ef781..e4eb1dc5904 100644
--- a/Build/source/utils/asymptote/main.cc
+++ b/Build/source/utils/asymptote/main.cc
@@ -1,23 +1,23 @@
/************
-*
-* This file is part of the vector graphics language Asymptote
-* Copyright (C) 2004 Andy Hammerlindl, John C. Bowman, Tom Prince
-* http://asymptote.sourceforge.net
-*
-* This program is free software: you can redistribute it and/or modify
-* it under the terms of the GNU Lesser General Public License as published by
-* the Free Software Foundation, either version 3 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public License
-* along with this program. If not, see <http://www.gnu.org/licenses/>.
-*
-*************/
+ *
+ * This file is part of the vector graphics language Asymptote
+ * Copyright (C) 2004 Andy Hammerlindl, John C. Bowman, Tom Prince
+ * https://asymptote.sourceforge.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ *************/
#ifdef __CYGWIN__
#define _POSIX_C_SOURCE 200809L
@@ -50,6 +50,10 @@ using namespace settings;
using interact::interactive;
+namespace gl {
+extern bool glexit;
+}
+
namespace run {
void purge();
}
@@ -179,9 +183,13 @@ void *asymain(void *A)
}
#ifdef HAVE_GL
#ifdef HAVE_PTHREAD
- if(gl::glthread && !getSetting<bool>("offscreen")) {
+ if(gl::glthread) {
+#ifdef __MSDOS__ // Signals are unreliable in MSWindows
+ gl::glexit=true;
+#else
pthread_kill(gl::mainthread,SIGURG);
pthread_join(gl::mainthread,NULL);
+#endif
}
#endif
#endif
@@ -216,7 +224,7 @@ int main(int argc, char *argv[])
#endif
gl::glthread=usethreads ? getSetting<bool>("threads") : false;
#if HAVE_PTHREAD
-
+#ifndef HAVE_LIBOSMESA
if(gl::glthread) {
pthread_t thread;
try {
@@ -237,6 +245,7 @@ int main(int argc, char *argv[])
}
}
#endif
+#endif
gl::glthread=false;
#endif
asymain(&args);
diff --git a/Build/source/utils/asymptote/material.h b/Build/source/utils/asymptote/material.h
index d6a6084ae57..f16f421e52b 100644
--- a/Build/source/utils/asymptote/material.h
+++ b/Build/source/utils/asymptote/material.h
@@ -14,17 +14,17 @@
namespace camp {
inline bool operator < (const glm::vec4& m1, const glm::vec4& m2) {
- return m1[0] < m2[0] ||
+ return m1[0] < m2[0] ||
(m1[0] == m2[0] &&
- (m1[1] < m2[1] ||
+ (m1[1] < m2[1] ||
(m1[1] == m2[1] &&
- (m1[2] < m2[2] ||
+ (m1[2] < m2[2] ||
(m1[2] == m2[2] &&
(m1[3] < m2[3]))))));
}
inline glm::vec4 GLparameters(GLfloat shininess, GLfloat metallic,
- GLfloat fresnel0) {
+ GLfloat fresnel0) {
return glm::vec4(shininess,metallic,fresnel0,0.0);
}
@@ -42,7 +42,7 @@ public:
Material() {}
Material(const glm::vec4& diffuse, const glm::vec4& emissive,
- const glm::vec4& specular, double shininess, double metallic, double fresnel0) :
+ const glm::vec4& specular, double shininess, double metallic, double fresnel0) :
diffuse(diffuse), emissive(emissive), specular(specular),
parameters(GLparameters(shininess,metallic,fresnel0)) {}
@@ -57,19 +57,19 @@ public:
emissive=m.emissive;
specular=m.specular;
parameters=m.parameters;
- return *this;
+ return *this;
}
-
+
friend bool operator < (const Material& m1, const Material& m2) {
return m1.diffuse < m2.diffuse ||
- (m1.diffuse == m2.diffuse &&
+ (m1.diffuse == m2.diffuse &&
(m1.emissive < m2.emissive ||
- (m1.emissive == m2.emissive &&
- (m1.specular < m2.specular ||
- (m1.specular == m2.specular &&
- (m1.parameters < m2.parameters))))));
+ (m1.emissive == m2.emissive &&
+ (m1.specular < m2.specular ||
+ (m1.specular == m2.specular &&
+ (m1.parameters < m2.parameters))))));
}
-
+
friend ostream& operator << (ostream& out, const Material& m) {
out << "diffuse=" << m.diffuse << "," << newl
<< "emissive=" << m.emissive << "," << newl
@@ -80,7 +80,7 @@ public:
return out;
}
-};
+};
extern size_t Nmaterials; // Number of materials compiled in shader
extern size_t nmaterials; // Current size of materials buffer
diff --git a/Build/source/utils/asymptote/mathop.h b/Build/source/utils/asymptote/mathop.h
index aba85d39a4d..3c5da5b73cd 100644
--- a/Build/source/utils/asymptote/mathop.h
+++ b/Build/source/utils/asymptote/mathop.h
@@ -71,7 +71,7 @@ template <typename T>
struct minus {
T operator() (T x, T y, size_t=0) {return x-y;}
};
-
+
template <typename T>
struct times {
T operator() (T x, T y, size_t=0) {return x*y;}
@@ -87,9 +87,9 @@ struct timesR {
T operator () (T y, double x, size_t=0) {return x*y;}
};
-extern void dividebyzero(size_t i=0);
-extern void integeroverflow(size_t i=0);
-
+extern void dividebyzero(size_t i=0);
+extern void integeroverflow(size_t i=0);
+
template <typename T>
struct divide {
T operator() (T x, T y, size_t i=0) {
@@ -106,20 +106,20 @@ struct divide<camp::triple> {
inline bool validInt(double x) {
return x > Int_MIN-0.5 && x < Int_MAX+0.5;
}
-
+
inline void checkInt(double x, size_t i)
{
if(validInt(x)) return;
integeroverflow(i);
}
-
+
inline Int Intcast(double x)
{
if(validInt(x)) return (Int) x;
integeroverflow(0);
return 0;
}
-
+
template<>
struct plus<Int> {
Int operator() (Int x, Int y, size_t i=0) {
@@ -143,7 +143,7 @@ struct times<Int> {
Int operator() (Int x, Int y, size_t i=0) {
if(y == 0) return 0;
if(y < 0) {y=-y; x=-x;}
- if((y > int_MAX || x > int_MAX/(int) y || x < int_MIN/(int) y) &&
+ if((y > int_MAX || x > int_MAX/(int) y || x < int_MIN/(int) y) &&
(x > Int_MAX/y || x < Int_MIN/y))
integeroverflow(i);
return x*y;
@@ -169,7 +169,7 @@ inline Int Negate(Int x, size_t i=0) {
if(x < -Int_MAX) integeroverflow(i);
return -x;
}
-
+
template<>
inline void Negate<Int>(vm::stack *s)
{
@@ -187,7 +187,7 @@ T pow(T x, Int y)
if(y == 0) return 1.0;
if(x == 0.0 && y > 0) return 0.0;
if(y < 0) {y=-y; x=1/x;}
-
+
T r=1.0;
for(;;) {
if(y & 1) r *= x;
@@ -195,7 +195,7 @@ T pow(T x, Int y)
x *= x;
}
}
-
+
template <typename T>
struct power {
T operator() (T x, T y, size_t=0) {return pow(x,y);}
@@ -233,7 +233,7 @@ struct power<Int> {
}
}
};
-
+
template <typename T>
struct mod {
T operator() (T x, T y, size_t i=0) {
@@ -299,7 +299,7 @@ struct maxbound {
};
template <double (*func)(double)>
-void realReal(vm::stack *s)
+void realReal(vm::stack *s)
{
double x=vm::pop<double>(s);
s->push(func(x));
diff --git a/Build/source/utils/asymptote/memory.h b/Build/source/utils/asymptote/memory.h
index cf6f8f2084b..a201f5bd4f5 100644
--- a/Build/source/utils/asymptote/memory.h
+++ b/Build/source/utils/asymptote/memory.h
@@ -42,9 +42,9 @@
#ifdef __DECCXX_LIBCXX_RH70
#define CONST
#else
-#define CONST const
+#define CONST const
#endif
-
+
#ifdef USEGC
#define GC_THREADS
@@ -107,8 +107,8 @@ inline void* operator new(size_t size, GCPlacement) {
}
inline void* operator new[](size_t size, GCPlacement) {
- return operator new(size);
-}
+ return operator new(size);
+ }
template<class T>
struct GC_type_traits {};
@@ -155,15 +155,15 @@ GC_CONTAINER(multimap);
#undef GC_CONTAINER
#ifndef NOHASH
-#define GC_CONTAINER(KIND) \
- template <typename Key, typename T, \
- typename Hash = EXT::hash<Key>, \
- typename Eq = std::equal_to<Key> > \
- struct KIND : public \
- EXT::KIND<Key,T,Hash,Eq,PAIR_ALLOC>, public gc { \
- KIND() : EXT::KIND<Key,T,Hash,Eq,PAIR_ALLOC> () {} \
- KIND(size_t n) \
- : EXT::KIND<Key,T,Hash,Eq,PAIR_ALLOC> (n) {} \
+#define GC_CONTAINER(KIND) \
+ template <typename Key, typename T, \
+ typename Hash = EXT::hash<Key>, \
+ typename Eq = std::equal_to<Key> > \
+ struct KIND : public \
+ EXT::KIND<Key,T,Hash,Eq,PAIR_ALLOC>, public gc { \
+ KIND() : EXT::KIND<Key,T,Hash,Eq,PAIR_ALLOC> () {} \
+ KIND(size_t n) \
+ : EXT::KIND<Key,T,Hash,Eq,PAIR_ALLOC> (n) {} \
}
GC_CONTAINER(unordered_map);
diff --git a/Build/source/utils/asymptote/mod.h b/Build/source/utils/asymptote/mod.h
index 89d017c6ced..b441d08b7c5 100644
--- a/Build/source/utils/asymptote/mod.h
+++ b/Build/source/utils/asymptote/mod.h
@@ -16,8 +16,8 @@ using std::fmod;
inline Int Mod(Int x, Int y) {return x % y;}
inline double Mod(double x, double y) {return fmod(x,y);}
-
-template<typename T>
+
+template<typename T>
inline T portableMod(T x,T y)
{
// Implementation-independent definition of mod; ensure that result has
@@ -26,7 +26,7 @@ inline T portableMod(T x,T y)
if((y > 0 && val < 0) || (y < 0 && val > 0)) val += y;
return val;
}
-
+
inline Int imod(Int x, Int y)
{
return portableMod<Int>(x,y);
diff --git a/Build/source/utils/asymptote/name.cc b/Build/source/utils/asymptote/name.cc
index b3853b5a91c..d16e6e1e93b 100644
--- a/Build/source/utils/asymptote/name.cc
+++ b/Build/source/utils/asymptote/name.cc
@@ -59,7 +59,7 @@ frame *name::frameTrans(coenv &e)
else
return tyFrameTrans(e);
}
-
+
types::ty *name::getType(coenv &e, bool tacit)
{
@@ -76,11 +76,11 @@ varEntry *simpleName::getVarEntry(coenv &e)
types::ty *t=signatureless(varGetType(e));
return t ? e.e.lookupVarByType(id, t) : 0;
}
-
+
void simpleName::varTrans(action act, coenv &e, types::ty *target)
{
varEntry *v = e.e.lookupVarByType(id, target);
-
+
if (v) {
v->encode(act, getPos(), e.c);
forceEquivalency(act, e, target, v->getType());
@@ -135,7 +135,7 @@ frame *simpleName::tyFrameTrans(coenv &e)
ent->v->encode(READ, getPos(), e.c);
return ent->v->getLevel();
}
- else
+ else
return 0;
}
@@ -311,7 +311,7 @@ frame *qualifiedName::tyFrameTrans(coenv &e)
ent->v->encode(READ, getPos(), e.c);
return ent->v->getLevel();
}
- else
+ else
return f;
}
diff --git a/Build/source/utils/asymptote/name.h b/Build/source/utils/asymptote/name.h
index a10168d9f46..46596a344a2 100644
--- a/Build/source/utils/asymptote/name.h
+++ b/Build/source/utils/asymptote/name.h
@@ -133,10 +133,10 @@ class qualifiedName : public name {
record *castToRecord(types::ty *t, bool tacit = false);
// Translates as a virtual field, if possible. qt is the type of the
- // qualifier. Return true if there was a matching virtual field.
+ // qualifier. Return true if there was a matching virtual field.
bool varTransVirtual(action act, coenv &e,
types::ty *target, types::ty *qt);
-
+
// Translates as an ordinary (non-virtual) field of a record, r.
void varTransField(action act, coenv &e,
types::ty *target, record *r);
diff --git a/Build/source/utils/asymptote/newexp.cc b/Build/source/utils/asymptote/newexp.cc
index 8105a9d9295..62154a5e0db 100644
--- a/Build/source/utils/asymptote/newexp.cc
+++ b/Build/source/utils/asymptote/newexp.cc
@@ -90,7 +90,7 @@ types::ty *newRecordExp::transFromTyEntry(position pos, coenv &e,
record *r = dynamic_cast<record *>(t);
assert(r);
- // Encode the allocation.
+ // Encode the allocation.
e.c.encode(inst::makefunc,r->getInit());
e.c.encode(inst::popcall);
@@ -109,7 +109,7 @@ types::ty *newRecordExp::getType(coenv &e)
return primError();
else
return t;
-}
+}
void newArrayExp::prettyprint(ostream &out, Int indent)
{
@@ -117,7 +117,7 @@ void newArrayExp::prettyprint(ostream &out, Int indent)
celltype->prettyprint(out, indent+1);
if (dimexps) dimexps->prettyprint(out, indent+1);
- if (dims) dims->prettyprint(out, indent+1);
+ if (dims) dims->prettyprint(out, indent+1);
if (ai) ai->prettyprint(out, indent+1);
}
diff --git a/Build/source/utils/asymptote/newexp.h b/Build/source/utils/asymptote/newexp.h
index dd64584a6a0..d386b181007 100644
--- a/Build/source/utils/asymptote/newexp.h
+++ b/Build/source/utils/asymptote/newexp.h
@@ -34,7 +34,7 @@ public:
types::ty *trans(coenv &e);
types::ty *getType(coenv &e);
};
-
+
class newArrayExp : public exp {
ty *celltype;
explist *dimexps;
@@ -54,7 +54,7 @@ public:
types::ty *trans(coenv &e);
types::ty *getType(coenv &e);
};
-
+
} // namespace absyntax
#endif
diff --git a/Build/source/utils/asymptote/opcodes.h b/Build/source/utils/asymptote/opcodes.h
index 71c0de41aa8..53da3424648 100644
--- a/Build/source/utils/asymptote/opcodes.h
+++ b/Build/source/utils/asymptote/opcodes.h
@@ -1,7 +1,7 @@
/*****
* opcodes.h
* Andy Hammerlindl 2010/10/24
- *
+ *
* A list of the virtual machine opcodes, defined by the macro OPCODE.
*****/
diff --git a/Build/source/utils/asymptote/pair.h b/Build/source/utils/asymptote/pair.h
index cd719a26518..b37b778ecbf 100644
--- a/Build/source/utils/asymptote/pair.h
+++ b/Build/source/utils/asymptote/pair.h
@@ -29,11 +29,11 @@ public:
jsofstream() {}
jsofstream(const string& name) : std::ofstream(name.c_str()) {}
void open(const string& name) {std::ofstream::open(name.c_str());}
-
+
template<class T>
jsofstream& operator << (const T& x) {
(std::ofstream&)(*this) << x;
- return *this;
+ return *this;
}
};
@@ -49,7 +49,7 @@ public:
double gety() const { return y; }
bool isreal() {return y == 0;}
-
+
friend pair operator+ (const pair& z, const pair& w)
{
return pair(z.x+w.x,z.y+w.y);
@@ -136,12 +136,12 @@ public:
{
return x*x + y*y;
}
-
+
double length() const
{
return sqrt(abs2());
}
-
+
friend double length(const pair& z)
{
return z.length();
@@ -151,12 +151,12 @@ public:
{
return camp::angle(x,y,warn);
}
-
+
friend double angle(const pair& z, bool warn=true)
{
return z.angle(warn);
}
-
+
friend pair unit(const pair& z)
{
double scale=z.length();
@@ -164,22 +164,22 @@ public:
scale=1.0/scale;
return pair(z.x*scale,z.y*scale);
}
-
+
friend pair conj(const pair& z)
{
return pair(z.x,-z.y);
}
-
+
friend double dot(const pair& z, const pair& w)
{
return z.x*w.x+z.y*w.y;
}
-
+
friend double cross(const pair& z, const pair& w)
{
return z.x*w.y-z.y*w.x;
}
-
+
// Return the principal branch of the square root (non-negative real part).
friend pair Sqrt(const pair& z) {
double mag=z.length();
@@ -202,20 +202,20 @@ public:
friend istream& operator >> (istream& s, pair& z)
{
char c;
- s >> std::ws;
+ s >> ws;
bool paren=s.peek() == '('; // parenthesis are optional
if(paren) s >> c;
- s >> z.x >> std::ws;
+ s >> z.x >> ws;
if(!s.eof() && s.peek() == ',') s >> c >> z.y;
else {
if(paren && !s.eof()) s >> z.y;
else z.y=0.0;
}
if(paren) {
- s >> std::ws;
+ s >> ws;
if(s.peek() == ')') s >> c;
}
-
+
return s;
}
@@ -224,13 +224,13 @@ public:
out << "(" << z.x << "," << z.y << ")";
return out;
}
-
+
friend jsofstream& operator << (jsofstream& out, const pair& z)
{
out << "[" << z.x << "," << z.y << "]";
return out;
}
-
+
friend class box;
};
diff --git a/Build/source/utils/asymptote/parser.cc b/Build/source/utils/asymptote/parser.cc
index c12a47c50e1..06509acd39f 100644
--- a/Build/source/utils/asymptote/parser.cc
+++ b/Build/source/utils/asymptote/parser.cc
@@ -8,6 +8,7 @@
#include <sstream>
#include <cstring>
#include <fcntl.h>
+#include <algorithm>
#include "common.h"
@@ -15,6 +16,10 @@
#include <sys/stat.h>
#endif
+#ifdef HAVE_LIBCURL
+#include <curl/curl.h>
+#endif
+
#include "interact.h"
#include "locate.h"
#include "errormsg.h"
@@ -30,12 +35,8 @@ extern bool lexerEOF();
extern void reportEOF();
extern bool hangup;
-static int fd;
-
namespace parser {
-static FILE *fin=NULL;
-
namespace yy { // Lexers
std::streambuf *sbuf = NULL;
@@ -45,23 +46,6 @@ size_t stream_input(char *buf, size_t max_size)
return sbuf ? sbuf->sgetn(buf,max_size) : 0;
}
-int fpeek(int fd)
-{
- int flags=fcntl(fd,F_GETFL,0);
- fcntl(fd,F_SETFL,flags | O_NONBLOCK);
- char c=fgetc(fin);
- ungetc(c,fin);
- fcntl(fd,F_SETFL,flags & ~O_NONBLOCK);
- return c;
-}
-
-size_t pipe_input(char *buf, size_t max_size)
-{
- if(hangup && fpeek(fd) == EOF) {hangup=false; return 0;}
- fgets(buf,max_size-1,fin);
- return strlen(buf);
-}
-
} // namespace yy
void debug(bool state)
@@ -111,27 +95,28 @@ absyntax::file *doParse(size_t (*input) (char* bif, size_t max_size),
absyntax::file *parseStdin()
{
debug(false);
+ yy::sbuf = cin.rdbuf();
+ return doParse(yy::stream_input,"-");
+}
- if(!fin) {
- fd=intcast(settings::getSetting<Int>("inpipe"));
- if(fd >= 0)
- fin=fdopen(fd,"r");
- }
-
- if(fin)
- return doParse(yy::pipe_input,"-");
- else {
- yy::sbuf = cin.rdbuf();
- return doParse(yy::stream_input,"-");
- }
+bool isURL(const string& filename)
+{
+#ifdef HAVE_LIBCURL
+ return filename.find("://") != string::npos;
+#else
+ return false;
+#endif
}
absyntax::file *parseFile(const string& filename,
const char *nameOfAction)
{
+ if(isURL(filename))
+ return parseURL(filename,nameOfAction);
+
if(filename == "-")
return parseStdin();
-
+
string file = settings::locateFile(filename);
if(file.empty())
@@ -139,13 +124,13 @@ absyntax::file *parseFile(const string& filename,
if(nameOfAction && settings::verbose > 1)
cerr << nameOfAction << " " << filename << " from " << file << endl;
-
- debug(false);
+
+ debug(false);
std::filebuf filebuf;
if(!filebuf.open(file.c_str(),std::ios::in))
error(filename);
-
+
#ifdef HAVE_SYS_STAT_H
// Check that the file is not a directory.
static struct stat buf;
@@ -154,14 +139,14 @@ absyntax::file *parseFile(const string& filename,
error(filename);
}
#endif
-
+
// Check that the file can actually be read.
try {
filebuf.sgetc();
} catch (...) {
error(filename);
}
-
+
yy::sbuf = &filebuf;
return doParse(yy::stream_input,file);
}
@@ -176,5 +161,69 @@ absyntax::file *parseString(const string& code,
return doParse(yy::stream_input,filename,extendable);
}
-} // namespace parser
+#ifdef HAVE_LIBCURL
+size_t curlCallback(char *data, size_t size, size_t n, stringstream& buf)
+{
+ size_t Size=size*n;
+ buf.write(data,Size);
+ return Size;
+}
+
+#ifdef CURLOPT_XFERINFODATA
+#define CURL_OFF_T curl_off_t
+#else
+#define CURL_OFF_T double
+#define CURLOPT_XFERINFOFUNCTION CURLOPT_PROGRESSFUNCTION
+#endif
+
+int curlProgress(void *, CURL_OFF_T, CURL_OFF_T, CURL_OFF_T, CURL_OFF_T)
+{
+ return errorstream::interrupt ? -1 : 0;
+}
+bool readURL(stringstream& buf, const string& filename)
+{
+ CURL *curl=curl_easy_init();
+ if(settings::verbose > 3)
+ curl_easy_setopt(curl,CURLOPT_VERBOSE,true);
+#ifdef __MSDOS__
+ string cert=settings::getSetting<string>("sysdir")+settings::dirsep+
+ "ca-bundle.crt";
+ curl_easy_setopt(curl,CURLOPT_CAINFO,cert.c_str());
+#endif
+ curl_easy_setopt(curl,CURLOPT_URL,filename.c_str());
+ curl_easy_setopt(curl,CURLOPT_WRITEFUNCTION,curlCallback);
+ curl_easy_setopt(curl,CURLOPT_WRITEDATA,&buf);
+ curl_easy_setopt(curl,CURLOPT_NOPROGRESS,0);
+ curl_easy_setopt(curl,CURLOPT_XFERINFOFUNCTION,curlProgress);
+
+ CURLcode res=curl_easy_perform(curl);
+ curl_easy_cleanup(curl);
+
+ if(res != CURLE_OK) {
+ cerr << curl_easy_strerror(res) << endl;
+ return false;
+ }
+ string s=buf.str();
+ return !s.empty() && s != "404: Not Found";
+}
+
+absyntax::file *parseURL(const string& filename,
+ const char *nameOfAction)
+{
+ stringstream code;
+
+ if(!readURL(code,filename))
+ error(filename);
+
+ if(nameOfAction && settings::verbose > 1)
+ cerr << nameOfAction << " " << filename << endl;
+
+ debug(false);
+
+ yy::sbuf=code.rdbuf();
+ return doParse(yy::stream_input,filename);
+}
+#endif
+
+} // namespace parser
diff --git a/Build/source/utils/asymptote/parser.h b/Build/source/utils/asymptote/parser.h
index b297d5e86cd..903ef2d5fae 100644
--- a/Build/source/utils/asymptote/parser.h
+++ b/Build/source/utils/asymptote/parser.h
@@ -12,11 +12,16 @@
namespace parser {
-// Opens and parses the file returning the abstract syntax tree. If
-// there is an unrecoverable parse error, returns null.
+// Opens and parses the file returning the abstract syntax tree.
+// If there is an unrecoverable parse error, returns null.
absyntax::file *parseFile(const string& filename,
const char *nameOfAction);
+// Opens and parses the URL returning the abstract syntax tree.
+// If there is an unrecoverable parse error, returns null.
+absyntax::file *parseURL(const string& filename,
+ const char *nameOfAction);
+
// Parses string and returns the abstract syntax tree. Any error in lexing or
// parsing will be reported and a handled_error thrown. If the string is
// "extendable", then a parse error simply due to running out of input will not
@@ -24,6 +29,10 @@ absyntax::file *parseFile(const string& filename,
absyntax::file *parseString(const string& code,
const string& filename,
bool extendable=false);
+
+bool isURL(const string& filename);
+bool readURL(stringstream& buf, const string& filename);
+
} // namespace parser
#endif // PARSER_H
diff --git a/Build/source/utils/asymptote/path.cc b/Build/source/utils/asymptote/path.cc
index d9ad3e668b2..4fcf16114ab 100644
--- a/Build/source/utils/asymptote/path.cc
+++ b/Build/source/utils/asymptote/path.cc
@@ -4,7 +4,7 @@
*
* Stores and returns information on a predefined path.
*
- * When changing the path algorithms, also update the corresponding
+ * When changing the path algorithms, also update the corresponding
* three-dimensional algorithms in path3.cc.
*****/
@@ -27,7 +27,7 @@ const double fuzzFactor=100.0;
const double third=1.0/3.0;
path nullpath;
-
+
const char *nopoints="nullpath has no points";
void checkEmpty(Int n) {
@@ -44,7 +44,7 @@ inline pair sqrt1pxm1(pair x)
{
return x/(Sqrt(1.0+x)+1.0);
}
-
+
// Solve for the real roots of the quadratic equation ax^2+bx+c=0.
quadraticroots::quadraticroots(double a, double b, double c)
{
@@ -139,7 +139,7 @@ inline double cbrtsqrt1pxm(double x)
double s=sqrt1pxm1(x);
return 2.0/(cbrt(x+2.0*(sqrt(1.0+x)+1.0))+cbrt(x)+cbrt(s*s));
}
-
+
// Taylor series of cos((atan(1.0/w)+pi)/3.0).
static inline double costhetapi3(double w)
{
@@ -152,13 +152,13 @@ static inline double costhetapi3(double w)
double w5=w3*w2;
return c1*w+c3*w3+c5*w5+c7*w5*w2;
}
-
+
// Solve for the real roots of the cubic equation ax^3+bx^2+cx+d=0.
-cubicroots::cubicroots(double a, double b, double c, double d)
+cubicroots::cubicroots(double a, double b, double c, double d)
{
static const double ninth=1.0/9.0;
static const double fiftyfourth=1.0/54.0;
-
+
// Remove roots at numerical infinity.
if(fabs(a) <= Fuzz2*(fabs(b)+fabs(c)*Fuzz2+fabs(d)*Fuzz4)) {
quadraticroots q(b,c,d);
@@ -167,7 +167,7 @@ cubicroots::cubicroots(double a, double b, double c, double d)
if(q.roots == 2) t2=q.t2;
return;
}
-
+
// Detect roots at numerical zero.
if(fabs(d) <= Fuzz2*(fabs(c)+fabs(b)*Fuzz2+fabs(a)*Fuzz4)) {
quadraticroots q(a,b,c);
@@ -177,28 +177,28 @@ cubicroots::cubicroots(double a, double b, double c, double d)
if(q.roots == 2) t3=q.t2;
return;
}
-
+
b /= a;
c /= a;
d /= a;
-
+
double b2=b*b;
double Q=3.0*c-b2;
if(fabs(Q) < Fuzz2*(3.0*fabs(c)+fabs(b2)))
Q=0.0;
-
+
double R=(3.0*Q+b2)*b-27.0*d;
if(fabs(R) < Fuzz2*((3.0*fabs(Q)+fabs(b2))*fabs(b)+27.0*fabs(d)))
R=0.0;
-
+
Q *= ninth;
R *= fiftyfourth;
-
+
double Q3=Q*Q*Q;
double R2=R*R;
double D=Q3+R2;
double mthirdb=-b*third;
-
+
if(D > 0.0) {
roots=1;
t1=mthirdb;
@@ -211,19 +211,19 @@ cubicroots::cubicroots(double a, double b, double c, double d)
theta=atan(v);
} else theta=0.5*PI;
double factor=2.0*sqrt(-Q)*(R >= 0 ? 1 : -1);
-
+
t1=mthirdb+factor*cos(third*theta);
t2=mthirdb-factor*cos(third*(theta-PI));
t3=mthirdb;
if(R2 > 0.0)
- t3 -= factor*((v < 100.0) ? cos(third*(theta+PI)) : costhetapi3(1.0/v));
+ t3 -= factor*((v < 100.0) ? cos(third*(theta+PI)) : costhetapi3(1.0/v));
}
}
-
+
pair path::point(double t) const
{
checkEmpty(n);
-
+
Int i = Floor(t);
Int iplus;
t = fmod(t,1);
@@ -259,7 +259,7 @@ pair path::point(double t) const
pair path::precontrol(double t) const
{
checkEmpty(n);
-
+
Int i = Floor(t);
Int iplus;
t = fmod(t,1);
@@ -287,12 +287,12 @@ pair path::precontrol(double t) const
return (abc == a) ? nodes[i].pre : abc;
}
-
-
+
+
pair path::postcontrol(double t) const
{
checkEmpty(n);
-
+
Int i = Floor(t);
Int iplus;
t = fmod(t,1);
@@ -310,7 +310,7 @@ pair path::postcontrol(double t) const
iplus = i+1;
double one_t = 1.0-t;
-
+
pair b = nodes[i].post,
c = nodes[iplus].pre,
d = nodes[iplus].point,
@@ -393,7 +393,7 @@ inline void splitCubic(solvedKnot sn[], double t, const solvedKnot& left_,
left.post=split(t,left.point,left.post); // m0
right.pre=split(t,right.pre,right.point); // m2
mid.pre=split(t,left.post,x); // m3
- mid.post=split(t,x,right.pre); // m4
+ mid.post=split(t,x,right.pre); // m4
mid.point=split(t,mid.pre,mid.post); // m5
}
}
@@ -401,7 +401,7 @@ inline void splitCubic(solvedKnot sn[], double t, const solvedKnot& left_,
path path::subpath(double a, double b) const
{
if(empty()) return path();
-
+
if (a > b) {
const path &rp = reverse();
Int len=length();
@@ -414,7 +414,7 @@ path path::subpath(double a, double b) const
a = 0;
if (b < 0)
b = 0;
- }
+ }
if (b > n-1) {
b = n-1;
if (a > b)
@@ -461,7 +461,7 @@ void path::halve(path &first, path &second) const
first=path(sn[0],sn[1]);
second=path(sn[1],sn[2]);
}
-
+
// Calculate the coefficients of a Bezier derivative divided by 3.
static inline void derivative(pair& a, pair& b, pair& c,
const pair& z0, const pair& c0,
@@ -475,12 +475,12 @@ static inline void derivative(pair& a, pair& b, pair& c,
bbox path::bounds() const
{
if(!box.empty) return box;
-
+
if (empty()) {
// No bounds
return bbox();
}
-
+
Int len=length();
box.add(point(len));
times=bbox(len,len,len,len);
@@ -488,17 +488,17 @@ bbox path::bounds() const
for (Int i = 0; i < len; i++) {
addpoint(box,i);
if(straight(i)) continue;
-
+
pair a,b,c;
derivative(a,b,c,point(i),postcontrol(i),precontrol(i+1),point(i+1));
-
+
// Check x coordinate
quadraticroots x(a.getx(),b.getx(),c.getx());
if(x.distinct != quadraticroots::NONE && goodroot(x.t1))
addpoint(box,i+x.t1);
if(x.distinct == quadraticroots::TWO && goodroot(x.t2))
addpoint(box,i+x.t2);
-
+
// Check y coordinate
quadraticroots y(a.gety(),b.gety(),c.gety());
if(y.distinct != quadraticroots::NONE && goodroot(y.t1))
@@ -512,15 +512,15 @@ bbox path::bounds() const
bbox path::bounds(double min, double max) const
{
bbox box;
-
+
Int len=length();
for (Int i = 0; i < len; i++) {
addpoint(box,i,min,max);
if(straight(i)) continue;
-
+
pair a,b,c;
derivative(a,b,c,point(i),postcontrol(i),precontrol(i+1),point(i+1));
-
+
// Check x coordinate
quadraticroots x(a.getx(),b.getx(),c.getx());
if(x.distinct != quadraticroots::NONE && goodroot(x.t1))
@@ -528,7 +528,7 @@ bbox path::bounds(double min, double max) const
if(x.distinct == quadraticroots::TWO && goodroot(x.t2))
addpoint(box,i+x.t2,min,max);
-
+
// Check y coordinate
quadraticroots y(a.gety(),b.gety(),c.gety());
if(y.distinct != quadraticroots::NONE && goodroot(y.t1))
@@ -539,7 +539,7 @@ bbox path::bounds(double min, double max) const
addpoint(box,len,min,max);
return box;
}
-
+
inline void add(bbox& box, const pair& z, const pair& min, const pair& max)
{
box += z+min;
@@ -549,36 +549,36 @@ inline void add(bbox& box, const pair& z, const pair& min, const pair& max)
bbox path::internalbounds(const bbox& padding) const
{
bbox box;
-
+
// Check interior nodes.
Int len=length();
for (Int i = 1; i < len; i++) {
pair pre=point(i)-precontrol(i);
pair post=postcontrol(i)-point(i);
-
+
// Check node x coordinate
if((pre.getx() >= 0.0) ^ (post.getx() >= 0))
add(box,point(i),padding.left,padding.right);
-
+
// Check node y coordinate
if((pre.gety() >= 0.0) ^ (post.gety() >= 0))
add(box,point(i),pair(0,padding.bottom),pair(0,padding.top));
}
-
+
// Check interior segments.
for (Int i = 0; i < len; i++) {
if(straight(i)) continue;
-
+
pair a,b,c;
derivative(a,b,c,point(i),postcontrol(i),precontrol(i+1),point(i+1));
-
+
// Check x coordinate
quadraticroots x(a.getx(),b.getx(),c.getx());
if(x.distinct != quadraticroots::NONE && goodroot(x.t1))
add(box,point(i+x.t1),padding.left,padding.right);
if(x.distinct == quadraticroots::TWO && goodroot(x.t2))
add(box,point(i+x.t2),padding.left,padding.right);
-
+
// Check y coordinate
quadraticroots y(a.gety(),b.gety(),c.gety());
if(y.distinct != quadraticroots::NONE && goodroot(y.t1))
@@ -607,7 +607,7 @@ double arcLength(const pair& z0, const pair& c0, const pair& c1,
{
double integral;
derivative(a,b,c,z0,c0,c1,z1);
-
+
if(!simpson(integral,ds,0.0,1.0,DBL_EPSILON,1.0))
reportError("nesting capacity exceeded in computing arclength");
return integral;
@@ -622,12 +622,12 @@ double path::cubiclength(Int i, double goal) const
L=(z1-z0).length();
return (goal < 0 || goal >= L) ? L : -goal/L;
}
-
+
double integral=arcLength(z0,postcontrol(i),precontrol(i+1),z1);
L=3.0*integral;
if(goal < 0 || goal >= L) return L;
-
+
double t=goal/L;
goal *= third;
static double dxmin=sqrt(DBL_EPSILON);
@@ -636,7 +636,7 @@ double path::cubiclength(Int i, double goal) const
return -t;
}
-double path::arclength() const
+double path::arclength() const
{
if (cached_length != -1) return cached_length;
@@ -662,14 +662,14 @@ double path::arctime(double goal) const
Int loops = (Int)(goal / cached_length);
goal -= loops*cached_length;
return loops*n+arctime(goal);
- }
+ }
} else {
if (goal <= 0)
return 0;
if (cached_length > 0 && goal >= cached_length)
return n-1;
}
-
+
double l,L=0;
for (Int i = 0; i < n-1; i++) {
l = cubiclength(i,goal);
@@ -711,7 +711,7 @@ inline double cubicDir(const solvedKnot& left, const solvedKnot& right,
pair a,b,c;
derivative(a,b,c,left.point,left.post,right.pre,right.point);
a *= rot; b *= rot; c *= rot;
-
+
quadraticroots ret(a.gety(),b.gety(),c.gety());
switch(ret.distinct) {
case quadraticroots::MANY:
@@ -738,7 +738,7 @@ inline double cubicDir(const solvedKnot& left, const solvedKnot& right,
double path::directiontime(const pair& dir) const {
if (dir == pair(0,0)) return 0;
pair rot = pair(1,0)/unit(dir);
-
+
double t; double pre,post;
for (Int i = 0; i < n-1+cycles; ) {
t = cubicDir(this->nodes[i],(cycles && i==n-1) ? nodes[0]:nodes[i+1],rot);
@@ -757,7 +757,7 @@ double path::directiontime(const pair& dir) const {
}
}
}
-
+
return -1;
}
// }}}
@@ -774,7 +774,7 @@ void roots(std::vector<double> &roots, double a, double b, double c, double d)
if(r.roots >= 2) roots.push_back(r.t2);
if(r.roots == 3) roots.push_back(r.t3);
}
-
+
void roots(std::vector<double> &r, double x0, double c0, double c1, double x1,
double x)
{
@@ -799,7 +799,7 @@ void intersections(std::vector<double>& T, const path& g, const pair& z,
g.precontrol(i+1).getx(),g.point(i+1).getx(),z.getx());
roots(r,g.point(i).gety(),g.postcontrol(i).gety(),
g.precontrol(i+1).gety(),g.point(i+1).gety(),z.gety());
-
+
size_t m=r.size();
for(size_t j=0 ; j < m; ++j) {
double t=r[j];
@@ -913,7 +913,7 @@ void add(std::vector<double>& S, double s, const path& p, double fuzz2)
if((p.point(S[i])-z).abs2() <= fuzz2) return;
S.push_back(s);
}
-
+
void add(std::vector<double>& S, std::vector<double>& T, double s, double t,
const path& p, double fuzz2)
{
@@ -924,7 +924,7 @@ void add(std::vector<double>& S, std::vector<double>& T, double s, double t,
S.push_back(s);
T.push_back(t);
}
-
+
void add(double& s, double& t, std::vector<double>& S, std::vector<double>& T,
std::vector<double>& S1, std::vector<double>& T1,
double pscale, double qscale, double poffset, double qoffset,
@@ -958,7 +958,7 @@ void add(double& s, double& t, std::vector<double>& S, std::vector<double>& T,
void intersections(std::vector<double>& S, path& g,
const pair& p, const pair& q, double fuzz)
-{
+{
double fuzz2=max(fuzzFactor*fuzz*fuzz,Fuzz2);
std::vector<double> S1;
lineintersections(S1,g,p,q,fuzz);
@@ -972,9 +972,9 @@ bool intersections(double &s, double &t, std::vector<double>& S,
double fuzz, bool single, bool exact, unsigned depth)
{
if(errorstream::interrupt) throw interrupted();
-
+
double fuzz2=max(fuzzFactor*fuzz*fuzz,Fuzz2);
-
+
Int lp=p.length();
if(((lp == 1 && p.straight(0)) || lp == 0) && exact) {
std::vector<double> T1,S1;
@@ -990,14 +990,14 @@ bool intersections(double &s, double &t, std::vector<double>& S,
add(s,t,S,T,S1,T1,p,fuzz2,single);
return S1.size() > 0;
}
-
+
pair maxp=p.max();
pair minp=p.min();
pair maxq=q.max();
pair minq=q.min();
-
+
if(maxp.getx()+fuzz >= minq.getx() &&
- maxp.gety()+fuzz >= minq.gety() &&
+ maxp.gety()+fuzz >= minq.gety() &&
maxq.getx()+fuzz >= minp.getx() &&
maxq.gety()+fuzz >= minp.gety()) {
// Overlapping bounding boxes
@@ -1016,11 +1016,11 @@ bool intersections(double &s, double &t, std::vector<double>& S,
}
return true;
}
-
+
path p1,p2;
double pscale,poffset;
std::vector<double> S1,T1;
-
+
if(lp <= 1) {
if(lp == 1) p.halve(p1,p2);
if(lp == 0 || p1 == p || p2 == p) {
@@ -1036,10 +1036,10 @@ bool intersections(double &s, double &t, std::vector<double>& S,
poffset=tp;
pscale=1.0;
}
-
+
path q1,q2;
double qscale,qoffset;
-
+
if(lq <= 1) {
if(lq == 1) q.halve(q1,q2);
if(lq == 0 || q1 == q || q2 == q) {
@@ -1055,12 +1055,12 @@ bool intersections(double &s, double &t, std::vector<double>& S,
qoffset=tq;
qscale=1.0;
}
-
+
bool Short=lp == 1 && lq == 1;
-
+
static size_t maxcount=9;
size_t count=0;
-
+
if(intersections(s,t,S1,T1,p1,q1,fuzz,single,exact,depth)) {
add(s,t,S,T,S1,T1,pscale,qscale,0.0,0.0,p,fuzz2,single);
if(single || depth <= mindepth)
@@ -1068,7 +1068,7 @@ bool intersections(double &s, double &t, std::vector<double>& S,
count += S1.size();
if(Short && count > maxcount) return true;
}
-
+
S1.clear();
T1.clear();
if(intersections(s,t,S1,T1,p1,q2,fuzz,single,exact,depth)) {
@@ -1078,7 +1078,7 @@ bool intersections(double &s, double &t, std::vector<double>& S,
count += S1.size();
if(Short && count > maxcount) return true;
}
-
+
S1.clear();
T1.clear();
if(intersections(s,t,S1,T1,p2,q1,fuzz,single,exact,depth)) {
@@ -1088,7 +1088,7 @@ bool intersections(double &s, double &t, std::vector<double>& S,
count += S1.size();
if(Short && count > maxcount) return true;
}
-
+
S1.clear();
T1.clear();
if(intersections(s,t,S1,T1,p2,q2,fuzz,single,exact,depth)) {
@@ -1098,7 +1098,7 @@ bool intersections(double &s, double &t, std::vector<double>& S,
count += S1.size();
if(Short && count > maxcount) return true;
}
-
+
return S.size() > 0;
}
return false;
@@ -1119,7 +1119,7 @@ ostream& operator<< (ostream& out, const path& p)
out << ".. controls " << p.postcontrol(i) << " and "
<< p.precontrol(i+1) << newl << " ..";
}
- if(p.cycles)
+ if(p.cycles)
out << "cycle";
else
out << p.point(n);
@@ -1198,7 +1198,7 @@ double orient2d(const pair& a, const pair& b, const pair& c)
double pa[]={a.getx(),a.gety()};
double pb[]={b.getx(),b.gety()};
double pc[]={c.getx(),c.gety()};
-
+
orient = orient2dadapt(pa, pb, pc, detsum);
FPU_RESTORE;
return orient;
@@ -1213,7 +1213,7 @@ bool insidebbox(const pair& a, const pair& b, const pair& c, const pair& d,
B.addnonempty(b);
B.addnonempty(c);
B.addnonempty(d);
- return B.left <= z.getx() && z.getx() <= B.right && B.bottom <= z.gety()
+ return B.left <= z.getx() && z.getx() <= B.right && B.bottom <= z.gety()
&& z.gety() <= B.top;
}
@@ -1222,7 +1222,7 @@ inline bool inrange(double x0, double x1, double x)
return (x0 <= x && x <= x1) || (x1 <= x && x <= x0);
}
-// Return true if point z is on z0--z1; otherwise compute contribution to
+// Return true if point z is on z0--z1; otherwise compute contribution to
// winding number.
bool checkstraight(const pair& z0, const pair& z1, const pair& z, Int& count)
{
@@ -1240,10 +1240,10 @@ bool checkstraight(const pair& z0, const pair& z1, const pair& z, Int& count)
return false;
}
-// returns true if point is on curve; otherwise compute contribution to
+// returns true if point is on curve; otherwise compute contribution to
// winding number.
bool checkcurve(const pair& z0, const pair& c0, const pair& c1,
- const pair& z1, const pair& z, Int& count, unsigned depth)
+ const pair& z1, const pair& z, Int& count, unsigned depth)
{
if(depth == 0) return true;
--depth;
@@ -1255,7 +1255,7 @@ bool checkcurve(const pair& z0, const pair& c0, const pair& c1,
const pair m3=0.5*(m0+m1);
const pair m4=0.5*(m1+m2);
const pair m5=0.5*(m3+m4);
- if(checkcurve(z0,m0,m3,m5,z,count,depth) ||
+ if(checkcurve(z0,m0,m3,m5,z,count,depth) ||
checkcurve(m5,m4,m2,z1,z,count,depth)) return true;
} else
if(checkstraight(z0,z1,z,count)) return true;
@@ -1268,15 +1268,15 @@ bool checkcurve(const pair& z0, const pair& c0, const pair& c1,
Int path::windingnumber(const pair& z) const
{
static const Int undefined=Int_MAX % 2 ? Int_MAX : Int_MAX-1;
-
+
if(!cycles)
reportError("path is not cyclic");
-
+
bbox b=bounds();
-
+
if(z.getx() < b.left || z.getx() > b.right ||
z.gety() < b.bottom || z.gety() > b.top) return 0;
-
+
Int count=0;
for(Int i=0; i < n; ++i)
if(straight(i)) {
@@ -1326,7 +1326,7 @@ path nurb(pair z0, pair z1, pair z2, pair z3,
if(m < 1) reportError("invalid sampling interval");
double step=1.0/m;
- for(Int i=0; i <= m; ++i) {
+ for(Int i=0; i <= m; ++i) {
double t=i*step;
double t2=t*t;
double onemt=1.0-t;
@@ -1337,7 +1337,7 @@ path nurb(pair z0, pair z1, pair z2, pair z3,
double W3=w3*t2*t;
nodes[i].point=(W0*z0+W1*z1+W2*z2+W3*z3)/(W0+W1+W2+W3);
}
-
+
static const double twothirds=2.0/3.0;
pair z=nodes[0].point;
nodes[0].pre=z;
diff --git a/Build/source/utils/asymptote/path.h b/Build/source/utils/asymptote/path.h
index 00c3a5ea3fc..107c663a11d 100644
--- a/Build/source/utils/asymptote/path.h
+++ b/Build/source/utils/asymptote/path.h
@@ -4,7 +4,7 @@
*
* Stores a piecewise cubic spline with known control points.
*
- * When changing the path algorithms, also update the corresponding
+ * When changing the path algorithms, also update the corresponding
* three-dimensional algorithms in path3.cc and three.asy.
*****/
@@ -23,7 +23,7 @@ inline double Intcap(double t) {
if(t >= Int_MAX) return Int_MAX;
return t;
}
-
+
// The are like floor and ceil, except they return an integer;
// if the argument cannot be converted to a valid integer, they return
// Int_MAX (for positive arguments) or Int_MIN (for negative arguments).
@@ -40,7 +40,7 @@ bool unsimpson(double integral, double (*)(double), double a, double& b,
namespace camp {
void checkEmpty(Int n);
-
+
inline Int adjustedIndex(Int i, Int n, bool cycles)
{
checkEmpty(n);
@@ -61,7 +61,7 @@ struct solvedKnot : public gc {
pair post;
bool straight;
solvedKnot() : straight(false) {}
-
+
friend bool operator== (const solvedKnot& p, const solvedKnot& q)
{
return p.pre == q.pre && p.point == q.point && p.post == q.post;
@@ -74,7 +74,7 @@ extern const double Fuzz4;
extern const double sqrtFuzz;
extern const double BigFuzz;
extern const double fuzzFactor;
-
+
class path : public gc {
bool cycles; // If the path is closed in a loop
@@ -82,7 +82,7 @@ class path : public gc {
mem::vector<solvedKnot> nodes;
mutable double cached_length; // Cache length since path is immutable.
-
+
mutable bbox box;
mutable bbox times; // Times where minimum and maximum extents are attained.
@@ -96,7 +96,7 @@ public:
{
nodes[0].pre = nodes[0].point = nodes[0].post = z;
nodes[0].straight = false;
- }
+ }
// Creates path from a list of knots. This will be used by camp
// methods such as the guide solver, but should probably not be used by a
@@ -120,11 +120,11 @@ public:
nodes[0].pre = nodes[0].point;
nodes[1].post = nodes[1].point;
}
-
+
// Copy constructor
path(const path& p)
: cycles(p.cycles), n(p.n), nodes(p.nodes), cached_length(p.cached_length),
- box(p.box)
+ box(p.box), times(p.times)
{}
path unstraighten() const
@@ -134,7 +134,7 @@ public:
P.nodes[i].straight=false;
return P;
}
-
+
virtual ~path()
{
}
@@ -159,17 +159,17 @@ public:
{
return cycles;
}
-
+
mem::vector<solvedKnot>& Nodes() {
return nodes;
}
-
+
bool straight(Int t) const
{
if (cycles) return nodes[imod(t,n)].straight;
return (t >= 0 && t < n) ? nodes[t].straight : false;
}
-
+
bool piecewisestraight() const
{
Int L=length();
@@ -177,28 +177,28 @@ public:
if(!straight(i)) return false;
return true;
}
-
+
pair point(Int t) const
{
return nodes[adjustedIndex(t,n,cycles)].point;
}
pair point(double t) const;
-
+
pair precontrol(Int t) const
{
return nodes[adjustedIndex(t,n,cycles)].pre;
}
pair precontrol(double t) const;
-
+
pair postcontrol(Int t) const
{
return nodes[adjustedIndex(t,n,cycles)].post;
}
pair postcontrol(double t) const;
-
+
inline double norm(const pair& z0, const pair& c0, const pair& c1,
const pair& z1) const {
return Fuzz2*camp::max((c0-z0).abs2(),
@@ -283,7 +283,7 @@ public:
pair z1=point(t);
return 6.0*(z1+c0)-12.0*c1;
}
-
+
pair accel(Int t, Int sign) const {
if(sign == 0) return 0.5*(preaccel(t)+postaccel(t));
if(sign > 0) return postaccel(t);
@@ -315,22 +315,22 @@ public:
// Special case of subpath used by intersect.
void halve(path &first, path &second) const;
-
+
// Used by picture to determine bounding box.
bbox bounds() const;
-
+
pair mintimes() const {
checkEmpty(n);
bounds();
return camp::pair(times.left,times.bottom);
}
-
+
pair maxtimes() const {
checkEmpty(n);
bounds();
return camp::pair(times.right,times.top);
}
-
+
template<class T>
void addpoint(bbox& box, T i) const {
box.addnonempty(point(i),times,(double) i);
@@ -347,15 +347,15 @@ public:
// Return bounding box accounting for padding perpendicular to path.
bbox bounds(double min, double max) const;
-
+
// Return bounding box accounting for internal pen padding (but not pencap).
bbox internalbounds(const bbox &padding) const;
-
+
double cubiclength(Int i, double goal=-1) const;
double arclength () const;
double arctime (double l) const;
double directiontime(const pair& z) const;
-
+
pair max() const {
checkEmpty(n);
return bounds().Max();
@@ -365,13 +365,13 @@ public:
checkEmpty(n);
return bounds().Min();
}
-
+
// Debugging output
friend std::ostream& operator<< (std::ostream& out, const path& p);
// Increment count if the path has a vertical component at t.
bool Count(Int& count, double t) const;
-
+
// Count if t is in (begin,end] and z lies to the left of point(i+t).
void countleft(Int& count, double x, Int i, double t,
double begin, double end, double& mint, double& maxt) const;
@@ -382,7 +382,7 @@ public:
// Transformation
path transformed(const transform& t) const;
-
+
};
double arcLength(const pair& z0, const pair& c0, const pair& c1,
@@ -392,7 +392,7 @@ extern path nullpath;
extern const unsigned maxdepth;
extern const unsigned mindepth;
extern const char *nopoints;
-
+
bool intersect(double& S, double& T, path& p, path& q, double fuzz,
unsigned depth=maxdepth);
bool intersections(double& s, double& t, std::vector<double>& S,
@@ -402,27 +402,27 @@ bool intersections(double& s, double& t, std::vector<double>& S,
void intersections(std::vector<double>& S, path& g,
const pair& p, const pair& q, double fuzz);
-
+
// Concatenates two paths into a new one.
path concat(const path& p1, const path& p2);
// Applies a transformation to the path
path transformed(const transform& t, const path& p);
-
+
inline double quadratic(double a, double b, double c, double x)
{
return a*x*x+b*x+c;
}
-
+
class quadraticroots {
public:
enum {NONE=0, ONE=1, TWO=2, MANY} distinct; // Number of distinct real roots.
unsigned roots; // Total number of real roots.
double t1,t2; // Real roots
-
+
quadraticroots(double a, double b, double c);
};
-
+
class Quadraticroots {
public:
unsigned roots; // Total number of roots.
@@ -431,7 +431,7 @@ public:
};
class cubicroots {
-public:
+public:
unsigned roots; // Total number of real roots.
double t1,t2,t3;
cubicroots(double a, double b, double c, double d);
@@ -439,13 +439,13 @@ public:
path nurb(pair z0, pair z1, pair z2, pair z3,
double w0, double w1, double w2, double w3, Int m);
-
+
double orient2d(const pair& a, const pair& b, const pair& c);
void roots(std::vector<double> &roots, double a, double b, double c, double d);
void roots(std::vector<double> &r, double x0, double c0, double c1, double x1,
double x);
-
+
inline bool goodroot(double t)
{
return 0.0 <= t && t <= 1.0;
diff --git a/Build/source/utils/asymptote/path3.cc b/Build/source/utils/asymptote/path3.cc
index a6c408afebe..36dac92d2ed 100644
--- a/Build/source/utils/asymptote/path3.cc
+++ b/Build/source/utils/asymptote/path3.cc
@@ -18,7 +18,7 @@ using run::operator *;
using vm::array;
path3 nullpath3;
-
+
void checkEmpty3(Int n) {
if(n == 0)
reportError("nullpath3 has no points");
@@ -27,7 +27,7 @@ void checkEmpty3(Int n) {
triple path3::point(double t) const
{
checkEmpty3(n);
-
+
Int i = Floor(t);
Int iplus;
t = fmod(t,1);
@@ -63,7 +63,7 @@ triple path3::point(double t) const
triple path3::precontrol(double t) const
{
checkEmpty3(n);
-
+
Int i = Floor(t);
Int iplus;
t = fmod(t,1);
@@ -91,12 +91,12 @@ triple path3::precontrol(double t) const
return (abc == a) ? nodes[i].pre : abc;
}
-
-
+
+
triple path3::postcontrol(double t) const
{
checkEmpty3(n);
-
+
Int i = Floor(t);
Int iplus;
t = fmod(t,1);
@@ -114,7 +114,7 @@ triple path3::postcontrol(double t) const
iplus = i+1;
double one_t = 1.0-t;
-
+
triple b = nodes[i].post,
c = nodes[iplus].pre,
d = nodes[iplus].point,
@@ -193,7 +193,7 @@ inline void splitCubic(solvedKnot3 sn[], double t, const solvedKnot3& left_,
left.post=split(t,left.point,left.post); // m0
right.pre=split(t,right.pre,right.point); // m2
mid.pre=split(t,left.post,x); // m3
- mid.post=split(t,x,right.pre); // m4
+ mid.post=split(t,x,right.pre); // m4
mid.point=split(t,mid.pre,mid.post); // m5
}
}
@@ -201,7 +201,7 @@ inline void splitCubic(solvedKnot3 sn[], double t, const solvedKnot3& left_,
path3 path3::subpath(double a, double b) const
{
if(empty()) return path3();
-
+
if (a > b) {
const path3 &rp = reverse();
Int len=length();
@@ -214,7 +214,7 @@ path3 path3::subpath(double a, double b) const
a = 0;
if (b < 0)
b = 0;
- }
+ }
if (b > n-1) {
b = n-1;
if (a > n-1)
@@ -261,7 +261,7 @@ void path3::halve(path3 &first, path3 &second) const
first=path3(sn[0],sn[1]);
second=path3(sn[1],sn[2]);
}
-
+
// Calculate the coefficients of a Bezier derivative divided by 3.
static inline void derivative(triple& a, triple& b, triple& c,
const triple& z0, const triple& c0,
@@ -275,12 +275,12 @@ static inline void derivative(triple& a, triple& b, triple& c,
bbox3 path3::bounds() const
{
if(!box.empty) return box;
-
+
if (empty()) {
// No bounds
return bbox3();
}
-
+
Int len=length();
box.add(point(len));
times=bbox3(len,len,len,len,len,len);
@@ -288,24 +288,24 @@ bbox3 path3::bounds() const
for (Int i = 0; i < len; i++) {
addpoint(box,i);
if(straight(i)) continue;
-
+
triple a,b,c;
derivative(a,b,c,point(i),postcontrol(i),precontrol(i+1),point(i+1));
-
+
// Check x coordinate
quadraticroots x(a.getx(),b.getx(),c.getx());
if(x.distinct != quadraticroots::NONE && goodroot(x.t1))
addpoint(box,i+x.t1);
if(x.distinct == quadraticroots::TWO && goodroot(x.t2))
addpoint(box,i+x.t2);
-
+
// Check y coordinate
quadraticroots y(a.gety(),b.gety(),c.gety());
if(y.distinct != quadraticroots::NONE && goodroot(y.t1))
addpoint(box,i+y.t1);
if(y.distinct == quadraticroots::TWO && goodroot(y.t2))
addpoint(box,i+y.t2);
-
+
// Check z coordinate
quadraticroots z(a.getz(),b.getz(),c.getz());
if(z.distinct != quadraticroots::NONE && goodroot(z.t1))
@@ -319,7 +319,7 @@ bbox3 path3::bounds() const
// Return f evaluated at controlling vertex of bounding box of convex hull for
// similiar-triangle transform x'=x/z, y'=y/z, where z < 0.
double ratiobound(triple z0, triple c0, triple c1, triple z1,
- double (*m)(double, double),
+ double (*m)(double, double),
double (*f)(const triple&))
{
double MX=m(m(m(-z0.getx(),-c0.getx()),-c1.getx()),-z1.getx());
@@ -336,7 +336,7 @@ double bound(triple z0, triple c0, triple c1, triple z1,
b=m(b,m(f(z0),f(z1)));
if(m(-1.0,1.0)*(b-ratiobound(z0,c0,c1,z1,m,f)) >= -fuzz || depth == 0)
return b;
-
+
--depth;
fuzz *= 2;
@@ -356,10 +356,10 @@ pair path3::ratio(double (*m)(double, double)) const
{
double fuzz=Fuzz*(max()-min()).length();
checkEmpty3(n);
-
+
triple v=point((Int) 0);
pair B=pair(xratio(v),yratio(v));
-
+
Int n=length();
for(Int i=0; i <= n; ++i) {
if(straight(i)) {
@@ -396,7 +396,7 @@ double arcLength(const triple& z0, const triple& c0, const triple& c1,
{
double integral;
derivative(a,b,c,z0,c0,c1,z1);
-
+
if(!simpson(integral,ds,0.0,1.0,DBL_EPSILON,1.0))
reportError("nesting capacity exceeded in computing arclength");
return integral;
@@ -411,12 +411,12 @@ double path3::cubiclength(Int i, double goal) const
L=(z1-z0).length();
return (goal < 0 || goal >= L) ? L : -goal/L;
}
-
+
double integral=arcLength(z0,postcontrol(i),precontrol(i+1),z1);
-
+
L=3.0*integral;
if(goal < 0 || goal >= L) return L;
-
+
double t=goal/L;
goal *= third;
static double dxmin=sqrt(DBL_EPSILON);
@@ -451,14 +451,14 @@ double path3::arctime(double goal) const
Int loops = (Int)(goal / cached_length);
goal -= loops*cached_length;
return loops*n+arctime(goal);
- }
+ }
} else {
if (goal <= 0)
return 0;
if (cached_length > 0 && goal >= cached_length)
return n-1;
}
-
+
double l,L=0;
for (Int i = 0; i < n-1; i++) {
l = cubiclength(i,goal);
@@ -510,7 +510,7 @@ void intersections(std::vector<double>& T, const path3& g, const triple& v,
g.precontrol(i+1).gety(),g.point(i+1).gety(),v.gety());
roots(r,g.point(i).getz(),g.postcontrol(i).getz(),
g.precontrol(i+1).getz(),g.point(i+1).getz(),v.getz());
-
+
size_t m=r.size();
for(size_t j=0 ; j < m; ++j) {
double t=r[j];
@@ -549,7 +549,7 @@ void add(std::vector<double>& S, std::vector<double>& T, double s, double t,
S.push_back(s);
T.push_back(t);
}
-
+
void add(double& s, double& t, std::vector<double>& S, std::vector<double>& T,
std::vector<double>& S1, std::vector<double>& T1,
double pscale, double qscale, double poffset, double qoffset,
@@ -586,9 +586,9 @@ bool intersections(double &s, double &t, std::vector<double>& S,
double fuzz, bool single, bool exact, unsigned depth)
{
if(errorstream::interrupt) throw interrupted();
-
+
double fuzz2=max(fuzzFactor*fuzz*fuzz,Fuzz2);
-
+
Int lp=p.length();
if(lp == 0 && exact) {
std::vector<double> T1,S1;
@@ -596,7 +596,7 @@ bool intersections(double &s, double &t, std::vector<double>& S,
add(s,t,S,T,S1,T1,p,q,fuzz2,single);
return S1.size() > 0;
}
-
+
Int lq=q.length();
if(lq == 0 && exact) {
std::vector<double> S1,T1;
@@ -604,15 +604,15 @@ bool intersections(double &s, double &t, std::vector<double>& S,
add(s,t,S,T,S1,T1,p,q,fuzz2,single);
return S1.size() > 0;
}
-
+
triple maxp=p.max();
triple minp=p.min();
triple maxq=q.max();
triple minq=q.min();
-
+
if(maxp.getx()+fuzz >= minq.getx() &&
- maxp.gety()+fuzz >= minq.gety() &&
- maxp.getz()+fuzz >= minq.getz() &&
+ maxp.gety()+fuzz >= minq.gety() &&
+ maxp.getz()+fuzz >= minq.getz() &&
maxq.getx()+fuzz >= minp.getx() &&
maxq.gety()+fuzz >= minp.gety() &&
maxq.getz()+fuzz >= minp.getz()) {
@@ -631,14 +631,14 @@ bool intersections(double &s, double &t, std::vector<double>& S,
}
return true;
}
-
+
path3 p1,p2;
double pscale,poffset;
-
+
std::vector<double> S1,T1;
-
+
// fuzz2=max(fuzzFactor*fuzz*fuzz,Fuzz2);
-
+
if(lp <= 1) {
if(lp == 1) p.halve(p1,p2);
if(lp == 0 || p1 == p || p2 == p) {
@@ -654,10 +654,10 @@ bool intersections(double &s, double &t, std::vector<double>& S,
poffset=tp;
pscale=1.0;
}
-
+
path3 q1,q2;
double qscale,qoffset;
-
+
if(lq <= 1) {
if(lq == 1) q.halve(q1,q2);
if(lq == 0 || q1 == q || q2 == q) {
@@ -673,12 +673,12 @@ bool intersections(double &s, double &t, std::vector<double>& S,
qoffset=tq;
qscale=1.0;
}
-
+
bool Short=lp == 1 && lq == 1;
-
+
static size_t maxcount=9;
size_t count=0;
-
+
if(intersections(s,t,S1,T1,p1,q1,fuzz,single,exact,depth)) {
add(s,t,S,T,S1,T1,pscale,qscale,0.0,0.0,p,q,fuzz2,single);
if(single || depth <= mindepth)
@@ -686,7 +686,7 @@ bool intersections(double &s, double &t, std::vector<double>& S,
count += S1.size();
if(Short && count > maxcount) return true;
}
-
+
S1.clear();
T1.clear();
if(intersections(s,t,S1,T1,p1,q2,fuzz,single,exact,depth)) {
@@ -696,7 +696,7 @@ bool intersections(double &s, double &t, std::vector<double>& S,
count += S1.size();
if(Short && count > maxcount) return true;
}
-
+
S1.clear();
T1.clear();
if(intersections(s,t,S1,T1,p2,q1,fuzz,single,exact,depth)) {
@@ -706,7 +706,7 @@ bool intersections(double &s, double &t, std::vector<double>& S,
count += S1.size();
if(Short && count > maxcount) return true;
}
-
+
S1.clear();
T1.clear();
if(intersections(s,t,S1,T1,p2,q2,fuzz,single,exact,depth)) {
@@ -716,7 +716,7 @@ bool intersections(double &s, double &t, std::vector<double>& S,
count += S1.size();
if(Short && count > maxcount) return true;
}
-
+
return S.size() > 0;
}
return false;
@@ -775,7 +775,7 @@ path3 transformed(const double* t, const path3& p)
{
Int n = p.size();
mem::vector<solvedKnot3> nodes(n);
-
+
for(Int i=0; i < n; ++i) {
nodes[i].pre=t*p.precontrol(i);
nodes[i].point=t*p.point(i);
@@ -798,15 +798,15 @@ struct Split {
m5=0.5*(m3+m4);
}
};
-
-double cornerbound(double *P, double (*m)(double, double))
+
+double cornerbound(double *P, double (*m)(double, double))
{
double b=m(P[0],P[3]);
b=m(b,P[12]);
return m(b,P[15]);
}
-double controlbound(double *P, double (*m)(double, double))
+double controlbound(double *P, double (*m)(double, double))
{
double b=m(P[1],P[2]);
b=m(b,P[4]);
@@ -827,7 +827,7 @@ double bound(double *P, double (*m)(double, double), double b,
b=m(b,cornerbound(P,m));
if(m(-1.0,1.0)*(b-controlbound(P,m)) >= -fuzz || depth == 0)
return b;
-
+
--depth;
fuzz *= 2;
@@ -858,9 +858,9 @@ double bound(double *P, double (*m)(double, double), double b,
c7.m0,c8.m0,c9.m0,c10.m0,c3.m5,c3.m4,c3.m2,P[15]};
return bound(s3,m,b,fuzz,depth);
}
-
+
double cornerbound(triple *P, double (*m)(double, double),
- double (*f)(const triple&))
+ double (*f)(const triple&))
{
double b=m(f(P[0]),f(P[3]));
b=m(b,f(P[12]));
@@ -911,7 +911,7 @@ double bound(triple *P, double (*m)(double, double),
--depth;
fuzz *= 2;
-
+
Split<triple> c0(P[0],P[1],P[2],P[3]);
Split<triple> c1(P[4],P[5],P[6],P[7]);
Split<triple> c2(P[8],P[9],P[10],P[11]);
@@ -952,7 +952,7 @@ struct Splittri {
T r021,u201,r030;
T u102,l120,l030;
T l111,r111,u111,c111;
-
+
Splittri(const T *p) {
l003=p[0];
p102=p[1];
@@ -1010,23 +1010,23 @@ struct Splittri {
c111=0.25*(p033+p330+p303+p111);
}
};
-
+
// Return the extremum of the vertices of a Bezier triangle.
-double cornerboundtri(double *P, double (*m)(double, double))
+double cornerboundtri(double *P, double (*m)(double, double))
{
double b=m(P[0],P[6]);
return m(b,P[9]);
}
double cornerboundtri(triple *P, double (*m)(double, double),
- double (*f)(const triple&))
+ double (*f)(const triple&))
{
double b=m(f(P[0]),f(P[6]));
return m(b,f(P[9]));
}
// Return the extremum of the non-vertex control points of a Bezier triangle.
-double controlboundtri(double *P, double (*m)(double, double))
+double controlboundtri(double *P, double (*m)(double, double))
{
double b=m(P[1],P[2]);
b=m(b,P[3]);
@@ -1054,24 +1054,24 @@ double boundtri(double *P, double (*m)(double, double), double b,
b=m(b,cornerboundtri(P,m));
if(m(-1.0,1.0)*(b-controlboundtri(P,m)) >= -fuzz || depth == 0)
return b;
-
+
--depth;
fuzz *= 2;
Splittri<double> s(P);
-
+
double l[]={s.l003,s.l102,s.l012,s.l201,s.l111,
s.l021,s.l300,s.l210,s.l120,s.l030}; // left
b=boundtri(l,m,b,fuzz,depth);
-
+
double r[]={s.l300,s.r102,s.r012,s.r201,s.r111,
s.r021,s.r300,s.r210,s.r120,s.r030}; // right
b=boundtri(r,m,b,fuzz,depth);
-
+
double u[]={s.l030,s.u102,s.u012,s.u201,s.u111,
s.u021,s.r030,s.u210,s.u120,s.u030}; // up
b=boundtri(u,m,b,fuzz,depth);
-
+
double c[]={s.r030,s.u201,s.r021,s.u102,s.c111,
s.r012,s.l030,s.l120,s.l210,s.l300}; // center
return boundtri(c,m,b,fuzz,depth);
@@ -1083,24 +1083,24 @@ double boundtri(triple *P, double (*m)(double, double),
b=m(b,cornerboundtri(P,m,f));
if(m(-1.0,1.0)*(b-ratiobound(P,m,f,10)) >= -fuzz || depth == 0)
return b;
-
+
--depth;
fuzz *= 2;
Splittri<triple> s(P);
-
+
triple l[]={s.l003,s.l102,s.l012,s.l201,s.l111,
s.l021,s.l300,s.l210,s.l120,s.l030}; // left
b=boundtri(l,m,f,b,fuzz,depth);
-
+
triple r[]={s.l300,s.r102,s.r012,s.r201,s.r111,
s.r021,s.r300,s.r210,s.r120,s.r030}; // right
b=boundtri(r,m,f,b,fuzz,depth);
-
+
triple u[]={s.l030,s.u102,s.u012,s.u201,s.u111,
s.u021,s.r030,s.u210,s.u120,s.u030}; // up
b=boundtri(u,m,f,b,fuzz,depth);
-
+
triple c[]={s.r030,s.u201,s.r021,s.u102,s.c111,
s.r012,s.l030,s.l120,s.l210,s.l300}; // center
return boundtri(c,m,f,b,fuzz,depth);
@@ -1118,7 +1118,7 @@ inline void add(std::vector<double>& T, std::vector<double>& U,
U.push_back(u);
V.push_back(v);
}
-
+
void add(std::vector<double>& T, std::vector<double>& U,
std::vector<double>& V, std::vector<double>& T1,
std::vector<double>& U1, std::vector<double>& V1,
@@ -1130,8 +1130,8 @@ void add(std::vector<double>& T, std::vector<double>& U,
add(T,U,V,tscale*T1[i]+toffset,0.5*U1[i]+uoffset,0.5*V1[i]+voffset,p,
fuzz2);
}
-
-void bounds(triple& Pmin, triple& Pmax, triple *P, double fuzz)
+
+void bounds(triple& Pmin, triple& Pmax, triple *P, double fuzz)
{
double Px[]={P[0].getx(),P[1].getx(),P[2].getx(),P[3].getx(),
P[4].getx(),P[5].getx(),P[6].getx(),P[7].getx(),
@@ -1140,7 +1140,7 @@ void bounds(triple& Pmin, triple& Pmax, triple *P, double fuzz)
double bx=Px[0];
double xmin=bound(Px,min,bx,fuzz,maxdepth);
double xmax=bound(Px,max,bx,fuzz,maxdepth);
-
+
double Py[]={P[0].gety(),P[1].gety(),P[2].gety(),P[3].gety(),
P[4].gety(),P[5].gety(),P[6].gety(),P[7].gety(),
P[8].gety(),P[9].gety(),P[10].gety(),P[11].gety(),
@@ -1148,7 +1148,7 @@ void bounds(triple& Pmin, triple& Pmax, triple *P, double fuzz)
double by=Py[0];
double ymin=bound(Py,min,by,fuzz,maxdepth);
double ymax=bound(Py,max,by,fuzz,maxdepth);
-
+
double Pz[]={P[0].getz(),P[1].getz(),P[2].getz(),P[3].getz(),
P[4].getz(),P[5].getz(),P[6].getz(),P[7].getz(),
P[8].getz(),P[9].getz(),P[10].getz(),P[11].getz(),
@@ -1160,7 +1160,7 @@ void bounds(triple& Pmin, triple& Pmax, triple *P, double fuzz)
Pmax=triple(xmax,ymax,zmax);
}
-inline double abs2(double x, double y, double z)
+inline double abs2(double x, double y, double z)
{
return x*x+y*y+z*z;
}
@@ -1169,10 +1169,10 @@ bool intersections(double& U, double& V, const triple& v, triple *P,
double fuzz, unsigned depth)
{
if(errorstream::interrupt) throw interrupted();
-
+
triple Pmin,Pmax;
bounds(Pmin,Pmax,P,fuzz);
-
+
double x=P[0].getx();
double y=P[0].gety();
double z=P[0].getz();
@@ -1189,14 +1189,14 @@ bool intersections(double& U, double& V, const triple& v, triple *P,
z=min(z,vz);
Z=max(Z,vz);
}
-
+
if(X+fuzz >= v.getx() &&
- Y+fuzz >= v.gety() &&
- Z+fuzz >= v.getz() &&
+ Y+fuzz >= v.gety() &&
+ Z+fuzz >= v.getz() &&
v.getx()+fuzz >= x &&
v.gety()+fuzz >= y &&
v.getz()+fuzz >= z) { // Overlapping bounding boxes
-
+
--depth;
// fuzz *= 2;
@@ -1205,8 +1205,8 @@ bool intersections(double& U, double& V, const triple& v, triple *P,
V=0.5;
return true;
}
-
-// Compute the control points of the four subpatches obtained by splitting
+
+// Compute the control points of the four subpatches obtained by splitting
// the patch with control points P at u=v=1/2.
Split<triple> c0(P[0],P[1],P[2],P[3]);
Split<triple> c1(P[4],P[5],P[6],P[7]);
@@ -1222,7 +1222,7 @@ bool intersections(double& U, double& V, const triple& v, triple *P,
Split<triple> c10(P[15],P[11],P[7],P[3]);
// Check all 4 Bezier subpatches.
-
+
double U1,V1;
triple Q0[]={P[0],c0.m0,c0.m3,c0.m5,c4.m2,c5.m2,c6.m2,c7.m2,
c4.m4,c5.m4,c6.m4,c7.m4,c4.m5,c5.m5,c6.m5,c7.m5};
@@ -1231,7 +1231,7 @@ bool intersections(double& U, double& V, const triple& v, triple *P,
V=0.5*V1;
return true;
}
-
+
triple Q1[]={c0.m5,c0.m4,c0.m2,P[3],c7.m2,c8.m2,c9.m2,c10.m2,
c7.m4,c8.m4,c9.m4,c10.m4,c7.m5,c8.m5,c9.m5,c10.m5};
if(intersections(U1,V1,v,Q1,fuzz,depth)) {
@@ -1239,7 +1239,7 @@ bool intersections(double& U, double& V, const triple& v, triple *P,
V=0.5*V1+0.5;
return true;
}
-
+
triple Q2[]={c7.m5,c8.m5,c9.m5,c10.m5,c7.m3,c8.m3,c9.m3,c10.m3,
c7.m0,c8.m0,c9.m0,c10.m0,c3.m5,c3.m4,c3.m2,P[15]};
if(intersections(U1,V1,v,Q2,fuzz,depth)) {
@@ -1247,7 +1247,7 @@ bool intersections(double& U, double& V, const triple& v, triple *P,
V=0.5*V1+0.5;
return true;
}
-
+
triple Q3[]={c4.m5,c5.m5,c6.m5,c7.m5,c4.m3,c5.m3,c6.m3,c7.m3,
c4.m0,c5.m0,c6.m0,c7.m0,P[12],c3.m0,c3.m3,c3.m5};
if(intersections(U1,V1,v,Q3,fuzz,depth)) {
@@ -1264,12 +1264,12 @@ bool intersections(std::vector<double>& T, std::vector<double>& U,
double fuzz, bool single, unsigned depth)
{
if(errorstream::interrupt) throw interrupted();
-
+
double fuzz2=max(fuzzFactor*fuzz*fuzz,Fuzz2);
-
+
triple pmin=p.min();
triple pmax=p.max();
-
+
double x=P[0].getx();
double y=P[0].gety();
double z=P[0].getz();
@@ -1286,14 +1286,14 @@ bool intersections(std::vector<double>& T, std::vector<double>& U,
z=min(z,vz);
Z=max(Z,vz);
}
-
+
if(X+fuzz >= pmin.getx() &&
- Y+fuzz >= pmin.gety() &&
- Z+fuzz >= pmin.getz() &&
+ Y+fuzz >= pmin.gety() &&
+ Z+fuzz >= pmin.getz() &&
pmax.getx()+fuzz >= x &&
pmax.gety()+fuzz >= y &&
pmax.getz()+fuzz >= z) { // Overlapping bounding boxes
-
+
--depth;
// fuzz *= 2;
@@ -1303,12 +1303,12 @@ bool intersections(std::vector<double>& T, std::vector<double>& U,
V.push_back(0.5);
return true;
}
-
+
Int lp=p.length();
path3 p0,p1;
p.halve(p0,p1);
-
+
std::vector<double> T1,U1,V1;
double tscale,toffset;
@@ -1332,7 +1332,7 @@ bool intersections(std::vector<double>& T, std::vector<double>& U,
toffset=tp;
tscale=1.0;
}
-
+
Split<triple> c0(P[0],P[1],P[2],P[3]);
Split<triple> c1(P[4],P[5],P[6],P[7]);
Split<triple> c2(P[8],P[9],P[10],P[11]);
@@ -1348,9 +1348,9 @@ bool intersections(std::vector<double>& T, std::vector<double>& U,
static size_t maxcount=9;
size_t count=0;
-
+
bool Short=lp == 1;
-
+
// Check all 4 Bezier subpatches against p0.
triple Q0[]={P[0],c0.m0,c0.m3,c0.m5,c4.m2,c5.m2,c6.m2,c7.m2,
c4.m4,c5.m4,c6.m4,c7.m4,c4.m5,c5.m5,c6.m5,c7.m5};
@@ -1361,7 +1361,7 @@ bool intersections(std::vector<double>& T, std::vector<double>& U,
count += T1.size();
if(Short && count > maxcount) return true;
}
-
+
T1.clear();
U1.clear();
V1.clear();
@@ -1374,7 +1374,7 @@ bool intersections(std::vector<double>& T, std::vector<double>& U,
count += T1.size();
if(Short && count > maxcount) return true;
}
-
+
T1.clear();
U1.clear();
V1.clear();
@@ -1387,7 +1387,7 @@ bool intersections(std::vector<double>& T, std::vector<double>& U,
count += T1.size();
if(Short && count > maxcount) return true;
}
-
+
T1.clear();
U1.clear();
V1.clear();
@@ -1400,7 +1400,7 @@ bool intersections(std::vector<double>& T, std::vector<double>& U,
count += T1.size();
if(Short && count > maxcount) return true;
}
-
+
// Check all 4 Bezier subpatches against p1.
T1.clear();
U1.clear();
@@ -1412,7 +1412,7 @@ bool intersections(std::vector<double>& T, std::vector<double>& U,
count += T1.size();
if(Short && count > maxcount) return true;
}
-
+
T1.clear();
U1.clear();
V1.clear();
@@ -1423,7 +1423,7 @@ bool intersections(std::vector<double>& T, std::vector<double>& U,
count += T1.size();
if(Short && count > maxcount) return true;
}
-
+
T1.clear();
U1.clear();
V1.clear();
@@ -1434,7 +1434,7 @@ bool intersections(std::vector<double>& T, std::vector<double>& U,
count += T1.size();
if(Short && count > maxcount) return true;
}
-
+
T1.clear();
U1.clear();
V1.clear();
@@ -1445,7 +1445,7 @@ bool intersections(std::vector<double>& T, std::vector<double>& U,
count += T1.size();
if(Short && count > maxcount) return true;
}
-
+
return T.size() > 0;
}
return false;
diff --git a/Build/source/utils/asymptote/path3.h b/Build/source/utils/asymptote/path3.h
index b6306f99caa..095d4698af4 100644
--- a/Build/source/utils/asymptote/path3.h
+++ b/Build/source/utils/asymptote/path3.h
@@ -22,7 +22,7 @@
#undef far
namespace camp {
-
+
void checkEmpty3(Int n);
// Used in the storage of solved path3 knots.
@@ -32,7 +32,7 @@ struct solvedKnot3 : public gc {
triple post;
bool straight;
solvedKnot3() : straight(false) {}
-
+
friend bool operator== (const solvedKnot3& p, const solvedKnot3& q)
{
return p.pre == q.pre && p.point == q.point && p.post == q.post;
@@ -46,7 +46,7 @@ class path3 : public gc {
mem::vector<solvedKnot3> nodes;
mutable double cached_length; // Cache length since path3 is immutable.
-
+
mutable bbox3 box;
mutable bbox3 times; // Times where minimum and maximum extents are attained.
@@ -60,7 +60,7 @@ public:
{
nodes[0].pre = nodes[0].point = nodes[0].post = z;
nodes[0].straight = false;
- }
+ }
// Creates path3 from a list of knots. This will be used by camp
// methods such as the guide solver, but should probably not be used by a
@@ -84,11 +84,11 @@ public:
nodes[0].pre = nodes[0].point;
nodes[1].post = nodes[1].point;
}
-
+
// Copy constructor
path3(const path3& p)
: cycles(p.cycles), n(p.n), nodes(p.nodes), cached_length(p.cached_length),
- box(p.box)
+ box(p.box), times(p.times)
{}
path3 unstraighten() const
@@ -98,7 +98,7 @@ public:
P.nodes[i].straight=false;
return P;
}
-
+
virtual ~path3()
{
}
@@ -123,17 +123,17 @@ public:
{
return cycles;
}
-
+
mem::vector<solvedKnot3>& Nodes() {
return nodes;
}
-
+
bool straight(Int t) const
{
if (cycles) return nodes[imod(t,n)].straight;
return (t >= 0 && t < n) ? nodes[t].straight : false;
}
-
+
bool piecewisestraight() const
{
Int L=length();
@@ -141,28 +141,28 @@ public:
if(!straight(i)) return false;
return true;
}
-
+
triple point(Int t) const
{
return nodes[adjustedIndex(t,n,cycles)].point;
}
triple point(double t) const;
-
+
triple precontrol(Int t) const
{
return nodes[adjustedIndex(t,n,cycles)].pre;
}
triple precontrol(double t) const;
-
+
triple postcontrol(Int t) const
{
return nodes[adjustedIndex(t,n,cycles)].post;
}
triple postcontrol(double t) const;
-
+
inline double norm(const triple& z0, const triple& c0, const triple& c1,
const triple& z1) const {
return Fuzz2*camp::max((c0-z0).abs2(),
@@ -248,7 +248,7 @@ public:
triple z1=point(t);
return 6.0*(z1+c0)-12.0*c1;
}
-
+
triple accel(Int t, Int sign) const {
if(sign == 0) return 0.5*(preaccel(t)+postaccel(t));
if(sign > 0) return postaccel(t);
@@ -280,22 +280,22 @@ public:
// Special case of subpath used by intersect.
void halve(path3 &first, path3 &second) const;
-
+
// Used by picture to determine bounding box.
bbox3 bounds() const;
-
+
triple mintimes() const {
checkEmpty3(n);
bounds();
return camp::triple(times.left,times.bottom,times.near);
}
-
+
triple maxtimes() const {
checkEmpty3(n);
bounds();
return camp::triple(times.right,times.top,times.far);
}
-
+
template<class T>
void addpoint(bbox3& box, T i) const {
box.addnonempty(point(i),times,(double) i);
@@ -304,7 +304,7 @@ public:
double cubiclength(Int i, double goal=-1) const;
double arclength () const;
double arctime (double l) const;
-
+
triple max() const {
checkEmpty3(n);
return bounds().Max();
@@ -314,12 +314,12 @@ public:
checkEmpty3(n);
return bounds().Min();
}
-
+
pair ratio(double (*m)(double, double)) const;
-
+
// Increment count if the path3 has a vertical component at t.
bool Count(Int& count, double t) const;
-
+
// Count if t is in (begin,end] and z lies to the left of point(i+t).
void countleft(Int& count, double x, Int i, double t,
double begin, double end, double& mint, double& maxt) const;
@@ -331,18 +331,18 @@ public:
double arcLength(const triple& z0, const triple& c0, const triple& c1,
const triple& z1);
-
+
path3 transformed(const vm::array& t, const path3& p);
path3 transformed(const double* t, const path3& p);
-
+
extern path3 nullpath3;
extern const unsigned maxdepth;
-
+
bool intersect(double& S, double& T, path3& p, path3& q, double fuzz,
unsigned depth=maxdepth);
bool intersections(double& s, double& t, std::vector<double>& S,
std::vector<double>& T, path3& p, path3& q,
- double fuzz, bool single, bool exact,
+ double fuzz, bool single, bool exact,
unsigned depth=maxdepth);
void intersections(std::vector<double>& S, path3& g,
const triple& p, const triple& q, double fuzz);
@@ -356,7 +356,7 @@ bool intersections(double& U, double& V, const triple& v, triple *P,
// Concatenates two path3s into a new one.
path3 concat(const path3& p1, const path3& p2);
-// return the perpendicular displacement of a point z from the line through
+// return the perpendicular displacement of a point z from the line through
// points p and q.
inline triple displacement(const triple& z, const triple& p, const triple& q)
{
@@ -366,12 +366,12 @@ inline triple displacement(const triple& z, const triple& p, const triple& q)
}
typedef double bound_double(double *P, double (*m)(double, double), double b,
- double fuzz, int depth);
+ double fuzz, int depth);
typedef double bound_triple(triple *P, double (*m)(double, double),
- double (*f)(const triple&), double b, double fuzz,
- int depth);
-
+ double (*f)(const triple&), double b, double fuzz,
+ int depth);
+
bound_double bound,boundtri;
double bound(triple z0, triple c0, triple c1, triple z1,
diff --git a/Build/source/utils/asymptote/pen.h b/Build/source/utils/asymptote/pen.h
index d9572eee5c9..d2894cc01dd 100644
--- a/Build/source/utils/asymptote/pen.h
+++ b/Build/source/utils/asymptote/pen.h
@@ -20,19 +20,19 @@ namespace camp {
class LineType
{
-public:
+public:
vm::array pattern; // Array of PostScript style line pattern entries.
double offset; // The offset in the pattern at which to start drawing.
bool scale; // Scale the line type values by the pen width?
bool adjust; // Adjust the line type values to fit the arclength?
- bool isdefault;
-
+ bool isdefault;
+
LineType() : offset(0.0), scale(true), adjust(true), isdefault(true) {}
-
- LineType(vm::array pattern, double offset, bool scale, bool adjust) :
+
+ LineType(vm::array pattern, double offset, bool scale, bool adjust) :
pattern(pattern), offset(offset), scale(scale), adjust(adjust),
isdefault(false) {}
-
+
void Scale(double factor) {
size_t n=pattern.size();
for(size_t i=0; i < n; i++)
@@ -40,7 +40,7 @@ public:
offset *= factor;
}
};
-
+
extern const char* DEFPAT;
extern const char* DEFLATEXFONT;
extern const char* DEFCONTEXTFONT;
@@ -62,30 +62,30 @@ static const struct setmiterlimit_t {} setmiterlimit={};
static const struct setoverwrite_t {} setoverwrite={};
static const struct initialpen_t {} initialpen={};
static const struct resolvepen_t {} resolvepen={};
-
+
extern const char* PSCap[];
extern const char* Cap[];
extern const Int nCap;
extern const char* Join[];
extern const Int nJoin;
-
+
enum overwrite_t {DEFWRITE=-1,ALLOW,SUPPRESS,SUPPRESSQUIET,MOVE,MOVEQUIET};
extern const char* OverwriteTag[];
extern const Int nOverwrite;
-
+
enum FillRule {DEFFILL=-1,ZEROWINDING,EVENODD};
extern const char* FillRuleTag[];
extern const Int nFill;
-
+
enum BaseLine {DEFBASE=-1,NOBASEALIGN,BASEALIGN};
extern const char* BaseLineTag[];
extern const Int nBaseLine;
-
+
enum ColorSpace {DEFCOLOR=0,INVISIBLE,GRAYSCALE,RGB,CMYK,PATTERN};
extern const size_t ColorComponents[];
extern const char* ColorDeviceSuffix[];
extern const unsigned nColorSpace;
-
+
inline bool operator == (const vm::array& a, const vm::array& b)
{
size_t asize=a.size();
@@ -95,21 +95,21 @@ inline bool operator == (const vm::array& a, const vm::array& b)
if(vm::read<double>(a,i) != vm::read<double>(b,i)) return false;
return true;
}
-
+
inline bool operator == (const LineType& a, const LineType& b)
{
return a.pattern == b.pattern && a.offset == b.offset && a.scale == b.scale
&& a.adjust == b.adjust;
}
-
+
inline ostream& operator << (ostream& out, const vm::array& a)
{
out << "[";
size_t n=a.size();
if(n > 0) {
out << vm::read<double>(a,0);
- for(size_t i=1; i < n; ++i)
- out << " " << vm::read<double>(a,i);
+ for(size_t i=1; i < n; ++i)
+ out << " " << vm::read<double>(a,i);
}
out << "]";
return out;
@@ -117,29 +117,29 @@ inline ostream& operator << (ostream& out, const vm::array& a)
class Transparency
{
-public:
+public:
string blend;
double opacity;
- bool isdefault;
-
+ bool isdefault;
+
Transparency() :
blend("Compatible"), opacity(1.0), isdefault(true) {}
-
+
Transparency(const string& blend, double opacity) :
blend(blend), opacity(opacity), isdefault(false) {}
};
-
+
inline bool operator == (const Transparency& a, const Transparency& b) {
return a.blend == b.blend && a.opacity == b.opacity;
}
-
+
extern const char* BlendMode[];
extern const Int nBlendMode;
const double bytescale=256.0*(1.0-DBL_EPSILON);
// Map [0,1] to [0,255]
-inline unsigned int byte(double r)
+inline unsigned int byte(double r)
{
if(r < 0.0) r=0.0;
else if(r > 1.0) r=1.0;
@@ -149,7 +149,7 @@ inline unsigned int byte(double r)
class pen;
pen& defaultpen();
-class pen : public gc {
+class pen : public gc {
LineType line;
// Width of line, in PS units.
@@ -157,13 +157,13 @@ class pen : public gc {
path P; // A polygonal path defining a custom pen nib;
// nullpath means the default (typically circular) nib.
string font;
- double fontsize;
- double lineskip;
-
+ double fontsize;
+ double lineskip;
+
ColorSpace color;
double r,g,b; // RGB or CMY value
double grey; // grayscale or K value
-
+
string pattern; // The name of the user-defined fill/draw pattern
FillRule fillrule; // Zero winding-number (default) or even-odd rule
BaseLine baseline; // Align to TeX baseline?
@@ -172,16 +172,16 @@ class pen : public gc {
Int linejoin;
double miterlimit;
overwrite_t overwrite;
-
+
// The transformation applied to the pen nib for calligraphic effects.
// nullTransform means the default (typically identity) transformation.
transform t;
-
+
public:
static double pos0(double x) {return x >= 0 ? x : 0;}
-
+
void greyrange() {if(grey > 1.0) grey=1.0;}
-
+
void rgbrange() {
double sat=rgbsaturation();
if(sat > 1.0) {
@@ -191,7 +191,7 @@ public:
b *= scale;
}
}
-
+
void cmykrange() {
double sat=cmyksaturation();
if(sat > 1.0) {
@@ -202,12 +202,12 @@ public:
grey *= scale;
}
}
-
+
void colorless() {
r=g=b=grey=0.0;
color=DEFCOLOR;
}
-
+
pen() :
line(), linewidth(DEFWIDTH), P(nullpath),
font(""), fontsize(0.0), lineskip(0.0), color(DEFCOLOR),
@@ -231,8 +231,8 @@ public:
transparency(transparency),
linecap(linecap), linejoin(linejoin), miterlimit(miterlimit),
overwrite(overwrite), t(t) {}
-
- pen(invisiblepen_t) :
+
+ pen(invisiblepen_t) :
line(), linewidth(DEFWIDTH), P(nullpath),
font(""), fontsize(0.0), lineskip(0.0), color(INVISIBLE),
r(0), g(0), b(0), grey(0),
@@ -240,8 +240,8 @@ public:
transparency(),
linecap(DEFCAP), linejoin(DEFJOIN), miterlimit(DEFMITER),
overwrite(DEFWRITE), t(nullTransform) {}
-
- pen(setlinewidth_t, double linewidth) :
+
+ pen(setlinewidth_t, double linewidth) :
line(), linewidth(linewidth), P(nullpath),
font(""), fontsize(0.0), lineskip(0.0), color(DEFCOLOR),
r(0), g(0), b(0), grey(0),
@@ -249,8 +249,8 @@ public:
transparency(),
linecap(DEFCAP), linejoin(DEFJOIN), miterlimit(DEFMITER),
overwrite(DEFWRITE), t(nullTransform) {}
-
- pen(path P) :
+
+ pen(path P) :
line(), linewidth(DEFWIDTH), P(P),
font(""), fontsize(0.0), lineskip(0.0), color(DEFCOLOR),
r(0), g(0), b(0), grey(0),
@@ -258,7 +258,7 @@ public:
transparency(),
linecap(DEFCAP), linejoin(DEFJOIN), miterlimit(DEFMITER),
overwrite(DEFWRITE), t(nullTransform) {}
-
+
pen(const LineType& line) :
line(line), linewidth(DEFWIDTH), P(nullpath),
font(""), fontsize(0.0), lineskip(0.0), color(DEFCOLOR),
@@ -267,7 +267,7 @@ public:
transparency(),
linecap(DEFCAP), linejoin(DEFJOIN), miterlimit(DEFMITER),
overwrite(DEFWRITE), t(nullTransform) {}
-
+
pen(setfont_t, string font) :
line(), linewidth(DEFWIDTH), P(nullpath),
font(font), fontsize(0.0), lineskip(0.0), color(DEFCOLOR),
@@ -276,7 +276,7 @@ public:
transparency(),
linecap(DEFCAP), linejoin(DEFJOIN), miterlimit(DEFMITER),
overwrite(DEFWRITE), t(nullTransform) {}
-
+
pen(setfontsize_t, double fontsize, double lineskip) :
line(), linewidth(DEFWIDTH), P(nullpath),
font(""), fontsize(fontsize), lineskip(lineskip), color(DEFCOLOR),
@@ -285,7 +285,7 @@ public:
transparency(),
linecap(DEFCAP), linejoin(DEFJOIN), miterlimit(DEFMITER),
overwrite(DEFWRITE), t(nullTransform) {}
-
+
pen(setpattern_t, const string& pattern) :
line(), linewidth(DEFWIDTH), P(nullpath),
font(""), fontsize(0.0), lineskip(0.0), color(PATTERN),
@@ -294,7 +294,7 @@ public:
transparency(),
linecap(DEFCAP), linejoin(DEFJOIN), miterlimit(DEFMITER),
overwrite(DEFWRITE), t(nullTransform) {}
-
+
pen(FillRule fillrule) :
line(), linewidth(DEFWIDTH), P(nullpath),
font(""), fontsize(0.0), lineskip(0.0), color(DEFCOLOR),
@@ -303,7 +303,7 @@ public:
transparency(),
linecap(DEFCAP), linejoin(DEFJOIN), miterlimit(DEFMITER),
overwrite(DEFWRITE), t(nullTransform) {}
-
+
pen(BaseLine baseline) :
line(), linewidth(DEFWIDTH), P(nullpath),
font(""), fontsize(0.0), lineskip(0.0), color(DEFCOLOR),
@@ -312,7 +312,7 @@ public:
transparency(),
linecap(DEFCAP), linejoin(DEFJOIN), miterlimit(DEFMITER),
overwrite(DEFWRITE), t(nullTransform) {}
-
+
pen(const Transparency& transparency) :
line(), linewidth(DEFWIDTH), P(nullpath),
font(""), fontsize(0.0), lineskip(0.0), color(DEFCOLOR),
@@ -321,7 +321,7 @@ public:
transparency(transparency),
linecap(DEFCAP), linejoin(DEFJOIN), miterlimit(DEFMITER),
overwrite(DEFWRITE), t(nullTransform) {}
-
+
pen(setlinecap_t, Int linecap) :
line(), linewidth(DEFWIDTH), P(nullpath),
font(""), fontsize(0.0), lineskip(0.0), color(DEFCOLOR),
@@ -330,7 +330,7 @@ public:
transparency(),
linecap(linecap), linejoin(DEFJOIN), miterlimit(DEFMITER),
overwrite(DEFWRITE), t(nullTransform) {}
-
+
pen(setlinejoin_t, Int linejoin) :
line(), linewidth(DEFWIDTH), P(nullpath),
font(""), fontsize(0.0), lineskip(0.0), color(DEFCOLOR),
@@ -339,7 +339,7 @@ public:
transparency(),
linecap(DEFCAP), linejoin(linejoin), miterlimit(DEFMITER),
overwrite(DEFWRITE), t(nullTransform) {}
-
+
pen(setmiterlimit_t, double miterlimit) :
line(), linewidth(DEFWIDTH), P(nullpath),
font(""), fontsize(0.0), lineskip(0.0), color(DEFCOLOR),
@@ -348,7 +348,7 @@ public:
transparency(),
linecap(DEFCAP), linejoin(DEFJOIN), miterlimit(miterlimit),
overwrite(DEFWRITE), t(nullTransform) {}
-
+
pen(setoverwrite_t, overwrite_t overwrite) :
line(), linewidth(DEFWIDTH), P(nullpath),
font(""), fontsize(0.0), lineskip(0.0), color(DEFCOLOR),
@@ -357,7 +357,7 @@ public:
transparency(),
linecap(DEFCAP), linejoin(DEFJOIN), miterlimit(DEFMITER),
overwrite(overwrite), t(nullTransform) {}
-
+
explicit pen(double grey) :
line(), linewidth(DEFWIDTH), P(nullpath),
font(""), fontsize(0.0), lineskip(0.0), color(GRAYSCALE),
@@ -367,17 +367,17 @@ public:
linecap(DEFCAP), linejoin(DEFJOIN), miterlimit(DEFMITER),
overwrite(DEFWRITE), t(nullTransform)
{greyrange();}
-
- pen(double r, double g, double b) :
+
+ pen(double r, double g, double b) :
line(), linewidth(DEFWIDTH), P(nullpath),
font(""), fontsize(0.0), lineskip(0.0), color(RGB),
- r(pos0(r)), g(pos0(g)), b(pos0(b)), grey(0.0),
+ r(pos0(r)), g(pos0(g)), b(pos0(b)), grey(0.0),
pattern(DEFPAT), fillrule(DEFFILL), baseline(DEFBASE),
transparency(),
linecap(DEFCAP), linejoin(DEFJOIN), miterlimit(DEFMITER),
overwrite(DEFWRITE), t(nullTransform)
{rgbrange();}
-
+
pen(double c, double m, double y, double k) :
line(), linewidth(DEFWIDTH), P(nullpath),
font(""), fontsize(0.0), lineskip(0.0), color(CMYK),
@@ -387,9 +387,9 @@ public:
linecap(DEFCAP), linejoin(DEFJOIN), miterlimit(DEFMITER),
overwrite(DEFWRITE), t(nullTransform)
{cmykrange();}
-
+
// Construct one pen from another, resolving defaults
- pen(resolvepen_t, const pen& p) :
+ pen(resolvepen_t, const pen& p) :
line(LineType(p.line.pattern,p.line.offset,p.line.scale,p.line.adjust)),
linewidth(p.width()), P(p.Path()),
font(p.Font()), fontsize(p.size()), lineskip(p.Lineskip()),
@@ -399,34 +399,34 @@ public:
transparency(Transparency(p.blend(), p.opacity())),
linecap(p.cap()), linejoin(p.join()), miterlimit(p.miter()),
overwrite(p.Overwrite()), t(p.getTransform()) {}
-
+
static pen initialpen() {
return pen(LineType(vm::array(0),0.0,true,true),0.5,nullpath,"",
12.0*settings::tex2ps,12.0*1.2*settings::tex2ps,GRAYSCALE,
0.0,0.0,0.0,0.0,"",ZEROWINDING,NOBASEALIGN,
Transparency(),1,1,10.0,ALLOW,identity);
}
-
- pen(initialpen_t) :
+
+ pen(initialpen_t) :
line(), linewidth(-2.0), P(nullpath),
font("<invalid>"), fontsize(-1.0), lineskip(-1.0), color(INVISIBLE),
r(0.0), g(0.0), b(0.0), grey(0.0),
pattern(DEFPAT), fillrule(DEFFILL), baseline(NOBASEALIGN),
transparency(),linecap(-2), linejoin(-2), miterlimit(-1.0),
overwrite(DEFWRITE), t(nullTransform) {}
-
+
double width() const {
return linewidth == DEFWIDTH ? defaultpen().linewidth : linewidth;
}
-
+
path Path() const {
return P.empty() ? defaultpen().P : P;
}
-
+
double size() const {
return fontsize == 0.0 ? defaultpen().fontsize : fontsize;
}
-
+
string Font() const {
if(font.empty()) {
if(defaultpen().font.empty()) {
@@ -437,10 +437,10 @@ public:
return settings::getSetting<string>("textinitialfont");
else {
ostringstream buf;
- // Work around misalignment in ConTeXt switchtobodyfont if font is not found.
+ // Work around misalignment in ConTeXt switchtobodyfont if font is not found.
if(texengine == "context")
- buf << "\\switchtobodyfont["
- << DEFCONTEXTFONT << "," << size()*settings::ps2tex
+ buf << "\\switchtobodyfont["
+ << DEFCONTEXTFONT << "," << size()*settings::ps2tex
<< "pt]\\removeunwantedspaces%" << newl;
else
buf << "\\font\\ASYfont=" << DEFTEXFONT
@@ -452,88 +452,88 @@ public:
}
return font;
}
-
+
double Lineskip() const {
return lineskip == 0.0 ? defaultpen().lineskip : lineskip;
}
-
+
const LineType *linetype() const {
return line.isdefault ? &defaultpen().line : &line;
}
-
+
void adjust(double factor) {
- if(line.isdefault)
+ if(line.isdefault)
line=defaultpen().line;
line.Scale(factor);
}
-
+
void setstroke(const vm::array& s) {line.pattern=s;}
void setoffset(const double& offset) {line.offset=offset;}
-
+
string fillpattern() const {
return pattern == DEFPAT ? (string)"" : pattern;
}
-
+
FillRule Fillrule() const {
return fillrule == DEFFILL ? defaultpen().fillrule : fillrule;
}
-
+
bool evenodd() const {
return Fillrule() == EVENODD;
}
-
+
bool inside(Int count) const {
return evenodd() ? count % 2 : count != 0;
}
-
+
BaseLine Baseline() const {
return baseline == DEFBASE ? defaultpen().baseline : baseline;
}
-
+
Transparency transp() const {
return transparency.isdefault ? defaultpen().transparency : transparency;
}
-
+
string blend() const {
return transparency.isdefault ? defaultpen().transparency.blend :
transparency.blend;
}
-
+
double opacity() const {
return transparency.isdefault ? defaultpen().transparency.opacity :
transparency.opacity;
}
-
+
Int cap() const {
return linecap == DEFCAP ? defaultpen().linecap : linecap;
}
-
+
Int join() const {
return linejoin == DEFJOIN ? defaultpen().linejoin : linejoin;
}
-
+
double miter() const {
return miterlimit == DEFMITER ? defaultpen().miterlimit : miterlimit;
}
-
+
overwrite_t Overwrite() const {
return overwrite == DEFWRITE ? defaultpen().overwrite : overwrite;
}
-
+
ColorSpace colorspace() const {
return color == DEFCOLOR ? defaultpen().color : color;
}
-
+
string hex() const {
int n=ColorComponents[colorspace()];
ostringstream buf;
buf.setf(std::ios::hex,std::ios::basefield);
buf.fill('0');
-
+
switch(n) {
case 0:
break;
- case 1:
+ case 1:
buf << std::setw(2) << byte(gray());
break;
case 3:
@@ -552,52 +552,52 @@ public:
}
return buf.str();
}
-
+
bool invisible() const {return colorspace() == INVISIBLE;}
-
+
bool grayscale() const {return colorspace() == GRAYSCALE;}
-
+
bool rgb() const {return colorspace() == RGB;}
-
+
bool cmyk() const {return colorspace() == CMYK;}
-
+
double gray() const {return color == DEFCOLOR ? defaultpen().grey : grey;}
-
+
double red() const {return color == DEFCOLOR ? defaultpen().r : r;}
-
+
double green() const {return color == DEFCOLOR ? defaultpen().g : g;}
-
+
double blue() const {return color == DEFCOLOR ? defaultpen().b : b;}
-
+
double cyan() const {return red();}
-
+
double magenta() const {return green();}
-
+
double yellow() const {return blue();}
-
+
double black() const {return gray();}
-
+
double rgbsaturation() const {return max(max(r,g),b);}
-
+
double cmyksaturation() const {return max(rgbsaturation(),black());}
-
+
void greytorgb() {
r=g=b=grey; grey=0.0;
color=RGB;
}
-
+
void rgbtogrey() {
grey=0.299*r+0.587*g+0.114*b; // Standard YUV luminosity coefficients
r=g=b=0.0;
color=GRAYSCALE;
}
-
+
void greytocmyk() {
grey=1.0-grey;
r=g=b=0.0;
color=CMYK;
}
-
+
void rgbtocmyk() {
double sat=rgbsaturation();
grey=1.0-sat;
@@ -623,48 +623,48 @@ public:
cmyktorgb();
rgbtogrey();
}
-
+
void togrey() {
if(rgb()) rgbtogrey();
else if(cmyk()) cmyktogrey();
}
-
+
void torgb() {
if(cmyk()) cmyktorgb();
else if(grayscale()) greytorgb();
}
-
+
void tocmyk() {
if(rgb()) rgbtocmyk();
else if(grayscale()) greytocmyk();
}
-
+
void settransparency(const pen& p) {
transparency=p.transparency;
}
-
+
void setfont(const pen& p) {
font=p.font;
}
-
+
void setfillrule(const pen& p) {
fillrule=p.fillrule;
}
-
+
void convert() {
if(settings::gray || settings::bw) {
if(rgb()) rgbtogrey();
else if(cmyk()) cmyktogrey();
if(settings::bw) {grey=(grey == 1.0) ? 1.0 : 0.0;}
- }
+ }
else if(settings::rgb && cmyk()) cmyktorgb();
else if(settings::cmyk && rgb()) rgbtocmyk();
- }
-
+ }
+
// Try to upgrade to the specified colorspace.
bool promote(ColorSpace c) {
if(color == c) return true;
-
+
switch(color) {
case PATTERN:
case INVISIBLE:
@@ -693,7 +693,7 @@ public:
}
return false;
}
-
+
friend pen operator * (double x, const pen& q) {
pen p=q;
if(x < 0.0) x = 0.0;
@@ -728,17 +728,17 @@ public:
}
return p;
}
-
+
friend pen operator + (const pen& p, const pen& q) {
pen P=p;
pen Q=q;
-
+
if(P.color == PATTERN && P.pattern.empty()) P.color=DEFCOLOR;
ColorSpace colorspace=(ColorSpace) max((Int) P.color,(Int) Q.color);
-
+
if(!(p.transparency.isdefault && q.transparency.isdefault))
P.transparency.opacity=max(p.opacity(),q.opacity());
-
+
switch(colorspace) {
case PATTERN:
case INVISIBLE:
@@ -750,27 +750,27 @@ public:
P.greyrange();
break;
}
-
+
case RGB:
{
if(P.color == GRAYSCALE) P.greytorgb();
else if(Q.color == GRAYSCALE) Q.greytorgb();
-
+
P.r += Q.r;
P.g += Q.g;
P.b += Q.b;
P.rgbrange();
break;
}
-
+
case CMYK:
{
if(P.color == GRAYSCALE) P.greytocmyk();
else if(Q.color == GRAYSCALE) Q.greytocmyk();
-
+
if(P.color == RGB) P.rgbtocmyk();
else if(Q.color == RGB) Q.rgbtocmyk();
-
+
P.r += Q.r;
P.g += Q.g;
P.b += Q.b;
@@ -779,7 +779,7 @@ public:
break;
}
}
-
+
return pen(q.line.isdefault ? p.line : q.line,
q.linewidth == DEFWIDTH ? p.linewidth : q.linewidth,
q.P.empty() ? p.P : q.P,
@@ -801,10 +801,10 @@ public:
friend pen interpolate(const pen& p, const pen& q, double t) {
pen P=p;
pen Q=q;
-
+
if(P.color == PATTERN && P.pattern.empty()) P.color=DEFCOLOR;
ColorSpace colorspace=(ColorSpace) max((Int) P.color,(Int) Q.color);
-
+
switch(colorspace) {
case PATTERN:
case INVISIBLE:
@@ -817,24 +817,24 @@ public:
else if(Q.color == GRAYSCALE) Q.greytorgb();
break;
}
-
+
case CMYK:
{
if(P.color == GRAYSCALE) P.greytocmyk();
else if(Q.color == GRAYSCALE) Q.greytocmyk();
-
+
if(P.color == RGB) P.rgbtocmyk();
else if(Q.color == RGB) Q.rgbtocmyk();
break;
}
}
-
+
return (1-t)*P+t*Q;
}
friend bool operator == (const pen& p, const pen& q) {
- return *(p.linetype()) == *(q.linetype())
- && p.width() == q.width()
+ return *(p.linetype()) == *(q.linetype())
+ && p.width() == q.width()
&& p.Path() == q.Path()
&& p.Font() == q.Font()
&& p.Lineskip() == q.Lineskip()
@@ -854,11 +854,11 @@ public:
&& p.Overwrite() == q.Overwrite()
&& p.t == q.t;
}
-
+
friend bool operator != (const pen& p, const pen& q) {
return !(p == q);
}
-
+
friend ostream& operator << (ostream& out, const pen& p) {
out << "(";
if(p.line.isdefault)
@@ -892,10 +892,10 @@ public:
else if(p.color == GRAYSCALE)
out << ", gray=" << p.grey;
else if(p.color == RGB)
- out << ", red=" << p.red() << ", green=" << p.green()
+ out << ", red=" << p.red() << ", green=" << p.green()
<< ", blue=" << p.blue();
else if(p.color == CMYK)
- out << ", cyan=" << p.cyan() << ", magenta=" << p.magenta()
+ out << ", cyan=" << p.cyan() << ", magenta=" << p.magenta()
<< ", yellow=" << p.yellow() << ", black=" << p.black();
if(p.pattern != DEFPAT)
out << ", pattern=" << "\"" << p.pattern << "\"";
@@ -912,14 +912,14 @@ public:
if(!p.t.isNull())
out << ", transform=" << p.t;
out << ")";
-
+
return out;
}
const transform getTransform() const {
return t.isNull() ? defaultpen().t : t;
}
-
+
// The bounds of the circle or ellipse the pen describes.
bbox bounds() const
{
@@ -927,9 +927,9 @@ public:
pair shift;
if(!P.empty()) return P.bounds();
-
+
transform t=getTransform();
-
+
if(t.isIdentity()) {
maxx = 1;
maxy = 1;
@@ -963,7 +963,7 @@ public:
}
};
-
+
pen transformed(const transform& t, const pen &p);
}
diff --git a/Build/source/utils/asymptote/picture.cc b/Build/source/utils/asymptote/picture.cc
index da053467338..9cb847ae099 100644
--- a/Build/source/utils/asymptote/picture.cc
+++ b/Build/source/utils/asymptote/picture.cc
@@ -2,8 +2,8 @@
* picture.cc
* Andy Hammerlindl 2002/06/06
*
- * Stores a picture as a list of drawElements and handles its output to
- * PostScript.
+ * Stores a picture as a list of drawElements and handles its output to
+ * PostScript.
*****/
#include "errormsg.h"
@@ -32,7 +32,7 @@ texstream::~texstream() {
string texengine=getSetting<string>("tex");
bool context=settings::context(texengine);
string name;
- if(!context)
+ if(!context)
name=stripFile(outname());
name += "texput.";
unlink((name+"aux").c_str());
@@ -71,20 +71,20 @@ void copyArray4x4C(double*& dest, const vm::array *a)
const size_t n=checkArray(a);
const string fourbyfour="4x4 array of doubles expected";
if(n != 4) reportError(fourbyfour);
-
+
for(size_t i=0; i < 4; i++) {
const vm::array *ai=vm::read<vm::array*>(a,i);
const size_t aisize=checkArray(ai);
double *tti=tt+4*i;
if(aisize == 4) {
- for(size_t j=0; j < 4; j++)
+ for(size_t j=0; j < 4; j++)
tti[j]=vm::read<double>(ai,j);
} else reportError(fourbyfour);
}
-
+
copyTransform3(dest,tt);
}
-
+
void copyTransform3(double*& d, const double* s, GCPlacement placement)
{
@@ -94,7 +94,7 @@ void copyTransform3(double*& d, const double* s, GCPlacement placement)
memcpy(d,s,sizeof(double)*16);
}
}
-
+
// t = s*r
void multiplyTransform3(double*& t, const double* s, const double* r)
{
@@ -119,13 +119,13 @@ void multiplyTransform3(double*& t, const double* s, const double* r)
}
}
}
-
+
double xratio(const triple& v) {return v.getx()/v.getz();}
double yratio(const triple& v) {return v.gety()/v.getz();}
-
+
class matrixstack {
mem::stack<const double*> mstack;
-
+
public:
// return current transform
const double* T() const
@@ -147,7 +147,7 @@ public:
if(!mstack.empty())
mstack.pop();
}
-
+
};
const char *texpathmessage() {
@@ -156,7 +156,7 @@ const char *texpathmessage() {
<< " engine (" << texcommand() << ")";
return Strdup(buf.str());
}
-
+
picture::~picture()
{
}
@@ -168,7 +168,7 @@ void picture::enclose(drawElement *begin, drawElement *end)
nodes.push_front(begin);
lastnumber=0;
lastnumber3=0;
-
+
for(nodelist::iterator p=nodes.begin(); p != nodes.end(); ++p) {
assert(*p);
if((*p)->islayer()) {
@@ -209,7 +209,7 @@ void picture::add(picture &pic)
void picture::prepend(picture &pic)
{
if (&pic == this) return;
-
+
copy(pic.nodes.begin(), pic.nodes.end(), inserter(nodes, nodes.begin()));
lastnumber=0;
lastnumber3=0;
@@ -267,15 +267,15 @@ bbox picture::bounds()
{
size_t n=nodes.size();
if(n == lastnumber) return b_cached;
-
+
if(lastnumber == 0) { // Maybe these should be put into a structure.
b_cached=bbox();
labelbounds.clear();
bboxstack.clear();
}
-
+
if(havelabels()) texinit();
-
+
nodelist::iterator p=nodes.begin();
processDataStruct& pd=processData();
@@ -283,7 +283,7 @@ bbox picture::bounds()
for(; p != nodes.end(); ++p) {
assert(*p);
(*p)->bounds(b_cached,pd.tex,labelbounds,bboxstack);
-
+
// Optimization for interpreters with fixed stack limits.
if((*p)->endclip()) {
nodelist::iterator q=p;
@@ -304,10 +304,10 @@ bbox3 picture::bounds3()
{
size_t n=nodes.size();
if(n == lastnumber3) return b3;
-
+
if(lastnumber3 == 0)
b3=bbox3();
-
+
matrixstack ms;
size_t i=0;
for(nodelist::const_iterator p=nodes.begin(); p != nodes.end(); ++p) {
@@ -324,7 +324,7 @@ bbox3 picture::bounds3()
lastnumber3=n;
return b3;
}
-
+
pair picture::ratio(double (*m)(double, double))
{
bool first=true;
@@ -343,7 +343,7 @@ pair picture::ratio(double (*m)(double, double))
}
return b;
}
-
+
void texinit()
{
drawElement::lastpen=pen(initialpen);
@@ -355,7 +355,7 @@ void texinit()
pd.TeXpipepreamble.clear();
return;
}
-
+
bool context=settings::context(getSetting<string>("tex"));
string dir=stripFile(outname());
string logname;
@@ -368,14 +368,13 @@ void texinit()
else
writeable.close();
unlink(cname);
-
+
mem::vector<string> cmd;
cmd.push_back(texprogram());
- string texfatal;
if(context) {
cmd.push_back("--pipe");
} else {
- if(!dir.empty())
+ if(!dir.empty())
cmd.push_back("-output-directory="+dir.substr(0,dir.length()-1));
string jobname="texput";
if(getSetting<bool>("inlineimage") || getSetting<bool>("inlinetex")) {
@@ -392,19 +391,18 @@ void texinit()
}
}
cmd.push_back("\\scrollmode");
- texfatal="Transcript written on "+jobname+".log.\n";
}
-
- pd.tex.open(cmd,"texpath",texpathmessage(),Strdup(texfatal));
+
+ pd.tex.open(cmd,"texpath");
pd.tex.wait("\n*");
pd.tex << "\n";
texdocumentclass(pd.tex,true);
-
+
texdefines(pd.tex,pd.TeXpreamble,true);
pd.TeXpipepreamble.clear();
}
-
-int opentex(const string& texname, const string& prefix, bool dvi)
+
+int opentex(const string& texname, const string& prefix, bool dvi)
{
string aux=auxname(prefix,"aux");
unlink(aux.c_str());
@@ -418,12 +416,12 @@ int opentex(const string& texname, const string& prefix, bool dvi)
cmd.push_back(texname);
} else {
string dir=stripFile(texname);
- if(!dir.empty())
+ if(!dir.empty())
cmd.push_back("-output-directory="+dir.substr(0,dir.length()-1));
cmd.push_back("\\nonstopmode\\input");
cmd.push_back(stripDir(texname));
}
-
+
bool quiet=verbose <= 1;
int status=System(cmd,quiet ? 1 : 0,true,"texpath",texpathmessage());
if(!status && getSetting<bool>("twice"))
@@ -437,6 +435,31 @@ int opentex(const string& texname, const string& prefix, bool dvi)
return status;
}
+char *dvisvgmCommand(mem::vector<string>& cmd, const string &in, const string& out)
+{
+ cmd.push_back(getSetting<string>("dvisvgm"));
+ cmd.push_back("-n");
+ cmd.push_back("-v3");
+ string libgs=getSetting<string>("libgs");
+ if(!libgs.empty())
+ cmd.push_back("--libgs="+libgs);
+// cmd.push_back("--optimize"); // Requires dvisvgm > 2.9.1
+ push_split(cmd,getSetting<string>("dvisvgmOptions"));
+ char *tmpdir=mkdtemp(StrdupMalloc(tempdir+"/dvisvgmXXXXXX"));
+ if(tmpdir)
+ cmd.push_back("--tmpdir="+string(tmpdir));
+ cmd.push_back("-o"+out);
+ cmd.push_back(in);
+ return tmpdir;
+}
+
+void rmtmpdir(char *tmpdir)
+{
+ if(tmpdir) {
+ recursive_delete(tmpdir);
+ free(tmpdir);
+ }
+}
bool picture::texprocess(const string& texname, const string& outname,
const string& prefix, const pair& bboxshift,
@@ -444,56 +467,49 @@ bool picture::texprocess(const string& texname, const string& outname,
{
int status=1;
ifstream outfile;
-
+
outfile.open(texname.c_str());
bool keep=getSetting<bool>("keep");
-
+
if(outfile) {
outfile.close();
-
+
status=opentex(texname,prefix);
string texengine=getSetting<string>("tex");
-
+
if(status == 0) {
string dviname=auxname(prefix,"dvi");
mem::vector<string> cmd;
-
+
if(svg) {
- cmd.push_back(getSetting<string>("dvisvgm"));
- cmd.push_back("-n");
- cmd.push_back("-v0");
- string libgs=getSetting<string>("libgs");
- if(!libgs.empty())
- cmd.push_back("--libgs="+libgs);
- push_split(cmd,getSetting<string>("dvisvgmOptions"));
- cmd.push_back("-o"+outname);
+ char *tmpdir=dvisvgmCommand(cmd,dviname,outname);
ostringstream buf;
bbox B=svgbbox(b,bboxshift);
- buf << "--bbox="
- << B.left << "bp "
+ buf << "--bbox="
+ << B.left << "bp "
<< B.bottom << "bp "
<< B.right << "bp "
<< B.top << "bp";
cmd.push_back(buf.str());
- cmd.push_back(dviname);
status=System(cmd,0,true,"dvisvgm");
+ rmtmpdir(tmpdir);
if(!keep)
unlink(dviname.c_str());
} else {
if(!settings::pdf(texengine)) {
string psname=auxname(prefix,"ps");
double height=b.top-b.bottom+1.0;
-
+
// Magic dvips offsets:
double hoffset=-128.4;
double vertical=height;
if(!latex(texengine)) vertical += 2.0;
double voffset=(vertical < 13.0) ? -137.8+vertical : -124.8;
double paperHeight=getSetting<double>("paperheight");
-
+
hoffset += b.left+bboxshift.getx();
voffset += paperHeight-height-b.bottom-bboxshift.gety();
-
+
string dvipsrc=getSetting<string>("dir");
if(dvipsrc.empty()) dvipsrc=systemDir;
dvipsrc += dirsep+"nopapersize.ps";
@@ -521,7 +537,7 @@ bool picture::texprocess(const string& texname, const string& outname,
if(status == 0) {
ifstream fin(psname.c_str());
psfile fout(outname,false);
-
+
string s;
bool first=true;
transform t=shift(bboxshift)*T;
@@ -551,7 +567,7 @@ bool picture::texprocess(const string& texname, const string& outname,
continue;
}
}
-
+
if (shift) {
if (s.compare(0, beginlength, beginspecial) == 0) {
fout.verbatimline(s);
@@ -577,7 +593,7 @@ bool picture::texprocess(const string& texname, const string& outname,
}
}
}
-
+
if(!keep) {
unlink(texname.c_str());
if(!getSetting<bool>("keepaux"))
@@ -599,22 +615,23 @@ bool picture::texprocess(const string& texname, const string& outname,
int picture::epstopdf(const string& epsname, const string& pdfname)
{
+ string compress=getSetting<bool>("compress") ? "true" : "false";
mem::vector<string> cmd;
cmd.push_back(getSetting<string>("gs"));
cmd.push_back("-q");
cmd.push_back("-dNOPAUSE");
cmd.push_back("-dBATCH");
cmd.push_back("-P");
- if(safe) {
+ if(safe)
cmd.push_back("-dSAFER");
- cmd.push_back("-dDELAYSAFER"); // Support transparency extensions.
- }
+ cmd.push_back("-dALLOWPSTRANSPARENCY"); // Support transparency extensions.
cmd.push_back("-sDEVICE=pdfwrite");
cmd.push_back("-dEPSCrop");
cmd.push_back("-dSubsetFonts=true");
cmd.push_back("-dEmbedAllFonts=true");
cmd.push_back("-dMaxSubsetPct=100");
- cmd.push_back("-dPDFSETTINGS=/prepress");
+ cmd.push_back("-dEncodeColorImages="+compress);
+ cmd.push_back("-dEncodeGrayImages="+compress);
cmd.push_back("-dCompatibilityLevel=1.4");
if(!getSetting<bool>("autorotate"))
cmd.push_back("-dAutoRotatePages=/None");
@@ -642,8 +659,8 @@ int picture::epstopdf(const string& epsname, const string& pdfname)
setPath(oldPath);
return status;
}
-
-int picture::pdftoeps(const string& pdfname, const string& epsname)
+
+int picture::pdftoeps(const string& pdfname, const string& epsname, bool eps)
{
mem::vector<string> cmd;
cmd.push_back(getSetting<string>("gs"));
@@ -655,8 +672,7 @@ int picture::pdftoeps(const string& pdfname, const string& epsname)
if(safe)
cmd.push_back("-dSAFER");
string texengine=getSetting<string>("tex");
- cmd.push_back("-sDEVICE="+getSetting<string>("epsdriver"));
-
+ cmd.push_back("-sDEVICE="+getSetting<string>(eps ? "epsdriver": "psdriver"));
cmd.push_back("-sOutputFile="+stripDir(epsname));
cmd.push_back(stripDir(pdfname));
@@ -671,25 +687,21 @@ int picture::pdftoeps(const string& pdfname, const string& epsname)
setPath(oldPath);
return status;
}
-
-bool picture::reloadPDF(const string& Viewer, const string& outname) const
+
+bool picture::reloadPDF(const string& Viewer, const string& outname) const
{
static bool needReload=true;
static bool haveReload=false;
-
- // Send javascript code to redraw picture.
- picture f;
- string name=getPath()+string("/")+outname;
- f.append(new drawVerbatim(TeX,"\\ \\pdfannot width 0pt height 0pt { /AA << /PO << /S /JavaScript /JS (try{reload('"+
- name+"');} catch(e) {} closeDoc(this);) >> >> }"));
+
string reloadprefix="reload";
if(needReload) {
needReload=false;
- string texengine=getSetting<string>("tex");
- Setting("tex")=string("pdflatex");
- haveReload=f.shipout(NULL,reloadprefix,"pdf",false,false);
- Setting("tex")=texengine;
+ string name=getPath()+string("/")+outname;
+ // Write javascript code to redraw picture.
+ runString("settings.tex='pdflatex'; tex('\\ \\pdfannot width 0pt height 0pt { /AA << /PO << /S /JavaScript /JS (try{reload(\""+name+"\");} catch(e) {} closeDoc(this);) >> >> }'); shipout('"+reloadprefix+"',wait=false,view=false);erase();exit();",false);
+ haveReload=true;
}
+
if(haveReload) {
mem::vector<string> cmd;
push_command(cmd,Viewer);
@@ -700,41 +712,27 @@ bool picture::reloadPDF(const string& Viewer, const string& outname) const
System(cmd,0,false);
}
return true;
-}
-
+}
+
int picture::epstosvg(const string& epsname, const string& outname)
-{
+{
mem::vector<string> cmd;
- cmd.push_back(getSetting<string>("dvisvgm"));
- cmd.push_back("-n");
+ char *tmpdir=dvisvgmCommand(cmd,epsname,outname);
cmd.push_back("-E");
- cmd.push_back("--verbosity=3");
- string libgs=getSetting<string>("libgs");
- if(!libgs.empty())
- cmd.push_back("--libgs="+libgs);
- push_split(cmd,getSetting<string>("dvisvgmOptions"));
- cmd.push_back("-o"+outname);
- cmd.push_back(epsname);
- int status=System(cmd,2,true,"dvisvgm");
+ int status=System(cmd,0,true,"dvisvgm");
+ rmtmpdir(tmpdir);
if(!getSetting<bool>("keep"))
unlink(epsname.c_str());
return status;
}
int picture::pdftosvg(const string& pdfname, const string& outname)
-{
+{
mem::vector<string> cmd;
- cmd.push_back(getSetting<string>("dvisvgm"));
- cmd.push_back("-n");
+ char *tmpdir=dvisvgmCommand(cmd,pdfname,outname);
cmd.push_back("--pdf");
- cmd.push_back("--verbosity=3");
- string libgs=getSetting<string>("libgs");
- if(!libgs.empty())
- cmd.push_back("--libgs="+libgs);
- push_split(cmd,getSetting<string>("dvisvgmOptions"));
- cmd.push_back("-o"+outname);
- cmd.push_back(pdfname);
- int status=System(cmd,2,true,"dvisvgm");
+ int status=System(cmd,0,true,"dvisvgm");
+ rmtmpdir(tmpdir);
if(status == 0 && !getSetting<bool>("keep"))
unlink(pdfname.c_str());
return status;
@@ -752,7 +750,7 @@ void htmlView(string name)
size=cygwin_conv_path(CCP_POSIX_TO_WIN_A,locateFile(name,true).c_str(),
filename,size);
cmd.push_back("file://"+string(filename));
-#else
+#else
cmd.push_back(locateFile(name,true));
#endif
push_split(cmd,getSetting<string>("htmlviewerOptions"));
@@ -761,14 +759,13 @@ void htmlView(string name)
bool picture::postprocess(const string& prename, const string& outname,
const string& outputformat,
- bool wait, bool view, bool pdftex,
+ bool wait, bool view, bool pdftex,
bool epsformat, bool svg)
{
- static mem::map<CONST string,int> pids;
int status=0;
- bool pdfformat=(settings::pdf(getSetting<string>("tex"))
- && outputformat == "") || outputformat == "pdf";
-
+ bool pdf=settings::pdf(getSetting<string>("tex"));
+ bool pdfformat=(pdf && outputformat == "") || outputformat == "pdf";
+
mem::vector<string> cmd;
if(pdftex || !epsformat) {
if(pdfformat) {
@@ -779,15 +776,19 @@ bool picture::postprocess(const string& prename, const string& outname,
} else status=epstopdf(prename,outname);
} else if(epsformat) {
if(svg) {
- status=pdftosvg(prename,outname);
- if(status != 0) { // Dvisvgm version < 2.4 doesn't support --pdf
- string epsname=stripExt(prename)+".eps";
- status=pdftoeps(prename,epsname);
+ bool haveShading=pdf && havepng();
+ if(!haveShading)
+ status=pdftosvg(prename,outname);
+ if(haveShading || status != 0) {
+ // Dvisvgm version < 2.4 doesn't support --pdf
+ // Dvisvgm --pdf doesn't support shading
+ string psname=stripExt(prename)+".ps";
+ status=pdftoeps(prename,psname,false);
if(status != 0) return false;
- status=epstosvg(epsname,outname);
+ status=epstosvg(psname,outname);
}
epsformat=false;
- } else
+ } else
status=pdftoeps(prename,outname);
} else {
double render=fabs(getSetting<double>("render"));
@@ -813,7 +814,7 @@ bool picture::postprocess(const string& prename, const string& outname,
double expand=antialias;
if(expand < 2.0) expand=1.0;
res *= expand;
- cmd.push_back(getSetting<string>("convert"));
+ cmd.push_back(getSetting<string>("convert"));
cmd.push_back("-density");
cmd.push_back(String(res)+"x"+String(res));
if(expand == 1.0)
@@ -831,11 +832,24 @@ bool picture::postprocess(const string& prename, const string& outname,
unlink(prename.c_str());
}
if(status != 0) return false;
-
+
if(verbose > 0)
cout << "Wrote " << outname << endl;
+
+ return display(outname,outputformat,wait,view,epsformat);
+}
+
+bool picture::display(const string& outname, const string& outputformat,
+ bool wait, bool view, bool epsformat)
+{
+ int status=0;
+ static mem::map<CONST string,int> pids;
bool View=settings::view() && view;
+
if(View) {
+ bool pdf=settings::pdf(getSetting<string>("tex"));
+ bool pdfformat=(pdf && outputformat == "") || outputformat == "pdf";
+
if(epsformat || pdfformat) {
// Check to see if there is an existing viewer for this outname.
mem::map<CONST string,int>::iterator p=pids.find(outname);
@@ -848,17 +862,18 @@ bool picture::postprocess(const string& prename, const string& outname,
if(pid)
running=(waitpid(pid, &status, WNOHANG) != pid);
}
-
+
bool pdfreload=pdfformat && getSetting<bool>("pdfreload");
if(running) {
- // Tell gv/acroread to reread file.
+ // Tell gv/acroread to reread file.
if(Viewer == "gv") kill(pid,SIGHUP);
- else if(pdfreload) reloadPDF(Viewer,outname);
+ else if(pdfreload)
+ reloadPDF(Viewer,outname);
} else {
mem::vector<string> cmd;
push_command(cmd,Viewer);
- string viewerOptions=getSetting<string>(pdfformat ?
- "pdfviewerOptions" :
+ string viewerOptions=getSetting<string>(pdfformat ?
+ "pdfviewerOptions" :
"psviewerOptions");
if(!viewerOptions.empty())
push_split(cmd,viewerOptions);
@@ -868,7 +883,7 @@ bool picture::postprocess(const string& prename, const string& outname,
pdfformat ? "your PDF viewer" : "your PostScript viewer",
&pid);
if(status != 0) return false;
-
+
if(!wait) pids[outname]=pid;
if(pdfreload) {
@@ -880,7 +895,7 @@ bool picture::postprocess(const string& prename, const string& outname,
}
}
} else {
- if(outputformat == "svg")
+ if(outputformat == "svg" || outputformat == "html")
htmlView(outname);
else {
mem::vector<string> cmd;
@@ -892,49 +907,69 @@ bool picture::postprocess(const string& prename, const string& outname,
}
}
}
-
+
return true;
}
string Outname(const string& prefix, const string& outputformat,
- bool standardout)
+ bool standardout, string aux="")
{
- return standardout ? "-" : buildname(prefix,outputformat,"");
+ return standardout ? "-" : buildname(prefix,outputformat,aux);
}
bool picture::shipout(picture *preamble, const string& Prefix,
const string& format, bool wait, bool view)
{
+ bool keep=getSetting<bool>("keep");
+
+ string aux="";
b=bounds();
-
+ bool empty=b.empty;
+
+ string outputformat=format.empty() ? defaultformat() : format;
+
+ bool htmlformat=outputformat == "html";
+ if(htmlformat) {
+ outputformat="svg";
+ aux="_";
+ if(view) view=false;
+ else htmlformat=false;
+ }
+
+ bool svgformat=outputformat == "svg";
+
string texengine=getSetting<string>("tex");
+ string texengineSave;
+
+ if(!empty && svgformat && texengine == "latex" && havepng()) {
+ texengineSave=texengine;
+ Setting("tex")=texengine="pdflatex";
+ }
+
bool usetex=texengine != "none";
bool TeXmode=getSetting<bool>("inlinetex") && usetex;
bool pdf=settings::pdf(texengine);
-
+
bool standardout=Prefix == "-";
string prefix=standardout ? standardprefix : stripExt(Prefix);
string preformat=nativeformat();
- string outputformat=format.empty() ? defaultformat() : format;
bool epsformat=outputformat == "eps";
bool pdfformat=pdf || outputformat == "pdf";
- bool svgformat=outputformat == "svg";
bool dvi=false;
- bool svg=svgformat && usetex && !(pdf && havepng()) &&
+ bool svg=svgformat && usetex &&
(!have3D() || getSetting<double>("render") == 0.0);
if(svg) {
if(pdf) epsformat=true;
else dvi=true;
}
-
- string outname=Outname(prefix,outputformat,standardout);
+
+ string outname=Outname(prefix,outputformat,standardout,aux);
string epsname=epsformat ? (standardout ? "" : outname) :
auxname(prefix,"eps");
-
+
bool Labels=labels || TeXmode;
-
- bool empty=b.empty;
+
if(outputformat == "png" && (b.right-b.left < 1.0 || b.top-b.bottom < 1.0))
empty=true;
@@ -949,23 +984,23 @@ bool picture::shipout(picture *preamble, const string& Prefix,
return postprocess(epsname,outname,outputformat,wait,view,false,
epsformat,false);
}
-
+
Labels |= svg;
-
+
if(Labels)
prefix=cleanpath(prefix);
-
- string prename=((epsformat && !pdf) || !Labels) ? epsname :
+
+ string prename=((epsformat && !pdf) || !Labels) ? epsname :
auxname(prefix,preformat);
-
+
SetPageDimensions();
-
+
pair aligndir=getSetting<pair>("aligndir");
string origin=getSetting<string>("align");
-
+
pair bboxshift=(origin == "Z" && epsformat) ?
pair(0.0,0.0) : pair(-b.left,-b.bottom);
-
+
if(epsformat) {
bboxshift += getSetting<pair>("offset");
double yexcess=max(getSetting<double>("paperheight")-
@@ -980,35 +1015,35 @@ bool picture::shipout(picture *preamble, const string& Prefix,
} else {
double scale=max(fabs(aligndir.getx()),fabs(aligndir.gety()));
if(scale != 0) aligndir *= 0.5/scale;
- bboxshift +=
+ bboxshift +=
pair((aligndir.getx()+0.5)*xexcess,(aligndir.gety()+0.5)*yexcess);
}
- }
-
+ } else if(svg)
+ bboxshift += pair(-b.left,b.top);
+
bool status=true;
-
+
string texname;
texfile *tex=NULL;
-
+
if(Labels) {
texname=TeXmode ? buildname(prefix,"tex") : auxname(prefix,"tex");
tex=dvi ? new svgtexfile(texname,b) : new texfile(texname,b);
tex->prologue();
}
-
+
nodelist::iterator layerp=nodes.begin();
nodelist::iterator p=layerp;
unsigned layer=0;
mem::list<string> files;
-
+
bbox bshift=b;
-
-// transparency=false;
+
int svgcount=0;
-
+
typedef mem::list<drawElement *> clipstack;
clipstack begin;
-
+
while(p != nodes.end()) {
string psname,pdfname;
if(Labels) {
@@ -1024,12 +1059,12 @@ bool picture::shipout(picture *preamble, const string& Prefix,
if(pdf) files.push_back(pdfname);
psfile out(psname,pdfformat);
out.prologue(bshift);
-
+
if(!Labels) {
out.gsave();
out.translate(bboxshift);
}
-
+
if(preamble) {
// Postscript preamble.
nodelist Nodes=preamble->nodes;
@@ -1043,20 +1078,20 @@ bool picture::shipout(picture *preamble, const string& Prefix,
}
}
out.resetpen();
-
+
bool postscript=false;
drawLabel *L=NULL;
-
+
if(dvi)
for(nodelist::const_iterator r=begin.begin(); r != begin.end(); ++r)
(*r)->draw(&out);
-
+
processDataStruct &pd=processData();
-
+
for(; p != nodes.end(); ++p) {
assert(*p);
if(Labels && (*p)->islayer()) break;
-
+
if(dvi && (*p)->svg()) {
picture *f=(*p)->svgpng() ? new picture : NULL;
nodelist::const_iterator q=layerp;
@@ -1071,18 +1106,18 @@ bool picture::shipout(picture *preamble, const string& Prefix,
if(q == p) break;
++q;
}
-
+
if(f) {
for(nodelist::const_iterator r=begin.begin(); r != begin.end(); ++r)
f->append(*r);
f->append(*(q++));
}
-
+
while(q != nodes.end() && !(*q)->islayer()) ++q;
clipstack end;
-
+
for(nodelist::const_iterator r=--q;; --r) {
if((*r)->beginclip() && end.size() >= 1)
end.pop_back();
@@ -1090,14 +1125,14 @@ bool picture::shipout(picture *preamble, const string& Prefix,
end.push_back(*r);
if(r == p) break;
}
-
+
for(nodelist::reverse_iterator r=end.rbegin(); r != end.rend();
++r) {
(*r)->draw(&out);
if(f)
f->append(*r);
}
-
+
if(f) {
ostringstream buf;
buf << prefix << "_" << svgcount;
@@ -1110,7 +1145,7 @@ bool picture::shipout(picture *preamble, const string& Prefix,
pair size=M-m;
ostringstream cmd;
- cmd << "\\special{dvisvgm:img " << size.getx()*ps2tex << " "
+ cmd << "\\special{dvisvgm:img " << size.getx()*ps2tex << " "
<< size.gety()*ps2tex << " " << pngname << "}";
static pen P;
static pair zero;
@@ -1122,24 +1157,22 @@ bool picture::shipout(picture *preamble, const string& Prefix,
break;
} else postscript |= (*p)->draw(&out);
}
-
+
if(Labels) {
- tex->beginlayer(pdf ? pdfname : psname,postscript);
+ if(!svg || pdf)
+ tex->beginlayer(pdf ? pdfname : psname,postscript);
} else out.grestore();
-
+
out.epilogue();
out.close();
-
-// if(out.Transparency())
-// transparency=true;
-
+
if(Labels) {
tex->resetpen();
if(pdf && !b.empty) {
status=(epstopdf(psname,pdfname) == 0);
- if(!getSetting<bool>("keep")) unlink(psname.c_str());
+ if(!keep) unlink(psname.c_str());
}
-
+
if(status) {
for (p=layerp; p != nodes.end(); ++p) {
assert(*p);
@@ -1159,10 +1192,10 @@ bool picture::shipout(picture *preamble, const string& Prefix,
break;
}
}
- }
+ }
}
}
-
+
bool context=settings::context(texengine);
if(status) {
if(TeXmode) {
@@ -1175,7 +1208,7 @@ bool picture::shipout(picture *preamble, const string& Prefix,
status=texprocess(texname,dvi ? outname : prename,prefix,
bboxshift,dvi);
delete tex;
- if(!getSetting<bool>("keep")) {
+ if(!keep) {
for(mem::list<string>::iterator p=files.begin(); p != files.end();
++p)
unlink(p->c_str());
@@ -1185,16 +1218,27 @@ bool picture::shipout(picture *preamble, const string& Prefix,
if(context) prename=stripDir(prename);
status=postprocess(prename,outname,outputformat,wait,
view,pdf && Labels,epsformat,svg);
- if(pdfformat && !getSetting<bool>("keep")) {
+ if(pdfformat && !keep) {
unlink(auxname(prefix,"m9").c_str());
unlink(auxname(prefix,"pbsdat").c_str());
}
}
}
}
-
+
if(!status) reportError("shipout failed");
-
+
+ if(!texengineSave.empty()) Setting("tex")=texengineSave;
+
+ if(htmlformat) {
+ jsfile out;
+ out.svgtohtml(prefix);
+ string name=buildname(prefix,"html");
+ display(name,"html",wait,true,false);
+ if(!keep)
+ unlink(outname.c_str());
+ }
+
return true;
}
@@ -1207,12 +1251,12 @@ void picture::render(double size2, const triple& Min, const triple& Max,
if(remesh) (*p)->meshinit();
(*p)->render(size2,Min,Max,perspective,remesh);
}
-
+
#ifdef HAVE_GL
drawBuffers();
-#endif
+#endif
}
-
+
struct Communicate : public gc {
string prefix;
picture* pic;
@@ -1236,17 +1280,20 @@ struct Communicate : public gc {
Communicate com;
+extern bool allowRender;
+
void glrenderWrapper()
{
-#ifdef HAVE_GL
+#ifdef HAVE_GL
#ifdef HAVE_PTHREAD
wait(initSignal,initLock);
endwait(initSignal,initLock);
-#endif
- glrender(com.prefix,com.pic,com.format,com.width,com.height,com.angle,
- com.zoom,com.m,com.M,com.shift,com.margin,com.t,com.background,
- com.nlights,com.lights,com.diffuse,com.specular,com.view);
-#endif
+#endif
+ if(allowRender)
+ glrender(com.prefix,com.pic,com.format,com.width,com.height,com.angle,
+ com.zoom,com.m,com.M,com.shift,com.margin,com.t,com.background,
+ com.nlights,com.lights,com.diffuse,com.specular,com.view);
+#endif
}
bool picture::shipout3(const string& prefix, const string& format,
@@ -1258,26 +1305,16 @@ bool picture::shipout3(const string& prefix, const string& format,
{
if(getSetting<bool>("interrupt"))
return true;
-
+
bool webgl=format == "html";
-
-#ifndef HAVE_GL
- if(!webgl && !getSetting<bool>("offscreen"))
- camp::reportError("to support onscreen rendering, please install glut library, run ./configure, and recompile");
-#endif
-
+
#ifndef HAVE_LIBGLM
if(webgl)
camp::reportError("to support WebGL rendering, please install glm header files, run ./configure, and recompile");
#endif
-
-#ifndef HAVE_LIBOSMESA
- if(getSetting<bool>("offscreen"))
- camp::reportError("to support offscreen rendering; please install OSMesa library, run ./configure --enable-offscreen, and recompile");
-#endif
-
+
picture *pic = new picture;
-
+
matrixstack ms;
for(nodelist::const_iterator p=nodes.begin(); p != nodes.end(); ++p) {
assert(*p);
@@ -1301,21 +1338,24 @@ bool picture::shipout3(const string& prefix, const string& format,
(*p)->displacement();
}
- const string outputformat=format.empty() ?
+ const string outputformat=format.empty() ?
getSetting<string>("outformat") : format;
-
+
#ifdef HAVE_LIBGLM
static int oldpid=0;
bool View=settings::view() && view;
-#endif
-
+#endif
+
#ifdef HAVE_GL
- bool offscreen=getSetting<bool>("offscreen");
+ bool offscreen=false;
+#ifdef HAVE_LIBOSMESA
+ offscreen=true;
+#endif
#ifdef HAVE_PTHREAD
bool animating=getSetting<bool>("animating");
bool Wait=!interact::interactive || !View || animating;
-#endif
-#endif
+#endif
+#endif
if(!webgl) {
#ifdef HAVE_GL
@@ -1372,29 +1412,28 @@ bool picture::shipout3(const string& prefix, const string& format,
}
#endif
}
-
-#if HAVE_LIBGLM
+
+#if HAVE_LIBGLM
glrender(prefix,pic,outputformat,width,height,angle,zoom,m,M,shift,margin,t,
background,nlights,lights,diffuse,specular,View,oldpid);
-
+
if(webgl) {
jsfile js;
string name=buildname(prefix,format);
js.open(name);
-
+
for(nodelist::iterator p=pic->nodes.begin(); p != pic->nodes.end(); ++p) {
assert(*p);
(*p)->write(&js);
}
- if(verbose > 0)
- cout << "Wrote " << name << endl;
+ js.finish(name);
if(View)
htmlView(name);
return true;
}
-#endif
+#endif
-#ifdef HAVE_GL
+#ifdef HAVE_GL
#ifdef HAVE_PTHREAD
if(glthread && !offscreen && Wait) {
pthread_cond_wait(&readySignal,&readyLock);
@@ -1403,7 +1442,7 @@ bool picture::shipout3(const string& prefix, const string& format,
return true;
#endif
#endif
-
+
return false;
}
@@ -1411,13 +1450,13 @@ bool picture::shipout3(const string& prefix, const string format)
{
bounds3();
bool status;
-
+
string name=buildname(prefix,"prc");
prcfile prc(name);
-
+
static const double limit=2.5*10.0/INT_MAX;
double compressionlimit=max(length(b3.Max()),length(b3.Min()))*limit;
-
+
groups.push_back(groupmap());
for(nodelist::iterator p=nodes.begin(); p != nodes.end(); ++p) {
assert(*p);
@@ -1427,9 +1466,9 @@ bool picture::shipout3(const string& prefix, const string format)
status=prc.finish();
if(!status) reportError("shipout3 failed");
-
+
if(verbose > 0) cout << "Wrote " << name << endl;
-
+
return true;
}
diff --git a/Build/source/utils/asymptote/picture.h b/Build/source/utils/asymptote/picture.h
index 58223caf373..91ef54260bd 100644
--- a/Build/source/utils/asymptote/picture.h
+++ b/Build/source/utils/asymptote/picture.h
@@ -26,34 +26,33 @@ private:
bbox b_cached; // Cached bounding box
boxvector labelbounds;
bboxlist bboxstack;
- bool transparency;
groupsmap groups;
unsigned billboard;
public:
bbox3 b3; // 3D bounding box
-
+
typedef mem::list<drawElement*> nodelist;
nodelist nodes;
-
+
picture() : labels(false), lastnumber(0), lastnumber3(0), T(identity),
- transparency(false), billboard(0) {}
-
+ billboard(0) {}
+
// Destroy all of the owned picture objects.
~picture();
// Prepend an object to the picture.
void prepend(drawElement *p);
-
+
// Append an object to the picture.
void append(drawElement *p);
// Enclose each layer with begin and end.
void enclose(drawElement *begin, drawElement *end);
-
+
// Add the content of another picture.
void add(picture &pic);
void prepend(picture &pic);
-
+
bool havelabels();
bool have3D();
bool havepng();
@@ -64,28 +63,27 @@ public:
// Compute bounds on ratio (x,y)/z for 3d picture (not cached).
pair ratio(double (*m)(double, double));
-
- bool Transparency() {
- return transparency;
- }
-
+
int epstosvg(const string& epsname, const string& outname);
int pdftosvg(const string& pdfname, const string& outname);
-
+
int epstopdf(const string& epsname, const string& pdfname);
- int pdftoeps(const string& pdfname, const string& epsname);
-
+ int pdftoeps(const string& pdfname, const string& epsname, bool eps=true);
+
bool texprocess(const string& texname, const string& tempname,
- const string& prefix, const pair& bboxshift, bool svgformat);
-
- bool postprocess(const string& prename, const string& outname,
+ const string& prefix, const pair& bboxshift, bool svgformat);
+
+ bool postprocess(const string& prename, const string& outname,
const string& outputformat, bool wait, bool view,
bool pdftex, bool epsformat, bool svg);
-
+
+ bool display(const string& outname, const string& outputformat,
+ bool wait, bool view, bool epsformat);
+
// Ship the picture out to PostScript & TeX files.
bool shipout(picture* preamble, const string& prefix,
const string& format, bool wait=false, bool view=true);
-
+
void render(double size2, const triple &Min, const triple& Max,
double perspective, bool remesh) const;
bool shipout3(const string& prefix, const string& format,
@@ -94,19 +92,19 @@ public:
const pair& margin, double *t,
double *background, size_t nlights, triple *lights,
double *diffuse, double *specular, bool view);
-
+
// 3D output
bool shipout3(const string& prefix, const string format);
-
+
bool reloadPDF(const string& Viewer, const string& outname) const;
-
+
picture *transformed(const transform& t);
picture *transformed(const vm::array& t);
-
+
bool null() {
return nodes.empty();
}
-
+
};
inline picture *transformed(const transform& t, picture *p)
@@ -123,7 +121,7 @@ void texinit();
int opentex(const string& texname, const string& prefix, bool dvi=false);
const char *texpathmessage();
-
+
} //namespace camp
#endif
diff --git a/Build/source/utils/asymptote/pipestream.cc b/Build/source/utils/asymptote/pipestream.cc
index a809302bf50..bdde519e864 100644
--- a/Build/source/utils/asymptote/pipestream.cc
+++ b/Build/source/utils/asymptote/pipestream.cc
@@ -39,10 +39,9 @@ void pipeHandler(int)
Signal(SIGPIPE,SIG_DFL);
instance->pipeclose();
}
-
+
void iopipestream::open(const mem::vector<string> &command, const char *hint,
- const char *application, const char *Fatal,
- int out_fileno)
+ const char *application, int out_fileno)
{
if(pipe(in) == -1) {
ostringstream buf;
@@ -90,7 +89,6 @@ void iopipestream::open(const mem::vector<string> &command, const char *hint,
Running=true;
pipeopen=true;
pipein=true;
- fatal=Fatal;
block(false,true);
}
@@ -133,10 +131,10 @@ ssize_t iopipestream::readbuffer()
for(;;) {
if((nc=read(out[0],p,size)) < 0) {
if(errno == EAGAIN || errno == EINTR) {p[0]=0; break;}
- else {
- ostringstream buf;
- buf << "read from pipe failed: errno=" << errno;
- camp::reportError(buf);
+ else {
+ ostringstream buf;
+ buf << "read from pipe failed: errno=" << errno;
+ camp::reportError(buf);
}
nc=0;
}
@@ -184,15 +182,13 @@ void iopipestream::wait(const char *prompt)
{
sbuffer.clear();
size_t plen=strlen(prompt);
- size_t flen=strlen(fatal);
do {
readbuffer();
+ if(*buffer == 0) camp::reportError(sbuffer);
sbuffer.append(buffer);
if(tailequals(sbuffer.c_str(),sbuffer.size(),prompt,plen)) break;
- if(*fatal && tailequals(sbuffer.c_str(),sbuffer.size(),fatal,flen))
- camp::reportError(sbuffer);
} while(true);
}
diff --git a/Build/source/utils/asymptote/pipestream.h b/Build/source/utils/asymptote/pipestream.h
index 59252e468e0..eedad63f6b4 100644
--- a/Build/source/utils/asymptote/pipestream.h
+++ b/Build/source/utils/asymptote/pipestream.h
@@ -38,22 +38,19 @@ protected:
bool Running;
bool pipeopen;
bool pipein;
- const char *fatal;
public:
-
+
void open(const mem::vector<string> &command, const char *hint=NULL,
- const char *application="", const char *fatal="",
- int out_fileno=STDOUT_FILENO);
+ const char *application="", int out_fileno=STDOUT_FILENO);
bool isopen() {return pipeopen;}
iopipestream(): pid(0), pipeopen(false) {}
iopipestream(const mem::vector<string> &command, const char *hint=NULL,
- const char *application="", const char *fatal="",
- int out_fileno=STDOUT_FILENO) :
+ const char *application="", int out_fileno=STDOUT_FILENO) :
pid(0), pipeopen(false) {
- open(command,hint,application,fatal,out_fileno);
+ open(command,hint,application,out_fileno);
}
void eof();
@@ -64,10 +61,10 @@ public:
}
void block(bool write=false, bool read=true);
-
+
ssize_t readbuffer();
string readline();
-
+
bool running() {return Running;}
typedef iopipestream& (*imanip)(iopipestream&);
@@ -86,7 +83,7 @@ public:
size_t plen);
string getbuffer() {return sbuffer;}
-
+
void wait(const char *prompt);
int wait();
void Write(const string &s);
@@ -104,5 +101,5 @@ public:
return *this;
}
};
-
+
#endif
diff --git a/Build/source/utils/asymptote/policy.h b/Build/source/utils/asymptote/policy.h
index fe8fcf7a27f..400c13a54eb 100644
--- a/Build/source/utils/asymptote/policy.h
+++ b/Build/source/utils/asymptote/policy.h
@@ -63,12 +63,12 @@ typedef struct {
// value.
// TODO: Change name to sig.
void (*addField)(handle_typ handle,
- const char *name, handle_typ init);
+ const char *name, handle_typ init);
arguments_typ (*newArguments)();
void (*releaseArguments)(arguments_typ args);
void (*addArgument)(arguments_typ args, const char *name, handle_typ handle,
- arg_rest_option at);
+ arg_rest_option at);
handle_typ (*call)(handle_typ callee, arguments_typ args);
handle_typ (*globals)(state_typ state);
diff --git a/Build/source/utils/asymptote/prcfile.h b/Build/source/utils/asymptote/prcfile.h
index 224a92f8a07..d7076065550 100644
--- a/Build/source/utils/asymptote/prcfile.h
+++ b/Build/source/utils/asymptote/prcfile.h
@@ -17,12 +17,12 @@ inline prc::RGBAColour rgba(pen p) {
p.torgb();
return prc::RGBAColour(p.red(),p.green(),p.blue(),p.opacity());
}
-
+
static const double inches=72;
static const double cm=inches/2.54;
class prcfile : public prc::oPRCFile {
-public:
+public:
prcfile(string name) : prc::oPRCFile(name.c_str(),10.0/cm) {} // Use bp.
};
diff --git a/Build/source/utils/asymptote/primitives.h b/Build/source/utils/asymptote/primitives.h
index cbf37601c70..1d9f88e2d6f 100644
--- a/Build/source/utils/asymptote/primitives.h
+++ b/Build/source/utils/asymptote/primitives.h
@@ -35,7 +35,7 @@ PRIMITIVE(path3,Path3,path3)
PRIMITIVE(cycleToken,CycleToken,cycleToken)
PRIMITIVE(tensionSpecifier,TensionSpecifier,tensionSpecifier)
PRIMITIVE(curlSpecifier,CurlSpecifier,curlSpecifier)
-PRIMITIVE(pen,Pen,pen)
+ PRIMITIVE(pen,Pen,pen)
PRIMITIVE(picture,Picture,frame)
PRIMITIVE(file,File,file)
PRIMITIVE(code,Code,code)
diff --git a/Build/source/utils/asymptote/process.cc b/Build/source/utils/asymptote/process.cc
index 20557858c5d..acfd2f5e7f1 100644
--- a/Build/source/utils/asymptote/process.cc
+++ b/Build/source/utils/asymptote/process.cc
@@ -1,6 +1,6 @@
/*****
* process.cc
- * Andy Hammerlindl 2006/08/19
+ * Andy Hammerlindl 2006/08/19
*
* Handles processing blocks of code (including files, strings, and the
* interactive prompt, for listing and parse-only modes as well as actually
@@ -41,7 +41,7 @@ void purge(Int divisor=0);
}
namespace vm {
-bool indebugger;
+bool indebugger;
}
using namespace settings;
@@ -139,7 +139,7 @@ public:
absyntax::prettyname(out, "interactiveRunnable", indent);
base->prettyprint(out, indent+1);
}
-
+
void trans(coenv &e) {
base->interactiveTrans(e);
}
@@ -150,7 +150,7 @@ public:
base->transAsField(e, r);
}
};
-
+
enum transMode {
TRANS_INTERACTIVE,
TRANS_NORMAL
@@ -177,7 +177,7 @@ bool runRunnable(runnable *r, coenv &e, istack &s, transMode tm=TRANS_NORMAL) {
// Should an interactive error hurt the status?
em.statusError();
- return false;
+ return false;
}
return true;
}
@@ -218,7 +218,7 @@ public:
try {
if(purge) run::purge();
-
+
penv pe;
env base_env(pe.ge());
coder base_coder(nullPos, "icore::doRun");
@@ -244,9 +244,9 @@ public:
} catch(handled_error) {
em.statusError();
}
-
+
run::cleanup();
-
+
em.clear();
}
@@ -366,7 +366,7 @@ public:
: itree(filename),
filename(filename),
outname(stripDir(stripExt(string(filename == "-" ? settings::outname() : filename), suffix))) {}
-
+
block *buildTree() {
return !filename.empty() ? parser::parseFile(filename,"Loading") : 0;
}
@@ -394,7 +394,7 @@ public:
if (verbose >= 1)
cout << "Processing " << outname << endl;
-
+
try {
icore::process(purge);
}
@@ -593,13 +593,13 @@ class iprompt : public icore {
void postRun(coenv &, istack &) {
}
-
+
// Commands are chopped into the starting word and the rest of the line.
struct commandLine {
string line;
string word;
string rest;
-
+
commandLine(string line) : line(line) {
string::iterator c=line.begin();
@@ -783,10 +783,10 @@ class iprompt : public icore {
// Continue taking input until a termination command is received from xasy.
block *parseXasyLine(string line) {
-
-#ifdef __MSDOS__
+
+#ifdef __MSDOS__
const string EOT="\x04\r\n";
-#else
+#else
const string EOT="\x04\n";
#endif
string s;
@@ -799,12 +799,12 @@ class iprompt : public icore {
try {
if(getSetting<bool>("multiline")) {
block *code=parseExtendableLine(line);
-
+
icode i(code);
i.run(e,s,TRANS_INTERACTIVE);
} else if(getSetting<bool>("xasy")) {
block *code=parseXasyLine(line);
-
+
icode i(code);
i.run(e,s,TRANS_INTERACTIVE);
} else {
@@ -888,7 +888,7 @@ public:
restart=false;
}
} while(restart);
-
+
interact::cleanup_interactive();
}
};
@@ -969,7 +969,7 @@ public:
assert(!em.errors()); // TODO: Decide how to handle prior errors.
try {
- { withProcessData token(pe.pd());
+ { withProcessData token(pe.pd());
::runRunnable(r, e, s, TRANS_INTERACTIVE);
}
} catch(std::bad_alloc&) {
diff --git a/Build/source/utils/asymptote/process.h b/Build/source/utils/asymptote/process.h
index 1a5189cdb5e..3f3e7390895 100644
--- a/Build/source/utils/asymptote/process.h
+++ b/Build/source/utils/asymptote/process.h
@@ -1,6 +1,6 @@
/*****
* process.h
- * Andy Hammerlindl 2006/08/19
+ * Andy Hammerlindl 2006/08/19
*
* Handles processing blocks of code (including files, strings, and the
* interactive prompt, for listing and parse-only modes as well as actually
@@ -46,10 +46,10 @@ void doUnrestrictedList();
template<class T>
class terminator {
-public:
+public:
typedef mem::vector<T *> Pointer;
Pointer pointer;
-
+
// Return first available index
size_t available() {
size_t index=0;
@@ -60,17 +60,17 @@ public:
pointer.push_back(NULL);
return index;
}
-
+
size_t add(T *p) {
size_t index=available();
pointer[index]=p;
return index;
}
-
+
void remove(size_t index) {
pointer[index]=NULL;
}
-
+
~terminator() {
for(typename Pointer::iterator p=pointer.begin(); p != pointer.end(); ++p) {
if(*p != NULL) {
@@ -100,21 +100,21 @@ struct processDataStruct {
vm::callable *atBreakpointFunction;
camp::pen defaultpen;
camp::pen currentpen;
-
+
// For xasy:
string fileName;
position topPos;
string KEY;
xkey_t xkey;
xmap_t xmap;
-
+
terminator<std::ofstream> ofile;
terminator<std::fstream> ifile;
#ifdef HAVE_RPC_RPC_H
terminator<xdr::ioxstream> ixfile;
terminator<xdr::oxstream> oxfile;
-#endif
-
+#endif
+
processDataStruct() {
atExitFunction=NULL;
atUpdateFunction=NULL;
@@ -122,7 +122,7 @@ struct processDataStruct {
defaultpen=camp::pen::initialpen();
currentpen=camp::pen();
}
-
+
};
processDataStruct &processData();
diff --git a/Build/source/utils/asymptote/profiler.h b/Build/source/utils/asymptote/profiler.h
index bd914d55d12..046d85e403b 100644
--- a/Build/source/utils/asymptote/profiler.h
+++ b/Build/source/utils/asymptote/profiler.h
@@ -38,7 +38,7 @@ inline void printNameFromLambda(ostream& out, lambda *func) {
out << "<top level>";
return;
}
-
+
#ifdef DEBUG_FRAME
string name = func->name;
#else
@@ -162,12 +162,12 @@ class profiler : public gc {
#endif
out << "dict(\n"
- << " name = '" << name << " " << func << "',\n"
- << " pos = '" << positionFromLambda(func) << "',\n"
- << " calls = " << calls << ",\n"
- << " instructions = " << instructions << ",\n"
- << " nsecs = " << nsecs << ",\n"
- << " children = [\n";
+ << " name = '" << name << " " << func << "',\n"
+ << " pos = '" << positionFromLambda(func) << "',\n"
+ << " calls = " << calls << ",\n"
+ << " instructions = " << instructions << ",\n"
+ << " nsecs = " << nsecs << ",\n"
+ << " children = [\n";
size_t n = children.size();
for (size_t i = 0; i < n; ++i) {
@@ -237,35 +237,35 @@ class profiler : public gc {
for (mem::map<lambda *, arc>::iterator i = arcs.begin();
i != arcs.end();
++i)
- {
- lambda *l = i->first;
- arc& a = i->second;
+ {
+ lambda *l = i->first;
+ arc& a = i->second;
- out << "cfl=" << positionFromLambda(l) << "\n";
+ out << "cfl=" << positionFromLambda(l) << "\n";
- out << "cfn=";
- printNameFromLambda(out, l);
- out << "\n";
+ out << "cfn=";
+ printNameFromLambda(out, l);
+ out << "\n";
- out << "calls=" << a.calls << " " << POS << "\n";
- out << POS << " " << a.instTotal << " " << a.nsecsTotal << "\n";
- }
+ out << "calls=" << a.calls << " " << POS << "\n";
+ out << POS << " " << a.instTotal << " " << a.nsecsTotal << "\n";
+ }
for (mem::map<bltin, arc>::iterator i = carcs.begin();
i != carcs.end();
++i)
- {
- bltin b = i->first;
- arc& a = i->second;
+ {
+ bltin b = i->first;
+ arc& a = i->second;
- out << "cfl=C++ code" << endl;
+ out << "cfl=C++ code" << endl;
- out << "cfn=";
- printNameFromBltin(out, b);
- out << "\n";
+ out << "cfn=";
+ printNameFromBltin(out, b);
+ out << "\n";
- out << "calls=" << a.calls << " " << POS << "\n";
- out << POS << " " << a.instTotal << " " << a.nsecsTotal << "\n";
- }
+ out << "calls=" << a.calls << " " << POS << "\n";
+ out << POS << " " << a.instTotal << " " << a.nsecsTotal << "\n";
+ }
}
};
@@ -277,7 +277,7 @@ class profiler : public gc {
void analyseNode(node& n) {
fun& f = n.cfunc ? cfuns[n.cfunc] :
- funs[n.func];
+ funs[n.func];
f.analyse(n);
@@ -304,7 +304,7 @@ class profiler : public gc {
struct timeval now;
gettimeofday(&now, 0);
long long nsecs = 1000000000LL * (now.tv_sec - timestamp.tv_sec) +
- 1000LL * (now.tv_usec - timestamp.tv_usec);
+ 1000LL * (now.tv_usec - timestamp.tv_usec);
timestamp = now;
return nsecs;
}
@@ -337,8 +337,8 @@ public:
inline profiler::profiler()
: emptynode()
{
- callstack.push(&emptynode);
- startLap();
+ callstack.push(&emptynode);
+ startLap();
}
inline void profiler::beginFunction(lambda *func) {
@@ -399,33 +399,33 @@ inline void profiler::dump(ostream& out) {
for (mem::map<lambda *, fun>::iterator i = funs.begin();
i != funs.end();
++i)
- {
- lambda *l = i->first;
- fun& f = i->second;
+ {
+ lambda *l = i->first;
+ fun& f = i->second;
- out << "fl=" << positionFromLambda(l) << "\n";
+ out << "fl=" << positionFromLambda(l) << "\n";
- out << "fn=";
- printNameFromLambda(out, l);
- out << "\n";
+ out << "fn=";
+ printNameFromLambda(out, l);
+ out << "\n";
- f.dump(out);
- }
+ f.dump(out);
+ }
for (mem::map<bltin, fun>::iterator i = cfuns.begin();
i != cfuns.end();
++i)
- {
- bltin b = i->first;
- fun& f = i->second;
+ {
+ bltin b = i->first;
+ fun& f = i->second;
- out << "fl=C++ code\n";
+ out << "fl=C++ code\n";
- out << "fn=";
- printNameFromBltin(out, b);
- out << "\n";
+ out << "fn=";
+ printNameFromBltin(out, b);
+ out << "\n";
- f.dump(out);
- }
+ f.dump(out);
+ }
}
diff --git a/Build/source/utils/asymptote/program.cc b/Build/source/utils/asymptote/program.cc
index f4c83f7944f..2af41c967d5 100644
--- a/Build/source/utils/asymptote/program.cc
+++ b/Build/source/utils/asymptote/program.cc
@@ -1,7 +1,7 @@
/*****
* program.cc
* Tom Prince
- *
+ *
* The list of instructions used by the virtual machine.
*****/
@@ -98,9 +98,9 @@ void printInst(ostream& out, const program::label& code,
{
out.width(4);
out << offset(base,code) << " ";
-
+
Int i = (Int)code->op;
-
+
if (i < 0 || i >= numOps) {
out << "<<invalid op>>" << i;
return;
@@ -147,7 +147,7 @@ void printInst(ostream& out, const program::label& code,
#endif
break;
}
-
+
default: {
/* nothing else to do */
break;
@@ -160,7 +160,7 @@ void print(ostream& out, program *base)
program::label code = base->begin();
bool active = true;
while (active) {
- if (code->op == inst::ret ||
+ if (code->op == inst::ret ||
code->op < 0 || code->op >= numOps)
active = false;
printInst(out, code, base->begin());
diff --git a/Build/source/utils/asymptote/program.h b/Build/source/utils/asymptote/program.h
index 7d0192b3893..d16c12d4ad7 100644
--- a/Build/source/utils/asymptote/program.h
+++ b/Build/source/utils/asymptote/program.h
@@ -1,7 +1,7 @@
/*****
* program.h
* Tom Prince
- *
+ *
* The list of instructions used by the virtual machine.
*****/
diff --git a/Build/source/utils/asymptote/psfile.cc b/Build/source/utils/asymptote/psfile.cc
index 8adce3855db..73fe53eb743 100644
--- a/Build/source/utils/asymptote/psfile.cc
+++ b/Build/source/utils/asymptote/psfile.cc
@@ -40,10 +40,10 @@ void checkColorSpace(ColorSpace colorspace)
break;
}
}
-
+
psfile::psfile(const string& filename, bool pdfformat)
: filename(filename), pdfformat(pdfformat), pdf(false),
- transparency(false), buffer(NULL), out(NULL)
+ buffer(NULL), out(NULL)
{
if(filename.empty()) out=&cout;
else out=new ofstream(filename.c_str());
@@ -54,9 +54,9 @@ psfile::psfile(const string& filename, bool pdfformat)
static const char *inconsistent="inconsistent colorspaces";
static const char *rectangular="matrix is not rectangular";
-
-void psfile::writefromRGB(unsigned char r, unsigned char g, unsigned char b,
- ColorSpace colorspace, size_t ncomponents)
+
+void psfile::writefromRGB(unsigned char r, unsigned char g, unsigned char b,
+ ColorSpace colorspace, size_t ncomponents)
{
static const double factor=1.0/255.0;
pen p(r*factor,g*factor,b*factor);
@@ -106,10 +106,10 @@ void psfile::dealias(unsigned char *a, size_t width, size_t height, size_t n,
}
void psfile::writeCompressed(const unsigned char *a, size_t size)
-{
+{
uLongf compressedSize=compressBound(size);
Bytef *compressed=new Bytef[compressedSize];
-
+
if(compress(compressed,&compressedSize,a,size) != Z_OK)
reportError("image compression failed");
@@ -117,15 +117,15 @@ void psfile::writeCompressed(const unsigned char *a, size_t size)
for(size_t i=0; i < compressedSize; ++i)
e.put(compressed[i]);
}
-
+
void psfile::close()
{
if(out) {
out->flush();
if(!filename.empty()) {
-#ifdef __MSDOS__
+#ifdef __MSDOS__
chmod(filename.c_str(),~settings::mask & 0777);
-#endif
+#endif
if(!out->good())
// Don't call reportError since this may be called on handled_error.
reportFatal("Cannot write to "+filename);
@@ -139,7 +139,7 @@ psfile::~psfile()
{
close();
}
-
+
void psfile::header(bool eps)
{
Int level=settings::getSetting<Int>("level");
@@ -148,7 +148,7 @@ void psfile::header(bool eps)
*out << " EPSF-" << level << ".0";
*out << newl;
}
-
+
void psfile::prologue(const bbox& box)
{
header(true);
@@ -167,9 +167,9 @@ void psfile::prologue(const bbox& box)
*out << "%%Pages: 1" << newl;
*out << "%%Page: 1 1" << newl;
-
+
if(!pdfformat)
- *out
+ *out
<< "/Setlinewidth {0 exch dtransform dup abs 1 lt {pop 0}{round} ifelse"
<< newl
<< "idtransform setlinewidth pop} bind def" << newl;
@@ -185,15 +185,15 @@ void psfile::setcolor(const pen& p, const string& begin="",
const string& end="")
{
if(p.cmyk() && (!lastpen.cmyk() ||
- (p.cyan() != lastpen.cyan() ||
- p.magenta() != lastpen.magenta() ||
+ (p.cyan() != lastpen.cyan() ||
+ p.magenta() != lastpen.magenta() ||
p.yellow() != lastpen.yellow() ||
p.black() != lastpen.black()))) {
- *out << begin << p.cyan() << " " << p.magenta() << " " << p.yellow() << " "
+ *out << begin << p.cyan() << " " << p.magenta() << " " << p.yellow() << " "
<< p.black() << (pdf ? " k" : " setcmykcolor") << end << newl;
- } else if(p.rgb() && (!lastpen.rgb() ||
- (p.red() != lastpen.red() ||
- p.green() != lastpen.green() ||
+ } else if(p.rgb() && (!lastpen.rgb() ||
+ (p.red() != lastpen.red() ||
+ p.green() != lastpen.green() ||
p.blue() != lastpen.blue()))) {
*out << begin << p.red() << " " << p.green() << " " << p.blue()
<< (pdf ? " rg" : " setrgbcolor") << end << newl;
@@ -202,71 +202,73 @@ void psfile::setcolor(const pen& p, const string& begin="",
*out << begin << p.gray() << (pdf ? " g" : " setgray") << end << newl;
}
}
-
+
void psfile::setopacity(const pen& p)
{
if(p.blend() != lastpen.blend()) {
*out << "/" << p.blend() << " .setblendmode" << newl;
- transparency=true;
}
-
- if(p.opacity() != lastpen.opacity()) {
- *out << p.opacity() << " .setopacityalpha" << newl;
- transparency=true;
+
+ string outputformat=settings::getSetting<string>("outformat");
+ if(p.opacity() != lastpen.opacity() &&
+ (pdf || outputformat == "pdf" || outputformat == "html" ||
+ outputformat == "svg")) {
+ *out << p.opacity() << " .setfillconstantalpha" << newl
+ << p.opacity() << " .setstrokeconstantalpha" << newl;
}
-
+
lastpen.settransparency(p);
}
-
+
void psfile::setpen(pen p)
{
p.convert();
-
+
setopacity(p);
-
- if(!p.fillpattern().empty() && p.fillpattern() != lastpen.fillpattern())
+
+ if(!p.fillpattern().empty() && p.fillpattern() != lastpen.fillpattern())
*out << p.fillpattern() << " setpattern" << newl;
else setcolor(p);
-
+
// Defer dynamic linewidth until stroke time in case currentmatrix changes.
if(p.width() != lastpen.width())
- *out << p.width() << (pdfformat ? " setlinewidth" : " Setlinewidth")
+ *out << p.width() << (pdfformat ? " setlinewidth" : " Setlinewidth")
<< newl;
-
+
if(p.cap() != lastpen.cap())
*out << p.cap() << " setlinecap" << newl;
-
+
if(p.join() != lastpen.join())
*out << p.join() << " setlinejoin" << newl;
-
+
if(p.miter() != lastpen.miter())
*out << p.miter() << " setmiterlimit" << newl;
const LineType *linetype=p.linetype();
const LineType *lastlinetype=lastpen.linetype();
-
- if(!(linetype->pattern == lastlinetype->pattern) ||
+
+ if(!(linetype->pattern == lastlinetype->pattern) ||
linetype->offset != lastlinetype->offset) {
out->setf(std::ios::fixed);
*out << linetype->pattern << " " << linetype->offset << " setdash" << newl;
out->unsetf(std::ios::fixed);
}
-
+
lastpen=p;
}
void psfile::write(const pen& p)
{
if(p.cmyk())
- *out << p.cyan() << " " << p.magenta() << " " << p.yellow() << " "
+ *out << p.cyan() << " " << p.magenta() << " " << p.yellow() << " "
<< p.black();
else if(p.rgb())
*out << p.red() << " " << p.green() << " " << p.blue();
else if(p.grayscale())
*out << p.gray();
}
-
+
void psfile::write(path p, bool newPath)
{
Int n = p.size();
@@ -278,7 +280,7 @@ void psfile::write(path p, bool newPath)
// Draw points
moveto(z0);
-
+
for(Int i = 1; i < n; i++) {
if(p.straight(i-1)) lineto(p.point(i));
else curveto(p.postcontrol(i-1),p.precontrol(i),p.point(i));
@@ -298,16 +300,16 @@ void psfile::latticeshade(const vm::array& a, const transform& t)
checkLevel();
size_t n=a.size();
if(n == 0) return;
-
+
array *a0=read<array *>(a,0);
size_t m=a0->size();
setfirstopacity(*a0);
-
+
ColorSpace colorspace=maxcolorspace2(a);
checkColorSpace(colorspace);
-
+
size_t ncomponents=ColorComponents[colorspace];
-
+
*out << "<< /ShadingType 1" << newl
<< "/Matrix ";
write(t);
@@ -342,7 +344,7 @@ void psfile::latticeshade(const vm::array& a, const transform& t)
*out << p->hex() << newl;
}
}
-
+
*out << ">" << newl
<< ">>" << newl
<< ">>" << newl
@@ -360,7 +362,7 @@ void psfile::gradientshade(bool axial, ColorSpace colorspace,
setopacity(pena);
checkColorSpace(colorspace);
-
+
*out << "<< /ShadingType " << (axial ? "2" : "3") << newl
<< "/ColorSpace /Device" << ColorDeviceSuffix[colorspace] << newl
<< "/Coords [";
@@ -384,7 +386,7 @@ void psfile::gradientshade(bool axial, ColorSpace colorspace,
<< ">>" << newl
<< "shfill" << newl;
}
-
+
void psfile::gouraudshade(const pen& pentype,
const array& pens, const array& vertices,
const array& edges)
@@ -394,7 +396,7 @@ void psfile::gouraudshade(const pen& pentype,
size_t size=pens.size();
if(size == 0) return;
-
+
setfirstopacity(pens);
ColorSpace colorspace=maxcolorspace(pens);
@@ -416,7 +418,7 @@ void psfile::gouraudshade(const pen& pentype,
<< ">>" << newl
<< "shfill" << newl;
}
-
+
void psfile::vertexpen(array *pi, int j, ColorSpace colorspace)
{
pen *p=read<pen *>(pi,j);
@@ -433,27 +435,27 @@ void psfile::tensorshade(const pen& pentype, const array& pens,
{
checkLevel();
endclip(pentype);
-
+
size_t size=pens.size();
if(size == 0) return;
size_t nz=z.size();
-
+
array *p0=read<array *>(pens,0);
if(checkArray(p0) != 4)
reportError("4 pens required");
setfirstopacity(*p0);
-
+
ColorSpace colorspace=maxcolorspace2(pens);
checkColorSpace(colorspace);
*out << "<< /ShadingType 7" << newl
<< "/ColorSpace /Device" << ColorDeviceSuffix[colorspace] << newl
<< "/DataSource [" << newl;
-
+
for(size_t i=0; i < size; i++) {
// Only edge flag 0 (new patch) is implemented since the 32% data
// compression (for RGB) afforded by other edge flags really isn't worth
- // the trouble or confusion for the user.
+ // the trouble or confusion for the user.
write(0);
path g=read<path>(boundaries,i);
if(!(g.cyclic() && g.size() == 4))
@@ -480,7 +482,7 @@ void psfile::tensorshade(const pen& pentype, const array& pens,
write(read<pair>(zi,2));
write(read<pair>(zi,1));
}
-
+
array *pi=read<array *>(pens,i);
if(checkArray(pi) != 4)
reportError("specify 4 pens for each path");
@@ -490,38 +492,38 @@ void psfile::tensorshade(const pen& pentype, const array& pens,
vertexpen(pi,1,colorspace);
*out << newl;
}
-
+
*out << "]" << newl
<< ">>" << newl
<< "shfill" << newl;
}
-
-void psfile::write(pen *p, size_t ncomponents)
+
+void psfile::write(pen *p, size_t ncomponents)
{
switch(ncomponents) {
case 0:
break;
- case 1:
- writeByte(byte(p->gray()));
+ case 1:
+ writeByte(byte(p->gray()));
break;
case 3:
- writeByte(byte(p->red()));
- writeByte(byte(p->green()));
- writeByte(byte(p->blue()));
+ writeByte(byte(p->red()));
+ writeByte(byte(p->green()));
+ writeByte(byte(p->blue()));
break;
case 4:
- writeByte(byte(p->cyan()));
- writeByte(byte(p->magenta()));
- writeByte(byte(p->yellow()));
- writeByte(byte(p->black()));
+ writeByte(byte(p->cyan()));
+ writeByte(byte(p->magenta()));
+ writeByte(byte(p->yellow()));
+ writeByte(byte(p->black()));
default:
break;
}
}
-string filter()
+string filter()
{
- return settings::getSetting<Int>("level") >= 3 ?
+ return settings::getSetting<Int>("level") >= 3 ?
"1 (~>) /SubFileDecode filter /ASCII85Decode filter\n/FlateDecode" :
"1 (~>) /SubFileDecode filter /ASCII85Decode";
}
@@ -529,7 +531,7 @@ string filter()
void psfile::imageheader(size_t width, size_t height, ColorSpace colorspace)
{
size_t ncomponents=ColorComponents[colorspace];
- *out << "/Device" << ColorDeviceSuffix[colorspace] << " setcolorspace"
+ *out << "/Device" << ColorDeviceSuffix[colorspace] << " setcolorspace"
<< newl
<< "<<" << newl
<< "/ImageType 1" << newl
@@ -537,10 +539,10 @@ void psfile::imageheader(size_t width, size_t height, ColorSpace colorspace)
<< "/Height " << height << newl
<< "/BitsPerComponent 8" << newl
<< "/Decode [";
-
+
for(size_t i=0; i < ncomponents; ++i)
*out << "0 1 ";
-
+
*out << "]" << newl
<< "/ImageMatrix [" << width << " 0 0 " << height << " 0 0]" << newl
<< "/DataSource currentfile " << filter() << " filter" << newl
@@ -553,36 +555,36 @@ void psfile::image(const array& a, const array& P, bool antialias)
size_t asize=a.size();
size_t Psize=P.size();
if(asize == 0 || Psize == 0) return;
-
+
array *a0=read<array *>(a,0);
size_t a0size=a0->size();
if(a0size == 0) return;
-
+
setfirstopacity(P);
-
+
ColorSpace colorspace=maxcolorspace(P);
checkColorSpace(colorspace);
-
+
size_t ncomponents=ColorComponents[colorspace];
-
+
imageheader(a0size,asize,colorspace);
-
+
double min=read<double>(a0,0);
double max=min;
for(size_t i=0; i < asize; i++) {
array *ai=read<array *>(a,i);
size_t size=ai->size();
if(size != a0size)
- reportError(rectangular);
+ reportError(rectangular);
for(size_t j=0; j < size; j++) {
double val=read<double>(ai,j);
if(val > max) max=val;
else if(val < min) min=val;
}
}
-
+
double step=(max == min) ? 0.0 : (Psize-1)/(max-min);
-
+
beginImage(ncomponents*a0size*asize);
for(size_t i=0; i < asize; i++) {
array *ai=read<array *>(a,i);
@@ -603,26 +605,26 @@ void psfile::image(const array& a, bool antialias)
{
size_t asize=a.size();
if(asize == 0) return;
-
+
array *a0=read<array *>(a,0);
size_t a0size=a0->size();
if(a0size == 0) return;
-
+
setfirstopacity(*a0);
-
+
ColorSpace colorspace=maxcolorspace2(a);
checkColorSpace(colorspace);
-
+
size_t ncomponents=ColorComponents[colorspace];
-
+
imageheader(a0size,asize,colorspace);
-
+
beginImage(ncomponents*a0size*asize);
for(size_t i=0; i < asize; i++) {
array *ai=read<array *>(a,i);
size_t size=ai->size();
if(size != a0size)
- reportError(rectangular);
+ reportError(rectangular);
for(size_t j=0; j < size; j++) {
pen *p=read<pen *>(ai,j);
p->convert();
@@ -633,26 +635,26 @@ void psfile::image(const array& a, bool antialias)
}
endImage(antialias,a0size,asize,ncomponents);
}
-
+
void psfile::image(stack *Stack, callable *f, Int width, Int height,
bool antialias)
{
if(width <= 0 || height <= 0) return;
-
+
Stack->push(0);
Stack->push(0);
f->call(Stack);
pen p=pop<pen>(Stack);
setopacity(p);
-
+
ColorSpace colorspace=p.colorspace();
checkColorSpace(colorspace);
-
+
size_t ncomponents=ColorComponents[colorspace];
-
+
imageheader(width,height,colorspace);
-
+
beginImage(ncomponents*width*height);
for(Int j=0; j < height; j++) {
for(Int i=0; i < width; i++) {
@@ -668,7 +670,7 @@ void psfile::image(stack *Stack, callable *f, Int width, Int height,
}
endImage(antialias,width,height,ncomponents);
}
-
+
void psfile::outImage(bool antialias, size_t width, size_t height,
size_t ncomponents)
{
@@ -681,7 +683,7 @@ void psfile::outImage(bool antialias, size_t width, size_t height,
e.put(buffer[i]);
}
}
-
+
void psfile::rawimage(unsigned char *a, size_t width, size_t height,
bool antialias)
{
@@ -689,11 +691,11 @@ void psfile::rawimage(unsigned char *a, size_t width, size_t height,
p.convert();
ColorSpace colorspace=p.colorspace();
checkColorSpace(colorspace);
-
+
size_t ncomponents=ColorComponents[colorspace];
-
+
imageheader(width,height,colorspace);
-
+
count=ncomponents*width*height;
if(colorspace == RGB) {
buffer=a;
diff --git a/Build/source/utils/asymptote/psfile.h b/Build/source/utils/asymptote/psfile.h
index 8a76e4ae835..2c6ac2dd5a1 100644
--- a/Build/source/utils/asymptote/psfile.h
+++ b/Build/source/utils/asymptote/psfile.h
@@ -22,9 +22,9 @@
namespace camp {
-inline void BoundingBox(std::ostream& s, const bbox& box)
+inline void BoundingBox(std::ostream& s, const bbox& box)
{
- s << "%%BoundingBox: " << std::setprecision(0) << std::fixed
+ s << "%%BoundingBox: " << std::setprecision(0) << std::fixed
<< box.LowRes() << newl;
s.unsetf(std::ios::fixed);
s << "%%HiResBoundingBox: " << std::setprecision(9) << box << newl;
@@ -39,7 +39,7 @@ class encode85 {
static const int width=72;
public:
encode85(ostream *out) : out(out), tuple(0), pos(0), count(0) {}
-
+
~encode85() {
if(count > 0)
encode(tuple, count);
@@ -47,7 +47,7 @@ public:
*out << '\n';
*out << "~>\n";
}
-private:
+private:
void encode(unsigned int tuple, int count) {
unsigned char buf[5], *s=buf;
int i=5;
@@ -65,7 +65,7 @@ private:
} while(i-- > 0);
}
-public:
+public:
void put(unsigned char c) {
switch (count++) {
case 0:
@@ -95,65 +95,64 @@ public:
};
class psfile {
-protected:
+protected:
mem::stack<pen> pens;
-
+
public:
-
+
string filename;
bool pdfformat; // Is final output format PDF?
bool pdf; // Output direct PDF?
- bool transparency; // Is transparency used?
unsigned char *buffer;
size_t count;
void write(pen *p, size_t ncomponents);
- void writefromRGB(unsigned char r, unsigned char g, unsigned char b,
+ void writefromRGB(unsigned char r, unsigned char g, unsigned char b,
ColorSpace colorspace, size_t ncomponents);
-
+
void writeCompressed(const unsigned char *a, size_t size);
void dealias(unsigned char *a, size_t width, size_t height, size_t n,
bool convertrgb=false, ColorSpace colorspace=DEFCOLOR);
-
+
void beginImage(size_t n) {
buffer=new unsigned char[n];
count=0;
}
-
+
void outImage(bool antialias, size_t width, size_t height,
size_t ncomponents);
-
+
void endImage(bool antialias, size_t width, size_t height,
size_t ncomponents) {
outImage(antialias,width,height,ncomponents);
delete[] buffer;
}
-
+
void writeByte(unsigned char n) {
buffer[count++]=n;
}
-
+
protected:
pen lastpen;
std::ostream *out;
-
-public:
+
+public:
psfile(const string& filename, bool pdfformat);
-
+
psfile() {pdf=settings::pdf(settings::getSetting<string>("tex"));}
virtual ~psfile();
-
+
void BoundingBox(const bbox& box) {
camp::BoundingBox(*out,box);
}
-
+
void prologue(const bbox& box);
void epilogue();
void header(bool eps);
void close();
-
+
void write(double x) {
*out << " " << x;
}
@@ -161,11 +160,7 @@ public:
void writenewl() {
*out << newl;
}
-
-// bool Transparency() {
-// return transparency;
-// }
-
+
void write(pair z) {
*out << " " << z.getx() << " " << z.gety();
}
@@ -182,24 +177,24 @@ public:
lastpen=pen(initialpen);
lastpen.convert();
}
-
+
void setcolor(const pen& p, const string& begin, const string& end);
void setopacity(const pen& p);
virtual void setpen(pen p);
-
+
void write(const pen& p);
-
+
void write(path p, bool newPath=true);
-
+
virtual void writeclip(path p, bool newPath=true) {
write(p,newPath);
}
-
+
virtual void dot(path p, pen, bool newPath=true) {
write(p,newPath);
}
-
+
virtual void newpath() {
if(!pdf) *out << "newpath";
}
@@ -231,12 +226,12 @@ public:
if(pdf) *out << "S" << newl;
else *out << "stroke" << newl;
}
-
+
virtual void strokepath() {
if(pdf) reportError("PDF does not support strokepath");
else *out << "strokepath" << newl;
}
-
+
virtual void fill(const pen &p) {
if(p.evenodd()) {
if(pdf) *out << "f*" << newl;
@@ -246,11 +241,11 @@ public:
else *out << "fill" << newl;
}
}
-
+
virtual void beginclip() {
newpath();
}
-
+
virtual void endclip(const pen &p) {
if(p.evenodd()) {
if(pdf) *out << "W* n" << newl;
@@ -260,43 +255,40 @@ public:
else *out << "clip" << newl;
}
}
-
+
virtual void endpsclip(const pen &p) {endclip(p);}
-
+
void checkLevel() {
int n=settings::getSetting<Int>("level");
if(n < 3)
reportError("PostScript shading requires -level 3");
}
-
+
virtual void beginlatticeshade(const vm::array& a, const bbox& b) {}
virtual void latticeshade(const vm::array& a, const transform& t);
-
+
virtual void begingradientshade(bool axial, ColorSpace colorspace,
const pen& pena, const pair& a, double ra,
const pen& penb, const pair& b, double rb) {}
-
+
virtual void gradientshade(bool axial, ColorSpace colorspace,
const pen& pena, const pair& a, double ra,
bool extenda, const pen& penb, const pair& b,
double rb, bool extendb);
-
+
virtual void begingouraudshade(const vm::array& pens,
const vm::array& vertices,
const vm::array& edges) {}
virtual void gouraudshade(const pen& pentype, const vm::array& pens,
const vm::array& vertices, const vm::array& edges);
-
- virtual void begintensorshade(const vm::array& pens,
- const vm::array& boundaries,
- const vm::array& z) {}
+
virtual void tensorshade(const pen& pentype, const vm::array& pens,
const vm::array& boundaries, const vm::array& z);
-
+
void vertexpen(vm::array *pi, int j, ColorSpace colorspace);
-
+
void imageheader(size_t width, size_t height, ColorSpace colorspace);
-
+
void image(const vm::array& a, const vm::array& p, bool antialias);
void image(const vm::array& a, bool antialias);
void image(vm::stack *Stack, vm::callable *f, Int width, Int height,
@@ -310,7 +302,7 @@ public:
if(!tex) *out << newl;
pens.push(lastpen);
}
-
+
virtual void grestore(bool tex=false) {
if(pens.size() < 1)
reportError("grestore without matching gsave");
@@ -336,11 +328,11 @@ public:
if(pdf) *out << " cm" << newl;
else *out << " concat" << newl;
}
-
+
void verbatimline(const string& s) {
*out << s << newl;
}
-
+
void verbatim(const string& s) {
*out << s;
}
@@ -352,7 +344,7 @@ public:
setopacity(*p);
}
}
-
+
ColorSpace maxcolorspace(const vm::array& pens) {
ColorSpace colorspace=DEFCOLOR;
size_t size=pens.size();
@@ -363,7 +355,7 @@ public:
}
return colorspace;
}
-
+
ColorSpace maxcolorspace2(const vm::array& penarray) {
ColorSpace colorspace=DEFCOLOR;
size_t size=penarray.size();
diff --git a/Build/source/utils/asymptote/record.cc b/Build/source/utils/asymptote/record.cc
index e07d4b2bcab..380490c1001 100644
--- a/Build/source/utils/asymptote/record.cc
+++ b/Build/source/utils/asymptote/record.cc
@@ -34,7 +34,7 @@ record *record::newRecord(symbol id, bool statically)
{
frame *underlevel = getLevel(statically);
assert(underlevel);
-
+
frame *level = new frame(id, underlevel, 0);
record *r = new record(id, level);
@@ -47,7 +47,7 @@ trans::access *record::initializer() {
return &a;
}
-dummyRecord::dummyRecord(symbol name)
+dummyRecord::dummyRecord(symbol name)
: record(name, new frame(name, 0,0))
{
// Encode the instructions to put an placeholder instance of the record
@@ -68,7 +68,7 @@ dummyRecord::dummyRecord(string s)
void dummyRecord::add(string name, ty *t, trans::access *a,
trans::permission perm) {
e.addVar(symbol::trans(name),
- new trans::varEntry(t, a, perm, this, this, position()));
+ new trans::varEntry(t, a, perm, this, this, position()));
}
void dummyRecord::add(string name, function *t, vm::bltin f,
diff --git a/Build/source/utils/asymptote/record.h b/Build/source/utils/asymptote/record.h
index 2b260f4b83d..323a3d5878b 100644
--- a/Build/source/utils/asymptote/record.h
+++ b/Build/source/utils/asymptote/record.h
@@ -27,11 +27,11 @@ namespace types {
class record : public ty {
// The base name of this type.
symbol name;
-
+
// The frame. Like a frame for a function, it allocates the accesses
// for fields and specifies the size of the record.
frame *level;
-
+
// The runtime representation of the record used by the virtual machine.
vm::lambda *init;
@@ -125,4 +125,4 @@ public:
} //namespace types
-#endif
+#endif
diff --git a/Build/source/utils/asymptote/refaccess.cc b/Build/source/utils/asymptote/refaccess.cc
index b1addf41e1c..1e875c074d0 100644
--- a/Build/source/utils/asymptote/refaccess.cc
+++ b/Build/source/utils/asymptote/refaccess.cc
@@ -8,7 +8,7 @@
#include "refaccess.h"
namespace trans {
-
+
using vm::item;
using vm::stack;
using vm::pop;
diff --git a/Build/source/utils/asymptote/revision.cc b/Build/source/utils/asymptote/revision.cc
index 07385bb81ad..8ba89c007a2 100644
--- a/Build/source/utils/asymptote/revision.cc
+++ b/Build/source/utils/asymptote/revision.cc
@@ -1,2 +1,2 @@
-const char *REVISION="2.65";
+const char *REVISION="2.68";
const char *AsyGLVersion="1.00";
diff --git a/Build/source/utils/asymptote/rounding.h b/Build/source/utils/asymptote/rounding.h
index a0efe31dc4d..4c02d0042a4 100644
--- a/Build/source/utils/asymptote/rounding.h
+++ b/Build/source/utils/asymptote/rounding.h
@@ -8,7 +8,7 @@
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
@@ -26,14 +26,14 @@
# ifdef _FPU_EXTENDED
# if !defined(__alpha__) || !defined(__GLIBC__)
# if defined(__arm__)
- static fpu_control_t fpu_round_double = _FPU_DEFAULT;
+static fpu_control_t fpu_round_double = _FPU_DEFAULT;
# else
- static fpu_control_t fpu_round_double =
- (_FPU_DEFAULT & ~ _FPU_EXTENDED)|_FPU_DOUBLE;
+static fpu_control_t fpu_round_double =
+ (_FPU_DEFAULT & ~ _FPU_EXTENDED)|_FPU_DOUBLE;
# endif
- static fpu_control_t fpu_init;
-# define FPU_ROUND_DOUBLE { _FPU_GETCW(fpu_init);\
- _FPU_SETCW(fpu_round_double); }
+static fpu_control_t fpu_init;
+# define FPU_ROUND_DOUBLE { _FPU_GETCW(fpu_init); \
+ _FPU_SETCW(fpu_round_double); }
# define FPU_RESTORE {_FPU_SETCW(fpu_init);}
# else /* __alpha__ && __GLIBC__ */
# define FPU_ROUND_DOUBLE
@@ -52,14 +52,14 @@
# ifdef WIN32
# ifdef _MSC_VER
# include <float.h>
- static unsigned int fpu_init;
-# define FPU_ROUND_DOUBLE (fpu_init = _controlfp (0, 0),\
- _controlfp (_PC_53, MCW_PC))
+static unsigned int fpu_init;
+# define FPU_ROUND_DOUBLE (fpu_init = _controlfp (0, 0), \
+ _controlfp (_PC_53, MCW_PC))
# define FPU_RESTORE (_controlfp (fpu_init, 0xfffff))
# elif __MINGW32__
# include <float.h>
- static unsigned int fpu_init;
-# define FPU_ROUND_DOUBLE (fpu_init = _controlfp (0, 0),\
+static unsigned int fpu_init;
+# define FPU_ROUND_DOUBLE (fpu_init = _controlfp (0, 0), \
_controlfp (_PC_53, _MCW_PC))
# define FPU_RESTORE (_controlfp (fpu_init, 0xfffff))
# else /* not _MSC_VER or __MINGW32__ */
@@ -67,13 +67,13 @@
# endif /* not _MSC_VER or __MINGW32__ */
# else /* not WIN32 */
# ifdef __CYGWIN__
- typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__HI__)));
- static fpu_control_t fpu_round_double = 0x027f;
- static fpu_control_t fpu_init;
+typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__HI__)));
+static fpu_control_t fpu_round_double = 0x027f;
+static fpu_control_t fpu_init;
# define _FPU_GETCW(cw) __asm__ ("fnstcw %0" : "=m" (*&cw))
# define _FPU_SETCW(cw) __asm__ ("fldcw %0" : : "m" (*&cw))
-# define FPU_ROUND_DOUBLE { _FPU_GETCW(fpu_init);\
- _FPU_SETCW(fpu_round_double); }
+# define FPU_ROUND_DOUBLE { _FPU_GETCW(fpu_init); \
+ _FPU_SETCW(fpu_round_double); }
# define FPU_RESTORE { _FPU_SETCW(fpu_init);}
# else /* not __CYGWIN__ */
# ifdef CPP_HAS_WARNING
diff --git a/Build/source/utils/asymptote/runarray.cc b/Build/source/utils/asymptote/runarray.cc
index 5478028e4e7..05c7f0a1a7c 100644
--- a/Build/source/utils/asymptote/runarray.cc
+++ b/Build/source/utils/asymptote/runarray.cc
@@ -71,7 +71,7 @@ function *realRealFunction();
#ifdef HAVE_LIBFFTW3
#include "fftw++.h"
-static const char *rectangular="matrix must be rectangular";
+ static const char *rectangular="matrix must be rectangular";
#else
static const char *installFFTW=
"Please install fftw3, run ./configure, and recompile";
@@ -113,7 +113,7 @@ void outOfBounds(const char *op, size_t len, Int n)
error(buf);
}
-inline item& arrayRead(array *a, Int n)
+inline item& arrayRead(array *a, Int n)
{
size_t len=checkArray(a);
bool cyclic=a->cyclic();
@@ -126,7 +126,7 @@ inline item& arrayRead(array *a, Int n)
static array* deepArray(Int depth, Int *dims)
{
assert(depth > 0);
-
+
if (depth == 1) {
return new array(dims[0]);
} else {
@@ -204,7 +204,7 @@ array *copyArray(array *a)
{
size_t size=checkArray(a);
array *c=new array(size);
- for(size_t i=0; i < size; i++)
+ for(size_t i=0; i < size; i++)
(*c)[i]=(*a)[i];
return c;
}
@@ -218,7 +218,7 @@ array *copyArray2(array *a)
size_t aisize=checkArray(ai);
array *ci=new array(aisize);
(*c)[i]=ci;
- for(size_t j=0; j < aisize; j++)
+ for(size_t j=0; j < aisize; j++)
(*ci)[j]=(*ai)[j];
}
return c;
@@ -229,12 +229,12 @@ double *copyTripleArray2Components(array *a, size_t &N, GCPlacement placement)
size_t n=checkArray(a);
N=0;
for(size_t i=0; i < n; i++)
- N += checkArray(read<array*>(a,i));
-
+ N += checkArray(read<array*>(a,i));
+
double *A=(placement == NoGC) ? new double [3*N] :
new(placement) double[3*N];
double *p=A;
-
+
for(size_t i=0; i < n; i++) {
array *ai=read<array*>(a,i);
size_t m=checkArray(ai);
@@ -254,12 +254,12 @@ triple *copyTripleArray2C(array *a, size_t &N, GCPlacement placement)
size_t n=checkArray(a);
N=0;
for(size_t i=0; i < n; i++)
- N += checkArray(read<array*>(a,i));
-
+ N += checkArray(read<array*>(a,i));
+
triple *A=(placement == NoGC) ? new triple [N] :
new(placement) triple[N];
triple *p=A;
-
+
for(size_t i=0; i < n; i++) {
array *ai=read<array*>(a,i);
size_t m=checkArray(ai);
@@ -277,20 +277,20 @@ triple operator *(const array& t, const triple& v)
array *t1=read<array*>(t,1);
array *t2=read<array*>(t,2);
array *t3=read<array*>(t,3);
-
- if(checkArray(t0) != 4 || checkArray(t1) != 4 ||
+
+ if(checkArray(t0) != 4 || checkArray(t1) != 4 ||
checkArray(t2) != 4 || checkArray(t3) != 4)
error(incommensurate);
double x=v.getx();
double y=v.gety();
double z=v.getz();
-
+
double f=read<real>(t3,0)*x+read<real>(t3,1)*y+read<real>(t3,2)*z+
read<real>(t3,3);
if(f == 0.0) run::dividebyzero();
f=1.0/f;
-
+
return triple((read<real>(t0,0)*x+read<real>(t0,1)*y+read<real>(t0,2)*z+
read<real>(t0,3))*f,
(read<real>(t1,0)*x+read<real>(t1,1)*y+read<real>(t1,2)*z+
@@ -303,14 +303,14 @@ template<class T>
array *mult(array *a, array *b)
{
size_t n=checkArray(a);
-
+
size_t nb=checkArray(b);
size_t na0=n == 0 ? 0 : checkArray(read<array*>(a,0));
- if(na0 != nb)
+ if(na0 != nb)
error(incommensurate);
-
+
size_t nb0=nb == 0 ? 0 : checkArray(read<array*>(b,0));
-
+
array *c=new array(n);
T *A,*B;
@@ -329,10 +329,10 @@ array *mult(array *a, array *b)
(*ci)[j]=sum;
}
}
-
+
delete[] B;
delete[] A;
-
+
return c;
}
@@ -342,7 +342,7 @@ array *AtA(array *a)
{
size_t n=checkArray(a);
size_t m=n == 0 ? 0 : checkArray(read<array*>(a,0));
-
+
array *c=new array(m);
T *A;
@@ -360,12 +360,12 @@ array *AtA(array *a)
(*ci)[j]=sum;
}
}
-
+
delete[] A;
return c;
}
-double norm(double *a, size_t n)
+double norm(double *a, size_t n)
{
if(n == 0) return 0.0;
double M=fabs(a[0]);
@@ -374,7 +374,7 @@ double norm(double *a, size_t n)
return M;
}
-double norm(triple *a, size_t n)
+double norm(triple *a, size_t n)
{
if(n == 0) return 0.0;
double M=a[0].abs2();
@@ -393,7 +393,7 @@ void transpose(double *a, size_t n)
double temp=a[ij];
a[ij]=a[ji];
a[ji]=temp;
- }
+ }
}
}
@@ -420,16 +420,16 @@ void inverse(double *M, size_t n)
real a=M[0], b=M[1], c=M[2];
real d=M[3], e=M[4], f=M[5];
real g=M[6], h=M[7], i=M[8];
-
+
real A=e*i-f*h;
real B=f*g-d*i;
real C=d*h-e*g;
-
+
real det=a*A+b*B+c*C;
if(det == 0.0)
error(singular);
det=1.0/det;
-
+
M[0]=A*det; M[1]=(c*h-b*i)*det; M[2]=(b*f-c*e)*det;
M[3]=B*det; M[4]=(a*i-c*g)*det; M[5]=(c*d-a*f)*det;
M[6]=C*det; M[7]=(b*g-a*h)*det; M[8]=(a*e-b*d)*det;
@@ -437,10 +437,10 @@ void inverse(double *M, size_t n)
}
inverseAllocate(n);
-
+
for(size_t i=0; i < n; i++)
pivot[i]=0;
-
+
size_t col=0, row=0;
// This is the main loop over the columns to be reduced.
for(size_t i=0; i < n; i++) {
@@ -465,7 +465,7 @@ void inverse(double *M, size_t n)
}
}
++(pivot[col]);
-
+
// Interchange rows, if needed, to put the pivot element on the diagonal.
double *acol=M+n*col;
if(row != col) {
@@ -476,8 +476,8 @@ void inverse(double *M, size_t n)
acol[k]=temp;
}
}
-
- Row[i]=row;
+
+ Row[i]=row;
Col[i]=col;
// Divide the pivot row by the pivot element.
@@ -488,12 +488,12 @@ void inverse(double *M, size_t n)
}
real pivinv=1.0/denom;
acol[col]=1.0;
- for(size_t k=0; k < n; k++)
+ for(size_t k=0; k < n; k++)
acol[k]=acol[k]*pivinv;
-
+
// Reduce all rows except for the pivoted one.
for(size_t k=0; k < n; k++) {
- if(k != col) {
+ if(k != col) {
double *ak=M+n*k;
real akcol=ak[col];
ak[col]=0.0;
@@ -502,7 +502,7 @@ void inverse(double *M, size_t n)
}
}
}
-
+
// Unscramble the inverse matrix in view of the column interchanges.
for(size_t k=n; k > 0;) {
k--;
@@ -593,7 +593,7 @@ Int LUdecompose(double *a, size_t n, size_t* index, bool warn=true)
swap *= -1;
vv[imax]=vv[j];
}
- if(index)
+ if(index)
index[j]=imax;
if(j != n) {
double denom=aj[j];
@@ -619,7 +619,7 @@ void dividebyzero(size_t i)
buf << "Divide by zero";
error(buf);
}
-
+
void integeroverflow(size_t i)
{
ostringstream buf;
@@ -704,7 +704,7 @@ void newAppendedArray(stack *Stack)
for (Int index = n-1; index >= 0; index--)
(*a)[index] = pop(Stack);
-
+
copy(tail->begin(), tail->end(), back_inserter(*a));
{Stack->push<array*>(a); return;}
@@ -739,18 +739,19 @@ void copyArray(stack *Stack)
Int depth=vm::pop<Int>(Stack,Int_MAX);
array * a=vm::pop<array *>(Stack);
#line 669 "runarray.in"
+ if(a == 0) vm::error(dereferenceNullArray);
if(depth < 0) error("cannot copy to a negative depth");
if(depth > typeDepth) depth=typeDepth;
{Stack->push<array*>(a->copyToDepth(depth)); return;}
}
// Read an element from an array. Checks for initialization & bounds.
-#line 676 "runarray.in"
+#line 677 "runarray.in"
void arrayRead(stack *Stack)
{
Int n=vm::pop<Int>(Stack);
array * a=vm::pop<array *>(Stack);
-#line 677 "runarray.in"
+#line 678 "runarray.in"
item& i=arrayRead(a,n);
if (i.empty()) {
ostringstream buf;
@@ -761,37 +762,37 @@ void arrayRead(stack *Stack)
}
// Slice a substring from an array.
-#line 688 "runarray.in"
+#line 689 "runarray.in"
void arraySliceRead(stack *Stack)
{
Int right=vm::pop<Int>(Stack);
Int left=vm::pop<Int>(Stack);
array * a=vm::pop<array *>(Stack);
-#line 689 "runarray.in"
+#line 690 "runarray.in"
checkArray(a);
{Stack->push(a->slice(left, right)); return;}
}
// Slice a substring from an array. This implements the cases a[i:] and a[:]
// where the endpoint is not given, and assumed to be the length of the array.
-#line 696 "runarray.in"
+#line 697 "runarray.in"
void arraySliceReadToEnd(stack *Stack)
{
Int left=vm::pop<Int>(Stack);
array * a=vm::pop<array *>(Stack);
-#line 697 "runarray.in"
+#line 698 "runarray.in"
size_t len=checkArray(a);
{Stack->push(a->slice(left, (Int)len)); return;}
}
// Read an element from an array of arrays. Check bounds and initialize
// as necessary.
-#line 704 "runarray.in"
+#line 705 "runarray.in"
void arrayArrayRead(stack *Stack)
{
Int n=vm::pop<Int>(Stack);
array * a=vm::pop<array *>(Stack);
-#line 705 "runarray.in"
+#line 706 "runarray.in"
item& i=arrayRead(a,n);
if (i.empty()) i=new array(0);
{Stack->push(i); return;}
@@ -799,13 +800,13 @@ void arrayArrayRead(stack *Stack)
// Write an element to an array. Increase size if necessary.
// TODO: Add arrayWriteAndPop
-#line 713 "runarray.in"
+#line 714 "runarray.in"
void arrayWrite(stack *Stack)
{
item value=vm::pop(Stack);
Int n=vm::pop<Int>(Stack);
array * a=vm::pop<array *>(Stack);
-#line 714 "runarray.in"
+#line 715 "runarray.in"
size_t len=checkArray(a);
bool cyclic=a->cyclic();
if(cyclic && len > 0) n=imod(n,len);
@@ -819,27 +820,27 @@ void arrayWrite(stack *Stack)
{Stack->push(value); return;}
}
-#line 728 "runarray.in"
+#line 729 "runarray.in"
void arraySliceWrite(stack *Stack)
{
array * src=vm::pop<array *>(Stack);
Int right=vm::pop<Int>(Stack);
Int left=vm::pop<Int>(Stack);
array * dest=vm::pop<array *>(Stack);
-#line 729 "runarray.in"
+#line 730 "runarray.in"
checkArray(src);
checkArray(dest);
dest->setSlice(left, right, src);
{Stack->push<array*>(src); return;}
}
-#line 736 "runarray.in"
+#line 737 "runarray.in"
void arraySliceWriteToEnd(stack *Stack)
{
array * src=vm::pop<array *>(Stack);
Int left=vm::pop<Int>(Stack);
array * dest=vm::pop<array *>(Stack);
-#line 737 "runarray.in"
+#line 738 "runarray.in"
checkArray(src);
size_t len=checkArray(dest);
dest->setSlice(left, (Int) len, src);
@@ -847,20 +848,20 @@ void arraySliceWriteToEnd(stack *Stack)
}
// Returns the length of an array.
-#line 745 "runarray.in"
+#line 746 "runarray.in"
void arrayLength(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 746 "runarray.in"
+#line 747 "runarray.in"
{Stack->push<Int>((Int) checkArray(a)); return;}
}
// Returns an array of integers representing the keys of the array.
-#line 751 "runarray.in"
+#line 752 "runarray.in"
void arrayKeys(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 752 "runarray.in"
+#line 753 "runarray.in"
size_t size=checkArray(a);
array *keys=new array();
@@ -874,33 +875,33 @@ void arrayKeys(stack *Stack)
}
// Return the cyclic flag for an array.
-#line 766 "runarray.in"
+#line 767 "runarray.in"
void arrayCyclicFlag(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 767 "runarray.in"
+#line 768 "runarray.in"
checkArray(a);
{Stack->push<bool>(a->cyclic()); return;}
}
-#line 772 "runarray.in"
+#line 773 "runarray.in"
void arraySetCyclicFlag(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
bool b=vm::pop<bool>(Stack);
-#line 773 "runarray.in"
+#line 774 "runarray.in"
checkArray(a);
a->cyclic(b);
{Stack->push<bool>(b); return;}
}
// Check to see if an array element is initialized.
-#line 780 "runarray.in"
+#line 781 "runarray.in"
void arrayInitializedHelper(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
Int n=vm::pop<Int>(Stack);
-#line 781 "runarray.in"
+#line 782 "runarray.in"
size_t len=checkArray(a);
bool cyclic=a->cyclic();
if(cyclic && len > 0) n=imod(n,len);
@@ -910,62 +911,62 @@ void arrayInitializedHelper(stack *Stack)
}
// Returns the initialize method for an array.
-#line 791 "runarray.in"
+#line 792 "runarray.in"
void arrayInitialized(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 792 "runarray.in"
+#line 793 "runarray.in"
{Stack->push<callable*>(new thunk(new bfunc(arrayInitializedHelper),a)); return;}
}
// The helper function for the cyclic method that sets the cyclic flag.
-#line 797 "runarray.in"
+#line 798 "runarray.in"
void arrayCyclicHelper(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
bool b=vm::pop<bool>(Stack);
-#line 798 "runarray.in"
+#line 799 "runarray.in"
checkArray(a);
a->cyclic(b);
}
// Set the cyclic flag for an array.
-#line 804 "runarray.in"
+#line 805 "runarray.in"
void arrayCyclic(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 805 "runarray.in"
+#line 806 "runarray.in"
{Stack->push<callable*>(new thunk(new bfunc(arrayCyclicHelper),a)); return;}
}
// The helper function for the push method that does the actual operation.
-#line 810 "runarray.in"
+#line 811 "runarray.in"
void arrayPushHelper(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
item x=vm::pop(Stack);
-#line 811 "runarray.in"
+#line 812 "runarray.in"
checkArray(a);
a->push(x);
{Stack->push(x); return;}
}
// Returns the push method for an array.
-#line 818 "runarray.in"
+#line 819 "runarray.in"
void arrayPush(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 819 "runarray.in"
+#line 820 "runarray.in"
{Stack->push<callable*>(new thunk(new bfunc(arrayPushHelper),a)); return;}
}
// The helper function for the append method that appends b to a.
-#line 824 "runarray.in"
+#line 825 "runarray.in"
void arrayAppendHelper(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
array * b=vm::pop<array *>(Stack);
-#line 825 "runarray.in"
+#line 826 "runarray.in"
checkArray(a);
size_t size=checkArray(b);
for(size_t i=0; i < size; i++)
@@ -973,85 +974,85 @@ void arrayAppendHelper(stack *Stack)
}
// Returns the append method for an array.
-#line 833 "runarray.in"
+#line 834 "runarray.in"
void arrayAppend(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 834 "runarray.in"
+#line 835 "runarray.in"
{Stack->push<callable*>(new thunk(new bfunc(arrayAppendHelper),a)); return;}
}
// The helper function for the pop method.
-#line 839 "runarray.in"
+#line 840 "runarray.in"
void arrayPopHelper(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 840 "runarray.in"
+#line 841 "runarray.in"
size_t asize=checkArray(a);
- if(asize == 0)
+ if(asize == 0)
error("cannot pop element from empty array");
{Stack->push(a->pop()); return;}
}
// Returns the pop method for an array.
-#line 848 "runarray.in"
+#line 849 "runarray.in"
void arrayPop(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 849 "runarray.in"
+#line 850 "runarray.in"
{Stack->push<callable*>(new thunk(new bfunc(arrayPopHelper),a)); return;}
}
// The helper function for the insert method.
-#line 854 "runarray.in"
+#line 855 "runarray.in"
void arrayInsertHelper(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
array * x=vm::pop<array *>(Stack);
Int i=vm::pop<Int>(Stack);
-#line 855 "runarray.in"
+#line 856 "runarray.in"
size_t asize=checkArray(a);
checkArray(x);
if(a->cyclic() && asize > 0) i=imod(i,asize);
- if(i < 0 || i > (Int) asize)
+ if(i < 0 || i > (Int) asize)
outOfBounds("inserting",asize,i);
(*a).insert((*a).begin()+i,(*x).begin(),(*x).end());
}
// Returns the insert method for an array.
-#line 865 "runarray.in"
+#line 866 "runarray.in"
void arrayInsert(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 866 "runarray.in"
+#line 867 "runarray.in"
{Stack->push<callable*>(new thunk(new bfunc(arrayInsertHelper),a)); return;}
}
// Returns the delete method for an array.
-#line 871 "runarray.in"
+#line 872 "runarray.in"
void arrayDelete(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 872 "runarray.in"
+#line 873 "runarray.in"
{Stack->push<callable*>(new thunk(new bfunc(arrayDeleteHelper),a)); return;}
}
-#line 876 "runarray.in"
+#line 877 "runarray.in"
void arrayAlias(stack *Stack)
{
array * b=vm::pop<array *>(Stack);
array * a=vm::pop<array *>(Stack);
-#line 877 "runarray.in"
+#line 878 "runarray.in"
{Stack->push<bool>(a==b); return;}
}
// Return array formed by indexing array a with elements of integer array b
-#line 882 "runarray.in"
+#line 883 "runarray.in"
void arrayIntArray(stack *Stack)
{
array * b=vm::pop<array *>(Stack);
array * a=vm::pop<array *>(Stack);
-#line 883 "runarray.in"
+#line 884 "runarray.in"
size_t asize=checkArray(a);
size_t bsize=checkArray(b);
array *r=new array(bsize);
@@ -1069,13 +1070,13 @@ void arrayIntArray(stack *Stack)
// returns the complement of the integer array a in {0,2,...,n-1},
// so that b[complement(a,b.length)] yields the complement of b[a].
-#line 901 "runarray.in"
+#line 902 "runarray.in"
// Intarray* complement(Intarray *a, Int n);
void gen_runarray32(stack *Stack)
{
Int n=vm::pop<Int>(Stack);
Intarray * a=vm::pop<Intarray *>(Stack);
-#line 902 "runarray.in"
+#line 903 "runarray.in"
size_t asize=checkArray(a);
array *r=new array(0);
bool *keep=new bool[n];
@@ -1086,18 +1087,18 @@ void gen_runarray32(stack *Stack)
}
for(Int i=0; i < n; i++)
if(keep[i]) r->push(i);
-
+
delete[] keep;
{Stack->push<Intarray*>(r); return;}
}
// Generate the sequence {f(i) : i=0,1,...n-1} given a function f and integer n
-#line 919 "runarray.in"
+#line 920 "runarray.in"
void arraySequence(stack *Stack)
{
Int n=vm::pop<Int>(Stack);
callable * f=vm::pop<callable *>(Stack);
-#line 920 "runarray.in"
+#line 921 "runarray.in"
if(n < 0) n=0;
array *a=new array(n);
for(Int i=0; i < n; ++i) {
@@ -1109,12 +1110,12 @@ void arraySequence(stack *Stack)
}
// Return the array {0,1,...n-1}
-#line 932 "runarray.in"
+#line 933 "runarray.in"
// Intarray* sequence(Int n);
void gen_runarray34(stack *Stack)
{
Int n=vm::pop<Int>(Stack);
-#line 933 "runarray.in"
+#line 934 "runarray.in"
if(n < 0) n=0;
array *a=new array(n);
for(Int i=0; i < n; ++i) {
@@ -1124,12 +1125,12 @@ void gen_runarray34(stack *Stack)
}
// Apply a function to each element of an array
-#line 943 "runarray.in"
+#line 944 "runarray.in"
void arrayFunction(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
callable * f=vm::pop<callable *>(Stack);
-#line 944 "runarray.in"
+#line 945 "runarray.in"
size_t size=checkArray(a);
array *b=new array(size);
for(size_t i=0; i < size; ++i) {
@@ -1140,13 +1141,13 @@ void arrayFunction(stack *Stack)
{Stack->push<array*>(b); return;}
}
-#line 955 "runarray.in"
+#line 956 "runarray.in"
void arraySort(stack *Stack)
{
bool stable=vm::pop<bool>(Stack,true);
callable * less=vm::pop<callable *>(Stack);
array * a=vm::pop<array *>(Stack);
-#line 956 "runarray.in"
+#line 957 "runarray.in"
array *c=copyArray(a);
compareFunc=less;
FuncStack=Stack;
@@ -1155,13 +1156,13 @@ void arraySort(stack *Stack)
{Stack->push<array*>(c); return;}
}
-#line 965 "runarray.in"
+#line 966 "runarray.in"
void arraySearch(stack *Stack)
{
callable * less=vm::pop<callable *>(Stack);
item key=vm::pop(Stack);
array * a=vm::pop<array *>(Stack);
-#line 966 "runarray.in"
+#line 967 "runarray.in"
size_t size=a->size();
compareFunc=less;
FuncStack=Stack;
@@ -1169,7 +1170,7 @@ void arraySearch(stack *Stack)
size_t u=size-1;
if(!compareFunction(key,(*a)[u])) {Stack->push<Int>(Intcast(u)); return;}
size_t l=0;
-
+
while (l < u) {
size_t i=(l+u)/2;
if(compareFunction(key,(*a)[i])) u=i;
@@ -1179,12 +1180,12 @@ void arraySearch(stack *Stack)
{Stack->push<Int>(0); return;}
}
-#line 984 "runarray.in"
+#line 985 "runarray.in"
// bool all(boolarray *a);
void gen_runarray38(stack *Stack)
{
boolarray * a=vm::pop<boolarray *>(Stack);
-#line 985 "runarray.in"
+#line 986 "runarray.in"
size_t size=checkArray(a);
bool c=true;
for(size_t i=0; i < size; i++)
@@ -1192,12 +1193,12 @@ void gen_runarray38(stack *Stack)
{Stack->push<bool>(c); return;}
}
-#line 993 "runarray.in"
+#line 994 "runarray.in"
// boolarray* !(boolarray* a);
void gen_runarray39(stack *Stack)
{
boolarray* a=vm::pop<boolarray*>(Stack);
-#line 994 "runarray.in"
+#line 995 "runarray.in"
size_t size=checkArray(a);
array *c=new array(size);
for(size_t i=0; i < size; i++)
@@ -1205,12 +1206,12 @@ void gen_runarray39(stack *Stack)
{Stack->push<boolarray*>(c); return;}
}
-#line 1002 "runarray.in"
+#line 1003 "runarray.in"
// Int sum(boolarray *a);
void gen_runarray40(stack *Stack)
{
boolarray * a=vm::pop<boolarray *>(Stack);
-#line 1003 "runarray.in"
+#line 1004 "runarray.in"
size_t size=checkArray(a);
Int sum=0;
for(size_t i=0; i < size; i++)
@@ -1218,11 +1219,11 @@ void gen_runarray40(stack *Stack)
{Stack->push<Int>(sum); return;}
}
-#line 1011 "runarray.in"
+#line 1012 "runarray.in"
void arrayConcat(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 1012 "runarray.in"
+#line 1013 "runarray.in"
// a is an array of arrays to be concatenated together.
// The signature is
// T[] concat(... T[][] a);
@@ -1249,28 +1250,30 @@ void arrayConcat(stack *Stack)
{Stack->push<array*>(result); return;}
}
-#line 1039 "runarray.in"
+#line 1040 "runarray.in"
void array2Transpose(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 1040 "runarray.in"
+#line 1041 "runarray.in"
size_t asize=checkArray(a);
array *c=new array(0);
+ size_t csize=0;
for(size_t i=0; i < asize; i++) {
size_t ip=i+1;
array *ai=read<array*>(a,i);
size_t aisize=checkArray(ai);
- size_t csize=checkArray(c);
- if(csize < aisize) {
+ if(c->size() < aisize) {
c->resize(aisize);
- for(size_t j=csize; j < aisize; j++) {
- (*c)[j]=new array(ip);
- }
+ for(size_t j=csize; j < aisize; j++)
+ (*c)[j]=new array(0);
+ csize=aisize;
}
for(size_t j=0; j < aisize; j++) {
- array *cj=read<array*>(c,j);
- if(checkArray(cj) < ip) cj->resize(ip);
- (*cj)[i]=(*ai)[j];
+ if(!(*ai)[j].empty()) {
+ array *cj=read<array*>(c,j);
+ if(checkArray(cj) < ip) cj->resize(ip);
+ (*cj)[i]=(*ai)[j];
+ }
}
}
{Stack->push<array*>(c); return;}
@@ -1279,13 +1282,13 @@ void array2Transpose(stack *Stack)
// a is a rectangular 3D array; perm is an Int array indicating the type of
// permutation (021 or 120, etc; original is 012).
// Transpose by sending respective members to the permutated locations:
-// return the array obtained by putting a[i][j][k] into position perm{ijk}.
-#line 1067 "runarray.in"
+// return the array obtained by putting a[i][j][k] into position perm{ijk}.
+#line 1070 "runarray.in"
void array3Transpose(stack *Stack)
{
array * perm=vm::pop<array *>(Stack);
array * a=vm::pop<array *>(Stack);
-#line 1068 "runarray.in"
+#line 1071 "runarray.in"
const size_t DIM=3;
if(checkArray(perm) != DIM) {
@@ -1293,10 +1296,10 @@ void array3Transpose(stack *Stack)
buf << "permutation array must have length " << DIM;
error(buf);
}
-
+
size_t* size=new size_t[DIM];
for(size_t i=0; i < DIM; ++i) size[i]=DIM;
-
+
for(size_t i=0; i < DIM; ++i) {
Int p=read<Int>(perm,i);
size_t P=(size_t) p;
@@ -1307,13 +1310,13 @@ void array3Transpose(stack *Stack)
}
size[P]=P;
}
-
+
for(size_t i=0; i < DIM; ++i)
if(size[i] == DIM) error("permutation indices must be distinct");
-
+
static const char *rectangular=
"3D transpose implemented for rectangular matrices only";
-
+
size_t isize=size[0]=checkArray(a);
array *a0=read<array*>(a,0);
size[1]=checkArray(a0);
@@ -1328,15 +1331,15 @@ void array3Transpose(stack *Stack)
if(checkArray(aij) != size[2]) error(rectangular);
}
}
-
+
size_t perm0=(size_t) read<Int>(perm,0);
size_t perm1=(size_t) read<Int>(perm,1);
size_t perm2=(size_t) read<Int>(perm,2);
-
+
size_t sizep0=size[perm0];
size_t sizep1=size[perm1];
size_t sizep2=size[perm2];
-
+
array *c=new array(sizep0);
for(size_t i=0; i < sizep0; ++i) {
array *ci=new array(sizep1);
@@ -1346,9 +1349,9 @@ void array3Transpose(stack *Stack)
(*ci)[j]=cij;
}
}
-
+
size_t* i=new size_t[DIM];
-
+
for(i[0]=0; i[0] < size[0]; ++i[0]) {
array *a0=read<array*>(a,i[0]);
for(i[1]=0; i[1] < size[1]; ++i[1]) {
@@ -1360,22 +1363,22 @@ void array3Transpose(stack *Stack)
}
}
}
-
- delete[] i;
- delete[] size;
+
+ delete[] i;
+ delete[] size;
{Stack->push<array*>(c); return;}
}
// Find the index of the nth true value in a boolean array or -1 if not found.
// If n is negative, search backwards.
-#line 1152 "runarray.in"
+#line 1155 "runarray.in"
// Int find(boolarray *a, Int n=1);
void gen_runarray44(stack *Stack)
{
Int n=vm::pop<Int>(Stack,1);
boolarray * a=vm::pop<boolarray *>(Stack);
-#line 1153 "runarray.in"
+#line 1156 "runarray.in"
size_t size=checkArray(a);
Int j=-1;
if(n > 0)
@@ -1391,13 +1394,13 @@ void gen_runarray44(stack *Stack)
{Stack->push<Int>(j); return;}
}
-// Find all indices of true values in a boolean array.
-#line 1170 "runarray.in"
+// Find all indices of true values in a boolean array.
+#line 1173 "runarray.in"
// Intarray* findall(boolarray *a);
void gen_runarray45(stack *Stack)
{
boolarray * a=vm::pop<boolarray *>(Stack);
-#line 1171 "runarray.in"
+#line 1174 "runarray.in"
size_t size=checkArray(a);
array *b=new array(0);
for(size_t i=0; i < size; i++) {
@@ -1410,13 +1413,13 @@ void gen_runarray45(stack *Stack)
// construct vector obtained by replacing those elements of b for which the
// corresponding elements of a are false by the corresponding element of c.
-#line 1184 "runarray.in"
+#line 1187 "runarray.in"
void arrayConditional(stack *Stack)
{
array * c=vm::pop<array *>(Stack);
array * b=vm::pop<array *>(Stack);
array * a=vm::pop<array *>(Stack);
-#line 1185 "runarray.in"
+#line 1188 "runarray.in"
size_t size=checkArray(a);
array *r=new array(size);
if(b && c) {
@@ -1440,22 +1443,22 @@ void arrayConditional(stack *Stack)
}
// Return an n x n identity matrix.
-#line 1209 "runarray.in"
+#line 1212 "runarray.in"
// realarray2* identity(Int n);
void gen_runarray47(stack *Stack)
{
Int n=vm::pop<Int>(Stack);
-#line 1210 "runarray.in"
+#line 1213 "runarray.in"
{Stack->push<realarray2*>(Identity(n)); return;}
}
// Return the inverse of an n x n matrix a using Gauss-Jordan elimination.
-#line 1215 "runarray.in"
+#line 1218 "runarray.in"
// realarray2* inverse(realarray2 *a);
void gen_runarray48(stack *Stack)
{
realarray2 * a=vm::pop<realarray2 *>(Stack);
-#line 1216 "runarray.in"
+#line 1219 "runarray.in"
size_t n=checkArray(a);
double *A;
copyArray2C(A,a,true,0,NoGC);
@@ -1468,33 +1471,33 @@ void gen_runarray48(stack *Stack)
// Solve the linear equation ax=b by LU decomposition, returning the
// solution x, where a is an n x n matrix and b is an array of length n.
// If no solution exists, return an empty array.
-#line 1229 "runarray.in"
+#line 1232 "runarray.in"
// realarray* solve(realarray2 *a, realarray *b, bool warn=true);
void gen_runarray49(stack *Stack)
{
bool warn=vm::pop<bool>(Stack,true);
realarray * b=vm::pop<realarray *>(Stack);
realarray2 * a=vm::pop<realarray2 *>(Stack);
-#line 1230 "runarray.in"
+#line 1233 "runarray.in"
size_t n=checkArray(a);
-
+
if(n == 0) {Stack->push<realarray*>(new array(0)); return;}
-
+
size_t m=checkArray(b);
if(m != n) error(incommensurate);
-
+
real *A;
copyArray2C(A,a);
size_t *index=new size_t[n];
-
+
if(LUdecompose(A,n,index,warn) == 0)
{Stack->push<realarray*>(new array(0)); return;}
array *x=new array(n);
-
+
real *B;
copyArrayC(B,b);
-
+
for(size_t i=0; i < n; ++i) {
size_t ip=index[i];
real sum=B[ip];
@@ -1504,7 +1507,7 @@ void gen_runarray49(stack *Stack)
sum -= Ai[j]*B[j];
B[i]=sum;
}
-
+
for(size_t i=n; i > 0;) {
--i;
real sum=B[i];
@@ -1513,46 +1516,46 @@ void gen_runarray49(stack *Stack)
sum -= Ai[j]*B[j];
B[i]=sum/Ai[i];
}
-
+
for(size_t i=0; i < n; ++i)
(*x)[i]=B[i];
delete[] index;
delete[] B;
delete[] A;
-
+
{Stack->push<realarray*>(x); return;}
}
// Solve the linear equation ax=b by LU decomposition, returning the
// solution x, where a is an n x n matrix and b is an n x m matrix.
// If no solution exists, return an empty array.
-#line 1282 "runarray.in"
+#line 1285 "runarray.in"
// realarray2* solve(realarray2 *a, realarray2 *b, bool warn=true);
void gen_runarray50(stack *Stack)
{
bool warn=vm::pop<bool>(Stack,true);
realarray2 * b=vm::pop<realarray2 *>(Stack);
realarray2 * a=vm::pop<realarray2 *>(Stack);
-#line 1283 "runarray.in"
+#line 1286 "runarray.in"
size_t n=checkArray(a);
-
+
if(n == 0) {Stack->push<realarray2*>(new array(0)); return;}
-
+
if(checkArray(b) != n) error(incommensurate);
size_t m=checkArray(read<array*>(b,0));
-
+
real *A,*B;
copyArray2C(A,a);
copyArray2C(B,b,false);
-
+
size_t *index=new size_t[n];
-
+
if(LUdecompose(A,n,index,warn) == 0)
{Stack->push<realarray2*>(new array(0)); return;}
array *x=new array(n);
-
+
for(size_t i=0; i < n; ++i) {
real *Ai=A+i*n;
real *Bi=B+i*m;
@@ -1566,7 +1569,7 @@ void gen_runarray50(stack *Stack)
Bi[k]=sum;
}
}
-
+
for(size_t i=n; i > 0;) {
--i;
real *Ai=A+i*n;
@@ -1579,7 +1582,7 @@ void gen_runarray50(stack *Stack)
Bi[k]=sum/Ai[i];
}
}
-
+
for(size_t i=0; i < n; ++i) {
real *Bi=B+i*m;
array *xi=new array(m);
@@ -1587,42 +1590,42 @@ void gen_runarray50(stack *Stack)
for(size_t j=0; j < m; ++j)
(*xi)[j]=Bi[j];
}
-
+
delete[] index;
delete[] B;
delete[] A;
-
+
{Stack->push<realarray2*>(x); return;}
}
// Compute the determinant of an n x n matrix.
-#line 1345 "runarray.in"
+#line 1348 "runarray.in"
// real determinant(realarray2 *a);
void gen_runarray51(stack *Stack)
{
realarray2 * a=vm::pop<realarray2 *>(Stack);
-#line 1346 "runarray.in"
+#line 1349 "runarray.in"
real *A;
copyArray2C(A,a);
size_t n=checkArray(a);
-
+
real det=LUdecompose(A,n,NULL,false);
size_t n1=n+1;
for(size_t i=0; i < n; ++i)
det *= A[i*n1];
-
+
delete[] A;
-
+
{Stack->push<real>(det); return;}
}
-#line 1361 "runarray.in"
+#line 1364 "runarray.in"
// realarray* *(realarray2 *a, realarray *b);
void gen_runarray52(stack *Stack)
{
realarray * b=vm::pop<realarray *>(Stack);
realarray2 * a=vm::pop<realarray2 *>(Stack);
-#line 1362 "runarray.in"
+#line 1365 "runarray.in"
size_t n=checkArray(a);
size_t m=checkArray(b);
array *c=new array(n);
@@ -1640,13 +1643,13 @@ void gen_runarray52(stack *Stack)
{Stack->push<realarray*>(c); return;}
}
-#line 1380 "runarray.in"
+#line 1383 "runarray.in"
// realarray* *(realarray *a, realarray2 *b);
void gen_runarray53(stack *Stack)
{
realarray2 * b=vm::pop<realarray2 *>(Stack);
realarray * a=vm::pop<realarray *>(Stack);
-#line 1381 "runarray.in"
+#line 1384 "runarray.in"
size_t n=checkArray(a);
if(n != checkArray(b)) error(incommensurate);
real *A;
@@ -1674,62 +1677,62 @@ void gen_runarray53(stack *Stack)
{Stack->push<realarray*>(c); return;}
}
-#line 1409 "runarray.in"
+#line 1412 "runarray.in"
// Intarray2* *(Intarray2 *a, Intarray2 *b);
void gen_runarray54(stack *Stack)
{
Intarray2 * b=vm::pop<Intarray2 *>(Stack);
Intarray2 * a=vm::pop<Intarray2 *>(Stack);
-#line 1410 "runarray.in"
+#line 1413 "runarray.in"
{Stack->push<Intarray2*>(mult<Int>(a,b)); return;}
}
-#line 1414 "runarray.in"
+#line 1417 "runarray.in"
// realarray2* *(realarray2 *a, realarray2 *b);
void gen_runarray55(stack *Stack)
{
realarray2 * b=vm::pop<realarray2 *>(Stack);
realarray2 * a=vm::pop<realarray2 *>(Stack);
-#line 1415 "runarray.in"
+#line 1418 "runarray.in"
{Stack->push<realarray2*>(mult<real>(a,b)); return;}
}
-#line 1419 "runarray.in"
+#line 1422 "runarray.in"
// pairarray2* *(pairarray2 *a, pairarray2 *b);
void gen_runarray56(stack *Stack)
{
pairarray2 * b=vm::pop<pairarray2 *>(Stack);
pairarray2 * a=vm::pop<pairarray2 *>(Stack);
-#line 1420 "runarray.in"
+#line 1423 "runarray.in"
{Stack->push<pairarray2*>(mult<pair>(a,b)); return;}
}
-#line 1424 "runarray.in"
+#line 1427 "runarray.in"
// triple *(realarray2 *t, triple v);
void gen_runarray57(stack *Stack)
{
triple v=vm::pop<triple>(Stack);
realarray2 * t=vm::pop<realarray2 *>(Stack);
-#line 1425 "runarray.in"
+#line 1428 "runarray.in"
{Stack->push<triple>(*t*v); return;}
}
-#line 1429 "runarray.in"
+#line 1432 "runarray.in"
// realarray2* AtA(realarray2 *a);
void gen_runarray58(stack *Stack)
{
realarray2 * a=vm::pop<realarray2 *>(Stack);
-#line 1430 "runarray.in"
+#line 1433 "runarray.in"
{Stack->push<realarray2*>(AtA<real>(a)); return;}
}
-#line 1434 "runarray.in"
+#line 1437 "runarray.in"
// pair project(triple v, realarray2 *t);
void gen_runarray59(stack *Stack)
{
realarray2 * t=vm::pop<realarray2 *>(Stack);
triple v=vm::pop<triple>(Stack);
-#line 1435 "runarray.in"
+#line 1438 "runarray.in"
size_t n=checkArray(t);
if(n != 4) error(incommensurate);
array *t0=read<array*>(t,0);
@@ -1737,16 +1740,16 @@ void gen_runarray59(stack *Stack)
array *t3=read<array*>(t,3);
if(checkArray(t0) != 4 || checkArray(t1) != 4 || checkArray(t3) != 4)
error(incommensurate);
-
+
real x=v.getx();
real y=v.gety();
real z=v.getz();
-
+
real f=read<real>(t3,0)*x+read<real>(t3,1)*y+read<real>(t3,2)*z+
read<real>(t3,3);
if(f == 0.0) dividebyzero();
f=1.0/f;
-
+
{Stack->push<pair>(pair((read<real>(t0,0)*x+read<real>(t0,1)*y+read<real>(t0,2)*z+
read<real>(t0,3))*f,
(read<real>(t1,0)*x+read<real>(t1,1)*y+read<real>(t1,2)*z+
@@ -1754,13 +1757,13 @@ void gen_runarray59(stack *Stack)
}
// Compute the dot product of vectors a and b.
-#line 1460 "runarray.in"
+#line 1463 "runarray.in"
// real dot(realarray *a, realarray *b);
void gen_runarray60(stack *Stack)
{
realarray * b=vm::pop<realarray *>(Stack);
realarray * a=vm::pop<realarray *>(Stack);
-#line 1461 "runarray.in"
+#line 1464 "runarray.in"
size_t n=checkArrays(a,b);
real sum=0.0;
for(size_t i=0; i < n; ++i)
@@ -1769,13 +1772,13 @@ void gen_runarray60(stack *Stack)
}
// Compute the complex dot product of vectors a and b.
-#line 1470 "runarray.in"
+#line 1473 "runarray.in"
// pair dot(pairarray *a, pairarray *b);
void gen_runarray61(stack *Stack)
{
pairarray * b=vm::pop<pairarray *>(Stack);
pairarray * a=vm::pop<pairarray *>(Stack);
-#line 1471 "runarray.in"
+#line 1474 "runarray.in"
size_t n=checkArrays(a,b);
pair sum=zero;
for(size_t i=0; i < n; ++i)
@@ -1790,7 +1793,7 @@ void gen_runarray61(stack *Stack)
// [ a[2] b[2] c[2] ]
// [ ... ]
// [ c[n-1] a[n-1] b[n-1] ]
-#line 1486 "runarray.in"
+#line 1489 "runarray.in"
// realarray* tridiagonal(realarray *a, realarray *b, realarray *c, realarray *f);
void gen_runarray62(stack *Stack)
{
@@ -1798,26 +1801,26 @@ void gen_runarray62(stack *Stack)
realarray * c=vm::pop<realarray *>(Stack);
realarray * b=vm::pop<realarray *>(Stack);
realarray * a=vm::pop<realarray *>(Stack);
-#line 1487 "runarray.in"
+#line 1490 "runarray.in"
size_t n=checkArrays(a,b);
checkEqual(n,checkArray(c));
checkEqual(n,checkArray(f));
-
+
array *up=new array(n);
array& u=*up;
if(n == 0) {Stack->push<realarray*>(up); return;}
-
+
// Special case: zero Dirichlet boundary conditions
if(read<real>(a,0) == 0.0 && read<real>(c,n-1) == 0.0) {
real temp=read<real>(b,0);
if(temp == 0.0) dividebyzero();
temp=1.0/temp;
-
+
real *work=new real[n];
u[0]=read<real>(f,0)*temp;
work[0]=-read<real>(c,0)*temp;
-
+
for(size_t i=1; i < n; i++) {
real temp=(read<real>(b,i)+read<real>(a,i)*work[i-1]);
if(temp == 0.0) {delete[] work; dividebyzero();}
@@ -1828,15 +1831,15 @@ void gen_runarray62(stack *Stack)
for(size_t i=n-1; i >= 1; i--)
u[i-1]=read<real>(u,i-1)+work[i-1]*read<real>(u,i);
-
+
delete[] work;
{Stack->push<realarray*>(up); return;}
}
-
+
real binv=read<real>(b,0);
if(binv == 0.0) dividebyzero();
binv=1.0/binv;
-
+
if(n == 1) {u[0]=read<real>(f,0)*binv; {Stack->push<realarray*>(up); return;}}
if(n == 2) {
real factor=(read<real>(b,0)*read<real>(b,1)-
@@ -1850,10 +1853,10 @@ void gen_runarray62(stack *Stack)
u[1]=temp;
{Stack->push<realarray*>(up); return;}
}
-
+
real *gamma=new real[n-2];
real *delta=new real[n-2];
-
+
gamma[0]=read<real>(c,0)*binv;
delta[0]=read<real>(a,0)*binv;
u[0]=read<real>(f,0)*binv;
@@ -1872,7 +1875,7 @@ void gen_runarray62(stack *Stack)
delta[i]=-read<real>(a,i)*delta[i-1]*alphainv;
alpha -= beta*delta[i];
}
-
+
real alphainv=read<real>(b,n-2)-read<real>(a,n-2)*gamma[n-3];
if(alphainv == 0.0) {delete[] gamma; delete[] delta; dividebyzero();}
alphainv=1.0/alphainv;
@@ -1884,18 +1887,18 @@ void gen_runarray62(stack *Stack)
if(temp == 0.0) {delete[] gamma; delete[] delta; dividebyzero();}
u[n-1]=temp=(fn-beta*read<real>(u,n-2))/temp;
u[n-2]=read<real>(u,n-2)-dnm1*temp;
-
+
for(size_t i=n-2; i >= 1; i--)
u[i-1]=read<real>(u,i-1)-gamma[i-1]*read<real>(u,i)-delta[i-1]*temp;
-
+
delete[] delta;
delete[] gamma;
-
+
{Stack->push<realarray*>(up); return;}
}
// Root solve by Newton-Raphson
-#line 1584 "runarray.in"
+#line 1587 "runarray.in"
// real newton(Int iterations=100, callableReal *f, callableReal *fprime, real x, bool verbose=false);
void gen_runarray63(stack *Stack)
{
@@ -1904,22 +1907,22 @@ void gen_runarray63(stack *Stack)
callableReal * fprime=vm::pop<callableReal *>(Stack);
callableReal * f=vm::pop<callableReal *>(Stack);
Int iterations=vm::pop<Int>(Stack,100);
-#line 1586 "runarray.in"
+#line 1589 "runarray.in"
static const real fuzz=1000.0*DBL_EPSILON;
Int i=0;
size_t oldPrec=0;
- if(verbose)
+ if(verbose)
oldPrec=cout.precision(DBL_DIG);
real diff=DBL_MAX;
real lastdiff;
do {
real x0=x;
-
+
Stack->push(x);
fprime->call(Stack);
real dfdx=pop<real>(Stack);
-
+
if(dfdx == 0.0) {
x=DBL_MAX;
break;
@@ -1928,14 +1931,14 @@ void gen_runarray63(stack *Stack)
Stack->push(x);
f->call(Stack);
real fx=pop<real>(Stack);
-
+
x -= fx/dfdx;
lastdiff=diff;
-
+
if(verbose)
cout << "Newton-Raphson: " << x << endl;
-
+
diff=fabs(x-x0);
if(++i == iterations) {
x=DBL_MAX;
@@ -1950,7 +1953,7 @@ void gen_runarray63(stack *Stack)
// Root solve by Newton-Raphson bisection
// cf. routine rtsafe (Press et al., Numerical Recipes, 1991).
-#line 1632 "runarray.in"
+#line 1635 "runarray.in"
// real newton(Int iterations=100, callableReal *f, callableReal *fprime, real x1, real x2, bool verbose=false);
void gen_runarray64(stack *Stack)
{
@@ -1960,22 +1963,22 @@ void gen_runarray64(stack *Stack)
callableReal * fprime=vm::pop<callableReal *>(Stack);
callableReal * f=vm::pop<callableReal *>(Stack);
Int iterations=vm::pop<Int>(Stack,100);
-#line 1634 "runarray.in"
+#line 1637 "runarray.in"
static const real fuzz=1000.0*DBL_EPSILON;
size_t oldPrec=0;
- if(verbose)
+ if(verbose)
oldPrec=cout.precision(DBL_DIG);
Stack->push(x1);
f->call(Stack);
real f1=pop<real>(Stack);
if(f1 == 0.0) {Stack->push<real>(x1); return;}
-
+
Stack->push(x2);
f->call(Stack);
real f2=pop<real>(Stack);
if(f2 == 0.0) {Stack->push<real>(x2); return;}
-
+
if((f1 > 0.0 && f2 > 0.0) || (f1 < 0.0 && f2 < 0.0)) {
ostringstream buf;
buf << "root not bracketed, f(x1)=" << f1 << ", f(x2)=" << f2 << endl;
@@ -1989,7 +1992,7 @@ void gen_runarray64(stack *Stack)
x1=x2;
x2=temp;
}
-
+
if(verbose)
cout << "midpoint: " << x << endl;
@@ -1997,7 +2000,7 @@ void gen_runarray64(stack *Stack)
Stack->push(x);
f->call(Stack);
real y=pop<real>(Stack);
-
+
Stack->push(x);
fprime->call(Stack);
real dy=pop<real>(Stack);
@@ -2021,11 +2024,11 @@ void gen_runarray64(stack *Stack)
if(temp == x) {Stack->push<real>(x); return;}
}
if(fabs(dx) < fuzz*fabs(x)) {Stack->push<real>(x); return;}
-
+
Stack->push(x);
f->call(Stack);
y=pop<real>(Stack);
-
+
Stack->push(x);
fprime->call(Stack);
dy=pop<real>(Stack);
@@ -2046,7 +2049,7 @@ void gen_runarray64(stack *Stack)
// In this implementation, the binary search is interleaved
// with a modified version of quadratic interpolation.
// This is a C++ port of the Asymptote routine written by Charles Staats III.
-#line 1720 "runarray.in"
+#line 1723 "runarray.in"
// real _findroot(callableReal *f, real a, real b, real tolerance, real fa, real fb);
void gen_runarray65(stack *Stack)
{
@@ -2056,13 +2059,13 @@ void gen_runarray65(stack *Stack)
real b=vm::pop<real>(Stack);
real a=vm::pop<real>(Stack);
callableReal * f=vm::pop<callableReal *>(Stack);
-#line 1722 "runarray.in"
+#line 1725 "runarray.in"
if(fa == 0.0) {Stack->push<real>(a); return;}
if(fb == 0.0) {Stack->push<real>(b); return;}
-
+
const char* oppsign="fa and fb must have opposite signs";
int sign;
-
+
if(fa < 0.0) {
if(fb < 0.0) error(oppsign);
sign=1;
@@ -2079,7 +2082,7 @@ void gen_runarray65(stack *Stack)
while(b-a > tolerance) {
t=(a+b)*0.5;
-
+
Stack->push(t);
f->call(Stack);
ft=sign*pop<double>(Stack);
@@ -2093,11 +2096,11 @@ void gen_runarray65(stack *Stack)
real q_A=2.0*(fa-2.0*ft+fb)*factor*factor;
real q_B=(fb-fa)*factor;
quadraticroots Q=quadraticroots(q_A,q_B,ft);
-
+
// If the interpolation somehow failed, continue on to the next binary
// search step. This may or may not be possible, depending on what
// theoretical guarantees are provided by the quadraticroots function.
-
+
real root;
bool found=Q.roots > 0;
if(found) {
@@ -2110,7 +2113,7 @@ void gen_runarray65(stack *Stack)
}
}
}
-
+
if(found) {
if(ft > 0.0) {
b=t;
@@ -2119,7 +2122,7 @@ void gen_runarray65(stack *Stack)
a=t;
fa=ft;
}
-
+
t=root;
// If the interpolated value is close to one edge of
@@ -2128,7 +2131,7 @@ void gen_runarray65(stack *Stack)
real margin=(b-a)*1.0e-3;
if(t-a < margin) t=a+2.0*(t-a);
else if(b-t < margin) t=b-2.0*(b-t);
-
+
Stack->push(t);
f->call(Stack);
ft=sign*pop<double>(Stack);
@@ -2136,7 +2139,7 @@ void gen_runarray65(stack *Stack)
if(ft == 0.0) {Stack->push<real>(t); return;}
}
}
-
+
if(ft > 0.0) {
b=t;
fb=ft;
@@ -2148,7 +2151,7 @@ void gen_runarray65(stack *Stack)
{Stack->push<real>(a-(b-a)/(fb-fa)*fa); return;}
}
-#line 1814 "runarray.in"
+#line 1817 "runarray.in"
// real simpson(callableReal *f, real a, real b, real acc=DBL_EPSILON, real dxmax=0);
void gen_runarray66(stack *Stack)
{
@@ -2157,7 +2160,7 @@ void gen_runarray66(stack *Stack)
real b=vm::pop<real>(Stack);
real a=vm::pop<real>(Stack);
callableReal * f=vm::pop<callableReal *>(Stack);
-#line 1816 "runarray.in"
+#line 1819 "runarray.in"
real integral;
if(dxmax <= 0) dxmax=fabs(b-a);
callable *oldFunc=Func;
@@ -2170,26 +2173,26 @@ void gen_runarray66(stack *Stack)
}
// Compute the fast Fourier transform of a pair array
-#line 1829 "runarray.in"
+#line 1832 "runarray.in"
// pairarray* fft(pairarray *a, Int sign=1);
void gen_runarray67(stack *Stack)
{
Int sign=vm::pop<Int>(Stack,1);
pairarray * a=vm::pop<pairarray *>(Stack);
-#line 1830 "runarray.in"
+#line 1833 "runarray.in"
#ifdef HAVE_LIBFFTW3
unsigned n=(unsigned) checkArray(a);
array *c=new array(n);
if(n) {
Complex *f=utils::ComplexAlign(n);
fftwpp::fft1d Forward(n,intcast(sign),f);
-
+
for(size_t i=0; i < n; i++) {
pair z=read<pair>(a,i);
f[i]=Complex(z.getx(),z.gety());
}
Forward.fft(f);
-
+
for(size_t i=0; i < n; i++) {
Complex z=f[i];
(*c)[i]=pair(z.real(),z.imag());
@@ -2206,13 +2209,13 @@ void gen_runarray67(stack *Stack)
}
// Compute the fast Fourier transform of a 2D pair array
-#line 1860 "runarray.in"
+#line 1863 "runarray.in"
// pairarray2* fft(pairarray2 *a, Int sign=1);
void gen_runarray68(stack *Stack)
{
Int sign=vm::pop<Int>(Stack,1);
pairarray2 * a=vm::pop<pairarray2 *>(Stack);
-#line 1861 "runarray.in"
+#line 1864 "runarray.in"
#ifdef HAVE_LIBFFTW3
size_t n=checkArray(a);
size_t m=n == 0 ? 0 : checkArray(read<array*>(a,0));
@@ -2257,13 +2260,13 @@ void gen_runarray68(stack *Stack)
}
// Compute the fast Fourier transform of a 3D pair array
-#line 1906 "runarray.in"
+#line 1909 "runarray.in"
// pairarray3* fft(pairarray3 *a, Int sign=1);
void gen_runarray69(stack *Stack)
{
Int sign=vm::pop<Int>(Stack,1);
pairarray3 * a=vm::pop<pairarray3 *>(Stack);
-#line 1907 "runarray.in"
+#line 1910 "runarray.in"
#ifdef HAVE_LIBFFTW3
size_t n=checkArray(a);
array *a0=read<array*>(a,0);
@@ -2320,26 +2323,26 @@ void gen_runarray69(stack *Stack)
{Stack->push<pairarray3*>(c); return;}
}
-#line 1964 "runarray.in"
+#line 1967 "runarray.in"
// Intarray2* triangulate(pairarray *z);
void gen_runarray70(stack *Stack)
{
pairarray * z=vm::pop<pairarray *>(Stack);
-#line 1965 "runarray.in"
+#line 1968 "runarray.in"
size_t nv=checkArray(z);
// Call robust version of Gilles Dumoulin's port of Paul Bourke's
// triangulation code.
XYZ *pxyz=new XYZ[nv+3];
ITRIANGLE *V=new ITRIANGLE[4*nv];
-
+
for(size_t i=0; i < nv; ++i) {
pair w=read<pair>(z,i);
pxyz[i].p[0]=w.getx();
pxyz[i].p[1]=w.gety();
pxyz[i].i=(Int) i;
}
-
+
Int ntri;
Triangulate((Int) nv,pxyz,V,ntri,true,false);
@@ -2353,18 +2356,18 @@ void gen_runarray70(stack *Stack)
(*ti)[1]=pxyz[Vi->p2].i;
(*ti)[2]=pxyz[Vi->p3].i;
}
-
+
delete[] V;
delete[] pxyz;
{Stack->push<Intarray2*>(t); return;}
}
-#line 1999 "runarray.in"
+#line 2002 "runarray.in"
// real norm(realarray *a);
void gen_runarray71(stack *Stack)
{
realarray * a=vm::pop<realarray *>(Stack);
-#line 2000 "runarray.in"
+#line 2003 "runarray.in"
size_t n=checkArray(a);
real M=0.0;
for(size_t i=0; i < n; ++i) {
@@ -2374,12 +2377,12 @@ void gen_runarray71(stack *Stack)
{Stack->push<real>(M); return;}
}
-#line 2010 "runarray.in"
+#line 2013 "runarray.in"
// real norm(realarray2 *a);
void gen_runarray72(stack *Stack)
{
realarray2 * a=vm::pop<realarray2 *>(Stack);
-#line 2011 "runarray.in"
+#line 2014 "runarray.in"
size_t n=checkArray(a);
real M=0.0;
for(size_t i=0; i < n; ++i) {
@@ -2393,12 +2396,12 @@ void gen_runarray72(stack *Stack)
{Stack->push<real>(M); return;}
}
-#line 2025 "runarray.in"
+#line 2028 "runarray.in"
// real norm(triplearray2 *a);
void gen_runarray73(stack *Stack)
{
triplearray2 * a=vm::pop<triplearray2 *>(Stack);
-#line 2026 "runarray.in"
+#line 2029 "runarray.in"
size_t n=checkArray(a);
real M=0.0;
for(size_t i=0; i < n; ++i) {
@@ -2412,21 +2415,21 @@ void gen_runarray73(stack *Stack)
{Stack->push<real>(sqrt(M)); return;}
}
-#line 2040 "runarray.in"
+#line 2043 "runarray.in"
// real change2(triplearray2 *a);
void gen_runarray74(stack *Stack)
{
triplearray2 * a=vm::pop<triplearray2 *>(Stack);
-#line 2041 "runarray.in"
+#line 2044 "runarray.in"
size_t n=checkArray(a);
if(n == 0) {Stack->push<real>(0.0); return;}
-
+
vm::array *a0=vm::read<vm::array*>(a,0);
size_t m=checkArray(a0);
if(m == 0) {Stack->push<real>(0.0); return;}
triple a00=vm::read<triple>(a0,0);
real M=0.0;
-
+
for(size_t i=0; i < n; ++i) {
vm::array *ai=vm::read<vm::array*>(a,i);
size_t m=checkArray(ai);
@@ -2438,13 +2441,13 @@ void gen_runarray74(stack *Stack)
{Stack->push<real>(M); return;}
}
-#line 2062 "runarray.in"
+#line 2065 "runarray.in"
// triple minbezier(triplearray2 *P, triple b);
void gen_runarray75(stack *Stack)
{
triple b=vm::pop<triple>(Stack);
triplearray2 * P=vm::pop<triplearray2 *>(Stack);
-#line 2063 "runarray.in"
+#line 2066 "runarray.in"
size_t N;
real *A=copyTripleArray2Components(P,N);
bound_double *B=bounddouble(N);
@@ -2455,13 +2458,13 @@ void gen_runarray75(stack *Stack)
{Stack->push<triple>(b); return;}
}
-#line 2074 "runarray.in"
+#line 2077 "runarray.in"
// triple maxbezier(triplearray2 *P, triple b);
void gen_runarray76(stack *Stack)
{
triple b=vm::pop<triple>(Stack);
triplearray2 * P=vm::pop<triplearray2 *>(Stack);
-#line 2075 "runarray.in"
+#line 2078 "runarray.in"
size_t N;
real *A=copyTripleArray2Components(P,N);
bound_double *B=bounddouble(N);
@@ -2472,13 +2475,13 @@ void gen_runarray76(stack *Stack)
{Stack->push<triple>(b); return;}
}
-#line 2086 "runarray.in"
+#line 2089 "runarray.in"
// pair minratio(triplearray2 *P, pair b);
void gen_runarray77(stack *Stack)
{
pair b=vm::pop<pair>(Stack);
triplearray2 * P=vm::pop<triplearray2 *>(Stack);
-#line 2087 "runarray.in"
+#line 2090 "runarray.in"
size_t N;
triple *A=copyTripleArray2C(P,N);
real fuzz=Fuzz*norm(A,N);
@@ -2489,13 +2492,13 @@ void gen_runarray77(stack *Stack)
{Stack->push<pair>(b); return;}
}
-#line 2098 "runarray.in"
+#line 2101 "runarray.in"
// pair maxratio(triplearray2 *P, pair b);
void gen_runarray78(stack *Stack)
{
pair b=vm::pop<pair>(Stack);
triplearray2 * P=vm::pop<triplearray2 *>(Stack);
-#line 2099 "runarray.in"
+#line 2102 "runarray.in"
size_t N;
triple *A=copyTripleArray2C(P,N);
bound_triple *B=boundtriple(N);
@@ -2506,35 +2509,35 @@ void gen_runarray78(stack *Stack)
{Stack->push<pair>(b); return;}
}
-#line 2110 "runarray.in"
+#line 2113 "runarray.in"
// realarray* _projection();
void gen_runarray79(stack *Stack)
{
-#line 2111 "runarray.in"
+#line 2114 "runarray.in"
#ifdef HAVE_GL
array *a=new array(14);
gl::projection P=gl::camera();
size_t k=0;
(*a)[k++]=P.orthographic ? 1.0 : 0.0;
-
+
triple camera=P.camera;
(*a)[k++]=camera.getx();
(*a)[k++]=camera.gety();
(*a)[k++]=camera.getz();
-
+
triple up=P.up;
(*a)[k++]=up.getx();
(*a)[k++]=up.gety();
(*a)[k++]=up.getz();
-
+
triple target=P.target;
(*a)[k++]=target.getx();
(*a)[k++]=target.gety();
(*a)[k++]=target.getz();
-
+
(*a)[k++]=P.zoom;
(*a)[k++]=P.angle;
-
+
(*a)[k++]=P.viewportshift.getx();
(*a)[k++]=P.viewportshift.gety();
#endif
@@ -2559,153 +2562,153 @@ void gen_runarray_venv(venv &ve)
REGISTER_BLTIN(run::copyArrayValue,"copyArrayValue");
#line 664 "runarray.in"
REGISTER_BLTIN(run::copyArray,"copyArray");
-#line 675 "runarray.in"
+#line 676 "runarray.in"
REGISTER_BLTIN(run::arrayRead,"arrayRead");
-#line 687 "runarray.in"
+#line 688 "runarray.in"
REGISTER_BLTIN(run::arraySliceRead,"arraySliceRead");
-#line 694 "runarray.in"
+#line 695 "runarray.in"
REGISTER_BLTIN(run::arraySliceReadToEnd,"arraySliceReadToEnd");
-#line 702 "runarray.in"
+#line 703 "runarray.in"
REGISTER_BLTIN(run::arrayArrayRead,"arrayArrayRead");
-#line 711 "runarray.in"
+#line 712 "runarray.in"
REGISTER_BLTIN(run::arrayWrite,"arrayWrite");
-#line 728 "runarray.in"
+#line 729 "runarray.in"
REGISTER_BLTIN(run::arraySliceWrite,"arraySliceWrite");
-#line 736 "runarray.in"
+#line 737 "runarray.in"
REGISTER_BLTIN(run::arraySliceWriteToEnd,"arraySliceWriteToEnd");
-#line 744 "runarray.in"
+#line 745 "runarray.in"
REGISTER_BLTIN(run::arrayLength,"arrayLength");
-#line 750 "runarray.in"
+#line 751 "runarray.in"
REGISTER_BLTIN(run::arrayKeys,"arrayKeys");
-#line 765 "runarray.in"
+#line 766 "runarray.in"
REGISTER_BLTIN(run::arrayCyclicFlag,"arrayCyclicFlag");
-#line 772 "runarray.in"
+#line 773 "runarray.in"
REGISTER_BLTIN(run::arraySetCyclicFlag,"arraySetCyclicFlag");
-#line 779 "runarray.in"
+#line 780 "runarray.in"
REGISTER_BLTIN(run::arrayInitializedHelper,"arrayInitializedHelper");
-#line 790 "runarray.in"
+#line 791 "runarray.in"
REGISTER_BLTIN(run::arrayInitialized,"arrayInitialized");
-#line 796 "runarray.in"
+#line 797 "runarray.in"
REGISTER_BLTIN(run::arrayCyclicHelper,"arrayCyclicHelper");
-#line 803 "runarray.in"
+#line 804 "runarray.in"
REGISTER_BLTIN(run::arrayCyclic,"arrayCyclic");
-#line 809 "runarray.in"
+#line 810 "runarray.in"
REGISTER_BLTIN(run::arrayPushHelper,"arrayPushHelper");
-#line 817 "runarray.in"
+#line 818 "runarray.in"
REGISTER_BLTIN(run::arrayPush,"arrayPush");
-#line 823 "runarray.in"
+#line 824 "runarray.in"
REGISTER_BLTIN(run::arrayAppendHelper,"arrayAppendHelper");
-#line 832 "runarray.in"
+#line 833 "runarray.in"
REGISTER_BLTIN(run::arrayAppend,"arrayAppend");
-#line 838 "runarray.in"
+#line 839 "runarray.in"
REGISTER_BLTIN(run::arrayPopHelper,"arrayPopHelper");
-#line 847 "runarray.in"
+#line 848 "runarray.in"
REGISTER_BLTIN(run::arrayPop,"arrayPop");
-#line 853 "runarray.in"
+#line 854 "runarray.in"
REGISTER_BLTIN(run::arrayInsertHelper,"arrayInsertHelper");
-#line 864 "runarray.in"
+#line 865 "runarray.in"
REGISTER_BLTIN(run::arrayInsert,"arrayInsert");
-#line 870 "runarray.in"
+#line 871 "runarray.in"
REGISTER_BLTIN(run::arrayDelete,"arrayDelete");
-#line 876 "runarray.in"
+#line 877 "runarray.in"
REGISTER_BLTIN(run::arrayAlias,"arrayAlias");
-#line 881 "runarray.in"
+#line 882 "runarray.in"
REGISTER_BLTIN(run::arrayIntArray,"arrayIntArray");
-#line 899 "runarray.in"
+#line 900 "runarray.in"
addFunc(ve, run::gen_runarray32, IntArray(), SYM(complement), formal(IntArray(), SYM(a), false, false), formal(primInt(), SYM(n), false, false));
-#line 918 "runarray.in"
+#line 919 "runarray.in"
REGISTER_BLTIN(run::arraySequence,"arraySequence");
-#line 931 "runarray.in"
+#line 932 "runarray.in"
addFunc(ve, run::gen_runarray34, IntArray(), SYM(sequence), formal(primInt(), SYM(n), false, false));
-#line 942 "runarray.in"
+#line 943 "runarray.in"
REGISTER_BLTIN(run::arrayFunction,"arrayFunction");
-#line 955 "runarray.in"
+#line 956 "runarray.in"
REGISTER_BLTIN(run::arraySort,"arraySort");
-#line 965 "runarray.in"
+#line 966 "runarray.in"
REGISTER_BLTIN(run::arraySearch,"arraySearch");
-#line 984 "runarray.in"
+#line 985 "runarray.in"
addFunc(ve, run::gen_runarray38, primBoolean(), SYM(all), formal(booleanArray(), SYM(a), false, false));
-#line 993 "runarray.in"
+#line 994 "runarray.in"
addFunc(ve, run::gen_runarray39, booleanArray(), SYM_LOGNOT, formal(booleanArray(), SYM(a), false, false));
-#line 1002 "runarray.in"
+#line 1003 "runarray.in"
addFunc(ve, run::gen_runarray40, primInt(), SYM(sum), formal(booleanArray(), SYM(a), false, false));
-#line 1011 "runarray.in"
+#line 1012 "runarray.in"
REGISTER_BLTIN(run::arrayConcat,"arrayConcat");
-#line 1039 "runarray.in"
+#line 1040 "runarray.in"
REGISTER_BLTIN(run::array2Transpose,"array2Transpose");
-#line 1063 "runarray.in"
+#line 1066 "runarray.in"
REGISTER_BLTIN(run::array3Transpose,"array3Transpose");
-#line 1150 "runarray.in"
+#line 1153 "runarray.in"
addFunc(ve, run::gen_runarray44, primInt(), SYM(find), formal(booleanArray(), SYM(a), false, false), formal(primInt(), SYM(n), true, false));
-#line 1169 "runarray.in"
+#line 1172 "runarray.in"
addFunc(ve, run::gen_runarray45, IntArray(), SYM(findall), formal(booleanArray(), SYM(a), false, false));
-#line 1182 "runarray.in"
+#line 1185 "runarray.in"
REGISTER_BLTIN(run::arrayConditional,"arrayConditional");
-#line 1208 "runarray.in"
+#line 1211 "runarray.in"
addFunc(ve, run::gen_runarray47, realArray2(), SYM(identity), formal(primInt(), SYM(n), false, false));
-#line 1214 "runarray.in"
+#line 1217 "runarray.in"
addFunc(ve, run::gen_runarray48, realArray2(), SYM(inverse), formal(realArray2(), SYM(a), false, false));
-#line 1226 "runarray.in"
+#line 1229 "runarray.in"
addFunc(ve, run::gen_runarray49, realArray(), SYM(solve), formal(realArray2(), SYM(a), false, false), formal(realArray(), SYM(b), false, false), formal(primBoolean(), SYM(warn), true, false));
-#line 1279 "runarray.in"
+#line 1282 "runarray.in"
addFunc(ve, run::gen_runarray50, realArray2(), SYM(solve), formal(realArray2(), SYM(a), false, false), formal(realArray2(), SYM(b), false, false), formal(primBoolean(), SYM(warn), true, false));
-#line 1344 "runarray.in"
+#line 1347 "runarray.in"
addFunc(ve, run::gen_runarray51, primReal(), SYM(determinant), formal(realArray2(), SYM(a), false, false));
-#line 1361 "runarray.in"
+#line 1364 "runarray.in"
addFunc(ve, run::gen_runarray52, realArray(), SYM_TIMES, formal(realArray2(), SYM(a), false, false), formal(realArray(), SYM(b), false, false));
-#line 1380 "runarray.in"
+#line 1383 "runarray.in"
addFunc(ve, run::gen_runarray53, realArray(), SYM_TIMES, formal(realArray(), SYM(a), false, false), formal(realArray2(), SYM(b), false, false));
-#line 1409 "runarray.in"
+#line 1412 "runarray.in"
addFunc(ve, run::gen_runarray54, IntArray2(), SYM_TIMES, formal(IntArray2(), SYM(a), false, false), formal(IntArray2(), SYM(b), false, false));
-#line 1414 "runarray.in"
+#line 1417 "runarray.in"
addFunc(ve, run::gen_runarray55, realArray2(), SYM_TIMES, formal(realArray2(), SYM(a), false, false), formal(realArray2(), SYM(b), false, false));
-#line 1419 "runarray.in"
+#line 1422 "runarray.in"
addFunc(ve, run::gen_runarray56, pairArray2(), SYM_TIMES, formal(pairArray2(), SYM(a), false, false), formal(pairArray2(), SYM(b), false, false));
-#line 1424 "runarray.in"
+#line 1427 "runarray.in"
addFunc(ve, run::gen_runarray57, primTriple(), SYM_TIMES, formal(realArray2(), SYM(t), false, false), formal(primTriple(), SYM(v), false, false));
-#line 1429 "runarray.in"
+#line 1432 "runarray.in"
addFunc(ve, run::gen_runarray58, realArray2(), SYM(AtA), formal(realArray2(), SYM(a), false, false));
-#line 1434 "runarray.in"
+#line 1437 "runarray.in"
addFunc(ve, run::gen_runarray59, primPair(), SYM(project), formal(primTriple(), SYM(v), false, false), formal(realArray2(), SYM(t), false, false));
-#line 1459 "runarray.in"
+#line 1462 "runarray.in"
addFunc(ve, run::gen_runarray60, primReal(), SYM(dot), formal(realArray(), SYM(a), false, false), formal(realArray(), SYM(b), false, false));
-#line 1469 "runarray.in"
+#line 1472 "runarray.in"
addFunc(ve, run::gen_runarray61, primPair(), SYM(dot), formal(pairArray(), SYM(a), false, false), formal(pairArray(), SYM(b), false, false));
-#line 1479 "runarray.in"
+#line 1482 "runarray.in"
addFunc(ve, run::gen_runarray62, realArray(), SYM(tridiagonal), formal(realArray(), SYM(a), false, false), formal(realArray(), SYM(b), false, false), formal(realArray(), SYM(c), false, false), formal(realArray(), SYM(f), false, false));
-#line 1583 "runarray.in"
+#line 1586 "runarray.in"
addFunc(ve, run::gen_runarray63, primReal(), SYM(newton), formal(primInt(), SYM(iterations), true, false), formal(realRealFunction(), SYM(f), false, false), formal(realRealFunction(), SYM(fprime), false, false), formal(primReal(), SYM(x), false, false), formal(primBoolean(), SYM(verbose), true, false));
-#line 1630 "runarray.in"
+#line 1633 "runarray.in"
addFunc(ve, run::gen_runarray64, primReal(), SYM(newton), formal(primInt(), SYM(iterations), true, false), formal(realRealFunction(), SYM(f), false, false), formal(realRealFunction(), SYM(fprime), false, false), formal(primReal(), SYM(x1), false, false), formal(primReal(), SYM(x2), false, false), formal(primBoolean(), SYM(verbose), true, false));
-#line 1712 "runarray.in"
+#line 1715 "runarray.in"
addFunc(ve, run::gen_runarray65, primReal(), SYM(_findroot), formal(realRealFunction(), SYM(f), false, false), formal(primReal(), SYM(a), false, false), formal(primReal(), SYM(b), false, false), formal(primReal(), SYM(tolerance), false, false), formal(primReal(), SYM(fa), false, false), formal(primReal(), SYM(fb), false, false));
-#line 1814 "runarray.in"
+#line 1817 "runarray.in"
addFunc(ve, run::gen_runarray66, primReal(), SYM(simpson), formal(realRealFunction(), SYM(f), false, false), formal(primReal(), SYM(a), false, false), formal(primReal(), SYM(b), false, false), formal(primReal(), SYM(acc), true, false), formal(primReal(), SYM(dxmax), true, false));
-#line 1828 "runarray.in"
+#line 1831 "runarray.in"
addFunc(ve, run::gen_runarray67, pairArray(), SYM(fft), formal(pairArray(), SYM(a), false, false), formal(primInt(), SYM(sign), true, false));
-#line 1859 "runarray.in"
+#line 1862 "runarray.in"
addFunc(ve, run::gen_runarray68, pairArray2(), SYM(fft), formal(pairArray2(), SYM(a), false, false), formal(primInt(), SYM(sign), true, false));
-#line 1905 "runarray.in"
+#line 1908 "runarray.in"
addFunc(ve, run::gen_runarray69, pairArray3(), SYM(fft), formal(pairArray3(), SYM(a), false, false), formal(primInt(), SYM(sign), true, false));
-#line 1964 "runarray.in"
+#line 1967 "runarray.in"
addFunc(ve, run::gen_runarray70, IntArray2(), SYM(triangulate), formal(pairArray(), SYM(z), false, false));
-#line 1999 "runarray.in"
+#line 2002 "runarray.in"
addFunc(ve, run::gen_runarray71, primReal(), SYM(norm), formal(realArray(), SYM(a), false, false));
-#line 2010 "runarray.in"
+#line 2013 "runarray.in"
addFunc(ve, run::gen_runarray72, primReal(), SYM(norm), formal(realArray2(), SYM(a), false, false));
-#line 2025 "runarray.in"
+#line 2028 "runarray.in"
addFunc(ve, run::gen_runarray73, primReal(), SYM(norm), formal(tripleArray2(), SYM(a), false, false));
-#line 2040 "runarray.in"
+#line 2043 "runarray.in"
addFunc(ve, run::gen_runarray74, primReal(), SYM(change2), formal(tripleArray2(), SYM(a), false, false));
-#line 2062 "runarray.in"
+#line 2065 "runarray.in"
addFunc(ve, run::gen_runarray75, primTriple(), SYM(minbezier), formal(tripleArray2(), SYM(p), false, false), formal(primTriple(), SYM(b), false, false));
-#line 2074 "runarray.in"
+#line 2077 "runarray.in"
addFunc(ve, run::gen_runarray76, primTriple(), SYM(maxbezier), formal(tripleArray2(), SYM(p), false, false), formal(primTriple(), SYM(b), false, false));
-#line 2086 "runarray.in"
+#line 2089 "runarray.in"
addFunc(ve, run::gen_runarray77, primPair(), SYM(minratio), formal(tripleArray2(), SYM(p), false, false), formal(primPair(), SYM(b), false, false));
-#line 2098 "runarray.in"
+#line 2101 "runarray.in"
addFunc(ve, run::gen_runarray78, primPair(), SYM(maxratio), formal(tripleArray2(), SYM(p), false, false), formal(primPair(), SYM(b), false, false));
-#line 2110 "runarray.in"
+#line 2113 "runarray.in"
addFunc(ve, run::gen_runarray79, realArray(), SYM(_projection));
}
diff --git a/Build/source/utils/asymptote/runarray.in b/Build/source/utils/asymptote/runarray.in
index 8a33fc09541..82308211def 100644
--- a/Build/source/utils/asymptote/runarray.in
+++ b/Build/source/utils/asymptote/runarray.in
@@ -28,7 +28,7 @@ callableReal* => realRealFunction()
#ifdef HAVE_LIBFFTW3
#include "fftw++.h"
-static const char *rectangular="matrix must be rectangular";
+ static const char *rectangular="matrix must be rectangular";
#else
static const char *installFFTW=
"Please install fftw3, run ./configure, and recompile";
@@ -70,7 +70,7 @@ void outOfBounds(const char *op, size_t len, Int n)
error(buf);
}
-inline item& arrayRead(array *a, Int n)
+inline item& arrayRead(array *a, Int n)
{
size_t len=checkArray(a);
bool cyclic=a->cyclic();
@@ -83,7 +83,7 @@ inline item& arrayRead(array *a, Int n)
static array* deepArray(Int depth, Int *dims)
{
assert(depth > 0);
-
+
if (depth == 1) {
return new array(dims[0]);
} else {
@@ -161,7 +161,7 @@ array *copyArray(array *a)
{
size_t size=checkArray(a);
array *c=new array(size);
- for(size_t i=0; i < size; i++)
+ for(size_t i=0; i < size; i++)
(*c)[i]=(*a)[i];
return c;
}
@@ -175,7 +175,7 @@ array *copyArray2(array *a)
size_t aisize=checkArray(ai);
array *ci=new array(aisize);
(*c)[i]=ci;
- for(size_t j=0; j < aisize; j++)
+ for(size_t j=0; j < aisize; j++)
(*ci)[j]=(*ai)[j];
}
return c;
@@ -186,12 +186,12 @@ double *copyTripleArray2Components(array *a, size_t &N, GCPlacement placement)
size_t n=checkArray(a);
N=0;
for(size_t i=0; i < n; i++)
- N += checkArray(read<array*>(a,i));
-
+ N += checkArray(read<array*>(a,i));
+
double *A=(placement == NoGC) ? new double [3*N] :
new(placement) double[3*N];
double *p=A;
-
+
for(size_t i=0; i < n; i++) {
array *ai=read<array*>(a,i);
size_t m=checkArray(ai);
@@ -211,12 +211,12 @@ triple *copyTripleArray2C(array *a, size_t &N, GCPlacement placement)
size_t n=checkArray(a);
N=0;
for(size_t i=0; i < n; i++)
- N += checkArray(read<array*>(a,i));
-
+ N += checkArray(read<array*>(a,i));
+
triple *A=(placement == NoGC) ? new triple [N] :
new(placement) triple[N];
triple *p=A;
-
+
for(size_t i=0; i < n; i++) {
array *ai=read<array*>(a,i);
size_t m=checkArray(ai);
@@ -234,20 +234,20 @@ triple operator *(const array& t, const triple& v)
array *t1=read<array*>(t,1);
array *t2=read<array*>(t,2);
array *t3=read<array*>(t,3);
-
- if(checkArray(t0) != 4 || checkArray(t1) != 4 ||
+
+ if(checkArray(t0) != 4 || checkArray(t1) != 4 ||
checkArray(t2) != 4 || checkArray(t3) != 4)
error(incommensurate);
double x=v.getx();
double y=v.gety();
double z=v.getz();
-
+
double f=read<real>(t3,0)*x+read<real>(t3,1)*y+read<real>(t3,2)*z+
read<real>(t3,3);
if(f == 0.0) run::dividebyzero();
f=1.0/f;
-
+
return triple((read<real>(t0,0)*x+read<real>(t0,1)*y+read<real>(t0,2)*z+
read<real>(t0,3))*f,
(read<real>(t1,0)*x+read<real>(t1,1)*y+read<real>(t1,2)*z+
@@ -260,14 +260,14 @@ template<class T>
array *mult(array *a, array *b)
{
size_t n=checkArray(a);
-
+
size_t nb=checkArray(b);
size_t na0=n == 0 ? 0 : checkArray(read<array*>(a,0));
- if(na0 != nb)
+ if(na0 != nb)
error(incommensurate);
-
+
size_t nb0=nb == 0 ? 0 : checkArray(read<array*>(b,0));
-
+
array *c=new array(n);
T *A,*B;
@@ -286,10 +286,10 @@ array *mult(array *a, array *b)
(*ci)[j]=sum;
}
}
-
+
delete[] B;
delete[] A;
-
+
return c;
}
@@ -299,7 +299,7 @@ array *AtA(array *a)
{
size_t n=checkArray(a);
size_t m=n == 0 ? 0 : checkArray(read<array*>(a,0));
-
+
array *c=new array(m);
T *A;
@@ -317,12 +317,12 @@ array *AtA(array *a)
(*ci)[j]=sum;
}
}
-
+
delete[] A;
return c;
}
-double norm(double *a, size_t n)
+double norm(double *a, size_t n)
{
if(n == 0) return 0.0;
double M=fabs(a[0]);
@@ -331,7 +331,7 @@ double norm(double *a, size_t n)
return M;
}
-double norm(triple *a, size_t n)
+double norm(triple *a, size_t n)
{
if(n == 0) return 0.0;
double M=a[0].abs2();
@@ -350,7 +350,7 @@ void transpose(double *a, size_t n)
double temp=a[ij];
a[ij]=a[ji];
a[ji]=temp;
- }
+ }
}
}
@@ -377,16 +377,16 @@ void inverse(double *M, size_t n)
real a=M[0], b=M[1], c=M[2];
real d=M[3], e=M[4], f=M[5];
real g=M[6], h=M[7], i=M[8];
-
+
real A=e*i-f*h;
real B=f*g-d*i;
real C=d*h-e*g;
-
+
real det=a*A+b*B+c*C;
if(det == 0.0)
error(singular);
det=1.0/det;
-
+
M[0]=A*det; M[1]=(c*h-b*i)*det; M[2]=(b*f-c*e)*det;
M[3]=B*det; M[4]=(a*i-c*g)*det; M[5]=(c*d-a*f)*det;
M[6]=C*det; M[7]=(b*g-a*h)*det; M[8]=(a*e-b*d)*det;
@@ -394,10 +394,10 @@ void inverse(double *M, size_t n)
}
inverseAllocate(n);
-
+
for(size_t i=0; i < n; i++)
pivot[i]=0;
-
+
size_t col=0, row=0;
// This is the main loop over the columns to be reduced.
for(size_t i=0; i < n; i++) {
@@ -422,7 +422,7 @@ void inverse(double *M, size_t n)
}
}
++(pivot[col]);
-
+
// Interchange rows, if needed, to put the pivot element on the diagonal.
double *acol=M+n*col;
if(row != col) {
@@ -433,8 +433,8 @@ void inverse(double *M, size_t n)
acol[k]=temp;
}
}
-
- Row[i]=row;
+
+ Row[i]=row;
Col[i]=col;
// Divide the pivot row by the pivot element.
@@ -445,12 +445,12 @@ void inverse(double *M, size_t n)
}
real pivinv=1.0/denom;
acol[col]=1.0;
- for(size_t k=0; k < n; k++)
+ for(size_t k=0; k < n; k++)
acol[k]=acol[k]*pivinv;
-
+
// Reduce all rows except for the pivoted one.
for(size_t k=0; k < n; k++) {
- if(k != col) {
+ if(k != col) {
double *ak=M+n*k;
real akcol=ak[col];
ak[col]=0.0;
@@ -459,7 +459,7 @@ void inverse(double *M, size_t n)
}
}
}
-
+
// Unscramble the inverse matrix in view of the column interchanges.
for(size_t k=n; k > 0;) {
k--;
@@ -550,7 +550,7 @@ Int LUdecompose(double *a, size_t n, size_t* index, bool warn=true)
swap *= -1;
vv[imax]=vv[j];
}
- if(index)
+ if(index)
index[j]=imax;
if(j != n) {
double denom=aj[j];
@@ -576,7 +576,7 @@ void dividebyzero(size_t i)
buf << "Divide by zero";
error(buf);
}
-
+
void integeroverflow(size_t i)
{
ostringstream buf;
@@ -643,7 +643,7 @@ array* :newAppendedArray(array* tail, Int n)
for (Int index = n-1; index >= 0; index--)
(*a)[index] = pop(Stack);
-
+
copy(tail->begin(), tail->end(), back_inserter(*a));
return a;
@@ -667,6 +667,7 @@ array* :copyArrayValue(Int n, item value, Int depth=Int_MAX, Int typeDepth)
// automatically pushed on the stack and is not visible to the user.
array* :copyArray(array *a, Int depth=Int_MAX, Int typeDepth)
{
+ if(a == 0) vm::error(dereferenceNullArray);
if(depth < 0) error("cannot copy to a negative depth");
if(depth > typeDepth) depth=typeDepth;
return a->copyToDepth(depth);
@@ -839,7 +840,7 @@ callable* :arrayAppend(array *a)
item :arrayPopHelper(array *a)
{
size_t asize=checkArray(a);
- if(asize == 0)
+ if(asize == 0)
error("cannot pop element from empty array");
return a->pop();
}
@@ -856,7 +857,7 @@ item :arrayInsertHelper(Int i, array *x, array *a)
size_t asize=checkArray(a);
checkArray(x);
if(a->cyclic() && asize > 0) i=imod(i,asize);
- if(i < 0 || i > (Int) asize)
+ if(i < 0 || i > (Int) asize)
outOfBounds("inserting",asize,i);
(*a).insert((*a).begin()+i,(*x).begin(),(*x).end());
}
@@ -910,7 +911,7 @@ Intarray* complement(Intarray *a, Int n)
}
for(Int i=0; i < n; i++)
if(keep[i]) r->push(i);
-
+
delete[] keep;
return r;
}
@@ -971,7 +972,7 @@ Int :arraySearch(array *a, item key, callable *less)
size_t u=size-1;
if(!compareFunction(key,(*a)[u])) return Intcast(u);
size_t l=0;
-
+
while (l < u) {
size_t i=(l+u)/2;
if(compareFunction(key,(*a)[i])) u=i;
@@ -1040,21 +1041,23 @@ array* :array2Transpose(array *a)
{
size_t asize=checkArray(a);
array *c=new array(0);
+ size_t csize=0;
for(size_t i=0; i < asize; i++) {
size_t ip=i+1;
array *ai=read<array*>(a,i);
size_t aisize=checkArray(ai);
- size_t csize=checkArray(c);
- if(csize < aisize) {
+ if(c->size() < aisize) {
c->resize(aisize);
- for(size_t j=csize; j < aisize; j++) {
- (*c)[j]=new array(ip);
- }
+ for(size_t j=csize; j < aisize; j++)
+ (*c)[j]=new array(0);
+ csize=aisize;
}
for(size_t j=0; j < aisize; j++) {
- array *cj=read<array*>(c,j);
- if(checkArray(cj) < ip) cj->resize(ip);
- (*cj)[i]=(*ai)[j];
+ if(!(*ai)[j].empty()) {
+ array *cj=read<array*>(c,j);
+ if(checkArray(cj) < ip) cj->resize(ip);
+ (*cj)[i]=(*ai)[j];
+ }
}
}
return c;
@@ -1063,7 +1066,7 @@ array* :array2Transpose(array *a)
// a is a rectangular 3D array; perm is an Int array indicating the type of
// permutation (021 or 120, etc; original is 012).
// Transpose by sending respective members to the permutated locations:
-// return the array obtained by putting a[i][j][k] into position perm{ijk}.
+// return the array obtained by putting a[i][j][k] into position perm{ijk}.
array* :array3Transpose(array *a, array *perm)
{
const size_t DIM=3;
@@ -1073,10 +1076,10 @@ array* :array3Transpose(array *a, array *perm)
buf << "permutation array must have length " << DIM;
error(buf);
}
-
+
size_t* size=new size_t[DIM];
for(size_t i=0; i < DIM; ++i) size[i]=DIM;
-
+
for(size_t i=0; i < DIM; ++i) {
Int p=read<Int>(perm,i);
size_t P=(size_t) p;
@@ -1087,13 +1090,13 @@ array* :array3Transpose(array *a, array *perm)
}
size[P]=P;
}
-
+
for(size_t i=0; i < DIM; ++i)
if(size[i] == DIM) error("permutation indices must be distinct");
-
+
static const char *rectangular=
"3D transpose implemented for rectangular matrices only";
-
+
size_t isize=size[0]=checkArray(a);
array *a0=read<array*>(a,0);
size[1]=checkArray(a0);
@@ -1108,15 +1111,15 @@ array* :array3Transpose(array *a, array *perm)
if(checkArray(aij) != size[2]) error(rectangular);
}
}
-
+
size_t perm0=(size_t) read<Int>(perm,0);
size_t perm1=(size_t) read<Int>(perm,1);
size_t perm2=(size_t) read<Int>(perm,2);
-
+
size_t sizep0=size[perm0];
size_t sizep1=size[perm1];
size_t sizep2=size[perm2];
-
+
array *c=new array(sizep0);
for(size_t i=0; i < sizep0; ++i) {
array *ci=new array(sizep1);
@@ -1126,9 +1129,9 @@ array* :array3Transpose(array *a, array *perm)
(*ci)[j]=cij;
}
}
-
+
size_t* i=new size_t[DIM];
-
+
for(i[0]=0; i[0] < size[0]; ++i[0]) {
array *a0=read<array*>(a,i[0]);
for(i[1]=0; i[1] < size[1]; ++i[1]) {
@@ -1140,9 +1143,9 @@ array* :array3Transpose(array *a, array *perm)
}
}
}
-
- delete[] i;
- delete[] size;
+
+ delete[] i;
+ delete[] size;
return c;
}
@@ -1166,7 +1169,7 @@ Int find(boolarray *a, Int n=1)
return j;
}
-// Find all indices of true values in a boolean array.
+// Find all indices of true values in a boolean array.
Intarray *findall(boolarray *a)
{
size_t size=checkArray(a);
@@ -1229,24 +1232,24 @@ realarray2 *inverse(realarray2 *a)
realarray *solve(realarray2 *a, realarray *b, bool warn=true)
{
size_t n=checkArray(a);
-
+
if(n == 0) return new array(0);
-
+
size_t m=checkArray(b);
if(m != n) error(incommensurate);
-
+
real *A;
copyArray2C(A,a);
size_t *index=new size_t[n];
-
+
if(LUdecompose(A,n,index,warn) == 0)
return new array(0);
array *x=new array(n);
-
+
real *B;
copyArrayC(B,b);
-
+
for(size_t i=0; i < n; ++i) {
size_t ip=index[i];
real sum=B[ip];
@@ -1256,7 +1259,7 @@ realarray *solve(realarray2 *a, realarray *b, bool warn=true)
sum -= Ai[j]*B[j];
B[i]=sum;
}
-
+
for(size_t i=n; i > 0;) {
--i;
real sum=B[i];
@@ -1265,14 +1268,14 @@ realarray *solve(realarray2 *a, realarray *b, bool warn=true)
sum -= Ai[j]*B[j];
B[i]=sum/Ai[i];
}
-
+
for(size_t i=0; i < n; ++i)
(*x)[i]=B[i];
delete[] index;
delete[] B;
delete[] A;
-
+
return x;
}
@@ -1282,23 +1285,23 @@ realarray *solve(realarray2 *a, realarray *b, bool warn=true)
realarray2 *solve(realarray2 *a, realarray2 *b, bool warn=true)
{
size_t n=checkArray(a);
-
+
if(n == 0) return new array(0);
-
+
if(checkArray(b) != n) error(incommensurate);
size_t m=checkArray(read<array*>(b,0));
-
+
real *A,*B;
copyArray2C(A,a);
copyArray2C(B,b,false);
-
+
size_t *index=new size_t[n];
-
+
if(LUdecompose(A,n,index,warn) == 0)
return new array(0);
array *x=new array(n);
-
+
for(size_t i=0; i < n; ++i) {
real *Ai=A+i*n;
real *Bi=B+i*m;
@@ -1312,7 +1315,7 @@ realarray2 *solve(realarray2 *a, realarray2 *b, bool warn=true)
Bi[k]=sum;
}
}
-
+
for(size_t i=n; i > 0;) {
--i;
real *Ai=A+i*n;
@@ -1325,7 +1328,7 @@ realarray2 *solve(realarray2 *a, realarray2 *b, bool warn=true)
Bi[k]=sum/Ai[i];
}
}
-
+
for(size_t i=0; i < n; ++i) {
real *Bi=B+i*m;
array *xi=new array(m);
@@ -1333,11 +1336,11 @@ realarray2 *solve(realarray2 *a, realarray2 *b, bool warn=true)
for(size_t j=0; j < m; ++j)
(*xi)[j]=Bi[j];
}
-
+
delete[] index;
delete[] B;
delete[] A;
-
+
return x;
}
@@ -1347,14 +1350,14 @@ real determinant(realarray2 *a)
real *A;
copyArray2C(A,a);
size_t n=checkArray(a);
-
+
real det=LUdecompose(A,n,NULL,false);
size_t n1=n+1;
for(size_t i=0; i < n; ++i)
det *= A[i*n1];
-
+
delete[] A;
-
+
return det;
}
@@ -1440,16 +1443,16 @@ pair project(triple v, realarray2 *t)
array *t3=read<array*>(t,3);
if(checkArray(t0) != 4 || checkArray(t1) != 4 || checkArray(t3) != 4)
error(incommensurate);
-
+
real x=v.getx();
real y=v.gety();
real z=v.getz();
-
+
real f=read<real>(t3,0)*x+read<real>(t3,1)*y+read<real>(t3,2)*z+
read<real>(t3,3);
if(f == 0.0) dividebyzero();
f=1.0/f;
-
+
return pair((read<real>(t0,0)*x+read<real>(t0,1)*y+read<real>(t0,2)*z+
read<real>(t0,3))*f,
(read<real>(t1,0)*x+read<real>(t1,1)*y+read<real>(t1,2)*z+
@@ -1457,7 +1460,7 @@ pair project(triple v, realarray2 *t)
}
// Compute the dot product of vectors a and b.
-real dot(realarray *a, realarray *b)
+real dot(realarray *a, realarray *b)
{
size_t n=checkArrays(a,b);
real sum=0.0;
@@ -1467,7 +1470,7 @@ real dot(realarray *a, realarray *b)
}
// Compute the complex dot product of vectors a and b.
-pair dot(pairarray *a, pairarray *b)
+pair dot(pairarray *a, pairarray *b)
{
size_t n=checkArrays(a,b);
pair sum=zero;
@@ -1488,22 +1491,22 @@ realarray *tridiagonal(realarray *a, realarray *b, realarray *c, realarray *f)
size_t n=checkArrays(a,b);
checkEqual(n,checkArray(c));
checkEqual(n,checkArray(f));
-
+
array *up=new array(n);
array& u=*up;
if(n == 0) return up;
-
+
// Special case: zero Dirichlet boundary conditions
if(read<real>(a,0) == 0.0 && read<real>(c,n-1) == 0.0) {
real temp=read<real>(b,0);
if(temp == 0.0) dividebyzero();
temp=1.0/temp;
-
+
real *work=new real[n];
u[0]=read<real>(f,0)*temp;
work[0]=-read<real>(c,0)*temp;
-
+
for(size_t i=1; i < n; i++) {
real temp=(read<real>(b,i)+read<real>(a,i)*work[i-1]);
if(temp == 0.0) {delete[] work; dividebyzero();}
@@ -1514,15 +1517,15 @@ realarray *tridiagonal(realarray *a, realarray *b, realarray *c, realarray *f)
for(size_t i=n-1; i >= 1; i--)
u[i-1]=read<real>(u,i-1)+work[i-1]*read<real>(u,i);
-
+
delete[] work;
return up;
}
-
+
real binv=read<real>(b,0);
if(binv == 0.0) dividebyzero();
binv=1.0/binv;
-
+
if(n == 1) {u[0]=read<real>(f,0)*binv; return up;}
if(n == 2) {
real factor=(read<real>(b,0)*read<real>(b,1)-
@@ -1536,10 +1539,10 @@ realarray *tridiagonal(realarray *a, realarray *b, realarray *c, realarray *f)
u[1]=temp;
return up;
}
-
+
real *gamma=new real[n-2];
real *delta=new real[n-2];
-
+
gamma[0]=read<real>(c,0)*binv;
delta[0]=read<real>(a,0)*binv;
u[0]=read<real>(f,0)*binv;
@@ -1558,7 +1561,7 @@ realarray *tridiagonal(realarray *a, realarray *b, realarray *c, realarray *f)
delta[i]=-read<real>(a,i)*delta[i-1]*alphainv;
alpha -= beta*delta[i];
}
-
+
real alphainv=read<real>(b,n-2)-read<real>(a,n-2)*gamma[n-3];
if(alphainv == 0.0) {delete[] gamma; delete[] delta; dividebyzero();}
alphainv=1.0/alphainv;
@@ -1570,13 +1573,13 @@ realarray *tridiagonal(realarray *a, realarray *b, realarray *c, realarray *f)
if(temp == 0.0) {delete[] gamma; delete[] delta; dividebyzero();}
u[n-1]=temp=(fn-beta*read<real>(u,n-2))/temp;
u[n-2]=read<real>(u,n-2)-dnm1*temp;
-
+
for(size_t i=n-2; i >= 1; i--)
u[i-1]=read<real>(u,i-1)-gamma[i-1]*read<real>(u,i)-delta[i-1]*temp;
-
+
delete[] delta;
delete[] gamma;
-
+
return up;
}
@@ -1587,18 +1590,18 @@ real newton(Int iterations=100, callableReal *f, callableReal *fprime, real x,
static const real fuzz=1000.0*DBL_EPSILON;
Int i=0;
size_t oldPrec=0;
- if(verbose)
+ if(verbose)
oldPrec=cout.precision(DBL_DIG);
real diff=DBL_MAX;
real lastdiff;
do {
real x0=x;
-
+
Stack->push(x);
fprime->call(Stack);
real dfdx=pop<real>(Stack);
-
+
if(dfdx == 0.0) {
x=DBL_MAX;
break;
@@ -1607,14 +1610,14 @@ real newton(Int iterations=100, callableReal *f, callableReal *fprime, real x,
Stack->push(x);
f->call(Stack);
real fx=pop<real>(Stack);
-
+
x -= fx/dfdx;
lastdiff=diff;
-
+
if(verbose)
cout << "Newton-Raphson: " << x << endl;
-
+
diff=fabs(x-x0);
if(++i == iterations) {
x=DBL_MAX;
@@ -1634,19 +1637,19 @@ real newton(Int iterations=100, callableReal *f, callableReal *fprime, real x1,
{
static const real fuzz=1000.0*DBL_EPSILON;
size_t oldPrec=0;
- if(verbose)
+ if(verbose)
oldPrec=cout.precision(DBL_DIG);
Stack->push(x1);
f->call(Stack);
real f1=pop<real>(Stack);
if(f1 == 0.0) return x1;
-
+
Stack->push(x2);
f->call(Stack);
real f2=pop<real>(Stack);
if(f2 == 0.0) return x2;
-
+
if((f1 > 0.0 && f2 > 0.0) || (f1 < 0.0 && f2 < 0.0)) {
ostringstream buf;
buf << "root not bracketed, f(x1)=" << f1 << ", f(x2)=" << f2 << endl;
@@ -1660,7 +1663,7 @@ real newton(Int iterations=100, callableReal *f, callableReal *fprime, real x1,
x1=x2;
x2=temp;
}
-
+
if(verbose)
cout << "midpoint: " << x << endl;
@@ -1668,7 +1671,7 @@ real newton(Int iterations=100, callableReal *f, callableReal *fprime, real x1,
Stack->push(x);
f->call(Stack);
real y=pop<real>(Stack);
-
+
Stack->push(x);
fprime->call(Stack);
real dy=pop<real>(Stack);
@@ -1692,11 +1695,11 @@ real newton(Int iterations=100, callableReal *f, callableReal *fprime, real x1,
if(temp == x) return x;
}
if(fabs(dx) < fuzz*fabs(x)) return x;
-
+
Stack->push(x);
f->call(Stack);
y=pop<real>(Stack);
-
+
Stack->push(x);
fprime->call(Stack);
dy=pop<real>(Stack);
@@ -1722,10 +1725,10 @@ real _findroot(callableReal *f, real a, real b, real tolerance,
{
if(fa == 0.0) return a;
if(fb == 0.0) return b;
-
+
const char* oppsign="fa and fb must have opposite signs";
int sign;
-
+
if(fa < 0.0) {
if(fb < 0.0) error(oppsign);
sign=1;
@@ -1742,7 +1745,7 @@ real _findroot(callableReal *f, real a, real b, real tolerance,
while(b-a > tolerance) {
t=(a+b)*0.5;
-
+
Stack->push(t);
f->call(Stack);
ft=sign*pop<double>(Stack);
@@ -1756,11 +1759,11 @@ real _findroot(callableReal *f, real a, real b, real tolerance,
real q_A=2.0*(fa-2.0*ft+fb)*factor*factor;
real q_B=(fb-fa)*factor;
quadraticroots Q=quadraticroots(q_A,q_B,ft);
-
+
// If the interpolation somehow failed, continue on to the next binary
// search step. This may or may not be possible, depending on what
// theoretical guarantees are provided by the quadraticroots function.
-
+
real root;
bool found=Q.roots > 0;
if(found) {
@@ -1773,7 +1776,7 @@ real _findroot(callableReal *f, real a, real b, real tolerance,
}
}
}
-
+
if(found) {
if(ft > 0.0) {
b=t;
@@ -1782,7 +1785,7 @@ real _findroot(callableReal *f, real a, real b, real tolerance,
a=t;
fa=ft;
}
-
+
t=root;
// If the interpolated value is close to one edge of
@@ -1791,7 +1794,7 @@ real _findroot(callableReal *f, real a, real b, real tolerance,
real margin=(b-a)*1.0e-3;
if(t-a < margin) t=a+2.0*(t-a);
else if(b-t < margin) t=b-2.0*(b-t);
-
+
Stack->push(t);
f->call(Stack);
ft=sign*pop<double>(Stack);
@@ -1799,7 +1802,7 @@ real _findroot(callableReal *f, real a, real b, real tolerance,
if(ft == 0.0) return t;
}
}
-
+
if(ft > 0.0) {
b=t;
fb=ft;
@@ -1834,13 +1837,13 @@ pairarray* fft(pairarray *a, Int sign=1)
if(n) {
Complex *f=utils::ComplexAlign(n);
fftwpp::fft1d Forward(n,intcast(sign),f);
-
+
for(size_t i=0; i < n; i++) {
pair z=read<pair>(a,i);
f[i]=Complex(z.getx(),z.gety());
}
Forward.fft(f);
-
+
for(size_t i=0; i < n; i++) {
Complex z=f[i];
(*c)[i]=pair(z.real(),z.imag());
@@ -1969,14 +1972,14 @@ Intarray2 *triangulate(pairarray *z)
XYZ *pxyz=new XYZ[nv+3];
ITRIANGLE *V=new ITRIANGLE[4*nv];
-
+
for(size_t i=0; i < nv; ++i) {
pair w=read<pair>(z,i);
pxyz[i].p[0]=w.getx();
pxyz[i].p[1]=w.gety();
pxyz[i].i=(Int) i;
}
-
+
Int ntri;
Triangulate((Int) nv,pxyz,V,ntri,true,false);
@@ -1990,7 +1993,7 @@ Intarray2 *triangulate(pairarray *z)
(*ti)[1]=pxyz[Vi->p2].i;
(*ti)[2]=pxyz[Vi->p3].i;
}
-
+
delete[] V;
delete[] pxyz;
return t;
@@ -2041,13 +2044,13 @@ real change2(triplearray2 *a)
{
size_t n=checkArray(a);
if(n == 0) return 0.0;
-
+
vm::array *a0=vm::read<vm::array*>(a,0);
size_t m=checkArray(a0);
if(m == 0) return 0.0;
triple a00=vm::read<triple>(a0,0);
real M=0.0;
-
+
for(size_t i=0; i < n; ++i) {
vm::array *ai=vm::read<vm::array*>(a,i);
size_t m=checkArray(ai);
@@ -2114,25 +2117,25 @@ realarray *_projection()
gl::projection P=gl::camera();
size_t k=0;
(*a)[k++]=P.orthographic ? 1.0 : 0.0;
-
+
triple camera=P.camera;
(*a)[k++]=camera.getx();
(*a)[k++]=camera.gety();
(*a)[k++]=camera.getz();
-
+
triple up=P.up;
(*a)[k++]=up.getx();
(*a)[k++]=up.gety();
(*a)[k++]=up.getz();
-
+
triple target=P.target;
(*a)[k++]=target.getx();
(*a)[k++]=target.gety();
(*a)[k++]=target.getz();
-
+
(*a)[k++]=P.zoom;
(*a)[k++]=P.angle;
-
+
(*a)[k++]=P.viewportshift.getx();
(*a)[k++]=P.viewportshift.gety();
#endif
diff --git a/Build/source/utils/asymptote/runbacktrace.in b/Build/source/utils/asymptote/runbacktrace.in
index 416ac437166..b8c11b0f618 100644
--- a/Build/source/utils/asymptote/runbacktrace.in
+++ b/Build/source/utils/asymptote/runbacktrace.in
@@ -32,4 +32,4 @@ void print_random_addresses(Int n=1)
error("print_random_addresses() requires ./configure --enable-gc-debug");
unused(&n); // Avoid unused variable warning message.
#endif
-}
+}
diff --git a/Build/source/utils/asymptote/runfile.cc b/Build/source/utils/asymptote/runfile.cc
index bdf9826d632..72ead073b2c 100644
--- a/Build/source/utils/asymptote/runfile.cc
+++ b/Build/source/utils/asymptote/runfile.cc
@@ -68,7 +68,7 @@ function *realRealFunction();
#include "array.h"
#ifdef __CYGWIN__
-extern "C" int mkstemp(char *c);
+ extern "C" int mkstemp(char *c);
#endif
using namespace camp;
@@ -127,11 +127,11 @@ void gen_runfile3(stack *Stack)
f=new ibfile(name,check);
} else if(mode == "xdr") {
#ifdef HAVE_RPC_RPC_H
- f=new ixfile(name,check);
-#else
- ostringstream buf;
- buf << name << ": XDR read support not enabled";
- error(buf);
+ f=new ixfile(name,check);
+#else
+ ostringstream buf;
+ buf << name << ": XDR read support not enabled";
+ error(buf);
#endif
} else if(mode == "") {
char c=comment.empty() ? (char) 0 : comment[0];
@@ -142,7 +142,7 @@ void gen_runfile3(stack *Stack)
buf << name << ": invalid file mode '" << mode << "'";
error(buf);
}
-
+
f->open();
{Stack->push<file*>(f); return;}
}
@@ -167,7 +167,7 @@ void gen_runfile4(stack *Stack)
if(update)
f=new ioxfile(name);
else f=new oxfile(name);
-#else
+#else
ostringstream buf;
buf << name << ": XDR write support not enabled";
error(buf);
@@ -183,10 +183,10 @@ void gen_runfile4(stack *Stack)
buf << name << ": invalid file mode '" << mode << "'";
error(buf);
}
-
+
f->open();
if(update) f->seek(0,false);
-
+
{Stack->push<file*>(f); return;}
}
@@ -263,82 +263,79 @@ void gen_runfile12(stack *Stack)
#line 145 "runfile.in"
char c=0;
if(f->isOpen()) f->read(c);
- static char str[2];
- str[0]=c;
- str[1]=0;
- {Stack->push<string>(string(str)); return;}
+ {Stack->push<string>(string(1,c)); return;}
}
-#line 154 "runfile.in"
+#line 151 "runfile.in"
// Int tell(file *f);
void gen_runfile13(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
-#line 155 "runfile.in"
+#line 152 "runfile.in"
{Stack->push<Int>(f->tell()); return;}
}
-#line 159 "runfile.in"
+#line 156 "runfile.in"
// void seek(file *f, Int pos);
void gen_runfile14(stack *Stack)
{
Int pos=vm::pop<Int>(Stack);
file * f=vm::pop<file *>(Stack);
-#line 160 "runfile.in"
+#line 157 "runfile.in"
f->seek(pos,pos >= 0);
}
-#line 164 "runfile.in"
+#line 161 "runfile.in"
// void seekeof(file *f);
void gen_runfile15(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
-#line 165 "runfile.in"
+#line 162 "runfile.in"
f->seek(0,false);
}
-#line 169 "runfile.in"
+#line 166 "runfile.in"
void namePart(stack *Stack)
{
file f=vm::pop<file>(Stack);
-#line 170 "runfile.in"
+#line 167 "runfile.in"
{Stack->push<string>(f.filename()); return;}
}
-#line 174 "runfile.in"
+#line 171 "runfile.in"
void modePart(stack *Stack)
{
file f=vm::pop<file>(Stack);
-#line 175 "runfile.in"
+#line 172 "runfile.in"
{Stack->push<string>(f.FileMode()); return;}
}
// Set file dimensions
-#line 180 "runfile.in"
+#line 177 "runfile.in"
void dimensionSetHelper(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
Int nz=vm::pop<Int>(Stack,-1);
Int ny=vm::pop<Int>(Stack,-1);
Int nx=vm::pop<Int>(Stack,-1);
-#line 181 "runfile.in"
+#line 178 "runfile.in"
f->dimension(nx,ny,nz);
{Stack->push<file*>(f); return;}
}
-#line 186 "runfile.in"
+#line 183 "runfile.in"
void dimensionSet(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
-#line 187 "runfile.in"
+#line 184 "runfile.in"
{Stack->push<callable*>(new thunk(new bfunc(dimensionSetHelper),f)); return;}
}
-#line 191 "runfile.in"
+#line 188 "runfile.in"
void dimensionPart(stack *Stack)
{
file f=vm::pop<file>(Stack);
-#line 192 "runfile.in"
+#line 189 "runfile.in"
array *a=new array(3);
(*a)[0]=f.Nx();
(*a)[1]=f.Ny();
@@ -347,247 +344,249 @@ void dimensionPart(stack *Stack)
}
// Set file f to read arrays in line-at-a-time mode
-#line 201 "runfile.in"
+#line 198 "runfile.in"
void lineSetHelper(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
bool b=vm::pop<bool>(Stack,true);
-#line 202 "runfile.in"
+#line 199 "runfile.in"
f->LineMode(b);
{Stack->push<file*>(f); return;}
}
-#line 207 "runfile.in"
+#line 204 "runfile.in"
void lineSet(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
-#line 208 "runfile.in"
+#line 205 "runfile.in"
{Stack->push<callable*>(new thunk(new bfunc(lineSetHelper),f)); return;}
}
-#line 212 "runfile.in"
+#line 209 "runfile.in"
void linePart(stack *Stack)
{
file f=vm::pop<file>(Stack);
-#line 213 "runfile.in"
+#line 210 "runfile.in"
{Stack->push<bool>(f.LineMode()); return;}
}
// Set file to read comma-separated values
-#line 218 "runfile.in"
+#line 215 "runfile.in"
void csvSetHelper(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
bool b=vm::pop<bool>(Stack,true);
-#line 219 "runfile.in"
+#line 216 "runfile.in"
f->CSVMode(b);
{Stack->push<file*>(f); return;}
}
-#line 224 "runfile.in"
+#line 221 "runfile.in"
void csvSet(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
-#line 225 "runfile.in"
+#line 222 "runfile.in"
{Stack->push<callable*>(new thunk(new bfunc(csvSetHelper),f)); return;}
}
-#line 229 "runfile.in"
+#line 226 "runfile.in"
void csvPart(stack *Stack)
{
file f=vm::pop<file>(Stack);
-#line 230 "runfile.in"
+#line 227 "runfile.in"
{Stack->push<bool>(f.CSVMode()); return;}
}
// Set file to read whitespace-separated values
-#line 235 "runfile.in"
+#line 232 "runfile.in"
void wordSetHelper(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
bool b=vm::pop<bool>(Stack,true);
-#line 236 "runfile.in"
+#line 233 "runfile.in"
f->WordMode(b);
{Stack->push<file*>(f); return;}
}
-#line 241 "runfile.in"
+#line 238 "runfile.in"
void wordSet(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
-#line 242 "runfile.in"
+#line 239 "runfile.in"
{Stack->push<callable*>(new thunk(new bfunc(wordSetHelper),f)); return;}
}
-#line 246 "runfile.in"
+#line 243 "runfile.in"
void wordPart(stack *Stack)
{
file f=vm::pop<file>(Stack);
-#line 247 "runfile.in"
+#line 244 "runfile.in"
{Stack->push<bool>(f.WordMode()); return;}
}
// Set file to read/write single precision real XDR values.
-#line 252 "runfile.in"
+#line 249 "runfile.in"
void singlerealSetHelper(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
bool b=vm::pop<bool>(Stack,true);
-#line 253 "runfile.in"
+#line 250 "runfile.in"
f->SingleReal(b);
{Stack->push<file*>(f); return;}
}
-#line 258 "runfile.in"
+#line 255 "runfile.in"
void singlerealSet(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
-#line 259 "runfile.in"
+#line 256 "runfile.in"
{Stack->push<callable*>(new thunk(new bfunc(singlerealSetHelper),f)); return;}
}
-#line 263 "runfile.in"
+#line 260 "runfile.in"
void singlerealPart(stack *Stack)
{
file f=vm::pop<file>(Stack);
-#line 264 "runfile.in"
+#line 261 "runfile.in"
{Stack->push<bool>(f.SingleReal()); return;}
}
// Set file to read/write single precision int XDR values.
-#line 269 "runfile.in"
+#line 266 "runfile.in"
void singleintSetHelper(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
bool b=vm::pop<bool>(Stack,true);
-#line 270 "runfile.in"
+#line 267 "runfile.in"
f->SingleInt(b);
{Stack->push<file*>(f); return;}
}
-#line 275 "runfile.in"
+#line 272 "runfile.in"
void singleintSet(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
-#line 276 "runfile.in"
+#line 273 "runfile.in"
{Stack->push<callable*>(new thunk(new bfunc(singleintSetHelper),f)); return;}
}
-#line 280 "runfile.in"
+#line 277 "runfile.in"
void singleintPart(stack *Stack)
{
file f=vm::pop<file>(Stack);
-#line 281 "runfile.in"
+#line 278 "runfile.in"
{Stack->push<bool>(f.SingleInt()); return;}
}
// Set file to read/write signed int XDR values.
-#line 286 "runfile.in"
+#line 283 "runfile.in"
void signedintSetHelper(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
bool b=vm::pop<bool>(Stack,true);
-#line 287 "runfile.in"
+#line 284 "runfile.in"
f->SignedInt(b);
{Stack->push<file*>(f); return;}
}
-#line 292 "runfile.in"
+#line 289 "runfile.in"
void signedintSet(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
-#line 293 "runfile.in"
+#line 290 "runfile.in"
{Stack->push<callable*>(new thunk(new bfunc(signedintSetHelper),f)); return;}
}
-#line 297 "runfile.in"
+#line 294 "runfile.in"
void signedintPart(stack *Stack)
{
file f=vm::pop<file>(Stack);
-#line 298 "runfile.in"
+#line 295 "runfile.in"
{Stack->push<bool>(f.SignedInt()); return;}
}
// Set file to read an arrayi (i int sizes followed by an i-dimensional array)
-#line 303 "runfile.in"
+#line 300 "runfile.in"
void readSetHelper(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
Int i=vm::pop<Int>(Stack);
-#line 304 "runfile.in"
+#line 301 "runfile.in"
switch(i) {
case 1:
- f->dimension(-2);
- break;
-
+ f->dimension(-2);
+ break;
+
case 2:
- f->dimension(-2,-2);
- break;
-
+ f->dimension(-2,-2);
+ break;
+
case 3:
- f->dimension(-2,-2,-2);
- break;
-
+ f->dimension(-2,-2,-2);
+ break;
+
default:
- f->dimension();
+ f->dimension();
}
-
+
{Stack->push<file*>(f); return;}
}
-#line 325 "runfile.in"
+#line 322 "runfile.in"
void readSet(stack *Stack)
{
file * f=vm::pop<file *>(Stack);
-#line 326 "runfile.in"
+#line 323 "runfile.in"
{Stack->push<callable*>(new thunk(new bfunc(readSetHelper),f)); return;}
}
// Delete file named s.
-#line 331 "runfile.in"
+#line 328 "runfile.in"
// Int delete(string s);
void gen_runfile41(stack *Stack)
{
string s=vm::pop<string>(Stack);
-#line 332 "runfile.in"
+#line 329 "runfile.in"
s=outpath(s);
Int rc=unlink(s.c_str());
- if(rc == 0 && verbose > 0)
+ if(rc == 0 && verbose > 0)
cout << "Deleted " << s << endl;
{Stack->push<Int>(rc); return;}
}
// Rename file "from" to file "to".
-#line 341 "runfile.in"
+#line 338 "runfile.in"
// Int rename(string from, string to);
void gen_runfile42(stack *Stack)
{
string to=vm::pop<string>(Stack);
string from=vm::pop<string>(Stack);
-#line 342 "runfile.in"
+#line 339 "runfile.in"
from=outpath(from);
to=outpath(to);
Int rc=rename(from.c_str(),to.c_str());
- if(rc == 0 && verbose > 0)
+ if(rc == 0 && verbose > 0)
cout << "Renamed " << from << " to " << to << endl;
{Stack->push<Int>(rc); return;}
}
-// Create a unique temporary file name.
-#line 352 "runfile.in"
+// Create a uniquely named temporary file.
+#line 349 "runfile.in"
// string mktemp(string s);
void gen_runfile43(stack *Stack)
{
string s=vm::pop<string>(Stack);
-#line 353 "runfile.in"
- char *S=Strdup(s+"XXXXXX");
+#line 350 "runfile.in"
+ char *S=StrdupMalloc(s+"XXXXXX");
int fd=mkstemp(S);
if(fd < 0) {
ostringstream buf;
buf << "Could not create unique temporary filename based on " << s;
error(buf);
}
- {Stack->push<string>(S); return;}
+ string T(S);
+ free(S);
+ {Stack->push<string>(T); return;}
}
} // namespace run
@@ -603,9 +602,9 @@ void gen_runfile_venv(venv &ve)
#line 38 "runfile.in"
REGISTER_BLTIN(run::nullFile,"nullFile");
#line 43 "runfile.in"
- addFunc(ve, run::gen_runfile3, primFile(), SYM(input), formal(primString() , SYM(name), true, false), formal(primBoolean(), SYM(check), true, false), formal(primString() , SYM(comment), true, false), formal(primString() , SYM(mode), true, false));
+ addFunc(ve, run::gen_runfile3, primFile(), SYM(input), formal(primString(), SYM(name), true, false), formal(primBoolean(), SYM(check), true, false), formal(primString(), SYM(comment), true, false), formal(primString(), SYM(mode), true, false));
#line 71 "runfile.in"
- addFunc(ve, run::gen_runfile4, primFile(), SYM(output), formal(primString() , SYM(name), true, false), formal(primBoolean(), SYM(update), true, false), formal(primString() , SYM(comment), true, false), formal(primString() , SYM(mode), true, false));
+ addFunc(ve, run::gen_runfile4, primFile(), SYM(output), formal(primString(), SYM(name), true, false), formal(primBoolean(), SYM(update), true, false), formal(primString(), SYM(comment), true, false), formal(primString(), SYM(mode), true, false));
#line 108 "runfile.in"
addFunc(ve, run::gen_runfile5, primBoolean(), SYM(eof), formal(primFile(), SYM(f), false, false));
#line 113 "runfile.in"
@@ -621,69 +620,69 @@ void gen_runfile_venv(venv &ve)
#line 139 "runfile.in"
addFunc(ve, run::gen_runfile11, primVoid(), SYM(flush), formal(primFile(), SYM(f), false, false));
#line 144 "runfile.in"
- addFunc(ve, run::gen_runfile12, primString() , SYM(getc), formal(primFile(), SYM(f), false, false));
-#line 154 "runfile.in"
+ addFunc(ve, run::gen_runfile12, primString(), SYM(getc), formal(primFile(), SYM(f), false, false));
+#line 151 "runfile.in"
addFunc(ve, run::gen_runfile13, primInt(), SYM(tell), formal(primFile(), SYM(f), false, false));
-#line 159 "runfile.in"
+#line 156 "runfile.in"
addFunc(ve, run::gen_runfile14, primVoid(), SYM(seek), formal(primFile(), SYM(f), false, false), formal(primInt(), SYM(pos), false, false));
-#line 164 "runfile.in"
+#line 161 "runfile.in"
addFunc(ve, run::gen_runfile15, primVoid(), SYM(seekeof), formal(primFile(), SYM(f), false, false));
-#line 169 "runfile.in"
+#line 166 "runfile.in"
REGISTER_BLTIN(run::namePart,"namePart");
-#line 174 "runfile.in"
+#line 171 "runfile.in"
REGISTER_BLTIN(run::modePart,"modePart");
-#line 179 "runfile.in"
+#line 176 "runfile.in"
REGISTER_BLTIN(run::dimensionSetHelper,"dimensionSetHelper");
-#line 186 "runfile.in"
+#line 183 "runfile.in"
REGISTER_BLTIN(run::dimensionSet,"dimensionSet");
-#line 191 "runfile.in"
+#line 188 "runfile.in"
REGISTER_BLTIN(run::dimensionPart,"dimensionPart");
-#line 200 "runfile.in"
+#line 197 "runfile.in"
REGISTER_BLTIN(run::lineSetHelper,"lineSetHelper");
-#line 207 "runfile.in"
+#line 204 "runfile.in"
REGISTER_BLTIN(run::lineSet,"lineSet");
-#line 212 "runfile.in"
+#line 209 "runfile.in"
REGISTER_BLTIN(run::linePart,"linePart");
-#line 217 "runfile.in"
+#line 214 "runfile.in"
REGISTER_BLTIN(run::csvSetHelper,"csvSetHelper");
-#line 224 "runfile.in"
+#line 221 "runfile.in"
REGISTER_BLTIN(run::csvSet,"csvSet");
-#line 229 "runfile.in"
+#line 226 "runfile.in"
REGISTER_BLTIN(run::csvPart,"csvPart");
-#line 234 "runfile.in"
+#line 231 "runfile.in"
REGISTER_BLTIN(run::wordSetHelper,"wordSetHelper");
-#line 241 "runfile.in"
+#line 238 "runfile.in"
REGISTER_BLTIN(run::wordSet,"wordSet");
-#line 246 "runfile.in"
+#line 243 "runfile.in"
REGISTER_BLTIN(run::wordPart,"wordPart");
-#line 251 "runfile.in"
+#line 248 "runfile.in"
REGISTER_BLTIN(run::singlerealSetHelper,"singlerealSetHelper");
-#line 258 "runfile.in"
+#line 255 "runfile.in"
REGISTER_BLTIN(run::singlerealSet,"singlerealSet");
-#line 263 "runfile.in"
+#line 260 "runfile.in"
REGISTER_BLTIN(run::singlerealPart,"singlerealPart");
-#line 268 "runfile.in"
+#line 265 "runfile.in"
REGISTER_BLTIN(run::singleintSetHelper,"singleintSetHelper");
-#line 275 "runfile.in"
+#line 272 "runfile.in"
REGISTER_BLTIN(run::singleintSet,"singleintSet");
-#line 280 "runfile.in"
+#line 277 "runfile.in"
REGISTER_BLTIN(run::singleintPart,"singleintPart");
-#line 285 "runfile.in"
+#line 282 "runfile.in"
REGISTER_BLTIN(run::signedintSetHelper,"signedintSetHelper");
-#line 292 "runfile.in"
+#line 289 "runfile.in"
REGISTER_BLTIN(run::signedintSet,"signedintSet");
-#line 297 "runfile.in"
+#line 294 "runfile.in"
REGISTER_BLTIN(run::signedintPart,"signedintPart");
-#line 302 "runfile.in"
+#line 299 "runfile.in"
REGISTER_BLTIN(run::readSetHelper,"readSetHelper");
-#line 325 "runfile.in"
+#line 322 "runfile.in"
REGISTER_BLTIN(run::readSet,"readSet");
-#line 330 "runfile.in"
- addFunc(ve, run::gen_runfile41, primInt(), SYM(delete), formal(primString() , SYM(s), false, false));
-#line 340 "runfile.in"
- addFunc(ve, run::gen_runfile42, primInt(), SYM(rename), formal(primString() , SYM(from), false, false), formal(primString() , SYM(to), false, false));
-#line 351 "runfile.in"
- addFunc(ve, run::gen_runfile43, primString() , SYM(mktemp), formal(primString() , SYM(s), false, false));
+#line 327 "runfile.in"
+ addFunc(ve, run::gen_runfile41, primInt(), SYM(delete), formal(primString(), SYM(s), false, false));
+#line 337 "runfile.in"
+ addFunc(ve, run::gen_runfile42, primInt(), SYM(rename), formal(primString(), SYM(from), false, false), formal(primString(), SYM(to), false, false));
+#line 348 "runfile.in"
+ addFunc(ve, run::gen_runfile43, primString(), SYM(mktemp), formal(primString(), SYM(s), false, false));
}
} // namespace trans
diff --git a/Build/source/utils/asymptote/runfile.in b/Build/source/utils/asymptote/runfile.in
index d9186eee6d7..da08d523ef1 100644
--- a/Build/source/utils/asymptote/runfile.in
+++ b/Build/source/utils/asymptote/runfile.in
@@ -13,7 +13,7 @@ file* => primFile()
#include "array.h"
#ifdef __CYGWIN__
-extern "C" int mkstemp(char *c);
+ extern "C" int mkstemp(char *c);
#endif
using namespace camp;
@@ -48,11 +48,11 @@ file* input(string name=emptystring, bool check=true,
f=new ibfile(name,check);
} else if(mode == "xdr") {
#ifdef HAVE_RPC_RPC_H
- f=new ixfile(name,check);
-#else
- ostringstream buf;
- buf << name << ": XDR read support not enabled";
- error(buf);
+ f=new ixfile(name,check);
+#else
+ ostringstream buf;
+ buf << name << ": XDR read support not enabled";
+ error(buf);
#endif
} else if(mode == "") {
char c=comment.empty() ? (char) 0 : comment[0];
@@ -63,7 +63,7 @@ file* input(string name=emptystring, bool check=true,
buf << name << ": invalid file mode '" << mode << "'";
error(buf);
}
-
+
f->open();
return f;
}
@@ -82,7 +82,7 @@ file* output(string name=emptystring, bool update=false,
if(update)
f=new ioxfile(name);
else f=new oxfile(name);
-#else
+#else
ostringstream buf;
buf << name << ": XDR write support not enabled";
error(buf);
@@ -98,10 +98,10 @@ file* output(string name=emptystring, bool update=false,
buf << name << ": invalid file mode '" << mode << "'";
error(buf);
}
-
+
f->open();
if(update) f->seek(0,false);
-
+
return f;
}
@@ -130,13 +130,13 @@ void close(file *f)
f->close();
}
-Int precision(file *f=NULL, Int digits=0)
+Int precision(file *f=NULL, Int digits=0)
{
if(f == 0) f=&camp::Stdout;
return f->precision(digits);
}
-void flush(file *f)
+void flush(file *f)
{
f->flush();
}
@@ -145,10 +145,7 @@ string getc(file *f)
{
char c=0;
if(f->isOpen()) f->read(c);
- static char str[2];
- str[0]=c;
- str[1]=0;
- return string(str);
+ return string(1,c);
}
Int tell(file *f)
@@ -304,21 +301,21 @@ file* :readSetHelper(Int i, file *f)
{
switch(i) {
case 1:
- f->dimension(-2);
- break;
-
+ f->dimension(-2);
+ break;
+
case 2:
- f->dimension(-2,-2);
- break;
-
+ f->dimension(-2,-2);
+ break;
+
case 3:
- f->dimension(-2,-2,-2);
- break;
-
+ f->dimension(-2,-2,-2);
+ break;
+
default:
- f->dimension();
+ f->dimension();
}
-
+
return f;
}
@@ -328,35 +325,37 @@ callable* :readSet(file *f)
}
// Delete file named s.
-Int delete(string s)
+Int delete(string s)
{
s=outpath(s);
Int rc=unlink(s.c_str());
- if(rc == 0 && verbose > 0)
+ if(rc == 0 && verbose > 0)
cout << "Deleted " << s << endl;
return rc;
}
// Rename file "from" to file "to".
-Int rename(string from, string to)
+Int rename(string from, string to)
{
from=outpath(from);
to=outpath(to);
Int rc=rename(from.c_str(),to.c_str());
- if(rc == 0 && verbose > 0)
+ if(rc == 0 && verbose > 0)
cout << "Renamed " << from << " to " << to << endl;
return rc;
}
-// Create a unique temporary file name.
+// Create a uniquely named temporary file.
string mktemp(string s)
{
- char *S=Strdup(s+"XXXXXX");
+ char *S=StrdupMalloc(s+"XXXXXX");
int fd=mkstemp(S);
if(fd < 0) {
ostringstream buf;
buf << "Could not create unique temporary filename based on " << s;
error(buf);
}
- return S;
+ string T(S);
+ free(S);
+ return T;
}
diff --git a/Build/source/utils/asymptote/runhistory.cc b/Build/source/utils/asymptote/runhistory.cc
index 03d64d57ab7..f6a9cc8cf95 100644
--- a/Build/source/utils/asymptote/runhistory.cc
+++ b/Build/source/utils/asymptote/runhistory.cc
@@ -75,6 +75,10 @@ using namespace run;
typedef array stringarray;
using types::stringArray;
+namespace camp {
+bool allowRender=true;
+}
+
#if defined(HAVE_LIBREADLINE) && defined(HAVE_LIBCURSES)
#include <readline/readline.h>
#include <readline/history.h>
@@ -83,7 +87,7 @@ struct historyState {
bool store;
HISTORY_STATE state;
};
-
+
typedef mem::map<CONST string, historyState> historyMap_t;
historyMap_t historyMap;
static HISTORY_STATE history_save;
@@ -100,7 +104,7 @@ void store_history(HISTORY_STATE *dest)
}
}
-stringarray* get_history(Int n)
+stringarray* get_history(Int n)
{
int N=intcast(n);
if(N <= 0) N=history_length;
@@ -111,14 +115,15 @@ stringarray* get_history(Int n)
HIST_ENTRY *last=history_get(offset+i);
string s=last ? last->line : "";
(*a)[i]=s;
- }
+ }
return a;
}
-string historyfilename(const string &name)
+string historyfilename(const string &name)
{
return historyname+"_"+name;
}
+
#endif
namespace run {
@@ -134,7 +139,7 @@ void cleanup()
#if defined(HAVE_LIBREADLINE) && defined(HAVE_LIBCURSES)
store_history(&history_save);
int nlines=intcast(getSetting<Int>("historylines"));
- for(historyMap_t::iterator h=historyMap.begin(); h != historyMap.end();
+ for(historyMap_t::iterator h=historyMap.begin(); h != historyMap.end();
++h) {
history_set_history_state(&h->second.state);
if(h->second.store) {
@@ -147,7 +152,7 @@ void cleanup()
#endif
#ifdef HAVE_LIBGSL
trans::GSLrngFree();
-#endif
+#endif
}
}
@@ -161,18 +166,18 @@ void cleanup()
#endif
namespace run {
// Return the last n lines of the history named name.
-#line 105 "runhistory.in"
+#line 110 "runhistory.in"
// stringarray* history(string name, Int n=1);
void gen_runhistory0(stack *Stack)
{
Int n=vm::pop<Int>(Stack,1);
string name=vm::pop<string>(Stack);
-#line 106 "runhistory.in"
+#line 111 "runhistory.in"
#if defined(HAVE_LIBREADLINE) && defined(HAVE_LIBCURSES)
bool newhistory=historyMap.find(name) == historyMap.end();
-
+
string filename;
-
+
if(newhistory) {
filename=historyfilename(name);
std::ifstream exists(filename.c_str());
@@ -182,15 +187,15 @@ void gen_runhistory0(stack *Stack)
store_history(&history_save);
HISTORY_STATE& history=historyMap[name].state;
history_set_history_state(&history);
-
+
if(newhistory)
read_history(filename.c_str());
array *a=get_history(n);
-
+
store_history(&history);
history_set_history_state(&history_save);
-
+
{Stack->push<stringarray*>(a); return;}
#else
unused(&n);
@@ -199,12 +204,12 @@ void gen_runhistory0(stack *Stack)
}
// Return the last n lines of the interactive history.
-#line 138 "runhistory.in"
+#line 143 "runhistory.in"
// stringarray* history(Int n=0);
void gen_runhistory1(stack *Stack)
{
Int n=vm::pop<Int>(Stack,0);
-#line 139 "runhistory.in"
+#line 144 "runhistory.in"
#if defined(HAVE_LIBREADLINE) && defined(HAVE_LIBCURSES)
{Stack->push<stringarray*>(get_history(n)); return;}
#else
@@ -215,19 +220,19 @@ void gen_runhistory1(stack *Stack)
// Prompt for a string using prompt, the GNU readline library, and a
// local history named name.
-#line 150 "runhistory.in"
+#line 155 "runhistory.in"
// string readline(string prompt=emptystring, string name=emptystring, bool tabcompletion=false);
void gen_runhistory2(stack *Stack)
{
bool tabcompletion=vm::pop<bool>(Stack,false);
string name=vm::pop<string>(Stack,emptystring);
string prompt=vm::pop<string>(Stack,emptystring);
-#line 152 "runhistory.in"
+#line 157 "runhistory.in"
if(!(isatty(STDIN_FILENO) || getSetting<Int>("inpipe") >= 0))
{Stack->push<string>(emptystring); return;}
#if defined(HAVE_LIBREADLINE) && defined(HAVE_LIBCURSES)
interact::init_readline(tabcompletion);
-
+
store_history(&history_save);
bool newhistory=historyMap.find(name) == historyMap.end();
historyState& h=historyMap[name];
@@ -236,7 +241,7 @@ void gen_runhistory2(stack *Stack)
if(newhistory)
read_history(historyfilename(name).c_str());
-
+
static char *line=NULL;
/* Return the memory to the free pool
if the buffer has already been allocated. */
@@ -244,12 +249,14 @@ void gen_runhistory2(stack *Stack)
free(line);
line=NULL;
}
-
+
/* Get a line from the user. */
+ allowRender=false;
line=readline(prompt.c_str());
-
+ allowRender=true;
+
if(!line) cout << endl;
-
+
history_set_history_state(&history_save);
{Stack->push<string>(line ? string(line) : emptystring); return;}
@@ -264,14 +271,14 @@ void gen_runhistory2(stack *Stack)
// Save a string in a local history named name.
// If store=true, store the local history in the file historyfilename(name).
-#line 194 "runhistory.in"
+#line 201 "runhistory.in"
// void saveline(string name, string value, bool store=true);
void gen_runhistory3(stack *Stack)
{
bool store=vm::pop<bool>(Stack,true);
string value=vm::pop<string>(Stack);
string name=vm::pop<string>(Stack);
-#line 195 "runhistory.in"
+#line 202 "runhistory.in"
#if defined(HAVE_LIBREADLINE) && defined(HAVE_LIBCURSES)
store_history(&history_save);
bool newhistory=historyMap.find(name) == historyMap.end();
@@ -282,7 +289,7 @@ void gen_runhistory3(stack *Stack)
if(newhistory)
read_history(historyfilename(name).c_str());
-
+
if(value != "") {
add_history(value.c_str());
if(store) {
@@ -290,12 +297,12 @@ void gen_runhistory3(stack *Stack)
hout << value << endl;
}
}
-
+
store_history(&history);
history_set_history_state(&history_save);
#else
unused(&store);
-#endif
+#endif
}
} // namespace run
@@ -304,14 +311,14 @@ namespace trans {
void gen_runhistory_venv(venv &ve)
{
-#line 104 "runhistory.in"
- addFunc(ve, run::gen_runhistory0, stringArray(), SYM(history), formal(primString() , SYM(name), false, false), formal(primInt(), SYM(n), true, false));
-#line 137 "runhistory.in"
+#line 109 "runhistory.in"
+ addFunc(ve, run::gen_runhistory0, stringArray(), SYM(history), formal(primString(), SYM(name), false, false), formal(primInt(), SYM(n), true, false));
+#line 142 "runhistory.in"
addFunc(ve, run::gen_runhistory1, stringArray(), SYM(history), formal(primInt(), SYM(n), true, false));
-#line 148 "runhistory.in"
- addFunc(ve, run::gen_runhistory2, primString() , SYM(readline), formal(primString() , SYM(prompt), true, false), formal(primString() , SYM(name), true, false), formal(primBoolean(), SYM(tabcompletion), true, false));
-#line 192 "runhistory.in"
- addFunc(ve, run::gen_runhistory3, primVoid(), SYM(saveline), formal(primString() , SYM(name), false, false), formal(primString() , SYM(value), false, false), formal(primBoolean(), SYM(store), true, false));
+#line 153 "runhistory.in"
+ addFunc(ve, run::gen_runhistory2, primString(), SYM(readline), formal(primString(), SYM(prompt), true, false), formal(primString(), SYM(name), true, false), formal(primBoolean(), SYM(tabcompletion), true, false));
+#line 199 "runhistory.in"
+ addFunc(ve, run::gen_runhistory3, primVoid(), SYM(saveline), formal(primString(), SYM(name), false, false), formal(primString(), SYM(value), false, false), formal(primBoolean(), SYM(store), true, false));
}
} // namespace trans
diff --git a/Build/source/utils/asymptote/runhistory.in b/Build/source/utils/asymptote/runhistory.in
index ddf60e22f6d..78dcbb6d54f 100644
--- a/Build/source/utils/asymptote/runhistory.in
+++ b/Build/source/utils/asymptote/runhistory.in
@@ -22,6 +22,10 @@ using namespace run;
typedef array stringarray;
using types::stringArray;
+namespace camp {
+bool allowRender=true;
+}
+
#if defined(HAVE_LIBREADLINE) && defined(HAVE_LIBCURSES)
#include <readline/readline.h>
#include <readline/history.h>
@@ -30,7 +34,7 @@ struct historyState {
bool store;
HISTORY_STATE state;
};
-
+
typedef mem::map<CONST string, historyState> historyMap_t;
historyMap_t historyMap;
static HISTORY_STATE history_save;
@@ -47,7 +51,7 @@ void store_history(HISTORY_STATE *dest)
}
}
-stringarray* get_history(Int n)
+stringarray* get_history(Int n)
{
int N=intcast(n);
if(N <= 0) N=history_length;
@@ -58,14 +62,15 @@ stringarray* get_history(Int n)
HIST_ENTRY *last=history_get(offset+i);
string s=last ? last->line : "";
(*a)[i]=s;
- }
+ }
return a;
}
-string historyfilename(const string &name)
+string historyfilename(const string &name)
{
return historyname+"_"+name;
}
+
#endif
namespace run {
@@ -81,7 +86,7 @@ void cleanup()
#if defined(HAVE_LIBREADLINE) && defined(HAVE_LIBCURSES)
store_history(&history_save);
int nlines=intcast(getSetting<Int>("historylines"));
- for(historyMap_t::iterator h=historyMap.begin(); h != historyMap.end();
+ for(historyMap_t::iterator h=historyMap.begin(); h != historyMap.end();
++h) {
history_set_history_state(&h->second.state);
if(h->second.store) {
@@ -94,7 +99,7 @@ void cleanup()
#endif
#ifdef HAVE_LIBGSL
trans::GSLrngFree();
-#endif
+#endif
}
}
@@ -106,9 +111,9 @@ stringarray* history(string name, Int n=1)
{
#if defined(HAVE_LIBREADLINE) && defined(HAVE_LIBCURSES)
bool newhistory=historyMap.find(name) == historyMap.end();
-
+
string filename;
-
+
if(newhistory) {
filename=historyfilename(name);
std::ifstream exists(filename.c_str());
@@ -118,15 +123,15 @@ stringarray* history(string name, Int n=1)
store_history(&history_save);
HISTORY_STATE& history=historyMap[name].state;
history_set_history_state(&history);
-
+
if(newhistory)
read_history(filename.c_str());
array *a=get_history(n);
-
+
store_history(&history);
history_set_history_state(&history_save);
-
+
return a;
#else
unused(&n);
@@ -154,7 +159,7 @@ string readline(string prompt=emptystring, string name=emptystring,
return emptystring;
#if defined(HAVE_LIBREADLINE) && defined(HAVE_LIBCURSES)
interact::init_readline(tabcompletion);
-
+
store_history(&history_save);
bool newhistory=historyMap.find(name) == historyMap.end();
historyState& h=historyMap[name];
@@ -163,7 +168,7 @@ string readline(string prompt=emptystring, string name=emptystring,
if(newhistory)
read_history(historyfilename(name).c_str());
-
+
static char *line=NULL;
/* Return the memory to the free pool
if the buffer has already been allocated. */
@@ -171,12 +176,14 @@ string readline(string prompt=emptystring, string name=emptystring,
free(line);
line=NULL;
}
-
+
/* Get a line from the user. */
+ allowRender=false;
line=readline(prompt.c_str());
-
+ allowRender=true;
+
if(!line) cout << endl;
-
+
history_set_history_state(&history_save);
return line ? string(line) : emptystring;
@@ -203,7 +210,7 @@ void saveline(string name, string value, bool store=true)
if(newhistory)
read_history(historyfilename(name).c_str());
-
+
if(value != "") {
add_history(value.c_str());
if(store) {
@@ -211,10 +218,10 @@ void saveline(string name, string value, bool store=true)
hout << value << endl;
}
}
-
+
store_history(&history);
history_set_history_state(&history_save);
#else
unused(&store);
-#endif
+#endif
}
diff --git a/Build/source/utils/asymptote/runlabel.cc b/Build/source/utils/asymptote/runlabel.cc
index 1f7ea7417e1..5781426305a 100644
--- a/Build/source/utils/asymptote/runlabel.cc
+++ b/Build/source/utils/asymptote/runlabel.cc
@@ -82,14 +82,14 @@ using types::penArray;
using types::pathArray;
using types::pathArray2;
-void cannotread(const string& s)
+void cannotread(const string& s)
{
ostringstream buf;
buf << "Cannot read from " << s;
error(buf);
}
-void cannotwrite(const string& s)
+void cannotwrite(const string& s)
{
ostringstream buf;
buf << "Cannot write to " << s;
@@ -111,7 +111,7 @@ string currentpoint="print currentpoint ASYy ASYx ";
string ASYinit="/ASYX currentpoint pop def /ASYY currentpoint exch pop def ";
string ASY1="ASY1 {"+ASYinit+"/ASY1 false def} if ";
-void endpath(std::ostream& ps)
+void endpath(std::ostream& ps)
{
ps << ASY1 << pathforall << " (M) " << currentpoint
<< "currentpoint newpath moveto} bind def" << endl;
@@ -123,7 +123,7 @@ void fillpath(std::ostream& ps)
endpath(ps);
}
-void showpath(std::ostream& ps)
+void showpath(std::ostream& ps)
{
ps << ASYx << newl
<< ASYy << newl
@@ -133,7 +133,7 @@ void showpath(std::ostream& ps)
fillpath(ps);
}
-array *readpath(const string& psname, bool keep, bool pdf=false,
+array *readpath(const string& psname, bool keep,
double hscale=1.0, double vsign=1.0)
{
double vscale=vsign*hscale;
@@ -157,8 +157,8 @@ array *readpath(const string& psname, bool keep, bool pdf=false,
#else
const string null="/dev/null";
#endif
- string epsdriver=getSetting<string>("epsdriver");
- cmd.push_back("-sDEVICE="+epsdriver);
+ string psdriver=getSetting<string>("psdriver");
+ cmd.push_back("-sDEVICE="+psdriver);
cmd.push_back("-sOutputFile="+null);
cmd.push_back(stripDir(psname));
iopipestream gs(cmd,"gs","Ghostscript");
@@ -166,27 +166,27 @@ array *readpath(const string& psname, bool keep, bool pdf=false,
stringstream buf;
string s=gs.readline();
if(s.empty()) break;
- if(!pdf) gs << newl;
+ gs << newl;
-// Workaround broken stringstream container in MacOS 10.9 libc++.
-#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__ )
+// Workaround broken stringstream container in libc++.
+#ifdef _LIBCPP_VERSION
for(string::iterator i=s.begin(); i != s.end(); ++i) {
if(isalpha(*i) && *i != 'e') {buf << " ";}
buf << *i;
}
-#else
+#else
buf << s;
#endif
-
+
if(verbose > 2) cout << endl;
-
+
mem::vector<solvedKnot> nodes;
solvedKnot node;
bool active=false;
-
+
array *P=new array(0);
PP->push(P);
-
+
while(!buf.eof()) {
char c;
buf >> c;
@@ -245,10 +245,10 @@ array *readpath(const string& psname, bool keep, bool pdf=false,
}
}
}
-
+
if(oldPath != NULL)
setPath(oldPath);
-
+
if(!keep)
unlink(psname.c_str());
return PP;
@@ -296,13 +296,13 @@ void gen_runlabel2(stack *Stack)
#line 226 "runlabel.in"
texinit();
processDataStruct &pd=processData();
-
+
string texengine=getSetting<string>("tex");
setpen(pd.tex,texengine,p);
-
+
double width,height,depth;
texbounds(width,height,depth,pd.tex,*s);
-
+
array *t=new array(3);
(*t)[0]=width;
(*t)[1]=height;
@@ -319,7 +319,7 @@ void gen_runlabel3(stack *Stack)
#line 244 "runlabel.in"
size_t n=checkArrays(s,p);
if(n == 0) {Stack->push<patharray2*>(new array(0)); return;}
-
+
string prefix=cleanpath(outname());
string psname=auxname(prefix,"ps");
string texname=auxname(prefix,"tex");
@@ -327,10 +327,10 @@ void gen_runlabel3(stack *Stack)
bbox b;
string texengine=getSetting<string>("tex");
bool xe=settings::xe(texengine) || settings::lua(texengine) ||
- settings::context(texengine);
+ settings::context(texengine);
texfile tex(texname,b,true);
tex.miniprologue();
-
+
for(size_t i=0; i < n; ++i) {
tex.setfont(read<pen>(p,i));
if(i != 0) {
@@ -354,29 +354,25 @@ void gen_runlabel3(stack *Stack)
}
tex.verbatimline(read<string>(s,i)+"\\ %");
}
-
+
tex.epilogue(true);
tex.close();
-
+
int status=opentex(texname,prefix,!xe);
-
+
string pdfname,pdfname2,psname2;
bool keep=getSetting<bool>("keep");
-
- bool legacygs=false;
+
if(!status) {
if(xe) {
-// Use legacy ghostscript driver for gs-9.13 and earlier.
- string epsdriver=getSetting<string>("epsdriver");
- legacygs=epsdriver == "epswrite";
-
+ string psdriver=getSetting<string>("psdriver");
pdfname=auxname(prefix,"pdf");
pdfname2=auxname(prefix+"_","pdf");
psname2=auxname(prefix+"_","ps");
if(!fs::exists(pdfname)) {Stack->push<patharray2*>(new array(n)); return;}
std::ofstream ps(psname.c_str(),std::ios::binary);
if(!ps) cannotwrite(psname);
-
+
showpath(ps);
mem::vector<string> pcmd;
@@ -398,28 +394,13 @@ void gen_runlabel3(stack *Stack)
cmd.push_back("-dNOPAUSE");
cmd.push_back("-dBATCH");
if(safe) cmd.push_back("-dSAFER");
- cmd.push_back("-sDEVICE="+epsdriver);
- // Work around eps2write bug that forces all postscript to first page.
- cmd.push_back("-sOutputFile="+psname2+(legacygs ? "" : "%d"));
+ cmd.push_back("-sDEVICE="+psdriver);
+ cmd.push_back("-sOutputFile="+psname2);
cmd.push_back(pdfname2);
status=System(cmd,0,true,"gs");
- if(legacygs) {
- std::ifstream in(psname2.c_str());
- ps << in.rdbuf();
- } else {
- for(unsigned int i=1; i <= n ; ++i) {
- ostringstream buf;
- buf << psname2 << i;
- const string& s=buf.str();
- const char *name=s.c_str();
- std::ifstream in(name,std::ios::binary);
- ps << in.rdbuf();
- ps << "(>\n) print flush\n";
- in.close();
- if(!keep) unlink(name);
- }
- }
+ std::ifstream in(psname2.c_str());
+ ps << in.rdbuf();
ps.close();
}
} else {
@@ -437,7 +418,7 @@ void gen_runlabel3(stack *Stack)
}
} else
error("texpath failed");
-
+
if(!keep) { // Delete temporary files.
unlink(texname.c_str());
if(!getSetting<bool>("keepaux"))
@@ -455,26 +436,25 @@ void gen_runlabel3(stack *Stack)
unlink(auxname(prefix,"tui").c_str());
}
}
- {Stack->push<patharray2*>(xe ? readpath(psname,keep,!legacygs,0.1) :
- readpath(psname,keep,false,0.12,-1.0)); return;}
+ {Stack->push<patharray2*>(xe ? readpath(psname,keep,0.1) : readpath(psname,keep,0.12,-1.0)); return;}
}
-#line 387 "runlabel.in"
+#line 367 "runlabel.in"
// patharray2* textpath(stringarray *s, penarray *p);
void gen_runlabel4(stack *Stack)
{
penarray * p=vm::pop<penarray *>(Stack);
stringarray * s=vm::pop<stringarray *>(Stack);
-#line 388 "runlabel.in"
+#line 368 "runlabel.in"
size_t n=checkArrays(s,p);
if(n == 0) {Stack->push<patharray2*>(new array(0)); return;}
-
+
string prefix=cleanpath(outname());
string outputname=auxname(prefix,getSetting<string>("textoutformat"));
string textname=auxname(prefix,getSetting<string>("textextension"));
std::ofstream text(textname.c_str());
-
+
if(!text) cannotwrite(textname);
for(size_t i=0; i < n; ++i) {
@@ -484,20 +464,20 @@ void gen_runlabel4(stack *Stack)
<< getSetting<string>("textepilogue") << endl;
}
text.close();
-
+
string psname=auxname(prefix,"ps");
std::ofstream ps(psname.c_str());
if(!ps) cannotwrite(psname);
showpath(ps);
-
+
mem::vector<string> cmd;
cmd.push_back(getSetting<string>("textcommand"));
push_split(cmd,getSetting<string>("textcommandOptions"));
cmd.push_back(textname);
iopipestream typesetter(cmd);
typesetter.block(true,false);
-
+
mem::vector<string> cmd2;
cmd2.push_back(getSetting<string>("gs"));
cmd2.push_back("-q");
@@ -506,7 +486,7 @@ void gen_runlabel4(stack *Stack)
cmd2.push_back("-dBATCH");
cmd2.push_back("-P");
if(safe) cmd2.push_back("-dSAFER");
- cmd2.push_back("-sDEVICE="+getSetting<string>("epsdriver"));
+ cmd2.push_back("-sDEVICE="+getSetting<string>("psdriver"));
cmd2.push_back("-sOutputFile=-");
cmd2.push_back("-");
iopipestream gs(cmd2,"gs","Ghostscript");
@@ -522,32 +502,32 @@ void gen_runlabel4(stack *Stack)
typesetter.pipeclose();
gs.eof();
}
- }
+ }
string out2;
gs >> out2;
if(out2.empty() && !gs.running()) break;
ps << out2;
}
ps.close();
-
+
if(verbose > 2) cout << endl;
-
+
bool keep=getSetting<bool>("keep");
if(!keep) // Delete temporary files.
unlink(textname.c_str());
- {Stack->push<patharray2*>(readpath(psname,keep,false,0.1)); return;}
+ {Stack->push<patharray2*>(readpath(psname,keep,0.1)); return;}
}
-#line 461 "runlabel.in"
+#line 441 "runlabel.in"
// patharray* _strokepath(path g, pen p=CURRENTPEN);
void gen_runlabel5(stack *Stack)
{
pen p=vm::pop<pen>(Stack,CURRENTPEN);
path g=vm::pop<path>(Stack);
-#line 462 "runlabel.in"
+#line 442 "runlabel.in"
array *P=new array(0);
if(g.size() == 0) {Stack->push<patharray*>(P); return;}
-
+
string prefix=cleanpath(outname());
string psname=auxname(prefix,"ps");
bbox b;
@@ -581,11 +561,11 @@ void gen_runlabel_venv(venv &ve)
#line 225 "runlabel.in"
addFunc(ve, run::gen_runlabel2, realArray(), SYM(texsize), formal(primString(), SYM(s), false, false), formal(primPen(), SYM(p), true, false));
#line 243 "runlabel.in"
- addFunc(ve, run::gen_runlabel3, pathArray2() , SYM(_texpath), formal(stringArray() , SYM(s), false, false), formal(penArray() , SYM(p), false, false));
-#line 387 "runlabel.in"
- addFunc(ve, run::gen_runlabel4, pathArray2() , SYM(textpath), formal(stringArray() , SYM(s), false, false), formal(penArray() , SYM(p), false, false));
-#line 461 "runlabel.in"
- addFunc(ve, run::gen_runlabel5, pathArray() , SYM(_strokepath), formal(primPath(), SYM(g), false, false), formal(primPen(), SYM(p), true, false));
+ addFunc(ve, run::gen_runlabel3, pathArray2(), SYM(_texpath), formal(stringArray(), SYM(s), false, false), formal(penArray(), SYM(p), false, false));
+#line 367 "runlabel.in"
+ addFunc(ve, run::gen_runlabel4, pathArray2(), SYM(textpath), formal(stringArray(), SYM(s), false, false), formal(penArray(), SYM(p), false, false));
+#line 441 "runlabel.in"
+ addFunc(ve, run::gen_runlabel5, pathArray(), SYM(_strokepath), formal(primPath(), SYM(g), false, false), formal(primPen(), SYM(p), true, false));
}
} // namespace trans
diff --git a/Build/source/utils/asymptote/runlabel.in b/Build/source/utils/asymptote/runlabel.in
index 9503a0b0ee8..632f68df551 100644
--- a/Build/source/utils/asymptote/runlabel.in
+++ b/Build/source/utils/asymptote/runlabel.in
@@ -11,10 +11,10 @@ pen => primPen()
picture* => primPicture()
transform => primTransform()
realarray* => realArray()
- stringarray* => stringArray()
- penarray* => penArray()
- patharray* => pathArray()
- patharray2* => pathArray2()
+ stringarray* => stringArray()
+ penarray* => penArray()
+ patharray* => pathArray()
+ patharray2* => pathArray2()
#include "picture.h"
#include "drawlabel.h"
@@ -36,14 +36,14 @@ using types::penArray;
using types::pathArray;
using types::pathArray2;
-void cannotread(const string& s)
+void cannotread(const string& s)
{
ostringstream buf;
buf << "Cannot read from " << s;
error(buf);
}
-void cannotwrite(const string& s)
+void cannotwrite(const string& s)
{
ostringstream buf;
buf << "Cannot write to " << s;
@@ -65,7 +65,7 @@ string currentpoint="print currentpoint ASYy ASYx ";
string ASYinit="/ASYX currentpoint pop def /ASYY currentpoint exch pop def ";
string ASY1="ASY1 {"+ASYinit+"/ASY1 false def} if ";
-void endpath(std::ostream& ps)
+void endpath(std::ostream& ps)
{
ps << ASY1 << pathforall << " (M) " << currentpoint
<< "currentpoint newpath moveto} bind def" << endl;
@@ -77,7 +77,7 @@ void fillpath(std::ostream& ps)
endpath(ps);
}
-void showpath(std::ostream& ps)
+void showpath(std::ostream& ps)
{
ps << ASYx << newl
<< ASYy << newl
@@ -87,7 +87,7 @@ void showpath(std::ostream& ps)
fillpath(ps);
}
-array *readpath(const string& psname, bool keep, bool pdf=false,
+array *readpath(const string& psname, bool keep,
double hscale=1.0, double vsign=1.0)
{
double vscale=vsign*hscale;
@@ -111,8 +111,8 @@ array *readpath(const string& psname, bool keep, bool pdf=false,
#else
const string null="/dev/null";
#endif
- string epsdriver=getSetting<string>("epsdriver");
- cmd.push_back("-sDEVICE="+epsdriver);
+ string psdriver=getSetting<string>("psdriver");
+ cmd.push_back("-sDEVICE="+psdriver);
cmd.push_back("-sOutputFile="+null);
cmd.push_back(stripDir(psname));
iopipestream gs(cmd,"gs","Ghostscript");
@@ -120,27 +120,27 @@ array *readpath(const string& psname, bool keep, bool pdf=false,
stringstream buf;
string s=gs.readline();
if(s.empty()) break;
- if(!pdf) gs << newl;
+ gs << newl;
-// Workaround broken stringstream container in MacOS 10.9 libc++.
-#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__ )
+// Workaround broken stringstream container in libc++.
+#ifdef _LIBCPP_VERSION
for(string::iterator i=s.begin(); i != s.end(); ++i) {
if(isalpha(*i) && *i != 'e') {buf << " ";}
buf << *i;
}
-#else
+#else
buf << s;
#endif
-
+
if(verbose > 2) cout << endl;
-
+
mem::vector<solvedKnot> nodes;
solvedKnot node;
bool active=false;
-
+
array *P=new array(0);
PP->push(P);
-
+
while(!buf.eof()) {
char c;
buf >> c;
@@ -199,10 +199,10 @@ array *readpath(const string& psname, bool keep, bool pdf=false,
}
}
}
-
+
if(oldPath != NULL)
setPath(oldPath);
-
+
if(!keep)
unlink(psname.c_str());
return PP;
@@ -226,13 +226,13 @@ realarray *texsize(string *s, pen p=CURRENTPEN)
{
texinit();
processDataStruct &pd=processData();
-
+
string texengine=getSetting<string>("tex");
setpen(pd.tex,texengine,p);
-
+
double width,height,depth;
texbounds(width,height,depth,pd.tex,*s);
-
+
array *t=new array(3);
(*t)[0]=width;
(*t)[1]=height;
@@ -244,7 +244,7 @@ patharray2 *_texpath(stringarray *s, penarray *p)
{
size_t n=checkArrays(s,p);
if(n == 0) return new array(0);
-
+
string prefix=cleanpath(outname());
string psname=auxname(prefix,"ps");
string texname=auxname(prefix,"tex");
@@ -252,10 +252,10 @@ patharray2 *_texpath(stringarray *s, penarray *p)
bbox b;
string texengine=getSetting<string>("tex");
bool xe=settings::xe(texengine) || settings::lua(texengine) ||
- settings::context(texengine);
+ settings::context(texengine);
texfile tex(texname,b,true);
tex.miniprologue();
-
+
for(size_t i=0; i < n; ++i) {
tex.setfont(read<pen>(p,i));
if(i != 0) {
@@ -279,29 +279,25 @@ patharray2 *_texpath(stringarray *s, penarray *p)
}
tex.verbatimline(read<string>(s,i)+"\\ %");
}
-
+
tex.epilogue(true);
tex.close();
-
+
int status=opentex(texname,prefix,!xe);
-
+
string pdfname,pdfname2,psname2;
bool keep=getSetting<bool>("keep");
-
- bool legacygs=false;
+
if(!status) {
if(xe) {
-// Use legacy ghostscript driver for gs-9.13 and earlier.
- string epsdriver=getSetting<string>("epsdriver");
- legacygs=epsdriver == "epswrite";
-
+ string psdriver=getSetting<string>("psdriver");
pdfname=auxname(prefix,"pdf");
pdfname2=auxname(prefix+"_","pdf");
psname2=auxname(prefix+"_","ps");
if(!fs::exists(pdfname)) return new array(n);
std::ofstream ps(psname.c_str(),std::ios::binary);
if(!ps) cannotwrite(psname);
-
+
showpath(ps);
mem::vector<string> pcmd;
@@ -323,28 +319,13 @@ patharray2 *_texpath(stringarray *s, penarray *p)
cmd.push_back("-dNOPAUSE");
cmd.push_back("-dBATCH");
if(safe) cmd.push_back("-dSAFER");
- cmd.push_back("-sDEVICE="+epsdriver);
- // Work around eps2write bug that forces all postscript to first page.
- cmd.push_back("-sOutputFile="+psname2+(legacygs ? "" : "%d"));
+ cmd.push_back("-sDEVICE="+psdriver);
+ cmd.push_back("-sOutputFile="+psname2);
cmd.push_back(pdfname2);
status=System(cmd,0,true,"gs");
- if(legacygs) {
- std::ifstream in(psname2.c_str());
- ps << in.rdbuf();
- } else {
- for(unsigned int i=1; i <= n ; ++i) {
- ostringstream buf;
- buf << psname2 << i;
- const string& s=buf.str();
- const char *name=s.c_str();
- std::ifstream in(name,std::ios::binary);
- ps << in.rdbuf();
- ps << "(>\n) print flush\n";
- in.close();
- if(!keep) unlink(name);
- }
- }
+ std::ifstream in(psname2.c_str());
+ ps << in.rdbuf();
ps.close();
}
} else {
@@ -362,7 +343,7 @@ patharray2 *_texpath(stringarray *s, penarray *p)
}
} else
error("texpath failed");
-
+
if(!keep) { // Delete temporary files.
unlink(texname.c_str());
if(!getSetting<bool>("keepaux"))
@@ -380,21 +361,20 @@ patharray2 *_texpath(stringarray *s, penarray *p)
unlink(auxname(prefix,"tui").c_str());
}
}
- return xe ? readpath(psname,keep,!legacygs,0.1) :
- readpath(psname,keep,false,0.12,-1.0);
+ return xe ? readpath(psname,keep,0.1) : readpath(psname,keep,0.12,-1.0);
}
patharray2 *textpath(stringarray *s, penarray *p)
{
size_t n=checkArrays(s,p);
if(n == 0) return new array(0);
-
+
string prefix=cleanpath(outname());
string outputname=auxname(prefix,getSetting<string>("textoutformat"));
string textname=auxname(prefix,getSetting<string>("textextension"));
std::ofstream text(textname.c_str());
-
+
if(!text) cannotwrite(textname);
for(size_t i=0; i < n; ++i) {
@@ -404,20 +384,20 @@ patharray2 *textpath(stringarray *s, penarray *p)
<< getSetting<string>("textepilogue") << endl;
}
text.close();
-
+
string psname=auxname(prefix,"ps");
std::ofstream ps(psname.c_str());
if(!ps) cannotwrite(psname);
showpath(ps);
-
+
mem::vector<string> cmd;
cmd.push_back(getSetting<string>("textcommand"));
push_split(cmd,getSetting<string>("textcommandOptions"));
cmd.push_back(textname);
iopipestream typesetter(cmd);
typesetter.block(true,false);
-
+
mem::vector<string> cmd2;
cmd2.push_back(getSetting<string>("gs"));
cmd2.push_back("-q");
@@ -426,7 +406,7 @@ patharray2 *textpath(stringarray *s, penarray *p)
cmd2.push_back("-dBATCH");
cmd2.push_back("-P");
if(safe) cmd2.push_back("-dSAFER");
- cmd2.push_back("-sDEVICE="+getSetting<string>("epsdriver"));
+ cmd2.push_back("-sDEVICE="+getSetting<string>("psdriver"));
cmd2.push_back("-sOutputFile=-");
cmd2.push_back("-");
iopipestream gs(cmd2,"gs","Ghostscript");
@@ -442,27 +422,27 @@ patharray2 *textpath(stringarray *s, penarray *p)
typesetter.pipeclose();
gs.eof();
}
- }
+ }
string out2;
gs >> out2;
if(out2.empty() && !gs.running()) break;
ps << out2;
}
ps.close();
-
+
if(verbose > 2) cout << endl;
-
+
bool keep=getSetting<bool>("keep");
if(!keep) // Delete temporary files.
unlink(textname.c_str());
- return readpath(psname,keep,false,0.1);
+ return readpath(psname,keep,0.1);
}
patharray *_strokepath(path g, pen p=CURRENTPEN)
{
array *P=new array(0);
if(g.size() == 0) return P;
-
+
string prefix=cleanpath(outname());
string psname=auxname(prefix,"ps");
bbox b;
diff --git a/Build/source/utils/asymptote/runmath.cc b/Build/source/utils/asymptote/runmath.cc
index a7b4291c3ac..776e45c804a 100644
--- a/Build/source/utils/asymptote/runmath.cc
+++ b/Build/source/utils/asymptote/runmath.cc
@@ -68,7 +68,7 @@ function *realRealFunction();
#include "path.h"
#ifdef __CYGWIN__
-extern "C" double yn(int, double);
+ extern "C" double yn(int, double);
extern "C" double jn(int, double);
extern "C" int __signgam;
#define signgam __signgam
@@ -103,7 +103,7 @@ static const unsigned char BitReverseTable8[256]=
#define R2(n) n, n+2*64, n+1*64, n+3*64
#define R4(n) R2(n),R2(n+2*16),R2(n+1*16),R2(n+3*16)
#define R6(n) R4(n),R4(n+2*4 ),R4(n+1*4 ),R4(n+3*4 )
-R6(0),R6(2),R6(1),R6(3)
+ R6(0),R6(2),R6(1),R6(3)
};
#undef R2
#undef R4
@@ -112,29 +112,29 @@ R6(0),R6(2),R6(1),R6(3)
unsigned long long bitreverse8(unsigned long long a)
{
return
- (unsigned long long) BitReverseTable8[a];
+ (unsigned long long) BitReverseTable8[a];
}
unsigned long long bitreverse16(unsigned long long a)
{
return
- ((unsigned long long) BitReverseTable8[a & 0xff] << 8) |
+ ((unsigned long long) BitReverseTable8[a & 0xff] << 8) |
((unsigned long long) BitReverseTable8[(a >> 8)]);
}
unsigned long long bitreverse24(unsigned long long a)
{
return
- ((unsigned long long) BitReverseTable8[a & 0xff] << 16) |
- ((unsigned long long) BitReverseTable8[(a >> 8) & 0xff] << 8) |
+ ((unsigned long long) BitReverseTable8[a & 0xff] << 16) |
+ ((unsigned long long) BitReverseTable8[(a >> 8) & 0xff] << 8) |
((unsigned long long) BitReverseTable8[(a >> 16)]);
}
unsigned long long bitreverse32(unsigned long long a)
{
return
- ((unsigned long long) BitReverseTable8[a & 0xff] << 24) |
- ((unsigned long long) BitReverseTable8[(a >> 8) & 0xff] << 16) |
+ ((unsigned long long) BitReverseTable8[a & 0xff] << 24) |
+ ((unsigned long long) BitReverseTable8[(a >> 8) & 0xff] << 16) |
((unsigned long long) BitReverseTable8[(a >> 16) & 0xff] << 8) |
((unsigned long long) BitReverseTable8[(a >> 24)]);
}
@@ -142,8 +142,8 @@ unsigned long long bitreverse32(unsigned long long a)
unsigned long long bitreverse40(unsigned long long a)
{
return
- ((unsigned long long) BitReverseTable8[a & 0xff] << 32) |
- ((unsigned long long) BitReverseTable8[(a >> 8) & 0xff] << 24) |
+ ((unsigned long long) BitReverseTable8[a & 0xff] << 32) |
+ ((unsigned long long) BitReverseTable8[(a >> 8) & 0xff] << 24) |
((unsigned long long) BitReverseTable8[(a >> 16) & 0xff] << 16) |
((unsigned long long) BitReverseTable8[(a >> 24) & 0xff] << 8) |
((unsigned long long) BitReverseTable8[(a >> 32)]);
@@ -152,8 +152,8 @@ unsigned long long bitreverse40(unsigned long long a)
unsigned long long bitreverse48(unsigned long long a)
{
return
- ((unsigned long long) BitReverseTable8[a & 0xff] << 40) |
- ((unsigned long long) BitReverseTable8[(a >> 8) & 0xff] << 32) |
+ ((unsigned long long) BitReverseTable8[a & 0xff] << 40) |
+ ((unsigned long long) BitReverseTable8[(a >> 8) & 0xff] << 32) |
((unsigned long long) BitReverseTable8[(a >> 16) & 0xff] << 24) |
((unsigned long long) BitReverseTable8[(a >> 24) & 0xff] << 16) |
((unsigned long long) BitReverseTable8[(a >> 32) & 0xff] << 8) |
@@ -163,24 +163,24 @@ unsigned long long bitreverse48(unsigned long long a)
unsigned long long bitreverse56(unsigned long long a)
{
return
- ((unsigned long long) BitReverseTable8[a & 0xff] << 48) |
- ((unsigned long long) BitReverseTable8[(a >> 8) & 0xff] << 40) |
+ ((unsigned long long) BitReverseTable8[a & 0xff] << 48) |
+ ((unsigned long long) BitReverseTable8[(a >> 8) & 0xff] << 40) |
((unsigned long long) BitReverseTable8[(a >> 16) & 0xff] << 32) |
((unsigned long long) BitReverseTable8[(a >> 24) & 0xff] << 24) |
((unsigned long long) BitReverseTable8[(a >> 32) & 0xff] << 16) |
- ((unsigned long long) BitReverseTable8[(a >> 40) & 0xff] << 8) |
+ ((unsigned long long) BitReverseTable8[(a >> 40) & 0xff] << 8) |
((unsigned long long) BitReverseTable8[(a >> 48)]);
}
unsigned long long bitreverse64(unsigned long long a)
{
return
- ((unsigned long long) BitReverseTable8[a & 0xff] << 56) |
- ((unsigned long long) BitReverseTable8[(a >> 8) & 0xff] << 48) |
+ ((unsigned long long) BitReverseTable8[a & 0xff] << 56) |
+ ((unsigned long long) BitReverseTable8[(a >> 8) & 0xff] << 48) |
((unsigned long long) BitReverseTable8[(a >> 16) & 0xff] << 40) |
((unsigned long long) BitReverseTable8[(a >> 24) & 0xff] << 32) |
((unsigned long long) BitReverseTable8[(a >> 32) & 0xff] << 24) |
- ((unsigned long long) BitReverseTable8[(a >> 40) & 0xff] << 16) |
+ ((unsigned long long) BitReverseTable8[(a >> 40) & 0xff] << 16) |
((unsigned long long) BitReverseTable8[(a >> 48) & 0xff] << 8) |
((unsigned long long) BitReverseTable8[(a >> 56)]);
}
@@ -193,7 +193,7 @@ Int popcount(T a)
a=a-((a >> 1) & (T)~(T)0/3);
a=(a & (T)~(T)0/15*3)+((a >> 2) & (T)~(T)0/15*3);
a=(a+(a >> 4)) & (T)~(T)0/255*15;
-return (T)(a*((T)~(T)0/255)) >> (sizeof(T)-1)*CHAR_BIT;
+ return (T)(a*((T)~(T)0/255)) >> (sizeof(T)-1)*CHAR_BIT;
}
#undef T
#endif
@@ -219,12 +219,12 @@ Int factorial(Int n)
return table[n];
}
-static inline Int Round(double x)
+static inline Int Round(double x)
{
return Int(x+((x >= 0) ? 0.5 : -0.5));
}
-inline Int sgn(double x)
+inline Int sgn(double x)
{
return (x > 0.0 ? 1 : (x < 0.0 ? -1 : 0));
}
@@ -232,12 +232,12 @@ inline Int sgn(double x)
static bool initializeRandom=true;
void Srand(Int seed)
-{
+{
initializeRandom=false;
const int n=256;
static char state[n];
initstate(intcast(seed),state,n);
-}
+}
// Autogenerated routines:
@@ -274,7 +274,7 @@ void gen_runmath2(stack *Stack)
{
Int y=vm::pop<Int>(Stack);
Int x=vm::pop<Int>(Stack);
-#line 203 "runmath.in"
+#line 203 "runmath.in"
{Stack->push<Int>(quotient<Int>()(x,y)); return;}
}
@@ -283,7 +283,7 @@ void gen_runmath2(stack *Stack)
void gen_runmath3(stack *Stack)
{
Int x=vm::pop<Int>(Stack);
-#line 208 "runmath.in"
+#line 208 "runmath.in"
{Stack->push<Int>(Abs(x)); return;}
}
@@ -292,7 +292,7 @@ void gen_runmath3(stack *Stack)
void gen_runmath4(stack *Stack)
{
real x=vm::pop<real>(Stack);
-#line 213 "runmath.in"
+#line 213 "runmath.in"
{Stack->push<Int>(sgn(x)); return;}
}
@@ -300,7 +300,7 @@ void gen_runmath4(stack *Stack)
// Int rand();
void gen_runmath5(stack *Stack)
{
-#line 218 "runmath.in"
+#line 218 "runmath.in"
if(initializeRandom)
Srand(1);
{Stack->push<Int>(random()); return;}
@@ -311,7 +311,7 @@ void gen_runmath5(stack *Stack)
void gen_runmath6(stack *Stack)
{
Int seed=vm::pop<Int>(Stack);
-#line 225 "runmath.in"
+#line 225 "runmath.in"
Srand(seed);
}
@@ -320,7 +320,7 @@ void gen_runmath6(stack *Stack)
// real unitrand();
void gen_runmath7(stack *Stack)
{
-#line 231 "runmath.in"
+#line 231 "runmath.in"
{Stack->push<real>(((real) random())/RANDOM_MAX); return;}
}
@@ -329,7 +329,7 @@ void gen_runmath7(stack *Stack)
void gen_runmath8(stack *Stack)
{
real x=vm::pop<real>(Stack);
-#line 236 "runmath.in"
+#line 236 "runmath.in"
{Stack->push<Int>(Intcast(ceil(x))); return;}
}
@@ -338,7 +338,7 @@ void gen_runmath8(stack *Stack)
void gen_runmath9(stack *Stack)
{
real x=vm::pop<real>(Stack);
-#line 241 "runmath.in"
+#line 241 "runmath.in"
{Stack->push<Int>(Intcast(floor(x))); return;}
}
@@ -347,7 +347,7 @@ void gen_runmath9(stack *Stack)
void gen_runmath10(stack *Stack)
{
real x=vm::pop<real>(Stack);
-#line 246 "runmath.in"
+#line 246 "runmath.in"
if(validInt(x)) {Stack->push<Int>(Round(x)); return;}
integeroverflow(0);
}
@@ -357,7 +357,7 @@ void gen_runmath10(stack *Stack)
void gen_runmath11(stack *Stack)
{
real x=vm::pop<real>(Stack);
-#line 252 "runmath.in"
+#line 252 "runmath.in"
{Stack->push<Int>(Ceil(x)); return;}
}
@@ -366,7 +366,7 @@ void gen_runmath11(stack *Stack)
void gen_runmath12(stack *Stack)
{
real x=vm::pop<real>(Stack);
-#line 257 "runmath.in"
+#line 257 "runmath.in"
{Stack->push<Int>(Floor(x)); return;}
}
@@ -375,7 +375,7 @@ void gen_runmath12(stack *Stack)
void gen_runmath13(stack *Stack)
{
real x=vm::pop<real>(Stack);
-#line 262 "runmath.in"
+#line 262 "runmath.in"
{Stack->push<Int>(Round(Intcap(x))); return;}
}
@@ -396,7 +396,7 @@ void gen_runmath15(stack *Stack)
{
real x=vm::pop<real>(Stack);
real y=vm::pop<real>(Stack);
-#line 273 "runmath.in"
+#line 273 "runmath.in"
{Stack->push<real>(atan2(y,x)); return;}
}
@@ -406,7 +406,7 @@ void gen_runmath16(stack *Stack)
{
real y=vm::pop<real>(Stack);
real x=vm::pop<real>(Stack);
-#line 278 "runmath.in"
+#line 278 "runmath.in"
{Stack->push<real>(hypot(x,y)); return;}
}
@@ -416,7 +416,7 @@ void gen_runmath17(stack *Stack)
{
real y=vm::pop<real>(Stack);
real x=vm::pop<real>(Stack);
-#line 283 "runmath.in"
+#line 283 "runmath.in"
{Stack->push<real>(remainder(x,y)); return;}
}
@@ -677,11 +677,11 @@ void gen_runmath40(stack *Stack)
#line 435 "runmath.in"
typedef unsigned long long Bitreverse(unsigned long long a);
static Bitreverse *B[]={bitreverse8,bitreverse16,bitreverse24,bitreverse32,
- bitreverse40,bitreverse48,bitreverse56,bitreverse64};
+ bitreverse40,bitreverse48,bitreverse56,bitreverse64};
int maxbits=intbits()-1; // Drop sign bit
#if Int_MAX2 >= 0x7fffffffffffffffLL
--maxbits; // Drop extra bit for reserved values
-#endif
+#endif
if(bits <= 0 || bits > maxbits || a < 0 ||
(unsigned long long) a >= (1ULL << bits))
{Stack->push<Int>(-1); return;}
diff --git a/Build/source/utils/asymptote/runmath.in b/Build/source/utils/asymptote/runmath.in
index a89f77c357b..9b1291cb941 100644
--- a/Build/source/utils/asymptote/runmath.in
+++ b/Build/source/utils/asymptote/runmath.in
@@ -15,7 +15,7 @@ pairarray* => pairArray()
#include "path.h"
#ifdef __CYGWIN__
-extern "C" double yn(int, double);
+ extern "C" double yn(int, double);
extern "C" double jn(int, double);
extern "C" int __signgam;
#define signgam __signgam
@@ -50,7 +50,7 @@ static const unsigned char BitReverseTable8[256]=
#define R2(n) n, n+2*64, n+1*64, n+3*64
#define R4(n) R2(n),R2(n+2*16),R2(n+1*16),R2(n+3*16)
#define R6(n) R4(n),R4(n+2*4 ),R4(n+1*4 ),R4(n+3*4 )
-R6(0),R6(2),R6(1),R6(3)
+ R6(0),R6(2),R6(1),R6(3)
};
#undef R2
#undef R4
@@ -59,29 +59,29 @@ R6(0),R6(2),R6(1),R6(3)
unsigned long long bitreverse8(unsigned long long a)
{
return
- (unsigned long long) BitReverseTable8[a];
+ (unsigned long long) BitReverseTable8[a];
}
unsigned long long bitreverse16(unsigned long long a)
{
return
- ((unsigned long long) BitReverseTable8[a & 0xff] << 8) |
+ ((unsigned long long) BitReverseTable8[a & 0xff] << 8) |
((unsigned long long) BitReverseTable8[(a >> 8)]);
}
unsigned long long bitreverse24(unsigned long long a)
{
return
- ((unsigned long long) BitReverseTable8[a & 0xff] << 16) |
- ((unsigned long long) BitReverseTable8[(a >> 8) & 0xff] << 8) |
+ ((unsigned long long) BitReverseTable8[a & 0xff] << 16) |
+ ((unsigned long long) BitReverseTable8[(a >> 8) & 0xff] << 8) |
((unsigned long long) BitReverseTable8[(a >> 16)]);
}
unsigned long long bitreverse32(unsigned long long a)
{
return
- ((unsigned long long) BitReverseTable8[a & 0xff] << 24) |
- ((unsigned long long) BitReverseTable8[(a >> 8) & 0xff] << 16) |
+ ((unsigned long long) BitReverseTable8[a & 0xff] << 24) |
+ ((unsigned long long) BitReverseTable8[(a >> 8) & 0xff] << 16) |
((unsigned long long) BitReverseTable8[(a >> 16) & 0xff] << 8) |
((unsigned long long) BitReverseTable8[(a >> 24)]);
}
@@ -89,8 +89,8 @@ unsigned long long bitreverse32(unsigned long long a)
unsigned long long bitreverse40(unsigned long long a)
{
return
- ((unsigned long long) BitReverseTable8[a & 0xff] << 32) |
- ((unsigned long long) BitReverseTable8[(a >> 8) & 0xff] << 24) |
+ ((unsigned long long) BitReverseTable8[a & 0xff] << 32) |
+ ((unsigned long long) BitReverseTable8[(a >> 8) & 0xff] << 24) |
((unsigned long long) BitReverseTable8[(a >> 16) & 0xff] << 16) |
((unsigned long long) BitReverseTable8[(a >> 24) & 0xff] << 8) |
((unsigned long long) BitReverseTable8[(a >> 32)]);
@@ -99,8 +99,8 @@ unsigned long long bitreverse40(unsigned long long a)
unsigned long long bitreverse48(unsigned long long a)
{
return
- ((unsigned long long) BitReverseTable8[a & 0xff] << 40) |
- ((unsigned long long) BitReverseTable8[(a >> 8) & 0xff] << 32) |
+ ((unsigned long long) BitReverseTable8[a & 0xff] << 40) |
+ ((unsigned long long) BitReverseTable8[(a >> 8) & 0xff] << 32) |
((unsigned long long) BitReverseTable8[(a >> 16) & 0xff] << 24) |
((unsigned long long) BitReverseTable8[(a >> 24) & 0xff] << 16) |
((unsigned long long) BitReverseTable8[(a >> 32) & 0xff] << 8) |
@@ -110,24 +110,24 @@ unsigned long long bitreverse48(unsigned long long a)
unsigned long long bitreverse56(unsigned long long a)
{
return
- ((unsigned long long) BitReverseTable8[a & 0xff] << 48) |
- ((unsigned long long) BitReverseTable8[(a >> 8) & 0xff] << 40) |
+ ((unsigned long long) BitReverseTable8[a & 0xff] << 48) |
+ ((unsigned long long) BitReverseTable8[(a >> 8) & 0xff] << 40) |
((unsigned long long) BitReverseTable8[(a >> 16) & 0xff] << 32) |
((unsigned long long) BitReverseTable8[(a >> 24) & 0xff] << 24) |
((unsigned long long) BitReverseTable8[(a >> 32) & 0xff] << 16) |
- ((unsigned long long) BitReverseTable8[(a >> 40) & 0xff] << 8) |
+ ((unsigned long long) BitReverseTable8[(a >> 40) & 0xff] << 8) |
((unsigned long long) BitReverseTable8[(a >> 48)]);
}
unsigned long long bitreverse64(unsigned long long a)
{
return
- ((unsigned long long) BitReverseTable8[a & 0xff] << 56) |
- ((unsigned long long) BitReverseTable8[(a >> 8) & 0xff] << 48) |
+ ((unsigned long long) BitReverseTable8[a & 0xff] << 56) |
+ ((unsigned long long) BitReverseTable8[(a >> 8) & 0xff] << 48) |
((unsigned long long) BitReverseTable8[(a >> 16) & 0xff] << 40) |
((unsigned long long) BitReverseTable8[(a >> 24) & 0xff] << 32) |
((unsigned long long) BitReverseTable8[(a >> 32) & 0xff] << 24) |
- ((unsigned long long) BitReverseTable8[(a >> 40) & 0xff] << 16) |
+ ((unsigned long long) BitReverseTable8[(a >> 40) & 0xff] << 16) |
((unsigned long long) BitReverseTable8[(a >> 48) & 0xff] << 8) |
((unsigned long long) BitReverseTable8[(a >> 56)]);
}
@@ -140,7 +140,7 @@ Int popcount(T a)
a=a-((a >> 1) & (T)~(T)0/3);
a=(a & (T)~(T)0/15*3)+((a >> 2) & (T)~(T)0/15*3);
a=(a+(a >> 4)) & (T)~(T)0/255*15;
-return (T)(a*((T)~(T)0/255)) >> (sizeof(T)-1)*CHAR_BIT;
+ return (T)(a*((T)~(T)0/255)) >> (sizeof(T)-1)*CHAR_BIT;
}
#undef T
#endif
@@ -166,12 +166,12 @@ Int factorial(Int n)
return table[n];
}
-static inline Int Round(double x)
+static inline Int Round(double x)
{
return Int(x+((x >= 0) ? 0.5 : -0.5));
}
-inline Int sgn(double x)
+inline Int sgn(double x)
{
return (x > 0.0 ? 1 : (x < 0.0 ? -1 : 0));
}
@@ -179,12 +179,12 @@ inline Int sgn(double x)
static bool initializeRandom=true;
void Srand(Int seed)
-{
+{
initializeRandom=false;
const int n=256;
static char state[n];
initstate(intcast(seed),state,n);
-}
+}
// Autogenerated routines:
@@ -200,66 +200,66 @@ pair ^(pair z, Int y)
}
Int quotient(Int x, Int y)
-{
+{
return quotient<Int>()(x,y);
-}
+}
Int abs(Int x)
-{
+{
return Abs(x);
-}
+}
Int sgn(real x)
-{
+{
return sgn(x);
-}
+}
Int rand()
-{
+{
if(initializeRandom)
Srand(1);
return random();
-}
+}
void srand(Int seed)
-{
+{
Srand(seed);
-}
+}
// a random number uniformly distributed in the interval [0,1]
real unitrand()
-{
+{
return ((real) random())/RANDOM_MAX;
}
Int ceil(real x)
-{
+{
return Intcast(ceil(x));
}
Int floor(real x)
-{
+{
return Intcast(floor(x));
}
Int round(real x)
-{
+{
if(validInt(x)) return Round(x);
integeroverflow(0);
}
Int Ceil(real x)
-{
+{
return Ceil(x);
}
Int Floor(real x)
-{
+{
return Floor(x);
}
Int Round(real x)
-{
+{
return Round(Intcap(x));
}
@@ -270,19 +270,19 @@ real fmod(real x, real y)
}
real atan2(real y, real x)
-{
+{
return atan2(y,x);
-}
+}
real hypot(real x, real y)
-{
+{
return hypot(x,y);
-}
+}
real remainder(real x, real y)
-{
+{
return remainder(x,y);
-}
+}
real Jn(Int n, real x)
{
@@ -389,17 +389,17 @@ bool :boolFuncNeq(callable *a, callable *b)
// Bit operations
-Int AND(Int a, Int b)
+Int AND(Int a, Int b)
{
return a & b;
}
-Int OR(Int a, Int b)
+Int OR(Int a, Int b)
{
return a | b;
}
-Int XOR(Int a, Int b)
+Int XOR(Int a, Int b)
{
return a ^ b;
}
@@ -409,7 +409,7 @@ Int NOT(Int a)
return ~a;
}
-Int CLZ(Int a)
+Int CLZ(Int a)
{
if((unsigned long long) a > 0xFFFFFFFF)
return CLZ((uint32_t) ((unsigned long long) a >> 32));
@@ -420,12 +420,12 @@ Int CLZ(Int a)
}
}
-Int popcount(Int a)
+Int popcount(Int a)
{
return popcount(a);
}
-Int CTZ(Int a)
+Int CTZ(Int a)
{
return popcount((a&-a)-1);
}
@@ -435,11 +435,11 @@ Int bitreverse(Int a, Int bits)
{
typedef unsigned long long Bitreverse(unsigned long long a);
static Bitreverse *B[]={bitreverse8,bitreverse16,bitreverse24,bitreverse32,
- bitreverse40,bitreverse48,bitreverse56,bitreverse64};
+ bitreverse40,bitreverse48,bitreverse56,bitreverse64};
int maxbits=intbits()-1; // Drop sign bit
#if Int_MAX2 >= 0x7fffffffffffffffLL
--maxbits; // Drop extra bit for reserved values
-#endif
+#endif
if(bits <= 0 || bits > maxbits || a < 0 ||
(unsigned long long) a >= (1ULL << bits))
return -1;
diff --git a/Build/source/utils/asymptote/runpair.cc b/Build/source/utils/asymptote/runpair.cc
index e5c0b4e6a67..7ac0c999086 100644
--- a/Build/source/utils/asymptote/runpair.cc
+++ b/Build/source/utils/asymptote/runpair.cc
@@ -72,11 +72,11 @@ extern pair zero;
pair sin(pair z)
{
- return pair(sin(z.getx())*cosh(z.gety()),cos(z.getx())*sinh(z.gety()));
+ return pair(sin(z.getx())*cosh(z.gety()),cos(z.getx())*sinh(z.gety()));
}
-pair exp(pair z)
-{
+pair exp(pair z)
+{
return exp(z.getx())*expi(z.gety());
}
@@ -168,72 +168,81 @@ void gen_runpair6(stack *Stack)
}
#line 84 "runpair.in"
-// pair sqrt(explicit pair z);
+// real abs2(pair z);
void gen_runpair7(stack *Stack)
{
pair z=vm::pop<pair>(Stack);
#line 85 "runpair.in"
+ {Stack->push<real>(z.abs2()); return;}
+}
+
+#line 89 "runpair.in"
+// pair sqrt(explicit pair z);
+void gen_runpair8(stack *Stack)
+{
+ pair z=vm::pop<pair>(Stack);
+#line 90 "runpair.in"
{Stack->push<pair>(Sqrt(z)); return;}
}
// Return the angle of z in radians.
-#line 90 "runpair.in"
+#line 95 "runpair.in"
// real angle(pair z, bool warn=true);
-void gen_runpair8(stack *Stack)
+void gen_runpair9(stack *Stack)
{
bool warn=vm::pop<bool>(Stack,true);
pair z=vm::pop<pair>(Stack);
-#line 91 "runpair.in"
+#line 96 "runpair.in"
{Stack->push<real>(z.angle(warn)); return;}
}
// Return the angle of z in degrees in the interval [0,360).
-#line 96 "runpair.in"
+#line 101 "runpair.in"
// real degrees(pair z, bool warn=true);
-void gen_runpair9(stack *Stack)
+void gen_runpair10(stack *Stack)
{
bool warn=vm::pop<bool>(Stack,true);
pair z=vm::pop<pair>(Stack);
-#line 97 "runpair.in"
+#line 102 "runpair.in"
{Stack->push<real>(principalBranch(degrees(z.angle(warn)))); return;}
}
// Convert degrees to radians.
-#line 102 "runpair.in"
+#line 107 "runpair.in"
// real radians(real degrees);
-void gen_runpair10(stack *Stack)
+void gen_runpair11(stack *Stack)
{
real degrees=vm::pop<real>(Stack);
-#line 103 "runpair.in"
+#line 108 "runpair.in"
{Stack->push<real>(radians(degrees)); return;}
}
// Convert radians to degrees.
-#line 108 "runpair.in"
+#line 113 "runpair.in"
// real degrees(real radians);
-void gen_runpair11(stack *Stack)
+void gen_runpair12(stack *Stack)
{
real radians=vm::pop<real>(Stack);
-#line 109 "runpair.in"
+#line 114 "runpair.in"
{Stack->push<real>(degrees(radians)); return;}
}
// Convert radians to degrees in [0,360).
-#line 114 "runpair.in"
+#line 119 "runpair.in"
// real Degrees(real radians);
-void gen_runpair12(stack *Stack)
+void gen_runpair13(stack *Stack)
{
real radians=vm::pop<real>(Stack);
-#line 115 "runpair.in"
+#line 120 "runpair.in"
{Stack->push<real>(principalBranch(degrees(radians))); return;}
}
-#line 119 "runpair.in"
+#line 124 "runpair.in"
// real Sin(real deg);
-void gen_runpair13(stack *Stack)
+void gen_runpair14(stack *Stack)
{
real deg=vm::pop<real>(Stack);
-#line 120 "runpair.in"
+#line 125 "runpair.in"
int n=(int) (deg/90.0);
if(deg == n*90.0) {
int m=n % 4;
@@ -245,12 +254,12 @@ void gen_runpair13(stack *Stack)
{Stack->push<real>(sin(radians(deg))); return;}
}
-#line 132 "runpair.in"
+#line 137 "runpair.in"
// real Cos(real deg);
-void gen_runpair14(stack *Stack)
+void gen_runpair15(stack *Stack)
{
real deg=vm::pop<real>(Stack);
-#line 133 "runpair.in"
+#line 138 "runpair.in"
int n=(int) (deg/90.0);
if(deg == n*90.0) {
int m=n % 4;
@@ -262,12 +271,12 @@ void gen_runpair14(stack *Stack)
{Stack->push<real>(cos(radians(deg))); return;}
}
-#line 145 "runpair.in"
+#line 150 "runpair.in"
// real Tan(real deg);
-void gen_runpair15(stack *Stack)
+void gen_runpair16(stack *Stack)
{
real deg=vm::pop<real>(Stack);
-#line 146 "runpair.in"
+#line 151 "runpair.in"
int n=(int) (deg/90.0);
if(deg == n*90.0) {
int m=n % 4;
@@ -279,206 +288,206 @@ void gen_runpair15(stack *Stack)
{Stack->push<real>(tan(radians(deg))); return;}
}
-#line 158 "runpair.in"
+#line 163 "runpair.in"
// real aSin(real x);
-void gen_runpair16(stack *Stack)
+void gen_runpair17(stack *Stack)
{
real x=vm::pop<real>(Stack);
-#line 159 "runpair.in"
+#line 164 "runpair.in"
{Stack->push<real>(degrees(asin(x))); return;}
}
-#line 163 "runpair.in"
+#line 168 "runpair.in"
// real aCos(real x);
-void gen_runpair17(stack *Stack)
+void gen_runpair18(stack *Stack)
{
real x=vm::pop<real>(Stack);
-#line 164 "runpair.in"
+#line 169 "runpair.in"
{Stack->push<real>(degrees(acos(x))); return;}
}
-#line 168 "runpair.in"
+#line 173 "runpair.in"
// real aTan(real x);
-void gen_runpair18(stack *Stack)
+void gen_runpair19(stack *Stack)
{
real x=vm::pop<real>(Stack);
-#line 169 "runpair.in"
+#line 174 "runpair.in"
{Stack->push<real>(degrees(atan(x))); return;}
}
-#line 173 "runpair.in"
+#line 178 "runpair.in"
// pair unit(pair z);
-void gen_runpair19(stack *Stack)
+void gen_runpair20(stack *Stack)
{
pair z=vm::pop<pair>(Stack);
-#line 174 "runpair.in"
+#line 179 "runpair.in"
{Stack->push<pair>(unit(z)); return;}
}
-#line 178 "runpair.in"
+#line 183 "runpair.in"
// pair dir(real degrees);
-void gen_runpair20(stack *Stack)
+void gen_runpair21(stack *Stack)
{
real degrees=vm::pop<real>(Stack);
-#line 179 "runpair.in"
+#line 184 "runpair.in"
{Stack->push<pair>(expi(radians(degrees))); return;}
}
-#line 183 "runpair.in"
+#line 188 "runpair.in"
// pair dir(explicit pair z);
-void gen_runpair21(stack *Stack)
+void gen_runpair22(stack *Stack)
{
pair z=vm::pop<pair>(Stack);
-#line 184 "runpair.in"
+#line 189 "runpair.in"
{Stack->push<pair>(unit(z)); return;}
}
-#line 188 "runpair.in"
+#line 193 "runpair.in"
// pair expi(real angle);
-void gen_runpair22(stack *Stack)
+void gen_runpair23(stack *Stack)
{
real angle=vm::pop<real>(Stack);
-#line 189 "runpair.in"
+#line 194 "runpair.in"
{Stack->push<pair>(expi(angle)); return;}
}
-#line 193 "runpair.in"
+#line 198 "runpair.in"
// pair exp(explicit pair z);
-void gen_runpair23(stack *Stack)
+void gen_runpair24(stack *Stack)
{
pair z=vm::pop<pair>(Stack);
-#line 194 "runpair.in"
+#line 199 "runpair.in"
{Stack->push<pair>(exp(z)); return;}
}
-#line 198 "runpair.in"
+#line 203 "runpair.in"
// pair log(explicit pair z);
-void gen_runpair24(stack *Stack)
+void gen_runpair25(stack *Stack)
{
pair z=vm::pop<pair>(Stack);
-#line 199 "runpair.in"
+#line 204 "runpair.in"
{Stack->push<pair>(pair(log(z.length()),z.angle())); return;}
}
-#line 203 "runpair.in"
+#line 208 "runpair.in"
// pair sin(explicit pair z);
-void gen_runpair25(stack *Stack)
+void gen_runpair26(stack *Stack)
{
pair z=vm::pop<pair>(Stack);
-#line 204 "runpair.in"
+#line 209 "runpair.in"
{Stack->push<pair>(sin(z)); return;}
}
-#line 208 "runpair.in"
+#line 213 "runpair.in"
// pair cos(explicit pair z);
-void gen_runpair26(stack *Stack)
+void gen_runpair27(stack *Stack)
{
pair z=vm::pop<pair>(Stack);
-#line 209 "runpair.in"
- {Stack->push<pair>(pair(cos(z.getx())*cosh(z.gety()),-sin(z.getx())*sinh(z.gety()))); return;}
+#line 214 "runpair.in"
+ {Stack->push<pair>(pair(cos(z.getx())*cosh(z.gety()),-sin(z.getx())*sinh(z.gety()))); return;}
}
// Complex Gamma function
-#line 214 "runpair.in"
+#line 219 "runpair.in"
// pair gamma(explicit pair z);
-void gen_runpair27(stack *Stack)
+void gen_runpair28(stack *Stack)
{
pair z=vm::pop<pair>(Stack);
-#line 215 "runpair.in"
+#line 220 "runpair.in"
{Stack->push<pair>(gamma(z)); return;}
}
-#line 219 "runpair.in"
+#line 224 "runpair.in"
// pair conj(pair z);
-void gen_runpair28(stack *Stack)
+void gen_runpair29(stack *Stack)
{
pair z=vm::pop<pair>(Stack);
-#line 220 "runpair.in"
+#line 225 "runpair.in"
{Stack->push<pair>(conj(z)); return;}
}
-#line 224 "runpair.in"
+#line 229 "runpair.in"
// pair realmult(pair z, pair w);
-void gen_runpair29(stack *Stack)
+void gen_runpair30(stack *Stack)
{
pair w=vm::pop<pair>(Stack);
pair z=vm::pop<pair>(Stack);
-#line 225 "runpair.in"
+#line 230 "runpair.in"
{Stack->push<pair>(pair(z.getx()*w.getx(),z.gety()*w.gety())); return;}
}
// To avoid confusion, a dot product requires explicit pair arguments.
-#line 230 "runpair.in"
+#line 235 "runpair.in"
// real dot(explicit pair z, explicit pair w);
-void gen_runpair30(stack *Stack)
+void gen_runpair31(stack *Stack)
{
pair w=vm::pop<pair>(Stack);
pair z=vm::pop<pair>(Stack);
-#line 231 "runpair.in"
+#line 236 "runpair.in"
{Stack->push<real>(dot(z,w)); return;}
}
// Return the 2D scalar cross product z.x*w.y-z.y*w.x.
-#line 236 "runpair.in"
+#line 241 "runpair.in"
// real cross(explicit pair z, explicit pair w);
-void gen_runpair31(stack *Stack)
+void gen_runpair32(stack *Stack)
{
pair w=vm::pop<pair>(Stack);
pair z=vm::pop<pair>(Stack);
-#line 237 "runpair.in"
+#line 242 "runpair.in"
{Stack->push<real>(cross(z,w)); return;}
}
-#line 241 "runpair.in"
+#line 246 "runpair.in"
// pair bezier(pair a, pair b, pair c, pair d, real t);
-void gen_runpair32(stack *Stack)
+void gen_runpair33(stack *Stack)
{
real t=vm::pop<real>(Stack);
pair d=vm::pop<pair>(Stack);
pair c=vm::pop<pair>(Stack);
pair b=vm::pop<pair>(Stack);
pair a=vm::pop<pair>(Stack);
-#line 242 "runpair.in"
+#line 247 "runpair.in"
real onemt=1-t;
real onemt2=onemt*onemt;
{Stack->push<pair>(onemt2*onemt*a+t*(3.0*(onemt2*b+t*onemt*c)+t*t*d)); return;}
}
-#line 248 "runpair.in"
+#line 253 "runpair.in"
// pair bezierP(pair a, pair b, pair c, pair d, real t);
-void gen_runpair33(stack *Stack)
+void gen_runpair34(stack *Stack)
{
real t=vm::pop<real>(Stack);
pair d=vm::pop<pair>(Stack);
pair c=vm::pop<pair>(Stack);
pair b=vm::pop<pair>(Stack);
pair a=vm::pop<pair>(Stack);
-#line 249 "runpair.in"
+#line 254 "runpair.in"
{Stack->push<pair>(3.0*(t*t*(d-a+3.0*(b-c))+t*(2.0*(a+c)-4.0*b)+b-a)); return;}
}
-#line 253 "runpair.in"
+#line 258 "runpair.in"
// pair bezierPP(pair a, pair b, pair c, pair d, real t);
-void gen_runpair34(stack *Stack)
+void gen_runpair35(stack *Stack)
{
real t=vm::pop<real>(Stack);
pair d=vm::pop<pair>(Stack);
pair c=vm::pop<pair>(Stack);
pair b=vm::pop<pair>(Stack);
pair a=vm::pop<pair>(Stack);
-#line 254 "runpair.in"
+#line 259 "runpair.in"
{Stack->push<pair>(6.0*(t*(d-a+3.0*(b-c))+a+c)-12.0*b); return;}
}
-#line 258 "runpair.in"
+#line 263 "runpair.in"
// pair bezierPPP(pair a, pair b, pair c, pair d);
-void gen_runpair35(stack *Stack)
+void gen_runpair36(stack *Stack)
{
pair d=vm::pop<pair>(Stack);
pair c=vm::pop<pair>(Stack);
pair b=vm::pop<pair>(Stack);
pair a=vm::pop<pair>(Stack);
-#line 259 "runpair.in"
+#line 264 "runpair.in"
{Stack->push<pair>(6.0*(d-a)+18.0*(b-c)); return;}
}
@@ -503,63 +512,65 @@ void gen_runpair_venv(venv &ve)
#line 79 "runpair.in"
addFunc(ve, run::gen_runpair6, primReal(), SYM(abs), formal(primPair(), SYM(z), false, false));
#line 84 "runpair.in"
- addFunc(ve, run::gen_runpair7, primPair(), SYM(sqrt), formal(primPair(), SYM(z), false, true));
+ addFunc(ve, run::gen_runpair7, primReal(), SYM(abs2), formal(primPair(), SYM(z), false, false));
#line 89 "runpair.in"
- addFunc(ve, run::gen_runpair8, primReal(), SYM(angle), formal(primPair(), SYM(z), false, false), formal(primBoolean(), SYM(warn), true, false));
-#line 95 "runpair.in"
- addFunc(ve, run::gen_runpair9, primReal(), SYM(degrees), formal(primPair(), SYM(z), false, false), formal(primBoolean(), SYM(warn), true, false));
-#line 101 "runpair.in"
- addFunc(ve, run::gen_runpair10, primReal(), SYM(radians), formal(primReal(), SYM(degrees), false, false));
-#line 107 "runpair.in"
- addFunc(ve, run::gen_runpair11, primReal(), SYM(degrees), formal(primReal(), SYM(radians), false, false));
-#line 113 "runpair.in"
- addFunc(ve, run::gen_runpair12, primReal(), SYM(Degrees), formal(primReal(), SYM(radians), false, false));
-#line 119 "runpair.in"
- addFunc(ve, run::gen_runpair13, primReal(), SYM(Sin), formal(primReal(), SYM(deg), false, false));
-#line 132 "runpair.in"
- addFunc(ve, run::gen_runpair14, primReal(), SYM(Cos), formal(primReal(), SYM(deg), false, false));
-#line 145 "runpair.in"
- addFunc(ve, run::gen_runpair15, primReal(), SYM(Tan), formal(primReal(), SYM(deg), false, false));
-#line 158 "runpair.in"
- addFunc(ve, run::gen_runpair16, primReal(), SYM(aSin), formal(primReal(), SYM(x), false, false));
+ addFunc(ve, run::gen_runpair8, primPair(), SYM(sqrt), formal(primPair(), SYM(z), false, true));
+#line 94 "runpair.in"
+ addFunc(ve, run::gen_runpair9, primReal(), SYM(angle), formal(primPair(), SYM(z), false, false), formal(primBoolean(), SYM(warn), true, false));
+#line 100 "runpair.in"
+ addFunc(ve, run::gen_runpair10, primReal(), SYM(degrees), formal(primPair(), SYM(z), false, false), formal(primBoolean(), SYM(warn), true, false));
+#line 106 "runpair.in"
+ addFunc(ve, run::gen_runpair11, primReal(), SYM(radians), formal(primReal(), SYM(degrees), false, false));
+#line 112 "runpair.in"
+ addFunc(ve, run::gen_runpair12, primReal(), SYM(degrees), formal(primReal(), SYM(radians), false, false));
+#line 118 "runpair.in"
+ addFunc(ve, run::gen_runpair13, primReal(), SYM(Degrees), formal(primReal(), SYM(radians), false, false));
+#line 124 "runpair.in"
+ addFunc(ve, run::gen_runpair14, primReal(), SYM(Sin), formal(primReal(), SYM(deg), false, false));
+#line 137 "runpair.in"
+ addFunc(ve, run::gen_runpair15, primReal(), SYM(Cos), formal(primReal(), SYM(deg), false, false));
+#line 150 "runpair.in"
+ addFunc(ve, run::gen_runpair16, primReal(), SYM(Tan), formal(primReal(), SYM(deg), false, false));
#line 163 "runpair.in"
- addFunc(ve, run::gen_runpair17, primReal(), SYM(aCos), formal(primReal(), SYM(x), false, false));
+ addFunc(ve, run::gen_runpair17, primReal(), SYM(aSin), formal(primReal(), SYM(x), false, false));
#line 168 "runpair.in"
- addFunc(ve, run::gen_runpair18, primReal(), SYM(aTan), formal(primReal(), SYM(x), false, false));
+ addFunc(ve, run::gen_runpair18, primReal(), SYM(aCos), formal(primReal(), SYM(x), false, false));
#line 173 "runpair.in"
- addFunc(ve, run::gen_runpair19, primPair(), SYM(unit), formal(primPair(), SYM(z), false, false));
+ addFunc(ve, run::gen_runpair19, primReal(), SYM(aTan), formal(primReal(), SYM(x), false, false));
#line 178 "runpair.in"
- addFunc(ve, run::gen_runpair20, primPair(), SYM(dir), formal(primReal(), SYM(degrees), false, false));
+ addFunc(ve, run::gen_runpair20, primPair(), SYM(unit), formal(primPair(), SYM(z), false, false));
#line 183 "runpair.in"
- addFunc(ve, run::gen_runpair21, primPair(), SYM(dir), formal(primPair(), SYM(z), false, true));
+ addFunc(ve, run::gen_runpair21, primPair(), SYM(dir), formal(primReal(), SYM(degrees), false, false));
#line 188 "runpair.in"
- addFunc(ve, run::gen_runpair22, primPair(), SYM(expi), formal(primReal(), SYM(angle), false, false));
+ addFunc(ve, run::gen_runpair22, primPair(), SYM(dir), formal(primPair(), SYM(z), false, true));
#line 193 "runpair.in"
- addFunc(ve, run::gen_runpair23, primPair(), SYM(exp), formal(primPair(), SYM(z), false, true));
+ addFunc(ve, run::gen_runpair23, primPair(), SYM(expi), formal(primReal(), SYM(angle), false, false));
#line 198 "runpair.in"
- addFunc(ve, run::gen_runpair24, primPair(), SYM(log), formal(primPair(), SYM(z), false, true));
+ addFunc(ve, run::gen_runpair24, primPair(), SYM(exp), formal(primPair(), SYM(z), false, true));
#line 203 "runpair.in"
- addFunc(ve, run::gen_runpair25, primPair(), SYM(sin), formal(primPair(), SYM(z), false, true));
+ addFunc(ve, run::gen_runpair25, primPair(), SYM(log), formal(primPair(), SYM(z), false, true));
#line 208 "runpair.in"
- addFunc(ve, run::gen_runpair26, primPair(), SYM(cos), formal(primPair(), SYM(z), false, true));
+ addFunc(ve, run::gen_runpair26, primPair(), SYM(sin), formal(primPair(), SYM(z), false, true));
#line 213 "runpair.in"
- addFunc(ve, run::gen_runpair27, primPair(), SYM(gamma), formal(primPair(), SYM(z), false, true));
-#line 219 "runpair.in"
- addFunc(ve, run::gen_runpair28, primPair(), SYM(conj), formal(primPair(), SYM(z), false, false));
+ addFunc(ve, run::gen_runpair27, primPair(), SYM(cos), formal(primPair(), SYM(z), false, true));
+#line 218 "runpair.in"
+ addFunc(ve, run::gen_runpair28, primPair(), SYM(gamma), formal(primPair(), SYM(z), false, true));
#line 224 "runpair.in"
- addFunc(ve, run::gen_runpair29, primPair(), SYM(realmult), formal(primPair(), SYM(z), false, false), formal(primPair(), SYM(w), false, false));
+ addFunc(ve, run::gen_runpair29, primPair(), SYM(conj), formal(primPair(), SYM(z), false, false));
#line 229 "runpair.in"
- addFunc(ve, run::gen_runpair30, primReal(), SYM(dot), formal(primPair(), SYM(z), false, true), formal(primPair(), SYM(w), false, true));
-#line 235 "runpair.in"
- addFunc(ve, run::gen_runpair31, primReal(), SYM(cross), formal(primPair(), SYM(z), false, true), formal(primPair(), SYM(w), false, true));
-#line 241 "runpair.in"
- addFunc(ve, run::gen_runpair32, primPair(), SYM(bezier), formal(primPair(), SYM(a), false, false), formal(primPair(), SYM(b), false, false), formal(primPair(), SYM(c), false, false), formal(primPair(), SYM(d), false, false), formal(primReal(), SYM(t), false, false));
-#line 248 "runpair.in"
- addFunc(ve, run::gen_runpair33, primPair(), SYM(bezierP), formal(primPair(), SYM(a), false, false), formal(primPair(), SYM(b), false, false), formal(primPair(), SYM(c), false, false), formal(primPair(), SYM(d), false, false), formal(primReal(), SYM(t), false, false));
+ addFunc(ve, run::gen_runpair30, primPair(), SYM(realmult), formal(primPair(), SYM(z), false, false), formal(primPair(), SYM(w), false, false));
+#line 234 "runpair.in"
+ addFunc(ve, run::gen_runpair31, primReal(), SYM(dot), formal(primPair(), SYM(z), false, true), formal(primPair(), SYM(w), false, true));
+#line 240 "runpair.in"
+ addFunc(ve, run::gen_runpair32, primReal(), SYM(cross), formal(primPair(), SYM(z), false, true), formal(primPair(), SYM(w), false, true));
+#line 246 "runpair.in"
+ addFunc(ve, run::gen_runpair33, primPair(), SYM(bezier), formal(primPair(), SYM(a), false, false), formal(primPair(), SYM(b), false, false), formal(primPair(), SYM(c), false, false), formal(primPair(), SYM(d), false, false), formal(primReal(), SYM(t), false, false));
#line 253 "runpair.in"
- addFunc(ve, run::gen_runpair34, primPair(), SYM(bezierPP), formal(primPair(), SYM(a), false, false), formal(primPair(), SYM(b), false, false), formal(primPair(), SYM(c), false, false), formal(primPair(), SYM(d), false, false), formal(primReal(), SYM(t), false, false));
+ addFunc(ve, run::gen_runpair34, primPair(), SYM(bezierP), formal(primPair(), SYM(a), false, false), formal(primPair(), SYM(b), false, false), formal(primPair(), SYM(c), false, false), formal(primPair(), SYM(d), false, false), formal(primReal(), SYM(t), false, false));
#line 258 "runpair.in"
- addFunc(ve, run::gen_runpair35, primPair(), SYM(bezierPPP), formal(primPair(), SYM(a), false, false), formal(primPair(), SYM(b), false, false), formal(primPair(), SYM(c), false, false), formal(primPair(), SYM(d), false, false));
+ addFunc(ve, run::gen_runpair35, primPair(), SYM(bezierPP), formal(primPair(), SYM(a), false, false), formal(primPair(), SYM(b), false, false), formal(primPair(), SYM(c), false, false), formal(primPair(), SYM(d), false, false), formal(primReal(), SYM(t), false, false));
+#line 263 "runpair.in"
+ addFunc(ve, run::gen_runpair36, primPair(), SYM(bezierPPP), formal(primPair(), SYM(a), false, false), formal(primPair(), SYM(b), false, false), formal(primPair(), SYM(c), false, false), formal(primPair(), SYM(d), false, false));
}
} // namespace trans
diff --git a/Build/source/utils/asymptote/runpair.in b/Build/source/utils/asymptote/runpair.in
index 46231c02d8f..f6a24e30063 100644
--- a/Build/source/utils/asymptote/runpair.in
+++ b/Build/source/utils/asymptote/runpair.in
@@ -17,11 +17,11 @@ extern pair zero;
pair sin(pair z)
{
- return pair(sin(z.getx())*cosh(z.gety()),cos(z.getx())*sinh(z.gety()));
+ return pair(sin(z.getx())*cosh(z.gety()),cos(z.getx())*sinh(z.gety()));
}
-pair exp(pair z)
-{
+pair exp(pair z)
+{
return exp(z.getx())*expi(z.gety());
}
@@ -81,6 +81,11 @@ real abs(pair z)
return z.length();
}
+real abs2(pair z)
+{
+ return z.abs2();
+}
+
pair sqrt(explicit pair z)
{
return Sqrt(z);
@@ -105,13 +110,13 @@ real radians(real degrees)
}
// Convert radians to degrees.
-real degrees(real radians)
+real degrees(real radians)
{
return degrees(radians);
}
// Convert radians to degrees in [0,360).
-real Degrees(real radians)
+real Degrees(real radians)
{
return principalBranch(degrees(radians));
}
@@ -190,24 +195,24 @@ pair expi(real angle)
return expi(angle);
}
-pair exp(explicit pair z)
-{
+pair exp(explicit pair z)
+{
return exp(z);
}
-pair log(explicit pair z)
-{
+pair log(explicit pair z)
+{
return pair(log(z.length()),z.angle());
}
-pair sin(explicit pair z)
-{
+pair sin(explicit pair z)
+{
return sin(z);
}
-pair cos(explicit pair z)
-{
- return pair(cos(z.getx())*cosh(z.gety()),-sin(z.getx())*sinh(z.gety()));
+pair cos(explicit pair z)
+{
+ return pair(cos(z.getx())*cosh(z.gety()),-sin(z.getx())*sinh(z.gety()));
}
// Complex Gamma function
@@ -221,7 +226,7 @@ pair conj(pair z)
return conj(z);
}
-pair realmult(pair z, pair w)
+pair realmult(pair z, pair w)
{
return pair(z.getx()*w.getx(),z.gety()*w.gety());
}
@@ -238,24 +243,24 @@ real cross(explicit pair z, explicit pair w)
return cross(z,w);
}
-pair bezier(pair a, pair b, pair c, pair d, real t)
+pair bezier(pair a, pair b, pair c, pair d, real t)
{
real onemt=1-t;
real onemt2=onemt*onemt;
return onemt2*onemt*a+t*(3.0*(onemt2*b+t*onemt*c)+t*t*d);
}
-pair bezierP(pair a, pair b, pair c, pair d, real t)
+pair bezierP(pair a, pair b, pair c, pair d, real t)
{
return 3.0*(t*t*(d-a+3.0*(b-c))+t*(2.0*(a+c)-4.0*b)+b-a);
}
-pair bezierPP(pair a, pair b, pair c, pair d, real t)
+pair bezierPP(pair a, pair b, pair c, pair d, real t)
{
return 6.0*(t*(d-a+3.0*(b-c))+a+c)-12.0*b;
}
-pair bezierPPP(pair a, pair b, pair c, pair d)
+pair bezierPPP(pair a, pair b, pair c, pair d)
{
return 6.0*(d-a)+18.0*(b-c);
}
diff --git a/Build/source/utils/asymptote/runpath.cc b/Build/source/utils/asymptote/runpath.cc
index 8e168df89e7..069055cb6f3 100644
--- a/Build/source/utils/asymptote/runpath.cc
+++ b/Build/source/utils/asymptote/runpath.cc
@@ -12,9 +12,9 @@
#line 1 "runpath.in"
/*****
- * runpicture.in
+ * runpath.in
*
- * Runtime functions for picture operations.
+ * Runtime functions for path operations.
*
*****/
@@ -81,7 +81,7 @@ Int windingnumber(array *p, camp::pair z)
{
size_t size=checkArray(p);
Int count=0;
- for(size_t i=0; i < size; i++)
+ for(size_t i=0; i < size; i++)
count += read<path *>(p,i)->windingnumber(z);
return count;
}
@@ -460,7 +460,7 @@ void gen_runpath29(stack *Stack)
{Stack->push<realarray*>(V); return;}
}
-// Return the intersection point of the extensions of the line segments
+// Return the intersection point of the extensions of the line segments
// PQ and pq.
#line 252 "runpath.in"
// pair extension(pair P, pair Q, pair p, pair q);
@@ -520,7 +520,7 @@ void gen_runpath34(stack *Stack)
void gen_runpath35(stack *Stack)
{
patharray * p=vm::pop<patharray *>(Stack);
-#line 282 "runpath.in"
+#line 282 "runpath.in"
size_t size=checkArray(p);
Int count=0;
for (size_t i = 0; i < size; i++)
@@ -533,7 +533,7 @@ void gen_runpath35(stack *Stack)
void gen_runpath36(stack *Stack)
{
patharray * p=vm::pop<patharray *>(Stack);
-#line 291 "runpath.in"
+#line 291 "runpath.in"
size_t size=checkArray(p);
if(size == 0)
@@ -561,7 +561,7 @@ void gen_runpath36(stack *Stack)
void gen_runpath37(stack *Stack)
{
patharray * p=vm::pop<patharray *>(Stack);
-#line 315 "runpath.in"
+#line 315 "runpath.in"
size_t size=checkArray(p);
if(size == 0)
@@ -590,7 +590,7 @@ void gen_runpath38(stack *Stack)
{
patharray * p=vm::pop<patharray *>(Stack);
transform t=vm::pop<transform>(Stack);
-#line 339 "runpath.in"
+#line 339 "runpath.in"
size_t size=checkArray(p);
if(size == 0)
@@ -619,7 +619,7 @@ void gen_runpath39(stack *Stack)
{
patharray * p=vm::pop<patharray *>(Stack);
transform t=vm::pop<transform>(Stack);
-#line 363 "runpath.in"
+#line 363 "runpath.in"
size_t size=checkArray(p);
if(size == 0)
@@ -720,7 +720,7 @@ void gen_runpath45(stack *Stack)
// |a.x a.y 1|
// |b.x b.y 1|
// |c.x c.y 1|
-//
+//
#line 433 "runpath.in"
// real orient(pair a, pair b, pair c);
void gen_runpath46(stack *Stack)
@@ -830,15 +830,15 @@ void gen_runpath_venv(venv &ve)
#line 276 "runpath.in"
addFunc(ve, run::gen_runpath34, primPair(), SYM(max), formal(primPath(), SYM(p), false, true));
#line 281 "runpath.in"
- addFunc(ve, run::gen_runpath35, primInt(), SYM(size), formal(pathArray() , SYM(p), false, false));
+ addFunc(ve, run::gen_runpath35, primInt(), SYM(size), formal(pathArray(), SYM(p), false, false));
#line 290 "runpath.in"
- addFunc(ve, run::gen_runpath36, primPair(), SYM(min), formal(pathArray() , SYM(p), false, false));
+ addFunc(ve, run::gen_runpath36, primPair(), SYM(min), formal(pathArray(), SYM(p), false, false));
#line 314 "runpath.in"
- addFunc(ve, run::gen_runpath37, primPair(), SYM(max), formal(pathArray() , SYM(p), false, false));
+ addFunc(ve, run::gen_runpath37, primPair(), SYM(max), formal(pathArray(), SYM(p), false, false));
#line 338 "runpath.in"
- addFunc(ve, run::gen_runpath38, primPair(), SYM(minAfterTransform), formal(primTransform(), SYM(t), false, false), formal(pathArray() , SYM(p), false, false));
+ addFunc(ve, run::gen_runpath38, primPair(), SYM(minAfterTransform), formal(primTransform(), SYM(t), false, false), formal(pathArray(), SYM(p), false, false));
#line 362 "runpath.in"
- addFunc(ve, run::gen_runpath39, primPair(), SYM(maxAfterTransform), formal(primTransform(), SYM(t), false, false), formal(pathArray() , SYM(p), false, false));
+ addFunc(ve, run::gen_runpath39, primPair(), SYM(maxAfterTransform), formal(primTransform(), SYM(t), false, false), formal(pathArray(), SYM(p), false, false));
#line 386 "runpath.in"
addFunc(ve, run::gen_runpath40, realArray(), SYM(mintimes), formal(primPath(), SYM(p), false, false));
#line 395 "runpath.in"
@@ -846,9 +846,9 @@ void gen_runpath_venv(venv &ve)
#line 404 "runpath.in"
addFunc(ve, run::gen_runpath42, primReal(), SYM(relativedistance), formal(primReal(), SYM(theta), false, false), formal(primReal(), SYM(phi), false, false), formal(primReal(), SYM(t), false, false), formal(primBoolean(), SYM(atleast), false, false));
#line 409 "runpath.in"
- addFunc(ve, run::gen_runpath43, primInt(), SYM(windingnumber), formal(pathArray() , SYM(p), false, false), formal(primPair(), SYM(z), false, false));
+ addFunc(ve, run::gen_runpath43, primInt(), SYM(windingnumber), formal(pathArray(), SYM(p), false, false), formal(primPair(), SYM(z), false, false));
#line 414 "runpath.in"
- addFunc(ve, run::gen_runpath44, primBoolean(), SYM(inside), formal(pathArray() , SYM(g), false, true), formal(primPair(), SYM(z), false, false), formal(primPen(), SYM(fillrule), true, false));
+ addFunc(ve, run::gen_runpath44, primBoolean(), SYM(inside), formal(pathArray(), SYM(g), false, true), formal(primPair(), SYM(z), false, false), formal(primPen(), SYM(fillrule), true, false));
#line 419 "runpath.in"
addFunc(ve, run::gen_runpath45, primBoolean(), SYM(inside), formal(primPath(), SYM(g), false, false), formal(primPair(), SYM(z), false, false), formal(primPen(), SYM(fillrule), true, false));
#line 424 "runpath.in"
diff --git a/Build/source/utils/asymptote/runpath.in b/Build/source/utils/asymptote/runpath.in
index 9b026e9f209..63fb07612ab 100644
--- a/Build/source/utils/asymptote/runpath.in
+++ b/Build/source/utils/asymptote/runpath.in
@@ -1,7 +1,7 @@
/*****
- * runpicture.in
+ * runpath.in
*
- * Runtime functions for picture operations.
+ * Runtime functions for path operations.
*
*****/
@@ -11,8 +11,8 @@ path => primPath()
transform => primTransform()
realarray* => realArray()
realarray2* => realArray2()
-patharray* => pathArray()
-penarray* => penArray()
+patharray* => pathArray()
+penarray* => penArray()
#include "path.h"
#include "arrayop.h"
@@ -33,7 +33,7 @@ Int windingnumber(array *p, camp::pair z)
{
size_t size=checkArray(p);
Int count=0;
- for(size_t i=0; i < size; i++)
+ for(size_t i=0; i < size; i++)
count += read<path *>(p,i)->windingnumber(z);
return count;
}
@@ -247,7 +247,7 @@ realarray* intersections(path p, explicit pair a, explicit pair b, real fuzz=-1)
return V;
}
-// Return the intersection point of the extensions of the line segments
+// Return the intersection point of the extensions of the line segments
// PQ and pq.
pair extension(pair P, pair Q, pair p, pair q)
{
@@ -279,7 +279,7 @@ pair max(explicit path p)
}
Int size(patharray *p)
-{
+{
size_t size=checkArray(p);
Int count=0;
for (size_t i = 0; i < size; i++)
@@ -288,7 +288,7 @@ Int size(patharray *p)
}
pair min(patharray *p)
-{
+{
size_t size=checkArray(p);
if(size == 0)
@@ -312,7 +312,7 @@ pair min(patharray *p)
}
pair max(patharray *p)
-{
+{
size_t size=checkArray(p);
if(size == 0)
@@ -336,7 +336,7 @@ pair max(patharray *p)
}
pair minAfterTransform(transform t, patharray *p)
-{
+{
size_t size=checkArray(p);
if(size == 0)
@@ -360,7 +360,7 @@ pair minAfterTransform(transform t, patharray *p)
}
pair maxAfterTransform(transform t, patharray *p)
-{
+{
size_t size=checkArray(p);
if(size == 0)
@@ -429,8 +429,8 @@ bool inside(path g, pair z, pen fillrule=CURRENTPEN)
// |a.x a.y 1|
// |b.x b.y 1|
// |c.x c.y 1|
-//
-real orient(pair a, pair b, pair c)
+//
+real orient(pair a, pair b, pair c)
{
return orient2d(a,b,c);
}
diff --git a/Build/source/utils/asymptote/runpath3d.cc b/Build/source/utils/asymptote/runpath3d.cc
index 6912a5906d7..ed27e19b62b 100644
--- a/Build/source/utils/asymptote/runpath3d.cc
+++ b/Build/source/utils/asymptote/runpath3d.cc
@@ -351,7 +351,7 @@ void gen_runpath3d22(stack *Stack)
{Stack->push<path3>(p.unstraighten()); return;}
}
-// return the maximum distance squared of points c0 and c1 from
+// return the maximum distance squared of points c0 and c1 from
// the respective internal control points of z0--z1.
#line 183 "runpath3d.in"
// real straightness(triple z0, triple c0, triple c1, triple z1);
@@ -430,7 +430,7 @@ void gen_runpath3d29(stack *Stack)
if(fuzz < 0)
fuzz=BigFuzz*::max(::max(length(p.max()),length(p.min())),
::max(length(q.max()),length(q.min())));
-
+
std::vector<real> S,T;
real s,t;
if(intersections(s,t,S,T,p,q,fuzz,true,exact)) {
@@ -455,7 +455,7 @@ void gen_runpath3d30(stack *Stack)
fuzz=BigFuzz*::max(::max(length(p.max()),length(p.min())),
::max(length(q.max()),length(q.min())));
bool single=!exact;
-
+
real s,t;
std::vector<real> S,T;
bool found=intersections(s,t,S,T,p,q,fuzz,single,exact);
@@ -628,7 +628,7 @@ void gen_runpath3d41(stack *Stack)
// Return a negative (positive) value if a--b--c--cycle is oriented
// counterclockwise (clockwise) when viewed from d or zero if all four
-// points are coplanar.
+// points are coplanar.
// The value returned is the determinant
// |a.x a.y a.z 1|
// |b.x b.y b.z 1|
diff --git a/Build/source/utils/asymptote/runpath3d.in b/Build/source/utils/asymptote/runpath3d.in
index 3f51f12ce20..4246c68424e 100644
--- a/Build/source/utils/asymptote/runpath3d.in
+++ b/Build/source/utils/asymptote/runpath3d.in
@@ -178,7 +178,7 @@ path3 unstraighten(path3 p)
return p.unstraighten();
}
-// return the maximum distance squared of points c0 and c1 from
+// return the maximum distance squared of points c0 and c1 from
// the respective internal control points of z0--z1.
real straightness(triple z0, triple c0, triple c1, triple z1)
{
@@ -186,7 +186,7 @@ real straightness(triple z0, triple c0, triple c1, triple z1)
}
// return the straightness of segment i of path3 g.
-real straightness(path3 p, Int t)
+real straightness(path3 p, Int t)
{
if(p.straight(t)) return 0;
return Straightness(p.point(t),p.postcontrol(t),p.precontrol(t+1),
@@ -219,7 +219,7 @@ realarray* intersect(path3 p, path3 q, real fuzz=-1)
if(fuzz < 0)
fuzz=BigFuzz*::max(::max(length(p.max()),length(p.min())),
::max(length(q.max()),length(q.min())));
-
+
std::vector<real> S,T;
real s,t;
if(intersections(s,t,S,T,p,q,fuzz,true,exact)) {
@@ -238,7 +238,7 @@ realarray2* intersections(path3 p, path3 q, real fuzz=-1)
fuzz=BigFuzz*::max(::max(length(p.max()),length(p.min())),
::max(length(q.max()),length(q.min())));
bool single=!exact;
-
+
real s,t;
std::vector<real> S,T;
bool found=intersections(s,t,S,T,p,q,fuzz,single,exact);
@@ -361,13 +361,13 @@ pair maxratio(path3 g)
// Return a negative (positive) value if a--b--c--cycle is oriented
// counterclockwise (clockwise) when viewed from d or zero if all four
-// points are coplanar.
+// points are coplanar.
// The value returned is the determinant
// |a.x a.y a.z 1|
// |b.x b.y b.z 1|
// |c.x c.y c.z 1|
// |d.x d.y d.z 1|
-real orient(triple a, triple b, triple c, triple d)
+real orient(triple a, triple b, triple c, triple d)
{
real A[]={a.getx(),a.gety(),a.getz()};
real B[]={b.getx(),b.gety(),b.getz()};
diff --git a/Build/source/utils/asymptote/runpicture.cc b/Build/source/utils/asymptote/runpicture.cc
index 413634b7bbc..d2fe06bc269 100644
--- a/Build/source/utils/asymptote/runpicture.cc
+++ b/Build/source/utils/asymptote/runpicture.cc
@@ -115,21 +115,21 @@ static transform ZeroTransform=transform(0.0,0.0,0.0,0.0,0.0,0.0);
transform getTransform(xmap_t &xmap, picture::nodelist::iterator p)
{
- string s=(*p)->KEY;
- transform t;
- // Don't apply xmap without an explicit corresponding key
- size_t n=s.length();
- if(n == 0 || s.substr(n-1) != "1") return t;
-
- xmap_t::iterator q=xmap.find(s.substr(0,n-2));
- if(q != xmap.end()) {
- xtransform_t& v=q->second;
- if(!v.empty()) {
- t=v.front();
- v.pop_front();
- }
+ string s=(*p)->KEY;
+ transform t;
+ // Don't apply xmap without an explicit corresponding key
+ size_t n=s.length();
+ if(n == 0 || s.substr(n-1) != "1") return t;
+
+ xmap_t::iterator q=xmap.find(s.substr(0,n-2));
+ if(q != xmap.end()) {
+ xtransform_t& v=q->second;
+ if(!v.empty()) {
+ t=v.front();
+ v.pop_front();
}
- return t;
+ }
+ return t;
}
@@ -145,14 +145,14 @@ function *penFunction()
// Ignore unclosed begingroups but not spurious endgroups.
const char *nobegin="endgroup without matching begingroup";
-
+
array *emptyarray=new array(0);
-array *nop(array *a)
+array *nop(array *a)
{
return a;
}
-
+
triple Zero;
string defaultformat3="prc";
@@ -244,7 +244,7 @@ void gen_runpicture7(stack *Stack)
}
#line 168 "runpicture.in"
-// void latticeshade(picture *f, patharray *g, bool stroke=false, pen fillrule=CURRENTPEN, penarray2 *p, transform t=identity, bool copy=true);
+// void latticeshade(picture *f, patharray *g, bool stroke=false, pen fillrule=CURRENTPEN, penarray2 *p, transform t=identity, bool copy=true);
void gen_runpicture8(stack *Stack)
{
bool copy=vm::pop<bool>(Stack,true);
@@ -349,7 +349,7 @@ void gen_runpicture12(stack *Stack)
(*z)[k++]=nodes[i].point;
}
checkArrays(p,z);
-
+
f->append(new drawGouraudShade(*copyarray(g),stroke,fillrule,*copyarray(p),
*z,*copyarray(edges)));
}
@@ -369,16 +369,17 @@ void gen_runpicture13(stack *Stack)
#line 233 "runpicture.in"
array *(*copyarray)(array *a)=copy ? copyArray : nop;
array *(*copyarray2)(array *a)=copy ? copyArray2 : nop;
- if(b == NULL) b=g;
- size_t n=checkArrays(p,b);
+ size_t n=checkArrays(p,b ? b : g);
+ array& G=*copyarray(g);
+ array& B=b ? *copyarray(b) : G;
size_t nz=checkArray(z);
if(nz != 0)
checkEqual(nz,n);
- f->append(new drawTensorShade(*copyarray(g),stroke,fillrule,*copyarray2(p),
- *copyarray(b),*copyarray2(z)));
+ f->append(new drawTensorShade(G,stroke,fillrule,*copyarray2(p),B,
+ *copyarray2(z)));
}
-#line 245 "runpicture.in"
+#line 246 "runpicture.in"
// void functionshade(picture *f, patharray *g, bool stroke=false, pen fillrule=CURRENTPEN, string shader=emptystring, bool copy=true);
void gen_runpicture14(stack *Stack)
{
@@ -388,14 +389,14 @@ void gen_runpicture14(stack *Stack)
bool stroke=vm::pop<bool>(Stack,false);
patharray * g=vm::pop<patharray *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 248 "runpicture.in"
+#line 249 "runpicture.in"
array *(*copyarray)(array *a)=copy ? copyArray : nop;
f->append(new drawFunctionShade(*copyarray(g),stroke,fillrule,shader));
}
// Clip a picture to a superpath using the given fill rule.
// Subsequent additions to the picture will not be affected by the clipping.
-#line 255 "runpicture.in"
+#line 256 "runpicture.in"
// void clip(picture *f, patharray *g, bool stroke=false, pen fillrule=CURRENTPEN, bool copy=true);
void gen_runpicture15(stack *Stack)
{
@@ -404,13 +405,13 @@ void gen_runpicture15(stack *Stack)
bool stroke=vm::pop<bool>(Stack,false);
patharray * g=vm::pop<patharray *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 257 "runpicture.in"
+#line 258 "runpicture.in"
array *(*copyarray)(array *a)=copy ? copyArray : nop;
drawClipBegin *begin=new drawClipBegin(*copyarray(g),stroke,fillrule,true);
f->enclose(begin,new drawClipEnd(true,begin));
}
-#line 263 "runpicture.in"
+#line 264 "runpicture.in"
// void beginclip(picture *f, patharray *g, bool stroke=false, pen fillrule=CURRENTPEN, bool copy=true);
void gen_runpicture16(stack *Stack)
{
@@ -419,58 +420,58 @@ void gen_runpicture16(stack *Stack)
bool stroke=vm::pop<bool>(Stack,false);
patharray * g=vm::pop<patharray *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 265 "runpicture.in"
+#line 266 "runpicture.in"
array *(*copyarray)(array *a)=copy ? copyArray : nop;
f->append(new drawClipBegin(*copyarray(g),stroke,fillrule,false));
}
-#line 270 "runpicture.in"
+#line 271 "runpicture.in"
// void endclip(picture *f);
void gen_runpicture17(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 271 "runpicture.in"
+#line 272 "runpicture.in"
f->append(new drawClipEnd(false));
}
-#line 275 "runpicture.in"
+#line 276 "runpicture.in"
// void gsave(picture *f);
void gen_runpicture18(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 276 "runpicture.in"
+#line 277 "runpicture.in"
f->append(new drawGsave());
}
-#line 280 "runpicture.in"
+#line 281 "runpicture.in"
// void grestore(picture *f);
void gen_runpicture19(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 281 "runpicture.in"
+#line 282 "runpicture.in"
f->append(new drawGrestore());
}
-#line 285 "runpicture.in"
+#line 286 "runpicture.in"
// void begingroup(picture *f);
void gen_runpicture20(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 286 "runpicture.in"
+#line 287 "runpicture.in"
f->append(new drawBegin());
}
-#line 290 "runpicture.in"
+#line 291 "runpicture.in"
// void endgroup(picture *f);
void gen_runpicture21(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 291 "runpicture.in"
+#line 292 "runpicture.in"
f->append(new drawEnd());
}
-#line 295 "runpicture.in"
-// void _begingroup3(picture *f, string name, real compression, real granularity, bool closed, bool tessellate, bool dobreak, bool nobreak, triple center, Int interaction);
+#line 296 "runpicture.in"
+// void _begingroup3(picture *f, string name, real compression, real granularity, bool closed, bool tessellate, bool dobreak, bool nobreak, triple center, Int interaction);
void gen_runpicture22(stack *Stack)
{
Int interaction=vm::pop<Int>(Stack);
@@ -483,62 +484,62 @@ void gen_runpicture22(stack *Stack)
real compression=vm::pop<real>(Stack);
string name=vm::pop<string>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 298 "runpicture.in"
+#line 299 "runpicture.in"
f->append(new drawBegin3(name,compression,granularity,
closed,tessellate,dobreak,nobreak,
center,(Interaction) intcast(interaction)));
}
-#line 304 "runpicture.in"
+#line 305 "runpicture.in"
// void endgroup3(picture *f);
void gen_runpicture23(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 305 "runpicture.in"
+#line 306 "runpicture.in"
f->append(new drawEnd3());
}
-#line 309 "runpicture.in"
+#line 310 "runpicture.in"
// void add(picture *dest, picture *src);
void gen_runpicture24(stack *Stack)
{
picture * src=vm::pop<picture *>(Stack);
picture * dest=vm::pop<picture *>(Stack);
-#line 310 "runpicture.in"
+#line 311 "runpicture.in"
dest->add(*src);
}
-#line 314 "runpicture.in"
+#line 315 "runpicture.in"
// void prepend(picture *dest, picture *src);
void gen_runpicture25(stack *Stack)
{
picture * src=vm::pop<picture *>(Stack);
picture * dest=vm::pop<picture *>(Stack);
-#line 315 "runpicture.in"
+#line 316 "runpicture.in"
dest->prepend(*src);
}
-#line 319 "runpicture.in"
+#line 320 "runpicture.in"
// void postscript(picture *f, string s);
void gen_runpicture26(stack *Stack)
{
string s=vm::pop<string>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 320 "runpicture.in"
+#line 321 "runpicture.in"
f->append(new drawVerbatim(PostScript,s));
}
-#line 324 "runpicture.in"
+#line 325 "runpicture.in"
// void tex(picture *f, string s);
void gen_runpicture27(stack *Stack)
{
string s=vm::pop<string>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 325 "runpicture.in"
+#line 326 "runpicture.in"
f->append(new drawVerbatim(TeX,s));
}
-#line 329 "runpicture.in"
+#line 330 "runpicture.in"
// void postscript(picture *f, string s, pair min, pair max);
void gen_runpicture28(stack *Stack)
{
@@ -546,11 +547,11 @@ void gen_runpicture28(stack *Stack)
pair min=vm::pop<pair>(Stack);
string s=vm::pop<string>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 330 "runpicture.in"
+#line 331 "runpicture.in"
f->append(new drawVerbatim(PostScript,s,min,max));
}
-#line 334 "runpicture.in"
+#line 335 "runpicture.in"
// void tex(picture *f, string s, pair min, pair max);
void gen_runpicture29(stack *Stack)
{
@@ -558,33 +559,33 @@ void gen_runpicture29(stack *Stack)
pair min=vm::pop<pair>(Stack);
string s=vm::pop<string>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 335 "runpicture.in"
+#line 336 "runpicture.in"
f->append(new drawVerbatim(TeX,s,min,max));
}
-#line 339 "runpicture.in"
+#line 340 "runpicture.in"
// void texpreamble(string s);
void gen_runpicture30(stack *Stack)
{
string s=vm::pop<string>(Stack);
-#line 340 "runpicture.in"
+#line 341 "runpicture.in"
string t=s+"\n";
processDataStruct &pd=processData();
pd.TeXpipepreamble.push_back(t);
pd.TeXpreamble.push_back(t);
}
-#line 347 "runpicture.in"
+#line 348 "runpicture.in"
// void deletepreamble();
void gen_runpicture31(stack *)
{
-#line 348 "runpicture.in"
+#line 349 "runpicture.in"
if(getSetting<bool>("inlinetex")) {
unlink(buildname(outname(),"pre").c_str());
}
}
-#line 354 "runpicture.in"
+#line 355 "runpicture.in"
// void _labelpath(picture *f, string s, string size, path g, string justify, pair offset, pen p);
void gen_runpicture32(stack *Stack)
{
@@ -595,40 +596,40 @@ void gen_runpicture32(stack *Stack)
string size=vm::pop<string>(Stack);
string s=vm::pop<string>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 356 "runpicture.in"
+#line 357 "runpicture.in"
f->append(new drawLabelPath(s,size,g,justify,offset,p));
}
-#line 360 "runpicture.in"
+#line 361 "runpicture.in"
// void texreset();
void gen_runpicture33(stack *)
{
-#line 361 "runpicture.in"
+#line 362 "runpicture.in"
processDataStruct &pd=processData();
pd.TeXpipepreamble.clear();
pd.TeXpreamble.clear();
pd.tex.pipeclose();
}
-#line 368 "runpicture.in"
+#line 369 "runpicture.in"
// void layer(picture *f);
void gen_runpicture34(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 369 "runpicture.in"
+#line 370 "runpicture.in"
f->append(new drawLayer());
}
-#line 373 "runpicture.in"
+#line 374 "runpicture.in"
// void newpage(picture *f);
void gen_runpicture35(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 374 "runpicture.in"
+#line 375 "runpicture.in"
f->append(new drawNewPage());
}
-#line 378 "runpicture.in"
+#line 379 "runpicture.in"
// void _image(picture *f, realarray2 *data, pair initial, pair final, penarray *palette=NULL, transform t=identity, bool copy=true, bool antialias=false);
void gen_runpicture36(stack *Stack)
{
@@ -640,14 +641,14 @@ void gen_runpicture36(stack *Stack)
pair initial=vm::pop<pair>(Stack);
realarray2 * data=vm::pop<realarray2 *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 381 "runpicture.in"
+#line 382 "runpicture.in"
array *(*copyarray)(array *a)=copy ? copyArray : nop;
array *(*copyarray2)(array *a)=copy ? copyArray2 : nop;
f->append(new drawPaletteImage(*copyarray2(data),*copyarray(palette),
- t*matrix(initial,final),antialias));
+ t*matrix(initial,final),antialias));
}
-#line 388 "runpicture.in"
+#line 389 "runpicture.in"
// void _image(picture *f, penarray2 *data, pair initial, pair final, transform t=identity, bool copy=true, bool antialias=false);
void gen_runpicture37(stack *Stack)
{
@@ -658,13 +659,13 @@ void gen_runpicture37(stack *Stack)
pair initial=vm::pop<pair>(Stack);
penarray2 * data=vm::pop<penarray2 *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 390 "runpicture.in"
+#line 391 "runpicture.in"
array *(*copyarray2)(array *a)=copy ? copyArray2 : nop;
f->append(new drawNoPaletteImage(*copyarray2(data),t*matrix(initial,final),
antialias));
}
-#line 396 "runpicture.in"
+#line 397 "runpicture.in"
// void _image(picture *f, callablePen *F, Int width, Int height, pair initial, pair final, transform t=identity, bool antialias=false);
void gen_runpicture38(stack *Stack)
{
@@ -676,36 +677,36 @@ void gen_runpicture38(stack *Stack)
Int width=vm::pop<Int>(Stack);
callablePen * F=vm::pop<callablePen *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 398 "runpicture.in"
+#line 399 "runpicture.in"
f->append(new drawFunctionImage(Stack,F,width,height,
t*matrix(initial,final),antialias));
}
-#line 403 "runpicture.in"
+#line 404 "runpicture.in"
// string nativeformat();
void gen_runpicture39(stack *Stack)
{
-#line 404 "runpicture.in"
+#line 405 "runpicture.in"
{Stack->push<string>(nativeformat()); return;}
}
-#line 408 "runpicture.in"
+#line 409 "runpicture.in"
// bool latex();
void gen_runpicture40(stack *Stack)
{
-#line 409 "runpicture.in"
+#line 410 "runpicture.in"
{Stack->push<bool>(latex(getSetting<string>("tex"))); return;}
}
-#line 413 "runpicture.in"
+#line 414 "runpicture.in"
// bool pdf();
void gen_runpicture41(stack *Stack)
{
-#line 414 "runpicture.in"
+#line 415 "runpicture.in"
{Stack->push<bool>(pdf(getSetting<string>("tex"))); return;}
}
-#line 418 "runpicture.in"
+#line 419 "runpicture.in"
// void _shipout(string prefix=emptystring, picture *f, picture *preamble=NULL, string format=emptystring, bool wait=false, bool view=true, transform T=identity);
void gen_runpicture42(stack *Stack)
{
@@ -716,13 +717,13 @@ void gen_runpicture42(stack *Stack)
picture * preamble=vm::pop<picture *>(Stack,NULL);
picture * f=vm::pop<picture *>(Stack);
string prefix=vm::pop<string>(Stack,emptystring);
-#line 421 "runpicture.in"
+#line 422 "runpicture.in"
if(prefix.empty()) prefix=outname();
picture *result=new picture;
unsigned level=0;
picture::nodelist::iterator p;
-
+
xmap_t xmap=processData().xmap;
transform Tinv=inverse(T);
@@ -758,11 +759,11 @@ void gen_runpicture42(stack *Stack)
result->add(*group);
}
}
-
+
result->shipout(preamble,prefix,format,wait,view);
}
-#line 467 "runpicture.in"
+#line 468 "runpicture.in"
// void shipout3(string prefix, picture *f, string format=emptystring, real width, real height, real angle, real zoom, triple m, triple M, pair shift, pair margin, realarray2 *t, realarray *background, triplearray *lights, realarray2 *diffuse, realarray2 *specular, bool view=true);
void gen_runpicture43(stack *Stack)
{
@@ -783,10 +784,10 @@ void gen_runpicture43(stack *Stack)
string format=vm::pop<string>(Stack,emptystring);
picture * f=vm::pop<picture *>(Stack);
string prefix=vm::pop<string>(Stack);
-#line 472 "runpicture.in"
+#line 473 "runpicture.in"
size_t n=checkArrays(lights,diffuse);
checkEqual(n,checkArray(specular));
-
+
real *T,*Background,*Diffuse,*Specular;
triple *Lights;
@@ -795,36 +796,36 @@ void gen_runpicture43(stack *Stack)
copyArrayC(Lights,lights);
copyArray2C(Diffuse,diffuse,false,4,UseGC);
copyArray2C(Specular,specular,false,4,UseGC);
-
+
f->shipout3(prefix,format,width,height,angle,zoom,m,M,shift,margin,T,
Background,n,Lights,Diffuse,Specular,view);
-
+
delete[] Background;
delete[] T;
}
-#line 492 "runpicture.in"
+#line 493 "runpicture.in"
// void shipout3(string prefix, picture *f, string format=defaultformat3);
void gen_runpicture44(stack *Stack)
{
string format=vm::pop<string>(Stack,defaultformat3);
picture * f=vm::pop<picture *>(Stack);
string prefix=vm::pop<string>(Stack);
-#line 493 "runpicture.in"
+#line 494 "runpicture.in"
f->shipout3(prefix,format);
}
-#line 497 "runpicture.in"
+#line 498 "runpicture.in"
// void xmap(string key, transform t=identity);
void gen_runpicture45(stack *Stack)
{
transform t=vm::pop<transform>(Stack,identity);
string key=vm::pop<string>(Stack);
-#line 498 "runpicture.in"
+#line 499 "runpicture.in"
xmap_t &xmap=processData().xmap;
xmap_t::iterator p=xmap.find(key);
if(p != xmap.end())
- p->second.push_back(t);
+ p->second.push_back(t);
else {
xtransform_t *v=new xtransform_t();
v->push_back(t);
@@ -832,14 +833,14 @@ void gen_runpicture45(stack *Stack)
}
}
-#line 510 "runpicture.in"
+#line 511 "runpicture.in"
// void deconstruct(picture *f, picture *preamble=NULL, transform T=identity);
void gen_runpicture46(stack *Stack)
{
transform T=vm::pop<transform>(Stack,identity);
picture * preamble=vm::pop<picture *>(Stack,NULL);
picture * f=vm::pop<picture *>(Stack);
-#line 511 "runpicture.in"
+#line 512 "runpicture.in"
unsigned level=0;
string prefix=outname();
@@ -849,14 +850,14 @@ void gen_runpicture46(stack *Stack)
const string Done="Done";
const string Error="Error";
-
+
unsigned arg=0;
xmap_t xmap=processData().xmap;
transform Tinv=inverse(T);
-
+
for(picture::nodelist::iterator p=f->nodes.begin();;) {
if(p == f->nodes.end()) break;
-
+
picture *group=new picture;
transform t=getTransform(xmap,p);
bool Delete=(t == ZeroTransform);
@@ -895,29 +896,29 @@ void gen_runpicture46(stack *Stack)
if(!Delete) {
drawElement *e=t.isIdentity() ? *p : (*p)->transformed(t);
group->append(e);
- if((*p)->endclip()) clip=true;
- ostringstream buf;
- buf << prefix << "_" << arg;
- string outname=buildname(buf.str(),xformat);
- group->shipout(preamble,outname,xformat,false,false);
bbox b=group->bounds();
- if(!b.empty) {
- fprintf(pipeout,"KEY=%s%d\n",e->KEY.c_str(),clip);
-
+ if(!b.empty && b.right > b.left && b.top > b.bottom) {
+ if((*p)->endclip()) clip=true;
+ ostringstream buf;
+ buf << prefix << "_" << arg;
+ string outname=buildname(buf.str(),xformat);
+ group->shipout(preamble,outname,xformat,false,false);
+ fprintf(pipeout,"KEY=%s%d\n",e->KEY.c_str(),clip || f->havepng());
+
const char *oldlocale=setlocale(LC_NUMERIC,NULL);
bool override=oldlocale && strcmp(oldlocale,"C") != 0;
if(override) {
oldlocale=StrdupNoGC(oldlocale);
setlocale(LC_NUMERIC,"C");
}
-
+
fprintf(pipeout,"%g %g %g %g\n",b.left,b.bottom,b.right,b.top);
-
+
if(override) {
setlocale(LC_NUMERIC,oldlocale);
delete[] oldlocale;
}
-
+
fflush(pipeout);
++arg;
}
@@ -925,7 +926,7 @@ void gen_runpicture46(stack *Stack)
++p;
}
}
-
+
fprintf(pipeout,"%s\n",Done.c_str());
fflush(pipeout);
}
@@ -934,8 +935,8 @@ void gen_runpicture46(stack *Stack)
// Three-dimensional picture and surface operations
// Bezier curve
-#line 606 "runpicture.in"
-// void _draw(picture *f, path3 g, triple center=Zero, penarray *p, real opacity, real shininess, real metallic, real fresnel0, Int interaction=0);
+#line 607 "runpicture.in"
+// void _draw(picture *f, path3 g, triple center=Zero, penarray *p, real opacity, real shininess, real metallic, real fresnel0, Int interaction=0);
void gen_runpicture47(stack *Stack)
{
Int interaction=vm::pop<Int>(Stack,0);
@@ -947,18 +948,21 @@ void gen_runpicture47(stack *Stack)
triple center=vm::pop<triple>(Stack,Zero);
path3 g=vm::pop<path3>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 609 "runpicture.in"
- if(g.size() > 0)
- f->append(new drawPath3(g,center,*p,opacity,shininess,metallic,fresnel0,
+#line 610 "runpicture.in"
+ size_t n=g.size();
+ for(unsigned int i=0; i < n; ++i)
+ f->append(new drawPath3(g.subpath((Int) i,Int(i+1)),center,*p,opacity,
+ shininess,metallic,fresnel0,
(Interaction) intcast(interaction)));
}
// Bezier patch
-#line 616 "runpicture.in"
-// void draw(picture *f, triplearray2 *P, triple center, bool straight, penarray *p, real opacity, real shininess, real metallic, real fresnel0, penarray *colors, Int interaction, bool primitive=false);
+#line 619 "runpicture.in"
+// void draw(picture *f, triplearray2 *P, triple center, bool straight, penarray *p, real opacity, real shininess, real metallic, real fresnel0, penarray *colors, Int interaction, Int digits, bool primitive=false);
void gen_runpicture48(stack *Stack)
{
bool primitive=vm::pop<bool>(Stack,false);
+ Int digits=vm::pop<Int>(Stack);
Int interaction=vm::pop<Int>(Stack);
penarray * colors=vm::pop<penarray *>(Stack);
real fresnel0=vm::pop<real>(Stack);
@@ -970,18 +974,20 @@ void gen_runpicture48(stack *Stack)
triple center=vm::pop<triple>(Stack);
triplearray2 * P=vm::pop<triplearray2 *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 620 "runpicture.in"
+#line 623 "runpicture.in"
f->append(new drawBezierPatch(*P,center,straight,*p,opacity,shininess,
metallic,fresnel0,*colors,
- (Interaction) intcast(interaction),primitive));
+ (Interaction) intcast(interaction),
+ digits,primitive));
}
// Bezier triangle
-#line 627 "runpicture.in"
-// void drawbeziertriangle(picture *f, triplearray2 *P, triple center, bool straight, penarray *p, real opacity, real shininess, real metallic, real fresnel0, penarray *colors, Int interaction, bool primitive=false);
+#line 631 "runpicture.in"
+// void drawbeziertriangle(picture *f, triplearray2 *P, triple center, bool straight, penarray *p, real opacity, real shininess, real metallic, real fresnel0, penarray *colors, Int interaction, Int digits, bool primitive=false);
void gen_runpicture49(stack *Stack)
{
bool primitive=vm::pop<bool>(Stack,false);
+ Int digits=vm::pop<Int>(Stack);
Int interaction=vm::pop<Int>(Stack);
penarray * colors=vm::pop<penarray *>(Stack);
real fresnel0=vm::pop<real>(Stack);
@@ -993,15 +999,15 @@ void gen_runpicture49(stack *Stack)
triple center=vm::pop<triple>(Stack);
triplearray2 * P=vm::pop<triplearray2 *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 632 "runpicture.in"
+#line 636 "runpicture.in"
f->append(new drawBezierTriangle(*P,center,straight,*p,opacity,shininess,
metallic,fresnel0,*colors,
(Interaction) intcast(interaction),
- primitive));
+ digits,primitive));
}
// General NURBS curve
-#line 640 "runpicture.in"
+#line 644 "runpicture.in"
// void draw(picture *f, triplearray *P, realarray *knot, realarray *weights=emptyarray, pen p);
void gen_runpicture50(stack *Stack)
{
@@ -1010,12 +1016,12 @@ void gen_runpicture50(stack *Stack)
realarray * knot=vm::pop<realarray *>(Stack);
triplearray * P=vm::pop<triplearray *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 642 "runpicture.in"
+#line 646 "runpicture.in"
f->append(new drawNurbsPath3(*P,knot,weights,p));
}
// General NURBS surface
-#line 647 "runpicture.in"
+#line 651 "runpicture.in"
// void draw(picture *f, triplearray2 *P, realarray *uknot, realarray *vknot, realarray2 *weights=emptyarray, penarray *p, real opacity, real shininess,real metallic, real fresnel0, penarray *colors);
void gen_runpicture51(stack *Stack)
{
@@ -1030,13 +1036,13 @@ void gen_runpicture51(stack *Stack)
realarray * uknot=vm::pop<realarray *>(Stack);
triplearray2 * P=vm::pop<triplearray2 *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 650 "runpicture.in"
+#line 654 "runpicture.in"
f->append(new drawNurbs(*P,uknot,vknot,weights,*p,opacity,shininess,
metallic,fresnel0,*colors));
}
// Sphere primitive
-#line 656 "runpicture.in"
+#line 660 "runpicture.in"
// void drawSphere(picture *f, realarray2 *t, bool half=false, penarray *p, real opacity, real shininess, real metallic, real fresnel0, Int type);
void gen_runpicture52(stack *Stack)
{
@@ -1049,13 +1055,13 @@ void gen_runpicture52(stack *Stack)
bool half=vm::pop<bool>(Stack,false);
realarray2 * t=vm::pop<realarray2 *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 659 "runpicture.in"
+#line 663 "runpicture.in"
f->append(new drawSphere(*t,half,*p,opacity,shininess,metallic,fresnel0,
intcast(type)));
}
// Cylinder primitive
-#line 665 "runpicture.in"
+#line 669 "runpicture.in"
// void drawCylinder(picture *f, realarray2 *t, penarray *p, real opacity, real shininess, real metallic, real fresnel0, bool core=false);
void gen_runpicture53(stack *Stack)
{
@@ -1067,12 +1073,12 @@ void gen_runpicture53(stack *Stack)
penarray * p=vm::pop<penarray *>(Stack);
realarray2 * t=vm::pop<realarray2 *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 668 "runpicture.in"
+#line 672 "runpicture.in"
f->append(new drawCylinder(*t,*p,opacity,shininess,metallic,fresnel0,core));
}
// Disk primitive
-#line 673 "runpicture.in"
+#line 677 "runpicture.in"
// void drawDisk(picture *f, realarray2 *t, penarray *p, real opacity, real shininess, real metallic, real fresnel0);
void gen_runpicture54(stack *Stack)
{
@@ -1083,12 +1089,12 @@ void gen_runpicture54(stack *Stack)
penarray * p=vm::pop<penarray *>(Stack);
realarray2 * t=vm::pop<realarray2 *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 675 "runpicture.in"
+#line 679 "runpicture.in"
f->append(new drawDisk(*t,*p,opacity,shininess,metallic,fresnel0));
}
// Tube primitive
-#line 680 "runpicture.in"
+#line 684 "runpicture.in"
// void drawTube(picture *f, triplearray *g, real width, penarray *p, real opacity, real shininess, real metallic, real fresnel0, triple min, triple max, bool core=false);
void gen_runpicture55(stack *Stack)
{
@@ -1103,13 +1109,13 @@ void gen_runpicture55(stack *Stack)
real width=vm::pop<real>(Stack);
triplearray * g=vm::pop<triplearray *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 683 "runpicture.in"
+#line 687 "runpicture.in"
f->append(new drawTube(*g,width,*p,opacity,shininess,metallic,fresnel0,
min,max,core));
}
// Draw pixel
-#line 689 "runpicture.in"
+#line 693 "runpicture.in"
// void drawpixel(picture *f, triple v, pen p, real width=1.0);
void gen_runpicture56(stack *Stack)
{
@@ -1117,13 +1123,13 @@ void gen_runpicture56(stack *Stack)
pen p=vm::pop<pen>(Stack);
triple v=vm::pop<triple>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 690 "runpicture.in"
+#line 694 "runpicture.in"
f->append(new drawPixel(v,p,width));
}
// Draw triangles
-#line 695 "runpicture.in"
-// void draw(picture *f, triplearray *v, Intarray2 *vi, triplearray *n, Intarray2 *ni, penarray *p, real opacity, real shininess, real metallic, real fresnel0, penarray *c=emptyarray, Intarray2 *ci=emptyarray);
+#line 699 "runpicture.in"
+// void draw(picture *f, triplearray *v, Intarray2 *vi, triplearray *n, Intarray2 *ni, penarray *p, real opacity, real shininess, real metallic, real fresnel0, penarray *c=emptyarray, Intarray2 *ci=emptyarray);
void gen_runpicture57(stack *Stack)
{
Intarray2 * ci=vm::pop<Intarray2 *>(Stack,emptyarray);
@@ -1138,63 +1144,63 @@ void gen_runpicture57(stack *Stack)
Intarray2 * vi=vm::pop<Intarray2 *>(Stack);
triplearray * v=vm::pop<triplearray *>(Stack);
picture * f=vm::pop<picture *>(Stack);
-#line 700 "runpicture.in"
+#line 704 "runpicture.in"
f->append(new drawTriangles(*v,*vi,*n,*ni,*p,opacity,shininess,metallic,
fresnel0,*c,*ci));
}
-#line 705 "runpicture.in"
+#line 709 "runpicture.in"
// triple min3(picture *f);
void gen_runpicture58(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 706 "runpicture.in"
+#line 710 "runpicture.in"
{Stack->push<triple>(f->bounds3().Min()); return;}
}
-#line 710 "runpicture.in"
+#line 714 "runpicture.in"
// triple max3(picture *f);
void gen_runpicture59(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 711 "runpicture.in"
+#line 715 "runpicture.in"
{Stack->push<triple>(f->bounds3().Max()); return;}
}
-#line 715 "runpicture.in"
+#line 719 "runpicture.in"
// triple size3(picture *f);
void gen_runpicture60(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 716 "runpicture.in"
+#line 720 "runpicture.in"
bbox3 b=f->bounds3();
{Stack->push<triple>(b.Max()-b.Min()); return;}
}
-#line 721 "runpicture.in"
+#line 725 "runpicture.in"
// pair minratio(picture *f);
void gen_runpicture61(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 722 "runpicture.in"
+#line 726 "runpicture.in"
{Stack->push<pair>(f->ratio(::min)); return;}
}
-#line 726 "runpicture.in"
+#line 730 "runpicture.in"
// pair maxratio(picture *f);
void gen_runpicture62(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 727 "runpicture.in"
+#line 731 "runpicture.in"
{Stack->push<pair>(f->ratio(::max)); return;}
}
-#line 731 "runpicture.in"
+#line 735 "runpicture.in"
// bool is3D(picture *f);
void gen_runpicture63(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
-#line 732 "runpicture.in"
+#line 736 "runpicture.in"
{Stack->push<bool>(f->have3D()); return;}
}
@@ -1219,118 +1225,118 @@ void gen_runpicture_venv(venv &ve)
#line 157 "runpicture.in"
addFunc(ve, run::gen_runpicture6, primVoid(), SYM(_draw), formal(primPicture(), SYM(f), false, false), formal(primPath(), SYM(g), false, false), formal(primPen(), SYM(p), false, false));
#line 162 "runpicture.in"
- addFunc(ve, run::gen_runpicture7, primVoid(), SYM(fill), formal(primPicture(), SYM(f), false, false), formal(pathArray() , SYM(g), false, false), formal(primPen(), SYM(p), true, false), formal(primBoolean(), SYM(copy), true, false));
+ addFunc(ve, run::gen_runpicture7, primVoid(), SYM(fill), formal(primPicture(), SYM(f), false, false), formal(pathArray(), SYM(g), false, false), formal(primPen(), SYM(p), true, false), formal(primBoolean(), SYM(copy), true, false));
#line 168 "runpicture.in"
- addFunc(ve, run::gen_runpicture8, primVoid(), SYM(latticeshade), formal(primPicture(), SYM(f), false, false), formal(pathArray() , SYM(g), false, false), formal(primBoolean(), SYM(stroke), true, false), formal(primPen(), SYM(fillrule), true, false), formal(penArray2() , SYM(p), false, false), formal(primTransform(), SYM(t), true, false), formal(primBoolean(), SYM(copy), true, false));
+ addFunc(ve, run::gen_runpicture8, primVoid(), SYM(latticeshade), formal(primPicture(), SYM(f), false, false), formal(pathArray(), SYM(g), false, false), formal(primBoolean(), SYM(stroke), true, false), formal(primPen(), SYM(fillrule), true, false), formal(penArray2(), SYM(p), false, false), formal(primTransform(), SYM(t), true, false), formal(primBoolean(), SYM(copy), true, false));
#line 177 "runpicture.in"
- addFunc(ve, run::gen_runpicture9, primVoid(), SYM(axialshade), formal(primPicture(), SYM(f), false, false), formal(pathArray() , SYM(g), false, false), formal(primBoolean(), SYM(stroke), true, false), formal(primPen(), SYM(pena), false, false), formal(primPair(), SYM(a), false, false), formal(primBoolean(), SYM(extenda), true, false), formal(primPen(), SYM(penb), false, false), formal(primPair(), SYM(b), false, false), formal(primBoolean(), SYM(extendb), true, false), formal(primBoolean(), SYM(copy), true, false));
+ addFunc(ve, run::gen_runpicture9, primVoid(), SYM(axialshade), formal(primPicture(), SYM(f), false, false), formal(pathArray(), SYM(g), false, false), formal(primBoolean(), SYM(stroke), true, false), formal(primPen(), SYM(pena), false, false), formal(primPair(), SYM(a), false, false), formal(primBoolean(), SYM(extenda), true, false), formal(primPen(), SYM(penb), false, false), formal(primPair(), SYM(b), false, false), formal(primBoolean(), SYM(extendb), true, false), formal(primBoolean(), SYM(copy), true, false));
#line 186 "runpicture.in"
- addFunc(ve, run::gen_runpicture10, primVoid(), SYM(radialshade), formal(primPicture(), SYM(f), false, false), formal(pathArray() , SYM(g), false, false), formal(primBoolean(), SYM(stroke), true, false), formal(primPen(), SYM(pena), false, false), formal(primPair(), SYM(a), false, false), formal(primReal(), SYM(ra), false, false), formal(primBoolean(), SYM(extenda), true, false), formal(primPen(), SYM(penb), false, false), formal(primPair(), SYM(b), false, false), formal(primReal(), SYM(rb), false, false), formal(primBoolean(), SYM(extendb), true, false), formal(primBoolean(), SYM(copy), true, false));
+ addFunc(ve, run::gen_runpicture10, primVoid(), SYM(radialshade), formal(primPicture(), SYM(f), false, false), formal(pathArray(), SYM(g), false, false), formal(primBoolean(), SYM(stroke), true, false), formal(primPen(), SYM(pena), false, false), formal(primPair(), SYM(a), false, false), formal(primReal(), SYM(ra), false, false), formal(primBoolean(), SYM(extenda), true, false), formal(primPen(), SYM(penb), false, false), formal(primPair(), SYM(b), false, false), formal(primReal(), SYM(rb), false, false), formal(primBoolean(), SYM(extendb), true, false), formal(primBoolean(), SYM(copy), true, false));
#line 195 "runpicture.in"
- addFunc(ve, run::gen_runpicture11, primVoid(), SYM(gouraudshade), formal(primPicture(), SYM(f), false, false), formal(pathArray() , SYM(g), false, false), formal(primBoolean(), SYM(stroke), true, false), formal(primPen(), SYM(fillrule), true, false), formal(penArray() , SYM(p), false, false), formal(pairArray(), SYM(z), false, false), formal(IntArray(), SYM(edges), false, false), formal(primBoolean(), SYM(copy), true, false));
+ addFunc(ve, run::gen_runpicture11, primVoid(), SYM(gouraudshade), formal(primPicture(), SYM(f), false, false), formal(pathArray(), SYM(g), false, false), formal(primBoolean(), SYM(stroke), true, false), formal(primPen(), SYM(fillrule), true, false), formal(penArray(), SYM(p), false, false), formal(pairArray(), SYM(z), false, false), formal(IntArray(), SYM(edges), false, false), formal(primBoolean(), SYM(copy), true, false));
#line 206 "runpicture.in"
- addFunc(ve, run::gen_runpicture12, primVoid(), SYM(gouraudshade), formal(primPicture(), SYM(f), false, false), formal(pathArray() , SYM(g), false, false), formal(primBoolean(), SYM(stroke), true, false), formal(primPen(), SYM(fillrule), true, false), formal(penArray() , SYM(p), false, false), formal(IntArray(), SYM(edges), false, false), formal(primBoolean(), SYM(copy), true, false));
+ addFunc(ve, run::gen_runpicture12, primVoid(), SYM(gouraudshade), formal(primPicture(), SYM(f), false, false), formal(pathArray(), SYM(g), false, false), formal(primBoolean(), SYM(stroke), true, false), formal(primPen(), SYM(fillrule), true, false), formal(penArray(), SYM(p), false, false), formal(IntArray(), SYM(edges), false, false), formal(primBoolean(), SYM(copy), true, false));
#line 230 "runpicture.in"
- addFunc(ve, run::gen_runpicture13, primVoid(), SYM(tensorshade), formal(primPicture(), SYM(f), false, false), formal(pathArray() , SYM(g), false, false), formal(primBoolean(), SYM(stroke), true, false), formal(primPen(), SYM(fillrule), true, false), formal(penArray2() , SYM(p), false, false), formal(pathArray() , SYM(b), true, false), formal(pairArray2(), SYM(z), true, false), formal(primBoolean(), SYM(copy), true, false));
-#line 245 "runpicture.in"
- addFunc(ve, run::gen_runpicture14, primVoid(), SYM(functionshade), formal(primPicture(), SYM(f), false, false), formal(pathArray() , SYM(g), false, false), formal(primBoolean(), SYM(stroke), true, false), formal(primPen(), SYM(fillrule), true, false), formal(primString() , SYM(shader), true, false), formal(primBoolean(), SYM(copy), true, false));
-#line 253 "runpicture.in"
- addFunc(ve, run::gen_runpicture15, primVoid(), SYM(clip), formal(primPicture(), SYM(f), false, false), formal(pathArray() , SYM(g), false, false), formal(primBoolean(), SYM(stroke), true, false), formal(primPen(), SYM(fillrule), true, false), formal(primBoolean(), SYM(copy), true, false));
-#line 263 "runpicture.in"
- addFunc(ve, run::gen_runpicture16, primVoid(), SYM(beginclip), formal(primPicture(), SYM(f), false, false), formal(pathArray() , SYM(g), false, false), formal(primBoolean(), SYM(stroke), true, false), formal(primPen(), SYM(fillrule), true, false), formal(primBoolean(), SYM(copy), true, false));
-#line 270 "runpicture.in"
+ addFunc(ve, run::gen_runpicture13, primVoid(), SYM(tensorshade), formal(primPicture(), SYM(f), false, false), formal(pathArray(), SYM(g), false, false), formal(primBoolean(), SYM(stroke), true, false), formal(primPen(), SYM(fillrule), true, false), formal(penArray2(), SYM(p), false, false), formal(pathArray(), SYM(b), true, false), formal(pairArray2(), SYM(z), true, false), formal(primBoolean(), SYM(copy), true, false));
+#line 246 "runpicture.in"
+ addFunc(ve, run::gen_runpicture14, primVoid(), SYM(functionshade), formal(primPicture(), SYM(f), false, false), formal(pathArray(), SYM(g), false, false), formal(primBoolean(), SYM(stroke), true, false), formal(primPen(), SYM(fillrule), true, false), formal(primString(), SYM(shader), true, false), formal(primBoolean(), SYM(copy), true, false));
+#line 254 "runpicture.in"
+ addFunc(ve, run::gen_runpicture15, primVoid(), SYM(clip), formal(primPicture(), SYM(f), false, false), formal(pathArray(), SYM(g), false, false), formal(primBoolean(), SYM(stroke), true, false), formal(primPen(), SYM(fillrule), true, false), formal(primBoolean(), SYM(copy), true, false));
+#line 264 "runpicture.in"
+ addFunc(ve, run::gen_runpicture16, primVoid(), SYM(beginclip), formal(primPicture(), SYM(f), false, false), formal(pathArray(), SYM(g), false, false), formal(primBoolean(), SYM(stroke), true, false), formal(primPen(), SYM(fillrule), true, false), formal(primBoolean(), SYM(copy), true, false));
+#line 271 "runpicture.in"
addFunc(ve, run::gen_runpicture17, primVoid(), SYM(endclip), formal(primPicture(), SYM(f), false, false));
-#line 275 "runpicture.in"
+#line 276 "runpicture.in"
addFunc(ve, run::gen_runpicture18, primVoid(), SYM(gsave), formal(primPicture(), SYM(f), false, false));
-#line 280 "runpicture.in"
+#line 281 "runpicture.in"
addFunc(ve, run::gen_runpicture19, primVoid(), SYM(grestore), formal(primPicture(), SYM(f), false, false));
-#line 285 "runpicture.in"
+#line 286 "runpicture.in"
addFunc(ve, run::gen_runpicture20, primVoid(), SYM(begingroup), formal(primPicture(), SYM(f), false, false));
-#line 290 "runpicture.in"
+#line 291 "runpicture.in"
addFunc(ve, run::gen_runpicture21, primVoid(), SYM(endgroup), formal(primPicture(), SYM(f), false, false));
-#line 295 "runpicture.in"
- addFunc(ve, run::gen_runpicture22, primVoid(), SYM(_begingroup3), formal(primPicture(), SYM(f), false, false), formal(primString() , SYM(name), false, false), formal(primReal(), SYM(compression), false, false), formal(primReal(), SYM(granularity), false, false), formal(primBoolean(), SYM(closed), false, false), formal(primBoolean(), SYM(tessellate), false, false), formal(primBoolean(), SYM(dobreak), false, false), formal(primBoolean(), SYM(nobreak), false, false), formal(primTriple(), SYM(center), false, false), formal(primInt(), SYM(interaction), false, false));
-#line 304 "runpicture.in"
+#line 296 "runpicture.in"
+ addFunc(ve, run::gen_runpicture22, primVoid(), SYM(_begingroup3), formal(primPicture(), SYM(f), false, false), formal(primString(), SYM(name), false, false), formal(primReal(), SYM(compression), false, false), formal(primReal(), SYM(granularity), false, false), formal(primBoolean(), SYM(closed), false, false), formal(primBoolean(), SYM(tessellate), false, false), formal(primBoolean(), SYM(dobreak), false, false), formal(primBoolean(), SYM(nobreak), false, false), formal(primTriple(), SYM(center), false, false), formal(primInt(), SYM(interaction), false, false));
+#line 305 "runpicture.in"
addFunc(ve, run::gen_runpicture23, primVoid(), SYM(endgroup3), formal(primPicture(), SYM(f), false, false));
-#line 309 "runpicture.in"
+#line 310 "runpicture.in"
addFunc(ve, run::gen_runpicture24, primVoid(), SYM(add), formal(primPicture(), SYM(dest), false, false), formal(primPicture(), SYM(src), false, false));
-#line 314 "runpicture.in"
+#line 315 "runpicture.in"
addFunc(ve, run::gen_runpicture25, primVoid(), SYM(prepend), formal(primPicture(), SYM(dest), false, false), formal(primPicture(), SYM(src), false, false));
-#line 319 "runpicture.in"
- addFunc(ve, run::gen_runpicture26, primVoid(), SYM(postscript), formal(primPicture(), SYM(f), false, false), formal(primString() , SYM(s), false, false));
-#line 324 "runpicture.in"
- addFunc(ve, run::gen_runpicture27, primVoid(), SYM(tex), formal(primPicture(), SYM(f), false, false), formal(primString() , SYM(s), false, false));
-#line 329 "runpicture.in"
- addFunc(ve, run::gen_runpicture28, primVoid(), SYM(postscript), formal(primPicture(), SYM(f), false, false), formal(primString() , SYM(s), false, false), formal(primPair(), SYM(min), false, false), formal(primPair(), SYM(max), false, false));
-#line 334 "runpicture.in"
- addFunc(ve, run::gen_runpicture29, primVoid(), SYM(tex), formal(primPicture(), SYM(f), false, false), formal(primString() , SYM(s), false, false), formal(primPair(), SYM(min), false, false), formal(primPair(), SYM(max), false, false));
-#line 339 "runpicture.in"
- addFunc(ve, run::gen_runpicture30, primVoid(), SYM(texpreamble), formal(primString() , SYM(s), false, false));
-#line 347 "runpicture.in"
+#line 320 "runpicture.in"
+ addFunc(ve, run::gen_runpicture26, primVoid(), SYM(postscript), formal(primPicture(), SYM(f), false, false), formal(primString(), SYM(s), false, false));
+#line 325 "runpicture.in"
+ addFunc(ve, run::gen_runpicture27, primVoid(), SYM(tex), formal(primPicture(), SYM(f), false, false), formal(primString(), SYM(s), false, false));
+#line 330 "runpicture.in"
+ addFunc(ve, run::gen_runpicture28, primVoid(), SYM(postscript), formal(primPicture(), SYM(f), false, false), formal(primString(), SYM(s), false, false), formal(primPair(), SYM(min), false, false), formal(primPair(), SYM(max), false, false));
+#line 335 "runpicture.in"
+ addFunc(ve, run::gen_runpicture29, primVoid(), SYM(tex), formal(primPicture(), SYM(f), false, false), formal(primString(), SYM(s), false, false), formal(primPair(), SYM(min), false, false), formal(primPair(), SYM(max), false, false));
+#line 340 "runpicture.in"
+ addFunc(ve, run::gen_runpicture30, primVoid(), SYM(texpreamble), formal(primString(), SYM(s), false, false));
+#line 348 "runpicture.in"
addFunc(ve, run::gen_runpicture31, primVoid(), SYM(deletepreamble));
-#line 354 "runpicture.in"
- addFunc(ve, run::gen_runpicture32, primVoid(), SYM(_labelpath), formal(primPicture(), SYM(f), false, false), formal(primString() , SYM(s), false, false), formal(primString() , SYM(size), false, false), formal(primPath(), SYM(g), false, false), formal(primString() , SYM(justify), false, false), formal(primPair(), SYM(offset), false, false), formal(primPen(), SYM(p), false, false));
-#line 360 "runpicture.in"
+#line 355 "runpicture.in"
+ addFunc(ve, run::gen_runpicture32, primVoid(), SYM(_labelpath), formal(primPicture(), SYM(f), false, false), formal(primString(), SYM(s), false, false), formal(primString(), SYM(size), false, false), formal(primPath(), SYM(g), false, false), formal(primString(), SYM(justify), false, false), formal(primPair(), SYM(offset), false, false), formal(primPen(), SYM(p), false, false));
+#line 361 "runpicture.in"
addFunc(ve, run::gen_runpicture33, primVoid(), SYM(texreset));
-#line 368 "runpicture.in"
+#line 369 "runpicture.in"
addFunc(ve, run::gen_runpicture34, primVoid(), SYM(layer), formal(primPicture(), SYM(f), false, false));
-#line 373 "runpicture.in"
+#line 374 "runpicture.in"
addFunc(ve, run::gen_runpicture35, primVoid(), SYM(newpage), formal(primPicture(), SYM(f), false, false));
-#line 378 "runpicture.in"
- addFunc(ve, run::gen_runpicture36, primVoid(), SYM(_image), formal(primPicture(), SYM(f), false, false), formal(realArray2(), SYM(data), false, false), formal(primPair(), SYM(initial), false, false), formal(primPair(), SYM(final), false, false), formal(penArray() , SYM(palette), true, false), formal(primTransform(), SYM(t), true, false), formal(primBoolean(), SYM(copy), true, false), formal(primBoolean(), SYM(antialias), true, false));
-#line 388 "runpicture.in"
- addFunc(ve, run::gen_runpicture37, primVoid(), SYM(_image), formal(primPicture(), SYM(f), false, false), formal(penArray2() , SYM(data), false, false), formal(primPair(), SYM(initial), false, false), formal(primPair(), SYM(final), false, false), formal(primTransform(), SYM(t), true, false), formal(primBoolean(), SYM(copy), true, false), formal(primBoolean(), SYM(antialias), true, false));
-#line 396 "runpicture.in"
+#line 379 "runpicture.in"
+ addFunc(ve, run::gen_runpicture36, primVoid(), SYM(_image), formal(primPicture(), SYM(f), false, false), formal(realArray2(), SYM(data), false, false), formal(primPair(), SYM(initial), false, false), formal(primPair(), SYM(final), false, false), formal(penArray(), SYM(palette), true, false), formal(primTransform(), SYM(t), true, false), formal(primBoolean(), SYM(copy), true, false), formal(primBoolean(), SYM(antialias), true, false));
+#line 389 "runpicture.in"
+ addFunc(ve, run::gen_runpicture37, primVoid(), SYM(_image), formal(primPicture(), SYM(f), false, false), formal(penArray2(), SYM(data), false, false), formal(primPair(), SYM(initial), false, false), formal(primPair(), SYM(final), false, false), formal(primTransform(), SYM(t), true, false), formal(primBoolean(), SYM(copy), true, false), formal(primBoolean(), SYM(antialias), true, false));
+#line 397 "runpicture.in"
addFunc(ve, run::gen_runpicture38, primVoid(), SYM(_image), formal(primPicture(), SYM(f), false, false), formal(penFunction(), SYM(f), false, false), formal(primInt(), SYM(width), false, false), formal(primInt(), SYM(height), false, false), formal(primPair(), SYM(initial), false, false), formal(primPair(), SYM(final), false, false), formal(primTransform(), SYM(t), true, false), formal(primBoolean(), SYM(antialias), true, false));
-#line 403 "runpicture.in"
- addFunc(ve, run::gen_runpicture39, primString() , SYM(nativeformat));
-#line 408 "runpicture.in"
+#line 404 "runpicture.in"
+ addFunc(ve, run::gen_runpicture39, primString(), SYM(nativeformat));
+#line 409 "runpicture.in"
addFunc(ve, run::gen_runpicture40, primBoolean(), SYM(latex));
-#line 413 "runpicture.in"
+#line 414 "runpicture.in"
addFunc(ve, run::gen_runpicture41, primBoolean(), SYM(pdf));
-#line 418 "runpicture.in"
- addFunc(ve, run::gen_runpicture42, primVoid(), SYM(_shipout), formal(primString() , SYM(prefix), true, false), formal(primPicture(), SYM(f), false, false), formal(primPicture(), SYM(preamble), true, false), formal(primString() , SYM(format), true, false), formal(primBoolean(), SYM(wait), true, false), formal(primBoolean(), SYM(view), true, false), formal(primTransform(), SYM(t), true, false));
-#line 467 "runpicture.in"
- addFunc(ve, run::gen_runpicture43, primVoid(), SYM(shipout3), formal(primString() , SYM(prefix), false, false), formal(primPicture(), SYM(f), false, false), formal(primString() , SYM(format), true, false), formal(primReal(), SYM(width), false, false), formal(primReal(), SYM(height), false, false), formal(primReal(), SYM(angle), false, false), formal(primReal(), SYM(zoom), false, false), formal(primTriple(), SYM(m), false, false), formal(primTriple(), SYM(m), false, false), formal(primPair(), SYM(shift), false, false), formal(primPair(), SYM(margin), false, false), formal(realArray2(), SYM(t), false, false), formal(realArray(), SYM(background), false, false), formal(tripleArray(), SYM(lights), false, false), formal(realArray2(), SYM(diffuse), false, false), formal(realArray2(), SYM(specular), false, false), formal(primBoolean(), SYM(view), true, false));
-#line 492 "runpicture.in"
- addFunc(ve, run::gen_runpicture44, primVoid(), SYM(shipout3), formal(primString() , SYM(prefix), false, false), formal(primPicture(), SYM(f), false, false), formal(primString() , SYM(format), true, false));
-#line 497 "runpicture.in"
- addFunc(ve, run::gen_runpicture45, primVoid(), SYM(xmap), formal(primString() , SYM(key), false, false), formal(primTransform(), SYM(t), true, false));
-#line 510 "runpicture.in"
+#line 419 "runpicture.in"
+ addFunc(ve, run::gen_runpicture42, primVoid(), SYM(_shipout), formal(primString(), SYM(prefix), true, false), formal(primPicture(), SYM(f), false, false), formal(primPicture(), SYM(preamble), true, false), formal(primString(), SYM(format), true, false), formal(primBoolean(), SYM(wait), true, false), formal(primBoolean(), SYM(view), true, false), formal(primTransform(), SYM(t), true, false));
+#line 468 "runpicture.in"
+ addFunc(ve, run::gen_runpicture43, primVoid(), SYM(shipout3), formal(primString(), SYM(prefix), false, false), formal(primPicture(), SYM(f), false, false), formal(primString(), SYM(format), true, false), formal(primReal(), SYM(width), false, false), formal(primReal(), SYM(height), false, false), formal(primReal(), SYM(angle), false, false), formal(primReal(), SYM(zoom), false, false), formal(primTriple(), SYM(m), false, false), formal(primTriple(), SYM(m), false, false), formal(primPair(), SYM(shift), false, false), formal(primPair(), SYM(margin), false, false), formal(realArray2(), SYM(t), false, false), formal(realArray(), SYM(background), false, false), formal(tripleArray(), SYM(lights), false, false), formal(realArray2(), SYM(diffuse), false, false), formal(realArray2(), SYM(specular), false, false), formal(primBoolean(), SYM(view), true, false));
+#line 493 "runpicture.in"
+ addFunc(ve, run::gen_runpicture44, primVoid(), SYM(shipout3), formal(primString(), SYM(prefix), false, false), formal(primPicture(), SYM(f), false, false), formal(primString(), SYM(format), true, false));
+#line 498 "runpicture.in"
+ addFunc(ve, run::gen_runpicture45, primVoid(), SYM(xmap), formal(primString(), SYM(key), false, false), formal(primTransform(), SYM(t), true, false));
+#line 511 "runpicture.in"
addFunc(ve, run::gen_runpicture46, primVoid(), SYM(deconstruct), formal(primPicture(), SYM(f), false, false), formal(primPicture(), SYM(preamble), true, false), formal(primTransform(), SYM(t), true, false));
-#line 602 "runpicture.in"
- addFunc(ve, run::gen_runpicture47, primVoid(), SYM(_draw), formal(primPicture(), SYM(f), false, false), formal(primPath3(), SYM(g), false, false), formal(primTriple(), SYM(center), true, false), formal(penArray() , SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false), formal(primReal(), SYM(metallic), false, false), formal(primReal(), SYM(fresnel0), false, false), formal(primInt(), SYM(interaction), true, false));
-#line 615 "runpicture.in"
- addFunc(ve, run::gen_runpicture48, primVoid(), SYM(draw), formal(primPicture(), SYM(f), false, false), formal(tripleArray2(), SYM(p), false, false), formal(primTriple(), SYM(center), false, false), formal(primBoolean(), SYM(straight), false, false), formal(penArray() , SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false), formal(primReal(), SYM(metallic), false, false), formal(primReal(), SYM(fresnel0), false, false), formal(penArray() , SYM(colors), false, false), formal(primInt(), SYM(interaction), false, false), formal(primBoolean(), SYM(primitive), true, false));
-#line 626 "runpicture.in"
- addFunc(ve, run::gen_runpicture49, primVoid(), SYM(drawbeziertriangle), formal(primPicture(), SYM(f), false, false), formal(tripleArray2(), SYM(p), false, false), formal(primTriple(), SYM(center), false, false), formal(primBoolean(), SYM(straight), false, false), formal(penArray() , SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false), formal(primReal(), SYM(metallic), false, false), formal(primReal(), SYM(fresnel0), false, false), formal(penArray() , SYM(colors), false, false), formal(primInt(), SYM(interaction), false, false), formal(primBoolean(), SYM(primitive), true, false));
-#line 639 "runpicture.in"
+#line 603 "runpicture.in"
+ addFunc(ve, run::gen_runpicture47, primVoid(), SYM(_draw), formal(primPicture(), SYM(f), false, false), formal(primPath3(), SYM(g), false, false), formal(primTriple(), SYM(center), true, false), formal(penArray(), SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false), formal(primReal(), SYM(metallic), false, false), formal(primReal(), SYM(fresnel0), false, false), formal(primInt(), SYM(interaction), true, false));
+#line 618 "runpicture.in"
+ addFunc(ve, run::gen_runpicture48, primVoid(), SYM(draw), formal(primPicture(), SYM(f), false, false), formal(tripleArray2(), SYM(p), false, false), formal(primTriple(), SYM(center), false, false), formal(primBoolean(), SYM(straight), false, false), formal(penArray(), SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false), formal(primReal(), SYM(metallic), false, false), formal(primReal(), SYM(fresnel0), false, false), formal(penArray(), SYM(colors), false, false), formal(primInt(), SYM(interaction), false, false), formal(primInt(), SYM(digits), false, false), formal(primBoolean(), SYM(primitive), true, false));
+#line 630 "runpicture.in"
+ addFunc(ve, run::gen_runpicture49, primVoid(), SYM(drawbeziertriangle), formal(primPicture(), SYM(f), false, false), formal(tripleArray2(), SYM(p), false, false), formal(primTriple(), SYM(center), false, false), formal(primBoolean(), SYM(straight), false, false), formal(penArray(), SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false), formal(primReal(), SYM(metallic), false, false), formal(primReal(), SYM(fresnel0), false, false), formal(penArray(), SYM(colors), false, false), formal(primInt(), SYM(interaction), false, false), formal(primInt(), SYM(digits), false, false), formal(primBoolean(), SYM(primitive), true, false));
+#line 643 "runpicture.in"
addFunc(ve, run::gen_runpicture50, primVoid(), SYM(draw), formal(primPicture(), SYM(f), false, false), formal(tripleArray(), SYM(p), false, false), formal(realArray(), SYM(knot), false, false), formal(realArray(), SYM(weights), true, false), formal(primPen(), SYM(p), false, false));
-#line 646 "runpicture.in"
- addFunc(ve, run::gen_runpicture51, primVoid(), SYM(draw), formal(primPicture(), SYM(f), false, false), formal(tripleArray2(), SYM(p), false, false), formal(realArray(), SYM(uknot), false, false), formal(realArray(), SYM(vknot), false, false), formal(realArray2(), SYM(weights), true, false), formal(penArray() , SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false), formal(primReal(), SYM(metallic), false, false), formal(primReal(), SYM(fresnel0), false, false), formal(penArray() , SYM(colors), false, false));
-#line 655 "runpicture.in"
- addFunc(ve, run::gen_runpicture52, primVoid(), SYM(drawSphere), formal(primPicture(), SYM(f), false, false), formal(realArray2(), SYM(t), false, false), formal(primBoolean(), SYM(half), true, false), formal(penArray() , SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false), formal(primReal(), SYM(metallic), false, false), formal(primReal(), SYM(fresnel0), false, false), formal(primInt(), SYM(type), false, false));
-#line 664 "runpicture.in"
- addFunc(ve, run::gen_runpicture53, primVoid(), SYM(drawCylinder), formal(primPicture(), SYM(f), false, false), formal(realArray2(), SYM(t), false, false), formal(penArray() , SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false), formal(primReal(), SYM(metallic), false, false), formal(primReal(), SYM(fresnel0), false, false), formal(primBoolean(), SYM(core), true, false));
-#line 672 "runpicture.in"
- addFunc(ve, run::gen_runpicture54, primVoid(), SYM(drawDisk), formal(primPicture(), SYM(f), false, false), formal(realArray2(), SYM(t), false, false), formal(penArray() , SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false), formal(primReal(), SYM(metallic), false, false), formal(primReal(), SYM(fresnel0), false, false));
-#line 679 "runpicture.in"
- addFunc(ve, run::gen_runpicture55, primVoid(), SYM(drawTube), formal(primPicture(), SYM(f), false, false), formal(tripleArray(), SYM(g), false, false), formal(primReal(), SYM(width), false, false), formal(penArray() , SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false), formal(primReal(), SYM(metallic), false, false), formal(primReal(), SYM(fresnel0), false, false), formal(primTriple(), SYM(min), false, false), formal(primTriple(), SYM(max), false, false), formal(primBoolean(), SYM(core), true, false));
-#line 688 "runpicture.in"
+#line 650 "runpicture.in"
+ addFunc(ve, run::gen_runpicture51, primVoid(), SYM(draw), formal(primPicture(), SYM(f), false, false), formal(tripleArray2(), SYM(p), false, false), formal(realArray(), SYM(uknot), false, false), formal(realArray(), SYM(vknot), false, false), formal(realArray2(), SYM(weights), true, false), formal(penArray(), SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false), formal(primReal(), SYM(metallic), false, false), formal(primReal(), SYM(fresnel0), false, false), formal(penArray(), SYM(colors), false, false));
+#line 659 "runpicture.in"
+ addFunc(ve, run::gen_runpicture52, primVoid(), SYM(drawSphere), formal(primPicture(), SYM(f), false, false), formal(realArray2(), SYM(t), false, false), formal(primBoolean(), SYM(half), true, false), formal(penArray(), SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false), formal(primReal(), SYM(metallic), false, false), formal(primReal(), SYM(fresnel0), false, false), formal(primInt(), SYM(type), false, false));
+#line 668 "runpicture.in"
+ addFunc(ve, run::gen_runpicture53, primVoid(), SYM(drawCylinder), formal(primPicture(), SYM(f), false, false), formal(realArray2(), SYM(t), false, false), formal(penArray(), SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false), formal(primReal(), SYM(metallic), false, false), formal(primReal(), SYM(fresnel0), false, false), formal(primBoolean(), SYM(core), true, false));
+#line 676 "runpicture.in"
+ addFunc(ve, run::gen_runpicture54, primVoid(), SYM(drawDisk), formal(primPicture(), SYM(f), false, false), formal(realArray2(), SYM(t), false, false), formal(penArray(), SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false), formal(primReal(), SYM(metallic), false, false), formal(primReal(), SYM(fresnel0), false, false));
+#line 683 "runpicture.in"
+ addFunc(ve, run::gen_runpicture55, primVoid(), SYM(drawTube), formal(primPicture(), SYM(f), false, false), formal(tripleArray(), SYM(g), false, false), formal(primReal(), SYM(width), false, false), formal(penArray(), SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false), formal(primReal(), SYM(metallic), false, false), formal(primReal(), SYM(fresnel0), false, false), formal(primTriple(), SYM(min), false, false), formal(primTriple(), SYM(max), false, false), formal(primBoolean(), SYM(core), true, false));
+#line 692 "runpicture.in"
addFunc(ve, run::gen_runpicture56, primVoid(), SYM(drawpixel), formal(primPicture(), SYM(f), false, false), formal(primTriple(), SYM(v), false, false), formal(primPen(), SYM(p), false, false), formal(primReal(), SYM(width), true, false));
-#line 694 "runpicture.in"
- addFunc(ve, run::gen_runpicture57, primVoid(), SYM(draw), formal(primPicture(), SYM(f), false, false), formal(tripleArray(), SYM(v), false, false), formal(IntArray2(), SYM(vi), false, false), formal(tripleArray(), SYM(n), false, false), formal(IntArray2(), SYM(ni), false, false), formal(penArray() , SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false), formal(primReal(), SYM(metallic), false, false), formal(primReal(), SYM(fresnel0), false, false), formal(penArray() , SYM(c), true, false), formal(IntArray2(), SYM(ci), true, false));
-#line 705 "runpicture.in"
+#line 698 "runpicture.in"
+ addFunc(ve, run::gen_runpicture57, primVoid(), SYM(draw), formal(primPicture(), SYM(f), false, false), formal(tripleArray(), SYM(v), false, false), formal(IntArray2(), SYM(vi), false, false), formal(tripleArray(), SYM(n), false, false), formal(IntArray2(), SYM(ni), false, false), formal(penArray(), SYM(p), false, false), formal(primReal(), SYM(opacity), false, false), formal(primReal(), SYM(shininess), false, false), formal(primReal(), SYM(metallic), false, false), formal(primReal(), SYM(fresnel0), false, false), formal(penArray(), SYM(c), true, false), formal(IntArray2(), SYM(ci), true, false));
+#line 709 "runpicture.in"
addFunc(ve, run::gen_runpicture58, primTriple(), SYM(min3), formal(primPicture(), SYM(f), false, false));
-#line 710 "runpicture.in"
+#line 714 "runpicture.in"
addFunc(ve, run::gen_runpicture59, primTriple(), SYM(max3), formal(primPicture(), SYM(f), false, false));
-#line 715 "runpicture.in"
+#line 719 "runpicture.in"
addFunc(ve, run::gen_runpicture60, primTriple(), SYM(size3), formal(primPicture(), SYM(f), false, false));
-#line 721 "runpicture.in"
+#line 725 "runpicture.in"
addFunc(ve, run::gen_runpicture61, primPair(), SYM(minratio), formal(primPicture(), SYM(f), false, false));
-#line 726 "runpicture.in"
+#line 730 "runpicture.in"
addFunc(ve, run::gen_runpicture62, primPair(), SYM(maxratio), formal(primPicture(), SYM(f), false, false));
-#line 731 "runpicture.in"
+#line 735 "runpicture.in"
addFunc(ve, run::gen_runpicture63, primBoolean(), SYM(is3D), formal(primPicture(), SYM(f), false, false));
}
diff --git a/Build/source/utils/asymptote/runpicture.in b/Build/source/utils/asymptote/runpicture.in
index 2fa501f22ae..ac5bdbc28e6 100644
--- a/Build/source/utils/asymptote/runpicture.in
+++ b/Build/source/utils/asymptote/runpicture.in
@@ -15,9 +15,9 @@ Intarray* => IntArray()
Intarray2* => IntArray2()
realarray* => realArray()
realarray2* => realArray2()
-patharray* => pathArray()
-penarray* => penArray()
-penarray2* => penArray2()
+patharray* => pathArray()
+penarray* => penArray()
+penarray2* => penArray2()
pairarray* => pairArray()
pairarray2* => pairArray2()
triplearray* => tripleArray()
@@ -78,21 +78,21 @@ static transform ZeroTransform=transform(0.0,0.0,0.0,0.0,0.0,0.0);
transform getTransform(xmap_t &xmap, picture::nodelist::iterator p)
{
- string s=(*p)->KEY;
- transform t;
- // Don't apply xmap without an explicit corresponding key
- size_t n=s.length();
- if(n == 0 || s.substr(n-1) != "1") return t;
-
- xmap_t::iterator q=xmap.find(s.substr(0,n-2));
- if(q != xmap.end()) {
- xtransform_t& v=q->second;
- if(!v.empty()) {
- t=v.front();
- v.pop_front();
- }
+ string s=(*p)->KEY;
+ transform t;
+ // Don't apply xmap without an explicit corresponding key
+ size_t n=s.length();
+ if(n == 0 || s.substr(n-1) != "1") return t;
+
+ xmap_t::iterator q=xmap.find(s.substr(0,n-2));
+ if(q != xmap.end()) {
+ xtransform_t& v=q->second;
+ if(!v.empty()) {
+ t=v.front();
+ v.pop_front();
}
- return t;
+ }
+ return t;
}
@@ -108,14 +108,14 @@ function *penFunction()
// Ignore unclosed begingroups but not spurious endgroups.
const char *nobegin="endgroup without matching begingroup";
-
+
array *emptyarray=new array(0);
-array *nop(array *a)
+array *nop(array *a)
{
return a;
}
-
+
triple Zero;
string defaultformat3="prc";
@@ -166,7 +166,7 @@ void fill(picture *f, patharray *g, pen p=CURRENTPEN, bool copy=true)
}
void latticeshade(picture *f, patharray *g, bool stroke=false,
- pen fillrule=CURRENTPEN, penarray2 *p, transform t=identity,
+ pen fillrule=CURRENTPEN, penarray2 *p, transform t=identity,
bool copy=true)
{
array *(*copyarray)(array *a)=copy ? copyArray : nop;
@@ -222,7 +222,7 @@ void gouraudshade(picture *f, patharray *g, bool stroke=false,
(*z)[k++]=nodes[i].point;
}
checkArrays(p,z);
-
+
f->append(new drawGouraudShade(*copyarray(g),stroke,fillrule,*copyarray(p),
*z,*copyarray(edges)));
}
@@ -233,13 +233,14 @@ void tensorshade(picture *f, patharray *g, bool stroke=false,
{
array *(*copyarray)(array *a)=copy ? copyArray : nop;
array *(*copyarray2)(array *a)=copy ? copyArray2 : nop;
- if(b == NULL) b=g;
- size_t n=checkArrays(p,b);
+ size_t n=checkArrays(p,b ? b : g);
+ array& G=*copyarray(g);
+ array& B=b ? *copyarray(b) : G;
size_t nz=checkArray(z);
if(nz != 0)
checkEqual(nz,n);
- f->append(new drawTensorShade(*copyarray(g),stroke,fillrule,*copyarray2(p),
- *copyarray(b),*copyarray2(z)));
+ f->append(new drawTensorShade(G,stroke,fillrule,*copyarray2(p),B,
+ *copyarray2(z)));
}
void functionshade(picture *f, patharray *g, bool stroke=false,
@@ -293,8 +294,8 @@ void endgroup(picture *f)
}
void _begingroup3(picture *f, string name, real compression,
- real granularity, bool closed, bool tessellate,
- bool dobreak, bool nobreak, triple center, Int interaction)
+ real granularity, bool closed, bool tessellate,
+ bool dobreak, bool nobreak, triple center, Int interaction)
{
f->append(new drawBegin3(name,compression,granularity,
closed,tessellate,dobreak,nobreak,
@@ -344,7 +345,7 @@ void texpreamble(string s)
pd.TeXpreamble.push_back(t);
}
-void deletepreamble()
+void deletepreamble()
{
if(getSetting<bool>("inlinetex")) {
unlink(buildname(outname(),"pre").c_str());
@@ -382,7 +383,7 @@ void _image(picture *f, realarray2 *data, pair initial, pair final,
array *(*copyarray)(array *a)=copy ? copyArray : nop;
array *(*copyarray2)(array *a)=copy ? copyArray2 : nop;
f->append(new drawPaletteImage(*copyarray2(data),*copyarray(palette),
- t*matrix(initial,final),antialias));
+ t*matrix(initial,final),antialias));
}
void _image(picture *f, penarray2 *data, pair initial, pair final,
@@ -424,7 +425,7 @@ void _shipout(string prefix=emptystring, picture *f, picture *preamble=NULL,
picture *result=new picture;
unsigned level=0;
picture::nodelist::iterator p;
-
+
xmap_t xmap=processData().xmap;
transform Tinv=inverse(T);
@@ -460,7 +461,7 @@ void _shipout(string prefix=emptystring, picture *f, picture *preamble=NULL,
result->add(*group);
}
}
-
+
result->shipout(preamble,prefix,format,wait,view);
}
@@ -472,7 +473,7 @@ void shipout3(string prefix, picture *f, string format=emptystring,
{
size_t n=checkArrays(lights,diffuse);
checkEqual(n,checkArray(specular));
-
+
real *T,*Background,*Diffuse,*Specular;
triple *Lights;
@@ -481,10 +482,10 @@ void shipout3(string prefix, picture *f, string format=emptystring,
copyArrayC(Lights,lights);
copyArray2C(Diffuse,diffuse,false,4,UseGC);
copyArray2C(Specular,specular,false,4,UseGC);
-
+
f->shipout3(prefix,format,width,height,angle,zoom,m,M,shift,margin,T,
Background,n,Lights,Diffuse,Specular,view);
-
+
delete[] Background;
delete[] T;
}
@@ -499,7 +500,7 @@ void xmap(string key, transform t=identity)
xmap_t &xmap=processData().xmap;
xmap_t::iterator p=xmap.find(key);
if(p != xmap.end())
- p->second.push_back(t);
+ p->second.push_back(t);
else {
xtransform_t *v=new xtransform_t();
v->push_back(t);
@@ -507,7 +508,7 @@ void xmap(string key, transform t=identity)
}
}
-void deconstruct(picture *f, picture *preamble=NULL, transform T=identity)
+void deconstruct(picture *f, picture *preamble=NULL, transform T=identity)
{
unsigned level=0;
@@ -518,14 +519,14 @@ void deconstruct(picture *f, picture *preamble=NULL, transform T=identity)
const string Done="Done";
const string Error="Error";
-
+
unsigned arg=0;
xmap_t xmap=processData().xmap;
transform Tinv=inverse(T);
-
+
for(picture::nodelist::iterator p=f->nodes.begin();;) {
if(p == f->nodes.end()) break;
-
+
picture *group=new picture;
transform t=getTransform(xmap,p);
bool Delete=(t == ZeroTransform);
@@ -564,29 +565,29 @@ void deconstruct(picture *f, picture *preamble=NULL, transform T=identity)
if(!Delete) {
drawElement *e=t.isIdentity() ? *p : (*p)->transformed(t);
group->append(e);
- if((*p)->endclip()) clip=true;
- ostringstream buf;
- buf << prefix << "_" << arg;
- string outname=buildname(buf.str(),xformat);
- group->shipout(preamble,outname,xformat,false,false);
bbox b=group->bounds();
- if(!b.empty) {
- fprintf(pipeout,"KEY=%s%d\n",e->KEY.c_str(),clip);
-
+ if(!b.empty && b.right > b.left && b.top > b.bottom) {
+ if((*p)->endclip()) clip=true;
+ ostringstream buf;
+ buf << prefix << "_" << arg;
+ string outname=buildname(buf.str(),xformat);
+ group->shipout(preamble,outname,xformat,false,false);
+ fprintf(pipeout,"KEY=%s%d\n",e->KEY.c_str(),clip || f->havepng());
+
const char *oldlocale=setlocale(LC_NUMERIC,NULL);
bool override=oldlocale && strcmp(oldlocale,"C") != 0;
if(override) {
oldlocale=StrdupNoGC(oldlocale);
setlocale(LC_NUMERIC,"C");
}
-
+
fprintf(pipeout,"%g %g %g %g\n",b.left,b.bottom,b.right,b.top);
-
+
if(override) {
setlocale(LC_NUMERIC,oldlocale);
delete[] oldlocale;
}
-
+
fflush(pipeout);
++arg;
}
@@ -594,7 +595,7 @@ void deconstruct(picture *f, picture *preamble=NULL, transform T=identity)
++p;
}
}
-
+
fprintf(pipeout,"%s\n",Done.c_str());
fflush(pipeout);
}
@@ -604,36 +605,39 @@ void deconstruct(picture *f, picture *preamble=NULL, transform T=identity)
// Bezier curve
void _draw(picture *f, path3 g, triple center=Zero, penarray *p,
- real opacity, real shininess, real metallic, real fresnel0,
- Int interaction=0)
+ real opacity, real shininess, real metallic, real fresnel0,
+ Int interaction=0)
{
- if(g.size() > 0)
- f->append(new drawPath3(g,center,*p,opacity,shininess,metallic,fresnel0,
+ size_t n=g.size();
+ for(unsigned int i=0; i < n; ++i)
+ f->append(new drawPath3(g.subpath((Int) i,Int(i+1)),center,*p,opacity,
+ shininess,metallic,fresnel0,
(Interaction) intcast(interaction)));
}
// Bezier patch
void draw(picture *f, triplearray2 *P, triple center, bool straight,
penarray *p, real opacity, real shininess, real metallic,
- real fresnel0, penarray *colors, Int interaction,
+ real fresnel0, penarray *colors, Int interaction, Int digits,
bool primitive=false)
{
f->append(new drawBezierPatch(*P,center,straight,*p,opacity,shininess,
metallic,fresnel0,*colors,
- (Interaction) intcast(interaction),primitive));
+ (Interaction) intcast(interaction),
+ digits,primitive));
}
// Bezier triangle
void drawbeziertriangle(picture *f, triplearray2 *P, triple center,
bool straight, penarray *p, real opacity,
real shininess, real metallic, real fresnel0,
- penarray *colors, Int interaction,
+ penarray *colors, Int interaction, Int digits,
bool primitive=false)
{
f->append(new drawBezierTriangle(*P,center,straight,*p,opacity,shininess,
metallic,fresnel0,*colors,
(Interaction) intcast(interaction),
- primitive));
+ digits,primitive));
}
// General NURBS curve
@@ -694,7 +698,7 @@ void drawpixel(picture *f, triple v, pen p, real width=1.0)
// Draw triangles
void draw(picture *f, triplearray *v, Intarray2 *vi,
triplearray *n, Intarray2 *ni,
- penarray *p, real opacity, real shininess,
+ penarray *p, real opacity, real shininess,
real metallic, real fresnel0,
penarray *c=emptyarray, Intarray2 *ci=emptyarray)
{
diff --git a/Build/source/utils/asymptote/runstring.cc b/Build/source/utils/asymptote/runstring.cc
index 89c151026a7..98f10e08f2d 100644
--- a/Build/source/utils/asymptote/runstring.cc
+++ b/Build/source/utils/asymptote/runstring.cc
@@ -90,16 +90,16 @@ static const string defaulttimeformat=string("%a %b %d %T %Z %Y");
#ifdef HAVE_STRFTIME
static const size_t nTime=256;
static char Time[nTime];
-#endif
+#endif
-void checkformat(const char *ptr, bool intformat)
+void checkformat(const char *ptr, bool intformat)
{
while(*ptr != '\0') {
if(*ptr != '%') /* While we have regular characters, print them. */
ptr++;
else { /* We've got a format specifier. */
ptr++;
-
+
while(*ptr && strchr ("-+ #0'I", *ptr)) /* Move past flags. */
ptr++;
@@ -107,7 +107,7 @@ void checkformat(const char *ptr, bool intformat)
ptr++;
else while(isdigit(*ptr)) /* Handle explicit numeric value. */
ptr++;
-
+
if(*ptr == '.') {
ptr++; /* Go past the period. */
if(*ptr == '*') {
@@ -118,7 +118,7 @@ void checkformat(const char *ptr, bool intformat)
}
while(*ptr && strchr ("hlL", *ptr))
ptr++;
-
+
if(*ptr == '%') {++ptr; continue;}
else if(*ptr != '\0') {
if(intformat) {
@@ -133,7 +133,7 @@ void checkformat(const char *ptr, bool intformat)
break;
default:
ostringstream buf;
- buf << "Invalid format '" << *ptr << "' for type "
+ buf << "Invalid format '" << *ptr << "' for type "
<< types::names[types::ty_Int];
error(buf);
break;
@@ -160,7 +160,7 @@ void checkformat(const char *ptr, bool intformat)
} /* End of else statement */
}
}
-
+
// Autogenerated routines:
@@ -257,7 +257,7 @@ void gen_runstring7(stack *Stack)
#line 157 "runstring.in"
if ((size_t) pos < s.length())
{Stack->push<string>(s.erase(pos,n)); return;}
- {Stack->push<string>(s); return;}
+ {Stack->push<string>(s); return;}
}
#line 163 "runstring.in"
@@ -294,39 +294,42 @@ void gen_runstring10(stack *Stack)
array *a=read<array*>(translate,i);
checkArray(a);
}
- const char *p=S->c_str();
+ size_t pos=0;
ostringstream buf;
- while(*p) {
+ size_t Len=S->length();
+
+ while(pos < Len) {
for(size_t i=0; i < size;) {
array *a=read<array*>(translate,i);
size_t size2=checkArray(a);
- if(size2 != 2)
+ if(size2 != 2)
error("translation table entry must be an array of length 2");
string* from=read<string*>(a,0);
size_t len=from->length();
- if(strncmp(p,from->c_str(),len) != 0) {i++; continue;}
+ if(len == 0 || S->compare(pos,len,*from,0,len) != 0) {i++; continue;}
buf << read<string>(a,1);
- p += len;
- if(*p == 0) {Stack->push<string>(buf.str()); return;}
+ pos += len;
+ if(pos == Len) {Stack->push<string>(buf.str()); return;}
i=0;
}
- buf << *(p++);
+ buf << S->substr(pos,1);
+ ++pos;
}
{Stack->push<string>(buf.str()); return;}
}
-#line 205 "runstring.in"
+#line 208 "runstring.in"
// string format(string *format, Int x, string locale=emptystring);
void gen_runstring11(stack *Stack)
{
string locale=vm::pop<string>(Stack,emptystring);
Int x=vm::pop<Int>(Stack);
string * format=vm::pop<string *>(Stack);
-#line 206 "runstring.in"
+#line 209 "runstring.in"
ostringstream out;
const char *p0=format->c_str();
checkformat(p0,true);
-
+
const char *p=p0;
const char *start=NULL;
while(*p != 0) {
@@ -337,16 +340,16 @@ void gen_runstring11(stack *Stack)
}
out << *(p++);
}
-
+
if(!start) {Stack->push<string>(out.str()); return;}
-
- // Allow at most 1 argument
+
+ // Allow at most 1 argument
while(*p != 0) {
if(*p == '*' || *p == '$') {Stack->push<string>(out.str()); return;}
if(isupper(*p) || islower(*p)) {p++; break;}
p++;
}
-
+
string f=format->substr(start-p0,p-start);
const char *oldlocale=NULL;
@@ -366,7 +369,7 @@ void gen_runstring11(stack *Stack)
out << p;
delete[] buf;
-
+
if(oldlocale) {
setlocale(LC_ALL,oldlocale);
delete[] oldlocale;
@@ -375,7 +378,7 @@ void gen_runstring11(stack *Stack)
{Stack->push<string>(out.str()); return;}
}
-#line 259 "runstring.in"
+#line 262 "runstring.in"
// string format(string *format, bool forcemath=false, string separator, real x, string locale=emptystring);
void gen_runstring12(stack *Stack)
{
@@ -384,18 +387,18 @@ void gen_runstring12(stack *Stack)
string separator=vm::pop<string>(Stack);
bool forcemath=vm::pop<bool>(Stack,false);
string * format=vm::pop<string *>(Stack);
-#line 261 "runstring.in"
+#line 264 "runstring.in"
if(*format == "%") {Stack->push<string>(""); return;} // Temporary workaround for github Issue #29.
-
+
bool tex=getSetting<string>("tex") != "none";
bool texify=forcemath;
ostringstream out;
-
+
const char *p0=format->c_str();
checkformat(p0,false);
const char *phantom="\\phantom{+}";
-
+
const char *p=p0;
const char *start=NULL;
char prev=0;
@@ -409,16 +412,16 @@ void gen_runstring12(stack *Stack)
}
out << *(p++);
}
-
+
if(!start) {Stack->push<string>(out.str()); return;}
-
- // Allow at most 1 argument
+
+ // Allow at most 1 argument
while(*p != 0) {
if(*p == '*' || *p == '$') {Stack->push<string>(out.str()); return;}
if(isupper(*p) || islower(*p)) {p++; break;}
p++;
}
-
+
const char *tail=p;
string f=format->substr(start-p0,tail-start);
@@ -437,14 +440,14 @@ void gen_runstring12(stack *Stack)
bool trailingzero=f.find("#") < string::npos;
bool plus=f.find("+") < string::npos;
bool space=f.find(" ") < string::npos;
-
+
char *q=buf; // beginning of formatted number
if(*q == ' ' && texify) {
out << phantom;
q++;
}
-
+
const char decimal=*(localeconv()->decimal_point);
// Remove any spurious sign
@@ -461,11 +464,11 @@ void gen_runstring12(stack *Stack)
if((plus || space) && texify) out << phantom;
}
}
-
+
const char *r=p=q;
bool dp=false;
while(*r != 0 && (isspace(*r) || isdigit(*r) || *r == decimal \
- || *r == '+' || *r == '-')) {
+ || *r == '+' || *r == '-')) {
if(*r == decimal) dp=true;
r++;
}
@@ -477,12 +480,12 @@ void gen_runstring12(stack *Stack)
while(q <= r) out << *(q++);
if(!trailingzero) q += n;
}
-
+
bool zero=(r == p && *r == '0') && !trailingzero;
-
+
// Translate "E+/E-/e+/e-" exponential notation to TeX
while(*q != 0) {
- if(texify && (*q == 'E' || *q == 'e') &&
+ if(texify && (*q == 'E' || *q == 'e') &&
(*(q+1) == '+' || *(q+1) == '-')) {
if(!zero) out << separator << "10^{";
bool plus=(*(q+1) == '+');
@@ -497,26 +500,26 @@ void gen_runstring12(stack *Stack)
}
out << *(q++);
}
-
- while(*tail != 0)
+
+ while(*tail != 0)
out << *(tail++);
-
+
delete[] buf;
if(oldlocale) {
setlocale(LC_ALL,oldlocale);
delete[] oldlocale;
}
-
+
{Stack->push<string>(out.str()); return;}
}
-#line 388 "runstring.in"
+#line 391 "runstring.in"
// Int hex(string s);
void gen_runstring13(stack *Stack)
{
string s=vm::pop<string>(Stack);
-#line 389 "runstring.in"
+#line 392 "runstring.in"
istringstream is(s);
is.setf(std::ios::hex,std::ios::basefield);
Int value;
@@ -526,61 +529,61 @@ void gen_runstring13(stack *Stack)
error(buf);
}
-#line 399 "runstring.in"
+#line 402 "runstring.in"
// Int ascii(string s);
void gen_runstring14(stack *Stack)
{
string s=vm::pop<string>(Stack);
-#line 400 "runstring.in"
+#line 403 "runstring.in"
{Stack->push<Int>(s.empty() ? -1 : (unsigned char) s[0]); return;}
}
-#line 404 "runstring.in"
+#line 407 "runstring.in"
// string string(Int x);
void gen_runstring15(stack *Stack)
{
Int x=vm::pop<Int>(Stack);
-#line 405 "runstring.in"
+#line 408 "runstring.in"
ostringstream buf;
buf << x;
{Stack->push<string>(buf.str()); return;}
}
-#line 411 "runstring.in"
+#line 414 "runstring.in"
// string string(real x, Int digits=DBL_DIG);
void gen_runstring16(stack *Stack)
{
Int digits=vm::pop<Int>(Stack,DBL_DIG);
real x=vm::pop<real>(Stack);
-#line 412 "runstring.in"
+#line 415 "runstring.in"
ostringstream buf;
buf.precision(digits);
buf << x;
{Stack->push<string>(buf.str()); return;}
}
-#line 419 "runstring.in"
+#line 422 "runstring.in"
// string time(string format=defaulttimeformat);
void gen_runstring17(stack *Stack)
{
string format=vm::pop<string>(Stack,defaulttimeformat);
-#line 420 "runstring.in"
+#line 423 "runstring.in"
#ifdef HAVE_STRFTIME
const time_t bintime=time(NULL);
if(!strftime(Time,nTime,format.c_str(),localtime(&bintime))) {Stack->push<string>(""); return;}
{Stack->push<string>(Time); return;}
#else
{Stack->push<string>(format); return;}
-#endif
+#endif
}
-#line 430 "runstring.in"
+#line 433 "runstring.in"
// string time(Int seconds, string format=defaulttimeformat);
void gen_runstring18(stack *Stack)
{
string format=vm::pop<string>(Stack,defaulttimeformat);
Int seconds=vm::pop<Int>(Stack);
-#line 431 "runstring.in"
+#line 434 "runstring.in"
#ifdef HAVE_STRFTIME
const time_t bintime=seconds;
if(!strftime(Time,nTime,format.c_str(),localtime(&bintime))) {Stack->push<string>(""); return;}
@@ -592,13 +595,13 @@ void gen_runstring18(stack *Stack)
#endif
}
-#line 443 "runstring.in"
+#line 446 "runstring.in"
// Int seconds(string t=emptystring, string format=emptystring);
void gen_runstring19(stack *Stack)
{
string format=vm::pop<string>(Stack,emptystring);
string t=vm::pop<string>(Stack,emptystring);
-#line 444 "runstring.in"
+#line 447 "runstring.in"
#if defined(HAVE_STRPTIME)
const time_t bintime=time(NULL);
tm tm=*localtime(&bintime);
@@ -606,7 +609,7 @@ void gen_runstring19(stack *Stack)
{Stack->push<Int>((Int) mktime(&tm)); return;}
#else
{Stack->push<Int>(-1); return;}
-#endif
+#endif
}
} // namespace run
@@ -620,41 +623,41 @@ void gen_runstring_venv(venv &ve)
#line 119 "runstring.in"
addFunc(ve, run::gen_runstring1, primInt(), SYM(length), formal(primString(), SYM(s), false, false));
#line 124 "runstring.in"
- addFunc(ve, run::gen_runstring2, primInt(), SYM(find), formal(primString(), SYM(s), false, false), formal(primString() , SYM(t), false, false), formal(primInt(), SYM(pos), true, false));
+ addFunc(ve, run::gen_runstring2, primInt(), SYM(find), formal(primString(), SYM(s), false, false), formal(primString(), SYM(t), false, false), formal(primInt(), SYM(pos), true, false));
#line 130 "runstring.in"
- addFunc(ve, run::gen_runstring3, primInt(), SYM(rfind), formal(primString(), SYM(s), false, false), formal(primString() , SYM(t), false, false), formal(primInt(), SYM(pos), true, false));
+ addFunc(ve, run::gen_runstring3, primInt(), SYM(rfind), formal(primString(), SYM(s), false, false), formal(primString(), SYM(t), false, false), formal(primInt(), SYM(pos), true, false));
#line 136 "runstring.in"
- addFunc(ve, run::gen_runstring4, primString() , SYM(reverse), formal(primString() , SYM(s), false, false));
+ addFunc(ve, run::gen_runstring4, primString(), SYM(reverse), formal(primString(), SYM(s), false, false));
#line 142 "runstring.in"
- addFunc(ve, run::gen_runstring5, primString() , SYM(insert), formal(primString() , SYM(s), false, false), formal(primInt(), SYM(pos), false, false), formal(primString() , SYM(t), false, false));
+ addFunc(ve, run::gen_runstring5, primString(), SYM(insert), formal(primString(), SYM(s), false, false), formal(primInt(), SYM(pos), false, false), formal(primString(), SYM(t), false, false));
#line 149 "runstring.in"
- addFunc(ve, run::gen_runstring6, primString() , SYM(substr), formal(primString(), SYM(s), false, false), formal(primInt(), SYM(pos), false, false), formal(primInt(), SYM(n), true, false));
+ addFunc(ve, run::gen_runstring6, primString(), SYM(substr), formal(primString(), SYM(s), false, false), formal(primInt(), SYM(pos), false, false), formal(primInt(), SYM(n), true, false));
#line 156 "runstring.in"
- addFunc(ve, run::gen_runstring7, primString() , SYM(erase), formal(primString() , SYM(s), false, false), formal(primInt(), SYM(pos), false, false), formal(primInt(), SYM(n), false, false));
+ addFunc(ve, run::gen_runstring7, primString(), SYM(erase), formal(primString(), SYM(s), false, false), formal(primInt(), SYM(pos), false, false), formal(primInt(), SYM(n), false, false));
#line 163 "runstring.in"
- addFunc(ve, run::gen_runstring8, primString() , SYM(downcase), formal(primString() , SYM(s), false, false));
+ addFunc(ve, run::gen_runstring8, primString(), SYM(downcase), formal(primString(), SYM(s), false, false));
#line 169 "runstring.in"
- addFunc(ve, run::gen_runstring9, primString() , SYM(upcase), formal(primString() , SYM(s), false, false));
+ addFunc(ve, run::gen_runstring9, primString(), SYM(upcase), formal(primString(), SYM(s), false, false));
#line 175 "runstring.in"
- addFunc(ve, run::gen_runstring10, primString() , SYM(replace), formal(primString(), SYM(s), false, false), formal(stringArray2(), SYM(translate), false, false));
-#line 205 "runstring.in"
- addFunc(ve, run::gen_runstring11, primString() , SYM(format), formal(primString(), SYM(format), false, false), formal(primInt(), SYM(x), false, false), formal(primString() , SYM(locale), true, false));
-#line 259 "runstring.in"
- addFunc(ve, run::gen_runstring12, primString() , SYM(format), formal(primString(), SYM(format), false, false), formal(primBoolean(), SYM(forcemath), true, false), formal(primString() , SYM(separator), false, false), formal(primReal(), SYM(x), false, false), formal(primString() , SYM(locale), true, false));
-#line 388 "runstring.in"
- addFunc(ve, run::gen_runstring13, primInt(), SYM(hex), formal(primString() , SYM(s), false, false));
-#line 399 "runstring.in"
- addFunc(ve, run::gen_runstring14, primInt(), SYM(ascii), formal(primString() , SYM(s), false, false));
-#line 404 "runstring.in"
- addFunc(ve, run::gen_runstring15, primString() , SYM(string), formal(primInt(), SYM(x), false, false));
-#line 411 "runstring.in"
- addFunc(ve, run::gen_runstring16, primString() , SYM(string), formal(primReal(), SYM(x), false, false), formal(primInt(), SYM(digits), true, false));
-#line 419 "runstring.in"
- addFunc(ve, run::gen_runstring17, primString() , SYM(time), formal(primString() , SYM(format), true, false));
-#line 430 "runstring.in"
- addFunc(ve, run::gen_runstring18, primString() , SYM(time), formal(primInt(), SYM(seconds), false, false), formal(primString() , SYM(format), true, false));
-#line 443 "runstring.in"
- addFunc(ve, run::gen_runstring19, primInt(), SYM(seconds), formal(primString() , SYM(t), true, false), formal(primString() , SYM(format), true, false));
+ addFunc(ve, run::gen_runstring10, primString(), SYM(replace), formal(primString(), SYM(s), false, false), formal(stringArray2(), SYM(translate), false, false));
+#line 208 "runstring.in"
+ addFunc(ve, run::gen_runstring11, primString(), SYM(format), formal(primString(), SYM(format), false, false), formal(primInt(), SYM(x), false, false), formal(primString(), SYM(locale), true, false));
+#line 262 "runstring.in"
+ addFunc(ve, run::gen_runstring12, primString(), SYM(format), formal(primString(), SYM(format), false, false), formal(primBoolean(), SYM(forcemath), true, false), formal(primString(), SYM(separator), false, false), formal(primReal(), SYM(x), false, false), formal(primString(), SYM(locale), true, false));
+#line 391 "runstring.in"
+ addFunc(ve, run::gen_runstring13, primInt(), SYM(hex), formal(primString(), SYM(s), false, false));
+#line 402 "runstring.in"
+ addFunc(ve, run::gen_runstring14, primInt(), SYM(ascii), formal(primString(), SYM(s), false, false));
+#line 407 "runstring.in"
+ addFunc(ve, run::gen_runstring15, primString(), SYM(string), formal(primInt(), SYM(x), false, false));
+#line 414 "runstring.in"
+ addFunc(ve, run::gen_runstring16, primString(), SYM(string), formal(primReal(), SYM(x), false, false), formal(primInt(), SYM(digits), true, false));
+#line 422 "runstring.in"
+ addFunc(ve, run::gen_runstring17, primString(), SYM(time), formal(primString(), SYM(format), true, false));
+#line 433 "runstring.in"
+ addFunc(ve, run::gen_runstring18, primString(), SYM(time), formal(primInt(), SYM(seconds), false, false), formal(primString(), SYM(format), true, false));
+#line 446 "runstring.in"
+ addFunc(ve, run::gen_runstring19, primInt(), SYM(seconds), formal(primString(), SYM(t), true, false), formal(primString(), SYM(format), true, false));
}
} // namespace trans
diff --git a/Build/source/utils/asymptote/runstring.in b/Build/source/utils/asymptote/runstring.in
index a8b0e68bce1..415db53652b 100644
--- a/Build/source/utils/asymptote/runstring.in
+++ b/Build/source/utils/asymptote/runstring.in
@@ -35,16 +35,16 @@ static const string defaulttimeformat=string("%a %b %d %T %Z %Y");
#ifdef HAVE_STRFTIME
static const size_t nTime=256;
static char Time[nTime];
-#endif
+#endif
-void checkformat(const char *ptr, bool intformat)
+void checkformat(const char *ptr, bool intformat)
{
while(*ptr != '\0') {
if(*ptr != '%') /* While we have regular characters, print them. */
ptr++;
else { /* We've got a format specifier. */
ptr++;
-
+
while(*ptr && strchr ("-+ #0'I", *ptr)) /* Move past flags. */
ptr++;
@@ -52,7 +52,7 @@ void checkformat(const char *ptr, bool intformat)
ptr++;
else while(isdigit(*ptr)) /* Handle explicit numeric value. */
ptr++;
-
+
if(*ptr == '.') {
ptr++; /* Go past the period. */
if(*ptr == '*') {
@@ -63,7 +63,7 @@ void checkformat(const char *ptr, bool intformat)
}
while(*ptr && strchr ("hlL", *ptr))
ptr++;
-
+
if(*ptr == '%') {++ptr; continue;}
else if(*ptr != '\0') {
if(intformat) {
@@ -78,7 +78,7 @@ void checkformat(const char *ptr, bool intformat)
break;
default:
ostringstream buf;
- buf << "Invalid format '" << *ptr << "' for type "
+ buf << "Invalid format '" << *ptr << "' for type "
<< types::names[types::ty_Int];
error(buf);
break;
@@ -105,7 +105,7 @@ void checkformat(const char *ptr, bool intformat)
} /* End of else statement */
}
}
-
+
// Autogenerated routines:
@@ -157,7 +157,7 @@ string erase(string s, Int pos, Int n)
{
if ((size_t) pos < s.length())
return s.erase(pos,n);
- return s;
+ return s;
}
string downcase(string s)
@@ -181,33 +181,36 @@ string replace(string *S, stringarray2 *translate)
array *a=read<array*>(translate,i);
checkArray(a);
}
- const char *p=S->c_str();
+ size_t pos=0;
ostringstream buf;
- while(*p) {
+ size_t Len=S->length();
+
+ while(pos < Len) {
for(size_t i=0; i < size;) {
array *a=read<array*>(translate,i);
size_t size2=checkArray(a);
- if(size2 != 2)
+ if(size2 != 2)
error("translation table entry must be an array of length 2");
string* from=read<string*>(a,0);
size_t len=from->length();
- if(strncmp(p,from->c_str(),len) != 0) {i++; continue;}
+ if(len == 0 || S->compare(pos,len,*from,0,len) != 0) {i++; continue;}
buf << read<string>(a,1);
- p += len;
- if(*p == 0) return buf.str();
+ pos += len;
+ if(pos == Len) return buf.str();
i=0;
}
- buf << *(p++);
+ buf << S->substr(pos,1);
+ ++pos;
}
return buf.str();
}
-string format(string *format, Int x, string locale=emptystring)
+string format(string *format, Int x, string locale=emptystring)
{
ostringstream out;
const char *p0=format->c_str();
checkformat(p0,true);
-
+
const char *p=p0;
const char *start=NULL;
while(*p != 0) {
@@ -218,16 +221,16 @@ string format(string *format, Int x, string locale=emptystring)
}
out << *(p++);
}
-
+
if(!start) return out.str();
-
- // Allow at most 1 argument
+
+ // Allow at most 1 argument
while(*p != 0) {
if(*p == '*' || *p == '$') return out.str();
if(isupper(*p) || islower(*p)) {p++; break;}
p++;
}
-
+
string f=format->substr(start-p0,p-start);
const char *oldlocale=NULL;
@@ -247,7 +250,7 @@ string format(string *format, Int x, string locale=emptystring)
out << p;
delete[] buf;
-
+
if(oldlocale) {
setlocale(LC_ALL,oldlocale);
delete[] oldlocale;
@@ -260,16 +263,16 @@ string format(string *format, bool forcemath=false, string separator, real x,
string locale=emptystring)
{
if(*format == "%") return ""; // Temporary workaround for github Issue #29.
-
+
bool tex=getSetting<string>("tex") != "none";
bool texify=forcemath;
ostringstream out;
-
+
const char *p0=format->c_str();
checkformat(p0,false);
const char *phantom="\\phantom{+}";
-
+
const char *p=p0;
const char *start=NULL;
char prev=0;
@@ -283,16 +286,16 @@ string format(string *format, bool forcemath=false, string separator, real x,
}
out << *(p++);
}
-
+
if(!start) return out.str();
-
- // Allow at most 1 argument
+
+ // Allow at most 1 argument
while(*p != 0) {
if(*p == '*' || *p == '$') return out.str();
if(isupper(*p) || islower(*p)) {p++; break;}
p++;
}
-
+
const char *tail=p;
string f=format->substr(start-p0,tail-start);
@@ -311,14 +314,14 @@ string format(string *format, bool forcemath=false, string separator, real x,
bool trailingzero=f.find("#") < string::npos;
bool plus=f.find("+") < string::npos;
bool space=f.find(" ") < string::npos;
-
+
char *q=buf; // beginning of formatted number
if(*q == ' ' && texify) {
out << phantom;
q++;
}
-
+
const char decimal=*(localeconv()->decimal_point);
// Remove any spurious sign
@@ -335,11 +338,11 @@ string format(string *format, bool forcemath=false, string separator, real x,
if((plus || space) && texify) out << phantom;
}
}
-
+
const char *r=p=q;
bool dp=false;
while(*r != 0 && (isspace(*r) || isdigit(*r) || *r == decimal \
- || *r == '+' || *r == '-')) {
+ || *r == '+' || *r == '-')) {
if(*r == decimal) dp=true;
r++;
}
@@ -351,12 +354,12 @@ string format(string *format, bool forcemath=false, string separator, real x,
while(q <= r) out << *(q++);
if(!trailingzero) q += n;
}
-
+
bool zero=(r == p && *r == '0') && !trailingzero;
-
+
// Translate "E+/E-/e+/e-" exponential notation to TeX
while(*q != 0) {
- if(texify && (*q == 'E' || *q == 'e') &&
+ if(texify && (*q == 'E' || *q == 'e') &&
(*(q+1) == '+' || *(q+1) == '-')) {
if(!zero) out << separator << "10^{";
bool plus=(*(q+1) == '+');
@@ -371,17 +374,17 @@ string format(string *format, bool forcemath=false, string separator, real x,
}
out << *(q++);
}
-
- while(*tail != 0)
+
+ while(*tail != 0)
out << *(tail++);
-
+
delete[] buf;
if(oldlocale) {
setlocale(LC_ALL,oldlocale);
delete[] oldlocale;
}
-
+
return out.str();
}
@@ -424,7 +427,7 @@ string time(string format=defaulttimeformat)
return Time;
#else
return format;
-#endif
+#endif
}
string time(Int seconds, string format=defaulttimeformat)
@@ -449,5 +452,5 @@ Int seconds(string t=emptystring, string format=emptystring)
return (Int) mktime(&tm);
#else
return -1;
-#endif
+#endif
}
diff --git a/Build/source/utils/asymptote/runsystem.cc b/Build/source/utils/asymptote/runsystem.cc
index ec05b7d1cb6..81115dfc59b 100644
--- a/Build/source/utils/asymptote/runsystem.cc
+++ b/Build/source/utils/asymptote/runsystem.cc
@@ -93,7 +93,7 @@ function *breakpointFunction()
primCode());
}
-void clear(string file, Int line, bool warn=false)
+void clear(string file, Int line, bool warn=false)
{
bpinfo bp(file,line);
for(mem::list<bpinfo>::iterator p=bplist.begin(); p != bplist.end(); ++p) {
@@ -363,10 +363,10 @@ void gen_runsystem18(stack *Stack)
"your ImageMagick convert utility");
if(oldPath != NULL)
setPath(oldPath);
-
+
if(ret == 0 && verbose > 0)
cout << "Wrote " << (file.empty() ? name : file) << endl;
-
+
{Stack->push<Int>(ret); return;}
}
@@ -388,7 +388,7 @@ void gen_runsystem19(stack *Stack)
cmd.push_back(name);
{Stack->push<Int>(System(cmd,0,false,"animate","your animated GIF viewer")); return;}
}
-#endif
+#endif
{Stack->push<Int>(0); return;}
}
@@ -408,7 +408,7 @@ namespace trans {
void gen_runsystem_venv(venv &ve)
{
#line 107 "runsystem.in"
- addFunc(ve, run::gen_runsystem0, primString() , SYM(outname));
+ addFunc(ve, run::gen_runsystem0, primString(), SYM(outname));
#line 112 "runsystem.in"
addFunc(ve, run::gen_runsystem1, primVoid(), SYM(atupdate), formal(voidFunction(), SYM(f), false, false));
#line 117 "runsystem.in"
@@ -422,31 +422,31 @@ void gen_runsystem_venv(venv &ve)
#line 137 "runsystem.in"
addFunc(ve, run::gen_runsystem6, primVoid(), SYM(breakpoint), formal(primCode(), SYM(s), true, false));
#line 142 "runsystem.in"
- addFunc(ve, run::gen_runsystem7, primString() , SYM(locatefile), formal(primString() , SYM(file), false, false), formal(primBoolean(), SYM(full), true, false));
+ addFunc(ve, run::gen_runsystem7, primString(), SYM(locatefile), formal(primString(), SYM(file), false, false), formal(primBoolean(), SYM(full), true, false));
#line 147 "runsystem.in"
- addFunc(ve, run::gen_runsystem8, primVoid(), SYM(stop), formal(primString() , SYM(file), false, false), formal(primInt(), SYM(line), false, false), formal(primCode(), SYM(s), true, false));
+ addFunc(ve, run::gen_runsystem8, primVoid(), SYM(stop), formal(primString(), SYM(file), false, false), formal(primInt(), SYM(line), false, false), formal(primCode(), SYM(s), true, false));
#line 155 "runsystem.in"
addFunc(ve, run::gen_runsystem9, primVoid(), SYM(breakpoints));
#line 161 "runsystem.in"
- addFunc(ve, run::gen_runsystem10, primVoid(), SYM(clear), formal(primString() , SYM(file), false, false), formal(primInt(), SYM(line), false, false));
+ addFunc(ve, run::gen_runsystem10, primVoid(), SYM(clear), formal(primString(), SYM(file), false, false), formal(primInt(), SYM(line), false, false));
#line 167 "runsystem.in"
addFunc(ve, run::gen_runsystem11, primVoid(), SYM(clear));
#line 172 "runsystem.in"
- addFunc(ve, run::gen_runsystem12, primVoid(), SYM(warn), formal(primString() , SYM(s), false, false));
+ addFunc(ve, run::gen_runsystem12, primVoid(), SYM(warn), formal(primString(), SYM(s), false, false));
#line 177 "runsystem.in"
- addFunc(ve, run::gen_runsystem13, primVoid(), SYM(nowarn), formal(primString() , SYM(s), false, false));
+ addFunc(ve, run::gen_runsystem13, primVoid(), SYM(nowarn), formal(primString(), SYM(s), false, false));
#line 182 "runsystem.in"
- addFunc(ve, run::gen_runsystem14, primVoid(), SYM(warning), formal(primString() , SYM(s), false, false), formal(primString() , SYM(t), false, false), formal(primBoolean(), SYM(position), true, false));
+ addFunc(ve, run::gen_runsystem14, primVoid(), SYM(warning), formal(primString(), SYM(s), false, false), formal(primString(), SYM(t), false, false), formal(primBoolean(), SYM(position), true, false));
#line 190 "runsystem.in"
- addFunc(ve, run::gen_runsystem15, primString() , SYM(stripdirectory), formal(primString(), SYM(s), false, false));
+ addFunc(ve, run::gen_runsystem15, primString(), SYM(stripdirectory), formal(primString(), SYM(s), false, false));
#line 196 "runsystem.in"
- addFunc(ve, run::gen_runsystem16, primString() , SYM(stripfile), formal(primString(), SYM(s), false, false));
+ addFunc(ve, run::gen_runsystem16, primString(), SYM(stripfile), formal(primString(), SYM(s), false, false));
#line 202 "runsystem.in"
- addFunc(ve, run::gen_runsystem17, primString() , SYM(stripextension), formal(primString(), SYM(s), false, false));
+ addFunc(ve, run::gen_runsystem17, primString(), SYM(stripextension), formal(primString(), SYM(s), false, false));
#line 208 "runsystem.in"
- addFunc(ve, run::gen_runsystem18, primInt(), SYM(convert), formal(primString() , SYM(args), true, false), formal(primString() , SYM(file), true, false), formal(primString() , SYM(format), true, false));
+ addFunc(ve, run::gen_runsystem18, primInt(), SYM(convert), formal(primString(), SYM(args), true, false), formal(primString(), SYM(file), true, false), formal(primString(), SYM(format), true, false));
#line 236 "runsystem.in"
- addFunc(ve, run::gen_runsystem19, primInt(), SYM(animate), formal(primString() , SYM(args), true, false), formal(primString() , SYM(file), true, false), formal(primString() , SYM(format), true, false));
+ addFunc(ve, run::gen_runsystem19, primInt(), SYM(animate), formal(primString(), SYM(args), true, false), formal(primString(), SYM(file), true, false), formal(primString(), SYM(format), true, false));
#line 253 "runsystem.in"
addFunc(ve, run::gen_runsystem20, primVoid(), SYM(purge), formal(primInt(), SYM(divisor), true, false));
}
diff --git a/Build/source/utils/asymptote/runsystem.in b/Build/source/utils/asymptote/runsystem.in
index 03025d1bd21..306b332ea15 100644
--- a/Build/source/utils/asymptote/runsystem.in
+++ b/Build/source/utils/asymptote/runsystem.in
@@ -40,7 +40,7 @@ function *breakpointFunction()
primCode());
}
-void clear(string file, Int line, bool warn=false)
+void clear(string file, Int line, bool warn=false)
{
bpinfo bp(file,line);
for(mem::list<bpinfo>::iterator p=bplist.begin(); p != bplist.end(); ++p) {
@@ -104,7 +104,7 @@ void exitFunction(stack *Stack)
// Autogenerated routines:
-string outname()
+string outname()
{
return outname();
}
@@ -226,10 +226,10 @@ Int convert(string args=emptystring, string file=emptystring,
"your ImageMagick convert utility");
if(oldPath != NULL)
setPath(oldPath);
-
+
if(ret == 0 && verbose > 0)
cout << "Wrote " << (file.empty() ? name : file) << endl;
-
+
return ret;
}
@@ -246,7 +246,7 @@ Int animate(string args=emptystring, string file=emptystring,
cmd.push_back(name);
return System(cmd,0,false,"animate","your animated GIF viewer");
}
-#endif
+#endif
return 0;
}
diff --git a/Build/source/utils/asymptote/runtime.cc b/Build/source/utils/asymptote/runtime.cc
index 69f2e3b8270..40f52a54bdd 100644
--- a/Build/source/utils/asymptote/runtime.cc
+++ b/Build/source/utils/asymptote/runtime.cc
@@ -80,7 +80,7 @@ function *realRealFunction();
#include <time.h>
#include <sys/times.h>
#include <locale.h>
-
+
#include "angle.h"
#include "pair.h"
#include "triple.h"
@@ -106,7 +106,8 @@ function *realRealFunction();
#include "lexical.h"
#include "process.h"
#include "arrayop.h"
-
+#include "seconds.h"
+
#if defined(USEGC) && defined(GC_DEBUG) && defined(GC_BACKTRACE)
extern "C" {
void *GC_generate_random_valid_address(void);
@@ -117,6 +118,7 @@ function *realRealFunction();
using namespace vm;
using namespace camp;
using namespace settings;
+using namespace utils;
#undef OUT
#undef IN
@@ -201,7 +203,7 @@ const item Default=item(default_t());
}
namespace run {
-
+
const char *arrayempty="cannot take min or max of empty array";
const char *noruntime="no runtime environment for embedded eval";
@@ -251,54 +253,54 @@ void unused(void *)
namespace run {
// Initializers
-#line 223 "runtime.in"
+#line 225 "runtime.in"
void IntZero(stack *Stack)
{
-#line 224 "runtime.in"
+#line 226 "runtime.in"
{Stack->push<Int>(0); return;}
}
-#line 229 "runtime.in"
+#line 231 "runtime.in"
void realZero(stack *Stack)
{
-#line 230 "runtime.in"
+#line 232 "runtime.in"
{Stack->push<real>(0.0); return;}
}
-#line 234 "runtime.in"
+#line 236 "runtime.in"
void boolFalse(stack *Stack)
{
-#line 235 "runtime.in"
+#line 237 "runtime.in"
{Stack->push<bool>(false); return;}
}
-#line 239 "runtime.in"
+#line 241 "runtime.in"
// bool isnan(real x);
void gen_runtime3(stack *Stack)
{
real x=vm::pop<real>(Stack);
-#line 240 "runtime.in"
+#line 242 "runtime.in"
{Stack->push<bool>(std::isnan(x)); return;}
}
-#line 244 "runtime.in"
+#line 246 "runtime.in"
void pushNullArray(stack *Stack)
{
-#line 245 "runtime.in"
+#line 247 "runtime.in"
{Stack->push<array*>(0); return;}
}
-#line 249 "runtime.in"
+#line 251 "runtime.in"
void pushNullRecord(stack *Stack)
{
-#line 250 "runtime.in"
+#line 252 "runtime.in"
{Stack->push<frame*>(0); return;}
}
-#line 254 "runtime.in"
+#line 256 "runtime.in"
void pushNullFunction(stack *Stack)
{
-#line 255 "runtime.in"
+#line 257 "runtime.in"
{Stack->push(nullfunc::instance()); return;}
}
@@ -307,222 +309,222 @@ void pushNullFunction(stack *Stack)
// Put the default value token on the stack (in place of an argument when
// making a function call).
-#line 264 "runtime.in"
+#line 266 "runtime.in"
void pushDefault(stack *Stack)
{
-#line 265 "runtime.in"
+#line 267 "runtime.in"
{Stack->push(Default); return;}
}
// Test if the value on the stack is the default value token.
-#line 271 "runtime.in"
+#line 273 "runtime.in"
void isDefault(stack *Stack)
{
item i=vm::pop(Stack);
-#line 272 "runtime.in"
+#line 274 "runtime.in"
{Stack->push<bool>(isdefault(i)); return;}
}
// Casts
-#line 278 "runtime.in"
+#line 280 "runtime.in"
void pairToGuide(stack *Stack)
{
pair z=vm::pop<pair>(Stack);
-#line 279 "runtime.in"
+#line 281 "runtime.in"
{Stack->push<guide*>(new pairguide(z)); return;}
}
-#line 284 "runtime.in"
+#line 286 "runtime.in"
void pathToGuide(stack *Stack)
{
path p=vm::pop<path>(Stack);
-#line 285 "runtime.in"
+#line 287 "runtime.in"
{Stack->push<guide*>(new pathguide(p)); return;}
}
-#line 289 "runtime.in"
+#line 291 "runtime.in"
void guideToPath(stack *Stack)
{
guide * g=vm::pop<guide *>(Stack);
-#line 290 "runtime.in"
+#line 292 "runtime.in"
{Stack->push<path>(g->solve()); return;}
}
// Pen operations
-#line 296 "runtime.in"
+#line 298 "runtime.in"
void newPen(stack *Stack)
{
-#line 297 "runtime.in"
+#line 299 "runtime.in"
{Stack->push<pen>(pen()); return;}
}
-#line 302 "runtime.in"
+#line 304 "runtime.in"
// bool ==(pen a, pen b);
void gen_runtime13(stack *Stack)
{
pen b=vm::pop<pen>(Stack);
pen a=vm::pop<pen>(Stack);
-#line 303 "runtime.in"
+#line 305 "runtime.in"
{Stack->push<bool>(a == b); return;}
}
-#line 307 "runtime.in"
+#line 309 "runtime.in"
// bool !=(pen a, pen b);
void gen_runtime14(stack *Stack)
{
pen b=vm::pop<pen>(Stack);
pen a=vm::pop<pen>(Stack);
-#line 308 "runtime.in"
+#line 310 "runtime.in"
{Stack->push<bool>(a != b); return;}
}
-#line 312 "runtime.in"
+#line 314 "runtime.in"
// pen +(pen a, pen b);
void gen_runtime15(stack *Stack)
{
pen b=vm::pop<pen>(Stack);
pen a=vm::pop<pen>(Stack);
-#line 313 "runtime.in"
+#line 315 "runtime.in"
{Stack->push<pen>(a+b); return;}
}
-#line 317 "runtime.in"
+#line 319 "runtime.in"
// pen *(real a, pen b);
void gen_runtime16(stack *Stack)
{
pen b=vm::pop<pen>(Stack);
real a=vm::pop<real>(Stack);
-#line 318 "runtime.in"
+#line 320 "runtime.in"
{Stack->push<pen>(a*b); return;}
}
-#line 322 "runtime.in"
+#line 324 "runtime.in"
// pen *(pen a, real b);
void gen_runtime17(stack *Stack)
{
real b=vm::pop<real>(Stack);
pen a=vm::pop<pen>(Stack);
-#line 323 "runtime.in"
+#line 325 "runtime.in"
{Stack->push<pen>(b*a); return;}
}
-#line 327 "runtime.in"
+#line 329 "runtime.in"
// pair max(pen p);
void gen_runtime18(stack *Stack)
{
pen p=vm::pop<pen>(Stack);
-#line 328 "runtime.in"
+#line 330 "runtime.in"
{Stack->push<pair>(p.bounds().Max()); return;}
}
-#line 332 "runtime.in"
+#line 334 "runtime.in"
// pair min(pen p);
void gen_runtime19(stack *Stack)
{
pen p=vm::pop<pen>(Stack);
-#line 333 "runtime.in"
+#line 335 "runtime.in"
{Stack->push<pair>(p.bounds().Min()); return;}
}
// Reset the meaning of pen default attributes.
-#line 338 "runtime.in"
+#line 340 "runtime.in"
// void resetdefaultpen();
void gen_runtime20(stack *)
{
-#line 339 "runtime.in"
+#line 341 "runtime.in"
processData().defaultpen=camp::pen::initialpen();
}
-#line 343 "runtime.in"
+#line 345 "runtime.in"
// void defaultpen(pen p);
void gen_runtime21(stack *Stack)
{
pen p=vm::pop<pen>(Stack);
-#line 344 "runtime.in"
+#line 346 "runtime.in"
processData().defaultpen=pen(resolvepen,p);
}
-#line 348 "runtime.in"
+#line 350 "runtime.in"
// pen defaultpen();
void gen_runtime22(stack *Stack)
{
-#line 349 "runtime.in"
+#line 351 "runtime.in"
{Stack->push<pen>(processData().defaultpen); return;}
}
-#line 353 "runtime.in"
+#line 355 "runtime.in"
// bool invisible(pen p);
void gen_runtime23(stack *Stack)
{
pen p=vm::pop<pen>(Stack);
-#line 354 "runtime.in"
+#line 356 "runtime.in"
{Stack->push<bool>(p.invisible()); return;}
}
-#line 358 "runtime.in"
+#line 360 "runtime.in"
// pen invisible();
void gen_runtime24(stack *Stack)
{
-#line 359 "runtime.in"
+#line 361 "runtime.in"
{Stack->push<pen>(pen(invisiblepen)); return;}
}
-#line 363 "runtime.in"
+#line 365 "runtime.in"
// pen gray(pen p);
void gen_runtime25(stack *Stack)
{
pen p=vm::pop<pen>(Stack);
-#line 364 "runtime.in"
+#line 366 "runtime.in"
p.togrey();
{Stack->push<pen>(p); return;}
}
-#line 369 "runtime.in"
+#line 371 "runtime.in"
// pen rgb(pen p);
void gen_runtime26(stack *Stack)
{
pen p=vm::pop<pen>(Stack);
-#line 370 "runtime.in"
+#line 372 "runtime.in"
p.torgb();
{Stack->push<pen>(p); return;}
}
-#line 375 "runtime.in"
+#line 377 "runtime.in"
// pen cmyk(pen p);
void gen_runtime27(stack *Stack)
{
pen p=vm::pop<pen>(Stack);
-#line 376 "runtime.in"
+#line 378 "runtime.in"
p.tocmyk();
{Stack->push<pen>(p); return;}
}
-#line 381 "runtime.in"
+#line 383 "runtime.in"
// pen interp(pen a, pen b, real t);
void gen_runtime28(stack *Stack)
{
real t=vm::pop<real>(Stack);
pen b=vm::pop<pen>(Stack);
pen a=vm::pop<pen>(Stack);
-#line 382 "runtime.in"
+#line 384 "runtime.in"
{Stack->push<pen>(interpolate(a,b,t)); return;}
}
-#line 386 "runtime.in"
+#line 388 "runtime.in"
// pen rgb(real r, real g, real b);
void gen_runtime29(stack *Stack)
{
real b=vm::pop<real>(Stack);
real g=vm::pop<real>(Stack);
real r=vm::pop<real>(Stack);
-#line 387 "runtime.in"
+#line 389 "runtime.in"
{Stack->push<pen>(pen(r,g,b)); return;}
}
-#line 391 "runtime.in"
+#line 393 "runtime.in"
// pen cmyk(real c, real m, real y, real k);
void gen_runtime30(stack *Stack)
{
@@ -530,43 +532,43 @@ void gen_runtime30(stack *Stack)
real y=vm::pop<real>(Stack);
real m=vm::pop<real>(Stack);
real c=vm::pop<real>(Stack);
-#line 392 "runtime.in"
- {Stack->push<pen>(pen(c,m,y,k)); return;}
+#line 394 "runtime.in"
+ {Stack->push<pen>(pen(c,m,y,k)); return;}
}
-#line 396 "runtime.in"
+#line 398 "runtime.in"
// pen gray(real gray);
void gen_runtime31(stack *Stack)
{
real gray=vm::pop<real>(Stack);
-#line 397 "runtime.in"
+#line 399 "runtime.in"
{Stack->push<pen>(pen(gray)); return;}
}
-#line 401 "runtime.in"
+#line 403 "runtime.in"
// realarray* colors(pen p);
void gen_runtime32(stack *Stack)
{
pen p=vm::pop<pen>(Stack);
-#line 402 "runtime.in"
+#line 404 "runtime.in"
size_t n=ColorComponents[p.colorspace()];
array *a=new array(n);
-
+
switch(n) {
case 0:
break;
- case 1:
- (*a)[0]=p.gray();
+ case 1:
+ (*a)[0]=p.gray();
break;
case 3:
- (*a)[0]=p.red();
- (*a)[1]=p.green();
- (*a)[2]=p.blue();
+ (*a)[0]=p.red();
+ (*a)[1]=p.green();
+ (*a)[2]=p.blue();
break;
case 4:
(*a)[0]=p.cyan();
- (*a)[1]=p.magenta();
- (*a)[2]=p.yellow();
+ (*a)[1]=p.magenta();
+ (*a)[2]=p.yellow();
(*a)[3]=p.black();
break;
default:
@@ -575,78 +577,78 @@ void gen_runtime32(stack *Stack)
{Stack->push<realarray*>(a); return;}
}
-#line 429 "runtime.in"
+#line 431 "runtime.in"
// string hex(pen p);
void gen_runtime33(stack *Stack)
{
pen p=vm::pop<pen>(Stack);
-#line 430 "runtime.in"
+#line 432 "runtime.in"
{Stack->push<string>(p.hex()); return;}
}
-#line 434 "runtime.in"
+#line 436 "runtime.in"
// Int byte(real x);
void gen_runtime34(stack *Stack)
{
real x=vm::pop<real>(Stack);
-#line 435 "runtime.in"
+#line 437 "runtime.in"
{Stack->push<Int>(camp::byte(x)); return;}
}
-#line 439 "runtime.in"
+#line 441 "runtime.in"
// string colorspace(pen p);
void gen_runtime35(stack *Stack)
{
pen p=vm::pop<pen>(Stack);
-#line 440 "runtime.in"
+#line 442 "runtime.in"
string s=ColorDeviceSuffix[p.colorspace()];
std::transform(s.begin(),s.end(),s.begin(),tolower);
{Stack->push<string>(s); return;}
}
-#line 446 "runtime.in"
+#line 448 "runtime.in"
// pen pattern(string *s);
void gen_runtime36(stack *Stack)
{
string * s=vm::pop<string *>(Stack);
-#line 447 "runtime.in"
+#line 449 "runtime.in"
{Stack->push<pen>(pen(setpattern,*s)); return;}
}
-#line 451 "runtime.in"
+#line 453 "runtime.in"
// string pattern(pen p);
void gen_runtime37(stack *Stack)
{
pen p=vm::pop<pen>(Stack);
-#line 452 "runtime.in"
- {Stack->push<string>(p.fillpattern()); return;}
+#line 454 "runtime.in"
+ {Stack->push<string>(p.fillpattern()); return;}
}
-#line 456 "runtime.in"
+#line 458 "runtime.in"
// pen fillrule(Int n);
void gen_runtime38(stack *Stack)
{
Int n=vm::pop<Int>(Stack);
-#line 457 "runtime.in"
+#line 459 "runtime.in"
{Stack->push<pen>(pen(n >= 0 && n < nFill ? (FillRule) n : DEFFILL)); return;}
}
-#line 461 "runtime.in"
+#line 463 "runtime.in"
// Int fillrule(pen p);
void gen_runtime39(stack *Stack)
{
pen p=vm::pop<pen>(Stack);
-#line 462 "runtime.in"
- {Stack->push<Int>(p.Fillrule()); return;}
+#line 464 "runtime.in"
+ {Stack->push<Int>(p.Fillrule()); return;}
}
-#line 466 "runtime.in"
+#line 468 "runtime.in"
// pen opacity(real opacity=1.0, string blend=defaulttransparency);
void gen_runtime40(stack *Stack)
{
string blend=vm::pop<string>(Stack,defaulttransparency);
real opacity=vm::pop<real>(Stack,1.0);
-#line 467 "runtime.in"
+#line 469 "runtime.in"
for(Int i=0; i < nBlendMode; ++i)
if(blend == BlendMode[i]) {Stack->push<pen>(pen(Transparency(blend,opacity))); return;}
@@ -655,25 +657,25 @@ void gen_runtime40(stack *Stack)
error(buf);
}
-#line 476 "runtime.in"
+#line 478 "runtime.in"
// real opacity(pen p);
void gen_runtime41(stack *Stack)
{
pen p=vm::pop<pen>(Stack);
-#line 477 "runtime.in"
+#line 479 "runtime.in"
{Stack->push<real>(p.opacity()); return;}
}
-#line 481 "runtime.in"
+#line 483 "runtime.in"
// string blend(pen p);
void gen_runtime42(stack *Stack)
{
pen p=vm::pop<pen>(Stack);
-#line 482 "runtime.in"
+#line 484 "runtime.in"
{Stack->push<string>(p.blend()); return;}
}
-#line 486 "runtime.in"
+#line 488 "runtime.in"
// pen linetype(realarray *pattern, real offset=0, bool scale=true, bool adjust=true);
void gen_runtime43(stack *Stack)
{
@@ -681,281 +683,281 @@ void gen_runtime43(stack *Stack)
bool scale=vm::pop<bool>(Stack,true);
real offset=vm::pop<real>(Stack,0);
realarray * pattern=vm::pop<realarray *>(Stack);
-#line 488 "runtime.in"
+#line 490 "runtime.in"
size_t size=checkArray(pattern);
array *a=new array(size);
- for(size_t i=0; i < size; ++i)
+ for(size_t i=0; i < size; ++i)
(*a)[i]=::max(vm::read<double>(pattern,i),0.0);
- {Stack->push<pen>(pen(LineType(*a,offset,scale,adjust))); return;}
+ {Stack->push<pen>(pen(LineType(*a,offset,scale,adjust))); return;}
}
-#line 497 "runtime.in"
+#line 499 "runtime.in"
// realarray* linetype(pen p=CURRENTPEN);
void gen_runtime44(stack *Stack)
{
pen p=vm::pop<pen>(Stack,CURRENTPEN);
-#line 498 "runtime.in"
+#line 500 "runtime.in"
array a=p.linetype()->pattern;
{Stack->push<realarray*>(copyArray(&a)); return;}
}
-#line 503 "runtime.in"
+#line 505 "runtime.in"
// real offset(pen p);
void gen_runtime45(stack *Stack)
{
pen p=vm::pop<pen>(Stack);
-#line 504 "runtime.in"
+#line 506 "runtime.in"
{Stack->push<real>(p.linetype()->offset); return;}
}
-#line 508 "runtime.in"
+#line 510 "runtime.in"
// bool scale(pen p);
void gen_runtime46(stack *Stack)
{
pen p=vm::pop<pen>(Stack);
-#line 509 "runtime.in"
+#line 511 "runtime.in"
{Stack->push<bool>(p.linetype()->scale); return;}
}
-#line 513 "runtime.in"
+#line 515 "runtime.in"
// bool adjust(pen p);
void gen_runtime47(stack *Stack)
{
pen p=vm::pop<pen>(Stack);
-#line 514 "runtime.in"
+#line 516 "runtime.in"
{Stack->push<bool>(p.linetype()->adjust); return;}
}
-#line 518 "runtime.in"
+#line 520 "runtime.in"
// pen adjust(pen p, real arclength, bool cyclic);
void gen_runtime48(stack *Stack)
{
bool cyclic=vm::pop<bool>(Stack);
real arclength=vm::pop<real>(Stack);
pen p=vm::pop<pen>(Stack);
-#line 519 "runtime.in"
+#line 521 "runtime.in"
{Stack->push<pen>(adjustdash(p,arclength,cyclic)); return;}
}
-#line 523 "runtime.in"
+#line 525 "runtime.in"
// pen linecap(Int n);
void gen_runtime49(stack *Stack)
{
Int n=vm::pop<Int>(Stack);
-#line 524 "runtime.in"
+#line 526 "runtime.in"
{Stack->push<pen>(pen(setlinecap,n >= 0 && n < nCap ? n : DEFCAP)); return;}
}
-#line 528 "runtime.in"
+#line 530 "runtime.in"
// Int linecap(pen p=CURRENTPEN);
void gen_runtime50(stack *Stack)
{
pen p=vm::pop<pen>(Stack,CURRENTPEN);
-#line 529 "runtime.in"
- {Stack->push<Int>(p.cap()); return;}
+#line 531 "runtime.in"
+ {Stack->push<Int>(p.cap()); return;}
}
-#line 533 "runtime.in"
+#line 535 "runtime.in"
// pen linejoin(Int n);
void gen_runtime51(stack *Stack)
{
Int n=vm::pop<Int>(Stack);
-#line 534 "runtime.in"
+#line 536 "runtime.in"
{Stack->push<pen>(pen(setlinejoin,n >= 0 && n < nJoin ? n : DEFJOIN)); return;}
}
-#line 538 "runtime.in"
+#line 540 "runtime.in"
// Int linejoin(pen p=CURRENTPEN);
void gen_runtime52(stack *Stack)
{
pen p=vm::pop<pen>(Stack,CURRENTPEN);
-#line 539 "runtime.in"
- {Stack->push<Int>(p.join()); return;}
+#line 541 "runtime.in"
+ {Stack->push<Int>(p.join()); return;}
}
-#line 543 "runtime.in"
+#line 545 "runtime.in"
// pen miterlimit(real x);
void gen_runtime53(stack *Stack)
{
real x=vm::pop<real>(Stack);
-#line 544 "runtime.in"
+#line 546 "runtime.in"
{Stack->push<pen>(pen(setmiterlimit,x >= 1.0 ? x : DEFJOIN)); return;}
}
-#line 548 "runtime.in"
+#line 550 "runtime.in"
// real miterlimit(pen p=CURRENTPEN);
void gen_runtime54(stack *Stack)
{
pen p=vm::pop<pen>(Stack,CURRENTPEN);
-#line 549 "runtime.in"
- {Stack->push<real>(p.miter()); return;}
+#line 551 "runtime.in"
+ {Stack->push<real>(p.miter()); return;}
}
-#line 553 "runtime.in"
+#line 555 "runtime.in"
// pen linewidth(real x);
void gen_runtime55(stack *Stack)
{
real x=vm::pop<real>(Stack);
-#line 554 "runtime.in"
+#line 556 "runtime.in"
{Stack->push<pen>(pen(setlinewidth,x >= 0.0 ? x : DEFWIDTH)); return;}
}
-#line 558 "runtime.in"
+#line 560 "runtime.in"
// real linewidth(pen p=CURRENTPEN);
void gen_runtime56(stack *Stack)
{
pen p=vm::pop<pen>(Stack,CURRENTPEN);
-#line 559 "runtime.in"
- {Stack->push<real>(p.width()); return;}
+#line 561 "runtime.in"
+ {Stack->push<real>(p.width()); return;}
}
-#line 563 "runtime.in"
+#line 565 "runtime.in"
// pen fontcommand(string *s);
void gen_runtime57(stack *Stack)
{
string * s=vm::pop<string *>(Stack);
-#line 564 "runtime.in"
+#line 566 "runtime.in"
{Stack->push<pen>(pen(setfont,*s)); return;}
}
-#line 568 "runtime.in"
+#line 570 "runtime.in"
// string font(pen p=CURRENTPEN);
void gen_runtime58(stack *Stack)
{
pen p=vm::pop<pen>(Stack,CURRENTPEN);
-#line 569 "runtime.in"
+#line 571 "runtime.in"
{Stack->push<string>(p.Font()); return;}
}
-#line 573 "runtime.in"
+#line 575 "runtime.in"
// pen fontsize(real size, real lineskip);
void gen_runtime59(stack *Stack)
{
real lineskip=vm::pop<real>(Stack);
real size=vm::pop<real>(Stack);
-#line 574 "runtime.in"
+#line 576 "runtime.in"
{Stack->push<pen>(pen(setfontsize,size > 0.0 ? size : 0.0,
lineskip > 0.0 ? lineskip : 0.0)); return;}
}
-#line 579 "runtime.in"
+#line 581 "runtime.in"
// real fontsize(pen p=CURRENTPEN);
void gen_runtime60(stack *Stack)
{
pen p=vm::pop<pen>(Stack,CURRENTPEN);
-#line 580 "runtime.in"
+#line 582 "runtime.in"
{Stack->push<real>(p.size()); return;}
}
-#line 584 "runtime.in"
+#line 586 "runtime.in"
// real lineskip(pen p=CURRENTPEN);
void gen_runtime61(stack *Stack)
{
pen p=vm::pop<pen>(Stack,CURRENTPEN);
-#line 585 "runtime.in"
- {Stack->push<real>(p.Lineskip()); return;}
+#line 587 "runtime.in"
+ {Stack->push<real>(p.Lineskip()); return;}
}
-#line 589 "runtime.in"
+#line 591 "runtime.in"
// pen overwrite(Int n);
void gen_runtime62(stack *Stack)
{
Int n=vm::pop<Int>(Stack);
-#line 590 "runtime.in"
+#line 592 "runtime.in"
{Stack->push<pen>(pen(setoverwrite,n >= 0 && n < nOverwrite ? (overwrite_t) n :
DEFWRITE)); return;}
}
-#line 595 "runtime.in"
+#line 597 "runtime.in"
// Int overwrite(pen p=CURRENTPEN);
void gen_runtime63(stack *Stack)
{
pen p=vm::pop<pen>(Stack,CURRENTPEN);
-#line 596 "runtime.in"
- {Stack->push<Int>(p.Overwrite()); return;}
+#line 598 "runtime.in"
+ {Stack->push<Int>(p.Overwrite()); return;}
}
-#line 600 "runtime.in"
+#line 602 "runtime.in"
// pen basealign(Int n);
void gen_runtime64(stack *Stack)
{
Int n=vm::pop<Int>(Stack);
-#line 601 "runtime.in"
+#line 603 "runtime.in"
{Stack->push<pen>(pen(n >= 0 && n < nBaseLine ? (BaseLine) n : DEFBASE)); return;}
}
-#line 605 "runtime.in"
+#line 607 "runtime.in"
// Int basealign(pen p=CURRENTPEN);
void gen_runtime65(stack *Stack)
{
pen p=vm::pop<pen>(Stack,CURRENTPEN);
-#line 606 "runtime.in"
+#line 608 "runtime.in"
{Stack->push<Int>(p.Baseline()); return;}
}
-#line 610 "runtime.in"
+#line 612 "runtime.in"
// transform transform(pen p);
void gen_runtime66(stack *Stack)
{
pen p=vm::pop<pen>(Stack);
-#line 611 "runtime.in"
+#line 613 "runtime.in"
{Stack->push<transform>(p.getTransform()); return;}
}
-#line 615 "runtime.in"
+#line 617 "runtime.in"
// path nib(pen p);
void gen_runtime67(stack *Stack)
{
pen p=vm::pop<pen>(Stack);
-#line 616 "runtime.in"
+#line 618 "runtime.in"
{Stack->push<path>(p.Path()); return;}
}
-#line 620 "runtime.in"
+#line 622 "runtime.in"
// pen makepen(path p);
void gen_runtime68(stack *Stack)
{
path p=vm::pop<path>(Stack);
-#line 621 "runtime.in"
+#line 623 "runtime.in"
{Stack->push<pen>(pen(p)); return;}
}
-#line 625 "runtime.in"
+#line 627 "runtime.in"
// pen colorless(pen p);
void gen_runtime69(stack *Stack)
{
pen p=vm::pop<pen>(Stack);
-#line 626 "runtime.in"
+#line 628 "runtime.in"
p.colorless();
{Stack->push<pen>(p); return;}
}
// Interactive mode
-#line 632 "runtime.in"
+#line 634 "runtime.in"
// bool interactive();
void gen_runtime70(stack *Stack)
{
-#line 633 "runtime.in"
+#line 635 "runtime.in"
{Stack->push<bool>(interact::interactive); return;}
}
-#line 638 "runtime.in"
+#line 640 "runtime.in"
// bool uptodate();
void gen_runtime71(stack *Stack)
{
-#line 639 "runtime.in"
+#line 641 "runtime.in"
{Stack->push<bool>(interact::uptodate); return;}
}
// System commands
-#line 645 "runtime.in"
+#line 647 "runtime.in"
// Int system(stringarray *s);
void gen_runtime72(stack *Stack)
{
stringarray * s=vm::pop<stringarray *>(Stack);
-#line 646 "runtime.in"
+#line 648 "runtime.in"
if(safe) error("system() call disabled; override with option -nosafe");
size_t size=checkArray(s);
if(size == 0) {Stack->push<Int>(0); return;}
@@ -965,57 +967,57 @@ void gen_runtime72(stack *Stack)
{Stack->push<Int>(System(cmd)); return;}
}
-#line 657 "runtime.in"
+#line 659 "runtime.in"
// bool view();
void gen_runtime73(stack *Stack)
{
-#line 658 "runtime.in"
+#line 660 "runtime.in"
{Stack->push<bool>(view()); return;}
}
-#line 662 "runtime.in"
+#line 664 "runtime.in"
// string asydir();
void gen_runtime74(stack *Stack)
{
-#line 663 "runtime.in"
+#line 665 "runtime.in"
{Stack->push<string>(systemDir); return;}
}
-#line 667 "runtime.in"
+#line 669 "runtime.in"
// string locale(string s=emptystring);
void gen_runtime75(stack *Stack)
{
string s=vm::pop<string>(Stack,emptystring);
-#line 668 "runtime.in"
+#line 670 "runtime.in"
char *L=setlocale(LC_ALL,s.empty() ? NULL : s.c_str());
{Stack->push<string>(L != NULL ? string(L) : ""); return;}
}
-#line 673 "runtime.in"
+#line 675 "runtime.in"
// void abort(string s=emptystring);
void gen_runtime76(stack *Stack)
{
string s=vm::pop<string>(Stack,emptystring);
-#line 674 "runtime.in"
+#line 676 "runtime.in"
if(s.empty()) throw handled_error();
error(s.c_str());
}
-#line 679 "runtime.in"
+#line 681 "runtime.in"
// void exit();
void gen_runtime77(stack *)
{
-#line 680 "runtime.in"
+#line 682 "runtime.in"
throw quit();
}
-#line 684 "runtime.in"
+#line 686 "runtime.in"
// void assert(bool b, string s=emptystring);
void gen_runtime78(stack *Stack)
{
string s=vm::pop<string>(Stack,emptystring);
bool b=vm::pop<bool>(Stack);
-#line 685 "runtime.in"
+#line 687 "runtime.in"
flush(cout);
if(!b) {
ostringstream buf;
@@ -1025,34 +1027,34 @@ void gen_runtime78(stack *Stack)
}
}
-#line 695 "runtime.in"
+#line 697 "runtime.in"
// void sleep(Int seconds);
void gen_runtime79(stack *Stack)
{
Int seconds=vm::pop<Int>(Stack);
-#line 696 "runtime.in"
- if(seconds <= 0) return;
+#line 698 "runtime.in"
+ if(seconds <= 0) return;
sleep(seconds);
}
-#line 701 "runtime.in"
+#line 703 "runtime.in"
// void usleep(Int microseconds);
void gen_runtime80(stack *Stack)
{
Int microseconds=vm::pop<Int>(Stack);
-#line 702 "runtime.in"
- if(microseconds <= 0) return;
- usleep((unsigned long) microseconds);
+#line 704 "runtime.in"
+ if(microseconds <= 0) return;
+ usleep((unsigned long) microseconds);
}
-#line 707 "runtime.in"
+#line 709 "runtime.in"
// void _eval(string *s, bool embedded, bool interactiveWrite=false);
void gen_runtime81(stack *Stack)
{
bool interactiveWrite=vm::pop<bool>(Stack,false);
bool embedded=vm::pop<bool>(Stack);
string * s=vm::pop<string *>(Stack);
-#line 708 "runtime.in"
+#line 710 "runtime.in"
if(embedded) {
trans::coenv *e=Stack->getEnvironment();
vm::interactiveStack *is=dynamic_cast<vm::interactiveStack *>(Stack);
@@ -1064,13 +1066,13 @@ void gen_runtime81(stack *Stack)
runString(*s,interactiveWrite);
}
-#line 720 "runtime.in"
+#line 722 "runtime.in"
// void _eval(runnable *s, bool embedded);
void gen_runtime82(stack *Stack)
{
bool embedded=vm::pop<bool>(Stack);
runnable * s=vm::pop<runnable *>(Stack);
-#line 721 "runtime.in"
+#line 723 "runtime.in"
absyntax::block *ast=new absyntax::block(s->getPos(), false);
ast->add(s);
@@ -1085,74 +1087,75 @@ void gen_runtime82(stack *Stack)
runCode(ast);
}
-#line 736 "runtime.in"
+#line 738 "runtime.in"
// string xasyKEY();
void gen_runtime83(stack *Stack)
{
-#line 737 "runtime.in"
+#line 739 "runtime.in"
processDataStruct *P=&processData();
xkey_t *xkey=&P->xkey;
xkey_t::iterator p=xkey->find(P->topPos.LineColumn());
{Stack->push<string>(p != xkey->end() ? p->second+" 1" : toplocation()+" 0"); return;}
}
-#line 743 "runtime.in"
+#line 745 "runtime.in"
// void xasyKEY(string *s);
void gen_runtime84(stack *Stack)
{
string * s=vm::pop<string *>(Stack);
-#line 744 "runtime.in"
+#line 746 "runtime.in"
processData().KEY=*s;
}
-#line 747 "runtime.in"
+#line 749 "runtime.in"
// string toplocation();
void gen_runtime85(stack *Stack)
{
-#line 748 "runtime.in"
+#line 750 "runtime.in"
{Stack->push<string>(toplocation()); return;}
}
-#line 751 "runtime.in"
+#line 753 "runtime.in"
// string location();
void gen_runtime86(stack *Stack)
{
-#line 752 "runtime.in"
+#line 754 "runtime.in"
ostringstream buf;
buf << getPos();
{Stack->push<string>(buf.str()); return;}
}
// Wrapper for the stack::load() method.
-#line 758 "runtime.in"
+#line 760 "runtime.in"
void loadModule(stack *Stack)
{
string * index=vm::pop<string *>(Stack);
-#line 759 "runtime.in"
+#line 761 "runtime.in"
Stack->load(*index);
}
-#line 763 "runtime.in"
+#line 765 "runtime.in"
// string cd(string s=emptystring);
void gen_runtime88(stack *Stack)
{
string s=vm::pop<string>(Stack,emptystring);
-#line 764 "runtime.in"
+#line 766 "runtime.in"
+ if(!globalread()) readDisabled();
if(!s.empty() && !globalwrite()) {
- string outname=getSetting<string>("outname");
- string dir=stripDir(outname);
+ string outname=settings::outname();
+ string dir=stripFile(outname);
if(dir.empty()) Setting("outname")=getPath()+dirsep+outname;
}
{Stack->push<string>(setPath(s.c_str())); return;}
}
-#line 773 "runtime.in"
+#line 776 "runtime.in"
// void list(string *s, bool imports=false);
void gen_runtime89(stack *Stack)
{
bool imports=vm::pop<bool>(Stack,false);
string * s=vm::pop<string *>(Stack);
-#line 774 "runtime.in"
+#line 777 "runtime.in"
if(*s == "-") return;
trans::genv ge;
symbol name=symbol::trans(*s);
@@ -1162,18 +1165,18 @@ void gen_runtime89(stack *Stack)
// Guide operations
-#line 784 "runtime.in"
+#line 787 "runtime.in"
void nullGuide(stack *Stack)
{
-#line 785 "runtime.in"
+#line 788 "runtime.in"
{Stack->push<guide*>(new pathguide(path())); return;}
}
-#line 790 "runtime.in"
+#line 793 "runtime.in"
void dotsGuide(stack *Stack)
{
guidearray * a=vm::pop<guidearray *>(Stack);
-#line 791 "runtime.in"
+#line 794 "runtime.in"
guidevector v;
size_t size=checkArray(a);
for (size_t i=0; i < size; ++i)
@@ -1182,11 +1185,11 @@ void dotsGuide(stack *Stack)
{Stack->push<guide*>(new multiguide(v)); return;}
}
-#line 800 "runtime.in"
+#line 803 "runtime.in"
void dashesGuide(stack *Stack)
{
guidearray * a=vm::pop<guidearray *>(Stack);
-#line 801 "runtime.in"
+#line 804 "runtime.in"
static camp::curlSpec curly;
static camp::specguide curlout(&curly, camp::OUT);
static camp::specguide curlin(&curly, camp::IN);
@@ -1212,179 +1215,179 @@ void dashesGuide(stack *Stack)
{Stack->push<guide*>(new multiguide(v)); return;}
}
-#line 827 "runtime.in"
+#line 830 "runtime.in"
void newCycleToken(stack *Stack)
{
-#line 828 "runtime.in"
+#line 831 "runtime.in"
{Stack->push<cycleToken>(cycleToken()); return;}
}
-#line 832 "runtime.in"
+#line 835 "runtime.in"
// guide* operator cast(cycleToken tok);
void gen_runtime94(stack *Stack)
{
cycleToken tok=vm::pop<cycleToken>(Stack);
-#line 833 "runtime.in"
+#line 836 "runtime.in"
// Avoid unused variable warning messages.
unused(&tok);
{Stack->push<guide*>(new cycletokguide()); return;}
}
-#line 839 "runtime.in"
+#line 842 "runtime.in"
// guide* operator spec(pair z, Int p);
void gen_runtime95(stack *Stack)
{
Int p=vm::pop<Int>(Stack);
pair z=vm::pop<pair>(Stack);
-#line 840 "runtime.in"
+#line 843 "runtime.in"
camp::side d=(camp::side) p;
camp::dirSpec *sp=new camp::dirSpec(z);
{Stack->push<guide*>(new specguide(sp,d)); return;}
}
-#line 847 "runtime.in"
+#line 850 "runtime.in"
// curlSpecifier operator curl(real gamma, Int p);
void gen_runtime96(stack *Stack)
{
Int p=vm::pop<Int>(Stack);
real gamma=vm::pop<real>(Stack);
-#line 848 "runtime.in"
+#line 851 "runtime.in"
camp::side s=(camp::side) p;
{Stack->push<curlSpecifier>(curlSpecifier(gamma,s)); return;}
}
-#line 853 "runtime.in"
+#line 856 "runtime.in"
void curlSpecifierValuePart(stack *Stack)
{
curlSpecifier spec=vm::pop<curlSpecifier>(Stack);
-#line 854 "runtime.in"
+#line 857 "runtime.in"
{Stack->push<real>(spec.getValue()); return;}
}
-#line 858 "runtime.in"
+#line 861 "runtime.in"
void curlSpecifierSidePart(stack *Stack)
{
curlSpecifier spec=vm::pop<curlSpecifier>(Stack);
-#line 859 "runtime.in"
+#line 862 "runtime.in"
{Stack->push<Int>(spec.getSide()); return;}
}
-#line 863 "runtime.in"
+#line 866 "runtime.in"
// guide* operator cast(curlSpecifier spec);
void gen_runtime99(stack *Stack)
{
curlSpecifier spec=vm::pop<curlSpecifier>(Stack);
-#line 864 "runtime.in"
+#line 867 "runtime.in"
{Stack->push<guide*>(new specguide(spec)); return;}
}
-#line 868 "runtime.in"
+#line 871 "runtime.in"
// tensionSpecifier operator tension(real tout, real tin, bool atleast);
void gen_runtime100(stack *Stack)
{
bool atleast=vm::pop<bool>(Stack);
real tin=vm::pop<real>(Stack);
real tout=vm::pop<real>(Stack);
-#line 869 "runtime.in"
+#line 872 "runtime.in"
{Stack->push<tensionSpecifier>(tensionSpecifier(tout, tin, atleast)); return;}
}
-#line 873 "runtime.in"
+#line 876 "runtime.in"
void tensionSpecifierOutPart(stack *Stack)
{
tensionSpecifier t=vm::pop<tensionSpecifier>(Stack);
-#line 874 "runtime.in"
+#line 877 "runtime.in"
{Stack->push<real>(t.getOut()); return;}
}
-#line 878 "runtime.in"
+#line 881 "runtime.in"
void tensionSpecifierInPart(stack *Stack)
{
tensionSpecifier t=vm::pop<tensionSpecifier>(Stack);
-#line 879 "runtime.in"
+#line 882 "runtime.in"
{Stack->push<real>(t.getIn()); return;}
}
-#line 883 "runtime.in"
+#line 886 "runtime.in"
void tensionSpecifierAtleastPart(stack *Stack)
{
tensionSpecifier t=vm::pop<tensionSpecifier>(Stack);
-#line 884 "runtime.in"
+#line 887 "runtime.in"
{Stack->push<bool>(t.getAtleast()); return;}
}
-#line 888 "runtime.in"
+#line 891 "runtime.in"
// guide* operator cast(tensionSpecifier t);
void gen_runtime104(stack *Stack)
{
tensionSpecifier t=vm::pop<tensionSpecifier>(Stack);
-#line 889 "runtime.in"
+#line 892 "runtime.in"
{Stack->push<guide*>(new tensionguide(t)); return;}
}
-#line 893 "runtime.in"
+#line 896 "runtime.in"
// guide* operator controls(pair zout, pair zin);
void gen_runtime105(stack *Stack)
{
pair zin=vm::pop<pair>(Stack);
pair zout=vm::pop<pair>(Stack);
-#line 894 "runtime.in"
+#line 897 "runtime.in"
{Stack->push<guide*>(new controlguide(zout, zin)); return;}
}
-#line 898 "runtime.in"
+#line 901 "runtime.in"
// Int size(guide *g);
void gen_runtime106(stack *Stack)
{
guide * g=vm::pop<guide *>(Stack);
-#line 899 "runtime.in"
+#line 902 "runtime.in"
flatguide f;
g->flatten(f,false);
{Stack->push<Int>(f.size()); return;}
}
-#line 905 "runtime.in"
+#line 908 "runtime.in"
// Int length(guide *g);
void gen_runtime107(stack *Stack)
{
guide * g=vm::pop<guide *>(Stack);
-#line 906 "runtime.in"
+#line 909 "runtime.in"
flatguide f;
g->flatten(f,false);
{Stack->push<Int>(g->cyclic() ? f.size() : f.size()-1); return;}
}
-#line 912 "runtime.in"
+#line 915 "runtime.in"
// bool cyclic(guide *g);
void gen_runtime108(stack *Stack)
{
guide * g=vm::pop<guide *>(Stack);
-#line 913 "runtime.in"
+#line 916 "runtime.in"
flatguide f;
g->flatten(f,false);
{Stack->push<bool>(g->cyclic()); return;}
}
-#line 919 "runtime.in"
+#line 922 "runtime.in"
// pair point(guide *g, Int t);
void gen_runtime109(stack *Stack)
{
Int t=vm::pop<Int>(Stack);
guide * g=vm::pop<guide *>(Stack);
-#line 920 "runtime.in"
+#line 923 "runtime.in"
flatguide f;
g->flatten(f,false);
{Stack->push<pair>(f.Nodes(adjustedIndex(t,f.size(),g->cyclic())).z); return;}
}
-#line 926 "runtime.in"
+#line 929 "runtime.in"
// pairarray* dirSpecifier(guide *g, Int t);
void gen_runtime110(stack *Stack)
{
Int t=vm::pop<Int>(Stack);
guide * g=vm::pop<guide *>(Stack);
-#line 927 "runtime.in"
+#line 930 "runtime.in"
flatguide f;
g->flatten(f,false);
Int n=f.size();
@@ -1395,13 +1398,13 @@ void gen_runtime110(stack *Stack)
{Stack->push<pairarray*>(c); return;}
}
-#line 938 "runtime.in"
+#line 941 "runtime.in"
// pairarray* controlSpecifier(guide *g, Int t);
void gen_runtime111(stack *Stack)
{
Int t=vm::pop<Int>(Stack);
guide * g=vm::pop<guide *>(Stack);
-#line 939 "runtime.in"
+#line 942 "runtime.in"
flatguide f;
g->flatten(f,false);
Int n=f.size();
@@ -1417,13 +1420,13 @@ void gen_runtime111(stack *Stack)
} else {Stack->push<pairarray*>(new array(0)); return;}
}
-#line 955 "runtime.in"
+#line 958 "runtime.in"
// tensionSpecifier tensionSpecifier(guide *g, Int t);
void gen_runtime112(stack *Stack)
{
Int t=vm::pop<Int>(Stack);
guide * g=vm::pop<guide *>(Stack);
-#line 956 "runtime.in"
+#line 959 "runtime.in"
flatguide f;
g->flatten(f,false);
Int n=f.size();
@@ -1432,13 +1435,13 @@ void gen_runtime112(stack *Stack)
{Stack->push<tensionSpecifier>(tensionSpecifier(curr.tout.val,f.Nodes(t+1).tin.val,curr.tout.atleast)); return;}
}
-#line 965 "runtime.in"
+#line 968 "runtime.in"
// realarray* curlSpecifier(guide *g, Int t);
void gen_runtime113(stack *Stack)
{
Int t=vm::pop<Int>(Stack);
guide * g=vm::pop<guide *>(Stack);
-#line 966 "runtime.in"
+#line 969 "runtime.in"
flatguide f;
g->flatten(f,false);
Int n=f.size();
@@ -1451,12 +1454,12 @@ void gen_runtime113(stack *Stack)
{Stack->push<realarray*>(c); return;}
}
-#line 979 "runtime.in"
+#line 982 "runtime.in"
// guide* reverse(guide *g);
void gen_runtime114(stack *Stack)
{
guide * g=vm::pop<guide *>(Stack);
-#line 980 "runtime.in"
+#line 983 "runtime.in"
flatguide f;
g->flatten(f,false);
if(f.precyclic())
@@ -1476,7 +1479,7 @@ void gen_runtime114(stack *Stack)
v.push_back(new controlguide(curr.in->control(),next.out->control()));
} else {
pair d=curr.in->dir();
- if(d != zero)
+ if(d != zero)
v.push_back(new specguide(new dirSpec(-d),camp::OUT));
else {
real C=curr.in->curl();
@@ -1488,8 +1491,8 @@ void gen_runtime114(stack *Stack)
bool atleast=next.tout.atleast;
if(tout != 1.0 || tin != 1.0 || next.tout.atleast)
v.push_back(new tensionguide(tensionSpecifier(tout,tin,atleast)));
- d=next.out->dir();
- if(d != zero)
+ d=next.out->dir();
+ if(d != zero)
v.push_back(new specguide(new dirSpec(-d),camp::IN));
else {
real C=next.out->curl();
@@ -1503,126 +1506,127 @@ void gen_runtime114(stack *Stack)
v.push_back(new cycletokguide());
else
v.push_back(new pairguide(next.z));
-
+
{Stack->push<guide*>(new multiguide(v)); return;}
}
-#line 1032 "runtime.in"
+#line 1035 "runtime.in"
// realarray* _cputime();
void gen_runtime115(stack *Stack)
{
-#line 1033 "runtime.in"
+#line 1036 "runtime.in"
static const real ticktime=1.0/sysconf(_SC_CLK_TCK);
struct tms buf;
::times(&buf);
- array *t=new array(4);
- (*t)[0] = ((real) buf.tms_utime)*ticktime;
- (*t)[1] = ((real) buf.tms_stime)*ticktime;
- (*t)[2] = ((real) buf.tms_cutime)*ticktime;
- (*t)[3] = ((real) buf.tms_cstime)*ticktime;
+ array *t=new array(5);
+ (*t)[0]=((real) buf.tms_utime)*ticktime;
+ (*t)[1]=((real) buf.tms_stime)*ticktime;
+ (*t)[2]=((real) buf.tms_cutime)*ticktime;
+ (*t)[3]=((real) buf.tms_cstime)*ticktime;
+ (*t)[4]=utils::totalseconds();
{Stack->push<realarray*>(t); return;}
}
// Transforms
-#line 1048 "runtime.in"
+#line 1052 "runtime.in"
// bool ==(transform a, transform b);
void gen_runtime116(stack *Stack)
{
transform b=vm::pop<transform>(Stack);
transform a=vm::pop<transform>(Stack);
-#line 1049 "runtime.in"
+#line 1053 "runtime.in"
{Stack->push<bool>(a == b); return;}
}
-#line 1054 "runtime.in"
+#line 1058 "runtime.in"
// bool !=(transform a, transform b);
void gen_runtime117(stack *Stack)
{
transform b=vm::pop<transform>(Stack);
transform a=vm::pop<transform>(Stack);
-#line 1055 "runtime.in"
+#line 1059 "runtime.in"
{Stack->push<bool>(a != b); return;}
}
-#line 1059 "runtime.in"
+#line 1063 "runtime.in"
// transform +(transform a, transform b);
void gen_runtime118(stack *Stack)
{
transform b=vm::pop<transform>(Stack);
transform a=vm::pop<transform>(Stack);
-#line 1060 "runtime.in"
+#line 1064 "runtime.in"
{Stack->push<transform>(a+b); return;}
}
-#line 1064 "runtime.in"
+#line 1068 "runtime.in"
// transform *(transform a, transform b);
void gen_runtime119(stack *Stack)
{
transform b=vm::pop<transform>(Stack);
transform a=vm::pop<transform>(Stack);
-#line 1065 "runtime.in"
+#line 1069 "runtime.in"
{Stack->push<transform>(a*b); return;}
}
-#line 1069 "runtime.in"
+#line 1073 "runtime.in"
// pair *(transform t, pair z);
void gen_runtime120(stack *Stack)
{
pair z=vm::pop<pair>(Stack);
transform t=vm::pop<transform>(Stack);
-#line 1070 "runtime.in"
+#line 1074 "runtime.in"
{Stack->push<pair>(t*z); return;}
}
-#line 1074 "runtime.in"
+#line 1078 "runtime.in"
// path *(transform t, path g);
void gen_runtime121(stack *Stack)
{
path g=vm::pop<path>(Stack);
transform t=vm::pop<transform>(Stack);
-#line 1075 "runtime.in"
+#line 1079 "runtime.in"
{Stack->push<path>(transformed(t,g)); return;}
}
-#line 1079 "runtime.in"
+#line 1083 "runtime.in"
// pen *(transform t, pen p);
void gen_runtime122(stack *Stack)
{
pen p=vm::pop<pen>(Stack);
transform t=vm::pop<transform>(Stack);
-#line 1080 "runtime.in"
+#line 1084 "runtime.in"
{Stack->push<pen>(transformed(t,p)); return;}
}
-#line 1084 "runtime.in"
+#line 1088 "runtime.in"
// picture* *(transform t, picture *f);
void gen_runtime123(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
transform t=vm::pop<transform>(Stack);
-#line 1085 "runtime.in"
+#line 1089 "runtime.in"
{Stack->push<picture*>(transformed(t,f)); return;}
}
-#line 1089 "runtime.in"
+#line 1093 "runtime.in"
// picture* *(realarray2 *t, picture *f);
void gen_runtime124(stack *Stack)
{
picture * f=vm::pop<picture *>(Stack);
realarray2 * t=vm::pop<realarray2 *>(Stack);
-#line 1090 "runtime.in"
+#line 1094 "runtime.in"
{Stack->push<picture*>(transformed(*t,f)); return;}
}
-#line 1094 "runtime.in"
+#line 1098 "runtime.in"
// transform ^(transform t, Int n);
void gen_runtime125(stack *Stack)
{
Int n=vm::pop<Int>(Stack);
transform t=vm::pop<transform>(Stack);
-#line 1095 "runtime.in"
+#line 1099 "runtime.in"
transform T;
if(n < 0) {
n=-n;
@@ -1632,55 +1636,55 @@ void gen_runtime125(stack *Stack)
{Stack->push<transform>(T); return;}
}
-#line 1105 "runtime.in"
+#line 1109 "runtime.in"
void transformXPart(stack *Stack)
{
transform t=vm::pop<transform>(Stack);
-#line 1106 "runtime.in"
+#line 1110 "runtime.in"
{Stack->push<real>(t.getx()); return;}
}
-#line 1110 "runtime.in"
+#line 1114 "runtime.in"
void transformYPart(stack *Stack)
{
transform t=vm::pop<transform>(Stack);
-#line 1111 "runtime.in"
+#line 1115 "runtime.in"
{Stack->push<real>(t.gety()); return;}
}
-#line 1115 "runtime.in"
+#line 1119 "runtime.in"
void transformXXPart(stack *Stack)
{
transform t=vm::pop<transform>(Stack);
-#line 1116 "runtime.in"
+#line 1120 "runtime.in"
{Stack->push<real>(t.getxx()); return;}
}
-#line 1120 "runtime.in"
+#line 1124 "runtime.in"
void transformXYPart(stack *Stack)
{
transform t=vm::pop<transform>(Stack);
-#line 1121 "runtime.in"
+#line 1125 "runtime.in"
{Stack->push<real>(t.getxy()); return;}
}
-#line 1125 "runtime.in"
+#line 1129 "runtime.in"
void transformYXPart(stack *Stack)
{
transform t=vm::pop<transform>(Stack);
-#line 1126 "runtime.in"
+#line 1130 "runtime.in"
{Stack->push<real>(t.getyx()); return;}
}
-#line 1130 "runtime.in"
+#line 1134 "runtime.in"
void transformYYPart(stack *Stack)
{
transform t=vm::pop<transform>(Stack);
-#line 1131 "runtime.in"
+#line 1135 "runtime.in"
{Stack->push<real>(t.getyy()); return;}
}
-#line 1135 "runtime.in"
+#line 1139 "runtime.in"
void real6ToTransform(stack *Stack)
{
real yy=vm::pop<real>(Stack);
@@ -1689,428 +1693,439 @@ void real6ToTransform(stack *Stack)
real xx=vm::pop<real>(Stack);
real y=vm::pop<real>(Stack);
real x=vm::pop<real>(Stack);
-#line 1137 "runtime.in"
+#line 1141 "runtime.in"
{Stack->push<transform>(transform(x,y,xx,xy,yx,yy)); return;}
}
-#line 1141 "runtime.in"
+#line 1145 "runtime.in"
// transform shift(transform t);
void gen_runtime133(stack *Stack)
{
transform t=vm::pop<transform>(Stack);
-#line 1142 "runtime.in"
+#line 1146 "runtime.in"
{Stack->push<transform>(transform(t.getx(),t.gety(),0,0,0,0)); return;}
}
-#line 1146 "runtime.in"
+#line 1150 "runtime.in"
// transform shiftless(transform t);
void gen_runtime134(stack *Stack)
{
transform t=vm::pop<transform>(Stack);
-#line 1147 "runtime.in"
+#line 1151 "runtime.in"
{Stack->push<transform>(transform(0,0,t.getxx(),t.getxy(),t.getyx(),t.getyy())); return;}
}
-#line 1151 "runtime.in"
+#line 1155 "runtime.in"
// transform identity();
void transformIdentity(stack *Stack)
{
-#line 1152 "runtime.in"
+#line 1156 "runtime.in"
{Stack->push<transform>(identity); return;}
}
-#line 1156 "runtime.in"
+#line 1160 "runtime.in"
// transform inverse(transform t);
void gen_runtime136(stack *Stack)
{
transform t=vm::pop<transform>(Stack);
-#line 1157 "runtime.in"
+#line 1161 "runtime.in"
{Stack->push<transform>(inverse(t)); return;}
}
-#line 1161 "runtime.in"
+#line 1165 "runtime.in"
// transform shift(pair z);
void gen_runtime137(stack *Stack)
{
pair z=vm::pop<pair>(Stack);
-#line 1162 "runtime.in"
+#line 1166 "runtime.in"
{Stack->push<transform>(shift(z)); return;}
}
-#line 1166 "runtime.in"
+#line 1170 "runtime.in"
// transform shift(real x, real y);
void gen_runtime138(stack *Stack)
{
real y=vm::pop<real>(Stack);
real x=vm::pop<real>(Stack);
-#line 1167 "runtime.in"
+#line 1171 "runtime.in"
{Stack->push<transform>(shift(pair(x,y))); return;}
}
-#line 1171 "runtime.in"
+#line 1175 "runtime.in"
// transform xscale(real x);
void gen_runtime139(stack *Stack)
{
real x=vm::pop<real>(Stack);
-#line 1172 "runtime.in"
+#line 1176 "runtime.in"
{Stack->push<transform>(xscale(x)); return;}
}
-#line 1176 "runtime.in"
+#line 1180 "runtime.in"
// transform yscale(real y);
void gen_runtime140(stack *Stack)
{
real y=vm::pop<real>(Stack);
-#line 1177 "runtime.in"
+#line 1181 "runtime.in"
{Stack->push<transform>(yscale(y)); return;}
}
-#line 1181 "runtime.in"
+#line 1185 "runtime.in"
// transform scale(real x);
void gen_runtime141(stack *Stack)
{
real x=vm::pop<real>(Stack);
-#line 1182 "runtime.in"
+#line 1186 "runtime.in"
{Stack->push<transform>(scale(x)); return;}
}
-#line 1186 "runtime.in"
+#line 1190 "runtime.in"
// transform scale(real x, real y);
void gen_runtime142(stack *Stack)
{
real y=vm::pop<real>(Stack);
real x=vm::pop<real>(Stack);
-#line 1187 "runtime.in"
+#line 1191 "runtime.in"
{Stack->push<transform>(scale(x,y)); return;}
}
-#line 1191 "runtime.in"
+#line 1195 "runtime.in"
// transform slant(real s);
void gen_runtime143(stack *Stack)
{
real s=vm::pop<real>(Stack);
-#line 1192 "runtime.in"
+#line 1196 "runtime.in"
{Stack->push<transform>(slant(s)); return;}
}
-#line 1196 "runtime.in"
+#line 1200 "runtime.in"
// transform rotate(real angle, pair z=0);
void gen_runtime144(stack *Stack)
{
pair z=vm::pop<pair>(Stack,0);
real angle=vm::pop<real>(Stack);
-#line 1197 "runtime.in"
+#line 1201 "runtime.in"
{Stack->push<transform>(rotatearound(z,radians(angle))); return;}
}
-#line 1201 "runtime.in"
+#line 1205 "runtime.in"
// transform reflect(pair a, pair b);
void gen_runtime145(stack *Stack)
{
pair b=vm::pop<pair>(Stack);
pair a=vm::pop<pair>(Stack);
-#line 1202 "runtime.in"
+#line 1206 "runtime.in"
{Stack->push<transform>(reflectabout(a,b)); return;}
}
+#line 1210 "runtime.in"
+// bool isometry(transform t);
+void gen_runtime146(stack *Stack)
+{
+ transform t=vm::pop<transform>(Stack);
+#line 1211 "runtime.in"
+ {Stack->push<bool>(t.isIsometry()); return;}
+}
+
} // namespace run
namespace trans {
void gen_runtime_venv(venv &ve)
{
-#line 221 "runtime.in"
+#line 223 "runtime.in"
REGISTER_BLTIN(run::IntZero,"IntZero");
-#line 229 "runtime.in"
+#line 231 "runtime.in"
REGISTER_BLTIN(run::realZero,"realZero");
-#line 234 "runtime.in"
+#line 236 "runtime.in"
REGISTER_BLTIN(run::boolFalse,"boolFalse");
-#line 239 "runtime.in"
+#line 241 "runtime.in"
addFunc(ve, run::gen_runtime3, primBoolean(), SYM(isnan), formal(primReal(), SYM(x), false, false));
-#line 244 "runtime.in"
+#line 246 "runtime.in"
REGISTER_BLTIN(run::pushNullArray,"pushNullArray");
-#line 249 "runtime.in"
+#line 251 "runtime.in"
REGISTER_BLTIN(run::pushNullRecord,"pushNullRecord");
-#line 254 "runtime.in"
+#line 256 "runtime.in"
REGISTER_BLTIN(run::pushNullFunction,"pushNullFunction");
-#line 259 "runtime.in"
+#line 261 "runtime.in"
REGISTER_BLTIN(run::pushDefault,"pushDefault");
-#line 269 "runtime.in"
+#line 271 "runtime.in"
REGISTER_BLTIN(run::isDefault,"isDefault");
-#line 276 "runtime.in"
+#line 278 "runtime.in"
REGISTER_BLTIN(run::pairToGuide,"pairToGuide");
-#line 284 "runtime.in"
+#line 286 "runtime.in"
REGISTER_BLTIN(run::pathToGuide,"pathToGuide");
-#line 289 "runtime.in"
+#line 291 "runtime.in"
REGISTER_BLTIN(run::guideToPath,"guideToPath");
-#line 294 "runtime.in"
+#line 296 "runtime.in"
REGISTER_BLTIN(run::newPen,"newPen");
-#line 302 "runtime.in"
+#line 304 "runtime.in"
addFunc(ve, run::gen_runtime13, primBoolean(), SYM_EQ, formal(primPen(), SYM(a), false, false), formal(primPen(), SYM(b), false, false));
-#line 307 "runtime.in"
+#line 309 "runtime.in"
addFunc(ve, run::gen_runtime14, primBoolean(), SYM_NEQ, formal(primPen(), SYM(a), false, false), formal(primPen(), SYM(b), false, false));
-#line 312 "runtime.in"
+#line 314 "runtime.in"
addFunc(ve, run::gen_runtime15, primPen(), SYM_PLUS, formal(primPen(), SYM(a), false, false), formal(primPen(), SYM(b), false, false));
-#line 317 "runtime.in"
+#line 319 "runtime.in"
addFunc(ve, run::gen_runtime16, primPen(), SYM_TIMES, formal(primReal(), SYM(a), false, false), formal(primPen(), SYM(b), false, false));
-#line 322 "runtime.in"
+#line 324 "runtime.in"
addFunc(ve, run::gen_runtime17, primPen(), SYM_TIMES, formal(primPen(), SYM(a), false, false), formal(primReal(), SYM(b), false, false));
-#line 327 "runtime.in"
+#line 329 "runtime.in"
addFunc(ve, run::gen_runtime18, primPair(), SYM(max), formal(primPen(), SYM(p), false, false));
-#line 332 "runtime.in"
+#line 334 "runtime.in"
addFunc(ve, run::gen_runtime19, primPair(), SYM(min), formal(primPen(), SYM(p), false, false));
-#line 337 "runtime.in"
+#line 339 "runtime.in"
addFunc(ve, run::gen_runtime20, primVoid(), SYM(resetdefaultpen));
-#line 343 "runtime.in"
+#line 345 "runtime.in"
addFunc(ve, run::gen_runtime21, primVoid(), SYM(defaultpen), formal(primPen(), SYM(p), false, false));
-#line 348 "runtime.in"
+#line 350 "runtime.in"
addFunc(ve, run::gen_runtime22, primPen(), SYM(defaultpen));
-#line 353 "runtime.in"
+#line 355 "runtime.in"
addFunc(ve, run::gen_runtime23, primBoolean(), SYM(invisible), formal(primPen(), SYM(p), false, false));
-#line 358 "runtime.in"
+#line 360 "runtime.in"
addFunc(ve, run::gen_runtime24, primPen(), SYM(invisible));
-#line 363 "runtime.in"
+#line 365 "runtime.in"
addFunc(ve, run::gen_runtime25, primPen(), SYM(gray), formal(primPen(), SYM(p), false, false));
-#line 369 "runtime.in"
+#line 371 "runtime.in"
addFunc(ve, run::gen_runtime26, primPen(), SYM(rgb), formal(primPen(), SYM(p), false, false));
-#line 375 "runtime.in"
+#line 377 "runtime.in"
addFunc(ve, run::gen_runtime27, primPen(), SYM(cmyk), formal(primPen(), SYM(p), false, false));
-#line 381 "runtime.in"
+#line 383 "runtime.in"
addFunc(ve, run::gen_runtime28, primPen(), SYM(interp), formal(primPen(), SYM(a), false, false), formal(primPen(), SYM(b), false, false), formal(primReal(), SYM(t), false, false));
-#line 386 "runtime.in"
+#line 388 "runtime.in"
addFunc(ve, run::gen_runtime29, primPen(), SYM(rgb), formal(primReal(), SYM(r), false, false), formal(primReal(), SYM(g), false, false), formal(primReal(), SYM(b), false, false));
-#line 391 "runtime.in"
+#line 393 "runtime.in"
addFunc(ve, run::gen_runtime30, primPen(), SYM(cmyk), formal(primReal(), SYM(c), false, false), formal(primReal(), SYM(m), false, false), formal(primReal(), SYM(y), false, false), formal(primReal(), SYM(k), false, false));
-#line 396 "runtime.in"
+#line 398 "runtime.in"
addFunc(ve, run::gen_runtime31, primPen(), SYM(gray), formal(primReal(), SYM(gray), false, false));
-#line 401 "runtime.in"
+#line 403 "runtime.in"
addFunc(ve, run::gen_runtime32, realArray(), SYM(colors), formal(primPen(), SYM(p), false, false));
-#line 429 "runtime.in"
- addFunc(ve, run::gen_runtime33, primString() , SYM(hex), formal(primPen(), SYM(p), false, false));
-#line 434 "runtime.in"
+#line 431 "runtime.in"
+ addFunc(ve, run::gen_runtime33, primString(), SYM(hex), formal(primPen(), SYM(p), false, false));
+#line 436 "runtime.in"
addFunc(ve, run::gen_runtime34, primInt(), SYM(byte), formal(primReal(), SYM(x), false, false));
-#line 439 "runtime.in"
- addFunc(ve, run::gen_runtime35, primString() , SYM(colorspace), formal(primPen(), SYM(p), false, false));
-#line 446 "runtime.in"
+#line 441 "runtime.in"
+ addFunc(ve, run::gen_runtime35, primString(), SYM(colorspace), formal(primPen(), SYM(p), false, false));
+#line 448 "runtime.in"
addFunc(ve, run::gen_runtime36, primPen(), SYM(pattern), formal(primString(), SYM(s), false, false));
-#line 451 "runtime.in"
- addFunc(ve, run::gen_runtime37, primString() , SYM(pattern), formal(primPen(), SYM(p), false, false));
-#line 456 "runtime.in"
+#line 453 "runtime.in"
+ addFunc(ve, run::gen_runtime37, primString(), SYM(pattern), formal(primPen(), SYM(p), false, false));
+#line 458 "runtime.in"
addFunc(ve, run::gen_runtime38, primPen(), SYM(fillrule), formal(primInt(), SYM(n), false, false));
-#line 461 "runtime.in"
+#line 463 "runtime.in"
addFunc(ve, run::gen_runtime39, primInt(), SYM(fillrule), formal(primPen(), SYM(p), false, false));
-#line 466 "runtime.in"
- addFunc(ve, run::gen_runtime40, primPen(), SYM(opacity), formal(primReal(), SYM(opacity), true, false), formal(primString() , SYM(blend), true, false));
-#line 476 "runtime.in"
+#line 468 "runtime.in"
+ addFunc(ve, run::gen_runtime40, primPen(), SYM(opacity), formal(primReal(), SYM(opacity), true, false), formal(primString(), SYM(blend), true, false));
+#line 478 "runtime.in"
addFunc(ve, run::gen_runtime41, primReal(), SYM(opacity), formal(primPen(), SYM(p), false, false));
-#line 481 "runtime.in"
- addFunc(ve, run::gen_runtime42, primString() , SYM(blend), formal(primPen(), SYM(p), false, false));
-#line 486 "runtime.in"
+#line 483 "runtime.in"
+ addFunc(ve, run::gen_runtime42, primString(), SYM(blend), formal(primPen(), SYM(p), false, false));
+#line 488 "runtime.in"
addFunc(ve, run::gen_runtime43, primPen(), SYM(linetype), formal(realArray(), SYM(pattern), false, false), formal(primReal(), SYM(offset), true, false), formal(primBoolean(), SYM(scale), true, false), formal(primBoolean(), SYM(adjust), true, false));
-#line 497 "runtime.in"
+#line 499 "runtime.in"
addFunc(ve, run::gen_runtime44, realArray(), SYM(linetype), formal(primPen(), SYM(p), true, false));
-#line 503 "runtime.in"
+#line 505 "runtime.in"
addFunc(ve, run::gen_runtime45, primReal(), SYM(offset), formal(primPen(), SYM(p), false, false));
-#line 508 "runtime.in"
+#line 510 "runtime.in"
addFunc(ve, run::gen_runtime46, primBoolean(), SYM(scale), formal(primPen(), SYM(p), false, false));
-#line 513 "runtime.in"
+#line 515 "runtime.in"
addFunc(ve, run::gen_runtime47, primBoolean(), SYM(adjust), formal(primPen(), SYM(p), false, false));
-#line 518 "runtime.in"
+#line 520 "runtime.in"
addFunc(ve, run::gen_runtime48, primPen(), SYM(adjust), formal(primPen(), SYM(p), false, false), formal(primReal(), SYM(arclength), false, false), formal(primBoolean(), SYM(cyclic), false, false));
-#line 523 "runtime.in"
+#line 525 "runtime.in"
addFunc(ve, run::gen_runtime49, primPen(), SYM(linecap), formal(primInt(), SYM(n), false, false));
-#line 528 "runtime.in"
+#line 530 "runtime.in"
addFunc(ve, run::gen_runtime50, primInt(), SYM(linecap), formal(primPen(), SYM(p), true, false));
-#line 533 "runtime.in"
+#line 535 "runtime.in"
addFunc(ve, run::gen_runtime51, primPen(), SYM(linejoin), formal(primInt(), SYM(n), false, false));
-#line 538 "runtime.in"
+#line 540 "runtime.in"
addFunc(ve, run::gen_runtime52, primInt(), SYM(linejoin), formal(primPen(), SYM(p), true, false));
-#line 543 "runtime.in"
+#line 545 "runtime.in"
addFunc(ve, run::gen_runtime53, primPen(), SYM(miterlimit), formal(primReal(), SYM(x), false, false));
-#line 548 "runtime.in"
+#line 550 "runtime.in"
addFunc(ve, run::gen_runtime54, primReal(), SYM(miterlimit), formal(primPen(), SYM(p), true, false));
-#line 553 "runtime.in"
+#line 555 "runtime.in"
addFunc(ve, run::gen_runtime55, primPen(), SYM(linewidth), formal(primReal(), SYM(x), false, false));
-#line 558 "runtime.in"
+#line 560 "runtime.in"
addFunc(ve, run::gen_runtime56, primReal(), SYM(linewidth), formal(primPen(), SYM(p), true, false));
-#line 563 "runtime.in"
+#line 565 "runtime.in"
addFunc(ve, run::gen_runtime57, primPen(), SYM(fontcommand), formal(primString(), SYM(s), false, false));
-#line 568 "runtime.in"
- addFunc(ve, run::gen_runtime58, primString() , SYM(font), formal(primPen(), SYM(p), true, false));
-#line 573 "runtime.in"
+#line 570 "runtime.in"
+ addFunc(ve, run::gen_runtime58, primString(), SYM(font), formal(primPen(), SYM(p), true, false));
+#line 575 "runtime.in"
addFunc(ve, run::gen_runtime59, primPen(), SYM(fontsize), formal(primReal(), SYM(size), false, false), formal(primReal(), SYM(lineskip), false, false));
-#line 579 "runtime.in"
+#line 581 "runtime.in"
addFunc(ve, run::gen_runtime60, primReal(), SYM(fontsize), formal(primPen(), SYM(p), true, false));
-#line 584 "runtime.in"
+#line 586 "runtime.in"
addFunc(ve, run::gen_runtime61, primReal(), SYM(lineskip), formal(primPen(), SYM(p), true, false));
-#line 589 "runtime.in"
+#line 591 "runtime.in"
addFunc(ve, run::gen_runtime62, primPen(), SYM(overwrite), formal(primInt(), SYM(n), false, false));
-#line 595 "runtime.in"
+#line 597 "runtime.in"
addFunc(ve, run::gen_runtime63, primInt(), SYM(overwrite), formal(primPen(), SYM(p), true, false));
-#line 600 "runtime.in"
+#line 602 "runtime.in"
addFunc(ve, run::gen_runtime64, primPen(), SYM(basealign), formal(primInt(), SYM(n), false, false));
-#line 605 "runtime.in"
+#line 607 "runtime.in"
addFunc(ve, run::gen_runtime65, primInt(), SYM(basealign), formal(primPen(), SYM(p), true, false));
-#line 610 "runtime.in"
+#line 612 "runtime.in"
addFunc(ve, run::gen_runtime66, primTransform(), SYM(transform), formal(primPen(), SYM(p), false, false));
-#line 615 "runtime.in"
+#line 617 "runtime.in"
addFunc(ve, run::gen_runtime67, primPath(), SYM(nib), formal(primPen(), SYM(p), false, false));
-#line 620 "runtime.in"
+#line 622 "runtime.in"
addFunc(ve, run::gen_runtime68, primPen(), SYM(makepen), formal(primPath(), SYM(p), false, false));
-#line 625 "runtime.in"
+#line 627 "runtime.in"
addFunc(ve, run::gen_runtime69, primPen(), SYM(colorless), formal(primPen(), SYM(p), false, false));
-#line 631 "runtime.in"
+#line 633 "runtime.in"
addFunc(ve, run::gen_runtime70, primBoolean(), SYM(interactive));
-#line 638 "runtime.in"
+#line 640 "runtime.in"
addFunc(ve, run::gen_runtime71, primBoolean(), SYM(uptodate));
-#line 643 "runtime.in"
+#line 645 "runtime.in"
addFunc(ve, run::gen_runtime72, primInt(), SYM(system), formal(stringArray(), SYM(s), false, false));
-#line 657 "runtime.in"
+#line 659 "runtime.in"
addFunc(ve, run::gen_runtime73, primBoolean(), SYM(view));
-#line 662 "runtime.in"
- addFunc(ve, run::gen_runtime74, primString() , SYM(asydir));
-#line 667 "runtime.in"
- addFunc(ve, run::gen_runtime75, primString() , SYM(locale), formal(primString() , SYM(s), true, false));
-#line 673 "runtime.in"
- addFunc(ve, run::gen_runtime76, primVoid(), SYM(abort), formal(primString() , SYM(s), true, false));
-#line 679 "runtime.in"
+#line 664 "runtime.in"
+ addFunc(ve, run::gen_runtime74, primString(), SYM(asydir));
+#line 669 "runtime.in"
+ addFunc(ve, run::gen_runtime75, primString(), SYM(locale), formal(primString(), SYM(s), true, false));
+#line 675 "runtime.in"
+ addFunc(ve, run::gen_runtime76, primVoid(), SYM(abort), formal(primString(), SYM(s), true, false));
+#line 681 "runtime.in"
addFunc(ve, run::gen_runtime77, primVoid(), SYM(exit));
-#line 684 "runtime.in"
- addFunc(ve, run::gen_runtime78, primVoid(), SYM(assert), formal(primBoolean(), SYM(b), false, false), formal(primString() , SYM(s), true, false));
-#line 695 "runtime.in"
+#line 686 "runtime.in"
+ addFunc(ve, run::gen_runtime78, primVoid(), SYM(assert), formal(primBoolean(), SYM(b), false, false), formal(primString(), SYM(s), true, false));
+#line 697 "runtime.in"
addFunc(ve, run::gen_runtime79, primVoid(), SYM(sleep), formal(primInt(), SYM(seconds), false, false));
-#line 701 "runtime.in"
+#line 703 "runtime.in"
addFunc(ve, run::gen_runtime80, primVoid(), SYM(usleep), formal(primInt(), SYM(microseconds), false, false));
-#line 707 "runtime.in"
+#line 709 "runtime.in"
addFunc(ve, run::gen_runtime81, primVoid(), SYM(_eval), formal(primString(), SYM(s), false, false), formal(primBoolean(), SYM(embedded), false, false), formal(primBoolean(), SYM(interactivewrite), true, false));
-#line 720 "runtime.in"
+#line 722 "runtime.in"
addFunc(ve, run::gen_runtime82, primVoid(), SYM(_eval), formal(primCode(), SYM(s), false, false), formal(primBoolean(), SYM(embedded), false, false));
-#line 736 "runtime.in"
- addFunc(ve, run::gen_runtime83, primString() , SYM(xasyKEY));
-#line 743 "runtime.in"
+#line 738 "runtime.in"
+ addFunc(ve, run::gen_runtime83, primString(), SYM(xasyKEY));
+#line 745 "runtime.in"
addFunc(ve, run::gen_runtime84, primVoid(), SYM(xasyKEY), formal(primString(), SYM(s), false, false));
-#line 747 "runtime.in"
- addFunc(ve, run::gen_runtime85, primString() , SYM(toplocation));
-#line 751 "runtime.in"
- addFunc(ve, run::gen_runtime86, primString() , SYM(location));
-#line 757 "runtime.in"
+#line 749 "runtime.in"
+ addFunc(ve, run::gen_runtime85, primString(), SYM(toplocation));
+#line 753 "runtime.in"
+ addFunc(ve, run::gen_runtime86, primString(), SYM(location));
+#line 759 "runtime.in"
REGISTER_BLTIN(run::loadModule,"loadModule");
-#line 763 "runtime.in"
- addFunc(ve, run::gen_runtime88, primString() , SYM(cd), formal(primString() , SYM(s), true, false));
-#line 773 "runtime.in"
+#line 765 "runtime.in"
+ addFunc(ve, run::gen_runtime88, primString(), SYM(cd), formal(primString(), SYM(s), true, false));
+#line 776 "runtime.in"
addFunc(ve, run::gen_runtime89, primVoid(), SYM(list), formal(primString(), SYM(s), false, false), formal(primBoolean(), SYM(imports), true, false));
-#line 782 "runtime.in"
+#line 785 "runtime.in"
REGISTER_BLTIN(run::nullGuide,"nullGuide");
-#line 790 "runtime.in"
+#line 793 "runtime.in"
REGISTER_BLTIN(run::dotsGuide,"dotsGuide");
-#line 800 "runtime.in"
+#line 803 "runtime.in"
REGISTER_BLTIN(run::dashesGuide,"dashesGuide");
-#line 827 "runtime.in"
+#line 830 "runtime.in"
REGISTER_BLTIN(run::newCycleToken,"newCycleToken");
-#line 832 "runtime.in"
+#line 835 "runtime.in"
addFunc(ve, run::gen_runtime94, primGuide(), symbol::trans("operator cast"), formal(primCycleToken(), SYM(tok), false, false));
-#line 839 "runtime.in"
+#line 842 "runtime.in"
addFunc(ve, run::gen_runtime95, primGuide(), symbol::trans("operator spec"), formal(primPair(), SYM(z), false, false), formal(primInt(), SYM(p), false, false));
-#line 847 "runtime.in"
+#line 850 "runtime.in"
addFunc(ve, run::gen_runtime96, primCurlSpecifier(), SYM_CURL, formal(primReal(), SYM(gamma), false, false), formal(primInt(), SYM(p), false, false));
-#line 853 "runtime.in"
+#line 856 "runtime.in"
REGISTER_BLTIN(run::curlSpecifierValuePart,"curlSpecifierValuePart");
-#line 858 "runtime.in"
+#line 861 "runtime.in"
REGISTER_BLTIN(run::curlSpecifierSidePart,"curlSpecifierSidePart");
-#line 863 "runtime.in"
+#line 866 "runtime.in"
addFunc(ve, run::gen_runtime99, primGuide(), symbol::trans("operator cast"), formal(primCurlSpecifier(), SYM(spec), false, false));
-#line 868 "runtime.in"
+#line 871 "runtime.in"
addFunc(ve, run::gen_runtime100, primTensionSpecifier(), SYM_TENSION, formal(primReal(), SYM(tout), false, false), formal(primReal(), SYM(tin), false, false), formal(primBoolean(), SYM(atleast), false, false));
-#line 873 "runtime.in"
+#line 876 "runtime.in"
REGISTER_BLTIN(run::tensionSpecifierOutPart,"tensionSpecifierOutPart");
-#line 878 "runtime.in"
+#line 881 "runtime.in"
REGISTER_BLTIN(run::tensionSpecifierInPart,"tensionSpecifierInPart");
-#line 883 "runtime.in"
+#line 886 "runtime.in"
REGISTER_BLTIN(run::tensionSpecifierAtleastPart,"tensionSpecifierAtleastPart");
-#line 888 "runtime.in"
+#line 891 "runtime.in"
addFunc(ve, run::gen_runtime104, primGuide(), symbol::trans("operator cast"), formal(primTensionSpecifier(), SYM(t), false, false));
-#line 893 "runtime.in"
+#line 896 "runtime.in"
addFunc(ve, run::gen_runtime105, primGuide(), SYM_CONTROLS, formal(primPair(), SYM(zout), false, false), formal(primPair(), SYM(zin), false, false));
-#line 898 "runtime.in"
+#line 901 "runtime.in"
addFunc(ve, run::gen_runtime106, primInt(), SYM(size), formal(primGuide(), SYM(g), false, false));
-#line 905 "runtime.in"
+#line 908 "runtime.in"
addFunc(ve, run::gen_runtime107, primInt(), SYM(length), formal(primGuide(), SYM(g), false, false));
-#line 912 "runtime.in"
+#line 915 "runtime.in"
addFunc(ve, run::gen_runtime108, primBoolean(), SYM(cyclic), formal(primGuide(), SYM(g), false, false));
-#line 919 "runtime.in"
+#line 922 "runtime.in"
addFunc(ve, run::gen_runtime109, primPair(), SYM(point), formal(primGuide(), SYM(g), false, false), formal(primInt(), SYM(t), false, false));
-#line 926 "runtime.in"
+#line 929 "runtime.in"
addFunc(ve, run::gen_runtime110, pairArray(), SYM(dirSpecifier), formal(primGuide(), SYM(g), false, false), formal(primInt(), SYM(t), false, false));
-#line 938 "runtime.in"
+#line 941 "runtime.in"
addFunc(ve, run::gen_runtime111, pairArray(), SYM(controlSpecifier), formal(primGuide(), SYM(g), false, false), formal(primInt(), SYM(t), false, false));
-#line 955 "runtime.in"
+#line 958 "runtime.in"
addFunc(ve, run::gen_runtime112, primTensionSpecifier(), SYM(tensionSpecifier), formal(primGuide(), SYM(g), false, false), formal(primInt(), SYM(t), false, false));
-#line 965 "runtime.in"
+#line 968 "runtime.in"
addFunc(ve, run::gen_runtime113, realArray(), SYM(curlSpecifier), formal(primGuide(), SYM(g), false, false), formal(primInt(), SYM(t), false, false));
-#line 979 "runtime.in"
+#line 982 "runtime.in"
addFunc(ve, run::gen_runtime114, primGuide(), SYM(reverse), formal(primGuide(), SYM(g), false, false));
-#line 1032 "runtime.in"
+#line 1035 "runtime.in"
addFunc(ve, run::gen_runtime115, realArray(), SYM(_cputime));
-#line 1046 "runtime.in"
+#line 1050 "runtime.in"
addFunc(ve, run::gen_runtime116, primBoolean(), SYM_EQ, formal(primTransform(), SYM(a), false, false), formal(primTransform(), SYM(b), false, false));
-#line 1054 "runtime.in"
+#line 1058 "runtime.in"
addFunc(ve, run::gen_runtime117, primBoolean(), SYM_NEQ, formal(primTransform(), SYM(a), false, false), formal(primTransform(), SYM(b), false, false));
-#line 1059 "runtime.in"
+#line 1063 "runtime.in"
addFunc(ve, run::gen_runtime118, primTransform(), SYM_PLUS, formal(primTransform(), SYM(a), false, false), formal(primTransform(), SYM(b), false, false));
-#line 1064 "runtime.in"
+#line 1068 "runtime.in"
addFunc(ve, run::gen_runtime119, primTransform(), SYM_TIMES, formal(primTransform(), SYM(a), false, false), formal(primTransform(), SYM(b), false, false));
-#line 1069 "runtime.in"
+#line 1073 "runtime.in"
addFunc(ve, run::gen_runtime120, primPair(), SYM_TIMES, formal(primTransform(), SYM(t), false, false), formal(primPair(), SYM(z), false, false));
-#line 1074 "runtime.in"
+#line 1078 "runtime.in"
addFunc(ve, run::gen_runtime121, primPath(), SYM_TIMES, formal(primTransform(), SYM(t), false, false), formal(primPath(), SYM(g), false, false));
-#line 1079 "runtime.in"
+#line 1083 "runtime.in"
addFunc(ve, run::gen_runtime122, primPen(), SYM_TIMES, formal(primTransform(), SYM(t), false, false), formal(primPen(), SYM(p), false, false));
-#line 1084 "runtime.in"
+#line 1088 "runtime.in"
addFunc(ve, run::gen_runtime123, primPicture(), SYM_TIMES, formal(primTransform(), SYM(t), false, false), formal(primPicture(), SYM(f), false, false));
-#line 1089 "runtime.in"
+#line 1093 "runtime.in"
addFunc(ve, run::gen_runtime124, primPicture(), SYM_TIMES, formal(realArray2(), SYM(t), false, false), formal(primPicture(), SYM(f), false, false));
-#line 1094 "runtime.in"
+#line 1098 "runtime.in"
addFunc(ve, run::gen_runtime125, primTransform(), SYM_CARET, formal(primTransform(), SYM(t), false, false), formal(primInt(), SYM(n), false, false));
-#line 1105 "runtime.in"
+#line 1109 "runtime.in"
REGISTER_BLTIN(run::transformXPart,"transformXPart");
-#line 1110 "runtime.in"
+#line 1114 "runtime.in"
REGISTER_BLTIN(run::transformYPart,"transformYPart");
-#line 1115 "runtime.in"
+#line 1119 "runtime.in"
REGISTER_BLTIN(run::transformXXPart,"transformXXPart");
-#line 1120 "runtime.in"
+#line 1124 "runtime.in"
REGISTER_BLTIN(run::transformXYPart,"transformXYPart");
-#line 1125 "runtime.in"
+#line 1129 "runtime.in"
REGISTER_BLTIN(run::transformYXPart,"transformYXPart");
-#line 1130 "runtime.in"
+#line 1134 "runtime.in"
REGISTER_BLTIN(run::transformYYPart,"transformYYPart");
-#line 1135 "runtime.in"
+#line 1139 "runtime.in"
REGISTER_BLTIN(run::real6ToTransform,"real6ToTransform");
-#line 1141 "runtime.in"
+#line 1145 "runtime.in"
addFunc(ve, run::gen_runtime133, primTransform(), SYM(shift), formal(primTransform(), SYM(t), false, false));
-#line 1146 "runtime.in"
+#line 1150 "runtime.in"
addFunc(ve, run::gen_runtime134, primTransform(), SYM(shiftless), formal(primTransform(), SYM(t), false, false));
-#line 1151 "runtime.in"
+#line 1155 "runtime.in"
addFunc(ve, run::transformIdentity, primTransform(), SYM(identity));
-#line 1156 "runtime.in"
+#line 1160 "runtime.in"
addFunc(ve, run::gen_runtime136, primTransform(), SYM(inverse), formal(primTransform(), SYM(t), false, false));
-#line 1161 "runtime.in"
+#line 1165 "runtime.in"
addFunc(ve, run::gen_runtime137, primTransform(), SYM(shift), formal(primPair(), SYM(z), false, false));
-#line 1166 "runtime.in"
+#line 1170 "runtime.in"
addFunc(ve, run::gen_runtime138, primTransform(), SYM(shift), formal(primReal(), SYM(x), false, false), formal(primReal(), SYM(y), false, false));
-#line 1171 "runtime.in"
+#line 1175 "runtime.in"
addFunc(ve, run::gen_runtime139, primTransform(), SYM(xscale), formal(primReal(), SYM(x), false, false));
-#line 1176 "runtime.in"
+#line 1180 "runtime.in"
addFunc(ve, run::gen_runtime140, primTransform(), SYM(yscale), formal(primReal(), SYM(y), false, false));
-#line 1181 "runtime.in"
+#line 1185 "runtime.in"
addFunc(ve, run::gen_runtime141, primTransform(), SYM(scale), formal(primReal(), SYM(x), false, false));
-#line 1186 "runtime.in"
+#line 1190 "runtime.in"
addFunc(ve, run::gen_runtime142, primTransform(), SYM(scale), formal(primReal(), SYM(x), false, false), formal(primReal(), SYM(y), false, false));
-#line 1191 "runtime.in"
+#line 1195 "runtime.in"
addFunc(ve, run::gen_runtime143, primTransform(), SYM(slant), formal(primReal(), SYM(s), false, false));
-#line 1196 "runtime.in"
+#line 1200 "runtime.in"
addFunc(ve, run::gen_runtime144, primTransform(), SYM(rotate), formal(primReal(), SYM(angle), false, false), formal(primPair(), SYM(z), true, false));
-#line 1201 "runtime.in"
+#line 1205 "runtime.in"
addFunc(ve, run::gen_runtime145, primTransform(), SYM(reflect), formal(primPair(), SYM(a), false, false), formal(primPair(), SYM(b), false, false));
+#line 1210 "runtime.in"
+ addFunc(ve, run::gen_runtime146, primBoolean(), SYM(isometry), formal(primTransform(), SYM(t), false, false));
}
} // namespace trans
diff --git a/Build/source/utils/asymptote/runtime.in b/Build/source/utils/asymptote/runtime.in
index fc72a78cbed..27cde400748 100644
--- a/Build/source/utils/asymptote/runtime.in
+++ b/Build/source/utils/asymptote/runtime.in
@@ -40,12 +40,12 @@ pairarray* => pairArray()
pairarray2* => pairArray2()
triplearray* => tripleArray()
triplearray2* => tripleArray2()
-patharray* => pathArray()
-patharray2* => pathArray2()
-guidearray* => guideArray()
+patharray* => pathArray()
+patharray2* => pathArray2()
+guidearray* => guideArray()
transformarray* => transformArray()
-penarray* => penArray()
-penarray2* => penArray2()
+penarray* => penArray()
+penarray2* => penArray2()
stringarray* => stringArray()
stringarray2* => stringArray2()
@@ -55,7 +55,7 @@ stringarray2* => stringArray2()
#include <time.h>
#include <sys/times.h>
#include <locale.h>
-
+
#include "angle.h"
#include "pair.h"
#include "triple.h"
@@ -81,7 +81,8 @@ stringarray2* => stringArray2()
#include "lexical.h"
#include "process.h"
#include "arrayop.h"
-
+#include "seconds.h"
+
#if defined(USEGC) && defined(GC_DEBUG) && defined(GC_BACKTRACE)
extern "C" {
void *GC_generate_random_valid_address(void);
@@ -92,6 +93,7 @@ stringarray2* => stringArray2()
using namespace vm;
using namespace camp;
using namespace settings;
+using namespace utils;
#undef OUT
#undef IN
@@ -176,7 +178,7 @@ const item Default=item(default_t());
}
namespace run {
-
+
const char *arrayempty="cannot take min or max of empty array";
const char *noruntime="no runtime environment for embedded eval";
@@ -276,17 +278,17 @@ bool :isDefault(item i)
// Casts
-guide* :pairToGuide(pair z)
+guide* :pairToGuide(pair z)
{
return new pairguide(z);
}
-guide* :pathToGuide(path p)
+guide* :pathToGuide(path p)
{
return new pathguide(p);
}
-path :guideToPath(guide *g)
+path :guideToPath(guide *g)
{
return g->solve();
}
@@ -390,7 +392,7 @@ pen rgb(real r, real g, real b)
pen cmyk(real c, real m, real y, real k)
{
- return pen(c,m,y,k);
+ return pen(c,m,y,k);
}
pen gray(real gray)
@@ -399,25 +401,25 @@ pen gray(real gray)
}
realarray *colors(pen p)
-{
+{
size_t n=ColorComponents[p.colorspace()];
array *a=new array(n);
-
+
switch(n) {
case 0:
break;
- case 1:
- (*a)[0]=p.gray();
+ case 1:
+ (*a)[0]=p.gray();
break;
case 3:
- (*a)[0]=p.red();
- (*a)[1]=p.green();
- (*a)[2]=p.blue();
+ (*a)[0]=p.red();
+ (*a)[1]=p.green();
+ (*a)[2]=p.blue();
break;
case 4:
(*a)[0]=p.cyan();
- (*a)[1]=p.magenta();
- (*a)[2]=p.yellow();
+ (*a)[1]=p.magenta();
+ (*a)[2]=p.yellow();
(*a)[3]=p.black();
break;
default:
@@ -427,7 +429,7 @@ realarray *colors(pen p)
}
string hex(pen p)
-{
+{
return p.hex();
}
@@ -450,7 +452,7 @@ pen pattern(string *s)
string pattern(pen p)
{
- return p.fillpattern();
+ return p.fillpattern();
}
pen fillrule(Int n)
@@ -460,7 +462,7 @@ pen fillrule(Int n)
Int fillrule(pen p)
{
- return p.Fillrule();
+ return p.Fillrule();
}
pen opacity(real opacity=1.0, string blend=defaulttransparency)
@@ -488,10 +490,10 @@ pen linetype(realarray *pattern, real offset=0, bool scale=true,
{
size_t size=checkArray(pattern);
array *a=new array(size);
- for(size_t i=0; i < size; ++i)
+ for(size_t i=0; i < size; ++i)
(*a)[i]=::max(vm::read<double>(pattern,i),0.0);
- return pen(LineType(*a,offset,scale,adjust));
+ return pen(LineType(*a,offset,scale,adjust));
}
realarray *linetype(pen p=CURRENTPEN)
@@ -527,7 +529,7 @@ pen linecap(Int n)
Int linecap(pen p=CURRENTPEN)
{
- return p.cap();
+ return p.cap();
}
pen linejoin(Int n)
@@ -537,7 +539,7 @@ pen linejoin(Int n)
Int linejoin(pen p=CURRENTPEN)
{
- return p.join();
+ return p.join();
}
pen miterlimit(real x)
@@ -547,7 +549,7 @@ pen miterlimit(real x)
real miterlimit(pen p=CURRENTPEN)
{
- return p.miter();
+ return p.miter();
}
pen linewidth(real x)
@@ -557,7 +559,7 @@ pen linewidth(real x)
real linewidth(pen p=CURRENTPEN)
{
- return p.width();
+ return p.width();
}
pen fontcommand(string *s)
@@ -583,7 +585,7 @@ real fontsize(pen p=CURRENTPEN)
real lineskip(pen p=CURRENTPEN)
{
- return p.Lineskip();
+ return p.Lineskip();
}
pen overwrite(Int n)
@@ -594,7 +596,7 @@ pen overwrite(Int n)
Int overwrite(pen p=CURRENTPEN)
{
- return p.Overwrite();
+ return p.Overwrite();
}
pen basealign(Int n)
@@ -659,7 +661,7 @@ bool view()
return view();
}
-string asydir()
+string asydir()
{
return systemDir;
}
@@ -694,14 +696,14 @@ void assert(bool b, string s=emptystring)
void sleep(Int seconds)
{
- if(seconds <= 0) return;
+ if(seconds <= 0) return;
sleep(seconds);
}
void usleep(Int microseconds)
{
- if(microseconds <= 0) return;
- usleep((unsigned long) microseconds);
+ if(microseconds <= 0) return;
+ usleep((unsigned long) microseconds);
}
void _eval(string *s, bool embedded, bool interactiveWrite=false)
@@ -762,9 +764,10 @@ void :loadModule(string *index)
string cd(string s=emptystring)
{
+ if(!globalread()) readDisabled();
if(!s.empty() && !globalwrite()) {
- string outname=getSetting<string>("outname");
- string dir=stripDir(outname);
+ string outname=settings::outname();
+ string dir=stripFile(outname);
if(dir.empty()) Setting("outname")=getPath()+dirsep+outname;
}
return setPath(s.c_str());
@@ -997,7 +1000,7 @@ guide *reverse(guide *g)
v.push_back(new controlguide(curr.in->control(),next.out->control()));
} else {
pair d=curr.in->dir();
- if(d != zero)
+ if(d != zero)
v.push_back(new specguide(new dirSpec(-d),camp::OUT));
else {
real C=curr.in->curl();
@@ -1009,8 +1012,8 @@ guide *reverse(guide *g)
bool atleast=next.tout.atleast;
if(tout != 1.0 || tin != 1.0 || next.tout.atleast)
v.push_back(new tensionguide(tensionSpecifier(tout,tin,atleast)));
- d=next.out->dir();
- if(d != zero)
+ d=next.out->dir();
+ if(d != zero)
v.push_back(new specguide(new dirSpec(-d),camp::IN));
else {
real C=next.out->curl();
@@ -1024,7 +1027,7 @@ guide *reverse(guide *g)
v.push_back(new cycletokguide());
else
v.push_back(new pairguide(next.z));
-
+
return new multiguide(v);
}
@@ -1035,11 +1038,12 @@ realarray *_cputime()
struct tms buf;
::times(&buf);
- array *t=new array(4);
- (*t)[0] = ((real) buf.tms_utime)*ticktime;
- (*t)[1] = ((real) buf.tms_stime)*ticktime;
- (*t)[2] = ((real) buf.tms_cutime)*ticktime;
- (*t)[3] = ((real) buf.tms_cstime)*ticktime;
+ array *t=new array(5);
+ (*t)[0]=((real) buf.tms_utime)*ticktime;
+ (*t)[1]=((real) buf.tms_stime)*ticktime;
+ (*t)[2]=((real) buf.tms_cutime)*ticktime;
+ (*t)[3]=((real) buf.tms_cstime)*ticktime;
+ (*t)[4]=utils::totalseconds();
return t;
}
@@ -1202,4 +1206,8 @@ transform reflect(pair a, pair b)
{
return reflectabout(a,b);
}
-
+
+bool isometry(transform t)
+{
+ return t.isIsometry();
+}
diff --git a/Build/source/utils/asymptote/runtimebase.in b/Build/source/utils/asymptote/runtimebase.in
index 86237de351b..5f4cd4e458e 100644
--- a/Build/source/utils/asymptote/runtimebase.in
+++ b/Build/source/utils/asymptote/runtimebase.in
@@ -11,14 +11,14 @@
// Use Void f() instead of void f() to force an explicit Stack argument.
void => primVoid()
-Void => primVoid()
+Void => primVoid()
Int => primInt()
bool => primBoolean()
double => primReal()
real => primReal()
string* => primString()
-string => primString()
+string => primString()
#include "stack.h"
#include "types.h"
diff --git a/Build/source/utils/asymptote/runtriple.cc b/Build/source/utils/asymptote/runtriple.cc
index 3e0b71bdf79..eefd6beaae7 100644
--- a/Build/source/utils/asymptote/runtriple.cc
+++ b/Build/source/utils/asymptote/runtriple.cc
@@ -171,189 +171,198 @@ void gen_runtriple9(stack *Stack)
}
#line 70 "runtriple.in"
-// real polar(triple v, bool warn=true);
+// real abs2(triple v);
void gen_runtriple10(stack *Stack)
{
- bool warn=vm::pop<bool>(Stack,true);
triple v=vm::pop<triple>(Stack);
#line 71 "runtriple.in"
- {Stack->push<real>(v.polar(warn)); return;}
+ {Stack->push<real>(abs2(v)); return;}
}
#line 75 "runtriple.in"
-// real azimuth(triple v, bool warn=true);
+// real polar(triple v, bool warn=true);
void gen_runtriple11(stack *Stack)
{
bool warn=vm::pop<bool>(Stack,true);
triple v=vm::pop<triple>(Stack);
#line 76 "runtriple.in"
+ {Stack->push<real>(v.polar(warn)); return;}
+}
+
+#line 80 "runtriple.in"
+// real azimuth(triple v, bool warn=true);
+void gen_runtriple12(stack *Stack)
+{
+ bool warn=vm::pop<bool>(Stack,true);
+ triple v=vm::pop<triple>(Stack);
+#line 81 "runtriple.in"
if(!warn && v.getx() == 0.0 && v.gety() == 0.0) {Stack->push<real>(0.0); return;}
{Stack->push<real>(v.azimuth()); return;}
}
-#line 81 "runtriple.in"
+#line 86 "runtriple.in"
// real colatitude(triple v, bool warn=true);
-void gen_runtriple12(stack *Stack)
+void gen_runtriple13(stack *Stack)
{
bool warn=vm::pop<bool>(Stack,true);
triple v=vm::pop<triple>(Stack);
-#line 82 "runtriple.in"
+#line 87 "runtriple.in"
if(!warn && v.getx() == 0.0 && v.gety() == 0.0 && v.getz() == 0.0) {Stack->push<real>(0.0); return;}
{Stack->push<real>(degrees(v.polar())); return;}
}
-#line 87 "runtriple.in"
+#line 92 "runtriple.in"
// real latitude(triple v, bool warn=true);
-void gen_runtriple13(stack *Stack)
+void gen_runtriple14(stack *Stack)
{
bool warn=vm::pop<bool>(Stack,true);
triple v=vm::pop<triple>(Stack);
-#line 88 "runtriple.in"
+#line 93 "runtriple.in"
if(!warn && v.getx() == 0.0 && v.gety() == 0.0 && v.getz() == 0.0) {Stack->push<real>(0.0); return;}
{Stack->push<real>(90.0-degrees(v.polar())); return;}
}
// Return the longitude of v in [0,360).
-#line 94 "runtriple.in"
+#line 99 "runtriple.in"
// real longitude(triple v, bool warn=true);
-void gen_runtriple14(stack *Stack)
+void gen_runtriple15(stack *Stack)
{
bool warn=vm::pop<bool>(Stack,true);
triple v=vm::pop<triple>(Stack);
-#line 95 "runtriple.in"
+#line 100 "runtriple.in"
if(!warn && v.getx() == 0.0 && v.gety() == 0.0) {Stack->push<real>(0.0); return;}
{Stack->push<real>(principalBranch(degrees(v.azimuth()))); return;}
}
-#line 100 "runtriple.in"
+#line 105 "runtriple.in"
// triple unit(triple v);
-void gen_runtriple15(stack *Stack)
+void gen_runtriple16(stack *Stack)
{
triple v=vm::pop<triple>(Stack);
-#line 101 "runtriple.in"
+#line 106 "runtriple.in"
{Stack->push<triple>(unit(v)); return;}
}
-#line 105 "runtriple.in"
+#line 110 "runtriple.in"
// real dot(triple u, triple v);
-void gen_runtriple16(stack *Stack)
+void gen_runtriple17(stack *Stack)
{
triple v=vm::pop<triple>(Stack);
triple u=vm::pop<triple>(Stack);
-#line 106 "runtriple.in"
+#line 111 "runtriple.in"
{Stack->push<real>(dot(u,v)); return;}
}
-#line 110 "runtriple.in"
+#line 115 "runtriple.in"
// triple cross(triple u, triple v);
-void gen_runtriple17(stack *Stack)
+void gen_runtriple18(stack *Stack)
{
triple v=vm::pop<triple>(Stack);
triple u=vm::pop<triple>(Stack);
-#line 111 "runtriple.in"
+#line 116 "runtriple.in"
{Stack->push<triple>(cross(u,v)); return;}
}
-#line 115 "runtriple.in"
+#line 120 "runtriple.in"
// triple dir(explicit triple z);
-void gen_runtriple18(stack *Stack)
+void gen_runtriple19(stack *Stack)
{
triple z=vm::pop<triple>(Stack);
-#line 116 "runtriple.in"
+#line 121 "runtriple.in"
{Stack->push<triple>(unit(z)); return;}
}
-#line 120 "runtriple.in"
+#line 125 "runtriple.in"
// triple expi(real polar, real azimuth);
-void gen_runtriple19(stack *Stack)
+void gen_runtriple20(stack *Stack)
{
real azimuth=vm::pop<real>(Stack);
real polar=vm::pop<real>(Stack);
-#line 121 "runtriple.in"
+#line 126 "runtriple.in"
{Stack->push<triple>(expi(polar,azimuth)); return;}
}
-#line 125 "runtriple.in"
+#line 130 "runtriple.in"
// triple dir(real colatitude, real longitude);
-void gen_runtriple20(stack *Stack)
+void gen_runtriple21(stack *Stack)
{
real longitude=vm::pop<real>(Stack);
real colatitude=vm::pop<real>(Stack);
-#line 126 "runtriple.in"
+#line 131 "runtriple.in"
{Stack->push<triple>(expi(radians(colatitude),radians(longitude))); return;}
}
-#line 130 "runtriple.in"
+#line 135 "runtriple.in"
// triple realmult(triple u, triple v);
-void gen_runtriple21(stack *Stack)
+void gen_runtriple22(stack *Stack)
{
triple v=vm::pop<triple>(Stack);
triple u=vm::pop<triple>(Stack);
-#line 131 "runtriple.in"
+#line 136 "runtriple.in"
{Stack->push<triple>(triple (u.getx()*v.getx(),u.gety()*v.gety(),u.getz()*v.getz())); return;}
}
// Return the component of vector v perpendicular to a unit vector u.
-#line 136 "runtriple.in"
+#line 141 "runtriple.in"
// triple perp(triple v, triple u);
-void gen_runtriple22(stack *Stack)
+void gen_runtriple23(stack *Stack)
{
triple u=vm::pop<triple>(Stack);
triple v=vm::pop<triple>(Stack);
-#line 137 "runtriple.in"
+#line 142 "runtriple.in"
{Stack->push<triple>(perp(v,u)); return;}
}
-#line 141 "runtriple.in"
+#line 146 "runtriple.in"
// triple bezier(triple a, triple b, triple c, triple d, real t);
-void gen_runtriple23(stack *Stack)
+void gen_runtriple24(stack *Stack)
{
real t=vm::pop<real>(Stack);
triple d=vm::pop<triple>(Stack);
triple c=vm::pop<triple>(Stack);
triple b=vm::pop<triple>(Stack);
triple a=vm::pop<triple>(Stack);
-#line 142 "runtriple.in"
+#line 147 "runtriple.in"
real onemt=1-t;
real onemt2=onemt*onemt;
{Stack->push<triple>(onemt2*onemt*a+t*(3.0*(onemt2*b+t*onemt*c)+t*t*d)); return;}
}
-#line 148 "runtriple.in"
+#line 153 "runtriple.in"
// triple bezierP(triple a, triple b, triple c, triple d, real t);
-void gen_runtriple24(stack *Stack)
+void gen_runtriple25(stack *Stack)
{
real t=vm::pop<real>(Stack);
triple d=vm::pop<triple>(Stack);
triple c=vm::pop<triple>(Stack);
triple b=vm::pop<triple>(Stack);
triple a=vm::pop<triple>(Stack);
-#line 149 "runtriple.in"
+#line 154 "runtriple.in"
{Stack->push<triple>(3.0*(t*t*(d-a+3.0*(b-c))+t*(2.0*(a+c)-4.0*b)+b-a)); return;}
}
-#line 153 "runtriple.in"
+#line 158 "runtriple.in"
// triple bezierPP(triple a, triple b, triple c, triple d, real t);
-void gen_runtriple25(stack *Stack)
+void gen_runtriple26(stack *Stack)
{
real t=vm::pop<real>(Stack);
triple d=vm::pop<triple>(Stack);
triple c=vm::pop<triple>(Stack);
triple b=vm::pop<triple>(Stack);
triple a=vm::pop<triple>(Stack);
-#line 154 "runtriple.in"
+#line 159 "runtriple.in"
{Stack->push<triple>(6.0*(t*(d-a+3.0*(b-c))+a+c)-12.0*b); return;}
}
-#line 158 "runtriple.in"
+#line 163 "runtriple.in"
// triple bezierPPP(triple a, triple b, triple c, triple d);
-void gen_runtriple26(stack *Stack)
+void gen_runtriple27(stack *Stack)
{
triple d=vm::pop<triple>(Stack);
triple c=vm::pop<triple>(Stack);
triple b=vm::pop<triple>(Stack);
triple a=vm::pop<triple>(Stack);
-#line 159 "runtriple.in"
+#line 164 "runtriple.in"
{Stack->push<triple>(6.0*(d-a)+18.0*(b-c)); return;}
}
@@ -384,39 +393,41 @@ void gen_runtriple_venv(venv &ve)
#line 65 "runtriple.in"
addFunc(ve, run::gen_runtriple9, primReal(), SYM(abs), formal(primTriple(), SYM(v), false, false));
#line 70 "runtriple.in"
- addFunc(ve, run::gen_runtriple10, primReal(), SYM(polar), formal(primTriple(), SYM(v), false, false), formal(primBoolean(), SYM(warn), true, false));
+ addFunc(ve, run::gen_runtriple10, primReal(), SYM(abs2), formal(primTriple(), SYM(v), false, false));
#line 75 "runtriple.in"
- addFunc(ve, run::gen_runtriple11, primReal(), SYM(azimuth), formal(primTriple(), SYM(v), false, false), formal(primBoolean(), SYM(warn), true, false));
-#line 81 "runtriple.in"
- addFunc(ve, run::gen_runtriple12, primReal(), SYM(colatitude), formal(primTriple(), SYM(v), false, false), formal(primBoolean(), SYM(warn), true, false));
-#line 87 "runtriple.in"
- addFunc(ve, run::gen_runtriple13, primReal(), SYM(latitude), formal(primTriple(), SYM(v), false, false), formal(primBoolean(), SYM(warn), true, false));
-#line 93 "runtriple.in"
- addFunc(ve, run::gen_runtriple14, primReal(), SYM(longitude), formal(primTriple(), SYM(v), false, false), formal(primBoolean(), SYM(warn), true, false));
-#line 100 "runtriple.in"
- addFunc(ve, run::gen_runtriple15, primTriple(), SYM(unit), formal(primTriple(), SYM(v), false, false));
+ addFunc(ve, run::gen_runtriple11, primReal(), SYM(polar), formal(primTriple(), SYM(v), false, false), formal(primBoolean(), SYM(warn), true, false));
+#line 80 "runtriple.in"
+ addFunc(ve, run::gen_runtriple12, primReal(), SYM(azimuth), formal(primTriple(), SYM(v), false, false), formal(primBoolean(), SYM(warn), true, false));
+#line 86 "runtriple.in"
+ addFunc(ve, run::gen_runtriple13, primReal(), SYM(colatitude), formal(primTriple(), SYM(v), false, false), formal(primBoolean(), SYM(warn), true, false));
+#line 92 "runtriple.in"
+ addFunc(ve, run::gen_runtriple14, primReal(), SYM(latitude), formal(primTriple(), SYM(v), false, false), formal(primBoolean(), SYM(warn), true, false));
+#line 98 "runtriple.in"
+ addFunc(ve, run::gen_runtriple15, primReal(), SYM(longitude), formal(primTriple(), SYM(v), false, false), formal(primBoolean(), SYM(warn), true, false));
#line 105 "runtriple.in"
- addFunc(ve, run::gen_runtriple16, primReal(), SYM(dot), formal(primTriple(), SYM(u), false, false), formal(primTriple(), SYM(v), false, false));
+ addFunc(ve, run::gen_runtriple16, primTriple(), SYM(unit), formal(primTriple(), SYM(v), false, false));
#line 110 "runtriple.in"
- addFunc(ve, run::gen_runtriple17, primTriple(), SYM(cross), formal(primTriple(), SYM(u), false, false), formal(primTriple(), SYM(v), false, false));
+ addFunc(ve, run::gen_runtriple17, primReal(), SYM(dot), formal(primTriple(), SYM(u), false, false), formal(primTriple(), SYM(v), false, false));
#line 115 "runtriple.in"
- addFunc(ve, run::gen_runtriple18, primTriple(), SYM(dir), formal(primTriple(), SYM(z), false, true));
+ addFunc(ve, run::gen_runtriple18, primTriple(), SYM(cross), formal(primTriple(), SYM(u), false, false), formal(primTriple(), SYM(v), false, false));
#line 120 "runtriple.in"
- addFunc(ve, run::gen_runtriple19, primTriple(), SYM(expi), formal(primReal(), SYM(polar), false, false), formal(primReal(), SYM(azimuth), false, false));
+ addFunc(ve, run::gen_runtriple19, primTriple(), SYM(dir), formal(primTriple(), SYM(z), false, true));
#line 125 "runtriple.in"
- addFunc(ve, run::gen_runtriple20, primTriple(), SYM(dir), formal(primReal(), SYM(colatitude), false, false), formal(primReal(), SYM(longitude), false, false));
+ addFunc(ve, run::gen_runtriple20, primTriple(), SYM(expi), formal(primReal(), SYM(polar), false, false), formal(primReal(), SYM(azimuth), false, false));
#line 130 "runtriple.in"
- addFunc(ve, run::gen_runtriple21, primTriple(), SYM(realmult), formal(primTriple(), SYM(u), false, false), formal(primTriple(), SYM(v), false, false));
+ addFunc(ve, run::gen_runtriple21, primTriple(), SYM(dir), formal(primReal(), SYM(colatitude), false, false), formal(primReal(), SYM(longitude), false, false));
#line 135 "runtriple.in"
- addFunc(ve, run::gen_runtriple22, primTriple(), SYM(perp), formal(primTriple(), SYM(v), false, false), formal(primTriple(), SYM(u), false, false));
-#line 141 "runtriple.in"
- addFunc(ve, run::gen_runtriple23, primTriple(), SYM(bezier), formal(primTriple(), SYM(a), false, false), formal(primTriple(), SYM(b), false, false), formal(primTriple(), SYM(c), false, false), formal(primTriple(), SYM(d), false, false), formal(primReal(), SYM(t), false, false));
-#line 148 "runtriple.in"
- addFunc(ve, run::gen_runtriple24, primTriple(), SYM(bezierP), formal(primTriple(), SYM(a), false, false), formal(primTriple(), SYM(b), false, false), formal(primTriple(), SYM(c), false, false), formal(primTriple(), SYM(d), false, false), formal(primReal(), SYM(t), false, false));
+ addFunc(ve, run::gen_runtriple22, primTriple(), SYM(realmult), formal(primTriple(), SYM(u), false, false), formal(primTriple(), SYM(v), false, false));
+#line 140 "runtriple.in"
+ addFunc(ve, run::gen_runtriple23, primTriple(), SYM(perp), formal(primTriple(), SYM(v), false, false), formal(primTriple(), SYM(u), false, false));
+#line 146 "runtriple.in"
+ addFunc(ve, run::gen_runtriple24, primTriple(), SYM(bezier), formal(primTriple(), SYM(a), false, false), formal(primTriple(), SYM(b), false, false), formal(primTriple(), SYM(c), false, false), formal(primTriple(), SYM(d), false, false), formal(primReal(), SYM(t), false, false));
#line 153 "runtriple.in"
- addFunc(ve, run::gen_runtriple25, primTriple(), SYM(bezierPP), formal(primTriple(), SYM(a), false, false), formal(primTriple(), SYM(b), false, false), formal(primTriple(), SYM(c), false, false), formal(primTriple(), SYM(d), false, false), formal(primReal(), SYM(t), false, false));
+ addFunc(ve, run::gen_runtriple25, primTriple(), SYM(bezierP), formal(primTriple(), SYM(a), false, false), formal(primTriple(), SYM(b), false, false), formal(primTriple(), SYM(c), false, false), formal(primTriple(), SYM(d), false, false), formal(primReal(), SYM(t), false, false));
#line 158 "runtriple.in"
- addFunc(ve, run::gen_runtriple26, primTriple(), SYM(bezierPPP), formal(primTriple(), SYM(a), false, false), formal(primTriple(), SYM(b), false, false), formal(primTriple(), SYM(c), false, false), formal(primTriple(), SYM(d), false, false));
+ addFunc(ve, run::gen_runtriple26, primTriple(), SYM(bezierPP), formal(primTriple(), SYM(a), false, false), formal(primTriple(), SYM(b), false, false), formal(primTriple(), SYM(c), false, false), formal(primTriple(), SYM(d), false, false), formal(primReal(), SYM(t), false, false));
+#line 163 "runtriple.in"
+ addFunc(ve, run::gen_runtriple27, primTriple(), SYM(bezierPPP), formal(primTriple(), SYM(a), false, false), formal(primTriple(), SYM(b), false, false), formal(primTriple(), SYM(c), false, false), formal(primTriple(), SYM(d), false, false));
}
} // namespace trans
diff --git a/Build/source/utils/asymptote/runtriple.in b/Build/source/utils/asymptote/runtriple.in
index f196b8f4a50..59207294da5 100644
--- a/Build/source/utils/asymptote/runtriple.in
+++ b/Build/source/utils/asymptote/runtriple.in
@@ -67,24 +67,29 @@ real abs(triple v)
return v.length();
}
-real polar(triple v, bool warn=true)
+real abs2(triple v)
+{
+ return abs2(v);
+}
+
+real polar(triple v, bool warn=true)
{
return v.polar(warn);
}
-real azimuth(triple v, bool warn=true)
+real azimuth(triple v, bool warn=true)
{
if(!warn && v.getx() == 0.0 && v.gety() == 0.0) return 0.0;
return v.azimuth();
}
-real colatitude(triple v, bool warn=true)
+real colatitude(triple v, bool warn=true)
{
if(!warn && v.getx() == 0.0 && v.gety() == 0.0 && v.getz() == 0.0) return 0.0;
return degrees(v.polar());
}
-real latitude(triple v, bool warn=true)
+real latitude(triple v, bool warn=true)
{
if(!warn && v.getx() == 0.0 && v.gety() == 0.0 && v.getz() == 0.0) return 0.0;
return 90.0-degrees(v.polar());
@@ -97,17 +102,17 @@ real longitude(triple v, bool warn=true)
return principalBranch(degrees(v.azimuth()));
}
-triple unit(triple v)
+triple unit(triple v)
{
return unit(v);
}
-real dot(triple u, triple v)
+real dot(triple u, triple v)
{
return dot(u,v);
}
-triple cross(triple u, triple v)
+triple cross(triple u, triple v)
{
return cross(u,v);
}
@@ -127,7 +132,7 @@ triple dir(real colatitude, real longitude)
return expi(radians(colatitude),radians(longitude));
}
-triple realmult(triple u, triple v)
+triple realmult(triple u, triple v)
{
return triple (u.getx()*v.getx(),u.gety()*v.gety(),u.getz()*v.getz());
}
@@ -138,24 +143,24 @@ triple perp(triple v, triple u)
return perp(v,u);
}
-triple bezier(triple a, triple b, triple c, triple d, real t)
+triple bezier(triple a, triple b, triple c, triple d, real t)
{
real onemt=1-t;
real onemt2=onemt*onemt;
return onemt2*onemt*a+t*(3.0*(onemt2*b+t*onemt*c)+t*t*d);
}
-triple bezierP(triple a, triple b, triple c, triple d, real t)
+triple bezierP(triple a, triple b, triple c, triple d, real t)
{
return 3.0*(t*t*(d-a+3.0*(b-c))+t*(2.0*(a+c)-4.0*b)+b-a);
}
-triple bezierPP(triple a, triple b, triple c, triple d, real t)
+triple bezierPP(triple a, triple b, triple c, triple d, real t)
{
return 6.0*(t*(d-a+3.0*(b-c))+a+c)-12.0*b;
}
-triple bezierPPP(triple a, triple b, triple c, triple d)
+triple bezierPPP(triple a, triple b, triple c, triple d)
{
return 6.0*(d-a)+18.0*(b-c);
}
diff --git a/Build/source/utils/asymptote/seconds.h b/Build/source/utils/asymptote/seconds.h
index 37f8e32cdcb..0b92e902e2c 100644
--- a/Build/source/utils/asymptote/seconds.h
+++ b/Build/source/utils/asymptote/seconds.h
@@ -9,65 +9,65 @@
#include <iostream>
#if defined(_MSC_VER) || defined(_MSC_EXTENSIONS)
- #define DELTA_EPOCH_IN_MICROSECS 11644473600000000Ui64
+#define DELTA_EPOCH_IN_MICROSECS 11644473600000000Ui64
#else
- #define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
+#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
-
+
struct timezone
{
int tz_minuteswest; /* minutes W of Greenwich */
int tz_dsttime; /* type of dst correction */
};
-
+
// Definition of a gettimeofday function
-
+
inline int gettimeofday(struct timeval *tv, struct timezone *tz)
{
// Define a structure to receive the current Windows filetime
FILETIME ft;
-
+
// Initialize the present time to 0 and the timezone to UTC
unsigned __int64 tmpres = 0;
static int tzflag = 0;
-
+
if (NULL != tv)
- {
- GetSystemTimeAsFileTime(&ft);
-
-// The GetSystemTimeAsFileTime returns the number of 100 nanosecond
-// intervals since Jan 1, 1601 in a structure. Copy the high bits to
+ {
+ GetSystemTimeAsFileTime(&ft);
+
+// The GetSystemTimeAsFileTime returns the number of 100 nanosecond
+// intervals since Jan 1, 1601 in a structure. Copy the high bits to
// the 64 bit tmpres, shift it left by 32 then or in the low 32 bits.
- tmpres |= ft.dwHighDateTime;
- tmpres <<= 32;
- tmpres |= ft.dwLowDateTime;
-
+ tmpres |= ft.dwHighDateTime;
+ tmpres <<= 32;
+ tmpres |= ft.dwLowDateTime;
+
// Convert to microseconds by dividing by 10
- tmpres /= 10;
-
-// The Unix epoch starts on Jan 1 1970. Need to subtract the difference
+ tmpres /= 10;
+
+// The Unix epoch starts on Jan 1 1970. Need to subtract the difference
// in seconds from Jan 1 1601.
- tmpres -= DELTA_EPOCH_IN_MICROSECS;
-
-// Finally change microseconds to seconds and place in the seconds value.
+ tmpres -= DELTA_EPOCH_IN_MICROSECS;
+
+// Finally change microseconds to seconds and place in the seconds value.
// The modulus picks up the microseconds.
- tv->tv_sec = (long)(tmpres / 1000000UL);
- tv->tv_usec = (long)(tmpres % 1000000UL);
- }
-
+ tv->tv_sec = (long)(tmpres / 1000000UL);
+ tv->tv_usec = (long)(tmpres % 1000000UL);
+ }
+
if (NULL != tz)
- {
- if (!tzflag)
{
- _tzset();
- tzflag++;
- }
-
+ if (!tzflag)
+ {
+ _tzset();
+ tzflag++;
+ }
+
// Adjust for the timezone west of Greenwich
tz->tz_minuteswest = _timezone / 60;
- tz->tz_dsttime = _daylight;
- }
-
+ tz->tz_dsttime = _daylight;
+ }
+
return 0;
}
diff --git a/Build/source/utils/asymptote/settings.cc b/Build/source/utils/asymptote/settings.cc
index 6ae84b61368..edd9fec7840 100644
--- a/Build/source/utils/asymptote/settings.cc
+++ b/Build/source/utils/asymptote/settings.cc
@@ -73,24 +73,25 @@ void runFile(const string& filename);
namespace settings {
-
+
using camp::pair;
-
+
#ifdef HAVE_LIBGLM
-const bool havegl=true;
+const bool havegl=true;
#else
const bool havegl=false;
#endif
-
+
mode_t mask;
-
+
string systemDir=ASYMPTOTE_SYSDIR;
+string defaultPSdriver="ps2write";
string defaultEPSdriver="eps2write";
string defaultAsyGL="https://vectorgraphics.github.io/asymptote/base/webgl/asygl-"+
string(AsyGLVersion)+".js";
#ifndef __MSDOS__
-
+
bool msdos=false;
string HOME="HOME";
string docdir=ASYMPTOTE_DOCDIR;
@@ -99,20 +100,20 @@ const char pathSeparator=':';
string defaultPSViewer="open";
string defaultPDFViewer="open";
string defaultHTMLViewer="open";
-#else
+#else
string defaultPSViewer="gv";
string defaultPDFViewer="acroread";
string defaultHTMLViewer="google-chrome";
-#endif
+#endif
string defaultGhostscript="gs";
string defaultGhostscriptLibrary="";
string defaultDisplay="display";
string defaultAnimate="animate";
void queryRegistry() {}
const string dirsep="/";
-
-#else
-
+
+#else
+
bool msdos=true;
string HOME="USERPROFILE";
string docdir="c:\\Program Files\\Asymptote";
@@ -129,9 +130,9 @@ string defaultDisplay="cmd";
//string defaultAnimate="animate";
string defaultAnimate="cmd";
const string dirsep="\\";
-
+
#include <dirent.h>
-
+
// Use key to look up an entry in the MSWindows registry, respecting wild cards
string getEntry(const string& location, const string& key)
{
@@ -160,7 +161,7 @@ string getEntry(const string& location, const string& key)
string dname=p->d_name;
string rdname=dname;
reverse(rdname.begin(),rdname.end());
- if(dname != "." && dname != ".." &&
+ if(dname != "." && dname != ".." &&
dname.substr(0,file.size()) == file &&
rdname.substr(0,suffix.size()) == rsuffix) {
head=directory+p->d_name;
@@ -179,7 +180,7 @@ string getEntry(const string& location, const string& key)
}
return "";
}
-
+
// Use key to look up an entry in the MSWindows registry, respecting wild cards
string getEntry(const string& key)
{
@@ -195,7 +196,7 @@ void queryRegistry()
string defaultGhostscriptLibrary=getEntry("GPL Ghostscript/*/GS_DLL");
if(defaultGhostscriptLibrary.empty())
defaultGhostscriptLibrary=getEntry("AFPL Ghostscript/*/GS_DLL");
-
+
string gslib=stripDir(defaultGhostscriptLibrary);
defaultGhostscript=stripFile(defaultGhostscriptLibrary)+
((gslib.empty() || gslib.substr(5,2) == "32") ? "gswin32c.exe" : "gswin64c.exe");
@@ -211,9 +212,9 @@ void queryRegistry()
if(!systemDir.empty() && !docdir.empty())
systemDir=docdir;
}
-
-#endif
-
+
+#endif
+
const char PROGRAM[]=PACKAGE_NAME;
const char VERSION[]=PACKAGE_VERSION;
const char BUGREPORT[]=PACKAGE_BUGREPORT;
@@ -226,31 +227,35 @@ Int verbose;
// Conserve memory at the expense of speed.
bool compact;
-
-// Colorspace conversion flags (stored in global variables for efficiency).
+
+// Colorspace conversion flags (stored in global variables for efficiency).
bool gray;
-bool bw;
+bool bw;
bool rgb;
bool cmyk;
-
+
// Disable system calls.
bool safe=true;
+// Enable reading from other directories
+bool globalRead=true;
// Enable writing to (or changing to) other directories
-bool globaloption=false;
-
-bool globalwrite() {return globaloption || !safe;}
-
+bool globalWrite=false;
+
+bool globalwrite() {return globalWrite || !safe;}
+bool globalread() {return globalRead || !safe;}
+
const string suffix="asy";
const string guisuffix="gui";
const string standardprefix="out";
-
+
string initdir;
+string tempdir;
string historyname;
// Local versions of the argument list.
int argCount = 0;
char **argList = 0;
-
+
typedef ::option c_option;
types::dummyRecord *settingsModule;
@@ -274,7 +279,7 @@ void Warn(const string& s)
array *Warn=getSetting<array *>("suppress");
size_t size=checkArray(Warn);
for(size_t i=0; i < size; i++)
- if(vm::read<string>(Warn,i) == s)
+ if(vm::read<string>(Warn,i) == s)
(*Warn).erase((*Warn).begin()+i,(*Warn).begin()+i+1);
}
@@ -295,7 +300,7 @@ optionsMap_t optionsMap;
typedef mem::map<CONST char, option *> codeMap_t;
codeMap_t codeMap;
-
+
struct option : public gc {
string name;
char code; // Command line option, i.e. 'V' for -V.
@@ -379,7 +384,7 @@ struct option : public gc {
cerr << endl;
}
}
-
+
virtual void reset() {
}
};
@@ -453,7 +458,7 @@ item& Setting(string name) {
}
return s->value;
}
-
+
struct boolSetting : public itemSetting {
boolSetting(string name, char code, string desc,
bool defaultValue=false)
@@ -547,7 +552,7 @@ struct argumentSetting : public itemSetting {
argumentSetting(string name, char code,
string argname, string desc,
types::ty *t, item defaultValue)
- : itemSetting(name, code, argname, desc, t, defaultValue)
+ : itemSetting(name, code, argname, desc, t, defaultValue)
{
assert(!argname.empty());
}
@@ -591,7 +596,7 @@ struct warnSetting : public option {
Warn(string(optarg));
return true;
}
-
+
option *negation(string name) {
struct negOption : public option {
warnSetting &base;
@@ -606,7 +611,7 @@ struct warnSetting : public option {
};
return new negOption(*this, name, argname);
}
-
+
void add() {
option::add();
negation("no"+name)->add();
@@ -618,11 +623,11 @@ struct warnSetting : public option {
};
string GetEnv(string s, string Default) {
- transform(s.begin(), s.end(), s.begin(), toupper);
+ transform(s.begin(), s.end(), s.begin(), toupper);
string t=Getenv(("ASYMPTOTE_"+s).c_str(),msdos);
return t.empty() ? Default : t;
}
-
+
struct envSetting : public stringSetting {
envSetting(string name, string Default)
: stringSetting(name, 0, " ", "", GetEnv(name,Default)) {}
@@ -649,7 +654,7 @@ struct dataSetting : public argumentSetting {
};
template<class T>
-string description(string desc, T defaultValue)
+string description(string desc, T defaultValue)
{
return desc.empty() ? "" : desc+" ["+String(defaultValue)+"]";
}
@@ -661,7 +666,7 @@ struct IntSetting : public dataSetting<Int> {
description(desc,defaultValue),
types::primInt(), defaultValue) {}
};
-
+
struct realSetting : public dataSetting<double> {
realSetting(string name, char code,
string argname, string desc, double defaultValue=0.0)
@@ -669,7 +674,7 @@ struct realSetting : public dataSetting<double> {
description(desc,defaultValue),
types::primReal(), defaultValue) {}
};
-
+
struct pairSetting : public dataSetting<pair> {
pairSetting(string name, char code,
string argname, string desc, pair defaultValue=0.0)
@@ -677,7 +682,7 @@ struct pairSetting : public dataSetting<pair> {
description(desc,defaultValue),
types::primPair(), defaultValue) {}
};
-
+
// For setting the alignment of a figure on the page.
struct alignSetting : public argumentSetting {
alignSetting(string name, char code,
@@ -714,7 +719,7 @@ struct engineSetting : public argumentSetting {
bool getOption() {
string str=optarg;
-
+
if(str == "latex" || str == "pdflatex" || str == "xelatex" ||
str == "tex" || str == "pdftex" || str == "luatex" ||
str == "lualatex" || str == "context" || str == "none") {
@@ -759,7 +764,7 @@ struct refSetting : public setting {
}
return true;
}
-
+
virtual void reset() {
*ref=defaultValue;
}
@@ -778,7 +783,7 @@ struct boolrefSetting : public refSetting<bool> {
*ref=true;
return true;
}
-
+
virtual option *negation(string name) {
struct negOption : public option {
boolrefSetting &base;
@@ -793,7 +798,7 @@ struct boolrefSetting : public refSetting<bool> {
};
return new negOption(*this, name);
}
-
+
void add() {
setting::add();
negation("no"+name)->add();
@@ -812,13 +817,13 @@ struct compactSetting : public boolrefSetting {
mem::compact(1);
return boolrefSetting::getOption();
}
-
+
option *negation(string name) {
mem::compact(0);
return boolrefSetting::negation(name);
}
};
-
+
struct incrementSetting : public refSetting<Int> {
incrementSetting(string name, char code, string desc, Int *ref)
: refSetting<Int>(name, code, noarg, desc,
@@ -829,7 +834,7 @@ struct incrementSetting : public refSetting<Int> {
++(*ref);
return true;
}
-
+
option *negation(string name) {
struct negOption : public option {
incrementSetting &base;
@@ -844,7 +849,7 @@ struct incrementSetting : public refSetting<Int> {
};
return new negOption(*this, name);
}
-
+
void add() {
setting::add();
negation("no"+name)->add();
@@ -858,7 +863,7 @@ struct incrementSetting : public refSetting<Int> {
struct incrementOption : public option {
Int *ref;
Int level;
-
+
incrementOption(string name, char code, string desc, Int *ref,
Int level=1)
: option(name, code, noarg, desc, true), ref(ref), level(level) {}
@@ -877,14 +882,14 @@ void addOption(option *o) {
void version()
{
cerr << PROGRAM << " version " << REVISION
- << " [(C) 2004 Andy Hammerlindl, John C. Bowman, Tom Prince]"
+ << " [(C) 2004 Andy Hammerlindl, John C. Bowman, Tom Prince]"
<< endl;
}
void usage(const char *program)
{
version();
- cerr << "\t\t\t" << "http://asymptote.sourceforge.net/"
+ cerr << "\t\t\t" << "https://asymptote.sourceforge.io/"
<< endl
<< "Usage: " << program << " [options] [file ...]"
<< endl;
@@ -901,7 +906,7 @@ void reportSyntax() {
void displayOptions()
{
cerr << endl;
- cerr << "Options (negate by replacing - with -no): "
+ cerr << "Options (negate by replacing - with -no): "
<< endl << endl;
for (optionsMap_t::iterator opt=optionsMap.begin();
opt!=optionsMap.end();
@@ -929,7 +934,7 @@ struct versionOption : public option {
: option(name, code, noarg, desc, true) {}
bool disabled;
-
+
const void feature(const char *s, bool enabled) {
if(enabled ^ disabled)
cerr << s << endl;
@@ -944,6 +949,7 @@ struct versionOption : public option {
bool gsl=false;
bool fftw3=false;
bool xdr=false;
+ bool curl=false;
bool readline=false;
bool editline=false;
bool sigsegv=false;
@@ -969,6 +975,10 @@ struct versionOption : public option {
xdr=true;
#endif
+#ifdef HAVE_LIBCURL
+ curl=true;
+#endif
+
#ifdef HAVE_LIBCURSES
#ifdef HAVE_LIBREADLINE
readline=true;
@@ -988,10 +998,15 @@ struct versionOption : public option {
#endif
feature("WebGL 3D HTML rendering",glm);
+#ifdef HAVE_LIBOSMESA
+ feature("OpenGL 3D OSMesa offscreen rendering",gl);
+#else
feature("OpenGL 3D OpenGL rendering",gl);
+#endif
feature("GSL GNU Scientific Library (special functions)",gsl);
feature("FFTW3 Fast Fourier transforms",fftw3);
feature("XDR external data representation (portable binary file format)",xdr);
+ feature("CURL URL support",curl);
feature("Readline interactive history and editing",readline);
if(!readline)
feature("Editline interactive editing (if Readline is unavailable)",editline);
@@ -999,7 +1014,7 @@ struct versionOption : public option {
sigsegv);
feature("GC Boehm garbage collector",usegc);
}
-
+
bool getOption() {
version();
features(1);
@@ -1075,7 +1090,7 @@ void resetOptions()
if(opt->first != "config" && opt->first != "dir" && opt->first != "sysdir")
opt->second->reset();
}
-
+
void getOptions(int argc, char *argv[])
{
bool syntax=false;
@@ -1110,7 +1125,7 @@ void getOptions(int argc, char *argv[])
errno=0;
}
-
+
if (syntax)
reportSyntax();
}
@@ -1121,7 +1136,7 @@ void no_GCwarn(char *, GC_word)
}
#endif
-array* stringArray(const char **s)
+array* stringArray(const char **s)
{
size_t count=0;
while(s[count])
@@ -1140,30 +1155,30 @@ void initSettings() {
}
settingsModule=new types::dummyRecord(symbol::trans("settings"));
-
+
// Default mouse bindings
-
+
// LEFT: rotate
// SHIFT LEFT: zoom
// CTRL LEFT: shift
// ALT LEFT: pan
const char *leftbutton[]={"rotate","zoom","shift","pan",NULL};
-
+
// MIDDLE:
const char *middlebutton[]={NULL};
-
+
// RIGHT: zoom
// SHIFT RIGHT: rotateX
// CTRL RIGHT: rotateY
// ALT RIGHT: rotateZ
const char *rightbutton[]={"zoom","rotateX","rotateY","rotateZ",NULL};
-
+
// WHEEL_UP: zoomin
const char *wheelup[]={"zoomin",NULL};
-
+
// WHEEL_DOWN: zoomout
const char *wheeldown[]={"zoomout",NULL};
-
+
addOption(new stringArraySetting("leftbutton", stringArray(leftbutton)));
addOption(new stringArraySetting("middlebutton", stringArray(middlebutton)));
addOption(new stringArraySetting("rightbutton", stringArray(rightbutton)));
@@ -1172,7 +1187,7 @@ void initSettings() {
addOption(new stringArraySetting("suppress", new array));
addOption(new warnSetting("warn", 0, "string", "Enable warning"));
-
+
multiOption *view=new multiOption("View", 'V', "View output");
view->add(new boolSetting("batchView", 0, "View output in batch mode",
msdos));
@@ -1186,7 +1201,7 @@ void initSettings() {
"Convert each output file to specified format",
""));
addOption(new boolSetting("svgemulation", 0,
- "Emulate unimplemented SVG shading", false));
+ "Emulate unimplemented SVG shading", true));
addOption(new boolSetting("prc", 0,
"Embed 3D PRC graphics in PDF output", true));
addOption(new boolSetting("toolbar", 0,
@@ -1195,24 +1210,23 @@ void initSettings() {
"Show 3D axes in PDF output", true));
addOption(new boolSetting("envmap", 0,
"Enable environment map image-based lighting (Experimental)", false));
-
-
+
+
addOption(new realSetting("render", 0, "n",
"Render 3D graphics using n pixels per bp (-1=auto)",
havegl ? -1.0 : 0.0));
+ addOption(new realSetting("devicepixelratio", 0, "n", "Ratio of physical to logical pixels", 1.0));
addOption(new IntSetting("antialias", 0, "n",
"Antialiasing width for rasterized output", 2));
addOption(new IntSetting("multisample", 0, "n",
"Multisampling width for screen images", 4));
- addOption(new boolSetting("offscreen", 0,
- "Use offscreen rendering",false));
addOption(new boolSetting("twosided", 0,
"Use two-sided 3D lighting model for rendering",
true));
- addOption(new pairSetting("position", 0, "pair",
+ addOption(new pairSetting("position", 0, "pair",
"Initial 3D rendering screen position"));
addOption(new pairSetting("maxviewport", 0, "pair",
- "Maximum viewport size",pair(2048,2048)));
+ "Maximum viewport size",pair(0,0)));
addOption(new pairSetting("viewportmargin", 0, "pair",
"Horizontal and vertical 3D viewport margin",
pair(0.5,0.5)));
@@ -1229,7 +1243,7 @@ void initSettings() {
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));
+ "Use POSIX threads for 3D rendering", true));
addOption(new boolSetting("fitscreen", 0,
"Fit rendered image to screen", true));
addOption(new boolSetting("interactiveWrite", 0,
@@ -1240,18 +1254,18 @@ void initSettings() {
addOption(new pairSetting("offset", 'O', "pair", "PostScript offset"));
addOption(new pairSetting("aligndir", 0, "pair",
- "Directional page alignment (overrides align)"));
+ "Directional page alignment (overrides align)"));
addOption(new alignSetting("align", 'a', "C|B|T|Z",
"Center, Bottom, Top, or Zero page alignment",
"C"));
-
+
addOption(new boolSetting("debug", 'd', "Enable debugging messages"));
addOption(new incrementSetting("verbose", 'v',
"Increase verbosity level (can specify multiple times)", &verbose));
// Resolve ambiguity with --version
addOption(new incrementOption("vv", 0,"", &verbose,2));
addOption(new incrementOption("novv", 0,"", &verbose,-2));
-
+
addOption(new boolSetting("keep", 'k', "Keep intermediate files"));
addOption(new boolSetting("keepaux", 0,
"Keep intermediate LaTeX .aux files"));
@@ -1273,6 +1287,8 @@ void initSettings() {
addOption(new boolSetting("inlineimage", 0,
"Generate inline embedded image"));
+ addOption(new boolSetting("compress", 0,
+ "Compress images in PDF output", true));
addOption(new boolSetting("parseonly", 'p', "Parse file"));
addOption(new boolSetting("translate", 's',
"Show translated virtual machine code"));
@@ -1282,7 +1298,7 @@ void initSettings() {
"List available global functions and variables"));
addOption(new boolSetting("where", 0,
"Show where listed variables are declared"));
-
+
multiOption *mask=new multiOption("mask", 'm',
"Mask fpu exceptions");
mask->add(new boolSetting("batchMask", 0,
@@ -1302,20 +1318,23 @@ void initSettings() {
&safe, true));
addSecureSetting(new boolrefSetting("globalwrite", 0,
"Allow write to other directory",
- &globaloption, false));
+ &globalWrite, false));
+ addSecureSetting(new boolrefSetting("globalread", 0,
+ "Allow read from other directory",
+ &globalRead, true));
addSecureSetting(new stringSetting("outname", 'o', "name",
"Alternative output directory/filename"));
addOption(new stringOption("cd", 0, "directory", "Set current directory",
&startpath));
-
-#ifdef USEGC
+
+#ifdef USEGC
addOption(new compactSetting("compact", 0,
"Conserve memory at the expense of speed",
&compact));
addOption(new divisorOption("divisor", 0, "n",
"Garbage collect using purge(divisor=n) [2]"));
-#endif
-
+#endif
+
addOption(new stringSetting("prompt", 0,"string","Prompt","> "));
addOption(new stringSetting("prompt2", 0,"string",
"Continuation prompt for multiline input ",
@@ -1331,7 +1350,7 @@ void initSettings() {
addOption(new IntSetting("outpipe", 0, "n","",-1));
addOption(new boolSetting("exitonEOF", 0, "Exit interactive mode on EOF",
true));
-
+
addOption(new boolSetting("quiet", 'q',
"Suppress welcome text and noninteractive stdout"));
addOption(new boolSetting("localhistory", 0,
@@ -1361,7 +1380,7 @@ void initSettings() {
"Command to autoexecute"));
addOption(new userSetting("user", 'u', "string",
"General purpose user string"));
-
+
addOption(new realSetting("zoomfactor", 0, "factor", "Zoom step factor",
1.05));
addOption(new realSetting("zoomPinchFactor", 0, "n",
@@ -1388,10 +1407,10 @@ void initSettings() {
addOption(new realSetting("resizestep", 0, "step", "Resize step", 1.2));
addOption(new IntSetting("digits", 0, "n",
"Default output file precision", 7));
-
+
addOption(new realSetting("paperwidth", 0, "bp", ""));
addOption(new realSetting("paperheight", 0, "bp", ""));
-
+
addOption(new stringSetting("dvipsOptions", 0, "string", ""));
addOption(new stringSetting("dvisvgmOptions", 0, "string", ""));
addOption(new stringSetting("convertOptions", 0, "string", ""));
@@ -1403,7 +1422,7 @@ void initSettings() {
addOption(new stringSetting("glOptions", 0, "string", ""));
addOption(new stringSetting("hyperrefOptions", 0, "str",
"","setpagesize=false,unicode,pdfborder=0 0 0"));
-
+
addOption(new envSetting("config","config."+suffix));
addOption(new envSetting("htmlviewer", defaultHTMLViewer));
addOption(new envSetting("pdfviewer", defaultPDFViewer));
@@ -1411,6 +1430,7 @@ void initSettings() {
addOption(new envSetting("gs", defaultGhostscript));
addOption(new envSetting("libgs", defaultGhostscriptLibrary));
addOption(new envSetting("epsdriver", defaultEPSdriver));
+ addOption(new envSetting("psdriver", defaultPSdriver));
addOption(new envSetting("asygl", defaultAsyGL));
addOption(new envSetting("texpath", ""));
addOption(new envSetting("texcommand", ""));
@@ -1437,11 +1457,11 @@ char *getArg(int n) { return argList[n]; }
void setInteractive()
{
- if(numArgs() == 0 && !getSetting<bool>("listvariables") &&
+ if(numArgs() == 0 && !getSetting<bool>("listvariables") &&
getSetting<string>("command").empty() &&
(isatty(STDIN_FILENO) || getSetting<Int>("xasy")))
interact::interactive=true;
-
+
if(getSetting<bool>("localhistory"))
historyname=string(getPath())+dirsep+"."+suffix+"_history";
else {
@@ -1450,7 +1470,7 @@ void setInteractive()
historyname=initdir+"/history";
}
if(verbose > 1)
- cerr << "Using history " << historyname << endl;
+ cerr << "Using history " << historyname << endl;
}
bool view()
@@ -1458,7 +1478,7 @@ bool view()
if (interact::interactive)
return getSetting<bool>("interactiveView");
else
- return getSetting<bool>("batchView") &&
+ return getSetting<bool>("batchView") &&
(numArgs() == 1 || getSetting<bool>("multipleView"));
}
@@ -1470,7 +1490,7 @@ bool trap()
return !getSetting<bool>("batchMask");
}
-string outname()
+string outname()
{
string name=getSetting<string>("outname");
if(name.empty() && interact::interactive) return standardprefix;
@@ -1478,7 +1498,7 @@ string outname()
return name;
}
-string lookup(const string& symbol)
+string lookup(const string& symbol)
{
string s;
mem::vector<string> cmd;
@@ -1510,25 +1530,28 @@ void initDir() {
if(s.size() > 1)
initdir=s;
}
- }
-
+ }
+
if(initdir.empty())
initdir=Getenv("ASYMPTOTE_HOME",msdos);
-
+
if(initdir.empty())
initdir=Getenv(HOME.c_str(),msdos)+dirsep+"."+suffix;
-
-#ifdef __MSDOS__
+
+#ifdef __MSDOS__
mask=umask(0);
if(mask == 0) mask=0027;
umask(mask);
-#endif
+ tempdir=Getenv("TEMP",true);
+#else
+ tempdir="/tmp";
+#endif
if(access(initdir.c_str(),F_OK) == 0) {
if(verbose > 1)
cerr << "Using configuration directory " << initdir << endl;
}
}
-
+
void setPath() {
searchPath.clear();
searchPath.push_back(".");
@@ -1546,6 +1569,7 @@ void setPath() {
string sysdir=getSetting<string>("sysdir");
if(sysdir != "")
searchPath.push_back(sysdir);
+ searchPath.push_back(docdir+"/examples");
}
void SetPageDimensions() {
@@ -1554,16 +1578,16 @@ void SetPageDimensions() {
if(paperType.empty() &&
getSetting<double>("paperwidth") != 0.0 &&
getSetting<double>("paperheight") != 0.0) return;
-
+
if(paperType == "letter") {
Setting("paperwidth")=8.5*inches;
Setting("paperheight")=11.0*inches;
} else {
Setting("paperwidth")=21.0*cm;
Setting("paperheight")=29.7*cm;
-
+
if(paperType != "a4") {
- cerr << "Unknown paper size \'" << paperType << "\'; assuming a4."
+ cerr << "Unknown paper size \'" << paperType << "\'; assuming a4."
<< endl;
Setting("papertype")=string("a4");
}
@@ -1593,7 +1617,7 @@ bool pdf(const string& texengine)
bool latex(const string& texengine)
{
- return texengine == "latex" || texengine == "pdflatex" ||
+ return texengine == "latex" || texengine == "pdflatex" ||
texengine == "xelatex" || texengine == "lualatex";
}
@@ -1614,7 +1638,7 @@ const char *beginlabel(const string& texengine)
if(pdf(texengine))
return xe(texengine) ? "\\special{pdf:literal q #5 0 0 cm}" :
"\\special{pdf:q #5 0 0 cm}";
- else
+ else
return "\\special{ps:gsave currentpoint currentpoint translate [#5 0 0] "
"concat neg exch neg exch translate}";
}
@@ -1642,7 +1666,7 @@ const char *rawpostscript(const string& texengine)
}
// TeX macro to begin picture
-const char *beginpicture(const string& texengine)
+const char *beginpicture(const string& texengine)
{
if(latex(texengine))
return "\\begin{picture}";
@@ -1683,7 +1707,7 @@ string texcommand()
string command=getSetting<string>("texcommand");
return command.empty() ? getSetting<string>("tex") : command;
}
-
+
string texprogram()
{
string path=getSetting<string>("texpath");
@@ -1691,16 +1715,16 @@ string texprogram()
return path.empty() ? engine : (string) (path+"/"+engine);
}
-Int getScroll()
+Int getScroll()
{
Int scroll=settings::getSetting<Int>("scroll");
if(scroll < 0) {
-#ifdef HAVE_LIBCURSES
+#ifdef HAVE_LIBCURSES
static char *terminal=NULL;
if(!terminal)
terminal=getenv("TERM");
if(terminal) {
-#ifndef __MSDOS__
+#ifndef __MSDOS__
int error=setupterm(terminal,1,&error);
if(error == 0) scroll=lines > 2 ? lines-1 : 1;
else
@@ -1714,7 +1738,7 @@ Int getScroll()
return scroll;
}
-void doConfig(string file)
+void doConfig(string file)
{
bool autoplain=getSetting<bool>("autoplain");
bool listvariables=getSetting<bool>("listvariables");
@@ -1735,18 +1759,18 @@ void setOptions(int argc, char *argv[])
// Build settings module.
initSettings();
-
+
// Read command-line options initially to obtain config, dir, sysdir, verbose.
getOptions(argc,argv);
-
+
// Make configuration and history directory
initDir();
-
+
Int Verbose=verbose;
string sysdir=getSetting<string>("sysdir");
-
+
resetOptions();
-
+
// Read user configuration file.
setPath();
string filename=getSetting<string>("config");
@@ -1758,38 +1782,38 @@ void setOptions(int argc, char *argv[])
doConfig(file);
}
}
-
+
// Read command-line options again to override configuration file defaults.
getOptions(argc,argv);
-
+
if(getSetting<Int>("outpipe") == 2) // Redirect cerr to cout
std::cerr.rdbuf(std::cout.rdbuf());
-
+
Setting("sysdir")=sysdir;
-
+
if(docdir.empty())
docdir=getSetting<string>("dir");
-
+
#ifdef USEGC
if(verbose == 0 && !getSetting<bool>("debug")) GC_set_warn_proc(no_GCwarn);
-#endif
+#endif
if(setlocale (LC_ALL, "") == NULL && getSetting<bool>("debug"))
perror("setlocale");
-
+
// Set variables for the file arguments.
argCount = argc - optind;
argList = argv + optind;
// Recompute search path.
setPath();
-
- if(getSetting<double>("paperwidth") != 0.0 &&
+
+ if(getSetting<double>("paperwidth") != 0.0 &&
getSetting<double>("paperheight") != 0.0)
Setting("papertype")=string("");
-
+
SetPageDimensions();
-
+
setInteractive();
}
diff --git a/Build/source/utils/asymptote/settings.h b/Build/source/utils/asymptote/settings.h
index 7db42e599fa..effcc16d9dc 100644
--- a/Build/source/utils/asymptote/settings.h
+++ b/Build/source/utils/asymptote/settings.h
@@ -51,23 +51,25 @@ bool warn(const string& s);
extern string systemDir;
extern string docdir;
extern const string dirsep;
-
+extern string tempdir;
+
extern bool safe;
-
+
+bool globalread();
bool globalwrite();
extern const string suffix;
extern const string guisuffix;
extern const string standardprefix;
-
+
extern string historyname;
-
+
void SetPageDimensions();
types::record *getSettingsModule();
vm::item& Setting(string name);
-
+
template <typename T>
inline T getSetting(string name)
{
@@ -80,7 +82,7 @@ extern bool gray;
extern bool bw;
extern bool rgb;
extern bool cmyk;
-
+
bool view();
bool trap();
string outname();
@@ -90,20 +92,20 @@ void setOptions(int argc, char *argv[]);
// Access the arguments once options have been parsed.
int numArgs();
char *getArg(int n);
-
+
Int getScroll();
-
+
extern mode_t mask;
-
+
bool xe(const string& texengine);
bool lua(const string& texengine);
bool pdf(const string& texengine);
bool latex(const string& texengine);
bool context(const string& texengine);
-
+
string nativeformat();
string defaultformat();
-
+
const char *beginlabel(const string& texengine);
const char *endlabel(const string& texengine);
const char *rawpostscript(const string& texengine);
@@ -111,10 +113,10 @@ const char *beginpicture(const string& texengine);
const char *endpicture(const string& texengine);
const char *beginspecial(const string& texengine);
const char *endspecial();
-
+
string texcommand();
string texprogram();
-
+
const double inches=72.0;
const double cm=inches/2.54;
const double tex2ps=72.0/72.27;
diff --git a/Build/source/utils/asymptote/shaders.cc b/Build/source/utils/asymptote/shaders.cc
index ab0c194917f..a9c038c2299 100644
--- a/Build/source/utils/asymptote/shaders.cc
+++ b/Build/source/utils/asymptote/shaders.cc
@@ -13,7 +13,7 @@
#include "shaders.h"
-GLuint compileAndLinkShader(std::vector<ShaderfileModePair> const& shaders,
+GLuint compileAndLinkShader(std::vector<ShaderfileModePair> const& shaders,
size_t Nlights, size_t NMaterials,
std::vector<std::string> const& defineflags)
{
@@ -33,7 +33,7 @@ GLuint compileAndLinkShader(std::vector<ShaderfileModePair> const& shaders,
glBindAttribLocation(shader,materialAttrib,"material");
glBindAttribLocation(shader,colorAttrib,"color");
glBindAttribLocation(shader,widthAttrib,"width");
-
+
glLinkProgram(shader);
for(size_t i=0; i < n; ++i) {
@@ -50,12 +50,12 @@ GLuint createShaders(GLchar const* src, int shaderType,
GLuint shader=glCreateShader(shaderType);
glShaderSource(shader, 1, &src, NULL);
glCompileShader(shader);
-
+
GLint status;
glGetShaderiv(shader, GL_COMPILE_STATUS, &status);
if(status != GL_TRUE) {
- GLint length;
+ GLint length;
glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &length);
@@ -70,7 +70,7 @@ GLuint createShaders(GLchar const* src, int shaderType,
std::cerr << std::endl << "GL Compile error" << std::endl;
std::cerr << src << std::endl;
- throw 1;
+ throw 1;
}
return shader;
}
@@ -88,7 +88,7 @@ GLuint createShaderFile(std::string file, int shaderType, size_t Nlights,
#else
#define GLSL_VERSION "130"
#endif
-
+
shaderSrc << "#version " << GLSL_VERSION << "\n";
shaderSrc << "#extension GL_ARB_uniform_buffer_object : enable"
<< "\n";
diff --git a/Build/source/utils/asymptote/shaders.h b/Build/source/utils/asymptote/shaders.h
index 1ffa9c0027b..be2441a66bc 100644
--- a/Build/source/utils/asymptote/shaders.h
+++ b/Build/source/utils/asymptote/shaders.h
@@ -12,7 +12,7 @@
#ifdef __MSDOS__
#undef _WIN32
-#include "GL/wglew.h"
+#include <GL/wglew.h>
#include <GL/wglext.h>
#endif
diff --git a/Build/source/utils/asymptote/simpson.cc b/Build/source/utils/asymptote/simpson.cc
index 85c8c08160e..96f9702c492 100644
--- a/Build/source/utils/asymptote/simpson.cc
+++ b/Build/source/utils/asymptote/simpson.cc
@@ -21,12 +21,12 @@ simpson(double& integral, // Approximate value of the integral.
double dxmax) // Maximum limit on the width of a subinterval
// For periodic functions, dxmax should be
// set to the period or smaller to prevent
-// premature convergence of Simpson's rule.
+// premature convergence of Simpson's rule.
{
double diff,area,estl,estr,alpha,da,dx,wt,est,fv[5];
TABLE table[nest],*p,*pstop;
static const double sixth=1.0/6.0;
-
+
bool success=true;
p=table;
pstop=table+nest-1;
@@ -114,21 +114,21 @@ unsimpson(double integral, // Given value for the integral.
double dxmax, // Maximum limit on the width of a subinterval
// For periodic functions, dxmax should be
// set to the period or smaller to prevent
- // premature convergence of Simpson's rule.
+ // premature convergence of Simpson's rule.
double dxmin=0) // Lower limit on sampling width.
{
double diff,estl,estr,alpha,da,dx,wt,est,fv[5];
double sum,parea,pdiff,b2;
TABLE table[nest],*p,*pstop;
static const double sixth=1.0/6.0;
-
+
p=table;
pstop=table+nest-1;
p->psum=0.0;
alpha=a;
parea=0.0;
pdiff=0.0;
-
+
for(;;) {
p->left=true;
da=b-alpha;
@@ -172,7 +172,7 @@ unsimpson(double integral, // Given value for the integral.
// Accept approximate integral sum.
// If it was a right interval, add results to finish at this level.
// If it was a left interval, process right interval.
-
+
pdiff += diff;
for(;;) {
if(p->left == false) { // process right-half interval
diff --git a/Build/source/utils/asymptote/stack.cc b/Build/source/utils/asymptote/stack.cc
index 7ffb6bcb590..a854a9d9eff 100644
--- a/Build/source/utils/asymptote/stack.cc
+++ b/Build/source/utils/asymptote/stack.cc
@@ -32,21 +32,23 @@ void breakpoint(vm::stack *Stack, absyntax::runnable *r);
namespace vm {
+const char *dereferenceNullPointer="dereference of null pointer";
+
mem::list<bpinfo> bplist;
-
+
namespace {
position curPos = nullPos;
const program::label nulllabel;
}
inline stack::vars_t base_frame(
- size_t size,
- size_t parentIndex,
- stack::vars_t closure
+ size_t size,
+ size_t parentIndex,
+ stack::vars_t closure
#ifdef DEBUG_FRAME
- , string name
+ , string name
#endif
- )
+ )
{
stack::vars_t vars;
#ifdef SIMPLE_FRAME
@@ -149,7 +151,7 @@ void stack::marshall(size_t args, stack::vars_t vars)
#if SIMPLE_FRAME
vars[i-1] = pop();
#else
- (*vars)[i-1] = pop();
+ (*vars)[i-1] = pop();
#endif
}
@@ -211,7 +213,7 @@ void stack::run(func *f)
#endif
}
-void stack::breakpoint(absyntax::runnable *r)
+void stack::breakpoint(absyntax::runnable *r)
{
lastPos=curPos;
indebugger=true;
@@ -220,12 +222,12 @@ void stack::breakpoint(absyntax::runnable *r)
debugOp=(s.length() > 0) ? s[0] : (char) 0;
indebugger=false;
}
-
-void stack::debug()
+
+void stack::debug()
{
if(!curPos) return;
if(indebugger) {em.clear(); return;}
-
+
switch(debugOp) {
case 'i': // inst
breakpoint();
@@ -257,7 +259,7 @@ void stack::debug()
newline=false;
break;
}
- if(!newline &&
+ if(!newline &&
(curPos.match(lastPos.filename()) && !curPos.match(lastPos.Line())))
newline=true;
}
@@ -291,45 +293,45 @@ void stack::runWithOrWithoutClosure(lambda *l, vars_t vars, vars_t parent)
// Set up the closure, if necessary.
if (vars == 0)
- {
+ {
#ifndef SIMPLE_FRAME
- assessClosure(l);
- if (l->closureReq == lambda::NEEDS_CLOSURE)
+ assessClosure(l);
+ if (l->closureReq == lambda::NEEDS_CLOSURE)
#endif
- {
- /* make new activation record */
- vars = vm::make_frame(l, parent);
- assert(vars);
- }
+ {
+ /* make new activation record */
+ vars = vm::make_frame(l, parent);
+ assert(vars);
+ }
#ifndef SIMPLE_FRAME
- else
- {
- assert(l->closureReq == lambda::DOESNT_NEED_CLOSURE);
+ else
+ {
+ assert(l->closureReq == lambda::DOESNT_NEED_CLOSURE);
- // Use the stack to store variables.
- varlink = &theStack;
+ // Use the stack to store variables.
+ varlink = &theStack;
- // Record where the parameters start on the stack.
- frameStart = theStack.size() - frameSize;
+ // Record where the parameters start on the stack.
+ frameStart = theStack.size() - frameSize;
- // Add the parent's closure to the frame.
- push(parent);
- ++frameSize;
+ // Add the parent's closure to the frame.
+ push(parent);
+ ++frameSize;
- size_t newFrameSize = (size_t)l->framesize;
+ size_t newFrameSize = (size_t)l->framesize;
- if (newFrameSize > frameSize) {
- theStack.resize(frameStart + newFrameSize);
- frameSize = newFrameSize;
- }
- }
+ if (newFrameSize > frameSize) {
+ theStack.resize(frameStart + newFrameSize);
+ frameSize = newFrameSize;
+ }
+ }
#endif
- }
+ }
if (vars) {
- marshall(l->parentIndex, vars);
+ marshall(l->parentIndex, vars);
- SET_VARLINK;
+ SET_VARLINK;
}
/* start the new function */
@@ -341,10 +343,10 @@ void stack::runWithOrWithoutClosure(lambda *l, vars_t vars, vars_t parent)
for (;;) {
const inst &i = *ip;
curPos = i.pos;
-
- if(curPos.filename() == fileName)
- topPos=curPos;
-
+
+ if(curPos.filename() == fileName)
+ topPos=curPos;
+
#ifdef PROFILE
prof.recordInstruction();
#endif
@@ -352,16 +354,16 @@ void stack::runWithOrWithoutClosure(lambda *l, vars_t vars, vars_t parent)
#ifdef DEBUG_STACK
printInst(cout, ip, l->code->begin());
cout << " (";
- i.pos.printTerse(cout);
- cout << ")\n";
+ i.pos.printTerse(cout);
+ cout << ")\n";
#endif
if(settings::verbose > 4) em.trace(curPos);
-
+
if(!bplist.empty()) debug();
-
+
if(errorstream::interrupt) throw interrupted();
-
+
switch (i.op)
{
case inst::varpush:
@@ -371,7 +373,7 @@ void stack::runWithOrWithoutClosure(lambda *l, vars_t vars, vars_t parent)
case inst::varsave:
VAR(get<Int>(i)) = top();
break;
-
+
#ifdef COMBO
case inst::varpop:
VAR(get<Int>(i)) = pop();
@@ -411,7 +413,7 @@ void stack::runWithOrWithoutClosure(lambda *l, vars_t vars, vars_t parent)
case inst::pushclosure:
assert(vars);
push(vars);
- break;
+ break;
case inst::nop:
break;
@@ -419,24 +421,24 @@ void stack::runWithOrWithoutClosure(lambda *l, vars_t vars, vars_t parent)
case inst::pop:
pop();
break;
-
+
case inst::intpush:
case inst::constpush:
push(i.ref);
break;
-
+
case inst::fieldpush: {
vars_t frame = pop<vars_t>();
if (!frame)
- error("dereference of null pointer");
+ error(dereferenceNullPointer);
push(FRAMEVAR(frame, get<Int>(i)));
break;
}
-
+
case inst::fieldsave: {
vars_t frame = pop<vars_t>();
if (!frame)
- error("dereference of null pointer");
+ error(dereferenceNullPointer);
FRAMEVAR(frame, get<Int>(i)) = top();
break;
}
@@ -446,13 +448,13 @@ void stack::runWithOrWithoutClosure(lambda *l, vars_t vars, vars_t parent)
#error NOT REIMPLEMENTED
vars_t frame = pop<vars_t>();
if (!frame)
- error("dereference of null pointer");
+ error(dereferenceNullPointer);
FRAMEVAR(get<Int>(i)) = pop();
break;
}
#endif
-
-
+
+
case inst::builtin: {
bltin func = get<bltin>(i);
#ifdef PROFILE
@@ -528,7 +530,7 @@ void stack::runWithOrWithoutClosure(lambda *l, vars_t vars, vars_t parent)
push((callable*)f);
break;
}
-
+
default:
error("Internal VM error: Bad stack operand");
}
@@ -538,7 +540,7 @@ void stack::runWithOrWithoutClosure(lambda *l, vars_t vars, vars_t parent)
vm::draw(cerr,vars);
cerr << "\n";
#endif
-
+
++ip;
}
} catch (bad_item_value&) {
@@ -581,7 +583,7 @@ void stack::draw(ostream& out)
}
else
out << " ";
-
+
while (left != theStack.end())
{
if (left != theStack.begin())
@@ -595,7 +597,7 @@ void stack::draw(ostream& out)
void draw(ostream& out, frame* v)
{
out << "vars:" << endl;
-
+
while (!!v) {
item link=(*v)[v->getParentIndex()];
@@ -645,13 +647,13 @@ void errornothrow(const char* message)
em << message;
em.sync();
}
-
+
void error(const char* message)
{
errornothrow(message);
throw handled_error();
}
-
+
void error(const ostringstream& message)
{
const string& s=message.str();
diff --git a/Build/source/utils/asymptote/stack.h b/Build/source/utils/asymptote/stack.h
index df072b51573..ba24f7bcd52 100644
--- a/Build/source/utils/asymptote/stack.h
+++ b/Build/source/utils/asymptote/stack.h
@@ -1,7 +1,7 @@
/*****
* stack.h
* Andy Hammerlindl 2002/06/27
- *
+ *
* The general stack machine used to run compiled camp code.
*****/
@@ -25,23 +25,23 @@ class importInitMap;
struct bpinfo : public gc {
fileinfo f;
absyntax::runnable *r;
-
+
bpinfo(const string& filename, size_t lineNum,
absyntax::runnable *r=NULL) :
f(fileinfo(filename,lineNum)), r(r) {}
};
-
+
inline bool operator == (const bpinfo& a, const bpinfo& b)
{
return a.f == b.f;
}
-
+
extern mem::list<bpinfo> bplist;
-
+
class runnable;
-
-extern bool indebugger;
-
+
+extern bool indebugger;
+
class stack {
public:
typedef frame* vars_t;
@@ -66,7 +66,7 @@ private:
// instance.
typedef mem::map<CONST string,frame *> importInstanceMap;
importInstanceMap instMap;
-
+
// One can associate an environment to embedded code while running.
trans::coenv *e;
@@ -74,14 +74,14 @@ private:
char debugOp;
position lastPos, breakPos;
bool newline;
-
+
// Move arguments from stack to frame.
void marshall(size_t args, stack::vars_t vars);
public:
stack() : e(0), debugOp(0), lastPos(nullPos),
breakPos(nullPos), newline(false) {};
-
+
virtual ~stack() {};
void setInitMap(importInitMap *i) {
@@ -105,7 +105,7 @@ public:
void breakpoint(absyntax::runnable *r=NULL);
void debug();
-
+
// Put an import (indexed by name) on top of the stack, initializing it if
// necessary.
void load(string index);
@@ -143,20 +143,20 @@ inline T pop(stack* s)
{
return get<T>(pop(s));
}
-
+
template <typename T>
inline T pop(stack* s, T defval)
{
item it=pop(s);
return isdefault(it) ? defval : get<T>(it);
}
-
+
class interactiveStack : public stack {
vars_t globals;
size_t globals_size;
public:
interactiveStack();
-
+
// Run a codelet, a small piece of code that uses globals as its frame.
void run(lambda *codelet);
};
@@ -164,4 +164,4 @@ public:
} // namespace vm
#endif // STACK_H
-
+
diff --git a/Build/source/utils/asymptote/statistics.h b/Build/source/utils/asymptote/statistics.h
index 7e3d2d340db..f3c87c18d9a 100644
--- a/Build/source/utils/asymptote/statistics.h
+++ b/Build/source/utils/asymptote/statistics.h
@@ -11,7 +11,7 @@ class statistics {
double varL;
double varH;
public:
- statistics() : N(0), A(0.0), varL(0.0), varH(0.0) {}
+ statistics() : N(0), A(0.0), varL(0.0), varH(0.0) {}
double count() {return N;}
double mean() {return A;}
void add(double t) {
@@ -38,14 +38,14 @@ public:
return stdev(varH,2.0);
}
void output(const char *text, unsigned int m) {
- std::cout << text << ":\n"
- << m << "\t"
- << A << "\t"
- << stdevL() << "\t"
+ std::cout << text << ":\n"
+ << m << "\t"
+ << A << "\t"
+ << stdevL() << "\t"
<< stdevH() << std::endl;
}
};
-
+
}
#endif
diff --git a/Build/source/utils/asymptote/stm.cc b/Build/source/utils/asymptote/stm.cc
index b45e6f98e4e..8cd74a0c346 100644
--- a/Build/source/utils/asymptote/stm.cc
+++ b/Build/source/utils/asymptote/stm.cc
@@ -80,7 +80,7 @@ void tryToWriteTypeOfExp(types::ty *t, exp *body)
cout << ">" << endl;
}
}
-
+
// From dec.cc:
varEntry *makeVarEntry(position pos, coenv &e, record *r, types::ty *t);
@@ -103,7 +103,7 @@ void storeAndWriteExp(coenv &e, types::ty *t, exp *expr) {
position pos=expr->getPos();
baseExpTrans(e, new callExp(pos, new nameExp(pos, "write"),
- new nameExp(pos, "operator answer")));
+ new nameExp(pos, "operator answer")));
}
void tryToWriteExp(coenv &e, exp *expr)
@@ -112,7 +112,7 @@ void tryToWriteExp(coenv &e, exp *expr)
types::ty *t=expr->cgetType(e);
if(!t) return;
-
+
// If the original expression is bad, just print the errors.
// If it is a function which returns void, just call the function.
if (t->kind == ty_error || t->kind == ty_void) {
@@ -130,7 +130,7 @@ void tryToWriteExp(coenv &e, exp *expr)
expr->trans(e);
em.sync();
assert(em.errors());
-
+
// Then, write out all of the types.
tryToWriteTypeOfExp(t, expr);
}
@@ -163,7 +163,7 @@ void tryToWriteExp(coenv &e, exp *expr)
void expStm::interactiveTrans(coenv &e)
{
// First check if it is the kind of expression that should be written.
- if (body->writtenToPrompt() &&
+ if (body->writtenToPrompt() &&
settings::getSetting<bool>("interactiveWrite"))
tryToWriteExp(e, body);
else
@@ -189,7 +189,7 @@ void ifStm::trans(coenv &e)
test->transConditionalJump(e, false, elseLabel);
onTrue->markTrans(e);
-
+
if (onFalse) {
// Encode the jump around the 'else' clause at the end of the 'if' clause
e.c.useLabel(inst::jmp,end);
@@ -208,7 +208,7 @@ void ifStm::trans(coenv &e)
void transLoopBody(coenv &e, stm *body) {
// The semantics of the language are defined so that any variable declared
// inside a loop are new variables for each iteration of the loop. For
- // instance, the code
+ // instance, the code
//
// int f();
// for (int i = 0; i < 10; ++i) {
@@ -287,11 +287,11 @@ void doStm::trans(coenv &e)
label testLabel = e.c.fwdLabel();
label end = e.c.fwdLabel();
e.c.pushLoop(testLabel, end);
-
+
label start = e.c.defNewLabel();
- transLoopBody(e,body);
-
+ transLoopBody(e,body);
+
e.c.defLabel(testLabel);
test->transConditionalJump(e, true, start);
@@ -331,7 +331,7 @@ void forStm::trans(coenv &e)
transLoopBody(e,body);
e.c.defLabel(ctarget);
-
+
if (update)
update->markTrans(e);
e.c.useLabel(inst::jmp,start);
@@ -377,7 +377,7 @@ void extendedForStm::trans(coenv &e) {
if (at->kind != ty_array) {
em.error(set->getPos());
em << "expression is not an array of inferable type";
-
+
// On failure, don't bother trying to translate the loop.
return;
}
@@ -397,7 +397,7 @@ void extendedForStm::trans(coenv &e) {
// { start var=a[i]; body }
block b(pos);
decid dec2(pos,
- new decidstart(pos, var),
+ new decidstart(pos, var),
new subscriptExp(pos, new nameExp(pos, a),
new nameExp(pos, i)));
b.add(new vardec(pos, start, &dec2));
@@ -407,9 +407,9 @@ void extendedForStm::trans(coenv &e) {
// <block>
forStm(pos,
new vardec(pos, new tyEntryTy(pos, primInt()),
- new decid(pos,
- new decidstart(pos, i),
- new intExp(pos, 0))),
+ new decid(pos,
+ new decidstart(pos, i),
+ new intExp(pos, 0))),
new binaryExp(pos,
new nameExp(pos, i),
SYM_LT,
@@ -420,7 +420,7 @@ void extendedForStm::trans(coenv &e) {
new expStm(pos, new prefixExp(pos, new nameExp(pos, i), SYM_PLUS)),
new blockStm(pos, &b)).trans(e);
}
-
+
void breakStm::prettyprint(ostream &out, Int indent)
{
@@ -444,7 +444,7 @@ void continueStm::prettyprint(ostream &out, Int indent)
void continueStm::trans(coenv &e)
{
if (!e.c.encodeContinue()) {
- em.error(getPos());
+ em.error(getPos());
em << "continue statement outside of a loop";
}
}
diff --git a/Build/source/utils/asymptote/stm.h b/Build/source/utils/asymptote/stm.h
index d0cf203108d..3f8d426014b 100644
--- a/Build/source/utils/asymptote/stm.h
+++ b/Build/source/utils/asymptote/stm.h
@@ -64,11 +64,11 @@ public:
}
// A block is guaranteed to return iff its last statement is
- // guaranteed to return.
+ // guaranteed to return.
bool returns() {
return base->returns();
}
-
+
};
// A statement that consist of a single expression to evaluate.
@@ -191,7 +191,7 @@ public:
class returnStm : public stm {
exp *value;
-
+
public:
returnStm(position pos, exp *value = 0)
: stm(pos), value(value) {}
@@ -212,7 +212,7 @@ class stmExpList : public stm {
mem::list<stm *> stms;
public:
- stmExpList(position pos)
+ stmExpList(position pos)
: stm(pos) {}
// To ensure list deallocates properly.
diff --git a/Build/source/utils/asymptote/symbol.cc b/Build/source/utils/asymptote/symbol.cc
index 16352cff896..512a6ab77d1 100644
--- a/Build/source/utils/asymptote/symbol.cc
+++ b/Build/source/utils/asymptote/symbol.cc
@@ -239,7 +239,7 @@ symbol advancedInsert(const char *s, size_t len)
// entry (either empty or a skip entry) and insert there.
for (;;) {
symbolRecord &r = recordByHashplus(hashplus);
-
+
if (r.flag != USED) {
r.flag = USED;
r.s = new char[len];
@@ -252,7 +252,7 @@ symbol advancedInsert(const char *s, size_t len)
return symbolize(hashplus);
}
-
+
++hashplus;
}
@@ -281,14 +281,14 @@ symbol symbol::rawTrans(const char *s, size_t len)
// an empty field.
for (;;) {
symbolRecord &r = recordByHashplus(hashplus);
-
+
// Translating pre-existing symbols is more common, so check for it first.
if (r.hashplus == hashplus &&
r.flag == USED &&
strncmp(r.s, s, len) == 0) {
return symbolize(hashplus);
}
-
+
// Then check for an empty entry, in which case the entry is added.
if (r.flag == 0) {
// Test if the table needs resizing before entering a new symbol, or if
@@ -309,7 +309,7 @@ symbol symbol::rawTrans(const char *s, size_t len)
return symbolize(hashplus);
}
-
+
// A case where a different symbol is in the spot, continue along the
// table.
++hashplus;
@@ -333,13 +333,13 @@ ostream& operator<< (ostream& out, const symbol sym)
} // end namespace sym
/* Define all of operator symbols SYM_PLUS, etc. */
-#define OPSYMBOL(str, name) \
+#define OPSYMBOL(str, name) \
sym::symbol name = sym::symbol::opTrans(str)
#include "opsymbols.h"
#undef OPSYMBOL
/* Define all of the symbols of the type SYM(name) in selected files. */
-#define ADDSYMBOL(name) \
+#define ADDSYMBOL(name) \
sym::symbol PRETRANSLATED_SYMBOL_##name = sym::symbol::literalTrans(#name)
#include "allsymbols.h"
#undef ADDSYMBOL
diff --git a/Build/source/utils/asymptote/symbol.h b/Build/source/utils/asymptote/symbol.h
index bcfed4f6307..4386a510aac 100644
--- a/Build/source/utils/asymptote/symbol.h
+++ b/Build/source/utils/asymptote/symbol.h
@@ -29,8 +29,8 @@ struct GCInit {
GC_set_free_space_divisor(2);
mem::compact(0);
GC_INIT();
-#endif
-
+#endif
+
// Put the symbol table into a state where symbols can be translated.
initTable();
}
@@ -60,7 +60,7 @@ struct symbol {
static symbol initsym;
static symbol castsym;
static symbol ecastsym;
-
+
bool special() const {
return *this == initsym || *this == castsym || *this == ecastsym;
}
diff --git a/Build/source/utils/asymptote/texfile.cc b/Build/source/utils/asymptote/texfile.cc
index 790ed180d96..c40107f7bd1 100644
--- a/Build/source/utils/asymptote/texfile.cc
+++ b/Build/source/utils/asymptote/texfile.cc
@@ -20,7 +20,7 @@ using vm::read;
namespace camp {
-texfile::texfile(const string& texname, const bbox& box, bool pipe)
+texfile::texfile(const string& texname, const bbox& box, bool pipe)
: box(box)
{
texengine=getSetting<string>("tex");
@@ -39,11 +39,11 @@ texfile::texfile(const string& texname, const bbox& box, bool pipe)
texfile::~texfile()
{
if(out) {
- delete out;
+ delete out;
out=NULL;
}
}
-
+
void texfile::miniprologue()
{
texpreamble(*out,processData().TeXpreamble,true);
@@ -68,41 +68,36 @@ void texfile::prologue()
texpreamble(*outpreamble,processData().TeXpreamble,false,false);
outpreamble->close();
}
-
+
texdefines(*out,processData().TeXpreamble,false);
double width=box.right-box.left;
double height=box.top-box.bottom;
if(!inlinetex) {
if(settings::context(texengine)) {
- *out << "\\definepapersize[asy][width=" << width << "bp,height="
+ *out << "\\definepapersize[asy][width=" << width << "bp,height="
<< height << "bp]" << newl
<< "\\setuppapersize[asy][asy]" << newl;
} else if(settings::pdf(texengine)) {
- double voffset=0.0;
- if(settings::latex(texengine)) {
- if(height < 12.0) voffset=height-12.0;
- } else if(height < 10.0) voffset=height-10.0;
-
- if(width > 0)
+ if(width > 0)
*out << "\\pdfpagewidth=" << width << "bp" << newl;
*out << "\\ifx\\pdfhorigin\\undefined" << newl
<< "\\hoffset=-1in" << newl
- << "\\voffset=" << voffset-72.0 << "bp" << newl;
+ << "\\voffset=-1in" << newl;
if(height > 0)
- *out << "\\pdfpageheight=" << height << "bp"
+ *out << "\\pdfpageheight=" << height << "bp"
<< newl;
*out << "\\else" << newl
<< "\\pdfhorigin=0bp" << newl
- << "\\pdfvorigin=" << voffset << "bp" << newl;
+ << "\\pdfvorigin=0bp" << newl;
if(height > 0)
*out << "\\pdfpageheight=" << height << "bp" << newl;
*out << "\\fi" << newl;
}
}
-
+
if(settings::xe(texengine) && !inlinetex)
*out << "\\usepackage{everypage}%" << newl;
-
+
if(settings::latex(texengine)) {
*out << "\\setlength{\\unitlength}{1pt}%" << newl;
if(!inlinetex) {
@@ -141,10 +136,10 @@ void texfile::prologue()
}
}
}
-
+
beginpage();
}
-
+
void texfile::beginlayer(const string& psname, bool postscript)
{
if(box.right > box.left && box.top > box.bottom) {
@@ -162,7 +157,7 @@ void texfile::beginlayer(const string& psname, bool postscript)
} else {
if(!pdf) name=psname;
}
-
+
if(!pdf)
*out << "[bb=" << box.left << " " << box.bottom << " "
<< box.right << " " << box.top << "]";
@@ -171,7 +166,7 @@ void texfile::beginlayer(const string& psname, bool postscript)
if(!inlinetex)
*out << "\\kern " << (box.left-box.right)*ps2tex << "pt%" << newl;
} else {
- *out << "\\leavevmode\\vbox to " << (box.top-box.bottom)*ps2tex
+ *out << "\\leavevmode\\vbox to " << (box.top-box.bottom)*ps2tex
<< "pt{}%" << newl;
if(inlinetex)
*out << "\\kern " << (box.right-box.left)*ps2tex << "pt%" << newl;
@@ -192,52 +187,52 @@ void texfile::writeshifted(path p, bool newPath)
void texfile::setlatexcolor(pen p)
{
- if(p.cmyk() && (!lastpen.cmyk() ||
- (p.cyan() != lastpen.cyan() ||
- p.magenta() != lastpen.magenta() ||
+ if(p.cmyk() && (!lastpen.cmyk() ||
+ (p.cyan() != lastpen.cyan() ||
+ p.magenta() != lastpen.magenta() ||
p.yellow() != lastpen.yellow() ||
p.black() != lastpen.black()))) {
- *out << "\\definecolor{ASYcolor}{cmyk}{"
- << p.cyan() << "," << p.magenta() << "," << p.yellow() << ","
+ *out << "\\definecolor{ASYcolor}{cmyk}{"
+ << p.cyan() << "," << p.magenta() << "," << p.yellow() << ","
<< p.black() << "}\\color{ASYcolor}%" << newl;
} else if(p.rgb() && (!lastpen.rgb() ||
(p.red() != lastpen.red() ||
- p.green() != lastpen.green() ||
+ p.green() != lastpen.green() ||
p.blue() != lastpen.blue()))) {
- *out << "\\definecolor{ASYcolor}{rgb}{"
+ *out << "\\definecolor{ASYcolor}{rgb}{"
<< p.red() << "," << p.green() << "," << p.blue()
<< "}\\color{ASYcolor}%" << newl;
- } else if(p.grayscale() && (!lastpen.grayscale() ||
+ } else if(p.grayscale() && (!lastpen.grayscale() ||
p.gray() != lastpen.gray())) {
- *out << "\\definecolor{ASYcolor}{gray}{"
+ *out << "\\definecolor{ASYcolor}{gray}{"
<< p.gray()
<< "}\\color{ASYcolor}%" << newl;
}
}
-
+
void texfile::setfont(pen p)
{
bool latex=settings::latex(texengine);
-
+
if(latex) setlatexfont(*out,p,lastpen);
settexfont(*out,p,lastpen,latex);
-
+
lastpen.setfont(p);
}
-
+
void texfile::setpen(pen p)
{
bool latex=settings::latex(texengine);
-
+
p.convert();
if(p == lastpen) return;
if(latex) setlatexcolor(p);
else setcolor(p,settings::beginspecial(texengine),settings::endspecial());
-
+
setfont(p);
}
-
+
void texfile::beginpicture(const bbox& b)
{
verbatim(settings::beginpicture(texengine));
@@ -252,7 +247,7 @@ void texfile::beginpicture(const bbox& b)
}
verbatimline("%");
}
-
+
void texfile::endpicture(const bbox& b)
{
verbatimline(settings::endpicture(texengine));
@@ -261,7 +256,7 @@ void texfile::endpicture(const bbox& b)
write(-width*ps2tex);
verbatimline("pt%");
}
-
+
void texfile::gsave(bool)
{
*out << settings::beginspecial(texengine);
@@ -276,41 +271,41 @@ void texfile::grestore(bool)
*out << settings::endspecial() << newl;
}
-void texfile::beginspecial()
+void texfile::beginspecial()
{
*out << settings::beginspecial(texengine);
}
-
-void texfile::endspecial()
+
+void texfile::endspecial()
{
*out << settings::endspecial() << newl;
}
-
-void texfile::beginraw()
+
+void texfile::beginraw()
{
*out << "\\ASYraw{" << newl;
}
-
-void texfile::endraw()
+
+void texfile::endraw()
{
*out << "}%" << newl;
}
-
+
void texfile::put(const string& label, const transform& T, const pair& z,
const pair& align)
{
double sign=settings::pdf(texengine) ? 1.0 : -1.0;
if(label.empty()) return;
-
+
bool trans=!T.isIdentity();
-
+
*out << "\\ASYalign";
if(trans) *out << "T";
- *out << "(" << (z.getx()-Hoffset)*ps2tex
- << "," << (z.gety()-box.bottom)*ps2tex
+ *out << "(" << (z.getx()-hoffset())*ps2tex
+ << "," << (z.gety()-voffset())*ps2tex
<< ")(" << align.getx()
- << "," << align.gety()
+ << "," << align.gety()
<< ")";
if(trans)
*out << "{" << T.getxx() << " " << sign*T.getyx()
@@ -332,35 +327,52 @@ void texfile::epilogue(bool pipe)
string svgtexfile::nl="{?nl}%\n";
-void svgtexfile::beginspecial()
+void svgtexfile::beginspecial(bool def)
{
inspecial=true;
out->unsetf(std::ios::fixed);
*out << "\\catcode`\\#=11%" << newl
- << "\\special{dvisvgm:raw" << nl;
+ << "\\special{dvisvgm:raw";
+ if(def)
+ *out << "def";
+ *out << nl;
}
-
+
void svgtexfile::endspecial()
{
+ if(!inspecial)
+ reportError("endspecial without matching beginspecial");
inspecial=false;
*out << "}\\catcode`\\#=6%" << newl;
out->setf(std::ios::fixed);
}
-
-void svgtexfile::begintransform()
+
+void svgtexfile::transform()
{
bbox b=box;
b.left=-Hoffset;
b=svgbbox(b);
- *out << "<g transform='matrix(" << tex2ps << " 0 0 " << tex2ps <<" "
- << b.left << " " << b.top << ")'>" << nl;
+ *out << "transform='matrix(" << tex2ps << " 0 0 " << tex2ps <<" "
+ << b.left << " " << b.top << ")'";
+}
+
+void svgtexfile::begintransform()
+{
+ if(clipstack.size() > 0) {
+ *out << "</g><g ";
+ clippath();
+ *out << ">" << nl;
+ }
+ *out << "<g ";
+ transform();
+ *out << ">" << nl;
}
-
+
void svgtexfile::endtransform()
{
*out << "</g>";
}
-
+
void svgtexfile::gsave(bool)
{
if(clipstack.size() < 1)
@@ -370,7 +382,7 @@ void svgtexfile::gsave(bool)
*out << "\\special{dvisvgm:raw <g>}%" << newl;
pens.push(lastpen);
}
-
+
void svgtexfile::grestore(bool)
{
if(pens.size() < 1 || clipstack.size() < 1)
@@ -386,71 +398,64 @@ void svgtexfile::clippath()
if(clipstack.size() > 0) {
size_t count=clipstack.top();
if(count > 0)
- *out << "clip-path='url(#clip" << count << ")' ";
+ *out << "clip-path='url(#Clip" << count << ")' ";
}
}
-
+
void svgtexfile::beginpath()
{
*out << "<path ";
- clippath();
*out << "d='";
}
-
+
void svgtexfile::endpath()
{
*out << "/>" << nl;
}
-
+
void svgtexfile::dot(path p, pen q, bool newPath)
{
beginspecial();
begintransform();
*out << "<circle ";
- clippath();
pair z=p.point((Int) 0);
- *out << "cx='" << z.getx()*ps2tex
- << "' cy='" << -z.gety()*ps2tex
+ *out << "cx='" << (z.getx()-offset.getx())*ps2tex
+ << "' cy='" << (-z.gety()+offset.gety())*ps2tex
<< "' r='" << 0.5*q.width()*ps2tex;
}
void svgtexfile::beginclip()
{
- beginspecial();
- begintransform();
+ beginspecial(true);
*out << "<clipPath ";
clippath();
++clipcount;
- *out << "id='clip" << clipcount << "'>" << nl;
- beginpath();
+ *out << "id='Clip" << clipcount << "'>" << nl;
+ *out << "<path ";
+ transform();
+ *out << " d='";
if(clipstack.size() > 0)
clipstack.pop();
clipstack.push(clipcount);
}
-
-void svgtexfile::endclip0(const pen &p)
+
+void svgtexfile::endclip(const pen &p)
{
*out << "'";
fillrule(p,"clip");
endpath();
*out << "</clipPath>" << nl;
-}
-
-void svgtexfile::endclip(const pen &p)
-{
- endclip0(p);
- endtransform();
endspecial();
}
void svgtexfile::fillrule(const pen& p, const string& type)
{
if(p.Fillrule() != lastpen.Fillrule())
- *out << " " << type << "-rule='" <<
+ *out << " " << type << "-rule='" <<
(p.evenodd() ? "evenodd" : "nonzero") << "'";
lastpen.setfillrule(p);
}
-
+
void svgtexfile::color(const pen &p, const string& type)
{
*out << "' " << type << "='#" << rgbhex(p) << "'";
@@ -472,19 +477,19 @@ void svgtexfile::properties(const pen& p)
{
if(p.cap() != lastpen.cap())
*out << " stroke-linecap='" << PSCap[p.cap()] << "'";
-
+
if(p.join() != lastpen.join())
*out << " stroke-linejoin='" << Join[p.join()] << "'";
-
+
if(p.miter() != lastpen.miter())
*out << " stroke-miterlimit='" << p.miter()*ps2tex << "'";
-
+
if(p.width() != lastpen.width())
*out << " stroke-width='" << p.width()*ps2tex << "'";
-
+
const LineType *linetype=p.linetype();
const LineType *lastlinetype=lastpen.linetype();
-
+
if(!(linetype->pattern == lastlinetype->pattern)) {
size_t n=linetype->pattern.size();
if(n > 0) {
@@ -495,26 +500,26 @@ void svgtexfile::properties(const pen& p)
*out << "'";
}
}
-
+
if(linetype->offset != lastlinetype->offset)
*out << " stroke-dashoffset='" << linetype->offset*ps2tex << "'";
-
+
lastpen=p;
}
-
+
void svgtexfile::stroke(const pen &p, bool dot)
{
- if(dot)
+ if(dot)
color(p,"fill");
else {
color(p,"fill='none' stroke");
- properties(p);
+ properties(p);
}
endpath();
endtransform();
endspecial();
}
-
+
void svgtexfile::strokepath()
{
reportWarning("SVG does not support strokepath");
@@ -526,19 +531,19 @@ void svgtexfile::begingradientshade(bool axial, ColorSpace colorspace,
{
string type=axial ? "linear" : "radial";
beginspecial();
+ begintransform();
*out << "<" << type << "Gradient id='grad" << gradientcount;
if(axial) {
- *out << "' x1='" << a.getx()*ps2tex << "' y1='" << -a.gety()*ps2tex
- << "' x2='" << b.getx()*ps2tex << "' y2='" << -b.gety()*ps2tex;
+ *out << "' x1='" << a.getx()*ps2tex << "' y1='" << (box.top-a.gety())*ps2tex
+ << "' x2='" << b.getx()*ps2tex << "' y2='" << (box.top-b.gety())*ps2tex;
} else {
- *out << "' cx='" << b.getx()*ps2tex << "' cy='" << -b.gety()*ps2tex
+ *out << "' cx='" << b.getx()*ps2tex << "' cy='" << (box.top-b.gety())*ps2tex
<< "' r='" << rb*ps2tex;
}
*out <<"' gradientUnits='userSpaceOnUse'>" << nl
<< "<stop offset='0' stop-color='#" << rgbhex(pena) << "'/>" << nl
<< "<stop offset='1' stop-color='#" << rgbhex(penb) << "'/>" << nl
<< "</" << type << "Gradient>" << nl;
- begintransform();
beginpath();
}
@@ -555,7 +560,7 @@ void svgtexfile::gradientshade(bool axial, ColorSpace colorspace,
endtransform();
endspecial();
}
-
+
// Return the point on the line through p and q that is closest to z.
pair closest(pair p, pair q, pair z)
{
@@ -565,47 +570,61 @@ pair closest(pair p, pair q, pair z)
}
void svgtexfile::gouraudshade(const pen& p0, const pair& z0,
- const pen& p1, const pair& z1,
+ const pen& p1, const pair& z1,
const pen& p2, const pair& z2)
{
string hex[]={rgbhex(p0),rgbhex(p1),rgbhex(p2)};
- pair Z[]={z0,z1,z2};
-
- *out << "<defs>" << nl
- << "<filter id='colorAdd'>" << nl
- << "<feBlend in='SourceGraphic' in2='BackgroundImage'/>" << nl
- << "</filter>";
+
+ *out << "<defs>" << nl;
+
+ pair Z0=(z0-offset)*ps2tex;
+ pair Z1=(z1-offset)*ps2tex;
+ pair Z2=(z2-offset)*ps2tex;
+
+ pair Z[]={Z0,Z1,Z2};
for(size_t k=0; k < 3; ++k) {
pair z=Z[k];
pair opp=closest(Z[(k+1) % 3],Z[(k+2) % 3],z);
- *out << "<linearGradient id='grad-" << gouraudcount << "-" << k
+ *out << "<linearGradient id='grad-" << gouraudcount << "-" << k
<< "' gradientUnits='userSpaceOnUse'" << nl
- << " x1='" << z.getx()*ps2tex << "' y1='" << -z.gety()*ps2tex
- << "' x2='" << opp.getx()*ps2tex << "' y2='" << -opp.gety()*ps2tex
+ << " x1='" << z.getx() << "' y1='" << -z.gety()
+ << "' x2='" << opp.getx() << "' y2='" << -opp.gety()
<< "'>" << nl
- << "<stop offset='0' stop-color='#" << hex[k]
+ << "<stop offset='0' stop-color='#" << hex[k]
<< "' stop-opacity='1'/>" << nl
- << "<stop offset='1' stop-color='#" << hex[k]
+ << "<stop offset='1' stop-color='#" << hex[k]
<< "' stop-opacity='0'/>" << nl
<< "</linearGradient>" << nl;
}
- *out << "<polygon ";
- clippath();
- *out << "id='triangle" << gouraudcount << "' points='"
- << z0.getx()*ps2tex << "," << -z0.gety()*ps2tex << " "
- << z1.getx()*ps2tex << "," << -z1.gety()*ps2tex << " "
- << z2.getx()*ps2tex << "," << -z2.gety()*ps2tex << "'/>" << nl
- << "</defs>" << nl;
- *out << "<use xlink:href='#triangle" << gouraudcount
- << "' fill='url(#grad-" << gouraudcount << "-"
- << "0)'/>" << nl
- << "<use xlink:href='#triangle" << gouraudcount
- << "' fill='url(#grad-" << gouraudcount << "-"
- << "1)' filter='url(#colorAdd)'/>" << nl
- << "<use xlink:href='#triangle" << gouraudcount
- << "' fill='url(#grad-" << gouraudcount << "-"
- << "2)' filter='url(#colorAdd)'/>" << nl;
+
+ *out << "<polygon points='"
+ << Z0.getx() << "," << -Z0.gety() << " "
+ << Z1.getx() << "," << -Z1.gety() << " "
+ << Z2.getx() << "," << -Z2.gety() << "'"
+ << " id='triangle-" << gouraudcount << "' />" << nl;
+
+ for(unsigned vertex=0; vertex < 3; ++vertex)
+ *out << "<use xlink:href='#triangle-" << gouraudcount
+ << "' fill='url(#grad-" << gouraudcount << "-" << vertex
+ << ")' id='triangle-" << gouraudcount << "-" << vertex << "' />"
+ << nl;
+
+ *out << "<filter id='Gouraud-" << gouraudcount << "'>" << nl;
+
+ for(unsigned vertex=0; vertex < 3; ++vertex)
+ *out << "<feImage xlink:href='#triangle-" << gouraudcount << "-" << vertex
+ << "' result='layer" << vertex << "' x='0' y='0' />" << nl;
+
+ *out << "<feComposite in='layer0' in2='layer1' operator='arithmetic' k1='0' k2='1' k3='1' k4='0' result='temp'/>" << nl
+ << "<feComposite in='temp' in2='layer2' operator='arithmetic' k1='0' k2='1' k3='1' k4='0' result='temp2' />" << nl
+ << "<feComposite in='temp2' in2='SourceGraphic' operator='arithmetic' k1='0' k2='1' k3='1' k4='0'/>" << nl
+ << "</filter>" << nl
+ << "</defs>" << nl
+ << "<rect width='100\\percent' height='100\\percent' fill='none' ";
+ *out << " filter='url(#Gouraud-" << gouraudcount << ")'"
+ << "/>" << nl;
+
++gouraudcount;
}
@@ -624,29 +643,31 @@ void svgtexfile::gouraudshade(const pen& pentype,
{
size_t size=pens.size();
if(size == 0) return;
-
- endclip0(pentype);
-
+
+ endclip(pentype);
+ beginspecial();
+ begintransform();
+
pen *p0=NULL,*p1=NULL,*p2=NULL;
pair z0,z1,z2;
-
+
for(size_t i=0; i < size; i++) {
Int edge=read<Int>(edges,i);
-
+
switch(edge) {
case 0:
p0=read<pen *>(pens,i);
z0=read<pair>(vertices,i);
++i;
- if(i < size) {
- p1=read<pen *>(pens,i);
- z1=read<pair>(vertices,i);
- ++i;
- if(i < size) {
- p2=read<pen *>(pens,i);
- z2=read<pair>(vertices,i);
- }
- }
+ if(i < size) {
+ p1=read<pen *>(pens,i);
+ z1=read<pair>(vertices,i);
+ ++i;
+ if(i < size) {
+ p2=read<pen *>(pens,i);
+ z2=read<pair>(vertices,i);
+ }
+ }
break;
case 1:
p0=read<pen *>(pens,i);
@@ -657,7 +678,7 @@ void svgtexfile::gouraudshade(const pen& pentype,
z1=read<pair>(vertices,i);
break;
default:
- break;
+ break;
}
if(p0 == NULL || p1 == NULL || p2 == NULL)
reportError("invalid edge flag");
@@ -667,67 +688,4 @@ void svgtexfile::gouraudshade(const pen& pentype,
endspecial();
}
-void svgtexfile::begintensorshade(const vm::array& pens,
- const vm::array& boundaries,
- const vm::array& z)
-{
- beginspecial();
- *out << "<defs>" << nl;
-
- path g=read<path>(boundaries,0);
- pair Z[]={g.point((Int) 0),g.point((Int) 3),g.point((Int) 2),
- g.point((Int) 1)};
-
- array *pi=read<array *>(pens,0);
- if(checkArray(pi) != 4)
- reportError("specify 4 pens for each path");
- string hex[]={rgbhex(read<pen>(pi,0)),rgbhex(read<pen>(pi,3)),
- rgbhex(read<pen>(pi,2)),rgbhex(read<pen>(pi,1))};
-
- *out << "<filter id='colorAdd'>" << nl
- << "<feBlend in='SourceGraphic' in2='BackgroundImage'/>" << nl
- << "</filter>";
-
- pair mean=0.25*(Z[0]+Z[1]+Z[2]+Z[3]);
- for(size_t k=0; k < 4; ++k) {
- pair opp=(k % 2 == 0) ? Z[(k+2) % 4] : mean;
- *out << "<linearGradient id='grad" << tensorcount << "-" << k
- << "' gradientUnits='userSpaceOnUse'" << nl
- << " x1='" << Z[k].getx()*ps2tex << "' y1='" << -Z[k].gety()*ps2tex
- << "' x2='" << opp.getx()*ps2tex << "' y2='" << -opp.gety()*ps2tex
- << "'>" << nl
- << "<stop offset='0' stop-color='#" << hex[k]
- << "' stop-opacity='1'/>" << nl
- << "<stop offset='1' stop-color='#" << hex[k]
- << "' stop-opacity='0'/>" << nl
- << "</linearGradient>" << nl;
- }
- beginpath();
-}
-
-void svgtexfile::tensorshade(const pen& pentype, const vm::array& pens,
- const vm::array& boundaries, const vm::array& z)
-{
- *out << "' id='path" << tensorcount << "'";
- fillrule(pentype);
- endpath();
- *out << "</defs></g>" << nl;
- begintransform();
- *out << "<use xlink:href='#path" << tensorcount
- << "' fill='url(#grad" << tensorcount << "-"
- << "0)'/>" << nl
- << "<use xlink:href='#path" << tensorcount
- << "' fill='url(#grad" << tensorcount << "-"
- << "2)' filter='url(#colorAdd)'/>" << nl
- << "<use xlink:href='#path" << tensorcount
- << "' fill='url(#grad" << tensorcount << "-"
- << "1)' filter='url(#colorAdd)'/>" << nl
- << "<use xlink:href='#path" << tensorcount
- << "' fill='url(#grad" << tensorcount << "-"
- << "3)' filter='url(#colorAdd)'/>" << nl;
-
- ++tensorcount;
- endspecial();
-}
-
} //namespace camp
diff --git a/Build/source/utils/asymptote/texfile.h b/Build/source/utils/asymptote/texfile.h
index cc9ffd82855..0c16fc91f1d 100644
--- a/Build/source/utils/asymptote/texfile.h
+++ b/Build/source/utils/asymptote/texfile.h
@@ -33,7 +33,7 @@ void texdocumentclass(T& out, bool pipe=false)
(pipe || !settings::getSetting<bool>("inlinetex")))
out << "\\documentclass[12pt]{article}" << newl;
}
-
+
template<class T>
void texuserpreamble(T& out,
mem::list<string>& preamble=processData().TeXpreamble,
@@ -45,9 +45,9 @@ void texuserpreamble(T& out,
if(pipe) out << newl << newl;
}
}
-
+
template<class T>
-void latexfontencoding(T& out)
+void latexfontencoding(T& out)
{
out << "\\makeatletter%" << newl
<< "\\let\\ASYencoding\\f@encoding%" << newl
@@ -96,7 +96,7 @@ template<class T>
void dvipsfix(T &out)
{
if(!settings::pdf(settings::getSetting<string>("tex"))) {
- out << "\\makeatletter" << newl
+ out << "\\makeatletter" << newl
<< "\\def\\Ginclude@eps#1{%" << newl
<< " \\message{<#1>}%" << newl
<< " \\bgroup" << newl
@@ -123,8 +123,27 @@ template<class T>
void texdefines(T& out, mem::list<string>& preamble=processData().TeXpreamble,
bool pipe=false)
{
- if(pipe || !settings::getSetting<bool>("inlinetex"))
+ string texengine=settings::getSetting<string>("tex");
+ bool latex=settings::latex(texengine);
+ bool inlinetex=settings::getSetting<bool>("inlinetex");
+ if(pipe || !inlinetex) {
+ if(latex) {
+ if(texengine == "lualatex") {
+ out << "\\ifx\\pdfpagewidth\\undefined\\let\\pdfpagewidth\\paperwidth"
+ << "\\fi" << newl
+ << "\\ifx\\pdfpageheight\\undefined\\let\\pdfpageheight"
+ << "\\paperheight"
+ << "\\fi" << newl
+ << "\\usepackage{graphicx}" << newl;
+ } else {
+ out << "\\let\\paperwidthsave\\paperwidth\\let\\paperwidth\\undefined"
+ << newl
+ << "\\usepackage{graphicx}" << newl
+ << "\\let\\paperwidth\\paperwidthsave" << newl;
+ }
+ }
texpreamble(out,preamble,pipe);
+ }
if(pipe) {
// Make tex pipe aware of a previously generated aux file.
@@ -137,14 +156,11 @@ void texdefines(T& out, mem::list<string>& preamble=processData().TeXpreamble,
fout << s << endl;
}
}
- string texengine=settings::getSetting<string>("tex");
- if(settings::latex(texengine)) {
- if(pipe || !settings::getSetting<bool>("inlinetex")) {
- out << "\\usepackage{graphicx}" << newl;
- if(!pipe) {
- dvipsfix(out);
- out << "\\usepackage{color}" << newl;
- }
+
+ if(latex) {
+ if(!inlinetex) {
+ dvipsfix(out);
+ out << "\\usepackage{color}" << newl;
}
if(pipe) {
out << "\\begin{document}" << newl;
@@ -152,7 +168,7 @@ void texdefines(T& out, mem::list<string>& preamble=processData().TeXpreamble,
}
} else if(!settings::context(texengine)) {
out << "\\input graphicx" << newl // Fix miniltx path parsing bug:
- << "\\makeatletter" << newl
+ << "\\makeatletter" << newl
<< "\\def\\filename@parse#1{%" << newl
<< " \\let\\filename@area\\@empty" << newl
<< " \\expandafter\\filename@path#1/\\\\}" << newl
@@ -171,12 +187,12 @@ void texdefines(T& out, mem::list<string>& preamble=processData().TeXpreamble,
out << "\\input picture" << newl;
}
}
-
+
template<class T>
bool setlatexfont(T& out, const pen& p, const pen& lastpen)
{
if(p.size() != lastpen.size() || p.Lineskip() != lastpen.Lineskip()) {
- out << "\\fontsize{" << p.size()*settings::ps2tex << "}{"
+ out << "\\fontsize{" << p.size()*settings::ps2tex << "}{"
<< p.Lineskip()*settings::ps2tex << "}\\selectfont%" << newl;
return true;
}
@@ -184,7 +200,7 @@ bool setlatexfont(T& out, const pen& p, const pen& lastpen)
}
template<class T>
-bool settexfont(T& out, const pen& p, const pen& lastpen, bool latex)
+bool settexfont(T& out, const pen& p, const pen& lastpen, bool latex)
{
string font=p.Font();
if(font != lastpen.Font() || (!latex && p.size() != lastpen.size())) {
@@ -195,15 +211,15 @@ bool settexfont(T& out, const pen& p, const pen& lastpen, bool latex)
}
class texfile : public psfile {
-protected:
+protected:
bbox box;
bool inlinetex;
double Hoffset;
int level;
-
+
public:
string texengine;
-
+
texfile(const string& texname, const bbox& box, bool pipe=false);
virtual ~texfile();
@@ -215,39 +231,40 @@ public:
void setlatexcolor(pen p);
void setpen(pen p);
-
+
void setfont(pen p);
-
+
void gsave(bool tex=true);
-
+
void grestore(bool tex=true);
-
+
void beginspecial();
-
+
void endspecial();
-
+
void beginraw();
-
+
void endraw();
-
+
void begingroup() {++level;}
-
+
void endgroup() {--level;}
-
+
bool toplevel() {return level == 0;}
-
+
void beginpicture(const bbox& b);
void endpicture(const bbox& b);
-
+
void writepair(pair z) {
*out << z;
}
-
+
void miniprologue();
-
+
void writeshifted(path p, bool newPath=true);
- double hoffset() {return Hoffset;}
-
+ virtual double hoffset() {return Hoffset;}
+ virtual double voffset() {return box.bottom;}
+
// Draws label transformed by T at position z.
void put(const string& label, const transform& T, const pair& z,
const pair& Align);
@@ -264,7 +281,8 @@ class svgtexfile : public texfile {
size_t tensorcount;
bool inspecial;
static string nl;
-public:
+ pair offset;
+public:
svgtexfile(const string& texname, const bbox& box, bool pipe=false) :
texfile(texname,box,pipe) {
clipcount=0;
@@ -272,52 +290,62 @@ public:
gouraudcount=0;
tensorcount=0;
inspecial=false;
+
+ *out << "\\catcode`\\%=12" << newl
+ << "\\def\\percent{%}" << newl
+ << "\\catcode`\\%=14" << newl;
+
+ offset=pair(box.left,box.top);
}
-
+
void writeclip(path p, bool newPath=true) {
write(p,false);
}
-
+
void dot(path p, pen, bool newPath=true);
-
+
void writeshifted(pair z) {
- write(conj(z)*settings::ps2tex);
+ write(conj(shift(-offset)*z)*settings::ps2tex);
}
-
+
+ double hoffset() {return Hoffset+offset.getx();}
+ double voffset() {return box.bottom+offset.gety();}
+
void translate(pair z) {}
void concat(transform t) {}
-
- void beginspecial();
+
+ void beginspecial(bool def=false);
void endspecial();
-
+
// Prevent unwanted page breaks.
void beginpage() {
beginpicture(box);
}
-
+
void endpage() {
endpicture(box);
}
-
+
+ void transform();
void begintransform();
void endtransform();
-
+
void clippath();
-
+
void beginpath();
void endpath();
-
+
void newpath() {
beginspecial();
begintransform();
beginpath();
}
-
+
void moveto(pair z) {
*out << "M";
writeshifted(z);
}
-
+
void lineto(pair z) {
*out << "L";
writeshifted(z);
@@ -336,16 +364,16 @@ public:
p.torgb();
return p.hex();
}
-
+
void properties(const pen& p);
void color(const pen &p, const string& type);
-
+
void stroke(const pen &p, bool dot=false);
void strokepath();
-
+
void fillrule(const pen& p, const string& type="fill");
void fill(const pen &p);
-
+
void begingradientshade(bool axial, ColorSpace colorspace,
const pen& pena, const pair& a, double ra,
const pen& penb, const pair& b, double rb);
@@ -353,34 +381,27 @@ public:
const pen& pena, const pair& a, double ra,
bool extenda, const pen& penb, const pair& b,
double rb, bool extendb);
-
+
void gouraudshade(const pen& p0, const pair& z0,
- const pen& p1, const pair& z1,
+ const pen& p1, const pair& z1,
const pen& p2, const pair& z2);
void begingouraudshade(const vm::array& pens, const vm::array& vertices,
const vm::array& edges);
void gouraudshade(const pen& pentype, const vm::array& pens,
const vm::array& vertices, const vm::array& edges);
-
- void begintensorshade(const vm::array& pens,
- const vm::array& boundaries,
- const vm::array& z);
- void tensorshade(const pen& pentype, const vm::array& pens,
- const vm::array& boundaries, const vm::array& z);
void beginclip();
-
- void endclip0(const pen &p);
+
void endclip(const pen &p);
void endpsclip(const pen &p) {}
-
+
void setpen(pen p) {if(!inspecial) texfile::setpen(p);}
-
+
void gsave(bool tex=false);
-
+
void grestore(bool tex=false);
};
-
+
} //namespace camp
#endif
diff --git a/Build/source/utils/asymptote/tr.cc b/Build/source/utils/asymptote/tr.cc
index eee9a76c483..1882675cdfa 100644
--- a/Build/source/utils/asymptote/tr.cc
+++ b/Build/source/utils/asymptote/tr.cc
@@ -70,35 +70,35 @@ using gl::frustum;
using gl::ortho;
struct _TRctx {
- /* Final image parameters */
- GLint ImageWidth, ImageHeight;
- GLenum ImageFormat, ImageType;
- GLvoid *ImageBuffer;
-
- /* Tile parameters */
- GLint TileWidth, TileHeight;
- GLint TileWidthNB, TileHeightNB;
- GLint TileBorder;
- GLenum TileFormat, TileType;
- GLvoid *TileBuffer;
-
- /* Projection parameters */
- GLboolean Perspective;
- GLdouble Left;
- GLdouble Right;
- GLdouble Bottom;
- GLdouble Top;
- GLdouble Near;
- GLdouble Far;
-
- /* Misc */
- TRenum RowOrder;
- GLint Rows, Columns;
- GLint CurrentTile;
- GLint CurrentTileWidth, CurrentTileHeight;
- GLint CurrentRow, CurrentColumn;
-
- GLint ViewportSave[4];
+ /* Final image parameters */
+ GLint ImageWidth, ImageHeight;
+ GLenum ImageFormat, ImageType;
+ GLvoid *ImageBuffer;
+
+ /* Tile parameters */
+ GLint TileWidth, TileHeight;
+ GLint TileWidthNB, TileHeightNB;
+ GLint TileBorder;
+ GLenum TileFormat, TileType;
+ GLvoid *TileBuffer;
+
+ /* Projection parameters */
+ GLboolean Perspective;
+ GLdouble Left;
+ GLdouble Right;
+ GLdouble Bottom;
+ GLdouble Top;
+ GLdouble Near;
+ GLdouble Far;
+
+ /* Misc */
+ TRenum RowOrder;
+ GLint Rows, Columns;
+ GLint CurrentTile;
+ GLint CurrentTileWidth, CurrentTileHeight;
+ GLint CurrentRow, CurrentColumn;
+
+ GLint ViewportSave[4];
};
@@ -108,145 +108,145 @@ struct _TRctx {
*/
static void Setup(TRcontext *tr)
{
- if (!tr)
- return;
+ if (!tr)
+ return;
- tr->Columns = (tr->ImageWidth + tr->TileWidthNB - 1) / tr->TileWidthNB;
- tr->Rows = (tr->ImageHeight + tr->TileHeightNB - 1) / tr->TileHeightNB;
- tr->CurrentTile = 0;
+ tr->Columns = (tr->ImageWidth + tr->TileWidthNB - 1) / tr->TileWidthNB;
+ tr->Rows = (tr->ImageHeight + tr->TileHeightNB - 1) / tr->TileHeightNB;
+ tr->CurrentTile = 0;
- assert(tr->Columns >= 0);
- assert(tr->Rows >= 0);
+ assert(tr->Columns >= 0);
+ assert(tr->Rows >= 0);
}
TRcontext *trNew(void)
{
- TRcontext *tr = (TRcontext *) calloc(1, sizeof(TRcontext));
- if (tr) {
- tr->TileWidth = DEFAULT_TILE_WIDTH;
- tr->TileHeight = DEFAULT_TILE_HEIGHT;
- tr->TileBorder = DEFAULT_TILE_BORDER;
- tr->RowOrder = TR_BOTTOM_TO_TOP;
- tr->CurrentTile = -1;
- }
- return (TRcontext *) tr;
+ TRcontext *tr = (TRcontext *) calloc(1, sizeof(TRcontext));
+ if (tr) {
+ tr->TileWidth = DEFAULT_TILE_WIDTH;
+ tr->TileHeight = DEFAULT_TILE_HEIGHT;
+ tr->TileBorder = DEFAULT_TILE_BORDER;
+ tr->RowOrder = TR_BOTTOM_TO_TOP;
+ tr->CurrentTile = -1;
+ }
+ return (TRcontext *) tr;
}
void trDelete(TRcontext *tr)
{
- if (tr)
- free(tr);
+ if (tr)
+ free(tr);
}
void trTileSize(TRcontext *tr, GLint width, GLint height, GLint border)
{
- if (!tr)
- return;
-
- assert(border >= 0);
- assert(width >= 1);
- assert(height >= 1);
- assert(width >= 2*border);
- assert(height >= 2*border);
-
- tr->TileBorder = border;
- tr->TileWidth = width;
- tr->TileHeight = height;
- tr->TileWidthNB = width - 2 * border;
- tr->TileHeightNB = height - 2 * border;
- Setup(tr);
+ if (!tr)
+ return;
+
+ assert(border >= 0);
+ assert(width >= 1);
+ assert(height >= 1);
+ assert(width >= 2*border);
+ assert(height >= 2*border);
+
+ tr->TileBorder = border;
+ tr->TileWidth = width;
+ tr->TileHeight = height;
+ tr->TileWidthNB = width - 2 * border;
+ tr->TileHeightNB = height - 2 * border;
+ Setup(tr);
}
void trTileBuffer(TRcontext *tr, GLenum format, GLenum type, GLvoid *image)
{
- if (!tr)
- return;
+ if (!tr)
+ return;
- tr->TileFormat = format;
- tr->TileType = type;
- tr->TileBuffer = image;
+ tr->TileFormat = format;
+ tr->TileType = type;
+ tr->TileBuffer = image;
}
void trImageSize(TRcontext *tr, GLint width, GLint height)
{
- if (!tr)
- return;
+ if (!tr)
+ return;
- tr->ImageWidth = width;
- tr->ImageHeight = height;
- Setup(tr);
+ tr->ImageWidth = width;
+ tr->ImageHeight = height;
+ Setup(tr);
}
void trImageBuffer(TRcontext *tr, GLenum format, GLenum type, GLvoid *image)
{
- if (!tr)
- return;
+ if (!tr)
+ return;
- tr->ImageFormat = format;
- tr->ImageType = type;
- tr->ImageBuffer = image;
+ tr->ImageFormat = format;
+ tr->ImageType = type;
+ tr->ImageBuffer = image;
}
GLint trGet(TRcontext *tr, TRenum param)
{
- if (!tr)
+ if (!tr)
+ return 0;
+
+ switch (param) {
+ case TR_TILE_WIDTH:
+ return tr->TileWidth;
+ case TR_TILE_HEIGHT:
+ return tr->TileHeight;
+ case TR_TILE_BORDER:
+ return tr->TileBorder;
+ case TR_IMAGE_WIDTH:
+ return tr->ImageWidth;
+ case TR_IMAGE_HEIGHT:
+ return tr->ImageHeight;
+ case TR_ROWS:
+ return tr->Rows;
+ case TR_COLUMNS:
+ return tr->Columns;
+ case TR_CURRENT_ROW:
+ if (tr->CurrentTile<0)
+ return -1;
+ else
+ return tr->CurrentRow;
+ case TR_CURRENT_COLUMN:
+ if (tr->CurrentTile<0)
+ return -1;
+ else
+ return tr->CurrentColumn;
+ case TR_CURRENT_TILE_WIDTH:
+ return tr->CurrentTileWidth;
+ case TR_CURRENT_TILE_HEIGHT:
+ return tr->CurrentTileHeight;
+ case TR_ROW_ORDER:
+ return (GLint) tr->RowOrder;
+ default:
return 0;
-
- switch (param) {
- case TR_TILE_WIDTH:
- return tr->TileWidth;
- case TR_TILE_HEIGHT:
- return tr->TileHeight;
- case TR_TILE_BORDER:
- return tr->TileBorder;
- case TR_IMAGE_WIDTH:
- return tr->ImageWidth;
- case TR_IMAGE_HEIGHT:
- return tr->ImageHeight;
- case TR_ROWS:
- return tr->Rows;
- case TR_COLUMNS:
- return tr->Columns;
- case TR_CURRENT_ROW:
- if (tr->CurrentTile<0)
- return -1;
- else
- return tr->CurrentRow;
- case TR_CURRENT_COLUMN:
- if (tr->CurrentTile<0)
- return -1;
- else
- return tr->CurrentColumn;
- case TR_CURRENT_TILE_WIDTH:
- return tr->CurrentTileWidth;
- case TR_CURRENT_TILE_HEIGHT:
- return tr->CurrentTileHeight;
- case TR_ROW_ORDER:
- return (GLint) tr->RowOrder;
- default:
- return 0;
- }
+ }
}
void trRowOrder(TRcontext *tr, TRenum order)
{
- if (!tr)
- return;
+ if (!tr)
+ return;
- if (order==TR_TOP_TO_BOTTOM || order==TR_BOTTOM_TO_TOP)
- tr->RowOrder = order;
+ if (order==TR_TOP_TO_BOTTOM || order==TR_BOTTOM_TO_TOP)
+ tr->RowOrder = order;
}
@@ -255,16 +255,16 @@ void trOrtho(TRcontext *tr,
GLdouble bottom, GLdouble top,
GLdouble zNear, GLdouble zFar)
{
- if (!tr)
- return;
-
- tr->Perspective = GL_FALSE;
- tr->Left = left;
- tr->Right = right;
- tr->Bottom = bottom;
- tr->Top = top;
- tr->Near = zNear;
- tr->Far = zFar;
+ if (!tr)
+ return;
+
+ tr->Perspective = GL_FALSE;
+ tr->Left = left;
+ tr->Right = right;
+ tr->Bottom = bottom;
+ tr->Top = top;
+ tr->Near = zNear;
+ tr->Far = zFar;
}
@@ -273,16 +273,16 @@ void trFrustum(TRcontext *tr,
GLdouble bottom, GLdouble top,
GLdouble zNear, GLdouble zFar)
{
- if (!tr)
- return;
-
- tr->Perspective = GL_TRUE;
- tr->Left = left;
- tr->Right = right;
- tr->Bottom = bottom;
- tr->Top = top;
- tr->Near = zNear;
- tr->Far = zFar;
+ if (!tr)
+ return;
+
+ tr->Perspective = GL_TRUE;
+ tr->Left = left;
+ tr->Right = right;
+ tr->Bottom = bottom;
+ tr->Top = top;
+ tr->Near = zNear;
+ tr->Far = zFar;
}
@@ -290,144 +290,144 @@ void trPerspective(TRcontext *tr,
GLdouble fovy, GLdouble aspect,
GLdouble zNear, GLdouble zFar )
{
- GLdouble xmin, xmax, ymin, ymax;
- static const double halfradians=acos(-1.0)/360.0;
- ymax = zNear * tan(fovy * halfradians);
- ymin = -ymax;
- xmin = ymin * aspect;
- xmax = ymax * aspect;
- trFrustum(tr, xmin, xmax, ymin, ymax, zNear, zFar);
+ GLdouble xmin, xmax, ymin, ymax;
+ static const double halfradians=acos(-1.0)/360.0;
+ ymax = zNear * tan(fovy * halfradians);
+ ymin = -ymax;
+ xmin = ymin * aspect;
+ xmax = ymax * aspect;
+ trFrustum(tr, xmin, xmax, ymin, ymax, zNear, zFar);
}
void trBeginTile(TRcontext *tr)
{
- GLint tileWidth, tileHeight, border;
- GLdouble left, right, bottom, top;
-
- if (!tr)
- return;
-
- if (tr->CurrentTile <= 0) {
- Setup(tr);
- /* Save user's viewport, will be restored after last tile rendered */
- glGetIntegerv(GL_VIEWPORT, tr->ViewportSave);
- }
-
- /* which tile (by row and column) we're about to render */
- if (tr->RowOrder==TR_BOTTOM_TO_TOP) {
- tr->CurrentRow = tr->CurrentTile / tr->Columns;
- tr->CurrentColumn = tr->CurrentTile % tr->Columns;
- }
- else if (tr->RowOrder==TR_TOP_TO_BOTTOM) {
- tr->CurrentRow = tr->Rows - (tr->CurrentTile / tr->Columns) - 1;
- tr->CurrentColumn = tr->CurrentTile % tr->Columns;
- }
- else {
- /* This should never happen */
- abort();
- }
- assert(tr->CurrentRow < tr->Rows);
- assert(tr->CurrentColumn < tr->Columns);
-
- border = tr->TileBorder;
-
- /* Compute actual size of this tile with border */
- if (tr->CurrentRow < tr->Rows-1)
- tileHeight = tr->TileHeight;
- else
- tileHeight = tr->ImageHeight - (tr->Rows-1) * (tr->TileHeightNB) + 2 * border;
-
- if (tr->CurrentColumn < tr->Columns-1)
- tileWidth = tr->TileWidth;
- else
- tileWidth = tr->ImageWidth - (tr->Columns-1) * (tr->TileWidthNB) + 2 * border;
-
- /* Save tile size, with border */
- tr->CurrentTileWidth = tileWidth;
- tr->CurrentTileHeight = tileHeight;
-
- glViewport(0, 0, tileWidth, tileHeight); /* tile size including border */
-
- /* compute projection parameters */
- left = tr->Left + (tr->Right - tr->Left)
- * (tr->CurrentColumn * tr->TileWidthNB - border) / tr->ImageWidth;
- right = left + (tr->Right - tr->Left) * tileWidth / tr->ImageWidth;
- bottom = tr->Bottom + (tr->Top - tr->Bottom)
- * (tr->CurrentRow * tr->TileHeightNB - border) / tr->ImageHeight;
- top = bottom + (tr->Top - tr->Bottom) * tileHeight / tr->ImageHeight;
-
- if (tr->Perspective)
- frustum(left, right, bottom, top, tr->Near, tr->Far);
- else
- ortho(left, right, bottom, top, tr->Near, tr->Far);
+ GLint tileWidth, tileHeight, border;
+ GLdouble left, right, bottom, top;
+
+ if (!tr)
+ return;
+
+ if (tr->CurrentTile <= 0) {
+ Setup(tr);
+ /* Save user's viewport, will be restored after last tile rendered */
+ glGetIntegerv(GL_VIEWPORT, tr->ViewportSave);
+ }
+
+ /* which tile (by row and column) we're about to render */
+ if (tr->RowOrder==TR_BOTTOM_TO_TOP) {
+ tr->CurrentRow = tr->CurrentTile / tr->Columns;
+ tr->CurrentColumn = tr->CurrentTile % tr->Columns;
+ }
+ else if (tr->RowOrder==TR_TOP_TO_BOTTOM) {
+ tr->CurrentRow = tr->Rows - (tr->CurrentTile / tr->Columns) - 1;
+ tr->CurrentColumn = tr->CurrentTile % tr->Columns;
+ }
+ else {
+ /* This should never happen */
+ abort();
+ }
+ assert(tr->CurrentRow < tr->Rows);
+ assert(tr->CurrentColumn < tr->Columns);
+
+ border = tr->TileBorder;
+
+ /* Compute actual size of this tile with border */
+ if (tr->CurrentRow < tr->Rows-1)
+ tileHeight = tr->TileHeight;
+ else
+ tileHeight = tr->ImageHeight - (tr->Rows-1) * (tr->TileHeightNB) + 2 * border;
+
+ if (tr->CurrentColumn < tr->Columns-1)
+ tileWidth = tr->TileWidth;
+ else
+ tileWidth = tr->ImageWidth - (tr->Columns-1) * (tr->TileWidthNB) + 2 * border;
+
+ /* Save tile size, with border */
+ tr->CurrentTileWidth = tileWidth;
+ tr->CurrentTileHeight = tileHeight;
+
+ glViewport(0, 0, tileWidth, tileHeight); /* tile size including border */
+
+ /* compute projection parameters */
+ left = tr->Left + (tr->Right - tr->Left)
+ * (tr->CurrentColumn * tr->TileWidthNB - border) / tr->ImageWidth;
+ right = left + (tr->Right - tr->Left) * tileWidth / tr->ImageWidth;
+ bottom = tr->Bottom + (tr->Top - tr->Bottom)
+ * (tr->CurrentRow * tr->TileHeightNB - border) / tr->ImageHeight;
+ top = bottom + (tr->Top - tr->Bottom) * tileHeight / tr->ImageHeight;
+
+ if (tr->Perspective)
+ frustum(left, right, bottom, top, tr->Near, tr->Far);
+ else
+ ortho(left, right, bottom, top, tr->Near, tr->Far);
}
int trEndTile(TRcontext *tr)
{
- GLint prevRowLength, prevSkipRows, prevSkipPixels;
-
- if (!tr)
- return 0;
-
- assert(tr->CurrentTile>=0);
-
- /* be sure OpenGL rendering is finished */
- glFlush();
-
- /* save current glPixelStore values */
- glGetIntegerv(GL_PACK_ROW_LENGTH, &prevRowLength);
- glGetIntegerv(GL_PACK_SKIP_ROWS, &prevSkipRows);
- glGetIntegerv(GL_PACK_SKIP_PIXELS, &prevSkipPixels);
- /*glGetIntegerv(GL_PACK_ALIGNMENT, &prevAlignment);*/
-
- if (tr->TileBuffer) {
- GLint srcX = tr->TileBorder;
- GLint srcY = tr->TileBorder;
- GLint srcWidth = tr->TileWidthNB;
- GLint srcHeight = tr->TileHeightNB;
- glReadPixels(srcX, srcY, srcWidth, srcHeight,
- tr->TileFormat, tr->TileType, tr->TileBuffer);
- }
-
- if (tr->ImageBuffer) {
- GLint srcX = tr->TileBorder;
- GLint srcY = tr->TileBorder;
- GLint srcWidth = tr->CurrentTileWidth - 2 * tr->TileBorder;
- GLint srcHeight = tr->CurrentTileHeight - 2 * tr->TileBorder;
- GLint destX = tr->TileWidthNB * tr->CurrentColumn;
- GLint destY = tr->TileHeightNB * tr->CurrentRow;
-
- /* setup pixel store for glReadPixels */
- glPixelStorei(GL_PACK_ROW_LENGTH, tr->ImageWidth);
- glPixelStorei(GL_PACK_SKIP_ROWS, destY);
- glPixelStorei(GL_PACK_SKIP_PIXELS, destX);
- /*glPixelStorei(GL_PACK_ALIGNMENT, 1);*/
-
- /* read the tile into the final image */
- glReadPixels(srcX, srcY, srcWidth, srcHeight,
- tr->ImageFormat, tr->ImageType, tr->ImageBuffer);
- }
-
- /* restore previous glPixelStore values */
- glPixelStorei(GL_PACK_ROW_LENGTH, prevRowLength);
- glPixelStorei(GL_PACK_SKIP_ROWS, prevSkipRows);
- glPixelStorei(GL_PACK_SKIP_PIXELS, prevSkipPixels);
- /*glPixelStorei(GL_PACK_ALIGNMENT, prevAlignment);*/
-
- /* increment tile counter, return 1 if more tiles left to render */
- tr->CurrentTile++;
- if (tr->CurrentTile >= tr->Rows * tr->Columns) {
- /* restore user's viewport */
- glViewport(tr->ViewportSave[0], tr->ViewportSave[1],
- tr->ViewportSave[2], tr->ViewportSave[3]);
- tr->CurrentTile = -1; /* all done */
- return 0;
- }
- else
- return 1;
+ GLint prevRowLength, prevSkipRows, prevSkipPixels;
+
+ if (!tr)
+ return 0;
+
+ assert(tr->CurrentTile>=0);
+
+ /* be sure OpenGL rendering is finished */
+ glFlush();
+
+ /* save current glPixelStore values */
+ glGetIntegerv(GL_PACK_ROW_LENGTH, &prevRowLength);
+ glGetIntegerv(GL_PACK_SKIP_ROWS, &prevSkipRows);
+ glGetIntegerv(GL_PACK_SKIP_PIXELS, &prevSkipPixels);
+ /*glGetIntegerv(GL_PACK_ALIGNMENT, &prevAlignment);*/
+
+ if (tr->TileBuffer) {
+ GLint srcX = tr->TileBorder;
+ GLint srcY = tr->TileBorder;
+ GLint srcWidth = tr->TileWidthNB;
+ GLint srcHeight = tr->TileHeightNB;
+ glReadPixels(srcX, srcY, srcWidth, srcHeight,
+ tr->TileFormat, tr->TileType, tr->TileBuffer);
+ }
+
+ if (tr->ImageBuffer) {
+ GLint srcX = tr->TileBorder;
+ GLint srcY = tr->TileBorder;
+ GLint srcWidth = tr->CurrentTileWidth - 2 * tr->TileBorder;
+ GLint srcHeight = tr->CurrentTileHeight - 2 * tr->TileBorder;
+ GLint destX = tr->TileWidthNB * tr->CurrentColumn;
+ GLint destY = tr->TileHeightNB * tr->CurrentRow;
+
+ /* setup pixel store for glReadPixels */
+ glPixelStorei(GL_PACK_ROW_LENGTH, tr->ImageWidth);
+ glPixelStorei(GL_PACK_SKIP_ROWS, destY);
+ glPixelStorei(GL_PACK_SKIP_PIXELS, destX);
+ /*glPixelStorei(GL_PACK_ALIGNMENT, 1);*/
+
+ /* read the tile into the final image */
+ glReadPixels(srcX, srcY, srcWidth, srcHeight,
+ tr->ImageFormat, tr->ImageType, tr->ImageBuffer);
+ }
+
+ /* restore previous glPixelStore values */
+ glPixelStorei(GL_PACK_ROW_LENGTH, prevRowLength);
+ glPixelStorei(GL_PACK_SKIP_ROWS, prevSkipRows);
+ glPixelStorei(GL_PACK_SKIP_PIXELS, prevSkipPixels);
+ /*glPixelStorei(GL_PACK_ALIGNMENT, prevAlignment);*/
+
+ /* increment tile counter, return 1 if more tiles left to render */
+ tr->CurrentTile++;
+ if (tr->CurrentTile >= tr->Rows * tr->Columns) {
+ /* restore user's viewport */
+ glViewport(tr->ViewportSave[0], tr->ViewportSave[1],
+ tr->ViewportSave[2], tr->ViewportSave[3]);
+ tr->CurrentTile = -1; /* all done */
+ return 0;
+ }
+ else
+ return 1;
}
#endif
diff --git a/Build/source/utils/asymptote/tr.h b/Build/source/utils/asymptote/tr.h
index b0ecd1a1305..d1c7dfb04ef 100644
--- a/Build/source/utils/asymptote/tr.h
+++ b/Build/source/utils/asymptote/tr.h
@@ -96,72 +96,72 @@ extern "C" {
#define TR_MINOR_VERSION 1
-typedef struct _TRctx TRcontext;
+ typedef struct _TRctx TRcontext;
-typedef enum {
- TR_TILE_WIDTH = 100,
- TR_TILE_HEIGHT,
- TR_TILE_BORDER,
- TR_IMAGE_WIDTH,
- TR_IMAGE_HEIGHT,
- TR_ROWS,
- TR_COLUMNS,
- TR_CURRENT_ROW,
- TR_CURRENT_COLUMN,
- TR_CURRENT_TILE_WIDTH,
- TR_CURRENT_TILE_HEIGHT,
- TR_ROW_ORDER,
- TR_TOP_TO_BOTTOM,
- TR_BOTTOM_TO_TOP
-} TRenum;
+ typedef enum {
+ TR_TILE_WIDTH = 100,
+ TR_TILE_HEIGHT,
+ TR_TILE_BORDER,
+ TR_IMAGE_WIDTH,
+ TR_IMAGE_HEIGHT,
+ TR_ROWS,
+ TR_COLUMNS,
+ TR_CURRENT_ROW,
+ TR_CURRENT_COLUMN,
+ TR_CURRENT_TILE_WIDTH,
+ TR_CURRENT_TILE_HEIGHT,
+ TR_ROW_ORDER,
+ TR_TOP_TO_BOTTOM,
+ TR_BOTTOM_TO_TOP
+ } TRenum;
-extern TRcontext *trNew(void);
+ extern TRcontext *trNew(void);
-extern void trDelete(TRcontext *tr);
+ extern void trDelete(TRcontext *tr);
-extern void trTileSize(TRcontext *tr, GLint width, GLint height, GLint border);
+ extern void trTileSize(TRcontext *tr, GLint width, GLint height, GLint border);
-extern void trTileBuffer(TRcontext *tr, GLenum format, GLenum type,
- GLvoid *image);
+ extern void trTileBuffer(TRcontext *tr, GLenum format, GLenum type,
+ GLvoid *image);
-extern void trImageSize(TRcontext *tr, GLint width, GLint height);
+ extern void trImageSize(TRcontext *tr, GLint width, GLint height);
-extern void trImageBuffer(TRcontext *tr, GLenum format, GLenum type,
- GLvoid *image);
+ extern void trImageBuffer(TRcontext *tr, GLenum format, GLenum type,
+ GLvoid *image);
-extern void trRowOrder(TRcontext *tr, TRenum order);
+ extern void trRowOrder(TRcontext *tr, TRenum order);
-extern GLint trGet(TRcontext *tr, TRenum param);
+ extern GLint trGet(TRcontext *tr, TRenum param);
-extern void trOrtho(TRcontext *tr,
- GLdouble left, GLdouble right,
- GLdouble bottom, GLdouble top,
- GLdouble zNear, GLdouble zFar);
+ extern void trOrtho(TRcontext *tr,
+ GLdouble left, GLdouble right,
+ GLdouble bottom, GLdouble top,
+ GLdouble zNear, GLdouble zFar);
-extern void trFrustum(TRcontext *tr,
- GLdouble left, GLdouble right,
- GLdouble bottom, GLdouble top,
- GLdouble zNear, GLdouble zFar);
+ extern void trFrustum(TRcontext *tr,
+ GLdouble left, GLdouble right,
+ GLdouble bottom, GLdouble top,
+ GLdouble zNear, GLdouble zFar);
-extern void trPerspective(TRcontext *tr,
- GLdouble fovy, GLdouble aspect,
- GLdouble zNear, GLdouble zFar );
+ extern void trPerspective(TRcontext *tr,
+ GLdouble fovy, GLdouble aspect,
+ GLdouble zNear, GLdouble zFar );
-extern void trBeginTile(TRcontext *tr);
+ extern void trBeginTile(TRcontext *tr);
-extern int trEndTile(TRcontext *tr);
+ extern int trEndTile(TRcontext *tr);
-extern void trRasterPos3f(TRcontext *tr, GLfloat x, GLfloat y, GLfloat z);
+ extern void trRasterPos3f(TRcontext *tr, GLfloat x, GLfloat y, GLfloat z);
diff --git a/Build/source/utils/asymptote/transform.h b/Build/source/utils/asymptote/transform.h
index d421e2baec2..e8e9fff1478 100644
--- a/Build/source/utils/asymptote/transform.h
+++ b/Build/source/utils/asymptote/transform.h
@@ -4,7 +4,7 @@
*
* The transform datatype stores an affine transformation on the plane
* The datamembers are x, y, xx, xy, yx, and yy. A pair (x,y) is
- * transformed as
+ * transformed as
* x' = t.x + t.xx * x + t.xy * y
* y' = t.y + t.yx * x + t.yy * y
*****/
@@ -102,6 +102,11 @@ public:
xx == 1.0 && xy == 0.0 && yx == 0.0 && yy == 1.0;
}
+ bool isIsometry() const
+ {
+ return xx*xx+xy*xy == 1.0 && xx*yx+xy*yy == 0.0 && yx*yx+yy*yy == 1.0;
+ }
+
bool isNull() const
{
return x == 0.0 && y == 0.0 &&
@@ -209,7 +214,7 @@ inline transform reflectabout(pair z, pair w)
{
if (z == w)
reportError("points determining line to reflect about must be distinct");
-
+
// Also could be optimized.
transform basis = shift(z) * scale(w-z);
transform flip = yscale(-1.0);
@@ -223,25 +228,25 @@ inline transform rotation(transform t)
pair z(2.0*t.getxx()*t.getyy(),t.getyx()*t.getyy()-t.getxx()*t.getxy());
if(t.getxx() < 0) z=-z;
return rotate(atan2(z.gety(),z.getx()));
-}
+}
// Remove the x and y components, so that the new transform maps zero to zero.
inline transform shiftless(transform t)
{
return transform(0, 0, t.getxx(), t.getxy(), t.getyx(), t.getyy());
-}
+}
// Return the translational component of t.
inline transform shift(transform t)
{
return transform(t.getx(), t.gety(), 1.0, 0, 0, 1.0);
-}
+}
// Return the translational pair of t.
inline pair shiftpair(transform t)
{
return pair(t.getx(), t.gety());
-}
+}
inline transform matrix(pair lb, pair rt)
{
diff --git a/Build/source/utils/asymptote/triple.h b/Build/source/utils/asymptote/triple.h
index ef65bfbef3a..f2dfb61af69 100644
--- a/Build/source/utils/asymptote/triple.h
+++ b/Build/source/utils/asymptote/triple.h
@@ -22,9 +22,9 @@
namespace camp {
typedef double Triple[3];
-
+
class triple;
-
+
bool isIdTransform3(const double* t);
void copyTransform3(double*& d, const double* s, GCPlacement placement=NoGC);
void multiplyTransform3(double*& t, const double* s, const double* r);
@@ -43,7 +43,7 @@ public:
triple(const Triple& v) : x(v[0]), y(v[1]), z(v[2]) {}
virtual ~triple() {}
-
+
void set(double X, double Y=0.0, double Z=0.0) { x=X; y=Y; z=Z; }
double getx() const { return x; }
@@ -58,7 +58,7 @@ public:
double f=t[12]*v.x+t[13]*v.y+t[14]*v.z+t[15];
if(f != 0.0) {
f=1.0/f;
-
+
return triple((t[0]*v.x+t[1]*v.y+t[2]*v.z+t[3])*f,
(t[4]*v.x+t[5]*v.y+t[6]*v.z+t[7])*f,
(t[8]*v.x+t[9]*v.y+t[10]*v.z+t[11])*f);
@@ -66,11 +66,11 @@ public:
reportError("division by 0 in transform of a triple");
return 0.0;
}
-
+
friend triple operator* (const triple& v, const double* t) {
if(t == NULL)
return v;
-
+
double f=t[3]*v.x+t[7]*v.y+t[11]*v.z+t[15];
if(f != 0.0) {
f=1.0/f;
@@ -81,19 +81,19 @@ public:
reportError("division by 0 in transform of a triple");
return 0.0;
}
-
+
friend triple Transform3(const triple& v, const double* t) {
return triple((t[0]*v.x+t[1]*v.y+t[2]*v.z),
(t[3]*v.x+t[4]*v.y+t[5]*v.z),
(t[6]*v.x+t[7]*v.y+t[8]*v.z));
}
-
+
friend triple Transform3(const double* t, const triple& v) {
return triple(v.x*t[0]+v.y*t[3]+v.z*t[6],
v.x*t[1]+v.y*t[4]+v.z*t[7],
v.x*t[2]+v.y*t[5]+v.z*t[8]);
}
-
+
// return x and y components of v*t.
friend pair Transform2T(const double* t, const triple& v)
{
@@ -102,7 +102,7 @@ public:
return pair((t[0]*v.x+t[4]*v.y+t[8]*v.z+t[12])*f,
(t[1]*v.x+t[5]*v.y+t[9]*v.z+t[13])*f);
}
-
+
friend void transformtriples(const double* t, size_t n, triple* d,
const triple* s)
{
@@ -112,12 +112,12 @@ public:
for(size_t i=0; i < n; i++)
d[i]=t*s[i];
}
-
+
friend void copytriples(size_t n, triple* d, const triple* s)
{
if(d == NULL || s == NULL)
return;
-
+
for(size_t i=0; i < n; i++) d[i]=s[i];
}
@@ -128,7 +128,7 @@ public:
double x,y,z;
double X,Y,Z;
-
+
X=x=v[0].getx();
Y=y=v[0].gety();
Z=z=v[0].getz();
@@ -140,7 +140,7 @@ public:
const double vz=v[i].getz();
z=fmin(z,vz); Z=fmax(Z,vz);
}
-
+
Min.set(x,y,z);
Max.set(X,Y,Z);
}
@@ -166,7 +166,7 @@ public:
}
b=pair(x,y);
}
-
+
friend triple operator+ (const triple& z, const triple& w)
{
return triple(z.x + w.x, z.y + w.y, z.z + w.z);
@@ -230,17 +230,17 @@ public:
{
return x*x+y*y+z*z;
}
-
+
friend double abs2(const triple &v)
{
return v.abs2();
}
-
+
double length() const /* r */
{
return sqrt(abs2());
}
-
+
friend double length(const triple& v)
{
return v.length();
@@ -257,12 +257,12 @@ public:
}
return acos(z/r);
}
-
+
double azimuth(bool warn=true) const /* phi */
{
return angle(x,y,warn);
}
-
+
friend triple unit(const triple& v)
{
double scale=v.length();
@@ -270,13 +270,13 @@ public:
scale=1.0/scale;
return triple(v.x*scale,v.y*scale,v.z*scale);
}
-
+
friend double dot(const triple& u, const triple& v)
{
return u.x*v.x+u.y*v.y+u.z*v.z;
}
- friend triple cross(const triple& u, const triple& v)
+ friend triple cross(const triple& u, const triple& v)
{
return triple(u.y*v.z-u.z*v.y,
u.z*v.x-u.x*v.z,
@@ -289,17 +289,17 @@ public:
double sintheta=sin(theta);
return triple(sintheta*cos(phi),sintheta*sin(phi),cos(theta));
}
-
+
friend istream& operator >> (istream& s, triple& z)
{
char c;
- s >> std::ws;
+ s >> ws;
bool paren=s.peek() == '('; // parenthesis are optional
if(paren) s >> c;
- s >> z.x >> std::ws;
- if(s.peek() == ',') s >> c >> z.y;
+ s >> z.x >> ws;
+ if(s.peek() == ',') s >> c >> z.y >> ws;
else {
- if(paren) s >> z.y;
+ if(paren) s >> z.y >> ws;
else z.y=0.0;
}
if(s.peek() == ',') s >> c >> z.z;
@@ -308,10 +308,10 @@ public:
else z.z=0.0;
}
if(paren) {
- s >> std::ws;
+ s >> ws;
if(s.peek() == ')') s >> c;
}
-
+
return s;
}
@@ -320,17 +320,17 @@ public:
out << "(" << v.x << "," << v.y << "," << v.z << ")";
return out;
}
-
+
friend jsofstream& operator << (jsofstream& out, const triple& v)
{
out << "[" << v.x << "," << v.y << "," << v.z << "]";
return out;
}
-
+
};
triple expi(double theta, double phi);
-
+
// Return the component of vector v perpendicular to a unit vector u.
inline triple perp(triple v, triple u)
{
@@ -345,7 +345,7 @@ inline void bounds(double& x, double &X, double v)
if(v < x) x=v;
else if(v > X) X=v;
}
-
+
inline void boundstriples(double& x, double& y, double& z,
double& X, double& Y, double& Z,
size_t n, const triple* v)
@@ -353,7 +353,7 @@ inline void boundstriples(double& x, double& y, double& z,
X=x=v[0].getx();
Y=y=v[0].gety();
Z=z=v[0].getz();
-
+
for(size_t i=1; i < n; ++i) {
triple V=v[i];
bounds(x,X,V.getx());
@@ -364,7 +364,7 @@ inline void boundstriples(double& x, double& y, double& z,
extern const double third;
-// return the maximum distance squared of points c0 and c1 from
+// return the maximum distance squared of points c0 and c1 from
// the respective internal control points of z0--z1.
inline double Straightness(const triple& z0, const triple& c0,
const triple& c1, const triple& z1)
diff --git a/Build/source/utils/asymptote/types.cc b/Build/source/utils/asymptote/types.cc
index 4a449a1a989..dee660c3cad 100644
--- a/Build/source/utils/asymptote/types.cc
+++ b/Build/source/utils/asymptote/types.cc
@@ -44,14 +44,14 @@ namespace types {
#include "primitives.h"
#undef PRIMERROR
#undef PRIMITIVE
-
+
nullTy pNull;
ty *primNull() { return &pNull; }
-
+
const char *names[] = {
"null",
"<structure>", "<function>", "<overloaded>",
-
+
#define PRIMITIVE(name,Name,asyName) #asyName,
#define PRIMERROR
#include "primitives.h"
@@ -77,36 +77,36 @@ void ty::print(ostream& out) const
return &v; \
}
-#define RWFIELD(Type, name, getter, setter) \
- if (sig == 0 && id == name) { \
- static trans::virtualFieldAccess a(run::getter, run::setter); \
- static trans::varEntry v(Type(), &a, 0, position()); \
- return &v; \
+#define RWFIELD(Type, name, getter, setter) \
+ if (sig == 0 && id == name) { \
+ static trans::virtualFieldAccess a(run::getter, run::setter); \
+ static trans::varEntry v(Type(), &a, 0, position()); \
+ return &v; \
}
-
-#define SIGFIELD(Type, name, func) \
- if (id == name && \
- equivalent(sig, Type()->getSignature())) \
- { \
+
+#define SIGFIELD(Type, name, func) \
+ if (id == name && \
+ equivalent(sig, Type()->getSignature())) \
+ { \
static trans::virtualFieldAccess a(run::func, 0, run::func##Helper); \
- static trans::varEntry v(Type(), &a, 0, position()); \
- return &v; \
+ static trans::varEntry v(Type(), &a, 0, position()); \
+ return &v; \
}
-#define DSIGFIELD(name, sym, func) \
- if (id == sym && \
- equivalent(sig, name##Type()->getSignature())) \
- { \
+#define DSIGFIELD(name, sym, func) \
+ if (id == sym && \
+ equivalent(sig, name##Type()->getSignature())) \
+ { \
static trans::virtualFieldAccess a(run::func, 0, run::func##Helper); \
- /* for some fields, v needs to be dynamic */ \
- /* e.g. when the function type depends on an array type. */ \
- trans::varEntry *v = \
- new trans::varEntry(name##Type(), &a, 0, position()); \
- return v; \
+ /* for some fields, v needs to be dynamic */ \
+ /* e.g. when the function type depends on an array type. */ \
+ trans::varEntry *v = \
+ new trans::varEntry(name##Type(), &a, 0, position()); \
+ return v; \
}
-#define FILEFIELD(GetType, SetType, name, sym) \
- FIELD(GetType,sym,name##Part); \
+#define FILEFIELD(GetType, SetType, name, sym) \
+ FIELD(GetType,sym,name##Part); \
SIGFIELD(SetType,sym,name##Set);
@@ -154,7 +154,7 @@ trans::varEntry *primitiveTy::virtualField(symbol id, signature *sig)
FIELD(primReal,SYM(value),curlSpecifierValuePart);
FIELD(primInt,SYM(side),curlSpecifierSidePart);
break;
- case ty_file:
+ case ty_file:
FIELD(primString,SYM(name),namePart);
FIELD(primString,SYM(mode),modePart);
FILEFIELD(IntArray,dimensionType,dimension,SYM(dimension));
@@ -197,37 +197,37 @@ ty *primitiveTy::virtualFieldGetType(symbol id)
if(kind == ty_file) {
if (id == SYM(dimension))
return overloadedDimensionType();
-
- if (id == SYM(line) || id == SYM(csv) ||
- id == SYM(word) || id == SYM(singlereal) ||
+
+ if (id == SYM(line) || id == SYM(csv) ||
+ id == SYM(word) || id == SYM(singlereal) ||
id == SYM(singleint) || id == SYM(signedint))
return overloadedModeType();
-
+
if (id == SYM(read))
return readType();
}
-
+
trans::varEntry *v = virtualField(id, 0);
-
+
return v ? v->getType() : 0;
}
-#define RETURN_STATIC_BLTIN(func) \
- { \
- static trans::bltinAccess a(run::func); \
- return &a; \
+#define RETURN_STATIC_BLTIN(func) \
+ { \
+ static trans::bltinAccess a(run::func); \
+ return &a; \
}
trans::access *nullTy::castTo(ty *target, caster &) {
switch (target->kind) {
case ty_array: {
- RETURN_STATIC_BLTIN(pushNullArray);
+ RETURN_STATIC_BLTIN(pushNullArray);
}
case ty_record: {
- RETURN_STATIC_BLTIN(pushNullRecord);
- }
+ RETURN_STATIC_BLTIN(pushNullRecord);
+ }
case ty_function: {
- RETURN_STATIC_BLTIN(pushNullFunction);
+ RETURN_STATIC_BLTIN(pushNullFunction);
}
default:
return 0;
@@ -237,7 +237,7 @@ trans::access *nullTy::castTo(ty *target, caster &) {
trans::access *array::initializer()
{
RETURN_STATIC_BLTIN(emptyArray)
-}
+ }
ty *array::pushType()
{
@@ -270,7 +270,7 @@ ty *array::insertType()
f->addRest(this);
inserttype = f;
}
-
+
return inserttype;
}
@@ -287,25 +287,25 @@ ty *initializedType() {
return new function(primBoolean(),formal(primInt(),SYM(i)));
}
-#define SIGFIELDLIST \
- ASIGFIELD(initialized, SYM(initialized), arrayInitialized); \
- ASIGFIELD(push, SYM(push), arrayPush); \
- ASIGFIELD(pop, SYM(pop), arrayPop); \
- ASIGFIELD(append, SYM(append), arrayAppend); \
- ASIGFIELD(insert, SYM(insert), arrayInsert); \
- ASIGFIELD(delete, SYM(delete), arrayDelete); \
+#define SIGFIELDLIST \
+ ASIGFIELD(initialized, SYM(initialized), arrayInitialized); \
+ ASIGFIELD(push, SYM(push), arrayPush); \
+ ASIGFIELD(pop, SYM(pop), arrayPop); \
+ ASIGFIELD(append, SYM(append), arrayAppend); \
+ ASIGFIELD(insert, SYM(insert), arrayInsert); \
+ ASIGFIELD(delete, SYM(delete), arrayDelete); \
ty *array::virtualFieldGetType(symbol id)
{
- #define ASIGFIELD(name, sym, func) \
- if (id == sym) \
+#define ASIGFIELD(name, sym, func) \
+ if (id == sym) \
return name##Type();
SIGFIELDLIST
- #undef ASIGFIELD
+#undef ASIGFIELD
- return ty::virtualFieldGetType(id);
+ return ty::virtualFieldGetType(id);
}
trans::varEntry *array::virtualField(symbol id, signature *sig)
@@ -314,14 +314,14 @@ trans::varEntry *array::virtualField(symbol id, signature *sig)
FIELD(IntArray, SYM(keys), arrayKeys);
RWFIELD(primBoolean, SYM(cyclic), arrayCyclicFlag, arraySetCyclicFlag);
- #define ASIGFIELD(name, sym, func) DSIGFIELD(name, sym, func)
-
+#define ASIGFIELD(name, sym, func) DSIGFIELD(name, sym, func)
+
SIGFIELDLIST
-
- #undef ASIGFIELD
-
- // Fall back on base class to handle no match.
- return ty::virtualField(id, sig);
+
+#undef ASIGFIELD
+
+ // Fall back on base class to handle no match.
+ return ty::virtualField(id, sig);
}
#undef SIGFIELDLIST
@@ -353,7 +353,7 @@ ostream& operator<< (ostream& out, const formal& f)
printFormal(out, f, false);
return out;
}
-
+
bool equivalent(const formal& f1, const formal& f2) {
// Just test the types.
// This cannot be used on rest formal with types equal to NULL.
@@ -385,11 +385,11 @@ ostream& operator<< (ostream& out, const signature& s)
out << "(";
for (size_t i = 0; i < s.formals.size(); ++i)
- {
- if (i > 0)
- out << ", ";
- printFormal(out, s.getFormal(i), s.formalIsKeywordOnly(i));
- }
+ {
+ if (i > 0)
+ out << ", ";
+ printFormal(out, s.getFormal(i), s.formalIsKeywordOnly(i));
+ }
if (s.rest.t) {
if (!s.formals.empty())
@@ -423,7 +423,7 @@ bool equivalent(const signature *s1, const signature *s2)
return false;
if (!std::equal(s1->formals.begin(),s1->formals.end(),s2->formals.begin(),
- (bool (*)(const formal&,const formal&)) equivalent))
+ (bool (*)(const formal&,const formal&)) equivalent))
return false;
if (s1->rest.t)
@@ -445,7 +445,7 @@ bool argumentEquivalent(const signature *s1, const signature *s2)
return std::equal(s1->formals.begin(),s1->formals.end(),s2->formals.begin(),
(bool (*)(const formal&,const formal&))
- argumentEquivalent) &&
+ argumentEquivalent) &&
argumentEquivalent(s1->rest, s2->rest);
}
@@ -510,7 +510,7 @@ ty *overloaded::signatureless()
for(ty_vector::iterator t = sub.begin(); t != sub.end(); ++t)
if ((*t)->getSignature()==0)
return *t;
-
+
return 0;
}
@@ -526,7 +526,7 @@ bool equivalent(const ty *t1, const ty *t2)
{
// The same pointer must point to the same type.
if (t1 == t2)
- return true;
+ return true;
// Ensure if an overloaded type is compared to a non-overloaded one, that the
// overloaded type's method is called.
@@ -545,7 +545,7 @@ bool equivalent(const ty *t1, const ty *t2)
bool equivalent(const ty *t1, const ty *t2, bool special) {
return special ? equivalent(t1, t2) :
- equivalent(t1->getSignature(), t2->getSignature());
+ equivalent(t1->getSignature(), t2->getSignature());
}
#undef FIELD
diff --git a/Build/source/utils/asymptote/types.h b/Build/source/utils/asymptote/types.h
index 22c1daf8936..9492890bd20 100644
--- a/Build/source/utils/asymptote/types.h
+++ b/Build/source/utils/asymptote/types.h
@@ -40,7 +40,7 @@ enum ty_kind {
ty_record, // "struct" in Asymptote language
ty_function,
ty_overloaded,
-
+
#define PRIMITIVE(name,Name,asyName) ty_##name,
#define PRIMERROR
#include "primitives.h"
@@ -133,7 +133,7 @@ public:
}
// If a cast function is not stored in the environment, ask the type itself.
- // This handles null->record casting, and the like. The caster is used as a
+ // This handles null->record casting, and the like. The caster is used as a
// callback to the environment for casts of subtypes.
virtual trans::access *castTo(ty *, caster &) {
return 0;
@@ -186,7 +186,7 @@ class primitiveTy : public ty {
public:
primitiveTy(ty_kind kind)
: ty(kind) {}
-
+
bool primitive() {
return true;
}
@@ -194,7 +194,7 @@ public:
bool isReference() {
return false;
}
-
+
ty *virtualFieldGetType(symbol );
trans::varEntry *virtualField(symbol, signature *);
@@ -212,7 +212,7 @@ class nullTy : public primitiveTy {
public:
nullTy()
: primitiveTy(ty_null) {}
-
+
bool isReference() {
return true;
}
@@ -280,10 +280,10 @@ struct array : public ty {
};
/* Base types */
-#define PRIMITIVE(name,Name,asyName) \
- ty *prim##Name(); \
- ty *name##Array(); \
- ty *name##Array2(); \
+#define PRIMITIVE(name,Name,asyName) \
+ ty *prim##Name(); \
+ ty *name##Array(); \
+ ty *name##Array2(); \
ty *name##Array3();
#define PRIMERROR
#include "primitives.h"
@@ -298,7 +298,7 @@ struct formal {
symbol name;
bool defval;
bool Explicit;
-
+
formal(ty *t,
symbol name=symbol::nullsym,
bool optional=false,
@@ -376,7 +376,7 @@ struct signature : public gc {
return rest.t ? formals.size() + 1 : formals.size();
}
- formal& getFormal(size_t n) {
+ formal& getFormal(size_t n) {
assert(n < formals.size());
return formals[n];
}
@@ -485,7 +485,7 @@ struct function : public ty {
ty *getResult() {
return result;
}
-
+
signature *getSignature() {
return &sig;
}
diff --git a/Build/source/utils/asymptote/util.cc b/Build/source/utils/asymptote/util.cc
index 2d66fb2316f..81398491c00 100644
--- a/Build/source/utils/asymptote/util.cc
+++ b/Build/source/utils/asymptote/util.cc
@@ -23,14 +23,17 @@
#include <unistd.h>
#include <cstring>
#include <algorithm>
+#include <dirent.h>
#include "util.h"
#include "settings.h"
#include "errormsg.h"
#include "camperror.h"
#include "interact.h"
+#include "locate.h"
using namespace settings;
+using camp::reportError;
bool False=false;
@@ -61,7 +64,7 @@ string demangle(const char* s)
{
return s;
}
-#endif
+#endif
char *Strdup(string s)
{
@@ -90,10 +93,10 @@ char *StrdupMalloc(string s)
string stripDir(string name)
{
size_t p;
-#ifdef __MSDOS__
+#ifdef __MSDOS__
p=name.rfind('\\');
if(p < string::npos) name.erase(0,p+1);
-#endif
+#endif
p=name.rfind('/');
if(p < string::npos) name.erase(0,p+1);
return name;
@@ -103,24 +106,24 @@ string stripFile(string name)
{
size_t p;
bool dir=false;
-#ifdef __MSDOS__
+#ifdef __MSDOS__
p=name.rfind('\\');
if(p < string::npos) {
dir=true;
while(p > 0 && name[p-1] == '\\') --p;
name.erase(p+1);
}
-#endif
+#endif
p=name.rfind('/');
if(p < string::npos) {
dir=true;
while(p > 0 && name[p-1] == '/') --p;
name.erase(p+1);
}
-
+
return dir ? name : "";
}
-
+
string stripExt(string name, const string& ext)
{
string suffix="."+ext;
@@ -131,14 +134,14 @@ string stripExt(string name, const string& ext)
else return name;
}
-void backslashToSlash(string& s)
+void backslashToSlash(string& s)
{
size_t p;
while((p=s.find('\\')) < string::npos)
s[p]='/';
}
-void spaceToUnderscore(string& s)
+void spaceToUnderscore(string& s)
{
size_t p;
while((p=s.find(' ')) < string::npos)
@@ -154,12 +157,17 @@ string Getenv(const char *name, bool msdos)
return S;
}
+void readDisabled()
+{
+ camp::reportError("Read from other directories disabled; override with option -globalread");
+}
+
void writeDisabled()
{
camp::reportError("Write to other directories disabled; override with option -globalwrite");
}
-string cleanpath(string name)
+string cleanpath(string name)
{
string dir=stripFile(name);
name=stripDir(name);
@@ -167,7 +175,17 @@ string cleanpath(string name)
return dir+name;
}
-string outpath(string name)
+string inpath(string name)
+{
+ bool global=globalread();
+ string dir=stripFile(name);
+ if(global && !dir.empty()) return name;
+ string indir=stripFile(outname());
+ if(!(global || dir.empty() || dir == indir)) readDisabled();
+ return stripDir(name);
+}
+
+string outpath(string name)
{
bool global=globalwrite();
string dir=stripFile(name);
@@ -177,7 +195,7 @@ string outpath(string name)
return outdir+stripDir(name);
}
-string buildname(string name, string suffix, string aux)
+string buildname(string name, string suffix, string aux)
{
name=stripExt(outpath(name),defaultformat())+aux;
if(!suffix.empty()) name += "."+suffix;
@@ -195,11 +213,11 @@ sighandler_t Signal(int signum, sighandler_t handler)
action.sa_handler=handler;
sigemptyset(&action.sa_mask);
action.sa_flags=0;
- return sigaction(signum,&action,&oldaction) == 0 ? oldaction.sa_handler :
+ return sigaction(signum,&action,&oldaction) == 0 ? oldaction.sa_handler :
SIG_ERR;
}
-void push_split(mem::vector<string>& a, const string& S)
+void push_split(mem::vector<string>& a, const string& S)
{
const char *p=S.c_str();
string s;
@@ -219,18 +237,18 @@ void push_split(mem::vector<string>& a, const string& S)
char **args(const mem::vector<string>& s, bool quiet)
{
size_t count=s.size();
-
+
char **argv=NULL;
argv=new char*[count+1];
for(size_t i=0; i < count; ++i)
argv[i]=StrdupNoGC(s[i]);
-
+
if(!quiet && settings::verbose > 1) {
cerr << argv[0];
for(size_t i=1; i < count; ++i) cerr << " " << argv[i];
cerr << endl;
}
-
+
argv[count]=NULL;
return argv;
}
@@ -241,21 +259,21 @@ void execError(const char *command, const char *hint, const char *application)
if(*application == 0) application=hint;
if(hint) {
string s=string(hint);
- transform(s.begin(), s.end(), s.begin(), toupper);
+ transform(s.begin(), s.end(), s.begin(), toupper);
cerr << "Please put in a file " << getSetting<string>("config")
<< ": " << endl << endl
<< "import settings;" << endl
<< hint << "=\"LOCATION\";" << endl << endl
- << "where LOCATION specifies the location of "
+ << "where LOCATION specifies the location of "
<< application << "." << endl << endl
- << "Alternatively, set the environment variable ASYMPTOTE_" << s
- << endl << "or use the command line option -" << hint
+ << "Alternatively, set the environment variable ASYMPTOTE_" << s
+ << endl << "or use the command line option -" << hint
<< "=\"LOCATION\". For further details, see" << endl
- << "http://asymptote.sourceforge.net/doc/Configuring.html" << endl
- << "http://asymptote.sourceforge.net/doc/Search-paths.html" << endl;
+ << "https://asymptote.sourceforge.io/doc/Configuring.html" << endl
+ << "https://asymptote.sourceforge.io/doc/Search-paths.html" << endl;
}
}
-
+
// quiet: 0=none; 1=suppress stdout; 2=suppress stdout+stderr.
int System(const mem::vector<string> &command, int quiet, bool wait,
const char *hint, const char *application, int *ppid)
@@ -263,13 +281,13 @@ int System(const mem::vector<string> &command, int quiet, bool wait,
int status;
cout.flush(); // Flush stdout to avoid duplicate output.
-
+
char **argv=args(command);
int pid=fork();
if(pid == -1)
camp::reportError("Cannot fork process");
-
+
if(pid == 0) {
if(interact::interactive) signal(SIGINT,SIG_IGN);
if(quiet) {
@@ -329,7 +347,7 @@ string stripblanklines(const string& s)
bool blank=true;
const char *t=S.c_str();
size_t len=S.length();
-
+
for(size_t i=0; i < len; i++) {
if(t[i] == '\n') {
if(blank) S[i]=' ';
@@ -380,7 +398,59 @@ const char *setPath(const char *s, bool quiet)
return p;
}
-void push_command(mem::vector<string>& a, const string& s)
+void fatal(const char *msg, const char *s=NULL)
+{
+ ostringstream buf;
+ buf << msg;
+ if(s) {
+ buf << " " << getPath();
+ if(*s) buf << "/";
+ buf << s;
+ }
+ buf << ": " << strerror(errno) << endl;
+ camp::reportError(buf);
+}
+
+void empty_current_dir()
+{
+ static struct stat buf;
+ DIR *dir=opendir(".");
+ if(dir == NULL) fatal("Cannot open directory","");
+ dirent *p;
+ while((p=readdir(dir)) != NULL) {
+ if(strcmp(p->d_name,".") == 0 || strcmp(p->d_name,"..") == 0) continue;
+ if(lstat(p->d_name,&buf) == 0) {
+ if(S_ISDIR(buf.st_mode)) {
+ if(chdir(p->d_name)) fatal("Cannot change directory to",p->d_name);
+ empty_current_dir();
+ if(chdir(".."))
+ fatal("Cannot change to parent directory of",p->d_name);
+ if(rmdir(p->d_name))
+ fatal("Cannot remove directory",p->d_name);
+ } else {
+ if(unlink(p->d_name)) fatal("Cannot remove file",p->d_name);
+ }
+ }
+ }
+ if(closedir(dir)) fatal("Invalid current directory stream descriptor");
+}
+
+void recursive_delete(char *name)
+{
+ static struct stat buf;
+ if(lstat(name,&buf) == 0) {
+ if(S_ISDIR(buf.st_mode)) {
+ const char *path=getPath();
+ if(chdir(name)) fatal("Cannot change directory to",name);
+ empty_current_dir();
+ if(chdir(path)) fatal("Cannot change to directory","");
+ if(rmdir(name)) fatal("Cannot remove directory", name);
+ }
+ else unlink(name);
+ }
+}
+
+void push_command(mem::vector<string>& a, const string& s)
{
a.push_back(s);
#ifdef __MSDOS__
@@ -389,7 +459,7 @@ void push_command(mem::vector<string>& a, const string& s)
a.push_back("start");
a.push_back("\"\"");
}
-#endif
+#endif
}
void popupHelp() {
@@ -404,7 +474,7 @@ void popupHelp() {
if (pid==0 || (waitpid(pid, &status, WNOHANG) == pid)) {
mem::vector<string> cmd;
push_command(cmd,getSetting<string>("pdfviewer"));
- string viewerOptions=getSetting<string>("pdfviewerOptions");
+ string viewerOptions=getSetting<string>("pdfviewerOptions");
if(!viewerOptions.empty())
cmd.push_back(viewerOptions);
cmd.push_back(docdir+dirsep+"asymptote.pdf");
diff --git a/Build/source/utils/asymptote/util.h b/Build/source/utils/asymptote/util.h
index d07c5432587..699cef521ee 100644
--- a/Build/source/utils/asymptote/util.h
+++ b/Build/source/utils/asymptote/util.h
@@ -14,7 +14,7 @@
#ifdef __CYGWIN__
extern "C" int sigaddset(sigset_t *set, int signum);
-extern "C" int sigemptyset(sigset_t *set);
+extern "C" int sigemptyset(sigset_t *set);
extern "C" int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact);
#endif
@@ -31,24 +31,26 @@ string demangle(const char *s);
char *Strdup(string s);
char *StrdupNoGC(string s);
char *StrdupMalloc(string s);
-
+
// Strip the directory from a filename.
string stripDir(string name);
-
+
// Strip the file from a filename, returning the directory.
string stripFile(string name);
// Strip the extension from a filename.
string stripExt(string name, const string& suffix="");
+void readDisabled();
void writeDisabled();
-
+
// Replace spaces in file part of name with underscores.
string cleanpath(string name);
-// Construct the full output path.
+// Construct the full path name, checking access.
+string inpath(string name);
string outpath(string name);
-
+
// Construct a filename from the original, adding aux at the end, and
// changing the suffix.
string buildname(string filename, string suffix="", string aux="");
@@ -73,14 +75,14 @@ sighandler_t Signal(int signum, sighandler_t handler);
// Split string S and push the pieces onto vector a.
void push_split(mem::vector<string>& a, const string& S);
-
+
// Wrapper to append /c start "" to MSDOS cmd.
void push_command(mem::vector<string>& a, const string& s);
-
+
// Return an argv array corresponding to the fields in command delimited
// by spaces not within matching single quotes.
char **args(const mem::vector<string> &args, bool quiet=false);
-
+
// Similar to the standard system call except allows interrupts and does
// not invoke a shell.
int System(const mem::vector<string> &command, int quiet=0, bool wait=true,
@@ -125,6 +127,7 @@ const char *startPath();
const char* setPath(const char *s, bool quiet=false);
const char *changeDirectory(const char *s);
extern char *startpath;
+extern void recursive_delete(char *name);
void backslashToSlash(string& s);
void spaceToUnderscore(string& s);
@@ -132,7 +135,7 @@ string Getenv(const char *name, bool msdos);
char *getPath(char *p=NULL);
void execError(const char *command, const char *hint, const char *application);
-
+
// This invokes a viewer to display the manual. Subsequent calls will only
// pop-up a new viewer if the old one has been closed.
void popupHelp();
@@ -141,7 +144,7 @@ void popupHelp();
inline long long llabs(long long x) {return x >= 0 ? x : -x;}
extern "C" char *initstate (unsigned seed, char *state, size_t size);
extern "C" long random (void);
-#endif
+#endif
inline Int Abs(Int x) {
#ifdef HAVE_LONG_LONG
diff --git a/Build/source/utils/asymptote/varinit.cc b/Build/source/utils/asymptote/varinit.cc
index e84c62bb7e4..347b5960c7b 100644
--- a/Build/source/utils/asymptote/varinit.cc
+++ b/Build/source/utils/asymptote/varinit.cc
@@ -73,7 +73,7 @@ void arrayinit::transToType(coenv &e, types::ty *target)
if (rest)
rest->transToType(e, target);
-
+
transMaker(e, (Int)inits.size(), (bool)rest);
}
diff --git a/Build/source/utils/asymptote/varinit.h b/Build/source/utils/asymptote/varinit.h
index 721242dac29..55c47665945 100644
--- a/Build/source/utils/asymptote/varinit.h
+++ b/Build/source/utils/asymptote/varinit.h
@@ -61,7 +61,7 @@ public:
arrayinit(position pos)
: varinit(pos), rest(0) {}
- virtual ~arrayinit()
+ virtual ~arrayinit()
{}
void prettyprint(ostream &out, Int indent);
diff --git a/Build/source/utils/asymptote/vm.h b/Build/source/utils/asymptote/vm.h
index 2ba55dfa15f..2c7d7f63a66 100644
--- a/Build/source/utils/asymptote/vm.h
+++ b/Build/source/utils/asymptote/vm.h
@@ -1,7 +1,7 @@
/*****
* vm.h
* Tom Prince 2005/06/17
- *
+ *
* Interface to the virtual machine.
*****/
@@ -21,8 +21,8 @@ typedef void (*bltin)(stack *s);
void registerBltin(bltin b, string s);
string lookupBltin(bltin b);
-#define REGISTER_BLTIN(b, s) \
- registerBltin((b), (s))
+#define REGISTER_BLTIN(b, s) \
+ registerBltin((b), (s))
#else
#define REGISTER_BLTIN(b, s)
#endif
diff --git a/Build/source/utils/asymptote/wce b/Build/source/utils/asymptote/wce
index 4ace1b35633..3f3db3a53dc 100755
--- a/Build/source/utils/asymptote/wce
+++ b/Build/source/utils/asymptote/wce
@@ -1,6 +1,6 @@
#!/bin/sh
printf "Testing errors..."
-./asy -sysdir base -noautoplain -debug errortest 2> errors.temp
+./asy -q -sysdir base -noautoplain -debug errortest 2> errors.temp
result=`diff errors.temp errors`
if test "$result" = ""; then
echo PASSED.
diff --git a/Build/source/utils/asymptote/webgl/gl.js b/Build/source/utils/asymptote/webgl/gl.js
index e2053f31616..f05312dec54 100644
--- a/Build/source/utils/asymptote/webgl/gl.js
+++ b/Build/source/utils/asymptote/webgl/gl.js
@@ -5,12 +5,14 @@ let Centers=[]; // Array of billboard centers
let Background=[1,1,1,1]; // Background color
let canvasWidth,canvasHeight;
+let canvasWidth0,canvasHeight0; // Initial values
let absolute=false;
let b,B; // Scene min,max bounding box corners (3-tuples)
let angle; // Field of view angle
let Zoom0; // Initial zoom
+let zoom0; // Adjusted initial zoom
let viewportmargin; // Margin around viewport (2-tuple)
let viewportshift=[0,0]; // Viewport shift (for perspective projection)
@@ -41,16 +43,16 @@ let maxMaterials; // Limit on number of materials allowed in shader
let halfCanvasWidth,halfCanvasHeight;
let pixel=0.75; // Adaptive rendering constant.
+let zoomRemeshFactor=1.5; // Zoom factor before remeshing
let FillFactor=0.1;
let Zoom;
-let maxViewportWidth=window.innerWidth;
-let maxViewportHeight=window.innerHeight;
+let maxViewportWidth;
+let maxViewportHeight;
const windowTrim=10;
-let resizeStep=1.2;
-let lastzoom;
+let lastZoom;
let H; // maximum camera view half-height
let third=1/3;
@@ -79,11 +81,6 @@ let viewParam = {
zmin:0,zmax:0
};
-let positionBuffer;
-let materialBuffer;
-let colorBuffer;
-let indexBuffer;
-
let remesh=true;
let wireframe=0;
let mouseDownOrTouchActive=false;
@@ -158,15 +155,6 @@ function deleteShaders()
gl.deleteProgram(pixelShader);
}
-// Create buffers for the patch and its subdivisions.
-function setBuffers()
-{
- positionBuffer=gl.createBuffer();
- materialBuffer=gl.createBuffer();
- colorBuffer=gl.createBuffer();
- indexBuffer=gl.createBuffer();
-}
-
function noGL() {
if (!gl)
alert("Could not initialize WebGL");
@@ -241,7 +229,6 @@ function initGL()
initShaders();
}
- setBuffers();
indexExt=gl.getExtension("OES_element_index_uint");
TRIANGLES=gl.TRIANGLES;
@@ -280,6 +267,20 @@ function getShader(gl,shaderScript,type,options=[])
return shader;
}
+function registerBuffer(buffervector,bufferIndex,copy,type=gl.ARRAY_BUFFER)
+{
+ if(buffervector.length > 0) {
+ if(bufferIndex == 0) {
+ bufferIndex=gl.createBuffer();
+ copy=true;
+ }
+ gl.bindBuffer(type,bufferIndex);
+ if(copy)
+ gl.bufferData(type,buffervector,gl.STATIC_DRAW);
+ }
+ return bufferIndex;
+}
+
function drawBuffer(data,shader,indices=data.indices)
{
if(data.indices.length == 0) return;
@@ -288,9 +289,9 @@ function drawBuffer(data,shader,indices=data.indices)
setUniforms(data,shader);
- gl.bindBuffer(gl.ARRAY_BUFFER,positionBuffer);
- gl.bufferData(gl.ARRAY_BUFFER,new Float32Array(data.vertices),
- gl.STATIC_DRAW);
+ let copy=remesh || data.partial || !data.rendered;
+ data.verticesBuffer=registerBuffer(new Float32Array(data.vertices),
+ data.verticesBuffer,copy);
gl.vertexAttribPointer(positionAttribute,3,gl.FLOAT,false,
normal ? 24 : 16,0);
if(normal && Lights.length > 0)
@@ -298,22 +299,22 @@ function drawBuffer(data,shader,indices=data.indices)
else if(pixel)
gl.vertexAttribPointer(widthAttribute,1,gl.FLOAT,false,16,12);
- gl.bindBuffer(gl.ARRAY_BUFFER,materialBuffer);
- gl.bufferData(gl.ARRAY_BUFFER,new Int16Array(data.materialIndices),
- gl.STATIC_DRAW);
+ data.materialsBuffer=registerBuffer(new Int16Array(data.materialIndices),
+ data.materialsBuffer,copy);
gl.vertexAttribPointer(materialAttribute,1,gl.SHORT,false,2,0);
+
if(shader == colorShader || shader == transparentShader) {
- gl.bindBuffer(gl.ARRAY_BUFFER,colorBuffer);
- gl.bufferData(gl.ARRAY_BUFFER,new Uint8Array(data.colors),
- gl.STATIC_DRAW);
+ data.colorsBuffer=registerBuffer(new Uint8Array(data.colors),
+ data.colorsBuffer,copy);
gl.vertexAttribPointer(colorAttribute,4,gl.UNSIGNED_BYTE,true,0,0);
}
- gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER,indexBuffer);
- gl.bufferData(gl.ELEMENT_ARRAY_BUFFER,
- indexExt ? new Uint32Array(indices) :
- new Uint16Array(indices),gl.STATIC_DRAW);
+ data.indicesBuffer=registerBuffer(indexExt ? new Uint32Array(indices) :
+ new Uint16Array(indices),
+ data.indicesBuffer,copy,
+ gl.ELEMENT_ARRAY_BUFFER);
+ data.rendered=true;
gl.drawElements(normal ? (wireframe ? gl.LINES : data.type) : gl.POINTS,
indices.length,
@@ -325,15 +326,24 @@ let TRIANGLES;
class vertexBuffer {
constructor(type) {
this.type=type ? type : TRIANGLES;
+
+ this.verticesBuffer=0;
+ this.materialsBuffer=0;
+ this.colorsBuffer=0;
+ this.indicesBuffer=0;
+
+ this.rendered=false; // Are all patches in this buffer fully rendered?
+ this.partial=false; // Does buffer contain incomplete data?
+
this.clear();
}
+
clear() {
this.vertices=[];
this.materialIndices=[];
this.colors=[];
this.indices=[];
this.nvertices=0;
-
this.materials=[];
this.materialTable=[];
}
@@ -422,7 +432,7 @@ function append(a,b)
a[n+i]=b[i];
}
-// efficiently append array b onto array a
+// efficiently append array b onto array a with offset
function appendOffset(a,b,o)
{
let n=a.length;
@@ -488,8 +498,10 @@ class Geometry {
setMaterial(data,draw) {
if(data.materialTable[this.MaterialIndex] == null) {
- if(data.materials.length >= Nmaterials)
+ if(data.materials.length >= Nmaterials) {
+ data.partial=true;
draw();
+ }
data.materialTable[this.MaterialIndex]=data.materials.length;
data.materials.push(Materials[this.MaterialIndex]);
}
@@ -510,6 +522,7 @@ class Geometry {
if(this.offscreen(v)) { // Fully offscreen
this.data.clear();
+ this.notRendered();
return;
}
@@ -517,8 +530,7 @@ class Geometry {
let P;
if(this.CenterIndex == 0) {
- if(!remesh && this.Onscreen) {
- // Fully onscreen; no need to re-render
+ if(!remesh && this.Onscreen) { // Fully onscreen; no need to re-render
this.append();
return;
}
@@ -537,6 +549,7 @@ class Geometry {
this.Epsilon=FillFactor*res;
this.data.clear();
+ this.notRendered();
this.Onscreen=true;
this.process(P);
}
@@ -765,6 +778,15 @@ class BezierPatch extends Geometry {
materialData.append(this.data);
}
+ notRendered() {
+ if(this.transparent)
+ transparentData.rendered=false;
+ else if(this.color)
+ colorData.rendered=false;
+ else
+ materialData.rendered=false;
+ }
+
Render(p,I0,I1,I2,I3,P0,P1,P2,P3,flat0,flat1,flat2,flat3,C0,C1,C2,C3) {
let d=this.Distance(p);
if(d[0] < this.res2 && d[1] < this.res2) { // Bezier patch is flat
@@ -1683,6 +1705,10 @@ class BezierCurve extends Geometry {
material1Data.append(this.data);
}
+ notRendered() {
+ material1Data.rendered=false;
+ }
+
Render(p,I0,I1) {
let p0=p[0];
let p1=p[1];
@@ -1747,6 +1773,10 @@ class Pixel extends Geometry {
append() {
material0Data.append(this.data);
}
+
+ notRendered() {
+ material0Data.rendered=false;
+ }
}
class Triangles extends Geometry {
@@ -1833,17 +1863,30 @@ class Triangles extends Geometry {
else
triangleData.append(this.data);
}
+
+ notRendered() {
+ if(this.transparent)
+ transparentData.rendered=false;
+ else
+ triangleData.rendered=false;
+ }
+
}
-function home()
+function redraw()
{
- mat4.identity(rotMat);
initProjection();
setProjection();
remesh=true;
draw();
}
+function home()
+{
+ mat4.identity(rotMat);
+ redraw();
+}
+
let positionAttribute=0;
let normalAttribute=1;
let materialAttribute=2;
@@ -2105,13 +2148,13 @@ function rotateScene(lastX,lastY,rawX,rawY,factor)
if(lastX == rawX && lastY == rawY) return;
let [angle,axis]=arcball([lastX,-lastY],[rawX,-rawY]);
- mat4.fromRotation(T,2*factor*ArcballFactor*angle/lastzoom,axis);
+ mat4.fromRotation(T,2*factor*ArcballFactor*angle/Zoom,axis);
mat4.multiply(rotMat,T,rotMat);
}
function shiftScene(lastX,lastY,rawX,rawY)
{
- let zoominv=1/lastzoom;
+ let zoominv=1/Zoom;
shift.x += (rawX-lastX)*zoominv*halfCanvasWidth;
shift.y -= (rawY-lastY)*zoominv*halfCanvasHeight;
}
@@ -2142,8 +2185,10 @@ function capzoom()
if(Zoom <= minzoom) Zoom=minzoom;
if(Zoom >= maxzoom) Zoom=maxzoom;
- if(Zoom != lastzoom) remesh=true;
- lastzoom=Zoom;
+ if(zoomRemeshFactor*Zoom < lastZoom || Zoom > zoomRemeshFactor*lastZoom) {
+ remesh=true;
+ lastZoom=Zoom;
+ }
}
function zoomImage(diff)
@@ -2175,9 +2220,8 @@ function arcball(oldmouse,newmouse)
let oldMouse=normMouse(oldmouse);
let newMouse=normMouse(newmouse);
let Dot=dot(oldMouse,newMouse);
- if(Dot > 1) Dot=1;
- else if(Dot < -1) Dot=-1;
- return [Math.acos(Dot),unit(cross(oldMouse,newMouse))]
+ let angle=Dot > 1 ? 0 : Dot < -1 ? pi : Math.acos(Dot);
+ return [angle,unit(cross(oldMouse,newMouse))]
}
/**
@@ -2306,6 +2350,13 @@ function handleKey(event)
}
}
+function setZoom()
+{
+ capzoom();
+ setProjection();
+ draw();
+}
+
function handleMouseWheel(event)
{
event.preventDefault();
@@ -2315,10 +2366,8 @@ function handleMouseWheel(event)
} else {
Zoom /= zoomFactor;
}
- capzoom();
- setProjection();
- draw();
+ setZoom();
}
function handleMouseMove(event)
@@ -2435,6 +2484,7 @@ function drawColor()
function drawTriangle()
{
drawBuffer(triangleData,transparentShader);
+ triangleData.rendered=false; // Force copying of sorted triangles to GPU.
triangleData.clear();
}
@@ -2479,6 +2529,8 @@ function drawTransparent()
gl.depthMask(false); // Enable transparency
drawBuffer(transparentData,transparentShader,Indices);
+ // Force copying of sorted triangles to GPU.
+ transparentData.rendered=false;
gl.depthMask(true); // Disable transparency
}
transparentData.clear();
@@ -2497,8 +2549,8 @@ function drawBuffers()
function draw()
{
if(embedded) {
- offscreen.width=canvas.width;
- offscreen.height=canvas.height;
+ offscreen.width=canvasWidth;
+ offscreen.height=canvasHeight;
setViewport();
}
@@ -2511,7 +2563,7 @@ function draw()
drawBuffers();
if(embedded) {
- context.clearRect(0,0,canvas.width,canvas.height);
+ context.clearRect(0,0,canvasWidth,canvasHeight);
context.drawImage(offscreen,0,0);
}
@@ -2521,9 +2573,9 @@ function draw()
function setDimensions(width,height,X,Y)
{
let Aspect=width/height;
- let zoominv=1/lastzoom;
- let xshift=(X/width+viewportshift[0])*lastzoom;
- let yshift=(Y/height+viewportshift[1])*lastzoom;
+ let zoominv=1/Zoom;
+ let xshift=(X/width+viewportshift[0])*Zoom;
+ let yshift=(Y/height+viewportshift[1])*Zoom;
if (orthographic) {
let xsize=B[0]-b[0];
@@ -2573,7 +2625,7 @@ function initProjection()
center.x=center.y=0;
center.z=0.5*(b[2]+B[2]);
- lastzoom=Zoom=Zoom0;
+ lastZoom=Zoom=zoom0;
viewParam.zmin=b[2];
viewParam.zmax=B[2];
@@ -2585,21 +2637,21 @@ function setViewport()
{
gl.viewportWidth=canvasWidth;
gl.viewportHeight=canvasHeight;
- gl.viewport(0,0,gl.viewportWidth,gl.viewportHeight);
- gl.scissor(0,0,gl.viewportWidth,gl.viewportHeight);
+ gl.viewport(0.5*(canvas.width-canvasWidth),0.5*(canvas.height-canvasHeight),
+ canvasWidth,canvasHeight);
+ gl.scissor(0,0,canvas.width,canvas.height);
}
function setCanvas()
{
- canvas.width=canvasWidth;
- canvas.height=canvasHeight;
if(embedded) {
- offscreen.width=canvasWidth;
- offscreen.height=canvasHeight;
+ canvas.width=offscreen.width=canvasWidth;
+ canvas.height=offscreen.height=canvasHeight;
}
size2=Math.hypot(canvasWidth,canvasHeight);
- halfCanvasWidth=0.5*canvasWidth;
- halfCanvasHeight=0.5*canvasHeight;
+ halfCanvasWidth=0.5*canvas.width;
+ halfCanvasHeight=0.5*canvas.height;
+ ArcballFactor=1+8*Math.hypot(viewportmargin[0],viewportmargin[1])/size2;
}
function setsize(w,h)
@@ -2617,80 +2669,53 @@ function setsize(w,h)
canvasHeight=h;
setCanvas();
setViewport();
- home();
-}
-
-function expand()
-{
- setsize(canvasWidth*resizeStep+0.5,canvasHeight*resizeStep+0.5);
-}
-function shrink()
-{
- setsize(Math.max((canvasWidth/resizeStep+0.5),1),
- Math.max((canvasHeight/resizeStep+0.5),1));
+ setProjection();
+ remesh=true;
}
-let pixelShader,materialShader,colorShader,transparentShader;
-
-function webGLInit()
+function resize()
{
- canvas=document.getElementById("Asymptote");
- embedded=window.top.document != document;
-
- initGL();
+ zoom0=Zoom0;
if(absolute && !embedded) {
- canvasWidth *= window.devicePixelRatio;
- canvasHeight *= window.devicePixelRatio;
+ canvasWidth=canvasWidth0*window.devicePixelRatio;
+ canvasHeight=canvasHeight0*window.devicePixelRatio;
} else {
- canvas.width=Math.max(window.innerWidth-windowTrim,windowTrim);
- canvas.height=Math.max(window.innerHeight-windowTrim,windowTrim);
-
- let Aspect=canvasWidth/canvasHeight;
- if(canvas.width > canvas.height*Aspect)
- canvas.width=Math.min(canvas.height*Aspect,canvas.width);
- else
- canvas.height=Math.min(canvas.width/Aspect,canvas.height);
+ let Aspect=canvasWidth0/canvasHeight0;
+ canvasWidth=Math.max(window.innerWidth-windowTrim,windowTrim);
+ canvasHeight=Math.max(window.innerHeight-windowTrim,windowTrim);
- if(canvas.width > 0)
- canvasWidth=canvas.width;
-
- if(canvas.height > 0)
- canvasHeight=canvas.height;
+ if(!orthographic && canvasWidth < canvasHeight*Aspect)
+ zoom0 *= canvasWidth/(canvasHeight*Aspect);
}
- setCanvas();
-
- ArcballFactor=1+8*Math.hypot(viewportmargin[0],viewportmargin[1])/size2;
+ canvas.width=canvasWidth;
+ canvas.height=canvasHeight;
- viewportshift[0] /= Zoom0;
- viewportshift[1] /= Zoom0;
+ let maxViewportWidth=window.innerWidth;
+ let maxViewportHeight=window.innerHeight;
- gl.enable(gl.BLEND);
- gl.blendFunc(gl.SRC_ALPHA,gl.ONE_MINUS_SRC_ALPHA);
- gl.enable(gl.DEPTH_TEST);
- gl.enable(gl.SCISSOR_TEST);
+ viewportshift[0] /= zoom0;
+ viewportshift[1] /= zoom0;
- setViewport();
- home();
+ setsize(canvasWidth,canvasHeight);
+ redraw();
+}
- canvas.onmousedown=handleMouseDown;
- document.onmouseup=handleMouseUpOrTouchEnd;
- document.onmousemove=handleMouseMove;
- canvas.onkeydown=handleKey;
+function expand()
+{
+ Zoom *= zoomFactor;
+ setZoom();
+}
- if(!embedded)
- enableZoom();
- canvas.addEventListener("touchstart",handleTouchStart,false);
- canvas.addEventListener("touchend",handleMouseUpOrTouchEnd,false);
- canvas.addEventListener("touchcancel",handleMouseUpOrTouchEnd,false);
- canvas.addEventListener("touchleave",handleMouseUpOrTouchEnd,false);
- canvas.addEventListener("touchmove",handleTouchMove,false);
- document.addEventListener("keydown",handleKey,false);
+function shrink()
+{
+ Zoom /= zoomFactor;
+ setZoom();
}
-let listen=false;
+let pixelShader,materialShader,colorShader,transparentShader;
class Align {
constructor(center,dir) {
@@ -3074,16 +3099,37 @@ function tube(v,w,CenterIndex,MaterialIndex,Min,Max,core)
function webGLStart()
{
- if(window.innerWidth == 0 || window.innerHeight == 0) {
- if(!listen) {
- listen=true;
- window.addEventListener("resize",webGLStart,false);
- }
- } else {
- if(listen) {
- window.removeEventListener("resize",webGLStart,false);
- listen=false;
- }
- webGLInit();
- }
+ canvas=document.getElementById("Asymptote");
+ embedded=window.top.document != document;
+
+ initGL();
+
+ gl.enable(gl.BLEND);
+ gl.blendFunc(gl.SRC_ALPHA,gl.ONE_MINUS_SRC_ALPHA);
+ gl.enable(gl.DEPTH_TEST);
+ gl.enable(gl.SCISSOR_TEST);
+
+ canvas.onmousedown=handleMouseDown;
+ document.onmouseup=handleMouseUpOrTouchEnd;
+ document.onmousemove=handleMouseMove;
+ canvas.onkeydown=handleKey;
+
+ if(!embedded)
+ enableZoom();
+ canvas.addEventListener("touchstart",handleTouchStart,false);
+ canvas.addEventListener("touchend",handleMouseUpOrTouchEnd,false);
+ canvas.addEventListener("touchcancel",handleMouseUpOrTouchEnd,false);
+ canvas.addEventListener("touchleave",handleMouseUpOrTouchEnd,false);
+ canvas.addEventListener("touchmove",handleTouchMove,false);
+ document.addEventListener("keydown",handleKey,false);
+
+ canvasWidth0=canvasWidth;
+ canvasHeight0=canvasHeight;
+
+ mat4.identity(rotMat);
+
+ if(window.innerWidth != 0 && window.innerHeight != 0)
+ resize();
+
+ window.addEventListener("resize",resize,false);
}
diff --git a/Build/source/utils/asymptote/webgl/license b/Build/source/utils/asymptote/webgl/license
index d7a2d1a099a..f1169e9d3fe 100644
--- a/Build/source/utils/asymptote/webgl/license
+++ b/Build/source/utils/asymptote/webgl/license
@@ -1,6 +1,6 @@
/*@license
AsyGL: Render Bezier patches and triangles via subdivision with WebGL.
- Copyright 2019: John C. Bowman and Supakorn "Jamie" Rassameemasmuang
+ Copyright 2019-2020: John C. Bowman and Supakorn "Jamie" Rassameemasmuang
University of Alberta
This program is free software; you can redistribute it and/or modify
diff --git a/Build/source/utils/asymptote/xstream.h b/Build/source/utils/asymptote/xstream.h
index 3c7c94e1158..b7947ee3e9d 100644
--- a/Build/source/utils/asymptote/xstream.h
+++ b/Build/source/utils/asymptote/xstream.h
@@ -27,10 +27,10 @@
#include <sys/types.h>
#include <rpc/types.h>
-
+
#define quad_t long long
#define u_quad_t unsigned long long
-
+
#if defined(__CYGWIN__) || defined(__FreeBSD__)
#include <sys/select.h>
#define u_char unsigned char
@@ -39,12 +39,19 @@
#define u_long unsigned long
extern "C" int fseeko(FILE *, off_t, int);
extern "C" off_t ftello(FILE *);
-#endif
+#endif
#ifdef __APPLE__
#include <rpc/xdr.h>
-extern bool_t xdr_long(XDR *__xdrs, long *__lp);
-extern bool_t xdr_u_long(XDR *__xdrs, u_long *__ulp);
+
+inline bool_t xdr_long(XDR *__xdrs, long *__lp) {
+ return xdr_longlong_t(__xdrs,(long long *) __lp);
+}
+
+inline bool_t xdr_u_long(XDR *__xdrs, unsigned long *__lp) {
+ return xdr_u_longlong_t(__xdrs,(unsigned long long *) __lp);
+}
+
#endif
#ifdef _POSIX_SOURCE
@@ -56,7 +63,7 @@ extern bool_t xdr_u_long(XDR *__xdrs, u_long *__ulp);
#endif
namespace xdr {
-
+
class xbyte {
unsigned char c;
public:
@@ -73,9 +80,9 @@ public:
enum io_state {goodbit=0, eofbit=1, failbit=2, badbit=4};
enum open_mode {in=1, out=2, app=8, trunc=16};
enum seekdir {beg=SEEK_SET, cur=SEEK_CUR, end=SEEK_END};
-private:
+private:
int _state;
-public:
+public:
int good() const { return _state == 0; }
int eof() const { return _state & eofbit; }
int fail() const { return !good();}
@@ -94,11 +101,11 @@ public:
xstream() {buf=NULL;}
void precision(int) {}
-
+
xstream& seek(off_t pos, seekdir dir=beg) {
if(buf) {
clear();
- if(fseeko(buf,pos,dir) != 0) set(failbit);
+ if(fseeko(buf,pos,dir) != 0) set(failbit);
}
return *this;
}
@@ -114,7 +121,7 @@ public:
{if(!xdr_##N(&xdro, &x)) set(badbit); return *this;}
class ixstream : virtual public xstream {
-protected:
+protected:
XDR xdri;
public:
void open(const char *filename, open_mode=in) {
@@ -123,25 +130,25 @@ public:
if(buf) xdrstdio_create(&xdri,buf,XDR_DECODE);
else set(badbit);
}
-
+
void close() {
if(buf) {
#ifndef _CRAY
xdr_destroy(&xdri);
-#endif
+#endif
fclose(buf);
buf=NULL;
}
}
-
+
ixstream() {}
ixstream(const char *filename) {open(filename);}
ixstream(const char *filename, open_mode mode) {open(filename,mode);}
virtual ~ixstream() {close();}
-
+
typedef ixstream& (*imanip)(ixstream&);
ixstream& operator >> (imanip func) { return (*func)(*this); }
-
+
IXSTREAM(int,int);
IXSTREAM(unsigned int,u_int);
IXSTREAM(long,long);
@@ -151,12 +158,12 @@ public:
IXSTREAM(short,short);
IXSTREAM(unsigned short,u_short);
IXSTREAM(char,char);
-#ifndef _CRAY
+#ifndef _CRAY
IXSTREAM(unsigned char,u_char);
-#endif
+#endif
IXSTREAM(float,float);
IXSTREAM(double,double);
-
+
ixstream& operator >> (xbyte& x) {
x=fgetc(buf);
if(x.byte() == EOF) set(eofbit);
@@ -165,7 +172,7 @@ public:
};
class oxstream : virtual public xstream {
-protected:
+protected:
XDR xdro;
public:
void open(const char *filename, open_mode mode=trunc) {
@@ -174,27 +181,27 @@ public:
if(buf) xdrstdio_create(&xdro,buf,XDR_ENCODE);
else set(badbit);
}
-
+
void close() {
if(buf) {
#ifndef _CRAY
xdr_destroy(&xdro);
-#endif
+#endif
fclose(buf);
buf=NULL;
}
}
-
+
oxstream() {}
oxstream(const char *filename) {open(filename);}
oxstream(const char *filename, open_mode mode) {open(filename,mode);}
virtual ~oxstream() {close();}
oxstream& flush() {if(buf) fflush(buf); return *this;}
-
+
typedef oxstream& (*omanip)(oxstream&);
oxstream& operator << (omanip func) { return (*func)(*this); }
-
+
OXSTREAM(int,int);
OXSTREAM(unsigned int,u_int);
OXSTREAM(long,long);
@@ -204,12 +211,12 @@ public:
OXSTREAM(short,short);
OXSTREAM(unsigned short,u_short);
OXSTREAM(char,char);
-#ifndef _CRAY
+#ifndef _CRAY
OXSTREAM(unsigned char,u_char);
-#endif
+#endif
OXSTREAM(float,float);
OXSTREAM(double,double);
-
+
oxstream& operator << (xbyte x) {
if(fputc(x.byte(),buf) == EOF) set(badbit);
return *this;
@@ -235,18 +242,18 @@ public:
xdrstdio_create(&xdro,buf,XDR_ENCODE);
} else set(badbit);
}
-
+
void close() {
if(buf) {
#ifndef _CRAY
xdr_destroy(&xdri);
xdr_destroy(&xdro);
-#endif
+#endif
fclose(buf);
buf=NULL;
}
}
-
+
ioxstream() {}
ioxstream(const char *filename) {open(filename);}
ioxstream(const char *filename, open_mode mode) {open(filename,mode);}