diff options
author | Karl Berry <karl@freefriends.org> | 2019-11-30 22:13:04 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-11-30 22:13:04 +0000 |
commit | de45b90176111268a096517bd4012cee1ef5cabe (patch) | |
tree | 26962ed5f9172222aff272e334e261c28a8da54e /Master/texmf-dist/tex/latex | |
parent | 3ab1735000843dbb21b8791fc3f86268353ea0df (diff) |
curve2e (30nov19)
git-svn-id: svn://tug.org/texlive/trunk@52978 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/curve2e/curve2e.sty | 355 |
1 files changed, 198 insertions, 157 deletions
diff --git a/Master/texmf-dist/tex/latex/curve2e/curve2e.sty b/Master/texmf-dist/tex/latex/curve2e/curve2e.sty index b70ff1e17d9..7de00b83a0c 100644 --- a/Master/texmf-dist/tex/latex/curve2e/curve2e.sty +++ b/Master/texmf-dist/tex/latex/curve2e/curve2e.sty @@ -9,17 +9,17 @@ %% Copyright (C) 2005--2019 Claudio Beccari all rights reserved. %% License information appended %% -\NeedsTeXFormat{LaTeX2e}[2016/01/01] +\NeedsTeXFormat{LaTeX2e}[2019/01/01] \ProvidesPackage{curve2e}% - [2019-10-21 v.2.0.4 Extension package for pict2e] + [2019-11-30 v.2.0.6 Extension package for pict2e] \IfFileExists{xfp.sty}{% - \RequirePackage{color} - \RequirePackageWithOptions{pict2e}[2014/01/01] - \@ifl@aded{sty}{xparse}{}{\RequirePackage{xparse}} - \@ifl@aded{sty}{xfp}{}{\RequirePackage{xfp}}% + \RequirePackage{color} + \RequirePackageWithOptions{pict2e}[2014/01/01] + \@ifl@aded{sty}{xparse}{}{\RequirePackage{xparse}} + \@ifl@aded{sty}{xfp}{}{\RequirePackage{xfp}}% }{% \RequirePackage{curve2e-v161}% \PackageWarningNoLine{curve2e}{% @@ -35,6 +35,12 @@ ***************************************\MessageBreak}% \endinput } +\AtBeginDocument{\@ifpackageloaded{xfp}{% +\ExplSyntaxOn +\ProvideExpandableDocumentCommand\fptest{m}{\fp_compare:nTF{#1}} +\ProvideExpandableDocumentCommand\fpdowhile{m m}{\fp_do_while:nn{#1}{#2}} +\ExplSyntaxOff +}{}} \def\TRON{\tracingcommands\tw@ \tracingmacros\tw@}% \def\TROF{\tracingcommands\z@ \tracingmacros\z@}% \ifx\undefined\@tdA \newdimen\@tdA \fi @@ -64,92 +70,147 @@ \edef\sc@lelen{\fpeval{1 / abs(\d@mX)}}\relax \@linelen=\sc@lelen\@linelen \fi - \moveto(0,0) - \pIIe@lineto{\d@mX\@linelen}{\d@mY\@linelen}% + \moveto(0,0)\pIIe@lineto{\d@mX\@linelen}{\d@mY\@linelen}% \strokepath \fi \endgroup\ignorespaces}% +\let\originalmoveto\moveto +\let\originallineto\lineto +\let\originalcurveto\curveto + +\def\moveto(#1){\GetCoord(#1)\MTx\MTy + \originalmoveto(\MTx,\MTy)\ignorespaces} +\def\lineto(#1){\GetCoord(#1)\LTx\LTy + \originallineto(\LTx,\LTy)\ignorespaces} +\def\curveto(#1)(#2)(#3){\GetCoord(#1)\CTpx\CTpy + \GetCoord(#2)\CTsx\CTsy\GetCoord(#3)\CTx\CTy + \originalcurveto(\CTpx,\CTpy)(\CTsx,\CTsy)(\CTx,\CTy)\ignorespaces} + +\def\IsPolar#1:#2?{\def\@TempOne{#2}\unless\ifx\@TempOne\empty + \expandafter\@firstoftwo\else + \expandafter\@secondoftwo\fi} + \ifx\Dashline\undefined - \def\Dashline{\@ifstar{\Dashline@@}{\Dashline@}} + \def\Dashline{\@ifstar{\Dashline@}{\Dashline@}}% bckwd compatibility + \let\Dline\Dashline - \def\Dashline@(#1)(#2)#3{% - \bgroup - \countdef\NumA3254\countdef\NumB3252\relax - \GetCoord(#1)\@tA\@tB \MakeVectorFrom\@tA\@tB to\V@ttA - \GetCoord(#2)\@tA\@tB \MakeVectorFrom\@tA\@tB to\V@ttB + \def\Dashline@(#1)(#2)#3{\put(#1){% + \GetCoord(#1)\@tA\@tB \MakeVectorFrom\@tA\@tB to\V@ttA + \GetCoord(#2)\@tA\@tB \MakeVectorFrom\@tA\@tB to\V@ttB + \IsPolar#2:?{% Polar + \Dashline@@(0,0)(\V@ttB){#3}}% + {% Cartesian \SubVect\V@ttA from\V@ttB to\V@ttC - \ModOfVect\V@ttC to\DlineMod - \DivideFN\DlineMod by#3 to\NumD - \NumA=\fpeval{trunc(\NumD,0)}\relax - \unless\ifodd\NumA\advance\NumA\@ne\fi - \NumB=\NumA \divide\NumB\tw@ - \DividE\DlineMod\p@ by\NumA\p@ to\D@shMod - \DividE\p@ by\NumA\p@ to \@tempa - \MultVect\V@ttC by\@tempa,0 to\V@ttB - \MultVect\V@ttB by 2,0 to\V@ttC - \advance\NumB\@ne - \edef\@mpt{\noexpand\egroup - \noexpand\multiput(\V@ttA)(\V@ttC){\number\NumB}% - {\noexpand\LIne(\V@ttB)}}% - \@mpt\ignorespaces}% - \let\Dline\Dashline + \Dashline@@(0,0)(\V@ttC){#3}% + } +}} - \def\Dashline@@(#1)(#2)#3{\put(#1){\Dashline@(0,0)(#2){#3}}} + \def\Dashline@@(#1)(#2)#3{% + \countdef\NumA3254\countdef\NumB3252\relax + \GetCoord(#1)\@tA\@tB \MakeVectorFrom\@tA\@tB to\V@ttA + \GetCoord(#2)\@tA\@tB \MakeVectorFrom\@tA\@tB to\V@ttB + \SubVect\V@ttA from\V@ttB to\V@ttC + \ModOfVect\V@ttC to\DlineMod + \DivideFN\DlineMod by#3 to\NumD + \NumA=\fpeval{trunc(\NumD,0)}\relax + \unless\ifodd\NumA\advance\NumA\@ne\fi + \NumB=\NumA \divide\NumB\tw@ + \DividE\DlineMod\p@ by\NumA\p@ to\D@shMod + \DividE\p@ by\NumA\p@ to \@tempa + \Multvect{\V@ttC}{\@tempa,0}\V@ttB + \Multvect{\V@ttB}{2,0}\V@ttC + \advance\NumB\@ne + \put(\V@ttA){\multiput(0,0)(\V@ttC){\NumB}{\LIne(\V@ttB)}} + \ignorespaces} \fi \ifx\Dotline\undefined - \def\Dotline{\@ifstar{\Dotline@@}{\Dotline@}} - \def\Dotline@(#1)(#2)#3{% - \bgroup - \countdef\NumA 3254\relax \countdef\NumB 3255\relax - \GetCoord(#1)\@tA\@tB \MakeVectorFrom\@tA\@tB to\V@ttA - \GetCoord(#2)\@tA\@tB \MakeVectorFrom\@tA\@tB to\V@ttB - \SubVect\V@ttA from\V@ttB to\V@ttC - \ModOfVect\V@ttC to\DotlineMod - \DivideFN\DotlineMod by#3 to\NumD - \NumA=\fpeval{trunc(\NumD,0)}\relax - \DivVect\V@ttC by\NumA,0 to\V@ttB - \advance\NumA\@ne - \edef\@mpt{\noexpand\egroup - \noexpand\multiput(\V@ttA)(\V@ttB){\number\NumA}% - {\noexpand\makebox(0,0){\noexpand\circle*{0.5}}}}% - \@mpt\ignorespaces}% + \def\Dotline{\@ifstar{\Dotline@}{\Dotline@}}% backwards compatibility + \def\Dotline@(#1)(#2)#3{\put(#1){% + \IsPolar#2:?{% Polar + \Dotline@@(0,0)(#2){#3}} + {% Cartesian + \CopyVect#1to\V@ttA + \CopyVect#2to\V@ttB + \SubVect\V@ttA from\V@ttB to\V@ttC + \Dotline@@(0,0)(\V@ttC){#3}}% + }} - \def\Dotline@@(#1)(#2)#3{\put(#1){\Dotline@(0,0)(#2){#3}}}% + \def\Dotline@@(#1)(#2)#3{% + \countdef\NumA 3254\relax + \countdef\NumB 3255\relax + \CopyVect#1to\V@ttA + \CopyVect#2to\V@ttB + \SubVect\V@ttA from\V@ttB to\V@ttC + \ModOfVect\V@ttC to\DotlineMod + \DivideFN\DotlineMod by#3 to\NumD + \NumA=\fpeval{trunc(\NumD,0)}\relax + \Divvect{\V@ttC}{\NumA,0}\V@ttB + \advance\NumA\@ne + \put(\V@ttA){\multiput(0,0)(\V@ttB){\NumA}{\makebox(0,0)% + {\circle*{0.5}}}} + \ignorespaces + }% \fi \AtBeginDocument{\@ifpackageloaded{eso-pic}{% \renewcommand\LenToUnit[1]{\strip@pt\dimexpr#1*\p@/\unitlength}}{}}% -\def\GetCoord(#1)#2#3{% -\expandafter\SplitNod@\expandafter(#1)#2#3\ignorespaces} -\def\SplitNod@(#1)#2#3{\isnot@polar#1:!!(#1)#2#3}% -\def\isnot@polar#1:#2!!{\def\@tempOne{#2}\ifx\@tempOne\empty -\expandafter\@firstoftwo\else -\expandafter\@secondoftwo\fi -{\SplitNod@@}{\SplitPolar@@}} +\def\GetCoord(#1)#2#3{\bgroup\edef\x{\egroup\noexpand\IsPolar#1:?}\x +{% Polar + \bgroup\edef\x{\egroup\noexpand\SplitPolar(#1)}\x\SCt@X\SCt@Y}% +{% Cartesian + \bgroup\edef\x{\egroup\noexpand\SplitCartesian(#1)}\x\SCt@X\SCt@Y}% + \edef#2{\SCt@X}\edef#3{\SCt@Y}\ignorespaces} + +\def\SplitPolar(#1:#2)#3#4{% + \edef#3{\fpeval{#2 * cosd#1}}\edef#4{\fpeval{#2 * sind#1}}} + +\def\SplitCartesian(#1,#2)#3#4{\edef#3{#1}\edef#4{#2}} -\def\SplitNod@@(#1,#2)#3#4{\edef#3{#1}\edef#4{#2}}% -\def\SplitPolar@@(#1:#2)#3#4{\DirFromAngle#1to\@DirA -\ScaleVect\@DirA by#2to\@DirA -\expandafter\SplitNod@@\expandafter(\@DirA)#3#4} \let\originalput\put \def\put(#1){\bgroup\GetCoord(#1)\@tX\@tY \edef\x{\noexpand\egroup\noexpand\originalput(\@tX,\@tY)}\x} -\RenewDocumentCommand{\multiput}{ d() d() m m o }{% -\IfNoValueTF{#1}{\PackageError{curve2e}{% - \string\multiput\space initial point coordinates missing}% - {Nothing done}}% - {\IfNoValueTF{#2}{\PackageError{curve2e}{% - \string\multiput\space Increment components missing}% - {Nothing done}% - }% - {\GetCoord(#2)\dX\dY - \put(#1){\def\X{0}\def\Y{0}\@multicnt=#3\relax - \@whilenum \@multicnt > \z@\do{% - \put(\X,\Y){#4}\IfValueTF{#5}{#5}{% - \edef\X{\fpeval{\X+\dX}}\edef\Y{\fpeval{\Y+\dY}}}% +\RenewDocumentCommand{\multiput}{O{0,0} d() d() m m o }{% + \IfNoValueTF{#2}{\PackageError{curve2e}% + {\string\multiput\space initial point coordinates missing}% + {Nothing done} + }% + {\IfNoValueTF{#3}{\PackageError{curve2e} + {\string\multiput\space Increment components missing}% + {Nothing done} + } + {\put(#1){\let\c@multicnt\@multicnt + \CopyVect #2 to \R + \CopyVect#3 to\D + \@multicnt=#4\relax + \@whilenum \@multicnt > \z@\do{% + \put(\R){#5}% + \IfValueTF{#6}{#6}{\AddVect#3 and\R to \R}% \advance\@multicnt\m@ne - }% - }} - }% + } + } + } + }\ignorespaces +} +\NewDocumentCommand{\xmultiput}{O{0,0} d() d() m m o }{% +\IfNoValueTF{#2}{\PackageError{curve2e}{% + \string\Xmultiput\space initial point coordinates missing}% + {Nothing done}}% + {\IfNoValueTF{#3}{\PackageError{curve2e}{% + \string\Xmultiput\space Increment components missing}% + {Nothing done}}% + {\put(#1)% + {\let\c@multicnt\@multicnt + \CopyVect #2 to \R + \CopyVect #3 to \D + \@multicnt=\@ne + \fpdowhile{\value{multicnt} < \inteval{#4+1}}% Test + {% + \put(\R){#5} + \IfValueTF{#6}{#6}{% + \AddVect#3 and\R to \R} + \advance\@multicnt\@ne + } + } + }}\ignorespaces } \def\vector(#1)#2{% \begingroup @@ -246,62 +307,30 @@ \advance\@tempcnta-\count252\fi\edef#3{\number\@tempcnta}\ignorespaces}% \def\Integer#1.#2??{#1}% -\def\DividE#1by#2to#3{% - \edef#3{\fpeval{#1 / #2}}\relax -} +\def\DividE#1by#2to#3{\edef#3{\fpeval{#1 / #2}}} \let\DivideFN\DividE \def\MultiplY#1by#2to#3{\edef#3{\fpeval{#1 * #2}}}\relax \let\MultiplyFN\MultiplY \unless\ifdefined\Numero - \def\Numero#1#2{\bgroup\dimen3254=#2\relax - \edef\x{\noexpand\egroup\noexpand\edef\noexpand#1{% - \strip@pt\dimen3254}}\x\ignorespaces}% + \def\Numero#1#2{\edef#1{\fpeval{round(#2,6)}}\ignorespaces}% \fi \def\SinOf#1to#2{\edef#2{\fpeval{round(sind#1,6)}}}\relax \def\CosOf#1to#2{\edef#2{\fpeval{round(cosd#1,6)}}}\relax -\def\ArgOfVect#1to#2{\bgroup\GetCoord(#1){\t@X}{\t@Y}% -\def\s@gno{}% -\ifdim\t@X\p@=\z@ - \ifdim\t@Y\p@=\z@ - \def\ArcTan{0}% vettore nullo - \else - \def\ArcTan{90}% vettore verticale - \ifdim\t@Y\p@<\z@\def\ArcTan{-90}\fi - \fi -\else - \ifdim\t@Y\p@=\z@% vettore orizzontale - \ifdim\t@X\p@<\z@ - \def\ArcTan{180}% - \else - \def\ArcTan{0}% - \fi - \else % vettore qualsiasi - \edef\ArcTan{\fpeval{atand(\t@Y / \t@X)}}\relax - \ifdim\t@X\p@<\z@% vettore nei quadranti di sinistra - \ifdim\t@Y\p@<\z@ - \edef\ArcTan{\fpeval{\ArcTan - 180}}\relax - \else - \edef\ArcTan{\fpeval{\ArcTan + 180}}\relax - \fi - \fi - \fi -\fi -\edef\x{\noexpand\egroup\noexpand\edef\noexpand#2{\ArcTan}}% -\x\ignorespaces} +\def\ArgOfVect#1to#2{\GetCoord(#1){\t@X}{\t@Y}% +\fptest{\t@X=\z@ && \t@Y=\z@}{\edef#2{0}}{% +\edef#2{\fpeval{round(atand(\t@Y,\t@X),6)}}}\ignorespaces} \def\MakeVectorFrom#1#2to#3{\edef#3{#1,#2}\ignorespaces}% \def\CopyVect#1to#2{\edef#2{#1}\ignorespaces}% \def\ModOfVect#1to#2{\GetCoord(#1)\t@X\t@Y -\edef#2{\fpeval{sqrt(\t@X*\t@X + \t@Y*\t@Y)}}\relax +\edef#2{\fpeval{round(sqrt(\t@X*\t@X + \t@Y*\t@Y),6)}}% \ignorespaces}% \def\DirOfVect#1to#2{\GetCoord(#1)\t@X\t@Y \ModOfVect#1to\@tempa -\unless\ifdim\@tempa\p@=\z@ - \DividE\t@X by\@tempa to\t@X - \DividE\t@Y by\@tempa to\t@Y -\fi -\MakeVectorFrom\t@X\t@Y to#2\ignorespaces}% +\fptest{\@tempa=\z@}{}{% + \edef\t@X{\fpeval{round(\t@X/\@tempa,6)}}% + \edef\t@Y{\fpeval{round(\t@Y/\@tempa,6)}}% +}\MakeVectorFrom\t@X\t@Y to#2\ignorespaces}% \def\ModAndDirOfVect#1to#2and#3{% -\GetCoord(#1)\t@X\t@Y \ModOfVect#1to#2% \DirOfVect#1to#3\ignorespaces}% \def\DistanceAndDirOfVect#1minus#2to#3and#4{% @@ -312,42 +341,54 @@ \def\YpartOfVect#1to#2{% \GetCoord(#1)\@tempa#2\ignorespaces}% \def\DirFromAngle#1to#2{% -\CosOf#1to\t@X -\SinOf#1to\t@Y +\edef\t@X{\fpeval{round(cosd#1,6)}}% +\edef\t@Y{\fpeval{round(sind#1,6)}}% \MakeVectorFrom\t@X\t@Y to#2\ignorespaces}% \def\ScaleVect#1by#2to#3{\GetCoord(#1)\t@X\t@Y -\edef\t@X{\fpeval{#2 * \t@X}}\relax -\edef\t@Y{\fpeval{#2 * \t@Y}}\relax +\edef\t@X{\fpeval{#2 * \t@X}}% +\edef\t@Y{\fpeval{#2 * \t@Y}}% \MakeVectorFrom\t@X\t@Y to#3\ignorespaces}% \def\ConjVect#1to#2{\GetCoord(#1)\t@X\t@Y \edef\t@Y{-\t@Y}% \MakeVectorFrom\t@X\t@Y to#2\ignorespaces}% \def\AddVect#1and#2to#3{\GetCoord(#1)\tu@X\tu@Y \GetCoord(#2)\td@X\td@Y -\edef\t@X{\fpeval{\tu@X + \td@X}}\relax -\edef\t@Y{\fpeval{\tu@Y + \td@Y}}\relax +\edef\t@X{\fpeval{\tu@X + \td@X}}% +\edef\t@Y{\fpeval{\tu@Y + \td@Y}}% \MakeVectorFrom\t@X\t@Y to#3\ignorespaces}% \def\SubVect#1from#2to#3{\GetCoord(#1)\tu@X\tu@Y \GetCoord(#2)\td@X\td@Y -\edef\t@X{\fpeval{\td@X - \tu@X}}\relax -\edef\t@Y{\fpeval{\td@Y - \tu@Y}}\relax -\MakeVectorFrom\t@X\t@Y to#3\ignorespaces}% -\def\MultVect#1by{\@ifstar{\@ConjMultVect#1by}{\@MultVect#1by}}% -\def\@MultVect#1by#2to#3{\GetCoord(#1)\tu@X\tu@Y -\GetCoord(#2)\td@X\td@Y -\edef\t@X{\fpeval{\tu@X * \td@X - \tu@Y * \td@Y}}\relax -\edef\t@Y{\fpeval{\tu@Y * \td@X + \tu@X * \td@Y}}\relax +\edef\t@X{\fpeval{\td@X - \tu@X}}% +\edef\t@Y{\fpeval{\td@Y - \tu@Y}}% \MakeVectorFrom\t@X\t@Y to#3\ignorespaces}% -\def\@ConjMultVect#1by#2to#3{\GetCoord(#1)\tu@X\tu@Y -\GetCoord(#2)\td@X\td@Y -\edef\t@X{\fpeval{\tu@X * \td@X + \tu@Y * \td@Y}}\relax -\edef\t@Y{\fpeval{\tu@Y * \td@X - \tu@X * \td@Y}}\relax -\MakeVectorFrom\t@X\t@Y to#3\ignorespaces} -\def\DivVect#1by#2to#3{\ModAndDirOfVect#2to\@Mod and\@Dir -\edef\@Mod{\fpeval{1 / \@Mod}}\relax +\def\ModAndAngleOfVect#1to#2and#3{\ModOfVect#1to#2\relax +\ArgOfVect#1to#3\ignorespaces} +\countdef\MV@C=2560\relax +\NewDocumentCommand\Multvect{m s m s m}{% +\MV@C=0 +\ModAndAngleOfVect#1to\MV@uM and\MV@uA +\ModAndAngleOfVect#3to\MV@dM and\MV@dA +\IfBooleanT{#2}{\MV@C=1}\relax +\IfBooleanT{#4}{\MV@C=1}\relax +\unless\ifnum\MV@C=0\edef\MV@dA{-\MV@dA}\fi +\edef\MV@rM{\fpeval{round((\MV@uM * \MV@dM),6)}}% +\edef\MV@rA{\fpeval{round((\MV@uA + \MV@dA),6)}}% +\GetCoord(\MV@rA:\MV@rM)\t@X\t@Y +\MakeVectorFrom\t@X\t@Y to#5} +\def\MultVect#1by{\@ifstar{\let\MV@c\@ne\@MultVect#1by}% + {\let\MV@c\empty\@MultVect#1by}} + +\def\@MultVect#1by#2to#3{% + \unless\ifx\MV@c\empty\Multvect{#1}{#2}*{#3}\else + \Multvect{#1}{#2}{#3}\fi} +\def\DivVect#1by#2to#3{\Divvect{#1}{#2}{#3}} + +\NewDocumentCommand\Divvect{ m m m }{% +\ModAndDirOfVect#2to\@Mod and\@Dir +\edef\@Mod{\fpeval{1 / \@Mod}}% \ConjVect\@Dir to\@Dir \ScaleVect#1by\@Mod to\@tempa -\MultVect\@tempa by\@Dir to#3\ignorespaces}% +\Multvect{\@tempa}{\@Dir}#3\ignorespaces}% \def\Arc(#1)(#2)#3{\begingroup \@tdA=#3\p@ \unless\ifdim\@tdA=\z@ @@ -378,7 +419,7 @@ \Numero\@gradi\@tdA \SubVect\@pPun from\@Cent to\@V \AddVect\@V and\@Cent to\@sPun - \MultVect\@V by0,-1.3333333to\@V + \Multvect{\@V}{0,-1.3333333to}\@V \if\Segno-\ScaleVect\@V by-1to\@V\fi \AddVect\@pPun and\@V to\@pcPun \AddVect\@sPun and\@V to\@scPun @@ -393,7 +434,7 @@ \ifdim\@tdA>\z@ \DirFromAngle\@gradi to\@Dir \if\Segno-\ConjVect\@Dir to\@Dir \fi \SubVect\@Cent from\@pPun to\@V - \MultVect\@V by\@Dir to\@V + \Multvect{\@V}{\@Dir}\@V \AddVect\@Cent and\@V to\@sPun \@tdA=.5\@tdA \Numero\@gradi\@tdA \DirFromAngle\@gradi to\@Phimezzi @@ -411,10 +452,10 @@ \fi \SubVect\@sPun from\@pPun to\@V \DirOfVect\@V to\@V - \MultVect\@Phimezzi by\@V to\@Phimezzi + \Multvect{\@Phimezzi}{\@V}\@Phimezzi \AddVect\@sPun and\@Phimezzi to\@scPun \ScaleVect\@V by-1to\@V - \MultVect\@mPhimezzi by\@V to\@mPhimezzi + \Multvect{\@mPhimezzi}{\@V}\@mPhimezzi \AddVect\@pPun and\@mPhimezzi to\@pcPun \GetCoord(\@pcPun)\@pcPunX\@pcPunY \GetCoord(\@scPun)\@scPunX\@scPunY @@ -453,16 +494,16 @@ \@tdD=57.29578\@tdD \Numero\DeltaGradi\@tdD \@tdD=\ifx\Segno--\fi\@gradi\p@ \Numero\@tempa\@tdD \DirFromAngle\@tempa to\@Dir -\MultVect\@V by\@Dir to\@sPun +\Multvect{\@V}{\@Dir}\@sPun \edef\@tempA{\ifx\Segno-\m@ne\else\@ne\fi}% -\MultVect\@sPun by 0,\@tempA to\@vPun +\Multvect{\@sPun}{0,\@tempA}\@vPun \DirOfVect\@vPun to\@Dir \AddVect\@sPun and #1 to \@sPun \GetCoord(\@sPun)\@tdX\@tdY \@tdD\ifx\Segno--\fi\DeltaGradi\p@ \@tdD=.5\@tdD \Numero\DeltaGradi\@tdD \DirFromAngle\DeltaGradi to\@Dird -\MultVect\@Dir by*\@Dird to\@Dir +\Multvect{\@Dir}*{\@Dird}\@Dir% \GetCoord(\@Dir)\@xnum\@ynum \put(\@tdX,\@tdY){\vector(\@xnum,\@ynum){0}}% \@tdE =\ifx\Segno--\fi\DeltaGradi\p@ @@ -488,34 +529,34 @@ \@tdD=\DeltaGradi\p@ \@tdD=57.29578\@tdD \Numero\DeltaGradi\@tdD \@tdD=\if\Segno--\fi\@gradi\p@ \Numero\@tempa\@tdD \DirFromAngle\@tempa to\@Dir -\MultVect\@V by\@Dir to\@sPun% corrects the end point +\Multvect{\@V}{\@Dir}\@sPun% corrects the end point \edef\@tempA{\if\Segno--\fi1}% -\MultVect\@sPun by 0,\@tempA to\@vPun +\Multvect{\@sPun}{0,\@tempA}\@vPun \DirOfVect\@vPun to\@Dir \AddVect\@sPun and #1 to \@sPun \GetCoord(\@sPun)\@tdX\@tdY \@tdD\if\Segno--\fi\DeltaGradi\p@ \@tdD=.5\@tdD \Numero\@tempB\@tdD \DirFromAngle\@tempB to\@Dird -\MultVect\@Dir by*\@Dird to\@Dir +\Multvect{\@Dir}*{\@Dird}\@Dir \GetCoord(\@Dir)\@xnum\@ynum -\put(\@tdX,\@tdY){\vector(\@xnum,\@ynum){0}}% end point arrowt ip +\put(\@tdX,\@tdY){\vector(\@xnum,\@ynum){0}}% end point arrow tip \@tdE =\DeltaGradi\p@ \advance\@tdA -2\@tdE \Numero\@gradi\@tdA \CopyVect#1to\@Cent \GetCoord(\@pPun)\@pPunX\@pPunY \SubVect\@Cent from\@pPun to \@V \edef\@tempa{\if\Segno-\else-\fi\@ne}% -\MultVect\@V by0,\@tempa to\@vPun +\Multvect{\@V}{0,\@tempa}\@vPun \@tdE\if\Segno--\fi\DeltaGradi\p@ \Numero\@tempB{0.5\@tdE}% \DirFromAngle\@tempB to\@Dird -\MultVect\@vPun by\@Dird to\@vPun% corrects the starting point +\Multvect{\@vPun}{\@Dird}\@vPun% corrects the starting point \DirOfVect\@vPun to\@Dir\GetCoord(\@Dir)\@xnum\@ynum \put(\@pPunX,\@pPunY){\vector(\@xnum,\@ynum){0}}% starting point arrow tip \edef\@tempa{\if\Segno--\fi\DeltaGradi}% \DirFromAngle\@tempa to \@Dir \SubVect\@Cent from\@pPun to\@V -\MultVect\@V by\@Dir to\@V +\Multvect{\@V}{\@Dir}\@V \AddVect\@Cent and\@V to\@pPun \GetCoord(\@pPun)\@pPunX\@pPunY \@@Arc @@ -570,8 +611,8 @@ \expandafter\DirOfVect\@tempA to\@Duno \bgroup\unless\ifx\@tempB\empty\GetCoord(\@tempB)\@Tzero\@Tuno\fi \DistanceAndDirOfVect\@Puno minus\@Pzero to\@Chord and\@DirChord -\MultVect\@Dzero by*\@DirChord to \@Dpzero -\MultVect\@Duno by*\@DirChord to \@Dpuno +\Multvect{\@Dzero}*{\@DirChord}\@Dpzero +\Multvect{\@Duno}*{\@DirChord}\@Dpuno \GetCoord(\@Dpzero)\@DXpzero\@DYpzero \GetCoord(\@Dpuno)\@DXpuno\@DYpuno \DivideFN\@Chord by2 to\@semichord @@ -659,7 +700,7 @@ \def\QurveTo#1WithDir#2{% \edef\@Puno{#1}\DirOfVect#2to\@Duno\bgroup \DistanceAndDirOfVect\@Puno minus\@Pzero to\@Chord and\@DirChord -\MultVect\@Dzero by*\@Duno to \@Scalar +\Multvect{\@Dzero}*{\@Duno}\@Scalar \YpartOfVect\@Scalar to \@YScalar \ifdim\@YScalar\p@=\z@ \PackageWarning{curve2e}% @@ -669,8 +710,8 @@ a dotted line.\MessageBreak}% \Dotline(\@Pzero)(\@Puno){2}\relax \else -\MultVect\@Dzero by*\@DirChord to \@Dpzero -\MultVect\@Duno by*\@DirChord to \@Dpuno +\Multvect{\@Dzero}*{\@DirChord}\@Dpzero +\Multvect{\@Duno}*{\@DirChord}\@Dpuno \GetCoord(\@Dpzero)\@DXpzero\@DYpzero \GetCoord(\@Dpuno)\@DXpuno\@DYpuno \MultiplyFN\@DXpzero by\@DXpuno to\@XXD |