diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-points-with.tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/tkz-euclide/tkz-obj-eu-points-with.tex | 76 |
1 files changed, 48 insertions, 28 deletions
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 6e235de7b3d..8d239713c7f 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,11 +1,20 @@ % tkz-obj-eu-points-with.tex -% Copyright 2020 by Alain Matthes -% This file may be distributed and/or modified -% 1. under the LaTeX Project Public License and/or -% 2. under the GNU Public License. -\def\fileversion{3.02c} -\def\filedate{2020/01/24} -\typeout{2020/01/24 3.02c tkz-obj-eu-points-with.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.05c} +\def\filedate{2020/03/03} +\typeout{2020/03/03 3.05c tkz-obj-eu-points-with.tex} \makeatletter %<--------------------------------------------------------------------------–> % Vectors @@ -72,28 +81,33 @@ linear/.code = {\def\tkz@numv{2}}, orthogonal normed/.code = {\def\tkz@numv{3}}, linear normed/.code = {\def\tkz@numv{4}}, - colinear normed/.code args = {at#1}{\def\tkz@numv{5}\def\tkz@frompoint{#1}}, - K/.code = {\pgfmathparse{#1}\def\tkz@ratio{\pgfmathresult}}, + colinear normed/.code args = {at #1}{\def\tkz@numv{5}\def\tkz@frompoint{#1}}, + K/.code = {\edef\tkz@coeff{\fpeval{#1}}}, K = 1, + normed/.is if = tkz@line@normed, + normed/.default = true, + normed = false, orthogonal } -\def\tkzDefPointWith[#1](#2,#3){% +\def\tkzDefPointWith{\pgfutil@ifnextchar[{\tkz@DefPointWith}{\tkz@DefPointWith[]}} + +\def\tkz@DefPointWith[#1](#2,#3){% \begingroup \pgfkeys{/@pointwith/.cd,K=1} \pgfqkeys{/@pointwith}{#1} \ifcase\tkz@numv% % first case 0 - \tkz@DefVectorColinearat[\tkz@ratio](#2,#3) + \tkz@DefVectorColinearat[\tkz@coeff](#2,#3) \or% 1 - \tkz@VecKOrth[\tkz@ratio](#2,#3) + \tkz@VecKOrth[\tkz@coeff](#2,#3) \or% 2 - \tkz@VecK[\tkz@ratio](#2,#3) + \tkz@VecK[\tkz@coeff](#2,#3) \or% 3 - \tkz@VecKOrthNorm[\tkz@ratio](#2,#3) + \tkz@VecKOrthNorm[\tkz@coeff](#2,#3) \or% 4 - \tkz@VecKNorm[\tkz@ratio](#2,#3) + \tkz@VecKNorm[\tkz@coeff](#2,#3) \or% 5 - \tkz@VecKColinearNorm[\tkz@ratio](#2,#3) + \tkz@VecKColinearNorm[\tkz@coeff](#2,#3) \fi \endgroup } @@ -102,33 +116,39 @@ %<--------------------------------------------------------------------------–> % tkz@numv 0 \def\tkz@DefVectorColinearat[#1](#2,#3){% +\iftkz@line@normed + \tkz@VecKColinearNorm[#1](#2,#3) +\else \begingroup \pgfpointdiff{\pgfpointanchor{#2}{center}}{\pgfpointanchor{#3}{center}}% \pgf@xa=\pgf@x\relax% \pgf@ya=\pgf@y\relax% \pgfinterruptboundingbox - \path (\tkz@frompoint)--++(\tkz@ratio\pgf@xa,\tkz@ratio\pgf@ya) coordinate (tkzPointResult); + \path (\tkz@frompoint)--++(\tkz@coeff\pgf@xa,\tkz@coeff\pgf@ya) coordinate (tkzPointResult); \endpgfinterruptboundingbox \endgroup +\fi } %<--------------------------------------------------------------------------–> -% tkzVector K Orth coeff dans #1 -% v(AN) perp v(AB) v(AB) v(AN) sens direct cercle trigo -% ||v(AN)||=||v(AB)|| +% tkzVector K Orth coeff dans #1 +% v(AN) perp v(AB) (v(AB) , v(AN) ) sens direct cercle trigo +% ||v(AN)||=||v(AB)|| %<--------------------------------------------------------------------------–> % tkz@numv 1 \def\tkzVecKOrth{\pgfutil@ifnextchar[{\tkz@VecKOrth}{\tkz@VecKOrth[1]}} \def\tkz@VecKOrth[#1](#2,#3){% +\iftkz@line@normed + \tkz@VecKOrthNorm[#1](#2,#3) +\else \begingroup \pgfpointdiff{\pgfpointanchor{#2}{center}}{\pgfpointanchor{#3}{center}}% \pgf@xa=-\pgf@y% \pgf@ya=\pgf@x% - \pgfmathparse{#1} - \let\tkz@coeff\pgfmathresult \pgfinterruptboundingbox \path (#2)--++(\tkz@coeff\pgf@xa,\tkz@coeff\pgf@ya) coordinate (tkzPointResult); \endpgfinterruptboundingbox \endgroup +\fi }% %<--------------------------------------------------------------------------–> @@ -138,6 +158,9 @@ % tkz@numv 2 \def\tkzVecK{\pgfutil@ifnextchar[{\tkz@VecK}{\tkz@VecK[1]}} \def\tkz@VecK[#1](#2,#3){% +\iftkz@line@normed + \tkz@VecKNorm[#1](#2,#3) +\else \begingroup \pgfpointdiff{\pgfpointanchor{#2}{center}}% {\pgfpointanchor{#3}{center}}% @@ -147,8 +170,9 @@ \let\tkz@coeff\pgfmathresult \pgfinterruptboundingbox \path (#2)--++(\tkz@coeff\pgf@xa,\tkz@coeff\pgf@ya) coordinate (tkzPointResult); - \endpgfinterruptboundingbox + \endpgfinterruptboundingbox \endgroup +\fi }% %<--------------------------------------------------------------------------–> % tkzVecKOrthNorm coeff dans #1 @@ -171,7 +195,6 @@ \endpgfinterruptboundingbox \endgroup }% - %<--------------------------------------------------------------------------–> % VectorNormalised ou K*VectorNormalised % A-->#2 B-->#3 N-->#4 v(AB) devient v(AN) tq ||v(AN)||=1 si #1=1 @@ -211,14 +234,12 @@ \endpgfinterruptboundingbox \endgroup }% - %<--------------------------------------------------------------------------–> -% VecKCoLinear CN = K x AB #1 pt #2 pt #3 pt #4 nb #5 pt result +% VecKCoLinear CN = K x AB #1 pt #2 pt #3 pt #4 nb #5 pt result % il faut modifier cette macro : on supprime #3 pour la colinéarité % Il suffit d'utiliser Replicate ou Duplicate coeff dans #1 % v(CD)=#1 x v(AB) #1 le coeff; #2-->A #3-->B #4-->C %<--------------------------------------------------------------------------–> - \def\tkz@VecKCoLinear[#1](#2,#3,#4){% \begingroup \pgfpointdiff{\pgfpointanchor{#2}{center}}% @@ -242,7 +263,6 @@ \endpgfinterruptboundingbox \endgroup }% - %<-------------------------------------------------------------------------–> \makeatother \endinput
\ No newline at end of file |