summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/proflycee/tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/proflycee/tex')
-rw-r--r--macros/latex/contrib/proflycee/tex/ProfLycee.sty3
-rw-r--r--macros/latex/contrib/proflycee/tex/proflycee-tools-complexes.tex19
-rw-r--r--macros/latex/contrib/proflycee/tex/proflycee-tools-graphiques.tex48
3 files changed, 66 insertions, 4 deletions
diff --git a/macros/latex/contrib/proflycee/tex/ProfLycee.sty b/macros/latex/contrib/proflycee/tex/ProfLycee.sty
index d1c9f5a086..402bc94a18 100644
--- a/macros/latex/contrib/proflycee/tex/ProfLycee.sty
+++ b/macros/latex/contrib/proflycee/tex/ProfLycee.sty
@@ -3,7 +3,8 @@
% or later, see http://www.latex-project.org/lppl.txtf
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ProfLycee}[2024/01/02 3.01b Aide pour l'utilisation de LaTeX en lycee]
+\ProvidesPackage{ProfLycee}[2024/01/04 3.01c Aide pour l'utilisation de LaTeX en lycee]
+% 3.01c Ajout des splines en mode génération (sans forcément tracer)
% 3.01b Ajout de la division euclidienne + correction du bugs mineurs
% 3.01a Ajout des courbes ECC/FCC + paramètres par interpolation
% 3.00g Amélioration de la marge Gauche dans le PseudoCode
diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-complexes.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-complexes.tex
index ca64c0ac40..fedb4bfcfc 100644
--- a/macros/latex/contrib/proflycee/tex/proflycee-tools-complexes.tex
+++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-complexes.tex
@@ -1,5 +1,5 @@
% proflycee-tools-complexes.tex
-% Copyright 2023 Cédric Pierquet
+% Copyright 2023 Cédric Pierquet (expérimental)
% Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
\NewDocumentCommand\PartieReelle{ D<>{} m O{\PartReRes} }{%
@@ -59,14 +59,27 @@
\PartieReelle{#3}[\tmpreB]%
\PartieImaginaire{#2}[\tmpimA]%
\PartieImaginaire{#3}[\tmpimB]%
- \xdef\tmpreCalc{(\tmpreA)+(\tmpreB)}%
+ %\xdef\tmpreCalc{(\tmpreA)+(\tmpreB)}%
\xdef\xinttmpreCalc{\xinteval{(\tmpreA)+(\tmpreB)}}%
- \xdef\tmpimCalc{(\tmpimA)+(\tmpimB)}%
+ %\xdef\tmpimCalc{(\tmpimA)+(\tmpimB)}%
\xdef\xinttmpimCalc{\xinteval{(\tmpimA)+(\tmpimB)}}%
%\xinttmpreCalc\text{ et }\xinttmpimCalc.
\AffComplexe[#1]%
}
+\NewDocumentCommand\DifferenceComplexes{ O{} m m }{%
+ \PartieReelle{#2}[\tmpreA]%
+ \PartieReelle{#3}[\tmpreB]%
+ \PartieImaginaire{#2}[\tmpimA]%
+ \PartieImaginaire{#3}[\tmpimB]%
+ %\xdef\tmpreCalc{(\tmpreA)-(\tmpreB)}%
+ \xdef\xinttmpreCalc{\xinteval{(\tmpreA)-(\tmpreB)}}%
+ %\xdef\tmpimCalc{(\tmpimA)-(\tmpimB)}%
+ \xdef\xinttmpimCalc{\xinteval{(\tmpimA)-(\tmpimB)}}%
+ %\xinttmpreCalc\text{ et }\xinttmpimCalc.
+ \AffComplexe[#1]%
+}
+
\NewDocumentCommand\ProduitComplexes{ O{} m m }{%
\PartieReelle{#2}[\tmpreA]%
\PartieReelle{#3}[\tmpreB]%
diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-graphiques.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-graphiques.tex
index f6695cacd2..c7208604bf 100644
--- a/macros/latex/contrib/proflycee/tex/proflycee-tools-graphiques.tex
+++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-graphiques.tex
@@ -86,6 +86,54 @@
}%
}
+%générer les splines
+\defKV[genspline]{%
+ NumDebut=\def\tmpsplinenumdeb{#1},%
+ NumFin=\def\tmpsplinenumfin{#1}
+}
+
+\setKVdefault[genspline]{%
+ NumDebut=1,%
+ NumFin=dernier
+}
+
+\NewDocumentCommand\GenereSplineTikz{ D<>{} m O{\CourbeSplineTikz} }{%
+ %1=liste
+ %2=num point début
+ %3=num point fin
+ \useKVdefault[genspline]%
+ \setKV[genspline]{#1}%
+ \setsepchar[.]{§./}%
+ \readlist*\SPLlistepoints{#2}%
+ %les données
+ \xintifboolexpr{\tmpsplinenumdeb < 1}{\def\tmpsplinenumdeb{1}}{}%
+ \IfStrEq{\tmpsplinenumfin}{dernier}{\def\tmpsplinenumfin{\SPLlistepointslen}}{}%
+ \xintifboolexpr{\tmpsplinenumfin > \SPLlistepointslen}{\def\tmpsplinenumfin{\SPLlistepointslen}}{}%
+ \extractcoeff{\SPLcoeffs}{\tmpsplinenumdeb}%
+ %nb de calculs
+ \def\SPLnbsplines{\inteval{\tmpsplinenumfin-1}}%
+ %extraction des coordonnées
+ \itemtomacro\SPLlistepoints[\tmpsplinenumdeb,1]\xa%
+ \itemtomacro\SPLlistepoints[\tmpsplinenumdeb,2]\ya%
+ \itemtomacro\SPLlistepoints[\tmpsplinenumdeb,3]\fprimea%
+ \itemtomacro\SPLlistepoints[\tmpsplinenumdeb,1]\xb%
+ \itemtomacro\SPLlistepoints[\tmpsplinenumdeb,2]\yb%
+ \itemtomacro\SPLlistepoints[\tmpsplinenumdeb,3]\fprimeb%
+ \xdef#3{(\xa,\ya) ..controls +({atan \fprimea}:{(\xb-\xa)/\COEFFA}) and +({-180 + atan \fprimeb}:{(\xb-\xa)/\COEFFA}).. (\xb,\yb)}%
+ \foreach \i in {\tmpsplinenumdeb,...,\SPLnbsplines}{%
+ %extraction des coeffs de compensation
+ \extractcoeff{\SPLcoeffs}{\i}%
+ \def\j{\inteval{\i+1}}%
+ \itemtomacro\SPLlistepoints[\i,1]\xa%
+ \itemtomacro\SPLlistepoints[\i,2]\ya%
+ \itemtomacro\SPLlistepoints[\i,3]\fprimea%
+ \itemtomacro\SPLlistepoints[\j,1]\xb%
+ \itemtomacro\SPLlistepoints[\j,2]\yb%
+ \itemtomacro\SPLlistepoints[\j,3]\fprimeb%
+ \xdef#3{#3 ..controls +({atan \fprimea}:{(\xb-\xa)/\COEFFA}) and +({-180 + atan \fprimeb}:{(\xb-\xa)/\COEFFB}).. (\xb,\yb)}%
+ }%
+}
+
%splines en tikz avec ..controls
\defKV[spline]{%
Epaisseur=\def\SPLepaisseur{#1},%