From f9a81c93678592ac9978df3ef83033a068067099 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 11 Apr 2020 22:24:25 +0000 Subject: euclideangeometry (10apr20) git-svn-id: svn://tug.org/texlive/trunk@54659 c570f23f-e606-0410-a88d-b1316a301751 --- .../latex/euclideangeometry/euclideangeometry.sty | 56 +++++++++++++++------- 1 file changed, 40 insertions(+), 16 deletions(-) (limited to 'Master/texmf-dist/tex') diff --git a/Master/texmf-dist/tex/latex/euclideangeometry/euclideangeometry.sty b/Master/texmf-dist/tex/latex/euclideangeometry/euclideangeometry.sty index 61082ef0187..f6621222add 100644 --- a/Master/texmf-dist/tex/latex/euclideangeometry/euclideangeometry.sty +++ b/Master/texmf-dist/tex/latex/euclideangeometry/euclideangeometry.sty @@ -11,7 +11,7 @@ %% \NeedsTeXFormat{LaTeX2e}[2019/01/01] \ProvidesPackage{euclideangeometry}% - [2020-02-12 v.0.1.5 Extension package for curve2e] + [2020-03-30 v.0.1.7 Extension package for curve2e] \RequirePackage{curve2e} \@ifpackagelater{curve2e}{2020/01/18}{}% @@ -132,6 +132,30 @@ \ScaleVect\Segm by0.5to#3\ignorespaces} \let\MiddlePointOf\SegmentCenter +\def\LegFromHypotenuse#1AndOtherLeg#2to#3{% + \edef#3{\fpeval{sqrt(#1**2-#2**2)}}} +\def\IntersectionsOfLine(#1)(#2)WithCircle(#3)#4to#5and#6{% +\CopyVect#3 to\C \edef\R{#4} +\CopyVect#1to\Pu \CopyVect#2to\Pd +\Circlewithcenter\C radius\R +\segment(\Pu)(\Pd)\SegmentArg(\Pu)(\Pd)to\Diru +\edef\Dird{\fpeval{\Diru+90}}\Pbox(\C)[b]{C}[2] +\IntersectionOfLines(\Pu)(\Diru:1)and(\C)(\Dird:1)to\Int +\SegmentLength(\C)(\Int)to\A +\fptest{\A > \R}{\PackageError{euclideangeometry}% +{Distance of line \A\space larger than radius \R. No intersections}% +{Check your data; correct and retry}}{% +\LegFromHypotenuse\R AndOtherLeg\A to\B +\AddVect\Int and\Diru:-\B to\Pt \edef#5{\Pt} +\SymmetricalPointOf\Pt respect\Int to\Pq \edef#6{\Pq} +}} +\def\Segment(#1)(#2)SymmetricPointOf#3to#4{% +\SegmentArg(#1)(#2)to\Sanguno\edef\Sangdue{\fpeval{\Sanguno+90}} +\IntersectionOfLines(#1)(\Sanguno:1)and(#3)(\Sangdue:1)to\Smed +\SymmetricalPointOf#3respect\Smed to#4\ignorespaces} +\def\CircleThrough#1WithCenter#2{% +\SegmentLength(#1)(#2)to\Radius +\Circlewithcenter#2radius\Radius} \def\TriangleMedianBase#1on#2and#3to#4{% \SubVect#1from#2to\TMBu \SubVect#1from#3to\TMBd @@ -332,26 +356,26 @@ \IntersectionOfLines(\Pd)(\Au:1)and(\F)(\fpeval{\Au+90}:1)to\Mu \IfBooleanTF{#1}{\Pbox(\Mt)[br]{M_3}[1.5pt]\Pbox(\Md)[t]{M_2}[1.5pt] \Pbox(\Mu)[b]{M_1}[1.5pt]}{} -\SymmetricalPointOf\F respect\Mu to\Gu -\IfBooleanTF{#1}{\Pbox(\Gu)[l]{G_1}[1.5pt]}{} -\SymmetricalPointOf\F respect \Md to\Gd -\IfBooleanTF{#1}{\Pbox(\Gd)[t]{G_2}[1.5pt]}{} -\SymmetricalPointOf\F respect \Mt to\Gt -\IfBooleanTF{#1}{\Pbox(\Gt)[r]{G_3}[1.5pt]}{} -\IfBooleanTF{#1}{\ThreePointCircle*(\Gu)(\Gd)(\Gt)}% - {\ThreePointCircle(\Gu)(\Gd)(\Gt)} +\SymmetricalPointOf\F respect\Mu to\Su +\IfBooleanTF{#1}{\Pbox(\Su)[l]{S_1}[1.5pt]}{} +\SymmetricalPointOf\F respect \Md to\Sd +\IfBooleanTF{#1}{\Pbox(\Sd)[t]{S_2}[1.5pt]}{} +\SymmetricalPointOf\F respect \Mt to\St +\IfBooleanTF{#1}{\Pbox(\St)[r]{S_3}[1.5pt]}{} +\IfBooleanTF{#1}{\ThreePointCircle*(\Su)(\Sd)(\St)}% + {\ThreePointCircle(\Su)(\Sd)(\St)} \CopyVect\C to\Fp \Pbox(\Fp)[l]{F'}[1.5pt] \IfBooleanTF{#1}{% -\Dotline(\F)(\Gt){2}[1.5pt] -\Dotline(\F)(\Gd){2}[1.5pt] -\Dotline(\F)(\Gu){2}[1.5pt]}{} -\IntersectionOfSegments(\Pu)(\Pt)and(\Fp)(\Gt)to\Tt -\IntersectionOfSegments(\Pu)(\Pd)and(\Fp)(\Gd)to\Td -\IntersectionOfSegments(\Pd)(\Pt)and(\Fp)(\Gu)to\Tu +\Dotline(\F)(\St){2}[1.5pt] +\Dotline(\F)(\Sd){2}[1.5pt] +\Dotline(\F)(\Su){2}[1.5pt]}{} +\IntersectionOfSegments(\Pu)(\Pt)and(\Fp)(\St)to\Tt +\IntersectionOfSegments(\Pu)(\Pd)and(\Fp)(\Sd)to\Td +\IntersectionOfSegments(\Pd)(\Pt)and(\Fp)(\Su)to\Tu \IfBooleanTF{#1}{\Pbox(\Tu)[l]{T_1}[1.5pt] \Pbox(\Td)[b]{T_2}[1.5pt] \Pbox(\Tt)[tl]{T_3}[1.5pt] -\Dashline(\Fp)(\Gu){1}\Dashline(\Fp)(\Gd){1}\Dashline(\Fp)(\Gt){1}}{} +\Dashline(\Fp)(\Su){1}\Dashline(\Fp)(\Sd){1}\Dashline(\Fp)(\St){1}}{} \DistanceAndDirOfVect\Fp minus\Tt to\DFp and\AFu \DistanceAndDirOfVect\F minus\Tt to\DF and\AF \SegmentCenter(\F)(\Fp)to\CE \Pbox(\CE)[b]{C}[1.5pt] -- cgit v1.2.3