From c7f2ac98fdc24c818454625f7cc94ec92da59939 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 31 Jan 2023 20:50:15 +0000 Subject: tangramtikz (31jan23) git-svn-id: svn://tug.org/texlive/trunk@65697 c570f23f-e606-0410-a88d-b1316a301751 --- .../doc/latex/tangramtikz/TangramTikz-doc-en.pdf | Bin 430175 -> 440579 bytes .../doc/latex/tangramtikz/TangramTikz-doc-en.tex | 178 ++++++++++---- .../doc/latex/tangramtikz/TangramTikz-doc-fr.pdf | Bin 428860 -> 439375 bytes .../doc/latex/tangramtikz/TangramTikz-doc-fr.tex | 176 ++++++++++---- .../tex/latex/tangramtikz/TangramTikz.sty | 264 ++++++++++++++++++++- 5 files changed, 517 insertions(+), 101 deletions(-) diff --git a/Master/texmf-dist/doc/latex/tangramtikz/TangramTikz-doc-en.pdf b/Master/texmf-dist/doc/latex/tangramtikz/TangramTikz-doc-en.pdf index 7a65de7e9d3..50fb16b213c 100644 Binary files a/Master/texmf-dist/doc/latex/tangramtikz/TangramTikz-doc-en.pdf and b/Master/texmf-dist/doc/latex/tangramtikz/TangramTikz-doc-en.pdf differ diff --git a/Master/texmf-dist/doc/latex/tangramtikz/TangramTikz-doc-en.tex b/Master/texmf-dist/doc/latex/tangramtikz/TangramTikz-doc-en.tex index 91e5e63e25d..f383c700e8d 100644 --- a/Master/texmf-dist/doc/latex/tangramtikz/TangramTikz-doc-en.tex +++ b/Master/texmf-dist/doc/latex/tangramtikz/TangramTikz-doc-en.tex @@ -50,8 +50,8 @@ \setlength{\parindent}{0pt} \definecolor{LightGray}{gray}{0.9} -\def\TPversion{0.1.0} -\def\TPdate{23/01/2023} +\def\TPversion{0.1.2} +\def\TPdate{31/01/2023} \usepackage[most]{tcolorbox} \tcbuselibrary{minted} @@ -418,8 +418,12 @@ The second argument, \textit{optional} ans between \texttt{<...>}, give options \item etc \end{itemize} -The third argument, \textit{mandatory} and between \texttt{\{...\}} is the name of the predefined tangram : -% +The third argument, \textit{mandatory} and between \texttt{\{...\}} is the name of the predefined tangram (list below). + +\pagebreak + +\subsection{List of predefined tangrams} + \texttt{\begin{multicols}{5} \begin{itemize} \item Square @@ -438,11 +442,19 @@ The third argument, \textit{mandatory} and between \texttt{\{...\}} is the name \item Sailboat \item Kangaroo \item Dog + \item Plane + \item Rabbit + \item Rooster + \item Jogger + \item Dancer + \item Camel + \item Flamingo + \item Heart + \item Giraffe + \item Horse \end{itemize} \end{multicols}} -\pagebreak - \begin{PresentationCode}{} \TangramTikz{Rocket}~~ \TangramTikz[Color=red]{Rocket}~~ @@ -465,99 +477,163 @@ The third argument, \textit{mandatory} and between \texttt{\{...\}} is the name \end{PresentationCode} \begin{PresentationCode}{} - \TangramTikz{Pinguin} - \TangramTikz[Correction]{Pinguin} - \TangramTikz[ColorCorrection]{Pinguin} +\TangramTikz{Pinguin} +\TangramTikz[Correction]{Pinguin} +\TangramTikz[ColorCorrection]{Pinguin} +\end{PresentationCode} + +\begin{PresentationCode}{} +\TangramTikz{Boat} +\TangramTikz[Correction]{Boat} +\TangramTikz[ColorCorrection]{Boat} +\end{PresentationCode} + +\begin{PresentationCode}{} +\TangramTikz{Home} +\TangramTikz[Correction]{Home} +\TangramTikz[ColorCorrection]{Home} +\end{PresentationCode} + +\begin{PresentationCode}{} +\TangramTikz{FirTree} +\TangramTikz[Correction]{FirTree} +\TangramTikz[ColorCorrection]{FirTree} +\end{PresentationCode} + +\begin{PresentationCode}{} +\TangramTikz{Cat} +\TangramTikz[Correction]{Cat} +\TangramTikz[ColorCorrection]{Cat} +\end{PresentationCode} + +\begin{PresentationCode}{} +\TangramTikz{Swan} +\TangramTikz[Correction]{Swan} +\TangramTikz[ColorCorrection]{Swan} +\end{PresentationCode} + +\begin{PresentationCode}{} +\TangramTikz{Pyramid} +\TangramTikz[Correction]{Pyramid} +\TangramTikz[ColorCorrection]{Pyramid} \end{PresentationCode} \begin{PresentationCode}{} - \TangramTikz{Boat} - \TangramTikz[Correction]{Boat} - \TangramTikz[ColorCorrection]{Boat} +\TangramTikz{Duck} +\TangramTikz[Correction]{Duck} +\TangramTikz[ColorCorrection]{Duck} \end{PresentationCode} \begin{PresentationCode}{} - \TangramTikz{Home} - \TangramTikz[Correction]{Home} - \TangramTikz[ColorCorrection]{Home} +\TangramTikz{Rocket} +\TangramTikz[Correction]{Rocket} +\TangramTikz[ColorCorrection]{Rocket} \end{PresentationCode} \begin{PresentationCode}{} - \TangramTikz{FirTree} - \TangramTikz[Correction]{FirTree} - \TangramTikz[ColorCorrection]{FirTree} +\TangramTikz{Candle} +\TangramTikz[Correction]{Candle} +\TangramTikz[ColorCorrection]{Candle} \end{PresentationCode} \begin{PresentationCode}{} - \TangramTikz{Cat} - \TangramTikz[Correction]{Cat} - \TangramTikz[ColorCorrection]{Cat} +\TangramTikz{Shirt} +\TangramTikz[Correction]{Shirt} +\TangramTikz[ColorCorrection]{Shirt} \end{PresentationCode} \begin{PresentationCode}{} - \TangramTikz{Swan} - \TangramTikz[Correction]{Swan} - \TangramTikz[ColorCorrection]{Swan} +\TangramTikz{Fish} +\TangramTikz[Correction]{Fish} +\TangramTikz[ColorCorrection]{Fish} \end{PresentationCode} \begin{PresentationCode}{} - \TangramTikz{Pyramid} - \TangramTikz[Correction]{Pyramid} - \TangramTikz[ColorCorrection]{Pyramid} +\TangramTikz{Sailboat} +\TangramTikz[Correction]{Sailboat} +\TangramTikz[ColorCorrection]{Sailboat} \end{PresentationCode} \begin{PresentationCode}{} - \TangramTikz{Duck} - \TangramTikz[Correction]{Duck} - \TangramTikz[ColorCorrection]{Duck} +\TangramTikz{Kangaroo} +\TangramTikz[Correction]{Kangaroo} +\TangramTikz[ColorCorrection]{Kangaroo} \end{PresentationCode} \begin{PresentationCode}{} - \TangramTikz{Rocket} - \TangramTikz[Correction]{Rocket} - \TangramTikz[ColorCorrection]{Rocket} +\TangramTikz{Dog} +\TangramTikz[Correction]{Dog} +\TangramTikz[ColorCorrection]{Dog} \end{PresentationCode} \begin{PresentationCode}{} - \TangramTikz{Candle} - \TangramTikz[Correction]{Candle} - \TangramTikz[ColorCorrection]{Candle} +\TangramTikz{Plane} +\TangramTikz[Correction]{Plane} +\TangramTikz[ColorCorrection]{Plane} \end{PresentationCode} \begin{PresentationCode}{} - \TangramTikz{Shirt} - \TangramTikz[Correction]{Shirt} - \TangramTikz[ColorCorrection]{Shirt} +\TangramTikz{Rabbit} +\TangramTikz[Correction]{Rabbit} +\TangramTikz[ColorCorrection]{Rabbit} \end{PresentationCode} \begin{PresentationCode}{} - \TangramTikz{Fish} - \TangramTikz[Correction]{Fish} - \TangramTikz[ColorCorrection]{Fish} +\TangramTikz{Rooster} +\TangramTikz[Correction]{Rooster} +\TangramTikz[ColorCorrection]{Rooster} \end{PresentationCode} \begin{PresentationCode}{} - \TangramTikz{Sailboat} - \TangramTikz[Correction]{Sailboat} - \TangramTikz[ColorCorrection]{Sailboat} +\TangramTikz{Jogger} +\TangramTikz[Correction]{Jogger} +\TangramTikz[ColorCorrection]{Jogger} \end{PresentationCode} \begin{PresentationCode}{} - \TangramTikz{Kangaroo} - \TangramTikz[Correction]{Kangaroo} - \TangramTikz[ColorCorrection]{Kangaroo} +\TangramTikz{Dancer} +\TangramTikz[Correction]{Dancer} +\TangramTikz[ColorCorrection]{Dancer} \end{PresentationCode} \begin{PresentationCode}{} - \TangramTikz{Dog} - \TangramTikz[Correction]{Dog} - \TangramTikz[ColorCorrection]{Dog} +\TangramTikz{Camel} +\TangramTikz[Correction]{Camel} +\TangramTikz[ColorCorrection]{Camel} +\end{PresentationCode} + +\begin{PresentationCode}{} +\TangramTikz{Flamingo} +\TangramTikz[Correction]{Flamingo} +\TangramTikz[ColorCorrection]{Flamingo} +\end{PresentationCode} + +\begin{PresentationCode}{} +\TangramTikz{Heart} +\TangramTikz[Correction]{Heart} +\TangramTikz[ColorCorrection]{Heart} +\end{PresentationCode} + +\begin{PresentationCode}{} +\TangramTikz{Giraffe} +\TangramTikz[Correction]{Giraffe} +\TangramTikz[ColorCorrection]{Giraffe} +\end{PresentationCode} + +\begin{PresentationCode}{} +\TangramTikz{Horse} +\TangramTikz[Correction]{Horse} +\TangramTikz[ColorCorrection]{Horse} \end{PresentationCode} \newpage \part{History} +\verb|v0.1.2|~:~~~~New models + +\verb|v0.1.1|~:~~~~New models + \verb|v0.1.0|~:~~~~Initial version \end{document} \ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/tangramtikz/TangramTikz-doc-fr.pdf b/Master/texmf-dist/doc/latex/tangramtikz/TangramTikz-doc-fr.pdf index 4025111adf7..a1f58c7d289 100644 Binary files a/Master/texmf-dist/doc/latex/tangramtikz/TangramTikz-doc-fr.pdf and b/Master/texmf-dist/doc/latex/tangramtikz/TangramTikz-doc-fr.pdf differ diff --git a/Master/texmf-dist/doc/latex/tangramtikz/TangramTikz-doc-fr.tex b/Master/texmf-dist/doc/latex/tangramtikz/TangramTikz-doc-fr.tex index 19fc03ab707..80bc5d553ee 100644 --- a/Master/texmf-dist/doc/latex/tangramtikz/TangramTikz-doc-fr.tex +++ b/Master/texmf-dist/doc/latex/tangramtikz/TangramTikz-doc-fr.tex @@ -49,8 +49,8 @@ \setlength{\parindent}{0pt} \definecolor{LightGray}{gray}{0.9} -\def\TPversion{0.1.0} -\def\TPdate{23 Janvier 2023} +\def\TPversion{0.1.2} +\def\TPdate{31 Janvier 2023} \usepackage[most]{tcolorbox} \tcbuselibrary{minted} @@ -420,8 +420,12 @@ Le deuxième argument, \textit{optionnel} et entre \texttt{<...>}, correspond au \item etc \end{itemize} -Le troisième argument, \textit{obligatoire} et entre \texttt{\{...\}} est quant à lui le nom du Tangram issu de la \textit{base de données} présente dans le package : +Le troisième argument, \textit{obligatoire} et entre \texttt{\{...\}} est quant à lui le nom du Tangram issu de la \textit{base de données} présente dans le package (liste ci-après). +\pagebreak + +\subsection{Liste des Tangrams inclus dans le package} +% \texttt{\begin{multicols}{5} \begin{itemize} \item Carre @@ -440,10 +444,20 @@ Le troisième argument, \textit{obligatoire} et entre \texttt{\{...\}} est quant \item Voilier \item Kangourou \item Chien + \item Lapin + \item Avion + \item Coq + \item Coureur + \item Danseur + \item Chameau + \item Flamant + \item Coeur + \item Girafe + \item Cheval \end{itemize} \end{multicols}} -\pagebreak +\medskip \begin{PresentationCode}{} \TangramTikz{Fusee}~~ @@ -467,99 +481,163 @@ Le troisième argument, \textit{obligatoire} et entre \texttt{\{...\}} est quant \end{PresentationCode} \begin{PresentationCode}{} - \TangramTikz{Pingouin} - \TangramTikz[Correction]{Pingouin} - \TangramTikz[CorrectionCouleur]{Pingouin} +\TangramTikz{Pingouin} +\TangramTikz[Correction]{Pingouin} +\TangramTikz[CorrectionCouleur]{Pingouin} +\end{PresentationCode} + +\begin{PresentationCode}{} +\TangramTikz{Bateau} +\TangramTikz[Correction]{Bateau} +\TangramTikz[CorrectionCouleur]{Bateau} +\end{PresentationCode} + +\begin{PresentationCode}{} +\TangramTikz{Maison} +\TangramTikz[Correction]{Maison} +\TangramTikz[CorrectionCouleur]{Maison} +\end{PresentationCode} + +\begin{PresentationCode}{} +\TangramTikz{Sapin} +\TangramTikz[Correction]{Sapin} +\TangramTikz[CorrectionCouleur]{Sapin} +\end{PresentationCode} + +\begin{PresentationCode}{} +\TangramTikz{Chat} +\TangramTikz[Correction]{Chat} +\TangramTikz[CorrectionCouleur]{Chat} +\end{PresentationCode} + +\begin{PresentationCode}{} +\TangramTikz{Cygne} +\TangramTikz[Correction]{Cygne} +\TangramTikz[CorrectionCouleur]{Cygne} +\end{PresentationCode} + +\begin{PresentationCode}{} +\TangramTikz{Pyramide} +\TangramTikz[Correction]{Pyramide} +\TangramTikz[CorrectionCouleur]{Pyramide} +\end{PresentationCode} + +\begin{PresentationCode}{} +\TangramTikz{Canard} +\TangramTikz[Correction]{Canard} +\TangramTikz[CorrectionCouleur]{Canard} +\end{PresentationCode} + +\begin{PresentationCode}{} +\TangramTikz{Fusee} +\TangramTikz[Correction]{Fusee} +\TangramTikz[CorrectionCouleur]{Fusee} \end{PresentationCode} \begin{PresentationCode}{} - \TangramTikz{Bateau} - \TangramTikz[Correction]{Bateau} - \TangramTikz[CorrectionCouleur]{Bateau} +\TangramTikz{Bougie} +\TangramTikz[Correction]{Bougie} +\TangramTikz[CorrectionCouleur]{Bougie} \end{PresentationCode} \begin{PresentationCode}{} - \TangramTikz{Maison} - \TangramTikz[Correction]{Maison} - \TangramTikz[CorrectionCouleur]{Maison} +\TangramTikz{Chemise} +\TangramTikz[Correction]{Chemise} +\TangramTikz[CorrectionCouleur]{Chemise} \end{PresentationCode} \begin{PresentationCode}{} - \TangramTikz{Sapin} - \TangramTikz[Correction]{Sapin} - \TangramTikz[CorrectionCouleur]{Sapin} +\TangramTikz{Poisson} +\TangramTikz[Correction]{Poisson} +\TangramTikz[CorrectionCouleur]{Poisson} \end{PresentationCode} \begin{PresentationCode}{} - \TangramTikz{Chat} - \TangramTikz[Correction]{Chat} - \TangramTikz[CorrectionCouleur]{Chat} +\TangramTikz{Voilier} +\TangramTikz[Correction]{Voilier} +\TangramTikz[CorrectionCouleur]{Voilier} \end{PresentationCode} \begin{PresentationCode}{} - \TangramTikz{Cygne} - \TangramTikz[Correction]{Cygne} - \TangramTikz[CorrectionCouleur]{Cygne} +\TangramTikz{Kangourou} +\TangramTikz[Correction]{Kangourou} +\TangramTikz[CorrectionCouleur]{Kangourou} \end{PresentationCode} \begin{PresentationCode}{} - \TangramTikz{Pyramide} - \TangramTikz[Correction]{Pyramide} - \TangramTikz[CorrectionCouleur]{Pyramide} +\TangramTikz{Chien} +\TangramTikz[Correction]{Chien} +\TangramTikz[CorrectionCouleur]{Chien} \end{PresentationCode} \begin{PresentationCode}{} - \TangramTikz{Canard} - \TangramTikz[Correction]{Canard} - \TangramTikz[CorrectionCouleur]{Canard} +\TangramTikz{Lapin} +\TangramTikz[Correction]{Lapin} +\TangramTikz[CorrectionCouleur]{Lapin} \end{PresentationCode} \begin{PresentationCode}{} - \TangramTikz{Fusee} - \TangramTikz[Correction]{Fusee} - \TangramTikz[CorrectionCouleur]{Fusee} +\TangramTikz{Avion} +\TangramTikz[Correction]{Avion} +\TangramTikz[CorrectionCouleur]{Avion} \end{PresentationCode} \begin{PresentationCode}{} - \TangramTikz{Bougie} - \TangramTikz[Correction]{Bougie} - \TangramTikz[CorrectionCouleur]{Bougie} +\TangramTikz{Coq} +\TangramTikz[Correction]{Coq} +\TangramTikz[CorrectionCouleur]{Coq} \end{PresentationCode} \begin{PresentationCode}{} - \TangramTikz{Chemise} - \TangramTikz[Correction]{Chemise} - \TangramTikz[CorrectionCouleur]{Chemise} +\TangramTikz{Coureur} +\TangramTikz[Correction]{Coureur} +\TangramTikz[CorrectionCouleur]{Coureur} \end{PresentationCode} \begin{PresentationCode}{} - \TangramTikz{Poisson} - \TangramTikz[Correction]{Poisson} - \TangramTikz[CorrectionCouleur]{Poisson} +\TangramTikz{Danseur} +\TangramTikz[Correction]{Danseur} +\TangramTikz[CorrectionCouleur]{Danseur} \end{PresentationCode} \begin{PresentationCode}{} - \TangramTikz{Voilier} - \TangramTikz[Correction]{Voilier} - \TangramTikz[CorrectionCouleur]{Voilier} +\TangramTikz{Chameau} +\TangramTikz[Correction]{Chameau} +\TangramTikz[CorrectionCouleur]{Chameau} \end{PresentationCode} \begin{PresentationCode}{} - \TangramTikz{Kangourou} - \TangramTikz[Correction]{Kangourou} - \TangramTikz[CorrectionCouleur]{Kangourou} +\TangramTikz{Flamant} +\TangramTikz[Correction]{Flamant} +\TangramTikz[CorrectionCouleur]{Flamant} \end{PresentationCode} \begin{PresentationCode}{} - \TangramTikz{Chien} - \TangramTikz[Correction]{Chien} - \TangramTikz[CorrectionCouleur]{Chien} +\TangramTikz{Coeur} +\TangramTikz[Correction]{Coeur} +\TangramTikz[CorrectionCouleur]{Coeur} +\end{PresentationCode} + +\begin{PresentationCode}{} +\TangramTikz{Girafe} +\TangramTikz[Correction]{Girafe} +\TangramTikz[CorrectionCouleur]{Girafe} +\end{PresentationCode} + +\begin{PresentationCode}{} +\TangramTikz{Cheval} +\TangramTikz[Correction]{Cheval} +\TangramTikz[CorrectionCouleur]{Cheval} \end{PresentationCode} \newpage \part{Historique} +\verb|v0.1.2|~:~~~~Nouveaux modèles + +\verb|v0.1.1|~:~~~~Nouveaux modèles + \verb|v0.1.0|~:~~~~Version initiale \end{document} \ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tangramtikz/TangramTikz.sty b/Master/texmf-dist/tex/latex/tangramtikz/TangramTikz.sty index 90e772d99ce..412b477de92 100644 --- a/Master/texmf-dist/tex/latex/tangramtikz/TangramTikz.sty +++ b/Master/texmf-dist/tex/latex/tangramtikz/TangramTikz.sty @@ -3,7 +3,9 @@ % Inspiration....: https://tex.stackexchange.com/questions/407449/typesetting-tangram-figures-in-latex \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{TangramTikz}[2023/01/22 v0.1.0 Tangram Puzzles with TikZ] +\ProvidesPackage{TangramTikz}[2023/01/31 v0.1.2 Tangram Puzzles with TikZ] +% 0.1.2 Ajout de modèles +% 0.1.1 Ajout de modèles % 0.1.0 Version initiale + quelques modèles %------Packages utiles @@ -407,6 +409,236 @@ }% } +%the rabbit / le lapin (0.1.1) +\NewDocumentCommand\TangramRabbit{ s O{TangPuzz} }{%*=colorcorrection,[key for pic] + \IfBooleanTF{#1}% + {% + \PieceTangram[TangSol={\TanGListeCouleurs[1]}]({0},{0}){TangGrandTri} + \PieceTangram[TangSol={\TanGListeCouleurs[1]}]({-sqrt(2)},{-sqrt(2)}){TangGrandTri} + \PieceTangram[TangSol={\TanGListeCouleurs[3]}]({0},{-0.5}){TangPetTri} + \PieceTangram[TangSol={\TanGListeCouleurs[3]}]({-sqrt(2)},{-2}){TangPetTri} + \PieceTangram[TangSol={\TanGListeCouleurs[4]}]({0},{0}){TangCar} + \PieceTangram[TangSol={\TanGListeCouleurs[2]}]({0.2},{1}){TangMoyTri} + \PieceTangram[TangSol={\TanGListeCouleurs[5]}]({0.2},{1}){TangPara} + }% + {% + \PieceTangram[#2]({0},{0}){TangGrandTri} + \PieceTangram[#2]({-sqrt(2)},{-sqrt(2)}){TangGrandTri} + \PieceTangram[#2]({0},{-0.5}){TangPetTri} + \PieceTangram[#2]({-sqrt(2)},{-2}){TangPetTri} + \PieceTangram[#2]({0},{0}){TangCar} + \PieceTangram[#2]({0.2},{1}){TangMoyTri} + \PieceTangram[#2]({0.2},{1}){TangPara} + }% +} + +%the plane / l'avion (0.1.1) +\NewDocumentCommand\TangramPlane{ s O{TangPuzz} }{%*=colorcorrection,[key for pic] + \IfBooleanTF{#1}% + {% + \PieceTangram[TangSol={\TanGListeCouleurs[1]}]({0},{2}){TangGrandTri} + \PieceTangram[TangSol={\TanGListeCouleurs[1]}]({2},{0}){TangGrandTri} + \PieceTangram[TangSol={\TanGListeCouleurs[3]}]({2+0.5*sqrt(2)},{-0.5*sqrt(2)}){TangPetTri} + \PieceTangram[TangSol={\TanGListeCouleurs[5]}]({2},{0}){TangPara} + \PieceTangram[TangSol={\TanGListeCouleurs[4]}]({-1},{-0.75}){TangCar} + \PieceTangram[TangSol={\TanGListeCouleurs[3]}]({-1},{-0.75}){TangPetTri} + \PieceTangram[TangSol={\TanGListeCouleurs[2]}]({sqrt(2)-2},{0.25}){TangMoyTri} + }% + {% + \PieceTangram[#2]({0},{2}){TangGrandTri} + \PieceTangram[#2]({2},{0}){TangGrandTri} + \PieceTangram[#2]({2+0.5*sqrt(2)},{-0.5*sqrt(2)}){TangPetTri} + \PieceTangram[#2]({2},{0}){TangPara} + \PieceTangram[#2]({-1},{-0.75}){TangCar} + \PieceTangram[#2]({-1},{-0.75}){TangPetTri} + \PieceTangram[#2]({sqrt(2)-2},{0.25}){TangMoyTri} + }% +} + +%the rooster / le coq (0.1.1) +\NewDocumentCommand\TangramRooster{ s O{TangPuzz} }{%*=colorcorrection,[key for pic] + \IfBooleanTF{#1}% + {% + \PieceTangram[TangSol={\TanGListeCouleurs[1]}]({2},{0}){TangGrandTri} + \PieceTangram[TangSol={\TanGListeCouleurs[1]}]({0},{-1}){TangGrandTri} + \PieceTangram[TangSol={\TanGListeCouleurs[3]}]({1.6},{-0.4}){TangPetTri} + \PieceTangram[TangSol={\TanGListeCouleurs[2]}]({-2},{1}){TangMoyTri} + \PieceTangram[TangSol={\TanGListeCouleurs[4]}]({1},{0}){TangCar} + \PieceTangram[TangSol={\TanGListeCouleurs[3]}]({1+sqrt(2)},{1}){TangPetTri} + \PieceTangram[TangSol={\TanGListeCouleurs[5]}]({-2},{1}){TangPara} + }% + {% + \PieceTangram[#2]({2},{0}){TangGrandTri} + \PieceTangram[#2]({0},{-1}){TangGrandTri} + \PieceTangram[#2]({1.6},{-0.4}){TangPetTri} + \PieceTangram[#2]({-2},{1}){TangMoyTri} + \PieceTangram[#2]({1},{0}){TangCar} + \PieceTangram[#2]({1+sqrt(2)},{1}){TangPetTri} + \PieceTangram[#2]({-2},{1}){TangPara} + }% +} + +%the jogger / le coureur (0.1.1) +\NewDocumentCommand\TangramJogger{ s O{TangPuzz} }{%*=colorcorrection,[key for pic] + \IfBooleanTF{#1}% + {% + \PieceTangram[TangSol={\TanGListeCouleurs[1]}]({sqrt(2)},{-sqrt(2)}){TangGrandTri} + \PieceTangram[TangSol={\TanGListeCouleurs[1]}]({-1},{1}){TangGrandTri} + \PieceTangram[TangSol={\TanGListeCouleurs[4]}]({sqrt(2)-1},{1}){TangCar} + \PieceTangram[TangSol={\TanGListeCouleurs[2]}]({0},{-sqrt(2)}){TangMoyTri} + \PieceTangram[TangSol={\TanGListeCouleurs[3]}]({0.9},{-sqrt(2)-0.9}){TangPetTri} + \PieceTangram[TangSol={\TanGListeCouleurs[5]}]({-sqrt(2)-1},{-sqrt(2)-1}){TangPara} + \PieceTangram[TangSol={\TanGListeCouleurs[3]}]({-sqrt(2)-0.5},{-sqrt(2)-0.5}){TangPetTri} + }% + {% + \PieceTangram[#2]({sqrt(2)},{-sqrt(2)}){TangGrandTri} + \PieceTangram[#2]({-1},{1}){TangGrandTri} + \PieceTangram[#2]({sqrt(2)-1},{1}){TangCar} + \PieceTangram[#2]({0},{-sqrt(2)}){TangMoyTri} + \PieceTangram[#2]({0.9},{-sqrt(2)-0.9}){TangPetTri} + \PieceTangram[#2]({-sqrt(2)-1},{-sqrt(2)-1}){TangPara} + \PieceTangram[#2]({-sqrt(2)-0.5},{-sqrt(2)-0.5}){TangPetTri} + }% +} + +%the dancer / le danseur (0.1.1) +\NewDocumentCommand\TangramDancer{ s O{TangPuzz} }{%*=colorcorrection,[key for pic] + \IfBooleanTF{#1}% + {% + \PieceTangram[TangSol={\TanGListeCouleurs[1]}]({0},{0}){TangGrandTri} + \PieceTangram[TangSol={\TanGListeCouleurs[1]}]({3.5},{3.5}){TangGrandTri} + \PieceTangram[TangSol={\TanGListeCouleurs[4]}]({1.5},{3.5}){TangCar} + \PieceTangram[TangSol={\TanGListeCouleurs[5]}]({2},{2}){TangPara} + \PieceTangram[TangSol={\TanGListeCouleurs[3]}]({0.5},{0}){TangPetTri} + \PieceTangram[TangSol={\TanGListeCouleurs[2]}]({2},{1.5}){TangMoyTri} + \PieceTangram[TangSol={\TanGListeCouleurs[3]}]({2.5},{0}){TangPetTri} + }% + {% + \PieceTangram[#2]({0},{0}){TangGrandTri} + \PieceTangram[#2]({3.5},{3.5}){TangGrandTri} + \PieceTangram[#2]({1.5},{3.5}){TangCar} + \PieceTangram[#2]({2},{2}){TangPara} + \PieceTangram[#2]({0.5},{0}){TangPetTri} + \PieceTangram[#2]({2},{1.5}){TangMoyTri} + \PieceTangram[#2]({2.5},{0}){TangPetTri} + }% +} + +%the camel / le chameau (0.1.1) +\NewDocumentCommand\TangramCamel{ s O{TangPuzz} }{%*=colorcorrection,[key for pic] + \IfBooleanTF{#1}% + {% + \PieceTangram[TangSol={\TanGListeCouleurs[1]}]({0},{0}){TangGrandTri} + \PieceTangram[TangSol={\TanGListeCouleurs[2]}]({-2},{0}){TangMoyTri} + \PieceTangram[TangSol={\TanGListeCouleurs[3]}]({-2},{0}){TangPetTri} + \PieceTangram[TangSol={\TanGListeCouleurs[4]}]({0},{0}){TangCar} + \PieceTangram[TangSol={\TanGListeCouleurs[1]}]({0.5*sqrt(2)},{0.5*sqrt(2)}){TangGrandTri} + \PieceTangram[TangSol={\TanGListeCouleurs[5]}]({sqrt(2)},{0.25+sqrt(2)}){TangPara} + \PieceTangram[TangSol={\TanGListeCouleurs[3]}]({1+0.5*sqrt(2)},{1.5*sqrt(2)-0.25}){TangPetTri} + }% + {% + \PieceTangram[#2]({0},{0}){TangGrandTri} + \PieceTangram[#2]({-2},{0}){TangMoyTri} + \PieceTangram[#2]({-2},{0}){TangPetTri} + \PieceTangram[#2]({0},{0}){TangCar} + \PieceTangram[#2]({0.5*sqrt(2)},{0.5*sqrt(2)}){TangGrandTri} + \PieceTangram[#2]({sqrt(2)},{0.25+sqrt(2)}){TangPara} + \PieceTangram[#2]({1+0.5*sqrt(2)},{1.5*sqrt(2)-0.25}){TangPetTri} + }% +} + +%the flamingo / le flamant rose (0.1.2) +\NewDocumentCommand\TangramFlamingo{ s O{TangPuzz} }{%*=colorcorrection,[key for pic] + \IfBooleanTF{#1}% + {% + \PieceTangram[TangSol={\TanGListeCouleurs[1]}]({0},{0}){TangGrandTri} + \PieceTangram[TangSol={\TanGListeCouleurs[1]}]({0},{0}){TangGrandTri} + \PieceTangram[TangSol={\TanGListeCouleurs[4]}]({0},{0}){TangCar} + \PieceTangram[TangSol={\TanGListeCouleurs[5]}]({-0.5*sqrt(2)},{0.5*sqrt(2)}){TangPara} + \PieceTangram[TangSol={\TanGListeCouleurs[2]}]({0},{sqrt(2)}){TangMoyTri} + \PieceTangram[TangSol={\TanGListeCouleurs[3]}]({-1.5},{-1.5}){TangPetTri} + \PieceTangram[TangSol={\TanGListeCouleurs[3]}]({-1.5-0.35},{-1.5-sqrt(2)+0.35}){TangPetTri} + }% + {% + \PieceTangram[#2]({0},{0}){TangGrandTri} + \PieceTangram[#2]({0},{0}){TangGrandTri} + \PieceTangram[#2]({0},{0}){TangCar} + \PieceTangram[#2]({-0.5*sqrt(2)},{0.5*sqrt(2)}){TangPara} + \PieceTangram[#2]({0},{sqrt(2)}){TangMoyTri} + \PieceTangram[#2]({-1.5},{-1.5}){TangPetTri} + \PieceTangram[#2]({-1.5-0.35},{-1.5-sqrt(2)+0.35}){TangPetTri} + }% +} + +%the heart / le coeur (0.1.2) +\NewDocumentCommand\TangramHeart{ s O{TangPuzz} }{%*=colorcorrection,[key for pic] + \IfBooleanTF{#1}% + {% + \PieceTangram[TangSol={\TanGListeCouleurs[1]}]({0},{0}){TangGrandTri} + \PieceTangram[TangSol={\TanGListeCouleurs[1]}]({3*sqrt(2)},{0}){TangGrandTri} + \PieceTangram[TangSol={\TanGListeCouleurs[5]}]({0},{0}){TangPara} + \PieceTangram[TangSol={\TanGListeCouleurs[3]}]({1.5*sqrt(2)},{0.5*sqrt(2)}){TangPetTri} + \PieceTangram[TangSol={\TanGListeCouleurs[2]}]({2*sqrt(2)},{-sqrt(2)}){TangMoyTri} + \PieceTangram[TangSol={\TanGListeCouleurs[3]}]({2*sqrt(2)},{0}){TangPetTri} + \PieceTangram[TangSol={\TanGListeCouleurs[4]}]({1.5*sqrt(2)},{-0.5*sqrt(2)}){TangCar} + }% + {% + \PieceTangram[#2]({0},{0}){TangGrandTri} + \PieceTangram[#2]({3*sqrt(2)},{0}){TangGrandTri} + \PieceTangram[#2]({0},{0}){TangPara} + \PieceTangram[#2]({1.5*sqrt(2)},{0.5*sqrt(2)}){TangPetTri} + \PieceTangram[#2]({2*sqrt(2)},{-sqrt(2)}){TangMoyTri} + \PieceTangram[#2]({2*sqrt(2)},{0}){TangPetTri} + \PieceTangram[#2]({1.5*sqrt(2)},{-0.5*sqrt(2)}){TangCar} + }% +} + +%the giraffe / la girafe (0.1.2) +\NewDocumentCommand\TangramGiraffe{ s O{TangPuzz} }{%*=colorcorrection,[key for pic] + \IfBooleanTF{#1}% + {% + \PieceTangram[TangSol={\TanGListeCouleurs[1]}]({0},{0}){TangGrandTri} + \PieceTangram[TangSol={\TanGListeCouleurs[3]}]({0},{0}){TangPetTri} + \PieceTangram[TangSol={\TanGListeCouleurs[4]}]({0.5*sqrt(2)},{-0.5*sqrt(2)}){TangCar} + \PieceTangram[TangSol={\TanGListeCouleurs[1]}]({sqrt(2)},{0}){TangGrandTri} + \PieceTangram[TangSol={\TanGListeCouleurs[5]}]({0.5*sqrt(2)},{1.5*sqrt(2)}){TangPara} + \PieceTangram[TangSol={\TanGListeCouleurs[3]}]({sqrt(2)},{2*sqrt(2)}){TangPetTri} + \PieceTangram[TangSol={\TanGListeCouleurs[2]}]({2*sqrt(2)},{1.5*sqrt(2)}){TangMoyTri} + }% + {% + \PieceTangram[#2]({0},{0}){TangGrandTri} + \PieceTangram[#2]({0},{0}){TangPetTri} + \PieceTangram[#2]({0.5*sqrt(2)},{-0.5*sqrt(2)}){TangCar} + \PieceTangram[#2]({sqrt(2)},{0}){TangGrandTri} + \PieceTangram[#2]({0.5*sqrt(2)},{1.5*sqrt(2)}){TangPara} + \PieceTangram[#2]({sqrt(2)},{2*sqrt(2)}){TangPetTri} + \PieceTangram[#2]({2*sqrt(2)},{1.5*sqrt(2)}){TangMoyTri} + }% +} + +%the horse / le cheval (0.1.2) +\NewDocumentCommand\TangramHorse{ s O{TangPuzz} }{%*=colorcorrection,[key for pic] + \IfBooleanTF{#1}% + {% + \PieceTangram[TangSol={\TanGListeCouleurs[1]}]({0},{0}){TangGrandTri} + \PieceTangram[TangSol={\TanGListeCouleurs[1]}]({2},{0}){TangGrandTri} + \PieceTangram[TangSol={\TanGListeCouleurs[3]}]({2+0.5*sqrt(2)},{-0.5*sqrt(2)}){TangPetTri} + \PieceTangram[TangSol={\TanGListeCouleurs[3]}]({0},{-2.5}){TangPetTri} + \PieceTangram[TangSol={\TanGListeCouleurs[4]}]({0},{0}){TangCar} + \PieceTangram[TangSol={\TanGListeCouleurs[2]}]({0},{1}){TangMoyTri} + \PieceTangram[TangSol={\TanGListeCouleurs[5]}]({-sqrt(2)},{-sqrt(2)}){TangPara} + }% + {% + \PieceTangram[#2]({0},{0}){TangGrandTri} + \PieceTangram[#2]({2},{0}){TangGrandTri} + \PieceTangram[#2]({2+0.5*sqrt(2)},{-0.5*sqrt(2)}){TangPetTri} + \PieceTangram[#2]({0},{-2.5}){TangPetTri} + \PieceTangram[#2]({0},{0}){TangCar} + \PieceTangram[#2]({0},{1}){TangMoyTri} + \PieceTangram[#2]({-sqrt(2)},{-sqrt(2)}){TangPara} + }% +} + %macros for tangram creation / commandes pour créer le tangram \NewDocumentCommand\TangramTikzCreateEN{ m }{% \readlist*\TanGListeCouleurs{\TangColors}% @@ -493,6 +725,36 @@ %DOG \IfStrEq{#3}{Dog}{\TangramTikzCreateEN{\TangramDog}}{}% \IfStrEq{#3}{Chien}{\TangramTikzCreateFR{\TangramDog}}{}% + %RABBIT + \IfStrEq{#3}{Rabbit}{\TangramTikzCreateEN{\TangramRabbit}}{}% + \IfStrEq{#3}{Lapin}{\TangramTikzCreateFR{\TangramRabbit}}{}% + %FLIGHT + \IfStrEq{#3}{Plane}{\TangramTikzCreateEN{\TangramPlane}}{}% + \IfStrEq{#3}{Avion}{\TangramTikzCreateFR{\TangramPlane}}{}% + %ROOSTER + \IfStrEq{#3}{Rooster}{\TangramTikzCreateEN{\TangramRooster}}{}% + \IfStrEq{#3}{Coq}{\TangramTikzCreateFR{\TangramRooster}}{}% + %JOGGER + \IfStrEq{#3}{Jogger}{\TangramTikzCreateEN{\TangramJogger}}{}% + \IfStrEq{#3}{Coureur}{\TangramTikzCreateFR{\TangramJogger}}{}% + %DANCER + \IfStrEq{#3}{Dancer}{\TangramTikzCreateEN{\TangramDancer}}{}% + \IfStrEq{#3}{Danseur}{\TangramTikzCreateFR{\TangramDancer}}{}% + %CAMEL + \IfStrEq{#3}{Camel}{\TangramTikzCreateEN{\TangramCamel}}{}% + \IfStrEq{#3}{Chameau}{\TangramTikzCreateFR{\TangramCamel}}{}% + %FLAMINGO + \IfStrEq{#3}{Flamingo}{\TangramTikzCreateEN{\TangramFlamingo}}{}% + \IfStrEq{#3}{Flamant}{\TangramTikzCreateFR{\TangramFlamingo}}{}% + %HEART + \IfStrEq{#3}{Heart}{\TangramTikzCreateEN{\TangramHeart}}{}% + \IfStrEq{#3}{Coeur}{\TangramTikzCreateFR{\TangramHeart}}{}% + %GIRAFFE + \IfStrEq{#3}{Giraffe}{\TangramTikzCreateEN{\TangramGiraffe}}{}% + \IfStrEq{#3}{Girafe}{\TangramTikzCreateFR{\TangramGiraffe}}{}% + %HORSE + \IfStrEq{#3}{Horse}{\TangramTikzCreateEN{\TangramHorse}}{}% + \IfStrEq{#3}{Cheval}{\TangramTikzCreateFR{\TangramHorse}}{}% \end{tikzpicture}% } -- cgit v1.2.3