diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-triangles.tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-triangles.tex | 107 |
1 files changed, 61 insertions, 46 deletions
diff --git a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-triangles.tex b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-triangles.tex index 41332b9f6ec..f60491ac38a 100644 --- a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-triangles.tex +++ b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-triangles.tex @@ -1,5 +1,5 @@ % tkz-obj-eu-triangles.tex -% Copyright 2020 Alain Matthes +% Copyright 2022 Alain Matthes % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 % of this license or (at your option) any later version. @@ -7,15 +7,12 @@ % http://www.latex-project.org/lppl.txt % and version 1.3 or later is part of all distributions of LaTeX % version 2005/12/01 or later. -% % This work has the LPPL maintenance status “maintained”. -% % The Current Maintainer of this work is Alain Matthes. -% utf8 encoding -\def\fileversion{3.06c} -\def\filedate{2020/03/18} -\typeout{2020/03/18 3.06c tkz-obj-eu-triangles.tex} +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-obj-eu-triangles.tex} \makeatletter %<--------------------------------------------------------------------------–> % Triangle Equilateral @@ -27,6 +24,16 @@ \endgroup } %<--------------------------------------------------------------------------–> +% Triangle Isosceles Right +%<--------------------------------------------------------------------------–> +\def\tkzDefIsoscelesRightTriangle(#1,#2){ +\begingroup + \tkzURotateAngle(#1,45)(#2) + \pgfnodealias{tkz@a}{tkzPointResult} + \tkzUHomo(#1,\tkzSqrTwobyTwo)(tkz@a) +\endgroup +} +%<--------------------------------------------------------------------------–> \def\tkzDrawEquilateral{\pgfutil@ifnextchar[{\tkz@Equilateral}{% \tkz@Equilateral[]}} @@ -37,12 +44,24 @@ \tkzDrawPolygon[#1](#2,#3,tkzPointResult) \endgroup } + +%<--------------------------------------------------------------------------–> + +\def\tkzDefIsoscelesRightTriangle{\pgfutil@ifnextchar[{\tkz@DefIsoscelesRightTriangle}{% + \tkz@DefIsoscelesRightTriangle[]}} + +\def\tkz@DefIsoscelesRightTriangle[#1](#2,#3){% +\begingroup + \tkzURotateAngle(#2,45)(#3) + \pgfnodealias{tkz@a}{tkzPointResult} + \tkzUHomo(#2,\tkzSqrTwobyTwo)(tkz@a) + \tkzDrawPolygon[#1](#2,#3,tkzPointResult) +\endgroup +} %<--------------------------------------------------------------------------–> % Triangle OneTwo %<--------------------------------------------------------------------------–> -\def\tkzPhi{1.618034} -\def\tkzInvPhi{0.618034} -\def\tkzSqrtPhi{1.27202} + \def\tkzDefTwoOne(#1,#2){ \begingroup @@ -56,7 +75,7 @@ } \def\tkzDefSchoolTriangle(#1,#2){ \begingroup - \tkzDefPointWith[K=-1](#2,#1) + \tkzDefPointWith[K=-1](#2,#1) \pgfnodealias{tkz@a}{tkzPointResult} \tkzURotateAngle(#1,30)(#2) \tkzInterLL(#1,tkzPointResult)(#2,tkz@a) @@ -106,12 +125,13 @@ school/.code = \def\tkz@numtr{3}, golden/.code = \def\tkz@numtr{4}, sublime/.code = \def\tkz@numtr{4}, - euclide/.code = \def\tkz@numtr{5}, + euclid/.code = \def\tkz@numtr{5}, gold/.code = \def\tkz@numtr{6}, cheops/.code = \def\tkz@numtr{7}, two angles/.code args = {#1 and #2} { \def\tkz@numtr{8}% \def\tkz@alpha{#1}% \def\tkz@beta{#2}}, + isosceles right/.code = \def\tkz@numtr{9}, equilateral } @@ -138,6 +158,8 @@ \tkzDefCheopsTriangle(#2,#3) \or% 8 \tkzDefTwoAnglesTriangle(#2,#3) + \or% 9 + \tkzDefIsoscelesRightTriangle(#2,#3) \fi \endgroup } @@ -162,7 +184,7 @@ feuerbach/.code = \def\tkz@numtspc{6}, euler/.code = \def\tkz@numtspc{7}, tangential/.code = \def\tkz@numtspc{8}, - symmedian/.code = \def\tkz@numtspc{9}, + symmedial/.code = \def\tkz@numtspc{9}, name/.store in = \tkz@pttr@name, name = {}, centroid, @@ -191,7 +213,7 @@ \or% 8 \tkzDefTangentialTriangle(#2){#3} \or% 8 - \tkzDefSymmedianTriangle(#2){#3} + \tkzDefSymmedialTriangle(#2){#3} \fi \endgroup } @@ -201,10 +223,8 @@ \def\SetUpPTTR#1{\pgfqkeys{/setuppttr}{#1}} \pgfkeys{/setuppttr/.cd, name/.store in = \tkz@pttr@name, - name = {} + name = {} } -\def\tkz@recuplast(#1,#2){\def\tkz@last{#1}} -\def\tkz@stop{\tkz@stop} %<--------------------------------------------------------------------------– % InCentral %<--------------------------------------------------------------------------– @@ -214,9 +234,8 @@ \tkz@recuplast(#3) \tkzDefBisectorLine(#2,#1,\tkz@last) \tkzInterLL(#2,\tkz@last)(#1,tkzPointResult) - \pgfnodealias{#4}{tkzPointResult} + \pgfnodealias{\tkz@pttr@name#4}{tkzPointResult} \ifx\tkz@tmp\tkz@stop\else\@DefIncentralTriangle(#2,#3)(#5)\fi - \pgfnodealias{\tkz@pttr@name#4}{#4} } \def\tkzDefIncentralTriangle{\pgfutil@ifnextchar[{% @@ -241,9 +260,8 @@ \def\tkz@tmp{#5}% \tkz@recuplast(#3) \tkzDefExCircle(#2,#1,\tkz@last) - \pgfnodealias{#4}{tkzPointResult} + \pgfnodealias{\tkz@pttr@name#4}{tkzPointResult} \ifx\tkz@tmp\tkz@stop\else\@DefExcentralTriangle(#2,#3)(#5)\fi - \pgfnodealias{\tkz@pttr@name#4}{#4} } \def\tkzDefExcentralTriangle{\pgfutil@ifnextchar[{% @@ -264,9 +282,8 @@ \def\tkz@tmp{#5}% \tkz@recuplast(#3) \tkzUProjection(#2,\tkz@last)(tkz@pt) - \pgfnodealias{#4}{tkzPointResult} + \pgfnodealias{\tkz@pttr@name#4}{tkzPointResult} \ifx\tkz@tmp\tkz@stop\else\@DefIntouchTriangle(#2,#3)(#5)\fi - \pgfnodealias{\tkz@pttr@name#4}{#4} } \def\tkzDefIntouchTriangle{\pgfutil@ifnextchar[{% @@ -295,7 +312,10 @@ \foreach \name [count=\i] in {#5} {% \global\expandafter\edef\csname tkz@point\i\endcsname{\name} } + \begingroup + \def\tkz@pttr@name{} \tkzDefExcentralTriangle(#2,#3,#4){tkz@a,tkz@b,tkz@c} + \endgroup \tkzUProjection(#3,#4)(tkz@a) \pgfnodealias{\tkz@pttr@name\csname tkz@point1\endcsname}{tkzPointResult} \tkzUProjection(#2,#3)(tkz@c) @@ -322,11 +342,11 @@ \pgfnodealias{tkz@c}{tkzPointResult} \tkzGetLength{tkz@rc} \tkzDefExCircle(#4,#2,#3) \pgfnodealias{tkz@a}{tkzPointResult} \tkzGetLength{tkz@ra} - \tkzInterLC[R](#3,tkz@b)(tkz@b,\tkz@rb pt) + \tkzInterLC[R](#3,tkz@b)(tkz@b,\tkz@rb) \tkzGetFirstPoint{\tkz@pttr@name\csname tkz@point2\endcsname} - \tkzInterLC[R](#4,tkz@c)(tkz@c,\tkz@rc pt) + \tkzInterLC[R](#4,tkz@c)(tkz@c,\tkz@rc) \tkzGetFirstPoint{\tkz@pttr@name\csname tkz@point3\endcsname} - \tkzInterLC[R](#2,tkz@a)(tkz@a,\tkz@ra pt) + \tkzInterLC[R](#2,tkz@a)(tkz@a,\tkz@ra) \tkzGetFirstPoint{\tkz@pttr@name\csname tkz@point1\endcsname} \endgroup } @@ -337,13 +357,12 @@ \def\@DefCentroidTriangle(#1,#2,#3)(#4,#5){% \def\tkz@tmp{#5}% \tkz@recuplast(#3) - \pgfcoordinate{#4}{% + \pgfcoordinate{\tkz@pttr@name#4}{% \pgfpointscale{0.5}{% - \pgfpointadd{\pgfpointanchor{#2}{center}}% + \pgfpointadd{\pgfpointanchor{#2}{center}}% {\pgfpointanchor{\tkz@last}{center}}} }% \ifx\tkz@tmp\tkz@stop\else\@DefCentroidTriangle(#2,#3)(#5)\fi - \pgfnodealias{\tkz@pttr@name#4}{#4} } \def\tkzDefCentroidTriangle{\pgfutil@ifnextchar[{\tkz@DefCentroidTriangle} {\tkz@DefCentroidTriangle[]}} @@ -361,12 +380,9 @@ \def\@DefOrthicTriangle(#1,#2,#3)(#4,#5){% \def\tkz@tmp{#5}% \tkz@recuplast(#3) - \pgfinterruptboundingbox \tkzUProjection(#2,\tkz@last)(#1) - \endpgfinterruptboundingbox - \pgfnodealias{#4}{tkzPointResult} + \pgfnodealias{\tkz@pttr@name#4}{tkzPointResult} \ifx\tkz@tmp\tkz@stop\else\@DefOrthicTriangle(#2,#3)(#5)\fi - \pgfnodealias{\tkz@pttr@name#4}{#4} } \def\tkzDefOrthicTriangle{\pgfutil@ifnextchar[{\tkz@DefOrthicTriangle} @@ -432,25 +448,24 @@ %<--------------------------------------------------------------------------– % tkzDefSymmedianLine %<--------------------------------------------------------------------------– -\def\@DefSymmedianTriangle(#1,#2,#3)(#4,#5){% - \def\tkz@tmp{#5}% - \tkz@recuplast(#3) - \tkzDefSymmedianLine(#2,#1,\tkz@last) - \tkzInterLL(#2,\tkz@last)(#1,tkzPointResult) - \pgfnodealias{#4}{tkzPointResult} - \ifx\tkz@tmp\tkz@stop\else\@DefSymmedianTriangle(#2,#3)(#5)\fi - \pgfnodealias{\tkz@pttr@name#4}{#4} +\def\@DefSymmedialTriangle(#1,#2,#3)(#4,#5){% + \def\tkz@tmp{#5}% + \tkz@recuplast(#3) + \tkzDefSymmedianLine(#2,#1,\tkz@last) + \tkzInterLL(#2,\tkz@last)(#1,tkzPointResult) + \pgfnodealias{\tkz@pttr@name#4}{tkzPointResult} + \ifx\tkz@tmp\tkz@stop\else\@DefSymmedialTriangle(#2,#3)(#5)\fi } -\def\tkzDefSymmedianTriangle{\pgfutil@ifnextchar[{% - \tkz@DefSymmedianTriangle}{% - \tkz@DefSymmedianTriangle[]}} +\def\tkzDefSymmedialTriangle{\pgfutil@ifnextchar[{% + \tkz@DefSymmedialTriangle}{% + \tkz@DefSymmedialTriangle[]}} -\def\tkz@DefSymmedianTriangle[#1](#2)#3{% +\def\tkz@DefSymmedialTriangle[#1](#2)#3{% \begingroup \SetUpPTTR{#1} \pgfinterruptboundingbox - \@DefSymmedianTriangle(#2,#2)(#3,\tkz@stop) + \@DefSymmedialTriangle(#2,#2)(#3,\tkz@stop) \endpgfinterruptboundingbox \endgroup } |