From b5a4f9e9c7a4017d4329cf01cba4254906b499d3 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 4 Jan 2022 22:31:15 +0000 Subject: tkz-euclide (4jan22) git-svn-id: svn://tug.org/texlive/trunk@61496 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/tkz-euclide/tkz-euclide.cfg | 205 ++++++ .../tex/latex/tkz-euclide/tkz-euclide.sty | 205 ++++-- .../tex/latex/tkz-euclide/tkz-lib-eu-marks.tex | 122 ++++ .../tex/latex/tkz-euclide/tkz-lib-eu-shape.tex | 51 ++ .../tex/latex/tkz-euclide/tkz-obj-eu-angles.tex | 297 -------- .../tex/latex/tkz-euclide/tkz-obj-eu-arcs.tex | 178 ----- .../tex/latex/tkz-euclide/tkz-obj-eu-axesmin.tex | 171 +++++ .../latex/tkz-euclide/tkz-obj-eu-circles-by.tex | 161 +++++ .../tex/latex/tkz-euclide/tkz-obj-eu-circles.tex | 88 ++- .../tex/latex/tkz-euclide/tkz-obj-eu-compass.tex | 56 +- .../latex/tkz-euclide/tkz-obj-eu-draw-angles.tex | 554 +++++++++++++++ .../latex/tkz-euclide/tkz-obj-eu-draw-circles.tex | 135 ++-- .../latex/tkz-euclide/tkz-obj-eu-draw-lines.tex | 228 ++---- .../latex/tkz-euclide/tkz-obj-eu-draw-polygons.tex | 75 +- .../tkz-euclide/tkz-obj-eu-draw-triangles.tex | 39 +- .../tex/latex/tkz-euclide/tkz-obj-eu-grids.tex | 83 +++ .../tex/latex/tkz-euclide/tkz-obj-eu-lines.tex | 99 +-- .../tex/latex/tkz-euclide/tkz-obj-eu-points-by.tex | 132 ++-- .../latex/tkz-euclide/tkz-obj-eu-points-rnd.tex | 36 +- .../latex/tkz-euclide/tkz-obj-eu-points-spc.tex | 536 +++++++++++++++ .../latex/tkz-euclide/tkz-obj-eu-points-with.tex | 21 +- .../tex/latex/tkz-euclide/tkz-obj-eu-points.tex | 761 ++++++++------------- .../tex/latex/tkz-euclide/tkz-obj-eu-polygons.tex | 58 +- .../latex/tkz-euclide/tkz-obj-eu-protractor.tex | 35 +- .../tex/latex/tkz-euclide/tkz-obj-eu-sectors.tex | 100 ++- .../tex/latex/tkz-euclide/tkz-obj-eu-show.tex | 117 ++-- .../tex/latex/tkz-euclide/tkz-obj-eu-triangles.tex | 107 +-- .../tex/latex/tkz-euclide/tkz-tools-angles.tex | 74 -- .../tex/latex/tkz-euclide/tkz-tools-eu-BB.tex | 30 + .../tex/latex/tkz-euclide/tkz-tools-eu-angles.tex | 72 ++ .../tex/latex/tkz-euclide/tkz-tools-eu-base.tex | 89 +++ .../tex/latex/tkz-euclide/tkz-tools-eu-colors.tex | 57 ++ .../tkz-euclide/tkz-tools-eu-intersections.tex | 403 +++++++++++ .../tex/latex/tkz-euclide/tkz-tools-eu-math.tex | 129 ++++ .../tex/latex/tkz-euclide/tkz-tools-eu-modules.tex | 67 ++ .../tex/latex/tkz-euclide/tkz-tools-eu-text.tex | 88 +++ .../latex/tkz-euclide/tkz-tools-eu-utilities.tex | 172 +++++ .../latex/tkz-euclide/tkz-tools-intersections.tex | 402 ----------- .../tex/latex/tkz-euclide/tkz-tools-math.tex | 126 ---- 39 files changed, 4063 insertions(+), 2296 deletions(-) create mode 100644 Master/texmf-dist/tex/latex/tkz-euclide/tkz-euclide.cfg create mode 100644 Master/texmf-dist/tex/latex/tkz-euclide/tkz-lib-eu-marks.tex create mode 100644 Master/texmf-dist/tex/latex/tkz-euclide/tkz-lib-eu-shape.tex delete mode 100644 Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-angles.tex delete mode 100644 Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-arcs.tex create mode 100644 Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-axesmin.tex create mode 100644 Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-circles-by.tex create mode 100644 Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-draw-angles.tex create mode 100644 Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-grids.tex create mode 100644 Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-points-spc.tex delete mode 100644 Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-angles.tex create mode 100644 Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-eu-BB.tex create mode 100644 Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-eu-angles.tex create mode 100644 Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-eu-base.tex create mode 100644 Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-eu-colors.tex create mode 100644 Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-eu-intersections.tex create mode 100644 Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-eu-math.tex create mode 100644 Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-eu-modules.tex create mode 100644 Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-eu-text.tex create mode 100644 Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-eu-utilities.tex delete mode 100644 Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-intersections.tex delete mode 100644 Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-math.tex (limited to 'Master/texmf-dist/tex/latex/tkz-euclide') diff --git a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-euclide.cfg b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-euclide.cfg new file mode 100644 index 00000000000..fe8738e153a --- /dev/null +++ b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-euclide.cfg @@ -0,0 +1,205 @@ +% tkz-euclide.cfg +% 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. +% The latest version of this license is in +% 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. +% If you modify this original file, YOUR CHANGES WILL BE LOST when it is +% updated. Instead, put your changes in the entire copy of tkz-base.cfg +% and save the file in a directory part of your TEXINPUTS environment +% variable. + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-euclide.cfg} +%<------ colors ---------------------------------------–> +\def\tkz@backgroundcolor{white} +\def\tkz@textcolor{black} +%<--------------------------------------------------------- +\def\tkz@fillcolor{\tkz@backgroundcolor} +\def\tkz@mainlinecolor{\tkz@textcolor} +\def\tkz@otherlinecolor{\tkz@mainlinecolor!50} +%<------------------------- Cartesian system -----------------------------–> +% Default unity cm +% Geometry Euclidean with unity for x and y = 1cm ---> step = 1 +% 0 ≤ x ≤ 10 +% 0 ≤ y ≤ 10 +\def\tkz@init@xorigine{0} +\def\tkz@init@yorigine{0} +\def\tkz@init@xstep{1} +\def\tkz@init@ystep{1} +\def\tkz@init@xmin{0} +\def\tkz@init@ymin{0} +\def\tkz@init@xmax{10} +\def\tkz@init@ymax{10} +\def\tkz@init@xdec{1} +\def\tkz@init@ydec{1} +%<-------------------------- points -----------------------------------–> +\def\tkz@euc@pointshape{circle} +\def\tkz@euc@pointcolor{\tkz@mainlinecolor} +\def\tkz@euc@labelcolor{\tkz@mainlinecolor} +\def\tkz@euc@pointsize{3} +\def\tkz@euc@pointpos{below right} +\def\tkz@euc@segmentcolor{\tkz@mainlinecolor} +\def\tkz@euc@circlecolor{\tkz@mainlinecolor} +%<-------------------------- line ---------------------------------------–> +\def\tkz@euc@linecolor{\tkz@mainlinecolor} +\def\tkz@euc@linewidth{0.6pt} +\def\tkz@euc@linestyle{solid} +\def\tkz@euc@lineleft{.2} +\def\tkz@euc@lineright{.2} +%<------ axes cartesian system ---------------------------------------–> +\def\tkz@init@color{\tkz@textcolor} +\def\tkz@init@lw{0.4 pt} +\def\tkz@init@tickwd{0.8 pt} +\def\tkz@init@ticka{2 pt} +\def\tkz@init@tickb{2 pt} +\def\tkz@init@xlabel{$x$} +\def\tkz@init@ylabel{$y$} +\def\tkz@init@tickb{2 pt} +\def\tkz@init@rightspace{.5} +\def\tkz@init@leftspace{0} +\def\tkz@init@upspace{.5} +\def\tkz@init@downspace{0} +\global\let\tkzmathstyle\displaystyle +\def\tkz@legend@line@len{1cm} +%<-------------------------- rep ---------------------------------------–> +\def\tkz@sur@color{\tkz@mainlinecolor} +\def\tkz@sur@colorlabel{\tkz@mainlinecolor} +\def\tkz@sur@lw{0.8 pt} +\def\tkz@sur@posxlabel{below=2pt} +\def\tkz@sur@posylabel{left=2pt} +%<-------------------------- grid ---------------------------------------–> +\def\tkz@grid@color{gray} +\def\tkz@grid@lw{0.4 pt} +\def\tkzCoeffSubColor{50} +\def\tkzCoeffSubLw{0.8} +\def\tkz@grid@xstep{0.2} +\def\tkz@grid@ystep{0.2} +\def\tkz@init@gradsize{\textstyle} +\def\tkzRatioLineGrid{0.75} +\def\tkz@gd@sublw{0.4 pt}% size line sub grid +%<------------------------- compass -----------------------------------–> +\def\tkz@euc@compasscolor{\tkz@otherlinecolor} +\def\tkz@euc@compasswidth{0.4pt} +\def\tkz@euc@compassstyle{solid} +%<------------------------- arc -----------------------------------–> +\def\tkz@arc@lw{0.4pt} +\def\tkz@arc@color{\tkz@mainlinecolor} +\def\tkz@arc@style{solid} +%<---------------------------- mark -----------------------------------–> +\def\tkz@mk@color{\tkz@mainlinecolor} +\def\tkz@mk@mark{*} +\def\tkz@mk@size{3pt} +\def\tkz@mk@fill{\tkz@otherlinecolor} +%<--------------------------------------------------------------------------–> +%<------------------------------ styles ---------------------------------–> +\def\tkzSetUpStyle[#1]#2{\tikzset{#2/.style={#1}}}% add 2022 + +\tikzset{xlabel style/.style = {below = 3 pt, + inner sep = 1pt, + outer sep = 0pt} + } +\tikzset{ylabel style/.style = {left = 3 pt, + inner sep = 1pt, + outer sep = 0pt}} +\tikzset{xaxe style/.style = {> = latex, ->} +} +\tikzset{yaxe style/.style = {> = latex, ->} +} + +\tikzset{point style/.style = {draw = \tkz@euc@pointcolor, + inner sep = 0pt, + shape = \tkz@euc@pointshape, + minimum size = \tkz@euc@pointsize, + fill = \tkz@euc@pointcolor + } + } +% label for the point +\tikzset{label style/.style={ \tkz@euc@pointpos, + \tkz@euc@labelcolor, + font = \normalsize} + } +\tikzset{label angle style/.style={ \tkz@euc@labelcolor, + font = \normalsize} + } +\tikzset{line style/.style = {line width = \tkz@euc@linewidth, + color = \tkz@euc@linecolor, + style = \tkz@euc@linestyle, + add = {\tkz@euc@lineleft} and {\tkz@euc@lineright}% + } + } +\tikzset{label seg style/.style = {color = \tkz@mainlinecolor, + auto + } + } + +\tikzset{rep style/.style = { ->, + >=latex} + } +\tikzset{compass style/.style = {color = \tkz@euc@compasscolor, + line width = \tkz@euc@compasswidth, + style = \tkz@euc@compassstyle} + } +\tikzset{mark style/.style = {mark = \tkz@mk@mark, + mark size = \tkz@mk@size, + mark options = {color= \tkz@mk@color, + fill = \tkz@mk@fill + } + } +} +\tikzset{arc style/.style={gray,thin}} +%<---------------------- show coord -----------------------------------–> +\tikzset{arrow coord style/.style = {dashed, + \tkz@euc@linecolor, + > = latex', + ->} + } +\tikzset{xcoord style/.style = {\tkz@euc@labelcolor, + font = \normalsize, + text height = 1ex, + inner sep = 0pt, + outer sep = 0pt, + fill = \tkz@fillcolor, + below = 3pt} + } +\tikzset{ycoord style/.style = {\tkz@euc@labelcolor, + font = \normalsize, + text height = 1ex, + inner sep = 0pt, + outer sep = 0pt, + fill = \tkz@fillcolor, + left = 3pt} + } +%<--------------------------- vector --------------------------------------–> +\tikzset{vector style/.style={>=latex,->} +} +\tikzset{tkzdotted/.style={% + dash pattern=on 0.4\pgflinewidth off #1\pgflinewidth,line cap=round, shorten >=#1\pgflinewidth/2,shorten <=#1\pgflinewidth/2, + tkzdotted/.default=8}} + +% \tikzset{tkzreverseclip/.style={insert path={% +% (\tkz@xa,\tkz@ya) rectangle (\tkz@xb,\tkz@yb)}}} + +\tikzset{tkzreverseclip/.style={insert path={ + (current bounding box.south west) --(current bounding box.north west) + --(current bounding box.north east) -- (current bounding box.south east) + -- cycle} }} + +\def\tkzPhi{1.618034} +\def\tkzInvPhi{0.618034} +\def\tkzSqrtPhi{1.27202} +\def\tkzSqrTwo{1.414213} +\def\tkzSqrThree{1.7320508} +\def\tkzSqrFive{2.2360679} +\def\tkzSqrTwobyTwo{0.7071065} +\def\tkzPi{3.1415926} +\def\tkzEuler{2.71828182} +\endinput \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-euclide.sty b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-euclide.sty index 9507e2b1e62..9c27ae7620b 100644 --- a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-euclide.sty +++ b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-euclide.sty @@ -1,78 +1,151 @@ -% tkz-euclide.sty (utf8 encoding) -% Copyright 2020 Alain Matthes +% tkz-euclide.sty +% 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. % The latest version of this license is in -% 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. -% +% 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. -% -% This work consists of the files: -% tkz-euclide.sty -% tkz-obj-eu-angles.tex -% tkz-obj-eu-arcs.tex -% tkz-obj-eu-circles.tex -% tkz-obj-eu-compass.tex -% tkz-obj-eu-draw-circles.tex -% tkz-obj-eu-draw-lines.tex -% tkz-obj-eu-draw-polygons.tex -% tkz-obj-eu-lines.tex -% tkz-obj-eu-points-by.tex -% tkz-obj-eu-points-rnd.tex -% tkz-obj-eu-points-with.tex -% tkz-obj-eu-points.tex -% tkz-obj-eu-polygons.tex -% tkz-obj-eu-protractor.tex -% tkz-obj-eu-sectors.tex -% tkz-obj-eu-show.tex -% tkz-obj-eu-triangles.tex -% tkz-tools-angles.tex -% tkz-tools-intersections.tex -% tkz-tools-math.tex -%<------------------------------------------------------------–> -\def\fileversion{3.06c} -\def\filedate{2020/03/18} -\typeout{2020/03/18 3.06c tkz-euclide.sty} +%<------------------------------------------------------------> +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-euclide.sty} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{tkz-euclide}[2020/03/18 3.06c for euclidan geometry ] -\RequirePackage{tkz-base} -\makeatletter -\@ifpackagelater{tkz-base}{2020/03/18}{% - % Package is new enough -}{% - \PackageError{tkz-euclide}{Package tkz-base is too old , you need a recent version}% +\ProvidesPackage{tkz-euclide}[ 2022/01/04 4.00 for pure Euclidean Geometry ] + +\@ifpackageloaded{tkz-base}{ +\newdimen\tkzRadius +\newdimen\tkzLength +\newdimen\tkz@radi +\newif\iftkz@line@normed +\newif\ifnormtkzcode@execute% german ? right angle +\newif\iftkz@swap@sc%---------------------- semi circle +}{ +\RequirePackage{tikz} +\usetikzlibrary{angles, + arrows, + arrows.meta, + calc, + decorations, + decorations.markings, + decorations.pathreplacing, + decorations.shapes, + decorations.text, + decorations.pathmorphing, + intersections, + plotmarks, + quotes, + shapes.misc + } +\RequirePackage{xfp} +%--------------------- +\newdimen\tkzRadius +\newdimen\tkzLength +\newdimen\tkz@radi +%--------------------- tkz registres +\newdimen\tkz@ax +\newdimen\tkz@ay +\newdimen\tkz@bx +\newdimen\tkz@by +\newdimen\tkz@cx +\newdimen\tkz@cy +\newdimen\tkz@dx +\newdimen\tkz@dy +%--------------------- points +\newif\iftkz@polar\tkz@polarfalse +\newif\iftkz@pt@polar +\newif\iftkz@pt@show +\newif\iftkz@pt@noname +\newif\iftkz@coord@noxdraw +\newif\iftkz@coord@noydraw +\newif\iftkz@vec@normed +%--------------------- lines +\newif\iftkz@line@normed +%--------------------- tkz axis +\newif\iftkz@X@noticks +\newif\iftkz@Y@noticks +\newif\iftkz@X@nograd +\newif\iftkz@Y@nograd +\newif\iftkz@X@orig +\newif\iftkz@Y@orig +\newif\iftkz@X@unit +\newif\iftkz@Y@unit +\newif\iftkz@np +\newif\iftkz@swap +\newif\iftkz@init@NO +\newif\iftkz@Rep@orig%--------------------- Rep +\newif\iftkzLengthIncm%--------------------- Math +\newif\iftkz@sop@show%--------------------- marks +\newif\iftkz@equi@show +\newif\iftkz@gd@sub% sub grid ?%--------------------- about grid +\newif\iftkz@node\tkz@nodefalse +\newif\iftkz@legend@line%--------------------- legend +\newif\iftkz@TestSubString +\newif\ifnormtkzcode@execute% german ? right angle +\newif\iftkz@swap@sc%---------------------- semi circle +\newif\ifpgf@unknown % math arith +\newif\ifpgf@isaprime +\newcount\tkz@cntmk +\newif\iftkz@RappReturn % protractor +\newif\iftkz@RappFull +%--------------------- Init +\def\tkz@xa{0} +\def\tkz@xb{10} +\def\tkz@ya{0} +\def\tkz@yb{10} +\def\tkz@mathresult{} +\InputIfFileExists{tkz-euclide.cfg}{% +\typeout{Local configuration file tkz-euclide.cfg found and used}}{% +\typeout{tkz-euclide.cfg not found}} } -\makeatother +%--------------------- Init +\def\tkz@tmp@xa{-5} +\def\tkz@tmp@xb{+5} +\def\tkz@tmp@ya{-5} +\def\tkz@tmp@yb{+5} +%<----------------------------------------------------------> + \DeclareOption*{} \ProcessOptions -%<----------------------------------------------------------–> +%<----------------------------------------------------------> % Initialisation -%<----------------------------------------------------------–> -\input{tkz-tools-intersections} -\input{tkz-tools-angles} -\usetkzobj{% - eu-angles,% - eu-arcs,% - eu-compass,% - eu-circles,% - eu-draw-circles,% - eu-draw-lines,% - eu-draw-polygons,% - eu-draw-triangles,% - eu-lines,% - eu-points,% - eu-points-by,% - eu-points-rnd,% - eu-points-with,% - eu-polygons,% - eu-protractor,% - eu-sectors,% - eu-show,% - eu-triangles} -\endinput \ No newline at end of file +%<----------------------------------------------------------> +\@ifpackageloaded{tkz-base}{}{% +% from base +\input{tkz-tools-eu-base.tex} +\input{tkz-tools-eu-utilities.tex} +\input{tkz-tools-eu-BB.tex} +\input{tkz-obj-eu-grids.tex} +\input{tkz-lib-eu-marks.tex} +\input{tkz-tools-eu-text.tex} +\input{tkz-lib-eu-shape.tex} +\input{tkz-obj-eu-axesmin.tex} +\input{tkz-tools-eu-colors.tex} +\input{tkz-obj-eu-points.tex} +} +% next from euclide +\input{tkz-tools-eu-math.tex} +\input{tkz-tools-eu-intersections} +\input{tkz-tools-eu-angles} +\input{tkz-obj-eu-compass.tex} +\input{tkz-obj-eu-circles.tex} +\input{tkz-obj-eu-circles-by.tex} +\input{tkz-obj-eu-draw-angles.tex} +\input{tkz-obj-eu-draw-circles.tex} +\input{tkz-obj-eu-draw-lines.tex} +\input{tkz-obj-eu-draw-polygons.tex} +\input{tkz-obj-eu-draw-triangles.tex} +\input{tkz-obj-eu-lines.tex} +\input{tkz-obj-eu-points-by.tex} +\input{tkz-obj-eu-points-rnd.tex} +\input{tkz-obj-eu-points-spc.tex} +\input{tkz-obj-eu-points-with.tex} +\input{tkz-obj-eu-polygons.tex} +\input{tkz-obj-eu-protractor.tex} +\input{tkz-obj-eu-sectors.tex} +\input{tkz-obj-eu-show.tex} +\input{tkz-obj-eu-triangles} +\endinput diff --git a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-lib-eu-marks.tex b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-lib-eu-marks.tex new file mode 100644 index 00000000000..f78e7646320 --- /dev/null +++ b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-lib-eu-marks.tex @@ -0,0 +1,122 @@ +% tkz-eu-lib-marks.tex +% 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. +% The latest version of this license is in +% 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. + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-lib-eu-marks.tex} +\makeatletter +%<--------------------------------------------------------------------------–> +% Création des symboles +%<--------------------------------------------------------------------------–> +\def\tkz@undefined{none} +% double bar +\pgfdeclareplotmark{||} +{% + \pgfpathmoveto{\pgfqpoint{2\pgflinewidth}{\pgfplotmarksize}} + \pgfpathlineto{\pgfqpoint{2\pgflinewidth}{-\pgfplotmarksize}} + \pgfpathmoveto{\pgfqpoint{-2\pgflinewidth}{\pgfplotmarksize}} + \pgfpathlineto{\pgfqpoint{-2\pgflinewidth}{-\pgfplotmarksize}} + \pgfusepathqstroke +} +%triple bar +\pgfdeclareplotmark{|||} +{% + \pgfpathmoveto{\pgfqpoint{0 pt}{\pgfplotmarksize}} + \pgfpathlineto{\pgfqpoint{0 pt}{-\pgfplotmarksize}} + \pgfpathmoveto{\pgfqpoint{-3\pgflinewidth}{\pgfplotmarksize}} + \pgfpathlineto{\pgfqpoint{-3\pgflinewidth}{-\pgfplotmarksize}} + \pgfpathmoveto{\pgfqpoint{3\pgflinewidth}{\pgfplotmarksize}} + \pgfpathlineto{\pgfqpoint{3\pgflinewidth}{-\pgfplotmarksize}} + \pgfusepathqstroke +} +% An bar slant + +\pgfdeclareplotmark{s|} +{% + \pgfpathmoveto{\pgfqpoint{-.70710678\pgfplotmarksize}% + {-.70710678\pgfplotmarksize}} + \pgfpathlineto{\pgfqpoint{.70710678\pgfplotmarksize}% + {.70710678\pgfplotmarksize}} + \pgfusepathqstroke +} + +% An double bar slant + +\pgfdeclareplotmark{s||} +{% + \pgfpathmoveto{\pgfqpoint{-0.75\pgfplotmarksize}{-\pgfplotmarksize}} + \pgfpathlineto{\pgfqpoint{0.25\pgfplotmarksize}{\pgfplotmarksize}} + \pgfpathmoveto{\pgfqpoint{0\pgfplotmarksize}{-\pgfplotmarksize}} + \pgfpathlineto{\pgfqpoint{1\pgfplotmarksize}{\pgfplotmarksize}} + \pgfusepathqstroke +} +\pgfdeclareplotmark{s|||} +{% + \pgfpathmoveto{\pgfqpoint{-0.75\pgfplotmarksize}{-\pgfplotmarksize}} + \pgfpathlineto{\pgfqpoint{0.25\pgfplotmarksize}{\pgfplotmarksize}} + \pgfpathmoveto{\pgfqpoint{0\pgfplotmarksize}{-\pgfplotmarksize}} + \pgfpathlineto{\pgfqpoint{1\pgfplotmarksize}{\pgfplotmarksize}} + \pgfpathmoveto{\pgfqpoint{0.75\pgfplotmarksize}{-\pgfplotmarksize}} + \pgfpathlineto{\pgfqpoint{1.75\pgfplotmarksize}{\pgfplotmarksize}} + \pgfusepathqstroke +} +% z +\pgfdeclareplotmark{z} +{% + \pgfpathmoveto{\pgfqpoint{0.75\pgfplotmarksize}{-\pgfplotmarksize}} + \pgfpathlineto{\pgfqpoint{-0.75\pgfplotmarksize}{-\pgfplotmarksize}} + \pgfpathlineto{\pgfqpoint{0.75\pgfplotmarksize}{\pgfplotmarksize}} + \pgfpathlineto{\pgfqpoint{-0.75\pgfplotmarksize}{\pgfplotmarksize}} + \pgfusepathqstroke +} +% s +\pgfdeclareplotmark{s} +{% + \pgfpathmoveto{\pgfqpoint{0pt}{0pt}} + \pgfpathcurveto + {\pgfpoint{0pt}{0pt}} + {\pgfpoint{-\pgfplotmarksize}{\pgfplotmarksize}} + {\pgfpoint{\pgfplotmarksize}{\pgfplotmarksize}} + \pgfpathmoveto{\pgfqpoint{0pt}{0pt}} + \pgfpathcurveto + {\pgfpoint{0pt}{0pt}} + {\pgfpoint{\pgfplotmarksize}{-\pgfplotmarksize}} + {\pgfpoint{-\pgfplotmarksize}{-\pgfplotmarksize}} + \pgfusepathqstroke +} +% infinity +\pgfdeclareplotmark{oo} +{% + \pgfpathmoveto{\pgfqpoint{0pt}{0pt}} + \pgfpathcurveto + {\pgfpoint{0pt}{0pt}} + {\pgfpoint{.5\pgfplotmarksize}{1\pgfplotmarksize}} + {\pgfpoint{\pgfplotmarksize}{0pt}} + \pgfpathmoveto{\pgfqpoint{0pt}{0pt}} + \pgfpathcurveto + {\pgfpoint{0pt}{0pt}} + {\pgfpoint{-.5\pgfplotmarksize}{1\pgfplotmarksize}} + {\pgfpoint{-\pgfplotmarksize}{0pt}} + \pgfpathmoveto{\pgfqpoint{0pt}{0pt}} + \pgfpathcurveto + {\pgfpoint{0pt}{0pt}} + {\pgfpoint{.5\pgfplotmarksize}{-1\pgfplotmarksize}} + {\pgfpoint{\pgfplotmarksize}{0pt}} + \pgfpathmoveto{\pgfqpoint{0pt}{0pt}} + \pgfpathcurveto + {\pgfpoint{0pt}{0pt}} + {\pgfpoint{-.5\pgfplotmarksize}{-1\pgfplotmarksize}} + {\pgfpoint{-\pgfplotmarksize}{0pt}} + \pgfusepathqstroke +} +\makeatother +\endinput \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-lib-eu-shape.tex b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-lib-eu-shape.tex new file mode 100644 index 00000000000..234ba5084fb --- /dev/null +++ b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-lib-eu-shape.tex @@ -0,0 +1,51 @@ +% tkz-lib-eu-shape.tex +% 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. +% The latest version of this license is in +% 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. + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-lib-eu-shape.tex} +\makeatletter +%<--------------------------------------------------------------------------–> +% Création des symboles +%<--------------------------------------------------------------------------–> +% define a new shape for the points +\pgfdeclareshape{cross} +{% + \inheritsavedanchors[from=rectangle] % this is nearly a rectangle + \inheritanchorborder[from=rectangle] + \inheritanchor[from=rectangle]{north} + \inheritanchor[from=rectangle]{north west} + \inheritanchor[from=rectangle]{north east} + \inheritanchor[from=rectangle]{center} + \inheritanchor[from=rectangle]{west} + \inheritanchor[from=rectangle]{east} + \inheritanchor[from=rectangle]{mid} + \inheritanchor[from=rectangle]{mid west} + \inheritanchor[from=rectangle]{mid east} + \inheritanchor[from=rectangle]{base} + \inheritanchor[from=rectangle]{base west} + \inheritanchor[from=rectangle]{base east} + \inheritanchor[from=rectangle]{south} + \inheritanchor[from=rectangle]{south west} + \inheritanchor[from=rectangle]{south east} + \foregroundpath{ +% store lower right in xa/ya and upper right in xb/yb + \southwest \pgf@xa=\pgf@x \pgf@ya=\pgf@y + \northeast \pgf@xb=\pgf@x \pgf@yb=\pgf@y + \pgfpathmoveto{\pgfqpoint{0 pt}{\pgf@ya}} + \pgfpathlineto{\pgfqpoint{0 pt}{\pgf@yb}} + \pgfpathmoveto{\pgfqpoint{\pgf@xa}{0 pt}} + \pgfpathlineto{\pgfqpoint{\pgf@xb}{0 pt}} + } +} +\makeatother +\endinput \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-angles.tex b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-angles.tex deleted file mode 100644 index 75b8bf6c926..00000000000 --- a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-angles.tex +++ /dev/null @@ -1,297 +0,0 @@ -% tkz-tool-eu-angles.tex -% Copyright 2020 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. -% The latest version of this license is in -% 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-tool-eu-angles.tex} -\makeatletter -%<--------------------------------------------------------------------------–> -\newdimen\tkz@arcsize% from julian julian@d-and-j.net -\newdimen\tkz@fillsize -%<-------------------------------------------------------------------------–> - -%<--------------------------------------------------------------------------–> -% tkzDrawArcRAN > -%<--------------------------------------------------------------------------–> -\def\tkzDrawArcRAN[#1](#2,#3)(#4,#5){% -\begingroup - \draw[shift = {(#2)},/tkzdrawarc/.cd,#1] (#4:#3) arc (#4:#5:#3); -\endgroup -} -%<--------------- tkzPathArcRAN ---------------------------------- -\def\tkzPathArcRAN[#1](#2,#3)(#4,#5){% -\begingroup - \path[shift = {(#2)},/tkzdrawarc/.cd,#1] (#4:#3) arc (#4:#5:#3); -\endgroup -} -%<--------------------------------------------------------------------------–> -% Mark an angle modi 3.03 suppression de \tkz@mksize, -%<--------------------------------------------------------------------------–> -% \tkzMarkAngle(B, A, C) -% -% Marque d'angle -% arc de cercle (simple/double/triple) et marque d'églité. -% -% Par défaut: -% arc = simple -% size = 1cm (rayon de l'arc) -% style traits pleins -% mkpos ? position: 0.5 (position de la marque) -% mark rien du tout (ignoré si type est utilisé) -% -% Paramètres (optionnels) -% arc : l, ll, lll -% mksize : 1cm -% gap : 3pt -% dist ? -% style : type de traits -% type : none, |, ||,|||, z, s, x, o, oo -% position: 0.5 -% mark : none , |, ||,|||, z, s, x, o, oo mais tous les -% % symboles de tikz sont permis -%<------------------------- Label on angle -------------------------------–> -\def\tkz@arcsimple{l} -\def\tkz@arcdouble{ll} -\def\tkz@arctriple{lll} - -%\tikzset{lbstyle/.style = {color=\tkz@mainlinecolor}} - -\pgfkeys{/tkzmkangle/.cd, - arc/.estore in = \tkz@arc, - size/.store in = \tkz@size, - mark/.store in = \tkz@markang, - mkpos/.estore in = \tkz@mkpos, - mksize/.store in = \tkz@mksize, - mkcolor/.store in = \tkz@mkcolor, - arc = l, - size = 1 cm, - mark = |, - mksize = 4pt, - mkcolor = black, - mkpos = 0.5, - /tkzmkangle/.search also={/tikz} -} \def\tkzMarkAngle{\pgfutil@ifnextchar[{\tkz@MarkAngle}{\tkz@MarkAngle[]}} -\def\tkz@MarkAngle[#1](#2,#3,#4){% -\begingroup -\pgfqkeys{/tkzmkangle}{#1} - -\tkzFindSlopeAngle(#3,#2)\tkzGetAngle{tkz@dirOne} -\tkzFindSlopeAngle(#3,#4)\tkzGetAngle{tkz@dirTwo} -\tkzNormalizeAngle(\tkz@dirOne,\tkz@dirTwo) - -% les marques, aucune si mktype = none -\def\tkz@mymark{\pgfuseplotmark{\tkz@markang}} -% draw the arcs -\begin{scope}[decoration= {markings, - mark=at position \tkz@mkpos with {\tkz@mymark}}] - \ifx\tkz@arc\tkz@arcsimple - \tkzDrawArcRAN[#1,fill=none,postaction={decorate}]% - (#3,\tkz@size)(\tkz@FirstAngle,\tkz@SecondAngle) - \else - \ifx\tkz@arc\tkz@arcdouble - \tkzDrawArcRAN[#1,fill=none](#3,\tkz@size-1.5\pgflinewidth)% - (\tkz@FirstAngle,\tkz@SecondAngle) - \tkzPathArcRAN[#1,fill=none,postaction={decorate}]% - (#3,\tkz@size)(\tkz@FirstAngle,\tkz@SecondAngle)% - \tkzDrawArcRAN[#1,fill=none](#3,\tkz@size+1.5\pgflinewidth)% - (\tkz@FirstAngle,\tkz@SecondAngle)% - \else - \ifx\tkz@arc\tkz@arctriple - \tkzDrawArcRAN[#1,fill=none,postaction={decorate}]% - (#3,\tkz@size)(\tkz@FirstAngle,\tkz@SecondAngle)% - \tkzDrawArcRAN[#1,fill=none](#3,\tkz@size-2.5\pgflinewidth)% - (\tkz@FirstAngle,\tkz@SecondAngle)% - \tkzDrawArcRAN[#1,fill=none](#3,\tkz@size+2.5\pgflinewidth)% - (\tkz@FirstAngle,\tkz@SecondAngle)% - \fi - \fi - \fi -\end{scope} -\endgroup -} -%<--------------------------------------------------------------------------–> -% multiple -\def\tkz@multiMA#1 #2\@nil{% - \protected@edef\tkz@temp{ - \noexpand \tkzMarkAngle[\tkz@optma](#1)}\tkz@temp% - \def\tkz@nextArg{#2}% - \ifx\tkzutil@empty\tkz@nextArg - \let\next\@gobble - \fi - \next#2\@nil -} -%<--------------------------------------------------------------------------–> -\def\tkzMarkAngles{\pgfutil@ifnextchar[{\tkz@MarkAngles}{\tkz@MarkAngles[]}} -\def\tkz@MarkAngles[#1](#2){% -\xdef\tkz@optma{#1} - \begingroup - \let\next\tkz@multiMA - \next#2 \@nil % -\endgroup -} -% fin de \tkzMarkAngle -%<--------------------------------------------------------------------------–> -% FillAngle -%<--------------------------------------------------------------------------–> -\pgfkeys{/tkzFill/.cd, - size/.store in = \tkz@size, - size = 1 cm, - /tkzFill/.search also = {/tikz} - } - -\def\tkzFillAngle{\pgfutil@ifnextchar[{\tkz@FillAngle}{\tkz@FillAngle[]}} -\def\tkz@FillAngle[#1](#2,#3,#4){% -\begingroup -\pgfqkeys{/tkzFill}{#1} - \tkzFindSlopeAngle(#3,#2)\tkzGetAngle{tkz@dirOne} - \tkzFindSlopeAngle(#3,#4)\tkzGetAngle{tkz@dirTwo} - \tkzNormalizeAngle(\tkz@dirOne,\tkz@dirTwo) - \path[shift = {(#3)},/tkzFill/.cd,#1]% - (#3) -- (\tkz@FirstAngle:\tkz@size) arc% - (\tkz@FirstAngle:\tkz@SecondAngle:\tkz@size)--cycle; -\endgroup -} -%<--------------------------------------------------------------------------–> -% multiple -\def\tkz@multiFA#1 #2\@nil{\protected@edef\tkz@temp{% - \noexpand \tkzFillAngle[\tkz@optfa](#1)}% - \tkz@temp% - \def\tkz@nextArg{#2}% - \ifx\tkzutil@empty\tkz@nextArg - \let\next\@gobble - \fi - \next#2\@nil -} -%<--------------------------------------------------------------------------–> -\def\tkzFillAngles{\pgfutil@ifnextchar[{\tkz@MFillAngles}{\tkz@MFillAngles[]}} -\def\tkz@MFillAngles[#1](#2){% -\xdef\tkz@optfa{#1} -\begingroup - \let\next\tkz@multiFA - \next#2 \@nil % -\endgroup -} -%<------------------------- Label on angle -------------------------------–> -\pgfkeys{/tkzlabelangle/.cd, - dist/.store in = \tkzlabeldist, - angle/.store in = \tkzlabelangle, - dist = 1, - angle = {}, - /tkzlabelangle/.search also={/tikz} -} -\def\tkzLabelAngle{\pgfutil@ifnextchar[{\tkz@LabelAngle}{\tkz@LabelAngle[]}} -\def\tkz@LabelAngle[#1](#2,#3,#4)#5{%2016 added normalize from karu's code -\begingroup - \pgfqkeys{/tkzlabelangle}{#1} - \ifx\tkzutil@empty\tkzlabelangle% no value so calc angle of bisector - \tkzFindSlopeAngle(#3,#2)\tkzGetAngle{tkz@dirOne} - \tkzFindSlopeAngle(#3,#4)\tkzGetAngle{tkz@dirTwo} - \tkzNormalizeAngle(\tkz@dirOne,\tkz@dirTwo) - \edef\tkzlabelAngle{\fpeval{(\tkz@SecondAngle+\tkz@FirstAngle)/2}} - \fi - \path (#3) --+(\tkzlabelAngle:\tkzlabeldist) node[/tkzlabelangle/.cd,#1] {#5}; -\endgroup -} -%<--------------------------------------------------------------------------–> -%<--------------------------------------------------------------------------–> -% multiple labels -\def\tkz@multiLBA#1 #2\@nil{% - \protected@edef\tkz@temp{ - \noexpand \tkzLabelAngle[\tkz@optlba](#1){\tkz@labelangle}}\tkz@temp% - \def\tkz@nextArg{#2}% - \ifx\tkzutil@empty\tkz@nextArg - \let\next\@gobble - \fi - \next#2\@nil -} -% %<--------------------------------------------------------------------- -\def\tkzLabelAngles{\pgfutil@ifnextchar[{\tkz@LabelAngles}{% - \tkz@LabelAngles[]}} -\def\tkz@LabelAngles[#1](#2)#3{% - \def\tkz@optlba{#1} - \def\tkz@labelangle{#3} - \begingroup - \let\next\tkz@multiLBA - \next#2 \@nil % - \endgroup -} -%<----------------------------------------------------------------------- -% Symbole droites perpendiculaires -%<---------------------------------------------------------------------- -\pgfkeys{/tkzrightangle/.cd, - norm tkz code/.is if = normtkzcode@execute, - german/.code = \normtkzcode@executefalse, - size/.store in = \tkz@ra@size, - dotsize/.store in = \tkz@dotsize, - size = .25, - dotsize = 3 pt, - /tkzrightangle/.search also={/tikz}, -} -\newcommand*{\tkzMarkRightAngle}[1][]{\tkz@RightAngle[#1]} -\def\tkz@RightAngle[#1](#2,#3,#4){% -\begingroup -\normtkzcode@executetrue -\pgfqkeys{/tkzrightangle}{#1} - \tkzpointnormalised{\pgfpointdiff{\pgfpointanchor{#3}{center}}{% - \pgfpointanchor{#2}{center}}} - \tkz@ax=\pgf@x\relax% - \tkz@ay=\pgf@y\relax% - \tkzpointnormalised{\pgfpointdiff{\pgfpointanchor{#3}{center}}{% - \pgfpointanchor{#4}{center}}} - \tkz@bx=\pgf@x\relax% - \tkz@by=\pgf@y\relax% - \ifnormtkzcode@execute% - \draw[/tkzrightangle/.cd,#1] - (#3) --++( 28.45274*\tkz@ra@size\tkz@ax , 28.45274*\tkz@ra@size\tkz@ay) - --++( 28.45274*\tkz@ra@size\tkz@bx , 28.45274*\tkz@ra@size\tkz@by) - --++(-28.45274*\tkz@ra@size\tkz@ax ,-28.45274*\tkz@ra@size\tkz@ay) - -- (#3); - \else% - % find angles - \tkzFindSlopeAngle(#3,#2)\tkzGetAngle{tkz@dirOne} - \tkzFindSlopeAngle(#3,#4)\tkzGetAngle{tkz@dirTwo} - \tkzNormalizeAngle(\tkz@dirOne,\tkz@dirTwo) - \edef\tkzCircleAngle{\fpeval{(\tkz@SecondAngle+\tkz@FirstAngle)/2}} - \tkzDrawArcRAN[/tkzrightangle/.cd,#1](#3,\tkz@ra@size)% - (\tkz@FirstAngle,\tkz@SecondAngle) - \path (#3) --+ (\tkzCircleAngle:\tkz@ra@size/2) - node[fill,circle,minimum size=\tkz@dotsize, - inner sep=0 pt,/tkzrightangle/.cd,#1] {}; -\fi% -\endgroup -} -%<--------------------------------------------------------------------------–> -\def\tkz@multiRA#1 #2\@nil{% -\protected@edef\tkz@temp{ - \noexpand \tkzMarkRightAngle[\tkz@optRA](#1)}\tkz@temp% -\def\tkz@nextArg{#2}% - \ifx\tkzutil@empty\tkz@nextArg - \let\next\@gobble - \fi -\next#2\@nil -} -%<--------------------------------------------------------------------------–> -\def\tkzMarkRightAngles{\pgfutil@ifnextchar[{\tkz@RightAngles}{% - \tkz@RightAngles[]}} -\def\tkz@RightAngles[#1](#2){% -\xdef\tkz@optRA{#1} -\begingroup - \let\next\tkz@multiRA - \next#2 \@nil % -\endgroup -} - -\makeatother -\endinput \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-arcs.tex b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-arcs.tex deleted file mode 100644 index 2302fbbc615..00000000000 --- a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-arcs.tex +++ /dev/null @@ -1,178 +0,0 @@ -% tkz-obj-eu-arcs.tex -% Copyright 2020 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. -% The latest version of this license is in -% 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/23} -\typeout{2020/03/23 3.06c tkz-obj-eu-arcs.tex} -\makeatletter -%<------------------------------ Arcs -------------------------------------– -% options : delta -% \def\tkz@delta{0} -% \tikzset{arc style/.style={#1}} -% \pgfkeys{/tikz/.cd,delta/.code={\def\tkz@delta{#1}}} -\tikzset{arc style/.style={gray,thin}} -\gdef\tkz@numa{0} -\pgfkeys{/tkzdrawarc/.cd, - type/.is choice, - type/towards/.code = \def\tkz@numa{0}, - type/rotate/.code = \def\tkz@numa{1}, - type/angles/.code = \def\tkz@numa{2}, - type/R/.code = \def\tkz@numa{3}, - type/R with nodes/.code = \def\tkz@numa{4}, - towards/.style = {type=towards}, - rotate/.style = {type=rotate}, - R/.style = {type=R}, - angles/.style = {type=angles}, - R with nodes/.style = {type=R with nodes}, - diameter/.code = {}, - arc/.code = {}, - size/.code = {}, - mark/.code = {}, - mkpos/.code = {}, - mksize/.code = {}, - mkcolor/.code = {}, - type/.default = towards, - delta/.store in = \tkz@delta, - delta = 0, - /tkzdrawarc/.search also = {/tikz} -} -\def\tkzDrawArc{\pgfutil@ifnextchar[{\tkz@DrawArc}{\tkz@DrawArc[]}} -\def\tkz@DrawArc[#1](#2,#3)(#4){% -\begingroup -\pgfqkeys{/tkzdrawarc}{#1} -\ifcase\tkz@numa% - \tkzDrawArcTowards[#1](#2,#3)(#4) -\or% 1 - \tkzDrawArcRotate[#1](#2,#3)(#4) -\or% 2 - \tkzDrawArcAngles[#1](#2,#3)(#4) -\or% 3 - \tkzDrawArcRAngles[#1](#2,#3)(#4) - \or% 4 - \tkzDrawArcR[#1](#2,#3)(#4) -\fi -\endgroup -} -%<--------------------------------------------------------------------------–> -% ARC nodes #2 center #3 first point last point #4 -% delta un peu plus à chaque extrémité -% example : \tkzDrawArc(A,B)(C) -%<--------------------------------------------------------------------------–> -\def\tkzDrawArcTowards{\pgfutil@ifnextchar[{\tkz@DrawArcN}{\tkz@DrawArcN[]}} -\def\tkz@DrawArcN[#1](#2,#3)(#4){% -\begingroup - \tkzCalcLength(#2,#3)\tkzGetLength{tkz@radius} - \tkzFindSlopeAngle(#2,#3)\tkzGetAngle{tkz@FirstAngle} - \tkzFindSlopeAngle(#2,#4)\tkzGetAngle{tkz@SecondAngle} - \tkz@DrawArcRAngles[#1](#2,\tkz@radius pt)(\tkz@FirstAngle,\tkz@SecondAngle) -\endgroup -} -%<--------------------------------------------------------------------------–> -% nodes #2 center #3 first point rotate #4 with Angle -% delta un peu plus à chaque extrémité -% tkzDrawArcRotate(O,A)(60) -%<--------------------------------------------------------------------------–> -\def\tkzDrawArcRotate{\pgfutil@ifnextchar[{\tkz@DrawArcRotate}{% - \tkz@DrawArcRotate[]}} -\def\tkz@DrawArcRotate[#1](#2,#3)(#4){% -\begingroup - \tkzCalcLength(#2,#3) \tkzGetLength{tkz@radius} - \tkzFindSlopeAngle(#2,#3) \tkzGetAngle{tkz@FirstA} - \pgfmathadd{\tkz@FirstA}{#4} - \edef\tkz@SecondA{\pgfmathresult} - \pgfmathgreaterthan{#4}{0} - \ifdim\pgfmathresult pt=1 pt\relax% - \tkz@DrawArcRAngles[#1](#2,\tkz@radius pt)(\tkz@FirstA,\tkz@SecondA) - \else - \tkz@DrawArcRAngles[#1](#2,\tkz@radius pt)(\tkz@SecondA,\tkz@FirstA) - \fi - \endgroup -} -%<--------------------------------------------------------------------------–> -% deux angles -% \tkzDrawArcAngles(O,A)(0,60) -%<--------------------------------------------------------------------------–> -\def\tkzDrawArcAngles{\pgfutil@ifnextchar[{\tkz@DrawArcAngles}{% - \tkz@DrawArcAngles[]}} -\def\tkz@DrawArcAngles[#1](#2,#3)(#4,#5){% -\begingroup - \tkzCalcLength(#2,#3) - \tkz@DrawArcRAngles[#1](#2,\tkzLengthResult pt)(#4,#5) -\endgroup -} -%<--------------------------------------------------------------------------–> -% Degree #2 center #4 - #3 radius from #5 (degree) to #6(degree) -%<--------------------------------------------------------------------------–> -\def\tkzDrawArcRwithNodes{\pgfutil@ifnextchar[{\tkz@DrawArcRwithNodes}{% - \tkz@DrawArcRwithNodes[]}} -\def\tkz@DrawArcRwithNodes[#1](#2,#3,#4)(#5,#6){% -\begingroup - \tkzCalcLength(#3,#4) - \tkzFindSlopeAngle(#2,#5)\tkzGetAngle{tkz@FirstAngle} - \tkzFindSlopeAngle(#2,#6)\tkzGetAngle{tkz@SecondAngle} - \tkz@DrawArcRAngles[#1](#2,\tkzLengthResult)(\tkz@FirstAngle,\tkz@SecondAngle) -\endgroup -} -%<--------------------------------------------------------------------------–> -% Nodes R #2 center #3 radius en cm from #4(node) to #5(node) -% \tkzDrawArcR(O,2 cm)(A,B) -%<--------------------------------------------------------------------------–> -\def\tkzDrawArcR{\pgfutil@ifnextchar[{\tkz@DrawArcR}{\tkz@DrawArcR[]}} -\def\tkz@DrawArcR[#1](#2,#3)(#4,#5){% -\begingroup - \tkzFindSlopeAngle(#2,#4)\tkzGetAngle{tkz@FirstAngle} - \tkzFindSlopeAngle(#2,#5)\tkzGetAngle{tkz@SecondAngle} - \tkz@DrawArcRAngles[#1](#2,#3)(\tkz@FirstAngle,\tkz@SecondAngle) -\endgroup -} -%<--------------------------------------------------------------------------–> -%<--------------------------------------------------------------------------–> -% #1 center #2 radius #4 first angle (degree) #5 second angle (degree) -% angles 0 .. 180 or -180 .. 0 -%<--------------------------------------------------------------------------–> -% example : \tkzDrawArc(A,2 cm)(30,90) -\def\tkzDrawArcRAngles{\pgfutil@ifnextchar[{\tkz@DrawArcRAngles}{% - \tkz@DrawArcRAngles[]}} -\def\tkz@DrawArcRAngles[#1](#2,#3)(#4,#5){% - \begingroup - \pgfmathparse{#4}\edef\tkz@FirstAngle{\pgfmathresult}% - \pgfmathparse{#5}\edef\tkz@SecondAngle{\pgfmathresult}% - \pgfmathgreaterthan{\tkz@FirstAngle}{0} - \ifdim\pgfmathresult pt=1 pt\relax% - \pgfmathgreaterthan{\tkz@FirstAngle}{\tkz@SecondAngle} - \ifdim\pgfmathresult pt=1 pt\relax% - \pgfmathsubtract{\tkz@FirstAngle}{360} - \edef\tkz@FirstAngle{\pgfmathresult}% - \fi - \else - \pgfmathgreaterthan{\tkz@FirstAngle}{\tkz@SecondAngle} - \ifdim\pgfmathresult pt=1 pt\relax% - \pgfmathadd{\tkz@SecondAngle}{360} - \edef\tkz@SecondAngle{\pgfmathresult}% - \fi - \fi - \pgfmathsubtract{\tkz@FirstAngle}{\tkz@delta} - \edef\tkz@FirstAngle{\pgfmathresult}% - \pgfmathadd{\tkz@SecondAngle}{\tkz@delta} - \edef\tkz@SecondAngle{\pgfmathresult} - \draw[shift = {(#2)},arc style,/tkzdrawarc/.cd,#1]% - (\tkz@FirstAngle:#3) arc (\tkz@FirstAngle:\tkz@SecondAngle:#3); -\endgroup -} -%<--------------------------------------------------------------------------–> - -\makeatother -\endinput \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-axesmin.tex b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-axesmin.tex new file mode 100644 index 00000000000..2c230a6f074 --- /dev/null +++ b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-axesmin.tex @@ -0,0 +1,171 @@ +% tkz-obj-eu-axesmin.tex +% 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. +% The latest version of this license is in +% 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. + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-obj-eu-axesmin} + +\makeatletter +\newif\ifinteger +\def\removedot#1.{#1} +\newcommand\tkzgetinteger[1]{\expandafter\tkz@getinteger#1.\@nil} +\def\tkz@getinteger#1.#2\@nil{% + \ifx\empty#2\empty + \integertrue + \else + \ifnum\removedot#2=0 + \integertrue + \else + \integerfalse + \fi + \fi +} + +%<--------------------------------------------------------------------------–> +% Setup axe +%<--------------------------------------------------------------------------–> +\pgfkeys{tkzaxis/.cd, + line width/.code = \xdef\tkz@sua@lw{#1}, + color/.code = \xdef\tkz@sua@color{#1}, + tickwd/.code = \xdef\tkz@sua@tickwd{#1}, + ticka/.code = \xdef\tkz@sua@ticka{#1}, + tickb/.code = \xdef\tkz@sua@tickb{#1}, + line width = \tkz@init@lw, + color = \tkz@init@color, + tickwd = \tkz@init@tickwd, + ticka = \tkz@init@ticka, + tickb = \tkz@init@tickb +} + +\def\tkzSetUpAxis{\pgfutil@ifnextchar[{\tkz@SetUpAxis}{\tkz@SetUpAxis[]}} +\def\tkz@SetUpAxis[#1]{% +\begingroup +\pgfqkeys{/tkzaxis}{#1} +\global\let\tkz@init@lw\tkz@sua@lw +\global\let\tkz@init@gradsize\tkz@sua@gradsize +\global\let\tkz@init@color\tkz@sua@color +\global\let\tkz@init@tickwd\tkz@sua@tickwd +\global\let\tkz@init@ticka\tkz@sua@ticka +\global\let\tkz@init@tickb\tkz@sua@tickb +\endgroup +} +%<--------------------------------------------------------------------------–> +% tkzDrawX todo améliorer les unités +% sans doute à revoir loop from 0 to i then calcul dans la boucle de la position +% et de l'affichage +%<--------------------------------------------------------------------------–> +\pgfkeys{% + /tkzdrawX/.cd, + color/.store in = \tkz@X@color, + label/.store in = \tkz@X@label, + right space/.store in = \tkz@axe@rxspace, + left space/.store in = \tkz@axe@lxspace, + step/.code = {\edef\tkz@posnext{\fpeval{#1}}}, + color = \tkz@init@color, + label = \tkz@init@xlabel, + step = \tkz@init@xstep, + right space = \tkz@init@rightspace, %??? + left space = \tkz@init@leftspace, + noticks/.is if = tkz@X@noticks, + noticks/.default = true, + noticks = true, + tickwd/.store in = \tkz@X@tickwd, + tickup/.store in = \tkz@X@tickup, + tickdn/.store in = \tkz@X@tickdn, + tickwd = \tkz@init@tickwd, + tickup = \tkz@init@ticka, + tickdn = \tkz@init@tickb, + /tkzdrawX/.search also={/tikz}, + } + +\def\tkzDrawX{\pgfutil@ifnextchar[{\tkz@DrawX}{\tkz@DrawX[]}} +\def\tkz@DrawX[#1]{ +\begingroup% +\pgfqkeys{/tkzdrawX}{#1} +\edef\tkz@posmax{\fpeval{trunc(\tkz@xb,\tkz@init@xdec)}} +\edef\tkz@posmin{\fpeval{trunc(\tkz@xa,\tkz@init@xdec)}} +\edef\tkz@xbsup{\fpeval{\tkz@xb+\tkz@axe@rxspace}} +\edef\tkz@xainf{\fpeval{\tkz@xa-\tkz@axe@lxspace}} +\path (\tkz@xainf,0)--(\tkz@xbsup,0) node(tkz@xline){}; +\draw[xaxe style, + color = \tkz@X@color, + /tkzdrawX/.cd, #1] (\tkz@xainf,0)--(\tkz@xbsup,0) + node[ xlabel style, + /tkzdrawX/.cd, + #1]{\tkz@X@label}; + \iftkz@X@noticks + \else + \edef\tkz@posmax{\fpeval{trunc(\tkz@posmax,\tkz@init@xdec)}} + \edef\tkz@posnext{\fpeval{\tkz@posnext/\tkz@init@xstep+\tkz@posmin}} + \foreach \pos in {\tkz@posmin,...,\tkz@posmax}{% + \edef\tkz@pos{\fpeval{\pos*1}}% ??? + \draw[ color = \tkz@X@color, line width = \tkz@X@tickwd, + shift = {(\tkz@pos,0)}]% + (0pt,\tkz@X@tickup)--(0pt,-\tkz@X@tickdn); + } + \fi +\endgroup +} +%<--------------------------------------------------------------------------–> +% tkzDrawY todo améliorer les unités +%<--------------------------------------------------------------------------–> +\pgfkeys{% + /tkzdrawY/.cd, + color/.store in = \tkz@Y@color, + label/.store in = \tkz@Y@label, + up space/.store in = \tkz@axe@uyspace, + down space/.store in = \tkz@axe@dyspace, + step/.code = {\edef\tkz@posnext{\fpeval{#1}}}, + color = \tkz@init@color, + label = \tkz@init@ylabel, + step = \tkz@init@ystep, + up space = \tkz@init@upspace, + down space = \tkz@init@downspace, + noticks/.is if = tkz@Y@noticks, + noticks/.default = true, + noticks = true, + tickwd/.store in = \tkz@Y@tickwd, + ticklt/.store in = \tkz@Y@ticklt, + tickrt/.store in = \tkz@Y@tickrt, + tickwd = \tkz@init@tickwd, + ticklt = \tkz@init@tickb, + tickrt = \tkz@init@ticka, + /tkzdrawY/.search also={/tikz}, + } + +\def\tkzDrawY{\pgfutil@ifnextchar[{\tkz@DrawY}{\tkz@DrawY[]}} +\def\tkz@DrawY[#1]{% +\begingroup +\pgfkeys{/tkzdrawY/.cd,step = \tkz@init@ystep} +\pgfqkeys{/tkzdrawY}{#1} +\edef\tkz@posmax{\fpeval{trunc(\tkz@yb,\tkz@init@ydec)}} +\edef\tkz@posmin{\fpeval{trunc(\tkz@ya,\tkz@init@ydec)}} +\edef\tkz@ybsup{\fpeval{\tkz@yb+\tkz@axe@uyspace}} +\edef\tkz@yainf{\fpeval{\tkz@ya-\tkz@axe@dyspace}} +\path (0,\tkz@yainf)--(0,\tkz@ybsup) node(tkz@yline){}; +\draw[color = \tkz@Y@color, + yaxe style,/tkzdrawY/.cd,#1] (0,\tkz@yainf)--(0,\tkz@ybsup) + node[ylabel style,/tkzdrawY/.cd,#1]{\tkz@Y@label}; + \iftkz@Y@noticks + \else + \edef\tkz@posmax{\fpeval{trunc(\tkz@posmax,\tkz@init@ydec)}} + \edef\tkz@posnext{\fpeval{\tkz@posnext/\tkz@init@ystep+\tkz@posmin}} + \foreach \tkz@pos in {\tkz@posmin,\tkz@posnext,...,\tkz@posmax}{% + \draw[color = \tkz@Y@color, + line width = \tkz@Y@tickwd, + shift = {(0,\tkz@pos)}]% + (\tkz@Y@tickrt,0pt)--(-\tkz@Y@ticklt,0pt);} + + \fi +\endgroup} +\makeatother +\endinput \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-circles-by.tex b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-circles-by.tex new file mode 100644 index 00000000000..c4824009cea --- /dev/null +++ b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-circles-by.tex @@ -0,0 +1,161 @@ +% tkz-obj-eu-circles.tex +% 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. +% The latest version of this license is in +% 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. + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-obj-eu-circles.tex} +\makeatletter +%<--------------------------------------------------------------------------–> +% tkzCircle center and one point +%<--------------------------------------------------------------------------–> +% attention radius circle is defined by center and a point on the circle +% R defined by center and the value of the radius +% no need to define a circle with R tikz uses this method. +% through instead of radius +\def\tkz@numcby{0} +\pgfkeys{/tkzDefCircleBy/.cd, + translation/.code args = {from #1 to #2} { \def\tkz@numcby{0} + \def\tkzfrom{#1} + \def\tkzto{#2}}, + homothety/.code args = {center #1 ratio #2}{ \def\tkz@numcby{1} + \def\tkzcenter{#1} + \def\tkzratio{#2}}, + reflection/.code args = {over #1--#2}{ \def\tkz@numcby{2} + \def\tkzdeb{#1} + \def\tkzfin{#2}}, + symmetry/.code args = {center #1}{ \def\tkz@numcby{3} + \def\tkzcenter{#1}}, + rotation/.code args = {center #1 angle #2}{ \def\tkz@numcby{4} + \def\tkzcenter{#1} + \def\tkzangle{#2}}, + orthogonal from/.code args = {#1}{ \def\tkz@numcby{5} + \def\tkz@ptfrom{#1}}, + orthogonal through/.code args = {#1 and #2}{ \def\tkz@numcby{6} + \def\tkz@ptone{#1} + \def\tkz@pttwo{#2}}, + inversion/.code args={center #1 through #2}{ \def\tkz@numcby{7} + \def\tkzcenter{#1} + \def\tkzpoint{#2}} + } +\def\tkzDefCircleBy{\pgfutil@ifnextchar[{\tkz@DefCircleBy}{\tkz@DefCircleBy[]}} +\def\tkz@DefCircleBy[#1](#2){% +\begingroup +\pgfqkeys{/tkzDefCircleBy}{#1} +\ifcase\tkz@numcby% + \tkzDefCircleTranslation(#2)% + \or% 1 + \tkzDefCircleHomothety(#2) + \or% 2 + \tkzDefCircleReflection(#2) + \or% 3 + \tkzDefCircleSymmetry(#2) + \or% 4 + \tkzDefCircleRotation(#2) + \or% 5 + \tkzDefOrthogonalCircle(#2,\tkz@ptfrom) + \or% 6 + \tkzDefOrthoThroughCircle(#2,\tkz@ptone,\tkz@pttwo) + \or% 7 + \tkzDefInversionCircle(#2,\tkzcenter,\tkzpoint) + \fi +\endgroup +} +%<--------------------------------------------------------------------------–> +\def\tkzDefCircleTranslation(#1,#2){% +\begingroup + \tkzUTranslation(\tkzfrom,\tkzto)(#1) + \pgfnodealias{tkzFirstPointResult}{tkzPointResult} + \tkzUTranslation(\tkzfrom,\tkzto)(#2) + \pgfnodealias{tkzSecondPointResult}{tkzPointResult} +\endgroup +} +%<--------------------------------------------------------------------------–> +\def\tkzDefCircleHomothety(#1,#2){% +\begingroup + \tkzUHomo(\tkzcenter,\tkzratio)(#1) + \pgfnodealias{tkzFirstPointResult}{tkzPointResult} + \tkzUHomo(\tkzcenter,\tkzratio)(#2) + \pgfnodealias{tkzSecondPointResult}{tkzPointResult} +\endgroup +} +%<--------------------------------------------------------------------------–> +\def\tkzDefCircleReflection(#1,#2){% +\begingroup + \tkzUSymOrth(\tkzdeb,\tkzfin)(#1) + \pgfnodealias{tkzFirstPointResult}{tkzPointResult} + \tkzUSymOrth(\tkzdeb,\tkzfin)(#2) + \pgfnodealias{tkzSecondPointResult}{tkzPointResult} +\endgroup +} +%<--------------------------------------------------------------------------–> +\def\tkzDefCircleSymmetry(#1,#2){% +\begingroup + \tkzUCSym(\tkzcenter)(#1) + \pgfnodealias{tkzFirstPointResult}{tkzPointResult} + \tkzUCSym(\tkzcenter)(#2) + \pgfnodealias{tkzSecondPointResult}{tkzPointResult} +\endgroup +} +%<--------------------------------------------------------------------------–> +\def\tkzDefCircleRotation(#1,#2){% +\begingroup + \tkzURotateAngle(\tkzcenter,\tkzangle)(#1) + \pgfnodealias{tkzFirstPointResult}{tkzPointResult} + \tkzURotateAngle(\tkzcenter,\tkzangle)(#2) + \pgfnodealias{tkzSecondPointResult}{tkzPointResult} +\endgroup +} +%<--------------------------------------------------------------------------–> +\def\tkzDefOrthogonalCircle(#1,#2,#3){% +\begingroup + \tkzTgtFromP(#1,#2)(#3) + \tkz@@CalcLengthcm(#1,tkzFirstPointResult){tkzLengthResult} +\endgroup +} +%<--------------------------------------------------------------------------–> +\def\tkzDefOrthoThroughCircle(#1,#2,#3,#4){% +\begingroup + \tkz@@CalcLengthcm(#1,#3){tkz@lnb}% + \edef\tkz@lnc{\fpeval{1/\tkz@lnb}} + \tkzVecKNorm[\tkz@lnc](#1,#3) + \pgfnodealias{tkz@PointResult}{tkzPointResult} + \tkzCircumCenter(tkz@PointResult,#3,#4) + \tkz@@CalcLength(tkzPointResult,#3){tkzLengthResult} +\endgroup +} +%<--------------------------------------------------------------------------–> +\def\tkzDefInversionCircle(#1,#2,#3,#4){% +\begingroup + \tkzInterLC(#3,#1)(#1,#2) \tkzGetPoints{tkz@p1}{tkz@p2} + \tkzUInversePoint(#3,#4)(tkz@p1) + \pgfnodealias{tkzFirstPointResult}{tkzPointResult} + \tkzUInversePoint(#3,#4)(tkz@p2) + \pgfnodealias{tkzSecondPointResult}{tkzPointResult} +\endgroup +} +%<--------------------------------------------------------------------------–> +% \def\tkzDefInversionNegativeCircle(#1,#2,#3,#4){% +% \begingroup +% \tkzInterLC(#3,#1)(#1,#2) \tkzGetPoints{tkz@p1}{tkz@p2} +% \tkzUInversePoint(\tkzcenter,\tkzpoint)(tkz@p1) +% \tkzUCSym(\tkzcenter)(tkzPointResult) +% \pgfnodealias{tkzFirstPointResult}{tkzPointResult} +% \tkzUInversePoint(\tkzcenter,\tkzpoint)(tkz@p2) +% \tkzUCSym(\tkzcenter)(tkzPointResult) +% \pgfnodealias{tkzSecondPointResult}{tkzPointResult} +% \endgroup +% } +%<--------------------------------------------------------------------------–> +% End Def Circle +%<--------------------------------------------------------------------------–> +\makeatother +\endinput \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-circles.tex b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-circles.tex index 78e98afa8fe..b6b2b80005c 100644 --- a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-circles.tex +++ b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-circles.tex @@ -1,5 +1,5 @@ % tkz-obj-eu-circles.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-circles.tex} +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-obj-eu-circles.tex} \makeatletter %<--------------------------------------------------------------------------–> % tkzCircle center and one point @@ -42,7 +39,7 @@ \def\tkz@numc{8}}, spieker/.code = \def\tkz@numc{9}, K/.code = \def\tkz@koeff{#1}, - K = 1, + K = 1, through } \def\tkzDefCircle{\pgfutil@ifnextchar[{\tkz@DefCircle}{\tkz@DefCircle[]}} @@ -72,13 +69,40 @@ \fi \endgroup } +%for compatibility +%<--------------------------------------------------------------------------–> +\def\tkzDefCircleR(#1,#2){% +\begingroup + \edef\tkzLengthResult{\fpeval{round(#2,5)}} + \global\let\tkzLengthResult\tkzLengthResult + \tkzRenamePoint(#1){tkzPointResult} +\endgroup +} +%<--------------------------------------------------------------------------–> +% Through Circle center and point +%<--------------------------------------------------------------------------–> +\def\tkzDefCircleThrough(#1,#2){% +\begingroup + \tkz@@CalcLengthcm(#1,#2){tkzLengthResult} + \tkzRenamePoint(#1){tkzPointResult} +\endgroup +} +%<--------------------------------------------------------------------------–> +% Diameter Circle +%<--------------------------------------------------------------------------–> +\def\tkzDefCircleD(#1,#2){% +\begingroup + \tkzDefMidPoint(#1,#2) + \tkz@@CalcLengthcm(#1,tkzPointResult){tkzLengthResult} +\endgroup +} %<--------------------------------------------------------------------------–> % Circum Circle %<--------------------------------------------------------------------------–> \def\tkzDefCircumCircle(#1,#2,#3){% \begingroup \tkzCircumCenter(#1,#2,#3) - \tkzCalcLength(#1,tkzPointResult) + \tkz@@CalcLengthcm(#1,tkzPointResult){tkzLengthResult}%3.06 add [cm] \endgroup } %<--------------------------------------------------------------------------–> @@ -90,7 +114,7 @@ \pgfnodealias{tkz@incenter}{tkzPointResult} \tkzUProjection(#1,#3)(tkz@incenter) \pgfnodealias{tkzSecondPointResult}{tkzPointResult} - \tkzCalcLength(tkzPointResult,tkz@incenter) + \tkz@@CalcLengthcm(tkzPointResult,tkz@incenter){tkzLengthResult} \pgfnodealias{tkzPointResult}{tkz@incenter} \pgfnodealias{tkzFirstPointResult}{tkz@incenter} \endgroup @@ -104,7 +128,7 @@ \pgfnodealias{tkz@excenter}{tkzPointResult} \tkzUProjection(#1,#3)(tkz@excenter) \pgfnodealias{tkzSecondPointResult}{tkzPointResult} - \tkzCalcLength(tkzPointResult,tkz@excenter)% for tkzGetLength + \tkz@@CalcLengthcm(tkzPointResult,tkz@excenter){tkzLengthResult}% for tkzGetLength \pgfnodealias{tkzPointResult}{tkz@excenter} \pgfnodealias{tkzFirstPointResult}{tkz@excenter} \endgroup @@ -128,7 +152,7 @@ \tkzDefMidPoint(#2,#3) \pgfnodealias{tkz@e2}{tkzPointResult} \tkzDefMidPoint(#1,#3) \pgfnodealias{tkz@e3}{tkzPointResult} \tkzCircumCenter(tkz@e1,tkz@e2,tkz@e3) - \tkzCalcLength(tkzPointResult,tkz@e1) + \tkz@@CalcLengthcm(tkzPointResult,tkz@e1){tkzLengthResult} \endgroup } \let\tkzDefNinePointsCircle\tkzEulerCircle% @@ -139,7 +163,7 @@ \tkzEulerCenter(#1,#2,#3) \pgfnodealias{eur@pta}{tkzPointResult} \tkzDefMidPoint(#1,#2) - \tkzCalcLength(eur@pta,tkzPointResult) + \tkz@@CalcLengthcm(eur@pta,tkzPointResult){tkzLengthResult} \endgroup } %<--------------------------------------------------------------------------–> @@ -152,7 +176,7 @@ \tkz@VecK[\tkz@koeff/(\tkz@koeff-1)](#1,#2) \pgfnodealias{tkzSecondPointResult}{tkzPointResult} \tkzDefMidPoint(tkzFirstPointResult,tkzSecondPointResult) - \tkzCalcLength(tkzPointResult,tkzFirstPointResult) + \tkz@@CalcLengthcm(tkzPointResult,tkzFirstPointResult){tkzLengthResult} \endgroup } %<--------------------------------------------------------------------------–> @@ -172,7 +196,7 @@ \tkz@VecK[\tkz@koeff/(\tkz@koeff-1)](#2,#3) \pgfnodealias{apo@ptb}{tkzPointResult} \tkzDefMidPoint(apo@pta,apo@ptb) - \tkzCalcLength(tkzPointResult,apo@pta) + \tkz@@CalcLengthcm(tkzPointResult,apo@pta){tkzLengthResult} \endgroup } %<--------------------------------------------------------------------------–> @@ -212,18 +236,18 @@ \def\tkzDefOrthogonalCircle(#1,#2,#3){% \begingroup \tkzTgtFromP(#1,#2)(#3) - \tkzCalcLength[cm](#1,tkzFirstPointResult) + \tkz@@CalcLengthcm(#1,tkzFirstPointResult){tkzLengthResult} \endgroup } %<--------------------------------------------------------------------------–> \def\tkzDefOrthoThroughCircle(#1,#2,#3,#4){% \begingroup - \tkzCalcLength[cm](#1,#3)\tkzGetLength{tkz@lnb}% - \edef\tkz@lnc{\fpeval{1/\tkz@lnb}} + \tkz@@CalcLengthcm(#1,#3){tkz@lnb}% + \edef\tkz@lnc{\fpeval{1/\tkz@lnb}} \tkzVecKNorm[\tkz@lnc](#1,#3) \pgfnodealias{tkz@PointResult}{tkzPointResult} \tkzCircumCenter(tkz@PointResult,#3,#4) - \tkzCalcLength(tkzPointResult,#3) + \tkz@@CalcLength(tkzPointResult,#3){tkzLengthResult} \endgroup } %<--------------------------------------------------------------------------–> @@ -235,11 +259,33 @@ \pgfnodealias{tkz@spka}{tkzPointResult} \tkzDefMidPoint(#1,#2) \tkzUProjection(#1,#2)(tkzPointResult) - \tkzCalcLength(tkz@spka,tkzPointResult) + \tkz@@CalcLength(tkz@spka,tkzPointResult){tkzLengthResult} +\endgroup +} +%<--------------------------------------------------------------------------–> +\def\tkzDefInversionCircle(#1,#2,#3,#4){% +\begingroup + \tkzInterLC(#3,#1)(#1,#2) \tkzGetPoints{tkz@p1}{tkz@p2} + \tkzUInversePoint(#3,#4)(tkz@p1) + \pgfnodealias{tkzFirstPointResult}{tkzPointResult} + \tkzUInversePoint(#3,#4)(tkz@p2) + \pgfnodealias{tkzSecondPointResult}{tkzPointResult} +\endgroup +} +%<--------------------------------------------------------------------------–> +\def\tkzDefInversionNegativeCircle(#1,#2,#3,#4){% +\begingroup + \tkzInterLC(#3,#1)(#1,#2) \tkzGetPoints{tkz@p1}{tkz@p2} + \tkzUInversePoint(\tkzcenter,\tkzpoint)(tkz@p1) + \tkzUCSym(\tkzcenter)(tkzPointResult) + \pgfnodealias{tkzFirstPointResult}{tkzPointResult} + \tkzUInversePoint(\tkzcenter,\tkzpoint)(tkz@p2) + \tkzUCSym(\tkzcenter)(tkzPointResult) + \pgfnodealias{tkzSecondPointResult}{tkzPointResult} \endgroup } %<--------------------------------------------------------------------------–> % End Def Circle %<--------------------------------------------------------------------------–> - \makeatother +\makeatother \endinput \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-compass.tex b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-compass.tex index 136fee4522d..a5eaa32e06d 100644 --- a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-compass.tex +++ b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-compass.tex @@ -1,5 +1,5 @@ % tkz-obj-eu-compass.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-compass.tex} +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-obj-eu-compass.tex} \makeatletter %<--------------------------------------------------------------------------–> % Author Alain Matthes @@ -27,21 +24,18 @@ % Setup Compass %<--------------------------------------------------------------------------–> \pgfkeys{tkzsucompass/.cd, - line width/.code = {\global\edef\tkz@compass@lw{#1}}, - color/.code = {\global\edef\tkz@compass@color{#1}}, - style/.code = {\global\edef\tkz@compass@style{#1}}, - } + line width/.store in = \tkz@compass@lw, + color/.store in = \tkz@compass@color, + style/.store in = \tkz@compass@style, + line width = \tkz@euc@compasswidth, + color = \tkz@euc@compasscolor, + style = \tkz@euc@compassstyle, + /tkzsucompass/.search also = {/tikz,/tkzcompass} + } %<--------------------------------------------------------------------------–> -\def\tkzSetUpCompass{\pgfutil@ifnextchar[{\tkz@SetUpCompass}{% remove tkzActivOff 3.03 - \tkz@SetUpCompass[]}} +\def\tkzSetUpCompass{\pgfutil@ifnextchar[{\tkz@SetUpCompass}{\tkz@SetUpCompass[]}} %<--------------------------------------------------------------------------–> \def\tkz@SetUpCompass[#1]{% -\pgfkeys{tkzsucompass/.cd, - line width = \tkz@euc@compasswidth, - color = \tkz@euc@compasscolor, - style = \tkz@euc@compassstyle, - /tkzsucompass/.search also = {/tikz} -} \pgfqkeys{/tkzsucompass}{#1} \tikzset{compass style/.style={color = \tkz@compass@color, line width = \tkz@compass@lw, @@ -59,31 +53,25 @@ % style traits pleins %<--------------------------------------------------------------------------–> - \pgfkeys{ - /tkzcompass/delta/.code = {\def\tkz@delta{#1}}, - /tkzcompass/length/.code = {\def\tkz@length{#1}}, - /tkzcompass/ratio/.code = {\def\tkz@ratio{#1}}, + \pgfkeys{/tkzcompass/.cd, + delta/.store in = \tkz@delta, + length/.store in = \tkz@length, + length = 1, + delta = 0, /tkzcompass/.unknown/.code = {\let\searchname=\pgfkeyscurrentname - \pgfkeysalso{\searchname/.try=#1, - /tikz/\searchname/.retry=#1}} + \pgfkeysalso{\searchname/.try=#1, /tikz/\searchname/.retry=#1}} } \def\tkzCompass{\pgfutil@ifnextchar[{\tkz@Compass}{\tkz@Compass[]}} \def\tkz@Compass[#1](#2,#3){% \begingroup -\pgfkeys{% - tkzcompass/.cd, - length = 1, - delta = 0, - ratio = .5 - } \pgfkeys{tkzcompass/.cd,#1} -\tkzCalcLength(#2,#3)\tkzGetLength{tkz@tempLen} +\tkz@@CalcLength(#2,#3){tkz@tempLen} \ifnum\tkz@delta=0 % \pgfmathsetmacro{\tkz@delta}{min(deg(\tkz@length cm/ \tkz@tempLen pt),180)/2} \fi \tkzFindSlopeAngle(#2,#3)\tkzGetAngle{tkz@angle}% -\draw[shift ={(#2)},/tkzcompass/.cd,compass style,#1]% +\draw[shift ={(#2)},compass style,/tkzcompass/.cd,#1]% (\tkz@angle-\tkz@delta:\tkz@tempLen pt)% arc (\tkz@angle-\tkz@delta:\tkz@angle+\tkz@delta:\tkz@tempLen pt); \endgroup} @@ -108,4 +96,4 @@ }% \makeatother -\endinput \ No newline at end of file +\endinput \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-draw-angles.tex b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-draw-angles.tex new file mode 100644 index 00000000000..31e77f3f972 --- /dev/null +++ b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-draw-angles.tex @@ -0,0 +1,554 @@ +% tkz-tool-eu-angles.tex +% 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. +% The latest version of this license is in +% 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. + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-tool-eu-angles.tex} +\makeatletter +%<--------------------------------------------------------------------------–> +% tkzSetUpArc +%<--------------------------------------------------------------------------–> +\pgfkeys{/tkzsetuparc/.cd, + color/.store in = \tkz@arc@color, + line width/.store in = \tkz@arc@lw, + style/.store in = \tkz@arc@style, + line width = \tkz@euc@linewidth, + color = \tkz@euc@linecolor, + style = \tkz@euc@linestyle, + /tkzsetuparc/.search also = {/tikz,/tkzcompass}, + } +\def\tkzSetUpArc{\pgfutil@ifnextchar[{\tkz@SetUpArc}{\tkz@SetUpArc[]}} +\def\tkz@SetUpArc[#1]{% +\pgfqkeys{/tkzsetuparc}{#1} +\tikzset{arc style/.style={color = \tkz@arc@color, + line width = \tkz@arc@lw, + style = \tkz@arc@style + }} +}% end setup +%<---------------------------------------------------------------------------> +\newdimen\tkz@arcsize% from julian julian@d-and-j.net +\newdimen\tkz@fillsize +%<--------------------------------------------------------------------------> + +%<------------------------------ Arcs -------------------------------------– +% options : delta +% \def\tkz@delta{0} +% \tikzset{arc style/.style={#1}} +% \pgfkeys{/tikz/.cd,delta/.code={\def\tkz@delta{#1}}} +\gdef\tkz@numa{0} +\pgfkeys{/tkzdrawarc/.cd, + type/.is choice, + type/towards/.code = \def\tkz@numa{0}, + type/rotate/.code = \def\tkz@numa{1}, + type/angles/.code = \def\tkz@numa{2}, + type/R/.code = \def\tkz@numa{3}, + type/R with nodes/.code = \def\tkz@numa{4}, + towards/.style = {type=towards}, + rotate/.style = {type=rotate}, + R/.style = {type=R}, + angles/.style = {type=angles}, + R with nodes/.style = {type=R with nodes}, + diameter/.code = {}, + arc/.code = {}, + size/.code = {}, + mark/.code = {}, + mkpos/.code = {}, + mksize/.code = {}, + mkcolor/.code = {}, + type/.default = towards, + delta/.store in = \tkz@delta, + delta = 0, + /tkzdrawarc/.search also = {/tikz} +} +\def\tkzDrawArc{\pgfutil@ifnextchar[{\tkz@DrawArc}{\tkz@DrawArc[]}} +\def\tkz@DrawArc[#1](#2,#3)(#4){% +\begingroup +\pgfqkeys{/tkzdrawarc}{#1} +\ifcase\tkz@numa% + \tkzDrawArcTowards[#1](#2,#3)(#4) +\or% 1 + \tkzDrawArcRotate[#1](#2,#3)(#4) +\or% 2 + \tkzDrawArcAngles[#1](#2,#3)(#4) +\or% 3 + \tkzDrawArcRAngles[#1](#2,#3)(#4) + \or% 4 + \tkzDrawArcR[#1](#2,#3)(#4) +\fi +\endgroup +} +%<--------------------------------------------------------------------------–> +% ARC nodes #2 center #3 first point last point #4 +% delta un peu plus à chaque extrémité +% example : \tkzDrawArc(A,B)(C) +%<--------------------------------------------------------------------------–> +\def\tkzDrawArcTowards{\pgfutil@ifnextchar[{\tkz@DrawArcN}{\tkz@DrawArcN[]}} +\def\tkz@DrawArcN[#1](#2,#3)(#4){% +\begingroup + \tkz@@CalcLength(#2,#3){tkz@radius} + \tkzFindSlopeAngle(#2,#3)\tkzGetAngle{tkz@FirstAngle} + \tkzFindSlopeAngle(#2,#4)\tkzGetAngle{tkz@SecondAngle} + \tkz@DrawArcRAngles[#1](#2,\tkz@radius pt)(\tkz@FirstAngle,\tkz@SecondAngle) +\endgroup +} +%<--------------------------------------------------------------------------–> +% nodes #2 center #3 first point rotate #4 with Angle +% delta un peu plus à chaque extrémité +% tkzDrawArcRotate(O,A)(60) +%<--------------------------------------------------------------------------–> +\def\tkzDrawArcRotate{\pgfutil@ifnextchar[{\tkz@DrawArcRotate}{% + \tkz@DrawArcRotate[]}} +\def\tkz@DrawArcRotate[#1](#2,#3)(#4){% +\begingroup + \tkz@@CalcLength(#2,#3){tkz@radius} + \tkzFindSlopeAngle(#2,#3) \tkzGetAngle{tkz@FirstA} + \pgfmathadd{\tkz@FirstA}{#4} + \edef\tkz@SecondA{\pgfmathresult} + \pgfmathgreaterthan{#4}{0} + \ifdim\pgfmathresult pt=1 pt\relax% + \tkz@DrawArcRAngles[#1](#2,\tkz@radius pt)(\tkz@FirstA,\tkz@SecondA) + \else + \tkz@DrawArcRAngles[#1](#2,\tkz@radius pt)(\tkz@SecondA,\tkz@FirstA) + \fi + \endgroup +} +%<--------------------------------------------------------------------------–> +% deux angles +% \tkzDrawArcAngles(O,A)(0,60) +%<--------------------------------------------------------------------------–> +\def\tkzDrawArcAngles{\pgfutil@ifnextchar[{\tkz@DrawArcAngles}{% + \tkz@DrawArcAngles[]}} +\def\tkz@DrawArcAngles[#1](#2,#3)(#4,#5){% +\begingroup + \tkz@@CalcLength(#2,#3){tkzLengthResult} + \tkz@DrawArcRAngles[#1](#2,\tkzLengthResult pt)(#4,#5) +\endgroup +} +%<--------------------------------------------------------------------------–> +% Degree #2 center #4 - #3 radius from #5 (degree) to #6(degree) +%<--------------------------------------------------------------------------–> +\def\tkzDrawArcRwithNodes{\pgfutil@ifnextchar[{\tkz@DrawArcRwithNodes}{% + \tkz@DrawArcRwithNodes[]}} +\def\tkz@DrawArcRwithNodes[#1](#2,#3,#4)(#5,#6){% +\begingroup + \tkz@@CalcLength(#3,#4){tkzLengthResult} + \tkzFindSlopeAngle(#2,#5)\tkzGetAngle{tkz@FirstAngle} + \tkzFindSlopeAngle(#2,#6)\tkzGetAngle{tkz@SecondAngle} + \tkz@DrawArcRAngles[#1](#2,\tkzLengthResult)(\tkz@FirstAngle,\tkz@SecondAngle) +\endgroup +} +%<--------------------------------------------------------------------------–> +% Nodes R #2 center #3 radius en cm from #4(node) to #5(node) +% \tkzDrawArcR(O,2)(A,B) +%<--------------------------------------------------------------------------–> +\def\tkzDrawArcR{\pgfutil@ifnextchar[{\tkz@DrawArcR}{\tkz@DrawArcR[]}} +\def\tkz@DrawArcR[#1](#2,#3)(#4,#5){% +\begingroup + \tkzFindSlopeAngle(#2,#4)\tkzGetAngle{tkz@FirstAngle} + \tkzFindSlopeAngle(#2,#5)\tkzGetAngle{tkz@SecondAngle} + \tkz@DrawArcRAngles[#1](#2,#3)(\tkz@FirstAngle,\tkz@SecondAngle) +\endgroup +} +%<--------------------------------------------------------------------------–> +%<--------------------------------------------------------------------------–> +% #1 center #2 radius #4 first angle (degree) #5 second angle (degree) +% angles 0 .. 180 or -180 .. 0 +%<--------------------------------------------------------------------------–> +% example : \tkzDrawArc(A,2)(30,90) +\def\tkzDrawArcRAngles{\pgfutil@ifnextchar[{\tkz@DrawArcRAngles}{% + \tkz@DrawArcRAngles[]}} +\def\tkz@DrawArcRAngles[#1](#2,#3)(#4,#5){% + \begingroup + \pgfmathparse{#4}\edef\tkz@FirstAngle{\pgfmathresult}% + \pgfmathparse{#5}\edef\tkz@SecondAngle{\pgfmathresult}% + \pgfmathgreaterthan{\tkz@FirstAngle}{0} + \ifdim\pgfmathresult pt=1 pt\relax% + \pgfmathgreaterthan{\tkz@FirstAngle}{\tkz@SecondAngle} + \ifdim\pgfmathresult pt=1 pt\relax% + \pgfmathsubtract{\tkz@FirstAngle}{360} + \edef\tkz@FirstAngle{\pgfmathresult}% + \fi + \else + \pgfmathgreaterthan{\tkz@FirstAngle}{\tkz@SecondAngle} + \ifdim\pgfmathresult pt=1 pt\relax% + \pgfmathadd{\tkz@SecondAngle}{360} + \edef\tkz@SecondAngle{\pgfmathresult}% + \fi + \fi + \pgfmathsubtract{\tkz@FirstAngle}{\tkz@delta} + \edef\tkz@FirstAngle{\pgfmathresult}% + \pgfmathadd{\tkz@SecondAngle}{\tkz@delta} + \edef\tkz@SecondAngle{\pgfmathresult} + \draw[shift = {(#2)},arc style,/tkzdrawarc/.cd,#1]% + (\tkz@FirstAngle:#3) arc (\tkz@FirstAngle:\tkz@SecondAngle:#3); +\endgroup +} +%<--------------------------------------------------------------------------–> +\pgfkeys{ + /@tkzmarkarc/.cd, + pos/.store in = \tkz@mkarcpos, + color/.store in = \tkz@mkcolor, + mark/.store in = \tkz@markarcseg, + size/.store in = \tkz@mkarcsize, + color = teal!20, + size = 4pt, + pos = .5, + mark = |, + /@tkzmarkarc/.search also={/tikz}, +} +\def\tkzMarkArc{\pgfutil@ifnextchar[{\tkz@MarkArc}{\tkz@MarkArc[]}} +\def\tkz@MarkArc[#1](#2,#3,#4){% +\begingroup + \pgfqkeys{/@tkzmarkarc}{#1} \def\tkz@mymarkarc{\pgfsetplotmarksize{\tkz@mkarcsize}\pgfuseplotmark{\tkz@markarcseg}} + \tkz@@CalcLength(#2,#3){tkz@radius} + \tkzFindSlopeAngle(#2,#3)\tkzGetAngle{tkz@FirstAngle} + \tkzFindSlopeAngle(#2,#4)\tkzGetAngle{tkz@SecondAngle} + \pgfmathparse{\tkz@FirstAngle}\edef\tkz@FirstAngle{\pgfmathresult}% + \pgfmathparse{\tkz@SecondAngle}\edef\tkz@SecondAngle{\pgfmathresult}% + \pgfmathgreaterthan{\tkz@FirstAngle}{0} + \ifdim\pgfmathresult pt=1 pt\relax% + \pgfmathgreaterthan{\tkz@FirstAngle}{\tkz@SecondAngle} + \ifdim\pgfmathresult pt=1 pt\relax% + \pgfmathsubtract{\tkz@FirstAngle}{360} + \edef\tkz@FirstAngle{\pgfmathresult}% + \fi + \else + \pgfmathgreaterthan{\tkz@FirstAngle}{\tkz@SecondAngle} + \ifdim\pgfmathresult pt=1 pt\relax% + \pgfmathadd{\tkz@SecondAngle}{360} + \edef\tkz@SecondAngle{\pgfmathresult}% + \fi + \fi + \pgfmathsubtract{\tkz@FirstAngle}{\tkz@delta} + \edef\tkz@FirstAngle{\pgfmathresult}% + \pgfmathadd{\tkz@SecondAngle}{\tkz@delta} + \edef\tkz@SecondAngle{\pgfmathresult} + \begin{scope}[decoration={markings, + mark=at position \tkz@mkarcpos with {\tkz@mymarkarc}}] + \path[shift = {(#2)},\tkz@mkcolor,/@tkzmarkarc/.cd,#1,postaction={decorate}]% + (\tkz@FirstAngle:\tkz@radius pt) arc (\tkz@FirstAngle:\tkz@SecondAngle:\tkz@radius pt); + \end{scope} +\endgroup +} + +\def\tkzLabelArc{\pgfutil@ifnextchar[{\tkz@LabelArc}{\tkz@LabelArc[]}} +\def\tkz@LabelArc[#1](#2,#3,#4)#5{% +\begingroup + \pgfqkeys{/@tkzmarkarc}{#1} + \tkz@@CalcLength(#2,#3){tkz@radius} + \tkzFindSlopeAngle(#2,#3)\tkzGetAngle{tkz@FirstAngle} + \tkzFindSlopeAngle(#2,#4)\tkzGetAngle{tkz@SecondAngle} + \pgfmathparse{\tkz@FirstAngle}\edef\tkz@FirstAngle{\pgfmathresult}% + \pgfmathparse{\tkz@SecondAngle}\edef\tkz@SecondAngle{\pgfmathresult}% + \pgfmathgreaterthan{\tkz@FirstAngle}{0} + \ifdim\pgfmathresult pt=1 pt\relax% + \pgfmathgreaterthan{\tkz@FirstAngle}{\tkz@SecondAngle} + \ifdim\pgfmathresult pt=1 pt\relax% + \pgfmathsubtract{\tkz@FirstAngle}{360} + \edef\tkz@FirstAngle{\pgfmathresult}% + \fi + \else + \pgfmathgreaterthan{\tkz@FirstAngle}{\tkz@SecondAngle} + \ifdim\pgfmathresult pt=1 pt\relax% + \pgfmathadd{\tkz@SecondAngle}{360} + \edef\tkz@SecondAngle{\pgfmathresult}% + \fi + \fi + \pgfmathsubtract{\tkz@FirstAngle}{\tkz@delta} + \edef\tkz@FirstAngle{\pgfmathresult}% + \pgfmathadd{\tkz@SecondAngle}{\tkz@delta} + \edef\tkz@SecondAngle{\pgfmathresult} + \begin{scope}[decoration={markings, + mark=at position \tkz@mkarcpos with \node{#5};}] + \path[shift = {(#2)},/@tkzmarkarc/.cd,#1,postaction={decorate}]% + (\tkz@FirstAngle:\tkz@radius pt) arc (\tkz@FirstAngle:\tkz@SecondAngle:\tkz@radius pt); + \end{scope} +\endgroup +} +%<---------------------------------------------------------------------------> +% tkzDrawArcRAN > +%<---------------------------------------------------------------------------> +\def\tkzDrawArcRAN[#1](#2,#3)(#4,#5){% +\begingroup + \draw[shift = {(#2)},/tkzdrawarc/.cd,#1] (#4:#3) arc (#4:#5:#3); +\endgroup +} +%<--------------- tkzPathArcRAN ---------------------------------- +\def\tkzPathArcRAN[#1](#2,#3)(#4,#5){% +\begingroup + \path[shift = {(#2)},/tkzdrawarc/.cd,#1] (#4:#3) arc (#4:#5:#3); +\endgroup +} +%<---------------------------------------------------------------------------> +% Mark an angle modi 3.03 suppression de \tkz@mksize, +%<---------------------------------------------------------------------------> +% \tkzMarkAngle(B, A, C) +% +% Marque d'angle +% arc de cercle (simple/double/triple) et marque d'églité. +% +% Par défaut: +% arc = simple +% size = 1cm (rayon de l'arc) +% style traits pleins +% mkpos ? position: 0.5 (position de la marque) +% mark rien du tout (ignoré si type est utilisé) +% +% Paramètres (optionnels) +% arc : l, ll, lll +% mksize : 1cm +% gap : 3pt +% dist ? +% style : type de traits +% position: 0.5 +% mark : none , |, ||,|||, z, s, x, o, oo mais tous les +% % symboles de tikz sont permis +%<------------------------- Label on angle --------------------------------> +\def\tkz@arcsimple{l} +\def\tkz@arcdouble{ll} +\def\tkz@arctriple{lll} + +%\tikzset{lbstyle/.style = {color=\tkz@mainlinecolor}} + +\pgfkeys{/tkzmkangle/.cd, + arc/.estore in = \tkz@arc, + size/.store in = \tkz@size, + mark/.store in = \tkz@markang, + mkpos/.estore in = \tkz@mkpos, + mksize/.store in = \tkz@mksize, + mkcolor/.store in = \tkz@mkcolor, + arc = l, + size = 1, + mark = none, + mksize = 4pt, + mkcolor = black, + mkpos = 0.5, + /tkzmkangle/.search also={/tikz} +} +\def\tkzMarkAngle{\pgfutil@ifnextchar[{\tkz@MarkAngle}{\tkz@MarkAngle[]}} +\def\tkz@MarkAngle[#1](#2,#3,#4){% +\begingroup +\pgfqkeys{/tkzmkangle}{#1} +\tkzFindSlopeAngle(#3,#2)\tkzGetAngle{tkz@dirOne} +\tkzFindSlopeAngle(#3,#4)\tkzGetAngle{tkz@dirTwo} +\tkzNormalizeAngle(\tkz@dirOne,\tkz@dirTwo) + +% les marques, aucune si mktype = none +% add cm after tkz@size !! 01/2022 +\def\tkz@mymark{\pgfsetplotmarksize{\tkz@mksize}\pgfuseplotmark{\tkz@markang}} +% draw the arcs +\begin{scope}[decoration= {markings, + mark=at position \tkz@mkpos with {\tkz@mymark}}] + \ifx\tkz@arc\tkz@arcsimple + \tkzDrawArcRAN[#1,fill=none]% + (#3,\tkz@size)(\tkz@FirstAngle,\tkz@SecondAngle)% + \tkzPathArcRAN[\tkz@mkcolor,postaction={decorate}]% + (#3,\tkz@size)(\tkz@FirstAngle,\tkz@SecondAngle) + \else + \ifx\tkz@arc\tkz@arcdouble + \tkzDrawArcRAN[#1,fill=none](#3,\tkz@size cm-2.5\pgflinewidth)% + (\tkz@FirstAngle,\tkz@SecondAngle) + \tkzPathArcRAN[\tkz@mkcolor,postaction={decorate}]% + (#3,\tkz@size cm)(\tkz@FirstAngle,\tkz@SecondAngle)% + \tkzDrawArcRAN[#1,fill=none](#3,\tkz@size cm+2.5\pgflinewidth)% + (\tkz@FirstAngle,\tkz@SecondAngle)% + \else + \ifx\tkz@arc\tkz@arctriple + \tkzDrawArcRAN[#1,fill=none]% + (#3,\tkz@size cm)(\tkz@FirstAngle,\tkz@SecondAngle)% + \tkzPathArcRAN[\tkz@mkcolor,postaction={decorate}]% + (#3,\tkz@size cm)(\tkz@FirstAngle,\tkz@SecondAngle)% + \tkzDrawArcRAN[#1,fill=none](#3,\tkz@size cm-5\pgflinewidth)% + (\tkz@FirstAngle,\tkz@SecondAngle)% + \tkzDrawArcRAN[#1,fill=none](#3,\tkz@size cm+5\pgflinewidth)% + (\tkz@FirstAngle,\tkz@SecondAngle)% + \fi + \fi + \fi +\end{scope} +\endgroup +} +%<---------------------------------------------------------------------------> +% multiple +\def\tkz@multiMA#1 #2\@nil{% + \protected@edef\tkz@temp{ + \noexpand \tkzMarkAngle[\tkz@optma](#1)}\tkz@temp% + \def\tkz@nextArg{#2}% + \ifx\tkzutil@empty\tkz@nextArg + \let\next\@gobble + \fi + \next#2\@nil +} +%<---------------------------------------------------------------------------> +\def\tkzMarkAngles{\pgfutil@ifnextchar[{\tkz@MarkAngles}{\tkz@MarkAngles[]}} +\def\tkz@MarkAngles[#1](#2){% +\xdef\tkz@optma{#1} + \begingroup + \let\next\tkz@multiMA + \next#2 \@nil % +\endgroup +} +% fin de \tkzMarkAngle + +%<---------------------------------------------------------------------------> +% FillAngle +%<---------------------------------------------------------------------------> +\pgfkeys{/tkzFill/.cd, + size/.store in = \tkz@size, + size = 1 cm, + /tkzFill/.search also = {/tikz} + } + +\def\tkzFillAngle{\pgfutil@ifnextchar[{\tkz@FillAngle}{\tkz@FillAngle[]}} +\def\tkz@FillAngle[#1](#2,#3,#4){% +\begingroup +\pgfqkeys{/tkzFill}{#1} + \tkzFindSlopeAngle(#3,#2)\tkzGetAngle{tkz@dirOne} + \tkzFindSlopeAngle(#3,#4)\tkzGetAngle{tkz@dirTwo} + \tkzNormalizeAngle(\tkz@dirOne,\tkz@dirTwo) + \path[shift = {(#3)},fill=\tkz@euc@linecolor!10,/tkzFill/.cd,#1]% + (#3) -- (\tkz@FirstAngle:\tkz@size) arc% + (\tkz@FirstAngle:\tkz@SecondAngle:\tkz@size)--cycle; +\endgroup +} +%<---------------------------------------------------------------------------> +% multiple +\def\tkz@multiFA#1 #2\@nil{\protected@edef\tkz@temp{% + \noexpand \tkzFillAngle[\tkz@optfa](#1)}% + \tkz@temp% + \def\tkz@nextArg{#2}% + \ifx\tkzutil@empty\tkz@nextArg + \let\next\@gobble + \fi + \next#2\@nil +} +%<---------------------------------------------------------------------------> +\def\tkzFillAngles{\pgfutil@ifnextchar[{\tkz@MFillAngles}{\tkz@MFillAngles[]}} +\def\tkz@MFillAngles[#1](#2){% +\xdef\tkz@optfa{#1} +\begingroup + \let\next\tkz@multiFA + \next#2 \@nil % +\endgroup +} +%<------------------------- Label on angle --------------------------------> +\pgfkeys{/tkzlabelangle/.cd, + dist/.store in = \tkzlabeldist, + angle/.store in = \tkzlabelangle, + dist = 1, + angle = {}, + /tkzlabelangle/.search also={/tikz} +} +\def\tkzLabelAngle{\pgfutil@ifnextchar[{\tkz@LabelAngle}{\tkz@LabelAngle[]}} +\def\tkz@LabelAngle[#1](#2,#3,#4)#5{%2016 added normalize from karu's code +\begingroup + \pgfqkeys{/tkzlabelangle}{#1} + \ifx\tkzutil@empty\tkzlabelangle% no value so calc angle of bisector + \tkzFindSlopeAngle(#3,#2)\tkzGetAngle{tkz@dirOne} + \tkzFindSlopeAngle(#3,#4)\tkzGetAngle{tkz@dirTwo} + \tkzNormalizeAngle(\tkz@dirOne,\tkz@dirTwo) + \edef\tkzlabelAngle{\fpeval{(\tkz@SecondAngle+\tkz@FirstAngle)/2}} + \fi + \path (#3) --+(\tkzlabelAngle:\tkzlabeldist) node[label angle style,/tkzlabelangle/.cd,#1] {#5}; +\endgroup +} +%<---------------------------------------------------------------------------> +%<---------------------------------------------------------------------------> +% multiple labels +\def\tkz@multiLBA#1 #2\@nil{% + \protected@edef\tkz@temp{ + \noexpand \tkzLabelAngle[\tkz@optlba](#1){\tkz@labelangle}}\tkz@temp% + \def\tkz@nextArg{#2}% + \ifx\tkzutil@empty\tkz@nextArg + \let\next\@gobble + \fi + \next#2\@nil +} +% %<--------------------------------------------------------------------- +\def\tkzLabelAngles{\pgfutil@ifnextchar[{\tkz@LabelAngles}{% + \tkz@LabelAngles[]}} +\def\tkz@LabelAngles[#1](#2)#3{% + \def\tkz@optlba{#1} + \def\tkz@labelangle{#3} + \begingroup + \let\next\tkz@multiLBA + \next#2 \@nil % + \endgroup +} +%<----------------------------------------------------------------------- +% Symbole droites perpendiculaires +%<---------------------------------------------------------------------- +\pgfkeys{/tkzrightangle/.cd, + norm tkz code/.is if = normtkzcode@execute, + german/.code = \normtkzcode@executefalse, + size/.store in = \tkz@ra@size, + dotsize/.store in = \tkz@dotsize, + size = .25, + dotsize = 3 pt, + /tkzrightangle/.search also={/tikz}, +} +\newcommand*{\tkzMarkRightAngle}[1][]{\tkz@RightAngle[#1]} +\def\tkz@RightAngle[#1](#2,#3,#4){% +\begingroup +\normtkzcode@executetrue +\pgfqkeys{/tkzrightangle}{#1} + \tkzpointnormalised{\pgfpointdiff{\pgfpointanchor{#3}{center}}{% + \pgfpointanchor{#2}{center}}} + \tkz@ax=\pgf@x\relax% + \tkz@ay=\pgf@y\relax% + \tkzpointnormalised{\pgfpointdiff{\pgfpointanchor{#3}{center}}{% + \pgfpointanchor{#4}{center}}} + \tkz@bx=\pgf@x\relax% + \tkz@by=\pgf@y\relax% + \ifnormtkzcode@execute% + \draw[/tkzrightangle/.cd,#1] + (#3) --++( 28.45274*\tkz@ra@size\tkz@ax , 28.45274*\tkz@ra@size\tkz@ay) + --++( 28.45274*\tkz@ra@size\tkz@bx , 28.45274*\tkz@ra@size\tkz@by) + --++(-28.45274*\tkz@ra@size\tkz@ax ,-28.45274*\tkz@ra@size\tkz@ay) + -- (#3); + \else% + % find angles + \tkzFindSlopeAngle(#3,#2)\tkzGetAngle{tkz@dirOne} + \tkzFindSlopeAngle(#3,#4)\tkzGetAngle{tkz@dirTwo} + \tkzNormalizeAngle(\tkz@dirOne,\tkz@dirTwo) + \edef\tkzCircleAngle{\fpeval{(\tkz@SecondAngle+\tkz@FirstAngle)/2}} + \tkzDrawArcRAN[/tkzrightangle/.cd,#1](#3,\tkz@ra@size)% + (\tkz@FirstAngle,\tkz@SecondAngle) + \path (#3) --+ (\tkzCircleAngle:\tkz@ra@size/2) + node[fill,circle,minimum size=\tkz@dotsize, + inner sep=0 pt,/tkzrightangle/.cd,#1] {}; +\fi% +\endgroup +} +%<---------------------------------------------------------------------------> +\def\tkz@multiRA#1 #2\@nil{% +\protected@edef\tkz@temp{ + \noexpand \tkzMarkRightAngle[\tkz@optRA](#1)}\tkz@temp% +\def\tkz@nextArg{#2}% + \ifx\tkzutil@empty\tkz@nextArg + \let\next\@gobble + \fi +\next#2\@nil +} +%<---------------------------------------------------------------------------> +\def\tkzMarkRightAngles{\pgfutil@ifnextchar[{\tkz@RightAngles}{% + \tkz@RightAngles[]}} +\def\tkz@RightAngles[#1](#2){% +\xdef\tkz@optRA{#1} +\begingroup + \let\next\tkz@multiRA + \next#2 \@nil % +\endgroup +} + +\makeatother +\endinput \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-draw-circles.tex b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-draw-circles.tex index 8d340ba99d3..99d35310678 100644 --- a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-draw-circles.tex +++ b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-draw-circles.tex @@ -1,5 +1,5 @@ % tkz-obj-eu-draw-circles.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,43 +7,14 @@ % 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-draw-circles.tex} +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-obj-eu-draw-circles.tex} \makeatletter -%for compatibility -%<--------------------------------------------------------------------------–> -\def\tkzDefCircleR(#1,#2){% -\begingroup - \edef\tkzLengthResult{\fpeval{round(#2,5)}} - \global\let\tkzLengthResult\tkzLengthResult - \tkzRenamePoint(#1){tkzPointResult} -\endgroup -} -%<--------------------------------------------------------------------------–> -% Through Circle center and point -%<--------------------------------------------------------------------------–> -\def\tkzDefCircleThrough(#1,#2){% -\begingroup - \tkzCalcLength(#1,#2) - \tkzRenamePoint(#1){tkzPointResult} -\endgroup -} -%<--------------------------------------------------------------------------–> -% Diameter Circle -%<--------------------------------------------------------------------------–> -\def\tkzDefCircleD(#1,#2){% -\begingroup - \tkzDefMidPoint(#1,#2) - \tkzCalcLength(#1,tkzPointResult) -\endgroup -} + \def\tkz@numdc{0} \pgfkeys{/tkzdrawc/.cd, @@ -75,13 +46,13 @@ \begingroup \pgfqkeys{/tkzdrawc}{#1} \ifcase\tkz@numdc% - \tkzDefCircleThrough(#2) + \tkzDefCircleThrough(#2) \or% 1 - \tkzDefCircleR(#2) + \tkzDefCircleR(#2) \or% 2 - \tkzDefCircleD(#2) + \tkzDefCircleD(#2) \or% 3 - \tkzDefCircumCircle(#2) + \tkzDefCircumCircle(#2) \or% 4 \tkzDefInCircle(#2) \or% 4 @@ -95,8 +66,7 @@ \or% 8 \tkzDefOrthoThroughCircle(#2,\tkz@ptone,\tkz@pttwo) \fi - \draw[line style,/tkzdrawc/.cd,#1] - (tkzPointResult) circle (\tkzLengthResult pt); + \draw[line style,/tkzdrawc/.cd,#1] (tkzPointResult) circle (\tkzLengthResult); \endgroup } @@ -126,11 +96,11 @@ \pgfkeys{/tkzdrawsc/.cd, through/.code = \def\tkz@numdsc{0}, diameter/.code = \def\tkz@numdsc{1}, - swap/.is if = tkz@sawp@sc, + swap/.is if = tkz@swap@sc, swap/.default = true, swap = false, through, - /tkzdrawsc/.search also={/tikz} + /tkzdrawsc/.search also={/tikz} } \def\tkzDrawSemiCircle{\pgfutil@ifnextchar[{\tkz@DrawSemiCircle}{% \tkz@DrawSemiCircle[]}} @@ -142,19 +112,19 @@ \or% \tkzDrawSemiCircleDiameter(#2) \fi - \tkzDrawArc[#1](\tkz@Center,\tkz@FirstPoint)(\tkz@SecondPoint) + \tkzDrawArc[#1,delta=0](\tkz@Center,\tkz@FirstPoint)(\tkz@SecondPoint) \endgroup } %<--------------------------------------------------------------------------–> \def\tkzDrawSemiCircleThrough(#1,#2){% \tkzDefPointBy[symmetry=center #1](#2) - \pgfnodealias{tkz@pt}{tkzPointResult} + \pgfnodealias{tkz@pt}{tkzPointResult} \def\tkz@Center{#1} - \iftkz@sawp@sc - \gdef\tkz@FirstPoint{tkz@pt} + \iftkz@swap@sc + \gdef\tkz@FirstPoint{tkz@pt} \gdef\tkz@SecondPoint{#2} \else - \gdef\tkz@FirstPoint{#2} + \gdef\tkz@FirstPoint{#2} \gdef\tkz@SecondPoint{tkz@pt} \fi } @@ -163,7 +133,7 @@ \tkzDefMidPoint(#1,#2) \pgfnodealias{tkz@Center}{tkzPointResult} \def\tkz@Center{tkz@Center} - \iftkz@sawp@sc + \iftkz@swap@sc \def\tkz@FirstPoint{#1} \def\tkz@SecondPoint{#2} \else @@ -171,11 +141,33 @@ \def\tkz@SecondPoint{#1} \fi } - +%<--------------------------------------------------------------------------–> +\def\tkz@multisemicircles#1 #2\@nil{% +\protected@edef\tkz@temp{ +\noexpand \tkzDrawSemiCircle[\tkz@optsemicircle](#1)}\tkz@temp% +\def\tkz@nextArg{#2}% +\ifx\tkzutil@empty\tkz@nextArg + \let\next\@gobble +\fi +\next#2\@nil +} +%<--------------------------------------------------------------------------–> +%<--------------------------------------------------------------------------–> +\def\tkzDrawSemiCircles{\pgfutil@ifnextchar[{\tkz@DrawSemiCircles}{% + \tkz@DrawSemiCircles[]}} +\def\tkz@DrawSemiCircles[#1](#2){% +\xdef\tkz@optsemicircle{#1} +\begingroup + \let\next\tkz@multisemicircles + \next#2 \@nil % +\endgroup +}% +%<--------------------------------------------------------------------------–> +%<--------------------------------------------------------------------------–> %<---------------------------- Fill Circle --------------------------------–> \def\tkz@numfc{0} \pgfkeys{/fillcircle/.cd, radius/.code = \def\tkz@numfc{0}, - R/.code = \def\tkz@numfc{1}, + R/.code = \def\tkz@numfc{1}, radius, /fillcircle/.search also={/tikz} } @@ -185,46 +177,42 @@ \pgfqkeys{/fillcircle}{#1} \ifcase\tkz@numfc% % first case 0 - \tkzCalcLength(#2,#3) + \tkz@@CalcLength(#2,#3){tkzLengthResult} \fill[/fillcircle/.cd,#1] (#2) circle (\tkzLengthResult pt);% \or% 1 \fill[/fillcircle/.cd,#1] (#2) circle (#3);% \fi \endgroup } -%<----------------------- Out Clip Circle ---------------------------------–> -\def\tkz@numocc{0} -\pgfkeys{/clipoutcircle/.cd, radius/.code = \def\tkz@numocc{0}, - R/.code = \def\tkz@numocc{1}, - radius} -%<--------------------------------------------------------------------------–> -\def\tkzClipOutCircle{\pgfutil@ifnextchar[{\tkz@ClipOutCircle}{% - \tkz@ClipOutCircle[]}} -\def\tkz@ClipOutCircle[#1](#2,#3){% -\pgfqkeys{/clipoutcircle}{#1} -\ifcase\tkz@numocc - \tkzCalcLength(#2,#3) - \clip[tkzreverseclip] (#2) circle (\tkzLengthResult pt); - \or% 1 - \clip[tkzreverseclip] (#2) circle (#3); - \fi -} + %<--------------------------- Clip Circle ---------------------------------–> +\newif\iftkzClipOutCircle \def\tkz@numcc{0} \pgfkeys{/tkzclipc/.cd, - through/.code = \def\tkz@numcc{0}, - R/.code = \def\tkz@numcc{1}, + through/.code = \def\tkz@numcoc{0}, + R/.code = \def\tkz@numcoc{1}, + out code/.is if = tkzClipOutCircle, + out/.code = \tkzClipOutCirclefalse, through} %<--------------------------------------------------------------------------–> \def\tkzClipCircle{\pgfutil@ifnextchar[{\tkz@ClipCircle}{\tkz@ClipCircle[]}} \def\tkz@ClipCircle[#1](#2,#3){% +\tkzClipOutCircletrue \pgfqkeys{/tkzclipc}{#1} -\ifcase\tkz@numcc - \tkzCalcLength(#2,#3) +\ifcase\tkz@numcoc + \tkz@@CalcLength(#2,#3){tkzLengthResult} + \iftkzClipOutCircle \clip (#2) circle (\tkzLengthResult pt); + \else + \clip (#2) circle (\tkzLengthResult pt) [tkzreverseclip] ; + \fi \or% 1 + \iftkzClipOutCircle \clip (#2) circle (#3); + \else + \clip (#2) circle (#3) [tkzreverseclip] ; + \fi \fi } %<--------------------------- Label Circle --------------------------------–> @@ -255,6 +243,5 @@ \fi \endgroup } -%<--------------------------------------------------------------------------–> - \makeatother +\makeatother \endinput \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-draw-lines.tex b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-draw-lines.tex index 9804439ee34..0e3e9f60965 100644 --- a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-draw-lines.tex +++ b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-draw-lines.tex @@ -1,5 +1,5 @@ % tkz-obj-eu-draw-lines.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,195 +7,26 @@ % 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-draw-lines.tex} +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-obj-eu-draw-lines.tex} \makeatletter + \def\tkz@numdl{0} \pgfkeys{/tkzdrawl/.cd, - median/.code = \def\tkz@numdl{0}, - altitude/.code = \def\tkz@numdl{1}, - bisector/.code = \def\tkz@numdl{2}, - none/.code = \def\tkz@numdl{3}, - none, /tkzdrawl/.search also={/tikz} } %<--------------------------------------------------------------------------–> % Drawing a line > %<--------------------------------------------------------------------------–> \def\tkzDrawLine{\pgfutil@ifnextchar[{\tkz@DrawLine}{\tkz@DrawLine[]}} -\def\tkz@DrawLine[#1](#2){% +\def\tkz@DrawLine[#1](#2,#3){% \begingroup \pgfqkeys{/tkzdrawl}{#1} -\ifcase\tkz@numdl% - \tkzDrawMedian[#1](#2) - \or% 1 - \tkzDrawAltitude[#1](#2) - \or% 2 - \tkzDrawBisector[#1](#2) - \or% 3 - \tkzDrawSLine[#1](#2) - \fi -\endgroup -} -%<--------------------------------------------------------------------------–> -% Droites particulières d'un triangle -%<--------------------------------------------------------------------------–> -% -%<--------------------------------------------------------------------------–> -\def\tkzDrawSLine{\pgfutil@ifnextchar[{\tkz@DrawSLine}{\tkz@DrawSLine[]}} -\def\tkz@DrawSLine[#1](#2,#3){% -\begingroup -\draw[line style,#1] (#2) to (#3); -\endgroup -}% -%<--------------------------------------------------------------------------–> -% median -%<--------------------------------------------------------------------------–> -\def\tkzDrawMedian{\pgfutil@ifnextchar[{\tkz@Median}{\tkz@Median[]}} -\def\tkz@Median[#1](#2,#3,#4){% -\begingroup - \tkzDefMidPoint(#2,#4) - \tkzDrawSLine[add= 0 and 0,/tkzdrawl/.cd,#1](#3,tkzPointResult) -\endgroup -} -%<--------------------------------------------------------------------------–> -% altitude -%<--------------------------------------------------------------------------–> -\def\tkzDrawAltitude{\pgfutil@ifnextchar[{\tkz@Altitude}{\tkz@Altitude[]}} -\def\tkz@Altitude[#1](#2,#3,#4){% -\begingroup - \tkzUProjection(#2,#4)(#3) - \tkzDrawSLine[add= 0 and 0,/tkzdrawl/.cd,#1](#3,tkzPointResult) -\endgroup -} -%<--------------------------------------------------------------------------–> -% bisector -%<--------------------------------------------------------------------------–> -\def\tkzDrawBisector{\pgfutil@ifnextchar[{\tkz@Bisector}{\tkz@Bisector[]}} -\def\tkz@Bisector[#1](#2,#3,#4){% -\begingroup - \tkzDefBisectorLine(#2,#3,#4) - \tkzInterLL(#2,#4)(#3,tkzPointResult) - \tkzDrawSLine[add= 0 and 0,/tkzdrawl/.cd,#1](#3,tkzPointResult) -\endgroup -} -%<--------------------------------------------------------------------------–> -%<--------------------------------------------------------------------------–> -% \def\tkz@recuplast(#1,#2){\def\tkz@last{#1}} -% \def\tkz@stop{\tkz@stop} -%<--------------------------------------------------------------------------–> -% medians -%<--------------------------------------------------------------------------–> -\def\tkz@@Medians(#1,#2,#3)(#4,#5){% - \def\tkz@tmp{#5}% - \ifx\tkz@tmp\tkz@stop\else\tkz@@Medians(#2,#3)(#5)\fi - \tkz@recuplast(#3) - - \pgfcoordinate{#4}{\pgfpointscale{0.5}{% - \pgfpointadd{\pgfpointanchor{#2}{center}}{% - \pgfpointanchor{\tkz@last}{center}}% - }}% - \protected@edef\tkz@temp{\noexpand - \tkzDrawLine[add= 0 and 0,/DrawTLines/.cd,\tkz@opttline](#4,#1)}\tkz@temp% - \ifx\tkzutil@empty\tkz@newpoint@name - \else - \coordinate (\tkz@newpoint@name#4) at (#4); - \fi -} -\def\tkzDrawMedians{\pgfutil@ifnextchar[{\tkz@Medians}{\tkz@Medians[]}} -\def\tkz@Medians[#1](#2)#3{% -\begingroup - \xdef\tkz@opttline{#1} - \tkz@@Medians(#2,#2)(#3,\tkz@stop) - \endgroup -} - -%<--------------------------------------------------------------------------–> -% Altitudes -%<--------------------------------------------------------------------------–> -\def\tkz@@Altitudes(#1,#2,#3)(#4,#5){% - \def\tkz@tmp{#5}% - \ifx\tkz@tmp\tkz@stop\else\tkz@@Altitudes(#2,#3)(#5)\fi - \tkz@recuplast(#3) - \tkzUProjection(#2,\tkz@last)(#1) - \pgfnodealias{tkz@tmp@pt}{tkzPointResult} - \protected@edef\tkz@temp{% - \noexpand - \tkzDrawLine[add= 0 and 0,/DrawTLines/.cd,\tkz@opttline](#1,tkz@tmp@pt)}\tkz@temp% - \ifx\tkzutil@empty\tkz@newpoint@name - \else - \coordinate (\tkz@newpoint@name#4) at (tkz@tmp@pt); - \fi -} -\def\tkzDrawAltitudes{\pgfutil@ifnextchar[{\tkz@DrawAltitudes}{\tkz@DrawAltitudes[]}} -\def\tkz@DrawAltitudes[#1](#2)#3{% -\begingroup - \xdef\tkz@opttline{#1} - \tkz@@Altitudes(#2,#2)(#3,\tkz@stop) - \endgroup - } -%<--------------------------------------------------------------------------–> -% bisectors -%<--------------------------------------------------------------------------–> -\def\tkz@@Bisectors(#1,#2,#3)(#4,#5){% -\def\tkz@tmp{#5}% -\ifx\tkz@tmp\tkz@stop\else\tkz@@Bisectors(#2,#3)(#5)\fi - \tkz@recuplast(#3) - \tkzDefBisectorLine(\tkz@last,#1,#2) - \tkzInterLL(#2,\tkz@last)(#1,tkzPointResult) - \pgfnodealias{tkz@tmp@pt}{tkzPointResult} - \protected@edef\tkz@temp{ - \noexpand \tkzDrawLine[add= 0 and 0, - /DrawTLines/.cd, - \tkz@opttline](#1,tkz@tmp@pt)}\tkz@temp - \ifx\tkzutil@empty\tkz@newpoint@name - \else - \coordinate (\tkz@newpoint@name#4) at (tkz@tmp@pt); - \fi -} -\def\tkzDrawBisectors{\pgfutil@ifnextchar[{\tkz@DrawBisectors}{\tkz@DrawBisectors[]}} - -\def\tkz@DrawBisectors[#1](#2)#3{% -\begingroup - \xdef\tkz@opttline{#1} - \tkz@@Bisectors(#2,#2)(#3,\tkz@stop) -\endgroup -} -%<-------------------------------------------------------------------------– -%<-------------------------------------------------------------------------– -%<-------------------------------------------------------------------------– -\def\tkz@numdtls{0} -\pgfkeys{/DrawTLines/.cd, - median/.code = \def\tkz@numdtls{0}, - altitude/.code = \def\tkz@numdtls{1}, - bisector/.code = \def\tkz@numdtls{2}, - median, - name/.store in = \tkz@newpoint@name, - name/.initial = {}, - name = {}, - /DrawTLines/.search also={/tikz} -} -%<--------------------------------------------------------------------------–> -% Drawing tr lines > -%<--------------------------------------------------------------------------–> -\def\tkzDrawTLines{\pgfutil@ifnextchar[{\tkz@DrawTLines}{\tkz@DrawTLines[]}} -\def\tkz@DrawTLines[#1](#2)#3{% -\begingroup -\pgfqkeys{/DrawTLines}{#1} -\ifcase\tkz@numdtls% - \tkzDrawMedians[#1](#2){#3} - \or% 1 - \tkzDrawAltitudes[#1](#2){#3} - \or% 2 - \tkzDrawBisectors[#1](#2){#3} - \fi + \draw[line style,#1] (#2) to (#3); \endgroup } %<-------------------------------------------------------------------------– @@ -231,11 +62,11 @@ %<--------------------------------------------------------------------------–> \pgfkeys{% tkzsuline/.cd, - line width/.code = {\xdef\tkz@line@lw{#1}}, - color/.code = {\xdef\tkz@line@color{#1}}, - style/.code = {\xdef\tkz@line@style{#1}}, - add/.code args = {#1 and #2} {\xdef\tkz@line@left{#1}% - \xdef\tkz@line@right{#2}}, + line width/.code = \def\tkz@line@lw{#1}, + color/.code = \def\tkz@line@color{#1}, + style/.code = \def\tkz@line@style{#1}, + add/.code args = {#1 and #2} {\def\tkz@line@left{#1} + \def\tkz@line@right{#2}}, /tkzsuline/.search also={/tikz}% } %<--------------------------------------------------------------------------–> @@ -268,10 +99,10 @@ \def\tkzDrawSegment{\pgfutil@ifnextchar[{\tkz@DrawSegment}{% \tkz@DrawSegment[]}} \def\tkz@DrawSegment[#1](#2,#3){% -\begingroup +\scope \pgfqkeys{/tkzdraws}{#1} \draw[line style,add=0 and 0,#1] (#2) to (#3); -\endgroup +\endscope }% \def\tkz@multiDrawSeg#1 #2\@nil{% @@ -387,17 +218,24 @@ % \draw[dim={7cm,10pt,transform shape}] (B) -- (C); % \draw[dim={X,,}] (A) -- (C); %<--------------------------------------------------------------------------–> +% code from muzimuzhi Z + \pgfkeys{/pgf/decoration/.cd, distance/.initial = 10pt} \pgfdeclaredecoration{add dim}{final}{ \state{final}{% \pgfmathsetmacro{\dist}{\pgfkeysvalueof{/pgf/decoration/distance}} - \pgfpathmoveto{\pgfpoint{0pt}{0pt}} + \pgfpathmoveto{\pgfpoint{0pt}{0pt}} \pgfpathlineto{\pgfpoint{0pt}{1.2*\dist}} \pgfpathmoveto{\pgfpoint{\pgfdecoratedpathlength}{0pt}} - \pgfpathlineto{\pgfpoint{(\pgfdecoratedpathlength}{1.2*\dist}} + \pgfpathlineto{\pgfpoint{(\pgfdecoratedpathlength}{1.2*\dist}} + % start of patch + \pgfusepath{stroke} \pgfsetarrowsstart{latex} \pgfsetarrowsend{latex} + \expandafter\pgfsetdash\tkz@dim@dashpattern + \pgfsetstrokecolor{\tkz@dim@color} + % end of patch \pgfpathmoveto{\pgfpoint{0pt}{\dist}} \pgfpathlineto{\pgfpoint{\pgfdecoratedpathlength}{\dist}} \pgfusepath{stroke} @@ -424,12 +262,26 @@ }, dim/.default={,0pt,} } - +\tikzset{ + dim color/.store in=\tkz@dim@color, + dim color=black, + % similar to code for \tikzoption{dash pattern}{...} + dim dash pattern/.code={% + \def\tikz@temp{#1}% + \ifx\tikz@temp\pgfutil@empty% + \def\tkz@dim@dashpattern{{}{0pt}}% + \else% + \def\tikz@dashpattern{}% + \expandafter\tikz@scandashon\pgfutil@gobble#1o\@nil% + \edef\tkz@dim@dashpattern{{\tikz@dashpattern}{\noexpand\tikz@dashphase}}% + \fi + }, + dim dash pattern=, +} %<--------------------------- style line ---------------------------------> \tikzset{add/.style args={#1 and #2}{to path={% ($(\tikztostart)!-#1!(\tikztotarget)$)--($(\tikztotarget)!-#2!(\tikztostart)$)% \tikztonodes}} } -%<--------------------------------------------------------------------------–> \makeatother -\endinput +\endinput \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-draw-polygons.tex b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-draw-polygons.tex index 9388916c429..0bad413a37b 100644 --- a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-draw-polygons.tex +++ b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-draw-polygons.tex @@ -1,5 +1,5 @@ % tkz-obj-eu-polygons.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-polygons.tex} +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-obj-eu-polygons.tex} \makeatletter %<--------------------------------------------------------------------------–> % Polygon @@ -31,6 +28,27 @@ \foreach \pt in {#2,#3}{--(\pt)}--cycle;% \endgroup } +%<--------------------------------------------------------------------------–> +\def\tkz@multipolygons#1 #2\@nil{% +\protected@edef\tkz@temp{ +\noexpand \tkzDrawPolygon[\tkz@optpolygon](#1)}\tkz@temp% +\def\tkz@nextArg{#2}% +\ifx\tkzutil@empty\tkz@nextArg + \let\next\@gobble +\fi +\next#2\@nil +} +%<--------------------------------------------------------------------------–> +\def\tkzDrawPolygons{\pgfutil@ifnextchar[{\tkz@DrawPolygons}{\tkz@DrawPolygons[]}} +\def\tkz@DrawPolygons[#1](#2){% +\xdef\tkz@optpolygon{#1} +\begingroup + \let\next\tkz@multipolygons + \next#2 \@nil % +\endgroup +}% +%<--------------------------------------------------------------------------–> +%<--------------------------------------------------------------------------–> %<---------------------------- FILL --------------------------------–> % %<--------------------------------------------------------------------------–> @@ -39,7 +57,7 @@ \def\tkz@FillPolygon[#1](#2,#3){% \begingroup \fill[#1] (#2) - \foreach \pt in {#2,#3}{--(\pt)}--cycle;% + \foreach \pt in {#2,#3}{--(\pt)}--cycle;% \endgroup } %<--------------------------------------------------------------------------–> @@ -52,7 +70,7 @@ } %<--------------------------------------------------------------------------–> \def\tkzDrawRectangle{\pgfutil@ifnextchar[{\tkz@DrawRectangle}% - {\tkz@DrawRectangle[]}} + {\tkz@DrawRectangle[]}} \def\tkz@DrawRectangle[#1](#2,#3){% \begingroup \draw[#1](#2) -| (#3) -| (#2); @@ -61,20 +79,23 @@ %<-------------------------- gold rectangle -------------------------------–> % %<--------------------------------------------------------------------------–> +\def\tkzDrawGoldRectangle{\pgfutil@ifnextchar[{\tkz@DrawGoldRectangle}{% + \tkz@DrawGoldRectangle[]}} \def\tkz@DrawGoldRectangle[#1](#2,#3){ \begingroup - \tkzDefGoldRectangle(#2,#3) - \tkzDrawPolygon[#1](#2,#3,tkzFirstPointResult,tkzSecondPointResult) + \tkzDefGoldRectangle(#2,#3) + \tkzDrawPolygon[#1](#2,#3,tkzFirstPointResult,tkzSecondPointResult) \endgroup } +\let\tkzDrawGoldenRectangle\tkzDrawGoldRectangle %<-------------- Labels for Regular Polygon -------------------------–> % %<--------------------------------------------------------------------------–> \pgfkeys{/deflabelregpoly/.cd, - name/.store in = \tkz@regpolname, - sep/.store in = \tkz@regpolsep, - name = P, - sep = 1.1 + name/.store in = \tkz@regpolname, + sep/.store in = \tkz@regpolsep, + name = P, + sep = 1.1 } \def\tkzLabelRegPolygon{\pgfutil@ifnextchar[{\tkz@labelPolygon}{% @@ -83,11 +104,31 @@ \begingroup \pgfqkeys{/deflabelregpoly}{#1} \foreach \v [count=\vi from 1] in {#3} {% - \path (#2) to [pos=1.1] node {$\v$} (\tkz@regpolname\vi) ; - \pgfnodealias{\v}{\tkz@regpolname\vi} + \path (#2) to [pos=1.1] node {$\v$} (\tkz@regpolname\vi) ; + \pgfnodealias{\v}{\tkz@regpolname\vi} } \endgroup } +%<---------------------------- CLIP --------------------------------–> +% +%<--------------------------------------------------------------------------–> + +\newif\iftkzClipOutPoly% +\pgfkeys{tkzclippolygon/.cd, + out code/.is if = tkzClipOutPoly, + out/.code = \tkzClipOutPolyfalse} +\def\tkzClipPolygon{\pgfutil@ifnextchar[{\tkz@ClipPolygon}{\tkz@ClipPolygon[]}} +\def\tkz@ClipPolygon[#1](#2,#3){% +\tkzClipOutPolytrue +\pgfqkeys{/tkzclippolygon}{#1}% +\iftkzClipOutPoly +\clip (#2) + \foreach \pt in {#2,#3}{--(\pt)}--cycle; +\else + \clip(#2) + \foreach \pt in {#2,#3}{--(\pt)}--cycle[tkzreverseclip] ; +\fi +}% \makeatother \endinput \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-draw-triangles.tex b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-draw-triangles.tex index bc0d6b10f25..00c5a97e542 100644 --- a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-draw-triangles.tex +++ b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-draw-triangles.tex @@ -1,5 +1,5 @@ % tkz-obj-eu-draw-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,12 +7,13 @@ % 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”. -% +% This work has the LPPL maintenance status “maintained”. % The Current Maintainer of this work is Alain Matthes. -% utf8 encoding +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-obj-eu-draw-triangles.tex} +\makeatletter %<--------------------------------------------------------------------------–> % Draw Triangles %<--------------------------------------------------------------------------–> @@ -25,12 +26,13 @@ school/.code = {\def\tkz@numdtr{3}}, golden/.code = {\def\tkz@numdtr{4}}, sublime/.code = {\def\tkz@numdtr{4}}, - euclide/.code = {\def\tkz@numdtr{5}}, + euclid/.code = {\def\tkz@numdtr{5}}, gold/.code = {\def\tkz@numdtr{6}}, cheops/.code = {\def\tkz@numdtr{7}}, two angles/.code args = {#1 and #2}{\def\tkz@numdtr{8}% \def\tkz@alpha{#1}% \def\tkz@beta{#2}}, + isosceles right/.code = {\def\tkz@numdtr{9}}, equilateral, /drawtriangle/.search also={/tikz} } @@ -58,9 +60,32 @@ \or% 7 \tkzDefCheopsTriangle(#2,#3) \or% 8 - \tkzDefTwoAnglesTriangle(#2,#3) + \tkzDefTwoAnglesTriangle(#2,#3) + \or% 9 + \tkzDefIsoscelesRightTriangle(#2,#3) \fi \draw[/drawtriangle/.cd,line style,#1] (#2)--(#3)--(tkzPointResult)--cycle; \endgroup } +%<--------------------------------------------------------------------------–> +\def\tkz@multitriangles#1 #2\@nil{% +\protected@edef\tkz@temp{ +\noexpand \tkzDrawPolygon[\tkz@opttrianle](#1)}\tkz@temp% +\def\tkz@nextArg{#2}% +\ifx\tkzutil@empty\tkz@nextArg + \let\next\@gobble +\fi +\next#2\@nil +} +%<--------------------------------------------------------------------------–> +\def\tkzDrawTriangles{\pgfutil@ifnextchar[{\tkz@DrawTriangles}{\tkz@DrawTriangles[]}} +\def\tkz@DrawTriangles[#1](#2){% +\xdef\tkz@opttrianle{#1} +\begingroup + \let\next\tkz@multitriangles + \next#2 \@nil % +\endgroup +}% +\makeatother +\endinput \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-grids.tex b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-grids.tex new file mode 100644 index 00000000000..709d78079fc --- /dev/null +++ b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-grids.tex @@ -0,0 +1,83 @@ +% tkz-obj-eu-grids.tex +% 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. +% The latest version of this license is in +% 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. + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-obj-eu-grids.tex} +\makeatletter +%<--------------------------------------------------------------------------–> +% Setup Grid +%<--------------------------------------------------------------------------–> +\pgfkeys{/tkzsugrid/.cd, + line width/.store in = \tkz@sug@lw, + color/.store in = \tkz@sug@color, + line width = \tkz@grid@lw, + color = \tkz@grid@color + } + +\def\tkzSetUpGrid{\pgfutil@ifnextchar[{\tkz@SetUpGrid}{\tkz@SetUpGrid[]}} +\def\tkz@SetUpGrid[#1]{% +\begingroup +\pgfqkeys{/tkzsugrid}{#1} +\global\let\tkz@grid@lw\tkz@sug@lw +\global\let\tkz@grid@color\tkz@sug@color +\endgroup +} +%<--------------------------------------------------------------------------–> +% tkzGrid +%<--------------------------------------------------------------------------–> +\pgfkeys{/tkzGrid/.cd, + color/.code = {\def\tkz@gd@color{#1}% + \edef\tkz@gd@subcolor{% + \tkz@gd@color!\tkzCoeffSubColor}}, + subxstep/.store in = {\tkz@gd@subxstep}, + subystep/.store in = {\tkz@gd@subystep}, + ratio/.store in = {\tkz@gd@ratio}, + line width/.code = {\edef\tkz@gd@lw{#1} + \edef\tkz@gd@sublw{\tkz@gd@ratio\tkz@gd@lw}}, + sub/.is if = tkz@gd@sub, + sub/.default = true , + sub = false, + color = \tkz@grid@color, + ratio = 0.75, + subxstep = \tkz@grid@xstep, + subystep = \tkz@grid@ystep, + line width = \tkz@grid@lw, + /tkzGrid/.search also= {/tikz}, +} +%<--------------------------------------------------------------------------–> +\def\tkzGrid{\pgfutil@ifnextchar[{\tkz@Grid}{\tkz@Grid[]}} +\def\tkz@Grid[#1]{\@ifnextchar({\tkz@@Grid[#1]}% + {\tkz@@Grid[#1](\tkz@tmp@xa,\tkz@tmp@ya)(\tkz@tmp@xb,\tkz@tmp@yb)}} +\def\tkz@@Grid[#1](#2,#3)(#4,#5){% + \pgfqkeys{/tkzGrid}{#1} + \begingroup + \edef\tkz@gxa{\fpeval{(#2-\tkz@init@xorigine)/\tkz@init@xstep}} + \edef\tkz@gxb{\fpeval{(#4-\tkz@init@xorigine)/\tkz@init@xstep}} + \edef\tkz@gya{\fpeval{(#3-\tkz@init@yorigine)/\tkz@init@ystep}} + \edef\tkz@gyb{\fpeval{(#5-\tkz@init@yorigine)/\tkz@init@ystep}} + \iftkz@gd@sub% + \edef\@subxstep{\fpeval{\tkz@gd@subxstep/\tkz@init@xstep}}% + \edef\@subystep{\fpeval{\tkz@gd@subystep/\tkz@init@ystep}}% + \draw [xstep = \@subxstep cm,% + ystep = \@subystep cm,% + color = \tkz@gd@subcolor,% + line width = \tkzRatioLineGrid]% + (\tkz@gxa,\tkz@gya) grid (\tkz@gxb,\tkz@gyb);% + \fi + \draw [color = \tkz@gd@color,% + line width = \tkz@gd@lw]% + (\tkz@gxa,\tkz@gya) grid (\tkz@gxb,\tkz@gyb);% + \endgroup +}% +\makeatother +\endinput \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-lines.tex b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-lines.tex index c8137bcc6e8..6bdecebee9a 100644 --- a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-lines.tex +++ b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-lines.tex @@ -1,5 +1,5 @@ % tkz-obj-eu-lines.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-lines.tex} +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-obj-eu-lines.tex} \makeatletter %<--------------------------------------------------------------------------–> % les lignes @@ -32,6 +29,10 @@ bisector/.code = \def\tkz@numl{3}, bisector out/.code = \def\tkz@numl{4}, symmedian/.code = \def\tkz@numl{5}, + tangent at/.code = {#1}{\def\tkz@numl{6} \def\tkz@ptat{#1}}, + tangent from/.code = {#1}{\def\tkz@numl{7} \def\tkz@ptfrom{#1}}, + median/.code = \def\tkz@numl{8}, + altitude/.code = \def\tkz@numl{9}, K/.code = \def\tkz@koeff{#1}, K = 1, normed/.is if = tkz@line@normed, @@ -39,7 +40,6 @@ normed = false, mediator } - \def\tkzDefLine{\pgfutil@ifnextchar[{\tkz@DefLine}{\tkz@DefLine[]}} \def\tkz@DefLine[#1](#2){% \begingroup @@ -49,7 +49,7 @@ % first case 0 \tkzDefMediatorLine(#2) \or% 1 - \tkzDefOrthLine[\tkz@koeff](#2)(\tkz@through) + \tkzDefOrthLine[\tkz@koeff](#2) \or% 2 \tkzDefLineLL(#2) \or% 3 @@ -58,6 +58,10 @@ \tkzDefBisectorOutLine(#2) \or% 5 \tkzDefSymmedianLine(#2) + \or% 6 + \tkzTgtAt(#1)(#2) + \or% 7 + \tkzTgtFromP(#1)(#2) \fi \endgroup } @@ -74,7 +78,7 @@ \pgfinterruptboundingbox \path[coordinate](\tkz@through)--++(\tkz@koeff\pgf@xa,\tkz@koeff\pgf@ya)% coordinate (tkzPointResult); - \endpgfinterruptboundingbox + \endpgfinterruptboundingbox \iftkz@line@normed \tkzVecKNorm(\tkz@through,tkzPointResult) \fi @@ -90,9 +94,9 @@ \pgfnodealias{tkz@OLtmp}{tkzPointResult} \tkz@VecKCoLinear[\tkz@koeff](#2,tkz@OLtmp,\tkz@through) \iftkz@line@normed - \pgfinterruptboundingbox + \pgfinterruptboundingbox \tkzVecKNorm(\tkz@through,tkzPointResult) - \endpgfinterruptboundingbox + \endpgfinterruptboundingbox \fi \endgroup}% %<--------------------------------------------------------------------------–> @@ -105,7 +109,7 @@ \begingroup \tkzDefEquilateral(#2,#3) \pgfnodealias{tkzFirstPointResult}{tkzPointResult} - \tkzDefEquilateral(#3,#2) + \tkzDefEquilateral(#3,#2) \pgfnodealias{tkzSecondPointResult}{tkzPointResult} \ifx\tkz@koeff=1 % \else @@ -119,12 +123,12 @@ \iftkz@line@normed \tkzDefMidPoint(#2,#3) \pgfnodealias{tkz@mid}{tkzPointResult} - \pgfinterruptboundingbox + % \pgfinterruptboundingbox \tkzVecKNorm[\tkz@koeff](tkz@mid,tkzFirstPointResult) \pgfnodealias{tkzFirstPointResult}{tkzPointResult} \tkzVecKNorm[\tkz@koeff](tkz@mid,tkzSecondPointResult) \pgfnodealias{tkzSecondPointResult}{tkzPointResult} - \endpgfinterruptboundingbox + % \endpgfinterruptboundingbox \fi \endgroup} % autre possibilité @@ -134,10 +138,11 @@ %<--------------------------------------------------------------------------–> \def\tkzDefBisectorLine(#1,#2,#3){% \begingroup - \pgfinterruptboundingbox + \pgfinterruptboundingbox \tkzDuplicateSegment(#2,#1)(#2,#3) \pgfnodealias{bi@tmp}{tkzPointResult} - \tkzDefEquilateral(bi@tmp,#1) + \tkzDefMidPoint(bi@tmp,#1) +% \tkzDefEquilateral(bi@tmp,#1) \ifx\tkz@koeff=1 % \else \tkzVecK[\tkz@koeff](#2,tkzPointResult) @@ -145,7 +150,7 @@ \iftkz@line@normed \tkzVecKNorm[\tkz@koeff](#2,tkzPointResult) \fi - \endpgfinterruptboundingbox + \endpgfinterruptboundingbox \endgroup } %<--------------------------------------------------------------------------–> @@ -153,7 +158,7 @@ %<--------------------------------------------------------------------------–> \def\tkzDefBisectorOutLine(#1,#2,#3){% \begingroup - \pgfinterruptboundingbox + \pgfinterruptboundingbox \tkzDuplicateLength(#2,#1)(#2,#3) \pgfnodealias{out@tmp}{tkzPointResult} \tkzDefMidPoint(#1,out@tmp) @@ -166,7 +171,7 @@ \iftkz@line@normed \tkzVecKNorm[\tkz@koeff](#2,tkzPointResult) \fi - \endpgfinterruptboundingbox + \endpgfinterruptboundingbox \endgroup } %<--------------------------------------------------------------------------–> @@ -178,7 +183,7 @@ \pgfnodealias{sym@pt1}{tkzPointResult} \tkzDefMidPoint(#1,#3) \pgfnodealias{sym@pt2}{tkzPointResult} - \tkzUSymOrth(#2,sym@pt1)(sym@pt2) + \tkzUSymOrth(#2,sym@pt1)(sym@pt2) \ifx\tkz@koeff=1 % \else \tkzVecK[\tkz@koeff](#2,tkzPointResult) @@ -188,43 +193,43 @@ \fi \endgroup } -%<-------------------------------------------------------------------------–> %<--------------------------------------------------------------------------–> % tangente à cercle passant par un point donné %<--------------------------------------------------------------------------–> -\def\tkzTgtFromPR(#1,#2)(#3){% - \begingroup - \tkzDefMidPoint(#1,#3) - \tkzCalcLength(tkzPointResult,#1) - \tkzInterCCR(#1,#2)(tkzPointResult,\tkzLengthResult pt){% - tkzFirstPointResult}{% - tkzSecondPointResult}% - \endgroup + +\def\tkzTgtAt(#1)(#2){% +\begingroup + \tkz@VecKOrthNorm[-1](#2,#1) + \endgroup } - +%<-------------------------------------------------------------------------–> \def\tkzTgtFromP(#1,#2)(#3){% - \begingroup +\begingroup \tkzDefMidPoint(#1,#3) - \tkzCalcLength(#1,#2) - \tkzGetLength{tkz@radone}% - \tkzCalcLength(tkzPointResult,#1) - \tkzGetLength{tkz@radtwo}% - \tkzInterCCR(#1,\tkz@radone pt)(tkzPointResult,\tkz@radtwo pt){% + \tkz@@CalcLengthcm(#1,#2){tkz@radone} + \tkz@@CalcLengthcm(tkzPointResult,#1){tkz@radtwo} + \tkzInterCCR(#1,\tkz@radone)(tkzPointResult,\tkz@radtwo){% tkzFirstPointResult}{% tkzSecondPointResult}% - \endgroup -} -\def\tkzTgtAt(#1)(#2){% +\endgroup +} +%<-------------------------------------------------------------------------–> +\def\tkzTgtFromPR(#1,#2)(#3){% \begingroup - \tkz@VecKOrthNorm[-1](#2,#1) - \endgroup -} %<--------------------------------------------------------------------------–> %<--------------------------------------------------------------------------–> + \tkzDefMidPoint(#1,#3) + \tkz@@CalcLengthcm(tkzPointResult,#1){tkzLengthResult} + \tkzInterCCR(#1,#2)(tkzPointResult,\tkzLengthResult){% + tkzFirstPointResult}{% + tkzSecondPointResult}% +\endgroup +} +%<--------------------------------------------------------------------------–> \def\tkz@numtang{0} \pgfkeys{/tkz@tang/.cd, - at/.code = {\def\tkz@numtang{0}\def\tkz@ptat{#1}}, - from/.code = {\def\tkz@numtang{1}\def\tkz@ptfrom{#1}}, - from with R/.code = {\def\tkz@numtang{2}\def\tkz@ptfrom{#1}} - } + at/.code = {\def\tkz@numtang{0}\def\tkz@ptat{#1}}, + from/.code = {\def\tkz@numtang{1}\def\tkz@ptfrom{#1}}, + from with R/.code = {\def\tkz@numtang{2}\def\tkz@ptfrom{#1}} + } %<--------------------------------------------------------------------------–> \def\tkzDefTangent{\pgfutil@ifnextchar[{\tkz@Tangent}{\tkz@Tangent[]}} diff --git a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-points-by.tex b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-points-by.tex index 9075bff11a3..d255a1713bd 100644 --- a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-points-by.tex +++ b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-points-by.tex @@ -1,5 +1,5 @@ % tkz-tools-eu-points-by.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,51 +7,45 @@ % 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-tools-eu-points-by.tex} + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-tools-el-points-by.tex} \makeatletter %<--------------------------------------------------------------------------–> % Transformations Géométriques %<--------------------------------------------------------------------------–> \def\tkz@numtrsf{0} \pgfkeys{/tkzDefPointBy/.cd, -translation/.code args={from #1 to #2}{% - \def\tkzfrom{#1}% - \def\tkzto{#2}% - \def\tkz@numtrsf{0}}, - homothety/.code args={center #1 ratio #2}{% - \def\tkzcenter{#1}% - \def\tkzratio{#2}% - \def\tkz@numtrsf{1}}, - reflection/.code args={over #1--#2}{% - \def\tkzdeb{#1}% - \def\tkzfin{#2}% - \def\tkz@numtrsf{2}}, - symmetry/.code args={center #1}{% - \def\tkzcenter{#1}% - \def\tkz@numtrsf{3}}, - projection/.code args={onto #1--#2}{% - \def\tkzdeb{#1}% - \def\tkzfin{#2}% - \def\tkz@numtrsf{4}}, - rotation/.code args={center #1 angle #2}{% - \def\tkzcenter{#1}% - \def\tkzangle{#2}% - \def\tkz@numtrsf{5}}, - rotation in rad/.code args={center #1 angle #2}{% - \def\tkzcenter{#1}% - \def\tkzangle{#2}% - \def\tkz@numtrsf{6}}, -inversion/.code args={center #1 through #2}{% - \def\tkzcenter{#1}% - \def\tkzpoint{#2}% - \def\tkz@numtrsf{7}} + translation/.code args={from #1 to #2}{ \def\tkzfrom{#1}% + \def\tkzto{#2}% + \def\tkz@numtrsf{0}}, + homothety/.code args={center #1 ratio #2}{ \def\tkzcenter{#1}% + \def\tkzratio{#2}% + \def\tkz@numtrsf{1}}, + reflection/.code args={over #1--#2}{ \def\tkzdeb{#1}% + \def\tkzfin{#2}% + \def\tkz@numtrsf{2}}, + symmetry/.code args={center #1}{ \def\tkzcenter{#1}% + \def\tkz@numtrsf{3}}, + projection/.code args={onto #1--#2}{ \def\tkzdeb{#1}% + \def\tkzfin{#2}% + \def\tkz@numtrsf{4}}, + rotation/.code args={center #1 angle #2}{ \def\tkzcenter{#1}% + \def\tkzangle{#2}% + \def\tkz@numtrsf{5}}, + rotation in rad/.code args={center #1 angle #2}{ \def\tkzcenter{#1}% + \def\tkzangle{#2}% + \def\tkz@numtrsf{6}}, + inversion/.code args={center #1 through #2}{ \def\tkzcenter{#1}% + \def\tkzpoint{#2}% + \def\tkz@numtrsf{7}}, + inversion negative/.code args={center #1 through #2}{ \def\tkzcenter{#1}% + \def\tkzpoint{#2}% + \def\tkz@numtrsf{8}} +% inversion négative ? } %<--------------------------------------------------------------------------–> \def\tkzDefPointBy{\pgfutil@ifnextchar[{\tkz@DefPointBy}{\tkz@DefPointBy[]}} @@ -75,6 +69,8 @@ inversion/.code args={center #1 through #2}{% \tkzURotateInRad(\tkzcenter,\tkzangle)(#2) \or% 7 \tkzUInversePoint(\tkzcenter,\tkzpoint)(#2) +\or% 8 + \tkzUInverseNegativePoint(\tkzcenter,\tkzpoint)(#2) \fi \endgroup } @@ -93,13 +89,15 @@ inversion/.code args={center #1 through #2}{% \or% 3 \tkzCSym(\tkzcenter)(#2){#3} \or% 4 - \tkzProjection(\tkzdeb,\tkzfin)(#2){#3} + \tkzProjection(\tkzdeb,\tkzfin)(#2){#3} \or% 5 \tkzRotateAngle(\tkzcenter,\tkzangle)(#2){#3} \or% 6 \tkzRotateInRad(\tkzcenter,\tkzangle)(#2){#3} \or% 7 \tkzInversePoint(\tkzcenter,\tkzpoint)(#2){#3} + \or% 8 + \tkzInverseNegativePoint(\tkzcenter,\tkzpoint)(#2){#3} \fi \endgroup } @@ -235,7 +233,7 @@ inversion/.code args={center #1 through #2}{% \pgfinterruptboundingbox \path[coordinate](#3)--++(-\tkz@ax,\tkz@ay) coordinate (tkz@point); \tkzInterLL(#1,#2)(#3,tkz@point)% définit tkzPointResult - \endpgfinterruptboundingbox + \endpgfinterruptboundingbox \endgroup } %<--------------------------------------------------------------------------–> @@ -334,9 +332,9 @@ inversion/.code args={center #1 through #2}{% {#2} \tkz@bx\pgf@x% \tkz@by\pgf@y% - \pgfinterruptboundingbox - \path (\tkz@bx,\tkz@by) coordinate (tkzPointResult);% - \endpgfinterruptboundingbox + \pgfinterruptboundingbox + \path (\tkz@bx,\tkz@by) coordinate (tkzPointResult);% + \endpgfinterruptboundingbox \endgroup } %<--------------------------------------------------------------------------–> @@ -405,19 +403,51 @@ inversion/.code args={center #1 through #2}{% \else \xdef\tkz@pointtsf{\tkz@FirstPoint} \fi - \tkzCalcLength[cm](#1,#2)\tkzGetLength{tkz@lna} - \tkzCalcLength[cm](#1,\PointIP)\tkzGetLength{tkz@lnb} - \edef\tkz@lnc{\tkz@lna/\tkz@lnb*\tkz@lna} - \tkzVecKNorm[\tkz@lnb](#1,\PointIP) - } + \tkz@@CalcLengthcm(#1,#2){tkz@lna} + \tkz@@CalcLengthcm(#1,\PointIP){tkz@lnb} + \edef\tkz@lnc{\fpeval{\tkz@lna/\tkz@lnb*\tkz@lna}} + \tkzVecKNorm[\tkz@lnc](#1,\PointIP) + \pgfnodealias{\tkz@pointtsf}{tkzPointResult} + } \endgroup } \def\tkzUInversePoint(#1,#2)(#3){% \begingroup - \tkzCalcLength[cm](#1,#2)\tkzGetLength{tkz@lna}% - \tkzCalcLength[cm](#1,#3)\tkzGetLength{tkz@lnb}% - \edef\tkz@lnc{\fpeval{\tkz@lna/\tkz@lnb*\tkz@lna}} + \tkz@@CalcLengthcm(#1,#2){tkz@lna}% + \tkz@@CalcLengthcm(#1,#3){tkz@lnb}% + \edef\tkz@lnc{\fpeval{\tkz@lna/\tkz@lnb*\tkz@lna}} + \tkzVecKNorm[\tkz@lnc](#1,#3) +\endgroup +} +%<--------------------------------------------------------------------------–> +% Inverse negative of a point +%<--------------------------------------------------------------------------–> +\def\tkzInverseNegativePoint(#1,#2)(#3)#4{% +\begingroup +\gdef\tkz@LastList{#4} + \foreach\PointIP in {#3}{% + \FirstPointInList\tkz@LastList + \ifx\tkz@FirstPoint\tkzutil@empty + \xdef\tkz@pointtsf{\PointIP '} + \else + \xdef\tkz@pointtsf{\tkz@FirstPoint} + \fi + \tkz@@CalcLengthcm(#1,#2){tkz@lna} + \tkz@@CalcLengthcm(#1,\PointIP){tkz@lnb} + \edef\tkz@lnc{\fpeval{\tkz@lna/\tkz@lnb*\tkz@lna}} + \tkzVecKNorm[\tkz@lnc](#1,\PointIP) + \tkzUCSym(#1)(tkzPointResult) + \pgfnodealias{\tkz@pointtsf}{tkzPointResult} + } +\endgroup +} +\def\tkzUInverseNegativePoint(#1,#2)(#3){% +\begingroup + \tkz@@CalcLengthcm(#1,#2){tkz@lna}% + \tkz@@CalcLengthcm(#1,#3){tkz@lnb}% + \edef\tkz@lnc{\fpeval{\tkz@lna/\tkz@lnb*\tkz@lna}} \tkzVecKNorm[\tkz@lnc](#1,#3) + \tkzUCSym(#1)(tkzPointResult) \endgroup } %<--------------------------------------------------------------------------–> diff --git a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-points-rnd.tex b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-points-rnd.tex index 008021cf106..9832a3e9be6 100644 --- a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-points-rnd.tex +++ b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-points-rnd.tex @@ -1,5 +1,5 @@ % tkz-obj-eu-points-rnd.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,14 +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-points-rnd.tex} + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-obj-el-points-rnd.tex} %<--------------------------------------------------------------------------–> \makeatletter %<-------------------------------------------------------------------------–> @@ -94,25 +92,25 @@ %<--------------------------------------------------------------------------–> \def\tkzRandPointOnCircle(#1,#2){% \pgfmathrandominteger{\tkzrnd}{0}{360} -\tkz@ax#2 % - \edef\tkz@xa{\fpeval{\tkz@ax*cosd(\tkzrnd)}} - \edef\tkz@xb{\fpeval{\tkz@ax*sind(\tkzrnd)}} - \path[coordinate]($(#1) + (\tkz@xa pt,\tkz@xb pt) $) coordinate (tkzPointResult); +\tkz@ax#2cm % + \edef\tkz@pxa{\fpeval{\tkz@ax*cosd(\tkzrnd)}} + \edef\tkz@pxb{\fpeval{\tkz@ax*sind(\tkzrnd)}} + \path[coordinate]($(#1) + (\tkz@pxa pt,\tkz@pxb pt) $) coordinate (tkzPointResult); } \def\tkzRandPointOnCircleThrough(#1,#2){% \pgfmathrandominteger{\tkzrnd}{0}{360} -\tkzCalcLength(#1,#2) - \edef\tkz@xa{\fpeval{\tkzLengthResult*cosd(\tkzrnd)}} - \edef\tkz@xb{\fpeval{\tkzLengthResult*sind(\tkzrnd)}} -\path[coordinate]($(#1) + (\tkz@xa pt ,\tkz@xb pt) $) coordinate (tkzPointResult); +\tkz@@CalcLength(#1,#2){tkzLengthResult} + \edef\tkz@pxa{\fpeval{\tkzLengthResult*cosd(\tkzrnd)}} + \edef\tkz@pxb{\fpeval{\tkzLengthResult*sind(\tkzrnd)}} +\path[coordinate]($(#1) + (\tkz@pxa pt ,\tkz@pxb pt) $) coordinate (tkzPointResult); } %<--------------------------------------------------------------------------–> \def\tkzRandPointOnDisk(#1,#2){% \pgfmathrandominteger{\tkzrnd}{0}{360} - \tkzCalcLength(#1,#2) - \edef\tkz@xa{\fpeval{\tkzLengthResult*cosd(\tkzrnd)}} - \edef\tkz@xb{\fpeval{\tkzLengthResult*sind(\tkzrnd)}} - \path[coordinate]($(#1) + (\tkz@xa pt ,\tkz@xb pt) $) coordinate (tkz@tmp); + \tkz@@CalcLength(#1,#2){tkzLengthResult} + \edef\tkz@pxa{\fpeval{\tkzLengthResult*cosd(\tkzrnd)}} + \edef\tkz@pxb{\fpeval{\tkzLengthResult*sind(\tkzrnd)}} + \path[coordinate]($(#1) + (\tkz@pxa pt ,\tkz@pxb pt) $) coordinate (tkz@tmp); \pgfmathparse{rnd} \let\myrnd\pgfmathresult \path[coordinate] ($ (#1)!\myrnd!(tkz@tmp) $) coordinate (tkzPointResult); diff --git a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-points-spc.tex b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-points-spc.tex new file mode 100644 index 00000000000..888e127bfcc --- /dev/null +++ b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-points-spc.tex @@ -0,0 +1,536 @@ +% tkz-obj-eu-points.tex +% 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. +% The latest version of this license is in +% 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. + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-obj-el-points.tex} +\makeatletter +%add ExCenter +%<--------------------------------------------------------------------------–> +% Specific points +%<--------------------------------------------------------------------------–> +% barycentre +%<--------------------------------------------------------------------------–> +\def\tkzDefBarycentricPoint(#1){% +\begingroup + \path[coordinate] (barycentric cs:#1) coordinate (tkzPointResult); +\endgroup +} +\let\tkzDefBCPoint\tkzDefBarycentricPoint + +\def\tkzDefCentroid(#1){% +\begingroup + \xdef\tkz@arg{} + \foreach \X in {#1} + {% + \ifx\tkzutil@empty\tkz@arg% + \xdef\tkz@arg{\X=1} + \else + \xdef\tkz@arg{\tkz@arg,\X=1} + \fi + } + \path[coordinate] (barycentric cs:\tkz@arg) coordinate (tkzPointResult); +\endgroup +} + +%<--------------------------------------------------------------------------–> +% milieu de deux points +%<--------------------------------------------------------------------------–> +% possible \coordinate (#3) at ($(#1)!0.5!(#2)$); +%<--------------------------------------------------------------------------–> +% \def\tkzDefMidPoint(#1,#2){% +% \begingroup +% \path (#1) -- (#2) coordinate[pos=.5](tkzPointResult); +% \endgroup +% } +\def\tkzDefMidPoint(#1,#2){% +\begingroup + \pgf@process{\pgfpointanchor{#1}{center}}% + \tkz@ax\pgf@x% + \tkz@ay\pgf@y% + \pgf@process{\pgfpointanchor{#2}{center}}% + \tkz@bx\pgf@x% + \tkz@by\pgf@y% + \advance\tkz@bx by\tkz@ax\relax% + \advance\tkz@by by\tkz@ay\relax% + \divide\tkz@bx by2\relax% + \divide\tkz@by by2\relax + \pgfcoordinate{tkzPointResult}{\pgfqpoint{\tkz@bx}{\tkz@by}} +\endgroup +} +\def\tkz@DefMidPoint(#1,#2,#3,#4){% +\begingroup + \tkz@ax#1% + \tkz@ay#2% + \tkz@bx#3% + \tkz@by#4% + \advance\tkz@bx by\tkz@ax\relax% + \advance\tkz@by by\tkz@ay\relax% + \divide\tkz@bx by2\relax% + \divide\tkz@by by2\relax + \pgfcoordinate{tkzPointResult}{\pgfqpoint{\tkz@bx}{\tkz@by}} +\endgroup +} +%<--------------------------------------------------------------------------–> +% Internal Similitude center +% Two circles have two similitude centers namely the internal center of +% similitude Si and the external similitude center Se. +%<--------------------------------------------------------------------------–> +\def\tkz@numhomo{0} +\pgfkeys{ +/tkzSimilitudeCenter/.cd, + node/.code = \def\tkz@numhomo{0}, + R/.code = \def\tkz@numhomo{1}, + node +} +\def\tkzDefIntSimilitudeCenter{\pgfutil@ifnextchar[{\tkz@DefIntSimilitudeCenter}{\tkz@DefIntSimilitudeCenter[]}} +\def\tkz@DefIntSimilitudeCenter[#1](#2,#3)(#4,#5){% +\begingroup +\pgfqkeys{/tkzSimilitudeCenter}{#1} +\ifcase\tkz@numhomo% + \tkzCalcLength(#2,#3) + \tkzGetLength{tkz@rt} + \tkzCalcLength(#4,#5) + \tkzGetLength{tkz@rf} + \or% 1 + \def\tkz@rt{#3} + \def\tkz@rf{#5} +\fi + \path[coordinate](barycentric cs:#2=\tkz@rf,#4=\tkz@rt)coordinate (tkzPointResult); +\endgroup +} +\let\tkzDefIntHomotheticCenter\tkzDefIntSimilitudeCenter +%<--------------------------------------------------------------------------–> +% External Similitude center +%<--------------------------------------------------------------------------–> +\def\tkzDefExtSimilitudeCenter{\pgfutil@ifnextchar[{\tkz@DefExtSimilitudeCenter}{\tkz@DefExtSimilitudeCenter[]}} + +\def\tkz@DefExtSimilitudeCenter[#1](#2,#3)(#4,#5){% +\begingroup +\pgfqkeys{/tkzSimilitudeCenter}{#1} +\ifcase\tkz@numhomo% + \tkzCalcLength(#2,#3) + \tkzGetLength{tkz@rt} + \tkzCalcLength(#4,#5) + \tkzGetLength{tkz@rf} + \or% 1 + \def\tkz@rt{#3} + \def\tkz@rf{#5} +\fi + \path[coordinate](barycentric cs:#2=-\tkz@rf,#4=\tkz@rt) coordinate(tkzPointResult); +\endgroup +} + +\let\tkzDefExtHomotheticCenter\tkzDefExtSimilitudeCenter + +%<--------------------------------------------------------------------------–> +% golden ratio +%<--------------------------------------------------------------------------–> +\def\tkzDefGoldenRatio(#1,#2){% +\begingroup +\tkzDefPointWith[linear,K=\tkzInvPhi](#1,#2) +\endgroup +} +%<--------------------------------------------------------------------------–> +% triangle center +%<--------------------------------------------------------------------------–> + +\def\tkz@numtc{0} +\pgfkeys{/tkzDefTriangleCenter/.cd, + ortho/.code = \def\tkz@numtc{0}, + orthic/.code = \def\tkz@numtc{0}, + centroid/.code = \def\tkz@numtc{1}, + median/.code = \def\tkz@numtc{1}, + circum/.code = \def\tkz@numtc{2}, + in/.code = \def\tkz@numtc{3}, + ex/.code = \def\tkz@numtc{4}, + euler/.code = \def\tkz@numtc{5}, + symmedian/.code = \def\tkz@numtc{6}, + lemoine/.code = \def\tkz@numtc{6}, + grebe/.code = \def\tkz@numtc{6}, + spieker/.code = \def\tkz@numtc{7}, + gergonne/.code = \def\tkz@numtc{8}, + nagel/.code = \def\tkz@numtc{9}, + mittenpunkt/.code = \def\tkz@numtc{10}, + feuerbach/.code = \def\tkz@numtc{11}, + circum +} +\def\tkzDefTriangleCenter{\pgfutil@ifnextchar[{\tkz@DefTriangleCenter}{\tkz@DefTriangleCenter[]}} +\def\tkz@DefTriangleCenter[#1](#2){% +\begingroup +\pgfqkeys{/tkzDefTriangleCenter}{#1} +\ifcase\tkz@numtc% + \tkzOrthoCenter(#2) + \or% 1 + \tkzCentroid(#2) + \or% 2 + \tkzCircumCenter(#2) + \or% 3 + \tkzInCenter(#2) + \or% 4 + \tkzExCenter(#2) + \or% 5 + \tkzEulerCenter(#2) + \or% 6 + \tkzSymmedianCenter(#2) + \or% 7 + \tkzSpiekerCenter(#2) + \or% 8 + \tkzGergonneCenter(#2) + \or%9 + \tkzNagelCenter(#2) + \or%10 + \tkzMittenpunktCenter(#2) + \or%11 + \tkzFeuerbachCenter(#2) + \fi +\endgroup +} +%<--------------------------------------------------------------------------–> +% OrthoCenter +%<--------------------------------------------------------------------------–> +\def\tkzOrthoCenter(#1,#2,#3){% H orthocentre +\begingroup + \pgfinterruptboundingbox + \tkzUProjection(#1,#2)(#3) + \pgfnodealias{ort@pta}{tkzPointResult} + \tkzUProjection(#1,#3)(#2) + \pgfnodealias{ort@ptb}{tkzPointResult} + \tkzInterLL(#2,ort@ptb)(#3,ort@pta) + \endpgfinterruptboundingbox +\endgroup +} +\let\tkzDefOrthoCenter\tkzOrthoCenter +%<--------------------------------------------------------------------------–> +% GravityCenter modif 3.03 +%<--------------------------------------------------------------------------–> +\def\tkzCentroid(#1,#2,#3){% +\begingroup + \pgf@process{\pgfpointanchor{#1}{center}}% + \tkz@ax\pgf@x% + \tkz@ay\pgf@y% + \pgf@process{\pgfpointanchor{#2}{center}}% + \tkz@bx\pgf@x% + \tkz@by\pgf@y% + \pgf@process{\pgfpointanchor{#3}{center}}% + \tkz@cx\pgf@x% + \tkz@cy\pgf@y% + \advance\tkz@cx by\tkz@ax\relax% + \advance\tkz@cy by\tkz@ay\relax% + \advance\tkz@cx by\tkz@bx\relax% + \advance\tkz@cy by\tkz@by\relax% + \divide\tkz@cx by3\relax% + \divide\tkz@cy by3\relax + \pgfinterruptboundingbox + \pgfcoordinate{tkzPointResult}{\pgfqpoint{\tkz@cx}{\tkz@cy}} + \endpgfinterruptboundingbox +\endgroup +} +\let\tkzBaryCenter\tkzCentroid + +%<--------------------------------------------------------------------------–> +% CircumCenter +%<--------------------------------------------------------------------------–> +\def\tkzCircumCenter(#1,#2,#3){% +\begingroup +\pgfinterruptboundingbox + \tkzDefMediatorLine(#1,#2) + \pgf@process{\pgfpointanchor{tkzFirstPointResult}{center}}% + \tkz@ax\pgf@x% + \tkz@ay\pgf@y% + \pgf@process{\pgfpointanchor{tkzSecondPointResult}{center}}% + \tkz@bx\pgf@x% + \tkz@by\pgf@y% + \tkzDefMediatorLine(#1,#3) + \pgf@process{\pgfpointanchor{tkzFirstPointResult}{center}}% + \tkz@cx\pgf@x% + \tkz@cy\pgf@y% + \pgf@process{\pgfpointanchor{tkzSecondPointResult}{center}}% + \tkz@dx\pgf@x% + \tkz@dy\pgf@y% + \tkzInterLLxy(\tkz@ax,\tkz@ay,\tkz@bx,\tkz@by)(\tkz@cx,\tkz@cy,\tkz@dx,\tkz@dy)% +\endpgfinterruptboundingbox +\endgroup +} +\let\tkzDefCircumCenter\tkzCircumCenter +%<--------------------------------------------------------------------------–> +% InCenter +%<--------------------------------------------------------------------------–> +\def\tkzInCenter(#1,#2,#3){% +\begingroup +\pgfinterruptboundingbox + \tkzDefBisectorLine(#3,#1,#2) + \pgf@process{\pgfpointanchor{tkzPointResult}{center}}% + \tkz@bx\pgf@x% + \tkz@by\pgf@y% + \tkzDefBisectorLine(#3,#2,#1) + \pgf@process{\pgfpointanchor{tkzPointResult}{center}}% + \tkz@dx\pgf@x% + \tkz@dy\pgf@y% + \pgf@process{\pgfpointanchor{#1}{center}}% + \tkz@ax\pgf@x% + \tkz@ay\pgf@y% + \pgf@process{\pgfpointanchor{#2}{center}}% + \tkz@cx\pgf@x% + \tkz@cy\pgf@y% + \tkzInterLLxy(\tkz@ax,\tkz@ay,\tkz@bx,\tkz@by)% + (\tkz@cx,\tkz@cy,\tkz@dx,\tkz@dy)% + \endpgfinterruptboundingbox +\endgroup +} +\let\tkzDefInCenter\tkzInCenter +%<--------------------------------------------------------------------------–> +% ExCenter +%<--------------------------------------------------------------------------–> +\def\tkzExCenter(#1,#2,#3){% +\begingroup +\pgfinterruptboundingbox + \tkzDefBisectorOutLine(#2,#1,#3) + \pgf@process{\pgfpointanchor{tkzPointResult}{center}}% + \tkz@bx\pgf@x% + \tkz@by\pgf@y% + \tkzDefBisectorOutLine(#2,#3,#1) + \pgf@process{\pgfpointanchor{tkzPointResult}{center}}% + \tkz@dx\pgf@x% + \tkz@dy\pgf@y% + \pgf@process{\pgfpointanchor{#1}{center}}% + \tkz@ax\pgf@x% + \tkz@ay\pgf@y% + \pgf@process{\pgfpointanchor{#3}{center}}% + \tkz@cx\pgf@x% + \tkz@cy\pgf@y% + \tkzInterLLxy(\tkz@ax,\tkz@ay,\tkz@bx,\tkz@by)% + (\tkz@cx,\tkz@cy,\tkz@dx,\tkz@dy)% + \endpgfinterruptboundingbox +\endgroup +} +\let\tkzDefExCenter\tkzExCenter +%<--------------------------------------------------------------------------–> +% EulerCenter neuf points +%<--------------------------------------------------------------------------–> +\def\tkzEulerCenter(#1,#2,#3){% +% mileu de orthocentre et centre cercle circonscrit +% passe par les midpoints par les pieds des hauteurs +\begingroup +\pgfinterruptboundingbox + \tkzDefMidPoint(#1,#2) + \pgfnodealias{eu@mic}{tkzPointResult} + \tkzDefMidPoint(#1,#3) + \pgfnodealias{eu@mib}{tkzPointResult} + \tkzDefMidPoint(#2,#3) + \pgfnodealias{eu@mia}{tkzPointResult} + \tkzCircumCenter(eu@mia,eu@mib,eu@mic) +\endpgfinterruptboundingbox +\endgroup +} +\let\tkzNinePointCenter\tkzEulerCenter +\let\tkzDefEulerCenter\tkzEulerCenter +%<--------------------------------------------------------------------------–> +%Symmedian center Lemoine point Grebe point K +%<--------------------------------------------------------------------------–> +\def\tkzSymmedianCenter(#1,#2,#3){% +\begingroup +\pgfinterruptboundingbox + \tkzDefMidPoint(#2,#3) + \pgfnodealias{eu@mic}{tkzPointResult} + \tkzDefMidPoint(#1,#3) + \pgfnodealias{eu@mib}{tkzPointResult} + \tkzUProjection(#2,#3)(#1) + \pgfnodealias{ort@pta}{tkzPointResult} + \tkzDefMidPoint(#1,ort@pta) + \pgfnodealias{eu@mid}{tkzPointResult} + \tkzUProjection(#1,#3)(#2) + \pgfnodealias{ort@ptb}{tkzPointResult} + \tkzDefMidPoint(#2,ort@ptb) + \pgfnodealias{eu@mie}{tkzPointResult} + \tkzInterLL(eu@mic,eu@mid)(eu@mib,eu@mie) +\endpgfinterruptboundingbox +\endgroup +} +\let\tkzLemoinePoint\tkzSymmedianCenter +\let\tkzGrebePoint\tkzSymmedianCenter +\let\tkzDefLemoinePoint\tkzLemoinePoint +%<--------------------------------------------------------------------------–> +% Spieker center +%<--------------------------------------------------------------------------–> +\def\tkzSpiekerCenter(#1,#2,#3){% +\begingroup +% we need to get the midpoints +\pgfcoordinate{tkz@m3}{% + \pgfpointscale{0.5}{% + \pgfpointadd{\pgfpointanchor{#1}{center}}% + {\pgfpointanchor{#2}{center}}}}% +\pgfcoordinate{tkz@m2}{% + \pgfpointscale{0.5}{% + \pgfpointadd{\pgfpointanchor{#1}{center}}% + {\pgfpointanchor{#3}{center}}}}% +\pgfcoordinate{tkz@m1}{% + \pgfpointscale{0.5}{% + \pgfpointadd{\pgfpointanchor{#2}{center}}% + {\pgfpointanchor{#3}{center}}}}% +\tkzInCenter(tkz@m1,tkz@m2,tkz@m3) +\endgroup +} +\let\tkzDefSpiekerCenter\tkzSpiekerCenter +%<--------------------------------------------------------------------------–> +% Gergonne center Ge +%<--------------------------------------------------------------------------–> +\def\tkzGergonneCenter(#1,#2,#3){% +\begingroup +\pgfinterruptboundingbox + \tkzInCenter(#1,#2,#3) + \pgfnodealias{tkz@ptin}{tkzPointResult} + \tkzUProjection(#2,#3)(tkz@ptin) + \pgfnodealias{tkz@oca}{tkzPointResult} + \tkzUProjection(#1,#3)(tkz@ptin) + \pgfnodealias{tkz@ocb}{tkzPointResult} + \tkzInterLL(#1,tkz@oca)(#2,tkz@ocb) +\endpgfinterruptboundingbox +\endgroup +} +\let\tkzDefGergonneCenter\tkzGergonneCenter +%<--------------------------------------------------------------------------–> +% Nagel center Na +%<--------------------------------------------------------------------------–> +% INa = 3 IG. Nagel point % correction 02/02/20 +\def\tkzNagelCenter(#1,#2,#3){% +\begingroup +\pgfinterruptboundingbox + \tkzDefExcentralTriangle(#1,#2,#3){tkz@a,tkz@b,tkz@c} + \tkzUProjection(#2,#3)(tkz@a) + \pgfnodealias{tkz@tgta}{tkzPointResult} + \tkzUProjection(#1,#2)(tkz@c) + \pgfnodealias{tkz@tgtc}{tkzPointResult} + \tkzInterLL(#1,tkz@tgta)(#3,tkz@tgtc) +\endpgfinterruptboundingbox +\endgroup +} +\let\tkzDefNagelCenter\tkzNagelCenter +%<--------------------------------------------------------------------------–> +% Mittenpunkt +%<--------------------------------------------------------------------------–> +\def\tkzMittenpunktCenter(#1,#2,#3){% +\begingroup +\pgfinterruptboundingbox + \tkzExCenter(#2,#3,#1) + \pgfnodealias{tkz@a}{tkzPointResult} + \tkzExCenter(#3,#1,#2) + \pgfnodealias{tkz@b}{tkzPointResult} + \pgfcoordinate{tkz@ma}{% + \pgfpointscale{0.5}{% + \pgfpointadd{\pgfpointanchor{#1}{center}}{\pgfpointanchor{#2}{center}}}}% + \pgfcoordinate{tkz@mb}{% + \pgfpointscale{0.5}{% + \pgfpointadd{\pgfpointanchor{#2}{center}}{\pgfpointanchor{#3}{center}}}}% + \tkzInterLL(tkz@a,tkz@ma)(tkz@b,tkz@mb) + \endpgfinterruptboundingbox +\endgroup +} +\let\tkzDefMittenpunktCenter\tkzMittenpunktCenter +\let\tkzDefMiddlespoint\tkzMittenpunktCenter +%<--------------------------------------------------------------------------–> +% Feuerbach point +%<--------------------------------------------------------------------------–> +\def\tkzFeuerbachCenter(#1,#2,#3){% +\begingroup +\pgfinterruptboundingbox + \tkzEulerCenter(#1,#2,#3) + \pgfnodealias{tkz@euler}{tkzPointResult} + \tkzInCenter(#1,#2,#3) + \pgfnodealias{tkz@in}{tkzPointResult} + \tkzUProjection(#2,#3)(tkzPointResult) + \tkzInterLC(tkz@in,tkz@euler)(tkz@in,tkzPointResult)\tkzGetFirstPoint{tkz@fe} + \tkzRenamePoint(tkz@fe){tkzPointResult} + \endpgfinterruptboundingbox +\endgroup +} +\let\tkzDefFeuerbachCenter\tkzFeuerbachCenter +%<--------------------------------------------------------------------------–> +% Orthogonal center +%<--------------------------------------------------------------------------–> +\def\tkzOrthogonalCenter(#1,#2){% +\begingroup +\pgfinterruptboundingbox + \tkz@VecK[\tkz@koeff/(1+\tkz@koeff)](#1,#2) + \pgfnodealias{tkzFirstPointResult}{tkzPointResult} + \tkz@VecK[\tkz@koeff/(\tkz@koeff-1)](#1,#2) + \pgfnodealias{tkzSecondPointResult}{tkzPointResult} + \tkzDefMidPoint(tkzFirstPointResult,tkzSecondPointResult) +\endpgfinterruptboundingbox +\endgroup +} +%<--------------------------------------------------------------------------–> +% End Triangle center +%<--------------------------------------------------------------------------–> +%<--------------------------------------------------------------------------–> +% Projection center of excircles +%<--------------------------------------------------------------------------–> +\def\tkzDefProjExcenter{\pgfutil@ifnextchar[{% + \tkz@DefProjExcenter}{% + \tkz@DefProjExcenter[]} + } +\def\tkz@DefProjExcenter[#1](#2,#3,#4)(#5)#6{ +\begingroup + \SetUpPTTR{#1} + \foreach \name [count=\i] in {#5} {% + \global\expandafter\edef\csname tkz@pt\i\endcsname{\name} + } + \foreach \name [count=\i] in {#6} {% + \global\expandafter\edef\csname tkz@ppt\i\endcsname{\name} + } +\tkzDefPointBy[projection=onto #3--#4 ](\tkz@pttr@name \csname tkz@pt1\endcsname) +\pgfnodealias{\csname tkz@ppt1\endcsname\csname tkz@pt1\endcsname}{tkzPointResult} +\tkzDefPointBy[projection=onto #3--#4 ](\tkz@pttr@name \csname tkz@pt2\endcsname) +\pgfnodealias{\csname tkz@ppt1\endcsname\csname tkz@pt2\endcsname}{tkzPointResult} +\tkzDefPointBy[projection=onto #3--#4 ](\tkz@pttr@name \csname tkz@pt3\endcsname) +\pgfnodealias{\csname tkz@ppt1\endcsname\csname tkz@pt3\endcsname}{tkzPointResult} +\tkzDefPointBy[projection=onto #2--#4 ](\tkz@pttr@name \csname tkz@pt1\endcsname) +\pgfnodealias{\csname tkz@ppt2\endcsname\csname tkz@pt1\endcsname}{tkzPointResult} +\tkzDefPointBy[projection=onto #2--#4 ](\tkz@pttr@name \csname tkz@pt2\endcsname) +\pgfnodealias{\csname tkz@ppt2\endcsname\csname tkz@pt2\endcsname}{tkzPointResult} +\tkzDefPointBy[projection=onto #2--#4 ](\tkz@pttr@name \csname tkz@pt3\endcsname) +\pgfnodealias{\csname tkz@ppt2\endcsname\csname tkz@pt3\endcsname}{tkzPointResult} +\tkzDefPointBy[projection=onto #3--#2 ](\tkz@pttr@name \csname tkz@pt1\endcsname) +\pgfnodealias{\csname tkz@ppt3\endcsname\csname tkz@pt1\endcsname}{tkzPointResult} +\tkzDefPointBy[projection=onto #3--#2 ](\tkz@pttr@name \csname tkz@pt2\endcsname) +\pgfnodealias{\csname tkz@ppt3\endcsname\csname tkz@pt2\endcsname}{tkzPointResult} +\tkzDefPointBy[projection=onto #3--#2 ](\tkz@pttr@name \csname tkz@pt3\endcsname) +\pgfnodealias{\csname tkz@ppt3\endcsname\csname tkz@pt3\endcsname}{tkzPointResult} +\endgroup +} +%<--------------------------------------------------------------------------–> +% Point on circle +%<--------------------------------------------------------------------------–> +\pgfkeys{/tkzptcircle/.cd, + angle/.store in = \tkz@angle, + angle = 0 , + center/.store in = \tkz@center, + radius/.store in = \tkz@radius, +} +\def\tkzDefPointOnCircle{\pgfutil@ifnextchar[{\tkz@DefPointOnCircle}{\tkz@DefPointOnCircle[]}} +\def\tkz@DefPointOnCircle[#1]{% +\begingroup +\pgfqkeys{/tkzptcircle}{#1} +\path (\tkz@center) --++(\tkz@angle:\tkz@radius) coordinate(tkzPointResult); +\endgroup +} +%<--------------------------------------------------------------------------–> +% Point on line +%<--------------------------------------------------------------------------–> +\def\tkzDefPointOnLine{\pgfutil@ifnextchar[{\tkz@DefPointOnLine}{\tkz@DefPointOnLine[]}} +\def\tkz@DefPointOnLine[#1](#2,#3){% +\begingroup +\path (#2) to [#1] coordinate (tkzPointResult) (#3); +\endgroup +} +\makeatother +\endinput \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-points-with.tex b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-points-with.tex index 66ce3aa16ca..585b90c1b68 100644 --- a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-points-with.tex +++ b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-points-with.tex @@ -1,5 +1,5 @@ -% tkz-obj-eu-points-with.tex -% Copyright 2020 Alain Matthes +% tkz-obj-el-points-with.tex +% 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,14 +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-points-with.tex} + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-obj-el-points-with.tex} \makeatletter %<--------------------------------------------------------------------------–> % Vectors @@ -39,9 +37,9 @@ \def\tkzDuplicateSegment(#1,#2)(#3,#4){% \begingroup - \tkzCalcLength(#1,#2)\tkzGetLength{tkz@firstlen}% - \tkzCalcLength(#3,#4)\tkzGetLength{tkz@secondlen}% - \edef\tkz@ratio{\fpeval{\tkz@firstlen/\tkz@secondlen}} + \tkz@@CalcLength(#1,#2){tkz@firstlen}% + \tkz@@CalcLength(#3,#4){tkz@secondlen}% + \edef\tkz@ratio{\fpeval{\tkz@firstlen/\tkz@secondlen}} \tkz@VecKCoLinear[\tkz@ratio](#3,#4,#3)% \endgroup } @@ -263,6 +261,5 @@ \endpgfinterruptboundingbox \endgroup }% -%<-------------------------------------------------------------------------–> \makeatother \endinput \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-points.tex b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-points.tex index 64118c22e9a..c7b94a86a0a 100644 --- a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-points.tex +++ b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-points.tex @@ -1,5 +1,5 @@ -% tkz-obj-eu-points.tex -% Copyright 2020 Alain Matthes + % tkz-obj-eu-points.tex +% 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,491 +7,322 @@ % 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”. -% +% 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-points.tex} -\makeatletter -%add ExCenter -%<--------------------------------------------------------------------------–> -% Specific points -%<--------------------------------------------------------------------------–> -% barycentre -%<--------------------------------------------------------------------------–> -\def\tkzDefBarycentricPoint(#1){% -\begingroup - \path[coordinate] (barycentric cs:#1) coordinate (tkzPointResult); -\endgroup -} -\let\tkzDefBCPoint\tkzDefBarycentricPoint -\def\tkzDefCentroid(#1){% -\begingroup - \xdef\tkz@arg{} - \foreach \X in {#1} - {% - \ifx\tkzutil@empty\tkz@arg% - \xdef\tkz@arg{\X=1} - \else - \xdef\tkz@arg{\tkz@arg,\X=1} - \fi - } - \path[coordinate] (barycentric cs:\tkz@arg) coordinate (tkzPointResult); -\endgroup +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-obj-eu-points.tex} +\makeatletter +%<---------------------------------------------------------------------------> +% init def point +%<---------------------------------------------------------------------------> +% tkzDefPoint +%<---------------------------------------------------------------------------> +% macros complémentaires pour def point +%<---------------------------------------------------------------------------> +\def\tkz@parsecoordinate#1{% +\tkz@getseparator#1,\@nil +\iftkz@polar + \tkz@getfrompolar#1\@nil +\else + \tkz@getfromcart#1\@nil +\fi } - -%<--------------------------------------------------------------------------–> -% milieu de deux points -%<--------------------------------------------------------------------------–> -% possible \coordinate (#3) at ($(#1)!0.5!(#2)$); -%<--------------------------------------------------------------------------–> -% \def\tkzDefMidPoint(#1,#2){% -% \begingroup -% \path (#1) -- (#2) coordinate[pos=.5](tkzPointResult); -% \endgroup -% } -\def\tkzDefMidPoint(#1,#2){% -\begingroup - \pgf@process{\pgfpointanchor{#1}{center}}% - \tkz@ax\pgf@x% - \tkz@ay\pgf@y% - \pgf@process{\pgfpointanchor{#2}{center}}% - \tkz@bx\pgf@x% - \tkz@by\pgf@y% - \advance\tkz@bx by\tkz@ax\relax% - \advance\tkz@by by\tkz@ay\relax% - \divide\tkz@bx by2\relax% - \divide\tkz@by by2\relax - \pgfcoordinate{tkzPointResult}{\pgfqpoint{\tkz@bx}{\tkz@by}} -\endgroup +\def\tkz@getseparator#1,#2\@nil{% +\ifx\tkzempty#2\tkzempty% + \tkz@polartrue +\else + \tkz@polarfalse +\fi +} +\def\tkz@getfrompolar#1:#2\@nil{% +\edef\tkz@a{\fpeval{#1}} +\edef\tkz@r{\fpeval{#2}} +\xdef\tkz@polarrad{\tkz@r} +\xdef\tkz@polarangle{\tkz@a} +} +\def\tkz@getfromcart#1,#2\@nil{% +\edef\tkz@x{\fpeval{#1}} +\edef\tkz@y{\fpeval{#2}} +\xdef\tkz@absc{\tkz@x} +\xdef\tkz@ord{\tkz@y} } -\def\tkz@DefMidPoint(#1,#2,#3,#4){% -\begingroup - \tkz@ax#1% - \tkz@ay#2% - \tkz@bx#3% - \tkz@by#4% - \advance\tkz@bx by\tkz@ax\relax% - \advance\tkz@by by\tkz@ay\relax% - \divide\tkz@bx by2\relax% - \divide\tkz@by by2\relax - \pgfcoordinate{tkzPointResult}{\pgfqpoint{\tkz@bx}{\tkz@by}} -\endgroup +%<---------------------------------------------------------------------------> +% options pour point definition +%<---------------------------------------------------------------------------> +\pgfkeys{/tkzPt/.cd, + polar/.is if = tkz@pt@polar, + polar/.default = true, + polar = false } -%<--------------------------------------------------------------------------–> -% Internal Similitude center -% Two circles have two similitude centers namely the internal center of similitude Si and the external similitude center Se. -%<--------------------------------------------------------------------------–> -\def\tkzDefIntSimilitudeCenter(#1,#2)(#3,#4){% -\begingroup - \path[coordinate](barycentric cs:#1=#4,#3=#2)coordinate (tkzPointResult); -\endgroup +%<---------------------------------------------------------------------------> +% tkz@ptStar +%<---------------------------------------------------------------------------> +\def\tkz@ptStar[#1](#2,#3)#{% +\pgfkeys{/tkzPt/.cd, polar = false} +\pgfqkeys{/tkzPt}{#1} +\iftkz@pt@polar% + \edef\tkz@x{\fpeval{#3*cosd(#2)}} + \edef\tkz@y{\fpeval{#3*sind(#2)}} +\else + \edef\tkz@x{\fpeval{#2}} + \edef\tkz@y{\fpeval{#3}} +\fi +\edef\tkzpt@xa{\fpeval{(\tkz@x-\tkz@init@xorigine)/\tkz@init@xstep}} +\edef\tkzpt@ya{\fpeval{(\tkz@y-\tkz@init@yorigine)/\tkz@init@ystep}} +\tkz@node } -\let\tkzIntSimilitudeCenter\tkzDefIntSimilitudeCenter -%<--------------------------------------------------------------------------–> -% External Similitude center -%<--------------------------------------------------------------------------–> -\def\tkzDefExtSimilitudeCenter(#1,#2)(#3,#4){% -\begingroup - \path[coordinate](barycentric cs:#1=-#4,#3=#2) coordinate(tkzPointResult); -\endgroup -} -\let\tkzExtSimilitudeCenter\tkzDefExtSimilitudeCenter -%<--------------------------------------------------------------------------–> -% triangle center -%<--------------------------------------------------------------------------–> +%<---------------------------------------------------------------------------> +% la macro defpoint les coordonnées cartésiennes ou polaires sont traitées +% afin de pouvoir être adaptées avec les unités choisies +%<---------------------------------------------------------------------------> +\def\tkzDefPoint{\pgfutil@ifnextchar[{\tkz@DefPoint}{\tkz@DefPoint[]}} -\def\tkz@numtc{0} -\pgfkeys{/tkzDefTriangleCenter/.cd, - ortho/.code = \def\tkz@numtc{0}, - centroid/.code = \def\tkz@numtc{1}, - median/.code = \def\tkz@numtc{1}, - circum/.code = \def\tkz@numtc{2}, - in/.code = \def\tkz@numtc{3}, - ex/.code = \def\tkz@numtc{4}, - euler/.code = \def\tkz@numtc{5}, - symmedian/.code = \def\tkz@numtc{6}, - lemoine/.code = \def\tkz@numtc{6}, - grebe/.code = \def\tkz@numtc{6}, - spieker/.code = \def\tkz@numtc{7}, - gergonne/.code = \def\tkz@numtc{8}, - nagel/.code = \def\tkz@numtc{9}, - mittenpunkt/.code = \def\tkz@numtc{10}, - feuerbach/.code = \def\tkz@numtc{11}, - circum -} -\def\tkzDefTriangleCenter{\pgfutil@ifnextchar[{\tkz@DefTriangleCenter}{\tkz@DefTriangleCenter[]}} -\def\tkz@DefTriangleCenter[#1](#2){% -\begingroup -\pgfqkeys{/tkzDefTriangleCenter}{#1} -\ifcase\tkz@numtc% - \tkzOrthoCenter(#2) - \or% 1 - \tkzCentroid(#2) - \or% 2 - \tkzCircumCenter(#2) - \or% 3 - \tkzInCenter(#2) - \or% 4 - \tkzExCenter(#2) - \or% 5 - \tkzEulerCenter(#2) - \or% 6 - \tkzSymmedianCenter(#2) - \or% 7 - \tkzSpiekerCenter(#2) - \or% 8 - \tkzGergonneCenter(#2) - \or%9 - \tkzNagelCenter(#2) - \or%10 - \tkzMittenpunktCenter(#2) - \or%11 - \tkzFeuerbachCenter(#2) - \fi -\endgroup +\def\tkz@DefPoint[#1](#2)#{% +\tkz@parsecoordinate{#2} +\iftkz@polar + \tkz@ptStar[polar](\tkz@polarangle,\tkz@polarrad){tkz@coord@temp} +\else + \tkz@ptStar[](#2){tkz@coord@temp} +\fi +\tkz@DefPointEnd[#1] +}% +\def\tkz@DefPointEnd[#1]#2{\coordinate[#1] (#2) at (tkz@coord@temp);} +%<---------------------------------------------------------------------------> +% tkzDefPoints +%<---------------------------------------------------------------------------> +\def\tkzDefPoints{\pgfutil@ifnextchar[{\tkz@DefPoints}{\tkz@DefPoints[]}} +\def\tkz@DefPoints[#1]#2{% + \begingroup + \def\tkz@parenthesis@for@err{(}% + \def\tkz@maybe@parenthesis{#2}% + \ifx\tkz@maybe@parenthesis\tkz@parenthesis@for@err + \PackageError{tkz-base}{Syntax error use {} instead of ()}{You need to use {} instead of ()}% + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi + {\tkz@absorb@bad@arg}% + {\foreach \ptx/\pty/\name in {#2}{\tkzDefPoint[#1](\ptx,\pty){\name}}% + \endgroup}% } -%<--------------------------------------------------------------------------–> -% OrthoCenter -%<--------------------------------------------------------------------------–> -\def\tkzOrthoCenter(#1,#2,#3){% H orthocentre -\begingroup - \pgfinterruptboundingbox - \tkzUProjection(#1,#2)(#3) - \pgfnodealias{ort@pta}{tkzPointResult} - \tkzUProjection(#1,#3)(#2) - \pgfnodealias{ort@ptb}{tkzPointResult} - \tkzInterLL(#2,ort@ptb)(#3,ort@pta) - \endpgfinterruptboundingbox -\endgroup +\def\tkz@absorb@bad@arg#1){\endgroup} +%<---------------------------------------------------------------------------> +\def\tkz@node#1{ \pgfinterruptboundingbox +\path[coordinate](\tkzpt@xa,\tkzpt@ya) coordinate(#1); + \endpgfinterruptboundingbox} +% \def\tkz@drawnode#1{\path[coordinate](\tkzpt@xa,\tkzpt@ya) coordinate(#1); +% \tkz@DrawPt{#1} +% } +%<---------------------------------------------------------------------------> +% tkzSetUpPoint définit la forme d'un point +%<---------------------------------------------------------------------------> +\pgfkeys{/tkzsetuppt/.cd, + size/.store in = \tkz@pt@size, + color/.store in = \tkz@pt@color, + fill/.store in = \tkz@pt@fill, + shape/.store in = \tkz@pt@shape, + size = \tkz@euc@pointsize, + color = \tkz@euc@pointcolor, + fill = \tkz@euc@pointcolor, + shape = \tkz@euc@pointshape, + /tkzsetuppt/.search also = {/tikz}, + } +\def\tkzSetUpPoint{\pgfutil@ifnextchar[{\tkz@SetUpPoint}{% + \tkz@SetUpPoint[]}} +\def\tkz@SetUpPoint[#1]{% +\pgfqkeys{/tkzsetuppt}{#1} +% redefine point style with new values +\tikzset{point style/.style={draw = \tkz@pt@color, + inner sep = 0pt, + shape = \tkz@pt@shape, + minimum size = \tkz@pt@size, + fill = \tkz@pt@fill}} +}% end setup +%<---------------------------------------------------------------------------> +% Draw Point +%<---------------------------------------------------------------------------> +\pgfkeys{/tkzdrawpt/.cd, + size/.code = {\tikzset{point style/.append style={minimum size = #1}}}, + size = \tkz@euc@pointsize, + /tkzdrawpt/.search also = {/tikz}, } -\let\tkzDefOrthoCenter\tkzOrthoCenter -%<--------------------------------------------------------------------------–> -% GravityCenter modif 3.03 -%<--------------------------------------------------------------------------–> -\def\tkzCentroid(#1,#2,#3){% +%<-------------------------------------------------------------------------- +\def\tkzDrawPoint{\pgfutil@ifnextchar[{\tkz@DrawPoint}{\tkz@DrawPoint[]}} +\def\tkz@DrawPoint[#1](#2){% \begingroup - \pgf@process{\pgfpointanchor{#1}{center}}% - \tkz@ax\pgf@x% - \tkz@ay\pgf@y% - \pgf@process{\pgfpointanchor{#2}{center}}% - \tkz@bx\pgf@x% - \tkz@by\pgf@y% - \pgf@process{\pgfpointanchor{#3}{center}}% - \tkz@cx\pgf@x% - \tkz@cy\pgf@y% - \advance\tkz@cx by\tkz@ax\relax% - \advance\tkz@cy by\tkz@ay\relax% - \advance\tkz@cx by\tkz@bx\relax% - \advance\tkz@cy by\tkz@by\relax% - \divide\tkz@cx by3\relax% - \divide\tkz@cy by3\relax - \pgfinterruptboundingbox - \pgfcoordinate{tkzPointResult}{\pgfqpoint{\tkz@cx}{\tkz@cy}} - \endpgfinterruptboundingbox -\endgroup -} -\let\tkzBaryCenter\tkzCentroid - -%<--------------------------------------------------------------------------–> -% CircumCenter -%<--------------------------------------------------------------------------–> -\def\tkzCircumCenter(#1,#2,#3){% -\begingroup -\pgfinterruptboundingbox - \tkzDefMediatorLine(#1,#2) - \pgf@process{\pgfpointanchor{tkzFirstPointResult}{center}}% - \tkz@ax\pgf@x% - \tkz@ay\pgf@y% - \pgf@process{\pgfpointanchor{tkzSecondPointResult}{center}}% - \tkz@bx\pgf@x% - \tkz@by\pgf@y% - \tkzDefMediatorLine(#1,#3) - \pgf@process{\pgfpointanchor{tkzFirstPointResult}{center}}% - \tkz@cx\pgf@x% - \tkz@cy\pgf@y% - \pgf@process{\pgfpointanchor{tkzSecondPointResult}{center}}% - \tkz@dx\pgf@x% - \tkz@dy\pgf@y% - \tkzInterLLxy(\tkz@ax,\tkz@ay,\tkz@bx,\tkz@by)(\tkz@cx,\tkz@cy,\tkz@dx,\tkz@dy)% -\endpgfinterruptboundingbox -\endgroup -} -\let\tkzDefCircumCenter\tkzCircumCenter -%<--------------------------------------------------------------------------–> -% InCenter -%<--------------------------------------------------------------------------–> -\def\tkzInCenter(#1,#2,#3){% -\begingroup -\pgfinterruptboundingbox - \tkzDefBisectorLine(#3,#1,#2) - \pgf@process{\pgfpointanchor{tkzPointResult}{center}}% - \tkz@bx\pgf@x% - \tkz@by\pgf@y% - \tkzDefBisectorLine(#3,#2,#1) - \pgf@process{\pgfpointanchor{tkzPointResult}{center}}% - \tkz@dx\pgf@x% - \tkz@dy\pgf@y% - \pgf@process{\pgfpointanchor{#1}{center}}% - \tkz@ax\pgf@x% - \tkz@ay\pgf@y% - \pgf@process{\pgfpointanchor{#2}{center}}% - \tkz@cx\pgf@x% - \tkz@cy\pgf@y% - \tkzInterLLxy(\tkz@ax,\tkz@ay,\tkz@bx,\tkz@by)% - (\tkz@cx,\tkz@cy,\tkz@dx,\tkz@dy)% - \endpgfinterruptboundingbox -\endgroup -} -\let\tkzDefInCenter\tkzInCenter -%<--------------------------------------------------------------------------–> -% ExCenter -%<--------------------------------------------------------------------------–> -\def\tkzExCenter(#1,#2,#3){% -\begingroup -\pgfinterruptboundingbox - \tkzDefBisectorOutLine(#2,#1,#3) - \pgf@process{\pgfpointanchor{tkzPointResult}{center}}% - \tkz@bx\pgf@x% - \tkz@by\pgf@y% - \tkzDefBisectorOutLine(#2,#3,#1) - \pgf@process{\pgfpointanchor{tkzPointResult}{center}}% - \tkz@dx\pgf@x% - \tkz@dy\pgf@y% - \pgf@process{\pgfpointanchor{#1}{center}}% - \tkz@ax\pgf@x% - \tkz@ay\pgf@y% - \pgf@process{\pgfpointanchor{#3}{center}}% - \tkz@cx\pgf@x% - \tkz@cy\pgf@y% - \tkzInterLLxy(\tkz@ax,\tkz@ay,\tkz@bx,\tkz@by)% - (\tkz@cx,\tkz@cy,\tkz@dx,\tkz@dy)% - \endpgfinterruptboundingbox -\endgroup -} -\let\tkzDefExCenter\tkzExCenter -%<--------------------------------------------------------------------------–> -% EulerCenter neuf points -%<--------------------------------------------------------------------------–> -\def\tkzEulerCenter(#1,#2,#3){% -% mileu de orthocentre et centre cercle circonscrit -% passe par les midpoints par les pieds des hauteurs -\begingroup -\pgfinterruptboundingbox - \tkzDefMidPoint(#1,#2) - \pgfnodealias{eu@mic}{tkzPointResult} - \tkzDefMidPoint(#1,#3) - \pgfnodealias{eu@mib}{tkzPointResult} - \tkzDefMidPoint(#2,#3) - \pgfnodealias{eu@mia}{tkzPointResult} - \tkzCircumCenter(eu@mia,eu@mib,eu@mic) -\endpgfinterruptboundingbox + \pgfqkeys{/tkzdrawpt}{#1} + \node[point style,/tkzdrawpt/.cd,#1] at (#2) {};%2016 \endgroup } -\let\tkzNinePointCenter\tkzEulerCenter -\let\tkzDefEulerCenter\tkzEulerCenter -%<--------------------------------------------------------------------------–> -%Symmedian center Lemoine point Grebe point K -%<--------------------------------------------------------------------------–> -\def\tkzSymmedianCenter(#1,#2,#3){% +%<---------------------------------------------------------------------------> +\def\tkzDrawPoints{\pgfutil@ifnextchar[{\tkz@drawpts}{\tkz@drawpts[]}} +%<---------------------------------------------------------------------------> +\def\tkz@drawpts[#1](#2){% \begingroup -\pgfinterruptboundingbox - \tkzDefMidPoint(#2,#3) - \pgfnodealias{eu@mic}{tkzPointResult} - \tkzDefMidPoint(#1,#3) - \pgfnodealias{eu@mib}{tkzPointResult} - \tkzUProjection(#2,#3)(#1) - \pgfnodealias{ort@pta}{tkzPointResult} - \tkzDefMidPoint(#1,ort@pta) - \pgfnodealias{eu@mid}{tkzPointResult} - \tkzUProjection(#1,#3)(#2) - \pgfnodealias{ort@ptb}{tkzPointResult} - \tkzDefMidPoint(#2,ort@ptb) - \pgfnodealias{eu@mie}{tkzPointResult} - \tkzInterLL(eu@mic,eu@mid)(eu@mib,eu@mie) -\endpgfinterruptboundingbox -\endgroup + \pgfqkeys{/tkzdrawpt}{#1} + \foreach \point in {#2}{\node[point style,/tkzdrawpt/.cd,#1] at (\point) {};} %2016 +\endgroup } -\let\tkzLemoinePoint\tkzSymmedianCenter -\let\tkzGrebePoint\tkzSymmedianCenter -\let\tkzDefLemoinePoint\tkzLemoinePoint -%<--------------------------------------------------------------------------–> -% Spieker center -%<--------------------------------------------------------------------------–> -\def\tkzSpiekerCenter(#1,#2,#3){% -\begingroup -% we need to get the midpoints -\pgfcoordinate{tkz@m3}{% - \pgfpointscale{0.5}{% - \pgfpointadd{\pgfpointanchor{#1}{center}}% - {\pgfpointanchor{#2}{center}}}}% -\pgfcoordinate{tkz@m2}{% - \pgfpointscale{0.5}{% - \pgfpointadd{\pgfpointanchor{#1}{center}}% - {\pgfpointanchor{#3}{center}}}}% -\pgfcoordinate{tkz@m1}{% - \pgfpointscale{0.5}{% - \pgfpointadd{\pgfpointanchor{#2}{center}}% - {\pgfpointanchor{#3}{center}}}}% -\tkzInCenter(tkz@m1,tkz@m2,tkz@m3) -\endgroup -} -\let\tkzDefSpiekerCenter\tkzSpiekerCenter -%<--------------------------------------------------------------------------–> -% Gergonne center Ge -%<--------------------------------------------------------------------------–> -\def\tkzGergonneCenter(#1,#2,#3){% -\begingroup -\pgfinterruptboundingbox - \tkzInCenter(#1,#2,#3) - \pgfnodealias{tkz@ptin}{tkzPointResult} - \tkzUProjection(#2,#3)(tkz@ptin) - \pgfnodealias{tkz@oca}{tkzPointResult} - \tkzUProjection(#1,#3)(tkz@ptin) - \pgfnodealias{tkz@ocb}{tkzPointResult} - \tkzInterLL(#1,tkz@oca)(#2,tkz@ocb) -\endpgfinterruptboundingbox -\endgroup +%<---------------------------------------------------------------------------> +% +%<---------------------------------------------------------------------------> +\def\tkzRenamePoint(#1)#2{\coordinate (#2) at (#1);} +\def\tkz@RenamePointEnd[#1]#2{\coordinate[#1] (#2) at (\tkz@ax,\tkz@ay);} +\def\tkzGetPoint#1{\coordinate (#1) at (tkzPointResult);} +\def\tkzGetPoints#1#2{\coordinate (#1) at (tkzFirstPointResult); + \coordinate (#2) at (tkzSecondPointResult);} +\def\tkzGetFirstPoint#1{\coordinate (#1) at (tkzFirstPointResult);} +\def\tkzGetSecondPoint#1{\coordinate (#1) at (tkzSecondPointResult);} +\def\tkzDefShiftPointCoord[#1](#2)#3{% + \begin{scope}[shift={(#1)}] + \coordinate (#3) at (#2); + \end{scope} + }% +%<---------------------------------------------------------------------------> +% tkzDefShiftPoint +%<---------------------------------------------------------------------------> +\def\tkzDefShiftPoint[#1](#2)#3{% + \tkz@@extractxy{#1} + \tkz@ax\pgf@x % + \tkz@ay\pgf@y % +\begin{scope}[shift={(\tkz@ax,\tkz@ay)}] + \coordinate (#3) at (#2); +\end{scope} } -\let\tkzDefGergonneCenter\tkzGergonneCenter -%<--------------------------------------------------------------------------–> -% Nagel center Na -%<--------------------------------------------------------------------------–> -% INa = 3 IG. Nagel point % correction 02/02/20 -\def\tkzNagelCenter(#1,#2,#3){% -\begingroup -\pgfinterruptboundingbox - \tkzDefExcentralTriangle(#1,#2,#3){tkz@a,tkz@b,tkz@c} - \tkzUProjection(#2,#3)(tkz@a) - \pgfnodealias{tkz@tgta}{tkzPointResult} - \tkzUProjection(#1,#2)(tkz@c) - \pgfnodealias{tkz@tgtc}{tkzPointResult} - \tkzInterLL(#1,tkz@tgta)(#3,tkz@tgtc) -\endpgfinterruptboundingbox -\endgroup +%<--------------------------------------------------------------------------> +% tkzLabelPoint Affichage des LABELS pour un point +%<--------------------------------------------------------------------------> +\def\tkzLabelPoint{\pgfutil@ifnextchar[{\tkz@LabelPoint}{\tkz@LabelPoint[]}} +\def\tkz@LabelPoint[#1](#2)#3{% + \node[label style,#1] at (#2) {#3};}% +%<---------------------------------------------------------------------------> + +\def\tkzLabelPoints{\pgfutil@ifnextchar[{\tkz@LabelPoints}{\tkz@LabelPoints[]}}% +\def\tkz@LabelPoints[#1](#2){% + \foreach \point in {#2}{ + \node[label style,#1] at (\point) {$\point$};} +}% +%<---------------------------------------------------------------------------> +\pgfkeys{/tkzsetuppt/.cd, + size/.store in = \tkz@pt@size, + color/.store in = \tkz@pt@color, + fill/.store in = \tkz@pt@fill, + shape/.store in = \tkz@pt@shape, + size = \tkz@euc@pointsize, + color = \tkz@euc@pointcolor, + fill = \tkz@euc@pointcolor, + shape = \tkz@euc@pointshape, + /tkzsetuppt/.search also = {/tikz}, + } +\def\tkzSetUpPoint{\pgfutil@ifnextchar[{\tkz@SetUpPoint}{% + \tkz@SetUpPoint[]}} +\def\tkz@SetUpPoint[#1]{% +\pgfqkeys{/tkzsetuppt}{#1} +% redefine point style with new values +\tikzset{point style/.style={draw = \tkz@pt@color, + inner sep = 0pt, + shape = \tkz@pt@shape, + minimum size = \tkz@pt@size, + fill = \tkz@pt@fill}} +}% end setup +%<---------------------------------------------------------------------------> +% +%<---------------------------------------------------------------------------> +% \pgfkeys{/tkzsetuplabel/.cd, +% /tkzsetuplabel/.search also = {/tikz}, +% } +\def\tkzSetUpLabel{\pgfutil@ifnextchar[{\tkz@SetUpLabel}{% + \tkz@SetUpLabel[]}} +\def\tkz@SetUpLabel[#1]{% +%\pgfqkeys{/tkzsetuplabel}{#1} +% redefine point style with new values +\tikzset{label style/.style={#1}} +}% end setup +%<---------------------------------------------------------------------------> + +\pgfkeys{/tkzautolab/.cd, + center/.store in = \tkz@center, + dist/.store in = \tkz@dist, + dist = 0.15, + /tkzautolab/.search also = {/tikz}, } -\let\tkzDefNagelCenter\tkzNagelCenter -%<--------------------------------------------------------------------------–> -% Mittenpunkt -%<--------------------------------------------------------------------------–> -\def\tkzMittenpunktCenter(#1,#2,#3){% -\begingroup -\pgfinterruptboundingbox - \tkzExCenter(#2,#3,#1) - \pgfnodealias{tkz@a}{tkzPointResult} - \tkzExCenter(#3,#1,#2) - \pgfnodealias{tkz@b}{tkzPointResult} - \pgfcoordinate{tkz@ma}{% - \pgfpointscale{0.5}{% - \pgfpointadd{\pgfpointanchor{#1}{center}}{\pgfpointanchor{#2}{center}}}}% - \pgfcoordinate{tkz@mb}{% - \pgfpointscale{0.5}{% - \pgfpointadd{\pgfpointanchor{#2}{center}}{\pgfpointanchor{#3}{center}}}}% - \tkzInterLL(tkz@a,tkz@ma)(tkz@b,tkz@mb) - \endpgfinterruptboundingbox +\def\tkzAutoLabelPoints{\pgfutil@ifnextchar[{\tkz@AutoLabelPoints}{\tkz@AutoLabelPoints[]}}% +\def\tkz@AutoLabelPoints[#1](#2){% +\begingroup +\pgfqkeys{/tkzautolab}{#1} + \foreach \point in {#2}{ + \path (\tkz@center) -- ($ (\point) + \tkz@dist*($(\point)-(\tkz@center)$) $) node[/tkzautolab/.cd,#1]{$\point$};} \endgroup +}% +%<---------------------------------------------------------------------------> +% PointShowCoord +%<---------------------------------------------------------------------------> +\pgfkeys{/tkzprcoord/.cd, + xlabel/.store in = \tkz@xlabel, + ylabel/.store in = \tkz@ylabel, + xstyle/.code = {\tikzset{xcoord style/.append style={#1}}}, + ystyle/.code = {\tikzset{ycoord style/.append style={#1}}}, + noxdraw/.is if = tkz@coord@noxdraw, + noxdraw/.default = true, + noydraw/.is if = tkz@coord@noydraw, + noydraw/.default = true, + xlabel = {}, + ylabel = {}, + xstyle = {}, + ystyle = {}, + noxdraw = false, + noydraw = false, + /tkzprcoord/.search also = {/tikz}, } -\let\tkzDefMittenpunktCenter\tkzMittenpunktCenter -\let\tkzDefMiddlespoint\tkzMittenpunktCenter -%<--------------------------------------------------------------------------–> -% Feuerbach point -%<--------------------------------------------------------------------------–> -\def\tkzFeuerbachCenter(#1,#2,#3){% -\begingroup -\pgfinterruptboundingbox - \tkzEulerCenter(#1,#2,#3) - \pgfnodealias{tkz@euler}{tkzPointResult} - \tkzInCenter(#1,#2,#3) - \pgfnodealias{tkz@in}{tkzPointResult} - \tkzUProjection(#2,#3)(tkzPointResult) - \tkzInterLC(tkz@in,tkz@euler)(tkz@in,tkzPointResult)\tkzGetFirstPoint{tkz@fe} - \tkzRenamePoint(tkz@fe){tkzPointResult} - \endpgfinterruptboundingbox +\def\tkzPointShowCoord{\pgfutil@ifnextchar[{\tkz@PointShowCoord}{\tkz@PointShowCoord[]}} +\def\tkz@PointShowCoord[#1](#2){% +\begingroup +\pgfqkeys{/tkzprcoord}{#1} +% 2019 for showcoord + \iftkznodedefined{tkz@xline}{}{% + \path (0,0) --(1,0) node(tkz@xline){}; + \path (0,0) --(0,1) node(tkz@yline){}; + } +\iftkz@coord@noxdraw\else\draw[arrow coord style,/tkzprcoord/.cd,#1] (#2)--(#2 |- tkz@xline);\fi +\iftkz@coord@noydraw\else\draw[arrow coord style,/tkzprcoord/.cd,#1] (#2)--(#2 -| tkz@yline);\fi +\ifx\tkzutil@empty\tkz@xlabel +\else +\path (#2)--(#2 |- tkz@xline) + node[xcoord style] {\tkz@xlabel}; +\fi +\ifx\tkzutil@empty\tkz@ylabel +\else + \path (#2)--(#2 -| tkz@yline) + node[ycoord style] {\tkz@ylabel}; +\fi \endgroup } -\let\tkzDefFeuerbachCenter\tkzFeuerbachCenter -%<--------------------------------------------------------------------------–> -% Orthogonal center -%<--------------------------------------------------------------------------–> -\def\tkzOrthogonalCenter(#1,#2){% +\let\tkzShowPointCoord\tkzPointShowCoord +%<---------------------------------------------------------------------------> +% Coordonnées d'un point +% result in #2x et #2y #1 est le point et on récupère ses coordonnées +% usage soit A un point \tkzGetPointCoord(A){V} alors \Vx = xA et \Vy = yA +% en cm +% tkzGetPointCoord avec [#1] cm ou bien pt ?? todo +%<---------------------------------------------------------------------------> +\def\tkzGetPointCoord(#1)#2{% \begingroup -\pgfinterruptboundingbox - \tkz@VecK[\tkz@koeff/(1+\tkz@koeff)](#1,#2) - \pgfnodealias{tkzFirstPointResult}{tkzPointResult} - \tkz@VecK[\tkz@koeff/(\tkz@koeff-1)](#1,#2) - \pgfnodealias{tkzSecondPointResult}{tkzPointResult} - \tkzDefMidPoint(tkzFirstPointResult,tkzSecondPointResult) -\endpgfinterruptboundingbox + \pgfextractx{\pgf@x}{\pgfpointanchor{#1}{center}} + \pgfmathparse{\pgf@sys@tonumber{\pgf@x}/28.45274} + \global\let\tkzresultx\pgfmathresult + \global\expandafter\edef\csname #2x\endcsname{\tkzresultx}% + \pgfextracty{\pgf@y}{\pgfpointanchor{#1}{center}} + \pgfmathparse{\pgf@sys@tonumber{\pgf@y}/28.45274} + \global\let\tkzresulty\pgfmathresult + \global\expandafter\edef\csname #2y\endcsname{\tkzresulty} \endgroup +} +\def\tkz@@extractxy#1{% +\pgfextractx{\pgf@x}{\pgfpointanchor{#1}{center}} +\pgfextracty{\pgf@y}{\pgfpointanchor{#1}{center}} } -%<--------------------------------------------------------------------------–> -% End Triangle center -%<--------------------------------------------------------------------------–> -%<--------------------------------------------------------------------------–> -% Projection center of excircles -%<--------------------------------------------------------------------------–> -\def\tkzDefProjExcenter{\pgfutil@ifnextchar[{% - \tkz@DefProjExcenter}{% - \tkz@DefProjExcenter[]} - } -\def\tkz@DefProjExcenter[#1](#2,#3,#4)(#5)#6{ -\begingroup - \SetUpPTTR{#1} - \foreach \name [count=\i] in {#5} {% - \global\expandafter\edef\csname tkz@pt\i\endcsname{\name} - } - \foreach \name [count=\i] in {#6} {% - \global\expandafter\edef\csname tkz@ppt\i\endcsname{\name} - } -\tkzDefPointBy[projection=onto #3--#4 ](\tkz@pttr@name \csname tkz@pt1\endcsname) -\pgfnodealias{\csname tkz@ppt1\endcsname\csname tkz@pt1\endcsname}{tkzPointResult} -\tkzDefPointBy[projection=onto #3--#4 ](\tkz@pttr@name \csname tkz@pt2\endcsname) -\pgfnodealias{\csname tkz@ppt1\endcsname\csname tkz@pt2\endcsname}{tkzPointResult} -\tkzDefPointBy[projection=onto #3--#4 ](\tkz@pttr@name \csname tkz@pt3\endcsname) -\pgfnodealias{\csname tkz@ppt1\endcsname\csname tkz@pt3\endcsname}{tkzPointResult} -\tkzDefPointBy[projection=onto #2--#4 ](\tkz@pttr@name \csname tkz@pt1\endcsname) -\pgfnodealias{\csname tkz@ppt2\endcsname\csname tkz@pt1\endcsname}{tkzPointResult} -\tkzDefPointBy[projection=onto #2--#4 ](\tkz@pttr@name \csname tkz@pt2\endcsname) -\pgfnodealias{\csname tkz@ppt2\endcsname\csname tkz@pt2\endcsname}{tkzPointResult} -\tkzDefPointBy[projection=onto #2--#4 ](\tkz@pttr@name \csname tkz@pt3\endcsname) -\pgfnodealias{\csname tkz@ppt2\endcsname\csname tkz@pt3\endcsname}{tkzPointResult} -\tkzDefPointBy[projection=onto #3--#2 ](\tkz@pttr@name \csname tkz@pt1\endcsname) -\pgfnodealias{\csname tkz@ppt3\endcsname\csname tkz@pt1\endcsname}{tkzPointResult} -\tkzDefPointBy[projection=onto #3--#2 ](\tkz@pttr@name \csname tkz@pt2\endcsname) -\pgfnodealias{\csname tkz@ppt3\endcsname\csname tkz@pt2\endcsname}{tkzPointResult} -\tkzDefPointBy[projection=onto #3--#2 ](\tkz@pttr@name \csname tkz@pt3\endcsname) -\pgfnodealias{\csname tkz@ppt3\endcsname\csname tkz@pt3\endcsname}{tkzPointResult} -\endgroup -} -%<--------------------------------------------------------------------------–> -% Point on circle -%<--------------------------------------------------------------------------–> -\pgfkeys{/tkzptcircle/.cd, - angle/.store in = \tkz@angle, - angle = 0 , - center/.store in = \tkz@center, - radius/.store in = \tkz@radius -} -\def\tkzDefPointOnCircle{\pgfutil@ifnextchar[{\tkz@DefPointOnCircle}{\tkz@DefPointOnCircle[]}} -\def\tkz@DefPointOnCircle[#1]{% -\begingroup -\pgfqkeys{/tkzptcircle}{#1} -\path (\tkz@center) --++(\tkz@angle:\tkz@radius) coordinate(tkzPointResult); -\endgroup -} -%<--------------------------------------------------------------------------–> -% Point on line -%<--------------------------------------------------------------------------–> -\def\tkzDefPointOnLine{\pgfutil@ifnextchar[{\tkz@DefPointOnLine}{\tkz@DefPointOnLine[]}} -\def\tkz@DefPointOnLine[#1](#2,#3){% -\begingroup -\path (#2) to [#1] coordinate (tkzPointResult) (#3); -\endgroup -} - +\let\tkzGetPointxy\tkzGetPointCoord \makeatother \endinput \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-polygons.tex b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-polygons.tex index 32353d145f1..71305cd9a7e 100644 --- a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-polygons.tex +++ b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-polygons.tex @@ -1,5 +1,5 @@ % tkz-obj-eu-polygons.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,13 @@ % 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-polygons.tex} -% bug in regular polygon side 2020/03/18 + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-obj-eu-polygons.tex} +% bug in regular polygon side 2020/03/09 \makeatletter %<--------------------------------------------------------------------------–> % Polygon @@ -25,9 +23,9 @@ %<--------------------------------------------------------------------------–> \def\tkzDefSquare(#1,#2){ \begingroup - \tkzURotateAngle(#2,-90)(#1) + \tkzURotateAngle(#2,-90)(#1) \pgfnodealias{tkzFirstPointResult}{tkzPointResult} - \tkzURotateAngle(#1, 90)(#2) + \tkzURotateAngle(#1, 90)(#2) \pgfnodealias{tkzSecondPointResult}{tkzPointResult} \endgroup } @@ -39,11 +37,21 @@ \tkzDefPointWith[colinear= at #3](#2,#1) \endgroup } +%<--------------------- rectangle ---------------------------------–> +% +%<--------------------------------------------------------------------------–> + +\def\tkzDefRectangle{\pgfutil@ifnextchar[{\tkz@DefRectangle}% + {\tkz@DefRectangle[]}} +\def\tkz@DefRectangle[#1](#2,#3){% +\begingroup + \path[#1](#2) -| coordinate (tkzFirstPointResult) (#3) -| coordinate (tkzSecondPointResult) (#2); +\endgroup +} %<-------------------------- gold rectangle -------------------------------–> % %<--------------------------------------------------------------------------–> - \def\tkzDefGoldRectangle(#1,#2){ \begingroup \tkzDefPointWith[K=-\tkzInvPhi](#2,#1) @@ -52,18 +60,16 @@ \pgfnodealias{tkzSecondPointResult}{tkzPointResult} \endgroup } -\def\tkzDrawGoldRectangle{\pgfutil@ifnextchar[{\tkz@DrawGoldRectangle}{% - \tkz@DrawGoldRectangle[]}} - +\let\tkzDefGoldenRectangle\tkzDefGoldRectangle %<---------------------------- Regular Polygon -------------------------–> \def\tkz@numregpol{0} \pgfkeys{/defregpoly/.cd, - name/.store in = \tkz@regpolname, - sides/.store in = \tkz@regpolsides, - center/.code = \def\tkz@numregpol{0}, - side/.code = \def\tkz@numregpol{1}, - name/.default = P, - sides/.default = 5, + name/.store in = \tkz@regpolname, + sides/.store in = \tkz@regpolsides, + center/.code = \def\tkz@numregpol{0}, + side/.code = \def\tkz@numregpol{1}, + name/.default = P, + sides/.default = 5, center } \def\tkzDefRegPolygon{\pgfutil@ifnextchar[{\tkz@DefRegPolygon}{\tkz@DefRegPolygon[]}} @@ -94,7 +100,7 @@ \pgfmathsetmacro{\tkz@regangleside}{(180-\tkz@regangle)/2} \tkzDefMidPoint(#1,#2) \pgfnodealias{tkz@tempPt}{tkzPointResult} -\tkzCalcLength[cm](tkz@tempPt,#1) \tkzGetLength{tkz@len} +\tkz@@CalcLengthcm(tkz@tempPt,#1){tkz@len} \pgfmathsetmacro{\tkz@inscriberadius}{% \tkz@len*tan(90*(\tkz@regpolsides-2)/\tkz@regpolsides)} \tkzDefPointWith[orthogonal normed,K=\tkz@inscriberadius](tkz@tempPt,#2) @@ -104,16 +110,6 @@ \endgroup } -%<---------------------------- CLIP --------------------------------–> -% -%<--------------------------------------------------------------------------–> -\def\tkzClipPolygon(#1,#2){% -\path[clip] (#1) - \foreach \pt in {#1,#2}{--(\pt)}--cycle; -} - \def\tkzClipOutPolygon(#1,#2){\clip[tkzreverseclip] (#1) - \foreach \pt in {#1,#2}{--(\pt)}--cycle; -} \makeatother \endinput \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-protractor.tex b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-protractor.tex index dcc5a1081df..7c1c1cb9ea4 100644 --- a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-protractor.tex +++ b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-protractor.tex @@ -1,5 +1,5 @@ % tkz-obj-eu-protractor.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,14 +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-protractor.tex} + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-obj-eu-protractor.tex} \makeatletter %<--------------------------------------------------------------------------–> % !!! idea from Y. Combe !!! @@ -75,7 +73,7 @@ \draw [>=stealth',->, thick,black] (0:2) arc(0:-32:2); \draw [>=stealth',->, thick,black] (0:1.5) arc(0:-32:1.5); } -\global\let\tkz@@Protractor\FullProtractor + \pgfkeys{ protractor/.cd, lw/.code = {\def\cmdMO@Rap@lw{#1}}, @@ -83,29 +81,28 @@ rotate/.code = {\def\cmdMO@Rap@rotate{#1}}, scale/.code = {\def\cmdMO@Rap@scale{#1}}, return/.is if = tkz@RappReturn, - return/.default = true, - /protractor/.search also={/tikz} + return/.code = \tkz@RappReturnfalse, + /protractor/.search also={/tikz}, + lw = 0.4pt, + scale=1, + shift={(0,0)}, + rotate=0 } - \def\tkzProtractor{\pgfutil@ifnextchar[{\tkz@Protractor}{\tkz@Protractor[]}} \def\tkz@Protractor[#1](#2,#3){% - \pgfkeys{% - /protractor/.cd, - shift={(0,0)}, - rotate=0, - lw=0.4pt, - scale =1, - return=false - } +\tkz@RappReturntrue \pgfqkeys{/protractor}{#1} \tkz@@extractxy{#2} \global\tkz@ax\pgf@x \global\tkz@ay\pgf@y \tkzFindSlopeAngle(#2,#3) \tkzGetAngle{cmdMO@Rap@rotate}% + \global\let\tkz@@Protractor\FullProtractor% \iftkz@RappReturn \global\let\tkz@@Protractor\FullProtractorReturn + \else + \global\let\tkz@@Protractor\FullProtractor \fi \pgfmathsetlengthmacro{\MO@lw}{\cmdMO@Rap@lw * \cmdMO@Rap@scale} \begin{scope}[shift = {(\tkz@ax,\tkz@ay)},% diff --git a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-sectors.tex b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-sectors.tex index 3d178a25861..010af2ade7b 100644 --- a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-sectors.tex +++ b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-sectors.tex @@ -1,5 +1,5 @@ % tkz-obj-eu-sectors.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,24 +7,21 @@ % 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-sectors.tex} + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-obj-eu-sectors.tex} \makeatletter %<----------------------- Sectors ------------------------------–> -\tikzset{sstyle/.style={#1}} \gdef\tkz@nums{0} \pgfkeys{/drawsector/.cd, - towards/.code = {\def\tkz@nums{0}}, - rotate/.code = {\def\tkz@nums{1}}, - R/.code = {\def\tkz@nums{2}}, - R with nodes/.code = {\def\tkz@nums{3}}, - towards, + towards/.code = {\def\tkz@nums{0}}, + rotate/.code = {\def\tkz@nums{1}}, + R/.code = {\def\tkz@nums{2}}, + R with nodes/.code = {\def\tkz@nums{3}}, + towards, /drawsector/.search also = {/tikz}, } @@ -63,8 +60,8 @@ \edef\tkz@SecondAngle{\pgfmathresult}% \fi \fi - \draw[shift = {(#2)},/drawsector/.cd,#1]% - (#2) --(\tkz@FirstAngle:#3) arc (\tkz@FirstAngle:\tkz@SecondAngle:#3)--cycle; + \draw[shift = {(#2)},/drawsector/.cd,#1]% + (#2) --(\tkz@FirstAngle:#3) arc (\tkz@FirstAngle:\tkz@SecondAngle:#3)--cycle; \endgroup } % revoir il y a plus simple que ce shift !!! %<--------------------------------------------------------------------------–> @@ -74,10 +71,10 @@ \tkz@DrawSectorN[]}} \def\tkz@DrawSectorN[#1](#2,#3)(#4){% \begingroup - \tkzCalcLength(#2,#3)\tkzGetLength{tkz@radius} + \tkz@@CalcLengthcm(#2,#3){tkz@radius} \tkzFindSlopeAngle(#2,#3)\tkzGetAngle{tkz@FirstAngle} \tkzFindSlopeAngle(#2,#4)\tkzGetAngle{tkz@SecondAngle} - \tkz@DrawSectorRAngles[#1](#2,\tkz@radius pt)(\tkz@FirstAngle,% + \tkz@DrawSectorRAngles[#1](#2,\tkz@radius)(\tkz@FirstAngle,% \tkz@SecondAngle) \endgroup } @@ -88,15 +85,15 @@ \tkz@DrawSectorRotate[]}} \def\tkz@DrawSectorRotate[#1](#2,#3)(#4){% \begingroup - \tkzCalcLength(#2,#3)\tkzGetLength{tkz@radius} + \tkz@@CalcLengthcm(#2,#3){tkz@radius} \tkzFindSlopeAngle(#2,#3)\tkzGetAngle{tkz@FirstA} \pgfmathadd{\tkz@FirstA}{#4} - \edef\tkz@SecondA{\pgfmathresult} + \edef\tkz@SecondA{\pgfmathresult} \pgfmathgreaterthan{#4}{0} \ifdim\pgfmathresult pt=1 pt\relax% - \tkz@DrawSectorRAngles[#1](#2,\tkz@radius pt)(\tkz@FirstA,\tkz@SecondA) + \tkz@DrawSectorRAngles[#1](#2,\tkz@radius)(\tkz@FirstA,\tkz@SecondA) \else - \tkz@DrawSectorRAngles[#1](#2,\tkz@radius pt)(\tkz@SecondA,\tkz@FirstA) + \tkz@DrawSectorRAngles[#1](#2,\tkz@radius)(\tkz@SecondA,\tkz@FirstA) \fi \endgroup } @@ -107,7 +104,7 @@ \tkz@DrawSectorAngles[]}} \def\tkz@DrawSectorAngles[#1](#2,#3)(#4,#5){% \begingroup - \tkzCalcLength(#2,#3)\tkzGetLength{tkz@radius} + \tkz@@CalcLengthcm(#2,#3){tkz@radius} \tkz@DrawSectorRAngles[#1](#2,\tkz@radius pt)(#4,#5) \endgroup } @@ -115,28 +112,16 @@ % \tkzDrawSectorRwithNodesAngles(O,A,B)(ang1,ang2) %<--------------------------------------------------------------------------–> \def\tkzDrawSectorRwithNodesAngles{\pgfutil@ifnextchar[{% - \tkz@DrawSectorRwithNodesAngles}{% - \tkz@DrawSectorRwithNodesAngles[]}} + \tkz@DrawSectorRwithNodesAngles}{% + \tkz@DrawSectorRwithNodesAngles[]}} \def\tkz@DrawSectorRwithNodesAngles[#1](#2,#3,#4)(#5,#6){% \begingroup - \tkzCalcLength(#3,#4)\tkzGetLength{tkz@radius} + \tkz@@CalcLengthcm(#3,#4){tkz@radius} \tkz@DrawSectorRAngles[#1](#2,\tkz@radius pt)(#5,#6) \endgroup } % %<--------------------------------------------------------------------------–> -% % \tkzDrawSectorRwithNodes(O,A,B)(C,D) center O radius AB from C to D -% %<--------------------------------------------------------------------------–> -% \def\tkzDrawSectorRwithNodes{\pgfutil@ifnextchar[{% -% \tkz@DrawSectorRwithNodes}{% -% \tkz@DrawSectorRwithNodes[]}} -% \def\tkz@DrawSectorRwithNodes[#1](#2,#3,#4)(#5,#6){% -% \begingroup -% \tkzCalcLength(#3,#4){tkz@rad} -% \tkzFindSlopeAngle(#2,#5)\tkzGetAngle{tkz@FirstAngle} -% \tkzFindSlopeAngle(#2,#6)\tkzGetAngle{tkz@SecondAngle} -% \tkz@DrawSectorRAngles[#1](#2,\tkz@rad)(\tkz@FirstAngle,\tkz@SecondAngle) -% \endgroup -% } + %<--------------------------------------------------------------------------–> % \tkzDrawSectorR(O, rad)(A,B) %<--------------------------------------------------------------------------–> @@ -150,18 +135,16 @@ \endgroup } %<--------------------------------------------------------------------------–> -%<--------------------------------------------------------------------------–> % Fill %<--------------------------------------------------------------------------–> -%<--------------------------------------------------------------------------–> \gdef\tkz@nums{0} \pgfkeys{/@fillsector/.cd, - towards/.code = {\def\tkz@nums{0}}, - rotate/.code = {\def\tkz@nums{1}}, - R/.code = {\def\tkz@nums{2}}, - R with nodes/.code = {\def\tkz@nums{3}}, - towards, - /@fillsector/.search also={/tikz}, + towards/.code = {\def\tkz@nums{0}}, + rotate/.code = {\def\tkz@nums{1}}, + R/.code = {\def\tkz@nums{2}}, + R with nodes/.code = {\def\tkz@nums{3}}, + towards, + /@fillsector/.search also={/tikz}, } \def\tkzFillSector{\pgfutil@ifnextchar[{\tkz@FillSector}{\tkz@FillSector[]}} @@ -200,9 +183,9 @@ \pgfmathadd{\tkz@SecondAngle}{360} \edef\tkz@SecondAngle{\pgfmathresult}% \fi\fi - \pgfmathsubtract{\tkz@FirstAngle}{\tkz@delta} + \pgfmathsubtract{\tkz@FirstAngle}{0} \edef\tkz@FirstAngle{\pgfmathresult}% - \pgfmathadd{\tkz@SecondAngle}{\tkz@delta} + \pgfmathadd{\tkz@SecondAngle}{0} \edef\tkz@SecondAngle{\pgfmathresult} \path[shift = {(#2)},/@fillsector/.cd,fill=\tkz@fillcolor,#1] (#2) -- % (\tkz@FirstAngle:#3) arc (\tkz@FirstAngle:\tkz@SecondAngle:#3)--cycle; @@ -214,7 +197,7 @@ \def\tkzFillSectorN{\pgfutil@ifnextchar[{\tkz@FillSectorN}{\tkz@FillSectorN[]}} \def\tkz@FillSectorN[#1](#2,#3)(#4){% \begingroup - \tkzCalcLength(#2,#3)\tkzGetLength{tkz@radius} + \tkz@@CalcLength(#2,#3){tkz@radius} \tkzFindSlopeAngle(#2,#3)\tkzGetAngle{tkz@FirstAngle} \tkzFindSlopeAngle(#2,#4)\tkzGetAngle{tkz@SecondAngle} \tkz@FillSectorRAngles[#1](#2,\tkz@radius pt)(\tkz@FirstAngle,% @@ -228,7 +211,7 @@ \tkz@FillSectorRotate[]}} \def\tkz@FillSectorRotate[#1](#2,#3)(#4){% \begingroup - \tkzCalcLength(#2,#3)\tkzGetLength{tkz@radius} + \tkz@@CalcLength(#2,#3){tkz@radius} \tkzFindSlopeAngle(#2,#3)\tkzGetAngle{tkz@FirstA} \pgfmathadd{\tkz@FirstA}{#4} \edef\tkz@SecondA{\pgfmathresult} @@ -247,7 +230,7 @@ \tkz@FillSectorAngles[]}} \def\tkz@FillSectorAngles[#1](#2,#3)(#4,#5){% \begingroup - \tkzCalcLength(#2,#3)\tkzGetLength{tkz@radius} + \tkz@@CalcLength(#2,#3){tkz@radius} \tkz@FillSectorRAngles[#1](#2,\tkz@radius pt)(#4,#5) \endgroup } @@ -293,7 +276,7 @@ %<--------------------------------------------------------------------------–> \def\tkz@ClipSectorRotate(#1,#2)(#3){% \begingroup - \tkzCalcLength(#1,#2)\tkzGetLength{tkz@radius} + \tkz@@CalcLength(#1,#2){tkz@radius} \tkzFindSlopeAngle(#1,#2)\tkzGetAngle{tkz@FirstA} \pgfmathadd{\tkz@FirstA}{#3} \edef\tkz@SecondA{\pgfmathresult} @@ -308,10 +291,9 @@ %<--------------------------------------------------------------------------–> % %<--------------------------------------------------------------------------–> - \def\tkz@ClipSectorN(#1,#2)(#3){% \begingroup - \tkzCalcLength(#1,#2)\tkzGetLength{tkz@radius} + \tkz@@CalcLength(#1,#2){tkz@radius} \tkzFindSlopeAngle(#1,#2)\tkzGetAngle{tkz@FirstAngle} \tkzFindSlopeAngle(#1,#3)\tkzGetAngle{tkz@SecondAngle} \tkz@ClipSectorRAngles(#1,\tkz@radius pt)(\tkz@FirstAngle,\tkz@SecondAngle) @@ -321,16 +303,15 @@ %<--------------------------------------------------------------------------–> \def\tkz@numcs{0} \pgfkeys{/clipsector/.cd, - towards/.code = {\def\tkz@numcs{0}}, - rotate/.code = {\def\tkz@numcs{1}}, - R/.code = {\def\tkz@numcs{2}}, + towards/.code = {\def\tkz@numcs{0}}, + rotate/.code = {\def\tkz@numcs{1}}, + R/.code = {\def\tkz@numcs{2}}, } %<--------------------------------------------------------------------------–> \def\tkzClipSector{\pgfutil@ifnextchar[{\tkz@ClipSector}{% \tkz@ClipSector[]}} \def\tkz@ClipSector[#1](#2,#3)(#4){% -\begingroup \pgfkeys{/clipsector/.cd} \pgfqkeys{/clipsector}{#1} \ifcase\tkz@numcs% @@ -340,7 +321,6 @@ \or% 2 \tkz@ClipSectorRAngles(#2,#3)(#4) \fi -\endgroup } \makeatother -\endinput \ No newline at end of file +\endinput \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-show.tex b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-show.tex index 281eee5d9cd..61b7d69c07f 100644 --- a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-show.tex +++ b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-show.tex @@ -1,5 +1,5 @@ %tkz-obj-eu-show.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,14 +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-show.tex} + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-obj-eu-show.tex} \makeatletter %<--------------------------------------------------------------------------–> % finding specific points in a triangle @@ -26,8 +24,8 @@ from/.store in = {\tkz@frompoint}, dist/.store in = {\tkz@equ@dist}, show/.is if = tkz@equi@show, - dist = 2, - show = false, + dist = 2, + show = false, /tkzEquiPt/.search also={/tikz} } @@ -43,8 +41,8 @@ \tkzVecKNorm[-\tkz@equ@dist](tkzEQpoint,#2) \pgfnodealias{tkzSecondPointResult}{tkzPointResult} \iftkz@equi@show - \tkzCompass[#1](\tkz@frompoint,tkzFirstPointResult) - \tkzCompass[#1](\tkz@frompoint,tkzSecondPointResult) + \tkzCompass[compass style,#1](\tkz@frompoint,tkzFirstPointResult) + \tkzCompass[compass style,#1](\tkz@frompoint,tkzSecondPointResult) \fi \endgroup } @@ -58,15 +56,15 @@ \def\tkz@through{#1}}, orthogonal/.code args = {through #1} {\global\def\tkz@numsh{1}% \global\def\tkz@through{#1}}, - parallel/.code args = {through #1} {\global\def\tkz@numsh{2}% + parallel/.code args = {through #1} {\global\def\tkz@numsh{2}% \global\def\tkz@through{#1}}, - bisector/.code = \global\def\tkz@numsh{3}, - K/.code = \def\tkz@koeff{#1}, - length/.code = \def\tkz@show@length{#1}, - ratio/.code = \def\tkz@show@ratio{#1}, - gap/.code = \def\tkz@show@gap{#1}, - size/.code = \def\tkz@show@size{#1}, - /show/.unknown/.code = {\let\searchname=\pgfkeyscurrentname + bisector/.code = \global\def\tkz@numsh{3}, + K/.code = \def\tkz@koeff{#1}, + length/.code = \def\tkz@show@length{#1}, + ratio/.code = \def\tkz@show@ratio{#1}, + gap/.code = \def\tkz@show@gap{#1}, + size/.code = \def\tkz@show@size{#1}, + /show/.unknown/.code = {\let\searchname=\pgfkeyscurrentname \pgfkeysalso{\searchname/.try=#1, /tkzcompass/\searchname/.retry=#1, /tikz/\searchname/.retry=#1}% @@ -76,10 +74,10 @@ \def\tkz@ShowLine[#1](#2){% \begingroup \pgfqkeys{/show}{ K = 1, - gap = 2, - ratio = .5, - length = 1, - size = 1 + gap = 2, + ratio = .5, + length = 1, + size = 1 } \pgfqkeys{/show}{#1} \ifcase\tkz@numsh% @@ -100,8 +98,8 @@ \def\tkz@ShowMediatorLine[#1](#2,#3){% \begingroup \pgfkeys{show/.cd, gap = 2, - ratio = .5, - length = 1 + ratio = .5, + length = 1 } \pgfkeys{show/.cd,#1} \path (#2) -- (#3) coordinate[pos=.5](tkzmidpoint); @@ -117,10 +115,10 @@ \pgfnodealias{MED@1}{tkzPointResult} \tkz@VecKNorm[\tkz@show@gap](tkzmidpoint,MED@tmp2) \pgfnodealias{MED@2}{tkzPointResult} - \tkzCompass[#1,length=\tkz@show@ratio*\tkz@show@length](#2,MED@1) - \tkzCompass[#1](#3,MED@1) - \tkzCompass[#1,length=\tkz@show@ratio*\tkz@show@length](#2,MED@2) - \tkzCompass[#1](#3,MED@2) + \tkzCompass[compass style,#1,length=\tkz@show@ratio*\tkz@show@length](#2,MED@1) + \tkzCompass[compass style,#1](#3,MED@1) + \tkzCompass[compass style,#1,length=\tkz@show@ratio*\tkz@show@length](#2,MED@2) + \tkzCompass[compass style,#1](#3,MED@2) \endgroup } \def\tkzShowLLLine{\pgfutil@ifnextchar[{\tkz@ShowLLLine}{\tkz@ShowLLLine[]}} @@ -130,8 +128,8 @@ \pgfkeys{show/.cd,#1} \tkz@VecKCoLinear[1](#2,#3,#4) \pgfnodealias{tkz@lltmp}{tkzPointResult} - \tkzCompass[#1](#4,tkz@lltmp) - \tkzCompass[#1,length=\tkz@show@ratio*\tkz@show@length](#3,tkz@lltmp) + \tkzCompass[compass style,#1](#4,tkz@lltmp) + \tkzCompass[compass style,#1,length=\tkz@show@ratio*\tkz@show@length](#3,tkz@lltmp) \endgroup } @@ -155,8 +153,7 @@ \pgfnodealias{tkzPointCo}{tkzPointResult} \tkzInterLL(#2,#3)(#4,tkzPointCo) \pgfnodealias{tkzPOpoint}{tkzPointResult} - \tkzCalcLength(#4,tkzPOpoint) - \tkzGetLength{tkz@mathLen} + \tkz@@CalcLength(#4,tkzPOpoint){tkz@mathLen} \tkz@VecKNorm[1](#2,#3) \pgfnodealias{PO@tmp}{tkzPointResult} \tkz@VecKCoLinear[1](#2,PO@tmp,tkzPOpoint) @@ -176,10 +173,10 @@ \fi \tkz@VecKCoLinear[-\tkz@show@gap](PO@tmp1,tkzPOpoint,tkzPOpoint) \pgfnodealias{PO@3}{tkzPointResult} - \tkzCompass[#1,length=\tkz@show@ratio *\tkz@show@length](#4,PO@1) - \tkzCompass[#1,length=\tkz@show@ratio *\tkz@show@length](#4,PO@2) - \tkzCompass[#1,length=\tkz@show@ratio *\tkz@show@length](PO@1,PO@3) - \tkzCompass[#1,length=\tkz@show@length](PO@2,PO@3) + \tkzCompass[compass style,#1,length=\tkz@show@ratio *\tkz@show@length](#4,PO@1) + \tkzCompass[compass style,#1,length=\tkz@show@ratio *\tkz@show@length](#4,PO@2) + \tkzCompass[compass style,#1,length=\tkz@show@ratio *\tkz@show@length](PO@1,PO@3) + \tkzCompass[compass style,#1,length=\tkz@show@length](PO@2,PO@3) \endgroup } %<-------------------------------------------------------------------------–> @@ -190,9 +187,10 @@ \def\tkz@ShowBisectorLine[#1](#2,#3,#4){% \begingroup \pgfkeys{show/.cd, gap = 2, - ratio =. 5, - length = 1, - size = 1} + ratio =. 5, + length = 1, + size = 1 + } \pgfkeys{show/.cd,#1} \tkzVecKNorm(#3,#2) \pgfnodealias{tkz@pt1}{tkzPointResult} @@ -212,10 +210,10 @@ \pgfnodealias{BI@2}{tkzPointResult} \tkzVecK[\tkz@show@gap](#3,tkzBisPoint) \pgfnodealias{tkzBisPoint}{tkzPointResult} - \tkzCompass[#1,length=\tkz@show@ratio *\tkz@show@length](#3,BI@1) - \tkzCompass[#1,length=\tkz@show@ratio *\tkz@show@length](#3,BI@2) - \tkzCompass[#1,length=\tkz@show@length](BI@1,tkzBisPoint) - \tkzCompass[#1,length=\tkz@show@ratio *\tkz@show@length](BI@2,tkzBisPoint) + \tkzCompass[compass style,#1,length=\tkz@show@ratio *\tkz@show@length](#3,BI@1) + \tkzCompass[compass style,#1,length=\tkz@show@ratio *\tkz@show@length](#3,BI@2) + \tkzCompass[compass style,#1,length=\tkz@show@length](BI@1,tkzBisPoint) + \tkzCompass[compass style,#1,length=\tkz@show@ratio *\tkz@show@length](BI@2,tkzBisPoint) \endgroup } %<--------------------------------------------------------------------------–> @@ -269,22 +267,20 @@ translation/.code args={from #1 to #2}{% \or% 3 \tkzShowTranslation[#1](\tkzfrom,\tkzto)(#2) \fi - \endpgfinterruptboundingbox + \endpgfinterruptboundingbox \endgroup } %<--------------------------------------------------------------------------–> -%<--------------------------------------------------------------------------–> \def\tkzShowTranslation{\pgfutil@ifnextchar[{\tkz@ShowTranslation}{% \tkz@ShowTranslation[]}} \def\tkz@ShowTranslation[#1](#2,#3)(#4){% \begingroup \tkz@VecKCoLinear[1](#2,#3,#4) \pgfnodealias{tkz@lltmp}{tkzPointResult} -\tkzCompass[#1](#4,tkz@lltmp) -\tkzCompass[#1,length=\tkz@show@ratio*\tkz@show@length](#3,tkz@lltmp) +\tkzCompass[compass style,#1](#4,tkz@lltmp) +\tkzCompass[compass style,#1,length=\tkz@show@ratio*\tkz@show@length](#3,tkz@lltmp) \endgroup} %<--------------------------------------------------------------------------–> -%<--------------------------------------------------------------------------–> \def\tkzShowSymOrth{\pgfutil@ifnextchar[{\tkz@ShowSymOrth}{% \tkz@ShowSymOrth[]}} \def\tkz@ShowSymOrth[#1](#2,#3)(#4){% @@ -298,14 +294,13 @@ translation/.code args={from #1 to #2}{% \pgfnodealias{tkzPointofSym}{tkzPointResult} \tkz@VecK[2](#4,tkzPointofSym) \pgfnodealias{tkz@pointtsf}{tkzPointResult} - \tkzCompass[#1](#2,#4) - \tkzCompass[#1,length=\tkz@show@ratio*\tkz@show@length](#3,#4) - \tkzCompass[#1](#2,tkz@pointtsf) - \tkzCompass[#1,length=\tkz@show@ratio*\tkz@show@length](#3,tkz@pointtsf) + \tkzCompass[compass style,#1](#2,#4) + \tkzCompass[compass style,#1,length=\tkz@show@ratio*\tkz@show@length](#3,#4) + \tkzCompass[compass style,#1](#2,tkz@pointtsf) + \tkzCompass[compass style,#1,length=\tkz@show@ratio*\tkz@show@length](#3,tkz@pointtsf) \endgroup } %<--------------------------------------------------------------------------–> -%<--------------------------------------------------------------------------–> \def\tkzShowCSym{\pgfutil@ifnextchar[{\tkz@ShowCSym}{\tkz@ShowCSym[]}} \def\tkz@ShowCSym[#1](#2)(#3){% @@ -315,12 +310,11 @@ translation/.code args={from #1 to #2}{% \tkz@ax=\pgf@x% \tkz@ay=\pgf@y% \path[coordinate](#2)--++(-\tkz@ax,-\tkz@ay) coordinate (tkz@pointtsf); - \tkzCompass[#1](#2,tkz@pointtsf) - \tkzCompass[#1](#2,#3) + \tkzCompass[compass style,#1](#2,tkz@pointtsf) + \tkzCompass[compass style,#1](#2,#3) \endgroup } %<--------------------------------------------------------------------------–> -%<--------------------------------------------------------------------------–> \def\tkzShowProjection{\pgfutil@ifnextchar[{\tkz@ShowProjection}{% \tkz@ShowProjection[]}} \def\tkz@ShowProjection[#1](#2,#3)(#4){% @@ -342,12 +336,11 @@ translation/.code args={from #1 to #2}{% \pgfnodealias{SO@2}{tkzPointResult} \tkz@VecKNorm[-\tkz@show@gap](tkz@pointtsf,#4) \pgfnodealias{SO@3}{tkzPointResult} - \tkzCompass[#1](#4,SO@1) - \tkzCompass[#1](#4,SO@2) - \tkzCompass[#1](SO@1,SO@3) - \tkzCompass[#1,length=\tkz@show@ratio*\tkz@show@length](SO@2,SO@3) + \tkzCompass[compass style,#1](#4,SO@1) + \tkzCompass[compass style,#1](#4,SO@2) + \tkzCompass[compass style,#1](SO@1,SO@3) + \tkzCompass[compass style,#1,length=\tkz@show@ratio*\tkz@show@length](SO@2,SO@3) \endgroup } -%<-------------------------------------------------------------------------–> \makeatother \endinput \ No newline at end of file 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 } diff --git a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-angles.tex b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-angles.tex deleted file mode 100644 index 32dfc82e65a..00000000000 --- a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-angles.tex +++ /dev/null @@ -1,74 +0,0 @@ -% tkz-tools-angles.tex -% Copyright 2020 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. -% The latest version of this license is in -% 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-tools-angles.tex} -\makeatletter -%<--------------------------------------------------------------------------–> -%<--------------------------------------------------------------------------–> -% thanks karu : http://tex.stackexchange.com/questions/151667/tkzgetangle-strange-behavior/196224#196224 \tkzGetAngle strange behavior -% defines \tkz@FirstAngle and \tkz@SecondAngle sens trigo -%<--------------------------------------------------------------------------–> - \def\tkzNormalizeAngle(#1,#2){% - \begingroup - \pgfmathparse{#1}\xdef\tkz@FirstAngle{\pgfmathresult}% - \pgfmathparse{#2}\xdef\tkz@SecondAngle{\pgfmathresult}% - \pgfmathgreaterthan{\tkz@FirstAngle}{0} - \ifdim\pgfmathresult pt=1 pt\relax% - \pgfmathgreaterthan{\tkz@FirstAngle}{\tkz@SecondAngle} - \ifdim\pgfmathresult pt=1 pt\relax% - \pgfmathsubtract{\tkz@FirstAngle}{360} - \xdef\tkz@FirstAngle{\pgfmathresult}% - \fi - \else - \pgfmathgreaterthan{\tkz@FirstAngle}{\tkz@SecondAngle} - \ifdim\pgfmathresult pt=1 pt\relax% - \pgfmathadd{\tkz@SecondAngle}{360} - \xdef\tkz@SecondAngle{\pgfmathresult}% - \fi - \fi - \endgroup - } -%<--------------------------------------------------------------------------–> -% Angle -% Recherche l'angle formé par #1 et #2 par rapport à l'horizontale -%<--------------------------------------------------------------------------–> -\def\tkzFindSlopeAngle(#1,#2){% -\begingroup - \pgfmathanglebetweenpoints{\pgfpointanchor{#1}{center}}{% - \pgfpointanchor{#2}{center}} - \global\let\tkzAngleResult\pgfmathresult -\endgroup -} -%<--------------------------------------------------------------------------–> -% Angle avec trois nodes -%<--------------------------------------------------------------------------–> -\def\tkzFindAngle(#1,#2,#3){% new code 2016 -\begingroup - \tkzFindSlopeAngle(#2,#1)\tkzGetAngle{tkz@FirstAngle} - \tkzFindSlopeAngle(#2,#3)\tkzGetAngle{tkz@SecondAngle} - \tkzNormalizeAngle(\tkz@FirstAngle,\tkz@SecondAngle) - \edef\tkz@Angle{\fpeval{\tkz@SecondAngle-\tkz@FirstAngle}} - \global\let\tkzAngleResult\tkz@Angle -\endgroup -} -%<--------------------------------------------------------------------------–> -% Find angle -%<--------------------------------------------------------------------------–> -\def\tkzGetAngle#1{% - \global\expandafter\edef\csname #1\endcsname{\tkzAngleResult} -} -\makeatother -\endinput \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-eu-BB.tex b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-eu-BB.tex new file mode 100644 index 00000000000..d9ee2931c6a --- /dev/null +++ b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-eu-BB.tex @@ -0,0 +1,30 @@ +% tkz-tools-eu-BB.tex +% 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. +% The latest version of this license is in +% 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. + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-obj-eu-BB.tex} +\makeatletter +%<--------------------------------------------------------------------------–> +\def\tkzShowBB{\pgfutil@ifnextchar[{\tkz@ShowBB}{\tkz@ShowBB[]}} +\def\tkz@ShowBB[#1]{% + \draw[#1] (current bounding box.south west) rectangle + (current bounding box.north east); +} +%<--------------------------------------------------------------------------–> +\def\tkzClipBB{% +\clip (current bounding box.south west) rectangle + (current bounding box.north east); +} +%<--------------------------------------------------------------------------–> +\makeatother +\endinput \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-eu-angles.tex b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-eu-angles.tex new file mode 100644 index 00000000000..d9636c2d83d --- /dev/null +++ b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-eu-angles.tex @@ -0,0 +1,72 @@ +% tkz-tools-angles.tex +% 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. +% The latest version of this license is in +% 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. + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-tools-angles.tex} +\makeatletter +%<--------------------------------------------------------------------------–> +%<--------------------------------------------------------------------------–> +% thanks karu : http://tex.stackexchange.com/questions/151667/tkzgetangle-strange-behavior/196224#196224 \tkzGetAngle strange behavior +% defines \tkz@FirstAngle and \tkz@SecondAngle sens trigo +%<--------------------------------------------------------------------------–> + \def\tkzNormalizeAngle(#1,#2){% + \begingroup + \pgfmathparse{#1}\xdef\tkz@FirstAngle{\pgfmathresult}% + \pgfmathparse{#2}\xdef\tkz@SecondAngle{\pgfmathresult}% + \pgfmathgreaterthan{\tkz@FirstAngle}{0} + \ifdim\pgfmathresult pt=1 pt\relax% + \pgfmathgreaterthan{\tkz@FirstAngle}{\tkz@SecondAngle} + \ifdim\pgfmathresult pt=1 pt\relax% + \pgfmathsubtract{\tkz@FirstAngle}{360} + \xdef\tkz@FirstAngle{\pgfmathresult}% + \fi + \else + \pgfmathgreaterthan{\tkz@FirstAngle}{\tkz@SecondAngle} + \ifdim\pgfmathresult pt=1 pt\relax% + \pgfmathadd{\tkz@SecondAngle}{360} + \xdef\tkz@SecondAngle{\pgfmathresult}% + \fi + \fi + \endgroup + } +%<--------------------------------------------------------------------------–> +% Angle +% Recherche l'angle formé par #1 et #2 par rapport à l'horizontale +%<--------------------------------------------------------------------------–> +\def\tkzFindSlopeAngle(#1,#2){% +\begingroup + \pgfmathanglebetweenpoints{\pgfpointanchor{#1}{center}}{% + \pgfpointanchor{#2}{center}} + \global\let\tkzAngleResult\pgfmathresult +\endgroup +} +%<--------------------------------------------------------------------------–> +% Angle avec trois nodes +%<--------------------------------------------------------------------------–> +\def\tkzFindAngle(#1,#2,#3){% new code 2016 +\begingroup + \tkzFindSlopeAngle(#2,#1)\tkzGetAngle{tkz@FirstAngle} + \tkzFindSlopeAngle(#2,#3)\tkzGetAngle{tkz@SecondAngle} + \tkzNormalizeAngle(\tkz@FirstAngle,\tkz@SecondAngle) + \edef\tkz@Angle{\fpeval{\tkz@SecondAngle-\tkz@FirstAngle}} + \global\let\tkzAngleResult\tkz@Angle +\endgroup +} +%<--------------------------------------------------------------------------–> +% Find angle +%<--------------------------------------------------------------------------–> +\def\tkzGetAngle#1{% + \global\expandafter\edef\csname #1\endcsname{\tkzAngleResult} +} +\makeatother +\endinput \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-eu-base.tex b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-eu-base.tex new file mode 100644 index 00000000000..44b984ab6ce --- /dev/null +++ b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-eu-base.tex @@ -0,0 +1,89 @@ +% tkz-tools-eu-base.tex +% 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. +% The latest version of this license is in +% 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. + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-tools-eu-base.tex} +\makeatletter +%<--------------------------------------------------------------------------–> +\global\let\tkz@tmp@xa\tkz@init@xmin% modif 2016 +\global\let\tkz@tmp@xb\tkz@init@xmax% modif 2016 +\global\let\tkz@tmp@ya\tkz@init@ymin% modif 2016 +\global\let\tkz@tmp@yb\tkz@init@ymax% modif 2016 +%<--------------------------------------------------------------------------–> +\pgfkeys{ + /tkzInit/.cd, + xmin/.store in = \tkz@init@xmin, + xmax/.store in = \tkz@init@xmax, + xstep/.store in = \tkz@init@xstep, + ymin/.store in = \tkz@init@ymin, + ymax/.store in = \tkz@init@ymax, + ystep/.store in = \tkz@init@ystep, + NO/.is if = tkz@init@NO, + NO/.default = true, + xmin = 0, + xmax = 10, + xstep = 1, + ymin = 0, + ymax = 10, + ystep = 1, + NO = false + } + +\def\tkzInit{\pgfutil@ifnextchar[{\tkz@Init}{\tkz@Init[]}} +\def\tkz@Init[#1]{% + \pgfqkeys{/tkzInit}{#1} + \ifx\tkzfctloaded\undefined + \else + \tkz@tkzf@fct=0 % only if tkz-fct loaded + \fi + \xdef\tkz@init@xorigine{0} + \xdef\tkz@init@yorigine{0} + \edef\@xsgmin{\fpeval{sign(\tkz@init@xmin)}} + \edef\@xsgmax{\fpeval{sign(\tkz@init@xmax)}} + \edef\@ysgmin{\fpeval{sign(\tkz@init@ymin)}} + \edef\@ysgmax{\fpeval{sign(\tkz@init@ymax)}} + \let\tkz@tmp@xa\tkz@init@xmin %modif 2016 + \let\tkz@tmp@xb\tkz@init@xmax %modif 2016 + \let\tkz@tmp@ya\tkz@init@ymin %modif 2016 + \let\tkz@tmp@yb\tkz@init@ymax %modif 2016 + \tkz@init@NOfalse + \ifx\@xsgmin\@xsgmax \tkz@init@NOtrue \fi + \ifx\@ysgmin\@ysgmax \tkz@init@NOtrue \fi + \iftkz@init@NO% + \ifx\@xsgmin\@xsgmax + \edef\tkz@init@xmax{\fpeval{\tkz@init@xmax-\tkz@init@xmin}} + \edef\tkz@init@xorigine{\tkz@init@xmin} + \edef\tkz@init@xmin{0} + \fi + \ifx\@ysgmin\@ysgmax + \edef\tkz@init@ymax{\fpeval{\tkz@init@ymax-\tkz@init@ymin}} + \edef\tkz@init@yorigine{\tkz@init@ymin} + \edef\tkz@init@ymin{0} + \fi + \fi + \edef\tkz@xa{\fpeval{\tkz@init@xmin/\tkz@init@xstep}} + \edef\tkz@xb{\fpeval{\tkz@init@xmax/\tkz@init@xstep}} + \edef\tkz@ya{\fpeval{\tkz@init@ymin/\tkz@init@ystep}} + \edef\tkz@yb{\fpeval{\tkz@init@ymax/\tkz@init@ystep}} + \tkz@getdecimal{\tkz@init@xstep} % amélioration nb dec et integer + \xdef\tkz@init@xdec{\number\c@pgfmath@countb} + \tkz@getdecimal{\tkz@init@ystep} + \xdef\tkz@init@ydec{\number\c@pgfmath@countb} +}% +\def\tkzAddName{\pgfutil@ifnextchar[{\tkz@AddName}{\tkz@AddName[]}} +\def\tkz@AddName[#1]#2{% +\node[above left,#1] at (\pgf@path@lastx,\pgf@path@lasty){#2}; +}% +%<--------------------------------------------------------------------------–> +\makeatother +\endinput \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-eu-colors.tex b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-eu-colors.tex new file mode 100644 index 00000000000..a105f51f93f --- /dev/null +++ b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-eu-colors.tex @@ -0,0 +1,57 @@ +% tkz-tools-eu-colors +% 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. +% The latest version of this license is in +% 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. + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-tools-eu-colors} +\makeatletter + +%<------ Initialisation of the colors with tkzSetUpColors -----------------> +% Première macro SetUpColors %%%%%%%%%%%%%%%%%%%%% +%Possible +\pgfkeys{/tkzsucolor/.is family} +\def\setupcolorkeys#1{% + \pgfkeys{/tkzsucolor,#1}} +\setupcolorkeys{ + background/.estore in = \setupcolor@background, + text/.estore in = \setupcolor@text, + @initial/.style = {background=white,text=black}, + @apply/.code = {\pagecolor{\setupcolor@background}% + \color{\setupcolor@text}% + }, +} +\def\tkzSetUpColors{\pgfutil@ifnextchar[{\tkz@SetUpColors}{\tkz@SetUpColors[]}} +\def\tkz@SetUpColors[#1]{\setupcolorkeys{@initial,#1,@apply}} + +%<------ Initialisation of all colors -----------------> +\pgfkeys{/tkzsupallcol/.cd, + background/.store in = \tkz@suac@bkc, + text/.store in = \tkz@suac@txt, + background = \tkz@backgroundcolor,% see tkz-euclide.cfg + text = \tkz@textcolor% idem + } +\def\tkzSetUpAllColors{\pgfutil@ifnextchar[{\tkz@SetUpAllColors}{% + \tkz@SetUpAllColors[]}} +\def\tkz@SetUpAllColors[#1]{% + \pgfqkeys{/tkzsupallcol}{#1} % now we redine the based colors + \def\tkz@fillcolor{\tkz@suac@bkc} + \def\tkz@mainlinecolor{\tkz@suac@txt} + \def\tkz@textcolor{\tkz@suac@txt} + \def\tkz@otherlinecolor{\tkz@suac@txt!50} + \def\tkz@sua@color{\tkz@suac@txt} + \tkzSetUpAxis[color=\tkz@suac@txt] + \tkzSetUpGrid[color=\tkz@suac@txt] + \pagecolor{\tkz@suac@bkc} + \color{\tkz@suac@txt} +} +\makeatother +\endinput \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-eu-intersections.tex b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-eu-intersections.tex new file mode 100644 index 00000000000..9448b707a7b --- /dev/null +++ b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-eu-intersections.tex @@ -0,0 +1,403 @@ +% tkz-tools-intersections.tex +% 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. +% The latest version of this license is in +% 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{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-tools-intersections.tex} +\makeatletter +%<--------------------------------------------------------------------------–> +% intersection de deux lignes +%<--------------------------------------------------------------------------–> +\def\tkzInterLL(#1,#2)(#3,#4){% méthode avec xfp +\tkz@InterLL(#1,#2)(#3,#4){tkzPointResult} +} + +\def\tkz@InterLL(#1,#2)(#3,#4)#5{% +%\path (intersection of #1--#2 and #3--#4) coordinate(#5); +% méthode with tikz +\pgfextractx{\pgf@x}{\pgfpointanchor{#1}{center}}% +\pgfextracty{\pgf@y}{\pgfpointanchor{#1}{center}}% +\tkz@ax\pgf@x% +\tkz@ay\pgf@y% +\pgfextractx{\pgf@x}{\pgfpointanchor{#2}{center}}% +\pgfextracty{\pgf@y}{\pgfpointanchor{#2}{center}} +\tkz@bx\pgf@x% +\tkz@by\pgf@y% +\pgfextractx{\pgf@x}{\pgfpointanchor{#3}{center}}% +\pgfextracty{\pgf@y}{\pgfpointanchor{#3}{center}}% +\tkz@cx\pgf@x% +\tkz@cy\pgf@y% +\pgfextractx{\pgf@x}{\pgfpointanchor{#4}{center}}% +\pgfextracty{\pgf@y}{\pgfpointanchor{#4}{center}}% +\tkz@dx\pgf@x% +\tkz@dy\pgf@y% + +\edef\tkz@deltax{\fpeval{(\tkz@ax-\tkz@bx)/(28.45274)}} +\edef\tkz@deltaxx{\fpeval{(\tkz@cx-\tkz@dx)/(28.45274)}} +\edef\tkz@deltay{\fpeval{(\tkz@ay-\tkz@by)/(28.45274)}} +\edef\tkz@deltayy{\fpeval{(\tkz@cy-\tkz@dy)/(28.45274)}} +\edef\tkz@deltaxy{\fpeval{((\tkz@ax*\tkz@by)-(\tkz@ay*\tkz@bx))/(28.45274*28.45274)}} +\edef\tkz@deltaxxyy{\fpeval{((\tkz@cx*\tkz@dy)-(\tkz@cy*\tkz@dx))/(28.45274*28.45274)}} +\edef\tkz@div{\fpeval{(\tkz@deltax*\tkz@deltayy)-(\tkz@deltay*\tkz@deltaxx)}} +\edef\tkz@numx{\fpeval{(\tkz@deltaxy*\tkz@deltaxx)-(\tkz@deltax*\tkz@deltaxxyy)}} +\edef\tkz@numy{\fpeval{(\tkz@deltaxy*\tkz@deltayy)-(\tkz@deltay*\tkz@deltaxxyy)}} +\edef\tkz@xs{\fpeval{round(\tkz@numx/\tkz@div,5)}} +\edef\tkz@ys{\fpeval{round(\tkz@numy/\tkz@div,5)}} +\path[coordinate](\tkz@xs,\tkz@ys) coordinate (#5); +} + + +% méthode with coordinates +\def\tkzInterLLxy(#1,#2,#3,#4)(#5,#6,#7,#8){% +%\path (intersection of #1--#2 and #3--#4) coordinate(#5);% +\tkz@ax#1% +\tkz@ay#2% +\tkz@bx#3% +\tkz@by#4% +\tkz@cx#5% +\tkz@cy#6% +\tkz@dx#7% +\tkz@dy#8% +\edef\tkz@deltax{\fpeval{(\tkz@ax-\tkz@bx)/(28.45274)}} +\edef\tkz@deltaxx{\fpeval{(\tkz@cx-\tkz@dx)/(28.45274)}} +\edef\tkz@deltay{\fpeval{(\tkz@ay-\tkz@by)/(28.45274)}} +\edef\tkz@deltayy{\fpeval{(\tkz@cy-\tkz@dy)/(28.45274)}} +\edef\tkz@deltaxy{\fpeval{((\tkz@ax*\tkz@by)-(\tkz@ay*\tkz@bx))/(28.45274*28.45274)}} +\edef\tkz@deltaxxyy{\fpeval{((\tkz@cx*\tkz@dy)-(\tkz@cy*\tkz@dx))/(28.45274*28.45274)}} +\edef\tkz@div{\fpeval{(\tkz@deltax*\tkz@deltayy)-(\tkz@deltay*\tkz@deltaxx)}} +\edef\tkz@numx{\fpeval{(\tkz@deltaxy*\tkz@deltaxx)-(\tkz@deltax*\tkz@deltaxxyy)}} +\edef\tkz@numy{\fpeval{(\tkz@deltaxy*\tkz@deltayy)-(\tkz@deltay*\tkz@deltaxxyy)}} +\edef\tkz@xs{\fpeval{round(\tkz@numx/\tkz@div,5)}} +\edef\tkz@ys{\fpeval{round(\tkz@numy/\tkz@div,5)}} +\path[coordinate](\tkz@xs,\tkz@ys) coordinate (tkzPointResult); +} + +%<--------------------------------------------------------------------------–> +% intersection de Ligne Cercle rayon connu +%<--------------------------------------------------------------------------–> +% /* +% Calculate the intersection of a ray and a sphere +% The line segment is defined from p1 to p2 +% The sphere is of radius r and centered at sc +% There are potentially two points of intersection given by +% p = p1 + mu1 (p2 - p1) +% p = p1 + mu2 (p2 - p1) +% Return FALSE if the ray doesn't intersect the sphere. +% */ +% int RaySphere(XYZ p1,XYZ p2,XYZ sc,double r,double *mu1,double *mu2) +% { +% double a,b,c; +% double bb4ac; +% XYZ dp; +% +% dp.x = p2.x - p1.x; +% dp.y = p2.y - p1.y; +% dp.z = p2.z - p1.z; +% a = dp.x * dp.x + dp.y * dp.y + dp.z * dp.z; +% b = 2 * (dp.x * (p1.x - sc.x) + dp.y * (p1.y - sc.y) + dp.z * (p1.z - sc.z)); +% c = sc.x * sc.x + sc.y * sc.y + sc.z * sc.z; +% c += p1.x * p1.x + p1.y * p1.y + p1.z * p1.z; +% c -= 2 * (sc.x * p1.x + sc.y * p1.y + sc.z * p1.z); +% c -= r * r; +% bb4ac = b * b - 4 * a * c; +% if (ABS(a) < EPS || bb4ac < 0) { +% *mu1 = 0; +% *mu2 = 0; +% return(FALSE); +% } +% +% *mu1 = (-b + sqrt(bb4ac)) / (2 * a); +% *mu2 = (-b - sqrt(bb4ac)) / (2 * a); +% +% return(TRUE); +% } +%<---------- test ------------------------------------------------------–> +\def\tkzTestInterLC(#1,#2)(#3,#4){% +\tkz@Projection(#1,#2)(#3){tkz@pth}% distance centre à la ligne +\tkz@@CalcLength(#3,tkz@pth){tkz@mathLen}% +\tkz@@CalcLength(#3,#4){tkzLengthResult} +\ifdim\tkz@mathLen pt>\tkzLengthResult pt\relax% +\def\tkzflagLC{-1} +\else +\def\tkzflagLC{1} +\fi +} +%<--------------------------------------------------------------------------–> +\def\tkz@numlc{0} +\pgfkeys{/linecircle/.cd, + node/.code = \def\tkz@numlc{0}, + R/.code = \def\tkz@numlc{1}, + with nodes/.code = \def\tkz@numlc{2}, + node + } +%<--------------------------------------------------------------------------–> +\def\tkzInterLC{\pgfutil@ifnextchar[{\tkz@InterLC}{\tkz@InterLC[]}} +\def\tkz@InterLC[#1](#2,#3)(#4,#5){% +\begingroup +\pgfqkeys{/linecircle}{#1} + \pgfinterruptboundingbox +\ifcase\tkz@numlc% + % first case 0 + \tkz@@CalcLength(#4,#5){tkzLengthResult} + \tkzInterLCR(#2,#3)(#4,\tkzLengthResult pt){tkzFirstPointResult}% + {tkzSecondPointResult} +\or% 1 + \tkzInterLCR(#2,#3)(#4,#5 cm){tkzFirstPointResult} + {tkzSecondPointResult}% +\or% 2 + \tkzInterLCWithNodes(#2,#3)(#4,#5){tkzFirstPointResult}% + {tkzSecondPointResult}% +\fi +\endpgfinterruptboundingbox +\endgroup +} +%<--------------------------------------------------------------------------–> +%<--------------------------------------------------------------------------–> +\def\tkzInterLCR(#1,#2)(#3,#4)#5#6{% +\begingroup +\tkz@radi=#4% +\tkz@@extractxy{#3} +\tkz@bx =\pgf@x\relax% +\tkz@by =\pgf@y\relax% +\tkz@Projection(#1,#2)(#3){tkz@pth} +\tkz@@CalcLength(#3,tkz@pth){tkz@mathLen} + \ifdim\tkz@mathLen pt<0.05pt\relax% + \pgfpointdiff{\pgfpointanchor{#1}{center}}% + {\pgfpointanchor{#2}{center}}% + \tkz@ax=\pgf@x% + \tkz@ay=\pgf@y% + \pgfpointborderellipse{\pgfpoint{\tkz@ax}{\tkz@ay}}% + {\pgfpoint{\tkz@radi}{\tkz@radi}} + \tkz@ax=\pgf@x\relax% + \tkz@ay=\pgf@y\relax% + \advance\tkz@bx by\tkz@ax\relax% + \advance\tkz@by by\tkz@ay\relax% + \pgfcoordinate{#6}{\pgfqpoint{\tkz@bx}{\tkz@by}} + \tkzCSym(#3)(#6){#5} + \else + \edef\pgfmathresult{\fpeval{\tkz@mathLen/\tkz@radi}} + % \edef\tkz@angle{\fpeval{acosd(\pgfmathresult)}} + \pgfmathacos@{\pgfmathresult}% + \let\tkz@angle\pgfmathresult% + \pgfpointdiff{\pgfpointanchor{#3}{center}}% + {\pgfpointanchor{tkz@pth}{center}}% + \tkz@ax=\pgf@x% + \tkz@ay=\pgf@y% + \pgfpointborderellipse{\pgfpoint{\tkz@ax}{\tkz@ay}}% + {\pgfpoint{\tkz@radi}{\tkz@radi}} + \tkz@ax =\pgf@x\relax% + \tkz@ay =\pgf@y\relax% + \advance\tkz@bx by\tkz@ax\relax% + \advance\tkz@by by\tkz@ay\relax% + \tkz@@extractxy{#3} + \tkz@ax =\pgf@x\relax% + \tkz@ay =\pgf@y\relax% + \tkz@@extractxy{tkz@pth} + \pgfmathrotatepointaround{\pgfpoint{\tkz@bx}{\tkz@by}}% + {\pgfpoint{\tkz@ax}{\tkz@ay}}% + {\tkz@angle} + \pgfcoordinate{#5}{\pgfqpoint{\pgf@x}{\pgf@y}} + \pgfmathrotatepointaround{\pgfpoint{\tkz@bx}{\tkz@by}}% + {\pgfpoint{\tkz@ax}{\tkz@ay}}% + {-\tkz@angle} + \pgfcoordinate{#6}{\pgfqpoint{\pgf@x}{\pgf@y}} + +\fi +\endgroup +} +%<--------------------------------------------------------------------------–> +% intersection de Ligne Cercle +% #4 center #5 point sur le cercle +%<--------------------------------------------------------------------------–> +% \def\tkzInterLC(#1,#2)(#3,#4)#5#6{% +% \begingroup +% \tkz@@CalcLength(#3,#4){tkz@rad} +% \tkzInterLCR(#1,#2)(#3,\tkz@rad pt){#5}{#6} +% \endgroup +% } +%<--------------------------------------------------------------------------–> +% intersection de Ligne Cercle rayon inconnu +%<--------------------------------------------------------------------------–> +\def\tkzInterLCWithNodes(#1,#2)(#3,#4,#5)#6#7{% +\begingroup + \tkz@@CalcLength(#4,#5){tkz@radius} + \tkzInterLCR(#1,#2)(#3,\tkz@radius pt){#6}{#7} +\endgroup +} + +%<--------------------------------------------------------------------------–> +% Intersection de deux cercles +%<--------------------------------------------------------------------------–> +\def\tkz@numcc{0} +\pgfkeys{ +/circlecircle/.cd, + node/.code = {\global\def\tkz@numcc{0}}, + R/.code = {\global\def\tkz@numcc{1}}, +with nodes/.code = {\global\def\tkz@numcc{2}} +} +%<--------------------------------------------------------------------------–> +\def\tkzInterCC{\pgfutil@ifnextchar[{\tkz@InterCC}{\tkz@InterCC[]}} +\def\tkz@InterCC[#1](#2,#3)(#4,#5){% +\begingroup +\pgfkeys{/circlecircle/.cd,node} +\pgfqkeys{/circlecircle}{#1} +\ifcase\tkz@numcc% + % first case 0 + \tkz@save@length + \tkz@@CalcLengthcm(#2,#3){tkz@rayA} + \tkz@@CalcLengthcm(#4,#5){tkz@rayB} + \tkz@restore@length + \tkzInterCCR(#2,\tkz@rayA)(#4,\tkz@rayB){tkzFirstPointResult}{% + tkzSecondPointResult} + \or% 1 + \tkzInterCCR(#2,#3)(#4,#5){tkzFirstPointResult}{tkzSecondPointResult}% + \or%2 + \tkzInterCCWithNodes(#2,#3)(#4,#5){tkzFirstPointResult}{tkzSecondPointResult} +\fi +\endgroup +} +%<--------------------------------------------------------------------------–> +%<--------------------------------------------------------------------------–> + +% méthode +% /* circle_circle_intersection() * +% * Determine the points where 2 circles in a common plane intersect. +% * +% * int circle_circle_intersection( +% * // center and radius of 1st circle +% * double x0, double y0, double r0, +% * // center and radius of 2nd circle +% * double x1, double y1, double r1, +% * // 1st intersection point +% * // 2nd intersection point +% * +% * This is a public domain work. 3/26/2005 Tim Voght +% * +% int circle_circle_intersection(double x0, double y0, double r0, +% double x1, double y1, double r1, +% double *xi, double *yi, +% double *xi_prime, double *yi_prime) +% { +% double a, dx, dy, d, h, rx, ry; +% double x2, y2; +% +% /* dx and dy are the vertical and horizontal distances between +% * the circle centers. +% */ +% dx = x1 - x0; +% dy = y1 - y0; +% +% /* Determine the straight-line distance between the centers. */ +% //d = sqrt((dy*dy) + (dx*dx)); +% d = hypot(dx,dy); // Suggested by Keith Briggs +% +% /* Check for solvability. */ +% if (d > (r0 + r1)) +% { +% /* no solution. circles do not intersect. */ +% return 0; +% } +% if (d < fabs(r0 - r1)) +% { +% /* no solution. one circle is contained in the other */ +% return 0; +% } +% +% /* 'point 2' is the point where the line through the circle +% * intersection points crosses the line between the circle +% * centers. +% */ +% +% /* Determine the distance from point 0 to point 2. */ +% a = ((r0*r0) - (r1*r1) + (d*d)) / (2.0 * d) ; +% +% /* Determine the coordinates of point 2. */ +% x2 = x0 + (dx * a/d); +% y2 = y0 + (dy * a/d); +% +% /* Determine the distance from point 2 to either of the +% * intersection points. +% */ +% h = sqrt((r0*r0) - (a*a)); +% +% /* Now determine the offsets of the intersection points from +% * point 2. +% */ +% rx = -dy * (h/d); +% ry = dx * (h/d); +% +% /* Determine the absolute intersection points. */ +% *xi = x2 + rx; +% *xi_prime = x2 - rx; +% *yi = y2 + ry; +% *yi_prime = y2 - ry; +% +% return 1; +% } + +\def\tkzInterCCR(#1,#2)(#3,#4)#5#6{% +\begingroup +\pgfinterruptboundingbox +\tkz@save@length +\tkz@@CalcLength(#1,#3){tkz@dd} +\tkz@restore@length +\pgfextractx{\pgf@x}{\pgfpointanchor{#1}{center}} +\pgfextracty{\pgf@y}{\pgfpointanchor{#1}{center}} +\tkz@ax\pgf@x % +\tkz@ay\pgf@y % +\pgfextractx{\pgf@x}{\pgfpointanchor{#3}{center}} +\pgfextracty{\pgf@y}{\pgfpointanchor{#3}{center}} +\tkz@bx\pgf@x % +\tkz@by\pgf@y % +\tkz@cx#2cm % +\tkz@cy#4cm % +\edef\tkz@aa{\fpeval{((\tkz@cx+\tkz@cy)/(2*\tkz@dd))*(\tkz@cx-\tkz@cy)+\tkz@dd/2}} +\edef\tkz@xx{\fpeval{\tkz@ax+\tkz@aa/\tkz@dd*(\tkz@bx - \tkz@ax)}} +\edef\tkz@yy{\fpeval{\tkz@ay+\tkz@aa/\tkz@dd*(\tkz@by - \tkz@ay)}} +\path[coordinate](\tkz@xx pt,\tkz@yy pt) coordinate (tkzRadialCenter); +\edef\tkz@hh{\fpeval{sqrt((\tkz@cx+\tkz@aa)*(\tkz@cx-\tkz@aa))}} +\edef\tkz@rx{\fpeval{\tkz@hh / \tkz@dd * (\tkz@ay - \tkz@by)}} +\edef\tkz@ry{\fpeval{\tkz@hh / \tkz@dd * (\tkz@bx - \tkz@ax)}} +\edef\tkz@xs{\fpeval{\tkz@xx + \tkz@rx}} +\edef\tkz@ys{\fpeval{\tkz@yy + \tkz@ry}} +\path[coordinate](\tkz@xs pt,\tkz@ys pt) coordinate (#5); +\edef\tkz@xss{\fpeval{\tkz@xx - \tkz@rx}} +\edef\tkz@yss{\fpeval{\tkz@yy - \tkz@ry}} +\path[coordinate](\tkz@xss pt,\tkz@yss pt) coordinate (#6); +\endpgfinterruptboundingbox +\endgroup +} +%<--------------------------------------------------------------------------–> +% #2 node #3 node #4 node #5 node +% \def\tkzInterCC(#1,#2)(#3,#4)#5#6{% +% \begingroup +% \tkz@@CalcLength(#1,#2){tkz@rayA} +% \tkz@@CalcLength(#3,#4){tkz@rayB} +% \tkzInterCCR(#1,\tkz@rayA pt)(#3,\tkz@rayB pt){#5}{#6} +% \endgroup +% } +%<--------------------------------------------------------------------------–> +% Intersection de deux cercles Avec deux points +%<--------------------------------------------------------------------------–> +% la première variante devrait être #2 #3 avec #4 #5 +\def\tkzInterCCWithNodes(#1,#2,#3)(#4,#5,#6)#7#8{% +\begingroup + \tkz@@CalcLengthcm(#2,#3){tkz@rayA} + \tkz@@CalcLengthcm(#5,#6){tkz@rayB} + \tkzInterCCR(#1,\tkz@rayA)(#4,\tkz@rayB){#7}{#8} +\endgroup +} +\makeatother +\endinput \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-eu-math.tex b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-eu-math.tex new file mode 100644 index 00000000000..e7f41593a00 --- /dev/null +++ b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-eu-math.tex @@ -0,0 +1,129 @@ +% tkz-tools-eu-math.tex +% 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. +% The latest version of this license is in +% 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. + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-tools-eu-math.tex} +\makeatletter +%<--------------------------------------------------------------------------> +% \tkzpointnormalised# +% tkzCalcLength +% \tkzGetLength +% \tkzpttocm +% \tkzcmtopt +% \tkzFindSlope +% option xfp + +% \tkzpointnormalised normalise un point A-->A' tq ||v(OA')=1|| +% équivalent de \pgfpointnormalised avec fp +% example +% \tkzpointnormalised{% +% \pgfpointdiff{\pgfpointanchor{A}{center}} +% {\pgfpointanchor{B}{center}}} + +% or +% \pgf@x=1 cm +% \pgf@y=12 cm +% \tkzpointnormalised{} +%<-------------------------------------------------------------------------- +\def\tkzpointnormalised#1{% +\pgf@process{#1}% +\edef\tkz@den{\fpeval{sqrt((\pgf@x)^2+(\pgf@y)^2)}} +\edef\tkz@coordx{\fpeval{\pgf@x/\tkz@den}} +\edef\tkz@coordx{\fpeval{round(\tkz@coordx,5)}} +\edef\tkz@coordy{\fpeval{\pgf@y/\tkz@den}} +\edef\tkz@coordy{\fpeval{round(\tkz@coordy,5)}} +\pgf@x = \tkz@coordx pt +\pgf@y = \tkz@coordy pt +} +%<--------------------------------------------------------------------------> +% restaure and save length +\def\tkz@save@length{\global\let\tkz@temp@length\tkzLengthResult}% +\def\tkz@restore@length{\global\let\tkzLengthResult\tkz@temp@length }% +%<--------------------------------------------------------------------------> +% \tkzCalcLength Distance entre deux points en pt ou en cm avec xfp +% \veclen mais avec fp +% option cm le résultat est en cm sinon en pt +%<--------------------------------------------------------------------------> +%\newif\iftkzLengthIncm \iftkzLengthIncmtrue +\pgfkeys{tkzcalclen/.cd, + cm/.is if = tkzLengthIncm, + cm/.default = true, + cm = true} + +\def\tkzCalcLength{\pgfutil@ifnextchar[{\tkz@CalcLength}{\tkz@CalcLength[]}} +\def\tkz@CalcLength[#1](#2,#3){% +%\pgfkeys{tkzcalclen/.cd, cm = true} +\pgfqkeys{/tkzcalclen}{#1}% +\begingroup +\tkz@@CalcLength(#2,#3){tkzLengthResult} +\iftkzLengthIncm + \pgfmathparse{\tkzLengthResult pt/1cm} + \edef\tkz@xfpMathLen{\fpeval{round(\pgfmathresult,5)}} + \global\let\tkzLengthResult\tkz@xfpMathLen +\fi +\endgroup +}% +\def\tkz@@CalcLength(#1,#2)#3{% +\pgfpointdiff{\pgfpointanchor{#1}{center}}% + {\pgfpointanchor{#2}{center}}% +\edef\tkz@xfpMathLen{\fpeval{sqrt((\pgf@x)^2+(\pgf@y)^2)}} +\edef\tkz@xfpMathLen{\fpeval{round(\tkz@xfpMathLen,5)}} +\global\expandafter\edef\csname #3\endcsname{\tkz@xfpMathLen} +} +\def\tkz@@CalcLengthcm(#1,#2)#3{% +\pgfpointdiff{\pgfpointanchor{#1}{center}}% + {\pgfpointanchor{#2}{center}}% +\edef\tkz@xfpMathLen{\fpeval{sqrt((\pgf@x)^2+(\pgf@y)^2)}} +\edef\tkz@xfpMathLen{\fpeval{round(\tkz@xfpMathLen,5)}} +\pgfmathparse{\tkz@xfpMathLen pt/1cm} +\edef\tkz@xfpMathLen{\fpeval{round(\pgfmathresult,5)}} +\global\expandafter\edef\csname #3\endcsname{\tkz@xfpMathLen} +} +%<--------------------------------------------------------------------------> +\def\tkzGetLength#1{% +\global\expandafter\edef\csname #1\endcsname{\tkzLengthResult}} +%<--------------------------------------------------------------------------> +% \tkzpttocm passage de pt   cm div par 28.45274 +%<--------------------------------------------------------------------------> +\def\tkzpttocm(#1)#2{% +\begingroup + \pgfmathparse{#1/1cm} + \edef\tkz@mathresult{\fpeval{round(\pgfmathresult,5)}} + \global\let\tkz@mathresult\tkz@mathresult + \global\expandafter\edef\csname #2\endcsname{\tkz@mathresult}% +\endgroup +}% +%<--------------------------------------------------------------------------> +% \tkzcmtopt passage de cm   pt mul par 28.45274 +%<-------------------------------------------------------------------------- +\def\tkzcmtopt(#1)#2{% +\begingroup + \pgfmathparse{#1*1cm} + \edef\tkz@mathresult{\fpeval{round(\pgfmathresult,5)}} + \global\let\tkz@mathresult\tkz@mathresult + \global\expandafter\edef\csname #2\endcsname{\tkz@mathresult}% +\endgroup +}% + +% Schrodinger's cat idea 03/01/20 +\tikzset{xfp/.code={% +\pgfmathdeclarefunction*{veclen}{2}{% +\begingroup% + \pgfmath@x##1pt\relax% + \pgfmath@y##2pt\relax% + \edef\tkz@xfpMathLen{\fpeval{sqrt((\pgf@x)^2+(\pgf@y)^2)}} + \pgfmath@returnone\tkz@xfpMathLen pt% +\endgroup% +}}} +\makeatother +\endinput \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-eu-modules.tex b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-eu-modules.tex new file mode 100644 index 00000000000..349ce0d6319 --- /dev/null +++ b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-eu-modules.tex @@ -0,0 +1,67 @@ +% tkz-tools-modules +% 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. +% The latest version of this license is in +% 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. + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-tools-utilities.tex} +\makeatletter +%<------------- % chargement des modules ----------------------------------> +\def\tkz@obj@all{angles,arcs,compass,defcircles,deflines,defpoints,defpointsby,defpointsrnd,defpointswith,polygons,protractor,sectors,show,triangles}% +\def\tkz@obj@txt{all} +\def\usetkzobj{\pgfutil@ifnextchar[{\use@usetkzobj}{\use@@usetkzobj}}%} +\def\use@usetkzobj[#1]{\use@@usetkzobj{#1}} +\def\use@@usetkzobj#1{% + \def\tkz@list{#1} + \ifx\tkz@obj@txt\tkz@list \edef\tkz@list{\tkz@obj@all}% + \else + \edef\tkz@list{#1}% + \fi + \pgfutil@for\tkz@temp:=\tkz@list\do{% + \expandafter\ifx\csname tkz@library@\tkz@temp @loaded\endcsname\relax% + \expandafter\global\expandafter\let\csname tkz@library@\tkz@temp @loaded\endcsname=\pgfutil@empty% + \expandafter\edef\csname tkz@obj@#1@atcode\endcsname{\the\catcode`\@} + \expandafter\edef\csname tkz@obj@#1@barcode\endcsname{\the\catcode`\|} + \catcode`\@=11 + \catcode`\|=12 + \input tkz-obj-\tkz@temp.tex + \catcode`\@=\csname tkz@obj@#1@atcode\endcsname + \catcode`\|=\csname tkz@obj@#1@barcode\endcsname + \fi% + }% +}% +%<---------------------------------------------------------–> +\def\tkz@tool@all{math-xfp} +\def\tkz@tool@txt{all} + +\def\usetkztool{\pgfutil@ifnextchar[{\use@usetkztool}{\use@@usetkztool}}%} +\def\use@usetkztool[#1]{\use@@usetkztool{#1}} +\def\use@@usetkztool#1{% + \def\tkz@list{#1} + \ifx\tkz@tool@txt\tkz@list \edef\tkz@list{\tkz@tool@all}% + \else + \edef\tkz@list{#1}% + \fi + \pgfutil@for\tkz@temp:=\tkz@list\do{% + \expandafter\ifx\csname tkz@library@\tkz@temp @loaded\endcsname\relax% + \expandafter\global\expandafter\let\csname tkz@library@\tkz@temp @loaded\endcsname=\pgfutil@empty% + \expandafter\edef\csname tkz@tool@#1@atcode\endcsname{\the\catcode`\@} + \expandafter\edef\csname tkz@tool@#1@barcode\endcsname{\the\catcode`\|} + \catcode`\@=11 + \catcode`\|=12 + \input tkz-tools-\tkz@temp.tex + \catcode`\@=\csname tkz@tool@#1@atcode\endcsname + \catcode`\|=\csname tkz@tool@#1@barcode\endcsname + \fi% + }% +}% +\makeatother +\endinput \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-eu-text.tex b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-eu-text.tex new file mode 100644 index 00000000000..6744585be43 --- /dev/null +++ b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-eu-text.tex @@ -0,0 +1,88 @@ +% tkz-tools-eu-text.tex +% 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. +% The latest version of this license is in +% 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. + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-tools-eu-text.tex} +\makeatletter +%<--------------------------------------------------------------------------–> +% tkzText +%<--------------------------------------------------------------------------–> +\def\tkz@parsenode#1{% +\tkz@getvirg#1,\@nil +\iftkz@node +\else + \tkz@getfromcart#1\@nil +\fi +} +\def\tkz@getvirg#1,#2\@nil{% +\ifx\tkzempty#2\tkzempty% + \tkz@nodetrue +\else + \tkz@nodefalse +\fi +} +\def\tkzText{\pgfutil@ifnextchar[{\tkz@Text}{\tkz@Text[]}} +\def\tkz@Text[#1](#2)#3{% + \begingroup + \tkz@parsenode{#2} + \iftkz@node + \node[#1] at (#2){#3}; + \else + \edef\tkzpt@xa{\fpeval{(\tkz@absc-\tkz@init@xorigine)/\tkz@init@xstep}} + \edef\tkzpt@ya{\fpeval{(\tkz@ord-\tkz@init@yorigine)/\tkz@init@ystep}} + \node[#1] at (\tkzpt@xa,\tkzpt@ya){#3};% + \fi +\endgroup +}% +% %<--------------------------------------------------------------------------–> +% % légende +% %<--------------------------------------------------------------------------–> +\pgfkeys{/tkzlegend/.cd, + line/.is if = tkz@legend@line, + line/.default = true, + line = false, + /tkzlegend/.search also = {/tikz}, +} +\def\tkzLegend{\pgfutil@ifnextchar[{\tkz@Legend}{\tkz@Legend[]}} +\def\tkz@Legend[#1](#2,#3)#4{% +\pgfqkeys{/tkzlegend}{#1} +\begingroup + \c@pgfmath@counta=0 % + \edef\tkzpt@xa{\fpeval{(#2-\tkz@init@xorigine)/\tkz@init@xstep}} + \edef\tkzpt@ya{\fpeval{(#3-\tkz@init@yorigine)/\tkz@init@ystep}} + \node[/tkzlegend/.cd,#1] at (\tkzpt@xa,\tkzpt@ya) {% +\begin{tikzpicture} + \foreach \motif/\size/\col/\mtext in {#4}{% + \iftkz@legend@line + \draw[color = \col, + line width = \size, + style = \motif, + text = \tkz@mainlinecolor]% + (0cm ,\the\c@pgfmath@counta ex)--% + (\tkz@legend@line@len,\the\c@pgfmath@counta ex) + \else + \draw plot[mark size = \size,% + mark = \motif,% + mark options = {color=\col}]% + coordinates{(0 ex,\the\c@pgfmath@counta ex)}% + \fi + node[right=1ex] {\mtext}; + \global\advance\c@pgfmath@counta by 3 % + }% + +\end{tikzpicture}% +};% +\endgroup +} +\makeatother +\endinput \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-eu-utilities.tex b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-eu-utilities.tex new file mode 100644 index 00000000000..f85acf6142c --- /dev/null +++ b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-eu-utilities.tex @@ -0,0 +1,172 @@ +% tkz-tools-eu-utilities +% 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. +% The latest version of this license is in +% 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. + +\def\fileversion{4.00} +\def\filedate{2022/01/04} +\typeout{2022/01/04 4.00 tkz-tools-eu-utilities.tex} +\makeatletter +\pgfkeys{/tkzClip/.cd, +space/.store in = {\tkz@CLI@space}, +space = {}} + +\def\tkzClip{\pgfutil@ifnextchar[{\tkz@Clip}{\tkz@Clip[]}} +\def\tkz@Clip[#1]{% + +\pgfqkeys{/tkzClip}{#1} +\ifx\tkzutil@empty\tkz@CLI@space + \clip (\tkz@xa,\tkz@ya) rectangle (\tkz@xb,\tkz@yb); + \else + \edef\tkz@xxa{\fpeval{\tkz@xa-\tkz@CLI@space}} + \edef\tkz@yya{\fpeval{\tkz@ya-\tkz@CLI@space}} + \edef\tkz@xxb{\fpeval{\tkz@xb+\tkz@CLI@space}} % correction bug 2020 + \edef\tkz@yyb{\fpeval{\tkz@yb+\tkz@CLI@space}} + \clip (\tkz@xxa,\tkz@yya) rectangle (\tkz@xxb,\tkz@yyb); +\fi +} + +% for testing results +\def\extractxy#1{% +\pgfextractx{\pgf@x}{\pgfpointanchor{#1}{center}} +\pgfextracty{\pgf@y}{\pgfpointanchor{#1}{center}} +\typeout{#1 \the\pgf@x,\the\pgf@y} +} +%<-------------- some tools -------------------------------------------------> +\def\tkzutil@empty{} +\def\tkzutil@firstofone#1{#1} +\def\tkzutil@firstoftwo#1#2{#1} +\def\tkzutil@secondoftwo#1#2{#2} +%<--------------------------------------------------------------------------–> +\long\def\tkzutil@ifundefined#1{% + \expandafter\ifx\csname#1\endcsname\relax + \expandafter\tkzutil@firstoftwo + \else + \expandafter\tkzutil@secondoftwo + \fi} +%<--------------------------------------------------------------------------–> +\long\def\iftkznodedefined#1#2#3{% + \tkzutil@ifundefined{pgf@sh@ns@#1}{#3}{#2}% +} +%<--------------------------------------------------------------------------–> +\gdef\tkzActivOff{% + \edef\tkzTwoPtCode{\the\catcode`\:} + \edef\tkzPtExCode{\the\catcode`\!} + \edef\tkzPtVirCode{\the\catcode`\;} + \catcode`\:=12 \catcode`\!=12 \catcode`\;=12 + }% +\gdef\tkzActivOn{% + \catcode`\:=\tkzTwoPtCode\relax + \catcode`\!=\tkzPtExCode\relax + \catcode`\;=\tkzPtVirCode\relax +}% +%<--------------------------------------------------------------------------–> +% Pour savoir le nombre de décimales d'un nombre +% le nombre dans #1 et le résultat dans \c@pgfmath@countb +%<--------------------------------------------------------------------------–> +\newcommand\tkz@getdecimal[1]{\expandafter\@getdecimal#1.\@nil} +\def\@getdecimal#1.#2\@nil{% + \ifx\empty#2\empty + % Si #2 est vide, c'est qu'il n'y avait pas de point + % dans la chaîne initiale + \c@pgfmath@countb0 % + \gdef\tkz@decpart{}% + \else + % sinon c'est la chaîne qui suit le point décimal... + \CountToken{#2}% + % ... y compris le point en trop ajouté par \tkz@getdecimal :-) + \advance\c@pgfmath@countb by-1 % + \@@getdecimal#2\@nil + \fi +} +\def\@@getdecimal#1.\@nil{\gdef\tkz@decpart{#1}} +%<---------------------------------------------------------–> +% code from JCC modifi +\newcommand\CountToken[1]{% + \c@pgfmath@countb0 % + \expandafter\C@untToken#1\@nil +%modifi ajout du expandafter +} +\newcommand\C@untToken{% + \afterassignment\C@untT@ken\let\CurrT@ken= +} +\newcommand\C@untT@ken{% + \ifx\CurrT@ken\@nil \else + \advance\c@pgfmath@countb by1 % + \expandafter\C@untToken + \fi +} +%<---------------------------------------------------------–> +\def\tkz@recuplast(#1,#2){\def\tkz@last{#1}} +\def\tkz@stop{\tkz@stop} +% end code from JCC +%<---------------------------------------------------------–> +% Tools +%<---------------------------------------------------------–> +%<–––––––– code from TeX in Practice ––––––––> +\def\SubStringConditional #1#2{% + TT\fi + \edef\@MainString{#1}% + \edef\@SubStringConditionalTemp{{#1}{#2}}% + \expandafter\@SubStringConditional\@SubStringConditionalTemp +} +\def\@SubStringConditional #1#2{% + \def\@TestSubS ##1#2##2\\{% + \def\@TestTemp{##1}% + }% + \@TestSubS #1#2\\ + \ifx\@MainString\@TestTemp + \tkz@TestSubStringfalse + \else + \tkz@TestSubStringtrue + \fi + \iftkz@TestSubString +} +\def\RecursionMacroEnd #1#2#3{% + #1\relax + \def\@RecursionMacroEndNext{#2}% + \else + \def\@RecursionMacroEndNext{#3}% + \fi + \@RecursionMacroEndNext +} +\def\ReplaceSubStrings #1#2#3#4{% + \def\@ReplaceResult{#1}% + \edef\@ReplaceMain{#2}% + \edef\@ReplaceSub{#3}% + \edef\@ReplaceSubRep{#4}% + \@ReplaceSubStrings +} +\def\@ReplaceSubStrings{% + \RecursionMacroEnd + {\if\SubStringConditional{\@ReplaceMain}{\@ReplaceSub}}% + {\@ReplaceSubStringsDo}{\expandafter\edef\@ReplaceResult{\@ReplaceMain}}% +} +\def\@ReplaceSubStringsDoX{% + \def\@ReplaceSubStringsDoA ##1% +}% +\def\@ReplaceSubStringsDo{% + \expandafter\@ReplaceSubStringsDoX \@ReplaceSub + ##2\@EndReplaceSubStrings{% + \edef\@ReplaceMain{##1\@ReplaceSubRep ##2}% + }% + \expandafter\@ReplaceSubStringsDoA\@ReplaceMain + \@EndReplaceSubStrings + \@ReplaceSubStrings +} +%<---------------------------------------------------------–> +\def\DisabledNumprint{% + \let\tkz@numprint\numprint + \let\numprint\relax + } +\def\EnabledNumprint{\let\numprint\tkz@numprint} +%<---------------------------------------------------------–> +\makeatother +\endinput \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-intersections.tex b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-intersections.tex deleted file mode 100644 index d0517fdee75..00000000000 --- a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-intersections.tex +++ /dev/null @@ -1,402 +0,0 @@ -% tkz-tools-intersections.tex -% Copyright 2020 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. -% The latest version of this license is in -% 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-tools-intersections.tex} -\makeatletter -%<--------------------------------------------------------------------------–> -% intersection de deux lignes -%<--------------------------------------------------------------------------–> -\def\tkzInterLL(#1,#2)(#3,#4){% méthode avec xfp -\tkz@InterLL(#1,#2)(#3,#4){tkzPointResult} -} - -\def\tkz@InterLL(#1,#2)(#3,#4)#5{% -%\path (intersection of #1--#2 and #3--#4) coordinate(#5); -% méthode with tikz -\pgfextractx{\pgf@x}{\pgfpointanchor{#1}{center}}% -\pgfextracty{\pgf@y}{\pgfpointanchor{#1}{center}}% -\tkz@ax\pgf@x% -\tkz@ay\pgf@y% -\pgfextractx{\pgf@x}{\pgfpointanchor{#2}{center}}% -\pgfextracty{\pgf@y}{\pgfpointanchor{#2}{center}} -\tkz@bx\pgf@x% -\tkz@by\pgf@y% -\pgfextractx{\pgf@x}{\pgfpointanchor{#3}{center}}% -\pgfextracty{\pgf@y}{\pgfpointanchor{#3}{center}}% -\tkz@cx\pgf@x% -\tkz@cy\pgf@y% -\pgfextractx{\pgf@x}{\pgfpointanchor{#4}{center}}% -\pgfextracty{\pgf@y}{\pgfpointanchor{#4}{center}}% -\tkz@dx\pgf@x% -\tkz@dy\pgf@y% - -\edef\tkz@deltax{\fpeval{(\tkz@ax-\tkz@bx)/(28.45274)}} -\edef\tkz@deltaxx{\fpeval{(\tkz@cx-\tkz@dx)/(28.45274)}} -\edef\tkz@deltay{\fpeval{(\tkz@ay-\tkz@by)/(28.45274)}} -\edef\tkz@deltayy{\fpeval{(\tkz@cy-\tkz@dy)/(28.45274)}} -\edef\tkz@deltaxy{\fpeval{((\tkz@ax*\tkz@by)-(\tkz@ay*\tkz@bx))/(28.45274*28.45274)}} -\edef\tkz@deltaxxyy{\fpeval{((\tkz@cx*\tkz@dy)-(\tkz@cy*\tkz@dx))/(28.45274*28.45274)}} -\edef\tkz@div{\fpeval{(\tkz@deltax*\tkz@deltayy)-(\tkz@deltay*\tkz@deltaxx)}} -\edef\tkz@numx{\fpeval{(\tkz@deltaxy*\tkz@deltaxx)-(\tkz@deltax*\tkz@deltaxxyy)}} -\edef\tkz@numy{\fpeval{(\tkz@deltaxy*\tkz@deltayy)-(\tkz@deltay*\tkz@deltaxxyy)}} -\edef\tkz@xs{\fpeval{round(\tkz@numx/\tkz@div,5)}} -\edef\tkz@ys{\fpeval{round(\tkz@numy/\tkz@div,5)}} -\path[coordinate](\tkz@xs,\tkz@ys) coordinate (#5); -} - - -% méthode with coordinates -\def\tkzInterLLxy(#1,#2,#3,#4)(#5,#6,#7,#8){% -%\path (intersection of #1--#2 and #3--#4) coordinate(#5);% -\tkz@ax#1% -\tkz@ay#2% -\tkz@bx#3% -\tkz@by#4% -\tkz@cx#5% -\tkz@cy#6% -\tkz@dx#7% -\tkz@dy#8% -\edef\tkz@deltax{\fpeval{(\tkz@ax-\tkz@bx)/(28.45274)}} -\edef\tkz@deltaxx{\fpeval{(\tkz@cx-\tkz@dx)/(28.45274)}} -\edef\tkz@deltay{\fpeval{(\tkz@ay-\tkz@by)/(28.45274)}} -\edef\tkz@deltayy{\fpeval{(\tkz@cy-\tkz@dy)/(28.45274)}} -\edef\tkz@deltaxy{\fpeval{((\tkz@ax*\tkz@by)-(\tkz@ay*\tkz@bx))/(28.45274*28.45274)}} -\edef\tkz@deltaxxyy{\fpeval{((\tkz@cx*\tkz@dy)-(\tkz@cy*\tkz@dx))/(28.45274*28.45274)}} -\edef\tkz@div{\fpeval{(\tkz@deltax*\tkz@deltayy)-(\tkz@deltay*\tkz@deltaxx)}} -\edef\tkz@numx{\fpeval{(\tkz@deltaxy*\tkz@deltaxx)-(\tkz@deltax*\tkz@deltaxxyy)}} -\edef\tkz@numy{\fpeval{(\tkz@deltaxy*\tkz@deltayy)-(\tkz@deltay*\tkz@deltaxxyy)}} -\edef\tkz@xs{\fpeval{round(\tkz@numx/\tkz@div,5)}} -\edef\tkz@ys{\fpeval{round(\tkz@numy/\tkz@div,5)}} -\path[coordinate](\tkz@xs,\tkz@ys) coordinate (tkzPointResult); -} - -%<--------------------------------------------------------------------------–> -% intersection de Ligne Cercle rayon connu -%<--------------------------------------------------------------------------–> -% /* -% Calculate the intersection of a ray and a sphere -% The line segment is defined from p1 to p2 -% The sphere is of radius r and centered at sc -% There are potentially two points of intersection given by -% p = p1 + mu1 (p2 - p1) -% p = p1 + mu2 (p2 - p1) -% Return FALSE if the ray doesn't intersect the sphere. -% */ -% int RaySphere(XYZ p1,XYZ p2,XYZ sc,double r,double *mu1,double *mu2) -% { -% double a,b,c; -% double bb4ac; -% XYZ dp; -% -% dp.x = p2.x - p1.x; -% dp.y = p2.y - p1.y; -% dp.z = p2.z - p1.z; -% a = dp.x * dp.x + dp.y * dp.y + dp.z * dp.z; -% b = 2 * (dp.x * (p1.x - sc.x) + dp.y * (p1.y - sc.y) + dp.z * (p1.z - sc.z)); -% c = sc.x * sc.x + sc.y * sc.y + sc.z * sc.z; -% c += p1.x * p1.x + p1.y * p1.y + p1.z * p1.z; -% c -= 2 * (sc.x * p1.x + sc.y * p1.y + sc.z * p1.z); -% c -= r * r; -% bb4ac = b * b - 4 * a * c; -% if (ABS(a) < EPS || bb4ac < 0) { -% *mu1 = 0; -% *mu2 = 0; -% return(FALSE); -% } -% -% *mu1 = (-b + sqrt(bb4ac)) / (2 * a); -% *mu2 = (-b - sqrt(bb4ac)) / (2 * a); -% -% return(TRUE); -% } -%<---------- test ------------------------------------------------------–> -\def\tkzTestInterLC(#1,#2)(#3,#4){% -\tkz@Projection(#1,#2)(#3){tkz@pth}% distance centre à la ligne -\tkz@@CalcLength(#3,tkz@pth){tkz@mathLen}% -\tkzCalcLength(#3,#4) -\ifdim\tkz@mathLen pt>\tkzLengthResult pt\relax% -\def\tkzflagLC{-1} -\else -\def\tkzflagLC{1} -\fi -} -%<--------------------------------------------------------------------------–> -\def\tkz@numlc{0} -\pgfkeys{/linecircle/.cd, - node/.code = \def\tkz@numlc{0}, - R/.code = \def\tkz@numlc{1}, - with nodes/.code = \def\tkz@numlc{2}, - node - } -%<--------------------------------------------------------------------------–> -\def\tkzInterLC{\pgfutil@ifnextchar[{\tkz@InterLC}{\tkz@InterLC[]}} -\def\tkz@InterLC[#1](#2,#3)(#4,#5){% -\begingroup -\pgfqkeys{/linecircle}{#1} - \pgfinterruptboundingbox -\ifcase\tkz@numlc% - % first case 0 - \tkzCalcLength(#4,#5) - \tkzInterLCR(#2,#3)(#4,\tkzLengthResult pt){tkzFirstPointResult}% - {tkzSecondPointResult} -\or% 1 - \tkzInterLCR(#2,#3)(#4,#5){tkzFirstPointResult} - {tkzSecondPointResult}% -\or% 2 - \tkzInterLCWithNodes(#2,#3)(#4,#5){tkzFirstPointResult}% - {tkzSecondPointResult}% -\fi -\endpgfinterruptboundingbox -\endgroup -} -%<--------------------------------------------------------------------------–> -%<--------------------------------------------------------------------------–> -\def\tkzInterLCR(#1,#2)(#3,#4)#5#6{% -\begingroup -\tkz@radi=#4% -\tkz@@extractxy{#3} -\tkz@bx =\pgf@x\relax% -\tkz@by =\pgf@y\relax% -\tkz@Projection(#1,#2)(#3){tkz@pth} -\tkz@@CalcLength(#3,tkz@pth){tkz@mathLen} - \ifdim\tkz@mathLen pt<0.05pt\relax% - \pgfpointdiff{\pgfpointanchor{#1}{center}}% - {\pgfpointanchor{#2}{center}}% - \tkz@ax=\pgf@x% - \tkz@ay=\pgf@y% - \pgfpointborderellipse{\pgfpoint{\tkz@ax}{\tkz@ay}}% - {\pgfpoint{\tkz@radi}{\tkz@radi}} - \tkz@ax=\pgf@x\relax% - \tkz@ay=\pgf@y\relax% - \advance\tkz@bx by\tkz@ax\relax% - \advance\tkz@by by\tkz@ay\relax% - \pgfcoordinate{#6}{\pgfqpoint{\tkz@bx}{\tkz@by}} - \tkzCSym(#3)(#6){#5} - \else - \edef\pgfmathresult{\fpeval{\tkz@mathLen/\tkz@radi}} - % \edef\tkz@angle{\fpeval{acosd(\pgfmathresult)}} - \pgfmathacos@{\pgfmathresult}% - \let\tkz@angle\pgfmathresult% - \pgfpointdiff{\pgfpointanchor{#3}{center}}% - {\pgfpointanchor{tkz@pth}{center}}% - \tkz@ax=\pgf@x% - \tkz@ay=\pgf@y% - \pgfpointborderellipse{\pgfpoint{\tkz@ax}{\tkz@ay}}% - {\pgfpoint{\tkz@radi}{\tkz@radi}} - \tkz@ax =\pgf@x\relax% - \tkz@ay =\pgf@y\relax% - \advance\tkz@bx by\tkz@ax\relax% - \advance\tkz@by by\tkz@ay\relax% - \tkz@@extractxy{#3} - \tkz@ax =\pgf@x\relax% - \tkz@ay =\pgf@y\relax% - \tkz@@extractxy{tkz@pth} - \pgfmathrotatepointaround{\pgfpoint{\tkz@bx}{\tkz@by}}% - {\pgfpoint{\tkz@ax}{\tkz@ay}}% - {\tkz@angle} - \pgfcoordinate{#5}{\pgfqpoint{\pgf@x}{\pgf@y}} - \pgfmathrotatepointaround{\pgfpoint{\tkz@bx}{\tkz@by}}% - {\pgfpoint{\tkz@ax}{\tkz@ay}}% - {-\tkz@angle} - \pgfcoordinate{#6}{\pgfqpoint{\pgf@x}{\pgf@y}} - -\fi -\endgroup -} -%<--------------------------------------------------------------------------–> -% intersection de Ligne Cercle -% #4 center #5 point sur le cercle -%<--------------------------------------------------------------------------–> -% \def\tkzInterLC(#1,#2)(#3,#4)#5#6{% -% \begingroup -% \tkzCalcLength(#3,#4)\tkzGetLength{tkz@rad} -% \tkzInterLCR(#1,#2)(#3,\tkz@rad pt){#5}{#6} -% \endgroup -% } -%<--------------------------------------------------------------------------–> -% intersection de Ligne Cercle rayon inconnu -%<--------------------------------------------------------------------------–> -\def\tkzInterLCWithNodes(#1,#2)(#3,#4,#5)#6#7{% -\begingroup - \tkzCalcLength(#4,#5)\tkzGetLength{tkz@radius} - \tkzInterLCR(#1,#2)(#3,\tkz@radius pt){#6}{#7} -\endgroup -} - -%<--------------------------------------------------------------------------–> -% Intersection de deux cercles -%<--------------------------------------------------------------------------–> -\def\tkz@numcc{0} -\pgfkeys{ -/circlecircle/.cd, - node/.code = {\global\def\tkz@numcc{0}}, - R/.code = {\global\def\tkz@numcc{1}}, -with nodes/.code = {\global\def\tkz@numcc{2}} -} -%<--------------------------------------------------------------------------–> -\def\tkzInterCC{\pgfutil@ifnextchar[{\tkz@InterCC}{\tkz@InterCC[]}} -\def\tkz@InterCC[#1](#2,#3)(#4,#5){% -\begingroup -\pgfkeys{/circlecircle/.cd,node} -\pgfqkeys{/circlecircle}{#1} -\ifcase\tkz@numcc% - % first case 0 - \tkz@save@length - \tkzCalcLength(#2,#3) \tkzGetLength{tkz@rayA} - \tkzCalcLength(#4,#5) \tkzGetLength{tkz@rayB} - \tkz@restore@length - \tkzInterCCR(#2,\tkz@rayA pt)(#4,\tkz@rayB pt){tkzFirstPointResult}{% - tkzSecondPointResult} - \or% 1 - \tkzInterCCR(#2,#3)(#4,#5){tkzFirstPointResult}{tkzSecondPointResult}% - \or%2 - \tkzInterCCWithNodes(#2,#3)(#4,#5){tkzFirstPointResult}{tkzSecondPointResult} -\fi -\endgroup -} -%<--------------------------------------------------------------------------–> -%<--------------------------------------------------------------------------–> - -% méthode -% /* circle_circle_intersection() * -% * Determine the points where 2 circles in a common plane intersect. -% * -% * int circle_circle_intersection( -% * // center and radius of 1st circle -% * double x0, double y0, double r0, -% * // center and radius of 2nd circle -% * double x1, double y1, double r1, -% * // 1st intersection point -% * // 2nd intersection point -% * -% * This is a public domain work. 3/26/2005 Tim Voght -% * -% int circle_circle_intersection(double x0, double y0, double r0, -% double x1, double y1, double r1, -% double *xi, double *yi, -% double *xi_prime, double *yi_prime) -% { -% double a, dx, dy, d, h, rx, ry; -% double x2, y2; -% -% /* dx and dy are the vertical and horizontal distances between -% * the circle centers. -% */ -% dx = x1 - x0; -% dy = y1 - y0; -% -% /* Determine the straight-line distance between the centers. */ -% //d = sqrt((dy*dy) + (dx*dx)); -% d = hypot(dx,dy); // Suggested by Keith Briggs -% -% /* Check for solvability. */ -% if (d > (r0 + r1)) -% { -% /* no solution. circles do not intersect. */ -% return 0; -% } -% if (d < fabs(r0 - r1)) -% { -% /* no solution. one circle is contained in the other */ -% return 0; -% } -% -% /* 'point 2' is the point where the line through the circle -% * intersection points crosses the line between the circle -% * centers. -% */ -% -% /* Determine the distance from point 0 to point 2. */ -% a = ((r0*r0) - (r1*r1) + (d*d)) / (2.0 * d) ; -% -% /* Determine the coordinates of point 2. */ -% x2 = x0 + (dx * a/d); -% y2 = y0 + (dy * a/d); -% -% /* Determine the distance from point 2 to either of the -% * intersection points. -% */ -% h = sqrt((r0*r0) - (a*a)); -% -% /* Now determine the offsets of the intersection points from -% * point 2. -% */ -% rx = -dy * (h/d); -% ry = dx * (h/d); -% -% /* Determine the absolute intersection points. */ -% *xi = x2 + rx; -% *xi_prime = x2 - rx; -% *yi = y2 + ry; -% *yi_prime = y2 - ry; -% -% return 1; -% } - -\def\tkzInterCCR(#1,#2)(#3,#4)#5#6{% -\begingroup -\pgfinterruptboundingbox -\tkz@save@length -\tkzCalcLength(#1,#3)\tkzGetLength{tkz@dd} -\tkz@restore@length -\pgfextractx{\pgf@x}{\pgfpointanchor{#1}{center}} -\pgfextracty{\pgf@y}{\pgfpointanchor{#1}{center}} -\tkz@ax\pgf@x % -\tkz@ay\pgf@y % -\pgfextractx{\pgf@x}{\pgfpointanchor{#3}{center}} -\pgfextracty{\pgf@y}{\pgfpointanchor{#3}{center}} -\tkz@bx\pgf@x % -\tkz@by\pgf@y % -\tkz@cx#2 % -\tkz@cy#4 % -\edef\tkz@aa{\fpeval{((\tkz@cx+\tkz@cy)/(2*\tkz@dd))*(\tkz@cx-\tkz@cy)+\tkz@dd/2}} -\edef\tkz@xx{\fpeval{\tkz@ax+\tkz@aa/\tkz@dd*(\tkz@bx - \tkz@ax)}} -\edef\tkz@yy{\fpeval{\tkz@ay+\tkz@aa/\tkz@dd*(\tkz@by - \tkz@ay)}} -\path[coordinate](\tkz@xx pt,\tkz@yy pt) coordinate (tkzRadialCenter); -\edef\tkz@hh{\fpeval{sqrt((\tkz@cx+\tkz@aa)*(\tkz@cx-\tkz@aa))}} -\edef\tkz@rx{\fpeval{\tkz@hh / \tkz@dd * (\tkz@ay - \tkz@by)}} -\edef\tkz@ry{\fpeval{\tkz@hh / \tkz@dd * (\tkz@bx - \tkz@ax)}} -\edef\tkz@xs{\fpeval{\tkz@xx + \tkz@rx}} -\edef\tkz@ys{\fpeval{\tkz@yy + \tkz@ry}} -\path[coordinate](\tkz@xs pt,\tkz@ys pt) coordinate (#5); -\edef\tkz@xss{\fpeval{\tkz@xx - \tkz@rx}} -\edef\tkz@yss{\fpeval{\tkz@yy - \tkz@ry}} -\path[coordinate](\tkz@xss pt,\tkz@yss pt) coordinate (#6); -\endpgfinterruptboundingbox -\endgroup -} -%<--------------------------------------------------------------------------–> -% #2 node #3 node #4 node #5 node -% \def\tkzInterCC(#1,#2)(#3,#4)#5#6{% -% \begingroup -% \tkzCalcLength(#1,#2)\tkzGetLength{tkz@rayA} -% \tkzCalcLength(#3,#4)\tkzGetLength{tkz@rayB} -% \tkzInterCCR(#1,\tkz@rayA pt)(#3,\tkz@rayB pt){#5}{#6} -% \endgroup -% } -%<--------------------------------------------------------------------------–> -% Intersection de deux cercles Avec deux points -%<--------------------------------------------------------------------------–> -% la première variante devrait être #2 #3 avec #4 #5 -\def\tkzInterCCWithNodes(#1,#2,#3)(#4,#5,#6)#7#8{% -\begingroup - \tkzCalcLength(#2,#3)\tkzGetLength{tkz@rayA} - \tkzCalcLength(#5,#6)\tkzGetLength{tkz@rayB} - \tkzInterCCR(#1,\tkz@rayA pt)(#4,\tkz@rayB pt){#7}{#8} -\endgroup -} -\makeatother -\endinput \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-math.tex b/Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-math.tex deleted file mode 100644 index fbd34cb84c4..00000000000 --- a/Master/texmf-dist/tex/latex/tkz-euclide/tkz-tools-math.tex +++ /dev/null @@ -1,126 +0,0 @@ -% tkz-tools-math.tex -% Copyright 2020 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. -% The latest version of this license is in -% 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-tools-math.tex} -\makeatletter -%<--------------------------------------------------------------------------> -% \tkzpointnormalised normalise un point A-->A' tq ||v(OA')=1|| -% équivalent de \pgfpointnormalised avec fp -% example -% \tkzpointnormalised{% -% \pgfpointdiff{\pgfpointanchor{A}{center}} -% {\pgfpointanchor{B}{center}}} - -% or -% \pgf@x=1 cm -% \pgf@y=12 cm -% \tkzpointnormalised{} -%<-------------------------------------------------------------------------- -\def\tkzpointnormalised#1{% -\pgf@process{#1}% -\edef\tkz@den{\fpeval{sqrt((\pgf@x)^2+(\pgf@y)^2)}} -\edef\tkz@coordx{\fpeval{\pgf@x/\tkz@den}} -\edef\tkz@coordx{\fpeval{round(\tkz@coordx,5)}} -\edef\tkz@coordy{\fpeval{\pgf@y/\tkz@den}} -\edef\tkz@coordy{\fpeval{round(\tkz@coordy,5)}} -\pgf@x = \tkz@coordx pt -\pgf@y = \tkz@coordy pt -} -%<--------------------------------------------------------------------------> -% restaure and save length -\def\tkz@save@length{% -\global\let\tkz@temp@length\tkzLengthResult}% -\def\tkz@restore@length{% - \global\let\tkzLengthResult\tkz@temp@length }% -%<--------------------------------------------------------------------------> -% \tkzCalcLength Distance entre deux points en pt ou en cm avec xfp -% \veclen mais avec fp -% option cm le résultat est en cm sinon en pt -%<--------------------------------------------------------------------------> -\pgfkeys{tkzcalclen/.cd, - cm/.is if = tkzLengthIncm, - cm/.default = true} - -\def\tkzCalcLength{\pgfutil@ifnextchar[{\tkz@CalcLength}{\tkz@CalcLength[]}} -\def\tkz@CalcLength[#1](#2,#3){% -\pgfkeys{tkzcalclen/.cd, cm = false} -\pgfqkeys{/tkzcalclen}{#1}% -\begingroup -\tkz@@CalcLength(#2,#3){tkzLengthResult} -\iftkzLengthIncm - \pgfmathparse{\tkz@xfpMathLen pt/1cm} - \edef\tkz@xfpMathLen{\fpeval{round(\pgfmathresult,5)}} - \global\let\tkzLengthResult\tkz@xfpMathLen -\fi -\endgroup -}% -\def\tkz@@CalcLength(#1,#2)#3{% -\pgfpointdiff{\pgfpointanchor{#1}{center}}% - {\pgfpointanchor{#2}{center}}% -\edef\tkz@xfpMathLen{\fpeval{sqrt((\pgf@x)^2+(\pgf@y)^2)}} -\edef\tkz@xfpMathLen{\fpeval{round(\tkz@xfpMathLen,5)}} -\global\expandafter\edef\csname #3\endcsname{\tkz@xfpMathLen} -} -%<--------------------------------------------------------------------------> -\def\tkzGetLength#1{% -\global\expandafter\edef\csname #1\endcsname{\tkzLengthResult}} -%<--------------------------------------------------------------------------> -% \tkzpttocm passage de pt   cm div par 28.45274 -%<--------------------------------------------------------------------------> -\def\tkzpttocm(#1)#2{% -\begingroup - \pgfmathparse{#1/1cm} - \edef\tkz@mathresult{\fpeval{round(\pgfmathresult,5)}} - \global\let\tkz@mathresult\tkz@mathresult - \global\expandafter\edef\csname #2\endcsname{\tkz@mathresult}% -\endgroup -}% -%<--------------------------------------------------------------------------> -% \tkzcmtopt passage de cm   pt mul par 28.45274 -%<-------------------------------------------------------------------------- -\def\tkzcmtopt(#1)#2{% -\begingroup - \pgfmathparse{#1/1pt} - \edef\tkz@mathresult{\fpeval{round(\pgfmathresult,5)}} - \global\let\tkz@mathresult\tkz@mathresult - \global\expandafter\edef\csname #2\endcsname{\tkz@mathresult}% -\endgroup -}% -%<--------------------------------------------------------------------------> -% Slope -%<--------------------------------------------------------------------------> -\def\tkzFindSlope{\tkz@FindSlope} -\def\tkz@FindSlope(#1,#2)#3{% -\begingroup - \tkzpointnormalised{\pgfpointdiff{\pgfpointanchor{#1}{center}}% - {\pgfpointanchor{#2}{center}}} - \edef\tkz@Slope{\fpeval{\pgfmath@tonumber{\pgf@y}/\pgfmath@tonumber{\pgf@x}}} - \edef\tkz@Slope{\fpeval{round(\tkz@Slope,5)}} - \global\expandafter\edef\csname #3\endcsname{\tkz@Slope}% -\endgroup -} -% Schrodinger's cat idea 03/01/20 -\tikzset{xfp/.code={% -\pgfmathdeclarefunction*{veclen}{2}{% -\begingroup% - \pgfmath@x##1pt\relax% - \pgfmath@y##2pt\relax% - \edef\tkz@xfpMathLen{\fpeval{sqrt((\pgf@x)^2+(\pgf@y)^2)}} - \pgfmath@returnone\tkz@xfpMathLen pt% -\endgroup% -}}} -\makeatother -\endinput \ No newline at end of file -- cgit v1.2.3