diff options
author | Karl Berry <karl@freefriends.org> | 2014-04-21 23:02:35 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-04-21 23:02:35 +0000 |
commit | fab654a7fafba60c3d1e32040ad16d19b5dfd550 (patch) | |
tree | 699549d43c84af6b176173d794f17c7cc7164bc6 /Master | |
parent | ea58320b10f549a61236be100fc97925aea6b489 (diff) |
asymptote 2.25 for TL14
git-svn-id: svn://tug.org/texlive/trunk@33606 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
34 files changed, 1545 insertions, 2177 deletions
diff --git a/Master/bin/amd64-kfreebsd/asy b/Master/bin/amd64-kfreebsd/asy Binary files differindex 6f16eabb1ba..51a6d9fada8 100755 --- a/Master/bin/amd64-kfreebsd/asy +++ b/Master/bin/amd64-kfreebsd/asy diff --git a/Master/bin/armhf-linux/asy b/Master/bin/armhf-linux/asy Binary files differindex 25d1b7818ad..76d017606f3 100755 --- a/Master/bin/armhf-linux/asy +++ b/Master/bin/armhf-linux/asy diff --git a/Master/bin/i386-kfreebsd/asy b/Master/bin/i386-kfreebsd/asy Binary files differindex 34209d4eff9..14f966df76e 100755 --- a/Master/bin/i386-kfreebsd/asy +++ b/Master/bin/i386-kfreebsd/asy diff --git a/Master/bin/i386-linux/asy b/Master/bin/i386-linux/asy Binary files differindex 59b96ad7584..2cbb5377f54 100755 --- a/Master/bin/i386-linux/asy +++ b/Master/bin/i386-linux/asy diff --git a/Master/texmf-dist/asymptote/CAD.asy b/Master/texmf-dist/asymptote/CAD.asy index b65e6478838..1bed03bc20b 100644 --- a/Master/texmf-dist/asymptote/CAD.asy +++ b/Master/texmf-dist/asymptote/CAD.asy @@ -1,367 +1,367 @@ -struct sCAD
-{
- int nLineGroup = 0; // 0-3
-
- pen
- // A
- pA,
- pVisibleEdge, // Sichtbare Kanten
- pVisibleContour, // Sichtbarer Umriss
- pUsableWindingLength, // Nitzbare Gewindelänge
- pSystemLine, // Systemlinie (Stahlbau)
- pDiagramCurve, // Kurve in Diagrammen
- pSurfaceStructure, // Oberflächenstrukturen
- // B
- pB,
- pLightEdge, // Lichtkante
- pMeasureLine, // Maßlinie
- pMeasureHelpLine, // Maßhilfslinie
- pMeasureLineBound, // Maßlinienbegrenzung
- pReferenceLine, // Hinweislinie
- pHatch, // Schraffur
- pWindingGround, // Gewindegrund
- pDiagonalCross, // Diagonalkreuz
- pBendLine, // Biegelinie
- pProjectionLine, // Projektionslinie
- pGrid, // Rasterlinien
- // C
- pC,
- pFreehand, // Begrenzung abgebrochener oder unterbrochener
- // Schnitte, wenn die Begrenzung
- // keine Mittellinie ist
- // E
- pE,
- pSurfaceTreatmentAllowed, // Bereich zulässiger Oberflächenbehandlung
- // F
- pF,
- pInvisibleEdge, // unsichtbare Kante
- pInvisibleContour, // unsichtbarer Umriss
- // G
- pG,
- pMiddleLine, // Mittellinie
- pSymmetryLine, // Symmetrielinie
- pPartialCircle, // Teilkreis
- pCircularHole, // Lochkreis
- pDivisionPlane, // Teilungsebene
- pTransferLine, // Trajektorien (Übertragunslinien)
- // J
- pJ,
- pCuttingPlane, // Schnittebene
- pSurfaceTreatmentRequested, // Bereich geforderter Behandlungen
- // K
- pK,
- pContourBeforeDeformation, // Umrisse vor Verformung
- pAdjacentPartContour, // Umrisse angrenzender Teile
- pEndShapeRawMaterial, // Fertigformen in Rohteilen
- pContourEligibleType, // Umrisse wahlweiser Ausführungen
- pPartInFrontOfCuttingPlane; // Teile vor der Schnittebene
-
-
-
- static sCAD Create(int nLineGroup = 1)
- {
- sCAD cad = new sCAD;
- if ( nLineGroup < 0 )
- nLineGroup = 0;
- if ( nLineGroup > 3 )
- nLineGroup = 3;
- cad.nLineGroup = nLineGroup;
-
- restricted real[] dblFullWidth = {0.35mm, 0.5mm, 0.7mm, 1.0mm};
- restricted real[] dblHalfWidth = {0.18mm, 0.25mm, 0.35mm, 0.5mm};
-
- pen pFullWidth = linewidth(dblFullWidth[nLineGroup]);
- pen pHalfWidth = linewidth(dblHalfWidth[nLineGroup]);
-
- // Linienarten:
- // A
- cad.pA =
- cad.pVisibleEdge =
- cad.pVisibleContour =
- cad.pUsableWindingLength =
- cad.pSystemLine =
- cad.pDiagramCurve =
- cad.pSurfaceStructure =
- pFullWidth + solid;
- // B
- cad.pB =
- cad.pLightEdge =
- cad.pMeasureLine =
- cad.pMeasureHelpLine =
- cad.pMeasureLineBound =
- cad.pReferenceLine =
- cad.pHatch =
- cad.pWindingGround =
- cad.pDiagonalCross =
- cad.pBendLine =
- cad.pProjectionLine =
- cad.pGrid =
- pHalfWidth + solid;
- // C
- cad.pC =
- cad.pFreehand =
- pHalfWidth + solid;
- // D
- // Missing, as I have no idea how to implement this...
- // E
- cad.pE =
- cad.pSurfaceTreatmentAllowed =
- pFullWidth + linetype(new real[] {10,2.5});
- // F
- cad.pF =
- cad.pInvisibleEdge =
- cad.pInvisibleContour =
- pHalfWidth + linetype(new real[] {20,5});
- // G
- cad.pG =
- cad.pMiddleLine =
- cad.pSymmetryLine =
- cad.pPartialCircle =
- cad.pCircularHole =
- cad.pDivisionPlane =
- cad.pTransferLine =
- pHalfWidth + linetype(new real[] {40,5,5,5});
- // H
- // see J
- // I
- // This letter is not used in DIN 15
- // J
- cad.pJ =
- cad.pCuttingPlane =
- cad.pSurfaceTreatmentRequested =
- pFullWidth + linetype(new real[] {20,2.5,2.5,2.5});
- // K
- cad.pK =
- cad.pContourBeforeDeformation =
- cad.pAdjacentPartContour =
- cad.pEndShapeRawMaterial =
- cad.pContourEligibleType =
- cad.pPartInFrontOfCuttingPlane =
- pHalfWidth + linetype(new real[] {40,5,5,5,5,5});
-
- return cad;
- } // end of Create
-
-
-
- real GetMeasurementBoundSize(bool bSmallBound = false)
- {
- if ( bSmallBound )
- return 1.5 * linewidth(pVisibleEdge) / 2;
- else
- return 5 * linewidth(pVisibleEdge);
- }
-
-
-
- path GetMeasurementBound(bool bSmallBound = false)
- {
- if ( bSmallBound )
- return scale(GetMeasurementBoundSize(bSmallBound = bSmallBound)) *
- unitcircle;
- else
- return (0,0) --
- (-cos(radians(7.5)), -sin(radians(7.5))) *
- GetMeasurementBoundSize(bSmallBound = bSmallBound) --
- (-cos(radians(7.5)), sin(radians(7.5))) *
- GetMeasurementBoundSize(bSmallBound = bSmallBound) --
- cycle;
- }
-
-
-
- void MeasureLine(picture pic = currentpicture,
- Label L,
- pair pFrom,
- pair pTo,
- real dblLeft = 0,
- real dblRight = 0,
- real dblRelPosition = 0.5,
- bool bSmallBound = false)
- {
- if ( dblLeft < 0 )
- dblLeft = 0;
- if ( dblRight < 0 )
- dblRight = 0;
- if ( (dblLeft > 0) && (dblRight == 0) )
- dblRight = dblLeft;
- if ( (dblLeft == 0) && (dblRight > 0) )
- dblLeft = dblRight;
- pair pDiff = pTo - pFrom;
- real dblLength = length(pDiff);
- pair pBegin = pFrom - dblLeft * unit(pDiff);
- pair pEnd = pTo + dblRight * unit(pDiff);
- if ( bSmallBound )
- {
- draw(
- pic = pic,
- g = pBegin--pEnd,
- p = pMeasureLine);
- }
- else
- {
- real dblBoundSize = GetMeasurementBoundSize(bSmallBound = bSmallBound);
- if ( dblLeft == 0 )
- draw(
- pic = pic,
- g = (pFrom + dblBoundSize/2 * unit(pDiff))
- -- (pTo - dblBoundSize/2 * unit(pDiff)),
- p = pMeasureLine);
- else
- draw(
- pic = pic,
- g = pBegin -- (pFrom - dblBoundSize/2 * unit(pDiff))
- ^^ pFrom -- pTo
- ^^ (pTo + dblBoundSize/2 * unit(pDiff)) -- pEnd,
- p = pMeasureLine);
- }
- path gArrow = GetMeasurementBound(bSmallBound = bSmallBound);
- picture picL;
- label(picL, L);
- pair pLabelSize = 1.2 * (max(picL) - min(picL));
- if ( dblLeft == 0 )
- {
- fill(
- pic = pic,
- g = shift(pFrom) * rotate(degrees(-pDiff)) * gArrow,
- p = pVisibleEdge);
- fill(
- pic = pic,
- g = shift(pTo) * rotate(degrees(pDiff)) * gArrow,
- p = pVisibleEdge);
- if ( dblRelPosition < 0 )
- dblRelPosition = 0;
- if ( dblRelPosition > 1 )
- dblRelPosition = 1;
- label(
- pic = pic,
- L = rotate(degrees(pDiff)) * L,
- position =
- pFrom
- + dblRelPosition * pDiff
- + unit(rotate(90)*pDiff) * pLabelSize.y / 2);
- }
- else
- {
- fill(
- pic = pic,
- g = shift(pFrom) * rotate(degrees(pDiff)) * gArrow,
- p = pVisibleEdge);
- fill(
- pic = pic,
- g = shift(pTo) * rotate(degrees(-pDiff)) * gArrow,
- p = pVisibleEdge);
- if ( (dblRelPosition >= 0) && (dblRelPosition <= 1) )
- label(
- pic = pic,
- L = rotate(degrees(pDiff)) * L,
- position =
- pFrom
- + dblRelPosition * pDiff
- + unit(rotate(90)*pDiff) * pLabelSize.y / 2);
- else
- {
- // draw label outside
- if ( dblRelPosition < 0 )
- label(
- pic = pic,
- L = rotate(degrees(pDiff)) * L,
- position =
- pBegin
- + pLabelSize.x / 2 * unit(pDiff)
- + unit(rotate(90)*pDiff) * pLabelSize.y / 2);
- else
- // dblRelPosition > 1
- label(
- pic = pic,
- L = rotate(degrees(pDiff)) * L,
- position =
- pEnd
- - pLabelSize.x / 2 * unit(pDiff)
- + unit(rotate(90)*pDiff) * pLabelSize.y / 2);
- }
- }
- } // end of MeasureLine
-
-
-
- void MeasureParallel(picture pic = currentpicture,
- Label L,
- pair pFrom,
- pair pTo,
- real dblDistance,
- // Variables from MeasureLine
- real dblLeft = 0,
- real dblRight = 0,
- real dblRelPosition = 0.5,
- bool bSmallBound = false)
- {
- pair pDiff = pTo - pFrom;
- pair pPerpendicularDiff = unit(rotate(90) * pDiff);
- real dblDistancePlus;
- if ( dblDistance >= 0 )
- dblDistancePlus = dblDistance + 1mm;
- else
- dblDistancePlus = dblDistance - 1mm;
- draw(
- pic = pic,
- g = pFrom--(pFrom + dblDistancePlus*pPerpendicularDiff),
- p = pMeasureHelpLine
- );
- draw(
- pic = pic,
- g = pTo--(pTo + dblDistancePlus*pPerpendicularDiff),
- p = pMeasureHelpLine
- );
- MeasureLine(
- pic = pic,
- L = L,
- pFrom = pFrom + dblDistance * pPerpendicularDiff,
- pTo = pTo + dblDistance * pPerpendicularDiff,
- dblLeft = dblLeft,
- dblRight = dblRight,
- dblRelPosition = dblRelPosition,
- bSmallBound = bSmallBound);
- } // end of MeasureParallel
-
-
-
- path MakeFreehand(pair pFrom, pair pTo,
- real dblRelDivisionLength = 12.5,
- real dblRelDistortion = 2.5,
- bool bIncludeTo = true)
- {
- pair pDiff = pTo - pFrom;
- pair pPerpendicular = dblRelDistortion * linewidth(pFreehand) *
- unit(rotate(90) * pDiff);
-
- int nNumOfSubDivisions=ceil(length(pDiff) /
- (dblRelDivisionLength * linewidth(pFreehand)));
-
- restricted real[] dblDistortion = {1, -.5, .75, -.25, .25, -1, .5, -.75,
- .25, -.25};
- int nDistortion = 0;
-
- guide g;
- g = pFrom;
- for ( int i = 1 ; i < nNumOfSubDivisions ; ++i )
- {
- g = g ..
- (pFrom
- + pDiff * i / (real)nNumOfSubDivisions
- + pPerpendicular * dblDistortion[nDistortion]);
- nDistortion += 1;
- if ( nDistortion > 9 )
- nDistortion = 0;
- }
-
- if ( bIncludeTo )
- g = g .. pTo;
-
- return g;
- } // end of MakeFreehand
-
-
-
-} // end of CAD
-
+struct sCAD +{ + int nLineGroup = 0; // 0-3 + + pen + // A + pA, + pVisibleEdge, // Sichtbare Kanten + pVisibleContour, // Sichtbarer Umriss + pUsableWindingLength, // Nitzbare Gewindelänge + pSystemLine, // Systemlinie (Stahlbau) + pDiagramCurve, // Kurve in Diagrammen + pSurfaceStructure, // Oberflächenstrukturen + // B + pB, + pLightEdge, // Lichtkante + pMeasureLine, // Maßlinie + pMeasureHelpLine, // Maßhilfslinie + pMeasureLineBound, // Maßlinienbegrenzung + pReferenceLine, // Hinweislinie + pHatch, // Schraffur + pWindingGround, // Gewindegrund + pDiagonalCross, // Diagonalkreuz + pBendLine, // Biegelinie + pProjectionLine, // Projektionslinie + pGrid, // Rasterlinien + // C + pC, + pFreehand, // Begrenzung abgebrochener oder unterbrochener + // Schnitte, wenn die Begrenzung + // keine Mittellinie ist + // E + pE, + pSurfaceTreatmentAllowed, // Bereich zulässiger Oberflächenbehandlung + // F + pF, + pInvisibleEdge, // unsichtbare Kante + pInvisibleContour, // unsichtbarer Umriss + // G + pG, + pMiddleLine, // Mittellinie + pSymmetryLine, // Symmetrielinie + pPartialCircle, // Teilkreis + pCircularHole, // Lochkreis + pDivisionPlane, // Teilungsebene + pTransferLine, // Trajektorien (Übertragunslinien) + // J + pJ, + pCuttingPlane, // Schnittebene + pSurfaceTreatmentRequested, // Bereich geforderter Behandlungen + // K + pK, + pContourBeforeDeformation, // Umrisse vor Verformung + pAdjacentPartContour, // Umrisse angrenzender Teile + pEndShapeRawMaterial, // Fertigformen in Rohteilen + pContourEligibleType, // Umrisse wahlweiser Ausführungen + pPartInFrontOfCuttingPlane; // Teile vor der Schnittebene + + + + static sCAD Create(int nLineGroup = 1) + { + sCAD cad = new sCAD; + if ( nLineGroup < 0 ) + nLineGroup = 0; + if ( nLineGroup > 3 ) + nLineGroup = 3; + cad.nLineGroup = nLineGroup; + + restricted real[] dblFullWidth = {0.35mm, 0.5mm, 0.7mm, 1.0mm}; + restricted real[] dblHalfWidth = {0.18mm, 0.25mm, 0.35mm, 0.5mm}; + + pen pFullWidth = linewidth(dblFullWidth[nLineGroup]); + pen pHalfWidth = linewidth(dblHalfWidth[nLineGroup]); + + // Linienarten: + // A + cad.pA = + cad.pVisibleEdge = + cad.pVisibleContour = + cad.pUsableWindingLength = + cad.pSystemLine = + cad.pDiagramCurve = + cad.pSurfaceStructure = + pFullWidth + solid; + // B + cad.pB = + cad.pLightEdge = + cad.pMeasureLine = + cad.pMeasureHelpLine = + cad.pMeasureLineBound = + cad.pReferenceLine = + cad.pHatch = + cad.pWindingGround = + cad.pDiagonalCross = + cad.pBendLine = + cad.pProjectionLine = + cad.pGrid = + pHalfWidth + solid; + // C + cad.pC = + cad.pFreehand = + pHalfWidth + solid; + // D + // Missing, as I have no idea how to implement this... + // E + cad.pE = + cad.pSurfaceTreatmentAllowed = + pFullWidth + linetype(new real[] {10,2.5}); + // F + cad.pF = + cad.pInvisibleEdge = + cad.pInvisibleContour = + pHalfWidth + linetype(new real[] {20,5}); + // G + cad.pG = + cad.pMiddleLine = + cad.pSymmetryLine = + cad.pPartialCircle = + cad.pCircularHole = + cad.pDivisionPlane = + cad.pTransferLine = + pHalfWidth + linetype(new real[] {40,5,5,5}); + // H + // see J + // I + // This letter is not used in DIN 15 + // J + cad.pJ = + cad.pCuttingPlane = + cad.pSurfaceTreatmentRequested = + pFullWidth + linetype(new real[] {20,2.5,2.5,2.5}); + // K + cad.pK = + cad.pContourBeforeDeformation = + cad.pAdjacentPartContour = + cad.pEndShapeRawMaterial = + cad.pContourEligibleType = + cad.pPartInFrontOfCuttingPlane = + pHalfWidth + linetype(new real[] {40,5,5,5,5,5}); + + return cad; + } // end of Create + + + + real GetMeasurementBoundSize(bool bSmallBound = false) + { + if ( bSmallBound ) + return 1.5 * linewidth(pVisibleEdge) / 2; + else + return 5 * linewidth(pVisibleEdge); + } + + + + path GetMeasurementBound(bool bSmallBound = false) + { + if ( bSmallBound ) + return scale(GetMeasurementBoundSize(bSmallBound = bSmallBound)) * + unitcircle; + else + return (0,0) -- + (-cos(radians(7.5)), -sin(radians(7.5))) * + GetMeasurementBoundSize(bSmallBound = bSmallBound) -- + (-cos(radians(7.5)), sin(radians(7.5))) * + GetMeasurementBoundSize(bSmallBound = bSmallBound) -- + cycle; + } + + + + void MeasureLine(picture pic = currentpicture, + Label L, + pair pFrom, + pair pTo, + real dblLeft = 0, + real dblRight = 0, + real dblRelPosition = 0.5, + bool bSmallBound = false) + { + if ( dblLeft < 0 ) + dblLeft = 0; + if ( dblRight < 0 ) + dblRight = 0; + if ( (dblLeft > 0) && (dblRight == 0) ) + dblRight = dblLeft; + if ( (dblLeft == 0) && (dblRight > 0) ) + dblLeft = dblRight; + pair pDiff = pTo - pFrom; + real dblLength = length(pDiff); + pair pBegin = pFrom - dblLeft * unit(pDiff); + pair pEnd = pTo + dblRight * unit(pDiff); + if ( bSmallBound ) + { + draw( + pic = pic, + g = pBegin--pEnd, + p = pMeasureLine); + } + else + { + real dblBoundSize = GetMeasurementBoundSize(bSmallBound = bSmallBound); + if ( dblLeft == 0 ) + draw( + pic = pic, + g = (pFrom + dblBoundSize/2 * unit(pDiff)) + -- (pTo - dblBoundSize/2 * unit(pDiff)), + p = pMeasureLine); + else + draw( + pic = pic, + g = pBegin -- (pFrom - dblBoundSize/2 * unit(pDiff)) + ^^ pFrom -- pTo + ^^ (pTo + dblBoundSize/2 * unit(pDiff)) -- pEnd, + p = pMeasureLine); + } + path gArrow = GetMeasurementBound(bSmallBound = bSmallBound); + picture picL; + label(picL, L); + pair pLabelSize = 1.2 * (max(picL) - min(picL)); + if ( dblLeft == 0 ) + { + fill( + pic = pic, + g = shift(pFrom) * rotate(degrees(-pDiff)) * gArrow, + p = pVisibleEdge); + fill( + pic = pic, + g = shift(pTo) * rotate(degrees(pDiff)) * gArrow, + p = pVisibleEdge); + if ( dblRelPosition < 0 ) + dblRelPosition = 0; + if ( dblRelPosition > 1 ) + dblRelPosition = 1; + label( + pic = pic, + L = rotate(degrees(pDiff)) * L, + position = + pFrom + + dblRelPosition * pDiff + + unit(rotate(90)*pDiff) * pLabelSize.y / 2); + } + else + { + fill( + pic = pic, + g = shift(pFrom) * rotate(degrees(pDiff)) * gArrow, + p = pVisibleEdge); + fill( + pic = pic, + g = shift(pTo) * rotate(degrees(-pDiff)) * gArrow, + p = pVisibleEdge); + if ( (dblRelPosition >= 0) && (dblRelPosition <= 1) ) + label( + pic = pic, + L = rotate(degrees(pDiff)) * L, + position = + pFrom + + dblRelPosition * pDiff + + unit(rotate(90)*pDiff) * pLabelSize.y / 2); + else + { + // draw label outside + if ( dblRelPosition < 0 ) + label( + pic = pic, + L = rotate(degrees(pDiff)) * L, + position = + pBegin + + pLabelSize.x / 2 * unit(pDiff) + + unit(rotate(90)*pDiff) * pLabelSize.y / 2); + else + // dblRelPosition > 1 + label( + pic = pic, + L = rotate(degrees(pDiff)) * L, + position = + pEnd + - pLabelSize.x / 2 * unit(pDiff) + + unit(rotate(90)*pDiff) * pLabelSize.y / 2); + } + } + } // end of MeasureLine + + + + void MeasureParallel(picture pic = currentpicture, + Label L, + pair pFrom, + pair pTo, + real dblDistance, + // Variables from MeasureLine + real dblLeft = 0, + real dblRight = 0, + real dblRelPosition = 0.5, + bool bSmallBound = false) + { + pair pDiff = pTo - pFrom; + pair pPerpendicularDiff = unit(rotate(90) * pDiff); + real dblDistancePlus; + if ( dblDistance >= 0 ) + dblDistancePlus = dblDistance + 1mm; + else + dblDistancePlus = dblDistance - 1mm; + draw( + pic = pic, + g = pFrom--(pFrom + dblDistancePlus*pPerpendicularDiff), + p = pMeasureHelpLine + ); + draw( + pic = pic, + g = pTo--(pTo + dblDistancePlus*pPerpendicularDiff), + p = pMeasureHelpLine + ); + MeasureLine( + pic = pic, + L = L, + pFrom = pFrom + dblDistance * pPerpendicularDiff, + pTo = pTo + dblDistance * pPerpendicularDiff, + dblLeft = dblLeft, + dblRight = dblRight, + dblRelPosition = dblRelPosition, + bSmallBound = bSmallBound); + } // end of MeasureParallel + + + + path MakeFreehand(pair pFrom, pair pTo, + real dblRelDivisionLength = 12.5, + real dblRelDistortion = 2.5, + bool bIncludeTo = true) + { + pair pDiff = pTo - pFrom; + pair pPerpendicular = dblRelDistortion * linewidth(pFreehand) * + unit(rotate(90) * pDiff); + + int nNumOfSubDivisions=ceil(length(pDiff) / + (dblRelDivisionLength * linewidth(pFreehand))); + + restricted real[] dblDistortion = {1, -.5, .75, -.25, .25, -1, .5, -.75, + .25, -.25}; + int nDistortion = 0; + + guide g; + g = pFrom; + for ( int i = 1 ; i < nNumOfSubDivisions ; ++i ) + { + g = g .. + (pFrom + + pDiff * i / (real)nNumOfSubDivisions + + pPerpendicular * dblDistortion[nDistortion]); + nDistortion += 1; + if ( nDistortion > 9 ) + nDistortion = 0; + } + + if ( bIncludeTo ) + g = g .. pTo; + + return g; + } // end of MakeFreehand + + + +} // end of CAD + diff --git a/Master/texmf-dist/asymptote/GUI/xasyCodeEditor.py b/Master/texmf-dist/asymptote/GUI/xasyCodeEditor.py index 93e06e447ee..1f7ad60328f 100755 --- a/Master/texmf-dist/asymptote/GUI/xasyCodeEditor.py +++ b/Master/texmf-dist/asymptote/GUI/xasyCodeEditor.py @@ -14,6 +14,7 @@ from subprocess import call from tempfile import mkstemp from os import remove from os import fdopen +from os import path from string import split import xasyOptions @@ -24,7 +25,12 @@ def getText(text=""): tempf.write(text) tempf.flush() try: - call(split(xasyOptions.options['externalEditor'])+[temp[1]]) + cmdpath,cmd = path.split(xasyOptions.options['externalEditor']) + split_cmd = split(cmd) + cmdpart = [path.join(cmdpath,split_cmd[0])] + argpart = split_cmd[1:]+[temp[1]] + arglist = cmdpart+argpart + call(arglist) except: raise Exception('Error launching external editor.') tempf.seek(0) diff --git a/Master/texmf-dist/asymptote/GUI/xasyVersion.py b/Master/texmf-dist/asymptote/GUI/xasyVersion.py index c98d9df7c59..aefd00148e1 100755 --- a/Master/texmf-dist/asymptote/GUI/xasyVersion.py +++ b/Master/texmf-dist/asymptote/GUI/xasyVersion.py @@ -1,2 +1,2 @@ #!/usr/bin/env python -xasyVersion = "2.23" +xasyVersion = "2.25" diff --git a/Master/texmf-dist/asymptote/asy-keywords.el b/Master/texmf-dist/asymptote/asy-keywords.el index 02f37ab90ba..f2802d6aecc 100644 --- a/Master/texmf-dist/asymptote/asy-keywords.el +++ b/Master/texmf-dist/asymptote/asy-keywords.el @@ -2,16 +2,16 @@ ;; This file is automatically generated by asy-list.pl. ;; Changes will be overwritten. ;; -(defvar asy-keywords-version "2.23") +(defvar asy-keywords-version "2.25") (defvar asy-keyword-name '( and controls tension atleast curl if else while for do return break continue struct typedef new access import unravel from include quote static public private restricted this explicit true false null cycle newframe operator )) (defvar asy-type-name '( -Braid FitResult Label Legend Segment Solution TreeNode abscissa arc arrowhead binarytree binarytreeNode block bool bool3 bounds bqe circle conic coord coordsys cputime ellipse file filltype frame grid3 guide horner hsv hyperbola indexedTransform int inversion key light line linefit marginT marker mass object pair parabola path path3 pen picture point position projection real revolution scaleT scientific segment side slice solution splitface string surface tensionSpecifier ticklocate ticksgridT tickvalues transform transformation tree triangle trilinear triple vector vertex void )) +Braid FitResult Label Legend Solution TreeNode abscissa arc arrowhead binarytree binarytreeNode block bool bool3 bounds bqe circle conic coord coordsys cputime ellipse file filltype frame grid3 guide horner hsv hyperbola indexedTransform int inversion key light line linefit marginT marker mass object pair parabola path path3 pen picture point position projection real revolution scaleT scientific segment side slice solution splitface string surface tensionSpecifier ticklocate ticksgridT tickvalues transform transformation tree triangle trilinear triple vector vertex void )) (defvar asy-function-name '( -AND Arc ArcArrow ArcArrows Arrow Arrows Automatic AvantGarde BBox BWRainbow BWRainbow2 Bar Bars BeginArcArrow BeginArrow BeginBar BeginDotMargin BeginMargin BeginPenMargin Blank Bookman Bottom BottomTop Bounds Break Broken BrokenLog CLZ CTZ Ceil Circle CircleBarIntervalMarker Cos Courier CrossIntervalMarker DOSendl DOSnewl DefaultFormat DefaultLogFormat Degrees Dir DotMargin DotMargins Dotted Draw Drawline Embed EndArcArrow EndArrow EndBar EndDotMargin EndMargin EndPenMargin Fill FillDraw Floor Format Full Gaussian Gaussrand Gaussrandpair Gradient Grayscale Helvetica Hermite HookHead InOutTicks InTicks Jn Label Landscape Left LeftRight LeftTicks Legend Linear Log LogFormat Margin Margins Mark MidArcArrow MidArrow NOT NewCenturySchoolBook NoBox NoMargin NoModifier NoTicks NoTicks3 NoZero NoZeroFormat None OR OmitFormat OmitTick OmitTickInterval OmitTickIntervals OutTicks Ox Oy Palatino PaletteTicks Pen PenMargin PenMargins Pentype Portrait RadialShade RadialShadeDraw Rainbow Range Relative Right RightTicks Rotate Round SQR Scale ScaleX ScaleY ScaleZ Seascape Segment Shift Sin Slant Spline StickIntervalMarker Straight Symbol Tan TeXify Ticks Ticks3 TildeIntervalMarker TimesRoman Top TrueMargin UnFill UpsideDown Wheel X XEquals XOR XY XYEquals XYZero XYgrid XZEquals XZZero XZero XZgrid Y YEquals YXgrid YZ YZEquals YZZero YZero YZgrid Yn Z ZX ZXgrid ZYgrid ZapfChancery ZapfDingbats _begingroup3 _cputime _draw _eval _image _labelpath _projection _strokepath _texpath aCos aSin aTan abort abs accel acos acosh acot acsc activatequote add addArrow addMargins addSaveFunction addpenarc addpenline adjust alias align all altitude angabscissa angle angpoint animate annotate anticomplementary antipedal apply approximate arc arcarrowsize arccircle arcdir arcfromcenter arcfromfocus arclength arcnodesnumber arcpoint arcsubtended arcsubtendedcenter arctime arctopath array arrow arrow2 arrowbase arrowbasepoints arrowsize ascii asec asin asinh ask assert asy asycode asydir asyfigure asyfilecode asyinclude asywrite atan atan2 atanh atbreakpoint atexit attach attract atupdate autoformat autoscale autoscale3 axes axes3 axialshade axis axiscoverage azimuth babel background bangles bar barmarksize barsize basealign baseline bbox beep begin beginclip begingroup beginpoint between bevel bezier bezierP bezierPP bezierPPP bezulate bibliography bibliographystyle binarytree binarytreeNode binomial bins bisector bisectorpoint bispline blend blockconnector box bqe breakpoint breakpoints brick buildRestoreDefaults buildRestoreThunk buildcycle bulletcolor byte calculateScaling canonical canonicalcartesiansystem cartesiansystem case1 case2 case3 case4 cbrt cd ceil center centerToFocus centroid cevian change2 changecoordsys checkSegment checkconditionlength checker checkincreasing checklengths checkposition checktriangle choose circle circlebarframe circlemarkradius circlenodesnumber circumcenter circumcircle clamped clear clip clipdraw close cmyk code colatitude collect collinear color colorless colors colorspace comma compassmark complement complementary concat concurrent cone conic conicnodesnumber conictype conj connect connected connectedindex containmentTree contains contour contour3 contouredges controlSpecifier convert coordinates coordsys copy copyPairOrTriple cos cosh cot countIntersections cputime crop cropcode cross crossframe crosshatch crossmarksize csc cubicroots curabscissa curlSpecifier curpoint currentarrow currentexitfunction currentmomarrow currentpolarconicroutine curve cut cutafter cutbefore cyclic cylinder deactivatequote debugger deconstruct defaultdir defaultformat defaultpen defined degenerate degrees delete deletepreamble determinant diagonal diamond diffdiv dir dirSpecifier dirtime display distance divisors do_overpaint dot dotframe dotsize downcase draw drawAll drawDoubleLine drawFermion drawGhost drawGluon drawMomArrow drawPRCcylinder drawPRCdisk drawPRCsphere drawPRCtube drawPhoton drawScalar drawVertex drawVertexBox drawVertexBoxO drawVertexBoxX drawVertexO drawVertexOX drawVertexTriangle drawVertexTriangleO drawVertexX drawarrow drawarrow2 drawline drawpixel drawtick duplicate elle ellipse ellipsenodesnumber embed embed3 embedplayer empty enclose end endScript endclip endgroup endgroup3 endl endpoint endpoints eof eol equation equations erase erasestep erf erfc error errorbar errorbars eval excenter excircle exit exitXasyMode exitfunction exp expfactors expi expm1 exradius extend extension extouch fabs factorial fermat fft fhorner figure file filecode fill filldraw filloutside fillrule filltype find finite finiteDifferenceJacobian firstcut firstframe fit fit2 fixedscaling floor flush fmdefaults fmod focusToCenter font fontcommand fontsize foot format frac frequency fromCenter fromFocus fspline functionshade gamma generate_random_backtrace generateticks gergonne getc getint getpair getreal getstring gettriple gluon gouraudshade graph graphic gray grestore grid grid3 gsave halfbox hatch hdiffdiv hermite hex histogram history hline hprojection hsv hyperbola hyperbolanodesnumber hyperlink hypot identity image incenter incentral incircle increasing incrementposition indexedTransform indexedfigure initXasyMode initdefaults input inradius insert inside integrate interactive interior interp interpolate intersect intersection intersectionpoint intersectionpoints intersections intouch inverse inversion invisible is3D isCCW isDuplicate isnan isogonal isogonalconjugate isotomic isotomicconjugate isparabola italic item jobname key kurtosis kurtosisexcess label labelaxis labelmargin labelpath labels labeltick labelx labelx3 labely labely3 labelz labelz3 lastcut latex latitude latticeshade layer layout ldexp leastsquares legend legenditem length lexorder lift light limits line linear linecap lineinversion linejoin linemargin lineskip linetype linewidth link list lm_enorm lm_evaluate_default lm_lmdif lm_lmpar lm_minimize lm_print_default lm_print_quiet lm_qrfac lm_qrsolv locale locate locatefile location log log10 log1p logaxiscoverage longitude lookup makeNode makedraw makepen map margin markangle markangleradius markanglespace markarc marker markinterval marknodes markrightangle markthin markuniform mass masscenter massformat math max max3 maxAfterTransform maxbezier maxbound maxcoords maxlength maxratio maxtimes mean medial median midpoint min min3 minAfterTransform minbezier minbound minipage minratio mintimes miterlimit mktemp momArrowPath momarrowsize monotonic multifigure nativeformat natural needshipout newl newpage newslide newton newtree nextframe nextnormal nextpage nib nodabscissa none norm normalvideo notaknot nowarn numberpage nurb object offset onpath opacity opposite orientation origin orthic orthocentercenter outformat outline outname outprefix output overloadedMessage overwrite pack pad pairs palette parabola parabolanodesnumber parallel parallelogram partialsum path path3 pattern pause pdf pedal periodic perp perpendicular perpendicularmark phantom phi1 phi2 phi3 photon piecewisestraight point polar polarconicroutine polargraph polygon postcontrol postscript pow10 ppoint prc prc0 precision precontrol prepend printBytecode print_random_addresses project projection purge pwhermite quadrant quadraticroots quantize quarticroots quotient radialshade radians radicalcenter radicalline radius rand randompath rd readline realmult realquarticroots rectangle rectangular rectify reflect relabscissa relative relativedistance reldir relpoint reltime remainder remark removeDuplicates rename replace report resetdefaultpen restore restoredefaults reverse reversevideo rf rfind rgb rgba rgbint rms rotate rotateO rotation round roundbox roundedpath roundrectangle same samecoordsys sameside sample save savedefaults saveline scale scale3 scaleO scaleT scaleless scientific search searchindex searchtree sec secondaryX secondaryY seconds section sector seek seekeof segment segmentlimits sequence setcontour setpens sgn sgnd sharpangle sharpdegrees shift shiftless shipout shipout3 show side simeq simpson sin sinh size size3 skewness skip slant sleep slope slopefield solve solveBVP sort sourceline sphere split sqrt square srand standardizecoordsys startScript stdev step stickframe stickmarksize stickmarkspace stop straight straightness string stripdirectory stripextension stripfile stripsuffix strokepath subdivide subitem subpath substr sum surface symmedial symmedian system tab tableau tan tangent tangential tangents tanh tell tensionSpecifier tensorshade tex texcolor texify texpath texpreamble texreset texshipout texsize textpath thick thin tick tickMax tickMax3 tickMin tickMin3 ticklabelshift ticklocate tildeframe tildemarksize tile tiling time times title titlepage topbox transform transformation transpose trembleFuzz triangle triangleAbc triangleabc triangulate tricoef tridiagonal trilinear trim truepoint tube uncycle unfill uniform unique unit unitrand unitsize unityroot unstraighten upcase updatefunction uperiodic upscale uptodate usepackage usersetting usetypescript usleep value variance variancebiased vbox vector vectorfield verbatim view vline vperiodic vprojection warn warning windingnumber write xaxis xaxis3 xaxis3At xaxisAt xequals xlimits xpart xscale xscaleO xtick xtick3 xtrans yaxis yaxis3 yaxis3At yaxisAt yequals ylimits ypart yscale yscaleO ytick ytick3 ytrans zaxis3 zaxis3At zero zero3 zlimits zpart ztick ztick3 ztrans )) +AND Arc ArcArrow ArcArrows Arrow Arrows Automatic AvantGarde BBox BWRainbow BWRainbow2 Bar Bars BeginArcArrow BeginArrow BeginBar BeginDotMargin BeginMargin BeginPenMargin Blank Bookman Bottom BottomTop Bounds Break Broken BrokenLog CLZ CTZ Ceil Circle CircleBarIntervalMarker Cos Courier CrossIntervalMarker DOSendl DOSnewl DefaultFormat DefaultLogFormat Degrees Dir DotMargin DotMargins Dotted Draw Drawline Embed EndArcArrow EndArrow EndBar EndDotMargin EndMargin EndPenMargin Fill FillDraw Floor Format Full Gaussian Gaussrand Gaussrandpair Gradient Grayscale Helvetica Hermite HookHead InOutTicks InTicks Jn Label Landscape Left LeftRight LeftTicks Legend Linear Log LogFormat Margin Margins Mark MidArcArrow MidArrow NOT NewCenturySchoolBook NoBox NoMargin NoModifier NoTicks NoTicks3 NoZero NoZeroFormat None OR OmitFormat OmitTick OmitTickInterval OmitTickIntervals OutTicks Ox Oy Palatino PaletteTicks Pen PenMargin PenMargins Pentype Portrait RadialShade RadialShadeDraw Rainbow Range Relative Right RightTicks Rotate Round SQR Scale ScaleX ScaleY ScaleZ Seascape Shift Sin Slant Spline StickIntervalMarker Straight Symbol Tan TeXify Ticks Ticks3 TildeIntervalMarker TimesRoman Top TrueMargin UnFill UpsideDown Wheel X XEquals XOR XY XYEquals XYZero XYgrid XZEquals XZZero XZero XZgrid Y YEquals YXgrid YZ YZEquals YZZero YZero YZgrid Yn Z ZX ZXgrid ZYgrid ZapfChancery ZapfDingbats _begingroup3 _cputime _draw _eval _image _labelpath _projection _strokepath _texpath aCos aSin aTan abort abs accel acos acosh acot acsc activatequote add addArrow addMargins addSaveFunction addpenarc addpenline addseg adjust alias align all altitude angabscissa angle angpoint animate annotate anticomplementary antipedal apply approximate arc arcarrowsize arccircle arcdir arcfromcenter arcfromfocus arclength arcnodesnumber arcpoint arcsubtended arcsubtendedcenter arctime arctopath array arrow arrow2 arrowbase arrowbasepoints arrowsize ascii asec asin asinh ask assert asy asycode asydir asyfigure asyfilecode asyinclude asywrite atan atan2 atanh atbreakpoint atexit attach attract atupdate autoformat autoscale autoscale3 axes axes3 axialshade axis axiscoverage azimuth babel background bangles bar barmarksize barsize basealign baseline bbox beep begin beginclip begingroup beginpoint between bevel bezier bezierP bezierPP bezierPPP bezulate bibliography bibliographystyle binarytree binarytreeNode binomial bins bisector bisectorpoint bispline blend blockconnector box bqe 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 checkconditionlength checker checkincreasing checklengths checkposition checktriangle choose circle circlebarframe circlemarkradius circlenodesnumber circumcenter circumcircle clamped clear clip clipdraw close cmyk code colatitude collect collinear color colorless colors colorspace comma compassmark complement complementary concat concurrent cone conic conicnodesnumber conictype conj connect 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 drawDoubleLine drawFermion drawGhost drawGluon drawMomArrow drawPRCcylinder drawPRCdisk drawPRCsphere drawPRCtube drawPhoton drawScalar drawVertex drawVertexBox drawVertexBoxO drawVertexBoxX drawVertexO drawVertexOX drawVertexTriangle drawVertexTriangleO drawVertexX drawarrow drawarrow2 drawline drawpixel drawtick duplicate elle ellipse ellipsenodesnumber embed embed3 embedplayer empty enclose end endScript endclip endgroup endgroup3 endl endpoint endpoints eof eol equation equations erase erasestep erf erfc error errorbar errorbars eval excenter excircle exit exitXasyMode exitfunction exp expfactors expi expm1 exradius extend extension extouch fabs factorial fermat fft fhorner figure file filecode fill filldraw filloutside fillrule filltype find finite finiteDifferenceJacobian firstcut firstframe fit fit2 fixedscaling floor flush fmdefaults fmod focusToCenter font fontcommand fontsize foot format frac frequency fromCenter fromFocus fspline functionshade gamma generate_random_backtrace generateticks gergonne getc getint getpair getreal getstring gettriple gluon gouraudshade graph graphic gray grestore grid grid3 gsave halfbox hatch hdiffdiv hermite hex histogram history hline hprojection hsv hyperbola hyperbolanodesnumber hyperlink hypot identity image incenter incentral incircle increasing incrementposition indexedTransform indexedfigure initXasyMode initdefaults input inradius insert inside integrate interactive interior interp interpolate intersect intersection intersectionpoint intersectionpoints intersections intouch inverse inversion invisible is3D isDuplicate isnan isogonal isogonalconjugate isotomic isotomicconjugate isparabola italic item jobname key kurtosis kurtosisexcess label labelaxis labelmargin labelpath labels labeltick labelx labelx3 labely labely3 labelz labelz3 lastcut latex latitude latticeshade layer layout ldexp leastsquares legend legenditem length lexorder lift light limits line linear linecap lineinversion linejoin linemargin lineskip linetype linewidth link list lm_enorm lm_evaluate_default lm_lmdif lm_lmpar lm_minimize lm_print_default lm_print_quiet lm_qrfac lm_qrsolv locale locate locatefile location log log10 log1p logaxiscoverage longitude lookup makeNode makedraw makepen map margin markangle markangleradius markanglespace markarc marker markinterval marknodes markrightangle markthin markuniform mass masscenter massformat math max max3 maxAfterTransform maxbezier maxbound maxcoords maxlength maxratio maxtimes mean medial median midpoint min min3 minAfterTransform minbezier minbound minipage minratio mintimes miterlimit mktemp momArrowPath momarrowsize monotonic multifigure nativeformat natural needshipout newl newpage newslide newton newtree nextframe nextnormal nextpage nib nodabscissa none norm normalvideo notaknot nowarn numberpage nurb object offset onpath opacity opposite orientation origin orthic orthocentercenter outformat outline outname outprefix output overloadedMessage overwrite pack pad pairs palette parabola parabolanodesnumber parallel parallelogram partialsum path path3 pattern pause pdf pedal periodic perp perpendicular perpendicularmark phantom phi1 phi2 phi3 photon piecewisestraight point polar polarconicroutine polargraph polygon postcontrol postscript pow10 ppoint prc prc0 prconly precision precontrol prepend printBytecode print_random_addresses project projection purge pwhermite quadrant quadraticroots quantize quarticroots quotient radialshade radians radicalcenter radicalline radius rand randompath rd readline realmult realquarticroots rectangle rectangular rectify reflect relabscissa relative relativedistance reldir relpoint reltime remainder remark removeDuplicates rename replace report resetdefaultpen restore restoredefaults reverse reversevideo rf rfind rgb rgba rgbint rms rotate rotateO rotation round roundbox roundedpath roundrectangle 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 side simeq simpson sin sinh size size3 skewness skip slant sleep slope slopefield solve solveBVP sort sourceline sphere split sqrt square srand standardizecoordsys startScript stdev step stickframe stickmarksize stickmarkspace stop straight straightness string stripdirectory stripextension stripfile stripsuffix strokepath subdivide subitem subpath substr sum surface symmedial symmedian system tab tableau tan tangent tangential tangents tanh tell tensionSpecifier tensorshade tex texcolor texify texpath texpreamble texreset texshipout texsize textpath thick thin tick tickMax tickMax3 tickMin tickMin3 ticklabelshift ticklocate tildeframe tildemarksize tile tiling time times title titlepage topbox transform transformation transpose trembleFuzz triangle triangleAbc triangleabc triangulate tricoef tridiagonal trilinear trim truepoint tube uncycle unfill uniform unique unit unitrand unitsize unityroot unstraighten upcase updatefunction uperiodic upscale uptodate usepackage usersetting usetypescript usleep value variance variancebiased vbox vector vectorfield verbatim view vline vperiodic vprojection warn warning windingnumber write xaxis xaxis3 xaxis3At xaxisAt xequals xlimits xpart xscale xscaleO xtick xtick3 xtrans yaxis yaxis3 yaxis3At yaxisAt yequals ylimits ypart yscale yscaleO ytick ytick3 ytrans zaxis3 zaxis3At zero zero3 zlimits zpart ztick ztick3 ztrans )) (defvar asy-variable-name '( -AliceBlue Align Allow AntiqueWhite Apricot Aqua Aquamarine Aspect Azure BeginPoint Beige Bisque Bittersweet Black BlanchedAlmond Blue BlueGreen BlueViolet Both Break BrickRed Brown BurlyWood BurntOrange CCW CW CadetBlue CarnationPink Center Centered Cerulean Chartreuse Chocolate Coeff Coral CornflowerBlue Cornsilk Crimson Crop Cyan Dandelion DarkBlue DarkCyan DarkGoldenrod DarkGray DarkGreen DarkKhaki DarkMagenta DarkOliveGreen DarkOrange DarkOrchid DarkRed DarkSalmon DarkSeaGreen DarkSlateBlue DarkSlateGray DarkTurquoise DarkViolet DeepPink DeepSkyBlue DefaultHead DimGray DodgerBlue Dotted Down Draw E ENE EPS ESE E_Euler E_PC E_RK2 E_RK3BS Emerald EndPoint Euler Fill FillDraw FireBrick FloralWhite ForestGreen Fuchsia Gainsboro GhostWhite Gold Goldenrod Gray Green GreenYellow Honeydew HookHead Horizontal HotPink I IgnoreAspect IndianRed Indigo Ivory JOIN_IN JOIN_OUT JungleGreen Khaki LM_DWARF LM_MACHEP LM_SQRT_DWARF LM_SQRT_GIANT LM_USERTOL Label Lavender LavenderBlush LawnGreen Left LeftJustified LeftSide LemonChiffon LightBlue LightCoral LightCyan LightGoldenrodYellow LightGreen LightGrey LightPink LightSalmon LightSeaGreen LightSkyBlue LightSlateGray LightSteelBlue LightYellow Lime LimeGreen Linear Linen Log Logarithmic Magenta Mahogany Mark MarkFill MarkPath Maroon Max MediumAquamarine MediumBlue MediumOrchid MediumPurple MediumSeaGreen MediumSlateBlue MediumSpringGreen MediumTurquoise MediumVioletRed Melon MidPoint MidnightBlue Min MintCream MistyRose Moccasin Move MoveQuiet Mulberry N NE NNE NNW NW NavajoWhite Navy NavyBlue NoAlign NoCrop NoFill NoSide OldLace Olive OliveDrab OliveGreen Orange OrangeRed Orchid Ox Oy PC PaleGoldenrod PaleGreen PaleTurquoise PaleVioletRed PapayaWhip Peach PeachPuff Periwinkle Peru PineGreen Pink Plum PowderBlue ProcessBlue Purple RK2 RK3 RK3BS RK4 RK5 RK5DP RK5F RawSienna Red RedOrange RedViolet Rhodamine Right RightJustified RightSide RosyBrown RoyalBlue RoyalPurple RubineRed S SE SSE SSW SW SaddleBrown Salmon SandyBrown SeaGreen Seashell Sepia Sienna Silver SimpleHead SkyBlue SlateBlue SlateGray Snow SpringGreen SteelBlue Suppress SuppressQuiet Tan TeXHead Teal TealBlue Thistle Ticksize Tomato Turquoise UnFill Up VERSION Value Vertical Violet VioletRed W WNW WSW Wheat White WhiteSmoke WildStrawberry XYAlign YAlign Yellow YellowGreen YellowOrange addpenarc addpenline align allowstepping angularsystem animationdelay appendsuffix arcarrowangle arcarrowfactor arrow2sizelimit arrowangle arrowbarb arrowdir arrowfactor arrowhookfactor arrowlength arrowsizelimit arrowtexfactor authorpen axis axiscoverage axislabelfactor background backgroundcolor backgroundpen barfactor barmarksizefactor basealign baselinetemplate beveljoin bigvertexpen bigvertexsize black blue bm bottom bp brown bullet byfoci byvertices camerafactor chartreuse circlemarkradiusfactor circlenodesnumberfactor circleprecision circlescale cm codefile codepen codeskip colorPen coloredNodes coloredSegments conditionlength conicnodesfactor count cputimeformat crossmarksizefactor currentcoordsys currentlight currentpatterns currentpen currentpicture currentposition currentprojection curvilinearsystem cuttings cyan darkblue darkbrown darkcyan darkgray darkgreen darkgrey darkmagenta darkolive darkred dashdotted dashed datepen dateskip debuggerlines debugging deepblue deepcyan deepgray deepgreen deepgrey deepmagenta deepred default defaultControl defaultS defaultbackpen defaultcoordsys defaultexcursion defaultfilename defaultformat defaultmassformat defaultpen defaultseparator diagnostics differentlengths dot dotfactor dotframe dotted doublelinepen doublelinespacing down duplicateFuzz edge ellipsenodesnumberfactor eps epsgeo epsilon evenodd expansionfactor extendcap exterior fermionpen figureborder figuremattpen file3 firstnode firststep foregroundcolor fuchsia fuzz gapfactor ghostpen gluonamplitude gluonpen gluonratio gray green grey hatchepsilon havepagenumber heavyblue heavycyan heavygray heavygreen heavygrey heavymagenta heavyred hline hwratio hyperbola hyperbolanodesnumberfactor identity4 ignore inXasyMode inch inches includegraphicscommand inf infinity institutionpen intMax intMin interior invert invisible itempen itemskip itemstep labelmargin landscape lastnode left legendhskip legendlinelength legendmargin legendmarkersize legendmaxrelativewidth legendvskip lightblue lightcyan lightgray lightgreen lightgrey lightmagenta lightolive lightred lightyellow line linemargin lm_infmsg lm_shortmsg longdashdotted longdashed magenta magneticRadius mantissaBits markangleradius markangleradiusfactor markanglespace markanglespacefactor mediumblue mediumcyan mediumgray mediumgreen mediumgrey mediummagenta mediumred mediumyellow middle minDistDefault minblockheight minblockwidth mincirclediameter minipagemargin minipagewidth minvertexangle miterjoin mm momarrowfactor momarrowlength momarrowmargin momarrowoffset momarrowpen monoPen morepoints nCircle newbulletcolor ngraph nil nmesh nobasealign nodeMarginDefault nodesystem nomarker nopoint noprimary nullpath nullpen numarray ocgindex oldbulletcolor olive orange origin overpaint page pageheight pagemargin pagenumberalign pagenumberpen pagenumberposition pagewidth paleblue palecyan palegray palegreen palegrey palemagenta palered paleyellow parabolanodesnumberfactor perpfactor phi photonamplitude photonpen photonratio pi pink plain plain_bounds plain_scaling plus preamblenodes pt purple r3 r4a r4b randMax realDigits realEpsilon realMax realMin red relativesystem reverse right roundcap roundjoin royalblue salmon saveFunctions scalarpen sequencereal settings shipped signedtrailingzero solid springgreen sqrtEpsilon squarecap squarepen startposition stdin stdout stepfactor stepfraction steppagenumberpen stepping stickframe stickmarksizefactor stickmarkspacefactor swap textpen ticksize tildeframe tildemarksizefactor tinv titlealign titlepagepen titlepageposition titlepen titleskip top trailingzero treeLevelStep treeMinNodeWidth treeNodeStep trembleAngle trembleFrequency trembleRandom undefined unitcircle unitsquare up urlpen urlskip version vertexpen vertexsize viewportmargin viewportsize vline white wye xformStack yellow ylabelwidth zerotickfuzz zerowinding )) +AliceBlue Align Allow AntiqueWhite Apricot Aqua Aquamarine Aspect Azure BeginPoint Beige Bisque Bittersweet Black BlanchedAlmond Blue BlueGreen BlueViolet Both Break BrickRed Brown BurlyWood BurntOrange CCW CW CadetBlue CarnationPink Center Centered Cerulean Chartreuse Chocolate Coeff Coral CornflowerBlue Cornsilk Crimson Crop Cyan Dandelion DarkBlue DarkCyan DarkGoldenrod DarkGray DarkGreen DarkKhaki DarkMagenta DarkOliveGreen DarkOrange DarkOrchid DarkRed DarkSalmon DarkSeaGreen DarkSlateBlue DarkSlateGray DarkTurquoise DarkViolet DeepPink DeepSkyBlue DefaultHead DimGray DodgerBlue Dotted Down Draw E ENE EPS ESE E_Euler E_PC E_RK2 E_RK3BS Emerald EndPoint Euler Fill FillDraw FireBrick FloralWhite ForestGreen Fuchsia Gainsboro GhostWhite Gold Goldenrod Gray Green GreenYellow Honeydew HookHead Horizontal HotPink I IgnoreAspect IndianRed Indigo Ivory JOIN_IN JOIN_OUT JungleGreen Khaki LM_DWARF LM_MACHEP LM_SQRT_DWARF LM_SQRT_GIANT LM_USERTOL Label Lavender LavenderBlush LawnGreen Left LeftJustified LeftSide LemonChiffon LightBlue LightCoral LightCyan LightGoldenrodYellow LightGreen LightGrey LightPink LightSalmon LightSeaGreen LightSkyBlue LightSlateGray LightSteelBlue LightYellow Lime LimeGreen Linear Linen Log Logarithmic Magenta Mahogany Mark MarkFill MarkPath Maroon Max MediumAquamarine MediumBlue MediumOrchid MediumPurple MediumSeaGreen MediumSlateBlue MediumSpringGreen MediumTurquoise MediumVioletRed Melon MidPoint MidnightBlue Min MintCream MistyRose Moccasin Move MoveQuiet Mulberry N NE NNE NNW NW NavajoWhite Navy NavyBlue NoAlign NoCrop NoFill NoSide OldLace Olive OliveDrab OliveGreen Orange OrangeRed Orchid Ox Oy PC PaleGoldenrod PaleGreen PaleTurquoise PaleVioletRed PapayaWhip Peach PeachPuff Periwinkle Peru PineGreen Pink Plum PowderBlue ProcessBlue Purple RK2 RK3 RK3BS RK4 RK5 RK5DP RK5F RawSienna Red RedOrange RedViolet Rhodamine Right RightJustified RightSide RosyBrown RoyalBlue RoyalPurple RubineRed S SE SSE SSW SW SaddleBrown Salmon SandyBrown SeaGreen Seashell Sepia Sienna Silver SimpleHead SkyBlue SlateBlue SlateGray Snow SpringGreen SteelBlue Suppress SuppressQuiet Tan TeXHead Teal TealBlue Thistle Ticksize Tomato Turquoise UnFill Up VERSION Value Vertical Violet VioletRed W WNW WSW Wheat White WhiteSmoke WildStrawberry XYAlign YAlign Yellow YellowGreen YellowOrange addpenarc addpenline align allowstepping angularsystem animationdelay appendsuffix arcarrowangle arcarrowfactor arrow2sizelimit arrowangle arrowbarb arrowdir arrowfactor arrowhookfactor arrowlength arrowsizelimit arrowtexfactor authorpen axis axiscoverage axislabelfactor background backgroundcolor backgroundpen barfactor barmarksizefactor basealign baselinetemplate beveljoin bigvertexpen bigvertexsize black blue bm bottom bp bracedefaultratio braceinnerangle bracemidangle braceouterangle brown bullet byfoci byvertices camerafactor chartreuse circlemarkradiusfactor circlenodesnumberfactor circleprecision circlescale cm codefile codepen codeskip colorPen coloredNodes coloredSegments conditionlength conicnodesfactor count cputimeformat crossmarksizefactor currentcoordsys currentlight currentpatterns currentpen currentpicture currentposition currentprojection curvilinearsystem cuttings cyan darkblue darkbrown darkcyan darkgray darkgreen darkgrey darkmagenta darkolive darkred dashdotted dashed datepen dateskip debuggerlines debugging deepblue deepcyan deepgray deepgreen deepgrey deepmagenta deepred default defaultControl defaultS defaultbackpen defaultcoordsys defaultexcursion defaultfilename defaultformat defaultmassformat defaultpen defaultseparator diagnostics differentlengths dot dotfactor dotframe dotted doublelinepen doublelinespacing down duplicateFuzz ellipsenodesnumberfactor eps epsgeo epsilon evenodd expansionfactor extendcap fermionpen figureborder figuremattpen file3 firstnode firststep foregroundcolor fuchsia fuzz gapfactor ghostpen gluonamplitude gluonpen gluonratio gray green grey hatchepsilon havepagenumber heavyblue heavycyan heavygray heavygreen heavygrey heavymagenta heavyred hline hwratio hyperbolanodesnumberfactor identity4 ignore inXasyMode inch inches includegraphicscommand inf infinity institutionpen intMax intMin invert invisible itempen itemskip itemstep labelmargin landscape lastnode left legendhskip legendlinelength legendmargin legendmarkersize legendmaxrelativewidth legendvskip lightblue lightcyan lightgray lightgreen lightgrey lightmagenta lightolive lightred lightyellow linemargin lm_infmsg lm_shortmsg longdashdotted longdashed magenta magneticRadius mantissaBits markangleradius markangleradiusfactor markanglespace markanglespacefactor mediumblue mediumcyan mediumgray mediumgreen mediumgrey mediummagenta mediumred mediumyellow middle minDistDefault minblockheight minblockwidth mincirclediameter minipagemargin minipagewidth minvertexangle miterjoin mm momarrowfactor momarrowlength momarrowmargin momarrowoffset momarrowpen monoPen morepoints nCircle newbulletcolor ngraph nil nmesh nobasealign nodeMarginDefault nodesystem nomarker nopoint noprimary nullpath nullpen numarray ocgindex oldbulletcolor olive orange origin overpaint page pageheight pagemargin pagenumberalign pagenumberpen pagenumberposition pagewidth paleblue palecyan palegray palegreen palegrey palemagenta palered paleyellow parabolanodesnumberfactor perpfactor phi photonamplitude photonpen photonratio pi pink plain plain_bounds plain_scaling plus preamblenodes pt purple r3 r4a r4b randMax realDigits realEpsilon realMax realMin red relativesystem reverse right roundcap roundjoin royalblue salmon saveFunctions scalarpen sequencereal settings shipped signedtrailingzero solid springgreen sqrtEpsilon squarecap squarepen startposition stdin stdout stepfactor stepfraction steppagenumberpen stepping stickframe stickmarksizefactor stickmarkspacefactor swap textpen ticksize tildeframe tildemarksizefactor tinv titlealign titlepagepen titlepageposition titlepen titleskip top trailingzero treeLevelStep treeMinNodeWidth treeNodeStep trembleAngle trembleFrequency trembleRandom undefined unitcircle unitsquare up urlpen urlskip version vertexpen vertexsize viewportmargin viewportsize vline white wye xformStack yellow ylabelwidth zerotickfuzz zerowinding )) diff --git a/Master/texmf-dist/asymptote/contour.asy b/Master/texmf-dist/asymptote/contour.asy index 27a79439e2d..fbb4cd1c71a 100644 --- a/Master/texmf-dist/asymptote/contour.asy +++ b/Master/texmf-dist/asymptote/contour.asy @@ -1,922 +1,307 @@ -/* - Contour routines written by Radoslav Marinov, John Bowman, and Chris Savage. - - [2009/10/15: C Savage] generate oriented contours - [2009/10/19: C Savage] use boxes instead of triangles -*/ - -/* - Contours lines/guides are oriented throughout. By convention, - for a single contour, higher values are to the left and/or lower - values are to the right along the direction of the lines/guide. -*/ - +// Contour routines written by Radoslav Marinov and John Bowman. + import graph_settings; -private real eps=sqrtEpsilon; - -/* - GRID CONTOURS - - Contours on a grid of points are determined as follows: - for each grid square, the function is approximated as the unique - paraboloid passing through the function values at the four - corners. The intersection of a paraboloid with the f(x,y)=c - plane is a line or hyperbola. - - Grid data structures: - - boxcontour: - Describes a particular contour segment in a grid square. - - boxdata: - Describes contours in a grid square (holds boxcontours). - - segment: - Describes a contour line. Usually a closed (interior) contour, - a line that terminates on the border, or a border segment used - to enclose a region. - - Segment: - Describes a contour line. - - Main grid routines: - - setcontour: - Determines the contours in a grid square. - - contouredges: - Determines the contour segments over a grid of function values. - - connect: - Converts contours into guides - -*/ - -private typedef int boxtype; -private boxtype exterior=-1; -private boxtype edge = 0; -private boxtype interior=+1; +real eps=10000*realEpsilon; + +// 1 +// 6 +-------------------+ 5 +// | \ / | +// | \ / | +// | \ / | +// | \ / | +// 2 | X | 0 +// | / \ | +// | / \ | +// | / \ | +// | / \ | +// 7 +-------------------+ 4 or 8 +// 3 -private typedef int contourshape; -private contourshape line =1; -private contourshape hyperbola=2; - -// Describe position by grid square and position in square -private struct gridpoint { - int i,j; - pair z; - void operator init(int i, int j, pair z) { - this.i=i; - this.j=j; - this.z=z; - } - void operator init(gridpoint gp) { - this.i=gp.i; - this.j=gp.j; - this.z=gp.z; - } +private struct segment +{ + bool active; + pair a,b; // Endpoints; a is always an edge point if one exists. + int c; // Contour value. + int edge; // -1: interior, 0 to 3: edge, + // 4-8: single-vertex edge, 9: double-vertex edge. } -private bool same(gridpoint gp1, gridpoint gp2) +// Case 1: line passes through two vertices of a triangle +private segment case1(pair p0, pair p1, int edge) { - return abs(gp2.z-gp1.z+(gp2.i-gp1.i,gp2.j-gp1.j)) < eps; + // Will cause a duplicate guide; luckily case1 is rare + segment rtrn; + rtrn.active=true; + rtrn.a=p0; + rtrn.b=p1; + rtrn.edge=edge; + return rtrn; } - -// Describe contour in unit square(scaling to be done later). -private struct boxcontour { - bool active; - contourshape type; // Shape of contour segment(line or hyperbola) - pair a,b; // Start/end point of contour segment. - // Higher values to left along a--b. - real x0,y0,m; // For hyperbola: (x-x0)*(y-y0)=m - int signx,signy; // Sign of x-x0&y-y0 for hyperbola piece; - // identifies which direction it opens - int i,j; // Indices of lower left corner in position or - // data array. - int index; // Contour index - - void operator init(contourshape type, pair a, pair b, - real x0, real y0, real m, int signx, int signy, - int i, int j, int index) { - this.active=true; - this.type=type; - this.a=a; - this.b=b; - - this.x0=x0; - this.y0=y0; - this.m=m; - this.signx=signx; - this.signy=signy; - - this.i=i; - this.j=j; - this.index=index; - } - // Generate list of points along the line/hyperbola segment - // representing the contour in the box - gridpoint[] points(int subsample=1, bool first=true, bool last=true) { - gridpoint[] gp; - if(first) - gp.push(gridpoint(i,j,a)); - if(subsample > 0) { - // Linear case - if(type == line) { - for(int k=1; k <= subsample; ++k) { - pair z=interp(a,b,k/(subsample+1)); - gp.push(gridpoint(i,j,z)); - } - } else if(type == hyperbola) { - // Special hyperbolic case of m=0 - // The contours here are infinite lines at x=x0 and y=y0, - // but handedness always connects a semi-infinite - // horizontal segment with a semi-infinite vertical segment - // connected at (x0,y0). - // If (x0,y0) is outside the unit box, there is only one - // line segment to include; otherwise, there are both - // a horizontal and a vertical line segment to include. - if(m == 0) { - // Single line - if(a.x == b.x || a.y == b.y) { - for(int k=1; k <= subsample; ++k) { - pair z=interp(a,b,k/(subsample+1)); - gp.push(gridpoint(i,j,z)); - } - // Two lines(may get one extra point here) - } else { - int nsub=quotient(subsample,2); - pair mid=(x0,y0); - for(int k=1; k <= nsub; ++k) { - pair z=interp(a,mid,k/(nsub+1)); - gp.push(gridpoint(i,j,z)); - } - gp.push(gridpoint(i,j,mid)); - for(int k=1; k <= nsub; ++k) { - pair z=interp(mid,b,k/(nsub+1)); - gp.push(gridpoint(i,j,z)); - } - } - // General hyperbolic case (m != 0). - // Parametric equations(m > 0): - // x(t)=x0 +/- sqrt(m)*exp(t) - // y(t)=y0 +/- sqrt(m)*exp(-t) - // Parametric equations (m < 0): - // x(t)=x0 +/- sqrt(-m)*exp(t) - // y(t)=y0 -/+ sqrt(-m)*exp(-t) - // Points will be taken equally spaced in parameter t. - } else { - real sqrtm=sqrt(abs(m)); - real ta=log(signx*(a.x-x0)/sqrtm); - real tb=log(signx*(b.x-x0)/sqrtm); - real[] t=uniform(ta,tb,subsample+1); - for(int k=1; k <= subsample; ++k) { - pair z=(x0+signx*sqrtm*exp(t[k]), - y0+signy*sqrtm*exp(-t[k])); - gp.push(gridpoint(i,j,z)); - } - } - } - } - if(last) - gp.push(gridpoint(i,j,b)); - - return gp; +// Case 2: line passes through a vertex and a side of a triangle +// (the first vertex passed and the side between the other two) +private segment case2(pair p0, pair p1, pair p2, + real v0, real v1, real v2, int edge) +{ + segment rtrn; + pair val=interp(p1,p2,abs(v1/(v2-v1))); + rtrn.active=true; + if(edge < 4) { + rtrn.a=val; + rtrn.b=p0; + } else { + rtrn.a=p0; + rtrn.b=val; } + rtrn.edge=edge; + return rtrn; } -// Hold data for a single grid square -private struct boxdata { - boxtype type; // Does box contain a contour segment (edge of - // contour region) or is it entirely interior/ - // exterior to contour region ? - real min,max; // Smallest/largest corner value - real max2; // Second-largest corner value - boxcontour[] data; // Stores actual contour segment data - - int count() {return data.length;} - void operator init(real f00, real f10, real f01, real f11) { - real[] X={f00,f10,f01,f11}; - min=min(X); - max=max(X); - X.delete(find(X == max)); - max2=max(X); - } - void settype(real c) { - // Interior case(f >= c) - if(min > c-eps) { - type=interior; - // Exterior case(f < c) - } else if(max < c-eps) { - type=exterior; - // Special case: only one corner at f=c, f < c elsewhere - //(no segment in this case) - } else if((max < c+eps) && (max2 < c-eps)) { - type=exterior; - // Edge of contour passes through box - } else { - type=edge; - } - } +// Case 3: line passes through two sides of a triangle +// (through the sides formed by the first & second, and second & third +// vertices) +private segment case3(pair p0, pair p1, pair p2, + real v0, real v1, real v2, int edge=-1) +{ + segment rtrn; + rtrn.active=true; + rtrn.a=interp(p1,p0,abs(v1/(v0-v1))); + rtrn.b=interp(p1,p2,abs(v1/(v2-v1))); + rtrn.edge=edge; + return rtrn; } +// Check if a line passes through a triangle, and draw the required line. +private segment checktriangle(pair p0, pair p1, pair p2, + real v0, real v1, real v2, int edge=-1) +{ + // default null return + static segment dflt; -/* - Determine contours within a unit square box. - - Here, we approximate the function on the unit square to be a quadric - surface passing through the specified values at the four corners: - f(x,y)=(1-x)(1-y) f00+x(1-y) f10+(1-x)y f01+xy f11 - =a0+ax x+ay y+axy xy - where f00, f10, f01 and f11 are the function values at the four - corners of the unit square 0 < x < 1&0 < y < 1 and: - a0 =f00 - ax =f10-f00 - ay =f01-f00 - axy=f00+f11-f10-f01 - This can also be expressed in paraboloid form as: - f(x,y)=alpha [(x+y-cp)^2-(x-y-cn)^2]+d - where: - alpha=axy/4 - cp =-(ax+ay)/a11 - cn =-(ax-ay)/a11 - d =(a0 axy-ax ay)/axy - In the procedure below, we take f00 - > f00-c etc. for a contour - level c and we search for f=0. + real eps=eps*max(abs(v0),abs(v1),abs(v2)); - For this surface, there are two possible contour shapes: - linear: (y-y0)/(x-x0)=m - hyperbolic: (x-x0)*(y-y0)=m - The linear case has a single line. The hyperbolic case may have - zero, one or two segments within the box (there are two sides of - a hyperbola, each of which may or may not pass through the unit - square). A hyperbola with m=0 is a special case that is handled - separately below. - - If c0 is the desired contour level, we effectively find the - contours at c0-epsilon for arbitrarily small epsilon. Flat - regions equal to c0 are considered to be interior to the - contour curves. Regions that lie at the contour level are - considered to be interior to the contour curves. As a result, - contours are only constructed if they are immediately adjacent - to some region interior to the square that falls below the - contour value; in other words, if an edge falls on the contour - value, but a point within the square arbitrarily close to the - edge falls above the contour value, that edge (or applicable - portion) is not included. This requirement gives the following: - *) ensures contours on an edge are unique (do not appear in - an adjacent square with the same orientation) - *) no three line vertices (four line vertices are possible, but - are not usually an issue) - *) all segments can be joined into closed curves or curves that - terminate on the boundary (no unclosed curves terminate in - the interior region of the grid) - - Note the logic below skips cases that have been filtered out - by the boxdata.settype() routine. -*/ -private void setcontour(real f00, real f10, real f01, real f11, real epsf, - boxdata bd, int i, int j, int index) { - // SPECIAL CASE: two diagonal corners at the contour level with - // the other two below does not yield any contours within the - // unit box, but may have been previously misidentified as an - // edge containing region. - if(((f00*f11 == 0) && (f10*f01 > 0)) || ((f01*f10 == 0) && (f00*f11 > 0))) { - bd.type=exterior; - return; - } - - // NOTE: From this point on, we can assume at least one contour - // segment exists in the square. This allows several cases to - // be ignored or simplified below, particularly edge cases. - - // Form used to approximate function on unit square - real F(real x, real y) { - return interp(interp(f00,f10,x),interp(f01,f11,x),y); - } - - // Write contour as a0+ax*x+ay*y +axy*x*y=0 - real a0 =f00; - real ax =f10-f00; - if(abs(ax) < epsf) ax=0; - real ay =f01-f00; - if(abs(ay) < epsf) ay=0; - real axy=f00+f11-f01 -f10; - if(abs(axy) < epsf) axy=0; - - // Linear contour(s) - if(axy == 0) { - pair a,b; - // Horizontal - if(ax == 0) { - if(ay == 0) return; // Contour is at most an isolated point; ignore. - real y0=-a0/ay; - if(abs(y0-1) < eps) y0=1; - if((f00 > 0) || (f01 < 0)) { - a=(1,y0); - b=(0,y0); - } else { - a=(0,y0); - b=(1,y0); - } - // Vertical - } else if(ay == 0) { - real x0=-a0/ax; - if(abs(x0-1) < eps) x0=1; - if((f00 > 0) || (f10 < 0)) { - a=(x0,0); - b=(x0,1); - } else { - a=(x0,1); - b=(x0,0); - } - // Angled line + if(v0 < -eps) { + if(v1 < -eps) { + if(v2 < -eps) return dflt; // nothing to do + else if(v2 <= eps) return dflt; // nothing to do + else return case3(p0,p2,p1,v0,v2,v1); + } else if(v1 <= eps) { + if(v2 < -eps) return dflt; // nothing to do + else if(v2 <= eps) return case1(p1,p2,5+edge); + else return case2(p1,p0,p2,v1,v0,v2,5+edge); } else { - real x0=-a0/ax; - if(abs(x0-1) < eps) x0=1; - real y0=-a0/ay; - if(abs(y0-1) < eps) y0=1; - int count=0; - real[] farr={f00,f10,f11,f01}; - farr.cyclic=true; - pair[] corners={(0,0),(1,0),(1,1),(0,1)}; - pair[] sidedir={(1,0),(0,1),(-1,0),(0,-1)}; - - int count=0; - for(int i=0; i < farr.length; ++i) { - // Corner - if(farr[i] == 0) { - ++count; - if(farr[i-1] > 0) { - a=corners[i]; - } else { - b=corners[i]; - } - // Side - } else if(farr[i]*farr[i+1] < 0) { - ++count; - if(farr[i] > 0) { - a=corners[i]-(farr[i]/(farr[i+1]-farr[i]))*sidedir[i]; - } else { - b=corners[i]-(farr[i]/(farr[i+1]-farr[i]))*sidedir[i]; - } - } - } - // Check(if logic is correct above, this will not happen) - if(count != 2) { - abort("Unexpected error in setcontour routine: odd number of" - +" crossings (linear case)"); - } - } - boxcontour bc=boxcontour(line,a,b,0,0,0,1,1,i,j,index); - bd.data.push(bc); - return; - } - - // Hyperbolic contour(s) - // Described in form: (x-x0)*(y-y0)=m - real x0=-ay/axy; - if(abs(x0-1) < eps) x0=1; - real y0=-ax/axy; - if(abs(y0-1) < eps) y0=1; - real m =ay*ax-a0*axy; - m=(abs(m) < eps) ? 0 : m/axy^2; - - // Special case here: straight segments (possibly crossing) - if(m == 0) { - pair a,b; - int signx,signy; - // Assuming at least one corner is below contour level here - if(x0 == 0) { - signx=+1; - if(y0 == 0) { - a=(1,0); - b=(0,1); - signy=+1; - } else if(y0 == 1) { - a=(0,0); - b=(1,1); - signy=-1; - } else if(y0 < 0 || y0 > 1) { - a=(0,0); - b=(0,1); - signy=y0 > 0 ? -1 : +1; - } else { - if(f10 > 0) { - a=(1,y0); - b=(0,1); - signy=+1; - } else { - a=(0,0); - b=(1,y0); - signy=-1; - } - } - boxcontour bc=boxcontour(hyperbola,a,b,x0,y0,m,signx,signy,i,j,index); - bd.data.push(bc); - return; - } else if(x0 == 1) { - signx=-1; - if(y0 == 0) { - a=(1,1); - b=(0,0); - signy=+1; - } else if(y0 == 1) { - a=(0,1); - b=(1,0); - signy=-1; - } else if(y0 < 0 || y0 > 1) { - a=(1,1); - b=(1,0); - signy=y0 > 0 ? -1 : +1; - } else { - if(f01 > 0) { - a=(0,y0); - b=(1,0); - signy=-1; - } else { - a=(1,1); - b=(0,y0); - signy=+1; - } - } - boxcontour bc=boxcontour(hyperbola,a,b,x0,y0,m,signx,signy,i,j,index); - bd.data.push(bc); - return; - } else if(y0 == 0) { - signy=+1; - if(x0 < 0 || x0 > 1) { - a=(1,0); - b=(0,0); - signx=x0 > 0 ? -1 : +1; - } else { - if(f11 > 0) { - a=(x0,1); - b=(0,0); - signx=-1; - } else { - a=(1,0); - b=(x0,1); - signx=+1; - } - } - boxcontour bc=boxcontour(hyperbola,a,b,x0,y0,m,signx,signy,i,j,index); - bd.data.push(bc); - return; - } else if(y0 == 1) { - signy=-1; - if(x0 < 0 || x0 > 1) { - a=(0,1); - b=(1,1); - signx=x0 > 0 ? -1 : +1; - } else { - if(f00 > 0) { - a=(x0,0); - b=(1,1); - signx=+1; - } else { - a=(0,1); - b=(x0,0); - signx=-1; - } - } - boxcontour bc=boxcontour(hyperbola,a,b,x0,y0,m,signx,signy,i,j,index); - bd.data.push(bc); - return; - } else if(x0 < 0 || x0 > 1) { - signx=x0 > 0 ? -1 : +1; - if(f00 > 0) { - a=(1,y0); - b=(0,y0); - signy=+1; - } else { - a=(0,y0); - b=(1,y0); - signy=-1; - } - boxcontour bc=boxcontour(hyperbola,a,b,x0,y0,m,signx,signy,i,j,index); - bd.data.push(bc); - return; - } else if(y0 < 0 || y0 > 1) { - signy=y0 > 0 ? -1 : +1; - if(f00 > 0) { - a=(x0,0); - b=(x0,1); - signx=+1; - } else { - a=(x0,1); - b=(x0,0); - signx=-1; - } - boxcontour bc=boxcontour(hyperbola,a,b,x0,y0,m,signx,signy,i,j,index); - bd.data.push(bc); - return; + if(v2 < -eps) return case3(p0,p1,p2,v0,v1,v2,edge); + else if(v2 <= eps) + return case2(p2,p0,p1,v2,v0,v1,edge); + else return case3(p1,p0,p2,v1,v0,v2,edge); + } + } else if(v0 <= eps) { + if(v1 < -eps) { + if(v2 < -eps) return dflt; // nothing to do + else if(v2 <= eps) return case1(p0,p2,4+edge); + else return case2(p0,p1,p2,v0,v1,v2,4+edge); + } else if(v1 <= eps) { + if(v2 < -eps) return case1(p0,p1,9); + else if(v2 <= eps) return dflt; // use finer partitioning. + else return case1(p0,p1,9); } else { - if(f10 > 0) { - a=(0,y0); - b=(x0,0); - boxcontour bc=boxcontour(hyperbola,a,b,x0,y0,m,-1,-1,i,j,index); - bd.data.push(bc); - a=(1,y0); - b=(x0,1); - bc=boxcontour(hyperbola,a,b,x0,y0,m,+1,+1,i,j,index); - bd.data.push(bc); - return; - } else { - a=(x0,0); - b=(1,y0); - boxcontour bc=boxcontour(hyperbola,a,b,x0,y0,m,+1,-1,i,j,index); - bd.data.push(bc); - a=(x0,1); - b=(0,y0); - bc=boxcontour(hyperbola,a,b,x0,y0,m,-1,+1,i,j,index); - bd.data.push(bc); - return; - } - } - } - - // General hyperbola case - int signc=(F(x0,y0) > 0) ? +1 : -1; - - pair[] points; - - real xB=(y0 == 0) ? infinity : x0-m/y0; - if(abs(xB) < eps) xB=0; - if(xB >= 0 && xB <= 1-eps) points.push((xB,0)); - - real xT=(y0 == 1) ? infinity : x0+m/(1-y0); - if(abs(xT-1) < eps) xT=1; - if(xT >= eps && xT <= 1) points.push((xT,1)); - - real yL=(x0 == 0) ? infinity : y0-m/x0; - if(abs(yL-1) < eps) yL=1; - - if(yL > eps && yL <= 1) points.push((0,yL)); - - real yR=(x0 == 1) ? infinity : y0+m/(1-x0); - if(abs(yR) < eps) yR=0; - if(yR >= 0 && yR <= 1-eps) points.push((1,yR)); - - // Check (if logic is correct above, this will not happen) - if(!(points.length == 2 || points.length == 4)) { - abort("Unexpected error in setcontour routine: odd number of" - +" crossings (hyperbolic case)"); - } - - // Lower left side - if((x0 > 0) && (y0 > 0) && (f00*signc < 0)) { - pair[] pts0; - for(int i=0; i < points.length; ++i) { - if((points[i].x < x0) && (points[i].y < y0)) { - pts0.push(points[i]); - } - } - if(pts0.length == 2) { - pair a0,b0; - if((f00 > 0) ^(pts0[0].x < pts0[1].x)) { - a0=pts0[0]; - b0=pts0[1]; - } else { - a0=pts0[1]; - b0=pts0[0]; - } - boxcontour bc=boxcontour(hyperbola,a0,b0,x0,y0,m,-1,-1,i,j,index); - bd.data.push(bc); - } - } - - // Lower right side - if((x0 < 1) && (y0 > 0) && (f10*signc < 0)) { - pair[] pts0; - for(int i=0; i < points.length; ++i) { - if((points[i].x > x0) && (points[i].y < y0)) { - pts0.push(points[i]); - } - } - if(pts0.length == 2) { - pair a0,b0; - if((f10 > 0) ^(pts0[0].x < pts0[1].x)) { - a0=pts0[0]; - b0=pts0[1]; - } else { - a0=pts0[1]; - b0=pts0[0]; - } - boxcontour bc=boxcontour(hyperbola,a0,b0,x0,y0,m,+1,-1,i,j,index); - bd.data.push(bc); - } - } - - // Upper right side - if((x0 < 1) && (y0 < 1) && (f11*signc < 0)) { - pair[] pts0; - for(int i=0; i < points.length; ++i) { - if((points[i].x > x0) && (points[i].y > y0)) { - pts0.push(points[i]); - } - } - if(pts0.length == 2) { - pair a0,b0; - if((f11 > 0) ^(pts0[0].x > pts0[1].x)) { - a0=pts0[0]; - b0=pts0[1]; - } else { - a0=pts0[1]; - b0=pts0[0]; - } - boxcontour bc=boxcontour(hyperbola,a0,b0,x0,y0,m,+1,+1,i,j,index); - bd.data.push(bc); - } - } - - // Upper left side - if((x0 > 0) && (y0 < 1) && (f01*signc < 0)) { - pair[] pts0; - for(int i=0; i < points.length; ++i) { - if((points[i].x < x0) && (points[i].y > y0)) { - pts0.push(points[i]); - } - } - if(pts0.length == 2) { - pair a0,b0; - if((f01 > 0) ^(pts0[0].x > pts0[1].x)) { - a0=pts0[0]; - b0=pts0[1]; - } else { - a0=pts0[1]; - b0=pts0[0]; - } - boxcontour bc=boxcontour(hyperbola,a0,b0,x0,y0,m,-1,+1,i,j,index); - bd.data.push(bc); - } - } - return; -} - - -// Checks if end of first contour segment matches the beginning of -// the second. -private bool connected(boxcontour bc1, boxcontour bc2) { - return abs(bc2.a-bc1.b+(bc2.i-bc1.i,bc2.j-bc1.j)) < eps; -} - -// Returns index of first active element in bca that with beginning -// that connects to the end of bc, or -1 if no such element. -private int connectedindex(boxcontour bc, boxcontour[] bca, - bool activeonly=true) { - for(int i=0; i < bca.length; ++i) { - if(!bca[i].active) continue; - if(connected(bc,bca[i])) { - return i; - } - } - return -1; -} - -// Returns index of first active element in bca with end that connects -// to the start of bc, or -1 if no such element. -private int connectedindex(boxcontour[] bca, boxcontour bc, - bool activeonly=true) { - for(int i=0; i < bca.length; ++i) { - if(!bca[i].active) continue; - if(connected(bca[i],bc)) { - return i; - } - } - return -1; + if(v2 < -eps) return case2(p0,p1,p2,v0,v1,v2,4+edge); + else if(v2 <= eps) return case1(p0,p2,4+edge); + else return dflt; // nothing to do + } + } else { + if(v1 < -eps) { + if(v2 < -eps) return case3(p1,p0,p2,v1,v0,v2,edge); + else if(v2 <= eps) + return case2(p2,p0,p1,v2,v0,v1,edge); + else return case3(p0,p1,p2,v0,v1,v2,edge); + } else if(v1 <= eps) { + if(v2 < -eps) return case2(p1,p0,p2,v1,v0,v2,5+edge); + else if(v2 <= eps) return case1(p1,p2,5+edge); + else return dflt; // nothing to do + } else { + if(v2 < -eps) return case3(p0,p2,p1,v0,v2,v1); + else if(v2 <= eps) return dflt; // nothing to do + else return dflt; // nothing to do + } + } } - -// Processes indices for grid regions touching the -// end/start (forward=true/false) of the contour segment -private void searchindex(boxcontour bc, bool forward, void f(int i, int j)) { - pair z=forward ? bc.b : bc.a; +// Collect connecting path segments. +private void collect(pair[][][] points, real[] c) +{ + // use to reverse an array, omitting the first point + int[] reverseF(int n) {return sequence(new int(int x){return n-1-x;},n-1);} + // use to reverse an array, omitting the last point + int[] reverseL(int n) {return sequence(new int(int x){return n-2-x;},n-1);} - int i=bc.i; - int j=bc.j; - - if(z == (0,0)) f(i-1,j-1); - if(z.y == 0) f(i,j-1); - if(z == (1,0)) f(i+1,j-1); - if(z.x == 1) f(i+1,j); - if(z == (1,1)) f(i+1,j+1); - if(z.y == 1) f(i,j+1); - if(z == (0,1)) f(i-1,j+1); - if(z.x == 0) f(i-1,j); -} - -// Contour segment -private struct segment { - gridpoint[] data; - void operator init() { - } - void operator init(boxcontour bc, int subsample=1) { - bc.active=false; - this.data.append(bc.points(subsample,first=true,last=true)); - } - void operator init(int i, int j, pair z) { - gridpoint gp=gridpoint(i,j,z); - data.push(gp); - } - void operator init(gridpoint[] gp) { - this.data.append(gp); - } - gridpoint start() { - if(data.length == 0) { - return gridpoint(-1,-1,(-infinity,-infinity)); - } - gridpoint gp=data[0]; - return gridpoint(gp.i,gp.j,gp.z); - } - gridpoint end() { - if(data.length == 0) { - return gridpoint(-1,-1,(-infinity,-infinity)); - } - gridpoint gp=data[data.length-1]; - return gridpoint(gp.i,gp.j,gp.z); - } - bool closed() { - return same(this.start(),this.end()); - } - void append(boxcontour bc, int subsample=1) { - bc.active=false; - data.append(bc.points(subsample,first=false,last=true)); - } - void prepend(boxcontour bc, int subsample=1) { - bc.active=false; - data.insert(0 ... bc.points(subsample,first=true,last=false)); - } - void append(int i, int j, pair z) { - gridpoint gp=gridpoint(i,j,z); - data.push(gp); - } - void prepend(int i, int j, pair z) { - gridpoint gp=gridpoint(i,j,z); - data.insert(0,gp); - } - segment copy() { - segment seg=new segment; - seg.data=new gridpoint[data.length]; - for(int i=0; i < data.length; ++i) { - seg.data[i]=gridpoint(data[i].i,data[i].j,data[i].z); - } - return seg; - } - segment reversecopy() { - segment seg=new segment; - seg.data=new gridpoint[data.length]; - for(int i=0; i < data.length; ++i) { - seg.data[data.length-i-1]=gridpoint(data[i].i,data[i].j,data[i].z); + for(int cnt=0; cnt < c.length; ++cnt) { + pair[][] gdscnt=points[cnt]; + for(int i=0; i < gdscnt.length; ++i) { + pair[] gig=gdscnt[i]; + int Li=gig.length; + for(int j=i+1; j < gdscnt.length; ++j) { + pair[] gjg=gdscnt[j]; + int Lj=gjg.length; + if(abs(gig[0]-gjg[0]) < eps) { + gdscnt[j]=gjg[reverseF(Lj)]; + gdscnt[j].append(gig); + gdscnt.delete(i); + --i; + break; + } else if(abs(gig[0]-gjg[Lj-1]) < eps) { + gig.delete(0); + gdscnt[j].append(gig); + gdscnt.delete(i); + --i; + break; + } else if(abs(gig[Li-1]-gjg[0]) < eps) { + gjg.delete(0); + gig.append(gjg); + gdscnt[j]=gig; + gdscnt.delete(i); + --i; + break; + } else if(abs(gig[Li-1]-gjg[Lj-1]) < eps) { + gig.append(gjg[reverseL(Lj)]); + gdscnt[j]=gig; + gdscnt.delete(i); + --i; + break; + } + } } - return seg; } } -// Container to hold edge and border segments that form one continuous line -private struct Segment { - segment[] edges; - segment[] borders; - void operator init() { - } - void operator init(segment seg) { - edges.push(seg); - } - void operator init(gridpoint[] gp) { - segment seg=segment(gp); - edges.push(seg); - } - gridpoint start() { - if(edges.length == 0) { - if(borders.length > 0) { - return borders[0].start(); +// Join path segments. +private guide[][] connect(pair[][][] points, real[] c, interpolate join) +{ + // set up return value + guide[][] result=new guide[c.length][]; + for(int cnt=0; cnt < c.length; ++cnt) { + pair[][] pointscnt=points[cnt]; + guide[] resultcnt=result[cnt]=new guide[pointscnt.length]; + for(int i=0; i < pointscnt.length; ++i) { + pair[] pts=pointscnt[i]; + guide gd; + if(pts.length > 0) { + if(pts.length > 1 && abs(pts[0]-pts[pts.length-1]) < eps) { + guide[] g=sequence(new guide(int i) { + return pts[i]; + },pts.length-1); + g.push(cycle); + gd=join(...g); + } else + gd=join(...sequence(new guide(int i) { + return pts[i]; + },pts.length)); } - return gridpoint(-1,-1,(-infinity,-infinity)); - } - return edges[0].start(); - } - gridpoint end() { - if(edges.length == 0 && borders.length == 0) { - return gridpoint(-1,-1,(-infinity,-infinity)); - } - if(edges.length > borders.length) { - return edges[edges.length-1].end(); - } else { - return borders[borders.length-1].end(); + resultcnt[i]=gd; } } - bool closed() { - return same(this.start(),this.end()); - } - void addedge(segment seg) { - edges.push(seg); - } - void addedge(gridpoint[] gp) { - segment seg=segment(gp); - edges.push(seg); - } - void addborder(segment seg) { - borders.push(seg); - } - void addborder(gridpoint[] gp) { - segment seg=segment(gp); - borders.push(seg); - } - void append(Segment S) { - edges.append(S.edges); - borders.append(S.borders); - } -} - -private Segment[] Segment(segment[] s) -{ - return sequence(new Segment(int i) {return Segment(s[i]);},s.length); + return result; } -private Segment[][] Segment(segment[][] s) -{ - Segment[][] S=new Segment[s.length][]; - for(int i=0; i < s.length; ++i) - S[i]=Segment(s[i]); - return S; -} -// Return contour points for a 2D data array. +// Return contour guides for a 2D data array. +// z: two-dimensional array of nonoverlapping mesh points // f: two-dimensional array of corresponding f(z) data values +// midpoint: optional array containing values of f at cell midpoints // c: array of contour values -// subsample: number of points to use in each box in addition to endpoints -segment[][] contouredges(real[][] f, real[] c, int subsample=1) +// join: interpolation operator (e.g. operator -- or operator ..) +guide[][] contour(pair[][] z, real[][] f, + real[][] midpoint=new real[][], real[] c, + interpolate join=operator --) { - int nx=f.length-1; - if(nx <= 0) - abort("array f must have length >= 2"); - int ny=f[0].length-1; - if(ny <= 0) - abort("array f[0] must have length >= 2"); + int nx=z.length-1; + if(nx == 0) + abort("array z must have length >= 2"); + int ny=z[0].length-1; + if(ny == 0) + abort("array z[0] must have length >= 2"); c=sort(c); - boxdata[][] bd=new boxdata[nx][ny]; - - segment[][] result=new segment[c.length][]; + bool midpoints=midpoint.length > 0; + segment segments[][][]=new segment[nx][ny][]; + + // go over region a rectangle at a time for(int i=0; i < nx; ++i) { - boxdata[] bdi=bd[i]; + pair[] zi=z[i]; + pair[] zp=z[i+1]; real[] fi=f[i]; real[] fp=f[i+1]; - + real[] midpointi; + if(midpoints) midpointi=midpoint[i]; + segment[][] segmentsi=segments[i]; for(int j=0; j < ny; ++j) { - boxdata bdij=bdi[j]=boxdata(fi[j],fp[j],fi[j+1],fp[j+1]); - + segment[] segmentsij=segmentsi[j]; + + // define points + pair bleft=zi[j]; + pair bright=zp[j]; + pair tleft=zi[j+1]; + pair tright=zp[j+1]; + pair middle=0.25*(bleft+bright+tleft+tright); + + real f00=fi[j]; + real f01=fi[j+1]; + real f10=fp[j]; + real f11=fp[j+1]; + real fmm=midpoints ? midpoint[i][j] : 0.25*(f00+f01+f10+f11); + + // optimization: we make sure we don't work with empty rectangles int checkcell(int cnt) { real C=c[cnt]; - - real f00=fi[j]; - real f10=fp[j]; - real f01=fi[j+1]; - real f11=fp[j+1]; - - real epsf=eps*max(abs(f00),abs(f10),abs(f01),abs(f11),abs(C)); - - f00=f00-C; - f10=f10-C; - f01=f01-C; - f11=f11-C; - - if(abs(f00) < epsf) f00=0; - if(abs(f10) < epsf) f10=0; - if(abs(f01) < epsf) f01=0; - if(abs(f11) < epsf) f11=0; - + real vertdat0=f00-C; // bottom-left vertex + real vertdat1=f10-C; // bottom-right vertex + real vertdat2=f01-C; // top-left vertex + real vertdat3=f11-C; // top-right vertex + // optimization: we make sure we don't work with empty rectangles int countm=0; int countz=0; int countp=0; - + void check(real vertdat) { - if(vertdat < -eps)++countm; + if(vertdat < -eps) ++countm; else { - if(vertdat <= eps)++countz; - else++countp; + if(vertdat <= eps) ++countz; + else ++countp; } } - check(f00); - check(f10); - check(f01); - check(f11); + 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 == 3 || countp == 3) && countz == 1) return 0; - // Calculate individual box contours - bdij.settype(C); - if(bdij.type == edge) - setcontour(f00,f10,f01,f11,epsf,bdij,i,j,cnt); + // go through the triangles + + void addseg(segment seg) { + if(seg.active) { + seg.c=cnt; + segmentsij.push(seg); + } + } + real vertdat4=fmm-C; + addseg(checktriangle(bright,tright,middle, + vertdat1,vertdat3,vertdat4,0)); + addseg(checktriangle(tright,tleft,middle, + vertdat3,vertdat2,vertdat4,1)); + addseg(checktriangle(tleft,bleft,middle, + vertdat2,vertdat0,vertdat4,2)); + addseg(checktriangle(bleft,bright,middle, + vertdat0,vertdat1,vertdat4,3)); return 0; } - + void process(int l, int u) { if(l >= u) return; int i=quotient(l+u,2); @@ -928,171 +313,150 @@ segment[][] contouredges(real[][] f, real[] c, int subsample=1) process(i+1,u); } } - + process(0,c.length); } } - - // Find contours and follow them + + // set up return value + pair[][][] points=new pair[c.length][][]; + for(int i=0; i < nx; ++i) { - boxdata[] bdi=bd[i]; + segment[][] segmentsi=segments[i]; for(int j=0; j < ny; ++j) { - boxdata bd0=bdi[j]; - if(bd0.count() == 0) continue; - for(int k=0; k < bd0.count(); ++k) { - boxcontour bc0=bd0.data[k]; - - if(!bc0.active) continue; - - // Note: boxcontour set inactive when added to segment - segment seg=segment(bc0,subsample); - - // Forward direction - bool foundnext=true; - while(foundnext) { - foundnext=false; - searchindex(bc0,true,new void(int i, int j) { - if((i >= 0) && (i < nx) && (j >= 0) && (j < ny)) { - boxcontour[] data=bd[i][j].data; - int k0=connectedindex(bc0,data); - if(k0 >= 0) { - bc0=data[k0]; - seg.append(bc0,subsample); - foundnext=true; - } + segment[] segmentsij=segmentsi[j]; + for(int k=0; k < segmentsij.length; ++k) { + segment C=segmentsij[k]; + + if(!C.active) continue; + + pair[] g=new pair[] {C.a,C.b}; + segmentsij[k].active=false; + + int forward(int I, int J, bool first=true) { + if(I >= 0 && I < nx && J >= 0 && J < ny) { + segment[] segmentsIJ=segments[I][J]; + for(int l=0; l < segmentsIJ.length; ++l) { + segment D=segmentsIJ[l]; + if(!D.active) continue; + if(abs(D.a-g[g.length-1]) < eps) { + g.push(D.b); + segmentsIJ[l].active=false; + if(D.edge >= 0 && !first) return D.edge; + first=false; + l=-1; + } else if(abs(D.b-g[g.length-1]) < eps) { + g.push(D.a); + segmentsIJ[l].active=false; + if(D.edge >= 0 && !first) return D.edge; + first=false; + l=-1; } - }); + } + } + return -1; + } + + int backward(int I, int J, bool first=true) { + if(I >= 0 && I < nx && J >= 0 && J < ny) { + segment[] segmentsIJ=segments[I][J]; + for(int l=0; l < segmentsIJ.length; ++l) { + segment D=segmentsIJ[l]; + if(!D.active) continue; + if(abs(D.a-g[0]) < eps) { + g.insert(0,D.b); + segmentsIJ[l].active=false; + if(D.edge >= 0 && !first) return D.edge; + first=false; + l=-1; + } else if(abs(D.b-g[0]) < eps) { + g.insert(0,D.a); + segmentsIJ[l].active=false; + if(D.edge >= 0 && !first) return D.edge; + first=false; + l=-1; + } + } + } + return -1; } - - // Backward direction - bc0=bd0.data[k]; - bool foundprev=true; - while(foundprev) { - foundprev=false; - searchindex(bc0,false,new void(int i, int j) { - if((i >= 0) && (i < nx) && (j >= 0) && (j < ny)) { - boxcontour[] data=bd[i][j].data; - int k0=connectedindex(data,bc0); - if(k0 >= 0) { - bc0=data[k0]; - seg.prepend(bc0,subsample); - foundprev=true; + + void follow(int f(int, int, bool first=true), int edge) { + int I=i; + int J=j; + while(true) { + static int ix[]={1,0,-1,0}; + static int iy[]={0,1,0,-1}; + if(edge >= 0 && edge < 4) { + I += ix[edge]; + J += iy[edge]; + edge=f(I,J); + } else { + if(edge == -1) break; + if(edge < 9) { + int edge0=(edge-5) % 4; + int edge1=(edge-4) % 4; + int ix0=ix[edge0]; + int iy0=iy[edge0]; + I += ix0; + J += iy0; + // Search all 3 corner cells + if((edge=f(I,J)) == -1) { + I += ix[edge1]; + J += iy[edge1]; + if((edge=f(I,J)) == -1) { + I -= ix0; + J -= iy0; + edge=f(I,J); + } + } + } else { + // Double-vertex edge: search all 8 surrounding cells + void search() { + for(int i=-1; i <= 1; ++i) { + for(int j=-1; j <= 1; ++j) { + if((edge=f(I+i,J+j,false)) >= 0) { + I += i; + J += j; + return; + } + } + } } + search(); } - }); + } + } } - result[bc0.index].push(seg); - } - } - } - - // Note: every segment here _should_ be cyclic or terminate on the - // boundary - return result; -} - -// Connect contours into guides. -// Same initial/final points indicates a closed path. -// Borders are always joined using--. -private guide connect(Segment S, pair[][] z, interpolate join) -{ - pair loc(gridpoint gp) { - pair offset=z[gp.i][gp.j]; - pair size=z[gp.i+1][gp.j+1]-z[gp.i][gp.j]; - return offset+(size.x*gp.z.x,size.y*gp.z.y); - } - pair[] loc(gridpoint[] gp) { - pair[] result=new pair[gp.length]; - for(int i; i < gp.length; ++i) { - result[i]=loc(gp[i]); - } - return result; - } - - bool closed=S.closed(); - - pair[][] edges=new pair[S.edges.length][]; - for(int i; i < S.edges.length; ++i) { - edges[i]=loc(S.edges[i].data); - } - pair[][] borders=new pair[S.borders.length][]; - for(int i; i < S.borders.length; ++i) { - borders[i]=loc(S.borders[i].data); - } - - if(edges.length == 0 && borders.length == 1) { - guide g=operator--(...borders[0]); - if(closed) g=g--cycle; - return g; - } - - if(edges.length == 1 && borders.length == 0) { - pair[] pts=edges[0]; - if(closed) pts.delete(pts.length-1); - guide g=join(...pts); - if(closed) g=join(g,cycle); - return g; - } - - guide[] ge=new guide[edges.length]; - for(int i=0; i < ge.length; ++i) - ge[i]=join(...edges[i]); + // Follow contour in cell + int edge=forward(i,j,first=false); - guide[] gb=new guide[borders.length]; - for(int i=0; i < gb.length; ++i) - gb[i]=operator--(...borders[i]); - - guide g=ge[0]; - if(0 < gb.length) g=g&gb[0]; - for(int i=1; i < ge.length; ++i) { - g=g&ge[i]; - if(i < gb.length) g=g&gb[i]; - } - if(closed) g=g&cycle; - return g; -} + // Follow contour forward outside of cell + follow(forward,edge); -// Connect contours into guides. -private guide[] connect(Segment[] S, pair[][] z, interpolate join) -{ - return sequence(new guide(int i) {return connect(S[i],z,join);},S.length); -} + // Follow contour backward outside of cell + follow(backward,C.edge); -// Connect contours into guides. -private guide[][] connect(Segment[][] S, pair[][] z, interpolate join) -{ - guide[][] result=new guide[S.length][]; - for(int i=0; i < S.length; ++i) { - result[i]=connect(S[i],z,join); + points[C.c].push(g); + } + } } - return result; -} -// Return contour guides for a 2D data array. -// z: two-dimensional array of nonoverlapping mesh points -// f: two-dimensional array of corresponding f(z) data values -// c: array of contour values -// join: interpolation operator (e.g. operator--or operator ..) -// subsample: number of interior points to include in each grid square -// (in addition to points on edge) -guide[][] contour(pair[][] z, real[][] f, real[] c, - interpolate join=operator--, int subsample=1) -{ - segment[][] seg=contouredges(f,c,subsample); - Segment[][] Seg=Segment(seg); - return connect(Seg,z,join); + collect(points,c); // Required to join remaining case1 cycles. + + return connect(points,c,join); } // Return contour guides for a 2D data array on a uniform lattice // f: two-dimensional array of real data values +// midpoint: optional array containing data values at cell midpoints // a,b: diagonally opposite vertices of rectangular domain // c: array of contour values -// join: interpolation operator (e.g. operator--or operator ..) -// subsample: number of interior points to include in each grid square -// (in addition to points on edge) -guide[][] contour(real[][] f, pair a, pair b, real[] c, - interpolate join=operator--, int subsample=1) +// join: interpolation operator (e.g. operator -- or operator ..) +guide[][] contour(real[][] f, real[][] midpoint=new real[][], + pair a, pair b, real[] c, + interpolate join=operator --) { int nx=f.length-1; if(nx == 0) @@ -1109,43 +473,37 @@ guide[][] contour(real[][] f, pair a, pair b, real[] c, zi[j]=(xi,interp(a.y,b.y,j/ny)); } } - return contour(z,f,c,join,subsample); + return contour(z,f,midpoint,c,join); } // return contour guides for a real-valued function -// f: real-valued function of two real variables -// a,b: diagonally opposite vertices of rectangular domain -// c: array of contour values -// nx,ny: number of subdivisions in x and y directions(determines accuracy) -// join: interpolation operator (e.g. operator--or operator ..) -// subsample: number of interior points to include in each grid square -// (in addition to points on edge) +// f: real-valued function of two real variables +// a,b: diagonally opposite vertices of rectangular domain +// c: array of contour values +// nx,ny: number of subdivisions in x and y directions (determines accuracy) +// join: interpolation operator (e.g. operator -- or operator ..) guide[][] contour(real f(real, real), pair a, pair b, real[] c, int nx=ngraph, int ny=nx, - interpolate join=operator--, int subsample=1) + interpolate join=operator --) { - // evaluate function at points and subsample + // 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); real[] dati=dat[i]; + real[] midpointi=midpoint[i]; for(int j=0; j <= ny; ++j) { dati[j]=f(x,interp(a.y,b.y,j/ny)); + midpointi[j]=f(x2,interp(a.y,b.y,(j+0.5)/ny)); } } - return contour(dat,a,b,c,join,subsample); + return contour(dat,midpoint,a,b,c,join); } - -guide[][] contour(real f(pair), pair a, pair b, - real[] c, int nx=ngraph, int ny=nx, - interpolate join=operator--, int subsample=1) -{ - return contour(new real(real x, real y) {return f((x,y));}, - a,b,c,nx,ny,join,subsample); -} - + void draw(picture pic=currentpicture, Label[] L=new Label[], guide[][] g, pen[] p) { @@ -1172,239 +530,6 @@ void draw(picture pic=currentpicture, Label[] L=new Label[], draw(pic,L,g,sequence(new pen(int) {return p;},g.length)); } -// Draw the contour -void draw(picture pic=currentpicture, Label L, - guide[] g, pen p=currentpen) -{ - draw(pic,g,p); - for(int i=0; i < g.length; ++i) { - if(L.s != "" && size(g[i]) > 1) { - label(pic,L,g[i],p); - } - } -} - -/* CONTOURS FOR IRREGULARLY SPACED POINTS */ -// -// +---------+ -// |\ /| -// | \ / | -// | \ / | -// | \ / | -// | X | -// | / \ | -// | / \ | -// | / \ | -// |/ \| -// +---------+ -// - -// Is triangle p0--p1--p2--cycle counterclockwise ? -private bool isCCW(pair p0, pair p1, pair p2) {return side(p0,p1,p2) < 0;} - -private struct segment -{ - bool active; - bool reversed; // True if lower values are to the left along line a--b. - pair a,b; // Endpoints; a is always an edge point if one exists. - int c; // Contour value. -} - -// Case 1: line passes through two vertices of a triangle -private segment case1(pair p0, pair p1, pair p2, - real v0, real v1, real v2) -{ - // Will cause a duplicate guide; luckily case1 is rare - segment rtrn; - rtrn.active=true; - rtrn.a=p0; - rtrn.b=p1; - rtrn.reversed=(isCCW(p0,p1,p2) ^(v2 > 0)); - return rtrn; -} - -// Cases 2 and 3: line passes through a vertex and a side of a triangle -//(the first vertex passed and the side between the other two) -private segment case2(pair p0, pair p1, pair p2, - real v0, real v1, real v2) -{ - segment rtrn; - rtrn.active=true; - pair val=interp(p1,p2,abs(v1/(v2-v1))); - rtrn.a=val; - rtrn.b=p0; - rtrn.reversed=!(isCCW(p0,p1,p2) ^(v2 > 0)); - return rtrn; -} - -private segment case3(pair p0, pair p1, pair p2, - real v0, real v1, real v2) -{ - segment rtrn; - rtrn.active=true; - pair val=interp(p1,p2,abs(v1/(v2-v1))); - rtrn.a=p0; - rtrn.b=val; - rtrn.reversed=(isCCW(p0,p1,p2) ^(v2 > 0)); - return rtrn; -} - -// Case 4: line passes through two sides of a triangle -//(through the sides formed by the first&second, and second&third vertices) -private segment case4(pair p0, pair p1, pair p2, - real v0, real v1, real v2) -{ - segment rtrn; - rtrn.active=true; - rtrn.a=interp(p1,p0,abs(v1/(v0-v1))); - rtrn.b=interp(p1,p2,abs(v1/(v2-v1))); - rtrn.reversed=(isCCW(p0,p1,p2) ^(v2 > 0)); - return rtrn; -} - -// Check if a line passes through a triangle, and draw the required line. -private segment checktriangle(pair p0, pair p1, pair p2, - real v0, real v1, real v2) -{ - // default null return - static segment dflt; - - real eps=eps*max(abs(v0),abs(v1),abs(v2),1); - - if(v0 < -eps) { - if(v1 < -eps) { - if(v2 < -eps) return dflt; // nothing to do - else if(v2 <= eps) return dflt; // nothing to do - else return case4(p0,p2,p1,v0,v2,v1); - } else if(v1 <= eps) { - if(v2 < -eps) return dflt; // nothing to do - else if(v2 <= eps) return case1(p1,p2,p0,v1,v2,v0); - else return case3(p1,p0,p2,v1,v0,v2); - } else { - if(v2 < -eps) return case4(p0,p1,p2,v0,v1,v2); - else if(v2 <= eps) - return case2(p2,p0,p1,v2,v0,v1); - else return case4(p1,p0,p2,v1,v0,v2); - } - } else if(v0 <= eps) { - if(v1 < -eps) { - if(v2 < -eps) return dflt; // nothing to do - else if(v2 <= eps) return case1(p0,p2,p1,v0,v2,v1); - else return case2(p0,p1,p2,v0,v1,v2); - } else if(v1 <= eps) { - if(v2 < -eps) return case1(p0,p1,p2,v0,v1,v2); - else if(v2 <= eps) return dflt; // use finer partitioning. - else return case1(p0,p1,p2,v0,v1,v2); - } else { - if(v2 < -eps) return case2(p0,p1,p2,v0,v1,v2); - else if(v2 <= eps) return case1(p0,p2,p1,v0,v2,v1); - else return dflt; // nothing to do - } - } else { - if(v1 < -eps) { - if(v2 < -eps) return case4(p1,p0,p2,v1,v0,v2); - else if(v2 <= eps) - return case2(p2,p0,p1,v2,v0,v1); - else return case4(p0,p1,p2,v0,v1,v2); - } else if(v1 <= eps) { - if(v2 < -eps) return case3(p1,p0,p2,v1,v0,v2); - else if(v2 <= eps) return case1(p1,p2,p0,v1,v2,v0); - else return dflt; // nothing to do - } else { - if(v2 < -eps) return case4(p0,p2,p1,v0,v2,v1); - else if(v2 <= eps) return dflt; // nothing to do - else return dflt; // nothing to do - } - } -} - -// Collect connecting path segments. -private void collect(pair[][][] points, real[] c) -{ - for(int cnt=0; cnt < c.length; ++cnt) { - pair[][] gdscnt=points[cnt]; - for(int i=0; i < gdscnt.length; ++i) { - pair[] gig=gdscnt[i]; - int Li=gig.length; - for(int j=i+1; j < gdscnt.length; ++j) { - pair[] gjg=gdscnt[j]; - int Lj=gjg.length; - if(abs(gig[0]-gjg[Lj-1]) < eps) { - gig.delete(0); - gdscnt[j].append(gig); - gdscnt.delete(i); - --i; - break; - } else if(abs(gig[Li-1]-gjg[0]) < eps) { - gjg.delete(0); - gig.append(gjg); - gdscnt[j]=gig; - gdscnt.delete(i); - --i; - break; - } - } - } - } -} - -// Join path segments. -private guide[][] connect(pair[][][] points, real[] c, interpolate join) -{ - // set up return value - guide[][] result=new guide[c.length][]; - for(int cnt=0; cnt < c.length; ++cnt) { - pair[][] pointscnt=points[cnt]; - guide[] resultcnt=result[cnt]=new guide[pointscnt.length]; - for(int i=0; i < pointscnt.length; ++i) { - pair[] pts=pointscnt[i]; - guide gd; - if(pts.length > 0) { - if(pts.length > 1 && abs(pts[0]-pts[pts.length-1]) < eps) { - guide[] g=sequence(new guide(int i) { - return pts[i]; - },pts.length-1); - g.push(cycle); - gd=join(...g); - } else - gd=join(...sequence(new guide(int i) { - return pts[i]; - },pts.length)); - } - resultcnt[i]=gd; - } - } - return result; -} - -guide[][] contour(pair[] z, real[] f, real[] c, interpolate join=operator--) -{ - if(z.length != f.length) - abort("z and f arrays have different lengths"); - - int[][] trn=triangulate(z); - - // array to store guides found so far - pair[][][] points=new pair[c.length][][]; - - for(int cnt=0; cnt < c.length; ++cnt) { - pair[][] pointscnt=points[cnt]; - real C=c[cnt]; - for(int i=0; i < trn.length; ++i) { - int[] trni=trn[i]; - int i0=trni[0], i1=trni[1], i2=trni[2]; - segment seg=checktriangle(z[i0],z[i1],z[i2],f[i0]-C,f[i1]-C,f[i2]-C); - if(seg.active) - pointscnt.push(seg.reversed ? new pair[] {seg.b,seg.a} : - new pair[] {seg.a,seg.b}); - } - } - - collect(points,c); - - return connect(points,c,join); -} - // Extend palette by the colors below and above at each end. pen[] extend(pen[] palette, pen below, pen above) { pen[] p=copy(palette); @@ -1489,3 +614,69 @@ void fill(picture pic=currentpicture, guide[][] g, pen[][] palette) } } } + +// routines for irregularly spaced points: + +// check existing guides and adds new segment to them if possible, +// or otherwise store segment as a new guide +private void addseg(pair[][] gds, segment seg) +{ + if(!seg.active) return; + // search for a path to extend + for(int i=0; i < gds.length; ++i) { + pair[] gd=gds[i]; + if(abs(gd[0]-seg.b) < eps) { + gd.insert(0,seg.a); + return; + } else if(abs(gd[gd.length-1]-seg.b) < eps) { + gd.push(seg.a); + return; + } else if(abs(gd[0]-seg.a) < eps) { + gd.insert(0,seg.b); + return; + } else if(abs(gd[gd.length-1]-seg.a) < eps) { + gd.push(seg.b); + return; + } + } + + // in case nothing is found + pair[] segm; + segm=new pair[] {seg.a,seg.b}; + gds.push(segm); + + return; +} + +guide[][] contour(real f(pair), pair a, pair b, + real[] c, int nx=ngraph, int ny=nx, + interpolate join=operator --) +{ + return contour(new real(real x, real y) {return f((x,y));},a,b,c,nx,ny,join); +} + +guide[][] contour(pair[] z, real[] f, real[] c, interpolate join=operator --) +{ + if(z.length != f.length) + abort("z and f arrays have different lengths"); + + int[][] trn=triangulate(z); + + // array to store guides found so far + pair[][][] points=new pair[c.length][][]; + + for(int cnt=0; cnt < c.length; ++cnt) { + pair[][] pointscnt=points[cnt]; + real C=c[cnt]; + for(int i=0; i < trn.length; ++i) { + int[] trni=trn[i]; + int i0=trni[0], i1=trni[1], i2=trni[2]; + addseg(pointscnt,checktriangle(z[i0],z[i1],z[i2], + f[i0]-C,f[i1]-C,f[i2]-C)); + } + } + + collect(points,c); + + return connect(points,c,join); +} diff --git a/Master/texmf-dist/asymptote/embed.asy b/Master/texmf-dist/asymptote/embed.asy index 8f982332d86..30f2881da04 100644 --- a/Master/texmf-dist/asymptote/embed.asy +++ b/Master/texmf-dist/asymptote/embed.asy @@ -1,11 +1,16 @@ -if(latex()) { +if(latex() && !settings.inlineimage) { usepackage("hyperref"); texpreamble("\hypersetup{"+settings.hyperrefOptions+"}"); usepackage("media9","bigfiles"); + texpreamble("\makeatletter% +\newif\ifnoplaybutton +\@ifpackagelater{media9}{2013/11/15}{% +\noplaybuttontrue}{}% +\makeatother%"); } -// See http://www.ctan.org/tex-archive/macros/latex/contrib/media9/doc/media9.pdf -// for documentation of the options. +// For documentation of the options see +// http://www.ctan.org/tex-archive/macros/latex/contrib/media9/doc/media9.pdf // Embed PRC or SWF content in pdf file string embedplayer(string name, string text="", string options="", @@ -13,7 +18,12 @@ string embedplayer(string name, string text="", string options="", { if(width != 0) options += ",width="+(string) (width/pt)+"pt"; if(height != 0) options += ",height="+(string) (height/pt)+"pt"; - return "\includemedia["+options+"]{"+text+"}{"+name+"}"; + return "% +\ifnoplaybutton% +\includemedia[noplaybutton,"+options+"]{"+text+"}{"+name+"}% +\else% +\includemedia["+options+"]{"+text+"}{"+name+"}% +\fi"; } // Embed media in pdf file diff --git a/Master/texmf-dist/asymptote/lmfit.asy b/Master/texmf-dist/asymptote/lmfit.asy index e70421074e5..c3dfddce061 100644 --- a/Master/texmf-dist/asymptote/lmfit.asy +++ b/Master/texmf-dist/asymptote/lmfit.asy @@ -566,7 +566,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); - printout(n, x, m, fvec, data, 0, 0, ++nfev.val); + if(printout != null) printout(n, x, m, fvec, data, 0, 0, ++nfev.val); if (info.val < 0) return; fnorm = lm_enorm(m, fvec); @@ -580,7 +580,7 @@ void lm_lmdif(int m, int n, real[] x, real[] fvec, real ftol, real xtol, real gt x[j] = temp + step; info.val = 0; evaluate(x, m, wa4, data, info); - printout(n, x, m, wa4, data, 1, iter, ++nfev.val); + if(printout != null) printout(n, x, m, wa4, data, 1, iter, ++nfev.val); if (info.val < 0) return; for (i = 0; i < m; ++i) @@ -659,7 +659,7 @@ void lm_lmdif(int m, int n, real[] x, real[] fvec, real ftol, real xtol, real gt info.val = 0; evaluate(wa2, m, wa4, data, info); - printout(n, x, m, wa4, data, 2, iter, ++nfev.val); + if(printout != null) printout(n, x, m, wa4, data, 2, iter, ++nfev.val); if (info.val < 0) return; @@ -751,7 +751,7 @@ void lm_minimize(int m_dat, int n_par, real[] par, lm_evaluate_ftype evaluate, l lm_lmdif(m, n, par, fvec, control.ftol, control.xtol, control.gtol, control.maxcall * (n + 1), control.epsilon, diag, 1, control.stepbound, control.info, control.nfev, fjac, ipvt, qtf, wa1, wa2, wa3, wa4, evaluate, printout, data); - printout(n, par, m, fvec, data, -1, 0, control.nfev.val); + if(printout != null) printout(n, par, m, fvec, data, -1, 0, control.nfev.val); control.fnorm = lm_enorm(m, fvec); if (control.info.val < 0) control.info.val = 10; diff --git a/Master/texmf-dist/asymptote/math.asy b/Master/texmf-dist/asymptote/math.asy index 46d663d3181..69863634210 100644 --- a/Master/texmf-dist/asymptote/math.asy +++ b/Master/texmf-dist/asymptote/math.asy @@ -185,7 +185,6 @@ int unique(real[] a, real x) { if(i == -1 || x != a[i]) { ++i; a.insert(i,x); - return i; } return i; } @@ -195,7 +194,6 @@ int unique(string[] a, string x) { if(i == -1 || x != a[i]) { ++i; a.insert(i,x); - return i; } return i; } diff --git a/Master/texmf-dist/asymptote/plain.asy b/Master/texmf-dist/asymptote/plain.asy index 14715bad918..e6097408194 100644 --- a/Master/texmf-dist/asymptote/plain.asy +++ b/Master/texmf-dist/asymptote/plain.asy @@ -280,3 +280,16 @@ if(settings.autoimport != "") { } cputime(); + +// Workaround Adobe Reader transparency artifact: +if(pdf()) { + if(settings.tex == "xelatex") { + texpreamble("\usepackage{everypage}"); + tex("\AddEverypageHook{% +\makeatletter% +\special{pdf: put @thispage <</Group << /S /Transparency /I true /CS /DeviceRGB>> >>}% +\makeatother% +}%"); + } else + tex("\pdfpageattr{/Group <</S /Transparency /I true /CS /DeviceRGB>>}"); +} diff --git a/Master/texmf-dist/asymptote/plain_filldraw.asy b/Master/texmf-dist/asymptote/plain_filldraw.asy index a5eea35ef25..026f2cee6c5 100644 --- a/Master/texmf-dist/asymptote/plain_filldraw.asy +++ b/Master/texmf-dist/asymptote/plain_filldraw.asy @@ -18,7 +18,7 @@ void makedraw(frame f, path g, pen p, int depth=mantissaBits) for(int i=0; i < N; ++i) { pair n1=point(n,i+1); pair dir=unit(n1-n0); - real t=dirtime(g,-dir); + real t=dirtime(g,-dir)-epsilon; if(straight(g,(int) t)) t=ceil(t); if(t > epsilon && t < stop) { makedraw(f,subpath(g,0,t),p,depth); diff --git a/Master/texmf-dist/asymptote/plain_paths.asy b/Master/texmf-dist/asymptote/plain_paths.asy index dad0d13be8e..8bb5250db5d 100644 --- a/Master/texmf-dist/asymptote/plain_paths.asy +++ b/Master/texmf-dist/asymptote/plain_paths.asy @@ -364,3 +364,34 @@ path[] strokepath(path g, pen p=currentpen) pair center(path[] g) {return 0.5*(min(g)+max(g));} return shift(center(g)-center(G))*G; } + +real braceinnerangle=radians(60); +real braceouterangle=radians(70); +real bracemidangle=radians(0); +real bracedefaultratio=0.14; +path brace(pair a, pair b, real amplitude=bracedefaultratio*length(b-a)) +{ + real length=length(b-a); + real sign=sgn(amplitude); + real hamplitude=0.5*amplitude; + real hlength=0.5*length; + path brace; + if(abs(amplitude) < bracedefaultratio*length) { + real slope=2*bracedefaultratio; + real controldist=(abs(hamplitude))/slope; + brace=(0,0){expi(sign*braceouterangle)}:: + {expi(sign*bracemidangle)}(controldist,hamplitude):: + {expi(sign*bracemidangle)}(hlength-controldist,hamplitude):: + {expi(sign*braceinnerangle)}(hlength,amplitude) {expi(-sign*braceinnerangle)}:: + {expi(-sign*bracemidangle)}(hlength+controldist,hamplitude):: + {expi(-sign*bracemidangle)}(length-controldist,hamplitude):: + {expi(-sign*braceouterangle)}(length,0); + } else { + brace=(0,0){expi(sign*braceouterangle)}:: + {expi(sign*bracemidangle)}(0.25*length,hamplitude):: + {expi(sign*braceinnerangle)}(hlength,amplitude){expi(-sign*braceinnerangle)}:: + {expi(-sign*bracemidangle)}(0.75*length,hamplitude):: + {expi(-sign*braceouterangle)}(length,0); + } + return shift(a)*rotate(degrees(b-a,warn=false))*brace; +} diff --git a/Master/texmf-dist/asymptote/plain_shipout.asy b/Master/texmf-dist/asymptote/plain_shipout.asy index 9b30e6e1947..972f44963c3 100644 --- a/Master/texmf-dist/asymptote/plain_shipout.asy +++ b/Master/texmf-dist/asymptote/plain_shipout.asy @@ -30,9 +30,14 @@ object embed3(string, frame, string, string, string, light, projection); string Embed(string name, string text="", string options="", real width=0, real height=0); +bool prconly(string format="") +{ + return outformat(format) == "prc"; +} + bool prc0(string format="") { - return settings.prc && (outformat(format) == "pdf" || settings.inlineimage); + return settings.prc && (outformat(format) == "pdf" || prconly() || settings.inlineimage ); } bool prc(string format="") { @@ -106,7 +111,7 @@ void shipout(string prefix=defaultfilename, picture pic=currentpicture, settings.inlinetex=settings.inlineimage; } frame f=pic.fit(prefix,format,view=view,options,script,light,P); - if(!pic.empty2() || settings.render == 0 || prc || empty3) + if(!prconly() && (!pic.empty2() || settings.render == 0 || prc || empty3)) shipout(prefix,orientation(f),format,wait,view); settings.inlinetex=inlinetex; } diff --git a/Master/texmf-dist/asymptote/three.asy b/Master/texmf-dist/asymptote/three.asy index ceb8cf89574..1c3716173d3 100644 --- a/Master/texmf-dist/asymptote/three.asy +++ b/Master/texmf-dist/asymptote/three.asy @@ -2630,7 +2630,7 @@ string embed3D(string prefix, string label=prefix, string text=label, if(lightscript) writeJavaScript(name,lightscript(light),script); - if(!settings.inlinetex) + if(!settings.inlinetex && !prconly()) file3.push(prefix+".prc"); static transform3 flipxz=xscale3(-1)*zscale3(-1); @@ -2867,13 +2867,13 @@ object embed(string prefix=outprefix(), string label=prefix, if(prefix == "") prefix=outprefix(); bool prc=prc(format); - bool preview=settings.render > 0; + bool preview=settings.render > 0 && !prconly(); if(prc) { // The media9.sty package cannot handle spaces or dots in filenames. string dir=stripfile(prefix); prefix=dir+replace(stripdirectory(prefix), new string[][]{{" ","_"},{".","_"}}); - if(settings.embed || nativeformat() == "pdf") + if((settings.embed || nativeformat() == "pdf") && !prconly()) prefix += "+"+(string) file3.length; } else preview=false; diff --git a/Master/texmf-dist/asymptote/three_surface.asy b/Master/texmf-dist/asymptote/three_surface.asy index 85d32b08eb6..fc09ac798d9 100644 --- a/Master/texmf-dist/asymptote/three_surface.asy +++ b/Master/texmf-dist/asymptote/three_surface.asy @@ -348,6 +348,18 @@ patch reverse(patch s) return S; } +// Return the tensor product patch control points corresponding to path p +// and points internal. +pair[][] tensor(path p, pair[] internal) +{ + return new pair[][] { + {point(p,0),precontrol(p,0),postcontrol(p,3),point(p,3)}, + {postcontrol(p,0),internal[0],internal[3],precontrol(p,3)}, + {precontrol(p,1),internal[1],internal[2],postcontrol(p,2)}, + {point(p,1),postcontrol(p,1),precontrol(p,2),point(p,2)} + }; +} + // Return the Coons patch control points corresponding to path p. pair[][] coons(path p) { @@ -367,13 +379,7 @@ pair[][] coons(path p) +3*(precontrol(p,j-1)+postcontrol(p,j+1)) -point(p,j+2)); } - - return new pair[][] { - {point(p,0),precontrol(p,0),postcontrol(p,3),point(p,3)}, - {postcontrol(p,0),internal[0],internal[3],precontrol(p,3)}, - {precontrol(p,1),internal[1],internal[2],postcontrol(p,2)}, - {point(p,1),postcontrol(p,1),precontrol(p,2),point(p,2)} - }; + return tensor(p,internal); } // Decompose a possibly nonconvex cyclic path into an array of paths that @@ -1367,12 +1373,34 @@ void draw(transform t=identity(), frame f, surface s, int nu=1, int nv=1, bool group=name != "" || render.defaultnames; if(group) begingroup3(f,name == "" ? "surface" : name,render); - for(int i=0; i < s.s.length; ++i) - draw3D(f,s.s[i],surfacepen[i],light); + + // Sort patches by mean distance from camera + triple camera=P.camera; + if(P.infinity) { + triple m=min(s); + triple M=max(s); + camera=P.target+camerafactor*(abs(M-m)+abs(m-P.target))*unit(P.vector()); + } + + real[][] depth=new real[s.s.length][]; + for(int i=0; i < depth.length; ++i) + depth[i]=new real[] {abs(camera-s.s[i].cornermean()),i}; + + depth=sort(depth); + + for(int p=depth.length-1; p >= 0; --p) { + real[] a=depth[p]; + int k=round(a[1]); + draw3D(f,s.s[k],surfacepen[k],light); + } + if(group) endgroup3(f); + pen modifiers=thin()+squarecap; - for(int k=0; k < s.s.length; ++k) { + for(int p=depth.length-1; p >= 0; --p) { + real[] a=depth[p]; + int k=round(a[1]); pen meshpen=meshpen[k]; if(!invisible(meshpen)) { if(group) @@ -1410,13 +1438,13 @@ void draw(transform t=identity(), frame f, surface s, int nu=1, int nv=1, light.T=shiftless(P.T.modelview); // Draw from farthest to nearest - while(depth.length > 0) { - real[] a=depth.pop(); - int i=round(a[1]); - tensorshade(t,f,s.s[i],surfacepen[i],light,P); - pen meshpen=meshpen[i]; + for(int p=depth.length-1; p >= 0; --p) { + real[] a=depth[p]; + int k=round(a[1]); + tensorshade(t,f,s.s[k],surfacepen[k],light,P); + pen meshpen=meshpen[k]; if(!invisible(meshpen)) - draw(f,t*project(s.s[i].external(),P),meshpen); + draw(f,t*project(s.s[k].external(),P),meshpen); } endgroup(f); } diff --git a/Master/texmf-dist/asymptote/version.asy b/Master/texmf-dist/asymptote/version.asy index 93b22646681..da1820b0a23 100644 --- a/Master/texmf-dist/asymptote/version.asy +++ b/Master/texmf-dist/asymptote/version.asy @@ -1 +1 @@ -string VERSION="2.23"; +string VERSION="2.25"; diff --git a/Master/texmf-dist/doc/asymptote/CAD.pdf b/Master/texmf-dist/doc/asymptote/CAD.pdf Binary files differindex 2fcce4251e6..2eeebe293a4 100644 --- a/Master/texmf-dist/doc/asymptote/CAD.pdf +++ b/Master/texmf-dist/doc/asymptote/CAD.pdf diff --git a/Master/texmf-dist/doc/asymptote/TeXShopAndAsymptote.pdf b/Master/texmf-dist/doc/asymptote/TeXShopAndAsymptote.pdf Binary files differindex 9abdc656892..e956672af0d 100644 --- a/Master/texmf-dist/doc/asymptote/TeXShopAndAsymptote.pdf +++ b/Master/texmf-dist/doc/asymptote/TeXShopAndAsymptote.pdf diff --git a/Master/texmf-dist/doc/asymptote/asy-latex.pdf b/Master/texmf-dist/doc/asymptote/asy-latex.pdf Binary files differindex a91f302ce02..bb3e9426e26 100644 --- a/Master/texmf-dist/doc/asymptote/asy-latex.pdf +++ b/Master/texmf-dist/doc/asymptote/asy-latex.pdf diff --git a/Master/texmf-dist/doc/asymptote/asyRefCard.pdf b/Master/texmf-dist/doc/asymptote/asyRefCard.pdf Binary files differindex 549deab1579..c65e097e700 100644 --- a/Master/texmf-dist/doc/asymptote/asyRefCard.pdf +++ b/Master/texmf-dist/doc/asymptote/asyRefCard.pdf diff --git a/Master/texmf-dist/doc/asymptote/asymptote.pdf b/Master/texmf-dist/doc/asymptote/asymptote.pdf Binary files differindex fc83a4c44a6..8dd542c1c2f 100644 --- a/Master/texmf-dist/doc/asymptote/asymptote.pdf +++ b/Master/texmf-dist/doc/asymptote/asymptote.pdf diff --git a/Master/texmf-dist/doc/asymptote/examples/CAD1.asy b/Master/texmf-dist/doc/asymptote/examples/CAD1.asy index 4602e73b709..26184aaad2c 100644 --- a/Master/texmf-dist/doc/asymptote/examples/CAD1.asy +++ b/Master/texmf-dist/doc/asymptote/examples/CAD1.asy @@ -1,43 +1,43 @@ -import CAD;
-
-sCAD cad=sCAD.Create();
-
-// Freehand line
-draw(g=cad.MakeFreehand(pFrom=(3,-1)*cm,(6,-1)*cm),
- p=cad.pFreehand);
-
-// Standard measurement lines
-draw(g=box((0,0)*cm,(1,1)*cm),p=cad.pVisibleEdge);
-cad.MeasureParallel(L="$\sqrt{2}$",
- pFrom=(0,1)*cm,
- pTo=(1,0)*cm,
- dblDistance=-15mm);
-
-// Label inside,shifted to the right; arrows outside
-draw(g=box((2,0)*cm,(3,1)*cm),p=cad.pVisibleEdge);
-cad.MeasureParallel(L="1",
- pFrom=(2,1)*cm,
- pTo=(3,1)*cm,
- dblDistance=5mm,
- dblLeft=5mm,
- dblRelPosition=0.75);
-
-// Label and arrows outside
-draw(g=box((5,0)*cm,(5.5,1)*cm),p=cad.pVisibleEdge);
-cad.MeasureParallel(L="0.5",
- pFrom=(5,1)*cm,
- pTo=(5.5,1)*cm,
- dblDistance=5mm,
- dblLeft=10mm,
- dblRelPosition=-1);
-
-// Small bounds,asymmetric measurement line
-draw(g=box((7,0)*cm,(7.5,1)*cm),p=cad.pVisibleEdge);
-cad.MeasureParallel(L="0.5",
- pFrom=(7,1)*cm,
- pTo=(7.5,1)*cm,
- dblDistance=5mm,
- dblLeft=2*cad.GetMeasurementBoundSize(bSmallBound=true),
- dblRight=10mm,
- dblRelPosition=2,
- bSmallBound=true);
+import CAD; + +sCAD cad=sCAD.Create(); + +// Freehand line +draw(g=cad.MakeFreehand(pFrom=(3,-1)*cm,(6,-1)*cm), + p=cad.pFreehand); + +// Standard measurement lines +draw(g=box((0,0)*cm,(1,1)*cm),p=cad.pVisibleEdge); +cad.MeasureParallel(L="$\sqrt{2}$", + pFrom=(0,1)*cm, + pTo=(1,0)*cm, + dblDistance=-15mm); + +// Label inside,shifted to the right; arrows outside +draw(g=box((2,0)*cm,(3,1)*cm),p=cad.pVisibleEdge); +cad.MeasureParallel(L="1", + pFrom=(2,1)*cm, + pTo=(3,1)*cm, + dblDistance=5mm, + dblLeft=5mm, + dblRelPosition=0.75); + +// Label and arrows outside +draw(g=box((5,0)*cm,(5.5,1)*cm),p=cad.pVisibleEdge); +cad.MeasureParallel(L="0.5", + pFrom=(5,1)*cm, + pTo=(5.5,1)*cm, + dblDistance=5mm, + dblLeft=10mm, + dblRelPosition=-1); + +// Small bounds,asymmetric measurement line +draw(g=box((7,0)*cm,(7.5,1)*cm),p=cad.pVisibleEdge); +cad.MeasureParallel(L="0.5", + pFrom=(7,1)*cm, + pTo=(7.5,1)*cm, + dblDistance=5mm, + dblLeft=2*cad.GetMeasurementBoundSize(bSmallBound=true), + dblRight=10mm, + dblRelPosition=2, + bSmallBound=true); diff --git a/Master/texmf-dist/doc/asymptote/examples/RiemannSphere.asy b/Master/texmf-dist/doc/asymptote/examples/RiemannSphere.asy new file mode 100644 index 00000000000..ec1ab7586a9 --- /dev/null +++ b/Master/texmf-dist/doc/asymptote/examples/RiemannSphere.asy @@ -0,0 +1,47 @@ +import graph3; +import solids; + +currentlight=White; +defaultrender.merge=true; + +size(10cm,0); + +pair k=(1,0.2); +real r=abs(k); +real theta=angle(k); + +real x(real t) { return r^t*cos(t*theta); } +real y(real t) { return r^t*sin(t*theta); } +real z(real t) { return 0; } + +real u(real t) { return x(t)/(x(t)^2+y(t)^2+1); } +real v(real t) { return y(t)/(x(t)^2+y(t)^2+1); } +real w(real t) { return (x(t)^2+y(t)^2)/(x(t)^2+y(t)^2+1); } + +real nb=3; +for (int i=0; i<12; ++i) draw((0,0,0)--nb*(Cos(i*30),Sin(i*30),0),yellow); +for (int i=0; i<=nb; ++i) draw(circle((0,0,0),i),lightgreen+white); + + +path3 p=graph(x,y,z,-200,40,operator ..); +path3 q=graph(u,v,w,-200,40,operator ..); + +revolution sph=sphere((0,0,0.5),0.5); +draw(surface(sph),green+white+opacity(0.5)); + +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)); + +path3 L=A--C; +draw(L,1bp+black); + +pen p=fontsize(8pt); + +dot("$(0,0,1)$",A,N,p); +dot("$(u,v,w)$",B,E,p); +dot("$(x,y,0)$",C,E,p); diff --git a/Master/texmf-dist/doc/asymptote/examples/circumcircle.asy b/Master/texmf-dist/doc/asymptote/examples/circumcircle.asy new file mode 100644 index 00000000000..96b3bdd82a0 --- /dev/null +++ b/Master/texmf-dist/doc/asymptote/examples/circumcircle.asy @@ -0,0 +1,9 @@ +unitsize(1inch); + +path tri=(0,0)--(1,0)--(2,1)--cycle; +pair p1=point(tri,0.5); +pair p2=point(tri,1.5); +pair z0=extension(p1,p1+I*dir(tri,0.5),p2,p2+I*dir(tri,1.5)); +dot(z0); +draw(circle(z0,abs(z0-point(tri,0)))); +draw(tri,red); diff --git a/Master/texmf-dist/doc/asymptote/examples/externalprc.tex b/Master/texmf-dist/doc/asymptote/examples/externalprc.tex index e6d4ade1dcf..d131eebd426 100644 --- a/Master/texmf-dist/doc/asymptote/examples/externalprc.tex +++ b/Master/texmf-dist/doc/asymptote/examples/externalprc.tex @@ -1,12 +1,13 @@ % Generate inline PRC images for latex with -% asy -inlineimage teapot -render=4 +% asy -inlineimage cube -render=4 % % Generate inline PRC images for pdflatex with -% asy -inlineimage teapot -render=4 -tex pdflatex +% asy -inlineimage cube -render=4 -tex pdflatex % \documentclass[12pt]{article} -\input teapot.pre +\input cube.pre +\usepackage[bigfiles,noplaybutton]{media9} \RequirePackage{color,graphicx} \begin{document} -\input teapot.tex +\input cube.tex \end{document} diff --git a/Master/texmf-dist/doc/asymptote/examples/sqrtx01y1.asy b/Master/texmf-dist/doc/asymptote/examples/sqrtx01y1.asy index dcb247f572e..0bb7dd52162 100644 --- a/Master/texmf-dist/doc/asymptote/examples/sqrtx01y1.asy +++ b/Master/texmf-dist/doc/asymptote/examples/sqrtx01y1.asy @@ -15,9 +15,6 @@ revolution a=revolution(p3,Y,0,360); draw(surface(a),green,render(compression=Low,merge=true)); draw(p3,blue); -xtick((0,0,0)); -xtick((1,0,0)); - xaxis3(Label("$x$",1),Arrow3); yaxis3(Label("$y$",1),ymax=1.5,dashed,Arrow3); dot(Label("$(1,1)$"),(1,1,0)); diff --git a/Master/texmf-dist/doc/asymptote/examples/worldmap.asy b/Master/texmf-dist/doc/asymptote/examples/worldmap.asy index 59479fffbe2..c52ff23dedc 100644 --- a/Master/texmf-dist/doc/asymptote/examples/worldmap.asy +++ b/Master/texmf-dist/doc/asymptote/examples/worldmap.asy @@ -1,87 +1,87 @@ -settings.outformat="pdf";
-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
-
-real findtheta(real phi, real epsilon=realEpsilon) {
- // Determine for given phi the unique solution -pi/2 <= theta <= pi/2 off
- // 2*theta+sin(2*theta)=pi*sin(phi)
- // in the non-trivial cases by Newton iteration;
- // theoretically the initial guess pi*sin(phi)/4 always works.
- real nwtn(real x, real y) {return x-(2x+sin(2x)-y)/(2+2*cos(2x));};
- real y=pi*sin(phi);
- if(y == 0) return 0.0;
- if(abs(y) == 1) return pi/2;
- real startv=y/4;
- real endv=nwtn(startv,y);
- if(epsilon < 500*realEpsilon) epsilon=500*realEpsilon;
- while(abs(endv-startv) > epsilon) {startv=endv; endv=nwtn(startv,y);};
- return endv;
-}
-
-pair mollweide(real lambda, real phi, real lambda0=0){
- // calculate the Mollweide projection centered at lambda0 for the point
- // 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;
- for(int i=0; i < data.length; ++i) {
- pair tmp=mollweide(radians(data[i].y),radians(data[i].x));
- gtmp=gtmp--tmp;
- }
- return gtmp;
-}
-
-string datafile="worldmap.dat";
-
-file in=input(datafile,comment="/").line();
-// new commentchar since "#" is contained in the file
-pair[][] arrarrpair=new pair[][] ;
-int cnt=-1;
-bool newseg=false;
-while(true) {
- if(eof(in)) break;
- string str=in;
- string[] spstr=split(str,"");
-
- 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]);
- arrarrpair[cnt].push(tmp);
- }
-}
-
-for(int i=0; i < arrarrpair.length; ++i)
- draw(gfrompairs(arrarrpair[i]),1bp+black);
-
-// lines of longitude and latitude
-pair[] constlong(real lambda, int np=100) {
- pair[] tmp;
- for(int i=0; i <= np; ++i) tmp.push((-90+i*180/np,lambda));
- return tmp;
-}
-
-pair[] constlat(real phi, int np=100) {
- pair[] tmp;
- for(int i=0; i <= 2*np; ++i) tmp.push((phi,-180+i*180/np));
- return tmp;
-}
-
-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);
-//draw(gfrompairs(constlong(10)),dotted);
-
-close(in);
-shipout(bbox(1mm,darkblue,Fill(lightblue)), view=true);
-
+settings.outformat="pdf"; +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 + +real findtheta(real phi, real epsilon=realEpsilon) { + // Determine for given phi the unique solution -pi/2 <= theta <= pi/2 off + // 2*theta+sin(2*theta)=pi*sin(phi) + // in the non-trivial cases by Newton iteration; + // theoretically the initial guess pi*sin(phi)/4 always works. + real nwtn(real x, real y) {return x-(2x+sin(2x)-y)/(2+2*cos(2x));}; + real y=pi*sin(phi); + if(y == 0) return 0.0; + if(abs(y) == 1) return pi/2; + real startv=y/4; + real endv=nwtn(startv,y); + if(epsilon < 500*realEpsilon) epsilon=500*realEpsilon; + while(abs(endv-startv) > epsilon) {startv=endv; endv=nwtn(startv,y);}; + return endv; +} + +pair mollweide(real lambda, real phi, real lambda0=0){ + // calculate the Mollweide projection centered at lambda0 for the point + // 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; + for(int i=0; i < data.length; ++i) { + pair tmp=mollweide(radians(data[i].y),radians(data[i].x)); + gtmp=gtmp--tmp; + } + return gtmp; +} + +string datafile="worldmap.dat"; + +file in=input(datafile,comment="/").line(); +// new commentchar since "#" is contained in the file +pair[][] arrarrpair=new pair[][] ; +int cnt=-1; +bool newseg=false; +while(true) { + if(eof(in)) break; + string str=in; + string[] spstr=split(str,""); + + 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]); + arrarrpair[cnt].push(tmp); + } +} + +for(int i=0; i < arrarrpair.length; ++i) + draw(gfrompairs(arrarrpair[i]),1bp+black); + +// lines of longitude and latitude +pair[] constlong(real lambda, int np=100) { + pair[] tmp; + for(int i=0; i <= np; ++i) tmp.push((-90+i*180/np,lambda)); + return tmp; +} + +pair[] constlat(real phi, int np=100) { + pair[] tmp; + for(int i=0; i <= 2*np; ++i) tmp.push((phi,-180+i*180/np)); + return tmp; +} + +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); +//draw(gfrompairs(constlong(10)),dotted); + +close(in); +shipout(bbox(1mm,darkblue,Fill(lightblue)), view=true); + diff --git a/Master/texmf-dist/doc/info/asy-faq.info b/Master/texmf-dist/doc/info/asy-faq.info index aec3cabfcd0..30134dc77d7 100644 --- a/Master/texmf-dist/doc/info/asy-faq.info +++ b/Master/texmf-dist/doc/info/asy-faq.info @@ -10,7 +10,7 @@ END-INFO-DIR-ENTRY File: asy-faq.info, Node: Top, Next: Question 1.1, Up: (dir) ASYMPTOTE FREQUENTLY ASKED QUESTIONS - 20 May 2013 + 20 Apr 2014 This is the list of Frequently Asked Questions about Asymptote (asy). @@ -693,7 +693,7 @@ To override the arrowsize you can give every Arrow drawing attribute a real size argument. If you want to do this globally, you can override the pen-dependent arrowsize function like this: -arrowsize=new real(pen p=currentpen) {return 2mm;}; +DefaultHead.size=new real(pen p=currentpen) {return 2mm;}; File: asy-faq.info, Node: Question 5.4, Next: Question 6.1, Previous: Question 5.3, Up: Section 5 diff --git a/Master/texmf-dist/doc/info/asymptote.info b/Master/texmf-dist/doc/info/asymptote.info index 8cf9caabdac..d9bfe6891e3 100644 --- a/Master/texmf-dist/doc/info/asymptote.info +++ b/Master/texmf-dist/doc/info/asymptote.info @@ -1,11 +1,11 @@ This is asymptote.info, produced by makeinfo version 4.13 from ../asymptote.texi. -This file documents `Asymptote', version 2.23. +This file documents `Asymptote', version 2.25. `http://asymptote.sourceforge.net' - Copyright (C) 2004-13 Andy Hammerlindl, John Bowman, and Tom Prince. + Copyright (C) 2004-14 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 @@ -23,11 +23,11 @@ File: asymptote.info, Node: Top, Next: Description, Up: (dir) Asymptote ********* -This file documents `Asymptote', version 2.23. +This file documents `Asymptote', version 2.25. `http://asymptote.sourceforge.net' - Copyright (C) 2004-13 Andy Hammerlindl, John Bowman, and Tom Prince. + Copyright (C) 2004-14 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 @@ -77,7 +77,7 @@ Drawing commands Programming * Data types:: void, bool, int, real, pair, triple, string -* Paths and guides:: +* Paths and guides:: Bezier curves * Pens:: Colors, line types, line widths, font sizes * Transforms:: Affine transforms * Frames and pictures:: Canvases for immediate and deferred drawing @@ -267,7 +267,7 @@ We recommend subscribing to new release announcements at `http://freshmeat.net/projects/asy' Users may also wish to monitor the `Asymptote' forum: - `http://sourceforge.net/projects/asymptote/forums/forum/409349' + `http://sourceforge.net/p/asymptote/discussion/409349' File: asymptote.info, Node: UNIX binary distributions, Next: MacOS X binary distributions, Up: Installation @@ -432,6 +432,7 @@ texpath texcommand dvips dvisvgm +libgs convert display animate @@ -499,8 +500,9 @@ tar -xf asymptote-x.xx.src.tar cd asymptote-x.xx By default the system version of the Boehm garbage collector will be used; if it is old we recommend first putting -`http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-7.2d.tar.gz' -in the `Asymptote' source directory. +`http://hboehm.info/gc/gc_source/gc-7.4.0.tar.gz' +`http://hboehm.info/gc/gc_source/libatomic_ops-7.4.0.tar.gz' in the +`Asymptote' source directory. On `UNIX' platforms (other than `MacOS X'), we recommend using version `2.8.1' of the `freeglut' library. To compile `freeglut', @@ -615,7 +617,7 @@ File: asymptote.info, Node: Subversion, Next: Uninstall, Prev: Editing modes, The following commands are needed to install the latest development version of `Asymptote' using `Subversion': -svn co http://asymptote.svn.sourceforge.net/svnroot/asymptote/trunk/asymptote +svn co http://svn.code.sf.net/p/asymptote/code/trunk/asymptote cd asymptote ./autogen.sh ./configure @@ -819,9 +821,12 @@ See section *note graph:: (or the online `Asymptote' gallery and external links posted at `http://asymptote.sourceforge.net') for further examples, including two-dimensional and interactive three-dimensional scientific graphs. Additional examples have been -posted by Philippe Ivaldi at `http://www.piprime.fr/asymptote'. A -user-written `Asymptote' tutorial is available at -http://www.artofproblemsolving.com/Wiki/index.php/Asymptote:_Basics +posted by Philippe Ivaldi at `http://www.piprime.fr/asymptote'. +Excellent user-written `Asymptote' tutorials are also available: + + `http://www.artofproblemsolving.com/Wiki/index.php/Asymptote:_Basics' + +`http://math.uchicago.edu/~cstaats/Charles_Staats_III/Notes_and_papers_files/asymptote_tutorial.pdf' File: asymptote.info, Node: Drawing commands, Next: Bezier curves, Prev: Tutorial, Up: Top @@ -1059,7 +1064,7 @@ flags used in Gouraud shading are documented here: 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, +void tensorshade(picture pic=currentpicture, path[] g, bool stroke=false, pen fillrule=currentpen, pen[][] p, path[] b=g, pair[][] z=new pair[][]); If the array `z' is empty, Coons shading, in which the color control @@ -1381,7 +1386,7 @@ languages. * Menu: * Data types:: void, bool, int, real, pair, triple, string -* Paths and guides:: +* Paths and guides:: Bezier curves * Pens:: Colors, line types, line widths, font sizes * Transforms:: Affine transforms * Frames and pictures:: Canvases for immediate and deferred drawing @@ -1805,6 +1810,8 @@ File: asymptote.info, Node: Paths and guides, Next: Pens, Prev: Data types, return shift(c)*scale(a,b)*unitcircle; } + A brace can be constructed between pairs `a' and `b' with path brace(pair a, pair b, real amplitude=bracedefaultratio*length(b-a)); + This example illustrates the use of all five guide connectors discussed in *note Tutorial:: and *note Bezier curves::: size(300,0); pair[] z=new pair[10]; @@ -2058,6 +2065,15 @@ File: asymptote.info, Node: Paths and guides, Next: Pens, Prev: Data types, returns an arbitrary point strictly inside a cyclic path `p' according to the fill rule `fillrule' (*note fillrule::). + `real side(pair a, pair b, pair c);' + determines the side of `a--b' that c lies on (negative=left, + zero=on `a--b', positive=right). + + `real incircle(pair a, pair b, pair c, pair d);' + determines the side of the counterclockwise circle through + `a,b,c' that `d' lies on (negative=inside, 0=on circle, + positive=right). + `path[] strokepath(path g, pen p=currentpen);' returns the path array that `PostScript' would fill in drawing path `g' with pen `p'. @@ -3143,7 +3159,7 @@ struct T { int x; } -T foo=new T; +T foo; T bar=foo; bar.x=5; @@ -3163,7 +3179,7 @@ struct T { ++Tcount; } -T foo=new T; +T foo; Here, the expression `new T' will produce a new instance of the class, but will also cause `Tcount' to be incremented, so that it keeps @@ -3220,7 +3236,7 @@ struct Person { string lastname; } -Person joe=new Person; +Person joe; joe.firstname="Joe"; joe.lastname="Jones"; Creating a new Person is a chore; it takes three lines to create a new @@ -3234,7 +3250,7 @@ struct Person { string lastname; static Person Person(string firstname, string lastname) { - Person p=new Person; + Person p; p.firstname=firstname; p.lastname=lastname; return p; @@ -3264,7 +3280,7 @@ structure. That is, it essentially defines the following constructor (assuming the structure is called `Foo'): static Foo Foo(ARGS) { - Foo instance=new Foo; + Foo instance; instance.operator init(ARGS); return instance; } @@ -4238,7 +4254,7 @@ error occurs). The virtual members `dimension', `line', `csv', `word', and `read' of a file are useful for reading arrays. For example, if line mode is set with `file line(bool b=true)', then reading will stop once the end -of the line is reached instead +of the line is reached instead: file fin=input("test.txt"); real[] A=fin.line(); @@ -5242,7 +5258,6 @@ This module provides an interface to the `LaTeX' package (included with `http://www.ctan.org/tex-archive/macros/latex/contrib/media9' for embedding movies, sounds, and 3D objects into a PDF document. -Version 0.13 (2012/09/12) of `media9' or later is required. A more portable method for embedding movie files, which should work on any platform and does not require the `media9' package, is provided @@ -6884,8 +6899,9 @@ There are four choices for viewing 3D `Asymptote' output: resulting PRC and rendered image files can be extracted and processed in a separate `LaTeX' file. However, see *note LaTeX usage:: for an easier way to embed three-dimensional `Asymptote' - pictures within `LaTeX'. The open-source PRC specification is - available from + pictures within `LaTeX'. For specialized applications where only + the raw PRC file is required, specify `settings.outformat="prc"'. + The open-source PRC specification is available from `http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/API_References/PRCReference/PRC_Format_Specification/'. 4. Project the scene to a two-dimensional vector (EPS or PDF) format @@ -7153,7 +7169,7 @@ surface extrude(Label L, triple axis=Z); The routine real[][] intersections(path3 p, surface s, real fuzz=-1); returns the intersection times of a path `p' with a surface `s' as a -sorted array of real arrays of length 2, and +sorted array of real arrays of length 3, and triple[] intersectionpoints(path3 p, surface s, real fuzz=-1); returns the corresponding intersection points. Here, the computations are performed to the absolute error specified by `fuzz', or if `fuzz < @@ -8055,9 +8071,10 @@ interactiveMask=true; Command-line options override these defaults. Most configuration variables may also be changed at runtime. The advanced configuration variables `dvipsOptions', `hyperrefOptions', `convertOptions', -`gsOptions', `psviewerOptions', `pdfviewerOptions', and `glOptions' -allow specialized options to be passed as a string to the respective -applications or libraries. The default value of `hyperrefOptions' is +`gsOptions', `psviewerOptions', `pdfviewerOptions', `pdfreloadOptions', +`glOptions', and `dvisvgmOptions' allow specialized options to be +passed as a string to the respective applications or libraries. The +default value of `hyperrefOptions' is `setpagesize=false,unicode,pdfborder=0 0 0'. If you insert @@ -8069,10 +8086,14 @@ settings.autoplain=true; The default output format is EPS for the (default) `latex' and `tex' tex engine and PDF for the `pdflatex', `xelatex', and `context' tex engines. Alternative output formats may be produced using the `-f' -option (or `outformat' setting). To produce SVG output, first install -`dvisvgm' (version 0.8.7 or later) from -`http://dvisvgm.sourceforge.net/down.html' and be sure to use the -`latex' or `tex' tex engine. +option (or `outformat' setting). + + To produce SVG output, you will need `dvisvgm' (version 0.8.7 or +later) from `http://dvisvgm.sourceforge.net' and must use the `latex' +or `tex' tex engine. 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). `Asymptote' can also produce any output format supported by the `ImageMagick' `convert' program (version 6.3.5 or later recommended; an @@ -8330,7 +8351,7 @@ A list of frequently asked questions (FAQ) is maintained at Questions on installing and using `Asymptote' that are not addressed in the FAQ should be sent to the `Asymptote' forum: - `http://sourceforge.net/projects/asymptote/forums/forum/409349' + `http://sourceforge.net/p/asymptote/discussion/409349' Including an example that illustrates what you are trying to do will help you get useful feedback. `LaTeX' problems can often be diagnosed with the `-vv' or `-vvv' command-line options. Contributions in the @@ -8494,9 +8515,9 @@ Index * ---: Bezier curves. (line 86) * -=: Self & prefix operators. (line 6) -* -c: Options. (line 175) -* -l: Options. (line 194) -* -u: Options. (line 185) +* -c: Options. (line 180) +* -l: Options. (line 199) +* -u: Options. (line 190) * -V <1>: Tutorial. (line 19) * -V: Configuring. (line 6) * ..: Tutorial. (line 127) @@ -8508,7 +8529,7 @@ Index * 2D graphs: graph. (line 6) * 3D graphs: graph3. (line 6) * 3D grids: grid3. (line 6) -* 3D PostScript: three. (line 593) +* 3D PostScript: three. (line 594) * :: Arithmetic & logical. (line 73) * ::: Bezier curves. (line 70) @@ -8535,8 +8556,8 @@ Index * abs <1>: Mathematical functions. (line 35) * abs: Data types. (line 62) -* accel <1>: three. (line 519) -* accel: Paths and guides. (line 115) +* accel <1>: three. (line 520) +* accel: Paths and guides. (line 117) * access: Import. (line 6) * acknowledgments: Credits. (line 6) * aCos: Mathematical functions. @@ -8545,9 +8566,9 @@ Index (line 6) * acosh: Mathematical functions. (line 6) -* add <1>: three. (line 283) +* add <1>: three. (line 284) * add: Frames and pictures. (line 196) -* addViews: three. (line 405) +* addViews: three. (line 406) * adjust: Pens. (line 115) * Ai: Mathematical functions. (line 48) @@ -8557,7 +8578,7 @@ Index (line 48) * alias <1>: Arrays. (line 181) * alias: Structures. (line 52) -* align: Options. (line 169) +* align: Options. (line 174) * Align: label. (line 12) * all: Arrays. (line 329) * Allow: Pens. (line 327) @@ -8570,22 +8591,22 @@ Index * animate: Configuring. (line 67) * animation: animation. (line 6) * annotate: annotate. (line 6) -* antialias <1>: Options. (line 144) +* antialias <1>: Options. (line 145) * antialias: three. (line 222) * append <1>: Arrays. (line 39) * append: Files. (line 36) -* arc: three. (line 295) +* arc: three. (line 296) * Arc: Paths and guides. (line 32) * arc: Paths and guides. (line 22) * ArcArrow: draw. (line 26) -* ArcArrow3: three. (line 560) +* ArcArrow3: three. (line 561) * ArcArrows: draw. (line 26) -* ArcArrows3: three. (line 560) -* arclength <1>: three. (line 519) -* arclength: Paths and guides. (line 142) -* arcpoint: Paths and guides. (line 152) -* arctime <1>: three. (line 519) -* arctime: Paths and guides. (line 146) +* ArcArrows3: three. (line 561) +* arclength <1>: three. (line 520) +* arclength: Paths and guides. (line 144) +* arcpoint: Paths and guides. (line 154) +* arctime <1>: three. (line 520) +* arctime: Paths and guides. (line 148) * arguments: Default arguments. (line 6) * arithmetic operators: Arithmetic & logical. (line 6) @@ -8596,10 +8617,10 @@ Index * Arrow: draw. (line 26) * arrow: Drawing commands. (line 31) * arrow keys: Tutorial. (line 37) -* Arrow3: three. (line 560) +* Arrow3: three. (line 561) * Arrows: draw. (line 26) * arrows: draw. (line 26) -* Arrows3: three. (line 560) +* Arrows3: three. (line 561) * as: Import. (line 68) * ascii: Data types. (line 286) * aSin: Mathematical functions. @@ -8631,7 +8652,7 @@ Index * attach <1>: graph. (line 416) * attach <2>: LaTeX usage. (line 51) * attach: Frames and pictures. (line 252) -* autoadjust: three. (line 371) +* autoadjust: three. (line 372) * autoimport: Options. (line 112) * automatic scaling: graph. (line 682) * axialshade: fill. (line 43) @@ -8640,11 +8661,11 @@ Index * azimuth: Data types. (line 126) * babel: babel. (line 6) * background color: Frames and pictures. (line 168) -* BackView: three. (line 398) +* BackView: three. (line 399) * Bar: draw. (line 19) -* Bar3: three. (line 560) +* Bar3: three. (line 561) * Bars: draw. (line 19) -* Bars3: three. (line 560) +* Bars3: three. (line 561) * barsize: draw. (line 19) * base modules: Base modules. (line 6) * basealign: Pens. (line 168) @@ -8652,18 +8673,18 @@ Index * batch mode: Tutorial. (line 6) * beep: Data types. (line 357) * BeginArcArrow: draw. (line 26) -* BeginArcArrow3: three. (line 560) +* BeginArcArrow3: three. (line 561) * BeginArrow: draw. (line 26) -* BeginArrow3: three. (line 560) +* BeginArrow3: three. (line 561) * BeginBar: draw. (line 19) -* BeginBar3: three. (line 560) +* BeginBar3: three. (line 561) * BeginDotMargin: draw. (line 42) -* BeginDotMargin3: three. (line 576) +* BeginDotMargin3: three. (line 577) * BeginMargin: draw. (line 42) -* BeginMargin3: three. (line 576) +* BeginMargin3: three. (line 577) * BeginPenMargin: draw. (line 42) -* BeginPenMargin2: three. (line 576) -* BeginPenMargin3: three. (line 576) +* BeginPenMargin2: three. (line 577) +* BeginPenMargin3: three. (line 577) * BeginPoint: label. (line 56) * Bessel: Mathematical functions. (line 48) @@ -8675,7 +8696,7 @@ Index (line 48) * Bi_deriv: Mathematical functions. (line 48) -* Billboard: three. (line 489) +* Billboard: three. (line 490) * binary: Files. (line 75) * binary format: Files. (line 75) * binary operators: Arithmetic & logical. @@ -8700,18 +8721,19 @@ Index (line 6) * Bottom: graph. (line 134) * BottomTop: graph. (line 140) -* BottomView: three. (line 398) +* BottomView: three. (line 399) * bounding box: Frames and pictures. (line 168) * Bounds: graph3. (line 21) -* box <1>: three. (line 317) +* box <1>: three. (line 318) * box: Frames and pictures. (line 22) * bp: Tutorial. (line 26) +* brace: Paths and guides. (line 44) * break: Programming. (line 29) * breakpoints: Debugger. (line 21) * brick: Pens. (line 251) * broken axis: graph. (line 782) * bug reports: Help. (line 23) -* buildcycle: Paths and guides. (line 258) +* buildcycle: Paths and guides. (line 260) * Button-1: GUI. (line 6) * Button-2: GUI. (line 6) * BWRainbow: palette. (line 15) @@ -8719,14 +8741,14 @@ Index * C string: Data types. (line 191) * CAD: CAD. (line 6) * calculateTransform: Frames and pictures. (line 107) -* camera: three. (line 366) +* camera: three. (line 367) * casts: Casts. (line 6) * cbrt: Mathematical functions. (line 6) * cd: Files. (line 25) * ceil: Mathematical functions. (line 26) -* center: three. (line 350) +* center: three. (line 351) * Center: label. (line 61) * checker: Pens. (line 251) * Chinese: unicode. (line 12) @@ -8735,7 +8757,7 @@ Index * Ci: Mathematical functions. (line 48) * circle <1>: flowchart. (line 64) -* circle: three. (line 291) +* circle: three. (line 292) * Circle: Paths and guides. (line 17) * circle: Paths and guides. (line 10) * circlebarframe: markers. (line 18) @@ -8759,7 +8781,7 @@ Index * comma: Files. (line 61) * comma-separated-value mode: Arrays. (line 362) * command-line options <1>: Options. (line 6) -* command-line options: Configuring. (line 83) +* command-line options: Configuring. (line 84) * comment character: Files. (line 16) * compass directions: Tutorial. (line 106) * Compiling from UNIX source: Compiling from UNIX source. @@ -8775,15 +8797,15 @@ Index * configuring: Configuring. (line 6) * conj: Data types. (line 59) * constructors: Structures. (line 91) -* context: Options. (line 144) +* context: Options. (line 145) * continue <1>: Debugger. (line 31) * continue: Programming. (line 29) * contour: contour. (line 9) * contour3: contour3. (line 6) * controls <1>: three. (line 6) * controls: Bezier curves. (line 45) -* controlSpecifier: Paths and guides. (line 382) -* convert <1>: Options. (line 144) +* controlSpecifier: Paths and guides. (line 393) +* convert <1>: Options. (line 145) * convert <2>: animation. (line 6) * convert <3>: Files. (line 154) * convert: Configuring. (line 67) @@ -8809,19 +8831,19 @@ Index * cubicroots: Arrays. (line 318) * curl <1>: three. (line 6) * curl: Bezier curves. (line 66) -* curlSpecifier: Paths and guides. (line 394) +* curlSpecifier: Paths and guides. (line 405) * currentpen: Pens. (line 6) -* currentprojection: three. (line 395) +* currentprojection: three. (line 396) * curve: slopefield. (line 20) * custom axis types: graph. (line 144) * custom mark routine: graph. (line 577) * custom tick locations: graph. (line 249) -* cut: Paths and guides. (line 240) +* cut: Paths and guides. (line 242) * cycle <1>: three. (line 6) * cycle: Tutorial. (line 75) -* cyclic <1>: three. (line 519) +* cyclic <1>: three. (line 520) * cyclic <2>: Arrays. (line 39) -* cyclic: Paths and guides. (line 74) +* cyclic: Paths and guides. (line 76) * Cyrillic: unicode. (line 7) * dashdotted: Pens. (line 95) * dashed: Pens. (line 95) @@ -8835,7 +8857,7 @@ Index * default arguments: Default arguments. (line 6) * defaultformat: graph. (line 175) * DefaultHead: draw. (line 26) -* DefaultHead3: three. (line 560) +* DefaultHead3: three. (line 561) * defaultpen: Pens. (line 46) * defaultrender: three. (line 47) * deferred drawing: simplex. (line 6) @@ -8850,14 +8872,14 @@ Index * diagonal: Arrays. (line 303) * diamond: flowchart. (line 57) * dimension: Arrays. (line 367) -* dir <1>: three. (line 519) -* dir <2>: Paths and guides. (line 98) +* dir <1>: three. (line 520) +* dir <2>: Paths and guides. (line 100) * dir <3>: Data types. (line 87) * dir: Search paths. (line 10) * direction specifier: Bezier curves. (line 6) * directory: Files. (line 25) -* dirSpecifier: Paths and guides. (line 376) -* dirtime: Paths and guides. (line 155) +* dirSpecifier: Paths and guides. (line 387) +* dirtime: Paths and guides. (line 157) * display: Configuring. (line 67) * do: Programming. (line 29) * DOSendl: Files. (line 61) @@ -8866,11 +8888,11 @@ Index * dot <2>: Data types. (line 100) * dot: draw. (line 83) * DotMargin: draw. (line 42) -* DotMargin3: three. (line 576) +* DotMargin3: three. (line 577) * DotMargins: draw. (line 42) -* DotMargins3: three. (line 576) +* DotMargins3: three. (line 577) * dotted: Pens. (line 95) -* double deferred drawing: three. (line 268) +* double deferred drawing: three. (line 269) * double precision: Files. (line 75) * draw: three. (line 112) * Draw: Frames and pictures. (line 147) @@ -8882,7 +8904,9 @@ Index * drawtree: drawtree. (line 9) * dvips: Configuring. (line 67) * dvipsOptions: Options. (line 131) +* dvisvgm <1>: Options. (line 150) * dvisvgm: Configuring. (line 67) +* dvisvgmOptions: Options. (line 131) * E <1>: Mathematical functions. (line 48) * E: Tutorial. (line 106) @@ -8896,30 +8920,30 @@ Index * else: Programming. (line 8) * emacs: Editing modes. (line 6) * embed: embed. (line 6) -* Embedded: three. (line 489) +* Embedded: three. (line 490) * empty: Frames and pictures. (line 7) * EndArcArrow: draw. (line 26) -* EndArcArrow3: three. (line 560) +* EndArcArrow3: three. (line 561) * EndArrow: draw. (line 26) -* EndArrow3: three. (line 560) +* EndArrow3: three. (line 561) * EndBar: draw. (line 19) -* EndBar3: three. (line 560) +* EndBar3: three. (line 561) * EndDotMargin: draw. (line 42) -* EndDotMargin3: three. (line 576) +* EndDotMargin3: three. (line 577) * endl: Files. (line 61) * EndMargin: draw. (line 42) -* EndMargin3: three. (line 576) +* EndMargin3: three. (line 577) * EndPenMargin: draw. (line 42) -* EndPenMargin2: three. (line 576) -* EndPenMargin3: three. (line 576) +* EndPenMargin2: three. (line 577) +* EndPenMargin3: three. (line 577) * EndPoint: label. (line 56) * envelope: Frames and pictures. (line 22) -* environment variables: Configuring. (line 87) +* environment variables: Configuring. (line 88) * eof <1>: Arrays. (line 344) * eof: Files. (line 92) * eol <1>: Arrays. (line 344) * eol: Files. (line 92) -* EPS <1>: Options. (line 144) +* EPS <1>: Options. (line 145) * EPS: label. (line 79) * erase <1>: Frames and pictures. (line 7) * erase <2>: Data types. (line 241) @@ -8948,14 +8972,14 @@ Index (line 48) * extendcap: Pens. (line 129) * extension <1>: MetaPost. (line 10) -* extension: Paths and guides. (line 235) -* external: embed. (line 13) -* extrude: three. (line 513) +* extension: Paths and guides. (line 237) +* external: embed. (line 12) +* extrude: three. (line 514) * F: Mathematical functions. (line 48) * fabs: Mathematical functions. (line 6) -* face: three. (line 601) +* face: three. (line 602) * factorial: Mathematical functions. (line 39) * Fedora: UNIX binary distributions. @@ -8964,7 +8988,7 @@ Index * fft <1>: math. (line 26) * fft: Arrays. (line 246) * FFTW: Compiling from UNIX source. - (line 57) + (line 58) * file <1>: Debugger. (line 45) * file: Files. (line 6) * Fill: Frames and pictures. (line 133) @@ -8978,9 +9002,9 @@ Index * fillrule: Pens. (line 152) * find <1>: Arrays. (line 159) * find: Data types. (line 226) -* firstcut: Paths and guides. (line 250) +* firstcut: Paths and guides. (line 252) * fit: Frames and pictures. (line 103) -* fit3: three. (line 281) +* fit3: three. (line 282) * fixedscaling: Frames and pictures. (line 74) * floor: Mathematical functions. (line 26) @@ -8993,12 +9017,12 @@ Index * fontcommand: Pens. (line 207) * fontsize: Pens. (line 178) * for: Programming. (line 8) -* format <1>: Options. (line 144) +* format <1>: Options. (line 145) * format: Data types. (line 269) * forum: Help. (line 6) * frame: Frames and pictures. (line 7) * from: Import. (line 17) -* FrontView: three. (line 398) +* FrontView: three. (line 399) * function declarations: Functions. (line 67) * function shading: fill. (line 100) * Function shading: fill. (line 100) @@ -9037,12 +9061,12 @@ Index * gsl: Mathematical functions. (line 48) * GSL: Compiling from UNIX source. - (line 57) + (line 58) * gsOptions: Options. (line 131) * GUI: GUI. (line 6) * GUI installation: GUI installation. (line 6) * GUI usage: GUI usage. (line 6) -* guide: Paths and guides. (line 303) +* guide: Paths and guides. (line 314) * guide3: three. (line 6) * hatch: Pens. (line 267) * height: LaTeX usage. (line 51) @@ -9055,14 +9079,14 @@ Index * hex: Data types. (line 283) * hexidecimal <1>: Pens. (line 59) * hexidecimal: Data types. (line 283) -* hidden surface removal: three. (line 601) +* hidden surface removal: three. (line 602) * histogram: Mathematical functions. (line 39) * history <1>: Interactive mode. (line 59) * history: Files. (line 142) * historylines: Interactive mode. (line 64) * HookHead: draw. (line 26) -* HookHead3: three. (line 560) +* HookHead3: three. (line 561) * Horizontal: flowchart. (line 81) * hyperrefOptions: Options. (line 131) * hypot: Mathematical functions. @@ -9076,11 +9100,11 @@ Index * identity <2>: Mathematical functions. (line 6) * identity: Transforms. (line 24) -* identity4: three. (line 449) +* identity4: three. (line 450) * if: Programming. (line 8) * IgnoreAspect: Frames and pictures. (line 58) * image: palette. (line 34) -* ImageMagick <1>: Options. (line 144) +* ImageMagick <1>: Options. (line 145) * ImageMagick <2>: animation. (line 6) * ImageMagick: Configuring. (line 67) * images: palette. (line 6) @@ -9089,6 +9113,7 @@ Index * implicit scaling: Implicit scaling. (line 6) * import: Import. (line 46) * inches: Tutorial. (line 63) +* incircle: Paths and guides. (line 303) * include: Import. (line 127) * including images: label. (line 79) * increasing: math. (line 59) @@ -9103,34 +9128,34 @@ Index * input: Files. (line 10) * insert <1>: Arrays. (line 39) * insert: Data types. (line 237) -* inside: Paths and guides. (line 282) +* inside: Paths and guides. (line 284) * inst: Debugger. (line 36) * installation: Installation. (line 6) * int: Data types. (line 28) * integer division: Arithmetic & logical. (line 6) * interactive mode: Interactive mode. (line 6) -* interior: Paths and guides. (line 278) +* interior: Paths and guides. (line 280) * international characters: unicode. (line 6) * interp: Arithmetic & logical. (line 76) * interpolate: interpolate. (line 6) -* intersect <1>: three. (line 519) +* intersect <1>: three. (line 520) * intersect <2>: math. (line 13) -* intersect: Paths and guides. (line 184) -* intersectionpoint <1>: three. (line 519) +* intersect: Paths and guides. (line 186) +* intersectionpoint <1>: three. (line 520) * intersectionpoint <2>: math. (line 17) -* intersectionpoint: Paths and guides. (line 227) -* intersectionpoints <1>: three. (line 519) -* intersectionpoints: Paths and guides. (line 231) -* intersections <1>: three. (line 519) -* intersections: Paths and guides. (line 195) +* intersectionpoint: Paths and guides. (line 229) +* intersectionpoints <1>: three. (line 520) +* intersectionpoints: Paths and guides. (line 233) +* intersections <1>: three. (line 520) +* intersections: Paths and guides. (line 197) * InTicks: graph3. (line 35) * intMax: Data types. (line 28) * intMin: Data types. (line 28) * inverse <1>: Arrays. (line 306) * inverse: Transforms. (line 16) -* invert: three. (line 439) +* invert: three. (line 440) * invisible: Pens. (line 39) * isnan: Data types. (line 33) * J: Mathematical functions. @@ -9150,7 +9175,7 @@ Index * keyword-only: Named arguments. (line 37) * keywords: Named arguments. (line 6) * Korean: unicode. (line 12) -* label: three. (line 483) +* label: three. (line 484) * Label <1>: graph. (line 343) * Label: label. (line 14) * label: clip. (line 16) @@ -9160,9 +9185,9 @@ Index * labelx: graph. (line 343) * labely: graph. (line 343) * Landscape: Frames and pictures. (line 95) -* lastcut: Paths and guides. (line 254) +* lastcut: Paths and guides. (line 256) * lasy-mode: Editing modes. (line 6) -* latex: Options. (line 144) +* latex: Options. (line 145) * LaTeX fonts: Pens. (line 192) * LaTeX usage: LaTeX usage. (line 6) * latexmk: LaTeX usage. (line 30) @@ -9176,18 +9201,20 @@ Index * LeftRight: graph. (line 290) * LeftSide: label. (line 61) * LeftTicks: graph. (line 161) -* LeftView: three. (line 398) +* LeftView: three. (line 399) * legend <1>: graph. (line 432) * legend <2>: draw. (line 64) * legend: Drawing commands. (line 31) * Legendre: Mathematical functions. (line 48) -* length <1>: three. (line 519) +* length <1>: three. (line 520) * length <2>: Arrays. (line 39) -* length <3>: Paths and guides. (line 65) +* length <3>: Paths and guides. (line 67) * length: Data types. (line 62) * letter: Configuring. (line 61) * lexorder: math. (line 68) +* libgs <1>: Options. (line 150) +* libgs: Configuring. (line 67) * libm routines: Mathematical functions. (line 6) * libsigsegv <1>: Help. (line 33) @@ -9223,10 +9250,10 @@ Index * makepen: Pens. (line 300) * map: Arrays. (line 141) * Margin: draw. (line 42) -* Margin3: three. (line 576) -* margins: three. (line 274) +* Margin3: three. (line 577) +* margins: three. (line 275) * Margins: draw. (line 42) -* Margins3: three. (line 576) +* Margins3: three. (line 577) * mark: graph. (line 485) * markangle: markers. (line 38) * marker: graph. (line 485) @@ -9237,34 +9264,34 @@ Index * math: math. (line 6) * mathematical functions: Mathematical functions. (line 6) -* max <1>: three. (line 519) +* max <1>: three. (line 520) * max <2>: Arrays. (line 225) * max <3>: Frames and pictures. (line 7) -* max: Paths and guides. (line 267) +* max: Paths and guides. (line 269) * maxbound: Data types. (line 106) * maxtile: three. (line 222) -* maxtimes: Paths and guides. (line 222) +* maxtimes: Paths and guides. (line 224) * maxviewport: three. (line 222) * MetaPost: MetaPost. (line 6) * MetaPost ... : Bezier curves. (line 70) -* MetaPost cutafter: Paths and guides. (line 255) -* MetaPost cutbefore: Paths and guides. (line 251) +* MetaPost cutafter: Paths and guides. (line 257) +* MetaPost cutbefore: Paths and guides. (line 253) * MetaPost pickup: Pens. (line 6) * MetaPost whatever: MetaPost. (line 10) * Microsoft Windows: Microsoft Windows. (line 6) * MidArcArrow: draw. (line 26) -* MidArcArrow3: three. (line 560) +* MidArcArrow3: three. (line 561) * MidArrow: draw. (line 26) -* MidArrow3: three. (line 560) -* midpoint: Paths and guides. (line 169) +* MidArrow3: three. (line 561) +* midpoint: Paths and guides. (line 171) * MidPoint: label. (line 56) -* min <1>: three. (line 519) +* min <1>: three. (line 520) * min <2>: Arrays. (line 218) * min <3>: Frames and pictures. (line 7) -* min: Paths and guides. (line 263) +* min: Paths and guides. (line 265) * minbound: Data types. (line 103) * minipage: label. (line 118) -* mintimes: Paths and guides. (line 217) +* mintimes: Paths and guides. (line 219) * miterjoin: Pens. (line 138) * miterlimit: Pens. (line 147) * mktemp: Files. (line 44) @@ -9292,11 +9319,11 @@ Index * NoFill <1>: Frames and pictures. (line 141) * NoFill: draw. (line 26) * NoMargin: draw. (line 42) -* NoMargin3: three. (line 576) +* NoMargin3: three. (line 577) * none: Files. (line 61) * None: draw. (line 19) -* normal: three. (line 505) -* nosafe: Options. (line 164) +* normal: three. (line 506) +* nosafe: Options. (line 169) * NOT: Arithmetic & logical. (line 80) * notaknot: graph. (line 37) @@ -9305,15 +9332,15 @@ Index * null: Structures. (line 6) * nullpen <1>: Frames and pictures. (line 127) * nullpen: label. (line 14) -* NURBS: three. (line 375) -* O: three. (line 286) +* NURBS: three. (line 376) +* O: three. (line 287) * obj: obj. (line 9) -* oblique: three. (line 331) -* obliqueX: three. (line 339) -* obliqueY: three. (line 346) -* obliqueZ: three. (line 331) +* oblique: three. (line 332) +* obliqueX: three. (line 340) +* obliqueY: three. (line 347) +* obliqueZ: three. (line 332) * ode: ode. (line 9) -* offset <1>: Options. (line 169) +* offset <1>: Options. (line 174) * offset: Pens. (line 115) * OmitTick: graph. (line 239) * OmitTickInterval: graph. (line 239) @@ -9336,10 +9363,10 @@ Index * OR: Arithmetic & logical. (line 80) * orientation: Frames and pictures. (line 95) -* orthographic: three. (line 350) +* orthographic: three. (line 351) * outformat: three. (line 140) * outprefix: Frames and pictures. (line 83) -* output <1>: Options. (line 144) +* output <1>: Options. (line 145) * output: Files. (line 36) * OutTicks: graph3. (line 35) * overloading functions: Functions. (line 44) @@ -9367,40 +9394,41 @@ Index * path[]: Tutorial. (line 134) * patterns <1>: patterns. (line 6) * patterns: Pens. (line 238) -* PDF: Options. (line 144) -* pdflatex: Options. (line 144) +* PDF: Options. (line 145) +* pdflatex: Options. (line 145) +* pdfreloadOptions: Options. (line 131) * pdfviewer: Configuring. (line 6) * pdfviewerOptions: Options. (line 131) * pen: Pens. (line 6) * PenMargin: draw. (line 42) -* PenMargin2: three. (line 576) -* PenMargin3: three. (line 576) +* PenMargin2: three. (line 577) +* PenMargin3: three. (line 577) * PenMargins: draw. (line 42) -* PenMargins2: three. (line 576) -* PenMargins3: three. (line 576) +* PenMargins2: three. (line 577) +* PenMargins3: three. (line 577) * periodic: graph. (line 37) * perl: LaTeX usage. (line 30) * perpendicular: geometry. (line 6) -* perspective: three. (line 375) +* perspective: three. (line 376) * picture: Frames and pictures. (line 35) * picture alignment: Frames and pictures. (line 209) -* piecewisestraight: Paths and guides. (line 81) -* pixel: three. (line 583) +* piecewisestraight: Paths and guides. (line 83) +* pixel: three. (line 584) * Pl: Mathematical functions. (line 48) * plain: plain. (line 6) * planar: three. (line 89) -* plane: three. (line 313) -* planeproject: three. (line 502) -* point <1>: three. (line 519) -* point: Paths and guides. (line 84) +* plane: three. (line 314) +* planeproject: three. (line 503) +* point <1>: three. (line 520) +* point: Paths and guides. (line 86) * polar: Data types. (line 121) * polargraph: graph. (line 90) * polygon: graph. (line 485) * pop: Arrays. (line 39) * Portrait: Frames and pictures. (line 95) -* postcontrol <1>: three. (line 519) -* postcontrol: Paths and guides. (line 135) +* postcontrol <1>: three. (line 520) +* postcontrol: Paths and guides. (line 137) * postfix operators: Self & prefix operators. (line 19) * postscript: Frames and pictures. (line 271) @@ -9410,8 +9438,8 @@ Index (line 6) * prc: three. (line 243) * precision: Files. (line 92) -* precontrol <1>: three. (line 519) -* precontrol: Paths and guides. (line 128) +* precontrol <1>: three. (line 520) +* precontrol: Paths and guides. (line 130) * prefix operators: Self & prefix operators. (line 6) * private: Structures. (line 6) @@ -9439,8 +9467,8 @@ Index * RadialShadeDraw: Frames and pictures. (line 163) * radians: Mathematical functions. (line 17) -* radius <1>: three. (line 519) -* radius: Paths and guides. (line 124) +* radius <1>: three. (line 520) +* radius: Paths and guides. (line 126) * Rainbow: palette. (line 12) * rand: Mathematical functions. (line 39) @@ -9461,12 +9489,12 @@ Index * reference: Description. (line 80) * reflect: Transforms. (line 51) * Relative: label. (line 51) -* relpoint: Paths and guides. (line 165) -* reltime: Paths and guides. (line 161) +* relpoint: Paths and guides. (line 167) +* reltime: Paths and guides. (line 163) * remainder: Mathematical functions. (line 6) * rename: Files. (line 151) -* render <1>: Options. (line 144) +* render <1>: Options. (line 145) * render: three. (line 47) * replace: Data types. (line 254) * resetdefaultpen: Pens. (line 353) @@ -9474,9 +9502,9 @@ Index * restore: Frames and pictures. (line 265) * restricted: Structures. (line 6) * return: Debugger. (line 48) -* reverse <1>: three. (line 519) +* reverse <1>: three. (line 520) * reverse <2>: Arrays. (line 146) -* reverse <3>: Paths and guides. (line 172) +* reverse <3>: Paths and guides. (line 174) * reverse: Data types. (line 250) * rewind: Files. (line 92) * rfind: Data types. (line 231) @@ -9486,8 +9514,8 @@ Index * Right: graph. (line 287) * RightSide: label. (line 61) * RightTicks: graph. (line 161) -* RightView: three. (line 398) -* rotate: three. (line 470) +* RightView: three. (line 399) +* rotate: three. (line 471) * Rotate: label. (line 36) * Rotate(pair z): label. (line 39) * round: Mathematical functions. @@ -9501,16 +9529,16 @@ Index * runtime imports: Import. (line 98) * Russian: unicode. (line 7) * S: Tutorial. (line 106) -* safe: Options. (line 164) +* safe: Options. (line 169) * save: Frames and pictures. (line 262) * saveline: Files. (line 134) -* scale: three. (line 469) +* scale: three. (line 470) * Scale: graph. (line 698) * scale <1>: graph. (line 682) * scale <2>: Transforms. (line 39) * scale: Pens. (line 115) * Scale: label. (line 45) -* scale3: three. (line 466) +* scale3: three. (line 467) * scaled graph: graph. (line 663) * scientific graph: graph. (line 397) * scroll: Files. (line 108) @@ -9533,14 +9561,15 @@ Index * sgn: Mathematical functions. (line 26) * shading: fill. (line 32) -* shift <1>: three. (line 454) +* shift <1>: three. (line 455) * shift: Transforms. (line 27) * Shift: label. (line 33) * shiftless: Transforms. (line 53) * shipout: Frames and pictures. (line 83) -* showtarget: three. (line 350) +* showtarget: three. (line 351) * Si: Mathematical functions. (line 48) +* side: Paths and guides. (line 299) * signedint: Files. (line 75) * SimpleHead: draw. (line 26) * simplex: simplex. (line 6) @@ -9555,18 +9584,18 @@ Index * singlereal: Files. (line 75) * sinh: Mathematical functions. (line 6) -* SixViews: three. (line 413) -* SixViewsFR: three. (line 413) -* SixViewsUS: three. (line 413) -* size <1>: Options. (line 144) -* size <2>: three. (line 519) +* SixViews: three. (line 414) +* SixViewsFR: three. (line 414) +* SixViewsUS: three. (line 414) +* size <1>: Options. (line 145) +* size <2>: three. (line 520) * size <3>: Frames and pictures. (line 43) -* size: Paths and guides. (line 70) -* size3: three. (line 271) +* size: Paths and guides. (line 72) +* size3: three. (line 272) * slant: Transforms. (line 45) * Slant: label. (line 42) * sleep: Data types. (line 351) -* slice: Paths and guides. (line 240) +* slice: Paths and guides. (line 242) * slices: Slices. (line 6) * slide: slide. (line 6) * slope: math. (line 44) @@ -9594,18 +9623,18 @@ Index * step: Debugger. (line 39) * stickframe: markers. (line 16) * stop: Debugger. (line 10) -* straight: three. (line 519) +* straight: three. (line 520) * Straight: graph. (line 31) -* straight: Paths and guides. (line 77) +* straight: Paths and guides. (line 79) * strftime: Data types. (line 298) * string: Data types. (line 181) * stroke: fill. (line 36) -* strokepath: Paths and guides. (line 297) +* strokepath: Paths and guides. (line 308) * strptime: Data types. (line 306) * struct: Structures. (line 6) * structures: Structures. (line 6) -* subpath <1>: three. (line 519) -* subpath: Paths and guides. (line 175) +* subpath <1>: three. (line 520) +* subpath: Paths and guides. (line 177) * subpictures: Frames and pictures. (line 103) * substr: Data types. (line 246) * Subversion: Subversion. (line 6) @@ -9615,9 +9644,9 @@ Index * SuppressQuiet: Pens. (line 335) * surface <1>: graph3. (line 101) * surface: three. (line 47) -* SVG: Options. (line 144) +* SVG: Options. (line 150) * SVN: Subversion. (line 6) -* system <1>: Options. (line 164) +* system <1>: Options. (line 169) * system: Data types. (line 328) * syzygy: syzygy. (line 6) * tab: Files. (line 61) @@ -9628,21 +9657,21 @@ Index (line 6) * tanh: Mathematical functions. (line 6) -* target: three. (line 350) +* target: three. (line 351) * tell: Files. (line 92) * tension <1>: three. (line 6) * tension: Bezier curves. (line 56) -* tensionSpecifier: Paths and guides. (line 388) +* tensionSpecifier: Paths and guides. (line 399) * tensor product shading: fill. (line 78) * tensorshade: fill. (line 78) * tessellation: three. (line 112) -* tex <1>: Options. (line 144) +* tex <1>: Options. (line 145) * tex: Frames and pictures. (line 278) * TeX fonts: Pens. (line 201) * TeX string: Data types. (line 181) * texcommand: Configuring. (line 67) * TeXHead: draw. (line 26) -* TeXHead3: three. (line 560) +* TeXHead3: three. (line 561) * texpath <1>: label. (line 115) * texpath: Configuring. (line 67) * texpreamble: Frames and pictures. (line 286) @@ -9654,9 +9683,9 @@ Index * thin: three. (line 123) * this: Structures. (line 6) * three: three. (line 6) -* ThreeViews: three. (line 413) -* ThreeViewsFR: three. (line 413) -* ThreeViewsUS: three. (line 413) +* ThreeViews: three. (line 414) +* ThreeViewsFR: three. (line 414) +* ThreeViewsUS: three. (line 414) * tick: graph. (line 343) * Ticks: graph. (line 161) * ticks: graph. (line 161) @@ -9665,14 +9694,14 @@ Index * tilings: Pens. (line 238) * time <1>: math. (line 30) * time: Data types. (line 298) -* times: Paths and guides. (line 209) +* times: Paths and guides. (line 211) * Top: graph. (line 137) -* TopView: three. (line 398) +* TopView: three. (line 399) * trace: Debugger. (line 51) * trailingzero: graph. (line 175) -* transform <1>: three. (line 494) +* transform <1>: three. (line 495) * transform: Transforms. (line 6) -* transform3: three. (line 449) +* transform3: three. (line 450) * transparency: Pens. (line 222) * transpose: Arrays. (line 205) * tree: tree. (line 9) @@ -9685,15 +9714,15 @@ Index (line 48) * triple: Data types. (line 110) * TrueMargin: draw. (line 42) -* TrueMargin3: three. (line 576) +* TrueMargin3: three. (line 577) * tube <1>: tube. (line 6) * tube: three. (line 123) * tutorial: Tutorial. (line 6) * type1cm: Pens. (line 178) * typedef <1>: Functions. (line 36) * typedef: Data types. (line 361) -* U3D: embed. (line 24) -* undefined: Paths and guides. (line 271) +* U3D: embed. (line 23) +* undefined: Paths and guides. (line 273) * UnFill: Frames and pictures. (line 152) * unfill: fill. (line 110) * UnFill: draw. (line 26) @@ -9702,9 +9731,9 @@ Index * Uninstall: Uninstall. (line 6) * unique: math. (line 64) * unit: Data types. (line 80) -* unitbox <1>: three. (line 319) +* unitbox <1>: three. (line 320) * unitbox: Tutorial. (line 155) -* unitcircle <1>: three. (line 286) +* unitcircle <1>: three. (line 287) * unitcircle: Tutorial. (line 128) * unitrand: Mathematical functions. (line 39) @@ -9714,7 +9743,7 @@ Index (line 6) * unpacking: Rest arguments. (line 39) * unravel: Import. (line 30) -* up: three. (line 350) +* up: three. (line 351) * update: Files. (line 36) * UpsideDown: Frames and pictures. (line 95) * usepackage: Frames and pictures. (line 291) @@ -9734,29 +9763,29 @@ Index * vertex-dependent colors: three. (line 81) * Vertical: flowchart. (line 81) * viewportheight: LaTeX usage. (line 51) -* viewportmargin: three. (line 274) -* viewportsize: three. (line 274) +* viewportmargin: three. (line 275) +* viewportsize: three. (line 275) * viewportwidth: LaTeX usage. (line 51) * views: three. (line 243) * vim: Editing modes. (line 33) * virtual functions: Structures. (line 181) * void: Data types. (line 10) * W: Tutorial. (line 106) -* whatever: Paths and guides. (line 235) +* whatever: Paths and guides. (line 237) * Wheel: palette. (line 22) * wheel mouse: GUI. (line 6) * while: Programming. (line 29) * white-space string delimiter mode: Arrays. (line 354) * width: LaTeX usage. (line 51) -* windingnumber: Paths and guides. (line 271) +* windingnumber: Paths and guides. (line 273) * word: Arrays. (line 354) * write <1>: Arrays. (line 394) * write: Files. (line 53) -* X: three. (line 286) +* X: three. (line 287) * xasy: GUI. (line 6) * xaxis3: graph3. (line 7) * xdr: Files. (line 75) -* xelatex: Options. (line 144) +* xelatex: Options. (line 145) * xequals: graph. (line 294) * XEquals: graph. (line 280) * xlimits: graph. (line 637) @@ -9764,15 +9793,15 @@ Index (line 80) * xpart: Data types. (line 91) * xscale: Transforms. (line 33) -* xscale3: three. (line 457) +* xscale3: three. (line 458) * xtick: graph. (line 343) -* XY: three. (line 479) +* XY: three. (line 480) * XYEquals: graph3. (line 21) * XYZero: graph3. (line 21) * XZEquals: graph3. (line 21) * XZero: graph. (line 275) * XZZero: graph3. (line 21) -* Y <1>: three. (line 286) +* Y <1>: three. (line 287) * Y: Mathematical functions. (line 6) * yaxis3: graph3. (line 7) @@ -9781,14 +9810,14 @@ Index * ylimits: graph. (line 637) * ypart: Data types. (line 94) * yscale: Transforms. (line 36) -* yscale3: three. (line 460) +* yscale3: three. (line 461) * ytick: graph. (line 343) -* YX: three. (line 494) -* YZ: three. (line 494) +* YX: three. (line 495) +* YZ: three. (line 495) * YZEquals: graph3. (line 21) * YZero: graph. (line 125) * YZZero: graph3. (line 21) -* Z: three. (line 286) +* Z: three. (line 287) * zaxis3: graph3. (line 7) * zero_Ai: Mathematical functions. (line 48) @@ -9804,9 +9833,9 @@ Index * zeta: Mathematical functions. (line 48) * zpart: Data types. (line 163) -* zscale3: three. (line 463) -* ZX: three. (line 494) -* ZY: three. (line 494) +* zscale3: three. (line 464) +* ZX: three. (line 495) +* ZY: three. (line 495) * |: Arithmetic & logical. (line 62) * ||: Arithmetic & logical. @@ -9816,144 +9845,144 @@ Index Tag Table: Node: Top575 -Node: Description6834 -Node: Installation10450 -Node: UNIX binary distributions11503 -Node: MacOS X binary distributions12609 -Node: Microsoft Windows13493 -Ref: psview14203 -Node: Configuring15137 -Node: Search paths19351 -Node: Compiling from UNIX source20193 -Node: Editing modes23051 -Node: Subversion25483 -Node: Uninstall25946 -Node: Tutorial26296 -Ref: unitcircle30594 -Node: Drawing commands32530 -Node: draw34241 -Ref: arrows35389 -Node: fill40632 -Ref: gradient shading41676 -Node: clip46231 -Node: label46823 -Ref: Label47421 -Node: Bezier curves53224 -Node: Programming56926 -Ref: array iteration57740 -Node: Data types58821 -Ref: format68018 -Node: Paths and guides72271 -Ref: circle72525 -Ref: extension81945 -Node: Pens88628 -Ref: fillrule95996 -Ref: basealign96893 -Ref: transparency99719 -Ref: makepen103162 -Ref: overwrite104000 -Node: Transforms105210 -Node: Frames and pictures107001 -Ref: envelope108142 -Ref: size109225 -Ref: unitsize110212 -Ref: shipout111272 -Ref: filltype113605 -Ref: add116742 -Ref: add about117688 -Ref: tex120626 -Node: Files121500 -Ref: cd122483 -Ref: scroll127157 -Node: Variable initializers130072 -Node: Structures132797 -Node: Operators140241 -Node: Arithmetic & logical140555 -Node: Self & prefix operators142528 -Node: User-defined operators143316 -Node: Implicit scaling144227 -Node: Functions144790 -Ref: stack overflow147543 -Node: Default arguments148107 -Node: Named arguments148846 -Node: Rest arguments151417 -Node: Mathematical functions154538 -Node: Arrays159203 -Ref: sort166192 -Ref: tridiagonal168596 -Ref: solve169824 -Node: Slices174017 -Node: Casts177907 -Node: Import179872 -Node: Static185109 -Node: LaTeX usage188003 -Node: Base modules194415 -Node: plain196915 -Node: simplex197567 -Node: math197840 -Node: interpolate200545 -Node: geometry200824 -Node: trembling201418 -Node: stats201687 -Node: patterns201947 -Node: markers202183 -Node: tree203966 -Node: binarytree204154 -Node: drawtree204774 -Node: syzygy204978 -Node: feynman205252 -Node: roundedpath205527 -Node: animation205810 -Ref: animate206230 -Node: embed207369 -Node: slide208396 -Node: MetaPost208736 -Node: unicode209452 -Node: latin1210340 -Node: babel210708 -Node: labelpath210937 -Node: labelpath3211757 -Node: annotate212068 -Node: CAD212539 -Node: graph212849 -Ref: ticks219978 -Ref: pathmarkers233305 -Ref: marker233770 -Ref: markuniform234121 -Ref: errorbars235912 -Ref: automatic scaling239949 -Node: palette250578 -Ref: images250696 -Ref: image254868 -Ref: logimage255346 -Ref: penimage256407 -Ref: penfunctionimage256628 -Node: three257352 -Ref: PostScript3D282920 -Node: obj284612 -Node: graph3284864 -Ref: GaussianSurface290019 -Node: grid3291123 -Node: solids291863 -Node: tube292811 -Node: flowchart295046 -Node: contour299615 -Node: contour3304705 -Node: slopefield305012 -Node: ode306449 -Node: Options306709 -Ref: configuration file312754 -Ref: settings312754 -Ref: convert313955 -Node: Interactive mode316922 -Ref: history319075 -Node: GUI320380 -Node: GUI installation320883 -Node: GUI usage322013 -Node: PostScript to Asymptote322916 -Node: Help323672 -Node: Debugger325408 -Node: Credits327193 -Node: Index328125 +Node: Description6859 +Node: Installation10475 +Node: UNIX binary distributions11519 +Node: MacOS X binary distributions12625 +Node: Microsoft Windows13509 +Ref: psview14219 +Node: Configuring15153 +Node: Search paths19373 +Node: Compiling from UNIX source20215 +Node: Editing modes23112 +Node: Subversion25544 +Node: Uninstall25992 +Node: Tutorial26342 +Ref: unitcircle30640 +Node: Drawing commands32696 +Node: draw34407 +Ref: arrows35555 +Node: fill40798 +Ref: gradient shading41842 +Node: clip46399 +Node: label46991 +Ref: Label47589 +Node: Bezier curves53392 +Node: Programming57094 +Ref: array iteration57908 +Node: Data types59014 +Ref: format68211 +Node: Paths and guides72464 +Ref: circle72718 +Ref: extension82276 +Node: Pens89331 +Ref: fillrule96699 +Ref: basealign97596 +Ref: transparency100422 +Ref: makepen103865 +Ref: overwrite104703 +Node: Transforms105913 +Node: Frames and pictures107704 +Ref: envelope108845 +Ref: size109928 +Ref: unitsize110915 +Ref: shipout111975 +Ref: filltype114308 +Ref: add117445 +Ref: add about118391 +Ref: tex121329 +Node: Files122203 +Ref: cd123186 +Ref: scroll127860 +Node: Variable initializers130775 +Node: Structures133500 +Node: Operators140902 +Node: Arithmetic & logical141216 +Node: Self & prefix operators143189 +Node: User-defined operators143977 +Node: Implicit scaling144888 +Node: Functions145451 +Ref: stack overflow148204 +Node: Default arguments148768 +Node: Named arguments149507 +Node: Rest arguments152078 +Node: Mathematical functions155199 +Node: Arrays159864 +Ref: sort166853 +Ref: tridiagonal169257 +Ref: solve170485 +Node: Slices174679 +Node: Casts178569 +Node: Import180534 +Node: Static185771 +Node: LaTeX usage188665 +Node: Base modules195077 +Node: plain197577 +Node: simplex198229 +Node: math198502 +Node: interpolate201207 +Node: geometry201486 +Node: trembling202080 +Node: stats202349 +Node: patterns202609 +Node: markers202845 +Node: tree204628 +Node: binarytree204816 +Node: drawtree205436 +Node: syzygy205640 +Node: feynman205914 +Node: roundedpath206189 +Node: animation206472 +Ref: animate206892 +Node: embed208031 +Node: slide208998 +Node: MetaPost209338 +Node: unicode210054 +Node: latin1210942 +Node: babel211310 +Node: labelpath211539 +Node: labelpath3212359 +Node: annotate212670 +Node: CAD213141 +Node: graph213451 +Ref: ticks220580 +Ref: pathmarkers233907 +Ref: marker234372 +Ref: markuniform234723 +Ref: errorbars236514 +Ref: automatic scaling240551 +Node: palette251180 +Ref: images251298 +Ref: image255470 +Ref: logimage255948 +Ref: penimage257009 +Ref: penfunctionimage257230 +Node: three257954 +Ref: PostScript3D283633 +Node: obj285325 +Node: graph3285577 +Ref: GaussianSurface290732 +Node: grid3291836 +Node: solids292576 +Node: tube293524 +Node: flowchart295759 +Node: contour300328 +Node: contour3305418 +Node: slopefield305725 +Node: ode307162 +Node: Options307422 +Ref: configuration file313467 +Ref: settings313467 +Ref: convert314706 +Node: Interactive mode317853 +Ref: history320006 +Node: GUI321311 +Node: GUI installation321814 +Node: GUI usage322944 +Node: PostScript to Asymptote323847 +Node: Help324603 +Node: Debugger326330 +Node: Credits328115 +Node: Index329047 End Tag Table diff --git a/Master/tlpkg/asymptote/asy.exe b/Master/tlpkg/asymptote/asy.exe Binary files differindex 8c9cc0fd1c8..efcbaea5d42 100755 --- a/Master/tlpkg/asymptote/asy.exe +++ b/Master/tlpkg/asymptote/asy.exe diff --git a/Master/tlpkg/bin/tl-update-bindir b/Master/tlpkg/bin/tl-update-bindir index 48a55eac659..40bb5624e9d 100755 --- a/Master/tlpkg/bin/tl-update-bindir +++ b/Master/tlpkg/bin/tl-update-bindir @@ -124,13 +124,13 @@ for tlname in $tlnames; do download_loc=$tmpdir/tl.$tlname.tar.xz default_bin_loc=$download_loc grab="$download -O $download_loc" - $grab http://getthingsfixed.co.uk/texlive/build_1304/texlive-armhf.tar.gz;; + $grab http://getthingsfixed.co.uk/texlive/builds/2014/texlive-armhf.tar.gz;; hppa-hpux) default_bin_loc=$download_loc $grab http://www.jtartlabs.com/test/hppa2.0-hp-hpux10.20.tar.gz;; i386-cygwin) default_bin_loc=$download_loc - $grab http://www.math.cornell.edu/~kbrown/cygwin.tgz;; + $grab http://sanibeltranquility.com/cygwin/i386-cygwin.tgz;; i386-freebsd) download_loc=$tmpdir/tl.$tlname.tar.xz default_bin_loc=$download_loc @@ -181,6 +181,9 @@ for tlname in $tlnames; do win32) default_bin_loc=$tmpdir/tl.$tlname.zip $grab http://members2.jcom.home.ne.jp/wt1357ak/tl2009w32-02.zip;; + x86_64-cygwin) + default_bin_loc=$download_loc + $grab http://sanibeltranquility.com/cygwin/x86_64-cygwin.tgz;; x86_64-darwin) #download_loc=$tmpdir/tl.$tlname.tar.xz #default_bin_loc=$download_loc |